function cH(t,e){for(var r=0;r<e.length;r++){const a=e[r];if(typeof a!="string"&&!Array.isArray(a)){for(const n in a)if(n!=="default"&&!(n in t)){const i=Object.getOwnPropertyDescriptor(a,n);i&&Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>a[n]})}}}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 n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function r(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=r(n);fetch(n.href,i)}})();function ns(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function dH(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function a(){var n=!1;try{n=this instanceof a}catch{}return n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(a){var n=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(r,a,n.get?n:{enumerable:!0,get:function(){return t[a]}})}),r}var Fv={exports:{}},ah={};/**
 * @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 Kk;function uH(){if(Kk)return ah;Kk=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(a,n,i){var l=null;if(i!==void 0&&(l=""+i),n.key!==void 0&&(l=""+n.key),"key"in n){i={};for(var o in n)o!=="key"&&(i[o]=n[o])}else i=n;return n=i.ref,{$$typeof:t,type:a,key:l,ref:n!==void 0?n:null,props:i}}return ah.Fragment=e,ah.jsx=r,ah.jsxs=r,ah}var Zk;function hH(){return Zk||(Zk=1,Fv.exports=uH()),Fv.exports}var s=hH(),Bv={exports:{}},Qe={};/**
 * @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 Qk;function fH(){if(Qk)return Qe;Qk=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;function m(B){return B===null||typeof B!="object"?null:(B=p&&B[p]||B["@@iterator"],typeof B=="function"?B:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function v(B,G,te){this.props=B,this.context=G,this.refs=y,this.updater=te||x}v.prototype.isReactComponent={},v.prototype.setState=function(B,G){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,G,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function N(){}N.prototype=v.prototype;function C(B,G,te){this.props=B,this.context=G,this.refs=y,this.updater=te||x}var S=C.prototype=new N;S.constructor=C,b(S,v.prototype),S.isPureReactComponent=!0;var k=Array.isArray,A={H:null,A:null,T:null,S:null,V:null},T=Object.prototype.hasOwnProperty;function M(B,G,te,K,U,re){return te=re.ref,{$$typeof:t,type:B,key:G,ref:te!==void 0?te:null,props:re}}function O(B,G){return M(B.type,G,void 0,void 0,void 0,B.props)}function _(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function R(B){var G={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(te){return G[te]})}var L=/\/+/g;function z(B,G){return typeof B=="object"&&B!==null&&B.key!=null?R(""+B.key):G.toString(36)}function F(){}function Y(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(F,F):(B.status="pending",B.then(function(G){B.status==="pending"&&(B.status="fulfilled",B.value=G)},function(G){B.status==="pending"&&(B.status="rejected",B.reason=G)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function X(B,G,te,K,U){var re=typeof B;(re==="undefined"||re==="boolean")&&(B=null);var ne=!1;if(B===null)ne=!0;else switch(re){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(B.$$typeof){case t:case e:ne=!0;break;case h:return ne=B._init,X(ne(B._payload),G,te,K,U)}}if(ne)return U=U(B),ne=K===""?"."+z(B,0):K,k(U)?(te="",ne!=null&&(te=ne.replace(L,"$&/")+"/"),X(U,G,te,"",function(ue){return ue})):U!=null&&(_(U)&&(U=O(U,te+(U.key==null||B&&B.key===U.key?"":(""+U.key).replace(L,"$&/")+"/")+ne)),G.push(U)),1;ne=0;var we=K===""?".":K+":";if(k(B))for(var ye=0;ye<B.length;ye++)K=B[ye],re=we+z(K,ye),ne+=X(K,G,te,re,U);else if(ye=m(B),typeof ye=="function")for(B=ye.call(B),ye=0;!(K=B.next()).done;)K=K.value,re=we+z(K,ye++),ne+=X(K,G,te,re,U);else if(re==="object"){if(typeof B.then=="function")return X(Y(B),G,te,K,U);throw G=String(B),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ne}function H(B,G,te){if(B==null)return B;var K=[],U=0;return X(B,K,"","",function(re){return G.call(te,re,U++)}),K}function W(B){if(B._status===-1){var G=B._result;G=G(),G.then(function(te){(B._status===0||B._status===-1)&&(B._status=1,B._result=te)},function(te){(B._status===0||B._status===-1)&&(B._status=2,B._result=te)}),B._status===-1&&(B._status=0,B._result=G)}if(B._status===1)return B._result.default;throw B._result}var V=typeof reportError=="function"?reportError:function(B){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof B=="object"&&B!==null&&typeof B.message=="string"?String(B.message):String(B),error:B});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",B);return}console.error(B)};function Z(){}return Qe.Children={map:H,forEach:function(B,G,te){H(B,function(){G.apply(this,arguments)},te)},count:function(B){var G=0;return H(B,function(){G++}),G},toArray:function(B){return H(B,function(G){return G})||[]},only:function(B){if(!_(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},Qe.Component=v,Qe.Fragment=r,Qe.Profiler=n,Qe.PureComponent=C,Qe.StrictMode=a,Qe.Suspense=c,Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,Qe.__COMPILER_RUNTIME={__proto__:null,c:function(B){return A.H.useMemoCache(B)}},Qe.cache=function(B){return function(){return B.apply(null,arguments)}},Qe.cloneElement=function(B,G,te){if(B==null)throw Error("The argument must be a React element, but you passed "+B+".");var K=b({},B.props),U=B.key,re=void 0;if(G!=null)for(ne in G.ref!==void 0&&(re=void 0),G.key!==void 0&&(U=""+G.key),G)!T.call(G,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&G.ref===void 0||(K[ne]=G[ne]);var ne=arguments.length-2;if(ne===1)K.children=te;else if(1<ne){for(var we=Array(ne),ye=0;ye<ne;ye++)we[ye]=arguments[ye+2];K.children=we}return M(B.type,U,void 0,void 0,re,K)},Qe.createContext=function(B){return B={$$typeof:l,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null},B.Provider=B,B.Consumer={$$typeof:i,_context:B},B},Qe.createElement=function(B,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 ne=arguments.length-2;if(ne===1)U.children=te;else if(1<ne){for(var we=Array(ne),ye=0;ye<ne;ye++)we[ye]=arguments[ye+2];U.children=we}if(B&&B.defaultProps)for(K in ne=B.defaultProps,ne)U[K]===void 0&&(U[K]=ne[K]);return M(B,re,void 0,void 0,null,U)},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(B){return{$$typeof:o,render:B}},Qe.isValidElement=_,Qe.lazy=function(B){return{$$typeof:h,_payload:{_status:-1,_result:B},_init:W}},Qe.memo=function(B,G){return{$$typeof:d,type:B,compare:G===void 0?null:G}},Qe.startTransition=function(B){var G=A.T,te={};A.T=te;try{var K=B(),U=A.S;U!==null&&U(te,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(Z,V)}catch(re){V(re)}finally{A.T=G}},Qe.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},Qe.use=function(B){return A.H.use(B)},Qe.useActionState=function(B,G,te){return A.H.useActionState(B,G,te)},Qe.useCallback=function(B,G){return A.H.useCallback(B,G)},Qe.useContext=function(B){return A.H.useContext(B)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(B,G){return A.H.useDeferredValue(B,G)},Qe.useEffect=function(B,G,te){var K=A.H;if(typeof te=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return K.useEffect(B,G)},Qe.useId=function(){return A.H.useId()},Qe.useImperativeHandle=function(B,G,te){return A.H.useImperativeHandle(B,G,te)},Qe.useInsertionEffect=function(B,G){return A.H.useInsertionEffect(B,G)},Qe.useLayoutEffect=function(B,G){return A.H.useLayoutEffect(B,G)},Qe.useMemo=function(B,G){return A.H.useMemo(B,G)},Qe.useOptimistic=function(B,G){return A.H.useOptimistic(B,G)},Qe.useReducer=function(B,G,te){return A.H.useReducer(B,G,te)},Qe.useRef=function(B){return A.H.useRef(B)},Qe.useState=function(B){return A.H.useState(B)},Qe.useSyncExternalStore=function(B,G,te){return A.H.useSyncExternalStore(B,G,te)},Qe.useTransition=function(){return A.H.useTransition()},Qe.version="19.1.0",Qe}var Jk;function Qo(){return Jk||(Jk=1,Bv.exports=fH()),Bv.exports}var E=Qo();const qe=ns(E),Pw=cH({__proto__:null,default:qe},[E]);var Hv={exports:{}},nh={},$v={exports:{}},Yv={};/**
 * @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 e5;function pH(){return e5||(e5=1,function(t){function e(H,W){var V=H.length;H.push(W);e:for(;0<V;){var Z=V-1>>>1,B=H[Z];if(0<n(B,W))H[Z]=W,H[V]=B,V=Z;else break e}}function r(H){return H.length===0?null:H[0]}function a(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,B=H.length,G=B>>>1;Z<G;){var te=2*(Z+1)-1,K=H[te],U=te+1,re=H[U];if(0>n(K,V))U<B&&0>n(re,K)?(H[Z]=re,H[U]=V,Z=U):(H[Z]=K,H[te]=V,Z=te);else if(U<B&&0>n(re,V))H[Z]=re,H[U]=V,Z=U;else break e}}return W}function n(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 i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();t.unstable_now=function(){return l.now()-o}}var c=[],d=[],h=1,p=null,m=3,x=!1,b=!1,y=!1,v=!1,N=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function k(H){for(var W=r(d);W!==null;){if(W.callback===null)a(d);else if(W.startTime<=H)a(d),W.sortIndex=W.expirationTime,e(c,W);else break;W=r(d)}}function A(H){if(y=!1,k(H),!b)if(r(c)!==null)b=!0,T||(T=!0,z());else{var W=r(d);W!==null&&X(A,W.startTime-H)}}var T=!1,M=-1,O=5,_=-1;function R(){return v?!0:!(t.unstable_now()-_<O)}function L(){if(v=!1,T){var H=t.unstable_now();_=H;var W=!0;try{e:{b=!1,y&&(y=!1,C(M),M=-1),x=!0;var V=m;try{t:{for(k(H),p=r(c);p!==null&&!(p.expirationTime>H&&R());){var Z=p.callback;if(typeof Z=="function"){p.callback=null,m=p.priorityLevel;var B=Z(p.expirationTime<=H);if(H=t.unstable_now(),typeof B=="function"){p.callback=B,k(H),W=!0;break t}p===r(c)&&a(c),k(H)}else a(c);p=r(c)}if(p!==null)W=!0;else{var G=r(d);G!==null&&X(A,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(L)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,Y=F.port2;F.port1.onmessage=L,z=function(){Y.postMessage(null)}}else z=function(){N(L,0)};function X(H,W){M=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"):O=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(){v=!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 B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=V+B,H={id:h++,callback:W,priorityLevel:H,startTime:V,expirationTime:B,sortIndex:-1},V>Z?(H.sortIndex=V,e(d,H),r(c)===null&&H===r(d)&&(y?(C(M),M=-1):y=!0,X(A,V-Z))):(H.sortIndex=B,e(c,H),b||x||(b=!0,T||(T=!0,z()))),H},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(H){var W=m;return function(){var V=m;m=W;try{return H.apply(this,arguments)}finally{m=V}}}}(Yv)),Yv}var t5;function mH(){return t5||(t5=1,$v.exports=pH()),$v.exports}var Uv={exports:{}},na={};/**
 * @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 r5;function gH(){if(r5)return na;r5=1;var t=Qo();function e(c){var d="https://react.dev/errors/"+c;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={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},n=Symbol.for("react.portal");function i(c,d,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:n,key:p==null?null:""+p,children:c,containerInfo:d,implementation:h}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(c,d){if(c==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return na.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,na.createPortal=function(c,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(e(299));return i(c,d,null,h)},na.flushSync=function(c){var d=l.T,h=a.p;try{if(l.T=null,a.p=2,c)return c()}finally{l.T=d,a.p=h,a.d.f()}},na.preconnect=function(c,d){typeof c=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,a.d.C(c,d))},na.prefetchDNS=function(c){typeof c=="string"&&a.d.D(c)},na.preinit=function(c,d){if(typeof c=="string"&&d&&typeof d.as=="string"){var h=d.as,p=o(h,d.crossOrigin),m=typeof d.integrity=="string"?d.integrity:void 0,x=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?a.d.S(c,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:x}):h==="script"&&a.d.X(c,{crossOrigin:p,integrity:m,fetchPriority:x,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},na.preinitModule=function(c,d){if(typeof c=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=o(d.as,d.crossOrigin);a.d.M(c,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&a.d.M(c)},na.preload=function(c,d){if(typeof c=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,p=o(h,d.crossOrigin);a.d.L(c,h,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},na.preloadModule=function(c,d){if(typeof c=="string")if(d){var h=o(d.as,d.crossOrigin);a.d.m(c,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else a.d.m(c)},na.requestFormReset=function(c){a.d.r(c)},na.unstable_batchedUpdates=function(c,d){return c(d)},na.useFormState=function(c,d,h){return l.H.useFormState(c,d,h)},na.useFormStatus=function(){return l.H.useHostTransitionStatus()},na.version="19.1.0",na}var a5;function CO(){if(a5)return Uv.exports;a5=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(),Uv.exports=gH(),Uv.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 n5;function xH(){if(n5)return nh;n5=1;var t=mH(),e=Qo(),r=CO();function a(u){var f="https://react.dev/errors/"+u;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 #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function i(u){var f=u,g=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,(f.flags&4098)!==0&&(g=f.return),u=f.return;while(u)}return f.tag===3?g:null}function l(u){if(u.tag===13){var f=u.memoizedState;if(f===null&&(u=u.alternate,u!==null&&(f=u.memoizedState)),f!==null)return f.dehydrated}return null}function o(u){if(i(u)!==u)throw Error(a(188))}function c(u){var f=u.alternate;if(!f){if(f=i(u),f===null)throw Error(a(188));return f!==u?null:u}for(var g=u,w=f;;){var D=g.return;if(D===null)break;var P=D.alternate;if(P===null){if(w=D.return,w!==null){g=w;continue}break}if(D.child===P.child){for(P=D.child;P;){if(P===g)return o(D),u;if(P===w)return o(D),f;P=P.sibling}throw Error(a(188))}if(g.return!==w.return)g=D,w=P;else{for(var I=!1,$=D.child;$;){if($===g){I=!0,g=D,w=P;break}if($===w){I=!0,w=D,g=P;break}$=$.sibling}if(!I){for($=P.child;$;){if($===g){I=!0,g=P,w=D;break}if($===w){I=!0,w=P,g=D;break}$=$.sibling}if(!I)throw Error(a(189))}}if(g.alternate!==w)throw Error(a(190))}if(g.tag!==3)throw Error(a(188));return g.stateNode.current===g?u:f}function d(u){var f=u.tag;if(f===5||f===26||f===27||f===6)return u;for(u=u.child;u!==null;){if(f=d(u),f!==null)return f;u=u.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),S=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function z(u){return u===null||typeof u!="object"?null:(u=L&&u[L]||u["@@iterator"],typeof u=="function"?u:null)}var F=Symbol.for("react.client.reference");function Y(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===F?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case b:return"Fragment";case v:return"Profiler";case y:return"StrictMode";case A:return"Suspense";case T:return"SuspenseList";case _:return"Activity"}if(typeof u=="object")switch(u.$$typeof){case x:return"Portal";case S:return(u.displayName||"Context")+".Provider";case C:return(u._context.displayName||"Context")+".Consumer";case k:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case M:return f=u.displayName||null,f!==null?f:Y(u.type)||"Memo";case O:f=u._payload,u=u._init;try{return Y(u(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=[],B=-1;function G(u){return{current:u}}function te(u){0>B||(u.current=Z[B],Z[B]=null,B--)}function K(u,f){B++,Z[B]=u.current,u.current=f}var U=G(null),re=G(null),ne=G(null),we=G(null);function ye(u,f){switch(K(ne,f),K(re,u),K(U,null),f.nodeType){case 9:case 11:u=(u=f.documentElement)&&(u=u.namespaceURI)?Sk(u):0;break;default:if(u=f.tagName,f=f.namespaceURI)f=Sk(f),u=Ck(f,u);else switch(u){case"svg":u=1;break;case"math":u=2;break;default:u=0}}te(U),K(U,u)}function ue(){te(U),te(re),te(ne)}function je(u){u.memoizedState!==null&&K(we,u);var f=U.current,g=Ck(f,u.type);f!==g&&(K(re,u),K(U,g))}function Te(u){re.current===u&&(te(U),te(re)),we.current===u&&(te(we),Qu._currentValue=V)}var pe=Object.prototype.hasOwnProperty,Ue=t.unstable_scheduleCallback,_e=t.unstable_cancelCallback,xt=t.unstable_shouldYield,Wt=t.unstable_requestPaint,bt=t.unstable_now,va=t.unstable_getCurrentPriorityLevel,pn=t.unstable_ImmediatePriority,Ht=t.unstable_UserBlockingPriority,Ha=t.unstable_NormalPriority,Xe=t.unstable_LowPriority,iu=t.unstable_IdlePriority,kb=t.log,uc=t.unstable_setDisableYieldValue,zl=null,da=null;function cs(u){if(typeof kb=="function"&&uc(u),da&&typeof da.setStrictMode=="function")try{da.setStrictMode(zl,u)}catch{}}var Pr=Math.clz32?Math.clz32:Db,Il=Math.log,Fl=Math.LN2;function Db(u){return u>>>=0,u===0?32:31-(Il(u)/Fl|0)|0}var Ls=256,ea=4194304;function wa(u){var f=u&42;if(f!==0)return f;switch(u&-u){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 u&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return u&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return u}}function ta(u,f,g){var w=u.pendingLanes;if(w===0)return 0;var D=0,P=u.suspendedLanes,I=u.pingedLanes;u=u.warmLanes;var $=w&134217727;return $!==0?(w=$&~P,w!==0?D=wa(w):(I&=$,I!==0?D=wa(I):g||(g=$&~u,g!==0&&(D=wa(g))))):($=w&~P,$!==0?D=wa($):I!==0?D=wa(I):g||(g=w&~u,g!==0&&(D=wa(g)))),D===0?0:f!==0&&f!==D&&(f&P)===0&&(P=D&-D,g=f&-f,P>=g||P===32&&(g&4194048)!==0)?f:D}function Bl(u,f){return(u.pendingLanes&~(u.suspendedLanes&~u.pingedLanes)&f)===0}function Tb(u,f){switch(u){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 Hl(){var u=Ls;return Ls<<=1,(Ls&4194048)===0&&(Ls=256),u}function Sp(){var u=ea;return ea<<=1,(ea&62914560)===0&&(ea=4194304),u}function $l(u){for(var f=[],g=0;31>g;g++)f.push(u);return f}function zs(u,f){u.pendingLanes|=f,f!==268435456&&(u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0)}function Cp(u,f,g,w,D,P){var I=u.pendingLanes;u.pendingLanes=g,u.suspendedLanes=0,u.pingedLanes=0,u.warmLanes=0,u.expiredLanes&=g,u.entangledLanes&=g,u.errorRecoveryDisabledLanes&=g,u.shellSuspendCounter=0;var $=u.entanglements,q=u.expirationTimes,ie=u.hiddenUpdates;for(g=I&~g;0<g;){var fe=31-Pr(g),xe=1<<fe;$[fe]=0,q[fe]=-1;var le=ie[fe];if(le!==null)for(ie[fe]=null,fe=0;fe<le.length;fe++){var oe=le[fe];oe!==null&&(oe.lane&=-536870913)}g&=~xe}w!==0&&Ap(u,w,0),P!==0&&D===0&&u.tag!==0&&(u.suspendedLanes|=P&~(I&~f))}function Ap(u,f,g){u.pendingLanes|=f,u.suspendedLanes&=~f;var w=31-Pr(f);u.entangledLanes|=f,u.entanglements[w]=u.entanglements[w]|1073741824|g&4194090}function kp(u,f){var g=u.entangledLanes|=f;for(u=u.entanglements;g;){var w=31-Pr(g),D=1<<w;D&f|u[w]&f&&(u[w]|=f),g&=~D}}function lu(u){switch(u){case 2:u=1;break;case 8:u=4;break;case 32:u=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:u=128;break;case 268435456:u=134217728;break;default:u=0}return u}function ou(u){return u&=-u,2<u?8<u?(u&134217727)!==0?32:268435456:8:2}function Dp(){var u=W.p;return u!==0?u:(u=window.event,u===void 0?32:Uk(u.type))}function Mb(u,f){var g=W.p;try{return W.p=u,f()}finally{W.p=g}}var ds=Math.random().toString(36).slice(2),pr="__reactFiber$"+ds,Or="__reactProps$"+ds,$a="__reactContainer$"+ds,hc="__reactEvents$"+ds,Eb="__reactListeners$"+ds,Pb="__reactHandles$"+ds,Tp="__reactResources$"+ds,Yl="__reactMarker$"+ds;function cu(u){delete u[pr],delete u[Or],delete u[hc],delete u[Eb],delete u[Pb]}function Ei(u){var f=u[pr];if(f)return f;for(var g=u.parentNode;g;){if(f=g[$a]||g[pr]){if(g=f.alternate,f.child!==null||g!==null&&g.child!==null)for(u=Tk(u);u!==null;){if(g=u[pr])return g;u=Tk(u)}return f}u=g,g=u.parentNode}return null}function Un(u){if(u=u[pr]||u[$a]){var f=u.tag;if(f===5||f===6||f===13||f===26||f===27||f===3)return u}return null}function Is(u){var f=u.tag;if(f===5||f===26||f===27||f===6)return u.stateNode;throw Error(a(33))}function Wn(u){var f=u[Tp];return f||(f=u[Tp]={hoistableStyles:new Map,hoistableScripts:new Map}),f}function er(u){u[Yl]=!0}var us=new Set,du={};function Q(u,f){Pe(u,f),Pe(u+"Capture",f)}function Pe(u,f){for(du[u]=f,u=0;u<f.length;u++)us.add(f[u])}var Ze=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 Ul(u){return pe.call(nt,u)?!0:pe.call(We,u)?!1:Ze.test(u)?nt[u]=!0:(We[u]=!0,!1)}function Pi(u,f,g){if(Ul(f))if(g===null)u.removeAttribute(f);else{switch(typeof g){case"undefined":case"function":case"symbol":u.removeAttribute(f);return;case"boolean":var w=f.toLowerCase().slice(0,5);if(w!=="data-"&&w!=="aria-"){u.removeAttribute(f);return}}u.setAttribute(f,""+g)}}function Oi(u,f,g){if(g===null)u.removeAttribute(f);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(f);return}u.setAttribute(f,""+g)}}function ra(u,f,g,w){if(w===null)u.removeAttribute(g);else{switch(typeof w){case"undefined":case"function":case"symbol":case"boolean":u.removeAttribute(g);return}u.setAttributeNS(f,g,""+w)}}var Ob,x3;function fc(u){if(Ob===void 0)try{throw Error()}catch(g){var f=g.stack.trim().match(/\n( *(at )?)/);Ob=f&&f[1]||"",x3=-1<g.stack.indexOf(`
    at`)?" (<anonymous>)":-1<g.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Ob+u+x3}var Rb=!1;function _b(u,f){if(!u||Rb)return"";Rb=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var w={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(oe){var le=oe}Reflect.construct(u,[],xe)}else{try{xe.call()}catch(oe){le=oe}u.call(xe.prototype)}}else{try{throw Error()}catch(oe){le=oe}(xe=u())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(oe){if(oe&&le&&typeof oe.stack=="string")return[oe.stack,le.stack]}return[null,null]}};w.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var D=Object.getOwnPropertyDescriptor(w.DetermineComponentFrameRoot,"name");D&&D.configurable&&Object.defineProperty(w.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=w.DetermineComponentFrameRoot(),I=P[0],$=P[1];if(I&&$){var q=I.split(`
`),ie=$.split(`
`);for(D=w=0;w<q.length&&!q[w].includes("DetermineComponentFrameRoot");)w++;for(;D<ie.length&&!ie[D].includes("DetermineComponentFrameRoot");)D++;if(w===q.length||D===ie.length)for(w=q.length-1,D=ie.length-1;1<=w&&0<=D&&q[w]!==ie[D];)D--;for(;1<=w&&0<=D;w--,D--)if(q[w]!==ie[D]){if(w!==1||D!==1)do if(w--,D--,0>D||q[w]!==ie[D]){var fe=`
`+q[w].replace(" at new "," at ");return u.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",u.displayName)),fe}while(1<=w&&0<=D);break}}}finally{Rb=!1,Error.prepareStackTrace=g}return(g=u?u.displayName||u.name:"")?fc(g):""}function aF(u){switch(u.tag){case 26:case 27:case 5:return fc(u.type);case 16:return fc("Lazy");case 13:return fc("Suspense");case 19:return fc("SuspenseList");case 0:case 15:return _b(u.type,!1);case 11:return _b(u.type.render,!1);case 1:return _b(u.type,!0);case 31:return fc("Activity");default:return""}}function b3(u){try{var f="";do f+=aF(u),u=u.return;while(u);return f}catch(g){return`
Error generating stack: `+g.message+`
`+g.stack}}function mn(u){switch(typeof u){case"bigint":case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function y3(u){var f=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function nF(u){var f=y3(u)?"checked":"value",g=Object.getOwnPropertyDescriptor(u.constructor.prototype,f),w=""+u[f];if(!u.hasOwnProperty(f)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var D=g.get,P=g.set;return Object.defineProperty(u,f,{configurable:!0,get:function(){return D.call(this)},set:function(I){w=""+I,P.call(this,I)}}),Object.defineProperty(u,f,{enumerable:g.enumerable}),{getValue:function(){return w},setValue:function(I){w=""+I},stopTracking:function(){u._valueTracker=null,delete u[f]}}}}function Mp(u){u._valueTracker||(u._valueTracker=nF(u))}function v3(u){if(!u)return!1;var f=u._valueTracker;if(!f)return!0;var g=f.getValue(),w="";return u&&(w=y3(u)?u.checked?"true":"false":u.value),u=w,u!==g?(f.setValue(u),!0):!1}function Ep(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch{return u.body}}var sF=/[\n"\\]/g;function gn(u){return u.replace(sF,function(f){return"\\"+f.charCodeAt(0).toString(16)+" "})}function Lb(u,f,g,w,D,P,I,$){u.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?u.type=I:u.removeAttribute("type"),f!=null?I==="number"?(f===0&&u.value===""||u.value!=f)&&(u.value=""+mn(f)):u.value!==""+mn(f)&&(u.value=""+mn(f)):I!=="submit"&&I!=="reset"||u.removeAttribute("value"),f!=null?zb(u,I,mn(f)):g!=null?zb(u,I,mn(g)):w!=null&&u.removeAttribute("value"),D==null&&P!=null&&(u.defaultChecked=!!P),D!=null&&(u.checked=D&&typeof D!="function"&&typeof D!="symbol"),$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?u.name=""+mn($):u.removeAttribute("name")}function w3(u,f,g,w,D,P,I,$){if(P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(u.type=P),f!=null||g!=null){if(!(P!=="submit"&&P!=="reset"||f!=null))return;g=g!=null?""+mn(g):"",f=f!=null?""+mn(f):g,$||f===u.value||(u.value=f),u.defaultValue=f}w=w??D,w=typeof w!="function"&&typeof w!="symbol"&&!!w,u.checked=$?u.checked:!!w,u.defaultChecked=!!w,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(u.name=I)}function zb(u,f,g){f==="number"&&Ep(u.ownerDocument)===u||u.defaultValue===""+g||(u.defaultValue=""+g)}function pc(u,f,g,w){if(u=u.options,f){f={};for(var D=0;D<g.length;D++)f["$"+g[D]]=!0;for(g=0;g<u.length;g++)D=f.hasOwnProperty("$"+u[g].value),u[g].selected!==D&&(u[g].selected=D),D&&w&&(u[g].defaultSelected=!0)}else{for(g=""+mn(g),f=null,D=0;D<u.length;D++){if(u[D].value===g){u[D].selected=!0,w&&(u[D].defaultSelected=!0);return}f!==null||u[D].disabled||(f=u[D])}f!==null&&(f.selected=!0)}}function j3(u,f,g){if(f!=null&&(f=""+mn(f),f!==u.value&&(u.value=f),g==null)){u.defaultValue!==f&&(u.defaultValue=f);return}u.defaultValue=g!=null?""+mn(g):""}function N3(u,f,g,w){if(f==null){if(w!=null){if(g!=null)throw Error(a(92));if(X(w)){if(1<w.length)throw Error(a(93));w=w[0]}g=w}g==null&&(g=""),f=g}g=mn(f),u.defaultValue=g,w=u.textContent,w===g&&w!==""&&w!==null&&(u.value=w)}function mc(u,f){if(f){var g=u.firstChild;if(g&&g===u.lastChild&&g.nodeType===3){g.nodeValue=f;return}}u.textContent=f}var iF=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 S3(u,f,g){var w=f.indexOf("--")===0;g==null||typeof g=="boolean"||g===""?w?u.setProperty(f,""):f==="float"?u.cssFloat="":u[f]="":w?u.setProperty(f,g):typeof g!="number"||g===0||iF.has(f)?f==="float"?u.cssFloat=g:u[f]=(""+g).trim():u[f]=g+"px"}function C3(u,f,g){if(f!=null&&typeof f!="object")throw Error(a(62));if(u=u.style,g!=null){for(var w in g)!g.hasOwnProperty(w)||f!=null&&f.hasOwnProperty(w)||(w.indexOf("--")===0?u.setProperty(w,""):w==="float"?u.cssFloat="":u[w]="");for(var D in f)w=f[D],f.hasOwnProperty(D)&&g[D]!==w&&S3(u,D,w)}else for(var P in f)f.hasOwnProperty(P)&&S3(u,P,f[P])}function Ib(u){if(u.indexOf("-")===-1)return!1;switch(u){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 lF=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"]]),oF=/^[\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 Pp(u){return oF.test(""+u)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":u}var Fb=null;function Bb(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var gc=null,xc=null;function A3(u){var f=Un(u);if(f&&(u=f.stateNode)){var g=u[Or]||null;e:switch(u=f.stateNode,f.type){case"input":if(Lb(u,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name),f=g.name,g.type==="radio"&&f!=null){for(g=u;g.parentNode;)g=g.parentNode;for(g=g.querySelectorAll('input[name="'+gn(""+f)+'"][type="radio"]'),f=0;f<g.length;f++){var w=g[f];if(w!==u&&w.form===u.form){var D=w[Or]||null;if(!D)throw Error(a(90));Lb(w,D.value,D.defaultValue,D.defaultValue,D.checked,D.defaultChecked,D.type,D.name)}}for(f=0;f<g.length;f++)w=g[f],w.form===u.form&&v3(w)}break e;case"textarea":j3(u,g.value,g.defaultValue);break e;case"select":f=g.value,f!=null&&pc(u,!!g.multiple,f,!1)}}}var Hb=!1;function k3(u,f,g){if(Hb)return u(f,g);Hb=!0;try{var w=u(f);return w}finally{if(Hb=!1,(gc!==null||xc!==null)&&(xm(),gc&&(f=gc,u=xc,xc=gc=null,A3(f),u)))for(f=0;f<u.length;f++)A3(u[f])}}function uu(u,f){var g=u.stateNode;if(g===null)return null;var w=g[Or]||null;if(w===null)return null;g=w[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":(w=!w.disabled)||(u=u.type,w=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!w;break e;default:u=!1}if(u)return null;if(g&&typeof g!="function")throw Error(a(231,f,typeof g));return g}var Fs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$b=!1;if(Fs)try{var hu={};Object.defineProperty(hu,"passive",{get:function(){$b=!0}}),window.addEventListener("test",hu,hu),window.removeEventListener("test",hu,hu)}catch{$b=!1}var Ri=null,Yb=null,Op=null;function D3(){if(Op)return Op;var u,f=Yb,g=f.length,w,D="value"in Ri?Ri.value:Ri.textContent,P=D.length;for(u=0;u<g&&f[u]===D[u];u++);var I=g-u;for(w=1;w<=I&&f[g-w]===D[P-w];w++);return Op=D.slice(u,1<w?1-w:void 0)}function Rp(u){var f=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&f===13&&(u=13)):u=f,u===10&&(u=13),32<=u||u===13?u:0}function _p(){return!0}function T3(){return!1}function ja(u){function f(g,w,D,P,I){this._reactName=g,this._targetInst=D,this.type=w,this.nativeEvent=P,this.target=I,this.currentTarget=null;for(var $ in u)u.hasOwnProperty($)&&(g=u[$],this[$]=g?g(P):P[$]);return this.isDefaultPrevented=(P.defaultPrevented!=null?P.defaultPrevented:P.returnValue===!1)?_p:T3,this.isPropagationStopped=T3,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=_p)},stopPropagation:function(){var g=this.nativeEvent;g&&(g.stopPropagation?g.stopPropagation():typeof g.cancelBubble!="unknown"&&(g.cancelBubble=!0),this.isPropagationStopped=_p)},persist:function(){},isPersistent:_p}),f}var Wl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lp=ja(Wl),fu=h({},Wl,{view:0,detail:0}),cF=ja(fu),Ub,Wb,pu,zp=h({},fu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vb,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){return"movementX"in u?u.movementX:(u!==pu&&(pu&&u.type==="mousemove"?(Ub=u.screenX-pu.screenX,Wb=u.screenY-pu.screenY):Wb=Ub=0,pu=u),Ub)},movementY:function(u){return"movementY"in u?u.movementY:Wb}}),M3=ja(zp),dF=h({},zp,{dataTransfer:0}),uF=ja(dF),hF=h({},fu,{relatedTarget:0}),Xb=ja(hF),fF=h({},Wl,{animationName:0,elapsedTime:0,pseudoElement:0}),pF=ja(fF),mF=h({},Wl,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),gF=ja(mF),xF=h({},Wl,{data:0}),E3=ja(xF),bF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yF={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"},vF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wF(u){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(u):(u=vF[u])?!!f[u]:!1}function Vb(){return wF}var jF=h({},fu,{key:function(u){if(u.key){var f=bF[u.key]||u.key;if(f!=="Unidentified")return f}return u.type==="keypress"?(u=Rp(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?yF[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vb,charCode:function(u){return u.type==="keypress"?Rp(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?Rp(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),NF=ja(jF),SF=h({},zp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),P3=ja(SF),CF=h({},fu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vb}),AF=ja(CF),kF=h({},Wl,{propertyName:0,elapsedTime:0,pseudoElement:0}),DF=ja(kF),TF=h({},zp,{deltaX:function(u){return"deltaX"in u?u.deltaX:"wheelDeltaX"in u?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:"wheelDeltaY"in u?-u.wheelDeltaY:"wheelDelta"in u?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),MF=ja(TF),EF=h({},Wl,{newState:0,oldState:0}),PF=ja(EF),OF=[9,13,27,32],qb=Fs&&"CompositionEvent"in window,mu=null;Fs&&"documentMode"in document&&(mu=document.documentMode);var RF=Fs&&"TextEvent"in window&&!mu,O3=Fs&&(!qb||mu&&8<mu&&11>=mu),R3=" ",_3=!1;function L3(u,f){switch(u){case"keyup":return OF.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function z3(u){return u=u.detail,typeof u=="object"&&"data"in u?u.data:null}var bc=!1;function _F(u,f){switch(u){case"compositionend":return z3(f);case"keypress":return f.which!==32?null:(_3=!0,R3);case"textInput":return u=f.data,u===R3&&_3?null:u;default:return null}}function LF(u,f){if(bc)return u==="compositionend"||!qb&&L3(u,f)?(u=D3(),Op=Yb=Ri=null,bc=!1,u):null;switch(u){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 O3&&f.locale!=="ko"?null:f.data;default:return null}}var zF={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 I3(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f==="input"?!!zF[u.type]:f==="textarea"}function F3(u,f,g,w){gc?xc?xc.push(w):xc=[w]:gc=w,f=Nm(f,"onChange"),0<f.length&&(g=new Lp("onChange","change",null,g,w),u.push({event:g,listeners:f}))}var gu=null,xu=null;function IF(u){yk(u,0)}function Ip(u){var f=Is(u);if(v3(f))return u}function B3(u,f){if(u==="change")return f}var H3=!1;if(Fs){var Gb;if(Fs){var Kb="oninput"in document;if(!Kb){var $3=document.createElement("div");$3.setAttribute("oninput","return;"),Kb=typeof $3.oninput=="function"}Gb=Kb}else Gb=!1;H3=Gb&&(!document.documentMode||9<document.documentMode)}function Y3(){gu&&(gu.detachEvent("onpropertychange",U3),xu=gu=null)}function U3(u){if(u.propertyName==="value"&&Ip(xu)){var f=[];F3(f,xu,u,Bb(u)),k3(IF,f)}}function FF(u,f,g){u==="focusin"?(Y3(),gu=f,xu=g,gu.attachEvent("onpropertychange",U3)):u==="focusout"&&Y3()}function BF(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return Ip(xu)}function HF(u,f){if(u==="click")return Ip(f)}function $F(u,f){if(u==="input"||u==="change")return Ip(f)}function YF(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var Ya=typeof Object.is=="function"?Object.is:YF;function bu(u,f){if(Ya(u,f))return!0;if(typeof u!="object"||u===null||typeof f!="object"||f===null)return!1;var g=Object.keys(u),w=Object.keys(f);if(g.length!==w.length)return!1;for(w=0;w<g.length;w++){var D=g[w];if(!pe.call(f,D)||!Ya(u[D],f[D]))return!1}return!0}function W3(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function X3(u,f){var g=W3(u);u=0;for(var w;g;){if(g.nodeType===3){if(w=u+g.textContent.length,u<=f&&w>=f)return{node:g,offset:f-u};u=w}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=W3(g)}}function V3(u,f){return u&&f?u===f?!0:u&&u.nodeType===3?!1:f&&f.nodeType===3?V3(u,f.parentNode):"contains"in u?u.contains(f):u.compareDocumentPosition?!!(u.compareDocumentPosition(f)&16):!1:!1}function q3(u){u=u!=null&&u.ownerDocument!=null&&u.ownerDocument.defaultView!=null?u.ownerDocument.defaultView:window;for(var f=Ep(u.document);f instanceof u.HTMLIFrameElement;){try{var g=typeof f.contentWindow.location.href=="string"}catch{g=!1}if(g)u=f.contentWindow;else break;f=Ep(u.document)}return f}function Zb(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f&&(f==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||f==="textarea"||u.contentEditable==="true")}var UF=Fs&&"documentMode"in document&&11>=document.documentMode,yc=null,Qb=null,yu=null,Jb=!1;function G3(u,f,g){var w=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Jb||yc==null||yc!==Ep(w)||(w=yc,"selectionStart"in w&&Zb(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),yu&&bu(yu,w)||(yu=w,w=Nm(Qb,"onSelect"),0<w.length&&(f=new Lp("onSelect","select",null,f,g),u.push({event:f,listeners:w}),f.target=yc)))}function Xl(u,f){var g={};return g[u.toLowerCase()]=f.toLowerCase(),g["Webkit"+u]="webkit"+f,g["Moz"+u]="moz"+f,g}var vc={animationend:Xl("Animation","AnimationEnd"),animationiteration:Xl("Animation","AnimationIteration"),animationstart:Xl("Animation","AnimationStart"),transitionrun:Xl("Transition","TransitionRun"),transitionstart:Xl("Transition","TransitionStart"),transitioncancel:Xl("Transition","TransitionCancel"),transitionend:Xl("Transition","TransitionEnd")},ey={},K3={};Fs&&(K3=document.createElement("div").style,"AnimationEvent"in window||(delete vc.animationend.animation,delete vc.animationiteration.animation,delete vc.animationstart.animation),"TransitionEvent"in window||delete vc.transitionend.transition);function Vl(u){if(ey[u])return ey[u];if(!vc[u])return u;var f=vc[u],g;for(g in f)if(f.hasOwnProperty(g)&&g in K3)return ey[u]=f[g];return u}var Z3=Vl("animationend"),Q3=Vl("animationiteration"),J3=Vl("animationstart"),WF=Vl("transitionrun"),XF=Vl("transitionstart"),VF=Vl("transitioncancel"),eC=Vl("transitionend"),tC=new Map,ty="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(" ");ty.push("scrollEnd");function Xn(u,f){tC.set(u,f),Q(f,[u])}var rC=new WeakMap;function xn(u,f){if(typeof u=="object"&&u!==null){var g=rC.get(u);return g!==void 0?g:(f={value:u,source:f,stack:b3(f)},rC.set(u,f),f)}return{value:u,source:f,stack:b3(f)}}var bn=[],wc=0,ry=0;function Fp(){for(var u=wc,f=ry=wc=0;f<u;){var g=bn[f];bn[f++]=null;var w=bn[f];bn[f++]=null;var D=bn[f];bn[f++]=null;var P=bn[f];if(bn[f++]=null,w!==null&&D!==null){var I=w.pending;I===null?D.next=D:(D.next=I.next,I.next=D),w.pending=D}P!==0&&aC(g,D,P)}}function Bp(u,f,g,w){bn[wc++]=u,bn[wc++]=f,bn[wc++]=g,bn[wc++]=w,ry|=w,u.lanes|=w,u=u.alternate,u!==null&&(u.lanes|=w)}function ay(u,f,g,w){return Bp(u,f,g,w),Hp(u)}function jc(u,f){return Bp(u,null,null,f),Hp(u)}function aC(u,f,g){u.lanes|=g;var w=u.alternate;w!==null&&(w.lanes|=g);for(var D=!1,P=u.return;P!==null;)P.childLanes|=g,w=P.alternate,w!==null&&(w.childLanes|=g),P.tag===22&&(u=P.stateNode,u===null||u._visibility&1||(D=!0)),u=P,P=P.return;return u.tag===3?(P=u.stateNode,D&&f!==null&&(D=31-Pr(g),u=P.hiddenUpdates,w=u[D],w===null?u[D]=[f]:w.push(f),f.lane=g|536870912),P):null}function Hp(u){if(50<Uu)throw Uu=0,cv=null,Error(a(185));for(var f=u.return;f!==null;)u=f,f=u.return;return u.tag===3?u.stateNode:null}var Nc={};function qF(u,f,g,w){this.tag=u,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=w,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ua(u,f,g,w){return new qF(u,f,g,w)}function ny(u){return u=u.prototype,!(!u||!u.isReactComponent)}function Bs(u,f){var g=u.alternate;return g===null?(g=Ua(u.tag,f,u.key,u.mode),g.elementType=u.elementType,g.type=u.type,g.stateNode=u.stateNode,g.alternate=u,u.alternate=g):(g.pendingProps=f,g.type=u.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=u.flags&65011712,g.childLanes=u.childLanes,g.lanes=u.lanes,g.child=u.child,g.memoizedProps=u.memoizedProps,g.memoizedState=u.memoizedState,g.updateQueue=u.updateQueue,f=u.dependencies,g.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},g.sibling=u.sibling,g.index=u.index,g.ref=u.ref,g.refCleanup=u.refCleanup,g}function nC(u,f){u.flags&=65011714;var g=u.alternate;return g===null?(u.childLanes=0,u.lanes=f,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=g.childLanes,u.lanes=g.lanes,u.child=g.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=g.memoizedProps,u.memoizedState=g.memoizedState,u.updateQueue=g.updateQueue,u.type=g.type,f=g.dependencies,u.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext}),u}function $p(u,f,g,w,D,P){var I=0;if(w=u,typeof u=="function")ny(u)&&(I=1);else if(typeof u=="string")I=KB(u,g,U.current)?26:u==="html"||u==="head"||u==="body"?27:5;else e:switch(u){case _:return u=Ua(31,g,f,D),u.elementType=_,u.lanes=P,u;case b:return ql(g.children,D,P,f);case y:I=8,D|=24;break;case v:return u=Ua(12,g,f,D|2),u.elementType=v,u.lanes=P,u;case A:return u=Ua(13,g,f,D),u.elementType=A,u.lanes=P,u;case T:return u=Ua(19,g,f,D),u.elementType=T,u.lanes=P,u;default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case N:case S:I=10;break e;case C:I=9;break e;case k:I=11;break e;case M:I=14;break e;case O:I=16,w=null;break e}I=29,g=Error(a(130,u===null?"null":typeof u,"")),w=null}return f=Ua(I,g,f,D),f.elementType=u,f.type=w,f.lanes=P,f}function ql(u,f,g,w){return u=Ua(7,u,w,f),u.lanes=g,u}function sy(u,f,g){return u=Ua(6,u,null,f),u.lanes=g,u}function iy(u,f,g){return f=Ua(4,u.children!==null?u.children:[],u.key,f),f.lanes=g,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}var Sc=[],Cc=0,Yp=null,Up=0,yn=[],vn=0,Gl=null,Hs=1,$s="";function Kl(u,f){Sc[Cc++]=Up,Sc[Cc++]=Yp,Yp=u,Up=f}function sC(u,f,g){yn[vn++]=Hs,yn[vn++]=$s,yn[vn++]=Gl,Gl=u;var w=Hs;u=$s;var D=32-Pr(w)-1;w&=~(1<<D),g+=1;var P=32-Pr(f)+D;if(30<P){var I=D-D%5;P=(w&(1<<I)-1).toString(32),w>>=I,D-=I,Hs=1<<32-Pr(f)+D|g<<D|w,$s=P+u}else Hs=1<<P|g<<D|w,$s=u}function ly(u){u.return!==null&&(Kl(u,1),sC(u,1,0))}function oy(u){for(;u===Yp;)Yp=Sc[--Cc],Sc[Cc]=null,Up=Sc[--Cc],Sc[Cc]=null;for(;u===Gl;)Gl=yn[--vn],yn[vn]=null,$s=yn[--vn],yn[vn]=null,Hs=yn[--vn],yn[vn]=null}var ua=null,tr=null,ft=!1,Zl=null,hs=!1,cy=Error(a(519));function Ql(u){var f=Error(a(418,""));throw ju(xn(f,u)),cy}function iC(u){var f=u.stateNode,g=u.type,w=u.memoizedProps;switch(f[pr]=u,f[Or]=w,g){case"dialog":at("cancel",f),at("close",f);break;case"iframe":case"object":case"embed":at("load",f);break;case"video":case"audio":for(g=0;g<Xu.length;g++)at(Xu[g],f);break;case"source":at("error",f);break;case"img":case"image":case"link":at("error",f),at("load",f);break;case"details":at("toggle",f);break;case"input":at("invalid",f),w3(f,w.value,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name,!0),Mp(f);break;case"select":at("invalid",f);break;case"textarea":at("invalid",f),N3(f,w.value,w.defaultValue,w.children),Mp(f)}g=w.children,typeof g!="string"&&typeof g!="number"&&typeof g!="bigint"||f.textContent===""+g||w.suppressHydrationWarning===!0||Nk(f.textContent,g)?(w.popover!=null&&(at("beforetoggle",f),at("toggle",f)),w.onScroll!=null&&at("scroll",f),w.onScrollEnd!=null&&at("scrollend",f),w.onClick!=null&&(f.onclick=Sm),f=!0):f=!1,f||Ql(u)}function lC(u){for(ua=u.return;ua;)switch(ua.tag){case 5:case 13:hs=!1;return;case 27:case 3:hs=!0;return;default:ua=ua.return}}function vu(u){if(u!==ua)return!1;if(!ft)return lC(u),ft=!0,!1;var f=u.tag,g;if((g=f!==3&&f!==27)&&((g=f===5)&&(g=u.type,g=!(g!=="form"&&g!=="button")||Cv(u.type,u.memoizedProps)),g=!g),g&&tr&&Ql(u),lC(u),f===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(a(317));e:{for(u=u.nextSibling,f=0;u;){if(u.nodeType===8)if(g=u.data,g==="/$"){if(f===0){tr=qn(u.nextSibling);break e}f--}else g!=="$"&&g!=="$!"&&g!=="$?"||f++;u=u.nextSibling}tr=null}}else f===27?(f=tr,Ki(u.type)?(u=Tv,Tv=null,tr=u):tr=f):tr=ua?qn(u.stateNode.nextSibling):null;return!0}function wu(){tr=ua=null,ft=!1}function oC(){var u=Zl;return u!==null&&(Ca===null?Ca=u:Ca.push.apply(Ca,u),Zl=null),u}function ju(u){Zl===null?Zl=[u]:Zl.push(u)}var dy=G(null),Jl=null,Ys=null;function _i(u,f,g){K(dy,f._currentValue),f._currentValue=g}function Us(u){u._currentValue=dy.current,te(dy)}function uy(u,f,g){for(;u!==null;){var w=u.alternate;if((u.childLanes&f)!==f?(u.childLanes|=f,w!==null&&(w.childLanes|=f)):w!==null&&(w.childLanes&f)!==f&&(w.childLanes|=f),u===g)break;u=u.return}}function hy(u,f,g,w){var D=u.child;for(D!==null&&(D.return=u);D!==null;){var P=D.dependencies;if(P!==null){var I=D.child;P=P.firstContext;e:for(;P!==null;){var $=P;P=D;for(var q=0;q<f.length;q++)if($.context===f[q]){P.lanes|=g,$=P.alternate,$!==null&&($.lanes|=g),uy(P.return,g,u),w||(I=null);break e}P=$.next}}else if(D.tag===18){if(I=D.return,I===null)throw Error(a(341));I.lanes|=g,P=I.alternate,P!==null&&(P.lanes|=g),uy(I,g,u),I=null}else I=D.child;if(I!==null)I.return=D;else for(I=D;I!==null;){if(I===u){I=null;break}if(D=I.sibling,D!==null){D.return=I.return,I=D;break}I=I.return}D=I}}function Nu(u,f,g,w){u=null;for(var D=f,P=!1;D!==null;){if(!P){if((D.flags&524288)!==0)P=!0;else if((D.flags&262144)!==0)break}if(D.tag===10){var I=D.alternate;if(I===null)throw Error(a(387));if(I=I.memoizedProps,I!==null){var $=D.type;Ya(D.pendingProps.value,I.value)||(u!==null?u.push($):u=[$])}}else if(D===we.current){if(I=D.alternate,I===null)throw Error(a(387));I.memoizedState.memoizedState!==D.memoizedState.memoizedState&&(u!==null?u.push(Qu):u=[Qu])}D=D.return}u!==null&&hy(f,u,g,w),f.flags|=262144}function Wp(u){for(u=u.firstContext;u!==null;){if(!Ya(u.context._currentValue,u.memoizedValue))return!0;u=u.next}return!1}function eo(u){Jl=u,Ys=null,u=u.dependencies,u!==null&&(u.firstContext=null)}function aa(u){return cC(Jl,u)}function Xp(u,f){return Jl===null&&eo(u),cC(u,f)}function cC(u,f){var g=f._currentValue;if(f={context:f,memoizedValue:g,next:null},Ys===null){if(u===null)throw Error(a(308));Ys=f,u.dependencies={lanes:0,firstContext:f},u.flags|=524288}else Ys=Ys.next=f;return g}var GF=typeof AbortController<"u"?AbortController:function(){var u=[],f=this.signal={aborted:!1,addEventListener:function(g,w){u.push(w)}};this.abort=function(){f.aborted=!0,u.forEach(function(g){return g()})}},KF=t.unstable_scheduleCallback,ZF=t.unstable_NormalPriority,wr={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fy(){return{controller:new GF,data:new Map,refCount:0}}function Su(u){u.refCount--,u.refCount===0&&KF(ZF,function(){u.controller.abort()})}var Cu=null,py=0,Ac=0,kc=null;function QF(u,f){if(Cu===null){var g=Cu=[];py=0,Ac=gv(),kc={status:"pending",value:void 0,then:function(w){g.push(w)}}}return py++,f.then(dC,dC),f}function dC(){if(--py===0&&Cu!==null){kc!==null&&(kc.status="fulfilled");var u=Cu;Cu=null,Ac=0,kc=null;for(var f=0;f<u.length;f++)(0,u[f])()}}function JF(u,f){var g=[],w={status:"pending",value:null,reason:null,then:function(D){g.push(D)}};return u.then(function(){w.status="fulfilled",w.value=f;for(var D=0;D<g.length;D++)(0,g[D])(f)},function(D){for(w.status="rejected",w.reason=D,D=0;D<g.length;D++)(0,g[D])(void 0)}),w}var uC=H.S;H.S=function(u,f){typeof f=="object"&&f!==null&&typeof f.then=="function"&&QF(u,f),uC!==null&&uC(u,f)};var to=G(null);function my(){var u=to.current;return u!==null?u:It.pooledCache}function Vp(u,f){f===null?K(to,to.current):K(to,f.pool)}function hC(){var u=my();return u===null?null:{parent:wr._currentValue,pool:u}}var Au=Error(a(460)),fC=Error(a(474)),qp=Error(a(542)),gy={then:function(){}};function pC(u){return u=u.status,u==="fulfilled"||u==="rejected"}function Gp(){}function mC(u,f,g){switch(g=u[g],g===void 0?u.push(f):g!==f&&(f.then(Gp,Gp),f=g),f.status){case"fulfilled":return f.value;case"rejected":throw u=f.reason,xC(u),u;default:if(typeof f.status=="string")f.then(Gp,Gp);else{if(u=It,u!==null&&100<u.shellSuspendCounter)throw Error(a(482));u=f,u.status="pending",u.then(function(w){if(f.status==="pending"){var D=f;D.status="fulfilled",D.value=w}},function(w){if(f.status==="pending"){var D=f;D.status="rejected",D.reason=w}})}switch(f.status){case"fulfilled":return f.value;case"rejected":throw u=f.reason,xC(u),u}throw ku=f,Au}}var ku=null;function gC(){if(ku===null)throw Error(a(459));var u=ku;return ku=null,u}function xC(u){if(u===Au||u===qp)throw Error(a(483))}var Li=!1;function xy(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function by(u,f){u=u.updateQueue,f.updateQueue===u&&(f.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,callbacks:null})}function zi(u){return{lane:u,tag:0,payload:null,callback:null,next:null}}function Ii(u,f,g){var w=u.updateQueue;if(w===null)return null;if(w=w.shared,(jt&2)!==0){var D=w.pending;return D===null?f.next=f:(f.next=D.next,D.next=f),w.pending=f,f=Hp(u),aC(u,null,g),f}return Bp(u,w,f,g),Hp(u)}function Du(u,f,g){if(f=f.updateQueue,f!==null&&(f=f.shared,(g&4194048)!==0)){var w=f.lanes;w&=u.pendingLanes,g|=w,f.lanes=g,kp(u,g)}}function yy(u,f){var g=u.updateQueue,w=u.alternate;if(w!==null&&(w=w.updateQueue,g===w)){var D=null,P=null;if(g=g.firstBaseUpdate,g!==null){do{var I={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};P===null?D=P=I:P=P.next=I,g=g.next}while(g!==null);P===null?D=P=f:P=P.next=f}else D=P=f;g={baseState:w.baseState,firstBaseUpdate:D,lastBaseUpdate:P,shared:w.shared,callbacks:w.callbacks},u.updateQueue=g;return}u=g.lastBaseUpdate,u===null?g.firstBaseUpdate=f:u.next=f,g.lastBaseUpdate=f}var vy=!1;function Tu(){if(vy){var u=kc;if(u!==null)throw u}}function Mu(u,f,g,w){vy=!1;var D=u.updateQueue;Li=!1;var P=D.firstBaseUpdate,I=D.lastBaseUpdate,$=D.shared.pending;if($!==null){D.shared.pending=null;var q=$,ie=q.next;q.next=null,I===null?P=ie:I.next=ie,I=q;var fe=u.alternate;fe!==null&&(fe=fe.updateQueue,$=fe.lastBaseUpdate,$!==I&&($===null?fe.firstBaseUpdate=ie:$.next=ie,fe.lastBaseUpdate=q))}if(P!==null){var xe=D.baseState;I=0,fe=ie=q=null,$=P;do{var le=$.lane&-536870913,oe=le!==$.lane;if(oe?(st&le)===le:(w&le)===le){le!==0&&le===Ac&&(vy=!0),fe!==null&&(fe=fe.next={lane:0,tag:$.tag,payload:$.payload,callback:null,next:null});e:{var $e=u,Be=$;le=f;var Tt=g;switch(Be.tag){case 1:if($e=Be.payload,typeof $e=="function"){xe=$e.call(Tt,xe,le);break e}xe=$e;break e;case 3:$e.flags=$e.flags&-65537|128;case 0:if($e=Be.payload,le=typeof $e=="function"?$e.call(Tt,xe,le):$e,le==null)break e;xe=h({},xe,le);break e;case 2:Li=!0}}le=$.callback,le!==null&&(u.flags|=64,oe&&(u.flags|=8192),oe=D.callbacks,oe===null?D.callbacks=[le]:oe.push(le))}else oe={lane:le,tag:$.tag,payload:$.payload,callback:$.callback,next:null},fe===null?(ie=fe=oe,q=xe):fe=fe.next=oe,I|=le;if($=$.next,$===null){if($=D.shared.pending,$===null)break;oe=$,$=oe.next,oe.next=null,D.lastBaseUpdate=oe,D.shared.pending=null}}while(!0);fe===null&&(q=xe),D.baseState=q,D.firstBaseUpdate=ie,D.lastBaseUpdate=fe,P===null&&(D.shared.lanes=0),Xi|=I,u.lanes=I,u.memoizedState=xe}}function bC(u,f){if(typeof u!="function")throw Error(a(191,u));u.call(f)}function yC(u,f){var g=u.callbacks;if(g!==null)for(u.callbacks=null,u=0;u<g.length;u++)bC(g[u],f)}var Dc=G(null),Kp=G(0);function vC(u,f){u=Zs,K(Kp,u),K(Dc,f),Zs=u|f.baseLanes}function wy(){K(Kp,Zs),K(Dc,Dc.current)}function jy(){Zs=Kp.current,te(Dc),te(Kp)}var Fi=0,et=null,kt=null,mr=null,Zp=!1,Tc=!1,ro=!1,Qp=0,Eu=0,Mc=null,eB=0;function cr(){throw Error(a(321))}function Ny(u,f){if(f===null)return!1;for(var g=0;g<f.length&&g<u.length;g++)if(!Ya(u[g],f[g]))return!1;return!0}function Sy(u,f,g,w,D,P){return Fi=P,et=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,H.H=u===null||u.memoizedState===null?aA:nA,ro=!1,P=g(w,D),ro=!1,Tc&&(P=jC(f,g,w,D)),wC(u),P}function wC(u){H.H=nm;var f=kt!==null&&kt.next!==null;if(Fi=0,mr=kt=et=null,Zp=!1,Eu=0,Mc=null,f)throw Error(a(300));u===null||Rr||(u=u.dependencies,u!==null&&Wp(u)&&(Rr=!0))}function jC(u,f,g,w){et=u;var D=0;do{if(Tc&&(Mc=null),Eu=0,Tc=!1,25<=D)throw Error(a(301));if(D+=1,mr=kt=null,u.updateQueue!=null){var P=u.updateQueue;P.lastEffect=null,P.events=null,P.stores=null,P.memoCache!=null&&(P.memoCache.index=0)}H.H=lB,P=f(g,w)}while(Tc);return P}function tB(){var u=H.H,f=u.useState()[0];return f=typeof f.then=="function"?Pu(f):f,u=u.useState()[0],(kt!==null?kt.memoizedState:null)!==u&&(et.flags|=1024),f}function Cy(){var u=Qp!==0;return Qp=0,u}function Ay(u,f,g){f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~g}function ky(u){if(Zp){for(u=u.memoizedState;u!==null;){var f=u.queue;f!==null&&(f.pending=null),u=u.next}Zp=!1}Fi=0,mr=kt=et=null,Tc=!1,Eu=Qp=0,Mc=null}function Na(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mr===null?et.memoizedState=mr=u:mr=mr.next=u,mr}function gr(){if(kt===null){var u=et.alternate;u=u!==null?u.memoizedState:null}else u=kt.next;var f=mr===null?et.memoizedState:mr.next;if(f!==null)mr=f,kt=u;else{if(u===null)throw et.alternate===null?Error(a(467)):Error(a(310));kt=u,u={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},mr===null?et.memoizedState=mr=u:mr=mr.next=u}return mr}function Dy(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pu(u){var f=Eu;return Eu+=1,Mc===null&&(Mc=[]),u=mC(Mc,u,f),f=et,(mr===null?f.memoizedState:mr.next)===null&&(f=f.alternate,H.H=f===null||f.memoizedState===null?aA:nA),u}function Jp(u){if(u!==null&&typeof u=="object"){if(typeof u.then=="function")return Pu(u);if(u.$$typeof===S)return aa(u)}throw Error(a(438,String(u)))}function Ty(u){var f=null,g=et.updateQueue;if(g!==null&&(f=g.memoCache),f==null){var w=et.alternate;w!==null&&(w=w.updateQueue,w!==null&&(w=w.memoCache,w!=null&&(f={data:w.data.map(function(D){return D.slice()}),index:0})))}if(f==null&&(f={data:[],index:0}),g===null&&(g=Dy(),et.updateQueue=g),g.memoCache=f,g=f.data[f.index],g===void 0)for(g=f.data[f.index]=Array(u),w=0;w<u;w++)g[w]=R;return f.index++,g}function Ws(u,f){return typeof f=="function"?f(u):f}function em(u){var f=gr();return My(f,kt,u)}function My(u,f,g){var w=u.queue;if(w===null)throw Error(a(311));w.lastRenderedReducer=g;var D=u.baseQueue,P=w.pending;if(P!==null){if(D!==null){var I=D.next;D.next=P.next,P.next=I}f.baseQueue=D=P,w.pending=null}if(P=u.baseState,D===null)u.memoizedState=P;else{f=D.next;var $=I=null,q=null,ie=f,fe=!1;do{var xe=ie.lane&-536870913;if(xe!==ie.lane?(st&xe)===xe:(Fi&xe)===xe){var le=ie.revertLane;if(le===0)q!==null&&(q=q.next={lane:0,revertLane:0,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null}),xe===Ac&&(fe=!0);else if((Fi&le)===le){ie=ie.next,le===Ac&&(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=P):q=q.next=xe,et.lanes|=le,Xi|=le;xe=ie.action,ro&&g(P,xe),P=ie.hasEagerState?ie.eagerState:g(P,xe)}else le={lane:xe,revertLane:ie.revertLane,action:ie.action,hasEagerState:ie.hasEagerState,eagerState:ie.eagerState,next:null},q===null?($=q=le,I=P):q=q.next=le,et.lanes|=xe,Xi|=xe;ie=ie.next}while(ie!==null&&ie!==f);if(q===null?I=P:q.next=$,!Ya(P,u.memoizedState)&&(Rr=!0,fe&&(g=kc,g!==null)))throw g;u.memoizedState=P,u.baseState=I,u.baseQueue=q,w.lastRenderedState=P}return D===null&&(w.lanes=0),[u.memoizedState,w.dispatch]}function Ey(u){var f=gr(),g=f.queue;if(g===null)throw Error(a(311));g.lastRenderedReducer=u;var w=g.dispatch,D=g.pending,P=f.memoizedState;if(D!==null){g.pending=null;var I=D=D.next;do P=u(P,I.action),I=I.next;while(I!==D);Ya(P,f.memoizedState)||(Rr=!0),f.memoizedState=P,f.baseQueue===null&&(f.baseState=P),g.lastRenderedState=P}return[P,w]}function NC(u,f,g){var w=et,D=gr(),P=ft;if(P){if(g===void 0)throw Error(a(407));g=g()}else g=f();var I=!Ya((kt||D).memoizedState,g);I&&(D.memoizedState=g,Rr=!0),D=D.queue;var $=AC.bind(null,w,D,u);if(Ou(2048,8,$,[u]),D.getSnapshot!==f||I||mr!==null&&mr.memoizedState.tag&1){if(w.flags|=2048,Ec(9,tm(),CC.bind(null,w,D,g,f),null),It===null)throw Error(a(349));P||(Fi&124)!==0||SC(w,f,g)}return g}function SC(u,f,g){u.flags|=16384,u={getSnapshot:f,value:g},f=et.updateQueue,f===null?(f=Dy(),et.updateQueue=f,f.stores=[u]):(g=f.stores,g===null?f.stores=[u]:g.push(u))}function CC(u,f,g,w){f.value=g,f.getSnapshot=w,kC(f)&&DC(u)}function AC(u,f,g){return g(function(){kC(f)&&DC(u)})}function kC(u){var f=u.getSnapshot;u=u.value;try{var g=f();return!Ya(u,g)}catch{return!0}}function DC(u){var f=jc(u,2);f!==null&&Ga(f,u,2)}function Py(u){var f=Na();if(typeof u=="function"){var g=u;if(u=g(),ro){cs(!0);try{g()}finally{cs(!1)}}}return f.memoizedState=f.baseState=u,f.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ws,lastRenderedState:u},f}function TC(u,f,g,w){return u.baseState=g,My(u,kt,typeof w=="function"?w:Ws)}function rB(u,f,g,w,D){if(am(u))throw Error(a(485));if(u=f.action,u!==null){var P={payload:D,action:u,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){P.listeners.push(I)}};H.T!==null?g(!0):P.isTransition=!1,w(P),g=f.pending,g===null?(P.next=f.pending=P,MC(f,P)):(P.next=g.next,f.pending=g.next=P)}}function MC(u,f){var g=f.action,w=f.payload,D=u.state;if(f.isTransition){var P=H.T,I={};H.T=I;try{var $=g(D,w),q=H.S;q!==null&&q(I,$),EC(u,f,$)}catch(ie){Oy(u,f,ie)}finally{H.T=P}}else try{P=g(D,w),EC(u,f,P)}catch(ie){Oy(u,f,ie)}}function EC(u,f,g){g!==null&&typeof g=="object"&&typeof g.then=="function"?g.then(function(w){PC(u,f,w)},function(w){return Oy(u,f,w)}):PC(u,f,g)}function PC(u,f,g){f.status="fulfilled",f.value=g,OC(f),u.state=g,f=u.pending,f!==null&&(g=f.next,g===f?u.pending=null:(g=g.next,f.next=g,MC(u,g)))}function Oy(u,f,g){var w=u.pending;if(u.pending=null,w!==null){w=w.next;do f.status="rejected",f.reason=g,OC(f),f=f.next;while(f!==w)}u.action=null}function OC(u){u=u.listeners;for(var f=0;f<u.length;f++)(0,u[f])()}function RC(u,f){return f}function _C(u,f){if(ft){var g=It.formState;if(g!==null){e:{var w=et;if(ft){if(tr){t:{for(var D=tr,P=hs;D.nodeType!==8;){if(!P){D=null;break t}if(D=qn(D.nextSibling),D===null){D=null;break t}}P=D.data,D=P==="F!"||P==="F"?D:null}if(D){tr=qn(D.nextSibling),w=D.data==="F!";break e}}Ql(w)}w=!1}w&&(f=g[0])}}return g=Na(),g.memoizedState=g.baseState=f,w={pending:null,lanes:0,dispatch:null,lastRenderedReducer:RC,lastRenderedState:f},g.queue=w,g=eA.bind(null,et,w),w.dispatch=g,w=Py(!1),P=Iy.bind(null,et,!1,w.queue),w=Na(),D={state:f,dispatch:null,action:u,pending:null},w.queue=D,g=rB.bind(null,et,D,P,g),D.dispatch=g,w.memoizedState=u,[f,g,!1]}function LC(u){var f=gr();return zC(f,kt,u)}function zC(u,f,g){if(f=My(u,f,RC)[0],u=em(Ws)[0],typeof f=="object"&&f!==null&&typeof f.then=="function")try{var w=Pu(f)}catch(I){throw I===Au?qp:I}else w=f;f=gr();var D=f.queue,P=D.dispatch;return g!==f.memoizedState&&(et.flags|=2048,Ec(9,tm(),aB.bind(null,D,g),null)),[w,P,u]}function aB(u,f){u.action=f}function IC(u){var f=gr(),g=kt;if(g!==null)return zC(f,g,u);gr(),f=f.memoizedState,g=gr();var w=g.queue.dispatch;return g.memoizedState=u,[f,w,!1]}function Ec(u,f,g,w){return u={tag:u,create:g,deps:w,inst:f,next:null},f=et.updateQueue,f===null&&(f=Dy(),et.updateQueue=f),g=f.lastEffect,g===null?f.lastEffect=u.next=u:(w=g.next,g.next=u,u.next=w,f.lastEffect=u),u}function tm(){return{destroy:void 0,resource:void 0}}function FC(){return gr().memoizedState}function rm(u,f,g,w){var D=Na();w=w===void 0?null:w,et.flags|=u,D.memoizedState=Ec(1|f,tm(),g,w)}function Ou(u,f,g,w){var D=gr();w=w===void 0?null:w;var P=D.memoizedState.inst;kt!==null&&w!==null&&Ny(w,kt.memoizedState.deps)?D.memoizedState=Ec(f,P,g,w):(et.flags|=u,D.memoizedState=Ec(1|f,P,g,w))}function BC(u,f){rm(8390656,8,u,f)}function HC(u,f){Ou(2048,8,u,f)}function $C(u,f){return Ou(4,2,u,f)}function YC(u,f){return Ou(4,4,u,f)}function UC(u,f){if(typeof f=="function"){u=u();var g=f(u);return function(){typeof g=="function"?g():f(null)}}if(f!=null)return u=u(),f.current=u,function(){f.current=null}}function WC(u,f,g){g=g!=null?g.concat([u]):null,Ou(4,4,UC.bind(null,f,u),g)}function Ry(){}function XC(u,f){var g=gr();f=f===void 0?null:f;var w=g.memoizedState;return f!==null&&Ny(f,w[1])?w[0]:(g.memoizedState=[u,f],u)}function VC(u,f){var g=gr();f=f===void 0?null:f;var w=g.memoizedState;if(f!==null&&Ny(f,w[1]))return w[0];if(w=u(),ro){cs(!0);try{u()}finally{cs(!1)}}return g.memoizedState=[w,f],w}function _y(u,f,g){return g===void 0||(Fi&1073741824)!==0?u.memoizedState=f:(u.memoizedState=g,u=KA(),et.lanes|=u,Xi|=u,g)}function qC(u,f,g,w){return Ya(g,f)?g:Dc.current!==null?(u=_y(u,g,w),Ya(u,f)||(Rr=!0),u):(Fi&42)===0?(Rr=!0,u.memoizedState=g):(u=KA(),et.lanes|=u,Xi|=u,f)}function GC(u,f,g,w,D){var P=W.p;W.p=P!==0&&8>P?P:8;var I=H.T,$={};H.T=$,Iy(u,!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=JF(q,w);Ru(u,f,fe,qa(u))}else Ru(u,f,w,qa(u))}catch(xe){Ru(u,f,{then:function(){},status:"rejected",reason:xe},qa())}finally{W.p=P,H.T=I}}function nB(){}function Ly(u,f,g,w){if(u.tag!==5)throw Error(a(476));var D=KC(u).queue;GC(u,D,f,V,g===null?nB:function(){return ZC(u),g(w)})}function KC(u){var f=u.memoizedState;if(f!==null)return f;f={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ws,lastRenderedState:V},next:null};var g={};return f.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ws,lastRenderedState:g},next:null},u.memoizedState=f,u=u.alternate,u!==null&&(u.memoizedState=f),f}function ZC(u){var f=KC(u).next.queue;Ru(u,f,{},qa())}function zy(){return aa(Qu)}function QC(){return gr().memoizedState}function JC(){return gr().memoizedState}function sB(u){for(var f=u.return;f!==null;){switch(f.tag){case 24:case 3:var g=qa();u=zi(g);var w=Ii(f,u,g);w!==null&&(Ga(w,f,g),Du(w,f,g)),f={cache:fy()},u.payload=f;return}f=f.return}}function iB(u,f,g){var w=qa();g={lane:w,revertLane:0,action:g,hasEagerState:!1,eagerState:null,next:null},am(u)?tA(f,g):(g=ay(u,f,g,w),g!==null&&(Ga(g,u,w),rA(g,f,w)))}function eA(u,f,g){var w=qa();Ru(u,f,g,w)}function Ru(u,f,g,w){var D={lane:w,revertLane:0,action:g,hasEagerState:!1,eagerState:null,next:null};if(am(u))tA(f,D);else{var P=u.alternate;if(u.lanes===0&&(P===null||P.lanes===0)&&(P=f.lastRenderedReducer,P!==null))try{var I=f.lastRenderedState,$=P(I,g);if(D.hasEagerState=!0,D.eagerState=$,Ya($,I))return Bp(u,f,D,0),It===null&&Fp(),!1}catch{}finally{}if(g=ay(u,f,D,w),g!==null)return Ga(g,u,w),rA(g,f,w),!0}return!1}function Iy(u,f,g,w){if(w={lane:2,revertLane:gv(),action:w,hasEagerState:!1,eagerState:null,next:null},am(u)){if(f)throw Error(a(479))}else f=ay(u,g,w,2),f!==null&&Ga(f,u,2)}function am(u){var f=u.alternate;return u===et||f!==null&&f===et}function tA(u,f){Tc=Zp=!0;var g=u.pending;g===null?f.next=f:(f.next=g.next,g.next=f),u.pending=f}function rA(u,f,g){if((g&4194048)!==0){var w=f.lanes;w&=u.pendingLanes,g|=w,f.lanes=g,kp(u,g)}}var nm={readContext:aa,use:Jp,useCallback:cr,useContext:cr,useEffect:cr,useImperativeHandle:cr,useLayoutEffect:cr,useInsertionEffect:cr,useMemo:cr,useReducer:cr,useRef:cr,useState:cr,useDebugValue:cr,useDeferredValue:cr,useTransition:cr,useSyncExternalStore:cr,useId:cr,useHostTransitionStatus:cr,useFormState:cr,useActionState:cr,useOptimistic:cr,useMemoCache:cr,useCacheRefresh:cr},aA={readContext:aa,use:Jp,useCallback:function(u,f){return Na().memoizedState=[u,f===void 0?null:f],u},useContext:aa,useEffect:BC,useImperativeHandle:function(u,f,g){g=g!=null?g.concat([u]):null,rm(4194308,4,UC.bind(null,f,u),g)},useLayoutEffect:function(u,f){return rm(4194308,4,u,f)},useInsertionEffect:function(u,f){rm(4,2,u,f)},useMemo:function(u,f){var g=Na();f=f===void 0?null:f;var w=u();if(ro){cs(!0);try{u()}finally{cs(!1)}}return g.memoizedState=[w,f],w},useReducer:function(u,f,g){var w=Na();if(g!==void 0){var D=g(f);if(ro){cs(!0);try{g(f)}finally{cs(!1)}}}else D=f;return w.memoizedState=w.baseState=D,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:D},w.queue=u,u=u.dispatch=iB.bind(null,et,u),[w.memoizedState,u]},useRef:function(u){var f=Na();return u={current:u},f.memoizedState=u},useState:function(u){u=Py(u);var f=u.queue,g=eA.bind(null,et,f);return f.dispatch=g,[u.memoizedState,g]},useDebugValue:Ry,useDeferredValue:function(u,f){var g=Na();return _y(g,u,f)},useTransition:function(){var u=Py(!1);return u=GC.bind(null,et,u.queue,!0,!1),Na().memoizedState=u,[!1,u]},useSyncExternalStore:function(u,f,g){var w=et,D=Na();if(ft){if(g===void 0)throw Error(a(407));g=g()}else{if(g=f(),It===null)throw Error(a(349));(st&124)!==0||SC(w,f,g)}D.memoizedState=g;var P={value:g,getSnapshot:f};return D.queue=P,BC(AC.bind(null,w,P,u),[u]),w.flags|=2048,Ec(9,tm(),CC.bind(null,w,P,g,f),null),g},useId:function(){var u=Na(),f=It.identifierPrefix;if(ft){var g=$s,w=Hs;g=(w&~(1<<32-Pr(w)-1)).toString(32)+g,f="«"+f+"R"+g,g=Qp++,0<g&&(f+="H"+g.toString(32)),f+="»"}else g=eB++,f="«"+f+"r"+g.toString(32)+"»";return u.memoizedState=f},useHostTransitionStatus:zy,useFormState:_C,useActionState:_C,useOptimistic:function(u){var f=Na();f.memoizedState=f.baseState=u;var g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return f.queue=g,f=Iy.bind(null,et,!0,g),g.dispatch=f,[u,f]},useMemoCache:Ty,useCacheRefresh:function(){return Na().memoizedState=sB.bind(null,et)}},nA={readContext:aa,use:Jp,useCallback:XC,useContext:aa,useEffect:HC,useImperativeHandle:WC,useInsertionEffect:$C,useLayoutEffect:YC,useMemo:VC,useReducer:em,useRef:FC,useState:function(){return em(Ws)},useDebugValue:Ry,useDeferredValue:function(u,f){var g=gr();return qC(g,kt.memoizedState,u,f)},useTransition:function(){var u=em(Ws)[0],f=gr().memoizedState;return[typeof u=="boolean"?u:Pu(u),f]},useSyncExternalStore:NC,useId:QC,useHostTransitionStatus:zy,useFormState:LC,useActionState:LC,useOptimistic:function(u,f){var g=gr();return TC(g,kt,u,f)},useMemoCache:Ty,useCacheRefresh:JC},lB={readContext:aa,use:Jp,useCallback:XC,useContext:aa,useEffect:HC,useImperativeHandle:WC,useInsertionEffect:$C,useLayoutEffect:YC,useMemo:VC,useReducer:Ey,useRef:FC,useState:function(){return Ey(Ws)},useDebugValue:Ry,useDeferredValue:function(u,f){var g=gr();return kt===null?_y(g,u,f):qC(g,kt.memoizedState,u,f)},useTransition:function(){var u=Ey(Ws)[0],f=gr().memoizedState;return[typeof u=="boolean"?u:Pu(u),f]},useSyncExternalStore:NC,useId:QC,useHostTransitionStatus:zy,useFormState:IC,useActionState:IC,useOptimistic:function(u,f){var g=gr();return kt!==null?TC(g,kt,u,f):(g.baseState=u,[u,g.queue.dispatch])},useMemoCache:Ty,useCacheRefresh:JC},Pc=null,_u=0;function sm(u){var f=_u;return _u+=1,Pc===null&&(Pc=[]),mC(Pc,u,f)}function Lu(u,f){f=f.props.ref,u.ref=f!==void 0?f:null}function im(u,f){throw f.$$typeof===p?Error(a(525)):(u=Object.prototype.toString.call(f),Error(a(31,u==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":u)))}function sA(u){var f=u._init;return f(u._payload)}function iA(u){function f(ae,ee){if(u){var se=ae.deletions;se===null?(ae.deletions=[ee],ae.flags|=16):se.push(ee)}}function g(ae,ee){if(!u)return null;for(;ee!==null;)f(ae,ee),ee=ee.sibling;return null}function w(ae){for(var ee=new Map;ae!==null;)ae.key!==null?ee.set(ae.key,ae):ee.set(ae.index,ae),ae=ae.sibling;return ee}function D(ae,ee){return ae=Bs(ae,ee),ae.index=0,ae.sibling=null,ae}function P(ae,ee,se){return ae.index=se,u?(se=ae.alternate,se!==null?(se=se.index,se<ee?(ae.flags|=67108866,ee):se):(ae.flags|=67108866,ee)):(ae.flags|=1048576,ee)}function I(ae){return u&&ae.alternate===null&&(ae.flags|=67108866),ae}function $(ae,ee,se,me){return ee===null||ee.tag!==6?(ee=sy(se,ae.mode,me),ee.return=ae,ee):(ee=D(ee,se),ee.return=ae,ee)}function q(ae,ee,se,me){var Ee=se.type;return Ee===b?fe(ae,ee,se.props.children,me,se.key):ee!==null&&(ee.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===O&&sA(Ee)===ee.type)?(ee=D(ee,se.props),Lu(ee,se),ee.return=ae,ee):(ee=$p(se.type,se.key,se.props,null,ae.mode,me),Lu(ee,se),ee.return=ae,ee)}function ie(ae,ee,se,me){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==se.containerInfo||ee.stateNode.implementation!==se.implementation?(ee=iy(se,ae.mode,me),ee.return=ae,ee):(ee=D(ee,se.children||[]),ee.return=ae,ee)}function fe(ae,ee,se,me,Ee){return ee===null||ee.tag!==7?(ee=ql(se,ae.mode,me,Ee),ee.return=ae,ee):(ee=D(ee,se),ee.return=ae,ee)}function xe(ae,ee,se){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=sy(""+ee,ae.mode,se),ee.return=ae,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case m:return se=$p(ee.type,ee.key,ee.props,null,ae.mode,se),Lu(se,ee),se.return=ae,se;case x:return ee=iy(ee,ae.mode,se),ee.return=ae,ee;case O:var me=ee._init;return ee=me(ee._payload),xe(ae,ee,se)}if(X(ee)||z(ee))return ee=ql(ee,ae.mode,se,null),ee.return=ae,ee;if(typeof ee.then=="function")return xe(ae,sm(ee),se);if(ee.$$typeof===S)return xe(ae,Xp(ae,ee),se);im(ae,ee)}return null}function le(ae,ee,se,me){var Ee=ee!==null?ee.key:null;if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return Ee!==null?null:$(ae,ee,""+se,me);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case m:return se.key===Ee?q(ae,ee,se,me):null;case x:return se.key===Ee?ie(ae,ee,se,me):null;case O:return Ee=se._init,se=Ee(se._payload),le(ae,ee,se,me)}if(X(se)||z(se))return Ee!==null?null:fe(ae,ee,se,me,null);if(typeof se.then=="function")return le(ae,ee,sm(se),me);if(se.$$typeof===S)return le(ae,ee,Xp(ae,se),me);im(ae,se)}return null}function oe(ae,ee,se,me,Ee){if(typeof me=="string"&&me!==""||typeof me=="number"||typeof me=="bigint")return ae=ae.get(se)||null,$(ee,ae,""+me,Ee);if(typeof me=="object"&&me!==null){switch(me.$$typeof){case m:return ae=ae.get(me.key===null?se:me.key)||null,q(ee,ae,me,Ee);case x:return ae=ae.get(me.key===null?se:me.key)||null,ie(ee,ae,me,Ee);case O:var tt=me._init;return me=tt(me._payload),oe(ae,ee,se,me,Ee)}if(X(me)||z(me))return ae=ae.get(se)||null,fe(ee,ae,me,Ee,null);if(typeof me.then=="function")return oe(ae,ee,se,sm(me),Ee);if(me.$$typeof===S)return oe(ae,ee,se,Xp(ee,me),Ee);im(ee,me)}return null}function $e(ae,ee,se,me){for(var Ee=null,tt=null,Le=ee,He=ee=0,Lr=null;Le!==null&&He<se.length;He++){Le.index>He?(Lr=Le,Le=null):Lr=Le.sibling;var dt=le(ae,Le,se[He],me);if(dt===null){Le===null&&(Le=Lr);break}u&&Le&&dt.alternate===null&&f(ae,Le),ee=P(dt,ee,He),tt===null?Ee=dt:tt.sibling=dt,tt=dt,Le=Lr}if(He===se.length)return g(ae,Le),ft&&Kl(ae,He),Ee;if(Le===null){for(;He<se.length;He++)Le=xe(ae,se[He],me),Le!==null&&(ee=P(Le,ee,He),tt===null?Ee=Le:tt.sibling=Le,tt=Le);return ft&&Kl(ae,He),Ee}for(Le=w(Le);He<se.length;He++)Lr=oe(Le,ae,He,se[He],me),Lr!==null&&(u&&Lr.alternate!==null&&Le.delete(Lr.key===null?He:Lr.key),ee=P(Lr,ee,He),tt===null?Ee=Lr:tt.sibling=Lr,tt=Lr);return u&&Le.forEach(function(tl){return f(ae,tl)}),ft&&Kl(ae,He),Ee}function Be(ae,ee,se,me){if(se==null)throw Error(a(151));for(var Ee=null,tt=null,Le=ee,He=ee=0,Lr=null,dt=se.next();Le!==null&&!dt.done;He++,dt=se.next()){Le.index>He?(Lr=Le,Le=null):Lr=Le.sibling;var tl=le(ae,Le,dt.value,me);if(tl===null){Le===null&&(Le=Lr);break}u&&Le&&tl.alternate===null&&f(ae,Le),ee=P(tl,ee,He),tt===null?Ee=tl:tt.sibling=tl,tt=tl,Le=Lr}if(dt.done)return g(ae,Le),ft&&Kl(ae,He),Ee;if(Le===null){for(;!dt.done;He++,dt=se.next())dt=xe(ae,dt.value,me),dt!==null&&(ee=P(dt,ee,He),tt===null?Ee=dt:tt.sibling=dt,tt=dt);return ft&&Kl(ae,He),Ee}for(Le=w(Le);!dt.done;He++,dt=se.next())dt=oe(Le,ae,He,dt.value,me),dt!==null&&(u&&dt.alternate!==null&&Le.delete(dt.key===null?He:dt.key),ee=P(dt,ee,He),tt===null?Ee=dt:tt.sibling=dt,tt=dt);return u&&Le.forEach(function(oH){return f(ae,oH)}),ft&&Kl(ae,He),Ee}function Tt(ae,ee,se,me){if(typeof se=="object"&&se!==null&&se.type===b&&se.key===null&&(se=se.props.children),typeof se=="object"&&se!==null){switch(se.$$typeof){case m:e:{for(var Ee=se.key;ee!==null;){if(ee.key===Ee){if(Ee=se.type,Ee===b){if(ee.tag===7){g(ae,ee.sibling),me=D(ee,se.props.children),me.return=ae,ae=me;break e}}else if(ee.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===O&&sA(Ee)===ee.type){g(ae,ee.sibling),me=D(ee,se.props),Lu(me,se),me.return=ae,ae=me;break e}g(ae,ee);break}else f(ae,ee);ee=ee.sibling}se.type===b?(me=ql(se.props.children,ae.mode,me,se.key),me.return=ae,ae=me):(me=$p(se.type,se.key,se.props,null,ae.mode,me),Lu(me,se),me.return=ae,ae=me)}return I(ae);case x:e:{for(Ee=se.key;ee!==null;){if(ee.key===Ee)if(ee.tag===4&&ee.stateNode.containerInfo===se.containerInfo&&ee.stateNode.implementation===se.implementation){g(ae,ee.sibling),me=D(ee,se.children||[]),me.return=ae,ae=me;break e}else{g(ae,ee);break}else f(ae,ee);ee=ee.sibling}me=iy(se,ae.mode,me),me.return=ae,ae=me}return I(ae);case O:return Ee=se._init,se=Ee(se._payload),Tt(ae,ee,se,me)}if(X(se))return $e(ae,ee,se,me);if(z(se)){if(Ee=z(se),typeof Ee!="function")throw Error(a(150));return se=Ee.call(se),Be(ae,ee,se,me)}if(typeof se.then=="function")return Tt(ae,ee,sm(se),me);if(se.$$typeof===S)return Tt(ae,ee,Xp(ae,se),me);im(ae,se)}return typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint"?(se=""+se,ee!==null&&ee.tag===6?(g(ae,ee.sibling),me=D(ee,se),me.return=ae,ae=me):(g(ae,ee),me=sy(se,ae.mode,me),me.return=ae,ae=me),I(ae)):g(ae,ee)}return function(ae,ee,se,me){try{_u=0;var Ee=Tt(ae,ee,se,me);return Pc=null,Ee}catch(Le){if(Le===Au||Le===qp)throw Le;var tt=Ua(29,Le,null,ae.mode);return tt.lanes=me,tt.return=ae,tt}finally{}}}var Oc=iA(!0),lA=iA(!1),wn=G(null),fs=null;function Bi(u){var f=u.alternate;K(jr,jr.current&1),K(wn,u),fs===null&&(f===null||Dc.current!==null||f.memoizedState!==null)&&(fs=u)}function oA(u){if(u.tag===22){if(K(jr,jr.current),K(wn,u),fs===null){var f=u.alternate;f!==null&&f.memoizedState!==null&&(fs=u)}}else Hi()}function Hi(){K(jr,jr.current),K(wn,wn.current)}function Xs(u){te(wn),fs===u&&(fs=null),te(jr)}var jr=G(0);function lm(u){for(var f=u;f!==null;){if(f.tag===13){var g=f.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||g.data==="$?"||Dv(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===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}function Fy(u,f,g,w){f=u.memoizedState,g=g(w,f),g=g==null?f:h({},f,g),u.memoizedState=g,u.lanes===0&&(u.updateQueue.baseState=g)}var By={enqueueSetState:function(u,f,g){u=u._reactInternals;var w=qa(),D=zi(w);D.payload=f,g!=null&&(D.callback=g),f=Ii(u,D,w),f!==null&&(Ga(f,u,w),Du(f,u,w))},enqueueReplaceState:function(u,f,g){u=u._reactInternals;var w=qa(),D=zi(w);D.tag=1,D.payload=f,g!=null&&(D.callback=g),f=Ii(u,D,w),f!==null&&(Ga(f,u,w),Du(f,u,w))},enqueueForceUpdate:function(u,f){u=u._reactInternals;var g=qa(),w=zi(g);w.tag=2,f!=null&&(w.callback=f),f=Ii(u,w,g),f!==null&&(Ga(f,u,g),Du(f,u,g))}};function cA(u,f,g,w,D,P,I){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(w,P,I):f.prototype&&f.prototype.isPureReactComponent?!bu(g,w)||!bu(D,P):!0}function dA(u,f,g,w){u=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(g,w),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(g,w),f.state!==u&&By.enqueueReplaceState(f,f.state,null)}function ao(u,f){var g=f;if("ref"in f){g={};for(var w in f)w!=="ref"&&(g[w]=f[w])}if(u=u.defaultProps){g===f&&(g=h({},g));for(var D in u)g[D]===void 0&&(g[D]=u[D])}return g}var om=typeof reportError=="function"?reportError:function(u){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var f=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof u=="object"&&u!==null&&typeof u.message=="string"?String(u.message):String(u),error:u});if(!window.dispatchEvent(f))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",u);return}console.error(u)};function uA(u){om(u)}function hA(u){console.error(u)}function fA(u){om(u)}function cm(u,f){try{var g=u.onUncaughtError;g(f.value,{componentStack:f.stack})}catch(w){setTimeout(function(){throw w})}}function pA(u,f,g){try{var w=u.onCaughtError;w(g.value,{componentStack:g.stack,errorBoundary:f.tag===1?f.stateNode:null})}catch(D){setTimeout(function(){throw D})}}function Hy(u,f,g){return g=zi(g),g.tag=3,g.payload={element:null},g.callback=function(){cm(u,f)},g}function mA(u){return u=zi(u),u.tag=3,u}function gA(u,f,g,w){var D=g.type.getDerivedStateFromError;if(typeof D=="function"){var P=w.value;u.payload=function(){return D(P)},u.callback=function(){pA(f,g,w)}}var I=g.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(u.callback=function(){pA(f,g,w),typeof D!="function"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var $=w.stack;this.componentDidCatch(w.value,{componentStack:$!==null?$:""})})}function oB(u,f,g,w,D){if(g.flags|=32768,w!==null&&typeof w=="object"&&typeof w.then=="function"){if(f=g.alternate,f!==null&&Nu(f,g,D,!0),g=wn.current,g!==null){switch(g.tag){case 13:return fs===null?uv():g.alternate===null&&rr===0&&(rr=3),g.flags&=-257,g.flags|=65536,g.lanes=D,w===gy?g.flags|=16384:(f=g.updateQueue,f===null?g.updateQueue=new Set([w]):f.add(w),fv(u,w,D)),!1;case 22:return g.flags|=65536,w===gy?g.flags|=16384:(f=g.updateQueue,f===null?(f={transitions:null,markerInstances:null,retryQueue:new Set([w])},g.updateQueue=f):(g=f.retryQueue,g===null?f.retryQueue=new Set([w]):g.add(w)),fv(u,w,D)),!1}throw Error(a(435,g.tag))}return fv(u,w,D),uv(),!1}if(ft)return f=wn.current,f!==null?((f.flags&65536)===0&&(f.flags|=256),f.flags|=65536,f.lanes=D,w!==cy&&(u=Error(a(422),{cause:w}),ju(xn(u,g)))):(w!==cy&&(f=Error(a(423),{cause:w}),ju(xn(f,g))),u=u.current.alternate,u.flags|=65536,D&=-D,u.lanes|=D,w=xn(w,g),D=Hy(u.stateNode,w,D),yy(u,D),rr!==4&&(rr=2)),!1;var P=Error(a(520),{cause:w});if(P=xn(P,g),Yu===null?Yu=[P]:Yu.push(P),rr!==4&&(rr=2),f===null)return!0;w=xn(w,g),g=f;do{switch(g.tag){case 3:return g.flags|=65536,u=D&-D,g.lanes|=u,u=Hy(g.stateNode,w,u),yy(g,u),!1;case 1:if(f=g.type,P=g.stateNode,(g.flags&128)===0&&(typeof f.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Vi===null||!Vi.has(P))))return g.flags|=65536,D&=-D,g.lanes|=D,D=mA(D),gA(D,u,g,w),yy(g,D),!1}g=g.return}while(g!==null);return!1}var xA=Error(a(461)),Rr=!1;function $r(u,f,g,w){f.child=u===null?lA(f,null,g,w):Oc(f,u.child,g,w)}function bA(u,f,g,w,D){g=g.render;var P=f.ref;if("ref"in w){var I={};for(var $ in w)$!=="ref"&&(I[$]=w[$])}else I=w;return eo(f),w=Sy(u,f,g,I,P,D),$=Cy(),u!==null&&!Rr?(Ay(u,f,D),Vs(u,f,D)):(ft&&$&&ly(f),f.flags|=1,$r(u,f,w,D),f.child)}function yA(u,f,g,w,D){if(u===null){var P=g.type;return typeof P=="function"&&!ny(P)&&P.defaultProps===void 0&&g.compare===null?(f.tag=15,f.type=P,vA(u,f,P,w,D)):(u=$p(g.type,null,w,f,f.mode,D),u.ref=f.ref,u.return=f,f.child=u)}if(P=u.child,!Gy(u,D)){var I=P.memoizedProps;if(g=g.compare,g=g!==null?g:bu,g(I,w)&&u.ref===f.ref)return Vs(u,f,D)}return f.flags|=1,u=Bs(P,w),u.ref=f.ref,u.return=f,f.child=u}function vA(u,f,g,w,D){if(u!==null){var P=u.memoizedProps;if(bu(P,w)&&u.ref===f.ref)if(Rr=!1,f.pendingProps=w=P,Gy(u,D))(u.flags&131072)!==0&&(Rr=!0);else return f.lanes=u.lanes,Vs(u,f,D)}return $y(u,f,g,w,D)}function wA(u,f,g){var w=f.pendingProps,D=w.children,P=u!==null?u.memoizedState:null;if(w.mode==="hidden"){if((f.flags&128)!==0){if(w=P!==null?P.baseLanes|g:g,u!==null){for(D=f.child=u.child,P=0;D!==null;)P=P|D.lanes|D.childLanes,D=D.sibling;f.childLanes=P&~w}else f.childLanes=0,f.child=null;return jA(u,f,w,g)}if((g&536870912)!==0)f.memoizedState={baseLanes:0,cachePool:null},u!==null&&Vp(f,P!==null?P.cachePool:null),P!==null?vC(f,P):wy(),oA(f);else return f.lanes=f.childLanes=536870912,jA(u,f,P!==null?P.baseLanes|g:g,g)}else P!==null?(Vp(f,P.cachePool),vC(f,P),Hi(),f.memoizedState=null):(u!==null&&Vp(f,null),wy(),Hi());return $r(u,f,D,g),f.child}function jA(u,f,g,w){var D=my();return D=D===null?null:{parent:wr._currentValue,pool:D},f.memoizedState={baseLanes:g,cachePool:D},u!==null&&Vp(f,null),wy(),oA(f),u!==null&&Nu(u,f,w,!0),null}function dm(u,f){var g=f.ref;if(g===null)u!==null&&u.ref!==null&&(f.flags|=4194816);else{if(typeof g!="function"&&typeof g!="object")throw Error(a(284));(u===null||u.ref!==g)&&(f.flags|=4194816)}}function $y(u,f,g,w,D){return eo(f),g=Sy(u,f,g,w,void 0,D),w=Cy(),u!==null&&!Rr?(Ay(u,f,D),Vs(u,f,D)):(ft&&w&&ly(f),f.flags|=1,$r(u,f,g,D),f.child)}function NA(u,f,g,w,D,P){return eo(f),f.updateQueue=null,g=jC(f,w,g,D),wC(u),w=Cy(),u!==null&&!Rr?(Ay(u,f,P),Vs(u,f,P)):(ft&&w&&ly(f),f.flags|=1,$r(u,f,g,P),f.child)}function SA(u,f,g,w,D){if(eo(f),f.stateNode===null){var P=Nc,I=g.contextType;typeof I=="object"&&I!==null&&(P=aa(I)),P=new g(w,P),f.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,P.updater=By,f.stateNode=P,P._reactInternals=f,P=f.stateNode,P.props=w,P.state=f.memoizedState,P.refs={},xy(f),I=g.contextType,P.context=typeof I=="object"&&I!==null?aa(I):Nc,P.state=f.memoizedState,I=g.getDerivedStateFromProps,typeof I=="function"&&(Fy(f,g,I,w),P.state=f.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof P.getSnapshotBeforeUpdate=="function"||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(I=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),I!==P.state&&By.enqueueReplaceState(P,P.state,null),Mu(f,w,P,D),Tu(),P.state=f.memoizedState),typeof P.componentDidMount=="function"&&(f.flags|=4194308),w=!0}else if(u===null){P=f.stateNode;var $=f.memoizedProps,q=ao(g,$);P.props=q;var ie=P.context,fe=g.contextType;I=Nc,typeof fe=="object"&&fe!==null&&(I=aa(fe));var xe=g.getDerivedStateFromProps;fe=typeof xe=="function"||typeof P.getSnapshotBeforeUpdate=="function",$=f.pendingProps!==$,fe||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||($||ie!==I)&&dA(f,P,w,I),Li=!1;var le=f.memoizedState;P.state=le,Mu(f,w,P,D),Tu(),ie=f.memoizedState,$||le!==ie||Li?(typeof xe=="function"&&(Fy(f,g,xe,w),ie=f.memoizedState),(q=Li||cA(f,g,q,w,le,ie,I))?(fe||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(f.flags|=4194308)):(typeof P.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=w,f.memoizedState=ie),P.props=w,P.state=ie,P.context=I,w=q):(typeof P.componentDidMount=="function"&&(f.flags|=4194308),w=!1)}else{P=f.stateNode,by(u,f),I=f.memoizedProps,fe=ao(g,I),P.props=fe,xe=f.pendingProps,le=P.context,ie=g.contextType,q=Nc,typeof ie=="object"&&ie!==null&&(q=aa(ie)),$=g.getDerivedStateFromProps,(ie=typeof $=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(I!==xe||le!==q)&&dA(f,P,w,q),Li=!1,le=f.memoizedState,P.state=le,Mu(f,w,P,D),Tu();var oe=f.memoizedState;I!==xe||le!==oe||Li||u!==null&&u.dependencies!==null&&Wp(u.dependencies)?(typeof $=="function"&&(Fy(f,g,$,w),oe=f.memoizedState),(fe=Li||cA(f,g,fe,w,le,oe,q)||u!==null&&u.dependencies!==null&&Wp(u.dependencies))?(ie||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(w,oe,q),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(w,oe,q)),typeof P.componentDidUpdate=="function"&&(f.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof P.componentDidUpdate!="function"||I===u.memoizedProps&&le===u.memoizedState||(f.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||I===u.memoizedProps&&le===u.memoizedState||(f.flags|=1024),f.memoizedProps=w,f.memoizedState=oe),P.props=w,P.state=oe,P.context=q,w=fe):(typeof P.componentDidUpdate!="function"||I===u.memoizedProps&&le===u.memoizedState||(f.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||I===u.memoizedProps&&le===u.memoizedState||(f.flags|=1024),w=!1)}return P=w,dm(u,f),w=(f.flags&128)!==0,P||w?(P=f.stateNode,g=w&&typeof g.getDerivedStateFromError!="function"?null:P.render(),f.flags|=1,u!==null&&w?(f.child=Oc(f,u.child,null,D),f.child=Oc(f,null,g,D)):$r(u,f,g,D),f.memoizedState=P.state,u=f.child):u=Vs(u,f,D),u}function CA(u,f,g,w){return wu(),f.flags|=256,$r(u,f,g,w),f.child}var Yy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Uy(u){return{baseLanes:u,cachePool:hC()}}function Wy(u,f,g){return u=u!==null?u.childLanes&~g:0,f&&(u|=jn),u}function AA(u,f,g){var w=f.pendingProps,D=!1,P=(f.flags&128)!==0,I;if((I=P)||(I=u!==null&&u.memoizedState===null?!1:(jr.current&2)!==0),I&&(D=!0,f.flags&=-129),I=(f.flags&32)!==0,f.flags&=-33,u===null){if(ft){if(D?Bi(f):Hi(),ft){var $=tr,q;if(q=$){e:{for(q=$,$=hs;q.nodeType!==8;){if(!$){$=null;break e}if(q=qn(q.nextSibling),q===null){$=null;break e}}$=q}$!==null?(f.memoizedState={dehydrated:$,treeContext:Gl!==null?{id:Hs,overflow:$s}:null,retryLane:536870912,hydrationErrors:null},q=Ua(18,null,null,0),q.stateNode=$,q.return=f,f.child=q,ua=f,tr=null,q=!0):q=!1}q||Ql(f)}if($=f.memoizedState,$!==null&&($=$.dehydrated,$!==null))return Dv($)?f.lanes=32:f.lanes=536870912,null;Xs(f)}return $=w.children,w=w.fallback,D?(Hi(),D=f.mode,$=um({mode:"hidden",children:$},D),w=ql(w,D,g,null),$.return=f,w.return=f,$.sibling=w,f.child=$,D=f.child,D.memoizedState=Uy(g),D.childLanes=Wy(u,I,g),f.memoizedState=Yy,w):(Bi(f),Xy(f,$))}if(q=u.memoizedState,q!==null&&($=q.dehydrated,$!==null)){if(P)f.flags&256?(Bi(f),f.flags&=-257,f=Vy(u,f,g)):f.memoizedState!==null?(Hi(),f.child=u.child,f.flags|=128,f=null):(Hi(),D=w.fallback,$=f.mode,w=um({mode:"visible",children:w.children},$),D=ql(D,$,g,null),D.flags|=2,w.return=f,D.return=f,w.sibling=D,f.child=w,Oc(f,u.child,null,g),w=f.child,w.memoizedState=Uy(g),w.childLanes=Wy(u,I,g),f.memoizedState=Yy,f=D);else if(Bi(f),Dv($)){if(I=$.nextSibling&&$.nextSibling.dataset,I)var ie=I.dgst;I=ie,w=Error(a(419)),w.stack="",w.digest=I,ju({value:w,source:null,stack:null}),f=Vy(u,f,g)}else if(Rr||Nu(u,f,g,!1),I=(g&u.childLanes)!==0,Rr||I){if(I=It,I!==null&&(w=g&-g,w=(w&42)!==0?1:lu(w),w=(w&(I.suspendedLanes|g))!==0?0:w,w!==0&&w!==q.retryLane))throw q.retryLane=w,jc(u,w),Ga(I,u,w),xA;$.data==="$?"||uv(),f=Vy(u,f,g)}else $.data==="$?"?(f.flags|=192,f.child=u.child,f=null):(u=q.treeContext,tr=qn($.nextSibling),ua=f,ft=!0,Zl=null,hs=!1,u!==null&&(yn[vn++]=Hs,yn[vn++]=$s,yn[vn++]=Gl,Hs=u.id,$s=u.overflow,Gl=f),f=Xy(f,w.children),f.flags|=4096);return f}return D?(Hi(),D=w.fallback,$=f.mode,q=u.child,ie=q.sibling,w=Bs(q,{mode:"hidden",children:w.children}),w.subtreeFlags=q.subtreeFlags&65011712,ie!==null?D=Bs(ie,D):(D=ql(D,$,g,null),D.flags|=2),D.return=f,w.return=f,w.sibling=D,f.child=w,w=D,D=f.child,$=u.child.memoizedState,$===null?$=Uy(g):(q=$.cachePool,q!==null?(ie=wr._currentValue,q=q.parent!==ie?{parent:ie,pool:ie}:q):q=hC(),$={baseLanes:$.baseLanes|g,cachePool:q}),D.memoizedState=$,D.childLanes=Wy(u,I,g),f.memoizedState=Yy,w):(Bi(f),g=u.child,u=g.sibling,g=Bs(g,{mode:"visible",children:w.children}),g.return=f,g.sibling=null,u!==null&&(I=f.deletions,I===null?(f.deletions=[u],f.flags|=16):I.push(u)),f.child=g,f.memoizedState=null,g)}function Xy(u,f){return f=um({mode:"visible",children:f},u.mode),f.return=u,u.child=f}function um(u,f){return u=Ua(22,u,null,f),u.lanes=0,u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},u}function Vy(u,f,g){return Oc(f,u.child,null,g),u=Xy(f,f.pendingProps.children),u.flags|=2,f.memoizedState=null,u}function kA(u,f,g){u.lanes|=f;var w=u.alternate;w!==null&&(w.lanes|=f),uy(u.return,f,g)}function qy(u,f,g,w,D){var P=u.memoizedState;P===null?u.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:w,tail:g,tailMode:D}:(P.isBackwards=f,P.rendering=null,P.renderingStartTime=0,P.last=w,P.tail=g,P.tailMode=D)}function DA(u,f,g){var w=f.pendingProps,D=w.revealOrder,P=w.tail;if($r(u,f,w.children,g),w=jr.current,(w&2)!==0)w=w&1|2,f.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=f.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&kA(u,g,f);else if(u.tag===19)kA(u,g,f);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===f)break e;for(;u.sibling===null;){if(u.return===null||u.return===f)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}w&=1}switch(K(jr,w),D){case"forwards":for(g=f.child,D=null;g!==null;)u=g.alternate,u!==null&&lm(u)===null&&(D=g),g=g.sibling;g=D,g===null?(D=f.child,f.child=null):(D=g.sibling,g.sibling=null),qy(f,!1,D,g,P);break;case"backwards":for(g=null,D=f.child,f.child=null;D!==null;){if(u=D.alternate,u!==null&&lm(u)===null){f.child=D;break}u=D.sibling,D.sibling=g,g=D,D=u}qy(f,!0,g,null,P);break;case"together":qy(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function Vs(u,f,g){if(u!==null&&(f.dependencies=u.dependencies),Xi|=f.lanes,(g&f.childLanes)===0)if(u!==null){if(Nu(u,f,g,!1),(g&f.childLanes)===0)return null}else return null;if(u!==null&&f.child!==u.child)throw Error(a(153));if(f.child!==null){for(u=f.child,g=Bs(u,u.pendingProps),f.child=g,g.return=f;u.sibling!==null;)u=u.sibling,g=g.sibling=Bs(u,u.pendingProps),g.return=f;g.sibling=null}return f.child}function Gy(u,f){return(u.lanes&f)!==0?!0:(u=u.dependencies,!!(u!==null&&Wp(u)))}function cB(u,f,g){switch(f.tag){case 3:ye(f,f.stateNode.containerInfo),_i(f,wr,u.memoizedState.cache),wu();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 w=f.memoizedState;if(w!==null)return w.dehydrated!==null?(Bi(f),f.flags|=128,null):(g&f.child.childLanes)!==0?AA(u,f,g):(Bi(f),u=Vs(u,f,g),u!==null?u.sibling:null);Bi(f);break;case 19:var D=(u.flags&128)!==0;if(w=(g&f.childLanes)!==0,w||(Nu(u,f,g,!1),w=(g&f.childLanes)!==0),D){if(w)return DA(u,f,g);f.flags|=128}if(D=f.memoizedState,D!==null&&(D.rendering=null,D.tail=null,D.lastEffect=null),K(jr,jr.current),w)break;return null;case 22:case 23:return f.lanes=0,wA(u,f,g);case 24:_i(f,wr,u.memoizedState.cache)}return Vs(u,f,g)}function TA(u,f,g){if(u!==null)if(u.memoizedProps!==f.pendingProps)Rr=!0;else{if(!Gy(u,g)&&(f.flags&128)===0)return Rr=!1,cB(u,f,g);Rr=(u.flags&131072)!==0}else Rr=!1,ft&&(f.flags&1048576)!==0&&sC(f,Up,f.index);switch(f.lanes=0,f.tag){case 16:e:{u=f.pendingProps;var w=f.elementType,D=w._init;if(w=D(w._payload),f.type=w,typeof w=="function")ny(w)?(u=ao(w,u),f.tag=1,f=SA(null,f,w,u,g)):(f.tag=0,f=$y(null,f,w,u,g));else{if(w!=null){if(D=w.$$typeof,D===k){f.tag=11,f=bA(null,f,w,u,g);break e}else if(D===M){f.tag=14,f=yA(null,f,w,u,g);break e}}throw f=Y(w)||w,Error(a(306,f,""))}}return f;case 0:return $y(u,f,f.type,f.pendingProps,g);case 1:return w=f.type,D=ao(w,f.pendingProps),SA(u,f,w,D,g);case 3:e:{if(ye(f,f.stateNode.containerInfo),u===null)throw Error(a(387));w=f.pendingProps;var P=f.memoizedState;D=P.element,by(u,f),Mu(f,w,null,g);var I=f.memoizedState;if(w=I.cache,_i(f,wr,w),w!==P.cache&&hy(f,[wr],g,!0),Tu(),w=I.element,P.isDehydrated)if(P={element:w,isDehydrated:!1,cache:I.cache},f.updateQueue.baseState=P,f.memoizedState=P,f.flags&256){f=CA(u,f,w,g);break e}else if(w!==D){D=xn(Error(a(424)),f),ju(D),f=CA(u,f,w,g);break e}else{switch(u=f.stateNode.containerInfo,u.nodeType){case 9:u=u.body;break;default:u=u.nodeName==="HTML"?u.ownerDocument.body:u}for(tr=qn(u.firstChild),ua=f,ft=!0,Zl=null,hs=!0,g=lA(f,null,w,g),f.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling}else{if(wu(),w===D){f=Vs(u,f,g);break e}$r(u,f,w,g)}f=f.child}return f;case 26:return dm(u,f),u===null?(g=Ok(f.type,null,f.pendingProps,null))?f.memoizedState=g:ft||(g=f.type,u=f.pendingProps,w=Cm(ne.current).createElement(g),w[pr]=f,w[Or]=u,Ur(w,g,u),er(w),f.stateNode=w):f.memoizedState=Ok(f.type,u.memoizedProps,f.pendingProps,u.memoizedState),null;case 27:return je(f),u===null&&ft&&(w=f.stateNode=Mk(f.type,f.pendingProps,ne.current),ua=f,hs=!0,D=tr,Ki(f.type)?(Tv=D,tr=qn(w.firstChild)):tr=D),$r(u,f,f.pendingProps.children,g),dm(u,f),u===null&&(f.flags|=4194304),f.child;case 5:return u===null&&ft&&((D=w=tr)&&(w=zB(w,f.type,f.pendingProps,hs),w!==null?(f.stateNode=w,ua=f,tr=qn(w.firstChild),hs=!1,D=!0):D=!1),D||Ql(f)),je(f),D=f.type,P=f.pendingProps,I=u!==null?u.memoizedProps:null,w=P.children,Cv(D,P)?w=null:I!==null&&Cv(D,I)&&(f.flags|=32),f.memoizedState!==null&&(D=Sy(u,f,tB,null,null,g),Qu._currentValue=D),dm(u,f),$r(u,f,w,g),f.child;case 6:return u===null&&ft&&((u=g=tr)&&(g=IB(g,f.pendingProps,hs),g!==null?(f.stateNode=g,ua=f,tr=null,u=!0):u=!1),u||Ql(f)),null;case 13:return AA(u,f,g);case 4:return ye(f,f.stateNode.containerInfo),w=f.pendingProps,u===null?f.child=Oc(f,null,w,g):$r(u,f,w,g),f.child;case 11:return bA(u,f,f.type,f.pendingProps,g);case 7:return $r(u,f,f.pendingProps,g),f.child;case 8:return $r(u,f,f.pendingProps.children,g),f.child;case 12:return $r(u,f,f.pendingProps.children,g),f.child;case 10:return w=f.pendingProps,_i(f,f.type,w.value),$r(u,f,w.children,g),f.child;case 9:return D=f.type._context,w=f.pendingProps.children,eo(f),D=aa(D),w=w(D),f.flags|=1,$r(u,f,w,g),f.child;case 14:return yA(u,f,f.type,f.pendingProps,g);case 15:return vA(u,f,f.type,f.pendingProps,g);case 19:return DA(u,f,g);case 31:return w=f.pendingProps,g=f.mode,w={mode:w.mode,children:w.children},u===null?(g=um(w,g),g.ref=f.ref,f.child=g,g.return=f,f=g):(g=Bs(u.child,w),g.ref=f.ref,f.child=g,g.return=f,f=g),f;case 22:return wA(u,f,g);case 24:return eo(f),w=aa(wr),u===null?(D=my(),D===null&&(D=It,P=fy(),D.pooledCache=P,P.refCount++,P!==null&&(D.pooledCacheLanes|=g),D=P),f.memoizedState={parent:w,cache:D},xy(f),_i(f,wr,D)):((u.lanes&g)!==0&&(by(u,f),Mu(f,null,null,g),Tu()),D=u.memoizedState,P=f.memoizedState,D.parent!==w?(D={parent:w,cache:w},f.memoizedState=D,f.lanes===0&&(f.memoizedState=f.updateQueue.baseState=D),_i(f,wr,w)):(w=P.cache,_i(f,wr,w),w!==D.cache&&hy(f,[wr],g,!0))),$r(u,f,f.pendingProps.children,g),f.child;case 29:throw f.pendingProps}throw Error(a(156,f.tag))}function qs(u){u.flags|=4}function MA(u,f){if(f.type!=="stylesheet"||(f.state.loading&4)!==0)u.flags&=-16777217;else if(u.flags|=16777216,!Ik(f)){if(f=wn.current,f!==null&&((st&4194048)===st?fs!==null:(st&62914560)!==st&&(st&536870912)===0||f!==fs))throw ku=gy,fC;u.flags|=8192}}function hm(u,f){f!==null&&(u.flags|=4),u.flags&16384&&(f=u.tag!==22?Sp():536870912,u.lanes|=f,zc|=f)}function zu(u,f){if(!ft)switch(u.tailMode){case"hidden":f=u.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?u.tail=null:g.sibling=null;break;case"collapsed":g=u.tail;for(var w=null;g!==null;)g.alternate!==null&&(w=g),g=g.sibling;w===null?f||u.tail===null?u.tail=null:u.tail.sibling=null:w.sibling=null}}function Qt(u){var f=u.alternate!==null&&u.alternate.child===u.child,g=0,w=0;if(f)for(var D=u.child;D!==null;)g|=D.lanes|D.childLanes,w|=D.subtreeFlags&65011712,w|=D.flags&65011712,D.return=u,D=D.sibling;else for(D=u.child;D!==null;)g|=D.lanes|D.childLanes,w|=D.subtreeFlags,w|=D.flags,D.return=u,D=D.sibling;return u.subtreeFlags|=w,u.childLanes=g,f}function dB(u,f,g){var w=f.pendingProps;switch(oy(f),f.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qt(f),null;case 1:return Qt(f),null;case 3:return g=f.stateNode,w=null,u!==null&&(w=u.memoizedState.cache),f.memoizedState.cache!==w&&(f.flags|=2048),Us(wr),ue(),g.pendingContext&&(g.context=g.pendingContext,g.pendingContext=null),(u===null||u.child===null)&&(vu(f)?qs(f):u===null||u.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,oC())),Qt(f),null;case 26:return g=f.memoizedState,u===null?(qs(f),g!==null?(Qt(f),MA(f,g)):(Qt(f),f.flags&=-16777217)):g?g!==u.memoizedState?(qs(f),Qt(f),MA(f,g)):(Qt(f),f.flags&=-16777217):(u.memoizedProps!==w&&qs(f),Qt(f),f.flags&=-16777217),null;case 27:Te(f),g=ne.current;var D=f.type;if(u!==null&&f.stateNode!=null)u.memoizedProps!==w&&qs(f);else{if(!w){if(f.stateNode===null)throw Error(a(166));return Qt(f),null}u=U.current,vu(f)?iC(f):(u=Mk(D,w,g),f.stateNode=u,qs(f))}return Qt(f),null;case 5:if(Te(f),g=f.type,u!==null&&f.stateNode!=null)u.memoizedProps!==w&&qs(f);else{if(!w){if(f.stateNode===null)throw Error(a(166));return Qt(f),null}if(u=U.current,vu(f))iC(f);else{switch(D=Cm(ne.current),u){case 1:u=D.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:u=D.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":u=D.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":u=D.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":u=D.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof w.is=="string"?D.createElement("select",{is:w.is}):D.createElement("select"),w.multiple?u.multiple=!0:w.size&&(u.size=w.size);break;default:u=typeof w.is=="string"?D.createElement(g,{is:w.is}):D.createElement(g)}}u[pr]=f,u[Or]=w;e:for(D=f.child;D!==null;){if(D.tag===5||D.tag===6)u.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=u;e:switch(Ur(u,g,w),g){case"button":case"input":case"select":case"textarea":u=!!w.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&qs(f)}}return Qt(f),f.flags&=-16777217,null;case 6:if(u&&f.stateNode!=null)u.memoizedProps!==w&&qs(f);else{if(typeof w!="string"&&f.stateNode===null)throw Error(a(166));if(u=ne.current,vu(f)){if(u=f.stateNode,g=f.memoizedProps,w=null,D=ua,D!==null)switch(D.tag){case 27:case 5:w=D.memoizedProps}u[pr]=f,u=!!(u.nodeValue===g||w!==null&&w.suppressHydrationWarning===!0||Nk(u.nodeValue,g)),u||Ql(f)}else u=Cm(u).createTextNode(w),u[pr]=f,f.stateNode=u}return Qt(f),null;case 13:if(w=f.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(D=vu(f),w!==null&&w.dehydrated!==null){if(u===null){if(!D)throw Error(a(318));if(D=f.memoizedState,D=D!==null?D.dehydrated:null,!D)throw Error(a(317));D[pr]=f}else wu(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Qt(f),D=!1}else D=oC(),u!==null&&u.memoizedState!==null&&(u.memoizedState.hydrationErrors=D),D=!0;if(!D)return f.flags&256?(Xs(f),f):(Xs(f),null)}if(Xs(f),(f.flags&128)!==0)return f.lanes=g,f;if(g=w!==null,u=u!==null&&u.memoizedState!==null,g){w=f.child,D=null,w.alternate!==null&&w.alternate.memoizedState!==null&&w.alternate.memoizedState.cachePool!==null&&(D=w.alternate.memoizedState.cachePool.pool);var P=null;w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(P=w.memoizedState.cachePool.pool),P!==D&&(w.flags|=2048)}return g!==u&&g&&(f.child.flags|=8192),hm(f,f.updateQueue),Qt(f),null;case 4:return ue(),u===null&&vv(f.stateNode.containerInfo),Qt(f),null;case 10:return Us(f.type),Qt(f),null;case 19:if(te(jr),D=f.memoizedState,D===null)return Qt(f),null;if(w=(f.flags&128)!==0,P=D.rendering,P===null)if(w)zu(D,!1);else{if(rr!==0||u!==null&&(u.flags&128)!==0)for(u=f.child;u!==null;){if(P=lm(u),P!==null){for(f.flags|=128,zu(D,!1),u=P.updateQueue,f.updateQueue=u,hm(f,u),f.subtreeFlags=0,u=g,g=f.child;g!==null;)nC(g,u),g=g.sibling;return K(jr,jr.current&1|2),f.child}u=u.sibling}D.tail!==null&&bt()>mm&&(f.flags|=128,w=!0,zu(D,!1),f.lanes=4194304)}else{if(!w)if(u=lm(P),u!==null){if(f.flags|=128,w=!0,u=u.updateQueue,f.updateQueue=u,hm(f,u),zu(D,!0),D.tail===null&&D.tailMode==="hidden"&&!P.alternate&&!ft)return Qt(f),null}else 2*bt()-D.renderingStartTime>mm&&g!==536870912&&(f.flags|=128,w=!0,zu(D,!1),f.lanes=4194304);D.isBackwards?(P.sibling=f.child,f.child=P):(u=D.last,u!==null?u.sibling=P:f.child=P,D.last=P)}return D.tail!==null?(f=D.tail,D.rendering=f,D.tail=f.sibling,D.renderingStartTime=bt(),f.sibling=null,u=jr.current,K(jr,w?u&1|2:u&1),f):(Qt(f),null);case 22:case 23:return Xs(f),jy(),w=f.memoizedState!==null,u!==null?u.memoizedState!==null!==w&&(f.flags|=8192):w&&(f.flags|=8192),w?(g&536870912)!==0&&(f.flags&128)===0&&(Qt(f),f.subtreeFlags&6&&(f.flags|=8192)):Qt(f),g=f.updateQueue,g!==null&&hm(f,g.retryQueue),g=null,u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),w=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(w=f.memoizedState.cachePool.pool),w!==g&&(f.flags|=2048),u!==null&&te(to),null;case 24:return g=null,u!==null&&(g=u.memoizedState.cache),f.memoizedState.cache!==g&&(f.flags|=2048),Us(wr),Qt(f),null;case 25:return null;case 30:return null}throw Error(a(156,f.tag))}function uB(u,f){switch(oy(f),f.tag){case 1:return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return Us(wr),ue(),u=f.flags,(u&65536)!==0&&(u&128)===0?(f.flags=u&-65537|128,f):null;case 26:case 27:case 5:return Te(f),null;case 13:if(Xs(f),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(a(340));wu()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return te(jr),null;case 4:return ue(),null;case 10:return Us(f.type),null;case 22:case 23:return Xs(f),jy(),u!==null&&te(to),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 24:return Us(wr),null;case 25:return null;default:return null}}function EA(u,f){switch(oy(f),f.tag){case 3:Us(wr),ue();break;case 26:case 27:case 5:Te(f);break;case 4:ue();break;case 13:Xs(f);break;case 19:te(jr);break;case 10:Us(f.type);break;case 22:case 23:Xs(f),jy(),u!==null&&te(to);break;case 24:Us(wr)}}function Iu(u,f){try{var g=f.updateQueue,w=g!==null?g.lastEffect:null;if(w!==null){var D=w.next;g=D;do{if((g.tag&u)===u){w=void 0;var P=g.create,I=g.inst;w=P(),I.destroy=w}g=g.next}while(g!==D)}}catch($){Ot(f,f.return,$)}}function $i(u,f,g){try{var w=f.updateQueue,D=w!==null?w.lastEffect:null;if(D!==null){var P=D.next;w=P;do{if((w.tag&u)===u){var I=w.inst,$=I.destroy;if($!==void 0){I.destroy=void 0,D=f;var q=g,ie=$;try{ie()}catch(fe){Ot(D,q,fe)}}}w=w.next}while(w!==P)}}catch(fe){Ot(f,f.return,fe)}}function PA(u){var f=u.updateQueue;if(f!==null){var g=u.stateNode;try{yC(f,g)}catch(w){Ot(u,u.return,w)}}}function OA(u,f,g){g.props=ao(u.type,u.memoizedProps),g.state=u.memoizedState;try{g.componentWillUnmount()}catch(w){Ot(u,f,w)}}function Fu(u,f){try{var g=u.ref;if(g!==null){switch(u.tag){case 26:case 27:case 5:var w=u.stateNode;break;case 30:w=u.stateNode;break;default:w=u.stateNode}typeof g=="function"?u.refCleanup=g(w):g.current=w}}catch(D){Ot(u,f,D)}}function ps(u,f){var g=u.ref,w=u.refCleanup;if(g!==null)if(typeof w=="function")try{w()}catch(D){Ot(u,f,D)}finally{u.refCleanup=null,u=u.alternate,u!=null&&(u.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(D){Ot(u,f,D)}else g.current=null}function RA(u){var f=u.type,g=u.memoizedProps,w=u.stateNode;try{e:switch(f){case"button":case"input":case"select":case"textarea":g.autoFocus&&w.focus();break e;case"img":g.src?w.src=g.src:g.srcSet&&(w.srcset=g.srcSet)}}catch(D){Ot(u,u.return,D)}}function Ky(u,f,g){try{var w=u.stateNode;PB(w,u.type,g,f),w[Or]=f}catch(D){Ot(u,u.return,D)}}function _A(u){return u.tag===5||u.tag===3||u.tag===26||u.tag===27&&Ki(u.type)||u.tag===4}function Zy(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||_A(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.tag===27&&Ki(u.type)||u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Qy(u,f,g){var w=u.tag;if(w===5||w===6)u=u.stateNode,f?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(u,f):(f=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,f.appendChild(u),g=g._reactRootContainer,g!=null||f.onclick!==null||(f.onclick=Sm));else if(w!==4&&(w===27&&Ki(u.type)&&(g=u.stateNode,f=null),u=u.child,u!==null))for(Qy(u,f,g),u=u.sibling;u!==null;)Qy(u,f,g),u=u.sibling}function fm(u,f,g){var w=u.tag;if(w===5||w===6)u=u.stateNode,f?g.insertBefore(u,f):g.appendChild(u);else if(w!==4&&(w===27&&Ki(u.type)&&(g=u.stateNode),u=u.child,u!==null))for(fm(u,f,g),u=u.sibling;u!==null;)fm(u,f,g),u=u.sibling}function LA(u){var f=u.stateNode,g=u.memoizedProps;try{for(var w=u.type,D=f.attributes;D.length;)f.removeAttributeNode(D[0]);Ur(f,w,g),f[pr]=u,f[Or]=g}catch(P){Ot(u,u.return,P)}}var Gs=!1,dr=!1,Jy=!1,zA=typeof WeakSet=="function"?WeakSet:Set,_r=null;function hB(u,f){if(u=u.containerInfo,Nv=Em,u=q3(u),Zb(u)){if("selectionStart"in u)var g={start:u.selectionStart,end:u.selectionEnd};else e:{g=(g=u.ownerDocument)&&g.defaultView||window;var w=g.getSelection&&g.getSelection();if(w&&w.rangeCount!==0){g=w.anchorNode;var D=w.anchorOffset,P=w.focusNode;w=w.focusOffset;try{g.nodeType,P.nodeType}catch{g=null;break e}var I=0,$=-1,q=-1,ie=0,fe=0,xe=u,le=null;t:for(;;){for(var oe;xe!==g||D!==0&&xe.nodeType!==3||($=I+D),xe!==P||w!==0&&xe.nodeType!==3||(q=I+w),xe.nodeType===3&&(I+=xe.nodeValue.length),(oe=xe.firstChild)!==null;)le=xe,xe=oe;for(;;){if(xe===u)break t;if(le===g&&++ie===D&&($=I),le===P&&++fe===w&&(q=I),(oe=xe.nextSibling)!==null)break;xe=le,le=xe.parentNode}xe=oe}g=$===-1||q===-1?null:{start:$,end:q}}else g=null}g=g||{start:0,end:0}}else g=null;for(Sv={focusedElem:u,selectionRange:g},Em=!1,_r=f;_r!==null;)if(f=_r,u=f.child,(f.subtreeFlags&1024)!==0&&u!==null)u.return=f,_r=u;else for(;_r!==null;){switch(f=_r,P=f.alternate,u=f.flags,f.tag){case 0:break;case 11:case 15:break;case 1:if((u&1024)!==0&&P!==null){u=void 0,g=f,D=P.memoizedProps,P=P.memoizedState,w=g.stateNode;try{var $e=ao(g.type,D,g.elementType===g.type);u=w.getSnapshotBeforeUpdate($e,P),w.__reactInternalSnapshotBeforeUpdate=u}catch(Be){Ot(g,g.return,Be)}}break;case 3:if((u&1024)!==0){if(u=f.stateNode.containerInfo,g=u.nodeType,g===9)kv(u);else if(g===1)switch(u.nodeName){case"HEAD":case"HTML":case"BODY":kv(u);break;default:u.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(a(163))}if(u=f.sibling,u!==null){u.return=f.return,_r=u;break}_r=f.return}}function IA(u,f,g){var w=g.flags;switch(g.tag){case 0:case 11:case 15:Yi(u,g),w&4&&Iu(5,g);break;case 1:if(Yi(u,g),w&4)if(u=g.stateNode,f===null)try{u.componentDidMount()}catch(I){Ot(g,g.return,I)}else{var D=ao(g.type,f.memoizedProps);f=f.memoizedState;try{u.componentDidUpdate(D,f,u.__reactInternalSnapshotBeforeUpdate)}catch(I){Ot(g,g.return,I)}}w&64&&PA(g),w&512&&Fu(g,g.return);break;case 3:if(Yi(u,g),w&64&&(u=g.updateQueue,u!==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{yC(u,f)}catch(I){Ot(g,g.return,I)}}break;case 27:f===null&&w&4&&LA(g);case 26:case 5:Yi(u,g),f===null&&w&4&&RA(g),w&512&&Fu(g,g.return);break;case 12:Yi(u,g);break;case 13:Yi(u,g),w&4&&HA(u,g),w&64&&(u=g.memoizedState,u!==null&&(u=u.dehydrated,u!==null&&(g=wB.bind(null,g),FB(u,g))));break;case 22:if(w=g.memoizedState!==null||Gs,!w){f=f!==null&&f.memoizedState!==null||dr,D=Gs;var P=dr;Gs=w,(dr=f)&&!P?Ui(u,g,(g.subtreeFlags&8772)!==0):Yi(u,g),Gs=D,dr=P}break;case 30:break;default:Yi(u,g)}}function FA(u){var f=u.alternate;f!==null&&(u.alternate=null,FA(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&cu(f)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}var Xt=null,Sa=!1;function Ks(u,f,g){for(g=g.child;g!==null;)BA(u,f,g),g=g.sibling}function BA(u,f,g){if(da&&typeof da.onCommitFiberUnmount=="function")try{da.onCommitFiberUnmount(zl,g)}catch{}switch(g.tag){case 26:dr||ps(g,f),Ks(u,f,g),g.memoizedState?g.memoizedState.count--:g.stateNode&&(g=g.stateNode,g.parentNode.removeChild(g));break;case 27:dr||ps(g,f);var w=Xt,D=Sa;Ki(g.type)&&(Xt=g.stateNode,Sa=!1),Ks(u,f,g),qu(g.stateNode),Xt=w,Sa=D;break;case 5:dr||ps(g,f);case 6:if(w=Xt,D=Sa,Xt=null,Ks(u,f,g),Xt=w,Sa=D,Xt!==null)if(Sa)try{(Xt.nodeType===9?Xt.body:Xt.nodeName==="HTML"?Xt.ownerDocument.body:Xt).removeChild(g.stateNode)}catch(P){Ot(g,f,P)}else try{Xt.removeChild(g.stateNode)}catch(P){Ot(g,f,P)}break;case 18:Xt!==null&&(Sa?(u=Xt,Dk(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,g.stateNode),rh(u)):Dk(Xt,g.stateNode));break;case 4:w=Xt,D=Sa,Xt=g.stateNode.containerInfo,Sa=!0,Ks(u,f,g),Xt=w,Sa=D;break;case 0:case 11:case 14:case 15:dr||$i(2,g,f),dr||$i(4,g,f),Ks(u,f,g);break;case 1:dr||(ps(g,f),w=g.stateNode,typeof w.componentWillUnmount=="function"&&OA(g,f,w)),Ks(u,f,g);break;case 21:Ks(u,f,g);break;case 22:dr=(w=dr)||g.memoizedState!==null,Ks(u,f,g),dr=w;break;default:Ks(u,f,g)}}function HA(u,f){if(f.memoizedState===null&&(u=f.alternate,u!==null&&(u=u.memoizedState,u!==null&&(u=u.dehydrated,u!==null))))try{rh(u)}catch(g){Ot(f,f.return,g)}}function fB(u){switch(u.tag){case 13:case 19:var f=u.stateNode;return f===null&&(f=u.stateNode=new zA),f;case 22:return u=u.stateNode,f=u._retryCache,f===null&&(f=u._retryCache=new zA),f;default:throw Error(a(435,u.tag))}}function ev(u,f){var g=fB(u);f.forEach(function(w){var D=jB.bind(null,u,w);g.has(w)||(g.add(w),w.then(D,D))})}function Wa(u,f){var g=f.deletions;if(g!==null)for(var w=0;w<g.length;w++){var D=g[w],P=u,I=f,$=I;e:for(;$!==null;){switch($.tag){case 27:if(Ki($.type)){Xt=$.stateNode,Sa=!1;break e}break;case 5:Xt=$.stateNode,Sa=!1;break e;case 3:case 4:Xt=$.stateNode.containerInfo,Sa=!0;break e}$=$.return}if(Xt===null)throw Error(a(160));BA(P,I,D),Xt=null,Sa=!1,P=D.alternate,P!==null&&(P.return=null),D.return=null}if(f.subtreeFlags&13878)for(f=f.child;f!==null;)$A(f,u),f=f.sibling}var Vn=null;function $A(u,f){var g=u.alternate,w=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:Wa(f,u),Xa(u),w&4&&($i(3,u,u.return),Iu(3,u),$i(5,u,u.return));break;case 1:Wa(f,u),Xa(u),w&512&&(dr||g===null||ps(g,g.return)),w&64&&Gs&&(u=u.updateQueue,u!==null&&(w=u.callbacks,w!==null&&(g=u.shared.hiddenCallbacks,u.shared.hiddenCallbacks=g===null?w:g.concat(w))));break;case 26:var D=Vn;if(Wa(f,u),Xa(u),w&512&&(dr||g===null||ps(g,g.return)),w&4){var P=g!==null?g.memoizedState:null;if(w=u.memoizedState,g===null)if(w===null)if(u.stateNode===null){e:{w=u.type,g=u.memoizedProps,D=D.ownerDocument||D;t:switch(w){case"title":P=D.getElementsByTagName("title")[0],(!P||P[Yl]||P[pr]||P.namespaceURI==="http://www.w3.org/2000/svg"||P.hasAttribute("itemprop"))&&(P=D.createElement(w),D.head.insertBefore(P,D.querySelector("head > title"))),Ur(P,w,g),P[pr]=u,er(P),w=P;break e;case"link":var I=Lk("link","href",D).get(w+(g.href||""));if(I){for(var $=0;$<I.length;$++)if(P=I[$],P.getAttribute("href")===(g.href==null||g.href===""?null:g.href)&&P.getAttribute("rel")===(g.rel==null?null:g.rel)&&P.getAttribute("title")===(g.title==null?null:g.title)&&P.getAttribute("crossorigin")===(g.crossOrigin==null?null:g.crossOrigin)){I.splice($,1);break t}}P=D.createElement(w),Ur(P,w,g),D.head.appendChild(P);break;case"meta":if(I=Lk("meta","content",D).get(w+(g.content||""))){for($=0;$<I.length;$++)if(P=I[$],P.getAttribute("content")===(g.content==null?null:""+g.content)&&P.getAttribute("name")===(g.name==null?null:g.name)&&P.getAttribute("property")===(g.property==null?null:g.property)&&P.getAttribute("http-equiv")===(g.httpEquiv==null?null:g.httpEquiv)&&P.getAttribute("charset")===(g.charSet==null?null:g.charSet)){I.splice($,1);break t}}P=D.createElement(w),Ur(P,w,g),D.head.appendChild(P);break;default:throw Error(a(468,w))}P[pr]=u,er(P),w=P}u.stateNode=w}else zk(D,u.type,u.stateNode);else u.stateNode=_k(D,w,u.memoizedProps);else P!==w?(P===null?g.stateNode!==null&&(g=g.stateNode,g.parentNode.removeChild(g)):P.count--,w===null?zk(D,u.type,u.stateNode):_k(D,w,u.memoizedProps)):w===null&&u.stateNode!==null&&Ky(u,u.memoizedProps,g.memoizedProps)}break;case 27:Wa(f,u),Xa(u),w&512&&(dr||g===null||ps(g,g.return)),g!==null&&w&4&&Ky(u,u.memoizedProps,g.memoizedProps);break;case 5:if(Wa(f,u),Xa(u),w&512&&(dr||g===null||ps(g,g.return)),u.flags&32){D=u.stateNode;try{mc(D,"")}catch(oe){Ot(u,u.return,oe)}}w&4&&u.stateNode!=null&&(D=u.memoizedProps,Ky(u,D,g!==null?g.memoizedProps:D)),w&1024&&(Jy=!0);break;case 6:if(Wa(f,u),Xa(u),w&4){if(u.stateNode===null)throw Error(a(162));w=u.memoizedProps,g=u.stateNode;try{g.nodeValue=w}catch(oe){Ot(u,u.return,oe)}}break;case 3:if(Dm=null,D=Vn,Vn=Am(f.containerInfo),Wa(f,u),Vn=D,Xa(u),w&4&&g!==null&&g.memoizedState.isDehydrated)try{rh(f.containerInfo)}catch(oe){Ot(u,u.return,oe)}Jy&&(Jy=!1,YA(u));break;case 4:w=Vn,Vn=Am(u.stateNode.containerInfo),Wa(f,u),Xa(u),Vn=w;break;case 12:Wa(f,u),Xa(u);break;case 13:Wa(f,u),Xa(u),u.child.flags&8192&&u.memoizedState!==null!=(g!==null&&g.memoizedState!==null)&&(iv=bt()),w&4&&(w=u.updateQueue,w!==null&&(u.updateQueue=null,ev(u,w)));break;case 22:D=u.memoizedState!==null;var q=g!==null&&g.memoizedState!==null,ie=Gs,fe=dr;if(Gs=ie||D,dr=fe||q,Wa(f,u),dr=fe,Gs=ie,Xa(u),w&8192)e:for(f=u.stateNode,f._visibility=D?f._visibility&-2:f._visibility|1,D&&(g===null||q||Gs||dr||no(u)),g=null,f=u;;){if(f.tag===5||f.tag===26){if(g===null){q=g=f;try{if(P=q.stateNode,D)I=P.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{$=q.stateNode;var xe=q.memoizedProps.style,le=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;$.style.display=le==null||typeof le=="boolean"?"":(""+le).trim()}}catch(oe){Ot(q,q.return,oe)}}}else if(f.tag===6){if(g===null){q=f;try{q.stateNode.nodeValue=D?"":q.memoizedProps}catch(oe){Ot(q,q.return,oe)}}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===u)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break e;for(;f.sibling===null;){if(f.return===null||f.return===u)break e;g===f&&(g=null),f=f.return}g===f&&(g=null),f.sibling.return=f.return,f=f.sibling}w&4&&(w=u.updateQueue,w!==null&&(g=w.retryQueue,g!==null&&(w.retryQueue=null,ev(u,g))));break;case 19:Wa(f,u),Xa(u),w&4&&(w=u.updateQueue,w!==null&&(u.updateQueue=null,ev(u,w)));break;case 30:break;case 21:break;default:Wa(f,u),Xa(u)}}function Xa(u){var f=u.flags;if(f&2){try{for(var g,w=u.return;w!==null;){if(_A(w)){g=w;break}w=w.return}if(g==null)throw Error(a(160));switch(g.tag){case 27:var D=g.stateNode,P=Zy(u);fm(u,P,D);break;case 5:var I=g.stateNode;g.flags&32&&(mc(I,""),g.flags&=-33);var $=Zy(u);fm(u,$,I);break;case 3:case 4:var q=g.stateNode.containerInfo,ie=Zy(u);Qy(u,ie,q);break;default:throw Error(a(161))}}catch(fe){Ot(u,u.return,fe)}u.flags&=-3}f&4096&&(u.flags&=-4097)}function YA(u){if(u.subtreeFlags&1024)for(u=u.child;u!==null;){var f=u;YA(f),f.tag===5&&f.flags&1024&&f.stateNode.reset(),u=u.sibling}}function Yi(u,f){if(f.subtreeFlags&8772)for(f=f.child;f!==null;)IA(u,f.alternate,f),f=f.sibling}function no(u){for(u=u.child;u!==null;){var f=u;switch(f.tag){case 0:case 11:case 14:case 15:$i(4,f,f.return),no(f);break;case 1:ps(f,f.return);var g=f.stateNode;typeof g.componentWillUnmount=="function"&&OA(f,f.return,g),no(f);break;case 27:qu(f.stateNode);case 26:case 5:ps(f,f.return),no(f);break;case 22:f.memoizedState===null&&no(f);break;case 30:no(f);break;default:no(f)}u=u.sibling}}function Ui(u,f,g){for(g=g&&(f.subtreeFlags&8772)!==0,f=f.child;f!==null;){var w=f.alternate,D=u,P=f,I=P.flags;switch(P.tag){case 0:case 11:case 15:Ui(D,P,g),Iu(4,P);break;case 1:if(Ui(D,P,g),w=P,D=w.stateNode,typeof D.componentDidMount=="function")try{D.componentDidMount()}catch(ie){Ot(w,w.return,ie)}if(w=P,D=w.updateQueue,D!==null){var $=w.stateNode;try{var q=D.shared.hiddenCallbacks;if(q!==null)for(D.shared.hiddenCallbacks=null,D=0;D<q.length;D++)bC(q[D],$)}catch(ie){Ot(w,w.return,ie)}}g&&I&64&&PA(P),Fu(P,P.return);break;case 27:LA(P);case 26:case 5:Ui(D,P,g),g&&w===null&&I&4&&RA(P),Fu(P,P.return);break;case 12:Ui(D,P,g);break;case 13:Ui(D,P,g),g&&I&4&&HA(D,P);break;case 22:P.memoizedState===null&&Ui(D,P,g),Fu(P,P.return);break;case 30:break;default:Ui(D,P,g)}f=f.sibling}}function tv(u,f){var g=null;u!==null&&u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(g=u.memoizedState.cachePool.pool),u=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(u=f.memoizedState.cachePool.pool),u!==g&&(u!=null&&u.refCount++,g!=null&&Su(g))}function rv(u,f){u=null,f.alternate!==null&&(u=f.alternate.memoizedState.cache),f=f.memoizedState.cache,f!==u&&(f.refCount++,u!=null&&Su(u))}function ms(u,f,g,w){if(f.subtreeFlags&10256)for(f=f.child;f!==null;)UA(u,f,g,w),f=f.sibling}function UA(u,f,g,w){var D=f.flags;switch(f.tag){case 0:case 11:case 15:ms(u,f,g,w),D&2048&&Iu(9,f);break;case 1:ms(u,f,g,w);break;case 3:ms(u,f,g,w),D&2048&&(u=null,f.alternate!==null&&(u=f.alternate.memoizedState.cache),f=f.memoizedState.cache,f!==u&&(f.refCount++,u!=null&&Su(u)));break;case 12:if(D&2048){ms(u,f,g,w),u=f.stateNode;try{var P=f.memoizedProps,I=P.id,$=P.onPostCommit;typeof $=="function"&&$(I,f.alternate===null?"mount":"update",u.passiveEffectDuration,-0)}catch(q){Ot(f,f.return,q)}}else ms(u,f,g,w);break;case 13:ms(u,f,g,w);break;case 23:break;case 22:P=f.stateNode,I=f.alternate,f.memoizedState!==null?P._visibility&2?ms(u,f,g,w):Bu(u,f):P._visibility&2?ms(u,f,g,w):(P._visibility|=2,Rc(u,f,g,w,(f.subtreeFlags&10256)!==0)),D&2048&&tv(I,f);break;case 24:ms(u,f,g,w),D&2048&&rv(f.alternate,f);break;default:ms(u,f,g,w)}}function Rc(u,f,g,w,D){for(D=D&&(f.subtreeFlags&10256)!==0,f=f.child;f!==null;){var P=u,I=f,$=g,q=w,ie=I.flags;switch(I.tag){case 0:case 11:case 15:Rc(P,I,$,q,D),Iu(8,I);break;case 23:break;case 22:var fe=I.stateNode;I.memoizedState!==null?fe._visibility&2?Rc(P,I,$,q,D):Bu(P,I):(fe._visibility|=2,Rc(P,I,$,q,D)),D&&ie&2048&&tv(I.alternate,I);break;case 24:Rc(P,I,$,q,D),D&&ie&2048&&rv(I.alternate,I);break;default:Rc(P,I,$,q,D)}f=f.sibling}}function Bu(u,f){if(f.subtreeFlags&10256)for(f=f.child;f!==null;){var g=u,w=f,D=w.flags;switch(w.tag){case 22:Bu(g,w),D&2048&&tv(w.alternate,w);break;case 24:Bu(g,w),D&2048&&rv(w.alternate,w);break;default:Bu(g,w)}f=f.sibling}}var Hu=8192;function _c(u){if(u.subtreeFlags&Hu)for(u=u.child;u!==null;)WA(u),u=u.sibling}function WA(u){switch(u.tag){case 26:_c(u),u.flags&Hu&&u.memoizedState!==null&&QB(Vn,u.memoizedState,u.memoizedProps);break;case 5:_c(u);break;case 3:case 4:var f=Vn;Vn=Am(u.stateNode.containerInfo),_c(u),Vn=f;break;case 22:u.memoizedState===null&&(f=u.alternate,f!==null&&f.memoizedState!==null?(f=Hu,Hu=16777216,_c(u),Hu=f):_c(u));break;default:_c(u)}}function XA(u){var f=u.alternate;if(f!==null&&(u=f.child,u!==null)){f.child=null;do f=u.sibling,u.sibling=null,u=f;while(u!==null)}}function $u(u){var f=u.deletions;if((u.flags&16)!==0){if(f!==null)for(var g=0;g<f.length;g++){var w=f[g];_r=w,qA(w,u)}XA(u)}if(u.subtreeFlags&10256)for(u=u.child;u!==null;)VA(u),u=u.sibling}function VA(u){switch(u.tag){case 0:case 11:case 15:$u(u),u.flags&2048&&$i(9,u,u.return);break;case 3:$u(u);break;case 12:$u(u);break;case 22:var f=u.stateNode;u.memoizedState!==null&&f._visibility&2&&(u.return===null||u.return.tag!==13)?(f._visibility&=-3,pm(u)):$u(u);break;default:$u(u)}}function pm(u){var f=u.deletions;if((u.flags&16)!==0){if(f!==null)for(var g=0;g<f.length;g++){var w=f[g];_r=w,qA(w,u)}XA(u)}for(u=u.child;u!==null;){switch(f=u,f.tag){case 0:case 11:case 15:$i(8,f,f.return),pm(f);break;case 22:g=f.stateNode,g._visibility&2&&(g._visibility&=-3,pm(f));break;default:pm(f)}u=u.sibling}}function qA(u,f){for(;_r!==null;){var g=_r;switch(g.tag){case 0:case 11:case 15:$i(8,g,f);break;case 23:case 22:if(g.memoizedState!==null&&g.memoizedState.cachePool!==null){var w=g.memoizedState.cachePool.pool;w!=null&&w.refCount++}break;case 24:Su(g.memoizedState.cache)}if(w=g.child,w!==null)w.return=g,_r=w;else e:for(g=u;_r!==null;){w=_r;var D=w.sibling,P=w.return;if(FA(w),w===g){_r=null;break e}if(D!==null){D.return=P,_r=D;break e}_r=P}}}var pB={getCacheForType:function(u){var f=aa(wr),g=f.data.get(u);return g===void 0&&(g=u(),f.data.set(u,g)),g}},mB=typeof WeakMap=="function"?WeakMap:Map,jt=0,It=null,rt=null,st=0,Nt=0,Va=null,Wi=!1,Lc=!1,av=!1,Zs=0,rr=0,Xi=0,so=0,nv=0,jn=0,zc=0,Yu=null,Ca=null,sv=!1,iv=0,mm=1/0,gm=null,Vi=null,Yr=0,qi=null,Ic=null,Fc=0,lv=0,ov=null,GA=null,Uu=0,cv=null;function qa(){if((jt&2)!==0&&st!==0)return st&-st;if(H.T!==null){var u=Ac;return u!==0?u:gv()}return Dp()}function KA(){jn===0&&(jn=(st&536870912)===0||ft?Hl():536870912);var u=wn.current;return u!==null&&(u.flags|=32),jn}function Ga(u,f,g){(u===It&&(Nt===2||Nt===9)||u.cancelPendingCommit!==null)&&(Bc(u,0),Gi(u,st,jn,!1)),zs(u,g),((jt&2)===0||u!==It)&&(u===It&&((jt&2)===0&&(so|=g),rr===4&&Gi(u,st,jn,!1)),gs(u))}function ZA(u,f,g){if((jt&6)!==0)throw Error(a(327));var w=!g&&(f&124)===0&&(f&u.expiredLanes)===0||Bl(u,f),D=w?bB(u,f):hv(u,f,!0),P=w;do{if(D===0){Lc&&!w&&Gi(u,f,0,!1);break}else{if(g=u.current.alternate,P&&!gB(g)){D=hv(u,f,!1),P=!1;continue}if(D===2){if(P=f,u.errorRecoveryDisabledLanes&P)var I=0;else I=u.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){f=I;e:{var $=u;D=Yu;var q=$.current.memoizedState.isDehydrated;if(q&&(Bc($,I).flags|=256),I=hv($,I,!1),I!==2){if(av&&!q){$.errorRecoveryDisabledLanes|=P,so|=P,D=4;break e}P=Ca,Ca=D,P!==null&&(Ca===null?Ca=P:Ca.push.apply(Ca,P))}D=I}if(P=!1,D!==2)continue}}if(D===1){Bc(u,0),Gi(u,f,0,!0);break}e:{switch(w=u,P=D,P){case 0:case 1:throw Error(a(345));case 4:if((f&4194048)!==f)break;case 6:Gi(w,f,jn,!Wi);break e;case 2:Ca=null;break;case 3:case 5:break;default:throw Error(a(329))}if((f&62914560)===f&&(D=iv+300-bt(),10<D)){if(Gi(w,f,jn,!Wi),ta(w,0,!0)!==0)break e;w.timeoutHandle=Ak(QA.bind(null,w,g,Ca,gm,sv,f,jn,so,zc,Wi,P,2,-0,0),D);break e}QA(w,g,Ca,gm,sv,f,jn,so,zc,Wi,P,0,-0,0)}}break}while(!0);gs(u)}function QA(u,f,g,w,D,P,I,$,q,ie,fe,xe,le,oe){if(u.timeoutHandle=-1,xe=f.subtreeFlags,(xe&8192||(xe&16785408)===16785408)&&(Zu={stylesheets:null,count:0,unsuspend:ZB},WA(f),xe=JB(),xe!==null)){u.cancelPendingCommit=xe(sk.bind(null,u,f,P,g,w,D,I,$,q,fe,1,le,oe)),Gi(u,P,I,!ie);return}sk(u,f,P,g,w,D,I,$,q)}function gB(u){for(var f=u;;){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 w=0;w<g.length;w++){var D=g[w],P=D.getSnapshot;D=D.value;try{if(!Ya(P(),D))return!1}catch{return!1}}if(g=f.child,f.subtreeFlags&16384&&g!==null)g.return=f,f=g;else{if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function Gi(u,f,g,w){f&=~nv,f&=~so,u.suspendedLanes|=f,u.pingedLanes&=~f,w&&(u.warmLanes|=f),w=u.expirationTimes;for(var D=f;0<D;){var P=31-Pr(D),I=1<<P;w[P]=-1,D&=~I}g!==0&&Ap(u,g,f)}function xm(){return(jt&6)===0?(Wu(0),!1):!0}function dv(){if(rt!==null){if(Nt===0)var u=rt.return;else u=rt,Ys=Jl=null,ky(u),Pc=null,_u=0,u=rt;for(;u!==null;)EA(u.alternate,u),u=u.return;rt=null}}function Bc(u,f){var g=u.timeoutHandle;g!==-1&&(u.timeoutHandle=-1,RB(g)),g=u.cancelPendingCommit,g!==null&&(u.cancelPendingCommit=null,g()),dv(),It=u,rt=g=Bs(u.current,null),st=f,Nt=0,Va=null,Wi=!1,Lc=Bl(u,f),av=!1,zc=jn=nv=so=Xi=rr=0,Ca=Yu=null,sv=!1,(f&8)!==0&&(f|=f&32);var w=u.entangledLanes;if(w!==0)for(u=u.entanglements,w&=f;0<w;){var D=31-Pr(w),P=1<<D;f|=u[D],w&=~P}return Zs=f,Fp(),g}function JA(u,f){et=null,H.H=nm,f===Au||f===qp?(f=gC(),Nt=3):f===fC?(f=gC(),Nt=4):Nt=f===xA?8:f!==null&&typeof f=="object"&&typeof f.then=="function"?6:1,Va=f,rt===null&&(rr=1,cm(u,xn(f,u.current)))}function ek(){var u=H.H;return H.H=nm,u===null?nm:u}function tk(){var u=H.A;return H.A=pB,u}function uv(){rr=4,Wi||(st&4194048)!==st&&wn.current!==null||(Lc=!0),(Xi&134217727)===0&&(so&134217727)===0||It===null||Gi(It,st,jn,!1)}function hv(u,f,g){var w=jt;jt|=2;var D=ek(),P=tk();(It!==u||st!==f)&&(gm=null,Bc(u,f)),f=!1;var I=rr;e:do try{if(Nt!==0&&rt!==null){var $=rt,q=Va;switch(Nt){case 8:dv(),I=6;break e;case 3:case 2:case 9:case 6:wn.current===null&&(f=!0);var ie=Nt;if(Nt=0,Va=null,Hc(u,$,q,ie),g&&Lc){I=0;break e}break;default:ie=Nt,Nt=0,Va=null,Hc(u,$,q,ie)}}xB(),I=rr;break}catch(fe){JA(u,fe)}while(!0);return f&&u.shellSuspendCounter++,Ys=Jl=null,jt=w,H.H=D,H.A=P,rt===null&&(It=null,st=0,Fp()),I}function xB(){for(;rt!==null;)rk(rt)}function bB(u,f){var g=jt;jt|=2;var w=ek(),D=tk();It!==u||st!==f?(gm=null,mm=bt()+500,Bc(u,f)):Lc=Bl(u,f);e:do try{if(Nt!==0&&rt!==null){f=rt;var P=Va;t:switch(Nt){case 1:Nt=0,Va=null,Hc(u,f,P,1);break;case 2:case 9:if(pC(P)){Nt=0,Va=null,ak(f);break}f=function(){Nt!==2&&Nt!==9||It!==u||(Nt=7),gs(u)},P.then(f,f);break e;case 3:Nt=7;break e;case 4:Nt=5;break e;case 7:pC(P)?(Nt=0,Va=null,ak(f)):(Nt=0,Va=null,Hc(u,f,P,7));break;case 5:var I=null;switch(rt.tag){case 26:I=rt.memoizedState;case 5:case 27:var $=rt;if(!I||Ik(I)){Nt=0,Va=null;var q=$.sibling;if(q!==null)rt=q;else{var ie=$.return;ie!==null?(rt=ie,bm(ie)):rt=null}break t}}Nt=0,Va=null,Hc(u,f,P,5);break;case 6:Nt=0,Va=null,Hc(u,f,P,6);break;case 8:dv(),rr=6;break e;default:throw Error(a(462))}}yB();break}catch(fe){JA(u,fe)}while(!0);return Ys=Jl=null,H.H=w,H.A=D,jt=g,rt!==null?0:(It=null,st=0,Fp(),rr)}function yB(){for(;rt!==null&&!xt();)rk(rt)}function rk(u){var f=TA(u.alternate,u,Zs);u.memoizedProps=u.pendingProps,f===null?bm(u):rt=f}function ak(u){var f=u,g=f.alternate;switch(f.tag){case 15:case 0:f=NA(g,f,f.pendingProps,f.type,void 0,st);break;case 11:f=NA(g,f,f.pendingProps,f.type.render,f.ref,st);break;case 5:ky(f);default:EA(g,f),f=rt=nC(f,Zs),f=TA(g,f,Zs)}u.memoizedProps=u.pendingProps,f===null?bm(u):rt=f}function Hc(u,f,g,w){Ys=Jl=null,ky(f),Pc=null,_u=0;var D=f.return;try{if(oB(u,D,f,g,st)){rr=1,cm(u,xn(g,u.current)),rt=null;return}}catch(P){if(D!==null)throw rt=D,P;rr=1,cm(u,xn(g,u.current)),rt=null;return}f.flags&32768?(ft||w===1?u=!0:Lc||(st&536870912)!==0?u=!1:(Wi=u=!0,(w===2||w===9||w===3||w===6)&&(w=wn.current,w!==null&&w.tag===13&&(w.flags|=16384))),nk(f,u)):bm(f)}function bm(u){var f=u;do{if((f.flags&32768)!==0){nk(f,Wi);return}u=f.return;var g=dB(f.alternate,f,Zs);if(g!==null){rt=g;return}if(f=f.sibling,f!==null){rt=f;return}rt=f=u}while(f!==null);rr===0&&(rr=5)}function nk(u,f){do{var g=uB(u.alternate,u);if(g!==null){g.flags&=32767,rt=g;return}if(g=u.return,g!==null&&(g.flags|=32768,g.subtreeFlags=0,g.deletions=null),!f&&(u=u.sibling,u!==null)){rt=u;return}rt=u=g}while(u!==null);rr=6,rt=null}function sk(u,f,g,w,D,P,I,$,q){u.cancelPendingCommit=null;do ym();while(Yr!==0);if((jt&6)!==0)throw Error(a(327));if(f!==null){if(f===u.current)throw Error(a(177));if(P=f.lanes|f.childLanes,P|=ry,Cp(u,g,P,I,$,q),u===It&&(rt=It=null,st=0),Ic=f,qi=u,Fc=g,lv=P,ov=D,GA=w,(f.subtreeFlags&10256)!==0||(f.flags&10256)!==0?(u.callbackNode=null,u.callbackPriority=0,NB(Ha,function(){return dk(),null})):(u.callbackNode=null,u.callbackPriority=0),w=(f.flags&13878)!==0,(f.subtreeFlags&13878)!==0||w){w=H.T,H.T=null,D=W.p,W.p=2,I=jt,jt|=4;try{hB(u,f,g)}finally{jt=I,W.p=D,H.T=w}}Yr=1,ik(),lk(),ok()}}function ik(){if(Yr===1){Yr=0;var u=qi,f=Ic,g=(f.flags&13878)!==0;if((f.subtreeFlags&13878)!==0||g){g=H.T,H.T=null;var w=W.p;W.p=2;var D=jt;jt|=4;try{$A(f,u);var P=Sv,I=q3(u.containerInfo),$=P.focusedElem,q=P.selectionRange;if(I!==$&&$&&$.ownerDocument&&V3($.ownerDocument.documentElement,$)){if(q!==null&&Zb($)){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,le=xe&&xe.defaultView||window;if(le.getSelection){var oe=le.getSelection(),$e=$.textContent.length,Be=Math.min(q.start,$e),Tt=q.end===void 0?Be:Math.min(q.end,$e);!oe.extend&&Be>Tt&&(I=Tt,Tt=Be,Be=I);var ae=X3($,Be),ee=X3($,Tt);if(ae&&ee&&(oe.rangeCount!==1||oe.anchorNode!==ae.node||oe.anchorOffset!==ae.offset||oe.focusNode!==ee.node||oe.focusOffset!==ee.offset)){var se=xe.createRange();se.setStart(ae.node,ae.offset),oe.removeAllRanges(),Be>Tt?(oe.addRange(se),oe.extend(ee.node,ee.offset)):(se.setEnd(ee.node,ee.offset),oe.addRange(se))}}}}for(xe=[],oe=$;oe=oe.parentNode;)oe.nodeType===1&&xe.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof $.focus=="function"&&$.focus(),$=0;$<xe.length;$++){var me=xe[$];me.element.scrollLeft=me.left,me.element.scrollTop=me.top}}Em=!!Nv,Sv=Nv=null}finally{jt=D,W.p=w,H.T=g}}u.current=f,Yr=2}}function lk(){if(Yr===2){Yr=0;var u=qi,f=Ic,g=(f.flags&8772)!==0;if((f.subtreeFlags&8772)!==0||g){g=H.T,H.T=null;var w=W.p;W.p=2;var D=jt;jt|=4;try{IA(u,f.alternate,f)}finally{jt=D,W.p=w,H.T=g}}Yr=3}}function ok(){if(Yr===4||Yr===3){Yr=0,Wt();var u=qi,f=Ic,g=Fc,w=GA;(f.subtreeFlags&10256)!==0||(f.flags&10256)!==0?Yr=5:(Yr=0,Ic=qi=null,ck(u,u.pendingLanes));var D=u.pendingLanes;if(D===0&&(Vi=null),ou(g),f=f.stateNode,da&&typeof da.onCommitFiberRoot=="function")try{da.onCommitFiberRoot(zl,f,void 0,(f.current.flags&128)===128)}catch{}if(w!==null){f=H.T,D=W.p,W.p=2,H.T=null;try{for(var P=u.onRecoverableError,I=0;I<w.length;I++){var $=w[I];P($.value,{componentStack:$.stack})}}finally{H.T=f,W.p=D}}(Fc&3)!==0&&ym(),gs(u),D=u.pendingLanes,(g&4194090)!==0&&(D&42)!==0?u===cv?Uu++:(Uu=0,cv=u):Uu=0,Wu(0)}}function ck(u,f){(u.pooledCacheLanes&=f)===0&&(f=u.pooledCache,f!=null&&(u.pooledCache=null,Su(f)))}function ym(u){return ik(),lk(),ok(),dk()}function dk(){if(Yr!==5)return!1;var u=qi,f=lv;lv=0;var g=ou(Fc),w=H.T,D=W.p;try{W.p=32>g?32:g,H.T=null,g=ov,ov=null;var P=qi,I=Fc;if(Yr=0,Ic=qi=null,Fc=0,(jt&6)!==0)throw Error(a(331));var $=jt;if(jt|=4,VA(P.current),UA(P,P.current,I,g),jt=$,Wu(0,!1),da&&typeof da.onPostCommitFiberRoot=="function")try{da.onPostCommitFiberRoot(zl,P)}catch{}return!0}finally{W.p=D,H.T=w,ck(u,f)}}function uk(u,f,g){f=xn(g,f),f=Hy(u.stateNode,f,2),u=Ii(u,f,2),u!==null&&(zs(u,2),gs(u))}function Ot(u,f,g){if(u.tag===3)uk(u,u,g);else for(;f!==null;){if(f.tag===3){uk(f,u,g);break}else if(f.tag===1){var w=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(Vi===null||!Vi.has(w))){u=xn(g,u),g=mA(2),w=Ii(f,g,2),w!==null&&(gA(g,w,f,u),zs(w,2),gs(w));break}}f=f.return}}function fv(u,f,g){var w=u.pingCache;if(w===null){w=u.pingCache=new mB;var D=new Set;w.set(f,D)}else D=w.get(f),D===void 0&&(D=new Set,w.set(f,D));D.has(g)||(av=!0,D.add(g),u=vB.bind(null,u,f,g),f.then(u,u))}function vB(u,f,g){var w=u.pingCache;w!==null&&w.delete(f),u.pingedLanes|=u.suspendedLanes&g,u.warmLanes&=~g,It===u&&(st&g)===g&&(rr===4||rr===3&&(st&62914560)===st&&300>bt()-iv?(jt&2)===0&&Bc(u,0):nv|=g,zc===st&&(zc=0)),gs(u)}function hk(u,f){f===0&&(f=Sp()),u=jc(u,f),u!==null&&(zs(u,f),gs(u))}function wB(u){var f=u.memoizedState,g=0;f!==null&&(g=f.retryLane),hk(u,g)}function jB(u,f){var g=0;switch(u.tag){case 13:var w=u.stateNode,D=u.memoizedState;D!==null&&(g=D.retryLane);break;case 19:w=u.stateNode;break;case 22:w=u.stateNode._retryCache;break;default:throw Error(a(314))}w!==null&&w.delete(f),hk(u,g)}function NB(u,f){return Ue(u,f)}var vm=null,$c=null,pv=!1,wm=!1,mv=!1,io=0;function gs(u){u!==$c&&u.next===null&&($c===null?vm=$c=u:$c=$c.next=u),wm=!0,pv||(pv=!0,CB())}function Wu(u,f){if(!mv&&wm){mv=!0;do for(var g=!1,w=vm;w!==null;){if(u!==0){var D=w.pendingLanes;if(D===0)var P=0;else{var I=w.suspendedLanes,$=w.pingedLanes;P=(1<<31-Pr(42|u)+1)-1,P&=D&~(I&~$),P=P&201326741?P&201326741|1:P?P|2:0}P!==0&&(g=!0,gk(w,P))}else P=st,P=ta(w,w===It?P:0,w.cancelPendingCommit!==null||w.timeoutHandle!==-1),(P&3)===0||Bl(w,P)||(g=!0,gk(w,P));w=w.next}while(g);mv=!1}}function SB(){fk()}function fk(){wm=pv=!1;var u=0;io!==0&&(OB()&&(u=io),io=0);for(var f=bt(),g=null,w=vm;w!==null;){var D=w.next,P=pk(w,f);P===0?(w.next=null,g===null?vm=D:g.next=D,D===null&&($c=g)):(g=w,(u!==0||(P&3)!==0)&&(wm=!0)),w=D}Wu(u)}function pk(u,f){for(var g=u.suspendedLanes,w=u.pingedLanes,D=u.expirationTimes,P=u.pendingLanes&-62914561;0<P;){var I=31-Pr(P),$=1<<I,q=D[I];q===-1?(($&g)===0||($&w)!==0)&&(D[I]=Tb($,f)):q<=f&&(u.expiredLanes|=$),P&=~$}if(f=It,g=st,g=ta(u,u===f?g:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),w=u.callbackNode,g===0||u===f&&(Nt===2||Nt===9)||u.cancelPendingCommit!==null)return w!==null&&w!==null&&_e(w),u.callbackNode=null,u.callbackPriority=0;if((g&3)===0||Bl(u,g)){if(f=g&-g,f===u.callbackPriority)return f;switch(w!==null&&_e(w),ou(g)){case 2:case 8:g=Ht;break;case 32:g=Ha;break;case 268435456:g=iu;break;default:g=Ha}return w=mk.bind(null,u),g=Ue(g,w),u.callbackPriority=f,u.callbackNode=g,f}return w!==null&&w!==null&&_e(w),u.callbackPriority=2,u.callbackNode=null,2}function mk(u,f){if(Yr!==0&&Yr!==5)return u.callbackNode=null,u.callbackPriority=0,null;var g=u.callbackNode;if(ym()&&u.callbackNode!==g)return null;var w=st;return w=ta(u,u===It?w:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),w===0?null:(ZA(u,w,f),pk(u,bt()),u.callbackNode!=null&&u.callbackNode===g?mk.bind(null,u):null)}function gk(u,f){if(ym())return null;ZA(u,f,!0)}function CB(){_B(function(){(jt&6)!==0?Ue(pn,SB):fk()})}function gv(){return io===0&&(io=Hl()),io}function xk(u){return u==null||typeof u=="symbol"||typeof u=="boolean"?null:typeof u=="function"?u:Pp(""+u)}function bk(u,f){var g=f.ownerDocument.createElement("input");return g.name=f.name,g.value=f.value,u.id&&g.setAttribute("form",u.id),f.parentNode.insertBefore(g,f),u=new FormData(u),g.parentNode.removeChild(g),u}function AB(u,f,g,w,D){if(f==="submit"&&g&&g.stateNode===D){var P=xk((D[Or]||null).action),I=w.submitter;I&&(f=(f=I[Or]||null)?xk(f.formAction):I.getAttribute("formAction"),f!==null&&(P=f,I=null));var $=new Lp("action","action",null,w,D);u.push({event:$,listeners:[{instance:null,listener:function(){if(w.defaultPrevented){if(io!==0){var q=I?bk(D,I):new FormData(D);Ly(g,{pending:!0,data:q,method:D.method,action:P},null,q)}}else typeof P=="function"&&($.preventDefault(),q=I?bk(D,I):new FormData(D),Ly(g,{pending:!0,data:q,method:D.method,action:P},P,q))},currentTarget:D}]})}}for(var xv=0;xv<ty.length;xv++){var bv=ty[xv],kB=bv.toLowerCase(),DB=bv[0].toUpperCase()+bv.slice(1);Xn(kB,"on"+DB)}Xn(Z3,"onAnimationEnd"),Xn(Q3,"onAnimationIteration"),Xn(J3,"onAnimationStart"),Xn("dblclick","onDoubleClick"),Xn("focusin","onFocus"),Xn("focusout","onBlur"),Xn(WF,"onTransitionRun"),Xn(XF,"onTransitionStart"),Xn(VF,"onTransitionCancel"),Xn(eC,"onTransitionEnd"),Pe("onMouseEnter",["mouseout","mouseover"]),Pe("onMouseLeave",["mouseout","mouseover"]),Pe("onPointerEnter",["pointerout","pointerover"]),Pe("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 Xu="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(" "),TB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xu));function yk(u,f){f=(f&4)!==0;for(var g=0;g<u.length;g++){var w=u[g],D=w.event;w=w.listeners;e:{var P=void 0;if(f)for(var I=w.length-1;0<=I;I--){var $=w[I],q=$.instance,ie=$.currentTarget;if($=$.listener,q!==P&&D.isPropagationStopped())break e;P=$,D.currentTarget=ie;try{P(D)}catch(fe){om(fe)}D.currentTarget=null,P=q}else for(I=0;I<w.length;I++){if($=w[I],q=$.instance,ie=$.currentTarget,$=$.listener,q!==P&&D.isPropagationStopped())break e;P=$,D.currentTarget=ie;try{P(D)}catch(fe){om(fe)}D.currentTarget=null,P=q}}}}function at(u,f){var g=f[hc];g===void 0&&(g=f[hc]=new Set);var w=u+"__bubble";g.has(w)||(vk(f,u,2,!1),g.add(w))}function yv(u,f,g){var w=0;f&&(w|=4),vk(g,u,w,f)}var jm="_reactListening"+Math.random().toString(36).slice(2);function vv(u){if(!u[jm]){u[jm]=!0,us.forEach(function(g){g!=="selectionchange"&&(TB.has(g)||yv(g,!1,u),yv(g,!0,u))});var f=u.nodeType===9?u:u.ownerDocument;f===null||f[jm]||(f[jm]=!0,yv("selectionchange",!1,f))}}function vk(u,f,g,w){switch(Uk(f)){case 2:var D=rH;break;case 8:D=aH;break;default:D=Rv}g=D.bind(null,f,g,u),D=void 0,!$b||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(D=!0),w?D!==void 0?u.addEventListener(f,g,{capture:!0,passive:D}):u.addEventListener(f,g,!0):D!==void 0?u.addEventListener(f,g,{passive:D}):u.addEventListener(f,g,!1)}function wv(u,f,g,w,D){var P=w;if((f&1)===0&&(f&2)===0&&w!==null)e:for(;;){if(w===null)return;var I=w.tag;if(I===3||I===4){var $=w.stateNode.containerInfo;if($===D)break;if(I===4)for(I=w.return;I!==null;){var q=I.tag;if((q===3||q===4)&&I.stateNode.containerInfo===D)return;I=I.return}for(;$!==null;){if(I=Ei($),I===null)return;if(q=I.tag,q===5||q===6||q===26||q===27){w=P=I;continue e}$=$.parentNode}}w=w.return}k3(function(){var ie=P,fe=Bb(g),xe=[];e:{var le=tC.get(u);if(le!==void 0){var oe=Lp,$e=u;switch(u){case"keypress":if(Rp(g)===0)break e;case"keydown":case"keyup":oe=NF;break;case"focusin":$e="focus",oe=Xb;break;case"focusout":$e="blur",oe=Xb;break;case"beforeblur":case"afterblur":oe=Xb;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":oe=M3;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=uF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=AF;break;case Z3:case Q3:case J3:oe=pF;break;case eC:oe=DF;break;case"scroll":case"scrollend":oe=cF;break;case"wheel":oe=MF;break;case"copy":case"cut":case"paste":oe=gF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=P3;break;case"toggle":case"beforetoggle":oe=PF}var Be=(f&4)!==0,Tt=!Be&&(u==="scroll"||u==="scrollend"),ae=Be?le!==null?le+"Capture":null:le;Be=[];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||ae===null||(me=uu(ee,ae),me!=null&&Be.push(Vu(ee,me,se))),Tt)break;ee=ee.return}0<Be.length&&(le=new oe(le,$e,null,g,fe),xe.push({event:le,listeners:Be}))}}if((f&7)===0){e:{if(le=u==="mouseover"||u==="pointerover",oe=u==="mouseout"||u==="pointerout",le&&g!==Fb&&($e=g.relatedTarget||g.fromElement)&&(Ei($e)||$e[$a]))break e;if((oe||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,oe?($e=g.relatedTarget||g.toElement,oe=ie,$e=$e?Ei($e):null,$e!==null&&(Tt=i($e),Be=$e.tag,$e!==Tt||Be!==5&&Be!==27&&Be!==6)&&($e=null)):(oe=null,$e=ie),oe!==$e)){if(Be=M3,me="onMouseLeave",ae="onMouseEnter",ee="mouse",(u==="pointerout"||u==="pointerover")&&(Be=P3,me="onPointerLeave",ae="onPointerEnter",ee="pointer"),Tt=oe==null?le:Is(oe),se=$e==null?le:Is($e),le=new Be(me,ee+"leave",oe,g,fe),le.target=Tt,le.relatedTarget=se,me=null,Ei(fe)===ie&&(Be=new Be(ae,ee+"enter",$e,g,fe),Be.target=se,Be.relatedTarget=Tt,me=Be),Tt=me,oe&&$e)t:{for(Be=oe,ae=$e,ee=0,se=Be;se;se=Yc(se))ee++;for(se=0,me=ae;me;me=Yc(me))se++;for(;0<ee-se;)Be=Yc(Be),ee--;for(;0<se-ee;)ae=Yc(ae),se--;for(;ee--;){if(Be===ae||ae!==null&&Be===ae.alternate)break t;Be=Yc(Be),ae=Yc(ae)}Be=null}else Be=null;oe!==null&&wk(xe,le,oe,Be,!1),$e!==null&&Tt!==null&&wk(xe,Tt,$e,Be,!0)}}e:{if(le=ie?Is(ie):window,oe=le.nodeName&&le.nodeName.toLowerCase(),oe==="select"||oe==="input"&&le.type==="file")var Ee=B3;else if(I3(le))if(H3)Ee=$F;else{Ee=BF;var tt=FF}else oe=le.nodeName,!oe||oe.toLowerCase()!=="input"||le.type!=="checkbox"&&le.type!=="radio"?ie&&Ib(ie.elementType)&&(Ee=B3):Ee=HF;if(Ee&&(Ee=Ee(u,ie))){F3(xe,Ee,g,fe);break e}tt&&tt(u,le,ie),u==="focusout"&&ie&&le.type==="number"&&ie.memoizedProps.value!=null&&zb(le,"number",le.value)}switch(tt=ie?Is(ie):window,u){case"focusin":(I3(tt)||tt.contentEditable==="true")&&(yc=tt,Qb=ie,yu=null);break;case"focusout":yu=Qb=yc=null;break;case"mousedown":Jb=!0;break;case"contextmenu":case"mouseup":case"dragend":Jb=!1,G3(xe,g,fe);break;case"selectionchange":if(UF)break;case"keydown":case"keyup":G3(xe,g,fe)}var Le;if(qb)e:{switch(u){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else bc?L3(u,g)&&(He="onCompositionEnd"):u==="keydown"&&g.keyCode===229&&(He="onCompositionStart");He&&(O3&&g.locale!=="ko"&&(bc||He!=="onCompositionStart"?He==="onCompositionEnd"&&bc&&(Le=D3()):(Ri=fe,Yb="value"in Ri?Ri.value:Ri.textContent,bc=!0)),tt=Nm(ie,He),0<tt.length&&(He=new E3(He,u,null,g,fe),xe.push({event:He,listeners:tt}),Le?He.data=Le:(Le=z3(g),Le!==null&&(He.data=Le)))),(Le=RF?_F(u,g):LF(u,g))&&(He=Nm(ie,"onBeforeInput"),0<He.length&&(tt=new E3("onBeforeInput","beforeinput",null,g,fe),xe.push({event:tt,listeners:He}),tt.data=Le)),AB(xe,u,ie,g,fe)}yk(xe,f)})}function Vu(u,f,g){return{instance:u,listener:f,currentTarget:g}}function Nm(u,f){for(var g=f+"Capture",w=[];u!==null;){var D=u,P=D.stateNode;if(D=D.tag,D!==5&&D!==26&&D!==27||P===null||(D=uu(u,g),D!=null&&w.unshift(Vu(u,D,P)),D=uu(u,f),D!=null&&w.push(Vu(u,D,P))),u.tag===3)return w;u=u.return}return[]}function Yc(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5&&u.tag!==27);return u||null}function wk(u,f,g,w,D){for(var P=f._reactName,I=[];g!==null&&g!==w;){var $=g,q=$.alternate,ie=$.stateNode;if($=$.tag,q!==null&&q===w)break;$!==5&&$!==26&&$!==27||ie===null||(q=ie,D?(ie=uu(g,P),ie!=null&&I.unshift(Vu(g,ie,q))):D||(ie=uu(g,P),ie!=null&&I.push(Vu(g,ie,q)))),g=g.return}I.length!==0&&u.push({event:f,listeners:I})}var MB=/\r\n?/g,EB=/\u0000|\uFFFD/g;function jk(u){return(typeof u=="string"?u:""+u).replace(MB,`
`).replace(EB,"")}function Nk(u,f){return f=jk(f),jk(u)===f}function Sm(){}function Dt(u,f,g,w,D,P){switch(g){case"children":typeof w=="string"?f==="body"||f==="textarea"&&w===""||mc(u,w):(typeof w=="number"||typeof w=="bigint")&&f!=="body"&&mc(u,""+w);break;case"className":Oi(u,"class",w);break;case"tabIndex":Oi(u,"tabindex",w);break;case"dir":case"role":case"viewBox":case"width":case"height":Oi(u,g,w);break;case"style":C3(u,w,P);break;case"data":if(f!=="object"){Oi(u,"data",w);break}case"src":case"href":if(w===""&&(f!=="a"||g!=="href")){u.removeAttribute(g);break}if(w==null||typeof w=="function"||typeof w=="symbol"||typeof w=="boolean"){u.removeAttribute(g);break}w=Pp(""+w),u.setAttribute(g,w);break;case"action":case"formAction":if(typeof w=="function"){u.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 P=="function"&&(g==="formAction"?(f!=="input"&&Dt(u,f,"name",D.name,D,null),Dt(u,f,"formEncType",D.formEncType,D,null),Dt(u,f,"formMethod",D.formMethod,D,null),Dt(u,f,"formTarget",D.formTarget,D,null)):(Dt(u,f,"encType",D.encType,D,null),Dt(u,f,"method",D.method,D,null),Dt(u,f,"target",D.target,D,null)));if(w==null||typeof w=="symbol"||typeof w=="boolean"){u.removeAttribute(g);break}w=Pp(""+w),u.setAttribute(g,w);break;case"onClick":w!=null&&(u.onclick=Sm);break;case"onScroll":w!=null&&at("scroll",u);break;case"onScrollEnd":w!=null&&at("scrollend",u);break;case"dangerouslySetInnerHTML":if(w!=null){if(typeof w!="object"||!("__html"in w))throw Error(a(61));if(g=w.__html,g!=null){if(D.children!=null)throw Error(a(60));u.innerHTML=g}}break;case"multiple":u.multiple=w&&typeof w!="function"&&typeof w!="symbol";break;case"muted":u.muted=w&&typeof w!="function"&&typeof w!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(w==null||typeof w=="function"||typeof w=="boolean"||typeof w=="symbol"){u.removeAttribute("xlink:href");break}g=Pp(""+w),u.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":w!=null&&typeof w!="function"&&typeof w!="symbol"?u.setAttribute(g,""+w):u.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":w&&typeof w!="function"&&typeof w!="symbol"?u.setAttribute(g,""):u.removeAttribute(g);break;case"capture":case"download":w===!0?u.setAttribute(g,""):w!==!1&&w!=null&&typeof w!="function"&&typeof w!="symbol"?u.setAttribute(g,w):u.removeAttribute(g);break;case"cols":case"rows":case"size":case"span":w!=null&&typeof w!="function"&&typeof w!="symbol"&&!isNaN(w)&&1<=w?u.setAttribute(g,w):u.removeAttribute(g);break;case"rowSpan":case"start":w==null||typeof w=="function"||typeof w=="symbol"||isNaN(w)?u.removeAttribute(g):u.setAttribute(g,w);break;case"popover":at("beforetoggle",u),at("toggle",u),Pi(u,"popover",w);break;case"xlinkActuate":ra(u,"http://www.w3.org/1999/xlink","xlink:actuate",w);break;case"xlinkArcrole":ra(u,"http://www.w3.org/1999/xlink","xlink:arcrole",w);break;case"xlinkRole":ra(u,"http://www.w3.org/1999/xlink","xlink:role",w);break;case"xlinkShow":ra(u,"http://www.w3.org/1999/xlink","xlink:show",w);break;case"xlinkTitle":ra(u,"http://www.w3.org/1999/xlink","xlink:title",w);break;case"xlinkType":ra(u,"http://www.w3.org/1999/xlink","xlink:type",w);break;case"xmlBase":ra(u,"http://www.w3.org/XML/1998/namespace","xml:base",w);break;case"xmlLang":ra(u,"http://www.w3.org/XML/1998/namespace","xml:lang",w);break;case"xmlSpace":ra(u,"http://www.w3.org/XML/1998/namespace","xml:space",w);break;case"is":Pi(u,"is",w);break;case"innerText":case"textContent":break;default:(!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(g=lF.get(g)||g,Pi(u,g,w))}}function jv(u,f,g,w,D,P){switch(g){case"style":C3(u,w,P);break;case"dangerouslySetInnerHTML":if(w!=null){if(typeof w!="object"||!("__html"in w))throw Error(a(61));if(g=w.__html,g!=null){if(D.children!=null)throw Error(a(60));u.innerHTML=g}}break;case"children":typeof w=="string"?mc(u,w):(typeof w=="number"||typeof w=="bigint")&&mc(u,""+w);break;case"onScroll":w!=null&&at("scroll",u);break;case"onScrollEnd":w!=null&&at("scrollend",u);break;case"onClick":w!=null&&(u.onclick=Sm);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!du.hasOwnProperty(g))e:{if(g[0]==="o"&&g[1]==="n"&&(D=g.endsWith("Capture"),f=g.slice(2,D?g.length-7:void 0),P=u[Or]||null,P=P!=null?P[g]:null,typeof P=="function"&&u.removeEventListener(f,P,D),typeof w=="function")){typeof P!="function"&&P!==null&&(g in u?u[g]=null:u.hasAttribute(g)&&u.removeAttribute(g)),u.addEventListener(f,w,D);break e}g in u?u[g]=w:w===!0?u.setAttribute(g,""):Pi(u,g,w)}}}function Ur(u,f,g){switch(f){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":at("error",u),at("load",u);var w=!1,D=!1,P;for(P in g)if(g.hasOwnProperty(P)){var I=g[P];if(I!=null)switch(P){case"src":w=!0;break;case"srcSet":D=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,f));default:Dt(u,f,P,I,g,null)}}D&&Dt(u,f,"srcSet",g.srcSet,g,null),w&&Dt(u,f,"src",g.src,g,null);return;case"input":at("invalid",u);var $=P=I=D=null,q=null,ie=null;for(w in g)if(g.hasOwnProperty(w)){var fe=g[w];if(fe!=null)switch(w){case"name":D=fe;break;case"type":I=fe;break;case"checked":q=fe;break;case"defaultChecked":ie=fe;break;case"value":P=fe;break;case"defaultValue":$=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(a(137,f));break;default:Dt(u,f,w,fe,g,null)}}w3(u,P,$,q,ie,I,D,!1),Mp(u);return;case"select":at("invalid",u),w=I=P=null;for(D in g)if(g.hasOwnProperty(D)&&($=g[D],$!=null))switch(D){case"value":P=$;break;case"defaultValue":I=$;break;case"multiple":w=$;default:Dt(u,f,D,$,g,null)}f=P,g=I,u.multiple=!!w,f!=null?pc(u,!!w,f,!1):g!=null&&pc(u,!!w,g,!0);return;case"textarea":at("invalid",u),P=D=w=null;for(I in g)if(g.hasOwnProperty(I)&&($=g[I],$!=null))switch(I){case"value":w=$;break;case"defaultValue":D=$;break;case"children":P=$;break;case"dangerouslySetInnerHTML":if($!=null)throw Error(a(91));break;default:Dt(u,f,I,$,g,null)}N3(u,w,D,P),Mp(u);return;case"option":for(q in g)if(g.hasOwnProperty(q)&&(w=g[q],w!=null))switch(q){case"selected":u.selected=w&&typeof w!="function"&&typeof w!="symbol";break;default:Dt(u,f,q,w,g,null)}return;case"dialog":at("beforetoggle",u),at("toggle",u),at("cancel",u),at("close",u);break;case"iframe":case"object":at("load",u);break;case"video":case"audio":for(w=0;w<Xu.length;w++)at(Xu[w],u);break;case"image":at("error",u),at("load",u);break;case"details":at("toggle",u);break;case"embed":case"source":case"link":at("error",u),at("load",u);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)&&(w=g[ie],w!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,f));default:Dt(u,f,ie,w,g,null)}return;default:if(Ib(f)){for(fe in g)g.hasOwnProperty(fe)&&(w=g[fe],w!==void 0&&jv(u,f,fe,w,g,void 0));return}}for($ in g)g.hasOwnProperty($)&&(w=g[$],w!=null&&Dt(u,f,$,w,g,null))}function PB(u,f,g,w){switch(f){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var D=null,P=null,I=null,$=null,q=null,ie=null,fe=null;for(oe in g){var xe=g[oe];if(g.hasOwnProperty(oe)&&xe!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":q=xe;default:w.hasOwnProperty(oe)||Dt(u,f,oe,null,w,xe)}}for(var le in w){var oe=w[le];if(xe=g[le],w.hasOwnProperty(le)&&(oe!=null||xe!=null))switch(le){case"type":P=oe;break;case"name":D=oe;break;case"checked":ie=oe;break;case"defaultChecked":fe=oe;break;case"value":I=oe;break;case"defaultValue":$=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,f));break;default:oe!==xe&&Dt(u,f,le,oe,w,xe)}}Lb(u,I,$,q,ie,fe,P,D);return;case"select":oe=I=$=le=null;for(P in g)if(q=g[P],g.hasOwnProperty(P)&&q!=null)switch(P){case"value":break;case"multiple":oe=q;default:w.hasOwnProperty(P)||Dt(u,f,P,null,w,q)}for(D in w)if(P=w[D],q=g[D],w.hasOwnProperty(D)&&(P!=null||q!=null))switch(D){case"value":le=P;break;case"defaultValue":$=P;break;case"multiple":I=P;default:P!==q&&Dt(u,f,D,P,w,q)}f=$,g=I,w=oe,le!=null?pc(u,!!g,le,!1):!!w!=!!g&&(f!=null?pc(u,!!g,f,!0):pc(u,!!g,g?[]:"",!1));return;case"textarea":oe=le=null;for($ in g)if(D=g[$],g.hasOwnProperty($)&&D!=null&&!w.hasOwnProperty($))switch($){case"value":break;case"children":break;default:Dt(u,f,$,null,w,D)}for(I in w)if(D=w[I],P=g[I],w.hasOwnProperty(I)&&(D!=null||P!=null))switch(I){case"value":le=D;break;case"defaultValue":oe=D;break;case"children":break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(a(91));break;default:D!==P&&Dt(u,f,I,D,w,P)}j3(u,le,oe);return;case"option":for(var $e in g)if(le=g[$e],g.hasOwnProperty($e)&&le!=null&&!w.hasOwnProperty($e))switch($e){case"selected":u.selected=!1;break;default:Dt(u,f,$e,null,w,le)}for(q in w)if(le=w[q],oe=g[q],w.hasOwnProperty(q)&&le!==oe&&(le!=null||oe!=null))switch(q){case"selected":u.selected=le&&typeof le!="function"&&typeof le!="symbol";break;default:Dt(u,f,q,le,w,oe)}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 Be in g)le=g[Be],g.hasOwnProperty(Be)&&le!=null&&!w.hasOwnProperty(Be)&&Dt(u,f,Be,null,w,le);for(ie in w)if(le=w[ie],oe=g[ie],w.hasOwnProperty(ie)&&le!==oe&&(le!=null||oe!=null))switch(ie){case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(a(137,f));break;default:Dt(u,f,ie,le,w,oe)}return;default:if(Ib(f)){for(var Tt in g)le=g[Tt],g.hasOwnProperty(Tt)&&le!==void 0&&!w.hasOwnProperty(Tt)&&jv(u,f,Tt,void 0,w,le);for(fe in w)le=w[fe],oe=g[fe],!w.hasOwnProperty(fe)||le===oe||le===void 0&&oe===void 0||jv(u,f,fe,le,w,oe);return}}for(var ae in g)le=g[ae],g.hasOwnProperty(ae)&&le!=null&&!w.hasOwnProperty(ae)&&Dt(u,f,ae,null,w,le);for(xe in w)le=w[xe],oe=g[xe],!w.hasOwnProperty(xe)||le===oe||le==null&&oe==null||Dt(u,f,xe,le,w,oe)}var Nv=null,Sv=null;function Cm(u){return u.nodeType===9?u:u.ownerDocument}function Sk(u){switch(u){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Ck(u,f){if(u===0)switch(f){case"svg":return 1;case"math":return 2;default:return 0}return u===1&&f==="foreignObject"?0:u}function Cv(u,f){return u==="textarea"||u==="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 Av=null;function OB(){var u=window.event;return u&&u.type==="popstate"?u===Av?!1:(Av=u,!0):(Av=null,!1)}var Ak=typeof setTimeout=="function"?setTimeout:void 0,RB=typeof clearTimeout=="function"?clearTimeout:void 0,kk=typeof Promise=="function"?Promise:void 0,_B=typeof queueMicrotask=="function"?queueMicrotask:typeof kk<"u"?function(u){return kk.resolve(null).then(u).catch(LB)}:Ak;function LB(u){setTimeout(function(){throw u})}function Ki(u){return u==="head"}function Dk(u,f){var g=f,w=0,D=0;do{var P=g.nextSibling;if(u.removeChild(g),P&&P.nodeType===8)if(g=P.data,g==="/$"){if(0<w&&8>w){g=w;var I=u.ownerDocument;if(g&1&&qu(I.documentElement),g&2&&qu(I.body),g&4)for(g=I.head,qu(g),I=g.firstChild;I;){var $=I.nextSibling,q=I.nodeName;I[Yl]||q==="SCRIPT"||q==="STYLE"||q==="LINK"&&I.rel.toLowerCase()==="stylesheet"||g.removeChild(I),I=$}}if(D===0){u.removeChild(P),rh(f);return}D--}else g==="$"||g==="$?"||g==="$!"?D++:w=g.charCodeAt(0)-48;else w=0;g=P}while(g);rh(f)}function kv(u){var f=u.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":kv(g),cu(g);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(g.rel.toLowerCase()==="stylesheet")continue}u.removeChild(g)}}function zB(u,f,g,w){for(;u.nodeType===1;){var D=g;if(u.nodeName.toLowerCase()!==f.toLowerCase()){if(!w&&(u.nodeName!=="INPUT"||u.type!=="hidden"))break}else if(w){if(!u[Yl])switch(f){case"meta":if(!u.hasAttribute("itemprop"))break;return u;case"link":if(P=u.getAttribute("rel"),P==="stylesheet"&&u.hasAttribute("data-precedence"))break;if(P!==D.rel||u.getAttribute("href")!==(D.href==null||D.href===""?null:D.href)||u.getAttribute("crossorigin")!==(D.crossOrigin==null?null:D.crossOrigin)||u.getAttribute("title")!==(D.title==null?null:D.title))break;return u;case"style":if(u.hasAttribute("data-precedence"))break;return u;case"script":if(P=u.getAttribute("src"),(P!==(D.src==null?null:D.src)||u.getAttribute("type")!==(D.type==null?null:D.type)||u.getAttribute("crossorigin")!==(D.crossOrigin==null?null:D.crossOrigin))&&P&&u.hasAttribute("async")&&!u.hasAttribute("itemprop"))break;return u;default:return u}}else if(f==="input"&&u.type==="hidden"){var P=D.name==null?null:""+D.name;if(D.type==="hidden"&&u.getAttribute("name")===P)return u}else return u;if(u=qn(u.nextSibling),u===null)break}return null}function IB(u,f,g){if(f==="")return null;for(;u.nodeType!==3;)if((u.nodeType!==1||u.nodeName!=="INPUT"||u.type!=="hidden")&&!g||(u=qn(u.nextSibling),u===null))return null;return u}function Dv(u){return u.data==="$!"||u.data==="$?"&&u.ownerDocument.readyState==="complete"}function FB(u,f){var g=u.ownerDocument;if(u.data!=="$?"||g.readyState==="complete")f();else{var w=function(){f(),g.removeEventListener("DOMContentLoaded",w)};g.addEventListener("DOMContentLoaded",w),u._reactRetry=w}}function qn(u){for(;u!=null;u=u.nextSibling){var f=u.nodeType;if(f===1||f===3)break;if(f===8){if(f=u.data,f==="$"||f==="$!"||f==="$?"||f==="F!"||f==="F")break;if(f==="/$")return null}}return u}var Tv=null;function Tk(u){u=u.previousSibling;for(var f=0;u;){if(u.nodeType===8){var g=u.data;if(g==="$"||g==="$!"||g==="$?"){if(f===0)return u;f--}else g==="/$"&&f++}u=u.previousSibling}return null}function Mk(u,f,g){switch(f=Cm(g),u){case"html":if(u=f.documentElement,!u)throw Error(a(452));return u;case"head":if(u=f.head,!u)throw Error(a(453));return u;case"body":if(u=f.body,!u)throw Error(a(454));return u;default:throw Error(a(451))}}function qu(u){for(var f=u.attributes;f.length;)u.removeAttributeNode(f[0]);cu(u)}var Nn=new Map,Ek=new Set;function Am(u){return typeof u.getRootNode=="function"?u.getRootNode():u.nodeType===9?u:u.ownerDocument}var Qs=W.d;W.d={f:BB,r:HB,D:$B,C:YB,L:UB,m:WB,X:VB,S:XB,M:qB};function BB(){var u=Qs.f(),f=xm();return u||f}function HB(u){var f=Un(u);f!==null&&f.tag===5&&f.type==="form"?ZC(f):Qs.r(u)}var Uc=typeof document>"u"?null:document;function Pk(u,f,g){var w=Uc;if(w&&typeof f=="string"&&f){var D=gn(f);D='link[rel="'+u+'"][href="'+D+'"]',typeof g=="string"&&(D+='[crossorigin="'+g+'"]'),Ek.has(D)||(Ek.add(D),u={rel:u,crossOrigin:g,href:f},w.querySelector(D)===null&&(f=w.createElement("link"),Ur(f,"link",u),er(f),w.head.appendChild(f)))}}function $B(u){Qs.D(u),Pk("dns-prefetch",u,null)}function YB(u,f){Qs.C(u,f),Pk("preconnect",u,f)}function UB(u,f,g){Qs.L(u,f,g);var w=Uc;if(w&&u&&f){var D='link[rel="preload"][as="'+gn(f)+'"]';f==="image"&&g&&g.imageSrcSet?(D+='[imagesrcset="'+gn(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(D+='[imagesizes="'+gn(g.imageSizes)+'"]')):D+='[href="'+gn(u)+'"]';var P=D;switch(f){case"style":P=Wc(u);break;case"script":P=Xc(u)}Nn.has(P)||(u=h({rel:"preload",href:f==="image"&&g&&g.imageSrcSet?void 0:u,as:f},g),Nn.set(P,u),w.querySelector(D)!==null||f==="style"&&w.querySelector(Gu(P))||f==="script"&&w.querySelector(Ku(P))||(f=w.createElement("link"),Ur(f,"link",u),er(f),w.head.appendChild(f)))}}function WB(u,f){Qs.m(u,f);var g=Uc;if(g&&u){var w=f&&typeof f.as=="string"?f.as:"script",D='link[rel="modulepreload"][as="'+gn(w)+'"][href="'+gn(u)+'"]',P=D;switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":P=Xc(u)}if(!Nn.has(P)&&(u=h({rel:"modulepreload",href:u},f),Nn.set(P,u),g.querySelector(D)===null)){switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Ku(P)))return}w=g.createElement("link"),Ur(w,"link",u),er(w),g.head.appendChild(w)}}}function XB(u,f,g){Qs.S(u,f,g);var w=Uc;if(w&&u){var D=Wn(w).hoistableStyles,P=Wc(u);f=f||"default";var I=D.get(P);if(!I){var $={loading:0,preload:null};if(I=w.querySelector(Gu(P)))$.loading=5;else{u=h({rel:"stylesheet",href:u,"data-precedence":f},g),(g=Nn.get(P))&&Mv(u,g);var q=I=w.createElement("link");er(q),Ur(q,"link",u),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,km(I,f,w)}I={type:"stylesheet",instance:I,count:1,state:$},D.set(P,I)}}}function VB(u,f){Qs.X(u,f);var g=Uc;if(g&&u){var w=Wn(g).hoistableScripts,D=Xc(u),P=w.get(D);P||(P=g.querySelector(Ku(D)),P||(u=h({src:u,async:!0},f),(f=Nn.get(D))&&Ev(u,f),P=g.createElement("script"),er(P),Ur(P,"link",u),g.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},w.set(D,P))}}function qB(u,f){Qs.M(u,f);var g=Uc;if(g&&u){var w=Wn(g).hoistableScripts,D=Xc(u),P=w.get(D);P||(P=g.querySelector(Ku(D)),P||(u=h({src:u,async:!0,type:"module"},f),(f=Nn.get(D))&&Ev(u,f),P=g.createElement("script"),er(P),Ur(P,"link",u),g.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},w.set(D,P))}}function Ok(u,f,g,w){var D=(D=ne.current)?Am(D):null;if(!D)throw Error(a(446));switch(u){case"meta":case"title":return null;case"style":return typeof g.precedence=="string"&&typeof g.href=="string"?(f=Wc(g.href),g=Wn(D).hoistableStyles,w=g.get(f),w||(w={type:"style",instance:null,count:0,state:null},g.set(f,w)),w):{type:"void",instance:null,count:0,state:null};case"link":if(g.rel==="stylesheet"&&typeof g.href=="string"&&typeof g.precedence=="string"){u=Wc(g.href);var P=Wn(D).hoistableStyles,I=P.get(u);if(I||(D=D.ownerDocument||D,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},P.set(u,I),(P=D.querySelector(Gu(u)))&&!P._p&&(I.instance=P,I.state.loading=5),Nn.has(u)||(g={rel:"preload",as:"style",href:g.href,crossOrigin:g.crossOrigin,integrity:g.integrity,media:g.media,hrefLang:g.hrefLang,referrerPolicy:g.referrerPolicy},Nn.set(u,g),P||GB(D,u,g,I.state))),f&&w===null)throw Error(a(528,""));return I}if(f&&w!==null)throw Error(a(529,""));return null;case"script":return f=g.async,g=g.src,typeof g=="string"&&f&&typeof f!="function"&&typeof f!="symbol"?(f=Xc(g),g=Wn(D).hoistableScripts,w=g.get(f),w||(w={type:"script",instance:null,count:0,state:null},g.set(f,w)),w):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,u))}}function Wc(u){return'href="'+gn(u)+'"'}function Gu(u){return'link[rel="stylesheet"]['+u+"]"}function Rk(u){return h({},u,{"data-precedence":u.precedence,precedence:null})}function GB(u,f,g,w){u.querySelector('link[rel="preload"][as="style"]['+f+"]")?w.loading=1:(f=u.createElement("link"),w.preload=f,f.addEventListener("load",function(){return w.loading|=1}),f.addEventListener("error",function(){return w.loading|=2}),Ur(f,"link",g),er(f),u.head.appendChild(f))}function Xc(u){return'[src="'+gn(u)+'"]'}function Ku(u){return"script[async]"+u}function _k(u,f,g){if(f.count++,f.instance===null)switch(f.type){case"style":var w=u.querySelector('style[data-href~="'+gn(g.href)+'"]');if(w)return f.instance=w,er(w),w;var D=h({},g,{"data-href":g.href,"data-precedence":g.precedence,href:null,precedence:null});return w=(u.ownerDocument||u).createElement("style"),er(w),Ur(w,"style",D),km(w,g.precedence,u),f.instance=w;case"stylesheet":D=Wc(g.href);var P=u.querySelector(Gu(D));if(P)return f.state.loading|=4,f.instance=P,er(P),P;w=Rk(g),(D=Nn.get(D))&&Mv(w,D),P=(u.ownerDocument||u).createElement("link"),er(P);var I=P;return I._p=new Promise(function($,q){I.onload=$,I.onerror=q}),Ur(P,"link",w),f.state.loading|=4,km(P,g.precedence,u),f.instance=P;case"script":return P=Xc(g.src),(D=u.querySelector(Ku(P)))?(f.instance=D,er(D),D):(w=g,(D=Nn.get(P))&&(w=h({},g),Ev(w,D)),u=u.ownerDocument||u,D=u.createElement("script"),er(D),Ur(D,"link",w),u.head.appendChild(D),f.instance=D);case"void":return null;default:throw Error(a(443,f.type))}else f.type==="stylesheet"&&(f.state.loading&4)===0&&(w=f.instance,f.state.loading|=4,km(w,g.precedence,u));return f.instance}function km(u,f,g){for(var w=g.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),D=w.length?w[w.length-1]:null,P=D,I=0;I<w.length;I++){var $=w[I];if($.dataset.precedence===f)P=$;else if(P!==D)break}P?P.parentNode.insertBefore(u,P.nextSibling):(f=g.nodeType===9?g.head:g,f.insertBefore(u,f.firstChild))}function Mv(u,f){u.crossOrigin==null&&(u.crossOrigin=f.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=f.referrerPolicy),u.title==null&&(u.title=f.title)}function Ev(u,f){u.crossOrigin==null&&(u.crossOrigin=f.crossOrigin),u.referrerPolicy==null&&(u.referrerPolicy=f.referrerPolicy),u.integrity==null&&(u.integrity=f.integrity)}var Dm=null;function Lk(u,f,g){if(Dm===null){var w=new Map,D=Dm=new Map;D.set(g,w)}else D=Dm,w=D.get(g),w||(w=new Map,D.set(g,w));if(w.has(u))return w;for(w.set(u,null),g=g.getElementsByTagName(u),D=0;D<g.length;D++){var P=g[D];if(!(P[Yl]||P[pr]||u==="link"&&P.getAttribute("rel")==="stylesheet")&&P.namespaceURI!=="http://www.w3.org/2000/svg"){var I=P.getAttribute(f)||"";I=u+I;var $=w.get(I);$?$.push(P):w.set(I,[P])}}return w}function zk(u,f,g){u=u.ownerDocument||u,u.head.insertBefore(g,f==="title"?u.querySelector("head > title"):null)}function KB(u,f,g){if(g===1||f.itemProp!=null)return!1;switch(u){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 u=f.disabled,typeof f.precedence=="string"&&u==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 Ik(u){return!(u.type==="stylesheet"&&(u.state.loading&3)===0)}var Zu=null;function ZB(){}function QB(u,f,g){if(Zu===null)throw Error(a(475));var w=Zu;if(f.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var D=Wc(g.href),P=u.querySelector(Gu(D));if(P){u=P._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(w.count++,w=Tm.bind(w),u.then(w,w)),f.state.loading|=4,f.instance=P,er(P);return}P=u.ownerDocument||u,g=Rk(g),(D=Nn.get(D))&&Mv(g,D),P=P.createElement("link"),er(P);var I=P;I._p=new Promise(function($,q){I.onload=$,I.onerror=q}),Ur(P,"link",g),f.instance=P}w.stylesheets===null&&(w.stylesheets=new Map),w.stylesheets.set(f,u),(u=f.state.preload)&&(f.state.loading&3)===0&&(w.count++,f=Tm.bind(w),u.addEventListener("load",f),u.addEventListener("error",f))}}function JB(){if(Zu===null)throw Error(a(475));var u=Zu;return u.stylesheets&&u.count===0&&Pv(u,u.stylesheets),0<u.count?function(f){var g=setTimeout(function(){if(u.stylesheets&&Pv(u,u.stylesheets),u.unsuspend){var w=u.unsuspend;u.unsuspend=null,w()}},6e4);return u.unsuspend=f,function(){u.unsuspend=null,clearTimeout(g)}}:null}function Tm(){if(this.count--,this.count===0){if(this.stylesheets)Pv(this,this.stylesheets);else if(this.unsuspend){var u=this.unsuspend;this.unsuspend=null,u()}}}var Mm=null;function Pv(u,f){u.stylesheets=null,u.unsuspend!==null&&(u.count++,Mm=new Map,f.forEach(eH,u),Mm=null,Tm.call(u))}function eH(u,f){if(!(f.state.loading&4)){var g=Mm.get(u);if(g)var w=g.get(null);else{g=new Map,Mm.set(u,g);for(var D=u.querySelectorAll("link[data-precedence],style[data-precedence]"),P=0;P<D.length;P++){var I=D[P];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(g.set(I.dataset.precedence,I),w=I)}w&&g.set(null,w)}D=f.instance,I=D.getAttribute("data-precedence"),P=g.get(I)||w,P===w&&g.set(null,D),g.set(I,D),this.count++,w=Tm.bind(this),D.addEventListener("load",w),D.addEventListener("error",w),P?P.parentNode.insertBefore(D,P.nextSibling):(u=u.nodeType===9?u.head:u,u.insertBefore(D,u.firstChild)),f.state.loading|=4}}var Qu={$$typeof:S,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function tH(u,f,g,w,D,P,I,$){this.tag=1,this.containerInfo=u,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=$l(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$l(0),this.hiddenUpdates=$l(null),this.identifierPrefix=w,this.onUncaughtError=D,this.onCaughtError=P,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function Fk(u,f,g,w,D,P,I,$,q,ie,fe,xe){return u=new tH(u,f,g,I,$,q,ie,xe),f=1,P===!0&&(f|=24),P=Ua(3,null,null,f),u.current=P,P.stateNode=u,f=fy(),f.refCount++,u.pooledCache=f,f.refCount++,P.memoizedState={element:w,isDehydrated:g,cache:f},xy(P),u}function Bk(u){return u?(u=Nc,u):Nc}function Hk(u,f,g,w,D,P){D=Bk(D),w.context===null?w.context=D:w.pendingContext=D,w=zi(f),w.payload={element:g},P=P===void 0?null:P,P!==null&&(w.callback=P),g=Ii(u,w,f),g!==null&&(Ga(g,u,f),Du(g,u,f))}function $k(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var g=u.retryLane;u.retryLane=g!==0&&g<f?g:f}}function Ov(u,f){$k(u,f),(u=u.alternate)&&$k(u,f)}function Yk(u){if(u.tag===13){var f=jc(u,67108864);f!==null&&Ga(f,u,67108864),Ov(u,67108864)}}var Em=!0;function rH(u,f,g,w){var D=H.T;H.T=null;var P=W.p;try{W.p=2,Rv(u,f,g,w)}finally{W.p=P,H.T=D}}function aH(u,f,g,w){var D=H.T;H.T=null;var P=W.p;try{W.p=8,Rv(u,f,g,w)}finally{W.p=P,H.T=D}}function Rv(u,f,g,w){if(Em){var D=_v(w);if(D===null)wv(u,f,w,Pm,g),Wk(u,w);else if(sH(D,u,f,g,w))w.stopPropagation();else if(Wk(u,w),f&4&&-1<nH.indexOf(u)){for(;D!==null;){var P=Un(D);if(P!==null)switch(P.tag){case 3:if(P=P.stateNode,P.current.memoizedState.isDehydrated){var I=wa(P.pendingLanes);if(I!==0){var $=P;for($.pendingLanes|=2,$.entangledLanes|=2;I;){var q=1<<31-Pr(I);$.entanglements[1]|=q,I&=~q}gs(P),(jt&6)===0&&(mm=bt()+500,Wu(0))}}break;case 13:$=jc(P,2),$!==null&&Ga($,P,2),xm(),Ov(P,2)}if(P=_v(w),P===null&&wv(u,f,w,Pm,g),P===D)break;D=P}D!==null&&w.stopPropagation()}else wv(u,f,w,null,g)}}function _v(u){return u=Bb(u),Lv(u)}var Pm=null;function Lv(u){if(Pm=null,u=Ei(u),u!==null){var f=i(u);if(f===null)u=null;else{var g=f.tag;if(g===13){if(u=l(f),u!==null)return u;u=null}else if(g===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null)}}return Pm=u,null}function Uk(u){switch(u){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(va()){case pn:return 2;case Ht:return 8;case Ha:case Xe:return 32;case iu:return 268435456;default:return 32}default:return 32}}var zv=!1,Zi=null,Qi=null,Ji=null,Ju=new Map,eh=new Map,el=[],nH="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 Wk(u,f){switch(u){case"focusin":case"focusout":Zi=null;break;case"dragenter":case"dragleave":Qi=null;break;case"mouseover":case"mouseout":Ji=null;break;case"pointerover":case"pointerout":Ju.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":eh.delete(f.pointerId)}}function th(u,f,g,w,D,P){return u===null||u.nativeEvent!==P?(u={blockedOn:f,domEventName:g,eventSystemFlags:w,nativeEvent:P,targetContainers:[D]},f!==null&&(f=Un(f),f!==null&&Yk(f)),u):(u.eventSystemFlags|=w,f=u.targetContainers,D!==null&&f.indexOf(D)===-1&&f.push(D),u)}function sH(u,f,g,w,D){switch(f){case"focusin":return Zi=th(Zi,u,f,g,w,D),!0;case"dragenter":return Qi=th(Qi,u,f,g,w,D),!0;case"mouseover":return Ji=th(Ji,u,f,g,w,D),!0;case"pointerover":var P=D.pointerId;return Ju.set(P,th(Ju.get(P)||null,u,f,g,w,D)),!0;case"gotpointercapture":return P=D.pointerId,eh.set(P,th(eh.get(P)||null,u,f,g,w,D)),!0}return!1}function Xk(u){var f=Ei(u.target);if(f!==null){var g=i(f);if(g!==null){if(f=g.tag,f===13){if(f=l(g),f!==null){u.blockedOn=f,Mb(u.priority,function(){if(g.tag===13){var w=qa();w=lu(w);var D=jc(g,w);D!==null&&Ga(D,g,w),Ov(g,w)}});return}}else if(f===3&&g.stateNode.current.memoizedState.isDehydrated){u.blockedOn=g.tag===3?g.stateNode.containerInfo:null;return}}}u.blockedOn=null}function Om(u){if(u.blockedOn!==null)return!1;for(var f=u.targetContainers;0<f.length;){var g=_v(u.nativeEvent);if(g===null){g=u.nativeEvent;var w=new g.constructor(g.type,g);Fb=w,g.target.dispatchEvent(w),Fb=null}else return f=Un(g),f!==null&&Yk(f),u.blockedOn=g,!1;f.shift()}return!0}function Vk(u,f,g){Om(u)&&g.delete(f)}function iH(){zv=!1,Zi!==null&&Om(Zi)&&(Zi=null),Qi!==null&&Om(Qi)&&(Qi=null),Ji!==null&&Om(Ji)&&(Ji=null),Ju.forEach(Vk),eh.forEach(Vk)}function Rm(u,f){u.blockedOn===f&&(u.blockedOn=null,zv||(zv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,iH)))}var _m=null;function qk(u){_m!==u&&(_m=u,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){_m===u&&(_m=null);for(var f=0;f<u.length;f+=3){var g=u[f],w=u[f+1],D=u[f+2];if(typeof w!="function"){if(Lv(w||g)===null)continue;break}var P=Un(g);P!==null&&(u.splice(f,3),f-=3,Ly(P,{pending:!0,data:D,method:g.method,action:w},w,D))}}))}function rh(u){function f(q){return Rm(q,u)}Zi!==null&&Rm(Zi,u),Qi!==null&&Rm(Qi,u),Ji!==null&&Rm(Ji,u),Ju.forEach(f),eh.forEach(f);for(var g=0;g<el.length;g++){var w=el[g];w.blockedOn===u&&(w.blockedOn=null)}for(;0<el.length&&(g=el[0],g.blockedOn===null);)Xk(g),g.blockedOn===null&&el.shift();if(g=(u.ownerDocument||u).$$reactFormReplay,g!=null)for(w=0;w<g.length;w+=3){var D=g[w],P=g[w+1],I=D[Or]||null;if(typeof P=="function")I||qk(g);else if(I){var $=null;if(P&&P.hasAttribute("formAction")){if(D=P,I=P[Or]||null)$=I.formAction;else if(Lv(D)!==null)continue}else $=I.action;typeof $=="function"?g[w+1]=$:(g.splice(w,3),w-=3),qk(g)}}}function Iv(u){this._internalRoot=u}Lm.prototype.render=Iv.prototype.render=function(u){var f=this._internalRoot;if(f===null)throw Error(a(409));var g=f.current,w=qa();Hk(g,w,u,f,null,null)},Lm.prototype.unmount=Iv.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var f=u.containerInfo;Hk(u.current,2,null,u,null,null),xm(),f[$a]=null}};function Lm(u){this._internalRoot=u}Lm.prototype.unstable_scheduleHydration=function(u){if(u){var f=Dp();u={blockedOn:null,target:u,priority:f};for(var g=0;g<el.length&&f!==0&&f<el[g].priority;g++);el.splice(g,0,u),g===0&&Xk(u)}};var Gk=e.version;if(Gk!=="19.1.0")throw Error(a(527,Gk,"19.1.0"));W.findDOMNode=function(u){var f=u._reactInternals;if(f===void 0)throw typeof u.render=="function"?Error(a(188)):(u=Object.keys(u).join(","),Error(a(268,u)));return u=c(f),u=u!==null?d(u):null,u=u===null?null:u.stateNode,u};var lH={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zm.isDisabled&&zm.supportsFiber)try{zl=zm.inject(lH),da=zm}catch{}}return nh.createRoot=function(u,f){if(!n(u))throw Error(a(299));var g=!1,w="",D=uA,P=hA,I=fA,$=null;return f!=null&&(f.unstable_strictMode===!0&&(g=!0),f.identifierPrefix!==void 0&&(w=f.identifierPrefix),f.onUncaughtError!==void 0&&(D=f.onUncaughtError),f.onCaughtError!==void 0&&(P=f.onCaughtError),f.onRecoverableError!==void 0&&(I=f.onRecoverableError),f.unstable_transitionCallbacks!==void 0&&($=f.unstable_transitionCallbacks)),f=Fk(u,1,!1,null,null,g,w,D,P,I,$,null),u[$a]=f.current,vv(u),new Iv(f)},nh.hydrateRoot=function(u,f,g){if(!n(u))throw Error(a(299));var w=!1,D="",P=uA,I=hA,$=fA,q=null,ie=null;return g!=null&&(g.unstable_strictMode===!0&&(w=!0),g.identifierPrefix!==void 0&&(D=g.identifierPrefix),g.onUncaughtError!==void 0&&(P=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=Fk(u,1,!0,f,g??null,w,D,P,I,$,q,ie),f.context=Bk(null),g=f.current,w=qa(),w=lu(w),D=zi(w),D.callback=null,Ii(g,D,w),g=w,f.current.lanes=g,zs(f,g),gs(f),u[$a]=f.current,vv(u),new Lm(f)},nh.version="19.1.0",nh}var s5;function bH(){if(s5)return Hv.exports;s5=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(),Hv.exports=xH(),Hv.exports}var yH=bH();/**
 * 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 i5="popstate";function vH(t={}){function e(a,n){let{pathname:i,search:l,hash:o}=a.location;return Ow("",{pathname:i,search:l,hash:o},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:af(n)}return jH(e,r,null,t)}function Zt(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 wH(){return Math.random().toString(36).substring(2,10)}function l5(t,e){return{usr:t.state,key:t.key,idx:e}}function Ow(t,e,r=null,a){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?_d(e):e,state:r,key:e&&e.key||a||wH()}}function af({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 _d(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let a=t.indexOf("?");a>=0&&(e.search=t.substring(a),t=t.substring(0,a)),t&&(e.pathname=t)}return e}function jH(t,e,r,a={}){let{window:n=document.defaultView,v5Compat:i=!1}=a,l=n.history,o="POP",c=null,d=h();d==null&&(d=0,l.replaceState({...l.state,idx:d},""));function h(){return(l.state||{idx:null}).idx}function p(){o="POP";let v=h(),N=v==null?null:v-d;d=v,c&&c({action:o,location:y.location,delta:N})}function m(v,N){o="PUSH";let C=Ow(y.location,v,N);d=h()+1;let S=l5(C,d),k=y.createHref(C);try{l.pushState(S,"",k)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;n.location.assign(k)}i&&c&&c({action:o,location:y.location,delta:1})}function x(v,N){o="REPLACE";let C=Ow(y.location,v,N);d=h();let S=l5(C,d),k=y.createHref(C);l.replaceState(S,"",k),i&&c&&c({action:o,location:y.location,delta:0})}function b(v){return NH(v)}let y={get action(){return o},get location(){return t(n,l)},listen(v){if(c)throw new Error("A history only accepts one active listener");return n.addEventListener(i5,p),c=v,()=>{n.removeEventListener(i5,p),c=null}},createHref(v){return e(n,v)},createURL:b,encodeLocation(v){let N=b(v);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:m,replace:x,go(v){return l.go(v)}};return y}function NH(t,e=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Zt(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:af(t);return a=a.replace(/ $/,"%20"),!e&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function AO(t,e,r="/"){return SH(t,e,r,!1)}function SH(t,e,r,a){let n=typeof e=="string"?_d(e):e,i=xi(n.pathname||"/",r);if(i==null)return null;let l=kO(t);CH(l);let o=null;for(let c=0;o==null&&c<l.length;++c){let d=LH(i);o=RH(l[c],d,a)}return o}function kO(t,e=[],r=[],a=""){let n=(i,l,o)=>{let c={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};c.relativePath.startsWith("/")&&(Zt(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length));let d=pi([a,c.relativePath]),h=r.concat(c);i.children&&i.children.length>0&&(Zt(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),kO(i.children,e,h,d)),!(i.path==null&&!i.index)&&e.push({path:d,score:PH(d,i.index),routesMeta:h})};return t.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))n(i,l);else for(let o of DO(i.path))n(i,l,o)}),e}function DO(t){let e=t.split("/");if(e.length===0)return[];let[r,...a]=e,n=r.endsWith("?"),i=r.replace(/\?$/,"");if(a.length===0)return n?[i,""]:[i];let l=DO(a.join("/")),o=[];return o.push(...l.map(c=>c===""?i:[i,c].join("/"))),n&&o.push(...l),o.map(c=>t.startsWith("/")&&c===""?"/":c)}function CH(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:OH(e.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var AH=/^:[\w-]+$/,kH=3,DH=2,TH=1,MH=10,EH=-2,o5=t=>t==="*";function PH(t,e){let r=t.split("/"),a=r.length;return r.some(o5)&&(a+=EH),e&&(a+=DH),r.filter(n=>!o5(n)).reduce((n,i)=>n+(AH.test(i)?kH:i===""?TH:MH),a)}function OH(t,e){return t.length===e.length&&t.slice(0,-1).every((a,n)=>a===e[n])?t[t.length-1]-e[e.length-1]:0}function RH(t,e,r=!1){let{routesMeta:a}=t,n={},i="/",l=[];for(let o=0;o<a.length;++o){let c=a[o],d=o===a.length-1,h=i==="/"?e:e.slice(i.length)||"/",p=rx({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},h),m=c.route;if(!p&&d&&r&&!a[a.length-1].route.index&&(p=rx({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},h)),!p)return null;Object.assign(n,p.params),l.push({params:n,pathname:pi([i,p.pathname]),pathnameBase:BH(pi([i,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(i=pi([i,p.pathnameBase]))}return l}function rx(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,a]=_H(t.path,t.caseSensitive,t.end),n=e.match(r);if(!n)return null;let i=n[0],l=i.replace(/(.)\/+$/,"$1"),o=n.slice(1);return{params:a.reduce((d,{paramName:h,isOptional:p},m)=>{if(h==="*"){let b=o[m]||"";l=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const x=o[m];return p&&!x?d[h]=void 0:d[h]=(x||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:l,pattern:t}}function _H(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 a=[],n="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,c)=>(a.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(a.push({paramName:"*"}),n+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":t!==""&&t!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,e?void 0:"i"),a]}function LH(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 xi(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,a=t.charAt(r);return a&&a!=="/"?null:t.slice(r)||"/"}function zH(t,e="/"){let{pathname:r,search:a="",hash:n=""}=typeof t=="string"?_d(t):t;return{pathname:r?r.startsWith("/")?r:IH(r,e):e,search:HH(a),hash:$H(n)}}function IH(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Wv(t,e,r,a){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(a)}].  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 FH(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function S4(t){let e=FH(t);return e.map((r,a)=>a===e.length-1?r.pathname:r.pathnameBase)}function C4(t,e,r,a=!1){let n;typeof t=="string"?n=_d(t):(n={...t},Zt(!n.pathname||!n.pathname.includes("?"),Wv("?","pathname","search",n)),Zt(!n.pathname||!n.pathname.includes("#"),Wv("#","pathname","hash",n)),Zt(!n.search||!n.search.includes("#"),Wv("#","search","hash",n)));let i=t===""||n.pathname==="",l=i?"/":n.pathname,o;if(l==null)o=r;else{let p=e.length-1;if(!a&&l.startsWith("..")){let m=l.split("/");for(;m[0]==="..";)m.shift(),p-=1;n.pathname=m.join("/")}o=p>=0?e[p]:"/"}let c=zH(n,o),d=l&&l!=="/"&&l.endsWith("/"),h=(i||l===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||h)&&(c.pathname+="/"),c}var pi=t=>t.join("/").replace(/\/\/+/g,"/"),BH=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),HH=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,$H=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function YH(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}var TO=["POST","PUT","PATCH","DELETE"];new Set(TO);var UH=["GET",...TO];new Set(UH);var Ld=E.createContext(null);Ld.displayName="DataRouter";var p0=E.createContext(null);p0.displayName="DataRouterState";E.createContext(!1);var MO=E.createContext({isTransitioning:!1});MO.displayName="ViewTransition";var WH=E.createContext(new Map);WH.displayName="Fetchers";var XH=E.createContext(null);XH.displayName="Await";var ss=E.createContext(null);ss.displayName="Navigation";var Rf=E.createContext(null);Rf.displayName="Location";var is=E.createContext({outlet:null,matches:[],isDataRoute:!1});is.displayName="Route";var A4=E.createContext(null);A4.displayName="RouteError";function VH(t,{relative:e}={}){Zt(zd(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=E.useContext(ss),{hash:n,pathname:i,search:l}=_f(t,{relative:e}),o=i;return r!=="/"&&(o=i==="/"?r:pi([r,i])),a.createHref({pathname:o,search:l,hash:n})}function zd(){return E.useContext(Rf)!=null}function hr(){return Zt(zd(),"useLocation() may be used only in the context of a <Router> component."),E.useContext(Rf).location}var EO="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function PO(t){E.useContext(ss).static||E.useLayoutEffect(t)}function Cl(){let{isDataRoute:t}=E.useContext(is);return t?i$():qH()}function qH(){Zt(zd(),"useNavigate() may be used only in the context of a <Router> component.");let t=E.useContext(Ld),{basename:e,navigator:r}=E.useContext(ss),{matches:a}=E.useContext(is),{pathname:n}=hr(),i=JSON.stringify(S4(a)),l=E.useRef(!1);return PO(()=>{l.current=!0}),E.useCallback((c,d={})=>{if(es(l.current,EO),!l.current)return;if(typeof c=="number"){r.go(c);return}let h=C4(c,JSON.parse(i),n,d.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:pi([e,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[e,r,i,n,t])}E.createContext(null);function OO(){let{matches:t}=E.useContext(is),e=t[t.length-1];return e?e.params:{}}function _f(t,{relative:e}={}){let{matches:r}=E.useContext(is),{pathname:a}=hr(),n=JSON.stringify(S4(r));return E.useMemo(()=>C4(t,JSON.parse(n),a,e==="path"),[t,n,a,e])}function GH(t,e){return RO(t,e)}function RO(t,e,r,a){Zt(zd(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=E.useContext(ss),{matches:i}=E.useContext(is),l=i[i.length-1],o=l?l.params:{},c=l?l.pathname:"/",d=l?l.pathnameBase:"/",h=l&&l.route;{let N=h&&h.path||"";_O(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=hr(),m;if(e){let N=typeof e=="string"?_d(e):e;Zt(d==="/"||N.pathname?.startsWith(d),`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 "${d}" but pathname "${N.pathname}" was given in the \`location\` prop.`),m=N}else m=p;let x=m.pathname||"/",b=x;if(d!=="/"){let N=d.replace(/^\//,"").split("/");b="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let y=AO(t,{pathname:b});es(h||y!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),es(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.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 v=e$(y&&y.map(N=>Object.assign({},N,{params:Object.assign({},o,N.params),pathname:pi([d,n.encodeLocation?n.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?d:pi([d,n.encodeLocation?n.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),i,r,a);return e&&v?E.createElement(Rf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},v):v}function KH(){let t=s$(),e=YH(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},i={padding:"2px 4px",backgroundColor:a},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:i},"ErrorBoundary")," or"," ",E.createElement("code",{style:i},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),r?E.createElement("pre",{style:n},r):null,l)}var ZH=E.createElement(KH,null),QH=class extends E.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?E.createElement(is.Provider,{value:this.props.routeContext},E.createElement(A4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function JH({routeContext:t,match:e,children:r}){let a=E.useContext(Ld);return a&&a.static&&a.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=e.route.id),E.createElement(is.Provider,{value:t},r)}function e$(t,e=[],r=null,a=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 n=t,i=r?.errors;if(i!=null){let c=n.findIndex(d=>d.route.id&&i?.[d.route.id]!==void 0);Zt(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let l=!1,o=-1;if(r)for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(o=c),d.route.id){let{loaderData:h,errors:p}=r,m=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!p||p[d.route.id]===void 0);if(d.route.lazy||m){l=!0,o>=0?n=n.slice(0,o+1):n=[n[0]];break}}}return n.reduceRight((c,d,h)=>{let p,m=!1,x=null,b=null;r&&(p=i&&d.route.id?i[d.route.id]:void 0,x=d.route.errorElement||ZH,l&&(o<0&&h===0?(_O("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),m=!0,b=null):o===h&&(m=!0,b=d.route.hydrateFallbackElement||null)));let y=e.concat(n.slice(0,h+1)),v=()=>{let N;return p?N=x:m?N=b:d.route.Component?N=E.createElement(d.route.Component,null):d.route.element?N=d.route.element:N=c,E.createElement(JH,{match:d,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:N})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(QH,{location:r.location,revalidation:r.revalidation,component:x,error:p,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}function k4(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function t$(t){let e=E.useContext(Ld);return Zt(e,k4(t)),e}function r$(t){let e=E.useContext(p0);return Zt(e,k4(t)),e}function a$(t){let e=E.useContext(is);return Zt(e,k4(t)),e}function D4(t){let e=a$(t),r=e.matches[e.matches.length-1];return Zt(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function n$(){return D4("useRouteId")}function s$(){let t=E.useContext(A4),e=r$("useRouteError"),r=D4("useRouteError");return t!==void 0?t:e.errors?.[r]}function i$(){let{router:t}=t$("useNavigate"),e=D4("useNavigate"),r=E.useRef(!1);return PO(()=>{r.current=!0}),E.useCallback(async(n,i={})=>{es(r.current,EO),r.current&&(typeof n=="number"?t.navigate(n):await t.navigate(n,{fromRouteId:e,...i}))},[t,e])}var c5={};function _O(t,e,r){!e&&!c5[t]&&(c5[t]=!0,es(!1,r))}E.memo(l$);function l$({routes:t,future:e,state:r}){return RO(t,void 0,r,e)}function Xv({to:t,replace:e,state:r,relative:a}){Zt(zd(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n}=E.useContext(ss);es(!n,"<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:i}=E.useContext(is),{pathname:l}=hr(),o=Cl(),c=C4(t,S4(i),l,a==="path"),d=JSON.stringify(c);return E.useEffect(()=>{o(JSON.parse(d),{replace:e,state:r,relative:a})},[o,d,a,e,r]),null}function Ae(t){Zt(!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 o$({basename:t="/",children:e=null,location:r,navigationType:a="POP",navigator:n,static:i=!1}){Zt(!zd(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),o=E.useMemo(()=>({basename:l,navigator:n,static:i,future:{}}),[l,n,i]);typeof r=="string"&&(r=_d(r));let{pathname:c="/",search:d="",hash:h="",state:p=null,key:m="default"}=r,x=E.useMemo(()=>{let b=xi(c,l);return b==null?null:{location:{pathname:b,search:d,hash:h,state:p,key:m},navigationType:a}},[l,c,d,h,p,m,a]);return es(x!=null,`<Router basename="${l}"> is not able to match the URL "${c}${d}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:E.createElement(ss.Provider,{value:o},E.createElement(Rf.Provider,{children:e,value:x}))}function c$({children:t,location:e}){return GH(Rw(t),e)}function Rw(t,e=[]){let r=[];return E.Children.forEach(t,(a,n)=>{if(!E.isValidElement(a))return;let i=[...e,n];if(a.type===E.Fragment){r.push.apply(r,Rw(a.props.children,i));return}Zt(a.type===Ae,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Zt(!a.props.index||!a.props.children,"An index route cannot have child routes.");let l={id:a.props.id||i.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(l.children=Rw(a.props.children,i)),r.push(l)}),r}var Ag="get",kg="application/x-www-form-urlencoded";function m0(t){return t!=null&&typeof t.tagName=="string"}function d$(t){return m0(t)&&t.tagName.toLowerCase()==="button"}function u$(t){return m0(t)&&t.tagName.toLowerCase()==="form"}function h$(t){return m0(t)&&t.tagName.toLowerCase()==="input"}function f$(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function p$(t,e){return t.button===0&&(!e||e==="_self")&&!f$(t)}var Im=null;function m$(){if(Im===null)try{new FormData(document.createElement("form"),0),Im=!1}catch{Im=!0}return Im}var g$=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Vv(t){return t!=null&&!g$.has(t)?(es(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kg}"`),null):t}function x$(t,e){let r,a,n,i,l;if(u$(t)){let o=t.getAttribute("action");a=o?xi(o,e):null,r=t.getAttribute("method")||Ag,n=Vv(t.getAttribute("enctype"))||kg,i=new FormData(t)}else if(d$(t)||h$(t)&&(t.type==="submit"||t.type==="image")){let o=t.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=t.getAttribute("formaction")||o.getAttribute("action");if(a=c?xi(c,e):null,r=t.getAttribute("formmethod")||o.getAttribute("method")||Ag,n=Vv(t.getAttribute("formenctype"))||Vv(o.getAttribute("enctype"))||kg,i=new FormData(o,t),!m$()){let{name:d,type:h,value:p}=t;if(h==="image"){let m=d?`${d}.`:"";i.append(`${m}x`,"0"),i.append(`${m}y`,"0")}else d&&i.append(d,p)}}else{if(m0(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ag,a=null,n=kg,l=t}return i&&n==="text/plain"&&(l=i,i=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function T4(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function b$(t,e,r){let a=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return a.pathname==="/"?a.pathname=`_root.${r}`:e&&xi(a.pathname,e)==="/"?a.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}async function y$(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 v$(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 w$(t,e,r){let a=await Promise.all(t.map(async n=>{let i=e.routes[n.route.id];if(i){let l=await y$(i,r);return l.links?l.links():[]}return[]}));return C$(a.flat(1).filter(v$).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function d5(t,e,r,a,n,i){let l=(c,d)=>r[d]?c.route.id!==r[d].route.id:!0,o=(c,d)=>r[d].pathname!==c.pathname||r[d].route.path?.endsWith("*")&&r[d].params["*"]!==c.params["*"];return i==="assets"?e.filter((c,d)=>l(c,d)||o(c,d)):i==="data"?e.filter((c,d)=>{let h=a.routes[c.route.id];if(!h||!h.hasLoader)return!1;if(l(c,d)||o(c,d))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.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 j$(t,e,{includeHydrateFallback:r}={}){return N$(t.map(a=>{let n=e.routes[a.route.id];if(!n)return[];let i=[n.module];return n.clientActionModule&&(i=i.concat(n.clientActionModule)),n.clientLoaderModule&&(i=i.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(i=i.concat(n.hydrateFallbackModule)),n.imports&&(i=i.concat(n.imports)),i}).flat(1))}function N$(t){return[...new Set(t)]}function S$(t){let e={},r=Object.keys(t).sort();for(let a of r)e[a]=t[a];return e}function C$(t,e){let r=new Set;return new Set(e),t.reduce((a,n)=>{let i=JSON.stringify(S$(n));return r.has(i)||(r.add(i),a.push({key:i,link:n})),a},[])}function LO(){let t=E.useContext(Ld);return T4(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function A$(){let t=E.useContext(p0);return T4(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var M4=E.createContext(void 0);M4.displayName="FrameworkContext";function zO(){let t=E.useContext(M4);return T4(t,"You must render this element inside a <HydratedRouter> element"),t}function k$(t,e){let r=E.useContext(M4),[a,n]=E.useState(!1),[i,l]=E.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:d,onMouseLeave:h,onTouchStart:p}=e,m=E.useRef(null);E.useEffect(()=>{if(t==="render"&&l(!0),t==="viewport"){let y=N=>{N.forEach(C=>{l(C.isIntersecting)})},v=new IntersectionObserver(y,{threshold:.5});return m.current&&v.observe(m.current),()=>{v.disconnect()}}},[t]),E.useEffect(()=>{if(a){let y=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(y)}}},[a]);let x=()=>{n(!0)},b=()=>{n(!1),l(!1)};return r?t!=="intent"?[i,m,{}]:[i,m,{onFocus:sh(o,x),onBlur:sh(c,b),onMouseEnter:sh(d,x),onMouseLeave:sh(h,b),onTouchStart:sh(p,x)}]:[!1,m,{}]}function sh(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function D$({page:t,...e}){let{router:r}=LO(),a=E.useMemo(()=>AO(r.routes,t,r.basename),[r.routes,t,r.basename]);return a?E.createElement(M$,{page:t,matches:a,...e}):null}function T$(t){let{manifest:e,routeModules:r}=zO(),[a,n]=E.useState([]);return E.useEffect(()=>{let i=!1;return w$(t,e,r).then(l=>{i||n(l)}),()=>{i=!0}},[t,e,r]),a}function M$({page:t,matches:e,...r}){let a=hr(),{manifest:n,routeModules:i}=zO(),{basename:l}=LO(),{loaderData:o,matches:c}=A$(),d=E.useMemo(()=>d5(t,e,c,n,a,"data"),[t,e,c,n,a]),h=E.useMemo(()=>d5(t,e,c,n,a,"assets"),[t,e,c,n,a]),p=E.useMemo(()=>{if(t===a.pathname+a.search+a.hash)return[];let b=new Set,y=!1;if(e.forEach(N=>{let C=n.routes[N.route.id];!C||!C.hasLoader||(!d.some(S=>S.route.id===N.route.id)&&N.route.id in o&&i[N.route.id]?.shouldRevalidate||C.hasClientLoader?y=!0:b.add(N.route.id))}),b.size===0)return[];let v=b$(t,l,"data");return y&&b.size>0&&v.searchParams.set("_routes",e.filter(N=>b.has(N.route.id)).map(N=>N.route.id).join(",")),[v.pathname+v.search]},[l,o,a,n,d,e,t,i]),m=E.useMemo(()=>j$(h,n),[h,n]),x=T$(h);return E.createElement(E.Fragment,null,p.map(b=>E.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),m.map(b=>E.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),x.map(({key:b,link:y})=>E.createElement("link",{key:b,...y})))}function E$(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var IO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{IO&&(window.__reactRouterVersion="7.7.0")}catch{}function P$({basename:t,children:e,window:r}){let a=E.useRef();a.current==null&&(a.current=vH({window:r,v5Compat:!0}));let n=a.current,[i,l]=E.useState({action:n.action,location:n.location}),o=E.useCallback(c=>{E.startTransition(()=>l(c))},[l]);return E.useLayoutEffect(()=>n.listen(o),[n,o]),E.createElement(o$,{basename:t,children:e,location:i.location,navigationType:i.action,navigator:n})}var FO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,De=E.forwardRef(function({onClick:e,discover:r="render",prefetch:a="none",relative:n,reloadDocument:i,replace:l,state:o,target:c,to:d,preventScrollReset:h,viewTransition:p,...m},x){let{basename:b}=E.useContext(ss),y=typeof d=="string"&&FO.test(d),v,N=!1;if(typeof d=="string"&&y&&(v=d,IO))try{let _=new URL(window.location.href),R=d.startsWith("//")?new URL(_.protocol+d):new URL(d),L=xi(R.pathname,b);R.origin===_.origin&&L!=null?d=L+R.search+R.hash:N=!0}catch{es(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=VH(d,{relative:n}),[S,k,A]=k$(a,m),T=_$(d,{replace:l,state:o,target:c,preventScrollReset:h,relative:n,viewTransition:p});function M(_){e&&e(_),_.defaultPrevented||T(_)}let O=E.createElement("a",{...m,...A,href:v||C,onClick:N||i?e:M,ref:E$(x,k),target:c,"data-discover":!y&&r==="render"?"true":void 0});return S&&!y?E.createElement(E.Fragment,null,O,E.createElement(D$,{page:C})):O});De.displayName="Link";var BO=E.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:a="",end:n=!1,style:i,to:l,viewTransition:o,children:c,...d},h){let p=_f(l,{relative:d.relative}),m=hr(),x=E.useContext(p0),{navigator:b,basename:y}=E.useContext(ss),v=x!=null&&B$(p)&&o===!0,N=b.encodeLocation?b.encodeLocation(p).pathname:p.pathname,C=m.pathname,S=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;r||(C=C.toLowerCase(),S=S?S.toLowerCase():null,N=N.toLowerCase()),S&&y&&(S=xi(S,y)||S);const k=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let A=C===N||!n&&C.startsWith(N)&&C.charAt(k)==="/",T=S!=null&&(S===N||!n&&S.startsWith(N)&&S.charAt(N.length)==="/"),M={isActive:A,isPending:T,isTransitioning:v},O=A?e:void 0,_;typeof a=="function"?_=a(M):_=[a,A?"active":null,T?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let R=typeof i=="function"?i(M):i;return E.createElement(De,{...d,"aria-current":O,className:_,ref:h,style:R,to:l,viewTransition:o},typeof c=="function"?c(M):c)});BO.displayName="NavLink";var O$=E.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:a,replace:n,state:i,method:l=Ag,action:o,onSubmit:c,relative:d,preventScrollReset:h,viewTransition:p,...m},x)=>{let b=I$(),y=F$(o,{relative:d}),v=l.toLowerCase()==="get"?"get":"post",N=typeof o=="string"&&FO.test(o),C=S=>{if(c&&c(S),S.defaultPrevented)return;S.preventDefault();let k=S.nativeEvent.submitter,A=k?.getAttribute("formmethod")||l;b(k||S.currentTarget,{fetcherKey:e,method:A,navigate:r,replace:n,state:i,relative:d,preventScrollReset:h,viewTransition:p})};return E.createElement("form",{ref:x,method:v,action:y,onSubmit:a?c:C,...m,"data-discover":!N&&t==="render"?"true":void 0})});O$.displayName="Form";function R$(t){return`${t} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function HO(t){let e=E.useContext(Ld);return Zt(e,R$(t)),e}function _$(t,{target:e,replace:r,state:a,preventScrollReset:n,relative:i,viewTransition:l}={}){let o=Cl(),c=hr(),d=_f(t,{relative:i});return E.useCallback(h=>{if(p$(h,e)){h.preventDefault();let p=r!==void 0?r:af(c)===af(d);o(t,{replace:p,state:a,preventScrollReset:n,relative:i,viewTransition:l})}},[c,o,d,r,a,e,t,n,i,l])}var L$=0,z$=()=>`__${String(++L$)}__`;function I$(){let{router:t}=HO("useSubmit"),{basename:e}=E.useContext(ss),r=n$();return E.useCallback(async(a,n={})=>{let{action:i,method:l,encType:o,formData:c,body:d}=x$(a,e);if(n.navigate===!1){let h=n.fetcherKey||z$();await t.fetch(h,r,n.action||i,{preventScrollReset:n.preventScrollReset,formData:c,body:d,formMethod:n.method||l,formEncType:n.encType||o,flushSync:n.flushSync})}else await t.navigate(n.action||i,{preventScrollReset:n.preventScrollReset,formData:c,body:d,formMethod:n.method||l,formEncType:n.encType||o,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[t,e,r])}function F$(t,{relative:e}={}){let{basename:r}=E.useContext(ss),a=E.useContext(is);Zt(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),i={..._f(t||".",{relative:e})},l=hr();if(t==null){i.search=l.search;let o=new URLSearchParams(i.search),c=o.getAll("index");if(c.some(h=>h==="")){o.delete("index"),c.filter(p=>p).forEach(p=>o.append("index",p));let h=o.toString();i.search=h?`?${h}`:""}}return(!t||t===".")&&n.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:pi([r,i.pathname])),af(i)}function B$(t,e={}){let r=E.useContext(MO);Zt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=HO("useViewTransitionState"),n=_f(t,{relative:e.relative});if(!r.isTransitioning)return!1;let i=xi(r.currentLocation.pathname,a)||r.currentLocation.pathname,l=xi(r.nextLocation.pathname,a)||r.nextLocation.pathname;return rx(n.pathname,l)!=null||rx(n.pathname,i)!=null}var H$=CO(),qv={exports:{}},Gv={};/**
 * @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 u5;function $$(){if(u5)return Gv;u5=1;var t=Qo();function e(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:e,a=t.useSyncExternalStore,n=t.useRef,i=t.useEffect,l=t.useMemo,o=t.useDebugValue;return Gv.useSyncExternalStoreWithSelector=function(c,d,h,p,m){var x=n(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=l(function(){function v(A){if(!N){if(N=!0,C=A,A=p(A),m!==void 0&&b.hasValue){var T=b.value;if(m(T,A))return S=T}return S=A}if(T=S,r(C,A))return T;var M=p(A);return m!==void 0&&m(T,M)?(C=A,T):(C=A,S=M)}var N=!1,C,S,k=h===void 0?null:h;return[function(){return v(d())},k===null?void 0:function(){return v(k())}]},[d,h,p,m]);var y=a(c,x[0],x[1]);return i(function(){b.hasValue=!0,b.value=y},[y]),o(y),y},Gv}var h5;function Y$(){return h5||(h5=1,qv.exports=$$()),qv.exports}var U$=Y$();function $O(t){t()}function W$(){let t=null,e=null;return{clear(){t=null,e=null},notify(){$O(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){const r=[];let a=t;for(;a;)r.push(a),a=a.next;return r},subscribe(r){let a=!0;const n=e={callback:r,next:null,prev:e};return n.prev?n.prev.next=n:t=n,function(){!a||t===null||(a=!1,n.next?n.next.prev=n.prev:e=n.prev,n.prev?n.prev.next=n.next:t=n.next)}}}}var f5={notify(){},get:()=>[]};function X$(t,e){let r,a=f5,n=0,i=!1;function l(y){h();const v=a.subscribe(y);let N=!1;return()=>{N||(N=!0,v(),p())}}function o(){a.notify()}function c(){b.onStateChange&&b.onStateChange()}function d(){return i}function h(){n++,r||(r=t.subscribe(c),a=W$())}function p(){n--,r&&n===0&&(r(),r=void 0,a.clear(),a=f5)}function m(){i||(i=!0,h())}function x(){i&&(i=!1,p())}const b={addNestedSub:l,notifyNestedSubs:o,handleChangeWrapper:c,isSubscribed:d,trySubscribe:m,tryUnsubscribe:x,getListeners:()=>a};return b}var V$=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q$=V$(),G$=()=>typeof navigator<"u"&&navigator.product==="ReactNative",K$=G$(),Z$=()=>q$||K$?E.useLayoutEffect:E.useEffect,Q$=Z$();function p5(t,e){return t===e?t!==0||e!==0||1/t===1/e:t!==t&&e!==e}function zh(t,e){if(p5(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;const r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(e,r[n])||!p5(t[r[n]],e[r[n]]))return!1;return!0}var J$=Symbol.for("react-redux-context"),eY=typeof globalThis<"u"?globalThis:{};function tY(){if(!E.createContext)return{};const t=eY[J$]??=new Map;let e=t.get(E.createContext);return e||(e=E.createContext(null),t.set(E.createContext,e)),e}var gl=tY();function rY(t){const{children:e,context:r,serverState:a,store:n}=t,i=E.useMemo(()=>{const c=X$(n);return{store:n,subscription:c,getServerState:a?()=>a:void 0}},[n,a]),l=E.useMemo(()=>n.getState(),[n]);Q$(()=>{const{subscription:c}=i;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),l!==n.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[i,l]);const o=r||gl;return E.createElement(o.Provider,{value:i},e)}var YO=rY;function E4(t=gl){return function(){return E.useContext(t)}}var UO=E4();function WO(t=gl){const e=t===gl?UO:E4(t),r=()=>{const{store:a}=e();return a};return Object.assign(r,{withTypes:()=>r}),r}var XO=WO();function aY(t=gl){const e=t===gl?XO:WO(t),r=()=>e().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var Fn=aY(),nY=(t,e)=>t===e;function sY(t=gl){const e=t===gl?UO:E4(t),r=(a,n={})=>{const{equalityFn:i=nY}=typeof n=="function"?{equalityFn:n}:n,l=e(),{store:o,subscription:c,getServerState:d}=l;E.useRef(!0);const h=E.useCallback({[a.name](m){return a(m)}}[a.name],[a]),p=U$.useSyncExternalStoreWithSelector(c.addNestedSub,o.getState,d||o.getState,h,i);return E.useDebugValue(p),p};return Object.assign(r,{withTypes:()=>r}),r}var un=sY(),iY=$O;function Wr(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 lY=typeof Symbol=="function"&&Symbol.observable||"@@observable",m5=lY,Kv=()=>Math.random().toString(36).substring(7).split("").join("."),oY={INIT:`@@redux/INIT${Kv()}`,REPLACE:`@@redux/REPLACE${Kv()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kv()}`},ax=oY;function xl(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 VO(t,e,r){if(typeof t!="function")throw new Error(Wr(2));if(typeof e=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Wr(0));if(typeof e=="function"&&typeof r>"u"&&(r=e,e=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Wr(1));return r(VO)(t,e)}let a=t,n=e,i=new Map,l=i,o=0,c=!1;function d(){l===i&&(l=new Map,i.forEach((v,N)=>{l.set(N,v)}))}function h(){if(c)throw new Error(Wr(3));return n}function p(v){if(typeof v!="function")throw new Error(Wr(4));if(c)throw new Error(Wr(5));let N=!0;d();const C=o++;return l.set(C,v),function(){if(N){if(c)throw new Error(Wr(6));N=!1,d(),l.delete(C),i=null}}}function m(v){if(!xl(v))throw new Error(Wr(7));if(typeof v.type>"u")throw new Error(Wr(8));if(typeof v.type!="string")throw new Error(Wr(17));if(c)throw new Error(Wr(9));try{c=!0,n=a(n,v)}finally{c=!1}return(i=l).forEach(C=>{C()}),v}function x(v){if(typeof v!="function")throw new Error(Wr(10));a=v,m({type:ax.REPLACE})}function b(){const v=p;return{subscribe(N){if(typeof N!="object"||N===null)throw new Error(Wr(11));function C(){const k=N;k.next&&k.next(h())}return C(),{unsubscribe:v(C)}},[m5](){return this}}}return m({type:ax.INIT}),{dispatch:m,subscribe:p,getState:h,replaceReducer:x,[m5]:b}}function cY(t){Object.keys(t).forEach(e=>{const r=t[e];if(typeof r(void 0,{type:ax.INIT})>"u")throw new Error(Wr(12));if(typeof r(void 0,{type:ax.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Wr(13))})}function P4(t){const e=Object.keys(t),r={};for(let i=0;i<e.length;i++){const l=e[i];typeof t[l]=="function"&&(r[l]=t[l])}const a=Object.keys(r);let n;try{cY(r)}catch(i){n=i}return function(l={},o){if(n)throw n;let c=!1;const d={};for(let h=0;h<a.length;h++){const p=a[h],m=r[p],x=l[p],b=m(x,o);if(typeof b>"u")throw o&&o.type,new Error(Wr(14));d[p]=b,c=c||b!==x}return c=c||a.length!==Object.keys(l).length,c?d:l}}function nx(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,r)=>(...a)=>e(r(...a)))}function dY(...t){return e=>(r,a)=>{const n=e(r,a);let i=()=>{throw new Error(Wr(15))};const l={getState:n.getState,dispatch:(c,...d)=>i(c,...d)},o=t.map(c=>c(l));return i=nx(...o)(n.dispatch),{...n,dispatch:i}}}function O4(t){return xl(t)&&"type"in t&&typeof t.type=="string"}var R4=Symbol.for("immer-nothing"),Ih=Symbol.for("immer-draftable"),Ia=Symbol.for("immer-state");function Gr(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Bo=Object.getPrototypeOf;function Ms(t){return!!t&&!!t[Ia]}function ts(t){return t?qO(t)||Array.isArray(t)||!!t[Ih]||!!t.constructor?.[Ih]||Lf(t)||zf(t):!1}var uY=Object.prototype.constructor.toString();function qO(t){if(!t||typeof t!="object")return!1;const e=Bo(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)===uY}function hY(t){return Ms(t)||Gr(15,t),t[Ia].base_}function nf(t,e){Ho(t)===0?Reflect.ownKeys(t).forEach(r=>{e(r,t[r],t)}):t.forEach((r,a)=>e(a,r,t))}function Ho(t){const e=t[Ia];return e?e.type_:Array.isArray(t)?1:Lf(t)?2:zf(t)?3:0}function sf(t,e){return Ho(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Zv(t,e){return Ho(t)===2?t.get(e):t[e]}function GO(t,e,r){const a=Ho(t);a===2?t.set(e,r):a===3?t.add(r):t[e]=r}function fY(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Lf(t){return t instanceof Map}function zf(t){return t instanceof Set}function ho(t){return t.copy_||t.base_}function _w(t,e){if(Lf(t))return new Map(t);if(zf(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const r=qO(t);if(e===!0||e==="class_only"&&!r){const a=Object.getOwnPropertyDescriptors(t);delete a[Ia];let n=Reflect.ownKeys(a);for(let i=0;i<n.length;i++){const l=n[i],o=a[l];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(a[l]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[l]})}return Object.create(Bo(t),a)}else{const a=Bo(t);if(a!==null&&r)return{...t};const n=Object.create(a);return Object.assign(n,t)}}function _4(t,e=!1){return g0(t)||Ms(t)||!ts(t)||(Ho(t)>1&&(t.set=t.add=t.clear=t.delete=pY),Object.freeze(t),e&&Object.entries(t).forEach(([r,a])=>_4(a,!0))),t}function pY(){Gr(2)}function g0(t){return Object.isFrozen(t)}var Lw={};function $o(t){const e=Lw[t];return e||Gr(0,t),e}function mY(t,e){Lw[t]||(Lw[t]=e)}var lf;function KO(){return lf}function gY(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function g5(t,e){e&&($o("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function zw(t){Iw(t),t.drafts_.forEach(xY),t.drafts_=null}function Iw(t){t===lf&&(lf=t.parent_)}function x5(t){return lf=gY(lf,t)}function xY(t){const e=t[Ia];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function b5(t,e){e.unfinalizedDrafts_=e.drafts_.length;const r=e.drafts_[0];return t!==void 0&&t!==r?(r[Ia].modified_&&(zw(e),Gr(4)),ts(t)&&(t=sx(e,t),e.parent_||ix(e,t)),e.patches_&&$o("Patches").generateReplacementPatches_(r[Ia].base_,t,e.patches_,e.inversePatches_)):t=sx(e,r,[]),zw(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==R4?t:void 0}function sx(t,e,r){if(g0(e))return e;const a=e[Ia];if(!a)return nf(e,(n,i)=>y5(t,a,e,n,i,r)),e;if(a.scope_!==t)return e;if(!a.modified_)return ix(t,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const n=a.copy_;let i=n,l=!1;a.type_===3&&(i=new Set(n),n.clear(),l=!0),nf(i,(o,c)=>y5(t,a,n,o,c,r,l)),ix(t,n,!1),r&&t.patches_&&$o("Patches").generatePatches_(a,r,t.patches_,t.inversePatches_)}return a.copy_}function y5(t,e,r,a,n,i,l){if(Ms(n)){const o=i&&e&&e.type_!==3&&!sf(e.assigned_,a)?i.concat(a):void 0,c=sx(t,n,o);if(GO(r,a,c),Ms(c))t.canAutoFreeze_=!1;else return}else l&&r.add(n);if(ts(n)&&!g0(n)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;sx(t,n),(!e||!e.scope_.parent_)&&typeof a!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,a)&&ix(t,n)}}function ix(t,e,r=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&_4(e,r)}function bY(t,e){const r=Array.isArray(t),a={type_:r?1:0,scope_:e?e.scope_:KO(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let n=a,i=L4;r&&(n=[a],i=of);const{revoke:l,proxy:o}=Proxy.revocable(n,i);return a.draft_=o,a.revoke_=l,o}var L4={get(t,e){if(e===Ia)return t;const r=ho(t);if(!sf(r,e))return yY(t,r,e);const a=r[e];return t.finalized_||!ts(a)?a:a===Qv(t.base_,e)?(Jv(t),t.copy_[e]=Bw(a,t)):a},has(t,e){return e in ho(t)},ownKeys(t){return Reflect.ownKeys(ho(t))},set(t,e,r){const a=ZO(ho(t),e);if(a?.set)return a.set.call(t.draft_,r),!0;if(!t.modified_){const n=Qv(ho(t),e),i=n?.[Ia];if(i&&i.base_===r)return t.copy_[e]=r,t.assigned_[e]=!1,!0;if(fY(r,n)&&(r!==void 0||sf(t.base_,e)))return!0;Jv(t),Fw(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 Qv(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,Jv(t),Fw(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const r=ho(t),a=Reflect.getOwnPropertyDescriptor(r,e);return a&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:a.enumerable,value:r[e]}},defineProperty(){Gr(11)},getPrototypeOf(t){return Bo(t.base_)},setPrototypeOf(){Gr(12)}},of={};nf(L4,(t,e)=>{of[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}});of.deleteProperty=function(t,e){return of.set.call(this,t,e,void 0)};of.set=function(t,e,r){return L4.set.call(this,t[0],e,r,t[0])};function Qv(t,e){const r=t[Ia];return(r?ho(r):t)[e]}function yY(t,e,r){const a=ZO(e,r);return a?"value"in a?a.value:a.get?.call(t.draft_):void 0}function ZO(t,e){if(!(e in t))return;let r=Bo(t);for(;r;){const a=Object.getOwnPropertyDescriptor(r,e);if(a)return a;r=Bo(r)}}function Fw(t){t.modified_||(t.modified_=!0,t.parent_&&Fw(t.parent_))}function Jv(t){t.copy_||(t.copy_=_w(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var vY=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,r,a)=>{if(typeof e=="function"&&typeof r!="function"){const i=r;r=e;const l=this;return function(c=i,...d){return l.produce(c,h=>r.call(this,h,...d))}}typeof r!="function"&&Gr(6),a!==void 0&&typeof a!="function"&&Gr(7);let n;if(ts(e)){const i=x5(this),l=Bw(e,void 0);let o=!0;try{n=r(l),o=!1}finally{o?zw(i):Iw(i)}return g5(i,a),b5(n,i)}else if(!e||typeof e!="object"){if(n=r(e),n===void 0&&(n=e),n===R4&&(n=void 0),this.autoFreeze_&&_4(n,!0),a){const i=[],l=[];$o("Patches").generateReplacementPatches_(e,n,i,l),a(i,l)}return n}else Gr(1,e)},this.produceWithPatches=(e,r)=>{if(typeof e=="function")return(l,...o)=>this.produceWithPatches(l,c=>e(c,...o));let a,n;return[this.produce(e,r,(l,o)=>{a=l,n=o}),a,n]},typeof t?.autoFreeze=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof t?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){ts(t)||Gr(8),Ms(t)&&(t=mi(t));const e=x5(this),r=Bw(t,void 0);return r[Ia].isManual_=!0,Iw(e),r}finishDraft(t,e){const r=t&&t[Ia];(!r||!r.isManual_)&&Gr(9);const{scope_:a}=r;return g5(a,e),b5(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let r;for(r=e.length-1;r>=0;r--){const n=e[r];if(n.path.length===0&&n.op==="replace"){t=n.value;break}}r>-1&&(e=e.slice(r+1));const a=$o("Patches").applyPatches_;return Ms(t)?a(t,e):this.produce(t,n=>a(n,e))}};function Bw(t,e){const r=Lf(t)?$o("MapSet").proxyMap_(t,e):zf(t)?$o("MapSet").proxySet_(t,e):bY(t,e);return(e?e.scope_:KO()).drafts_.push(r),r}function mi(t){return Ms(t)||Gr(10,t),QO(t)}function QO(t){if(!ts(t)||g0(t))return t;const e=t[Ia];let r;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,r=_w(t,e.scope_.immer_.useStrictShallowCopy_)}else r=_w(t,!0);return nf(r,(a,n)=>{GO(r,a,QO(n))}),e&&(e.finalized_=!1),r}function wY(){const e="replace",a="remove";function n(m,x,b,y){switch(m.type_){case 0:case 2:return l(m,x,b,y);case 1:return i(m,x,b,y);case 3:return o(m,x,b,y)}}function i(m,x,b,y){let{base_:v,assigned_:N}=m,C=m.copy_;C.length<v.length&&([v,C]=[C,v],[b,y]=[y,b]);for(let S=0;S<v.length;S++)if(N[S]&&C[S]!==v[S]){const k=x.concat([S]);b.push({op:e,path:k,value:p(C[S])}),y.push({op:e,path:k,value:p(v[S])})}for(let S=v.length;S<C.length;S++){const k=x.concat([S]);b.push({op:"add",path:k,value:p(C[S])})}for(let S=C.length-1;v.length<=S;--S){const k=x.concat([S]);y.push({op:a,path:k})}}function l(m,x,b,y){const{base_:v,copy_:N}=m;nf(m.assigned_,(C,S)=>{const k=Zv(v,C),A=Zv(N,C),T=S?sf(v,C)?e:"add":a;if(k===A&&T===e)return;const M=x.concat(C);b.push(T===a?{op:T,path:M}:{op:T,path:M,value:A}),y.push(T==="add"?{op:a,path:M}:T===a?{op:"add",path:M,value:p(k)}:{op:e,path:M,value:p(k)})})}function o(m,x,b,y){let{base_:v,copy_:N}=m,C=0;v.forEach(S=>{if(!N.has(S)){const k=x.concat([C]);b.push({op:a,path:k,value:S}),y.unshift({op:"add",path:k,value:S})}C++}),C=0,N.forEach(S=>{if(!v.has(S)){const k=x.concat([C]);b.push({op:"add",path:k,value:S}),y.unshift({op:a,path:k,value:S})}C++})}function c(m,x,b,y){b.push({op:e,path:[],value:x===R4?void 0:x}),y.push({op:e,path:[],value:m})}function d(m,x){return x.forEach(b=>{const{path:y,op:v}=b;let N=m;for(let A=0;A<y.length-1;A++){const T=Ho(N);let M=y[A];typeof M!="string"&&typeof M!="number"&&(M=""+M),(T===0||T===1)&&(M==="__proto__"||M==="constructor")&&Gr(19),typeof N=="function"&&M==="prototype"&&Gr(19),N=Zv(N,M),typeof N!="object"&&Gr(18,y.join("/"))}const C=Ho(N),S=h(b.value),k=y[y.length-1];switch(v){case e:switch(C){case 2:return N.set(k,S);case 3:Gr(16);default:return N[k]=S}case"add":switch(C){case 1:return k==="-"?N.push(S):N.splice(k,0,S);case 2:return N.set(k,S);case 3:return N.add(S);default:return N[k]=S}case a:switch(C){case 1:return N.splice(k,1);case 2:return N.delete(k);case 3:return N.delete(b.value);default:return delete N[k]}default:Gr(17,v)}}),m}function h(m){if(!ts(m))return m;if(Array.isArray(m))return m.map(h);if(Lf(m))return new Map(Array.from(m.entries()).map(([b,y])=>[b,h(y)]));if(zf(m))return new Set(Array.from(m).map(h));const x=Object.create(Bo(m));for(const b in m)x[b]=h(m[b]);return sf(m,Ih)&&(x[Ih]=m[Ih]),x}function p(m){return Ms(m)?h(m):m}mY("Patches",{applyPatches_:d,generatePatches_:n,generateReplacementPatches_:c})}var on=new vY,If=on.produce,JO=on.produceWithPatches.bind(on);on.setAutoFreeze.bind(on);on.setUseStrictShallowCopy.bind(on);var v5=on.applyPatches.bind(on);on.createDraft.bind(on);on.finishDraft.bind(on);function jY(t,e=`expected a function, instead received ${typeof t}`){if(typeof t!="function")throw new TypeError(e)}function NY(t,e=`expected an object, instead received ${typeof t}`){if(typeof t!="object")throw new TypeError(e)}function SY(t,e="expected all items to be functions, instead received the following types: "){if(!t.every(r=>typeof r=="function")){const r=t.map(a=>typeof a=="function"?`function ${a.name||"unnamed"}()`:typeof a).join(", ");throw new TypeError(`${e}[${r}]`)}}var w5=t=>Array.isArray(t)?t:[t];function CY(t){const e=Array.isArray(t[0])?t[0]:t;return SY(e,"createSelector expects all input-selectors to be functions, but received the following types: "),e}function AY(t,e){const r=[],{length:a}=t;for(let n=0;n<a;n++)r.push(t[n].apply(null,e));return r}var kY=class{constructor(t){this.value=t}deref(){return this.value}},DY=typeof WeakRef<"u"?WeakRef:kY,TY=0,j5=1;function Fm(){return{s:TY,v:void 0,o:null,p:null}}function lx(t,e={}){let r=Fm();const{resultEqualityCheck:a}=e;let n,i=0;function l(){let o=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 b=o.o;b===null&&(o.o=b=new WeakMap);const y=b.get(x);y===void 0?(o=Fm(),b.set(x,o)):o=y}else{let b=o.p;b===null&&(o.p=b=new Map);const y=b.get(x);y===void 0?(o=Fm(),b.set(x,o)):o=y}}const d=o;let h;if(o.s===j5)h=o.v;else if(h=t.apply(null,arguments),i++,a){const p=n?.deref?.()??n;p!=null&&a(p,h)&&(h=p,i!==0&&i--),n=typeof h=="object"&&h!==null||typeof h=="function"?new DY(h):h}return d.s=j5,d.v=h,h}return l.clearCache=()=>{r=Fm(),l.resetResultsCount()},l.resultsCount=()=>i,l.resetResultsCount=()=>{i=0},l}function MY(t,...e){const r=typeof t=="function"?{memoize:t,memoizeOptions:e}:t,a=(...n)=>{let i=0,l=0,o,c={},d=n.pop();typeof d=="object"&&(c=d,d=n.pop()),jY(d,`createSelector expects an output function after the inputs, but received: [${typeof d}]`);const h={...r,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:x=lx,argsMemoizeOptions:b=[]}=h,y=w5(m),v=w5(b),N=CY(n),C=p(function(){return i++,d.apply(null,arguments)},...y),S=x(function(){l++;const A=AY(N,arguments);return o=C.apply(null,A),o},...v);return Object.assign(S,{resultFunc:d,memoizedResultFunc:C,dependencies:N,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>o,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:p,argsMemoize:x})};return Object.assign(a,{withTypes:()=>a}),a}var de=MY(lx),EY=Object.assign((t,e=de)=>{NY(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),a=r.map(i=>t[i]);return e(a,(...i)=>i.reduce((l,o,c)=>(l[r[c]]=o,l),{}))},{withTypes:()=>EY});function e8(t){return({dispatch:r,getState:a})=>n=>i=>typeof i=="function"?i(r,a,t):n(i)}var PY=e8(),OY=e8,RY=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?nx:nx.apply(null,arguments)},_Y=t=>t&&typeof t.match=="function";function ur(t,e){function r(...a){if(e){let n=e(...a);if(!n)throw new Error(xa(0));return{type:t,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:t,payload:a[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=a=>O4(a)&&a.type===t,r}var t8=class kh extends Array{constructor(...e){super(...e),Object.setPrototypeOf(this,kh.prototype)}static get[Symbol.species](){return kh}concat(...e){return super.concat.apply(this,e)}prepend(...e){return e.length===1&&Array.isArray(e[0])?new kh(...e[0].concat(this)):new kh(...e.concat(this))}};function N5(t){return ts(t)?If(t,()=>{}):t}function Bm(t,e,r){return t.has(e)?t.get(e):t.set(e,r(e)).get(e)}function LY(t){return typeof t=="boolean"}var zY=()=>function(e){const{thunk:r=!0,immutableCheck:a=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{};let l=new t8;return r&&(LY(r)?l.push(PY):l.push(OY(r.extraArgument))),l},x0="RTK_autoBatch",ih=()=>t=>({payload:t,meta:{[x0]:!0}}),S5=t=>e=>{setTimeout(e,t)},IY=(t={type:"raf"})=>e=>(...r)=>{const a=e(...r);let n=!0,i=!1,l=!1;const o=new Set,c=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:S5(10):t.type==="callback"?t.queueNotification:S5(t.timeout),d=()=>{l=!1,i&&(i=!1,o.forEach(h=>h()))};return Object.assign({},a,{subscribe(h){const p=()=>n&&h(),m=a.subscribe(p);return o.add(h),()=>{m(),o.delete(h)}},dispatch(h){try{return n=!h?.meta?.[x0],i=!n,i&&(l||(l=!0,c(d))),a.dispatch(h)}finally{n=!0}}})},FY=t=>function(r){const{autoBatch:a=!0}=r??{};let n=new t8(t);return a&&n.push(IY(typeof a=="object"?a:void 0)),n};function r8(t){const e=zY(),{reducer:r=void 0,middleware:a,devTools:n=!0,duplicateMiddlewareCheck:i=!0,preloadedState:l=void 0,enhancers:o=void 0}=t||{};let c;if(typeof r=="function")c=r;else if(xl(r))c=P4(r);else throw new Error(xa(1));let d;typeof a=="function"?d=a(e):d=e();let h=nx;n&&(h=RY({trace:!1,...typeof n=="object"&&n}));const p=dY(...d),m=FY(p);let x=typeof o=="function"?o(m):m();const b=h(...x);return VO(c,l,b)}function a8(t){const e={},r=[];let a;const n={addCase(i,l){const o=typeof i=="string"?i:i.type;if(!o)throw new Error(xa(28));if(o in e)throw new Error(xa(29));return e[o]=l,n},addMatcher(i,l){return r.push({matcher:i,reducer:l}),n},addDefaultCase(i){return a=i,n}};return t(n),[e,r,a]}function BY(t){return typeof t=="function"}function HY(t,e){let[r,a,n]=a8(e),i;if(BY(t))i=()=>N5(t());else{const o=N5(t);i=()=>o}function l(o=i(),c){let d=[r[c.type],...a.filter(({matcher:h})=>h(c)).map(({reducer:h})=>h)];return d.filter(h=>!!h).length===0&&(d=[n]),d.reduce((h,p)=>{if(p)if(Ms(h)){const x=p(h,c);return x===void 0?h:x}else{if(ts(h))return If(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},o)}return l.getInitialState=i,l}var n8=(t,e)=>_Y(t)?t.match(e):t(e);function bi(...t){return e=>t.some(r=>n8(r,e))}function Fh(...t){return e=>t.every(r=>n8(r,e))}function b0(t,e){if(!t||!t.meta)return!1;const r=typeof t.meta.requestId=="string",a=e.indexOf(t.meta.requestStatus)>-1;return r&&a}function Ff(t){return typeof t[0]=="function"&&"pending"in t[0]&&"fulfilled"in t[0]&&"rejected"in t[0]}function z4(...t){return t.length===0?e=>b0(e,["pending"]):Ff(t)?bi(...t.map(e=>e.pending)):z4()(t[0])}function bd(...t){return t.length===0?e=>b0(e,["rejected"]):Ff(t)?bi(...t.map(e=>e.rejected)):bd()(t[0])}function y0(...t){const e=r=>r&&r.meta&&r.meta.rejectedWithValue;return t.length===0?Fh(bd(...t),e):Ff(t)?Fh(bd(...t),e):y0()(t[0])}function bl(...t){return t.length===0?e=>b0(e,["fulfilled"]):Ff(t)?bi(...t.map(e=>e.fulfilled)):bl()(t[0])}function Hw(...t){return t.length===0?e=>b0(e,["pending","fulfilled","rejected"]):Ff(t)?bi(...t.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):Hw()(t[0])}var $Y="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",v0=(t=21)=>{let e="",r=t;for(;r--;)e+=$Y[Math.random()*64|0];return e},YY=["name","message","stack","code"],e1=class{constructor(t,e){this.payload=t,this.meta=e}_type},C5=class{constructor(t,e){this.payload=t,this.meta=e}_type},UY=t=>{if(typeof t=="object"&&t!==null){const e={};for(const r of YY)typeof t[r]=="string"&&(e[r]=t[r]);return e}return{message:String(t)}},A5="External signal was aborted",Jt=(()=>{function t(e,r,a){const n=ur(e+"/fulfilled",(c,d,h,p)=>({payload:c,meta:{...p||{},arg:h,requestId:d,requestStatus:"fulfilled"}})),i=ur(e+"/pending",(c,d,h)=>({payload:void 0,meta:{...h||{},arg:d,requestId:c,requestStatus:"pending"}})),l=ur(e+"/rejected",(c,d,h,p,m)=>({payload:p,error:(a&&a.serializeError||UY)(c||"Rejected"),meta:{...m||{},arg:h,requestId:d,rejectedWithValue:!!p,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function o(c,{signal:d}={}){return(h,p,m)=>{const x=a?.idGenerator?a.idGenerator(c):v0(),b=new AbortController;let y,v;function N(S){v=S,b.abort()}d&&(d.aborted?N(A5):d.addEventListener("abort",()=>N(A5),{once:!0}));const C=async function(){let S;try{let A=a?.condition?.(c,{getState:p,extra:m});if(XY(A)&&(A=await A),A===!1||b.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((M,O)=>{y=()=>{O({name:"AbortError",message:v||"Aborted"})},b.signal.addEventListener("abort",y)});h(i(x,c,a?.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:b.signal,abort:N,rejectWithValue:(M,O)=>new e1(M,O),fulfillWithValue:(M,O)=>new C5(M,O)})).then(M=>{if(M instanceof e1)throw M;return M instanceof C5?n(M.payload,x,c,M.meta):n(M,x,c)})])}catch(A){S=A instanceof e1?l(null,x,c,A.payload,A.meta):l(A,x,c)}finally{y&&b.signal.removeEventListener("abort",y)}return a&&!a.dispatchConditionRejection&&l.match(S)&&S.meta.condition||h(S),S}();return Object.assign(C,{abort:N,requestId:x,arg:c,unwrap(){return C.then(WY)}})}}return Object.assign(o,{pending:i,rejected:l,fulfilled:n,settled:bi(l,n),typePrefix:e})}return t.withTypes=()=>t,t})();function WY(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function XY(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var VY=Symbol.for("rtk-slice-createasyncthunk");function qY(t,e){return`${t}/${e}`}function GY({creators:t}={}){const e=t?.asyncThunk?.[VY];return function(a){const{name:n,reducerPath:i=n}=a;if(!n)throw new Error(xa(11));const l=(typeof a.reducers=="function"?a.reducers(ZY()):a.reducers)||{},o=Object.keys(l),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(S,k){const A=typeof S=="string"?S:S.type;if(!A)throw new Error(xa(12));if(A in c.sliceCaseReducersByType)throw new Error(xa(13));return c.sliceCaseReducersByType[A]=k,d},addMatcher(S,k){return c.sliceMatchers.push({matcher:S,reducer:k}),d},exposeAction(S,k){return c.actionCreators[S]=k,d},exposeCaseReducer(S,k){return c.sliceCaseReducersByName[S]=k,d}};o.forEach(S=>{const k=l[S],A={reducerName:S,type:qY(n,S),createNotation:typeof a.reducers=="function"};JY(k)?tU(A,k,d,e):QY(A,k,d)});function h(){const[S={},k=[],A=void 0]=typeof a.extraReducers=="function"?a8(a.extraReducers):[a.extraReducers],T={...S,...c.sliceCaseReducersByType};return HY(a.initialState,M=>{for(let O in T)M.addCase(O,T[O]);for(let O of c.sliceMatchers)M.addMatcher(O.matcher,O.reducer);for(let O of k)M.addMatcher(O.matcher,O.reducer);A&&M.addDefaultCase(A)})}const p=S=>S,m=new Map,x=new WeakMap;let b;function y(S,k){return b||(b=h()),b(S,k)}function v(){return b||(b=h()),b.getInitialState()}function N(S,k=!1){function A(M){let O=M[S];return typeof O>"u"&&k&&(O=Bm(x,A,v)),O}function T(M=p){const O=Bm(m,k,()=>new WeakMap);return Bm(O,M,()=>{const _={};for(const[R,L]of Object.entries(a.selectors??{}))_[R]=KY(L,M,()=>Bm(x,M,v),k);return _})}return{reducerPath:S,getSelectors:T,get selectors(){return T(A)},selectSlice:A}}const C={name:n,reducer:y,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:v,...N(i),injectInto(S,{reducerPath:k,...A}={}){const T=k??i;return S.inject({reducerPath:T,reducer:y},A),{...C,...N(T,!0)}}};return C}}function KY(t,e,r,a){function n(i,...l){let o=e(i);return typeof o>"u"&&a&&(o=r()),t(o,...l)}return n.unwrapped=t,n}var Yt=GY();function ZY(){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 QY({type:t,reducerName:e,createNotation:r},a,n){let i,l;if("reducer"in a){if(r&&!eU(a))throw new Error(xa(17));i=a.reducer,l=a.prepare}else i=a;n.addCase(t,i).exposeCaseReducer(e,i).exposeAction(e,l?ur(t,l):ur(t))}function JY(t){return t._reducerDefinitionType==="asyncThunk"}function eU(t){return t._reducerDefinitionType==="reducerWithPrepare"}function tU({type:t,reducerName:e},r,a,n){if(!n)throw new Error(xa(18));const{payloadCreator:i,fulfilled:l,pending:o,rejected:c,settled:d,options:h}=r,p=n(t,i,h);a.exposeAction(e,p),l&&a.addCase(p.fulfilled,l),o&&a.addCase(p.pending,o),c&&a.addCase(p.rejected,c),d&&a.addMatcher(p.settled,d),a.exposeCaseReducer(e,{fulfilled:l||Hm,pending:o||Hm,rejected:c||Hm,settled:d||Hm})}function Hm(){}var rU="task",s8="listener",i8="completed",I4="cancelled",aU=`task-${I4}`,nU=`task-${i8}`,$w=`${s8}-${I4}`,sU=`${s8}-${i8}`,w0=class{constructor(t){this.code=t,this.message=`${rU} ${I4} (reason: ${t})`}name="TaskAbortError";message},F4=(t,e)=>{if(typeof t!="function")throw new TypeError(xa(32))},ox=()=>{},l8=(t,e=ox)=>(t.catch(e),t),o8=(t,e)=>(t.addEventListener("abort",e,{once:!0}),()=>t.removeEventListener("abort",e)),Eo=(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))},Po=t=>{if(t.aborted){const{reason:e}=t;throw new w0(e)}};function c8(t,e){let r=ox;return new Promise((a,n)=>{const i=()=>n(new w0(t.reason));if(t.aborted){i();return}r=o8(t,i),e.finally(()=>r()).then(a,n)}).finally(()=>{r=ox})}var iU=async(t,e)=>{try{return await Promise.resolve(),{status:"ok",value:await t()}}catch(r){return{status:r instanceof w0?"cancelled":"rejected",error:r}}finally{e?.()}},cx=t=>e=>l8(c8(t,e).then(r=>(Po(t),r))),d8=t=>{const e=cx(t);return r=>e(new Promise(a=>setTimeout(a,r)))},{assign:od}=Object,k5={},j0="listenerMiddleware",lU=(t,e)=>{const r=a=>o8(t,()=>Eo(a,t.reason));return(a,n)=>{F4(a);const i=new AbortController;r(i);const l=iU(async()=>{Po(t),Po(i.signal);const o=await a({pause:cx(i.signal),delay:d8(i.signal),signal:i.signal});return Po(i.signal),o},()=>Eo(i,nU));return n?.autoJoin&&e.push(l.catch(ox)),{result:cx(t)(l),cancel(){Eo(i,aU)}}}},oU=(t,e)=>{const r=async(a,n)=>{Po(e);let i=()=>{};const o=[new Promise((c,d)=>{let h=t({predicate:a,effect:(p,m)=>{m.unsubscribe(),c([p,m.getState(),m.getOriginalState()])}});i=()=>{h(),d()}})];n!=null&&o.push(new Promise(c=>setTimeout(c,n,null)));try{const c=await c8(e,Promise.race(o));return Po(e),c}finally{i()}};return(a,n)=>l8(r(a,n))},u8=t=>{let{type:e,actionCreator:r,matcher:a,predicate:n,effect:i}=t;if(e)n=ur(e).match;else if(r)e=r.type,n=r.match;else if(a)n=a;else if(!n)throw new Error(xa(21));return F4(i),{predicate:n,type:e,effect:i}},h8=od(t=>{const{type:e,predicate:r,effect:a}=u8(t);return{id:v0(),effect:a,type:e,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(xa(22))}}},{withTypes:()=>h8}),D5=(t,e)=>{const{type:r,effect:a,predicate:n}=u8(e);return Array.from(t.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===n)&&i.effect===a)},Yw=t=>{t.pending.forEach(e=>{Eo(e,$w)})},cU=t=>()=>{t.forEach(Yw),t.clear()},T5=(t,e,r)=>{try{t(e,r)}catch(a){setTimeout(()=>{throw a},0)}},f8=od(ur(`${j0}/add`),{withTypes:()=>f8}),dU=ur(`${j0}/removeAll`),p8=od(ur(`${j0}/remove`),{withTypes:()=>p8}),uU=(...t)=>{console.error(`${j0}/error`,...t)},Bf=(t={})=>{const e=new Map,{extra:r,onError:a=uU}=t;F4(a);const n=h=>(h.unsubscribe=()=>e.delete(h.id),e.set(h.id,h),p=>{h.unsubscribe(),p?.cancelActive&&Yw(h)}),i=h=>{const p=D5(e,h)??h8(h);return n(p)};od(i,{withTypes:()=>i});const l=h=>{const p=D5(e,h);return p&&(p.unsubscribe(),h.cancelActive&&Yw(p)),!!p};od(l,{withTypes:()=>l});const o=async(h,p,m,x)=>{const b=new AbortController,y=oU(i,b.signal),v=[];try{h.pending.add(b),await Promise.resolve(h.effect(p,od({},m,{getOriginalState:x,condition:(N,C)=>y(N,C).then(Boolean),take:y,delay:d8(b.signal),pause:cx(b.signal),extra:r,signal:b.signal,fork:lU(b.signal,v),unsubscribe:h.unsubscribe,subscribe:()=>{e.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((N,C,S)=>{N!==b&&(Eo(N,$w),S.delete(N))})},cancel:()=>{Eo(b,$w),h.pending.delete(b)},throwIfCancelled:()=>{Po(b.signal)}})))}catch(N){N instanceof w0||T5(a,N,{raisedBy:"effect"})}finally{await Promise.all(v),Eo(b,sU),h.pending.delete(b)}},c=cU(e);return{middleware:h=>p=>m=>{if(!O4(m))return p(m);if(f8.match(m))return i(m.payload);if(dU.match(m)){c();return}if(p8.match(m))return l(m.payload);let x=h.getState();const b=()=>{if(x===k5)throw new Error(xa(23));return x};let y;try{if(y=p(m),e.size>0){const v=h.getState(),N=Array.from(e.values());for(const C of N){let S=!1;try{S=C.predicate(m,v,x)}catch(k){S=!1,T5(a,k,{raisedBy:"predicate"})}S&&o(C,m,h,b)}}}finally{x=k5}return y},startListening:i,stopListening:l,clearListeners:c}};function xa(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 cf=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}},M5=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}},Bh=()=>{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&&cf(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}}},hU={user:Bh().user,token:Bh().token,isAuthenticated:!!Bh().token,loading:!1,error:null,sessionExpired:!1},m8=Yt({name:"auth",initialState:hU,reducers:{setCredentials:(t,e)=>{const{token:r,user:a,rememberMe:n=!1}=e.payload;t.token=r,t.user=a,t.isAuthenticated=!0,t.error=null,t.sessionExpired=!1;const i=n?localStorage:sessionStorage;i.setItem("token",r),a&&i.setItem("user",JSON.stringify(a)),localStorage.setItem("token",r),a&&localStorage.setItem("user",JSON.stringify(a))},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}=Bh();!e||!cf(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}=Bh();e&&r&&cf(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:g8,logout:yd,clearSessionExpired:x2e,setError:E5,setLoading:P5,checkTokenValidity:O5,recoverSession:b2e,updateLastActivity:y2e}=m8.actions,fU=m8.reducer,ke=({children:t})=>{const{isAuthenticated:e,token:r}=un(n=>n.auth),a=hr();if(!e||!r)return s.jsx(Xv,{to:"/",state:{from:a},replace:!0});try{if(r){const n=JSON.parse(atob(r.split(".")[1])),i=Date.now()/1e3;if(n.exp&&n.exp<i)return localStorage.removeItem("token"),s.jsx(Xv,{to:"/",state:{from:a},replace:!0})}}catch(n){return console.error("Invalid token format:",n),localStorage.removeItem("token"),s.jsx(Xv,{to:"/",state:{from:a},replace:!0})}return t},pU="modulepreload",mU=function(t,e){return new URL(t,e).href},R5={},gU=function(e,r,a){let n=Promise.resolve();if(r&&r.length>0){let d=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};const l=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),c=o?.nonce||o?.getAttribute("nonce");n=d(r.map(h=>{if(h=mU(h,a),h in R5)return;R5[h]=!0;const p=h.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(!!a)for(let y=l.length-1;y>=0;y--){const v=l[y];if(v.href===h&&(!p||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${h}"]${m}`))return;const b=document.createElement("link");if(b.rel=p?"stylesheet":pU,p||(b.as="script"),b.crossOrigin="",b.href=h,c&&b.setAttribute("nonce",c),document.head.appendChild(b),p)return new Promise((y,v)=>{b.addEventListener("load",y),b.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function i(l){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l}return n.then(l=>{for(const o of l||[])o.status==="rejected"&&i(o.reason);return e().catch(i)})};function x8(t,e){return function(){return t.apply(e,arguments)}}const{toString:xU}=Object.prototype,{getPrototypeOf:B4}=Object,{iterator:N0,toStringTag:b8}=Symbol,S0=(t=>e=>{const r=xU.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ls=t=>(t=t.toLowerCase(),e=>S0(e)===t),C0=t=>e=>typeof e===t,{isArray:Id}=Array,df=C0("undefined");function Hf(t){return t!==null&&!df(t)&&t.constructor!==null&&!df(t.constructor)&&_a(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const y8=ls("ArrayBuffer");function bU(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&y8(t.buffer),e}const yU=C0("string"),_a=C0("function"),v8=C0("number"),$f=t=>t!==null&&typeof t=="object",vU=t=>t===!0||t===!1,Dg=t=>{if(S0(t)!=="object")return!1;const e=B4(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(b8 in t)&&!(N0 in t)},wU=t=>{if(!$f(t)||Hf(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},jU=ls("Date"),NU=ls("File"),SU=ls("Blob"),CU=ls("FileList"),AU=t=>$f(t)&&_a(t.pipe),kU=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_a(t.append)&&((e=S0(t))==="formdata"||e==="object"&&_a(t.toString)&&t.toString()==="[object FormData]"))},DU=ls("URLSearchParams"),[TU,MU,EU,PU]=["ReadableStream","Request","Response","Headers"].map(ls),OU=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yf(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let a,n;if(typeof t!="object"&&(t=[t]),Id(t))for(a=0,n=t.length;a<n;a++)e.call(null,t[a],a,t);else{if(Hf(t))return;const i=r?Object.getOwnPropertyNames(t):Object.keys(t),l=i.length;let o;for(a=0;a<l;a++)o=i[a],e.call(null,t[o],o,t)}}function w8(t,e){if(Hf(t))return null;e=e.toLowerCase();const r=Object.keys(t);let a=r.length,n;for(;a-- >0;)if(n=r[a],e===n.toLowerCase())return n;return null}const yo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,j8=t=>!df(t)&&t!==yo;function Uw(){const{caseless:t}=j8(this)&&this||{},e={},r=(a,n)=>{const i=t&&w8(e,n)||n;Dg(e[i])&&Dg(a)?e[i]=Uw(e[i],a):Dg(a)?e[i]=Uw({},a):Id(a)?e[i]=a.slice():e[i]=a};for(let a=0,n=arguments.length;a<n;a++)arguments[a]&&Yf(arguments[a],r);return e}const RU=(t,e,r,{allOwnKeys:a}={})=>(Yf(e,(n,i)=>{r&&_a(n)?t[i]=x8(n,r):t[i]=n},{allOwnKeys:a}),t),_U=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),LU=(t,e,r,a)=>{t.prototype=Object.create(e.prototype,a),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},zU=(t,e,r,a)=>{let n,i,l;const o={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),i=n.length;i-- >0;)l=n[i],(!a||a(l,t,e))&&!o[l]&&(e[l]=t[l],o[l]=!0);t=r!==!1&&B4(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},IU=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const a=t.indexOf(e,r);return a!==-1&&a===r},FU=t=>{if(!t)return null;if(Id(t))return t;let e=t.length;if(!v8(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},BU=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&B4(Uint8Array)),HU=(t,e)=>{const a=(t&&t[N0]).call(t);let n;for(;(n=a.next())&&!n.done;){const i=n.value;e.call(t,i[0],i[1])}},$U=(t,e)=>{let r;const a=[];for(;(r=t.exec(e))!==null;)a.push(r);return a},YU=ls("HTMLFormElement"),UU=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,a,n){return a.toUpperCase()+n}),_5=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),WU=ls("RegExp"),N8=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),a={};Yf(r,(n,i)=>{let l;(l=e(n,i,t))!==!1&&(a[i]=l||n)}),Object.defineProperties(t,a)},XU=t=>{N8(t,(e,r)=>{if(_a(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const a=t[r];if(_a(a)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},VU=(t,e)=>{const r={},a=n=>{n.forEach(i=>{r[i]=!0})};return Id(t)?a(t):a(String(t).split(e)),r},qU=()=>{},GU=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function KU(t){return!!(t&&_a(t.append)&&t[b8]==="FormData"&&t[N0])}const ZU=t=>{const e=new Array(10),r=(a,n)=>{if($f(a)){if(e.indexOf(a)>=0)return;if(Hf(a))return a;if(!("toJSON"in a)){e[n]=a;const i=Id(a)?[]:{};return Yf(a,(l,o)=>{const c=r(l,n+1);!df(c)&&(i[o]=c)}),e[n]=void 0,i}}return a};return r(t,0)},QU=ls("AsyncFunction"),JU=t=>t&&($f(t)||_a(t))&&_a(t.then)&&_a(t.catch),S8=((t,e)=>t?setImmediate:e?((r,a)=>(yo.addEventListener("message",({source:n,data:i})=>{n===yo&&i===r&&a.length&&a.shift()()},!1),n=>{a.push(n),yo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",_a(yo.postMessage)),eW=typeof queueMicrotask<"u"?queueMicrotask.bind(yo):typeof process<"u"&&process.nextTick||S8,tW=t=>t!=null&&_a(t[N0]),ce={isArray:Id,isArrayBuffer:y8,isBuffer:Hf,isFormData:kU,isArrayBufferView:bU,isString:yU,isNumber:v8,isBoolean:vU,isObject:$f,isPlainObject:Dg,isEmptyObject:wU,isReadableStream:TU,isRequest:MU,isResponse:EU,isHeaders:PU,isUndefined:df,isDate:jU,isFile:NU,isBlob:SU,isRegExp:WU,isFunction:_a,isStream:AU,isURLSearchParams:DU,isTypedArray:BU,isFileList:CU,forEach:Yf,merge:Uw,extend:RU,trim:OU,stripBOM:_U,inherits:LU,toFlatObject:zU,kindOf:S0,kindOfTest:ls,endsWith:IU,toArray:FU,forEachEntry:HU,matchAll:$U,isHTMLForm:YU,hasOwnProperty:_5,hasOwnProp:_5,reduceDescriptors:N8,freezeMethods:XU,toObjectSet:VU,toCamelCase:UU,noop:qU,toFiniteNumber:GU,findKey:w8,global:yo,isContextDefined:j8,isSpecCompliantForm:KU,toJSONObject:ZU,isAsyncFn:QU,isThenable:JU,setImmediate:S8,asap:eW,isIterable:tW};function Ge(t,e,r,a,n){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),a&&(this.request=a),n&&(this.response=n,this.status=n.status?n.status:null)}ce.inherits(Ge,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 C8=Ge.prototype,A8={};["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=>{A8[t]={value:t}});Object.defineProperties(Ge,A8);Object.defineProperty(C8,"isAxiosError",{value:!0});Ge.from=(t,e,r,a,n,i)=>{const l=Object.create(C8);return ce.toFlatObject(t,l,function(c){return c!==Error.prototype},o=>o!=="isAxiosError"),Ge.call(l,t.message,e,r,a,n),l.cause=t,l.name=t.name,i&&Object.assign(l,i),l};const rW=null;function Ww(t){return ce.isPlainObject(t)||ce.isArray(t)}function k8(t){return ce.endsWith(t,"[]")?t.slice(0,-2):t}function L5(t,e,r){return t?t.concat(e).map(function(n,i){return n=k8(n),!r&&i?"["+n+"]":n}).join(r?".":""):e}function aW(t){return ce.isArray(t)&&!t.some(Ww)}const nW=ce.toFlatObject(ce,{},null,function(e){return/^is[A-Z]/.test(e)});function A0(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(y,v){return!ce.isUndefined(v[y])});const a=r.metaTokens,n=r.visitor||h,i=r.dots,l=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(e);if(!ce.isFunction(n))throw new TypeError("visitor must be a function");function d(b){if(b===null)return"";if(ce.isDate(b))return b.toISOString();if(ce.isBoolean(b))return b.toString();if(!c&&ce.isBlob(b))throw new Ge("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(b)||ce.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function h(b,y,v){let N=b;if(b&&!v&&typeof b=="object"){if(ce.endsWith(y,"{}"))y=a?y:y.slice(0,-2),b=JSON.stringify(b);else if(ce.isArray(b)&&aW(b)||(ce.isFileList(b)||ce.endsWith(y,"[]"))&&(N=ce.toArray(b)))return y=k8(y),N.forEach(function(S,k){!(ce.isUndefined(S)||S===null)&&e.append(l===!0?L5([y],k,i):l===null?y:y+"[]",d(S))}),!1}return Ww(b)?!0:(e.append(L5(v,y,i),d(b)),!1)}const p=[],m=Object.assign(nW,{defaultVisitor:h,convertValue:d,isVisitable:Ww});function x(b,y){if(!ce.isUndefined(b)){if(p.indexOf(b)!==-1)throw Error("Circular reference detected in "+y.join("."));p.push(b),ce.forEach(b,function(N,C){(!(ce.isUndefined(N)||N===null)&&n.call(e,N,ce.isString(C)?C.trim():C,y,m))===!0&&x(N,y?y.concat(C):[C])}),p.pop()}}if(!ce.isObject(t))throw new TypeError("data must be an object");return x(t),e}function z5(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(a){return e[a]})}function H4(t,e){this._pairs=[],t&&A0(t,this,e)}const D8=H4.prototype;D8.append=function(e,r){this._pairs.push([e,r])};D8.toString=function(e){const r=e?function(a){return e.call(this,a,z5)}:z5;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};function sW(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function T8(t,e,r){if(!e)return t;const a=r&&r.encode||sW;ce.isFunction(r)&&(r={serialize:r});const n=r&&r.serialize;let i;if(n?i=n(e,r):i=ce.isURLSearchParams(e)?e.toString():new H4(e,r).toString(a),i){const l=t.indexOf("#");l!==-1&&(t=t.slice(0,l)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class I5{constructor(){this.handlers=[]}use(e,r,a){return this.handlers.push({fulfilled:e,rejected:r,synchronous:a?a.synchronous:!1,runWhen:a?a.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(a){a!==null&&e(a)})}}const M8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},iW=typeof URLSearchParams<"u"?URLSearchParams:H4,lW=typeof FormData<"u"?FormData:null,oW=typeof Blob<"u"?Blob:null,cW={isBrowser:!0,classes:{URLSearchParams:iW,FormData:lW,Blob:oW},protocols:["http","https","file","blob","url","data"]},$4=typeof window<"u"&&typeof document<"u",Xw=typeof navigator=="object"&&navigator||void 0,dW=$4&&(!Xw||["ReactNative","NativeScript","NS"].indexOf(Xw.product)<0),uW=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hW=$4&&window.location.href||"http://localhost",fW=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:$4,hasStandardBrowserEnv:dW,hasStandardBrowserWebWorkerEnv:uW,navigator:Xw,origin:hW},Symbol.toStringTag,{value:"Module"})),ca={...fW,...cW};function pW(t,e){return A0(t,new ca.classes.URLSearchParams,{visitor:function(r,a,n,i){return ca.isNode&&ce.isBuffer(r)?(this.append(a,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function mW(t){return ce.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function gW(t){const e={},r=Object.keys(t);let a;const n=r.length;let i;for(a=0;a<n;a++)i=r[a],e[i]=t[i];return e}function E8(t){function e(r,a,n,i){let l=r[i++];if(l==="__proto__")return!0;const o=Number.isFinite(+l),c=i>=r.length;return l=!l&&ce.isArray(n)?n.length:l,c?(ce.hasOwnProp(n,l)?n[l]=[n[l],a]:n[l]=a,!o):((!n[l]||!ce.isObject(n[l]))&&(n[l]=[]),e(r,a,n[l],i)&&ce.isArray(n[l])&&(n[l]=gW(n[l])),!o)}if(ce.isFormData(t)&&ce.isFunction(t.entries)){const r={};return ce.forEachEntry(t,(a,n)=>{e(mW(a),n,r,0)}),r}return null}function xW(t,e,r){if(ce.isString(t))try{return(e||JSON.parse)(t),ce.trim(t)}catch(a){if(a.name!=="SyntaxError")throw a}return(r||JSON.stringify)(t)}const Uf={transitional:M8,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const a=r.getContentType()||"",n=a.indexOf("application/json")>-1,i=ce.isObject(e);if(i&&ce.isHTMLForm(e)&&(e=new FormData(e)),ce.isFormData(e))return n?JSON.stringify(E8(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 o;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return pW(e,this.formSerializer).toString();if((o=ce.isFileList(e))||a.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return A0(o?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||n?(r.setContentType("application/json",!1),xW(e)):e}],transformResponse:[function(e){const r=this.transitional||Uf.transitional,a=r&&r.forcedJSONParsing,n=this.responseType==="json";if(ce.isResponse(e)||ce.isReadableStream(e))return e;if(e&&ce.isString(e)&&(a&&!this.responseType||n)){const l=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(o){if(l)throw o.name==="SyntaxError"?Ge.from(o,Ge.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ca.classes.FormData,Blob:ca.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=>{Uf.headers[t]={}});const bW=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"]),yW=t=>{const e={};let r,a,n;return t&&t.split(`
`).forEach(function(l){n=l.indexOf(":"),r=l.substring(0,n).trim().toLowerCase(),a=l.substring(n+1).trim(),!(!r||e[r]&&bW[r])&&(r==="set-cookie"?e[r]?e[r].push(a):e[r]=[a]:e[r]=e[r]?e[r]+", "+a:a)}),e},F5=Symbol("internals");function lh(t){return t&&String(t).trim().toLowerCase()}function Tg(t){return t===!1||t==null?t:ce.isArray(t)?t.map(Tg):String(t)}function vW(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=r.exec(t);)e[a[1]]=a[2];return e}const wW=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function t1(t,e,r,a,n){if(ce.isFunction(a))return a.call(this,e,r);if(n&&(e=r),!!ce.isString(e)){if(ce.isString(a))return e.indexOf(a)!==-1;if(ce.isRegExp(a))return a.test(e)}}function jW(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,a)=>r.toUpperCase()+a)}function NW(t,e){const r=ce.toCamelCase(" "+e);["get","set","has"].forEach(a=>{Object.defineProperty(t,a+r,{value:function(n,i,l){return this[a].call(this,e,n,i,l)},configurable:!0})})}let La=class{constructor(e){e&&this.set(e)}set(e,r,a){const n=this;function i(o,c,d){const h=lh(c);if(!h)throw new Error("header name must be a non-empty string");const p=ce.findKey(n,h);(!p||n[p]===void 0||d===!0||d===void 0&&n[p]!==!1)&&(n[p||c]=Tg(o))}const l=(o,c)=>ce.forEach(o,(d,h)=>i(d,h,c));if(ce.isPlainObject(e)||e instanceof this.constructor)l(e,r);else if(ce.isString(e)&&(e=e.trim())&&!wW(e))l(yW(e),r);else if(ce.isObject(e)&&ce.isIterable(e)){let o={},c,d;for(const h of e){if(!ce.isArray(h))throw TypeError("Object iterator must return a key-value pair");o[d=h[0]]=(c=o[d])?ce.isArray(c)?[...c,h[1]]:[c,h[1]]:h[1]}l(o,r)}else e!=null&&i(r,e,a);return this}get(e,r){if(e=lh(e),e){const a=ce.findKey(this,e);if(a){const n=this[a];if(!r)return n;if(r===!0)return vW(n);if(ce.isFunction(r))return r.call(this,n,a);if(ce.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=lh(e),e){const a=ce.findKey(this,e);return!!(a&&this[a]!==void 0&&(!r||t1(this,this[a],a,r)))}return!1}delete(e,r){const a=this;let n=!1;function i(l){if(l=lh(l),l){const o=ce.findKey(a,l);o&&(!r||t1(a,a[o],o,r))&&(delete a[o],n=!0)}}return ce.isArray(e)?e.forEach(i):i(e),n}clear(e){const r=Object.keys(this);let a=r.length,n=!1;for(;a--;){const i=r[a];(!e||t1(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){const r=this,a={};return ce.forEach(this,(n,i)=>{const l=ce.findKey(a,i);if(l){r[l]=Tg(n),delete r[i];return}const o=e?jW(i):String(i).trim();o!==i&&delete r[i],r[o]=Tg(n),a[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return ce.forEach(this,(a,n)=>{a!=null&&a!==!1&&(r[n]=e&&ce.isArray(a)?a.join(", "):a)}),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 a=new this(e);return r.forEach(n=>a.set(n)),a}static accessor(e){const a=(this[F5]=this[F5]={accessors:{}}).accessors,n=this.prototype;function i(l){const o=lh(l);a[o]||(NW(n,l),a[o]=!0)}return ce.isArray(e)?e.forEach(i):i(e),this}};La.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(La.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(a){this[r]=a}}});ce.freezeMethods(La);function r1(t,e){const r=this||Uf,a=e||r,n=La.from(a.headers);let i=a.data;return ce.forEach(t,function(o){i=o.call(r,i,n.normalize(),e?e.status:void 0)}),n.normalize(),i}function P8(t){return!!(t&&t.__CANCEL__)}function Fd(t,e,r){Ge.call(this,t??"canceled",Ge.ERR_CANCELED,e,r),this.name="CanceledError"}ce.inherits(Fd,Ge,{__CANCEL__:!0});function O8(t,e,r){const a=r.config.validateStatus;!r.status||!a||a(r.status)?t(r):e(new Ge("Request failed with status code "+r.status,[Ge.ERR_BAD_REQUEST,Ge.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function SW(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function CW(t,e){t=t||10;const r=new Array(t),a=new Array(t);let n=0,i=0,l;return e=e!==void 0?e:1e3,function(c){const d=Date.now(),h=a[i];l||(l=d),r[n]=c,a[n]=d;let p=i,m=0;for(;p!==n;)m+=r[p++],p=p%t;if(n=(n+1)%t,n===i&&(i=(i+1)%t),d-l<e)return;const x=h&&d-h;return x?Math.round(m*1e3/x):void 0}}function AW(t,e){let r=0,a=1e3/e,n,i;const l=(d,h=Date.now())=>{r=h,n=null,i&&(clearTimeout(i),i=null),t(...d)};return[(...d)=>{const h=Date.now(),p=h-r;p>=a?l(d,h):(n=d,i||(i=setTimeout(()=>{i=null,l(n)},a-p)))},()=>n&&l(n)]}const dx=(t,e,r=3)=>{let a=0;const n=CW(50,250);return AW(i=>{const l=i.loaded,o=i.lengthComputable?i.total:void 0,c=l-a,d=n(c),h=l<=o;a=l;const p={loaded:l,total:o,progress:o?l/o:void 0,bytes:c,rate:d||void 0,estimated:d&&o&&h?(o-l)/d:void 0,event:i,lengthComputable:o!=null,[e?"download":"upload"]:!0};t(p)},r)},B5=(t,e)=>{const r=t!=null;return[a=>e[0]({lengthComputable:r,total:t,loaded:a}),e[1]]},H5=t=>(...e)=>ce.asap(()=>t(...e)),kW=ca.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,ca.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(ca.origin),ca.navigator&&/(msie|trident)/i.test(ca.navigator.userAgent)):()=>!0,DW=ca.hasStandardBrowserEnv?{write(t,e,r,a,n,i){const l=[t+"="+encodeURIComponent(e)];ce.isNumber(r)&&l.push("expires="+new Date(r).toGMTString()),ce.isString(a)&&l.push("path="+a),ce.isString(n)&&l.push("domain="+n),i===!0&&l.push("secure"),document.cookie=l.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 TW(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function MW(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function R8(t,e,r){let a=!TW(e);return t&&(a||r==!1)?MW(t,e):e}const $5=t=>t instanceof La?{...t}:t;function Yo(t,e){e=e||{};const r={};function a(d,h,p,m){return ce.isPlainObject(d)&&ce.isPlainObject(h)?ce.merge.call({caseless:m},d,h):ce.isPlainObject(h)?ce.merge({},h):ce.isArray(h)?h.slice():h}function n(d,h,p,m){if(ce.isUndefined(h)){if(!ce.isUndefined(d))return a(void 0,d,p,m)}else return a(d,h,p,m)}function i(d,h){if(!ce.isUndefined(h))return a(void 0,h)}function l(d,h){if(ce.isUndefined(h)){if(!ce.isUndefined(d))return a(void 0,d)}else return a(void 0,h)}function o(d,h,p){if(p in e)return a(d,h);if(p in t)return a(void 0,d)}const c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:o,headers:(d,h,p)=>n($5(d),$5(h),p,!0)};return ce.forEach(Object.keys({...t,...e}),function(h){const p=c[h]||n,m=p(t[h],e[h],h);ce.isUndefined(m)&&p!==o||(r[h]=m)}),r}const _8=t=>{const e=Yo({},t);let{data:r,withXSRFToken:a,xsrfHeaderName:n,xsrfCookieName:i,headers:l,auth:o}=e;e.headers=l=La.from(l),e.url=T8(R8(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),o&&l.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let c;if(ce.isFormData(r)){if(ca.hasStandardBrowserEnv||ca.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((c=l.getContentType())!==!1){const[d,...h]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];l.setContentType([d||"multipart/form-data",...h].join("; "))}}if(ca.hasStandardBrowserEnv&&(a&&ce.isFunction(a)&&(a=a(e)),a||a!==!1&&kW(e.url))){const d=n&&i&&DW.read(i);d&&l.set(n,d)}return e},EW=typeof XMLHttpRequest<"u",PW=EW&&function(t){return new Promise(function(r,a){const n=_8(t);let i=n.data;const l=La.from(n.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:d}=n,h,p,m,x,b;function y(){x&&x(),b&&b(),n.cancelToken&&n.cancelToken.unsubscribe(h),n.signal&&n.signal.removeEventListener("abort",h)}let v=new XMLHttpRequest;v.open(n.method.toUpperCase(),n.url,!0),v.timeout=n.timeout;function N(){if(!v)return;const S=La.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),A={data:!o||o==="text"||o==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:S,config:t,request:v};O8(function(M){r(M),y()},function(M){a(M),y()},A),v=null}"onloadend"in v?v.onloadend=N:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(N)},v.onabort=function(){v&&(a(new Ge("Request aborted",Ge.ECONNABORTED,t,v)),v=null)},v.onerror=function(){a(new Ge("Network Error",Ge.ERR_NETWORK,t,v)),v=null},v.ontimeout=function(){let k=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const A=n.transitional||M8;n.timeoutErrorMessage&&(k=n.timeoutErrorMessage),a(new Ge(k,A.clarifyTimeoutError?Ge.ETIMEDOUT:Ge.ECONNABORTED,t,v)),v=null},i===void 0&&l.setContentType(null),"setRequestHeader"in v&&ce.forEach(l.toJSON(),function(k,A){v.setRequestHeader(A,k)}),ce.isUndefined(n.withCredentials)||(v.withCredentials=!!n.withCredentials),o&&o!=="json"&&(v.responseType=n.responseType),d&&([m,b]=dx(d,!0),v.addEventListener("progress",m)),c&&v.upload&&([p,x]=dx(c),v.upload.addEventListener("progress",p),v.upload.addEventListener("loadend",x)),(n.cancelToken||n.signal)&&(h=S=>{v&&(a(!S||S.type?new Fd(null,t,v):S),v.abort(),v=null)},n.cancelToken&&n.cancelToken.subscribe(h),n.signal&&(n.signal.aborted?h():n.signal.addEventListener("abort",h)));const C=SW(n.url);if(C&&ca.protocols.indexOf(C)===-1){a(new Ge("Unsupported protocol "+C+":",Ge.ERR_BAD_REQUEST,t));return}v.send(i||null)})},OW=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let a=new AbortController,n;const i=function(d){if(!n){n=!0,o();const h=d instanceof Error?d:this.reason;a.abort(h instanceof Ge?h:new Fd(h instanceof Error?h.message:h))}};let l=e&&setTimeout(()=>{l=null,i(new Ge(`timeout ${e} of ms exceeded`,Ge.ETIMEDOUT))},e);const o=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),t=null)};t.forEach(d=>d.addEventListener("abort",i));const{signal:c}=a;return c.unsubscribe=()=>ce.asap(o),c}},RW=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let a=0,n;for(;a<r;)n=a+e,yield t.slice(a,n),a=n},_W=async function*(t,e){for await(const r of LW(t))yield*RW(r,e)},LW=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:a}=await e.read();if(r)break;yield a}}finally{await e.cancel()}},Y5=(t,e,r,a)=>{const n=_W(t,e);let i=0,l,o=c=>{l||(l=!0,a&&a(c))};return new ReadableStream({async pull(c){try{const{done:d,value:h}=await n.next();if(d){o(),c.close();return}let p=h.byteLength;if(r){let m=i+=p;r(m)}c.enqueue(new Uint8Array(h))}catch(d){throw o(d),d}},cancel(c){return o(c),n.return()}},{highWaterMark:2})},k0=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",L8=k0&&typeof ReadableStream=="function",zW=k0&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),z8=(t,...e)=>{try{return!!t(...e)}catch{return!1}},IW=L8&&z8(()=>{let t=!1;const e=new Request(ca.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),U5=64*1024,Vw=L8&&z8(()=>ce.isReadableStream(new Response("").body)),ux={stream:Vw&&(t=>t.body)};k0&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!ux[e]&&(ux[e]=ce.isFunction(t[e])?r=>r[e]():(r,a)=>{throw new Ge(`Response type '${e}' is not supported`,Ge.ERR_NOT_SUPPORT,a)})})})(new Response);const FW=async t=>{if(t==null)return 0;if(ce.isBlob(t))return t.size;if(ce.isSpecCompliantForm(t))return(await new Request(ca.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 zW(t)).byteLength},BW=async(t,e)=>{const r=ce.toFiniteNumber(t.getContentLength());return r??FW(e)},HW=k0&&(async t=>{let{url:e,method:r,data:a,signal:n,cancelToken:i,timeout:l,onDownloadProgress:o,onUploadProgress:c,responseType:d,headers:h,withCredentials:p="same-origin",fetchOptions:m}=_8(t);d=d?(d+"").toLowerCase():"text";let x=OW([n,i&&i.toAbortSignal()],l),b;const y=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let v;try{if(c&&IW&&r!=="get"&&r!=="head"&&(v=await BW(h,a))!==0){let A=new Request(e,{method:"POST",body:a,duplex:"half"}),T;if(ce.isFormData(a)&&(T=A.headers.get("content-type"))&&h.setContentType(T),A.body){const[M,O]=B5(v,dx(H5(c)));a=Y5(A.body,U5,M,O)}}ce.isString(p)||(p=p?"include":"omit");const N="credentials"in Request.prototype;b=new Request(e,{...m,signal:x,method:r.toUpperCase(),headers:h.normalize().toJSON(),body:a,duplex:"half",credentials:N?p:void 0});let C=await fetch(b,m);const S=Vw&&(d==="stream"||d==="response");if(Vw&&(o||S&&y)){const A={};["status","statusText","headers"].forEach(_=>{A[_]=C[_]});const T=ce.toFiniteNumber(C.headers.get("content-length")),[M,O]=o&&B5(T,dx(H5(o),!0))||[];C=new Response(Y5(C.body,U5,M,()=>{O&&O(),y&&y()}),A)}d=d||"text";let k=await ux[ce.findKey(ux,d)||"text"](C,t);return!S&&y&&y(),await new Promise((A,T)=>{O8(A,T,{data:k,headers:La.from(C.headers),status:C.status,statusText:C.statusText,config:t,request:b})})}catch(N){throw y&&y(),N&&N.name==="TypeError"&&/Load failed|fetch/i.test(N.message)?Object.assign(new Ge("Network Error",Ge.ERR_NETWORK,t,b),{cause:N.cause||N}):Ge.from(N,N&&N.code,t,b)}}),qw={http:rW,xhr:PW,fetch:HW};ce.forEach(qw,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const W5=t=>`- ${t}`,$W=t=>ce.isFunction(t)||t===null||t===!1,I8={getAdapter:t=>{t=ce.isArray(t)?t:[t];const{length:e}=t;let r,a;const n={};for(let i=0;i<e;i++){r=t[i];let l;if(a=r,!$W(r)&&(a=qw[(l=String(r)).toLowerCase()],a===void 0))throw new Ge(`Unknown adapter '${l}'`);if(a)break;n[l||"#"+i]=a}if(!a){const i=Object.entries(n).map(([o,c])=>`adapter ${o} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=e?i.length>1?`since :
`+i.map(W5).join(`
`):" "+W5(i[0]):"as no adapter specified";throw new Ge("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return a},adapters:qw};function a1(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Fd(null,t)}function X5(t){return a1(t),t.headers=La.from(t.headers),t.data=r1.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),I8.getAdapter(t.adapter||Uf.adapter)(t).then(function(a){return a1(t),a.data=r1.call(t,t.transformResponse,a),a.headers=La.from(a.headers),a},function(a){return P8(a)||(a1(t),a&&a.response&&(a.response.data=r1.call(t,t.transformResponse,a.response),a.response.headers=La.from(a.response.headers))),Promise.reject(a)})}const F8="1.11.0",D0={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{D0[t]=function(a){return typeof a===t||"a"+(e<1?"n ":" ")+t}});const V5={};D0.transitional=function(e,r,a){function n(i,l){return"[Axios v"+F8+"] Transitional option '"+i+"'"+l+(a?". "+a:"")}return(i,l,o)=>{if(e===!1)throw new Ge(n(l," has been removed"+(r?" in "+r:"")),Ge.ERR_DEPRECATED);return r&&!V5[l]&&(V5[l]=!0,console.warn(n(l," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(i,l,o):!0}};D0.spelling=function(e){return(r,a)=>(console.warn(`${a} is likely a misspelling of ${e}`),!0)};function YW(t,e,r){if(typeof t!="object")throw new Ge("options must be an object",Ge.ERR_BAD_OPTION_VALUE);const a=Object.keys(t);let n=a.length;for(;n-- >0;){const i=a[n],l=e[i];if(l){const o=t[i],c=o===void 0||l(o,i,t);if(c!==!0)throw new Ge("option "+i+" must be "+c,Ge.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ge("Unknown option "+i,Ge.ERR_BAD_OPTION)}}const Mg={assertOptions:YW,validators:D0},xs=Mg.validators;let Oo=class{constructor(e){this.defaults=e||{},this.interceptors={request:new I5,response:new I5}}async request(e,r){try{return await this._request(e,r)}catch(a){if(a instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=`
`+i):a.stack=i}catch{}}throw a}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Yo(this.defaults,r);const{transitional:a,paramsSerializer:n,headers:i}=r;a!==void 0&&Mg.assertOptions(a,{silentJSONParsing:xs.transitional(xs.boolean),forcedJSONParsing:xs.transitional(xs.boolean),clarifyTimeoutError:xs.transitional(xs.boolean)},!1),n!=null&&(ce.isFunction(n)?r.paramsSerializer={serialize:n}:Mg.assertOptions(n,{encode:xs.function,serialize:xs.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Mg.assertOptions(r,{baseUrl:xs.spelling("baseURL"),withXsrfToken:xs.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let l=i&&ce.merge(i.common,i[r.method]);i&&ce.forEach(["delete","get","head","post","put","patch","common"],b=>{delete i[b]}),r.headers=La.concat(l,i);const o=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,o.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let h,p=0,m;if(!c){const b=[X5.bind(this),void 0];for(b.unshift(...o),b.push(...d),m=b.length,h=Promise.resolve(r);p<m;)h=h.then(b[p++],b[p++]);return h}m=o.length;let x=r;for(p=0;p<m;){const b=o[p++],y=o[p++];try{x=b(x)}catch(v){y.call(this,v);break}}try{h=X5.call(this,x)}catch(b){return Promise.reject(b)}for(p=0,m=d.length;p<m;)h=h.then(d[p++],d[p++]);return h}getUri(e){e=Yo(this.defaults,e);const r=R8(e.baseURL,e.url,e.allowAbsoluteUrls);return T8(r,e.params,e.paramsSerializer)}};ce.forEach(["delete","get","head","options"],function(e){Oo.prototype[e]=function(r,a){return this.request(Yo(a||{},{method:e,url:r,data:(a||{}).data}))}});ce.forEach(["post","put","patch"],function(e){function r(a){return function(i,l,o){return this.request(Yo(o||{},{method:e,headers:a?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}Oo.prototype[e]=r(),Oo.prototype[e+"Form"]=r(!0)});let UW=class B8{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const a=this;this.promise.then(n=>{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](n);a._listeners=null}),this.promise.then=n=>{let i;const l=new Promise(o=>{a.subscribe(o),i=o}).then(n);return l.cancel=function(){a.unsubscribe(i)},l},e(function(i,l,o){a.reason||(a.reason=new Fd(i,l,o),r(a.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=a=>{e.abort(a)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new B8(function(n){e=n}),cancel:e}}};function WW(t){return function(r){return t.apply(null,r)}}function XW(t){return ce.isObject(t)&&t.isAxiosError===!0}const Gw={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(Gw).forEach(([t,e])=>{Gw[e]=t});function H8(t){const e=new Oo(t),r=x8(Oo.prototype.request,e);return ce.extend(r,Oo.prototype,e,{allOwnKeys:!0}),ce.extend(r,e,null,{allOwnKeys:!0}),r.create=function(n){return H8(Yo(t,n))},r}const Re=H8(Uf);Re.Axios=Oo;Re.CanceledError=Fd;Re.CancelToken=UW;Re.isCancel=P8;Re.VERSION=F8;Re.toFormData=A0;Re.AxiosError=Ge;Re.Cancel=Re.CanceledError;Re.all=function(e){return Promise.all(e)};Re.spread=WW;Re.isAxiosError=XW;Re.mergeConfig=Yo;Re.AxiosHeaders=La;Re.formToJSON=t=>E8(ce.isHTMLForm(t)?new FormData(t):t);Re.getAdapter=I8.getAdapter;Re.HttpStatusCode=Gw;Re.default=Re;const{Axios:j2e,AxiosError:N2e,CanceledError:S2e,isCancel:C2e,CancelToken:A2e,VERSION:k2e,all:D2e,Cancel:T2e,isAxiosError:M2e,spread:E2e,toFormData:P2e,AxiosHeaders:O2e,HttpStatusCode:R2e,formToJSON:_2e,getAdapter:L2e,mergeConfig:z2e}=Re;var VW=class extends Error{issues;constructor(t){super(t[0].message),this.name="SchemaError",this.issues=t}},$8=(t=>(t.uninitialized="uninitialized",t.pending="pending",t.fulfilled="fulfilled",t.rejected="rejected",t))($8||{});function q5(t){return{status:t,isUninitialized:t==="uninitialized",isLoading:t==="pending",isSuccess:t==="fulfilled",isError:t==="rejected"}}var G5=xl;function Y8(t,e){if(t===e||!(G5(t)&&G5(e)||Array.isArray(t)&&Array.isArray(e)))return e;const r=Object.keys(e),a=Object.keys(t);let n=r.length===a.length;const i=Array.isArray(e)?[]:{};for(const l of r)i[l]=Y8(t[l],e[l]),n&&(n=t[l]===i[l]);return n?t:i}function cd(t){let e=0;for(const r in t)e++;return e}var K5=t=>[].concat(...t);function qW(t){return new RegExp("(^|:)//").test(t)}function GW(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function hx(t){return t!=null}function KW(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var ZW=t=>t.replace(/\/$/,""),QW=t=>t.replace(/^\//,"");function JW(t,e){if(!t)return e;if(!e)return t;if(qW(e))return e;const r=t.endsWith("/")||!e.startsWith("?")?"/":"";return t=ZW(t),e=QW(e),`${t}${r}${e}`}function eX(t,e,r){return t.has(e)?t.get(e):t.set(e,r).get(e)}var Z5=(...t)=>fetch(...t),tX=t=>t.status>=200&&t.status<=299,rX=t=>/ion\/(vnd\.api\+)?json/.test(t.get("content-type")||"");function Q5(t){if(!xl(t))return t;const e={...t};for(const[r,a]of Object.entries(e))a===void 0&&delete e[r];return e}function aX({baseUrl:t,prepareHeaders:e=p=>p,fetchFn:r=Z5,paramsSerializer:a,isJsonContentType:n=rX,jsonContentType:i="application/json",jsonReplacer:l,timeout:o,responseHandler:c,validateStatus:d,...h}={}){return typeof fetch>"u"&&r===Z5&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(m,x,b)=>{const{getState:y,extra:v,endpoint:N,forced:C,type:S}=x;let k,{url:A,headers:T=new Headers(h.headers),params:M=void 0,responseHandler:O=c??"json",validateStatus:_=d??tX,timeout:R=o,...L}=typeof m=="string"?{url:m}:m,z,F=x.signal;R&&(z=new AbortController,x.signal.addEventListener("abort",z.abort),F=z.signal);let Y={...h,signal:F,...L};T=new Headers(Q5(T)),Y.headers=await e(T,{getState:y,arg:m,extra:v,endpoint:N,forced:C,type:S,extraOptions:b})||T;const X=U=>typeof U=="object"&&(xl(U)||Array.isArray(U)||typeof U.toJSON=="function");if(!Y.headers.has("content-type")&&X(Y.body)&&Y.headers.set("content-type",i),X(Y.body)&&n(Y.headers)&&(Y.body=JSON.stringify(Y.body,l)),M){const U=~A.indexOf("?")?"&":"?",re=a?a(M):new URLSearchParams(Q5(M));A+=U+re}A=JW(t,A);const H=new Request(A,Y);k={request:new Request(A,Y)};let V,Z=!1,B=z&&setTimeout(()=>{Z=!0,z.abort()},R);try{V=await r(H)}catch(U){return{error:{status:Z?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(U)},meta:k}}finally{B&&clearTimeout(B),z?.signal.removeEventListener("abort",z.abort)}const G=V.clone();k.response=G;let te,K="";try{let U;if(await Promise.all([p(V,O).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:k}}return _(V,te)?{data:te,meta:k}:{error:{status:V.status,data:te},meta:k}};async function p(m,x){if(typeof x=="function")return x(m);if(x==="content-type"&&(x=n(m.headers)?"json":"text"),x==="json"){const b=await m.text();return b.length?JSON.parse(b):null}return m.text()}}var J5=class{constructor(t,e=void 0){this.value=t,this.meta=e}},Y4=ur("__rtkq/focused"),U8=ur("__rtkq/unfocused"),U4=ur("__rtkq/online"),W8=ur("__rtkq/offline");function T0(t){return t.type==="query"}function nX(t){return t.type==="mutation"}function M0(t){return t.type==="infinitequery"}function fx(t){return T0(t)||M0(t)}function W4(t,e,r,a,n,i){return sX(t)?t(e,r,a,n).filter(hx).map(Kw).map(i):Array.isArray(t)?t.map(Kw).map(i):[]}function sX(t){return typeof t=="function"}function Kw(t){return typeof t=="string"?{type:t}:t}function iX(t,e){return t.catch(e)}var uf=Symbol("forceQueryFn"),Zw=t=>typeof t[uf]=="function";function lX({serializeQueryArgs:t,queryThunk:e,infiniteQueryThunk:r,mutationThunk:a,api:n,context:i}){const l=new Map,o=new Map,{unsubscribeQueryResult:c,removeMutationResult:d,updateSubscriptionOptions:h}=n.internalActions;return{buildInitiateQuery:v,buildInitiateInfiniteQuery:N,buildInitiateMutation:C,getRunningQueryThunk:p,getRunningMutationThunk:m,getRunningQueriesThunk:x,getRunningMutationsThunk:b};function p(S,k){return A=>{const T=i.endpointDefinitions[S],M=t({queryArgs:k,endpointDefinition:T,endpointName:S});return l.get(A)?.[M]}}function m(S,k){return A=>o.get(A)?.[k]}function x(){return S=>Object.values(l.get(S)||{}).filter(hx)}function b(){return S=>Object.values(o.get(S)||{}).filter(hx)}function y(S,k){const A=(T,{subscribe:M=!0,forceRefetch:O,subscriptionOptions:_,[uf]:R,...L}={})=>(z,F)=>{const Y=t({queryArgs:T,endpointDefinition:k,endpointName:S});let X;const H={...L,type:"query",subscribe:M,forceRefetch:O,subscriptionOptions:_,endpointName:S,originalArgs:T,queryCacheKey:Y,[uf]:R};if(T0(k))X=e(H);else{const{direction:ne,initialPageParam:we}=L;X=r({...H,direction:ne,initialPageParam:we})}const W=n.endpoints[S].select(T),V=z(X),Z=W(F()),{requestId:B,abort:G}=V,te=Z.requestId!==B,K=l.get(z)?.[Y],U=()=>W(F()),re=Object.assign(R?V.then(U):te&&!K?Promise.resolve(Z):Promise.all([K,V]).then(U),{arg:T,requestId:B,subscriptionOptions:_,queryCacheKey:Y,abort:G,async unwrap(){const ne=await re;if(ne.isError)throw ne.error;return ne.data},refetch:()=>z(A(T,{subscribe:!1,forceRefetch:!0})),unsubscribe(){M&&z(c({queryCacheKey:Y,requestId:B}))},updateSubscriptionOptions(ne){re.subscriptionOptions=ne,z(h({endpointName:S,requestId:B,queryCacheKey:Y,options:ne}))}});if(!K&&!te&&!R){const ne=eX(l,z,{});ne[Y]=re,re.then(()=>{delete ne[Y],cd(ne)||l.delete(z)})}return re};return A}function v(S,k){return y(S,k)}function N(S,k){return y(S,k)}function C(S){return(k,{track:A=!0,fixedCacheKey:T}={})=>(M,O)=>{const _=a({type:"mutation",endpointName:S,originalArgs:k,track:A,fixedCacheKey:T}),R=M(_),{requestId:L,abort:z,unwrap:F}=R,Y=iX(R.unwrap().then(V=>({data:V})),V=>({error:V})),X=()=>{M(d({requestId:L,fixedCacheKey:T}))},H=Object.assign(Y,{arg:R.arg,requestId:L,abort:z,unwrap:F,reset:X}),W=o.get(M)||{};return o.set(M,W),W[L]=H,H.then(()=>{delete W[L],cd(W)||o.delete(M)}),T&&(W[T]=H,H.then(()=>{W[T]===H&&(delete W[T],cd(W)||o.delete(M))})),H}}}var X8=class extends VW{constructor(t,e,r,a){super(t),this.value=e,this.schemaName=r,this._bqMeta=a}};async function lo(t,e,r,a){const n=await t["~standard"].validate(e);if(n.issues)throw new X8(n.issues,e,r,a);return n.value}function oX(t){return t}var oh=(t={})=>({...t,[x0]:!0});function cX({reducerPath:t,baseQuery:e,context:{endpointDefinitions:r},serializeQueryArgs:a,api:n,assertTagType:i,selectors:l,onSchemaFailure:o,catchSchemaFailure:c,skipSchemaValidation:d}){const h=(L,z,F,Y)=>(X,H)=>{const W=r[L],V=a({queryArgs:z,endpointDefinition:W,endpointName:L});if(X(n.internalActions.queryResultPatched({queryCacheKey:V,patches:F})),!Y)return;const Z=n.endpoints[L].select(z)(H()),B=W4(W.providesTags,Z.data,void 0,z,{},i);X(n.internalActions.updateProvidedBy([{queryCacheKey:V,providedTags:B}]))};function p(L,z,F=0){const Y=[z,...L];return F&&Y.length>F?Y.slice(0,-1):Y}function m(L,z,F=0){const Y=[...L,z];return F&&Y.length>F?Y.slice(1):Y}const x=(L,z,F,Y=!0)=>(X,H)=>{const V=n.endpoints[L].select(z)(H()),Z={patches:[],inversePatches:[],undo:()=>X(n.util.patchQueryData(L,z,Z.inversePatches,Y))};if(V.status==="uninitialized")return Z;let B;if("data"in V)if(ts(V.data)){const[G,te,K]=JO(V.data,F);Z.patches.push(...te),Z.inversePatches.push(...K),B=G}else B=F(V.data),Z.patches.push({op:"replace",path:[],value:B}),Z.inversePatches.push({op:"replace",path:[],value:V.data});return Z.patches.length===0||X(n.util.patchQueryData(L,z,Z.patches,Y)),Z},b=(L,z,F)=>Y=>Y(n.endpoints[L].initiate(z,{subscribe:!1,forceRefetch:!0,[uf]:()=>({data:F})})),y=(L,z)=>L.query&&L[z]?L[z]:oX,v=async(L,{signal:z,abort:F,rejectWithValue:Y,fulfillWithValue:X,dispatch:H,getState:W,extra:V})=>{const Z=r[L.endpointName],{metaSchema:B,skipSchemaValidation:G=d}=Z;try{let te=y(Z,"transformResponse");const K={signal:z,abort:F,dispatch:H,getState:W,extra:V,endpoint:L.endpointName,type:L.type,forced:L.type==="query"?N(L,W()):void 0,queryCacheKey:L.type==="query"?L.queryCacheKey:void 0},U=L.type==="query"?L[uf]:void 0;let re;const ne=async(ye,ue,je,Te)=>{if(ue==null&&ye.pages.length)return Promise.resolve({data:ye});const pe={queryArg:L.originalArgs,pageParam:ue},Ue=await we(pe),_e=Te?p:m;return{data:{pages:_e(ye.pages,Ue.data,je),pageParams:_e(ye.pageParams,ue,je)},meta:Ue.meta}};async function we(ye){let ue;const{extraOptions:je,argSchema:Te,rawResponseSchema:pe,responseSchema:Ue}=Z;if(Te&&!G&&(ye=await lo(Te,ye,"argSchema",{})),U?ue=U():Z.query?ue=await e(Z.query(ye),K,je):ue=await Z.queryFn(ye,K,je,Wt=>e(Wt,K,je)),typeof process<"u",ue.error)throw new J5(ue.error,ue.meta);let{data:_e}=ue;pe&&!G&&(_e=await lo(pe,ue.data,"rawResponseSchema",ue.meta));let xt=await te(_e,ue.meta,ye);return Ue&&!G&&(xt=await lo(Ue,xt,"responseSchema",ue.meta)),{...ue,data:xt}}if(L.type==="query"&&"infiniteQueryOptions"in Z){const{infiniteQueryOptions:ye}=Z,{maxPages:ue=1/0}=ye;let je;const Te={pages:[],pageParams:[]},pe=l.selectQueryEntry(W(),L.queryCacheKey)?.data,_e=N(L,W())&&!L.direction||!pe?Te:pe;if("direction"in L&&L.direction&&_e.pages.length){const xt=L.direction==="backward",bt=(xt?V8:Qw)(ye,_e,L.originalArgs);je=await ne(_e,bt,ue,xt)}else{const{initialPageParam:xt=ye.initialPageParam}=L,Wt=pe?.pageParams??[],bt=Wt[0]??xt,va=Wt.length;je=await ne(_e,bt,ue),U&&(je={data:je.data.pages[0]});for(let pn=1;pn<va;pn++){const Ht=Qw(ye,je.data,L.originalArgs);je=await ne(je.data,Ht,ue)}}re=je}else re=await we(L.originalArgs);return B&&!G&&re.meta&&(re.meta=await lo(B,re.meta,"metaSchema",re.meta)),X(re.data,oh({fulfilledTimeStamp:Date.now(),baseQueryMeta:re.meta}))}catch(te){let K=te;if(K instanceof J5){let U=y(Z,"transformErrorResponse");const{rawErrorResponseSchema:re,errorResponseSchema:ne}=Z;let{value:we,meta:ye}=K;try{re&&!G&&(we=await lo(re,we,"rawErrorResponseSchema",ye)),B&&!G&&(ye=await lo(B,ye,"metaSchema",ye));let ue=await U(we,ye,L.originalArgs);return ne&&!G&&(ue=await lo(ne,ue,"errorResponseSchema",ye)),Y(ue,oh({baseQueryMeta:ye}))}catch(ue){K=ue}}try{if(K instanceof X8){const U={endpoint:L.endpointName,arg:L.originalArgs,type:L.type,queryCacheKey:L.type==="query"?L.queryCacheKey:void 0};Z.onSchemaFailure?.(K,U),o?.(K,U);const{catchSchemaFailure:re=c}=Z;if(re)return Y(re(K,U),oh({baseQueryMeta:K._bqMeta}))}}catch(U){K=U}throw console.error(K),K}};function N(L,z){const F=l.selectQueryEntry(z,L.queryCacheKey),Y=l.selectConfig(z).refetchOnMountOrArgChange,X=F?.fulfilledTimeStamp,H=L.forceRefetch??(L.subscribe&&Y);return H?H===!0||(Number(new Date)-Number(X))/1e3>=H:!1}const C=()=>Jt(`${t}/executeQuery`,v,{getPendingMeta({arg:z}){const F=r[z.endpointName];return oh({startedTimeStamp:Date.now(),...M0(F)?{direction:z.direction}:{}})},condition(z,{getState:F}){const Y=F(),X=l.selectQueryEntry(Y,z.queryCacheKey),H=X?.fulfilledTimeStamp,W=z.originalArgs,V=X?.originalArgs,Z=r[z.endpointName],B=z.direction;return Zw(z)?!0:X?.status==="pending"?!1:N(z,Y)||T0(Z)&&Z?.forceRefetch?.({currentArg:W,previousArg:V,endpointState:X,state:Y})?!0:!(H&&!B)},dispatchConditionRejection:!0}),S=C(),k=C(),A=Jt(`${t}/executeMutation`,v,{getPendingMeta(){return oh({startedTimeStamp:Date.now()})}}),T=L=>"force"in L,M=L=>"ifOlderThan"in L,O=(L,z,F)=>(Y,X)=>{const H=T(F)&&F.force,W=M(F)&&F.ifOlderThan,V=(B=!0)=>{const G={forceRefetch:B,isPrefetch:!0};return n.endpoints[L].initiate(z,G)},Z=n.endpoints[L].select(z)(X());if(H)Y(V());else if(W){const B=Z?.fulfilledTimeStamp;if(!B){Y(V());return}(Number(new Date)-Number(new Date(B)))/1e3>=W&&Y(V())}else Y(V(!1))};function _(L){return z=>z?.meta?.arg?.endpointName===L}function R(L,z){return{matchPending:Fh(z4(L),_(z)),matchFulfilled:Fh(bl(L),_(z)),matchRejected:Fh(bd(L),_(z))}}return{queryThunk:S,mutationThunk:A,infiniteQueryThunk:k,prefetch:O,updateQueryData:x,upsertQueryData:b,patchQueryData:h,buildMatchThunkActions:R}}function Qw(t,{pages:e,pageParams:r},a){const n=e.length-1;return t.getNextPageParam(e[n],e,r[n],r,a)}function V8(t,{pages:e,pageParams:r},a){return t.getPreviousPageParam?.(e[0],e,r[0],r,a)}function q8(t,e,r,a){return W4(r[t.meta.arg.endpointName][e],bl(t)?t.payload:void 0,y0(t)?t.payload:void 0,t.meta.arg.originalArgs,"baseQueryMeta"in t.meta?t.meta.baseQueryMeta:void 0,a)}function $m(t,e,r){const a=t[e];a&&r(a)}function hf(t){return("arg"in t?t.arg.fixedCacheKey:t.fixedCacheKey)??t.requestId}function eD(t,e,r){const a=t[hf(e)];a&&r(a)}var Ym={};function dX({reducerPath:t,queryThunk:e,mutationThunk:r,serializeQueryArgs:a,context:{endpointDefinitions:n,apiUid:i,extractRehydrationInfo:l,hasRehydrationInfo:o},assertTagType:c,config:d}){const h=ur(`${t}/resetApiState`);function p(_,R,L,z){_[R.queryCacheKey]??={status:"uninitialized",endpointName:R.endpointName},$m(_,R.queryCacheKey,F=>{F.status="pending",F.requestId=L&&F.requestId?F.requestId:z.requestId,R.originalArgs!==void 0&&(F.originalArgs=R.originalArgs),F.startedTimeStamp=z.startedTimeStamp;const Y=n[z.arg.endpointName];M0(Y)&&"direction"in R&&(F.direction=R.direction)})}function m(_,R,L,z){$m(_,R.arg.queryCacheKey,F=>{if(F.requestId!==R.requestId&&!z)return;const{merge:Y}=n[R.arg.endpointName];if(F.status="fulfilled",Y)if(F.data!==void 0){const{fulfilledTimeStamp:X,arg:H,baseQueryMeta:W,requestId:V}=R;let Z=If(F.data,B=>Y(B,L,{arg:H.originalArgs,baseQueryMeta:W,fulfilledTimeStamp:X,requestId:V}));F.data=Z}else F.data=L;else F.data=n[R.arg.endpointName].structuralSharing??!0?Y8(Ms(F.data)?hY(F.data):F.data,L):L;delete F.error,F.fulfilledTimeStamp=R.fulfilledTimeStamp})}const x=Yt({name:`${t}/queries`,initialState:Ym,reducers:{removeQueryResult:{reducer(_,{payload:{queryCacheKey:R}}){delete _[R]},prepare:ih()},cacheEntriesUpserted:{reducer(_,R){for(const L of R.payload){const{queryDescription:z,value:F}=L;p(_,z,!0,{arg:z,requestId:R.meta.requestId,startedTimeStamp:R.meta.timestamp}),m(_,{arg:z,requestId:R.meta.requestId,fulfilledTimeStamp:R.meta.timestamp,baseQueryMeta:{}},F,!0)}},prepare:_=>({payload:_.map(z=>{const{endpointName:F,arg:Y,value:X}=z,H=n[F];return{queryDescription:{type:"query",endpointName:F,originalArgs:z.arg,queryCacheKey:a({queryArgs:Y,endpointDefinition:H,endpointName:F})},value:X}}),meta:{[x0]:!0,requestId:v0(),timestamp:Date.now()}})},queryResultPatched:{reducer(_,{payload:{queryCacheKey:R,patches:L}}){$m(_,R,z=>{z.data=v5(z.data,L.concat())})},prepare:ih()}},extraReducers(_){_.addCase(e.pending,(R,{meta:L,meta:{arg:z}})=>{const F=Zw(z);p(R,z,F,L)}).addCase(e.fulfilled,(R,{meta:L,payload:z})=>{const F=Zw(L.arg);m(R,L,z,F)}).addCase(e.rejected,(R,{meta:{condition:L,arg:z,requestId:F},error:Y,payload:X})=>{$m(R,z.queryCacheKey,H=>{if(!L){if(H.requestId!==F)return;H.status="rejected",H.error=X??Y}})}).addMatcher(o,(R,L)=>{const{queries:z}=l(L);for(const[F,Y]of Object.entries(z))(Y?.status==="fulfilled"||Y?.status==="rejected")&&(R[F]=Y)})}}),b=Yt({name:`${t}/mutations`,initialState:Ym,reducers:{removeMutationResult:{reducer(_,{payload:R}){const L=hf(R);L in _&&delete _[L]},prepare:ih()}},extraReducers(_){_.addCase(r.pending,(R,{meta:L,meta:{requestId:z,arg:F,startedTimeStamp:Y}})=>{F.track&&(R[hf(L)]={requestId:z,status:"pending",endpointName:F.endpointName,startedTimeStamp:Y})}).addCase(r.fulfilled,(R,{payload:L,meta:z})=>{z.arg.track&&eD(R,z,F=>{F.requestId===z.requestId&&(F.status="fulfilled",F.data=L,F.fulfilledTimeStamp=z.fulfilledTimeStamp)})}).addCase(r.rejected,(R,{payload:L,error:z,meta:F})=>{F.arg.track&&eD(R,F,Y=>{Y.requestId===F.requestId&&(Y.status="rejected",Y.error=L??z)})}).addMatcher(o,(R,L)=>{const{mutations:z}=l(L);for(const[F,Y]of Object.entries(z))(Y?.status==="fulfilled"||Y?.status==="rejected")&&F!==Y?.requestId&&(R[F]=Y)})}}),y={tags:{},keys:{}},v=Yt({name:`${t}/invalidation`,initialState:y,reducers:{updateProvidedBy:{reducer(_,R){for(const{queryCacheKey:L,providedTags:z}of R.payload){N(_,L);for(const{type:F,id:Y}of z){const X=(_.tags[F]??={})[Y||"__internal_without_id"]??=[];X.includes(L)||X.push(L)}_.keys[L]=z}},prepare:ih()}},extraReducers(_){_.addCase(x.actions.removeQueryResult,(R,{payload:{queryCacheKey:L}})=>{N(R,L)}).addMatcher(o,(R,L)=>{const{provided:z}=l(L);for(const[F,Y]of Object.entries(z))for(const[X,H]of Object.entries(Y)){const W=(R.tags[F]??={})[X||"__internal_without_id"]??=[];for(const V of H)W.includes(V)||W.push(V)}}).addMatcher(bi(bl(e),y0(e)),(R,L)=>{C(R,[L])}).addMatcher(x.actions.cacheEntriesUpserted.match,(R,L)=>{const z=L.payload.map(({queryDescription:F,value:Y})=>({type:"UNKNOWN",payload:Y,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:F}}));C(R,z)})}});function N(_,R){const L=_.keys[R]??[];for(const z of L){const F=z.type,Y=z.id??"__internal_without_id",X=_.tags[F]?.[Y];X&&(_.tags[F][Y]=X.filter(H=>H!==R))}delete _.keys[R]}function C(_,R){const L=R.map(z=>{const F=q8(z,"providesTags",n,c),{queryCacheKey:Y}=z.meta.arg;return{queryCacheKey:Y,providedTags:F}});v.caseReducers.updateProvidedBy(_,v.actions.updateProvidedBy(L))}const S=Yt({name:`${t}/subscriptions`,initialState:Ym,reducers:{updateSubscriptionOptions(_,R){},unsubscribeQueryResult(_,R){},internal_getRTKQSubscriptions(){}}}),k=Yt({name:`${t}/internalSubscriptions`,initialState:Ym,reducers:{subscriptionsUpdated:{reducer(_,R){return v5(_,R.payload)},prepare:ih()}}}),A=Yt({name:`${t}/config`,initialState:{online:KW(),focused:GW(),middlewareRegistered:!1,...d},reducers:{middlewareRegistered(_,{payload:R}){_.middlewareRegistered=_.middlewareRegistered==="conflict"||i!==R?"conflict":!0}},extraReducers:_=>{_.addCase(U4,R=>{R.online=!0}).addCase(W8,R=>{R.online=!1}).addCase(Y4,R=>{R.focused=!0}).addCase(U8,R=>{R.focused=!1}).addMatcher(o,R=>({...R}))}}),T=P4({queries:x.reducer,mutations:b.reducer,provided:v.reducer,subscriptions:k.reducer,config:A.reducer}),M=(_,R)=>T(h.match(R)?void 0:_,R),O={...A.actions,...x.actions,...S.actions,...k.actions,...b.actions,...v.actions,resetApiState:h};return{reducer:M,actions:O}}var Gn=Symbol.for("RTKQ/skipToken"),G8={status:"uninitialized"},tD=If(G8,()=>{}),rD=If(G8,()=>{});function uX({serializeQueryArgs:t,reducerPath:e,createSelector:r}){const a=S=>tD,n=S=>rD;return{buildQuerySelector:m,buildInfiniteQuerySelector:x,buildMutationSelector:b,selectInvalidatedBy:y,selectCachedArgsForQuery:v,selectApiState:l,selectQueries:o,selectMutations:d,selectQueryEntry:c,selectConfig:h};function i(S){return{...S,...q5(S.status)}}function l(S){return S[e]}function o(S){return l(S)?.queries}function c(S,k){return o(S)?.[k]}function d(S){return l(S)?.mutations}function h(S){return l(S)?.config}function p(S,k,A){return T=>{if(T===Gn)return r(a,A);const M=t({queryArgs:T,endpointDefinition:k,endpointName:S});return r(_=>c(_,M)??tD,A)}}function m(S,k){return p(S,k,i)}function x(S,k){const{infiniteQueryOptions:A}=k;function T(M){const O={...M,...q5(M.status)},{isLoading:_,isError:R,direction:L}=O,z=L==="forward",F=L==="backward";return{...O,hasNextPage:N(A,O.data,O.originalArgs),hasPreviousPage:C(A,O.data,O.originalArgs),isFetchingNextPage:_&&z,isFetchingPreviousPage:_&&F,isFetchNextPageError:R&&z,isFetchPreviousPageError:R&&F}}return p(S,k,T)}function b(){return S=>{let k;return typeof S=="object"?k=hf(S)??Gn:k=S,r(k===Gn?n:M=>l(M)?.mutations?.[k]??rD,i)}}function y(S,k){const A=S[e],T=new Set;for(const M of k.filter(hx).map(Kw)){const O=A.provided.tags[M.type];if(!O)continue;let _=(M.id!==void 0?O[M.id]:K5(Object.values(O)))??[];for(const R of _)T.add(R)}return K5(Array.from(T.values()).map(M=>{const O=A.queries[M];return O?[{queryCacheKey:M,endpointName:O.endpointName,originalArgs:O.originalArgs}]:[]}))}function v(S,k){return Object.values(o(S)).filter(A=>A?.endpointName===k&&A.status!=="uninitialized").map(A=>A.originalArgs)}function N(S,k,A){return k?Qw(S,k,A)!=null:!1}function C(S,k,A){return!k||!S.getPreviousPageParam?!1:V8(S,k,A)!=null}}var aD=WeakMap?new WeakMap:void 0,px=({endpointName:t,queryArgs:e})=>{let r="";const a=aD?.get(e);if(typeof a=="string")r=a;else{const n=JSON.stringify(e,(i,l)=>(l=typeof l=="bigint"?{$bigint:l.toString()}:l,l=xl(l)?Object.keys(l).sort().reduce((o,c)=>(o[c]=l[c],o),{}):l,l));xl(e)&&aD?.set(e,n),r=n}return`${t}(${r})`};function K8(...t){return function(r){const a=lx(d=>r.extractRehydrationInfo?.(d,{reducerPath:r.reducerPath??"api"})),n={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:a,serializeQueryArgs(d){let h=px;if("serializeQueryArgs"in d.endpointDefinition){const p=d.endpointDefinition.serializeQueryArgs;h=m=>{const x=p(m);return typeof x=="string"?x:px({...m,queryArgs:x})}}else r.serializeQueryArgs&&(h=r.serializeQueryArgs);return h(d)},tagTypes:[...r.tagTypes||[]]},i={endpointDefinitions:{},batch(d){d()},apiUid:v0(),extractRehydrationInfo:a,hasRehydrationInfo:lx(d=>a(d)!=null)},l={injectEndpoints:c,enhanceEndpoints({addTagTypes:d,endpoints:h}){if(d)for(const p of d)n.tagTypes.includes(p)||n.tagTypes.push(p);if(h)for(const[p,m]of Object.entries(h))typeof m=="function"?m(i.endpointDefinitions[p]):Object.assign(i.endpointDefinitions[p]||{},m);return l}},o=t.map(d=>d.init(l,n,i));function c(d){const h=d.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(d.overrideExisting!==!0&&p in i.endpointDefinitions){if(d.overrideExisting==="throw")throw new Error(xa(39));continue}i.endpointDefinitions[p]=m;for(const x of o)x.injectEndpoint(p,m)}return l}return l.injectEndpoints({endpoints:r.endpoints})}}function Js(t,...e){return Object.assign(t,...e)}var hX=({api:t,queryThunk:e,internalState:r})=>{const a=`${t.reducerPath}/subscriptions`;let n=null,i=null;const{updateSubscriptionOptions:l,unsubscribeQueryResult:o}=t.internalActions,c=(x,b)=>{if(l.match(b)){const{queryCacheKey:v,requestId:N,options:C}=b.payload;return x?.[v]?.[N]&&(x[v][N]=C),!0}if(o.match(b)){const{queryCacheKey:v,requestId:N}=b.payload;return x[v]&&delete x[v][N],!0}if(t.internalActions.removeQueryResult.match(b))return delete x[b.payload.queryCacheKey],!0;if(e.pending.match(b)){const{meta:{arg:v,requestId:N}}=b,C=x[v.queryCacheKey]??={};return C[`${N}_running`]={},v.subscribe&&(C[N]=v.subscriptionOptions??C[N]??{}),!0}let y=!1;if(e.fulfilled.match(b)||e.rejected.match(b)){const v=x[b.meta.arg.queryCacheKey]||{},N=`${b.meta.requestId}_running`;y||=!!v[N],delete v[N]}if(e.rejected.match(b)){const{meta:{condition:v,arg:N,requestId:C}}=b;if(v&&N.subscribe){const S=x[N.queryCacheKey]??={};S[C]=N.subscriptionOptions??S[C]??{},y=!0}}return y},d=()=>r.currentSubscriptions,m={getSubscriptions:d,getSubscriptionCount:x=>{const y=d()[x]??{};return cd(y)},isRequestSubscribed:(x,b)=>!!d()?.[x]?.[b]};return(x,b)=>{if(n||(n=JSON.parse(JSON.stringify(r.currentSubscriptions))),t.util.resetApiState.match(x))return n=r.currentSubscriptions={},i=null,[!0,!1];if(t.internalActions.internal_getRTKQSubscriptions.match(x))return[!1,m];const y=c(r.currentSubscriptions,x);let v=!0;if(y){i||(i=setTimeout(()=>{const S=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,k]=JO(n,()=>S);b.next(t.internalActions.subscriptionsUpdated(k)),n=S,i=null},500));const N=typeof x.type=="string"&&!!x.type.startsWith(a),C=e.rejected.match(x)&&x.meta.condition&&!!x.meta.arg.subscribe;v=!N&&!C}return[v,!1]}};function fX(t){for(const e in t)return!1;return!0}var pX=2147483647/1e3-1,mX=({reducerPath:t,api:e,queryThunk:r,context:a,internalState:n,selectors:{selectQueryEntry:i,selectConfig:l}})=>{const{removeQueryResult:o,unsubscribeQueryResult:c,cacheEntriesUpserted:d}=e.internalActions,h=bi(c.match,r.fulfilled,r.rejected,d.match);function p(v){const N=n.currentSubscriptions[v];return!!N&&!fX(N)}const m={},x=(v,N,C)=>{const S=N.getState(),k=l(S);if(h(v)){let A;if(d.match(v))A=v.payload.map(T=>T.queryDescription.queryCacheKey);else{const{queryCacheKey:T}=c.match(v)?v.payload:v.meta.arg;A=[T]}b(A,N,k)}if(e.util.resetApiState.match(v))for(const[A,T]of Object.entries(m))T&&clearTimeout(T),delete m[A];if(a.hasRehydrationInfo(v)){const{queries:A}=a.extractRehydrationInfo(v);b(Object.keys(A),N,k)}};function b(v,N,C){const S=N.getState();for(const k of v){const A=i(S,k);y(k,A?.endpointName,N,C)}}function y(v,N,C,S){const A=a.endpointDefinitions[N]?.keepUnusedDataFor??S.keepUnusedDataFor;if(A===1/0)return;const T=Math.max(0,Math.min(A,pX));if(!p(v)){const M=m[v];M&&clearTimeout(M),m[v]=setTimeout(()=>{p(v)||C.dispatch(o({queryCacheKey:v})),delete m[v]},T*1e3)}}return x},nD=new Error("Promise never resolved before cacheEntryRemoved."),gX=({api:t,reducerPath:e,context:r,queryThunk:a,mutationThunk:n,internalState:i,selectors:{selectQueryEntry:l,selectApiState:o}})=>{const c=Hw(a),d=Hw(n),h=bl(a,n),p={};function m(N,C,S){const k=p[N];k?.valueResolved&&(k.valueResolved({data:C,meta:S}),delete k.valueResolved)}function x(N){const C=p[N];C&&(delete p[N],C.cacheEntryRemoved())}const b=(N,C,S)=>{const k=y(N);function A(T,M,O,_){const R=l(S,M),L=l(C.getState(),M);!R&&L&&v(T,_,M,C,O)}if(a.pending.match(N))A(N.meta.arg.endpointName,k,N.meta.requestId,N.meta.arg.originalArgs);else if(t.internalActions.cacheEntriesUpserted.match(N))for(const{queryDescription:T,value:M}of N.payload){const{endpointName:O,originalArgs:_,queryCacheKey:R}=T;A(O,R,N.meta.requestId,_),m(R,M,{})}else if(n.pending.match(N))C.getState()[e].mutations[k]&&v(N.meta.arg.endpointName,N.meta.arg.originalArgs,k,C,N.meta.requestId);else if(h(N))m(k,N.payload,N.meta.baseQueryMeta);else if(t.internalActions.removeQueryResult.match(N)||t.internalActions.removeMutationResult.match(N))x(k);else if(t.util.resetApiState.match(N))for(const T of Object.keys(p))x(T)};function y(N){return c(N)?N.meta.arg.queryCacheKey:d(N)?N.meta.arg.fixedCacheKey??N.meta.requestId:t.internalActions.removeQueryResult.match(N)?N.payload.queryCacheKey:t.internalActions.removeMutationResult.match(N)?hf(N.payload):""}function v(N,C,S,k,A){const T=r.endpointDefinitions[N],M=T?.onCacheEntryAdded;if(!M)return;const O={},_=new Promise(X=>{O.cacheEntryRemoved=X}),R=Promise.race([new Promise(X=>{O.valueResolved=X}),_.then(()=>{throw nD})]);R.catch(()=>{}),p[S]=O;const L=t.endpoints[N].select(fx(T)?C:S),z=k.dispatch((X,H,W)=>W),F={...k,getCacheEntry:()=>L(k.getState()),requestId:A,extra:z,updateCachedData:fx(T)?X=>k.dispatch(t.util.updateQueryData(N,C,X)):void 0,cacheDataLoaded:R,cacheEntryRemoved:_},Y=M(C,F);Promise.resolve(Y).catch(X=>{if(X!==nD)throw X})}return b},xX=({api:t,context:{apiUid:e},reducerPath:r})=>(a,n)=>{t.util.resetApiState.match(a)&&n.dispatch(t.internalActions.middlewareRegistered(e))},bX=({reducerPath:t,context:e,context:{endpointDefinitions:r},mutationThunk:a,queryThunk:n,api:i,assertTagType:l,refetchQuery:o,internalState:c})=>{const{removeQueryResult:d}=i.internalActions,h=bi(bl(a),y0(a)),p=bi(bl(a,n),bd(a,n));let m=[];const x=(v,N)=>{h(v)?y(q8(v,"invalidatesTags",r,l),N):p(v)?y([],N):i.util.invalidateTags.match(v)&&y(W4(v.payload,void 0,void 0,void 0,void 0,l),N)};function b(v){const{queries:N,mutations:C}=v;for(const S of[N,C])for(const k in S)if(S[k]?.status==="pending")return!0;return!1}function y(v,N){const C=N.getState(),S=C[t];if(m.push(...v),S.config.invalidationBehavior==="delayed"&&b(S))return;const k=m;if(m=[],k.length===0)return;const A=i.util.selectInvalidatedBy(C,k);e.batch(()=>{const T=Array.from(A.values());for(const{queryCacheKey:M}of T){const O=S.queries[M],_=c.currentSubscriptions[M]??{};O&&(cd(_)===0?N.dispatch(d({queryCacheKey:M})):O.status!=="uninitialized"&&N.dispatch(o(O)))}})}return x},yX=({reducerPath:t,queryThunk:e,api:r,refetchQuery:a,internalState:n})=>{const i={},l=(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)&&o(m.meta.arg,x),r.util.resetApiState.match(m)&&h()};function o({queryCacheKey:m},x){const b=x.getState()[t],y=b.queries[m],v=n.currentSubscriptions[m];if(!y||y.status==="uninitialized")return;const{lowestPollingInterval:N,skipPollingIfUnfocused:C}=p(v);if(!Number.isFinite(N))return;const S=i[m];S?.timeout&&(clearTimeout(S.timeout),S.timeout=void 0);const k=Date.now()+N;i[m]={nextPollTimestamp:k,pollingInterval:N,timeout:setTimeout(()=>{(b.config.focused||!C)&&x.dispatch(a(y)),o({queryCacheKey:m},x)},N)}}function c({queryCacheKey:m},x){const y=x.getState()[t].queries[m],v=n.currentSubscriptions[m];if(!y||y.status==="uninitialized")return;const{lowestPollingInterval:N}=p(v);if(!Number.isFinite(N)){d(m);return}const C=i[m],S=Date.now()+N;(!C||S<C.nextPollTimestamp)&&o({queryCacheKey:m},x)}function d(m){const x=i[m];x?.timeout&&clearTimeout(x.timeout),delete i[m]}function h(){for(const m of Object.keys(i))d(m)}function p(m={}){let x=!1,b=Number.POSITIVE_INFINITY;for(let y in m)m[y].pollingInterval&&(b=Math.min(m[y].pollingInterval,b),x=m[y].skipPollingIfUnfocused||x);return{lowestPollingInterval:b,skipPollingIfUnfocused:x}}return l},vX=({api:t,context:e,queryThunk:r,mutationThunk:a})=>{const n=z4(r,a),i=bd(r,a),l=bl(r,a),o={};return(d,h)=>{if(n(d)){const{requestId:p,arg:{endpointName:m,originalArgs:x}}=d.meta,b=e.endpointDefinitions[m],y=b?.onQueryStarted;if(y){const v={},N=new Promise((A,T)=>{v.resolve=A,v.reject=T});N.catch(()=>{}),o[p]=v;const C=t.endpoints[m].select(fx(b)?x:p),S=h.dispatch((A,T,M)=>M),k={...h,getCacheEntry:()=>C(h.getState()),requestId:p,extra:S,updateCachedData:fx(b)?A=>h.dispatch(t.util.updateQueryData(m,x,A)):void 0,queryFulfilled:N};y(x,k)}}else if(l(d)){const{requestId:p,baseQueryMeta:m}=d.meta;o[p]?.resolve({data:d.payload,meta:m}),delete o[p]}else if(i(d)){const{requestId:p,rejectedWithValue:m,baseQueryMeta:x}=d.meta;o[p]?.reject({error:d.payload??d.error,isUnhandledError:!m,meta:x}),delete o[p]}}},wX=({reducerPath:t,context:e,api:r,refetchQuery:a,internalState:n})=>{const{removeQueryResult:i}=r.internalActions,l=(c,d)=>{Y4.match(c)&&o(d,"refetchOnFocus"),U4.match(c)&&o(d,"refetchOnReconnect")};function o(c,d){const h=c.getState()[t],p=h.queries,m=n.currentSubscriptions;e.batch(()=>{for(const x of Object.keys(m)){const b=p[x],y=m[x];if(!y||!b)continue;(Object.values(y).some(N=>N[d]===!0)||Object.values(y).every(N=>N[d]===void 0)&&h.config[d])&&(cd(y)===0?c.dispatch(i({queryCacheKey:x})):b.status!=="uninitialized"&&c.dispatch(a(b)))}})}return l};function jX(t){const{reducerPath:e,queryThunk:r,api:a,context:n}=t,{apiUid:i}=n,l={invalidateTags:ur(`${e}/invalidateTags`)},o=p=>p.type.startsWith(`${e}/`),c=[xX,mX,bX,yX,gX,vX];return{middleware:p=>{let m=!1;const b={...t,internalState:{currentSubscriptions:{}},refetchQuery:h,isThisApiSliceAction:o},y=c.map(C=>C(b)),v=hX(b),N=wX(b);return C=>S=>{if(!O4(S))return C(S);m||(m=!0,p.dispatch(a.internalActions.middlewareRegistered(i)));const k={...p,next:C},A=p.getState(),[T,M]=v(S,k,A);let O;if(T?O=C(S):O=M,p.getState()[e]&&(N(S,k,A),o(S)||n.hasRehydrationInfo(S)))for(const _ of y)_(S,k,A);return O}},actions:l};function h(p){return t.api.endpoints[p.endpointName].initiate(p.originalArgs,{subscribe:!1,forceRefetch:!0})}}var sD=Symbol(),Z8=({createSelector:t=de}={})=>({name:sD,init(e,{baseQuery:r,tagTypes:a,reducerPath:n,serializeQueryArgs:i,keepUnusedDataFor:l,refetchOnMountOrArgChange:o,refetchOnFocus:c,refetchOnReconnect:d,invalidationBehavior:h,onSchemaFailure:p,catchSchemaFailure:m,skipSchemaValidation:x},b){wY();const y=re=>re;Object.assign(e,{reducerPath:n,endpoints:{},internalActions:{onOnline:U4,onOffline:W8,onFocus:Y4,onFocusLost:U8},util:{}});const v=uX({serializeQueryArgs:i,reducerPath:n,createSelector:t}),{selectInvalidatedBy:N,selectCachedArgsForQuery:C,buildQuerySelector:S,buildInfiniteQuerySelector:k,buildMutationSelector:A}=v;Js(e.util,{selectInvalidatedBy:N,selectCachedArgsForQuery:C});const{queryThunk:T,infiniteQueryThunk:M,mutationThunk:O,patchQueryData:_,updateQueryData:R,upsertQueryData:L,prefetch:z,buildMatchThunkActions:F}=cX({baseQuery:r,reducerPath:n,context:b,api:e,serializeQueryArgs:i,assertTagType:y,selectors:v,onSchemaFailure:p,catchSchemaFailure:m,skipSchemaValidation:x}),{reducer:Y,actions:X}=dX({context:b,queryThunk:T,mutationThunk:O,serializeQueryArgs:i,reducerPath:n,assertTagType:y,config:{refetchOnFocus:c,refetchOnReconnect:d,refetchOnMountOrArgChange:o,keepUnusedDataFor:l,reducerPath:n,invalidationBehavior:h}});Js(e.util,{patchQueryData:_,updateQueryData:R,upsertQueryData:L,prefetch:z,resetApiState:X.resetApiState,upsertQueryEntries:X.cacheEntriesUpserted}),Js(e.internalActions,X);const{middleware:H,actions:W}=jX({reducerPath:n,context:b,queryThunk:T,mutationThunk:O,infiniteQueryThunk:M,api:e,assertTagType:y,selectors:v});Js(e.util,W),Js(e,{reducer:Y,middleware:H});const{buildInitiateQuery:V,buildInitiateInfiniteQuery:Z,buildInitiateMutation:B,getRunningMutationThunk:G,getRunningMutationsThunk:te,getRunningQueriesThunk:K,getRunningQueryThunk:U}=lX({queryThunk:T,mutationThunk:O,infiniteQueryThunk:M,api:e,serializeQueryArgs:i,context:b});return Js(e.util,{getRunningMutationThunk:G,getRunningMutationsThunk:te,getRunningQueryThunk:U,getRunningQueriesThunk:K}),{name:sD,injectEndpoint(re,ne){const we=e,ye=we.endpoints[re]??={};T0(ne)&&Js(ye,{name:re,select:S(re,ne),initiate:V(re,ne)},F(T,re)),nX(ne)&&Js(ye,{name:re,select:A(),initiate:B(re)},F(O,re)),M0(ne)&&Js(ye,{name:re,select:k(re,ne),initiate:Z(re,ne)},F(T,re))}}}});Z8();function Um(t){return t.replace(t[0],t[0].toUpperCase())}function NX(t){return t.type==="query"}function SX(t){return t.type==="mutation"}function Q8(t){return t.type==="infinitequery"}function ch(t,...e){return Object.assign(t,...e)}var n1=Symbol();function s1(t,e,r,a){const n=E.useMemo(()=>({queryArgs:t,serialized:typeof t=="object"?e({queryArgs:t,endpointDefinition:r,endpointName:a}):t}),[t,e,r,a]),i=E.useRef(n);return E.useEffect(()=>{i.current.serialized!==n.serialized&&(i.current=n)},[n]),i.current.serialized===n.serialized?i.current.queryArgs:t}function Wm(t){const e=E.useRef(t);return E.useEffect(()=>{zh(e.current,t)||(e.current=t)},[t]),zh(e.current,t)?e.current:t}var CX=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",AX=CX(),kX=()=>typeof navigator<"u"&&navigator.product==="ReactNative",DX=kX(),TX=()=>AX||DX?E.useLayoutEffect:E.useEffect,MX=TX(),iD=t=>t.isUninitialized?{...t,isUninitialized:!1,isFetching:!0,isLoading:t.data===void 0,status:$8.pending}:t;function i1(t,...e){const r={};return e.forEach(a=>{r[a]=t[a]}),r}var l1=["data","status","isLoading","isSuccess","isError","error"];function EX({api:t,moduleOptions:{batch:e,hooks:{useDispatch:r,useSelector:a,useStore:n},unstable__sideEffectsInRender:i,createSelector:l},serializeQueryArgs:o,context:c}){const d=i?k=>k():E.useEffect;return{buildQueryHooks:N,buildInfiniteQueryHooks:C,buildMutationHook:S,usePrefetch:m};function h(k,A,T){if(A?.endpointName&&k.isUninitialized){const{endpointName:z}=A,F=c.endpointDefinitions[z];T!==Gn&&o({queryArgs:A.originalArgs,endpointDefinition:F,endpointName:z})===o({queryArgs:T,endpointDefinition:F,endpointName:z})&&(A=void 0)}let M=k.isSuccess?k.data:A?.data;M===void 0&&(M=k.data);const O=M!==void 0,_=k.isLoading,R=(!A||A.isLoading||A.isUninitialized)&&!O&&_,L=k.isSuccess||O&&(_&&!A?.isError||k.isUninitialized);return{...k,data:M,currentData:k.data,isFetching:_,isLoading:R,isSuccess:L}}function p(k,A,T){if(A?.endpointName&&k.isUninitialized){const{endpointName:z}=A,F=c.endpointDefinitions[z];T!==Gn&&o({queryArgs:A.originalArgs,endpointDefinition:F,endpointName:z})===o({queryArgs:T,endpointDefinition:F,endpointName:z})&&(A=void 0)}let M=k.isSuccess?k.data:A?.data;M===void 0&&(M=k.data);const O=M!==void 0,_=k.isLoading,R=(!A||A.isLoading||A.isUninitialized)&&!O&&_,L=k.isSuccess||_&&O;return{...k,data:M,currentData:k.data,isFetching:_,isLoading:R,isSuccess:L}}function m(k,A){const T=r(),M=Wm(A);return E.useCallback((O,_)=>T(t.util.prefetch(k,O,{...M,..._})),[k,T,M])}function x(k,A,{refetchOnReconnect:T,refetchOnFocus:M,refetchOnMountOrArgChange:O,skip:_=!1,pollingInterval:R=0,skipPollingIfUnfocused:L=!1,...z}={}){const{initiate:F}=t.endpoints[k],Y=r(),X=E.useRef(void 0);if(!X.current){const re=Y(t.internalActions.internal_getRTKQSubscriptions());X.current=re}const H=s1(_?Gn:A,px,c.endpointDefinitions[k],k),W=Wm({refetchOnReconnect:T,refetchOnFocus:M,pollingInterval:R,skipPollingIfUnfocused:L}),V=z.initialPageParam,Z=Wm(V),B=E.useRef(void 0);let{queryCacheKey:G,requestId:te}=B.current||{},K=!1;G&&te&&(K=X.current.isRequestSubscribed(G,te));const U=!K&&B.current!==void 0;return d(()=>{U&&(B.current=void 0)},[U]),d(()=>{const re=B.current;if(H===Gn){re?.unsubscribe(),B.current=void 0;return}const ne=B.current?.subscriptionOptions;if(!re||re.arg!==H){re?.unsubscribe();const we=Y(F(H,{subscriptionOptions:W,forceRefetch:O,...Q8(c.endpointDefinitions[k])?{initialPageParam:Z}:{}}));B.current=we}else W!==ne&&re.updateSubscriptionOptions(W)},[Y,F,O,H,W,U,Z,k]),[B,Y,F,W]}function b(k,A){return(M,{skip:O=!1,selectFromResult:_}={})=>{const{select:R}=t.endpoints[k],L=s1(O?Gn:M,o,c.endpointDefinitions[k],k),z=E.useRef(void 0),F=E.useMemo(()=>l([R(L),(V,Z)=>Z,V=>L],A,{memoizeOptions:{resultEqualityCheck:zh}}),[R,L]),Y=E.useMemo(()=>_?l([F],_,{devModeChecks:{identityFunctionCheck:"never"}}):F,[F,_]),X=a(V=>Y(V,z.current),zh),H=n(),W=F(H.getState(),z.current);return MX(()=>{z.current=W},[W]),X}}function y(k){E.useEffect(()=>()=>{k.current?.unsubscribe?.(),k.current=void 0},[k])}function v(k){if(!k.current)throw new Error(xa(38));return k.current.refetch()}function N(k){const A=(O,_={})=>{const[R]=x(k,O,_);return y(R),E.useMemo(()=>({refetch:()=>v(R)}),[R])},T=({refetchOnReconnect:O,refetchOnFocus:_,pollingInterval:R=0,skipPollingIfUnfocused:L=!1}={})=>{const{initiate:z}=t.endpoints[k],F=r(),[Y,X]=E.useState(n1),H=E.useRef(void 0),W=Wm({refetchOnReconnect:O,refetchOnFocus:_,pollingInterval:R,skipPollingIfUnfocused:L});d(()=>{const G=H.current?.subscriptionOptions;W!==G&&H.current?.updateSubscriptionOptions(W)},[W]);const V=E.useRef(W);d(()=>{V.current=W},[W]);const Z=E.useCallback(function(G,te=!1){let K;return e(()=>{H.current?.unsubscribe(),H.current=K=F(z(G,{subscriptionOptions:V.current,forceRefetch:!te})),X(G)}),K},[F,z]),B=E.useCallback(()=>{H.current?.queryCacheKey&&F(t.internalActions.removeQueryResult({queryCacheKey:H.current?.queryCacheKey}))},[F]);return E.useEffect(()=>()=>{H?.current?.unsubscribe()},[]),E.useEffect(()=>{Y!==n1&&!H.current&&Z(Y,!0)},[Y,Z]),E.useMemo(()=>[Z,Y,{reset:B}],[Z,Y,B])},M=b(k,h);return{useQueryState:M,useQuerySubscription:A,useLazyQuerySubscription:T,useLazyQuery(O){const[_,R,{reset:L}]=T(O),z=M(R,{...O,skip:R===n1}),F=E.useMemo(()=>({lastArg:R}),[R]);return E.useMemo(()=>[_,{...z,reset:L},F],[_,z,L,F])},useQuery(O,_){const R=A(O,_),L=M(O,{selectFromResult:O===Gn||_?.skip?void 0:iD,..._}),z=i1(L,...l1);return E.useDebugValue(z),E.useMemo(()=>({...L,...R}),[L,R])}}}function C(k){const A=(M,O={})=>{const[_,R,L,z]=x(k,M,O),F=E.useRef(z);d(()=>{F.current=z},[z]);const Y=E.useCallback(function(W,V){let Z;return e(()=>{_.current?.unsubscribe(),_.current=Z=R(L(W,{subscriptionOptions:F.current,direction:V}))}),Z},[_,R,L]);y(_);const X=s1(O.skip?Gn:M,px,c.endpointDefinitions[k],k),H=E.useCallback(()=>v(_),[_]);return E.useMemo(()=>({trigger:Y,refetch:H,fetchNextPage:()=>Y(X,"forward"),fetchPreviousPage:()=>Y(X,"backward")}),[H,Y,X])},T=b(k,p);return{useInfiniteQueryState:T,useInfiniteQuerySubscription:A,useInfiniteQuery(M,O){const{refetch:_,fetchNextPage:R,fetchPreviousPage:L}=A(M,O),z=T(M,{selectFromResult:M===Gn||O?.skip?void 0:iD,...O}),F=i1(z,...l1,"hasNextPage","hasPreviousPage");return E.useDebugValue(F),E.useMemo(()=>({...z,fetchNextPage:R,fetchPreviousPage:L,refetch:_}),[z,R,L,_])}}}function S(k){return({selectFromResult:A,fixedCacheKey:T}={})=>{const{select:M,initiate:O}=t.endpoints[k],_=r(),[R,L]=E.useState();E.useEffect(()=>()=>{R?.arg.fixedCacheKey||R?.reset()},[R]);const z=E.useCallback(function(G){const te=_(O(G,{fixedCacheKey:T}));return L(te),te},[_,O,T]),{requestId:F}=R||{},Y=E.useMemo(()=>M({fixedCacheKey:T,requestId:R?.requestId}),[T,R,M]),X=E.useMemo(()=>A?l([Y],A):Y,[A,Y]),H=a(X,zh),W=T==null?R?.arg.originalArgs:void 0,V=E.useCallback(()=>{e(()=>{R&&L(void 0),T&&_(t.internalActions.removeMutationResult({requestId:F,fixedCacheKey:T}))})},[_,T,R,F]),Z=i1(H,...l1,"endpointName");E.useDebugValue(Z);const B=E.useMemo(()=>({...H,originalArgs:W,reset:V}),[H,W,V]);return E.useMemo(()=>[z,B],[z,B])}}}var PX=Symbol(),OX=({batch:t=iY,hooks:e={useDispatch:Fn,useSelector:un,useStore:XO},createSelector:r=de,unstable__sideEffectsInRender:a=!1,...n}={})=>({name:PX,init(i,{serializeQueryArgs:l},o){const c=i,{buildQueryHooks:d,buildInfiniteQueryHooks:h,buildMutationHook:p,usePrefetch:m}=EX({api:i,moduleOptions:{batch:t,hooks:e,unstable__sideEffectsInRender:a,createSelector:r},serializeQueryArgs:l,context:o});return ch(c,{usePrefetch:m}),ch(o,{batch:t}),{injectEndpoint(x,b){if(NX(b)){const{useQuery:y,useLazyQuery:v,useLazyQuerySubscription:N,useQueryState:C,useQuerySubscription:S}=d(x);ch(c.endpoints[x],{useQuery:y,useLazyQuery:v,useLazyQuerySubscription:N,useQueryState:C,useQuerySubscription:S}),i[`use${Um(x)}Query`]=y,i[`useLazy${Um(x)}Query`]=v}if(SX(b)){const y=p(x);ch(c.endpoints[x],{useMutation:y}),i[`use${Um(x)}Mutation`]=y}else if(Q8(b)){const{useInfiniteQuery:y,useInfiniteQuerySubscription:v,useInfiniteQueryState:N}=h(x);ch(c.endpoints[x],{useInfiniteQuery:y,useInfiniteQuerySubscription:v,useInfiniteQueryState:N}),i[`use${Um(x)}InfiniteQuery`]=y}}}}}),RX=K8(Z8(),OX());const _X="https://aaaogo.xyz/api",ul=RX({reducerPath:"api",baseQuery:aX({baseUrl:_X,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:LX,useGetPendingKYCsQuery:zX,useGetCurrentUserQuery:IX,useGetPendingApprovalsEarningsQuery:FX}=ul,Jo="https://aaaogo.xyz/api/vehicle-hiring",BX=async t=>{try{return(await Re.get(`${Jo}/all-driver-hirings`,{headers:{Authorization:`Bearer ${t}`}})).data}catch(e){throw e.response?.data?.message||"Failed to fetch all driver hirings"}},HX=async t=>{try{return(await Re.get(`${Jo}/pending-driver-hirings`,{headers:{Authorization:`Bearer ${t}`}})).data}catch(e){throw e.response?.data?.message||"Failed to fetch pending driver hirings"}},$X=async(t,e)=>{try{return(await Re.get(`${Jo}/driver-hiring/${t}`,{headers:{Authorization:`Bearer ${e}`}})).data}catch(r){throw r.response?.data?.message||"Failed to fetch driver hiring details"}},YX=async(t,e)=>{try{return(await Re.post(`${Jo}/accept-driver-hiring/${t}`,{},{headers:{Authorization:`Bearer ${e}`}})).data}catch(r){throw r.response?.data?.message||"Failed to approve driver hiring"}},UX=async(t,e,r)=>{try{return(await Re.post(`${Jo}/reject-driver-hiring/${t}`,{reason:e},{headers:{Authorization:`Bearer ${r}`}})).data}catch(a){throw a.response?.data?.message||"Failed to reject driver hiring"}},WX=async(t,e,r)=>{try{return(await Re.put(`${Jo}/update-driver-hiring/${t}`,{terms:e},{headers:{Authorization:`Bearer ${r}`}})).data}catch(a){throw a.response?.data?.message||"Failed to update driver hiring terms"}},XX=async(t,e,r)=>{try{return(await Re.post(`${Jo}/add-note/${t}`,{note:e},{headers:{Authorization:`Bearer ${r}`}})).data}catch(a){throw a.response?.data?.message||"Failed to add internal note"}},o1=Jt("driverHiring/fetchAll",async(t,{rejectWithValue:e})=>{try{return await BX(t)}catch(r){return e(r)}}),Eg=Jt("driverHiring/fetchPending",async(t,{rejectWithValue:e})=>{try{return await HX(t)}catch(r){return e(r)}}),Pg=Jt("driverHiring/fetchById",async({driverHiringId:t,token:e},{rejectWithValue:r})=>{try{return await $X(t,e)}catch(a){return r(a)}}),Hh=Jt("driverHiring/approve",async({driverHiringId:t,token:e},{rejectWithValue:r})=>{try{return await YX(t,e)}catch(a){return r(a)}}),$h=Jt("driverHiring/reject",async({driverHiringId:t,reason:e,token:r},{rejectWithValue:a})=>{try{return await UX(t,e,r)}catch(n){return a(n)}}),Og=Jt("driverHiring/updateTerms",async({driverHiringId:t,terms:e,token:r},{rejectWithValue:a})=>{try{return await WX(t,e,r)}catch(n){return a(n)}}),Rg=Jt("driverHiring/addNote",async({driverHiringId:t,note:e,token:r},{rejectWithValue:a})=>{try{return await XX(t,e,r)}catch(n){return a(n)}}),J8=Yt({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(o1.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(o1.fulfilled,(e,r)=>{e.loading=!1,e.driverHirings=r.payload.driverHirings,e.success=r.payload.message}).addCase(o1.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to fetch all driver hirings"}),t.addCase(Eg.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Eg.fulfilled,(e,r)=>{e.loading=!1,e.pendingHirings=r.payload.pendingHirings,e.totalPending=r.payload.totalPending,e.success=r.payload.message}).addCase(Eg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to fetch pending driver hirings"}),t.addCase(Pg.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Pg.fulfilled,(e,r)=>{e.loading=!1,e.currentHiring=r.payload.driverHiring,e.success=r.payload.message}).addCase(Pg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to fetch driver hiring details"}),t.addCase(Hh.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Hh.fulfilled,(e,r)=>{e.loading=!1,e.pendingHirings=e.pendingHirings.filter(a=>a._id!==r.payload.driverHiringId),e.totalPending=e.pendingHirings.length,e.currentHiring=null,e.success=r.payload.message}).addCase(Hh.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to approve driver hiring"}),t.addCase($h.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase($h.fulfilled,(e,r)=>{e.loading=!1,e.pendingHirings=e.pendingHirings.filter(a=>a._id!==r.payload.driverHiringId),e.totalPending=e.pendingHirings.length,e.currentHiring=null,e.success=r.payload.message}).addCase($h.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to reject driver hiring"}),t.addCase(Og.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Og.fulfilled,(e,r)=>{e.loading=!1,e.currentHiring=r.payload.driverHiring,e.success=r.payload.message}).addCase(Og.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to update driver hiring terms"}),t.addCase(Rg.pending,e=>{e.loading=!0,e.error=null,e.success=null}).addCase(Rg.fulfilled,(e,r)=>{e.loading=!1,e.currentHiring=r.payload.driverHiring,e.success=r.payload.message}).addCase(Rg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload||"Failed to add internal note"})}}),{resetStatus:eR}=J8.actions,VX=J8.reducer,E0="https://aaaogo.xyz/api/mlm/",qX=async()=>{try{const t=await Re.get(`${E0}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)}},GX=async t=>{try{const e=await Re.put(`${E0}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)}},KX=async()=>{try{const t=await Re.get(`${E0.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)}},ZX=async()=>{try{const t=await Re.get(`${E0}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)}},Yh=Jt("mlm/fetchMLMDashboard",async(t,{rejectWithValue:e})=>{try{const r=await qX();return console.log("Fetched dashboard:",r),r}catch(r){return console.error("Fetch error:",r),e(r.message)}}),_g=Jt("mlm/updateMLMDistributions",async(t,{rejectWithValue:e})=>{try{console.log("Sending update payload:",t);const r=await GX(t);return console.log("Received update response:",r),r}catch(r){return console.error("Update error:",r),e(r.message)}}),Lg=Jt("mlm/fetchMLMDashboardData",async(t,{rejectWithValue:e})=>{try{return await KX()}catch(r){return e(r.message)}}),zg=Jt("mlm/fetchDDRLeaderboard",async(t,{rejectWithValue:e})=>{try{return await ZX()}catch(r){return e(r.message)}}),QX={dashboard:null,dashboardData:null,leaderboard:null,loading:!1,error:null,success:!1},tR=Yt({name:"mlm",initialState:QX,reducers:{resetMlmState:t=>{t.loading=!1,t.error=null,t.success=!1}},extraReducers:t=>{t.addCase(Yh.pending,e=>{e.loading=!0,e.error=null}).addCase(Yh.fulfilled,(e,r)=>{e.loading=!1,e.dashboard=r.payload}).addCase(Yh.rejected,(e,r)=>{e.loading=!1,e.error=r.payload}).addCase(_g.pending,e=>{e.loading=!0,e.error=null,e.success=!1}).addCase(_g.fulfilled,(e,r)=>{e.loading=!1,e.success=!0;const a={...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:a},console.log("Updated state:",e.dashboard)}).addCase(_g.rejected,(e,r)=>{e.loading=!1,e.error=r.payload}).addCase(Lg.pending,e=>{e.loading=!0,e.error=null}).addCase(Lg.fulfilled,(e,r)=>{e.loading=!1,e.dashboardData=r.payload}).addCase(Lg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload}).addCase(zg.pending,e=>{e.loading=!0,e.error=null}).addCase(zg.fulfilled,(e,r)=>{e.loading=!1,e.leaderboard=r.payload}).addCase(zg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload})}}),{resetMlmState:lD}=tR.actions,JX=tR.reducer,yi="/user/",eV=async()=>{try{const t=await Gt.get(`${yi}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)}},tV=async t=>(await Gt.post(`${yi}admin/add-admin`,t)).data,rV=async()=>{try{const t=await Gt.get(`${yi}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)}},aV=async(t,e)=>{console.log(`Sending PUT request for userId: ${t}, URL: ${yi}edit-driver/${t}, Data:`,e);try{const r=new AbortController,a=setTimeout(()=>{console.log(`Request timeout for userId: ${t}`),r.abort()},1e4),n=await Gt.put(`${yi}edit-driver/${t}`,e,{headers:{"Content-Type":e instanceof FormData?"multipart/form-data":"application/json"},signal:r.signal});return clearTimeout(a),console.log("Edit driver response:",n.data),n.data}catch(r){console.error("Edit driver error:",r.response?.data||r.message);const a=r.response?.data?.message||r.response?.data?.errors||r.message||"Failed to edit driver";throw new Error(JSON.stringify(a))}},nV=async(t,e)=>{console.log(`Sending PATCH request for userId: ${t}, URL: ${yi}edit/${t}, Data:`,e);try{const r=new AbortController,a=setTimeout(()=>{console.log(`Request timeout for userId: ${t}`),r.abort()},1e4),n=await Gt.patch(`${yi}edit/${t}`,e,{headers:{},signal:r.signal});return clearTimeout(a),console.log("Edit response:",n.data),n.data}catch(r){console.error("Edit error:",r.response?.data||r.message);const a=r.response?.data?.message||r.response?.data?.errors||r.message||"Failed to edit user";throw new Error(JSON.stringify(a))}},sV=async t=>{console.log(`Sending DELETE request for userId: ${t}, URL: ${yi}delete/${t}`);try{const e=new AbortController,r=setTimeout(()=>{console.log(`Request timeout for userId: ${t}`),e.abort()},15e3),a=await Gt.delete(`${yi}delete/${t}`,{signal:e.signal});return clearTimeout(r),console.log("Delete response:",a.data),a.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)}},Bd={getAllUsers:eV,editUser:nV,deleteUser:sV,getAllDrivers:rV,editDriver:aV,addAdmin:tV},Uh=Jt("users/fetchAll",async(t,e)=>{try{console.log("Starting fetchAllUsers");const r=await Bd.getAllUsers();return console.log("fetchAllUsers response:",r),r}catch(r){const a=r.message||"Failed to fetch customers";return console.error("fetchAllUsers error:",a),e.rejectWithValue(a)}}),dd=Jt("users/fetchAllDrivers",async(t,e)=>{try{console.log("Starting fetchAllDrivers");const r=await Bd.getAllDrivers();return console.log("fetchAllDrivers response:",r),r}catch(r){const a=r.message||"Failed to fetch drivers";return console.error("fetchAllDrivers error:",a),e.rejectWithValue(a)}}),Ig=Jt("users/edit",async({userId:t,userData:e},r)=>{console.log(`Starting editUser thunk for userId: ${t}`);try{const a=await Bd.editUser(t,e);return console.log("editUser response:",a),await r.dispatch(Uh()).unwrap(),{userId:a.user?.userId||t,message:a.message,success:a.success}}catch(a){let n;try{n=JSON.parse(a.message)}catch{n=a.message||"Failed to edit user"}return console.error("editUser error:",n),r.rejectWithValue(n)}}),Fg=Jt("users/editDriver",async({userId:t,userData:e},r)=>{console.log(`Starting editDriver thunk for userId: ${t}`);try{const a=await Bd.editDriver(t,e);return console.log("editDriver response:",a),await r.dispatch(dd()).unwrap(),{userId:a.user?.userId||t,message:a.message,success:a.success}}catch(a){let n;try{n=JSON.parse(a.message)}catch{n=a.message||"Failed to edit driver"}return console.error("editDriver error:",n),r.rejectWithValue(n)}}),Wh=Jt("users/delete",async(t,e)=>{console.log(`Starting deleteUser thunk for userId: ${t}`);try{const r=await Bd.deleteUser(t);return console.log("deleteUser response:",r),await e.dispatch(dd()).unwrap(),{userId:r.userId||t,message:r.message,success:r.success}}catch(r){const a=r.message||"Failed to delete user";return console.error("deleteUser error:",a),e.rejectWithValue(a)}}),rR=Yt({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(Uh.pending,e=>{console.log("fetchAllUsers pending"),e.loading=!0,e.error=null,e.success=!1}).addCase(Uh.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(Uh.rejected,(e,r)=>{console.log("fetchAllUsers rejected:",r.payload),e.loading=!1,e.error=r.payload,e.success=!1}).addCase(dd.pending,e=>{console.log("fetchAllDrivers pending"),e.loading=!0,e.error=null,e.success=!1}).addCase(dd.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(dd.rejected,(e,r)=>{console.log("fetchAllDrivers rejected:",r.payload),e.loading=!1,e.error=r.payload,e.success=!1}).addCase(Ig.pending,e=>{console.log("editUser pending"),e.loading=!0,e.error=null,e.editSuccess=!1}).addCase(Ig.fulfilled,(e,r)=>{console.log("editUser fulfilled:",r.payload),e.loading=!1,e.editSuccess=r.payload.success||!1,e.updateKey=Date.now()}).addCase(Ig.rejected,(e,r)=>{console.log("editUser rejected:",r.payload),e.loading=!1,e.error=r.payload,e.editSuccess=!1}).addCase(Fg.pending,e=>{console.log("editDriver pending"),e.loading=!0,e.error=null,e.editSuccess=!1}).addCase(Fg.fulfilled,(e,r)=>{console.log("editDriver fulfilled:",r.payload),e.loading=!1,e.editSuccess=r.payload.success||!1,e.updateKey=Date.now()}).addCase(Fg.rejected,(e,r)=>{console.log("editDriver rejected:",r.payload),e.loading=!1,e.error=r.payload,e.editSuccess=!1}).addCase(Wh.pending,e=>{console.log("deleteUser pending"),e.loading=!0,e.error=null,e.deleteSuccess=!1}).addCase(Wh.fulfilled,(e,r)=>{console.log("deleteUser fulfilled:",r.payload),e.loading=!1,e.deleteSuccess=r.payload.success||!1,e.updateKey=Date.now()}).addCase(Wh.rejected,(e,r)=>{console.log("deleteUser rejected:",r.payload),e.loading=!1,e.error=r.payload,e.deleteSuccess=!1})}}),{resetUserState:aR}=rR.actions,iV=rR.reducer,c1=Jt("admin/addAdmin",async(t,e)=>{try{console.log("Starting addAdmin:",t);const r=await Bd.addAdmin(t);return console.log("addAdmin response:",r),r}catch(r){const a=r.message||"Failed to add admin";return console.error("addAdmin error:",a),e.rejectWithValue(a)}}),lV=Jt("admin/setUser",async(t,e)=>(console.log("Setting user:",t),t)),nR=Yt({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(lV.fulfilled,(e,r)=>{console.log("setUser fulfilled:",r.payload),e.user=r.payload,e.success=!0}).addCase(c1.pending,e=>{console.log("addAdmin pending"),e.loading=!0,e.error=null,e.success=!1}).addCase(c1.fulfilled,(e,r)=>{console.log("addAdmin fulfilled:",r.payload),e.loading=!1,e.success=!0}).addCase(c1.rejected,(e,r)=>{console.log("addAdmin rejected:",r.payload),e.loading=!1,e.error=r.payload,e.success=!1})}}),{resetAdminState:I2e}=nR.actions,oV=nR.reducer,Bg=Jt("services/fetchServices",async(t,{rejectWithValue:e})=>{try{return(await Re.get("https://aaaogo.xyz/api/user/services",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data.services}catch(r){return e(r.response.data)}}),sR=Jt("services/approveService",async(t,{rejectWithValue:e})=>{try{return(await Re.post(`https://aaaogo.xyz/api/user/services/approve/${t}`,{},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data}catch(r){return e(r.response.data)}}),iR=Jt("services/rejectService",async({serviceId:t,reason:e},{rejectWithValue:r})=>{try{return(await Re.post(`https://aaaogo.xyz/api/user/services/reject/${t}`,{reason:e},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data}catch(a){return r(a.response.data)}}),cV=Yt({name:"services",initialState:{services:[],loading:!1,error:null},reducers:{},extraReducers:t=>{t.addCase(Bg.pending,e=>{e.loading=!0,e.error=null}).addCase(Bg.fulfilled,(e,r)=>{e.loading=!1,e.services=r.payload}).addCase(Bg.rejected,(e,r)=>{e.loading=!1,e.error=r.payload}).addCase(sR.fulfilled,(e,r)=>{const a=e.services.findIndex(n=>n._id===r.payload.serviceId);a!==-1&&(e.services[a].status="approved")}).addCase(iR.fulfilled,(e,r)=>{const a=e.services.findIndex(n=>n._id===r.payload.serviceId);a!==-1&&(e.services[a].status="rejected",e.services[a].rejectionReason=r.meta.arg.reason)})}}),dV=cV.reducer,tn=r8({reducer:{[ul.reducerPath]:ul.reducer,user:iV,admin:oV,auth:fU,driverHiring:VX,services:dV,mlm:JX},middleware:t=>t().concat(ul.middleware),devTools:!1}),Gt=Re.create({baseURL:"https://aaaogo.xyz/api",timeout:1e4});Gt.interceptors.request.use(t=>{const r=tn.getState().auth.token;if(r)try{const a=JSON.parse(atob(r.split(".")[1])),n=Date.now()/1e3;if(a.exp&&a.exp<n)return tn.dispatch(yd()),window.location.href="/",Promise.reject(new Error("Token expired"));t.headers.Authorization=`Bearer ${r}`}catch(a){return console.error("Invalid token format:",a),tn.dispatch(yd()),window.location.href="/",Promise.reject(new Error("Invalid token"))}return t},t=>Promise.reject(t));Gt.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..."),tn.dispatch(yd({reason:"refresh_failed"})),typeof window<"u"&&(window.location.href="/"),Promise.reject(t);try{const a=tn.getState(),{token:n}=a.auth;if(n&&cf(n)){const{default:i}=await gU(async()=>{const{default:o}=await Promise.resolve().then(()=>uV);return{default:o}},[],import.meta.url);if(await i.refreshToken()){const c=tn.getState().auth.token;if(c)return r.headers.Authorization=`Bearer ${c}`,Gt(r)}}}catch(a){console.error("Token refresh attempt failed:",a)}console.log("Token expired or unauthorized, logging out..."),tn.dispatch(yd({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 lR{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=tn.getState(),{token:r,isAuthenticated:a}=e.auth;if(!a||!r)return!1;const n=M5(r);if(!n)return!1;const i=new Date;return n.getTime()-i.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=tn.getState(),{token:r}=e.auth;if(!r)throw new Error("No token available for refresh");const a=await Gt.post("/auth/refresh",{refreshToken:r}),{token:n,user:i}=a.data;if(n&&cf(n))return tn.dispatch(g8({token:n,user:i})),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),tn.dispatch(yd({reason:"expired"})),typeof window<"u"&&(window.location.href="/"),!1}}getTimeUntilExpiration(){const e=tn.getState(),{token:r}=e.auth;if(!r)return 0;const a=M5(r);if(!a)return 0;const n=new Date;return Math.max(0,a.getTime()-n.getTime())}shouldRefreshSoon(){const e=this.getTimeUntilExpiration();return e>0&&e<=this.refreshThreshold}}const Jw=new lR,uV=Object.freeze(Object.defineProperty({__proto__:null,TokenRefreshService:lR,default:Jw},Symbol.toStringTag,{value:"Module"}));let hV={data:""},fV=t=>typeof window=="object"?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||hV,pV=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,mV=/\/\*[^]*?\*\/|  +/g,oD=/\n+/g,sl=(t,e)=>{let r="",a="",n="";for(let i in t){let l=t[i];i[0]=="@"?i[1]=="i"?r=i+" "+l+";":a+=i[1]=="f"?sl(l,i):i+"{"+sl(l,i[1]=="k"?"":e)+"}":typeof l=="object"?a+=sl(l,e?e.replace(/([^,])+/g,o=>i.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,o):o?o+" "+c:c)):i):l!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),n+=sl.p?sl.p(i,l):i+":"+l+";")}return r+(e&&n?e+"{"+n+"}":n)+a},ei={},oR=t=>{if(typeof t=="object"){let e="";for(let r in t)e+=r+oR(t[r]);return e}return t},gV=(t,e,r,a,n)=>{let i=oR(t),l=ei[i]||(ei[i]=(c=>{let d=0,h=11;for(;d<c.length;)h=101*h+c.charCodeAt(d++)>>>0;return"go"+h})(i));if(!ei[l]){let c=i!==t?t:(d=>{let h,p,m=[{}];for(;h=pV.exec(d.replace(mV,""));)h[4]?m.shift():h[3]?(p=h[3].replace(oD," ").trim(),m.unshift(m[0][p]=m[0][p]||{})):m[0][h[1]]=h[2].replace(oD," ").trim();return m[0]})(t);ei[l]=sl(n?{["@keyframes "+l]:c}:c,r?"":"."+l)}let o=r&&ei.g?ei.g:null;return r&&(ei.g=ei[l]),((c,d,h,p)=>{p?d.data=d.data.replace(p,c):d.data.indexOf(c)===-1&&(d.data=h?c+d.data:d.data+c)})(ei[l],e,a,o),l},xV=(t,e,r)=>t.reduce((a,n,i)=>{let l=e[i];if(l&&l.call){let o=l(r),c=o&&o.props&&o.props.className||/^go/.test(o)&&o;l=c?"."+c:o&&typeof o=="object"?o.props?"":sl(o,""):o===!1?"":o}return a+n+(l??"")},"");function P0(t){let e=this||{},r=t.call?t(e.p):t;return gV(r.unshift?r.raw?xV(r,[].slice.call(arguments,1),e.p):r.reduce((a,n)=>Object.assign(a,n&&n.call?n(e.p):n),{}):r,fV(e.target),e.g,e.o,e.k)}let cR,ej,tj;P0.bind({g:1});let vi=P0.bind({k:1});function bV(t,e,r,a){sl.p=e,cR=t,ej=r,tj=a}function Al(t,e){let r=this||{};return function(){let a=arguments;function n(i,l){let o=Object.assign({},i),c=o.className||n.className;r.p=Object.assign({theme:ej&&ej()},o),r.o=/ *go\d+/.test(c),o.className=P0.apply(r,a)+(c?" "+c:"");let d=t;return t[0]&&(d=o.as||t,delete o.as),tj&&d[0]&&tj(o),cR(d,o)}return n}}var yV=t=>typeof t=="function",mx=(t,e)=>yV(t)?t(e):t,vV=(()=>{let t=0;return()=>(++t).toString()})(),dR=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),wV=20,X4="default",uR=(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(l=>l.id===e.toast.id?{...l,...e.toast}:l)};case 2:let{toast:a}=e;return uR(t,{type:t.toasts.find(l=>l.id===a.id)?1:0,toast:a});case 3:let{toastId:n}=e;return{...t,toasts:t.toasts.map(l=>l.id===n||n===void 0?{...l,dismissed:!0,visible:!1}:l)};case 4:return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(l=>l.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(l=>({...l,pauseDuration:l.pauseDuration+i}))}}},Hg=[],hR={toasts:[],pausedAt:void 0,settings:{toastLimit:wV}},As={},fR=(t,e=X4)=>{As[e]=uR(As[e]||hR,t),Hg.forEach(([r,a])=>{r===e&&a(As[e])})},pR=t=>Object.keys(As).forEach(e=>fR(t,e)),jV=t=>Object.keys(As).find(e=>As[e].toasts.some(r=>r.id===t)),O0=(t=X4)=>e=>{fR(e,t)},NV={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},SV=(t={},e=X4)=>{let[r,a]=E.useState(As[e]||hR),n=E.useRef(As[e]);E.useEffect(()=>(n.current!==As[e]&&a(As[e]),Hg.push([e,a]),()=>{let l=Hg.findIndex(([o])=>o===e);l>-1&&Hg.splice(l,1)}),[e]);let i=r.toasts.map(l=>{var o,c,d;return{...t,...t[l.type],...l,removeDelay:l.removeDelay||((o=t[l.type])==null?void 0:o.removeDelay)||t?.removeDelay,duration:l.duration||((c=t[l.type])==null?void 0:c.duration)||t?.duration||NV[l.type],style:{...t.style,...(d=t[l.type])==null?void 0:d.style,...l.style}}});return{...r,toasts:i}},CV=(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||vV()}),Wf=t=>(e,r)=>{let a=CV(e,t,r);return O0(a.toasterId||jV(a.id))({type:2,toast:a}),a.id},Sr=(t,e)=>Wf("blank")(t,e);Sr.error=Wf("error");Sr.success=Wf("success");Sr.loading=Wf("loading");Sr.custom=Wf("custom");Sr.dismiss=(t,e)=>{let r={type:3,toastId:t};e?O0(e)(r):pR(r)};Sr.dismissAll=t=>Sr.dismiss(void 0,t);Sr.remove=(t,e)=>{let r={type:4,toastId:t};e?O0(e)(r):pR(r)};Sr.removeAll=t=>Sr.remove(void 0,t);Sr.promise=(t,e,r)=>{let a=Sr.loading(e.loading,{...r,...r?.loading});return typeof t=="function"&&(t=t()),t.then(n=>{let i=e.success?mx(e.success,n):void 0;return i?Sr.success(i,{id:a,...r,...r?.success}):Sr.dismiss(a),n}).catch(n=>{let i=e.error?mx(e.error,n):void 0;i?Sr.error(i,{id:a,...r,...r?.error}):Sr.dismiss(a)}),t};var AV=1e3,kV=(t,e="default")=>{let{toasts:r,pausedAt:a}=SV(t,e),n=E.useRef(new Map).current,i=E.useCallback((p,m=AV)=>{if(n.has(p))return;let x=setTimeout(()=>{n.delete(p),l({type:4,toastId:p})},m);n.set(p,x)},[]);E.useEffect(()=>{if(a)return;let p=Date.now(),m=r.map(x=>{if(x.duration===1/0)return;let b=(x.duration||0)+x.pauseDuration-(p-x.createdAt);if(b<0){x.visible&&Sr.dismiss(x.id);return}return setTimeout(()=>Sr.dismiss(x.id,e),b)});return()=>{m.forEach(x=>x&&clearTimeout(x))}},[r,a,e]);let l=E.useCallback(O0(e),[e]),o=E.useCallback(()=>{l({type:5,time:Date.now()})},[l]),c=E.useCallback((p,m)=>{l({type:1,toast:{id:p,height:m}})},[l]),d=E.useCallback(()=>{a&&l({type:6,time:Date.now()})},[a,l]),h=E.useCallback((p,m)=>{let{reverseOrder:x=!1,gutter:b=8,defaultPosition:y}=m||{},v=r.filter(S=>(S.position||y)===(p.position||y)&&S.height),N=v.findIndex(S=>S.id===p.id),C=v.filter((S,k)=>k<N&&S.visible).length;return v.filter(S=>S.visible).slice(...x?[C+1]:[0,C]).reduce((S,k)=>S+(k.height||0)+b,0)},[r]);return E.useEffect(()=>{r.forEach(p=>{if(p.dismissed)i(p.id,p.removeDelay);else{let m=n.get(p.id);m&&(clearTimeout(m),n.delete(p.id))}})},[r,i]),{toasts:r,handlers:{updateHeight:c,startPause:o,endPause:d,calculateOffset:h}}},DV=vi`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`,TV=vi`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`,MV=vi`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`,EV=Al("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${t=>t.primary||"#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

  animation: ${DV} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;

  &:after,
  &:before {
    content: '';
    animation: ${TV} 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: ${MV} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`,PV=vi`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`,OV=Al("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: ${PV} 1s linear infinite;
`,RV=vi`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`,_V=vi`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`,LV=Al("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${t=>t.primary||"#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${RV} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${_V} 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;
  }
`,zV=Al("div")`
  position: absolute;
`,IV=Al("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`,FV=vi`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`,BV=Al("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${FV} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`,HV=({toast:t})=>{let{icon:e,type:r,iconTheme:a}=t;return e!==void 0?typeof e=="string"?E.createElement(BV,null,e):e:r==="blank"?null:E.createElement(IV,null,E.createElement(OV,{...a}),r!=="loading"&&E.createElement(zV,null,r==="error"?E.createElement(EV,{...a}):E.createElement(LV,{...a})))},$V=t=>`
0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,YV=t=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
`,UV="0%{opacity:0;} 100%{opacity:1;}",WV="0%{opacity:1;} 100%{opacity:0;}",XV=Al("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;
`,VV=Al("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`,qV=(t,e)=>{let r=t.includes("top")?1:-1,[a,n]=dR()?[UV,WV]:[$V(r),YV(r)];return{animation:e?`${vi(a)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${vi(n)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},GV=E.memo(({toast:t,position:e,style:r,children:a})=>{let n=t.height?qV(t.position||e||"top-center",t.visible):{opacity:0},i=E.createElement(HV,{toast:t}),l=E.createElement(VV,{...t.ariaProps},mx(t.message,t));return E.createElement(XV,{className:t.className,style:{...n,...r,...t.style}},typeof a=="function"?a({icon:i,message:l}):E.createElement(E.Fragment,null,i,l))});bV(E.createElement);var KV=({id:t,className:e,style:r,onHeightUpdate:a,children:n})=>{let i=E.useCallback(l=>{if(l){let o=()=>{let c=l.getBoundingClientRect().height;a(t,c)};o(),new MutationObserver(o).observe(l,{subtree:!0,childList:!0,characterData:!0})}},[t,a]);return E.createElement("div",{ref:i,className:e,style:r},n)},ZV=(t,e)=>{let r=t.includes("top"),a=r?{top:0}:{bottom:0},n=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:dR()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(r?1:-1)}px)`,...a,...n}},QV=P0`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`,Xm=16,mR=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:a,children:n,toasterId:i,containerStyle:l,containerClassName:o})=>{let{toasts:c,handlers:d}=kV(r,i);return E.createElement("div",{"data-rht-toaster":i||"",style:{position:"fixed",zIndex:9999,top:Xm,left:Xm,right:Xm,bottom:Xm,pointerEvents:"none",...l},className:o,onMouseEnter:d.startPause,onMouseLeave:d.endPause},c.map(h=>{let p=h.position||e,m=d.calculateOffset(h,{reverseOrder:t,gutter:a,defaultPosition:e}),x=ZV(p,m);return E.createElement(KV,{id:h.id,key:h.id,onHeightUpdate:d.updateHeight,className:h.visible?QV:"",style:x},h.type==="custom"?mx(h.message,h):n?n(h):E.createElement(GV,{toast:h,position:p}))}))},Ne=Sr,gR={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},cD=qe.createContext&&qe.createContext(gR),JV=["attr","size","title"];function eq(t,e){if(t==null)return{};var r=tq(t,e),a,n;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)a=i[n],!(e.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(t,a)&&(r[a]=t[a])}return r}function tq(t,e){if(t==null)return{};var r={};for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){if(e.indexOf(a)>=0)continue;r[a]=t[a]}return r}function gx(){return gx=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},gx.apply(this,arguments)}function dD(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function xx(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dD(Object(r),!0).forEach(function(a){rq(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dD(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function rq(t,e,r){return e=aq(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aq(t){var e=nq(t,"string");return typeof e=="symbol"?e:e+""}function nq(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function xR(t){return t&&t.map((e,r)=>qe.createElement(e.tag,xx({key:r},e.attr),xR(e.child)))}function be(t){return e=>qe.createElement(sq,gx({attr:xx({},t.attr)},e),xR(t.child))}function sq(t){var e=r=>{var{attr:a,size:n,title:i}=t,l=eq(t,JV),o=n||r.size||"1em",c;return r.className&&(c=r.className),t.className&&(c=(c?c+" ":"")+t.className),qe.createElement("svg",gx({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,l,{className:c,style:xx(xx({color:t.color||r.color},r.style),t.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),i&&qe.createElement("title",null,i),t.children)};return cD!==void 0?qe.createElement(cD.Consumer,null,r=>e(r)):e(gR)}function iq(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 lq(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 oq(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 bR(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 R0(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 uD(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 yR(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 vR(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 cq(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 _0(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 V4(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 L0(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 hD(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 ff(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 dq(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 uq(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 fD(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 wR(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 hq(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 fq(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 pq(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 mq(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 q4(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 jR(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 gq(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 Xf(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 G4(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 NR(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 pD(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 Dh(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 Xh(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 xq(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 SR(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 bq(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 yq(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 vq(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 wq(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 jq(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 Nq(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 Sq(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 Cq(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 Aq(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 d1(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 kq(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 Dq(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 z0(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 Tq(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 Mq(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 Eq(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 CR(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 Pq="https://aaaogo.xyz",Oq=()=>{hr();const t=Cl(),e=Fn(),{isAuthenticated:r,token:a}=un(b=>b.auth),n=E.useRef(null);console.log("Auth State:",{isAuthenticated:r,token:a});const{data:i,isLoading:l,error:o}=IX(void 0,{skip:!r||!a});console.log("API Response:",{userData:i,isLoading:l,error:o}),console.log("User Data Details:",i?.user);const c=r&&i?.user?.role==="superadmin",d=()=>{e(yd()),e(ul.util.resetApiState()),localStorage.removeItem("token"),t("/")},h=i?.user?.selfieImage?`${Pq}/uploads/${i.user.selfieImage.replace(/^\/?uploads\//,"")}`:null,p=b=>b?b.split(" ").map(y=>y[0]).join("").toUpperCase().slice(0,2):"G";console.log("Selfie Image URL:",h);const m=()=>{n.current&&n.current.click()},x=async b=>{const y=b.target.files[0];if(!y)return;if(!["image/jpeg","image/jpg","image/png","image/gif"].includes(y.type)){Ne.error("Please select a valid image file (JPEG, PNG, GIF)");return}const N=5*1024*1024;if(y.size>N){Ne.error("File size must be less than 5MB");return}try{const C=new FormData;C.append("profilePicture",y),(await Gt.patch("/user/update-profile-picture",C,{headers:{"Content-Type":"multipart/form-data"}})).data.success?(Ne.success("Profile picture updated successfully!"),e(ul.util.invalidateTags(["User"]))):Ne.error("Failed to update profile picture")}catch(C){console.error("Error updating profile picture:",C),Ne.error("Failed to update profile picture")}b.target.value=""};return s.jsxs("div",{className:"flex justify-between items-center px-2 border-b border-[#3A5719]",children:[s.jsxs("div",{className:"flex items-center gap-4 pr-[50px] py-1 border-r border-[#546816]",children:[s.jsx("input",{type:"file",ref:n,onChange:x,accept:"image/*",style:{display:"none"}}),h?s.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:b=>{console.log("Image load error:",b),b.target.style.display="none",b.target.nextSibling.style.display="flex"}}):null,s.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:i?.user?.username?s.jsx("span",{className:"text-[#DDC104] font-bold text-xl",children:p(i.user.username)}):s.jsx(z0,{className:"text-[#DDC104] text-2xl"})}),s.jsxs("div",{className:"flex flex-col justify-center",children:[s.jsx("h6",{className:"text-xs",children:"Welcome"}),s.jsx("h1",{className:"font-bold text-lg",children:l?"Loading...":o||!r?"Guest":i?.user?.username||"Guest"}),s.jsx("p",{className:"text-xs",children:l?"Loading...":o||!r?"No email available":i?.user?.email||"No email available"})]})]}),s.jsxs("div",{className:"flex gap-4 items-center text-[#DDC104]",children:[s.jsx("div",{className:"p-2 border border-[#DDC104] rounded-full hover:bg-[#DDC104] hover:text-black transition cursor-pointer",children:s.jsx(cq,{size:25})}),c&&s.jsx(BO,{to:"/adminmanagement",className:({isActive:b})=>`p-2 border border-[#DDC104] rounded-full hover:bg-[#DDC104] hover:text-black transition cursor-pointer ${b?"bg-yellow-400 text-black":""}`,title:"Admin Management",children:s.jsx(kq,{size:25})}),s.jsx("button",{onClick:d,className:"p-2 border border-[#DDC104] rounded-full hover:bg-[#DDC104] hover:text-black transition cursor-pointer",title:"Logout",children:s.jsx(oq,{size:25})})]})]})};function Vf(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 Rq(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 rj(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 _q(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 12c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm1.65 7.35L16.5 17.2V14h1v2.79l1.85 1.85-.7.71zM18 3h-3.18C14.4 1.84 13.3 1 12 1s-2.4.84-2.82 2H6c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h6.11a6.743 6.743 0 0 1-1.42-2H6V5h2v3h8V5h2v5.08c.71.1 1.38.31 2 .6V5c0-1.1-.9-2-2-2zm-6 2c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"},child:[]}]})(t)}function Lq(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 mD(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 zq(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 Iq(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 kl(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(t)}function ec(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 u1(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 Hd(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 Dl(t){return be({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(t)}function aj(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 gD(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 Fq(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 xD(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 Bq(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 Hq(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 $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:"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 AR(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 Yq(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 Uq(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 Wq(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 Xq(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 kR(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 Vq(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 qq(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 Gq(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 Kq(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 Zq(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 Qq(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 DR(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 Jq(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 bD(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 eG(t){return be({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M10.9042 2.10025L20.8037 3.51446L22.2179 13.414L13.0255 22.6063C12.635 22.9969 12.0019 22.9969 11.6113 22.6063L1.71184 12.7069C1.32131 12.3163 1.32131 11.6832 1.71184 11.2926L10.9042 2.10025ZM13.7327 10.5855C14.5137 11.3666 15.78 11.3666 16.5611 10.5855C17.3421 9.80448 17.3421 8.53815 16.5611 7.7571C15.78 6.97606 14.5137 6.97606 13.7327 7.7571C12.9516 8.53815 12.9516 9.80448 13.7327 10.5855Z"},child:[]}]})(t)}function tG(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 TR(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 rG(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 MR(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 aG(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 nG(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 yD(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 sG(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 iG(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 lG(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 oG(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 Ye=()=>{const t=hr(),[e,r]=E.useState([]),[a,n]=E.useState("");E.useEffect(()=>{(async()=>{try{const d=await Re.get("https://aaaogo.xyz/api/user/me",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});r(d.data.user.adminPermissions||[]),n(d.data.user.role)}catch(d){console.error("Failed to fetch user permissions:",d)}})()},[]);const i=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]"}`,l=[{path:"/home",name:"Dashboard",icon:s.jsx(hq,{size:20}),permission:"home"},{path:"/mlm",name:"MLM",icon:s.jsx(Sq,{size:20}),permission:"mlm"},{path:"/dispatch",name:"Dispatch Center",icon:s.jsx(Aq,{size:20}),permission:"dispatch"},{path:"/drivermanagement",name:"Driver Management",icon:s.jsx(Dq,{size:20}),permission:"drivermanagement"},{path:"/customermanagement",name:"Customer Management",icon:s.jsx(nG,{size:20}),permission:"customermanagement"},{path:"/customersupport",name:"Customer Support",icon:s.jsx(zq,{size:20}),permission:"customersupport"},{path:"/websiteuser",name:"Website User",icon:s.jsx(Tq,{size:20}),permission:"websiteuser"},{path:"/proposalmanagement",name:"Career Management",icon:s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs("div",{className:"relative w-6 h-6",children:[s.jsx(mq,{size:16,className:"absolute top-0 left-1/2 -translate-x-1/2"}),s.jsx(bq,{size:16,className:"absolute bottom-0 left-1/2 -translate-x-1/2"})]})}),permission:"proposalmanagement"},{path:"/overview",name:"Fraud Detection",icon:s.jsx(Hq,{size:20}),permission:"overview"},{path:"/paymentoverview",name:"Wallet & Panel",icon:s.jsx(tG,{size:20}),permission:"paymentoverview"},{path:"/chatdetail",name:"Monitor",icon:s.jsx(Yq,{size:20}),subtext:"(Chats & Activity)",permission:"chatdetail"},{path:"/kycverification",name:"Admin Approvals",icon:s.jsx(DR,{size:20}),permission:"kycverification"},{path:"/reportanalytics",name:"Reports",icon:s.jsx(Vq,{size:25}),permission:"reportanalytics"},{path:"/reviewandrating",name:"Rating & Reviews",icon:s.jsx(iq,{size:25}),permission:"reviewandrating"},{path:"/officialsandfeed",name:"Officials & Feed",icon:s.jsx(Cq,{size:20}),permission:"officialsandfeed"},{path:"/bookingcharges",name:"Booking Charges",icon:s.jsx(eG,{size:20}),permission:"bookingcharges"},{path:"/adminmanagement",name:"Admin Management",icon:s.jsx(lG,{size:20}),permission:"adminmanagement"}],o=a==="superadmin"?l:l.filter(c=>c.permission==="adminmanagement"||c.permission==="bookingcharges"?a==="superadmin":e.includes(c.permission));return s.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:s.jsx("div",{className:"flex flex-col gap-6 w-64",children:o.map(c=>s.jsxs(De,{to:c.path,className:i(c.path),children:[c.icon,c.subtext?s.jsxs("p",{className:"truncate",children:[c.name," ",s.jsx("span",{className:"text-sm",children:c.subtext})]}):s.jsx("span",{className:"truncate",children:c.name})]},c.path))})})},cG={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"}]},dG=()=>{const[t,e]=E.useState("general"),r=cG[t];return s.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 p-6 relative",children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs(De,{to:"/",className:"flex items-center gap-2",children:[s.jsx(Vf,{size:30,className:"cursor-pointer"}),s.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})}),s.jsxs("div",{className:"py-10",children:[s.jsxs("h1",{className:"text-xl font-semibold inline-block relative pb-1",children:["Notification & Alerts",s.jsx("span",{className:"absolute left-0 bottom-0 w-full h-[1px] bg-yellow-400 rounded-full"})]}),s.jsx("h5",{className:"text-sm float-right text-yellow-400 cursor-pointer",children:"Mark All As Read"})]}),s.jsx("div",{className:"border-b border-yellow-400 mb-6",children:s.jsx("div",{className:"flex gap-20 text-sm font-semibold items-center pb-2",children:["general","booking","important"].map(a=>s.jsxs("div",{onClick:()=>e(a),className:"relative cursor-pointer",children:[a==="general"&&"General Notification",a==="booking"&&"Booking Notification",a==="important"&&"Important Notification",t===a&&s.jsx("div",{className:"absolute bottom-[-2px] left-0 w-full h-[2px] bg-yellow-400 rounded-full"})]},a))})}),s.jsx("div",{className:"flex flex-col gap-4",children:r.length===0?s.jsx("div",{className:"text-center py-8 text-sm text-yellow-200",children:"No notifications in this category."}):r.map(a=>s.jsxs("div",{className:"bg-[#0A3A26] border border-[#3A4F3A] p-4 rounded-xl flex justify-between items-start",children:[s.jsxs("div",{className:"flex gap-4",children:[s.jsx("img",{src:a.image,alt:"avatar",className:"w-10 h-10 rounded-full object-cover"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-sm mb-1",children:a.message}),s.jsx("p",{className:"text-xs",children:a.detail}),s.jsxs("div",{className:"flex items-center text-xs mt-1 ",children:[s.jsx(NR,{className:"mr-1"}),a.time]})]})]}),s.jsx("button",{className:"text-yellow-400 text-sm whitespace-nowrap relative hover:underline",children:"View Detail"})]},a.id))})]})]})},uG=()=>{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 s.jsx("div",{children:s.jsxs("table",{className:"w-full p-6",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-left border-b  border-t border-yellow-400",children:[s.jsx("th",{className:"text-sm px-4 py-2",children:"ID"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Client Name"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Pickup & Drop-off"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Status"}),s.jsx("th",{className:"text-sm px-4 py-2 text-center",children:"Action"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{children:[s.jsxs("td",{className:"text-sm px-4 py-2",children:["00",e.id]}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.name}),s.jsx("td",{className:"text-sm px-4 py-2",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:e.pickup}),s.jsx("span",{children:e.Dropoff})]})}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.status}),s.jsx("td",{className:"px-4 py-2 flex justify-center",children:s.jsxs(De,{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:[s.jsx(CR,{className:"text-sm"}),"Live Location"]})})]},r))})]})})},hG=()=>{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 s.jsx("div",{children:s.jsxs("table",{className:"w-full p-6",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-left border-b  border-t border-yellow-400",children:[s.jsx("th",{className:"text-sm px-4 py-2",children:"ID"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Client Name"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Pickup & Drop-off"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Status"}),s.jsx("th",{className:"text-sm px-4 py-2 text-center",children:"Action"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{children:[s.jsxs("td",{className:"text-sm px-4 py-2",children:["00",e.id]}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.name}),s.jsx("td",{className:"text-sm px-4 py-2",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:e.pickup}),s.jsx("span",{children:e.Dropoff})]})}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.status}),s.jsx("td",{className:"px-4 py-2 flex justify-center",children:s.jsxs(De,{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:[s.jsx(CR,{className:"text-sm"}),"Live Location"]})})]},r))})]})})},fG=()=>{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 s.jsx("div",{children:s.jsxs("table",{className:"w-full p-6",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-left border-b  border-t border-yellow-400",children:[s.jsx("th",{className:"text-sm px-4 py-2",children:"ID"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Client Name"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Pickup & Drop-off"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Status"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{children:[s.jsxs("td",{className:"text-sm px-4 py-2",children:["00",e.id]}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.name}),s.jsx("td",{className:"text-sm px-4 py-2",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:e.pickup}),s.jsx("span",{children:e.Dropoff})]})}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.status})]},r))})]})})},pG=()=>{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 s.jsx("div",{children:s.jsxs("table",{className:"w-full p-6",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-left border-b  border-t border-yellow-400",children:[s.jsx("th",{className:"text-sm px-4 py-2",children:"ID"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Client Name"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Pickup & Drop-off"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Status"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{children:[s.jsxs("td",{className:"text-sm px-4 py-2",children:["00",e.id]}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.name}),s.jsx("td",{className:"text-sm px-4 py-2",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:e.pickup}),s.jsx("span",{children:e.Dropoff})]})}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.status})]},r))})]})})};function vD(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 mG(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 wD=["All","Assigned","Completed","Cancelled"],gG=()=>{const[t,e]=E.useState(""),[r,a]=E.useState(""),[n,i]=E.useState(""),[l,o]=E.useState(""),[c,d]=E.useState("All"),h=()=>{switch(c){case"Assigned":return s.jsx(hG,{});case"Completed":return s.jsx(fG,{});case"Cancelled":return s.jsx(pG,{});default:return s.jsx(uG,{activeTab:c})}};return s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex gap-6 p-6 flex-wrap",children:[s.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:[s.jsx("option",{value:"",children:"Services type"}),s.jsx("option",{value:"Tow",children:"Tow"}),s.jsx("option",{value:"Repair",children:"Repair"}),s.jsx("option",{value:"Delivery",children:"Delivery"})]}),s.jsxs("select",{value:r,onChange:p=>a(p.target.value),className:"border border-yellow-400 rounded-full px-4 py-2 bg-transparent text-yellow-400 focus:outline-none",children:[s.jsx("option",{value:"",children:"City"}),s.jsx("option",{value:"North",children:"Dubai"}),s.jsx("option",{value:"South",children:"Abu Dhabi"})]}),s.jsxs("select",{value:n,onChange:p=>i(p.target.value),className:"border border-yellow-400 rounded-full px-4 py-2 bg-transparent text-yellow-400 focus:outline-none",children:[s.jsx("option",{value:"",children:"Sort By"}),s.jsx("option",{value:"date",children:"Date"}),s.jsx("option",{value:"status",children:"Status"}),s.jsx("option",{value:"priority",children:"Priority"})]}),s.jsx("input",{type:"date",value:l,onChange:p=>o(p.target.value),className:"border border-yellow-400 rounded-full px-4 py-2 bg-transparent text-yellow-400 focus:outline-none"}),s.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:[s.jsx(mG,{})," Refresh"]})]}),s.jsx("div",{className:"flex gap-6 p-6 items-center font-bold",children:wD.map((p,m)=>s.jsxs(qe.Fragment,{children:[s.jsx("p",{onClick:()=>d(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!==wD.length-1&&s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"})]},m))}),h()]})]})},Tl=()=>{const t=hr();Cl();const e=r=>`menu-tab ${t.pathname===r?"active":""}`;return s.jsxs("div",{className:"px-10",children:[s.jsx("div",{className:"flex items-center gap-2 pb-6",children:s.jsxs(De,{to:t.pathname==="/driverprofile"?"/drivermanagement":"/driverprofile",className:"flex items-center gap-2 cursor-pointer",children:[s.jsx(Vf,{size:30,className:"text-lg"}),s.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})}),s.jsxs("div",{className:"flex justify-between items-center border-b border-yellow-400",children:[s.jsx(De,{to:"/driverprofile",className:e("/driverprofile"),children:"Profile"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/drivermonitoring",className:e("/drivermonitoring"),children:"Monitoring"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/driverhistory",className:e("/driverhistory"),children:"History"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/earningandpayouts",className:e("/earningandpayouts"),children:"Earning & Payouts"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/ratings",className:e("/ratings"),children:"Ratings"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/penalty",className:e("/penalty"),children:"Penalty"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/report",className:e("/report"),children:"Report"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/referraltree",className:e("/referraltree"),children:"Referral Tree"})]})]})},xG=[{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"}],bG=()=>s.jsx(s.Fragment,{children:s.jsxs("div",{children:[s.jsx(Tl,{}),s.jsx("div",{className:" pt-4",children:s.jsxs("table",{className:"w-full text-sm text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-200",children:[s.jsx("th",{className:"px-3 py-3",children:"ID"}),s.jsx("th",{className:"px-4 py-3",children:"Date"}),s.jsx("th",{className:"px-4 py-3 text-cente",children:"Type"}),s.jsx("th",{className:"px-4 py-3",children:"Customer Name"}),s.jsx("th",{className:"px-4 py-3",children:"Status"}),s.jsx("th",{className:"px-4 py-3",children:"Fare"}),s.jsx("th",{className:"px-4 py-3 text-center align-middle",children:"Action"})]})}),s.jsx("tbody",{children:xG.map((t,e)=>s.jsxs("tr",{children:[s.jsxs("td",{className:"px-4 py-3",children:["00",t.id]}),s.jsx("td",{className:"px-4 py-3",children:t.date}),s.jsx("td",{className:"px-4 py-3 r",children:t.type}),s.jsx("td",{className:"px-4 py-3",children:t.name}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:t.fare}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"flex items-center gap-3 justify-center",children:s.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},e))})]})})]})}),yG=()=>s.jsx("div",{className:"w-full h-[700px]",children:s.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"})}),vG=()=>{const[t,e]=E.useState("chat"),[r,a]=E.useState(""),[n,i]=E.useState("allchats"),l=[{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"}],o=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 s.jsxs("div",{className:"flex",children:[s.jsx("div",{children:s.jsx(Ye,{})}),s.jsxs("div",{className:"flex-1 p-6 flex flex-col overflow-hidden",children:[s.jsx("div",{className:"flex items-center gap-2 py-4",children:s.jsxs(De,{to:"/",className:"flex items-center gap-2",children:[s.jsx(Vf,{size:30,className:"cursor-pointer text-lg"}),s.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})}),s.jsxs("div",{className:"flex gap-2 pb-6",children:[s.jsx("button",{onClick:()=>e("chat"),className:`menu-tab ${t==="chat"?"active":""}`,children:"Chat"}),s.jsx("button",{onClick:()=>e("explore"),className:`menu-tab ${t==="explore"?"active":""}`,children:"Explore"})]}),s.jsxs("div",{className:"flex flex-1 gap-3 overflow-hidden",children:[s.jsxs("div",{className:"w-[40%] bg-yellow-400  rounded-xl text-[#1c350d] p-4 space-y-2 overflow-y-auto ",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("h3",{onClick:()=>i("allchats"),className:` text-bold mb-2 menu-tab ${n=="allchats"?"linebelow":" "}`,children:"All Chats"}),s.jsx("h3",{onClick:()=>i("resolution"),className:` text-bold mb-2 menu-tab ${n=="resolution"?"linebelow":" "}`,children:"Resolution Channel"}),s.jsx("h3",{onClick:()=>i("assigned"),className:` text-bold mb-2 menu-tab ${n=="assigned"?"linebelow":" "}`,children:"Assigned Agent"})]}),o.map((c,d)=>s.jsxs("div",{className:"p-2 rounded-lg  hover:bg-yellow-200 transition",children:[s.jsx("div",{className:"text-right text-xs text-gray-800",children:c.time}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("img",{src:c.avatar,alt:"avatar",className:"w-8 h-8 rounded-full"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold text-sm",children:c.name}),s.jsxs("div",{className:"flex gap-12",children:[s.jsxs("p",{className:"text-xs",children:[c.text.slice(0,40),"..."]}),s.jsx(fq,{size:20})]})]})]})]},d))]}),s.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:[s.jsx("div",{className:"space-y-4 overflow-y-auto pr-2 rounded-xl  px-2 py-4",children:l.map((c,d)=>s.jsx("div",{className:`flex ${c.sender==="You"?"justify-end":"justify-start"}`,children:s.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:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("img",{src:c.avatar,alt:"avatar",className:"w-6 h-6 rounded-full"}),s.jsx("p",{className:"text-xs text-right mt-1",children:c.time})]}),s.jsx("p",{className:"text-sm mt-2",children:c.text})]})},d))}),s.jsxs("div",{className:"flex items-center gap-3  ",children:[s.jsx("button",{className:"hover:text-yellow-600",children:s.jsx(vq,{size:25})}),s.jsx("div",{className:"border w-full border-yellow-400 rounded-full px-4 py-2 text-yellow-400 shadow-md",children:s.jsx("input",{type:"text",placeholder:"Type here...",value:r,onChange:c=>a(c.target.value),className:"flex-1 bg-transparent focus:outline-none placeholder-yellow-400 text-yellow-400"})}),s.jsx("button",{className:"hover:text-yellow-600",children:s.jsx(jq,{size:25})})]})]})]})]})]})},vd=({isOpen:t,onClose:e,onConfirm:r,title:a,message:n,showInput:i=!1,inputPlaceholder:l=""})=>{const[o,c]=E.useState(""),d=()=>{i?r(o):r(),c(""),e()},h=()=>{c(""),e()};return t?s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-[#013220] border border-[#374151] rounded-lg p-6 max-w-md w-full mx-4 shadow-xl",children:[s.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:a}),s.jsx("p",{className:"text-white mb-6",children:n}),i&&s.jsx("input",{type:"text",value:o,onChange:p=>c(p.target.value),placeholder:l,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}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.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"}),s.jsx("button",{onClick:d,disabled:i&&!o.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},wG=()=>{const t=Fn(),{users:e,loading:r,error:a,success:n,editSuccess:i,deleteSuccess:l,totalUsers:o,updateKey:c}=un(B=>B.user),[d,h]=E.useState("All"),[p,m]=E.useState(null),[x,b]=E.useState(null),[y,v]=E.useState(null),[N,C]=E.useState({username:"",firstName:"",lastName:"",email:"",phoneNumber:"",gender:"",country:"",kycLevel:"",kycStatus:"",hasVehicle:""}),[S,k]=E.useState({}),[A,T]=E.useState(!1),[M,O]=E.useState(null);E.useEffect(()=>{console.log("Fetching all customers"),t(Uh())},[t]),E.useEffect(()=>{if(a||i||l){console.log("Resetting state due to:",{error:a,editSuccess:i,deleteSuccess:l});const B=setTimeout(()=>{t(aR()),v(null),k({})},5e3);return()=>clearTimeout(B)}},[a,i,l,t]);const _=B=>{console.log("Sort changed to:",B.target.value),h(B.target.value)},R=B=>{console.log("Viewing customer:",B._id),m(B)},L=B=>{console.log("Editing customer:",B._id),b(B),C({username:B.username||"",firstName:B.firstName||"",lastName:B.lastName||"",email:B.email||"",phoneNumber:B.phoneNumber||"",gender:B.gender||"",country:B.country||"",kycLevel:B.kycLevel!==void 0?String(B.kycLevel):"",kycStatus:B.kycStatus||"",hasVehicle:B.hasVehicle||""}),k({})},z=()=>{console.log("Closing customer popup"),m(null),b(null),k({})},F=B=>{const{name:G,value:te}=B.target;C(K=>({...K,[G]:te})),k(K=>({...K,[G]:""}))},Y=async B=>{B.preventDefault(),console.log("Submitting edit for userId:",x._id,"Data:",N);try{await t(Ig({userId:x._id,userData:N})).unwrap(),console.log("Edit customer successful:",x._id),b(null),C({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;k(typeof te=="object"&&te!==null?te:{general:te||"Failed to edit customer"})}catch{k({general:G||"Failed to edit customer"})}}},X=B=>{O(B),T(!0)},H=async()=>{if(M){console.log("Initiating delete for userId:",M),v(M);try{await t(Wh(M)).unwrap(),console.log("Delete customer successful:",M)}catch(B){console.error("Delete customer failed:",B),v(null)}}T(!1),O(null)},W=()=>{T(!1),O(null)},V=e.filter(B=>d==="All"?!0:d==="Pending"||d==="Approved"?B.kycStatus===d.toLowerCase()||!B.kycStatus&&d==="Pending":!1);console.log("Rendering with customers:",V.map(B=>B._id),"updateKey:",c);const Z="https://aaaogo.xyz/";return s.jsxs("div",{className:"flex min-h-screen bg-[#013220] text-[#DDC104] font-sans",children:[s.jsx(Ye,{}),s.jsx("div",{className:"flex-1 p-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx("h1",{className:"text-4xl font-bold mb-8 text-center tracking-wide",children:"Customer Management Dashboard"}),r&&!y&&!x&&!p&&s.jsx("div",{className:"text-center py-8",children:s.jsx("div",{className:"animate-spin inline-block w-8 h-8 border-4 border-[#DDC104] border-t-transparent rounded-full",role:"status",children:s.jsx("span",{className:"sr-only",children:"Loading..."})})}),a&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("span",{children:typeof a=="string"&&a==="canceled"?"Request timed out. Please try again.":typeof a=="string"?a:a.general||"An error occurred"})]}),n&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),s.jsxs("span",{children:["Customers fetched successfully! Total: ",o]})]}),i&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),s.jsx("span",{children:"Customer updated successfully!"})]}),l&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),s.jsx("span",{children:"Customer deleted successfully!"})]}),!r&&!a&&e.length>0&&s.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:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-semibold tracking-wide",children:"Customer List"}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("label",{htmlFor:"sortBy",className:"text-sm mr-2 tracking-wide",children:"Sort by:"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{id:"sortBy",value:d,onChange:_,className:"bg-transparent text-sm text-[#DDC104] focus:outline-none appearance-none pr-8",children:[s.jsx("option",{className:"bg-yellow-300 text-black",value:"All",children:"All"}),s.jsx("option",{className:"bg-yellow-300 text-black",value:"Pending",children:"Pending KYC"}),s.jsx("option",{className:"bg-yellow-300 text-black",value:"Approved",children:"Approved KYC"})]}),s.jsx(V4,{className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-[#DDC104]"})]})]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-[#038A59] bg-[#038A59]",children:[s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"ID"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Username"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Email"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"KYC Status"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"KYC Level"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide text-center",children:"Action"})]})}),s.jsx("tbody",{children:V.map(B=>s.jsxs("tr",{className:"border-b border-[#013723] hover:bg-[#038A59]/50",children:[s.jsx("td",{className:"px-4 py-3",children:B._id.slice(-6)}),s.jsx("td",{className:"px-4 py-3",children:B.username}),s.jsx("td",{className:"px-4 py-3",children:B.email}),s.jsx("td",{className:"px-4 py-3",children:B.kycStatus||"Pending"}),s.jsx("td",{className:"px-4 py-3",children:B.kycLevel||"N/A"}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-3 justify-center",children:[s.jsx("button",{onClick:()=>L(B),className:"border border-[#DDC104] p-2 rounded-full text-[#DDC104] hover:bg-[#DDC104] hover:text-[#013723] transition duration-200",disabled:y===B._id,children:s.jsx(AR,{size:16})}),s.jsx("button",{onClick:()=>R(B),className:"bg-[#DDC104] text-[#013723] px-4 py-1.5 rounded-full text-xs font-medium hover:bg-[#e8d34a] transition duration-200",children:"View"}),s.jsx("button",{onClick:()=>X(B._id),className:"border border-[#DDC104] p-2 rounded-full text-[#DDC104] hover:bg-[#DDC104] hover:text-[#013723] transition duration-200",disabled:y===B._id,children:y===B._id?s.jsx("div",{className:"animate-spin inline-block w-4 h-4 border-2 border-[#DDC104] border-t-transparent rounded-full"}):s.jsx(TR,{size:16})})]})})]},B._id))})]})})]}),!r&&!a&&e.length===0&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("span",{children:"No customers found"})]}),p&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:s.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:[s.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4",children:"Customer Details"}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Customer Information"}),s.jsx("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow no-scrollbar",children:s.jsxs("tbody",{children:[s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"ID"}),s.jsx("td",{className:"px-4 py-2",children:p._id?.slice(-6)||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Username"}),s.jsx("td",{className:"px-4 py-2",children:p.username||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Full Name"}),s.jsxs("td",{className:"px-4 py-2",children:[p.firstName||""," ",p.lastName||""]})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Email"}),s.jsx("td",{className:"px-4 py-2",children:p.email||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Phone Number"}),s.jsx("td",{className:"px-4 py-2",children:p.phoneNumber||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Gender"}),s.jsx("td",{className:"px-4 py-2",children:p.gender||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Country"}),s.jsx("td",{className:"px-4 py-2",children:p.country||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"KYC Status"}),s.jsx("td",{className:"px-4 py-2",children:p.kycStatus||"Pending"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"KYC Level"}),s.jsx("td",{className:"px-4 py-2",children:p.kycLevel!==void 0?p.kycLevel:"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Has Vehicle"}),s.jsx("td",{className:"px-4 py-2",children:p.hasVehicle?"Yes":"No"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Created At"}),s.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)&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"KYC Images"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[p.cnicImages?.front&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"CNIC Front"}),s.jsx("img",{src:`${Z}${p.cnicImages.front}`,alt:"CNIC Front",className:"w-full h-48 object-contain rounded-lg",onError:B=>{B.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),p.cnicImages?.back&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"CNIC Back"}),s.jsx("img",{src:`${Z}${p.cnicImages.back}`,alt:"CNIC Back",className:"w-full h-48 object-contain rounded-lg",onError:B=>{B.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]}),p.selfieImage&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Selfie"}),s.jsx("img",{src:`${Z}${p.selfieImage}`,alt:"Selfie",className:"w-full h-48 object-contain rounded-lg",onError:B=>{B.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]})]})]}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.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&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:s.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:[s.jsx("h2",{className:"text-xl font-semibold tracking-wide mb-3",children:"Edit Customer"}),s.jsxs("form",{onSubmit:Y,className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Username"}),s.jsx("input",{type:"text",name:"username",value:N.username,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.username&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.username})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"First Name"}),s.jsx("input",{type:"text",name:"firstName",value:N.firstName,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.firstName&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.firstName})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Last Name"}),s.jsx("input",{type:"text",name:"lastName",value:N.lastName,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.lastName&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.lastName})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Email"}),s.jsx("input",{type:"email",name:"email",value:N.email,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.email&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.email})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Phone Number"}),s.jsx("input",{type:"text",name:"phoneNumber",value:N.phoneNumber,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.phoneNumber&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.phoneNumber})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Gender"}),s.jsxs("select",{name:"gender",value:N.gender,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select Gender"}),s.jsx("option",{value:"Male",children:"Male"}),s.jsx("option",{value:"Female",children:"Female"}),s.jsx("option",{value:"Other",children:"Other"})]}),S.gender&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.gender})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Country"}),s.jsx("input",{type:"text",name:"country",value:N.country,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),S.country&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.country})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"KYC Level"}),s.jsxs("select",{name:"kycLevel",value:N.kycLevel,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select KYC Level"}),s.jsx("option",{value:"0",children:"0"}),s.jsx("option",{value:"1",children:"1"}),s.jsx("option",{value:"2",children:"2"})]}),S.kycLevel&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.kycLevel})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"KYC Status"}),s.jsxs("select",{name:"kycStatus",value:N.kycStatus,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select KYC Status"}),s.jsx("option",{value:"pending",children:"Pending"}),s.jsx("option",{value:"approved",children:"Approved"}),s.jsx("option",{value:"rejected",children:"Rejected"})]}),S.kycStatus&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.kycStatus})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Has Vehicle"}),s.jsxs("select",{name:"hasVehicle",value:N.hasVehicle,onChange:F,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select Vehicle Status"}),s.jsx("option",{value:"yes",children:"Yes"}),s.jsx("option",{value:"no",children:"No"})]}),S.hasVehicle&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:S.hasVehicle})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[s.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"}),s.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?s.jsx("div",{className:"animate-spin inline-block w-4 h-4 border-2 border-[#013723] border-t-transparent rounded-full"}):"Save"})]})]})]})})]})}),s.jsx(vd,{isOpen:A,title:"Delete Customer",message:"Are you sure you want to delete this customer? This action cannot be undone.",onConfirm:H,onClose:W}),s.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 */
        }
      `})]})},tc=()=>{const t=hr();Cl();const e=r=>`menu-tab ${t.pathname===r?"active":""}`;return s.jsxs("div",{className:"px-10",children:[s.jsx("div",{className:"flex items-center gap-2 pb-6",children:s.jsxs(De,{to:t.pathname==="/customerprofile"?"/customermanagement":"/customerprofile",className:"flex items-center gap-2 cursor-pointer",children:[s.jsx(Vf,{size:30,className:"text-lg"}),s.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})}),s.jsxs("div",{className:"flex justify-between items-center border-b border-yellow-400",children:[s.jsx(De,{to:"/customerprofile",className:e("/customerprofile"),children:"Profile"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/customerhistory",className:e("/customerhistory"),children:"History"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/customerearningpayout",className:e("/customerearningpayout"),children:"Earning & Payouts"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/customermlm",className:e("/customermlm"),children:"MLM"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/customerrating",className:e("/customerrating"),children:"Ratings"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/customercomplain",className:e("/customercomplain"),children:"Complain"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/customerreferraltree",className:e("/customerreferraltree"),children:"Referral Tree"})]})]})};var h1={};/*!
 * ApexCharts v5.3.1
 * (c) 2018-2025 ApexCharts
 */function nj(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function ER(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 jD(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,RR(a.key),a)}}function Ce(t,e,r){return e&&jD(t.prototype,e),r&&jD(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Th(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=K4(t))||e){r&&(t=r);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(c){throw c},f:n}}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 i,l=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return l=c.done,c},e:function(c){o=!0,i=c},f:function(){try{l||r.return==null||r.return()}finally{if(o)throw i}}}}function qf(t){var e=PR();return function(){var r,a=yx(t);if(e){var n=yx(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return function(i,l){if(l&&(typeof l=="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ER(i)}(this,r)}}function bx(t,e,r){return(e=RR(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yx(t){return yx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},yx(t)}function Gf(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&&sj(t,e)}function PR(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PR=function(){return!!t})()}function ND(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function ve(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ND(Object(r),!0).forEach(function(a){bx(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ND(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function sj(t,e){return sj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},sj(t,e)}function OR(t,e){return function(r){if(Array.isArray(r))return r}(t)||function(r,a){var n=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(n!=null){var i,l,o,c,d=[],h=!0,p=!1;try{if(o=(n=n.call(r)).next,a===0){if(Object(n)!==n)return;h=!1}else for(;!(h=(i=o.call(n)).done)&&(d.push(i.value),d.length!==a);h=!0);}catch(m){p=!0,l=m}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw l}}return d}}(t,e)||K4(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 Ar(t){return function(e){if(Array.isArray(e))return nj(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||K4(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 RR(t){var e=function(r,a){if(typeof r!="object"||!r)return r;var n=r[Symbol.toPrimitive];if(n!==void 0){var i=n.call(r,a);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(r)}(t,"string");return typeof e=="symbol"?e:e+""}function fa(t){return fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fa(t)}function K4(t,e){if(t){if(typeof t=="string")return nj(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)?nj(t,e):void 0}}var J=function(){function t(){Se(this,t)}return Ce(t,[{key:"shadeRGBColor",value:function(e,r){var a=r.split(","),n=e<0?0:255,i=e<0?-1*e:e,l=parseInt(a[0].slice(4),10),o=parseInt(a[1],10),c=parseInt(a[2],10);return"rgb("+(Math.round((n-l)*i)+l)+","+(Math.round((n-o)*i)+o)+","+(Math.round((n-c)*i)+c)+")"}},{key:"shadeHexColor",value:function(e,r){var a=parseInt(r.slice(1),16),n=e<0?0:255,i=e<0?-1*e:e,l=a>>16,o=a>>8&255,c=255&a;return"#"+(16777216+65536*(Math.round((n-l)*i)+l)+256*(Math.round((n-o)*i)+o)+(Math.round((n-c)*i)+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&&fa(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,a=[];for(r=0;r<e.length;r++)a[r]=e[r];return a}},{key:"extend",value:function(e,r){var a=this;typeof Object.assign!="function"&&(Object.assign=function(i){if(i==null)throw new TypeError("Cannot convert undefined or null to object");for(var l=Object(i),o=1;o<arguments.length;o++){var c=arguments[o];if(c!=null)for(var d in c)c.hasOwnProperty(d)&&(l[d]=c[d])}return l});var n=Object.assign({},e);return this.isObject(e)&&this.isObject(r)&&Object.keys(r).forEach(function(i){a.isObject(r[i])&&i in e?n[i]=a.extend(e[i],r[i]):Object.assign(n,bx({},i,r[i]))}),n}},{key:"extendArray",value:function(e,r){var a=[];return e.map(function(n){a.push(t.extend(r,n))}),e=a}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){var r,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||fa(e)!=="object")return e;if(a.has(e))return a.get(e);if(Array.isArray(e)){r=[],a.set(e,r);for(var n=0;n<e.length;n++)r[n]=this.clone(e[n],a)}else if(e instanceof Date)r=new Date(e.getTime());else for(var i in r={},a.set(e,r),e)e.hasOwnProperty(i)&&(r[i]=this.clone(e[i],a));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),a=e.clientHeight,n=e.clientWidth;return a-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),[n-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),a]}},{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,a){return Array.isArray(a)&&(a=a.reduce(function(n,i){return n.length>i.length?n:i})),r.length>a.length?r:a},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 a=e.replace("#","");a=a.match(new RegExp("(.{"+a.length/3+"})","g"));for(var n=0;n<a.length;n++)a[n]=parseInt(a[n].length===1?a[n]+a[n]:a[n],16);return r!==void 0&&a.push(r),"rgba("+a.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 a=[],n=2*Math.PI/r,i=0;i<r;i++){var l={};l.x=e*Math.sin(i*n),l.y=-e*Math.cos(i*n),a.push(l)}return a}},{key:"polarToCartesian",value:function(e,r,a,n){var i=(n-90)*Math.PI/180;return{x:e+a*Math.cos(i),y:r+a*Math.sin(i)}}},{key:"escapeString",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",a=e.toString().slice();return a=a.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,r)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,r,a){if(a>=e.length)for(var n=a-e.length+1;n--;)e.push(void 0);return e.splice(a,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 a in r)r.hasOwnProperty(a)&&(e.style.key=r[a])}},{key:"preciseAddition",value:function(e,r){var a=(String(e).split(".")[1]||"").length,n=(String(r).split(".")[1]||"").length,i=Math.pow(10,Math.max(a,n));return(Math.round(e*i)+Math.round(r*i))/i}},{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 a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,n=Math.pow(10,a-Math.floor(Math.log10(Math.max(e,r))));for(e=Math.round(Math.abs(e)*n),r=Math.round(Math.abs(r)*n);r;){var i=r;r=e%r,e=i}return e/n}},{key:"getPrimeFactors",value:function(e){for(var r=[],a=2;e>=2;)e%a==0?(r.push(a),e/=a):a++;return r}},{key:"mod",value:function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,n=Math.pow(10,a-Math.floor(Math.log10(Math.max(e,r))));return(e=Math.round(Math.abs(e)*n))%(r=Math.round(Math.abs(r)*n))/n}}]),t}(),$d=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"animateLine",value:function(e,r,a,n){e.attr(r).animate(n).attr(a)}},{key:"animateMarker",value:function(e,r,a,n){e.attr({opacity:0}).animate(r).attr({opacity:1}).after(function(){n()})}},{key:"animateRect",value:function(e,r,a,n,i){e.attr(r).animate(n).attr(a).after(function(){return i()})}},{key:"animatePathsGradually",value:function(e){var r=e.el,a=e.realIndex,n=e.j,i=e.fill,l=e.pathFrom,o=e.pathTo,c=e.speed,d=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,a,n,h.config.chart.type!=="line"||h.globals.comboCharts?i:"stroke",l,o,c,d*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,a,n,i,l,o,c){var d=this,h=this.w;i||(i=e.attr("pathFrom")),l||(l=e.attr("pathTo"));var p=function(m){return h.config.chart.type==="radar"&&(o=1),"M 0 ".concat(h.globals.gridHeight)};(!i||i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i=p()),(!l.trim()||l.indexOf("undefined")>-1||l.indexOf("NaN")>-1)&&(l=p()),h.globals.shouldAnimate||(o=1),e.plot(i).animate(1,c).plot(i).animate(o,c).plot(l).after(function(){J.isNumber(a)?a===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&d.animationCompleted(e):n!=="none"&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&r===h.globals.series.length-1||h.globals.comboCharts)&&d.animationCompleted(e),d.showDelayedElements()})}}]),t}();const ij={},_R=[];function Je(t,e){if(Array.isArray(t))for(const r of t)Je(r,e);else if(typeof t!="object")LR(Object.getOwnPropertyNames(e)),ij[t]=Object.assign(ij[t]||{},e);else for(const r in t)Je(r,t[r])}function Aa(t){return ij[t]||{}}function LR(t){_R.push(...t)}function Z4(t,e){let r;const a=t.length,n=[];for(r=0;r<a;r++)n.push(e(t[r]));return n}function f1(t){return t%360*Math.PI/180}function Yd(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Ud(t,e,r,a){return e!=null&&r!=null||(a=a||t.bbox(),e==null?e=a.width/a.height*r:r==null&&(r=a.height/a.width*e)),{width:e,height:r}}function lj(t,e){const r=t.origin;let a=t.ox!=null?t.ox:t.originX!=null?t.originX:"center",n=t.oy!=null?t.oy:t.originY!=null?t.originY:"center";r!=null&&([a,n]=Array.isArray(r)?r:typeof r=="object"?[r.x,r.y]:[r,r]);const i=typeof a=="string",l=typeof n=="string";if(i||l){const{height:o,width:c,x:d,y:h}=e.bbox();i&&(a=a.includes("left")?d:a.includes("right")?d+c:d+c/2),l&&(n=n.includes("top")?h:n.includes("bottom")?h+o:h+o/2)}return[a,n]}const jG=new Set(["desc","metadata","title"]),oj=t=>jG.has(t.nodeName),zR=(t,e,r={})=>{const a={...e};for(const n in a)a[n].valueOf()===r[n]&&delete a[n];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Q4="http://www.w3.org/2000/svg",p1="http://www.w3.org/2000/xmlns/",Wd="http://www.w3.org/1999/xlink",lt={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function Kf(){return lt.window}let J4=class{};const Ro={},eN="___SYMBOL___ROOT___";function pf(t,e=Q4){return lt.document.createElementNS(e,t)}function pa(t,e=!1){if(t instanceof J4)return t;if(typeof t=="object")return m1(t);if(t==null)return new Ro[eN];if(typeof t=="string"&&t.charAt(0)!=="<")return m1(lt.document.querySelector(t));const r=e?lt.document.createElement("div"):pf("svg");return r.innerHTML=t,t=m1(r.firstChild),r.removeChild(r.firstChild),t}function Pt(t,e){return e&&(e instanceof lt.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:pf(t)}function Tn(t){if(!t)return null;if(t.instance instanceof J4)return t.instance;if(t.nodeName==="#document-fragment")return new Ro.Fragment(t);let e=Yd(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":Ro[e]||(e="Dom"),new Ro[e](t)}let m1=Tn;function ct(t,e=t.name,r=!1){return Ro[e]=t,r&&(Ro[eN]=t),LR(Object.getOwnPropertyNames(t.prototype)),t}let NG=1e3;function IR(t){return"Svgjs"+Yd(t)+NG++}function FR(t){for(let e=t.children.length-1;e>=0;e--)FR(t.children[e]);return t.id&&(t.id=IR(t.nodeName)),t}function Ie(t,e){let r,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(r in e)t[a].prototype[r]=e[r]}function Et(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)}}Je("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=pa(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=pa(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=pa(t)).before(this),this},insertAfter:function(t){return(t=pa(t)).after(this),this}});const BR=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,SG=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,CG=/rgb\((\d+),(\d+),(\d+)\)/,AG=/(#[a-z_][a-z0-9\-_]*)/i,kG=/\)\s*,?\s*/,DG=/\s/g,SD=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,CD=/^rgb\(/,AD=/^(\s+)?$/,kD=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,TG=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Ci=/[\s,]+/,tN=/[MLHVCSQTAZ]/i;function MG(t){const e=Math.round(t),r=Math.max(0,Math.min(255,e)).toString(16);return r.length===1?"0"+r:r}function Vc(t,e){for(let r=e.length;r--;)if(t[e[r]]==null)return!1;return!0}function g1(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}Je("Dom",{classes:function(){const t=this.attr("class");return t==null?[]:t.trim().split(Ci)},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)}}),Je("Dom",{css:function(t,e){const r={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(a){return!!a.length}).forEach(function(a){const n=a.split(/\s*:\s*/);r[n[0]]=n[1]}),r;if(arguments.length<2){if(Array.isArray(t)){for(const a of t){const n=a;r[a]=this.node.style.getPropertyValue(n)}return r}if(typeof t=="string")return this.node.style.getPropertyValue(t);if(typeof t=="object")for(const a in t)this.node.style.setProperty(a,t[a]==null||AD.test(t[a])?"":t[a])}return arguments.length===2&&this.node.style.setProperty(t,e==null||AD.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),Je("Dom",{data:function(t,e,r){if(t==null)return this.data(Z4(function(a,n){let i;const l=a.length,o=[];for(i=0;i<l;i++)n(a[i])&&o.push(a[i]);return o}(this.node.attributes,a=>a.nodeName.indexOf("data-")===0),a=>a.nodeName.slice(5)));if(t instanceof Array){const a={};for(const n of t)a[n]=this.data(n);return a}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}}),Je("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 St{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof St||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:a,round:n,sin:i,PI:l}=Math;if(e==="vibrant"){const o=24*a()+57,c=38*a()+45,d=360*a();return new St(o,c,d,"lch")}if(e==="sine"){const o=n(80*i(2*l*(r=r??a())/.5+.01)+150),c=n(50*i(2*l*r/.5+4.6)+200),d=n(100*i(2*l*r/.5+2.3)+150);return new St(o,c,d)}if(e==="pastel"){const o=8*a()+86,c=17*a()+9,d=360*a();return new St(o,c,d,"lch")}if(e==="dark"){const o=10+10*a(),c=50*a()+86,d=360*a();return new St(o,c,d,"lch")}if(e==="rgb"){const o=255*a(),c=255*a(),d=255*a();return new St(o,c,d)}if(e==="lab"){const o=100*a(),c=256*a()-128,d=256*a()-128;return new St(o,c,d,"lab")}if(e==="grey"){const o=255*a();return new St(o,o,o)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(SD.test(e)||CD.test(e))}cmyk(){const{_a:e,_b:r,_c:a}=this.rgb(),[n,i,l]=[e,r,a].map(c=>c/255),o=Math.min(1-n,1-i,1-l);return o===1?new St(0,0,0,1,"cmyk"):new St((1-n-o)/(1-o),(1-i-o)/(1-o),(1-l-o)/(1-o),o,"cmyk")}hsl(){const{_a:e,_b:r,_c:a}=this.rgb(),[n,i,l]=[e,r,a].map(m=>m/255),o=Math.max(n,i,l),c=Math.min(n,i,l),d=(o+c)/2,h=o===c,p=o-c;return new St(360*(h?0:o===n?((i-l)/p+(i<l?6:0))/6:o===i?((l-n)/p+2)/6:o===l?((n-i)/p+4)/6:0),100*(h?0:d>.5?p/(2-o-c):p/(o+c)),100*d,"hsl")}init(e=0,r=0,a=0,n=0,i="rgb"){if(e=e||0,this.space)for(const p in this.space)delete this[this.space[p]];if(typeof e=="number")i=typeof n=="string"?n:i,n=typeof n=="string"?0:n,Object.assign(this,{_a:e,_b:r,_c:a,_d:n,space:i});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 b=Vc(m,"rgb")?{_a:m.r,_b:m.g,_c:m.b,_d:0,space:"rgb"}:Vc(m,"xyz")?{_a:m.x,_b:m.y,_c:m.z,_d:0,space:"xyz"}:Vc(m,"hsl")?{_a:m.h,_b:m.s,_c:m.l,_d:0,space:"hsl"}:Vc(m,"lab")?{_a:m.l,_b:m.a,_c:m.b,_d:0,space:"lab"}:Vc(m,"lch")?{_a:m.l,_b:m.c,_c:m.h,_d:0,space:"lch"}:Vc(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 b.space=x||b.space,b}(e,r);Object.assign(this,p)}else if(typeof e=="string")if(CD.test(e)){const p=e.replace(DG,""),[m,x,b]=CG.exec(p).slice(1,4).map(y=>parseInt(y));Object.assign(this,{_a:m,_b:x,_c:b,_d:0,space:"rgb"})}else{if(!SD.test(e))throw Error("Unsupported string format, can't construct Color");{const p=y=>parseInt(y,16),[,m,x,b]=SG.exec(function(y){return y.length===4?["#",y.substring(1,2),y.substring(1,2),y.substring(2,3),y.substring(2,3),y.substring(3,4),y.substring(3,4)].join(""):y}(e)).map(p);Object.assign(this,{_a:m,_b:x,_c:b,_d:0,space:"rgb"})}}const{_a:l,_b:o,_c:c,_d:d}=this,h=this.space==="rgb"?{r:l,g:o,b:c}:this.space==="xyz"?{x:l,y:o,z:c}:this.space==="hsl"?{h:l,s:o,l:c}:this.space==="lab"?{l,a:o,b:c}:this.space==="lch"?{l,c:o,h:c}:this.space==="cmyk"?{c:l,m:o,y:c,k:d}:{};Object.assign(this,h)}lab(){const{x:e,y:r,z:a}=this.xyz();return new St(116*r-16,500*(e-r),200*(r-a),"lab")}lch(){const{l:e,a:r,b:a}=this.lab(),n=Math.sqrt(r**2+a**2);let i=180*Math.atan2(a,r)/Math.PI;return i<0&&(i*=-1,i=360-i),new St(e,n,i,"lch")}rgb(){if(this.space==="rgb")return this;if((e=this.space)==="lab"||e==="xyz"||e==="lch"){let{x:r,y:a,z:n}=this;if(this.space==="lab"||this.space==="lch"){let{l:x,a:b,b:y}=this;if(this.space==="lch"){const{c:T,h:M}=this,O=Math.PI/180;b=T*Math.cos(O*M),y=T*Math.sin(O*M)}const v=(x+16)/116,N=b/500+v,C=v-y/200,S=16/116,k=.008856,A=7.787;r=.95047*(N**3>k?N**3:(N-S)/A),a=1*(v**3>k?v**3:(v-S)/A),n=1.08883*(C**3>k?C**3:(C-S)/A)}const i=3.2406*r+-1.5372*a+-.4986*n,l=-.9689*r+1.8758*a+.0415*n,o=.0557*r+-.204*a+1.057*n,c=Math.pow,d=.0031308,h=i>d?1.055*c(i,1/2.4)-.055:12.92*i,p=l>d?1.055*c(l,1/2.4)-.055:12.92*l,m=o>d?1.055*c(o,1/2.4)-.055:12.92*o;return new St(255*h,255*p,255*m)}if(this.space==="hsl"){let{h:r,s:a,l:n}=this;if(r/=360,a/=100,n/=100,a===0)return n*=255,new St(n,n,n);const i=n<.5?n*(1+a):n+a-n*a,l=2*n-i,o=255*g1(l,i,r+1/3),c=255*g1(l,i,r),d=255*g1(l,i,r-1/3);return new St(o,c,d)}if(this.space==="cmyk"){const{c:r,m:a,y:n,k:i}=this,l=255*(1-Math.min(1,r*(1-i)+i)),o=255*(1-Math.min(1,a*(1-i)+i)),c=255*(1-Math.min(1,n*(1-i)+i));return new St(l,o,c)}return this;var e}toArray(){const{_a:e,_b:r,_c:a,_d:n,space:i}=this;return[e,r,a,n,i]}toHex(){const[e,r,a]=this._clamped().map(MG);return`#${e}${r}${a}`}toRgb(){const[e,r,a]=this._clamped();return`rgb(${e},${r},${a})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:r,_c:a}=this.rgb(),[n,i,l]=[e,r,a].map(v=>v/255),o=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,c=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,d=l>.04045?Math.pow((l+.055)/1.055,2.4):l/12.92,h=(.4124*o+.3576*c+.1805*d)/.95047,p=(.2126*o+.7152*c+.0722*d)/1,m=(.0193*o+.1192*c+.9505*d)/1.08883,x=h>.008856?Math.pow(h,1/3):7.787*h+16/116,b=p>.008856?Math.pow(p,1/3):7.787*p+16/116,y=m>.008856?Math.pow(m,1/3):7.787*m+16/116;return new St(x,b,y,"xyz")}_clamped(){const{_a:e,_b:r,_c:a}=this.rgb(),{max:n,min:i,round:l}=Math;return[e,r,a].map(o=>n(0,i(l(o),255)))}}class gt{constructor(...e){this.init(...e)}clone(){return new gt(this)}init(e,r){const i=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=i.x==null?0:i.x,this.y=i.y==null?0:i.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:a}=this;return this.x=e.a*r+e.c*a+e.e,this.y=e.b*r+e.d*a+e.f,this}}function qc(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,a=e.flip&&(r||e.flip==="x")?-1:1,n=e.flip&&(r||e.flip==="y")?-1:1,i=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,l=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,o=e.scale&&e.scale.length?e.scale[0]*a:isFinite(e.scale)?e.scale*a:isFinite(e.scaleX)?e.scaleX*a:a,c=e.scale&&e.scale.length?e.scale[1]*n:isFinite(e.scale)?e.scale*n:isFinite(e.scaleY)?e.scaleY*n:n,d=e.shear||0,h=e.rotate||e.theta||0,p=new gt(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),m=p.x,x=p.y,b=new gt(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),y=b.x,v=b.y,N=new gt(e.translate||e.tx||e.translateX,e.ty||e.translateY),C=N.x,S=N.y,k=new gt(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:o,scaleY:c,skewX:i,skewY:l,shear:d,theta:h,rx:k.x,ry:k.y,tx:C,ty:S,ox:m,oy:x,px:y,py:v}}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,a){const n=e.a*r.a+e.c*r.b,i=e.b*r.a+e.d*r.b,l=e.a*r.c+e.c*r.d,o=e.b*r.c+e.d*r.d,c=e.e+e.a*r.e+e.c*r.f,d=e.f+e.b*r.e+e.d*r.f;return a.a=n,a.b=i,a.c=l,a.d=o,a.e=c,a.f=d,a}around(e,r,a){return this.clone().aroundO(e,r,a)}aroundO(e,r,a){const n=e||0,i=r||0;return this.translateO(-n,-i).lmultiplyO(a).translateO(n,i)}clone(){return new ze(this)}decompose(e=0,r=0){const a=this.a,n=this.b,i=this.c,l=this.d,o=this.e,c=this.f,d=a*l-n*i,h=d>0?1:-1,p=h*Math.sqrt(a*a+n*n),m=Math.atan2(h*n,h*a),x=180/Math.PI*m,b=Math.cos(m),y=Math.sin(m),v=(a*i+n*l)/d,N=i*p/(v*a-n)||l*p/(v*n+a);return{scaleX:p,scaleY:N,shear:v,rotate:x,translateX:o-e+e*b*p+r*(v*b*p-y*N),translateY:c-r+e*y*p+r*(v*y*p+b*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 qc(this.a,r.a)&&qc(this.b,r.b)&&qc(this.c,r.c)&&qc(this.d,r.d)&&qc(this.e,r.e)&&qc(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 Qr?e.matrixify():typeof e=="string"?ze.fromArray(e.split(Ci).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,a=this.c,n=this.d,i=this.e,l=this.f,o=e*n-r*a;if(!o)throw new Error("Cannot invert "+this);const c=n/o,d=-r/o,h=-a/o,p=e/o,m=-(c*i+h*l),x=-(d*i+p*l);return this.a=c,this.b=d,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,a){return this.clone().rotateO(e,r,a)}rotateO(e,r=0,a=0){e=f1(e);const n=Math.cos(e),i=Math.sin(e),{a:l,b:o,c,d,e:h,f:p}=this;return this.a=l*n-o*i,this.b=o*n+l*i,this.c=c*n-d*i,this.d=d*n+c*i,this.e=h*n-p*i+a*i-r*n+r,this.f=p*n+h*i-r*i-a*n+a,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,r=e,a=0,n=0){arguments.length===3&&(n=a,a=r,r=e);const{a:i,b:l,c:o,d:c,e:d,f:h}=this;return this.a=i*e,this.b=l*r,this.c=o*e,this.d=c*r,this.e=d*e-a*e+a,this.f=h*r-n*r+n,this}shear(e,r,a){return this.clone().shearO(e,r,a)}shearO(e,r=0,a=0){const{a:n,b:i,c:l,d:o,e:c,f:d}=this;return this.a=n+i*e,this.c=l+o*e,this.e=c+d*e-a*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,r=e,a=0,n=0){arguments.length===3&&(n=a,a=r,r=e),e=f1(e),r=f1(r);const i=Math.tan(e),l=Math.tan(r),{a:o,b:c,c:d,d:h,e:p,f:m}=this;return this.a=o+c*i,this.b=c+o*l,this.c=d+h*i,this.d=h+d*l,this.e=p+m*i-n*i,this.f=m+p*l-a*l,this}skewX(e,r,a){return this.skew(e,0,r,a)}skewY(e,r,a){return this.skew(0,e,r,a)}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:a,y:n}=new gt(r.ox,r.oy).transform(this),i=new ze().translateO(r.rx,r.ry).lmultiplyO(this).translateO(-a,-n).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(a,n);if(isFinite(r.px)||isFinite(r.py)){const l=new gt(a,n).transform(i),o=isFinite(r.px)?r.px-l.x:0,c=isFinite(r.py)?r.py-l.y:0;i.translateO(o,c)}return i.translateO(r.tx,r.ty),i}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 il(){if(!il.nodes){const t=pa().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;il.nodes={svg:t,path:e}}if(!il.nodes.svg.node.parentNode){const t=lt.document.body||lt.document.documentElement;il.nodes.svg.addTo(t)}return il.nodes}function HR(t){return!(t.width||t.height||t.x||t.y)}ct(ze,"Matrix");class ir{constructor(...e){this.init(...e)}addOffset(){return this.x+=lt.window.pageXOffset,this.y+=lt.window.pageYOffset,new ir(this)}init(e){return e=typeof e=="string"?e.split(Ci).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 HR(this)}merge(e){const r=Math.min(this.x,e.x),a=Math.min(this.y,e.y),n=Math.max(this.x+this.width,e.x+e.width)-r,i=Math.max(this.y+this.height,e.y+e.height)-a;return new ir(r,a,n,i)}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,a=-1/0,n=1/0,i=-1/0;return[new gt(this.x,this.y),new gt(this.x2,this.y),new gt(this.x,this.y2),new gt(this.x2,this.y2)].forEach(function(l){l=l.transform(e),r=Math.min(r,l.x),a=Math.max(a,l.x),n=Math.min(n,l.y),i=Math.max(i,l.y)}),new ir(r,n,a-r,i-n)}}function DD(t,e,r){let a;try{if(a=e(t.node),HR(a)&&(n=t.node)!==lt.document&&!(lt.document.documentElement.contains||function(i){for(;i.parentNode;)i=i.parentNode;return i===lt.document}).call(lt.document.documentElement,n))throw new Error("Element not in the dom")}catch{a=r(t)}var n;return a}Je({viewbox:{viewbox(t,e,r,a){return t==null?new ir(this.attr("viewBox")):this.attr("viewBox",new ir(t,e,r,a))},zoom(t,e){let{width:r,height:a}=this.attr(["width","height"]);if((r||a)&&typeof r!="string"&&typeof a!="string"||(r=this.node.clientWidth,a=this.node.clientHeight),!r||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const n=this.viewbox(),i=r/n.width,l=a/n.height,o=Math.min(i,l);if(t==null)return o;let c=o/t;c===1/0&&(c=Number.MAX_SAFE_INTEGER/100),e=e||new gt(r/2/i+n.x,a/2/l+n.y);const d=new ir(n).transform(new ze({scale:c,origin:e}));return this.viewbox(d)}}}),ct(ir,"Box");class Uo extends Array{constructor(e=[],...r){if(super(e,...r),typeof e=="number")return this;this.length=0,this.push(...e)}}Ie([Uo],{each(t,...e){return typeof t=="function"?this.map((r,a,n)=>t.call(r,r,a,n)):this.map(r=>r[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const EG=["toArray","constructor","each"];function rc(t,e){return new Uo(Z4((e||lt.document).querySelectorAll(t),function(r){return Tn(r)}))}Uo.extend=function(t){t=t.reduce((e,r)=>(EG.includes(r)||r[0]==="_"||(r in Array.prototype&&(e["$"+r]=Array.prototype[r]),e[r]=function(...a){return this.each(r,...a)}),e),{}),Ie([Uo],t)};let PG=0;const $R={};function YR(t){let e=t.getEventHolder();return e===lt.window&&(e=$R),e.events||(e.events={}),e.events}function rN(t){return t.getEventTarget()}function ci(t,e,r,a,n){const i=r.bind(a||t),l=pa(t),o=YR(l),c=rN(l);e=Array.isArray(e)?e:e.split(Ci),r._svgjsListenerId||(r._svgjsListenerId=++PG),e.forEach(function(d){const h=d.split(".")[0],p=d.split(".")[1]||"*";o[h]=o[h]||{},o[h][p]=o[h][p]||{},o[h][p][r._svgjsListenerId]=i,c.addEventListener(h,i,n||!1)})}function On(t,e,r,a){const n=pa(t),i=YR(n),l=rN(n);(typeof r!="function"||(r=r._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Ci)).forEach(function(o){const c=o&&o.split(".")[0],d=o&&o.split(".")[1];let h,p;if(r)i[c]&&i[c][d||"*"]&&(l.removeEventListener(c,i[c][d||"*"][r],a||!1),delete i[c][d||"*"][r]);else if(c&&d){if(i[c]&&i[c][d]){for(p in i[c][d])On(l,[c,d].join("."),p);delete i[c][d]}}else if(d)for(o in i)for(h in i[o])d===h&&On(l,[o,d].join("."));else if(c){if(i[c]){for(h in i[c])On(l,[c,h].join("."));delete i[c]}}else{for(o in i)On(l,o);(function(m){let x=m.getEventHolder();x===lt.window&&(x=$R),x.events&&(x.events={})})(n)}})}class Zf extends J4{addEventListener(){}dispatch(e,r,a){return function(n,i,l,o){const c=rN(n);return i instanceof lt.window.Event||(i=new lt.window.CustomEvent(i,{detail:l,cancelable:!0,...o})),c.dispatchEvent(i),i}(this,e,r,a)}dispatchEvent(e){const r=this.getEventHolder().events;if(!r)return!0;const a=r[e.type];for(const n in a)for(const i in a[n])a[n][i](e);return!e.defaultPrevented}fire(e,r,a){return this.dispatch(e,r,a),this}getEventHolder(){return this}getEventTarget(){return this}off(e,r,a){return On(this,e,r,a),this}on(e,r,a,n){return ci(this,e,r,a,n),this}removeEventListener(){}}function TD(){}ct(Zf,"EventTarget");const x1=400,OG=">",RG=0,_G={"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 Wo 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(Ci).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(BR))&&(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 LG=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),UR=[];class yl extends Zf{constructor(e,r){super(),this.node=e,this.type=e.nodeName,r&&e!==r&&this.attr(r)}add(e,r){return(e=pa(e)).removeNamespace&&this.node instanceof lt.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 pa(e).put(this,r)}children(){return new Uo(Z4(this.node.children,function(e){return Tn(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,r=!0){this.writeDataToDom();let a=this.node.cloneNode(e);return r&&(a=FR(a)),new this.constructor(a)}each(e,r){const a=this.children();let n,i;for(n=0,i=a.length;n<i;n++)e.apply(a[n],[n,a]),r&&a[n].each(e,r);return this}element(e,r){return this.put(new yl(pf(e),r))}first(){return Tn(this.node.firstChild)}get(e){return Tn(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=IR(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Tn(this.node.lastChild)}matches(e){const r=this.node,a=r.matches||r.matchesSelector||r.msMatchesSelector||r.mozMatchesSelector||r.webkitMatchesSelector||r.oMatchesSelector||null;return a&&a.call(r,e)}parent(e){let r=this;if(!r.node.parentNode)return null;if(r=Tn(r.node.parentNode),!e)return r;do if(typeof e=="string"?r.matches(e):r instanceof e)return r;while(r=Tn(r.node.parentNode));return r}put(e,r){return e=pa(e),this.add(e,r),e}putIn(e,r){return pa(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=pa(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,r=null){const a=10**e,n=this.attr(r);for(const i in n)typeof n[i]=="number"&&(n[i]=Math.round(n[i]*a)/a);return this.attr(n),this}svg(e,r){return this.xml(e,r,Q4)}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 a=r.index(this);return r.put(e,a).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,r,a){if(typeof e=="boolean"&&(a=r,r=e,e=null),e==null||typeof e=="function"){r=r==null||r,this.writeDataToDom();let o=this;if(e!=null){if(o=Tn(o.node.cloneNode(!0)),r){const c=e(o);if(o=c||o,c===!1)return""}o.each(function(){const c=e(this),d=c||this;c===!1?this.remove():c&&this!==d&&this.replace(d)},!0)}return r?o.node.outerHTML:o.node.innerHTML}r=r!=null&&r;const n=pf("wrapper",a),i=lt.document.createDocumentFragment();n.innerHTML=e;for(let o=n.children.length;o--;)i.appendChild(n.firstElementChild);const l=this.parent();return r?this.replace(i)&&l:this.add(i)}}Ie(yl,{attr:function(t,e,r){if(t==null){t={},e=this.node.attributes;for(const a of e)t[a.nodeName]=kD.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue;return t}if(t instanceof Array)return t.reduce((a,n)=>(a[n]=this.attr(n),a),{});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?_G[t]:kD.test(e)?parseFloat(e):e;typeof(e=UR.reduce((a,n)=>n(t,a,this),e))=="number"?e=new Ve(e):LG.has(t)&&St.isColor(e)?e=new St(e):e.constructor===Array&&(e=new Wo(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 rc(t,this.node)},findOne:function(t){return Tn(this.node.querySelector(t))}}),ct(yl,"Dom");let Qr=class extends yl{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=pa(t));const r=new Uo;let a=this;for(;(a=a.parent())&&a.node!==lt.document&&a.nodeName!=="#document-fragment"&&(r.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return r}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(AG);return e?pa(e[1]):null}root(){const t=this.parent(function(e){return Ro[e]}(eN));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const r=Ud(this,t,e);return this.width(new Ve(r.width)).height(new Ve(r.height))}width(t){return this.attr("width",t)}writeDataToDom(){return zR(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};Ie(Qr,{bbox:function(){const t=DD(this,e=>e.getBBox(),e=>{try{const r=e.clone().addTo(il().svg).show(),a=r.node.getBBox();return r.remove(),a}catch(r){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${r.toString()}`)}});return new ir(t)},rbox:function(t){const e=DD(this,a=>a.getBoundingClientRect(),a=>{throw new Error(`Getting rbox of element "${a.node.nodeName}" is not possible`)}),r=new ir(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 gt(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}}}),ct(Qr,"Element");const dh={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(a){if(a===void 0)return this.attr(t);if(typeof a=="string"||a instanceof St||St.isRgb(a)||a instanceof Qr)this.attr(t,a);else for(r=dh[t].length-1;r>=0;r--)a[dh[t][r]]!=null&&this.attr(dh.prefix(t,dh[t][r]),a[dh[t][r]]);return this},Je(["Element","Runner"],e)}),Je(["Element","Runner"],{matrix:function(t,e,r,a,n,i){return t==null?new ze(this):this.attr("transform",new ze(t,e,r,a,n,i))},rotate:function(t,e,r){return this.transform({rotate:t,ox:e,oy:r},!0)},skew:function(t,e,r,a){return arguments.length===1||arguments.length===3?this.transform({skew:t,ox:e,oy:r},!0):this.transform({skew:[t,e],ox:r,oy:a},!0)},shear:function(t,e,r){return this.transform({shear:t,ox:e,oy:r},!0)},scale:function(t,e,r,a){return arguments.length===1||arguments.length===3?this.transform({scale:t,ox:e,oy:r},!0):this.transform({scale:[t,e],ox:r,oy:a},!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)}}),Je("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new Ve(t)):this.rx(t).ry(e)}}),Je("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new gt(this.node.getPointAtLength(t))}}),Je(["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)}});Je("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},{})),Je("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(kG).slice(0,-1).map(function(e){const r=e.trim().split("(");return[r[0],r[1].split(Ci).map(function(a){return parseFloat(a)})]}).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(oj(this.node))return this.addTo(t,e);const r=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(t==null||typeof t=="string"){const a=new ze(this).decompose();return t==null?a:a[t]}ze.isMatrixLike(t)||(t={...t,origin:lj(t,this)});const r=new ze(e===!0?this:e||!1).transform(t);return this.attr("transform",r)}});class ya extends Qr{flatten(){return this.each(function(){if(this instanceof ya)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),r=e.index(this)){return r=r===-1?e.children().length:r,this.each(function(a,n){return n[n.length-a-1].toParent(e,r)}),this.remove()}}ct(ya,"Container");class I0 extends ya{constructor(e,r=e){super(Pt("defs",e),r)}flatten(){return this}ungroup(){return this}}ct(I0,"Defs");class hn extends Qr{}function aN(t){return this.attr("rx",t)}function nN(t){return this.attr("ry",t)}function WR(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function XR(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function VR(t){return this.attr("cx",t)}function qR(t){return this.attr("cy",t)}function GR(t){return t==null?2*this.rx():this.rx(new Ve(t).divide(2))}function KR(t){return t==null?2*this.ry():this.ry(new Ve(t).divide(2))}ct(hn,"Shape");var zG=Object.freeze({__proto__:null,cx:VR,cy:qR,height:KR,rx:aN,ry:nN,width:GR,x:WR,y:XR});class $g extends hn{constructor(e,r=e){super(Pt("ellipse",e),r)}size(e,r){const a=Ud(this,e,r);return this.rx(new Ve(a.width).divide(2)).ry(new Ve(a.height).divide(2))}}Ie($g,zG),Je("Container",{ellipse:Et(function(t=0,e=t){return this.put(new $g).size(t,e).move(0,0)})}),ct($g,"Ellipse");let ZR=class extends yl{constructor(e=lt.document.createDocumentFragment()){super(e)}xml(e,r,a){if(typeof e=="boolean"&&(a=r,r=e,e=null),e==null||typeof e=="function"){const n=new yl(pf("wrapper",a));return n.add(this.node.cloneNode(!0)),n.xml(!1,a)}return super.xml(e,!1,a)}};function QR(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 JR(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)})}ct(ZR,"Fragment");var IG=Object.freeze({__proto__:null,from:QR,to:JR});class Vh extends ya{constructor(e,r){super(Pt(e+"Gradient",typeof e=="string"?null:e),r)}attr(e,r,a){return e==="transform"&&(e="gradientTransform"),super.attr(e,r,a)}bbox(){return new ir}targets(){return rc("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(Vh,IG),Je({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Et(function(t,e){return this.put(new Vh(t)).update(e)})}}),ct(Vh,"Gradient");class mf extends ya{constructor(e,r=e){super(Pt("pattern",e),r)}attr(e,r,a){return e==="transform"&&(e="patternTransform"),super.attr(e,r,a)}bbox(){return new ir}targets(){return rc("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()+")"}}Je({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Et(function(t,e,r){return this.put(new mf).update(r).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),ct(mf,"Pattern");let Yg=class extends hn{constructor(t,e=t){super(Pt("image",t),e)}load(t,e){if(!t)return this;const r=new lt.window.Image;return ci(r,"load",function(a){const n=this.parent(mf);this.width()===0&&this.height()===0&&this.size(r.width,r.height),n instanceof mf&&n.width()===0&&n.height()===0&&n.size(this.width(),this.height()),typeof e=="function"&&e.call(this,a)},this),ci(r,"load error",function(){On(r)}),this.attr("href",r.src=t,Wd)}};var MD;MD=function(t,e,r){return t!=="fill"&&t!=="stroke"||TG.test(e)&&(e=r.root().defs().image(e)),e instanceof Yg&&(e=r.root().defs().pattern(0,0,a=>{a.add(e)})),e},UR.push(MD),Je({Container:{image:Et(function(t,e){return this.put(new Yg).size(0,0).load(t,e)})}}),ct(Yg,"Image");class vl extends Wo{bbox(){let e=-1/0,r=-1/0,a=1/0,n=1/0;return this.forEach(function(i){e=Math.max(i[0],e),r=Math.max(i[1],r),a=Math.min(i[0],a),n=Math.min(i[1],n)}),new ir(a,n,e-a,r-n)}move(e,r){const a=this.bbox();if(e-=a.x,r-=a.y,!isNaN(e)&&!isNaN(r))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+e,this[n][1]+r];return this}parse(e=[0,0]){const r=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(Ci).map(parseFloat)).length%2!=0&&e.pop();for(let a=0,n=e.length;a<n;a+=2)r.push([e[a],e[a+1]]);return r}size(e,r){let a;const n=this.bbox();for(a=this.length-1;a>=0;a--)n.width&&(this[a][0]=(this[a][0]-n.x)*e/n.width+n.x),n.height&&(this[a][1]=(this[a][1]-n.y)*r/n.height+n.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,a=this.length;r<a;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[a,n]=this[r];this[r][0]=e.a*a+e.c*n+e.e,this[r][1]=e.b*a+e.d*n+e.f}return this}}const FG=vl;var sN=Object.freeze({__proto__:null,MorphArray:FG,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 vo=class extends hn{constructor(t,e=t){super(Pt("line",t),e)}array(){return new vl([[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,a){return t==null?this.array():(t=e!==void 0?{x1:t,y1:e,x2:r,y2:a}:new vl(t).toLine(),this.attr(t))}size(t,e){const r=Ud(this,t,e);return this.attr(this.array().size(r.width,r.height).toLine())}};Ie(vo,sN),Je({Container:{line:Et(function(...t){return vo.prototype.plot.apply(this.put(new vo),t[0]!=null?t:[0,0,0,0])})}}),ct(vo,"Line");let Ug=class extends ya{constructor(t,e=t){super(Pt("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 sd(t,e){return function(r){return r==null?this[t]:(this[t]=r,e&&e.call(this),this)}}Je({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Et(function(t,e,r){return this.put(new Ug).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(r)})},marker:{marker(t,e,r,a){let n=["marker"];return t!=="all"&&n.push(t),n=n.join("-"),t=arguments[1]instanceof Ug?arguments[1]:this.defs().marker(e,r,a),this.attr(n,t)}}}),ct(Ug,"Marker");const BG={"-":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,a){return function(n){return n<0?t>0?e/t*n:r>0?a/r*n:0:n>1?r<1?(1-a)/(1-r)*n+(a-r)/(1-r):t<1?(1-e)/(1-t)*n+(e-t)/(1-t):1:3*n*(1-n)**2*e+3*n**2*(1-n)*a+n**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let r=t;return e==="none"?--r:e==="both"&&++r,(a,n=!1)=>{let i=Math.floor(a*t);const l=a*i%1==0;return e!=="start"&&e!=="both"||++i,n&&l&&--i,a>=0&&i<0&&(i=0),a<=1&&i>r&&(i=r),i/r}}};class iN{done(){return!1}}class cj extends iN{constructor(e=OG){super(),this.ease=BG[e]||e}step(e,r,a){return typeof e!="number"?a<1?e:r:e+(r-e)*this.ease(a)}}class vx extends iN{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,r,a,n){return this.stepper(e,r,a,n)}}function ED(){const t=(this._duration||500)/1e3,e=this._overshoot||0,r=Math.PI,a=Math.log(e/100+1e-10),n=-a/Math.sqrt(r*r+a*a),i=3.9/(n*t);this.d=2*n*i,this.k=i*i}Ie(class extends vx{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,r,a){if(typeof t=="string")return t;if(a.done=r===1/0,r===1/0)return e;if(r===0)return t;r>100&&(r=16),r/=1e3;const n=a.velocity||0,i=-this.d*n-this.k*(t-e),l=t+n*r+i*r*r/2;return a.velocity=n+i*r,a.done=Math.abs(e-l)+Math.abs(n)<.002,a.done?e:l}},{duration:sd("_duration",ED),overshoot:sd("_overshoot",ED)});Ie(class extends vx{constructor(t=.1,e=.01,r=0,a=1e3){super(),this.p(t).i(e).d(r).windup(a)}step(t,e,r,a){if(typeof t=="string")return t;if(a.done=r===1/0,r===1/0)return e;if(r===0)return t;const n=e-t;let i=(a.integral||0)+n*r;const l=(n-(a.error||0))/r,o=this._windup;return o!==!1&&(i=Math.max(-o,Math.min(i,o))),a.error=n,a.integral=i,a.done=Math.abs(n)<.001,a.done?e:t+(this.P*n+this.I*i+this.D*l)}},{windup:sd("_windup"),p:sd("P"),i:sd("I"),d:sd("D")});const HG={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},dj={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]]}},b1="mlhvqtcsaz".split("");for(let t=0,e=b1.length;t<e;++t)dj[b1[t]]=function(r){return function(a,n,i){if(r==="H")a[0]=a[0]+n.x;else if(r==="V")a[0]=a[0]+n.y;else if(r==="A")a[5]=a[5]+n.x,a[6]=a[6]+n.y;else for(let l=0,o=a.length;l<o;++l)a[l]=a[l]+(l%2?n.y:n.x);return dj[r](a,n,i)}}(b1[t].toUpperCase());function uj(t){return t.segment.length&&t.segment.length-1===HG[t.segment[0].toUpperCase()]}function $G(t,e){t.inNumber&&fo(t,!1);const r=tN.test(e);if(r)t.segment=[e];else{const a=t.lastCommand,n=a.toLowerCase(),i=a===n;t.segment=[n==="m"?i?"l":"L":a]}return t.inSegment=!0,t.lastCommand=t.segment[0],r}function fo(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,uj(t)&&hj(t)}function hj(t){t.inSegment=!1,t.absolute&&(t.segment=function(e){const r=e.segment[0];return dj[r](e.segment.slice(1),e.p,e.p0)}(t)),t.segments.push(t.segment)}function YG(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 UG(t){return t.lastToken.toUpperCase()==="E"}const WG=new Set([" ",",","	",`
`,"\r","\f"]);class Zn extends Wo{bbox(){return il().path.setAttribute("d",this.toString()),new ir(il.nodes.path.getBBox())}move(e,r){const a=this.bbox();if(e-=a.x,r-=a.y,!isNaN(e)&&!isNaN(r))for(let n,i=this.length-1;i>=0;i--)n=this[i][0],n==="M"||n==="L"||n==="T"?(this[i][1]+=e,this[i][2]+=r):n==="H"?this[i][1]+=e:n==="V"?this[i][1]+=r:n==="C"||n==="S"||n==="Q"?(this[i][1]+=e,this[i][2]+=r,this[i][3]+=e,this[i][4]+=r,n==="C"&&(this[i][5]+=e,this[i][6]+=r)):n==="A"&&(this[i][6]+=e,this[i][7]+=r);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),function(r,a=!0){let n=0,i="";const l={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:a,p0:new gt,p:new gt};for(;l.lastToken=i,i=r.charAt(n++);)if(l.inSegment||!$G(l,i))if(i!==".")if(isNaN(parseInt(i)))if(WG.has(i))l.inNumber&&fo(l,!1);else if(i!=="-"&&i!=="+")if(i.toUpperCase()!=="E"){if(tN.test(i)){if(l.inNumber)fo(l,!1);else{if(!uj(l))throw new Error("parser Error");hj(l)}--n}}else l.number+=i,l.hasExponent=!0;else{if(l.inNumber&&!UG(l)){fo(l,!1),--n;continue}l.number+=i,l.inNumber=!0}else{if(l.number==="0"||YG(l)){l.inNumber=!0,l.number=i,fo(l,!0);continue}l.inNumber=!0,l.number+=i}else{if(l.pointSeen||l.hasExponent){fo(l,!1),--n;continue}l.inNumber=!0,l.pointSeen=!0,l.number+=i}return l.inNumber&&fo(l,!1),l.inSegment&&uj(l)&&hj(l),l.segments}(e)}size(e,r){const a=this.bbox();let n,i;for(a.width=a.width===0?1:a.width,a.height=a.height===0?1:a.height,n=this.length-1;n>=0;n--)i=this[n][0],i==="M"||i==="L"||i==="T"?(this[n][1]=(this[n][1]-a.x)*e/a.width+a.x,this[n][2]=(this[n][2]-a.y)*r/a.height+a.y):i==="H"?this[n][1]=(this[n][1]-a.x)*e/a.width+a.x:i==="V"?this[n][1]=(this[n][1]-a.y)*r/a.height+a.y:i==="C"||i==="S"||i==="Q"?(this[n][1]=(this[n][1]-a.x)*e/a.width+a.x,this[n][2]=(this[n][2]-a.y)*r/a.height+a.y,this[n][3]=(this[n][3]-a.x)*e/a.width+a.x,this[n][4]=(this[n][4]-a.y)*r/a.height+a.y,i==="C"&&(this[n][5]=(this[n][5]-a.x)*e/a.width+a.x,this[n][6]=(this[n][6]-a.y)*r/a.height+a.y)):i==="A"&&(this[n][1]=this[n][1]*e/a.width,this[n][2]=this[n][2]*r/a.height,this[n][6]=(this[n][6]-a.x)*e/a.width+a.x,this[n][7]=(this[n][7]-a.y)*r/a.height+a.y);return this}toString(){return function(e){let r="";for(let a=0,n=e.length;a<n;a++)r+=e[a][0],e[a][1]!=null&&(r+=e[a][1],e[a][2]!=null&&(r+=" ",r+=e[a][2],e[a][3]!=null&&(r+=" ",r+=e[a][3],r+=" ",r+=e[a][4],e[a][5]!=null&&(r+=" ",r+=e[a][5],r+=" ",r+=e[a][6],e[a][7]!=null&&(r+=" ",r+=e[a][7])))));return r+" "}(this)}}const e_=t=>{const e=typeof t;return e==="number"?Ve:e==="string"?St.isColor(t)?St:Ci.test(t)?tN.test(t)?Zn:Wo:BR.test(t)?Ve:fj:pj.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Wo:e==="object"?gf:fj};class po{constructor(e){this._stepper=e||new cj("-"),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(e_(e));let r=new this._type(e);return this._type===St&&(r=this._to?r[this._to[4]]():this._from?r[this._from[4]]():r),this._type===gf&&(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(a){return a.done=!0,a}),r}}class fj{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 Qf{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,Qf.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Qf.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const XG=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class gf{constructor(...e){this.init(...e)}align(e){const r=this.values;for(let a=0,n=r.length;a<n;++a){if(r[a+1]===e[a+1]){if(r[a+1]===St&&e[a+7]!==r[a+7]){const o=e[a+7],c=new St(this.values.splice(a+3,5))[o]().toArray();this.values.splice(a+3,0,...c)}a+=r[a+2]+2;continue}if(!e[a+1])return this;const i=new e[a+1]().toArray(),l=r[a+2]+3;r.splice(a,l,e[a],e[a+1],e[a+2],...i),a+=r[a+2]+2}return this}init(e){if(this.values=[],Array.isArray(e))return void(this.values=e.slice());e=e||{};const r=[];for(const a in e){const n=e_(e[a]),i=new n(e[a]).toArray();r.push([a,n,i.length,...i])}return r.sort(XG),this.values=r.reduce((a,n)=>a.concat(n),[]),this}toArray(){return this.values}valueOf(){const e={},r=this.values;for(;r.length;){const a=r.shift(),n=r.shift(),i=r.shift(),l=r.splice(0,i);e[a]=new n(l)}return e}}const pj=[fj,Qf,gf];class ud extends hn{constructor(e,r=e){super(Pt("path",e),r)}array(){return this._array||(this._array=new Zn(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 Zn(e))}size(e,r){const a=Ud(this,e,r);return this.attr("d",this.array().size(a.width,a.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)}}ud.prototype.MorphArray=Zn,Je({Container:{path:Et(function(t){return this.put(new ud).plot(t||new Zn)})}}),ct(ud,"Path");var t_=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new vl(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 vl(t))},size:function(t,e){const r=Ud(this,t,e);return this.attr("points",this.array().size(r.width,r.height))}});class wo extends hn{constructor(e,r=e){super(Pt("polygon",e),r)}}Je({Container:{polygon:Et(function(t){return this.put(new wo).plot(t||new vl)})}}),Ie(wo,sN),Ie(wo,t_),ct(wo,"Polygon");class jo extends hn{constructor(e,r=e){super(Pt("polyline",e),r)}}Je({Container:{polyline:Et(function(t){return this.put(new jo).plot(t||new vl)})}}),Ie(jo,sN),Ie(jo,t_),ct(jo,"Polyline");class Wg extends hn{constructor(e,r=e){super(Pt("rect",e),r)}}Ie(Wg,{rx:aN,ry:nN}),Je({Container:{rect:Et(function(t,e){return this.put(new Wg).size(t,e)})}}),ct(Wg,"Rect");class y1{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 vt={nextDraw:null,frames:new y1,timeouts:new y1,immediates:new y1,timer:()=>lt.window.performance||lt.window.Date,transforms:[],frame(t){const e=vt.frames.push({run:t});return vt.nextDraw===null&&(vt.nextDraw=lt.window.requestAnimationFrame(vt._draw)),e},timeout(t,e){e=e||0;const r=vt.timer().now()+e,a=vt.timeouts.push({run:t,time:r});return vt.nextDraw===null&&(vt.nextDraw=lt.window.requestAnimationFrame(vt._draw)),a},immediate(t){const e=vt.immediates.push(t);return vt.nextDraw===null&&(vt.nextDraw=lt.window.requestAnimationFrame(vt._draw)),e},cancelFrame(t){t!=null&&vt.frames.remove(t)},clearTimeout(t){t!=null&&vt.timeouts.remove(t)},cancelImmediate(t){t!=null&&vt.immediates.remove(t)},_draw(t){let e=null;const r=vt.timeouts.last();for(;(e=vt.timeouts.shift())&&(t>=e.time?e.run():vt.timeouts.push(e),e!==r););let a=null;const n=vt.frames.last();for(;a!==n&&(a=vt.frames.shift());)a.run(t);let i=null;for(;i=vt.immediates.shift();)i();vt.nextDraw=vt.timeouts.first()||vt.frames.first()?lt.window.requestAnimationFrame(vt._draw):null}},VG=function(t){const e=t.start,r=t.runner.duration();return{start:e,duration:r,end:e+r,runner:t.runner}},qG=function(){const t=lt.window;return(t.performance||t.Date).now()};class r_ extends Zf{constructor(e=qG){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 a=Math.abs(r);return this.speed(e?-a:a)}schedule(e,r,a){if(e==null)return this._runners.map(VG);let n=0;const i=this.getEndTime();if(r=r||0,a==null||a==="last"||a==="after")n=i;else if(a==="absolute"||a==="start")n=r,r=0;else if(a==="now")n=this._time;else if(a==="relative"){const c=this.getRunnerInfoById(e.id);c&&(n=c.start+r,r=0)}else{if(a!=="with-last")throw new Error('Invalid value for the "when" parameter');{const c=this.getLastRunnerInfo();n=c?c.start:this._time}}e.unschedule(),e.timeline(this);const l=e.persist(),o={persist:l===null?this._persist:l,start:n+r,runner:e};return this._lastRunnerId=e.id,this._runners.push(o),this._runners.sort((c,d)=>c.start-d.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 vt.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=vt.frame(this._step)),this)}_stepFn(e=!1){const r=this._timeSource();let a=r-this._lastSourceTime;e&&(a=0);const n=this._speed*a+(this._time-this._lastStepTime);this._lastSourceTime=r,e||(this._time+=n,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let l=this._runners.length;l--;){const o=this._runners[l],c=o.runner;this._time-o.start<=0&&c.reset()}let i=!1;for(let l=0,o=this._runners.length;l<o;l++){const c=this._runners[l],d=c.runner;let h=n;const p=this._time-c.start;if(p<=0){i=!0;continue}p<h&&(h=p),d.active()&&(d.step(h).done?c.persist!==!0&&d.duration()-d.time()+this._time+c.persist<this._time&&(d.unschedule(),--l,--o):i=!0)}return i&&!(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)}}Je({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new r_,this._timeline):(this._timeline=t,this)}}});class nn extends Zf{constructor(e){super(),this.id=nn.id++,e=typeof(e=e??x1)=="function"?new vx(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof vx,this._stepper=this._isDeclarative?e:new cj,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,a){let n=1,i=!1,l=0;return r=r??RG,a=a||"last",typeof(e=e??x1)!="object"||e instanceof iN||(r=e.delay??r,a=e.when??a,i=e.swing||i,n=e.times??n,l=e.wait??l,e=e.duration??x1),{duration:e,delay:r,swing:i,times:n,wait:l,when:a}}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,a){const n=nn.sanitise(e,r,a),i=new nn(n.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(n).schedule(n.delay,n.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 cj(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,r,a){return typeof e=="object"&&(r=e.swing,a=e.wait,e=e.times),this._times=e||1/0,this._swing=r||!1,this._wait=a||0,this._times===!0&&(this._times=1/0),this}loops(e){const r=this._duration+this._wait;if(e==null){const i=Math.floor(this._time/r),l=(this._time-i*r)/this._duration;return Math.min(i+l,this._times)}const a=e%1,n=r*Math.floor(e)+this._duration*a;return this.time(n)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const r=this._time,a=this._duration,n=this._wait,i=this._times,l=this._swing,o=this._reverse;let c;if(e==null){const p=function(x){const b=l*Math.floor(x%(2*(n+a))/(n+a)),y=b&&!o||!b&&o,v=Math.pow(-1,y)*(x%(n+a))/a+y;return Math.max(Math.min(v,1),0)},m=i*(n+a)-n;return c=r<=0?Math.round(p(1e-5)):r<m?p(r):Math.round(p(m-1e-5)),c}const d=Math.floor(this.loops()),h=l&&d%2==0;return c=d+(h&&!o||o&&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,a,n){return this._queue.push({initialiser:e||TD,runner:r||TD,retarget:a,isTransform:n,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,a){if(e instanceof r_||(a=r,r=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,r,a),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const r=this.position(),a=this._lastPosition!==r&&this._time>=0;this._lastPosition=r;const n=this.duration(),i=this._lastTime<=0&&this._time>0,l=this._lastTime<n&&this._time>=n;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!l&&this._time>=n,this._reseted=!1;let c=!1;return(a||o)&&(this._initialise(a),this.transforms=new ze,c=this._run(o?e:r),this.fire("step",this)),this.done=this.done||c&&o,l&&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,a=this._queue.length;r<a;++r){const n=this._queue[r],i=this._isDeclarative||!n.initialised&&e;e=!n.finished,i&&e&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(e,r){if(this._history[e]={morpher:r,caller:this._queue[this._queue.length-1]},this._isDeclarative){const a=this.timeline();a&&a.play()}}_run(e){let r=!0;for(let a=0,n=this._queue.length;a<n;++a){const i=this._queue[a],l=i.runner.call(this,e);i.finished=i.finished||l===!0,r=r&&i.finished}return r}_tryRetarget(e,r,a){if(this._history[e]){if(!this._history[e].caller.initialised){const i=this._queue.indexOf(this._history[e].caller);return this._queue.splice(i,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,r,a):this._history[e].morpher.to(r),this._history[e].caller.finished=!1;const n=this.timeline();return n&&n.play(),!0}return!1}}nn.id=0;class wx{constructor(e=new ze,r=-1,a=!0){this.transforms=e,this.id=r,this.done=a}clearTransformsFromQueue(){}}Ie([nn,wx],{mergeWith(t){return new wx(t.transforms.lmultiply(this.transforms),t.id)}});const a_=(t,e)=>t.lmultiplyO(e),n_=t=>t.transforms;function GG(){const t=this._transformationRunners.runners.map(n_).reduce(a_,new ze);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class KG{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 wx).forEach(a=>a.clearTransformsFromQueue()),this}edit(e,r){const a=this.ids.indexOf(e+1);return this.ids.splice(a,1,e+1),this.runners.splice(a,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 a=this.runners[r];if(e&&a.done&&e.done&&(!a._timeline||!a._timeline._runnerIds.includes(a.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(a.id);const n=a.mergeWith(e);this.edit(e.id,n),e=n,--r}else e=a}return this}remove(e){const r=this.ids.indexOf(e+1);return this.ids.splice(r,1),this.runners.splice(r,1),this}}Je({Element:{animate(t,e,r){const a=nn.sanitise(t,e,r),n=this.timeline();return new nn(a.duration).loop(a).element(this).timeline(n.play()).schedule(a.delay,a.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(n_).reduce(a_,new ze)},_addRunner(t){this._transformationRunners.add(t),vt.cancelImmediate(this._frameId),this._frameId=vt.immediate(GG.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new KG().add(new wx(new ze(this))))}}});Ie(nn,{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 a=e;if(this._tryRetarget(t,a))return this;let n=new po(this._stepper).to(a),i=Object.keys(a);return this.queue(function(){n=n.from(this.element()[t](i))},function(l){return this.element()[t](n.at(l).valueOf()),n.done()},function(l){const o=Object.keys(l),c=(d=i,o.filter(p=>!d.includes(p)));var d;if(c.length){const p=this.element()[t](c),m=new gf(n.from()).valueOf();Object.assign(m,p),n.from(m)}const h=new gf(n.to()).valueOf();Object.assign(h,l),n.to(h),i=o,a=l}),this._rememberMorpher(t,n),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let r=new po(this._stepper).to(new Ve(t));return this.queue(function(){r=r.from(this.element().zoom())},function(a){return this.element().zoom(r.at(a),e),r.done()},function(a,n){e=n,r.to(a)}),this._rememberMorpher("zoom",r),this},transform(t,e,r){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=ze.isMatrixLike(t);r=t.affine!=null?t.affine:r??!a;const n=new po(this._stepper).type(r?Qf:ze);let i,l,o,c,d;return this.queue(function(){l=l||this.element(),i=i||lj(t,l),d=new ze(e?void 0:l),l._addRunner(this),e||l._clearTransformRunnersBefore(this)},function(h){e||this.clearTransform();const{x:p,y:m}=new gt(i).transform(l._currentTransform(this));let x=new ze({...t,origin:[p,m]}),b=this._isDeclarative&&o?o:d;if(r){x=x.decompose(p,m),b=b.decompose(p,m);const v=x.rotate,N=b.rotate,C=[v-360,v,v+360],S=C.map(T=>Math.abs(T-N)),k=Math.min(...S),A=S.indexOf(k);x.rotate=C[A]}e&&(a||(x.rotate=t.rotate||0),this._isDeclarative&&c&&(b.rotate=c)),n.from(b),n.to(x);const y=n.at(h);return c=y.rotate,o=new ze(y),this.addTransform(o),l._addRunner(this),n.done()},function(h){(h.origin||"center").toString()!==(t.origin||"center").toString()&&(i=lj(h,l)),t={...h,origin:i}},!0),this._isDeclarative&&this._rememberMorpher("transform",n),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 po(this._stepper).to(e);let a=null;return this.queue(function(){a=this.element()[t](),r.from(a),r.to(a+e)},function(n){return this.element()[t](r.at(n)),r.done()},function(n){r.to(a+new Ve(n))}),this._rememberMorpher(t,r),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const r=new po(this._stepper).to(e);return this.queue(function(){r.from(this.element()[t]())},function(a){return this.element()[t](r.at(a)),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,a){if(arguments.length===4)return this.plot([t,e,r,a]);if(this._tryRetarget("plot",t))return this;const n=new po(this._stepper).type(this._element.MorphArray).to(t);return this.queue(function(){n.from(this._element.array())},function(i){return this._element.plot(n.at(i)),n.done()}),this._rememberMorpher("plot",n),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,r,a){return this._queueObject("viewbox",new ir(t,e,r,a))},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(nn,{rx:aN,ry:nN,from:QR,to:JR}),ct(nn,"Runner");class mj extends ya{constructor(e,r=e){super(Pt("svg",e),r),this.namespace()}defs(){return this.isRoot()?Tn(this.node.querySelector("defs"))||this.put(new I0):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof lt.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:Q4,version:"1.1"}).attr("xmlns:xlink",Wd,p1):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,p1).attr("xmlns:svgjs",null,p1)}root(){return this.isRoot()?this:super.root()}}Je({Container:{nested:Et(function(){return this.put(new mj)})}}),ct(mj,"Svg",!0);let gj=class extends ya{constructor(t,e=t){super(Pt("symbol",t),e)}};Je({Container:{symbol:Et(function(){return this.put(new gj)})}}),ct(gj,"Symbol");var s_=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(lt.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 Qn extends hn{constructor(e,r=e){super(Pt("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 a=0;const n=this.dom.leading;this.each(function(i){if(oj(this.node))return;const l=lt.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=n*new Ve(l);this.dom.newLined&&(this.attr("x",r.attr("x")),this.text()===`
`?a+=o:(this.attr("dy",i?o+a:0),a=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new Ve(e.leading||1.3),this}writeDataToDom(){return zR(this,this.dom,{leading:1.3}),this}text(e){if(e===void 0){const r=this.node.childNodes;let a=0;e="";for(let n=0,i=r.length;n<i;++n)r[n].nodeName==="textPath"||oj(r[n])?n===0&&(a=n+1):(n!==a&&r[n].nodeType!==3&&Tn(r[n]).dom.newLined===!0&&(e+=`
`),e+=r[n].textContent);return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else for(let r=0,a=(e=(e+"").split(`
`)).length;r<a;r++)this.newLine(e[r]);return this.build(!1).rebuild()}}Ie(Qn,s_),Je({Container:{text:Et(function(t=""){return this.put(new Qn).text(t)}),plain:Et(function(t=""){return this.put(new Qn).plain(t)})}}),ct(Qn,"Text");class Xg extends hn{constructor(e,r=e){super(Pt("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 Qn))return this;const r=e.index(this),a=lt.window.getComputedStyle(this.node).getPropertyValue("font-size"),n=e.dom.leading*new Ve(a);return this.dy(r?n: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(Xg,s_),Je({Tspan:{tspan:Et(function(t=""){const e=new Xg;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),ct(Xg,"Tspan");class v1 extends hn{constructor(e,r=e){super(Pt("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(v1,{x:WR,y:XR,cx:VR,cy:qR,width:GR,height:KR}),Je({Container:{circle:Et(function(t=0){return this.put(new v1).size(t).move(0,0)})}}),ct(v1,"Circle");class w1 extends ya{constructor(e,r=e){super(Pt("clipPath",e),r)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return rc("svg [clip-path*="+this.id()+"]")}}Je({Container:{clip:Et(function(){return this.defs().put(new w1)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof w1?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),ct(w1,"ClipPath");class PD extends Qr{constructor(e,r=e){super(Pt("foreignObject",e),r)}}Je({Container:{foreignObject:Et(function(t,e){return this.put(new PD).size(t,e)})}}),ct(PD,"ForeignObject");var i_=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(r=>{let a;try{a=r.node instanceof Kf().SVGSVGElement?new ir(r.attr(["x","y","width","height"])):r.bbox()}catch{return}const n=new ze(r),i=n.translate(t,e).transform(n.inverse()),l=new gt(a.x,a.y).transform(i);r.move(l.x,l.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 a=t-r.x,n=e-r.y;return this.dmove(a,n)},size:function(t,e,r=this.bbox()){const a=Ud(this,t,e,r),n=a.width/r.width,i=a.height/r.height;return this.children().forEach(l=>{const o=new gt(r).transform(new ze(l).inverse());l.scale(n,i,o.x,o.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 hl extends ya{constructor(e,r=e){super(Pt("g",e),r)}}Ie(hl,i_),Je({Container:{group:Et(function(){return this.put(new hl)})}}),ct(hl,"G");let Vm=class extends ya{constructor(e,r=e){super(Pt("a",e),r)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Wd)}};Ie(Vm,i_),Je({Container:{link:Et(function(t){return this.put(new Vm).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 Vm,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}}}),ct(Vm,"A");class j1 extends ya{constructor(e,r=e){super(Pt("mask",e),r)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return rc("svg [mask*="+this.id()+"]")}}Je({Container:{mask:Et(function(){return this.defs().put(new j1)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof j1?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),ct(j1,"Mask");class OD extends Qr{constructor(e,r=e){super(Pt("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}}Je({Gradient:{stop:function(t,e,r){return this.put(new OD).update(t,e,r)}}}),ct(OD,"Stop");class N1 extends Qr{constructor(e,r=e){super(Pt("style",e),r)}addText(e=""){return this.node.textContent+=e,this}font(e,r,a={}){return this.rule("@font-face",{fontFamily:e,src:r,...a})}rule(e,r){return this.addText(function(a,n){if(!a)return"";if(!n)return a;let i=a+"{";for(const l in n)i+=l.replace(/([A-Z])/g,function(o,c){return"-"+c.toLowerCase()})+":"+n[l]+";";return i+="}",i}(e,r))}}Je("Dom",{style(t,e){return this.put(new N1).rule(t,e)},fontface(t,e,r){return this.put(new N1).font(t,e,r)}}),ct(N1,"Style");class S1 extends Qn{constructor(e,r=e){super(Pt("textPath",e),r)}array(){const e=this.track();return e?e.array():null}plot(e){const r=this.track();let a=null;return r&&(a=r.plot(e)),e==null?a:this}track(){return this.reference("href")}}Je({Container:{textPath:Et(function(t,e){return t instanceof Qn||(t=this.text(t)),t.path(e)})},Text:{path:Et(function(t,e=!0){const r=new S1;let a;if(t instanceof ud||(t=this.defs().path(t)),r.attr("href","#"+t,Wd),e)for(;a=this.node.firstChild;)r.node.appendChild(a);return this.put(r)}),textPath(){return this.findOne("textPath")}},Path:{text:Et(function(t){return t instanceof Qn||(t=new Qn().addTo(this.parent()).text(t)),t.path(this)}),targets(){return rc("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),S1.prototype.MorphArray=Zn,ct(S1,"TextPath");class RD extends hn{constructor(e,r=e){super(Pt("use",e),r)}use(e,r){return this.attr("href",(r||"")+"#"+e,Wd)}}Je({Container:{use:Et(function(t,e){return this.put(new RD).use(t,e)})}}),ct(RD,"Use");const ZG=pa;Ie([mj,gj,Yg,mf,Ug],Aa("viewbox")),Ie([vo,jo,wo,ud],Aa("marker")),Ie(Qn,Aa("Text")),Ie(ud,Aa("Path")),Ie(I0,Aa("Defs")),Ie([Qn,Xg],Aa("Tspan")),Ie([Wg,$g,Vh,nn],Aa("radius")),Ie(Zf,Aa("EventTarget")),Ie(yl,Aa("Dom")),Ie(Qr,Aa("Element")),Ie(hn,Aa("Shape")),Ie([ya,ZR],Aa("Container")),Ie(Vh,Aa("Gradient")),Ie(nn,Aa("Runner")),Uo.extend([...new Set(_R)]),function(t=[]){pj.push(...[].concat(t))}([Ve,St,ir,ze,Wo,vl,Zn,gt]),Ie(pj,{to(t){return new po().type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,r,a,n){return this.fromArray(t.map(function(i,l){return a.step(i,e[l],r,n[l],n)}))}});class Bt extends Qr{constructor(e){super(Pt("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 rc('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class lN extends Qr{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 Sn=t=>function(...e){for(let r=t.length;r--;)e[r]!=null&&this.attr(t[r],e[r])},QG={blend:Sn(["in","in2","mode"]),colorMatrix:Sn(["type","values"]),composite:Sn(["in","in2","operator"]),convolveMatrix:function(t){t=new Wo(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Sn(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Sn(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Sn(["in","dx","dy","stdDeviation"]),flood:Sn(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,Wd)},morphology:Sn(["operator","radius"]),offset:Sn(["dx","dy"]),specularLighting:Sn(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Sn([]),turbulence:Sn(["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=Yd(t),r=QG[t];Bt[e+"Effect"]=class extends lN{constructor(a){super(Pt("fe"+e,a),a)}update(a){return r.apply(this,a),this}},Bt.prototype[t]=Et(function(a,...n){const i=new Bt[e+"Effect"];return a==null?this.put(i):(typeof a=="function"?a.call(i,i):n.unshift(a),this.put(i).update(n))})}),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=Yd(t);Bt[e]=class extends lN{constructor(r){super(Pt("fe"+e,r),r)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=Bt[Yd(t)],r=Et(function(){return this.put(new e)});Bt.ComponentTransferEffect.prototype[t]=r});["distantLight","pointLight","spotLight"].forEach(t=>{const e=Bt[Yd(t)],r=Et(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(I0,{filter:function(t){const e=this.put(new Bt);return typeof t=="function"&&t.call(e,e),e}}),Ie(ya,{filter:function(t){return this.defs().filter(t)}}),Ie(Qr,{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 JG={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,a){return this.parent()&&this.parent().diffuseLighting(t,r,a).in(this)},displacementMap:function(t,e,r,a){return this.parent()&&this.parent().displacementMap(this,t,e,r,a)},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,a,n){return this.parent()&&this.parent().specularLighting(t,r,a,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,r,a,n){return this.parent()&&this.parent().turbulence(t,e,r,a,n).in(this)}};Ie(lN,JG),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 Kr=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"getDefaultFilter",value:function(e,r){var a=this.w;e.unfilter(!0),new Bt().size("120%","180%","-5%","-40%"),a.config.chart.dropShadow.enabled&&this.dropShadow(e,a.config.chart.dropShadow,r)}},{key:"applyFilter",value:function(e,r,a){var n,i=this,l=this.w;if(e.unfilter(!0),a!=="none"){var o,c,d=l.config.chart.dropShadow,h=a==="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"}),d.enabled&&i.addShadow(p,r,d,"brightness")}),!d.noUserSpaceOnUse&&((o=e.filterer())===null||o===void 0||(c=o.node)===null||c===void 0||c.setAttribute("filterUnits","userSpaceOnUse")),this._scaleFilterSize((n=e.filterer())===null||n===void 0?void 0:n.node)}else this.getDefaultFilter(e,r)}},{key:"addShadow",value:function(e,r,a,n){var i,l=this.w,o=a.blur,c=a.top,d=a.left,h=a.color,p=a.opacity;if(h=Array.isArray(h)?h[r]:h,((i=l.config.chart.dropShadow.enabledOnSeries)===null||i===void 0?void 0:i.length)>0&&l.config.chart.dropShadow.enabledOnSeries.indexOf(r)===-1)return e;e.offset({in:n,dx:d,dy:c,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:o,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",n])}},{key:"dropShadow",value:function(e,r){var a,n,i,l,o,c=this,d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,h=this.w;return e.unfilter(!0),J.isMsEdge()&&h.config.chart.type==="radialBar"||((a=h.config.chart.dropShadow.enabledOnSeries)===null||a===void 0?void 0:a.length)>0&&((i=h.config.chart.dropShadow.enabledOnSeries)===null||i===void 0?void 0:i.indexOf(d))===-1?e:(e.filterWith(function(p){c.addShadow(p,d,r,"SourceGraphic")}),r.noUserSpaceOnUse||(l=e.filterer())===null||l===void 0||(o=l.node)===null||o===void 0||o.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((n=e.filterer())===null||n===void 0?void 0:n.node),e)}},{key:"setSelectionFilter",value:function(e,r,a){var n=this.w;if(n.globals.selectedDataPoints[r]!==void 0&&n.globals.selectedDataPoints[r].indexOf(a)>-1){e.node.setAttribute("selected",!0);var i=n.config.states.active.filter;i!=="none"&&this.applyFilter(e,r,i.type)}}},{key:"_scaleFilterSize",value:function(e){e&&function(r){for(var a in r)r.hasOwnProperty(a)&&e.setAttribute(a,r[a])}({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 Ce(t,[{key:"roundPathCorners",value:function(e,r){function a(O,_,R){var L=_.x-O.x,z=_.y-O.y,F=Math.sqrt(L*L+z*z);return n(O,_,Math.min(1,R/F))}function n(O,_,R){return{x:O.x+(_.x-O.x)*R,y:O.y+(_.y-O.y)*R}}function i(O,_){O.length>2&&(O[O.length-2]=_.x,O[O.length-1]=_.y)}function l(O){return{x:parseFloat(O[O.length-2]),y:parseFloat(O[O.length-1])}}e.indexOf("NaN")>-1&&(e="");var o=e.split(/[,\s]/).reduce(function(O,_){var R=_.match(/^([a-zA-Z])(.+)/);return R?(O.push(R[1]),O.push(R[2])):O.push(_),O},[]).reduce(function(O,_){return parseFloat(_)==_&&O.length?O[O.length-1].push(_):O.push([_]),O},[]),c=[];if(o.length>1){var d=l(o[0]),h=null;o[o.length-1][0]=="Z"&&o[0].length>2&&(h=["L",d.x,d.y],o[o.length-1]=h),c.push(o[0]);for(var p=1;p<o.length;p++){var m=c[c.length-1],x=o[p],b=x==h?o[1]:o[p+1];if(b&&m&&m.length>2&&x[0]=="L"&&b.length>2&&b[0]=="L"){var y,v,N=l(m),C=l(x),S=l(b);y=a(C,N,r),v=a(C,S,r),i(x,y),x.origPoint=C,c.push(x);var k=n(y,C,.5),A=n(C,v,.5),T=["C",k.x,k.y,A.x,A.y,v.x,v.y];T.origPoint=C,c.push(T)}else c.push(x)}if(h){var M=l(c[c.length-1]);c.push(["Z"]),i(c[0],M)}}else c=o;return c.reduce(function(O,_){return O+_.join(" ")+" "},"")}},{key:"drawLine",value:function(e,r,a,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,o=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:a,y2:n,stroke:i,"stroke-dasharray":l,"stroke-width":o,"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,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,c=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,d=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:a>0?a:0,height:n>0?n:0,rx:i,ry:i,opacity:o,"stroke-width":c!==null?c:0,stroke:d!==null?d:"none","stroke-dasharray":h}),p.node.setAttribute("fill",l),p}},{key:"drawPolygon",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:n,stroke:r,"stroke-width":a})}},{key:"drawCircle",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var a=this.w.globals.dom.Paper.circle(2*e);return r!==null&&a.attr(r),a}},{key:"drawPath",value:function(e){var r=e.d,a=r===void 0?"":r,n=e.stroke,i=n===void 0?"#a8a8a8":n,l=e.strokeWidth,o=l===void 0?1:l,c=e.fill,d=e.fillOpacity,h=d===void 0?1:d,p=e.strokeOpacity,m=p===void 0?1:p,x=e.classes,b=e.strokeLinecap,y=b===void 0?null:b,v=e.strokeDashArray,N=v===void 0?0:v,C=this.w;return y===null&&(y=C.config.stroke.lineCap),(a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a="M 0 ".concat(C.globals.gridHeight)),C.globals.dom.Paper.path(a).attr({fill:c,"fill-opacity":h,stroke:i,"stroke-opacity":m,"stroke-linecap":y,"stroke-width":o,"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 a=["M",e,r].join(" ");return a}},{key:"line",value:function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=null;return a===null?n=[" L",e,r].join(" "):a==="H"?n=[" H",e].join(" "):a==="V"&&(n=[" V",r].join(" ")),n}},{key:"curve",value:function(e,r,a,n,i,l){var o=["C",e,r,a,n,i,l].join(" ");return o}},{key:"quadraticCurve",value:function(e,r,a,n){return["Q",e,r,a,n].join(" ")}},{key:"arc",value:function(e,r,a,n,i,l,o){var c="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(c="a");var d=[c,e,r,a,n,i,l,o].join(" ");return d}},{key:"renderPaths",value:function(e){var r,a=e.j,n=e.realIndex,i=e.pathFrom,l=e.pathTo,o=e.stroke,c=e.strokeWidth,d=e.strokeLinecap,h=e.fill,p=e.animationDelay,m=e.initialSpeed,x=e.dataChangeSpeed,b=e.className,y=e.chartType,v=e.shouldClipToGrid,N=v===void 0||v,C=e.bindEventsOnPaths,S=C===void 0||C,k=e.drawShadow,A=k===void 0||k,T=this.w,M=new Kr(this.ctx),O=new $d(this.ctx),_=this.w.config.chart.animations.enabled,R=_&&this.w.config.chart.animations.dynamicAnimation.enabled;if(i&&i.startsWith("M 0 0")&&l){var L=l.match(/^M\s+[\d.-]+\s+[\d.-]+/);L&&(i=i.replace(/^M\s+0\s+0/,L[0]))}var z=!!(_&&!T.globals.resized||R&&T.globals.dataChanged&&T.globals.shouldAnimate);z?r=i:(r=l,T.globals.animationEnded=!0);var F=T.config.stroke.dashArray,Y=0;Y=Array.isArray(F)?F[n]:T.config.stroke.dashArray;var X=this.drawPath({d:r,stroke:o,strokeWidth:c,fill:h,fillOpacity:1,classes:b,strokeLinecap:d,strokeDashArray:Y});X.attr("index",n),N&&(y==="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&&A&&M.dropShadow(X,T.config.chart.dropShadow,n),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:l,pathFrom:i});var H={el:X,j:a,realIndex:n,pathFrom:i,pathTo:l,fill:h,strokeWidth:c,delay:p};return!_||T.globals.resized||T.globals.dataChanged?!T.globals.resized&&T.globals.dataChanged||O.showDelayedElements():O.animatePathsGradually(ve(ve({},H),{},{speed:m})),T.globals.dataChanged&&R&&z&&O.animatePathsGradually(ve(ve({},H),{},{speed:x})),X}},{key:"drawPattern",value:function(e,r,a){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(r,a,function(l){e==="horizontalLines"?l.line(0,0,a,0).stroke({color:n,width:i+1}):e==="verticalLines"?l.line(0,0,0,r).stroke({color:n,width:i+1}):e==="slantedLines"?l.line(0,0,r,a).stroke({color:n,width:i}):e==="squares"?l.rect(r,a).fill("none").stroke({color:n,width:i}):e==="circles"&&l.circle(r).fill("none").stroke({color:n,width:i})})}},{key:"drawGradient",value:function(e,r,a,n,i){var l,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,d=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,n)),a.length<9&&a.indexOf("#")===0&&(a=J.hexToRgba(a,i));var m=0,x=1,b=1,y=null;c!==null&&(m=c[0]!==void 0?c[0]/100:0,x=c[1]!==void 0?c[1]/100:1,b=c[2]!==void 0?c[2]/100:1,y=c[3]!==void 0?c[3]/100:null);var v=!(p.config.chart.type!=="donut"&&p.config.chart.type!=="pie"&&p.config.chart.type!=="polarArea"&&p.config.chart.type!=="bubble");if(l=d&&d.length!==0?p.globals.dom.Paper.gradient(v?"radial":"linear",function(S){(Array.isArray(d[h])?d[h]:d).forEach(function(k){S.stop(k.offset/100,k.color,k.opacity)})}):p.globals.dom.Paper.gradient(v?"radial":"linear",function(S){S.stop(m,r,n),S.stop(x,a,i),S.stop(b,a,i),y!==null&&S.stop(y,r,n)}),v){var N=p.globals.gridWidth/2,C=p.globals.gridHeight/2;p.config.chart.type!=="bubble"?l.attr({gradientUnits:"userSpaceOnUse",cx:N,cy:C,r:o}):l.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?l.from(0,0).to(0,1):e==="diagonal"?l.from(0,0).to(1,1):e==="horizontal"?l.from(0,1).to(1,1):e==="diagonal2"&&l.from(1,0).to(0,1);return l}},{key:"getTextBasedOnMaxWidth",value:function(e){var r=e.text,a=e.maxWidth,n=e.fontSize,i=e.fontFamily,l=this.getTextRects(r,n,i),o=l.width/r.length,c=Math.floor(a/o);return a<l.width?r.slice(0,c-3)+"...":r}},{key:"drawText",value:function(e){var r=this,a=e.x,n=e.y,i=e.text,l=e.textAnchor,o=e.fontSize,c=e.fontFamily,d=e.fontWeight,h=e.foreColor,p=e.opacity,m=e.maxWidth,x=e.cssClass,b=x===void 0?"":x,y=e.isPlainText,v=y===void 0||y,N=e.dominantBaseline,C=N===void 0?"auto":N,S=this.w;i===void 0&&(i="");var k=i;l||(l="start"),h&&h.length||(h=S.config.chart.foreColor),c=c||S.config.chart.fontFamily,d=d||"regular";var A,T={maxWidth:m,fontSize:o=o||"11px",fontFamily:c};return Array.isArray(i)?A=S.globals.dom.Paper.text(function(M){for(var O=0;O<i.length;O++)k=i[O],m&&(k=r.getTextBasedOnMaxWidth(ve({text:i[O]},T))),O===0?M.tspan(k):M.tspan(k).newLine()}):(m&&(k=this.getTextBasedOnMaxWidth(ve({text:i},T))),A=v?S.globals.dom.Paper.plain(i):S.globals.dom.Paper.text(function(M){return M.tspan(k)})),A.attr({x:a,y:n,"text-anchor":l,"dominant-baseline":C,"font-size":o,"font-family":c,"font-weight":d,fill:h,class:"apexcharts-text "+b}),A.node.style.fontFamily=c,A.node.style.opacity=p,A}},{key:"getMarkerPath",value:function(e,r,a,n){var i="";switch(a){case"cross":i="M ".concat(e-(n/=1.4)," ").concat(r-n," L ").concat(e+n," ").concat(r+n,"  M ").concat(e-n," ").concat(r+n," L ").concat(e+n," ").concat(r-n);break;case"plus":i="M ".concat(e-(n/=1.12)," ").concat(r," L ").concat(e+n," ").concat(r,"  M ").concat(e," ").concat(r-n," L ").concat(e," ").concat(r+n);break;case"star":case"sparkle":var l=5;n*=1.15,a==="sparkle"&&(n/=1.1,l=4);for(var o=Math.PI/l,c=0;c<=2*l;c++){var d=c*o,h=c%2==0?n:n/2;i+=(c===0?"M":"L")+(e+h*Math.sin(d))+","+(r-h*Math.cos(d))}i+="Z";break;case"triangle":i="M ".concat(e," ").concat(r-n,` 
             L `).concat(e+n," ").concat(r+n,` 
             L `).concat(e-n," ").concat(r+n,` 
             Z`);break;case"square":case"rect":i="M ".concat(e-(n/=1.125)," ").concat(r-n,` 
           L `).concat(e+n," ").concat(r-n,` 
           L `).concat(e+n," ").concat(r+n,` 
           L `).concat(e-n," ").concat(r+n,` 
           Z`);break;case"diamond":n*=1.05,i="M ".concat(e," ").concat(r-n,` 
             L `).concat(e+n," ").concat(r,` 
             L `).concat(e," ").concat(r+n,` 
             L `).concat(e-n," ").concat(r,` 
            Z`);break;case"line":i="M ".concat(e-(n/=1.1)," ").concat(r,` 
           L `).concat(e+n," ").concat(r);break;default:n*=2,i="M ".concat(e,", ").concat(r,` 
           m -`).concat(n/2,`, 0 
           a `).concat(n/2,",").concat(n/2," 0 1,0 ").concat(n,`,0 
           a `).concat(n/2,",").concat(n/2," 0 1,0 -").concat(n,",0")}return i}},{key:"drawMarkerShape",value:function(e,r,a,n,i){var l=this.drawPath({d:this.getMarkerPath(e,r,a,n,i),stroke:i.pointStrokeColor,strokeDashArray:i.pointStrokeDashArray,strokeWidth:i.pointStrokeWidth,fill:i.pointFillColor,fillOpacity:i.pointFillOpacity,strokeOpacity:i.pointStrokeOpacity});return l.attr({cx:e,cy:r,shape:i.shape,class:i.class?i.class:""}),l}},{key:"drawMarker",value:function(e,r,a){e=e||0;var n=a.pSize||0;return J.isNumber(r)||(n=0,r=0),this.drawMarkerShape(e,r,a?.shape,n,ve(ve({},a),a.shape==="line"||a.shape==="plus"||a.shape==="cross"?{pointStrokeColor:a.pointFillColor,pointStrokeOpacity:a.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,r){var a=this.w,n=new Kr(this.ctx),i=parseInt(e.node.getAttribute("index"),10),l=parseInt(e.node.getAttribute("j"),10);if(typeof a.config.chart.events.dataPointMouseEnter=="function"&&a.config.chart.events.dataPointMouseEnter(r,this.ctx,{seriesIndex:i,dataPointIndex:l,w:a}),this.ctx.events.fireEvent("dataPointMouseEnter",[r,this.ctx,{seriesIndex:i,dataPointIndex:l,w:a}]),(a.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&a.config.states.hover.filter.type!=="none"&&!a.globals.isTouchDevice){var o=a.config.states.hover.filter;n.applyFilter(e,i,o.type)}}},{key:"pathMouseLeave",value:function(e,r){var a=this.w,n=new Kr(this.ctx),i=parseInt(e.node.getAttribute("index"),10),l=parseInt(e.node.getAttribute("j"),10);typeof a.config.chart.events.dataPointMouseLeave=="function"&&a.config.chart.events.dataPointMouseLeave(r,this.ctx,{seriesIndex:i,dataPointIndex:l,w:a}),this.ctx.events.fireEvent("dataPointMouseLeave",[r,this.ctx,{seriesIndex:i,dataPointIndex:l,w:a}]),a.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||a.config.states.hover.filter.type!=="none"&&n.getDefaultFilter(e,i)}},{key:"pathMouseDown",value:function(e,r){var a=this.w,n=new Kr(this.ctx),i=parseInt(e.node.getAttribute("index"),10),l=parseInt(e.node.getAttribute("j"),10),o="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),a.globals.selectedDataPoints[i].indexOf(l)>-1){var c=a.globals.selectedDataPoints[i].indexOf(l);a.globals.selectedDataPoints[i].splice(c,1)}}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.globals.selectedDataPoints.length>0){a.globals.selectedDataPoints=[];var d=a.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=a.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),p=function(b){Array.prototype.forEach.call(b,function(y){y.node.setAttribute("selected","false"),n.getDefaultFilter(y,i)})};p(d),p(h)}e.node.setAttribute("selected","true"),o="true",a.globals.selectedDataPoints[i]===void 0&&(a.globals.selectedDataPoints[i]=[]),a.globals.selectedDataPoints[i].push(l)}if(o==="true"){var m=a.config.states.active.filter;if(m!=="none")n.applyFilter(e,i,m.type);else if(a.config.states.hover.filter!=="none"&&!a.globals.isTouchDevice){var x=a.config.states.hover.filter;n.applyFilter(e,i,x.type)}}else a.config.states.active.filter.type!=="none"&&(a.config.states.hover.filter.type==="none"||a.globals.isTouchDevice?n.getDefaultFilter(e,i):(x=a.config.states.hover.filter,n.applyFilter(e,i,x.type)));typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(r,this.ctx,{selectedDataPoints:a.globals.selectedDataPoints,seriesIndex:i,dataPointIndex:l,w:a}),r&&this.ctx.events.fireEvent("dataPointSelection",[r,this.ctx,{selectedDataPoints:a.globals.selectedDataPoints,seriesIndex:i,dataPointIndex:l,w:a}])}},{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,a,n){var i=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],l=this.w,o=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:r,fontFamily:a,foreColor:"#fff",opacity:0});n&&o.attr("transform",n),l.globals.dom.Paper.add(o);var c=o.bbox();return i||(c=o.node.getBoundingClientRect()),o.remove(),{width:c.width,height:c.height}}},{key:"placeTextWithEllipsis",value:function(e,r,a){if(typeof e.getComputedTextLength=="function"&&(e.textContent=r,r.length>0&&e.getComputedTextLength()>=a/1.1)){for(var n=r.length-3;n>0;n-=3)if(e.getSubStringLength(0,n)<=a/1.1)return void(e.textContent=r.substring(0,n)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,r){for(var a in r)r.hasOwnProperty(a)&&e.setAttribute(a,r[a])}}]),t}(),or=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=this.w,a=[];if(r.globals.series.length===0)return a;for(var n=0;n<r.globals.series[r.globals.maxValsInArrayIndex].length;n++){for(var i=0,l=0;l<r.globals.series.length;l++)r.globals.series[l][n]!==void 0&&e.indexOf(l)===-1&&(i+=r.globals.series[l][n]);a.push(i)}return a}},{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,a){return r+a},0):this.w.globals.series[e].reduce(function(r,a){return r+a},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,r=this.w,a=[];return r.globals.seriesGroups.forEach(function(n){var i=[];r.config.series.forEach(function(o,c){n.indexOf(r.globals.seriesNames[c])>-1&&i.push(c)});var l=r.globals.series.map(function(o,c){return i.indexOf(c)===-1?c:-1}).filter(function(o){return o!==-1});a.push(e.getStackedSeriesTotals(l))}),a}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,r=this.w.config,a=[],n=[],i=[],l=e.series.length>r.yaxis.length||r.yaxis.some(function(p){return Array.isArray(p.seriesName)});r.series.forEach(function(p,m){i.push(m),n.push(null)}),r.yaxis.forEach(function(p,m){a[m]=[]});var o=[];r.yaxis.forEach(function(p,m){var x=!1;if(p.seriesName){var b=[];Array.isArray(p.seriesName)?b=p.seriesName:b.push(p.seriesName),b.forEach(function(y){r.series.forEach(function(v,N){if(v.name===y){var C=N;m===N||l?!l||i.indexOf(N)>-1?a[m].push([m,N]):console.warn("Series '"+v.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."):(a[N].push([N,m]),C=m),x=!0,(C=i.indexOf(C))!==-1&&i.splice(C,1)}})})}x||o.push(m)}),a=a.map(function(p,m){var x=[];return p.forEach(function(b){n[b[1]]=b[0],x.push(b[1])}),x});for(var c=r.yaxis.length-1,d=0;d<o.length&&(c=o[d],a[c]=[],i);d++){var h=i[0];i.shift(),a[c].push(h),n[h]=c}i.forEach(function(p){a[c].push(p),n[p]=c}),e.seriesYAxisMap=a.map(function(p){return p}),e.seriesYAxisReverseMap=n.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,a,n){return r===n[0]})}},{key:"getCategoryLabels",value:function(e){var r=this.w,a=e.slice();return r.config.xaxis.convertedCatToNumeric&&(a=e.map(function(n,i){return r.config.xaxis.labels.formatter(n-r.globals.minX+1)})),a}},{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(a){r=Math.max(r,a)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(a){r=Math.max(r,a.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,a){var n=0;if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=r[i];else n+=r;return n})}},{key:"getSeriesTotalsXRange",value:function(e,r){var a=this.w;return a.globals.series.map(function(n,i){for(var l=0,o=0;o<n.length;o++)a.globals.seriesX[i][o]>e&&a.globals.seriesX[i][o]<r&&(l+=n[o]);return l})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(r,a){var n=[];if(Array.isArray(r))for(var i=0;i<r.length;i++){var l=e.globals.stackedSeriesTotals[i],o=0;l&&(o=100*r[i]/l),n.push(o)}else{var c=100*r/e.globals.seriesTotals.reduce(function(d,h){return d+h},0);n.push(c)}return n})}},{key:"getCalculatedRatios",value:function(){var e,r,a,n=this,i=this.w,l=i.globals,o=[],c=0,d=[],h=.1,p=0;if(l.yRange=[],l.isMultipleYAxis)for(var m=0;m<l.minYArr.length;m++)l.yRange.push(Math.abs(l.minYArr[m]-l.maxYArr[m])),d.push(0);else l.yRange.push(Math.abs(l.minY-l.maxY));l.xRange=Math.abs(l.maxX-l.minX),l.zRange=Math.abs(l.maxZ-l.minZ);for(var x=0;x<l.yRange.length;x++)o.push(l.yRange[x]/l.gridHeight);if(r=l.xRange/l.gridWidth,e=l.yRange/l.gridWidth,a=l.xRange/l.gridHeight,(c=l.zRange/l.gridHeight*16)||(c=1),l.minY!==Number.MIN_VALUE&&Math.abs(l.minY)!==0&&(l.hasNegs=!0),i.globals.seriesYAxisReverseMap.length>0){var b=function(v,N){var C=i.config.yaxis[i.globals.seriesYAxisReverseMap[N]],S=v<0?-1:1;return v=Math.abs(v),C.logarithmic&&(v=n.getBaseLog(C.logBase,v)),-S*v/o[N]};if(l.isMultipleYAxis){d=[];for(var y=0;y<o.length;y++)d.push(b(l.minYArr[y],y))}else(d=[]).push(b(l.minY,0)),l.minY!==Number.MIN_VALUE&&Math.abs(l.minY)!==0&&(h=-l.minY/e,p=l.minX/r)}else(d=[]).push(0),h=0,p=0;return{yRatio:o,invertedYRatio:e,zRatio:c,xRatio:r,invertedXRatio:a,baseLineInvertedY:h,baseLineY:d,baseLineX:p}}},{key:"getLogSeries",value:function(e){var r=this,a=this.w;return a.globals.seriesLog=e.map(function(n,i){var l=a.globals.seriesYAxisReverseMap[i];return a.config.yaxis[l]&&a.config.yaxis[l].logarithmic?n.map(function(o){return o===null?null:r.getLogVal(a.config.yaxis[l].logBase,o,i)}):n}),a.globals.invalidLogScale?e:a.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(e,r){if(e===null)return null;var a=this.w,n=a.globals.seriesYAxisReverseMap[r];return a.config.yaxis[n]&&a.config.yaxis[n].logarithmic?this.getLogVal(a.config.yaxis[n].logBase,e,r):e}},{key:"getBaseLog",value:function(e,r){return Math.log(r)/Math.log(e)}},{key:"getLogVal",value:function(e,r,a){if(r<=0)return 0;var n=this.w,i=n.globals.minYArr[a]===0?-1:this.getBaseLog(e,n.globals.minYArr[a]),l=(n.globals.maxYArr[a]===0?0:this.getBaseLog(e,n.globals.maxYArr[a]))-i;return r<1?r/l:(this.getBaseLog(e,r)-i)/l}},{key:"getLogYRatios",value:function(e){var r=this,a=this.w,n=this.w.globals;return n.yLogRatio=e.slice(),n.logYRange=n.yRange.map(function(i,l){var o=a.globals.seriesYAxisReverseMap[l];if(a.config.yaxis[o]&&r.w.config.yaxis[o].logarithmic){var c,d=-Number.MAX_VALUE,h=Number.MIN_VALUE;return n.seriesLog.forEach(function(p,m){p.forEach(function(x){a.config.yaxis[m]&&a.config.yaxis[m].logarithmic&&(d=Math.max(x,d),h=Math.min(x,h))})}),c=Math.pow(n.yRange[l],Math.abs(h-d)/n.yRange[l]),n.yLogRatio[l]=c/n.gridHeight,c}}),n.invalidLogScale?e.slice():n.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,r,a,n){var i=this.w,l=[];return e.series.length>0&&r.forEach(function(o){var c=[],d=[];e.i.forEach(function(h,p){i.config.series[h].group===o&&(c.push(e.series[p]),d.push(h))}),c.length>0&&l.push(n.draw(c,a,d))}),l}}],[{key:"checkComboSeries",value:function(e,r){var a=!1,n=0,i=0;return r===void 0&&(r="line"),e.length&&e[0].type!==void 0&&e.forEach(function(l){l.type!=="bar"&&l.type!=="column"&&l.type!=="candlestick"&&l.type!=="boxPlot"||n++,l.type!==void 0&&l.type!==r&&i++}),i>0&&(a=!0),{comboBarCount:n,comboCharts:a}}},{key:"extendArrayProps",value:function(e,r,a){var n,i,l,o,c,d;return(n=r)!==null&&n!==void 0&&n.yaxis&&(r=e.extendYAxis(r,a)),(i=r)!==null&&i!==void 0&&i.annotations&&(r.annotations.yaxis&&(r=e.extendYAxisAnnotations(r)),(l=r)!==null&&l!==void 0&&(o=l.annotations)!==null&&o!==void 0&&o.xaxis&&(r=e.extendXAxisAnnotations(r)),(c=r)!==null&&c!==void 0&&(d=c.annotations)!==null&&d!==void 0&&d.points&&(r=e.extendPointAnnotations(r))),r}}]),t}(),F0=function(){function t(e){Se(this,t),this.w=e.w,this.annoCtx=e}return Ce(t,[{key:"setOrientations",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=this.w;if(e.label.orientation==="vertical"){var n=r!==null?r:0,i=a.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(n,"']"));if(i!==null){var l=i.getBoundingClientRect();i.setAttribute("x",parseFloat(i.getAttribute("x"))-l.height+4);var o=e.label.position==="top"?l.width:-l.width;i.setAttribute("y",parseFloat(i.getAttribute("y"))+o);var c=this.annoCtx.graphics.rotateAroundCenter(i),d=c.x,h=c.y;i.setAttribute("transform","rotate(-90 ".concat(d," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(e,r){var a=this.w;if(!e||!r.label.text||!String(r.label.text).trim())return null;var n=a.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),i=e.getBoundingClientRect(),l=r.label.style.padding,o=l.left,c=l.right,d=l.top,h=l.bottom;if(r.label.orientation==="vertical"){var p=[o,c,d,h];d=p[0],h=p[1],o=p[2],c=p[3]}var m=i.left-n.left-o,x=i.top-n.top-d,b=this.annoCtx.graphics.drawRect(m-a.globals.barPadForNumericAxis,x,i.width+o+c,i.height+d+h,r.label.borderRadius,r.label.style.background,1,r.label.borderWidth,r.label.borderColor,0);return r.id&&b.node.classList.add(r.id),b}},{key:"annotationsBackground",value:function(){var e=this,r=this.w,a=function(n,i,l){var o=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(l,"-annotations .apexcharts-").concat(l,"-annotation-label[rel='").concat(i,"']"));if(o){var c=o.parentNode,d=e.addBackgroundToAnno(o,n);d&&(c.insertBefore(d.node,o),n.label.mouseEnter&&d.node.addEventListener("mouseenter",n.label.mouseEnter.bind(e,n)),n.label.mouseLeave&&d.node.addEventListener("mouseleave",n.label.mouseLeave.bind(e,n)),n.label.click&&d.node.addEventListener("click",n.label.click.bind(e,n)))}};r.config.annotations.xaxis.forEach(function(n,i){return a(n,i,"xaxis")}),r.config.annotations.yaxis.forEach(function(n,i){return a(n,i,"yaxis")}),r.config.annotations.points.forEach(function(n,i){return a(n,i,"point")})}},{key:"getY1Y2",value:function(e,r){var a,n=this.w,i=e==="y1"?r.y:r.y2,l=!1;if(this.annoCtx.invertAxis){var o=n.config.xaxis.convertedCatToNumeric?n.globals.categoryLabels:n.globals.labels,c=o.indexOf(i),d=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(c+1,")"));a=d?parseFloat(d.getAttribute("y")):(n.globals.gridHeight/o.length-1)*(c+1)-n.globals.barHeight,r.seriesIndex!==void 0&&n.globals.barHeight&&(a-=n.globals.barHeight/2*(n.globals.series.length-1)-n.globals.barHeight*r.seriesIndex)}else{var h,p=n.globals.seriesYAxisMap[r.yAxisIndex][0],m=n.config.yaxis[r.yAxisIndex].logarithmic?new or(this.annoCtx.ctx).getLogVal(n.config.yaxis[r.yAxisIndex].logBase,i,p)/n.globals.yLogRatio[p]:(i-n.globals.minYArr[p])/(n.globals.yRange[p]/n.globals.gridHeight);a=n.globals.gridHeight-Math.min(Math.max(m,0),n.globals.gridHeight),l=m>n.globals.gridHeight||m<0,!r.marker||r.y!==void 0&&r.y!==null||(a=0),(h=n.config.yaxis[r.yAxisIndex])!==null&&h!==void 0&&h.reversed&&(a=m)}return typeof i=="string"&&i.includes("px")&&(a=parseFloat(i)),{yP:a,clipped:l}}},{key:"getX1X2",value:function(e,r){var a=this.w,n=e==="x1"?r.x:r.x2,i=this.annoCtx.invertAxis?a.globals.minY:a.globals.minX,l=this.annoCtx.invertAxis?a.globals.maxY:a.globals.maxX,o=this.annoCtx.invertAxis?a.globals.yRange[0]:a.globals.xRange,c=!1,d=this.annoCtx.inversedReversedAxis?(l-n)/(o/a.globals.gridWidth):(n-i)/(o/a.globals.gridWidth);return a.config.xaxis.type!=="category"&&!a.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||a.globals.dataFormatXNumeric||a.config.chart.sparkline.enabled||(d=this.getStringX(n)),typeof n=="string"&&n.includes("px")&&(d=parseFloat(n)),n==null&&r.marker&&(d=a.globals.gridWidth),r.seriesIndex!==void 0&&a.globals.barWidth&&!this.annoCtx.invertAxis&&(d-=a.globals.barWidth/2*(a.globals.series.length-1)-a.globals.barWidth*r.seriesIndex),typeof d!="number"&&(d=0,c=!0),parseFloat(d.toFixed(10))>parseFloat(a.globals.gridWidth.toFixed(10))?(d=a.globals.gridWidth,c=!0):d<0&&(d=0,c=!0),{x:d,clipped:c}}},{key:"getStringX",value:function(e){var r=this.w,a=e;r.config.xaxis.convertedCatToNumeric&&r.globals.categoryLabels.length&&(e=r.globals.categoryLabels.indexOf(e)+1);var n=r.globals.labels.map(function(l){return Array.isArray(l)?l.join(" "):l}).indexOf(e),i=r.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(n+1,")"));return i&&(a=parseFloat(i.getAttribute("x"))),a}}]),t}(),eK=function(){function t(e){Se(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new F0(this.annoCtx)}return Ce(t,[{key:"addXaxisAnnotation",value:function(e,r,a){var n,i=this.w,l=this.helpers.getX1X2("x1",e),o=l.x,c=l.clipped,d=!0,h=e.label.text,p=e.strokeDashArray;if(J.isNumber(o)){if(e.x2===null||e.x2===void 0){if(!c){var m=this.annoCtx.graphics.drawLine(o+e.offsetX,0+e.offsetY,o+e.offsetX,i.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(n=x.x,d=x.clipped,n<o){var b=o;o=n,n=b}var y=this.annoCtx.graphics.drawRect(o+e.offsetX,0+e.offsetY,n-o,i.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,p);y.node.classList.add("apexcharts-annotation-rect"),y.attr("clip-path","url(#gridRectMask".concat(i.globals.cuid,")")),r.appendChild(y.node),e.id&&y.node.classList.add(e.id)}if(!c||!d){var v=this.annoCtx.graphics.getTextRects(h,parseFloat(e.label.style.fontSize)),N=e.label.position==="top"?4:e.label.position==="center"?i.globals.gridHeight/2+(e.label.orientation==="vertical"?v.width/2:0):i.globals.gridHeight,C=this.annoCtx.graphics.drawText({x:o+e.label.offsetX,y:N+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?v.width/2-12:-v.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:"")});C.attr({rel:a}),r.appendChild(C.node),this.annoCtx.helpers.setOrientations(e,a)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,r=this.w,a=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return r.config.annotations.xaxis.map(function(n,i){e.addXaxisAnnotation(n,a.node,i)}),a}}]),t}(),qr=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 Ce(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 a=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return a=this.getTimeStamp(a)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,r){var a=this.w.globals.locale,n=this.w.config.xaxis.labels.datetimeUTC,i=["\0"].concat(Ar(a.months)),l=[""].concat(Ar(a.shortMonths)),o=[""].concat(Ar(a.days)),c=[""].concat(Ar(a.shortDays));function d(O,_){var R=O+"";for(_=_||2;R.length<_;)R="0"+R;return R}var h=n?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=(n?e.getUTCMonth():e.getMonth())+1;r=(r=(r=(r=r.replace(/(^|[^\\])MMMM+/g,"$1"+i[0])).replace(/(^|[^\\])MMM/g,"$1"+l[0])).replace(/(^|[^\\])MM/g,"$1"+d(p))).replace(/(^|[^\\])M/g,"$1"+p);var m=n?e.getUTCDate():e.getDate();r=(r=(r=(r=r.replace(/(^|[^\\])dddd+/g,"$1"+o[0])).replace(/(^|[^\\])ddd/g,"$1"+c[0])).replace(/(^|[^\\])dd/g,"$1"+d(m))).replace(/(^|[^\\])d/g,"$1"+m);var x=n?e.getUTCHours():e.getHours(),b=x>12?x-12:x===0?12:x;r=(r=(r=(r=r.replace(/(^|[^\\])HH+/g,"$1"+d(x))).replace(/(^|[^\\])H/g,"$1"+x)).replace(/(^|[^\\])hh+/g,"$1"+d(b))).replace(/(^|[^\\])h/g,"$1"+b);var y=n?e.getUTCMinutes():e.getMinutes();r=(r=r.replace(/(^|[^\\])mm+/g,"$1"+d(y))).replace(/(^|[^\\])m/g,"$1"+y);var v=n?e.getUTCSeconds():e.getSeconds();r=(r=r.replace(/(^|[^\\])ss+/g,"$1"+d(v))).replace(/(^|[^\\])s/g,"$1"+v);var N=n?e.getUTCMilliseconds():e.getMilliseconds();r=r.replace(/(^|[^\\])fff+/g,"$1"+d(N,3)),N=Math.round(N/10),r=r.replace(/(^|[^\\])ff/g,"$1"+d(N)),N=Math.round(N/10);var C=x<12?"AM":"PM";r=(r=(r=r.replace(/(^|[^\\])f/g,"$1"+N)).replace(/(^|[^\\])TT+/g,"$1"+C)).replace(/(^|[^\\])T/g,"$1"+C.charAt(0));var S=C.toLowerCase();r=(r=r.replace(/(^|[^\\])tt+/g,"$1"+S)).replace(/(^|[^\\])t/g,"$1"+S.charAt(0));var k=-e.getTimezoneOffset(),A=n||!k?"Z":k>0?"+":"-";if(!n){var T=(k=Math.abs(k))%60;A+=d(Math.floor(k/60))+":"+d(T)}r=r.replace(/(^|[^\\])K/g,"$1"+A);var M=(n?e.getUTCDay():e.getDay())+1;return r=(r=(r=(r=(r=r.replace(new RegExp(o[0],"g"),o[M])).replace(new RegExp(c[0],"g"),c[M])).replace(new RegExp(i[0],"g"),i[p])).replace(new RegExp(l[0],"g"),l[p])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,r,a){var n=this.w;n.config.xaxis.min!==void 0&&(e=n.config.xaxis.min),n.config.xaxis.max!==void 0&&(r=n.config.xaxis.max);var i=this.getDate(e),l=this.getDate(r),o=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),c=this.formatDate(l,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(c[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(c[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(c[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(c[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(c[2],10),minMonth:parseInt(o[1],10)-1,maxMonth:parseInt(c[1],10)-1,minYear:parseInt(o[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,a){return this.determineDaysOfMonths(e,r)-a}},{key:"determineDaysOfYear",value:function(e){var r=365;return this.isLeapYear(e)&&(r=366),r}},{key:"determineRemainingDaysOfYear",value:function(e,r,a){var n=this.daysCntOfYear[r]+a;return r>1&&this.isLeapYear()&&n++,n}},{key:"determineDaysOfMonths",value:function(e,r){var a=30;switch(e=J.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(a=this.isLeapYear(r)?29:28);break;case this.months31.indexOf(e)>-1:default:a=31}return a}}]),t}(),Jf=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return Ce(t,[{key:"xLabelFormat",value:function(e,r,a,n){var i=this.w;if(i.config.xaxis.type==="datetime"&&i.config.xaxis.labels.formatter===void 0&&i.config.tooltip.x.formatter===void 0){var l=new qr(this.ctx);return l.formatDate(l.getDate(r),i.config.tooltip.x.format)}return e(r,a,n)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(r){return r}):e}},{key:"defaultYFormatter",value:function(e,r,a){var n=this.w;if(J.isNumber(e))if(n.globals.yValueDecimal!==0)e=e.toFixed(r.decimalsInFloat!==void 0?r.decimalsInFloat:n.globals.yValueDecimal);else{var i=e.toFixed(0);e=e==i?i:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,r=this.w;return r.globals.xaxisTooltipFormatter=function(a){return e.defaultGeneralFormatter(a)},r.globals.ttKeyFormatter=function(a){return e.defaultGeneralFormatter(a)},r.globals.ttZFormatter=function(a){return a},r.globals.legendFormatter=function(a){return e.defaultGeneralFormatter(a)},r.config.xaxis.labels.formatter!==void 0?r.globals.xLabelFormatter=r.config.xaxis.labels.formatter:r.globals.xLabelFormatter=function(a){if(J.isNumber(a)){if(!r.config.xaxis.convertedCatToNumeric&&r.config.xaxis.type==="numeric"){if(J.isNumber(r.config.xaxis.decimalsInFloat))return a.toFixed(r.config.xaxis.decimalsInFloat);var n=r.globals.maxX-r.globals.minX;return n>0&&n<100?a.toFixed(1):a.toFixed(0)}return r.globals.isBarHorizontal&&r.globals.maxY-r.globals.minYArr<4?a.toFixed(1):a.toFixed(0)}return a},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(a,n){a.labels.formatter!==void 0?r.globals.yLabelFormatters[n]=a.labels.formatter:r.globals.yLabelFormatters[n]=function(i){return r.globals.xyCharts?Array.isArray(i)?i.map(function(l){return e.defaultYFormatter(l,a,n)}):e.defaultYFormatter(i,a,n):i}}),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(a,n){return a.length>n.length?a:n},0);e.globals.yAxisScale[0].niceMax=r,e.globals.yAxisScale[0].niceMin=r}}}]),t}(),wl=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"getLabel",value:function(e,r,a,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",o=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],c=this.w,d=e[n]===void 0?"":e[n],h=d,p=c.globals.xLabelFormatter,m=c.config.xaxis.labels.formatter,x=!1,b=new Jf(this.ctx),y=d;o&&(h=b.xLabelFormat(p,d,y,{i:n,dateFormatter:new qr(this.ctx).formatDate,w:c}),m!==void 0&&(h=m(d,e[n],{i:n,dateFormatter:new qr(this.ctx).formatDate,w:c})));var v,N;r.length>0?(v=r[n].unit,N=null,r.forEach(function(A){A.unit==="month"?N="year":A.unit==="day"?N="month":A.unit==="hour"?N="day":A.unit==="minute"&&(N="hour")}),x=N===v,a=r[n].position,h=r[n].value):c.config.xaxis.type==="datetime"&&m===void 0&&(h=""),h===void 0&&(h=""),h=Array.isArray(h)?h:h.toString();var C=new ge(this.ctx),S={};S=c.globals.rotateXLabels&&o?C.getTextRects(h,parseInt(l,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):C.getTextRects(h,parseInt(l,10));var k=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&(String(h)==="NaN"||i.indexOf(h)>=0&&k)&&(h=""),{x:a,text:h,textRect:S,isBold:x}}},{key:"checkLabelBasedOnTickamount",value:function(e,r,a){var n=this.w,i=n.config.xaxis.tickAmount;return i==="dataPoints"&&(i=Math.round(n.globals.gridWidth/120)),i>a||e%Math.round(a/(i+1))==0||(r.text=""),r}},{key:"checkForOverflowingLabels",value:function(e,r,a,n,i){var l=this.w;if(e===0&&l.globals.skipFirstTimelinelabel&&(r.text=""),e===a-1&&l.globals.skipLastTimelinelabel&&(r.text=""),l.config.xaxis.labels.hideOverlappingLabels&&n.length>0){var o=i[i.length-1];if(l.config.xaxis.labels.trim&&l.config.xaxis.type!=="datetime")return r;r.x<o.textRect.width/(l.globals.rotateXLabels?Math.abs(l.config.xaxis.labels.rotate)/12:1.01)+o.x&&(r.text="")}return r}},{key:"checkForReversedLabels",value:function(e,r){var a=this.w;return a.config.yaxis[e]&&a.config.yaxis[e].reversed&&r.reverse(),r}},{key:"yAxisAllSeriesCollapsed",value:function(e){var r=this.w.globals;return!r.seriesYAxisMap[e].some(function(a){return r.collapsedSeriesIndices.indexOf(a)===-1})}},{key:"translateYAxisIndex",value:function(e){var r=this.w,a=r.globals,n=r.config.yaxis;return a.series.length>n.length||n.some(function(i){return Array.isArray(i.seriesName)})?e:a.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var r=this.w,a=r.config.yaxis[e];if(!a.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!a.showForNullSeries){var n=r.globals.seriesYAxisMap[e],i=new or(this.ctx);return n.every(function(l){return i.isSeriesNull(l)})}return!1}},{key:"getYAxisForeColor",value:function(e,r){var a=this.w;return Array.isArray(e)&&a.globals.yAxisScale[r]&&this.ctx.theme.pushExtraColors(e,a.globals.yAxisScale[r].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,r,a,n,i,l,o){var c=this.w,d=new ge(this.ctx),h=c.globals.translateY+c.config.yaxis[i].labels.offsetY;if(c.globals.isBarHorizontal?h=0:c.config.chart.type==="heatmap"&&(h+=l/2),n.show&&r>0){c.config.yaxis[i].opposite===!0&&(e+=n.width);for(var p=r;p>=0;p--){var m=d.drawLine(e+a.offsetX-n.width+n.offsetX,h+n.offsetY,e+a.offsetX+n.offsetX,h+n.offsetY,n.color);o.add(m),h+=l}}}}]),t}(),tK=function(){function t(e){Se(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new F0(this.annoCtx),this.axesUtils=new wl(this.annoCtx)}return Ce(t,[{key:"addYaxisAnnotation",value:function(e,r,a){var n,i=this.w,l=e.strokeDashArray,o=this.helpers.getY1Y2("y1",e),c=o.yP,d=o.clipped,h=!0,p=!1,m=e.label.text;if(e.y2===null||e.y2===void 0){if(!d){p=!0;var x=this.annoCtx.graphics.drawLine(0+e.offsetX,c+e.offsetY,this._getYAxisAnnotationWidth(e),c+e.offsetY,e.borderColor,l,e.borderWidth);r.appendChild(x.node),e.id&&x.node.classList.add(e.id)}}else{if(n=(o=this.helpers.getY1Y2("y2",e)).yP,h=o.clipped,n>c){var b=c;c=n,n=b}if(!d||!h){p=!0;var y=this.annoCtx.graphics.drawRect(0+e.offsetX,n+e.offsetY,this._getYAxisAnnotationWidth(e),c-n,0,e.fillColor,e.opacity,1,e.borderColor,l);y.node.classList.add("apexcharts-annotation-rect"),y.attr("clip-path","url(#gridRectMask".concat(i.globals.cuid,")")),r.appendChild(y.node),e.id&&y.node.classList.add(e.id)}}if(p){var v=e.label.position==="right"?i.globals.gridWidth:e.label.position==="center"?i.globals.gridWidth/2:0,N=this.annoCtx.graphics.drawText({x:v+e.label.offsetX,y:(n??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:a}),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,a=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return r.config.annotations.yaxis.forEach(function(n,i){n.yAxisIndex=e.axesUtils.translateYAxisIndex(n.yAxisIndex),e.axesUtils.isYAxisHidden(n.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(n.yAxisIndex)||e.addYaxisAnnotation(n,a.node,i)}),a}}]),t}(),rK=function(){function t(e){Se(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new F0(this.annoCtx)}return Ce(t,[{key:"addPointAnnotation",value:function(e,r,a){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var n=this.helpers.getX1X2("x1",e),i=n.x,l=n.clipped,o=(n=this.helpers.getY1Y2("y1",e)).yP,c=n.clipped;if(J.isNumber(i)&&!c&&!l){var d={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(i+e.marker.offsetX,o+e.marker.offsetY,d);r.appendChild(h.node);var p=e.label.text?e.label.text:"",m=this.annoCtx.graphics.drawText({x:i+e.label.offsetX,y:o+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:a}),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(i+e.customSVG.offsetX,", ").concat(o+e.customSVG.offsetY,")")}),x.node.innerHTML=e.customSVG.SVG,r.appendChild(x.node)}if(e.image.path){var b=e.image.width?e.image.width:20,y=e.image.height?e.image.height:20;h=this.annoCtx.addImage({x:i+e.image.offsetX-b/2,y:o+e.image.offsetY-y/2,width:b,height:y,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,a=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return r.config.annotations.points.map(function(n,i){e.addPointAnnotation(n,a.node,i)}),a}}]),t}(),l_={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"}}},bo=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 Ce(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:[l_],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,a){return r+a},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,a){return r+a},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}(),aK=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 F0(this),this.xAxisAnnotations=new eK(this),this.yAxisAnnotations=new tK(this),this.pointsAnnotations=new rK(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 Ce(t,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var r=this.yAxisAnnotations.drawYAxisAnnotations(),a=this.xAxisAnnotations.drawXAxisAnnotations(),n=this.pointsAnnotations.drawPointAnnotations(),i=e.config.chart.animations.enabled,l=[r,a,n],o=[a.node,r.node,n.node],c=0;c<3;c++)e.globals.dom.elGraphical.add(l[c]),!i||e.globals.resized||e.globals.dataChanged||e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&o[c].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:o[c],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(r,a){e.addImage(r,a)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(r,a){e.addText(r,a)})}},{key:"addXaxisAnnotation",value:function(e,r,a){this.xAxisAnnotations.addXaxisAnnotation(e,r,a)}},{key:"addYaxisAnnotation",value:function(e,r,a){this.yAxisAnnotations.addYaxisAnnotation(e,r,a)}},{key:"addPointAnnotation",value:function(e,r,a){this.pointsAnnotations.addPointAnnotation(e,r,a)}},{key:"addText",value:function(e,r){var a=e.x,n=e.y,i=e.text,l=e.textAnchor,o=e.foreColor,c=e.fontSize,d=e.fontFamily,h=e.fontWeight,p=e.cssClass,m=e.backgroundColor,x=e.borderWidth,b=e.strokeDashArray,y=e.borderRadius,v=e.borderColor,N=e.appendTo,C=N===void 0?".apexcharts-svg":N,S=e.paddingLeft,k=S===void 0?4:S,A=e.paddingRight,T=A===void 0?4:A,M=e.paddingBottom,O=M===void 0?2:M,_=e.paddingTop,R=_===void 0?2:_,L=this.w,z=this.graphics.drawText({x:a,y:n,text:i,textAnchor:l||"start",fontSize:c||"12px",fontWeight:h||"regular",fontFamily:d||L.config.chart.fontFamily,foreColor:o||L.config.chart.foreColor,cssClass:p}),F=L.globals.dom.baseEl.querySelector(C);F&&F.appendChild(z.node);var Y=z.bbox();if(i){var X=this.graphics.drawRect(Y.x-k,Y.y-R,Y.width+k+T,Y.height+O+R,y,m||"transparent",1,x,v,b);F.insertBefore(X.node,z.node)}}},{key:"addImage",value:function(e,r){var a=this.w,n=e.path,i=e.x,l=i===void 0?0:i,o=e.y,c=o===void 0?0:o,d=e.width,h=d===void 0?20:d,p=e.height,m=p===void 0?20:p,x=e.appendTo,b=x===void 0?".apexcharts-svg":x,y=a.globals.dom.Paper.image(n);y.size(h,m).move(l,c);var v=a.globals.dom.baseEl.querySelector(b);return v&&v.appendChild(y.node),y}},{key:"addXaxisAnnotationExternal",value:function(e,r,a){return this.addAnnotationExternal({params:e,pushToMemory:r,context:a,type:"xaxis",contextMethod:a.addXaxisAnnotation}),a}},{key:"addYaxisAnnotationExternal",value:function(e,r,a){return this.addAnnotationExternal({params:e,pushToMemory:r,context:a,type:"yaxis",contextMethod:a.addYaxisAnnotation}),a}},{key:"addPointAnnotationExternal",value:function(e,r,a){return this.invertAxis===void 0&&(this.invertAxis=a.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:r,context:a,type:"point",contextMethod:a.addPointAnnotation}),a}},{key:"addAnnotationExternal",value:function(e){var r=e.params,a=e.pushToMemory,n=e.context,i=e.type,l=e.contextMethod,o=n,c=o.w,d=c.globals.dom.baseEl.querySelector(".apexcharts-".concat(i,"-annotations")),h=d.childNodes.length+1,p=new bo,m=Object.assign({},i==="xaxis"?p.xAxisAnnotation:i==="yaxis"?p.yAxisAnnotation:p.pointAnnotation),x=J.extend(m,r);switch(i){case"xaxis":this.addXaxisAnnotation(x,d,h);break;case"yaxis":this.addYaxisAnnotation(x,d,h);break;case"point":this.addPointAnnotation(x,d,h)}var b=c.globals.dom.baseEl.querySelector(".apexcharts-".concat(i,"-annotations .apexcharts-").concat(i,"-annotation-label[rel='").concat(h,"']")),y=this.helpers.addBackgroundToAnno(b,x);return y&&d.insertBefore(y.node,b),a&&c.globals.memory.methodsToExec.push({context:o,id:x.id?x.id:J.randomId(),method:l,label:"addAnnotation",params:r}),n}},{key:"clearAnnotations",value:function(e){for(var r=e.w,a=r.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),n=r.globals.memory.methodsToExec.length-1;n>=0;n--)r.globals.memory.methodsToExec[n].label!=="addText"&&r.globals.memory.methodsToExec[n].label!=="addAnnotation"||r.globals.memory.methodsToExec.splice(n,1);a=J.listToArray(a),Array.prototype.forEach.call(a,function(i){for(;i.firstChild;)i.removeChild(i.firstChild)})}},{key:"removeAnnotation",value:function(e,r){var a=e.w,n=a.globals.dom.baseEl.querySelectorAll(".".concat(r));n&&(a.globals.memory.methodsToExec.map(function(i,l){i.id===r&&a.globals.memory.methodsToExec.splice(l,1)}),Object.keys(a.config.annotations).forEach(function(i){var l=a.config.annotations[i];Array.isArray(l)&&(a.config.annotations[i]=l.filter(function(o){return o.id!==r}))}),Array.prototype.forEach.call(n,function(i){i.parentElement.removeChild(i)}))}}]),t}(),C1=function(t){var e,r=t.isTimeline,a=t.ctx,n=t.seriesIndex,i=t.dataPointIndex,l=t.y1,o=t.y2,c=t.w,d=c.globals.seriesRangeStart[n][i],h=c.globals.seriesRangeEnd[n][i],p=c.globals.labels[i],m=c.config.series[n].name?c.config.series[n].name:"",x=c.globals.ttKeyFormatter,b=c.config.tooltip.y.title.formatter,y={w:c,seriesIndex:n,dataPointIndex:i,start:d,end:h};typeof b=="function"&&(m=b(m,y)),(e=c.config.series[n].data[i])!==null&&e!==void 0&&e.x&&(p=c.config.series[n].data[i].x),r||c.config.xaxis.type==="datetime"&&(p=new Jf(a).xLabelFormat(c.globals.ttKeyFormatter,p,p,{i:void 0,dateFormatter:new qr(a).formatDate,w:c})),typeof x=="function"&&(p=x(p,y)),Number.isFinite(l)&&Number.isFinite(o)&&(d=l,h=o);var v="",N="",C=c.globals.colors[n];if(c.config.tooltip.x.formatter===void 0)if(c.config.xaxis.type==="datetime"){var S=new qr(a);v=S.formatDate(S.getDate(d),c.config.tooltip.x.format),N=S.formatDate(S.getDate(h),c.config.tooltip.x.format)}else v=d,N=h;else v=c.config.tooltip.x.formatter(d),N=c.config.tooltip.x.formatter(h);return{start:d,end:h,startVal:v,endVal:N,ylabel:p,color:C,seriesName:m}},A1=function(t){var e=t.color,r=t.seriesName,a=t.ylabel,n=t.start,i=t.end,l=t.seriesIndex,o=t.dataPointIndex,c=t.ctx.tooltip.tooltipLabels.getFormatters(l);n=c.yLbFormatter(n),i=c.yLbFormatter(i);var d=c.yLbFormatter(t.w.globals.series[l][o]),h=`<span class="value start-value">
  `.concat(n,`
  </span> <span class="separator">-</span> <span class="value end-value">
  `).concat(i,`
  </span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(r||"")+'</span></div><div> <span class="category">'+a+": </span> "+(t.w.globals.comboCharts?t.w.config.series[l].type==="rangeArea"||t.w.config.series[l].type==="rangeBar"?h:"<span>".concat(d,"</span>"):h)+" </div></div>"},xf=function(){function t(e){Se(this,t),this.opts=e}return Ce(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 a=r.w.config.series[r.seriesIndex].name;return e!==null?a+": "+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 a=r.seriesIndex,n=r.dataPointIndex,i=r.w;return e._getBoxTooltip(i,a,n,["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 a=r.seriesIndex,n=r.dataPointIndex,i=r.w;return e._getBoxTooltip(i,a,n,["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 a=r.seriesIndex,n=r.dataPointIndex,i=r.w,l=function(){var o=i.globals.seriesRangeStart[a][n];return i.globals.seriesRangeEnd[a][n]-o};return i.globals.comboCharts?i.config.series[a].type==="rangeBar"||i.config.series[a].type==="rangeArea"?l():e:l()},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 a=C1(ve(ve({},r),{},{isTimeline:!0})),n=a.color,i=a.seriesName,l=a.ylabel,o=a.startVal,c=a.endVal;return A1(ve(ve({},r),{},{color:n,seriesName:i,ylabel:l,start:o,end:c}))}(e):function(r){var a=C1(r),n=a.color,i=a.seriesName,l=a.ylabel,o=a.start,c=a.end;return A1(ve(ve({},r),{},{color:n,seriesName:i,ylabel:l,start:o,end:c}))}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var r,a;return(r=e.plotOptions.bar)!==null&&r!==void 0&&r.barHeight||(e.plotOptions.bar.barHeight=2),(a=e.plotOptions.bar)!==null&&a!==void 0&&a.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 a=C1(r),n=a.color,i=a.seriesName,l=a.ylabel,o=a.start,c=a.end;return A1(ve(ve({},r),{},{color:n,seriesName:i,ylabel:l,start:o,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(a,n){e.yaxis[n].min=0,e.yaxis[n].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=r||function(a){return typeof a=="number"&&a?a.toFixed(0)+"%":a}),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,a){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(l){return J.isNumber(l)?Math.floor(l):l};var n=e.xaxis.labels.formatter,i=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return a&&a.length&&(i=a.map(function(l){return Array.isArray(l)?l:String(l)})),i&&i.length&&(e.xaxis.labels.formatter=function(l){return J.isNumber(l)?n(i[Math.floor(l)-1]):n(l)}),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,a,n,i){var l=e.globals.seriesCandleO[r][a],o=e.globals.seriesCandleH[r][a],c=e.globals.seriesCandleM[r][a],d=e.globals.seriesCandleL[r][a],h=e.globals.seriesCandleC[r][a];return e.config.series[r].type&&e.config.series[r].type!==i?`<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][a],`</strong>
        </div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(n[0],': <span class="value">')+l+"</span></div>"+"<div>".concat(n[1],': <span class="value">')+o+"</span></div>"+(c?"<div>".concat(n[2],': <span class="value">')+c+"</span></div>":"")+"<div>".concat(n[3],': <span class="value">')+d+"</span></div>"+"<div>".concat(n[4],': <span class="value">')+h+"</span></div></div>"}}]),t}(),bf=function(){function t(e){Se(this,t),this.opts=e}return Ce(t,[{key:"init",value:function(e){var r=e.responsiveOverride,a=this.opts,n=new bo,i=new xf(a);this.chartType=a.chart.type,a=this.extendYAxis(a),a=this.extendAnnotations(a);var l=n.init(),o={};if(a&&fa(a)==="object"){var c,d,h,p,m,x,b,y,v,N,C={};C=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(a.chart.type)!==-1?i[a.chart.type]():i.line(),(c=a.plotOptions)!==null&&c!==void 0&&(d=c.bar)!==null&&d!==void 0&&d.isFunnel&&(C=i.funnel()),a.chart.stacked&&a.chart.type==="bar"&&(C=i.stackedBars()),(h=a.chart.brush)!==null&&h!==void 0&&h.enabled&&(C=i.brush(C)),(p=a.plotOptions)!==null&&p!==void 0&&(m=p.line)!==null&&m!==void 0&&m.isSlopeChart&&(C=i.slope()),a.chart.stacked&&a.chart.stackType==="100%"&&(a=i.stacked100(a)),(x=a.plotOptions)!==null&&x!==void 0&&(b=x.bar)!==null&&b!==void 0&&b.isDumbbell&&(a=i.dumbbell(a)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(a),a.xaxis=a.xaxis||window.Apex.xaxis||{},r||(a.xaxis.convertedCatToNumeric=!1),((y=(a=this.checkForCatToNumericXAxis(this.chartType,C,a)).chart.sparkline)!==null&&y!==void 0&&y.enabled||(v=window.Apex.chart)!==null&&v!==void 0&&(N=v.sparkline)!==null&&N!==void 0&&N.enabled)&&(C=i.sparkline(C)),o=J.extend(l,C)}var S=J.extend(o,window.Apex);return l=J.extend(S,a),l=this.handleUserInputErrors(l)}},{key:"checkForCatToNumericXAxis",value:function(e,r,a){var n,i,l=new xf(a),o=(e==="bar"||e==="boxPlot")&&((n=a.plotOptions)===null||n===void 0||(i=n.bar)===null||i===void 0?void 0:i.horizontal),c=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",d=a.xaxis.type!=="datetime"&&a.xaxis.type!=="numeric",h=a.xaxis.tickPlacement?a.xaxis.tickPlacement:r.xaxis&&r.xaxis.tickPlacement;return o||c||!d||h==="between"||(a=l.convertCatToNumeric(a)),a}},{key:"extendYAxis",value:function(e,r){var a=new bo;(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(a.yAxis,e.yaxis)]:e.yaxis=J.extendArray(e.yaxis,a.yAxis);var n=!1;e.yaxis.forEach(function(l){l.logarithmic&&(n=!0)});var i=e.series;return r&&!i&&(i=r.config.series),n&&i.length!==e.yaxis.length&&i.length&&(e.yaxis=i.map(function(l,o){if(l.name||(i[o].name="series-".concat(o+1)),e.yaxis[o])return e.yaxis[o].seriesName=i[o].name,e.yaxis[o];var c=J.extend(a.yAxis,e.yaxis[0]);return c.show=!1,c})),n&&i.length>1&&i.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 bo;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 bo;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 bo;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}(),o_=function(){function t(){Se(this,t)}return Ce(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}(),nK=function(){function t(e){Se(this,t),this.opts=e}return Ce(t,[{key:"init",value:function(){var e=new bf(this.opts).init({responsiveOverride:!1});return{config:e,globals:new o_().init(e)}}}]),t}(),Jn=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return Ce(t,[{key:"clippedImgArea",value:function(e){var r=this.w,a=r.config,n=parseInt(r.globals.gridWidth,10),i=parseInt(r.globals.gridHeight,10),l=n>i?n:i,o=e.image,c=0,d=0;e.width===void 0&&e.height===void 0?a.fill.image.width!==void 0&&a.fill.image.height!==void 0?(c=a.fill.image.width+1,d=a.fill.image.height):(c=l+1,d=l):(c=e.width,d=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:d+"px"});var p=document.createElementNS(r.globals.SVGNS,"image");h.appendChild(p),p.setAttributeNS(window.SVG.xlink,"href",o),ge.setAttrs(p,{x:0,y:0,preserveAspectRatio:"none",width:c+"px",height:d+"px"}),p.style.opacity=e.opacity,r.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(e){var r=this.w,a=r.config.chart.type;return(a==="bar"||a==="rangeBar")&&r.config.plotOptions.bar.distributed||a==="heatmap"||a==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%r.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(e,r){var a,n=this.w,i=null,l=null,o=Th(e);try{for(o.s();!(a=o.n()).done;){var c=a.value;c>=r.threshold?(i===null||c>i)&&(i=c):(l===null||c<l)&&(l=c)}}catch(p){o.e(p)}finally{o.f()}i===null&&(i=r.threshold),l===null&&(l=r.threshold);var d=i-r.threshold+(r.threshold-l);d===0&&(d=1);var h=100-(r.threshold-l)/d*100;return[{offset:h=Math.max(0,Math.min(h,100)),color:r.colorAboveThreshold,opacity:n.config.fill.opacity},{offset:0,color:r.colorBelowThreshold,opacity:n.config.fill.opacity}]}},{key:"fillPath",value:function(e){var r,a,n,i=this.w;this.opts=e;var l,o,c,d=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var h=d.plotOptions.line.colors.colorAboveThreshold&&d.plotOptions.line.colors.colorBelowThreshold,p=this.getFillColors()[this.seriesIndex];i.globals.seriesColors[this.seriesIndex]!==void 0&&(p=i.globals.seriesColors[this.seriesIndex]),typeof p=="function"&&(p=p({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:i}));var m,x,b,y=e.fillType?e.fillType:this.getFillType(this.seriesIndex),v=Array.isArray(d.fill.opacity)?d.fill.opacity[this.seriesIndex]:d.fill.opacity,N=y==="gradient"||h;e.color&&(p=e.color),(r=i.config.series[this.seriesIndex])!==null&&r!==void 0&&(a=r.data)!==null&&a!==void 0&&(n=a[e.dataPointIndex])!==null&&n!==void 0&&n.fillColor&&(p=(m=i.config.series[this.seriesIndex])===null||m===void 0||(x=m.data)===null||x===void 0||(b=x[e.dataPointIndex])===null||b===void 0?void 0:b.fillColor),p||(p="#fff",console.warn("undefined color - ApexCharts"));var C=p;if(p.indexOf("rgb")===-1?p.indexOf("#")===-1?C=p:p.length<9&&(C=J.hexToRgba(p,v)):p.indexOf("rgba")>-1?v=J.getOpacityFromRGBA(p):C=J.hexToRgba(J.rgb2hex(p),v),e.opacity&&(v=e.opacity),y==="pattern"&&(o=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:o,fillColor:p,fillOpacity:v,defaultColor:C})),N){var S=Ar(d.fill.gradient.colorStops)||[],k=d.fill.gradient.type;h&&(S[this.seriesIndex]=this.computeColorStops(i.globals.series[this.seriesIndex],d.plotOptions.line.colors),k="vertical"),c=this.handleGradientFill({type:k,fillConfig:e.fillConfig,fillColor:p,fillOpacity:v,colorStops:S,i:this.seriesIndex})}if(y==="image"){var A=d.fill.image.src,T=e.patternID?e.patternID:"",M="pattern".concat(i.globals.cuid).concat(e.seriesNumber+1).concat(T);this.patternIDs.indexOf(M)===-1&&(this.clippedImgArea({opacity:v,image:Array.isArray(A)?e.seriesNumber<A.length?A[e.seriesNumber]:A[0]:A,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:M}),this.patternIDs.push(M)),l="url(#".concat(M,")")}else l=N?c:y==="pattern"?o:C;return e.solid&&(l=C),l}},{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,a=this.opts,n=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?n=e.globals.stroke.colors:n.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?n=e.globals.fill.colors:n.push(e.globals.fill.colors):r.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?n=e.globals.stroke.colors:n.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?n=e.globals.fill.colors:n.push(e.globals.fill.colors),a.fillColors!==void 0&&(n=[],Array.isArray(a.fillColors)?n=a.fillColors.slice():n.push(a.fillColors)),n}},{key:"handlePatternFill",value:function(e){var r=e.fillConfig,a=e.patternFill,n=e.fillColor,i=e.fillOpacity,l=e.defaultColor,o=this.w.config.fill;r&&(o=r);var c=this.opts,d=new ge(this.ctx),h=Array.isArray(o.pattern.strokeWidth)?o.pattern.strokeWidth[this.seriesIndex]:o.pattern.strokeWidth,p=n;return Array.isArray(o.pattern.style)?a=o.pattern.style[c.seriesNumber]!==void 0?d.drawPattern(o.pattern.style[c.seriesNumber],o.pattern.width,o.pattern.height,p,h,i):l:a=d.drawPattern(o.pattern.style,o.pattern.width,o.pattern.height,p,h,i),a}},{key:"handleGradientFill",value:function(e){var r=e.type,a=e.fillColor,n=e.fillOpacity,i=e.fillConfig,l=e.colorStops,o=e.i,c=this.w.config.fill;i&&(c=ve(ve({},c),i));var d=this.opts,h=new ge(this.ctx),p=new J;r=r||c.gradient.type;var m,x=a,b=c.gradient.opacityFrom===void 0?n:Array.isArray(c.gradient.opacityFrom)?c.gradient.opacityFrom[o]:c.gradient.opacityFrom;x.indexOf("rgba")>-1&&(b=J.getOpacityFromRGBA(x));var y=c.gradient.opacityTo===void 0?n:Array.isArray(c.gradient.opacityTo)?c.gradient.opacityTo[o]: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),a.indexOf("rgb")>-1?J.rgb2hex(a):a):p.shadeColor(parseFloat(c.gradient.shadeIntensity),a.indexOf("rgb")>-1?J.rgb2hex(a):a);else if(c.gradient.gradientToColors[d.seriesNumber]){var v=c.gradient.gradientToColors[d.seriesNumber];m=v,v.indexOf("rgba")>-1&&(y=J.getOpacityFromRGBA(v))}else m=a;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,b,y,d.size,c.gradient.stops,l,o)}}]),t}(),Xd=function(){function t(e,r){Se(this,t),this.ctx=e,this.w=e.w}return Ce(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(a){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e){var r=e.pointsPos,a=e.seriesIndex,n=e.j,i=e.pSize,l=e.alwaysDrawMarker,o=l!==void 0&&l,c=e.isVirtualPoint,d=c!==void 0&&c,h=this.w,p=a,m=r,x=null,b=new ge(this.ctx),y=h.config.markers.discrete&&h.config.markers.discrete.length;if(Array.isArray(m.x))for(var v=0;v<m.x.length;v++){var N=void 0,C=n,S=!J.isNumber(m.y[v]);h.globals.markers.largestSize===0&&h.globals.hasNullValues&&h.globals.series[p][n+1]!==null&&!d&&(S=!0),n===1&&v===0&&(C=0),n===1&&v===1&&(C=1);var k="apexcharts-marker";if(h.config.chart.type!=="line"&&h.config.chart.type!=="area"||h.globals.comboCharts||h.config.tooltip.intersect||(k+=" no-pointer-events"),(Array.isArray(h.config.markers.size)?h.globals.markers.size[a]>0:h.config.markers.size>0)||o||y){S||(k+=" w".concat(J.randomId()));var A=this.getMarkerConfig({cssClass:k,seriesIndex:a,dataPointIndex:C});h.config.series[p].data[C]&&(h.config.series[p].data[C].fillColor&&(A.pointFillColor=h.config.series[p].data[C].fillColor),h.config.series[p].data[C].strokeColor&&(A.pointStrokeColor=h.config.series[p].data[C].strokeColor)),i!==void 0&&(A.pSize=i),(m.x[v]<-h.globals.markers.largestSize||m.x[v]>h.globals.gridWidth+h.globals.markers.largestSize||m.y[v]<-h.globals.markers.largestSize||m.y[v]>h.globals.gridHeight+h.globals.markers.largestSize)&&(A.pSize=0),!S&&((h.globals.markers.size[a]>0||o||y)&&!x&&(x=b.group({class:o||y?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(h.globals.cuid,")")),(N=b.drawMarker(m.x[v],m.y[v],A)).attr("rel",C),N.attr("j",C),N.attr("index",a),N.node.setAttribute("default-marker-size",A.pSize),new Kr(this.ctx).setSelectionFilter(N,a,C),this.addEvents(N),x&&x.add(N))}else h.globals.pointsArray[a]===void 0&&(h.globals.pointsArray[a]=[]),h.globals.pointsArray[a].push([m.x[v],m.y[v]])}return x}},{key:"getMarkerConfig",value:function(e){var r=e.cssClass,a=e.seriesIndex,n=e.dataPointIndex,i=n===void 0?null:n,l=e.radius,o=l===void 0?null:l,c=e.size,d=c===void 0?null:c,h=e.strokeWidth,p=h===void 0?null:h,m=this.w,x=this.getMarkerStyle(a),b=d===null?m.globals.markers.size[a]:d,y=m.config.markers;return i!==null&&y.discrete.length&&y.discrete.map(function(v){v.seriesIndex===a&&v.dataPointIndex===i&&(x.pointStrokeColor=v.strokeColor,x.pointFillColor=v.fillColor,b=v.size,x.pointShape=v.shape)}),{pSize:o===null?b:o,pRadius:o!==null?o:y.radius,pointStrokeWidth:p!==null?p:Array.isArray(y.strokeWidth)?y.strokeWidth[a]:y.strokeWidth,pointStrokeColor:x.pointStrokeColor,pointFillColor:x.pointFillColor,shape:x.pointShape||(Array.isArray(y.shape)?y.shape[a]:y.shape),class:r,pointStrokeOpacity:Array.isArray(y.strokeOpacity)?y.strokeOpacity[a]:y.strokeOpacity,pointStrokeDashArray:Array.isArray(y.strokeDashArray)?y.strokeDashArray[a]:y.strokeDashArray,pointFillOpacity:Array.isArray(y.fillOpacity)?y.fillOpacity[a]:y.fillOpacity,seriesIndex:a}}},{key:"addEvents",value:function(e){var r=this.w,a=new ge(this.ctx);e.node.addEventListener("mouseenter",a.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",a.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",a.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",a.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var r=this.w,a=r.globals.markers.colors,n=r.config.markers.strokeColor||r.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(n)?n[e]:n,pointFillColor:Array.isArray(a)?a[e]:a}}}]),t}(),c_=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return Ce(t,[{key:"draw",value:function(e,r,a){var n=this.w,i=new ge(this.ctx),l=a.realIndex,o=a.pointsPos,c=a.zRatio,d=a.elParent,h=i.group({class:"apexcharts-series-markers apexcharts-series-".concat(n.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(o.x))for(var p=0;p<o.x.length;p++){var m=r+1,x=!0;r===0&&p===0&&(m=0),r===0&&p===1&&(m=1);var b=n.globals.markers.size[l];if(c!==1/0){var y=n.config.plotOptions.bubble;b=n.globals.seriesZ[l][m],y.zScaling&&(b/=c),y.minBubbleRadius&&b<y.minBubbleRadius&&(b=y.minBubbleRadius),y.maxBubbleRadius&&b>y.maxBubbleRadius&&(b=y.maxBubbleRadius)}var v=o.x[p],N=o.y[p];if(b=b||0,N!==null&&n.globals.series[l][m]!==void 0||(x=!1),x){var C=this.drawPoint(v,N,b,l,m,r);h.add(C)}d.add(h)}}},{key:"drawPoint",value:function(e,r,a,n,i,l){var o=this.w,c=n,d=new $d(this.ctx),h=new Kr(this.ctx),p=new Jn(this.ctx),m=new Xd(this.ctx),x=new ge(this.ctx),b=m.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:c,dataPointIndex:i,radius:o.config.chart.type==="bubble"||o.globals.comboCharts&&o.config.series[n]&&o.config.series[n].type==="bubble"?a:null}),y=p.fillPath({seriesNumber:n,dataPointIndex:i,color:b.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[n][l]}),v=x.drawMarker(e,r,b);if(o.config.series[c].data[i]&&o.config.series[c].data[i].fillColor&&(y=o.config.series[c].data[i].fillColor),v.attr({fill:y}),o.config.chart.dropShadow.enabled){var N=o.config.chart.dropShadow;h.dropShadow(v,N,n)}if(!this.initialAnim||o.globals.dataChanged||o.globals.resized)o.globals.animationEnded=!0;else{var C=o.config.chart.animations.speed;d.animateMarker(v,C,o.globals.easing,function(){window.setTimeout(function(){d.animationCompleted(v)},100)})}return v.attr({rel:i,j:i,index:n,"default-marker-size":b.pSize}),h.setSelectionFilter(v,n,i),m.addEvents(v),v.node.classList.add("apexcharts-marker"),v}},{key:"centerTextInBubble",value:function(e){var r=this.w;return{y:e+=parseInt(r.config.dataLabels.style.fontSize,10)/4}}}]),t}(),wd=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"dataLabelsCorrection",value:function(e,r,a,n,i,l,o){var c=this.w,d=!1,h=new ge(this.ctx).getTextRects(a,o),p=h.width,m=h.height;r<0&&(r=0),r>c.globals.gridHeight+m&&(r=c.globals.gridHeight+m/2),c.globals.dataLabelsRects[n]===void 0&&(c.globals.dataLabelsRects[n]=[]),c.globals.dataLabelsRects[n].push({x:e,y:r,width:p,height:m});var x=c.globals.dataLabelsRects[n].length-2,b=c.globals.lastDrawnDataLabelsIndexes[n]!==void 0?c.globals.lastDrawnDataLabelsIndexes[n][c.globals.lastDrawnDataLabelsIndexes[n].length-1]:0;if(c.globals.dataLabelsRects[n][x]!==void 0){var y=c.globals.dataLabelsRects[n][b];(e>y.x+y.width||r>y.y+y.height||r+m<y.y||e+p<y.x)&&(d=!0)}return(i===0||l)&&(d=!0),{x:e,y:r,textRects:h,drawnextLabel:d}}},{key:"drawDataLabel",value:function(e){var r=this,a=e.type,n=e.pos,i=e.i,l=e.j,o=e.isRangeStart,c=e.strokeWidth,d=c===void 0?2:c,h=this.w,p=new ge(this.ctx),m=h.config.dataLabels,x=0,b=0,y=l,v=null;if(h.globals.collapsedSeriesIndices.indexOf(i)!==-1||!m.enabled||!Array.isArray(n.x))return v;v=p.group({class:"apexcharts-data-labels"});for(var N=0;N<n.x.length;N++)if(x=n.x[N]+m.offsetX,b=n.y[N]+m.offsetY+d,!isNaN(x)){l===1&&N===0&&(y=0),l===1&&N===1&&(y=1);var C=h.globals.series[i][y];a==="rangeArea"&&(C=o?h.globals.seriesRangeStart[i][y]:h.globals.seriesRangeEnd[i][y]);var S="",k=function(T){return h.config.dataLabels.formatter(T,{ctx:r.ctx,seriesIndex:i,dataPointIndex:y,w:h})};h.config.chart.type==="bubble"?(S=k(C=h.globals.seriesZ[i][y]),b=n.y[N],b=new c_(this.ctx).centerTextInBubble(b,i,y).y):C!==void 0&&(S=k(C));var A=h.config.dataLabels.textAnchor;h.globals.isSlopeChart&&(A=y===0?"end":y===h.config.series[i].data.length-1?"start":"middle"),this.plotDataLabelsText({x,y:b,text:S,i,j:y,parent:v,offsetCorrection:!0,dataLabelsConfig:h.config.dataLabels,textAnchor:A})}return v}},{key:"plotDataLabelsText",value:function(e){var r=this.w,a=new ge(this.ctx),n=e.x,i=e.y,l=e.i,o=e.j,c=e.text,d=e.textAnchor,h=e.fontSize,p=e.parent,m=e.dataLabelsConfig,x=e.color,b=e.alwaysDrawDataLabel,y=e.offsetCorrection,v=e.className,N=null;if(Array.isArray(r.config.dataLabels.enabledOnSeries)&&r.config.dataLabels.enabledOnSeries.indexOf(l)<0)return N;var C={x:n,y:i,drawnextLabel:!0,textRects:null};y&&(C=this.dataLabelsCorrection(n,i,c,l,o,b,parseInt(m.style.fontSize,10))),r.globals.zoomed||(n=C.x,i=C.y),C.textRects&&(n<-20-C.textRects.width||n>r.globals.gridWidth+C.textRects.width+30)&&(c="");var S=r.globals.dataLabels.style.colors[l];((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[o]),typeof S=="function"&&(S=S({series:r.globals.series,seriesIndex:l,dataPointIndex:o,w:r})),x&&(S=x);var k=m.offsetX,A=m.offsetY;if(r.config.chart.type!=="bar"&&r.config.chart.type!=="rangeBar"||(k=0,A=0),r.globals.isSlopeChart&&(o!==0&&(k=-2*m.offsetX+5),o!==0&&o!==r.config.series[l].data.length-1&&(k=0)),C.drawnextLabel){if(d==="middle"&&n===r.globals.gridWidth&&(d="end"),(N=a.drawText({width:100,height:parseInt(m.style.fontSize,10),x:n+k,y:i+A,foreColor:S,textAnchor:d||m.textAnchor,text:c,fontSize:h||m.style.fontSize,fontFamily:m.style.fontFamily,fontWeight:m.style.fontWeight||"normal"})).attr({class:v||"apexcharts-datalabel",cx:n,cy:i}),m.dropShadow.enabled){var T=m.dropShadow;new Kr(this.ctx).dropShadow(N,T)}p.add(N),r.globals.lastDrawnDataLabelsIndexes[l]===void 0&&(r.globals.lastDrawnDataLabelsIndexes[l]=[]),r.globals.lastDrawnDataLabelsIndexes[l].push(o)}return N}},{key:"addBackgroundToDataLabel",value:function(e,r){var a=this.w,n=a.config.dataLabels.background,i=n.padding,l=n.padding/2,o=r.width,c=r.height,d=new ge(this.ctx).drawRect(r.x-i,r.y-l/2,o+2*i,c+l,n.borderRadius,a.config.chart.background!=="transparent"&&a.config.chart.background?a.config.chart.background:"#fff",n.opacity,n.borderWidth,n.borderColor);return n.dropShadow.enabled&&new Kr(this.ctx).dropShadow(d,n.dropShadow),d}},{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"),a=0;a<r.length;a++){var n=r[a],i=n.getBBox(),l=null;if(i.width&&i.height&&(l=this.addBackgroundToDataLabel(n,i)),l){n.parentNode.insertBefore(l.node,n);var o=e.config.dataLabels.background.backgroundColor||n.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?l.animate().attr({fill:o}):l.attr({fill:o}),n.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),a=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),n=0;n<r.length;n++)a&&a.insertBefore(r[n],a.nextSibling)}}]),t}(),_n=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return Ce(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),a=parseInt(r.getAttribute("data:realIndex"),10);return{isHidden:r.classList.contains("apexcharts-series-collapsed"),realIndex:a}}},{key:"addCollapsedClassToSeries",value:function(e,r){var a=this.w;function n(i){for(var l=0;l<i.length;l++)i[l].index===r&&e.node.classList.add("apexcharts-series-collapsed")}n(a.globals.collapsedSeries),n(a.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],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],n=this.w,i=J.clone(n.globals.initialSeries);n.globals.previousPaths=[],a?(n.globals.collapsedSeries=[],n.globals.ancillaryCollapsedSeries=[],n.globals.collapsedSeriesIndices=[],n.globals.ancillaryCollapsedSeriesIndices=[]):i=this.emptyCollapsedSeries(i),n.config.series=i,e&&(r&&(n.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(i,n.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var r=this.w,a=0;a<e.length;a++)r.globals.collapsedSeriesIndices.indexOf(a)>-1&&(e[a].data=[]);return e}},{key:"highlightSeries",value:function(e){var r=this.w,a=this.getSeriesByName(e),n=parseInt(a?.getAttribute("data:realIndex"),10),i=r.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),l=null,o=null,c=null;if(r.globals.axisCharts||r.config.chart.type==="radialBar")if(r.globals.axisCharts){l=r.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(n,"']")),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(n,"']"));var d=r.globals.seriesYAxisReverseMap[n];c=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(d,"']"))}else l=r.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(n+1,"']"));else l=r.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(n+1,"'] path"));for(var h=0;h<i.length;h++)i[h].classList.add(this.legendInactiveClass);if(l)r.globals.axisCharts||l.parentNode.classList.remove(this.legendInactiveClass),l.classList.remove(this.legendInactiveClass),o!==null&&o.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass);else for(var p=0;p<i.length;p++)i[p].classList.remove(this.legendInactiveClass)}},{key:"toggleSeriesOnHover",value:function(e,r){var a=this.w;r||(r=e.target);var n=a.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var i=parseInt(r.getAttribute("rel"),10)-1;this.highlightSeries(a.globals.seriesNames[i])}else if(e.type==="mouseout")for(var l=0;l<n.length;l++)n[l].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,r){var a=this,n=this.w,i=n.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),l=function(d){for(var h=0;h<i.length;h++)i[h].classList[d](a.legendInactiveClass)};if(e.type==="mousemove"){var o=parseInt(r.getAttribute("rel"),10)-1;l("add");var c=n.config.plotOptions.heatmap.colorScale.ranges;(function(d,h){for(var p=0;p<i.length;p++){var m=Number(i[p].getAttribute("val"));m>=d.from&&(m<d.to||d.to===h&&m===h)&&i[p].classList.remove(a.legendInactiveClass)}})(c[o],c.reduce(function(d,h){return Math.max(d,h.to)},0))}else e.type==="mouseout"&&l("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]:[],a=this.w,n=0;if(a.config.series.length>1){for(var i=a.config.series.map(function(o,c){return o.data&&o.data.length>0&&a.globals.collapsedSeriesIndices.indexOf(c)===-1&&(!a.globals.comboCharts||r.length===0||r.length&&r.indexOf(a.config.series[c].type)>-1)?c:-1}),l=e==="asc"?0:i.length-1;e==="asc"?l<i.length:l>=0;e==="asc"?l++:l--)if(i[l]!==-1){n=i[l];break}}return n}},{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(l,o,c){for(var d=l[o].childNodes,h={type:c,paths:[],realIndex:l[o].getAttribute("data:realIndex")},p=0;p<d.length;p++)if(d[p].hasAttribute("pathTo")){var m=d[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(l){for(var o,c=(o=l,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(o,"-series .apexcharts-series"))),d=0;d<c.length;d++)r(c,d,l)});var a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(a.length>0)for(var n=function(l){for(var o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(l,"'] rect")),c=[],d=function(p){var m=function(b){return o[p].getAttribute(b)},x={x:parseFloat(m("x")),y:parseFloat(m("y")),width:parseFloat(m("width")),height:parseFloat(m("height"))};c.push({rect:x,color:o[p].getAttribute("color")})},h=0;h<o.length;h++)d(h);e.globals.previousPaths.push(c)},i=0;i<a.length;i++)n(i);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,a=new ge(this.ctx),n=e.globals.svgWidth/2,i=e.globals.svgHeight/2,l="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,r.align==="left"?(n=10,l="start"):r.align==="right"&&(n=e.globals.svgWidth-10,l="end"),r.verticalAlign==="top"?i=50:r.verticalAlign==="bottom"&&(i=e.globals.svgHeight-50),n+=r.offsetX,i=i+parseInt(r.style.fontSize,10)+2+r.offsetY,r.text!==void 0&&r.text!==""){var o=a.drawText({x:n,y:i,text:r.text,textAnchor:l,fontSize:r.style.fontSize,fontFamily:r.style.fontFamily,foreColor:r.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(o)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var r=this.w,a=0;a<e.length;a++)if(e[a].length===0)for(var n=0;n<e[r.globals.maxValsInArrayIndex].length;n++)e[a].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,r=this.w,a=this.filteredSeriesX(),n=0;n<a.length-1;n++)if(a[n][0]!==a[n+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}(),oN=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 or(this.ctx)}return Ce(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),r=new _n(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 _n(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 a=this.w.config,n=this.w.globals,i=a.chart.type==="boxPlot"||a.series[r].type==="boxPlot",l=0;l<e[r].data.length;l++)if(e[r].data[l][1]!==void 0&&(Array.isArray(e[r].data[l][1])&&e[r].data[l][1].length===4&&!i?this.twoDSeries.push(J.parseNumber(e[r].data[l][1][3])):e[r].data[l].length>=5?this.twoDSeries.push(J.parseNumber(e[r].data[l][4])):this.twoDSeries.push(J.parseNumber(e[r].data[l][1])),n.dataFormatXNumeric=!0),a.xaxis.type==="datetime"){var o=new Date(e[r].data[l][0]);o=new Date(o).getTime(),this.twoDSeriesX.push(o)}else this.twoDSeriesX.push(e[r].data[l][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]),n.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,r){var a=this.w.config,n=this.w.globals,i=new qr(this.ctx),l=r;n.collapsedSeriesIndices.indexOf(r)>-1&&(l=this.activeSeriesIndex);for(var o=0;o<e[r].data.length;o++)e[r].data[o].y!==void 0&&(Array.isArray(e[r].data[o].y)?this.twoDSeries.push(J.parseNumber(e[r].data[o].y[e[r].data[o].y.length-1])):this.twoDSeries.push(J.parseNumber(e[r].data[o].y))),e[r].data[o].goals!==void 0&&Array.isArray(e[r].data[o].goals)?(this.seriesGoals[r]===void 0&&(this.seriesGoals[r]=[]),this.seriesGoals[r].push(e[r].data[o].goals)):(this.seriesGoals[r]===void 0&&(this.seriesGoals[r]=[]),this.seriesGoals[r].push(null));for(var c=0;c<e[l].data.length;c++){var d=typeof e[l].data[c].x=="string",h=Array.isArray(e[l].data[c].x),p=!h&&!!i.isValidDate(e[l].data[c].x);if(d||p)if(d||a.xaxis.convertedCatToNumeric){var m=n.isBarHorizontal&&n.isRangeData;a.xaxis.type!=="datetime"||m?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[l].data[c].x),isNaN(e[l].data[c].x)||this.w.config.xaxis.type==="category"||typeof e[l].data[c].x=="string"||(n.isXNumeric=!0)):this.twoDSeriesX.push(i.parseDate(e[l].data[c].x))}else a.xaxis.type==="datetime"?this.twoDSeriesX.push(i.parseDate(e[l].data[c].x.toString())):(n.dataFormatXNumeric=!0,n.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[l].data[c].x)));else h?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[l].data[c].x)):(n.isXNumeric=!0,n.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[l].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);n.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,r){var a=this.w.globals,n={};return this.isFormat2DArray()?n=this.handleRangeDataFormat("array",e,r):this.isFormatXY()&&(n=this.handleRangeDataFormat("xy",e,r)),a.seriesRangeStart[r]=n.start===void 0?[]:n.start,a.seriesRangeEnd[r]=n.end===void 0?[]:n.end,a.seriesRange[r]=n.rangeUniques,a.seriesRange.forEach(function(i,l){i&&i.forEach(function(o,c){o.y.forEach(function(d,h){for(var p=0;p<o.y.length;p++)if(h!==p){var m=d.y1,x=d.y2,b=o.y[p].y1;m<=o.y[p].y2&&b<=x&&(o.overlaps.indexOf(d.rangeName)<0&&o.overlaps.push(d.rangeName),o.overlaps.indexOf(o.y[p].rangeName)<0&&o.overlaps.push(o.y[p].rangeName))}})})}),n}},{key:"handleCandleStickBoxData",value:function(e,r){var a=this.w.globals,n={};return this.isFormat2DArray()?n=this.handleCandleStickBoxDataFormat("array",e,r):this.isFormatXY()&&(n=this.handleCandleStickBoxDataFormat("xy",e,r)),a.seriesCandleO[r]=n.o,a.seriesCandleH[r]=n.h,a.seriesCandleM[r]=n.m,a.seriesCandleL[r]=n.l,a.seriesCandleC[r]=n.c,n}},{key:"handleRangeDataFormat",value:function(e,r,a){var n=[],i=[],l=r[a].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 o=0;o<r[a].data.length;o++)Array.isArray(r[a].data[o])?(n.push(r[a].data[o][1][0]),i.push(r[a].data[o][1][1])):(n.push(r[a].data[o]),i.push(r[a].data[o]));else if(e==="xy")for(var c=function(h){var p=Array.isArray(r[a].data[h].y),m=J.randomId(),x=r[a].data[h].x,b={y1:p?r[a].data[h].y[0]:r[a].data[h].y,y2:p?r[a].data[h].y[1]:r[a].data[h].y,rangeName:m};r[a].data[h].rangeName=m;var y=l.findIndex(function(v){return v.x===x});l[y].y.push(b),n.push(b.y1),i.push(b.y2)},d=0;d<r[a].data.length;d++)c(d);return{start:n,end:i,rangeUniques:l}}},{key:"handleCandleStickBoxDataFormat",value:function(e,r,a){var n=this.w,i=n.config.chart.type==="boxPlot"||n.config.series[a].type==="boxPlot",l=[],o=[],c=[],d=[],h=[];if(e==="array")if(i&&r[a].data[0].length===6||!i&&r[a].data[0].length===5)for(var p=0;p<r[a].data.length;p++)l.push(r[a].data[p][1]),o.push(r[a].data[p][2]),i?(c.push(r[a].data[p][3]),d.push(r[a].data[p][4]),h.push(r[a].data[p][5])):(d.push(r[a].data[p][3]),h.push(r[a].data[p][4]));else for(var m=0;m<r[a].data.length;m++)Array.isArray(r[a].data[m][1])&&(l.push(r[a].data[m][1][0]),o.push(r[a].data[m][1][1]),i?(c.push(r[a].data[m][1][2]),d.push(r[a].data[m][1][3]),h.push(r[a].data[m][1][4])):(d.push(r[a].data[m][1][2]),h.push(r[a].data[m][1][3])));else if(e==="xy")for(var x=0;x<r[a].data.length;x++)Array.isArray(r[a].data[x].y)&&(l.push(r[a].data[x].y[0]),o.push(r[a].data[x].y[1]),i?(c.push(r[a].data[x].y[2]),d.push(r[a].data[x].y[3]),h.push(r[a].data[x].y[4])):(d.push(r[a].data[x].y[2]),h.push(r[a].data[x].y[3])));return{o:l,h:o,m:c,l:d,c:h}}},{key:"parseDataAxisCharts",value:function(e){var r=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.ctx,n=this.w.config,i=this.w.globals,l=new qr(a),o=n.labels.length>0?n.labels.slice():n.xaxis.categories.slice();i.isRangeBar=n.chart.type==="rangeBar"&&i.isBarHorizontal,i.hasXaxisGroups=n.xaxis.type==="category"&&n.xaxis.group.groups.length>0,i.hasXaxisGroups&&(i.groups=n.xaxis.group.groups),e.forEach(function(x,b){x.name!==void 0?i.seriesNames.push(x.name):i.seriesNames.push("series-"+parseInt(b+1,10))}),this.coreUtils.setSeriesYAxisMappings();var c=[],d=Ar(new Set(n.series.map(function(x){return x.group})));n.series.forEach(function(x,b){var y=d.indexOf(x.group);c[y]||(c[y]=[]),c[y].push(i.seriesNames[b])}),i.seriesGroups=c;for(var h=function(){for(var x=0;x<o.length;x++)if(typeof o[x]=="string"){if(!l.isValidDate(o[x]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");r.twoDSeriesX.push(l.parseDate(o[x]))}else r.twoDSeriesX.push(o[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(n.chart.type!=="rangeBar"&&n.chart.type!=="rangeArea"&&e[p].type!=="rangeBar"&&e[p].type!=="rangeArea"||(i.isRangeData=!0,this.handleRangeData(e,p)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,p):this.isFormatXY()&&this.handleFormatXY(e,p),n.chart.type!=="candlestick"&&e[p].type!=="candlestick"&&n.chart.type!=="boxPlot"&&e[p].type!=="boxPlot"||this.handleCandleStickBoxData(e,p),i.series.push(this.twoDSeries),i.labels.push(this.twoDSeriesX),i.seriesX.push(this.twoDSeriesX),i.seriesGoals=this.seriesGoals,p!==this.activeSeriesIndex||this.fallbackToCategory||(i.isXNumeric=!0);else{n.xaxis.type==="datetime"?(i.isXNumeric=!0,h(),i.seriesX.push(this.twoDSeriesX)):n.xaxis.type==="numeric"&&(i.isXNumeric=!0,o.length>0&&(this.twoDSeriesX=o,i.seriesX.push(this.twoDSeriesX))),i.labels.push(this.twoDSeriesX);var m=e[p].data.map(function(x){return J.parseNumber(x)});i.series.push(m)}i.seriesZ.push(this.threeDSeries),e[p].color!==void 0?i.seriesColors.push(e[p].color):i.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var r=this.w.globals,a=this.w.config,n=Array.isArray(e)&&e.every(function(h){return typeof h=="number"})&&a.labels.length>0,i=Array.isArray(e)&&e.some(function(h){return h&&fa(h)==="object"&&h.data||h&&fa(h)==="object"&&h.parsing});if(n&&i&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),n){r.series=e.slice(),r.seriesNames=a.labels.slice();for(var l=0;l<r.series.length;l++)r.seriesNames[l]===void 0&&r.seriesNames.push("series-"+(l+1));return this.w}if(Array.isArray(e)&&e.every(function(h){return typeof h=="number"})){r.series=e.slice(),r.seriesNames=[];for(var o=0;o<r.series.length;o++)r.seriesNames.push(a.labels[o]||"series-".concat(o+1));return this.w}var c=this.extractPieDataFromSeries(e);r.series=c.values,r.seriesNames=c.labels,a.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 d=0;d<r.series.length;d++)r.seriesNames[d]===void 0&&r.seriesNames.push("series-"+(d+1));return this.w}},{key:"extractPieDataFromSeries",value:function(e){var r=[],a=[];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 n=e[0];return fa(n)==="object"&&n!==null&&n.data?(this.extractPieDataFromSeriesObjects(e,r,a),{values:r,labels:a}):(console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]})}},{key:"extractPieDataFromSeriesObjects",value:function(e,r,a){e.forEach(function(n,i){n.data&&Array.isArray(n.data)?n.data.forEach(function(l){fa(l)==="object"&&l!==null?l.x!==void 0&&l.y!==void 0?(a.push(String(l.x)),r.push(J.parseNumber(l.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",l):console.warn("ApexCharts: Expected object data point, got:",fa(l))}):console.warn("ApexCharts: Series ".concat(i," has no valid data array"))})}},{key:"handleExternalLabelsData",value:function(e){var r=this.w.config,a=this.w.globals;r.xaxis.categories.length>0?a.labels=r.xaxis.categories:r.labels.length>0?a.labels=r.labels.slice():this.fallbackToCategory?(a.labels=a.labels[0],a.seriesRange.length&&(a.seriesRange.map(function(n){n.forEach(function(i){a.labels.indexOf(i.x)<0&&i.x&&a.labels.push(i.x)})}),a.labels=Array.from(new Set(a.labels.map(JSON.stringify)),JSON.parse)),r.xaxis.convertedCatToNumeric&&(new xf(r).convertCatToNumericXaxis(r,this.ctx,a.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var r=this.w.globals,a=this.w.config,n=[];if(r.axisCharts){if(r.series.length>0)if(this.isFormatXY())for(var i=a.series.map(function(p,m){return p.data.filter(function(x,b,y){return y.findIndex(function(v){return v.x===x.x})===b})}),l=i.reduce(function(p,m,x,b){return b[p].length>m.length?p:x},0),o=0;o<i[l].length;o++)n.push(o+1);else for(var c=0;c<r.series[r.maxValsInArrayIndex].length;c++)n.push(c+1);r.seriesX=[];for(var d=0;d<e.length;d++)r.seriesX.push(n);this.w.globals.isBarHorizontal||(r.isXNumeric=!0)}if(n.length===0){n=r.axisCharts?[]:r.series.map(function(p,m){return m+1});for(var h=0;h<e.length;h++)r.seriesX.push(n)}r.labels=n,a.xaxis.convertedCatToNumeric&&(r.categoryLabels=n.map(function(p){return a.xaxis.labels.formatter(p)})),r.noLabelsProvided=!0}},{key:"parseRawDataIfNeeded",value:function(e){var r=this,a=this.w.config,n=this.w.globals,i=a.parsing;if(n.dataWasParsed||!i&&!e.some(function(o){return o.parsing}))return e;var l=e.map(function(o,c){var d,h;if(!o.data||!Array.isArray(o.data)||o.data.length===0)return o;var p={x:((d=o.parsing)===null||d===void 0?void 0:d.x)||i?.x,y:((h=o.parsing)===null||h===void 0?void 0:h.y)||i?.y};if(!p.x&&!p.y)return o;var m=o.data[0];if(fa(m)==="object"&&m!==null&&(m.hasOwnProperty("x")||m.hasOwnProperty("y"))||Array.isArray(m))return o;if(!p.x||!p.y)return console.warn("ApexCharts: Series ".concat(c," has parsing config but missing x or y field specification")),o;var x=o.data.map(function(b,y){if(fa(b)!=="object"||b===null)return console.warn("ApexCharts: Series ".concat(c,", data point ").concat(y," is not an object, skipping parsing")),b;var v=r.getNestedValue(b,p.x),N=r.getNestedValue(b,p.y);return v===void 0&&console.warn("ApexCharts: Series ".concat(c,", data point ").concat(y," missing field '").concat(p.x,"'")),N===void 0&&console.warn("ApexCharts: Series ".concat(c,", data point ").concat(y," missing field '").concat(p.y,"'")),{x:v,y:N}});return ve(ve({},o),{},{data:x,__apexParsed:!0})});return n.dataWasParsed=!0,n.originalSeries||(n.originalSeries=J.clone(e)),l}},{key:"getNestedValue",value:function(e,r){if(e&&fa(e)==="object"&&r){if(r.indexOf(".")===-1)return e[r];for(var a=r.split("."),n=e,i=0;i<a.length;i++){if(n==null||fa(n)!=="object")return;n=n[a[i]]}return n}}},{key:"parseData",value:function(e){var r=this.w,a=r.config,n=r.globals;if(e=this.parseRawDataIfNeeded(e),a.series=e,this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),n.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),a.chart.stacked){var i=new _n(this.ctx);n.series=i.setNullSeriesToZeroValues(n.series)}this.coreUtils.getSeriesTotals(),n.axisCharts&&(n.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),n.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),n.dataFormatXNumeric||n.isXNumeric&&(a.xaxis.type!=="numeric"||a.labels.length!==0||a.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var l=this.coreUtils.getCategoryLabels(n.labels),o=0;o<l.length;o++)if(Array.isArray(l[o])){n.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,r=[];e.globals.seriesYAxisMap.forEach(function(a,n){var i=0;a.forEach(function(l){e.globals.collapsedSeriesIndices.indexOf(l)!==-1&&i++}),i>0&&i==a.length&&r.push(n)}),e.globals.ignoreYAxisIndexes=r.map(function(a){return a})}}]),t}(),qh=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"svgStringToNode",value:function(e){return new DOMParser().parseFromString(e,"image/svg+xml").documentElement}},{key:"scaleSvgNode",value:function(e,r){var a=parseFloat(e.getAttributeNS(null,"width")),n=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",a*r),e.setAttributeNS(null,"height",n*r),e.setAttributeNS(null,"viewBox","0 0 "+a+" "+n)}},{key:"getSvgString",value:function(e){var r=this;return new Promise(function(a){var n=r.w,i=e||n.config.chart.toolbar.export.scale||n.config.chart.toolbar.export.width/n.globals.svgWidth;i||(i=1);var l=n.globals.svgWidth*i,o=n.globals.svgHeight*i,c=n.globals.dom.elWrap.cloneNode(!0);c.style.width=l+"px",c.style.height=o+"px";var d=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(n.globals.svgWidth,'px" height="').concat(n.globals.svgHeight,`px">
          <foreignObject width="100%" height="100%">
            <div xmlns="http://www.w3.org/1999/xhtml" style="width:`).concat(l,"px; height:").concat(o,`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(d,`
            </div>
          </foreignObject>
        </svg>
      `),p=r.svgStringToNode(h);i!==1&&r.scaleSvgNode(p,i),r.convertImagesToBase64(p).then(function(){h=new XMLSerializer().serializeToString(p),a(h.replace(/&nbsp;/g,"&#160;"))})})}},{key:"convertImagesToBase64",value:function(e){var r=this,a=e.getElementsByTagName("image"),n=Array.from(a).map(function(i){var l=i.getAttributeNS("http://www.w3.org/1999/xlink","href");return l&&!l.startsWith("data:")?r.getBase64FromUrl(l).then(function(o){i.setAttributeNS("http://www.w3.org/1999/xlink","href",o)}).catch(function(o){console.error("Error converting image to base64:",o)}):Promise.resolve()});return Promise.all(n)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(r,a){var n=new Image;n.crossOrigin="Anonymous",n.onload=function(){var i=document.createElement("canvas");i.width=n.width,i.height=n.height,i.getContext("2d").drawImage(n,0,0),r(i.toDataURL())},n.onerror=a,n.src=e})}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(r){e.getSvgString().then(function(a){var n=new Blob([a],{type:"image/svg+xml;charset=utf-8"});r(URL.createObjectURL(n))})})}},{key:"dataURI",value:function(e){var r=this;return new Promise(function(a){var n=r.w,i=e?e.scale||e.width/n.globals.svgWidth:1,l=document.createElement("canvas");l.width=n.globals.svgWidth*i,l.height=parseInt(n.globals.dom.elWrap.style.height,10)*i;var o=n.config.chart.background!=="transparent"&&n.config.chart.background?n.config.chart.background:"#fff",c=l.getContext("2d");c.fillStyle=o,c.fillRect(0,0,l.width*i,l.height*i),r.getSvgString(i).then(function(d){var h="data:image/svg+xml,"+encodeURIComponent(d),p=new Image;p.crossOrigin="anonymous",p.onload=function(){if(c.drawImage(p,0,0),l.msToBlob){var m=l.msToBlob();a({blob:m})}else{var x=l.toDataURL("image/png");a({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,a=this.w.config.chart.toolbar.export.width,n=r?{scale:r}:a?{width:a}:void 0;this.dataURI(n).then(function(i){var l=i.imgURI,o=i.blob;o?navigator.msSaveOrOpenBlob(o,e.w.globals.chartID+".png"):e.triggerDownload(l,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var r=this,a=e.series,n=e.fileName,i=e.columnDelimiter,l=i===void 0?",":i,o=e.lineDelimiter,c=o===void 0?`
`:o,d=this.w;a||(a=d.config.series);var h=[],p=[],m="",x=d.globals.series.map(function(A,T){return d.globals.collapsedSeriesIndices.indexOf(T)===-1?A:[]}),b=function(A){return typeof d.config.chart.toolbar.export.csv.categoryFormatter=="function"?d.config.chart.toolbar.export.csv.categoryFormatter(A):d.config.xaxis.type==="datetime"&&String(A).length>=10?new Date(A).toDateString():J.isNumber(A)?A:A.split(l).join("")},y=function(A){return typeof d.config.chart.toolbar.export.csv.valueFormatter=="function"?d.config.chart.toolbar.export.csv.valueFormatter(A):A},v=Math.max.apply(Math,Ar(a.map(function(A){return A.data?A.data.length:0}))),N=new oN(this.ctx),C=new wl(this.ctx),S=function(A){var T="";if(d.globals.axisCharts){if(d.config.xaxis.type==="category"||d.config.xaxis.convertedCatToNumeric)if(d.globals.isBarHorizontal){var M=d.globals.yLabelFormatters[0],O=new _n(r.ctx).getActiveConfigSeriesIndex();T=M(d.globals.labels[A],{seriesIndex:O,dataPointIndex:A,w:d})}else T=C.getLabel(d.globals.labels,d.globals.timescaleLabels,0,A).text;d.config.xaxis.type==="datetime"&&(d.config.xaxis.categories.length?T=d.config.xaxis.categories[A]:d.config.labels.length&&(T=d.config.labels[A]))}else T=d.config.labels[A];return T===null?"nullvalue":(Array.isArray(T)&&(T=T.join(" ")),J.isNumber(T)?T:T.split(l).join(""))},k=function(A,T){if(h.length&&T===0&&p.push(h.join(l)),A.data){A.data=A.data.length&&A.data||Ar(Array(v)).map(function(){return""});for(var M=0;M<A.data.length;M++){h=[];var O=S(M);if(O!=="nullvalue"){if(O||(N.isFormatXY()?O=a[T].data[M].x:N.isFormat2DArray()&&(O=a[T].data[M]?a[T].data[M][0]:"")),T===0){h.push(b(O));for(var _=0;_<d.globals.series.length;_++){var R,L=N.isFormatXY()?(R=a[_].data[M])===null||R===void 0?void 0:R.y:x[_][M];h.push(y(L))}}(d.config.chart.type==="candlestick"||A.type&&A.type==="candlestick")&&(h.pop(),h.push(d.globals.seriesCandleO[T][M]),h.push(d.globals.seriesCandleH[T][M]),h.push(d.globals.seriesCandleL[T][M]),h.push(d.globals.seriesCandleC[T][M])),(d.config.chart.type==="boxPlot"||A.type&&A.type==="boxPlot")&&(h.pop(),h.push(d.globals.seriesCandleO[T][M]),h.push(d.globals.seriesCandleH[T][M]),h.push(d.globals.seriesCandleM[T][M]),h.push(d.globals.seriesCandleL[T][M]),h.push(d.globals.seriesCandleC[T][M])),d.config.chart.type==="rangeBar"&&(h.pop(),h.push(d.globals.seriesRangeStart[T][M]),h.push(d.globals.seriesRangeEnd[T][M])),h.length&&p.push(h.join(l))}}}};h.push(d.config.chart.toolbar.export.csv.headerCategory),d.config.chart.type==="boxPlot"?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):d.config.chart.type==="candlestick"?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):d.config.chart.type==="rangeBar"?(h.push("minimum"),h.push("maximum")):a.map(function(A,T){var M=(A.name?A.name:"series-".concat(T))+"";d.globals.axisCharts&&h.push(M.split(l).join("")?M.split(l).join(""):"series-".concat(T))}),d.globals.axisCharts||(h.push(d.config.chart.toolbar.export.csv.headerValue),p.push(h.join(l))),d.globals.allSeriesHasEqualX||!d.globals.axisCharts||d.config.xaxis.categories.length||d.config.labels.length?a.map(function(A,T){d.globals.axisCharts?k(A,T):((h=[]).push(b(d.globals.labels[T])),h.push(y(x[T])),p.push(h.join(l)))}):function(){var A=new Set,T={};a.forEach(function(M,O){M?.data.forEach(function(_){var R,L;if(N.isFormatXY())R=_.x,L=_.y;else{if(!N.isFormat2DArray())return;R=_[0],L=_[1]}T[R]||(T[R]=Array(a.length).fill("")),T[R][O]=y(L),A.add(R)})}),h.length&&p.push(h.join(l)),Array.from(A).sort().forEach(function(M){p.push([b(M),T[M].join(l)])})}(),m+=p.join(c),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+m),n||d.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,r,a){var n=document.createElement("a");n.href=e,n.download=(r||this.w.globals.chartID)+a,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}]),t}(),yf=function(){function t(e,r){Se(this,t),this.ctx=e,this.elgrid=r,this.w=e.w;var a=this.w;this.axesUtils=new wl(e),this.xaxisLabels=a.globals.labels.slice(),a.globals.timescaleLabels.length>0&&!a.globals.isBarHorizontal&&(this.xaxisLabels=a.globals.timescaleLabels.slice()),a.config.xaxis.overwriteCategories&&(this.xaxisLabels=a.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],a.config.xaxis.position==="top"?this.offY=0:this.offY=a.globals.gridHeight,this.offY=this.offY+a.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=a.config.chart.type==="bar"&&a.config.plotOptions.bar.horizontal,this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.xaxisBorderWidth=a.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=a.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=a.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=a.config.xaxis.axisBorder.height,this.yaxis=a.config.yaxis[0]}return Ce(t,[{key:"drawXaxis",value:function(){var e=this.w,r=new ge(this.ctx),a=r.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),n=r.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(n);for(var i=[],l=0;l<this.xaxisLabels.length;l++)i.push(this.xaxisLabels[l]);if(this.drawXAxisLabelAndGroup(!0,r,n,i,e.globals.isXNumeric,function(b,y){return y}),e.globals.hasXaxisGroups){var o=e.globals.groups;i=[];for(var c=0;c<o.length;c++)i.push(o[c].title);var d={};e.config.xaxis.group.style&&(d.xaxisFontSize=e.config.xaxis.group.style.fontSize,d.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,d.xaxisForeColors=e.config.xaxis.group.style.colors,d.fontWeight=e.config.xaxis.group.style.fontWeight,d.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,r,n,i,!1,function(b,y){return o[b].cols*y},d)}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),a.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):a.add(x)}return a}},{key:"drawXAxisLabelAndGroup",value:function(e,r,a,n,i,l){var o,c=this,d=arguments.length>6&&arguments[6]!==void 0?arguments[6]:{},h=[],p=[],m=this.w,x=d.xaxisFontSize||this.xaxisFontSize,b=d.xaxisFontFamily||this.xaxisFontFamily,y=d.xaxisForeColors||this.xaxisForeColors,v=d.fontWeight||m.config.xaxis.labels.style.fontWeight,N=d.cssClass||m.config.xaxis.labels.style.cssClass,C=m.globals.padHorizontal,S=n.length,k=m.config.xaxis.type==="category"?m.globals.dataPoints:S;if(k===0&&S>k&&(k=S),i){var A=Math.max(Number(m.config.xaxis.tickAmount)||1,k>1?k-1:k);o=m.globals.gridWidth/Math.min(A,S-1),C=C+l(0,o)/2+m.config.xaxis.labels.offsetX}else o=m.globals.gridWidth/k,C=C+l(0,o)+m.config.xaxis.labels.offsetX;for(var T=function(O){var _=C-l(O,o)/2+m.config.xaxis.labels.offsetX;O===0&&S===1&&o/2===C&&k===1&&(_=m.globals.gridWidth/2);var R=c.axesUtils.getLabel(n,m.globals.timescaleLabels,_,O,h,x,e),L=28;if(m.globals.rotateXLabels&&e&&(L=22),m.config.xaxis.title.text&&m.config.xaxis.position==="top"&&(L+=parseFloat(m.config.xaxis.title.style.fontSize)+2),e||(L=L+parseFloat(x)+(m.globals.xAxisLabelsHeight-m.globals.xAxisGroupLabelsHeight)+(m.globals.rotateXLabels?10:0)),R=m.config.xaxis.tickAmount!==void 0&&m.config.xaxis.tickAmount!=="dataPoints"&&m.config.xaxis.type!=="datetime"?c.axesUtils.checkLabelBasedOnTickamount(O,R,S):c.axesUtils.checkForOverflowingLabels(O,R,S,h,p),m.config.xaxis.labels.show){var z=r.drawText({x:R.x,y:c.offY+m.config.xaxis.labels.offsetY+L-(m.config.xaxis.position==="top"?m.globals.xAxisHeight+m.config.xaxis.axisTicks.height-2:0),text:R.text,textAnchor:"middle",fontWeight:R.isBold?600:v,fontSize:x,fontFamily:b,foreColor:Array.isArray(y)?e&&m.config.xaxis.convertedCatToNumeric?y[m.globals.minX+O-1]:y[O]:y,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+N});if(a.add(z),z.on("click",function(Y){if(typeof m.config.chart.events.xAxisLabelClick=="function"){var X=Object.assign({},m,{labelIndex:O});m.config.chart.events.xAxisLabelClick(Y,c.ctx,X)}}),e){var F=document.createElementNS(m.globals.SVGNS,"title");F.textContent=Array.isArray(R.text)?R.text.join(" "):R.text,z.node.appendChild(F),R.text!==""&&(h.push(R.text),p.push(R))}}O<S-1&&(C+=l(O+1,o))},M=0;M<=S-1;M++)T(M)}},{key:"drawXaxisInversed",value:function(e){var r,a,n=this,i=this.w,l=new ge(this.ctx),o=i.config.yaxis[0].opposite?i.globals.translateYAxisX[e]:0,c=l.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),d=l.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+o+", 0)"});c.add(d);var h=[];if(i.config.yaxis[e].show)for(var p=0;p<this.xaxisLabels.length;p++)h.push(this.xaxisLabels[p]);r=i.globals.gridHeight/h.length,a=-r/2.2;var m=i.globals.yLabelFormatters[0],x=i.config.yaxis[0].labels;if(x.show)for(var b=function(A){var T=h[A]===void 0?"":h[A];T=m(T,{seriesIndex:e,dataPointIndex:A,w:i});var M=n.axesUtils.getYAxisForeColor(x.style.colors,e),O=0;Array.isArray(T)&&(O=T.length/2*parseInt(x.style.fontSize,10));var _=x.offsetX-15,R="end";n.yaxis.opposite&&(R="start"),i.config.yaxis[0].labels.align==="left"?(_=x.offsetX,R="start"):i.config.yaxis[0].labels.align==="center"?(_=x.offsetX,R="middle"):i.config.yaxis[0].labels.align==="right"&&(R="end");var L=l.drawText({x:_,y:a+r+x.offsetY-O,text:T,textAnchor:R,foreColor:Array.isArray(M)?M[A]:M,fontSize:x.style.fontSize,fontFamily:x.style.fontFamily,fontWeight:x.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+x.style.cssClass,maxWidth:x.maxWidth});d.add(L),L.on("click",function(Y){if(typeof i.config.chart.events.xAxisLabelClick=="function"){var X=Object.assign({},i,{labelIndex:A});i.config.chart.events.xAxisLabelClick(Y,n.ctx,X)}});var z=document.createElementNS(i.globals.SVGNS,"title");if(z.textContent=Array.isArray(T)?T.join(" "):T,L.node.appendChild(z),i.config.yaxis[e].labels.rotate!==0){var F=l.rotateAroundCenter(L.node);L.node.setAttribute("transform","rotate(".concat(i.config.yaxis[e].labels.rotate," 0 ").concat(F.y,")"))}a+=r},y=0;y<=h.length-1;y++)b(y);if(i.config.yaxis[0].title.text!==void 0){var v=l.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+o+", 0)"}),N=l.drawText({x:i.config.yaxis[0].title.offsetX,y:i.globals.gridHeight/2+i.config.yaxis[0].title.offsetY,text:i.config.yaxis[0].title.text,textAnchor:"middle",foreColor:i.config.yaxis[0].title.style.color,fontSize:i.config.yaxis[0].title.style.fontSize,fontWeight:i.config.yaxis[0].title.style.fontWeight,fontFamily:i.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[0].title.style.cssClass});v.add(N),c.add(v)}var C=0;this.isCategoryBarHorizontal&&i.config.yaxis[0].opposite&&(C=i.globals.gridWidth);var S=i.config.xaxis.axisBorder;if(S.show){var k=l.drawLine(i.globals.padHorizontal+S.offsetX+C,1+S.offsetY,i.globals.padHorizontal+S.offsetX+C,i.globals.gridHeight+S.offsetY,S.color,0);this.elgrid&&this.elgrid.elGridBorders&&i.config.grid.show?this.elgrid.elGridBorders.add(k):c.add(k)}return i.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(C,h.length,i.config.yaxis[0].axisBorder,i.config.yaxis[0].axisTicks,0,r,c),c}},{key:"drawXaxisTicks",value:function(e,r,a){var n=this.w,i=e;if(!(e<0||e-2>n.globals.gridWidth)){var l=this.offY+n.config.xaxis.axisTicks.offsetY;if(r=r+l+n.config.xaxis.axisTicks.height,n.config.xaxis.position==="top"&&(r=l-n.config.xaxis.axisTicks.height),n.config.xaxis.axisTicks.show){var o=new ge(this.ctx).drawLine(e+n.config.xaxis.axisTicks.offsetX,l+n.config.xaxis.offsetY,i+n.config.xaxis.axisTicks.offsetX,r+n.config.xaxis.offsetY,n.config.xaxis.axisTicks.color);a.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,r=[],a=this.xaxisLabels.length,n=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var i=0;i<a;i++)n=this.xaxisLabels[i].position,r.push(n);else for(var l=a,o=0;o<l;o++){var c=l;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(c-=1),n+=e.globals.gridWidth/c,r.push(n)}return r}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,r=new ge(this.ctx),a=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var o=0;o<n.length;o++){var c=r.rotateAroundCenter(n[o]);c.y=c.y-1,c.x=c.x+1,n[o].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(c.x," ").concat(c.y,")")),n[o].setAttribute("text-anchor","end"),a.setAttribute("transform","translate(0, ".concat(-10,")"));var d=n[o].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(d,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),b=0;b<n.length;b++){var y=n[b].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(y,function(v){r.placeTextWithEllipsis(v,v.textContent,x)})}})();if(i.length>0){var h=i[i.length-1].getBBox(),p=i[0].getBBox();h.x<-20&&i[i.length-1].parentNode.removeChild(i[i.length-1]),p.x+p.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&i[0].parentNode.removeChild(i[0]);for(var m=0;m<l.length;m++)r.placeTextWithEllipsis(l[m],l[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}(),d_=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 wl(e),this.isRangeBar=r.globals.seriesRange.length&&r.globals.isBarHorizontal,r.globals.timescaleLabels.length>0&&(this.xaxisLabels=r.globals.timescaleLabels.slice())}return Ce(t,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,r=this.w,a=new ge(this.ctx);e||(e=a.group({class:"apexcharts-grid"}));var n=a.drawLine(r.globals.padHorizontal,1,r.globals.padHorizontal,r.globals.gridHeight,"transparent"),i=a.drawLine(r.globals.padHorizontal,r.globals.gridHeight,r.globals.gridWidth,r.globals.gridHeight,"transparent");return e.add(i),e.add(n),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,a=new ge(this.ctx),n=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,Ar(e.config.stroke.width)):e.config.stroke.width,i=function(h){var p=document.createElementNS(r.SVGNS,"clipPath");return p.setAttribute("id",h),p};r.dom.elGridRectMask=i("gridRectMask".concat(r.cuid)),r.dom.elGridRectBarMask=i("gridRectBarMask".concat(r.cuid)),r.dom.elGridRectMarkerMask=i("gridRectMarkerMask".concat(r.cuid)),r.dom.elForecastMask=i("forecastMask".concat(r.cuid)),r.dom.elNonForecastMask=i("nonForecastMask".concat(r.cuid));var l=0,o=0;(["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(l=Math.max(e.config.grid.padding.left,r.barPadForNumericAxis),o=Math.max(e.config.grid.padding.right,r.barPadForNumericAxis)),r.dom.elGridRect=a.drawRect(-n/2-2,-n/2-2,r.gridWidth+n+4,r.gridHeight+n+4,0,"#fff"),r.dom.elGridRectBar=a.drawRect(-n/2-l-2,-n/2-2,r.gridWidth+n+o+l+4,r.gridHeight+n+4,0,"#fff");var c=e.globals.markers.largestSize;r.dom.elGridRectMarker=a.drawRect(Math.min(-n/2-l-2,-c),-c,r.gridWidth+Math.max(n+o+l+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 d=r.dom.baseEl.querySelector("defs");d.appendChild(r.dom.elGridRectMask),d.appendChild(r.dom.elGridRectBarMask),d.appendChild(r.dom.elGridRectMarkerMask),d.appendChild(r.dom.elForecastMask),d.appendChild(r.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(e){var r=e.i,a=e.x1,n=e.y1,i=e.x2,l=e.y2,o=e.xCount,c=e.parent,d=this.w;if(!(r===0&&d.globals.skipFirstTimelinelabel||r===o-1&&d.globals.skipLastTimelinelabel&&!d.config.xaxis.labels.formatter||d.config.chart.type==="radar")){d.config.grid.xaxis.lines.show&&this._drawGridLine({i:r,x1:a,y1:n,x2:i,y2:l,xCount:o,parent:c});var h=0;if(d.globals.hasXaxisGroups&&d.config.xaxis.tickPlacement==="between"){var p=d.globals.groups;if(p){for(var m=0,x=0;m<r&&x<p.length;x++)m+=p[x].cols;m===r&&(h=.6*d.globals.xAxisLabelsHeight)}}new yf(this.ctx).drawXaxisTicks(a,h,d.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(e){var r=e.i,a=e.x1,n=e.y1,i=e.x2,l=e.y2,o=e.xCount,c=e.parent,d=this.w,h=c.node.classList.contains("apexcharts-gridlines-horizontal"),p=d.globals.barPadForNumericAxis,m=n===0&&l===0||a===0&&i===0||n===d.globals.gridHeight&&l===d.globals.gridHeight||d.globals.isBarHorizontal&&(r===0||r===o-1),x=new ge(this).drawLine(a-(h?p:0),n,i+(h?p:0),l,d.config.grid.borderColor,d.config.grid.strokeDashArray);x.node.classList.add("apexcharts-gridline"),m&&d.config.grid.show?this.elGridBorders.add(x):c.add(x)}},{key:"_drawGridBandRect",value:function(e){var r=e.c,a=e.x1,n=e.y1,i=e.x2,l=e.y2,o=e.type,c=this.w,d=new ge(this.ctx),h=c.globals.barPadForNumericAxis,p=c.config.grid[o].colors[r],m=d.drawRect(a-(o==="row"?h:0),n,i+(o==="row"?2*h:0),l,0,p,c.config.grid[o].opacity);this.elg.add(m),m.attr("clip-path","url(#gridRectMask".concat(c.globals.cuid,")")),m.node.classList.add("apexcharts-grid-".concat(o))}},{key:"_drawXYLines",value:function(e){var r=this,a=e.xCount,n=e.tickAmount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){var l,o=i.globals.padHorizontal,c=i.globals.gridHeight;i.globals.timescaleLabels.length?function(b){for(var y=b.xC,v=b.x1,N=b.y1,C=b.x2,S=b.y2,k=0;k<y;k++)v=r.xaxisLabels[k].position,C=r.xaxisLabels[k].position,r._drawGridLines({i:k,x1:v,y1:N,x2:C,y2:S,xCount:a,parent:r.elgridLinesV})}({xC:a,x1:o,y1:0,x2:l,y2:c}):(i.globals.isXNumeric&&(a=i.globals.xAxisScale.result.length),function(b){for(var y=b.xC,v=b.x1,N=b.y1,C=b.x2,S=b.y2,k=0;k<y+(i.globals.isXNumeric?0:1);k++)k===0&&y===1&&i.globals.dataPoints===1&&(C=v=i.globals.gridWidth/2),r._drawGridLines({i:k,x1:v,y1:N,x2:C,y2:S,xCount:a,parent:r.elgridLinesV}),C=v+=i.globals.gridWidth/(i.globals.isXNumeric?y-1:y)}({xC:a,x1:o,y1:0,x2:l,y2:c}))}if(i.config.grid.yaxis.lines.show){var d=0,h=0,p=i.globals.gridWidth,m=n+1;this.isRangeBar&&(m=i.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:d,x2:p,y2:h,parent:this.elgridLinesH}),h=d+=i.globals.gridHeight/(this.isRangeBar?m:n)}}},{key:"_drawInvertedXYLines",value:function(e){var r=e.xCount,a=this.w;if(a.config.grid.xaxis.lines.show||a.config.xaxis.axisTicks.show)for(var n,i=a.globals.padHorizontal,l=a.globals.gridHeight,o=0;o<r+1;o++)a.config.grid.xaxis.lines.show&&this._drawGridLine({i:o,xCount:r+1,x1:i,y1:0,x2:n,y2:l,parent:this.elgridLinesV}),new yf(this.ctx).drawXaxisTicks(i,0,a.globals.dom.elGraphical),n=i+=a.globals.gridWidth/r;if(a.config.grid.yaxis.lines.show)for(var c=0,d=0,h=a.globals.gridWidth,p=0;p<a.globals.dataPoints+1;p++)this._drawGridLine({i:p,xCount:a.globals.dataPoints+1,x1:0,y1:c,x2:h,y2:d,parent:this.elgridLinesH}),d=c+=a.globals.gridHeight/a.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,r=e.globals,a=new ge(this.ctx);this.elg=a.group({class:"apexcharts-grid"}),this.elgridLinesH=a.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=a.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=a.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 n=0;n<r.seriesYAxisMap.length&&r.ignoreYAxisIndexes.includes(n);)n++;n===r.seriesYAxisMap.length&&(n=0);var i,l=r.yAxisScale[n].result.length-1;if(!r.isBarHorizontal||this.isRangeBar){var o,c,d;i=this.xaxisLabels.length,this.isRangeBar&&(l=r.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(i=e.config.xaxis.tickAmount),((o=r.yAxisScale)===null||o===void 0||(c=o[n])===null||c===void 0||(d=c.result)===null||d===void 0?void 0:d.length)>0&&e.config.xaxis.type!=="datetime"&&(i=r.yAxisScale[n].result.length-1)),this._drawXYLines({xCount:i,tickAmount:l})}else i=l,l=r.xTickAmount,this._drawInvertedXYLines({xCount:i,tickAmount:l});return this.drawGridBands(i,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:r.gridWidth/i}}},{key:"drawGridBands",value:function(e,r){var a,n,i=this,l=this.w;if(((a=l.config.grid.row.colors)===null||a===void 0?void 0:a.length)>0&&function(b,y,v,N,C,S){for(var k=0,A=0;k<y;k++,A++)A>=l.config.grid[b].colors.length&&(A=0),i._drawGridBandRect({c:A,x1:v,y1:N,x2:C,y2:S,type:b}),N+=l.globals.gridHeight/r}("row",r,0,0,l.globals.gridWidth,l.globals.gridHeight/r),((n=l.config.grid.column.colors)===null||n===void 0?void 0:n.length)>0){var o=l.globals.isBarHorizontal||l.config.xaxis.tickPlacement!=="on"||l.config.xaxis.type!=="category"&&!l.config.xaxis.convertedCatToNumeric?e:e-1;l.globals.isXNumeric&&(o=l.globals.xAxisScale.result.length-1);for(var c=l.globals.padHorizontal,d=l.globals.padHorizontal+l.globals.gridWidth/o,h=l.globals.gridHeight,p=0,m=0;p<e;p++,m++){var x;m>=l.config.grid.column.colors.length&&(m=0),l.config.xaxis.type==="datetime"&&(c=this.xaxisLabels[p].position,d=(((x=this.xaxisLabels[p+1])===null||x===void 0?void 0:x.position)||l.globals.gridWidth)-this.xaxisLabels[p].position),this._drawGridBandRect({c:m,x1:c,y1:0,x2:d,y2:h,type:"column"}),c+=l.globals.gridWidth/o}}}}]),t}(),u_=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new or(this.ctx)}return Ce(t,[{key:"niceScale",value:function(e,r){var a,n,i,l,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,c=1e-11,d=this.w,h=d.globals;h.isBarHorizontal?(a=d.config.xaxis,n=Math.max((h.svgWidth-100)/25,2)):(a=d.config.yaxis[o],n=Math.max((h.svgHeight-100)/15,2)),J.isNumber(n)||(n=10),i=a.min!==void 0&&a.min!==null,l=a.max!==void 0&&a.min!==null;var p=a.stepSize!==void 0&&a.stepSize!==null,m=a.tickAmount!==void 0&&a.tickAmount!==null,x=m?a.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(n/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(a.min)?a.min:0,r=J.isNumber(a.max)?a.max:e+x,h.allSeriesCollapsed=!1),e>r){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var b=r;r=e,e=b}else e===r&&(e=e===0?0:e-1,r=r===0?2:r+1);var y=[];x<1&&(x=1);var v=x,N=Math.abs(r-e);!i&&e>0&&e/N<.15&&(e=0,i=!0),!l&&r<0&&-r/N<.15&&(r=0,l=!0);var C=(N=Math.abs(r-e))/v,S=C,k=Math.floor(Math.log10(S)),A=Math.pow(10,k),T=Math.ceil(S/A);if(C=S=(T=h.niceScaleAllowedMagMsd[h.yValueDecimal===0?0:1][T])*A,h.isBarHorizontal&&a.stepSize&&a.type!=="datetime"?(C=a.stepSize,p=!0):p&&(C=a.stepSize),p&&a.forceNiceScale){var M=Math.floor(Math.log10(C));C*=Math.pow(10,k-M)}if(i&&l){var O=N/v;if(m)if(p)if(J.mod(N,C)!=0){var _=J.getGCD(C,O);C=O/_<10?_:O}else J.mod(C,O)==0?C=O:(O=C,m=!1);else C=O;else if(p)J.mod(N,C)==0?O=C:C=O;else if(J.mod(N,C)==0)O=C;else{O=N/(v=Math.ceil(N/C));var R=J.getGCD(N,C);N/R<n&&(O=R),C=O}v=Math.round(N/C)}else{if(i||l){if(l)if(m)e=r-C*v;else{var L=e;e=C*Math.floor(e/C),Math.abs(r-e)/J.getGCD(N,C)>n&&(e=r-C*x,e+=C*Math.floor((L-e)/C))}else if(i)if(m)r=e+C*v;else{var z=r;r=C*Math.ceil(r/C),Math.abs(r-e)/J.getGCD(N,C)>n&&(r=e+C*x,r+=C*Math.ceil((z-r)/C))}}else if(h.isMultipleYAxis&&m){var F=C*Math.floor(e/C),Y=F+C*v;Y<r&&(C*=2),Y=r,r=(e=F)+C*v,N=Math.abs(r-e),e>0&&e<Math.abs(Y-r)&&(e=0,r=C*v),r<0&&-r<Math.abs(F-e)&&(r=0,e=-C*v)}else e=C*Math.floor(e/C),r=C*Math.ceil(r/C);N=Math.abs(r-e),C=J.getGCD(N,C),v=Math.round(N/C)}if(m||i||l||(v=Math.ceil((N-c)/(C+c)))>16&&J.getPrimeFactors(v).length<2&&v++,!m&&a.forceNiceScale&&h.yValueDecimal===0&&v>N&&(v=N,C=Math.round(N/v)),v>n&&(!m&&!p||a.forceNiceScale)){var X=J.getPrimeFactors(v),H=X.length-1,W=v;e:for(var V=0;V<H;V++)for(var Z=0;Z<=H-V;Z++){for(var B=Math.min(Z+V,H),G=W,te=1,K=Z;K<=B;K++)te*=X[K];if((G/=te)<n){W=G;break e}}C=W===v?N:N/W,v=Math.round(N/C)}h.isMultipleYAxis&&h.multiAxisTickAmount==0&&h.ignoreYAxisIndexes.indexOf(o)<0&&(h.multiAxisTickAmount=v);var U=e-C,re=C*c;do U+=C,y.push(J.stripNumber(U,7));while(r-U>re);return{result:y,niceMin:y[0],niceMax:y[y.length-1]}}},{key:"linearScale",value:function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,l=Math.abs(r-e),o=[];if(e===r)return{result:o=[e],niceMin:o[0],niceMax:o[o.length-1]};(a=this._adjustTicksForSmallRange(a,n,l))==="dataPoints"&&(a=this.w.globals.dataPoints-1),i||(i=l/a),i=Math.round(100*(i+Number.EPSILON))/100,a===Number.MAX_VALUE&&(a=5,i=1);for(var c=e;a>=0;)o.push(c),c=J.preciseAddition(c,i),a-=1;return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}},{key:"logarithmicScaleNice",value:function(e,r,a){r<=0&&(r=Math.max(e,a)),e<=0&&(e=Math.min(r,a));for(var n=[],i=Math.ceil(Math.log(r)/Math.log(a)+1),l=Math.floor(Math.log(e)/Math.log(a));l<i;l++)n.push(Math.pow(a,l));return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScale",value:function(e,r,a){r<=0&&(r=Math.max(e,a)),e<=0&&(e=Math.min(r,a));for(var n=[],i=Math.log(r)/Math.log(a),l=Math.log(e)/Math.log(a),o=i-l,c=Math.round(o),d=o/c,h=0,p=l;h<c;h++,p+=d)n.push(Math.pow(a,p));return n.push(Math.pow(a,i)),{result:n,niceMin:e,niceMax:r}}},{key:"_adjustTicksForSmallRange",value:function(e,r,a){var n=e;if(r!==void 0&&this.w.config.yaxis[r].labels.formatter&&this.w.config.yaxis[r].tickAmount===void 0){var i=Number(this.w.config.yaxis[r].labels.formatter(1));J.isNumber(i)&&this.w.globals.yValueDecimal===0&&(n=Math.ceil(a))}return n<e?n:e}},{key:"setYScaleForIndex",value:function(e,r,a){var n=this.w.globals,i=this.w.config,l=n.isBarHorizontal?i.xaxis:i.yaxis[e];n.yAxisScale[e]===void 0&&(n.yAxisScale[e]=[]);var o=Math.abs(a-r);l.logarithmic&&o<=5&&(n.invalidLogScale=!0),l.logarithmic&&o>5?(n.allSeriesCollapsed=!1,n.yAxisScale[e]=l.forceNiceScale?this.logarithmicScaleNice(r,a,l.logBase):this.logarithmicScale(r,a,l.logBase)):a!==-Number.MAX_VALUE&&J.isNumber(a)&&r!==Number.MAX_VALUE&&J.isNumber(r)?(n.allSeriesCollapsed=!1,n.yAxisScale[e]=this.niceScale(r,a,e)):n.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,r){var a=this.w,n=a.globals;if(r!==-Number.MAX_VALUE&&J.isNumber(r)){var i=n.xTickAmount;n.xAxisScale=this.linearScale(e,r,i,0,a.config.xaxis.stepSize)}else n.xAxisScale=this.linearScale(0,10,10);return n.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,r=this.w.config,a=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var n=a.seriesYAxisMap,i=a.minYArr,l=a.maxYArr;a.allSeriesCollapsed=!0,a.barGroups=[],n.forEach(function(o,c){var d=[];o.forEach(function(h){var p,m=(p=r.series[h])===null||p===void 0?void 0:p.group;d.indexOf(m)<0&&d.push(m)}),o.length>0?function(){var h,p,m=Number.MAX_VALUE,x=-Number.MAX_VALUE,b=m,y=x;if(r.chart.stacked)(function(){var C=new Array(a.dataPoints).fill(0),S=[],k=[],A=[];d.forEach(function(){S.push(C.map(function(){return Number.MIN_VALUE})),k.push(C.map(function(){return Number.MIN_VALUE})),A.push(C.map(function(){return Number.MIN_VALUE}))});for(var T=function(O){!h&&r.series[o[O]].type&&(h=r.series[o[O]].type);var _=o[O];p=r.series[_].group?r.series[_].group:"axis-".concat(c),!(a.collapsedSeriesIndices.indexOf(_)<0&&a.ancillaryCollapsedSeriesIndices.indexOf(_)<0)||(a.allSeriesCollapsed=!1,d.forEach(function(R,L){if(r.series[_].group===R)for(var z=0;z<a.series[_].length;z++){var F=a.series[_][z];F>=0?k[L][z]+=F:A[L][z]+=F,S[L][z]+=F,b=Math.min(b,F),y=Math.max(y,F)}})),h!=="bar"&&h!=="column"||a.barGroups.push(p)},M=0;M<o.length;M++)T(M);h||(h=r.chart.type),h==="bar"||h==="column"?d.forEach(function(O,_){m=Math.min(m,Math.min.apply(null,A[_])),x=Math.max(x,Math.max.apply(null,k[_]))}):(d.forEach(function(O,_){b=Math.min(b,Math.min.apply(null,S[_])),y=Math.max(y,Math.max.apply(null,S[_]))}),m=b,x=y),m===Number.MIN_VALUE&&x===Number.MIN_VALUE&&(x=-Number.MAX_VALUE)})();else for(var v=0;v<o.length;v++){var N=o[v];m=Math.min(m,i[N]),x=Math.max(x,l[N]),!(a.collapsedSeriesIndices.indexOf(N)<0&&a.ancillaryCollapsedSeriesIndices.indexOf(N)<0)||(a.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),a.barGroups=a.barGroups.filter(function(C,S,k){return k.indexOf(C)===S}),e.setYScaleForIndex(c,m,x),o.forEach(function(C){i[C]=a.yAxisScale[c].niceMin,l[C]=a.yAxisScale[c].niceMax})}():e.setYScaleForIndex(c,0,-Number.MAX_VALUE)})}}]),t}(),xj=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.scales=new u_(e)}return Ce(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,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=this.w.config,l=this.w.globals,o=-Number.MAX_VALUE,c=Number.MIN_VALUE;n===null&&(n=e+1);var d=l.series,h=d,p=d;i.chart.type==="candlestick"?(h=l.seriesCandleL,p=l.seriesCandleH):i.chart.type==="boxPlot"?(h=l.seriesCandleO,p=l.seriesCandleC):l.isRangeData&&(h=l.seriesRangeStart,p=l.seriesRangeEnd);var m=!1;if(l.seriesX.length>=n){var x,b=(x=l.brushSource)===null||x===void 0?void 0:x.w.config.chart.brush;(i.chart.zoom.enabled&&i.chart.zoom.autoScaleYaxis||b!=null&&b.enabled&&b!=null&&b.autoScaleYaxis)&&(m=!0)}for(var y=e;y<n;y++){l.dataPoints=Math.max(l.dataPoints,d[y].length);var v=i.series[y].type;l.categoryLabels.length&&(l.dataPoints=l.categoryLabels.filter(function(_){return _!==void 0}).length),l.labels.length&&i.xaxis.type!=="datetime"&&l.series.reduce(function(_,R){return _+R.length},0)!==0&&(l.dataPoints=Math.max(l.dataPoints,l.labels.length));var N=0,C=d[y].length-1;if(m){if(i.xaxis.min)for(;N<C&&l.seriesX[y][N]<i.xaxis.min;N++);if(i.xaxis.max)for(;C>N&&l.seriesX[y][C]>i.xaxis.max;C--);}for(var S=N;S<=C&&S<l.series[y].length;S++){var k=d[y][S];if(k!==null&&J.isNumber(k)){var A,T,M,O;switch(((A=p[y])===null||A===void 0?void 0:A[S])!==void 0&&(o=Math.max(o,p[y][S]),r=Math.min(r,p[y][S])),((T=h[y])===null||T===void 0?void 0:T[S])!==void 0&&(r=Math.min(r,h[y][S]),a=Math.max(a,h[y][S])),v){case"candlestick":l.seriesCandleC[y][S]!==void 0&&(o=Math.max(o,l.seriesCandleH[y][S]),r=Math.min(r,l.seriesCandleL[y][S]));break;case"boxPlot":l.seriesCandleC[y][S]!==void 0&&(o=Math.max(o,l.seriesCandleC[y][S]),r=Math.min(r,l.seriesCandleO[y][S]))}v&&v!=="candlestick"&&v!=="boxPlot"&&v!=="rangeArea"&&v!=="rangeBar"&&(o=Math.max(o,l.series[y][S]),r=Math.min(r,l.series[y][S])),l.seriesGoals[y]&&l.seriesGoals[y][S]&&Array.isArray(l.seriesGoals[y][S])&&l.seriesGoals[y][S].forEach(function(_){o=Math.max(o,_.value),r=Math.min(r,_.value)}),a=o,k=J.noExponents(k),J.isFloat(k)&&(l.yValueDecimal=Math.max(l.yValueDecimal,k.toString().split(".")[1].length)),c>((M=h[y])===null||M===void 0?void 0:M[S])&&((O=h[y])===null||O===void 0?void 0:O[S])<0&&(c=h[y][S])}else l.hasNullValues=!0}v!=="bar"&&v!=="column"||(c<0&&o<0&&(o=0,a=Math.max(a,0)),c===Number.MIN_VALUE&&(c=0,r=Math.min(r,0)))}return i.chart.type==="rangeBar"&&l.seriesRangeStart.length&&l.isBarHorizontal&&(c=r),i.chart.type==="bar"&&(c<0&&o<0&&(o=0),c===Number.MIN_VALUE&&(c=0)),{minY:c,maxY:o,lowestY:r,highestY:a}}},{key:"setYRange",value:function(){var e=this.w.globals,r=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var a,n=Number.MAX_VALUE;if(e.isMultipleYAxis){n=Number.MAX_VALUE;for(var i=0;i<e.series.length;i++)a=this.getMinYMaxY(i),e.minYArr[i]=a.lowestY,e.maxYArr[i]=a.highestY,n=Math.min(n,a.lowestY)}return a=this.getMinYMaxY(0,n,null,e.series.length),r.chart.type==="bar"?(e.minY=a.minY,e.maxY=a.maxY):(e.minY=a.lowestY,e.maxY=a.highestY),n=a.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&&n!==-Number.MAX_VALUE&&n!==e.maxY&&(e.minY=n):e.minY=e.minY!==Number.MIN_VALUE?Math.min(a.minY,e.minY):a.minY,r.yaxis.forEach(function(l,o){l.max!==void 0&&(typeof l.max=="number"?e.maxYArr[o]=l.max:typeof l.max=="function"&&(e.maxYArr[o]=l.max(e.isMultipleYAxis?e.maxYArr[o]:e.maxY)),e.maxY=e.maxYArr[o]),l.min!==void 0&&(typeof l.min=="number"?e.minYArr[o]=l.min:typeof l.min=="function"&&(e.minYArr[o]=l.min(e.isMultipleYAxis?e.minYArr[o]===Number.MIN_VALUE?0:e.minYArr[o]:e.minY)),e.minY=e.minYArr[o])}),e.isBarHorizontal&&["min","max"].forEach(function(l){r.xaxis[l]!==void 0&&typeof r.xaxis[l]=="number"&&(l==="min"?e.minY=r.xaxis[l]:e.maxY=r.xaxis[l])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=n):(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(l){switch(l.type||r.chart.type){case"bar":case"column":e.barGroups.push(l.group);break;case"line":e.lineGroups.push(l.group);break;case"area":e.areaGroups.push(l.group)}}),e.barGroups=e.barGroups.filter(function(l,o,c){return c.indexOf(l)===o}),e.lineGroups=e.lineGroups.filter(function(l,o,c){return c.indexOf(l)===o}),e.areaGroups=e.areaGroups.filter(function(l,o,c){return c.indexOf(l)===o}),{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,a=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 d=0;d<e.labels[c].length;d++)e.labels[c][d]!==null&&J.isNumber(e.labels[c][d])&&(e.maxX=Math.max(e.maxX,e.labels[c][d]),e.initialMaxX=Math.max(e.maxX,e.labels[c][d]),e.minX=Math.min(e.minX,e.labels[c][d]),e.initialMinX=Math.min(e.minX,e.labels[c][d]))}(),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 n=10;if(r.xaxis.tickAmount===void 0)n=Math.round(e.svgWidth/150),r.xaxis.type==="numeric"&&e.dataPoints<30&&(n=e.dataPoints-1),n>e.dataPoints&&e.dataPoints!==0&&(n=e.dataPoints-1);else if(r.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(n=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var i=Math.round(e.maxX-e.minX);i<30&&(n=i)}}else n=r.xaxis.tickAmount;if(e.xTickAmount=n,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 l=[],o=e.minX-1;o<e.maxX;o++)l.push(o+1);e.xAxisScale={result:l,niceMin:l[0],niceMax:l[l.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,n,n,0,r.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,n-1,0,r.xaxis.stepSize),e.seriesX=e.labels.slice());a&&(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 a=0;a<e.seriesZ[r].length;a++)e.seriesZ[r][a]!==null&&J.isNumber(e.seriesZ[r][a])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[r][a]),e.minZ=Math.min(e.minZ,e.seriesZ[r][a]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,r=this.w.config;if(e.minX===e.maxX){var a=new qr(this.ctx);if(r.xaxis.type==="datetime"){var n=a.getDate(e.minX);r.xaxis.labels.datetimeUTC?n.setUTCDate(n.getUTCDate()-2):n.setDate(n.getDate()-2),e.minX=new Date(n).getTime();var i=a.getDate(e.maxX);r.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()+2):i.setDate(i.getDate()+2),e.maxX=new Date(i).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,a){if(r.length){r.length===1&&r.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var n=r.slice();n.sort(function(i,l){return i-l}),n.forEach(function(i,l){if(l>0){var o=i-n[l-1];o>0&&(e.minXDiff=Math.min(o,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 a=r.seriesGroups;a.length||(a=[this.w.globals.seriesNames.map(function(l){return l})]);var n={},i={};a.forEach(function(l){n[l]=[],i[l]=[],e.w.config.series.map(function(o,c){return l.indexOf(r.seriesNames[c])>-1?c:null}).filter(function(o){return o!==null}).forEach(function(o){for(var c=0;c<r.series[r.maxValsInArrayIndex].length;c++){var d,h,p,m;n[l][c]===void 0&&(n[l][c]=0,i[l][c]=0),(e.w.config.chart.stacked&&!r.comboCharts||e.w.config.chart.stacked&&r.comboCharts&&(!e.w.config.chart.stackOnlyBar||((d=e.w.config.series)===null||d===void 0||(h=d[o])===null||h===void 0?void 0:h.type)==="bar"||((p=e.w.config.series)===null||p===void 0||(m=p[o])===null||m===void 0?void 0:m.type)==="column"))&&r.series[o][c]!==null&&J.isNumber(r.series[o][c])&&(r.series[o][c]>0?n[l][c]+=parseFloat(r.series[o][c])+1e-4:i[l][c]+=parseFloat(r.series[o][c]))}})}),Object.entries(n).forEach(function(l){var o=OR(l,1)[0];n[o].forEach(function(c,d){r.maxY=Math.max(r.maxY,n[o][d]),r.minY=Math.min(r.minY,i[o][d])})})}}}]),t}(),cN=function(){function t(e,r){Se(this,t),this.ctx=e,this.elgrid=r,this.w=e.w;var a=this.w;this.xaxisFontSize=a.config.xaxis.labels.style.fontSize,this.axisFontFamily=a.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=a.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=a.config.chart.type==="bar"&&a.config.plotOptions.bar.horizontal,this.xAxisoffX=a.config.xaxis.position==="bottom"?a.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new wl(e)}return Ce(t,[{key:"drawYaxis",value:function(e){var r=this.w,a=new ge(this.ctx),n=r.config.yaxis[e].labels.style,i=n.fontSize,l=n.fontFamily,o=n.fontWeight,c=a.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(r.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return c;var d=a.group({class:"apexcharts-yaxis-texts-g"});c.add(d);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 b=r.globals.translateY+r.config.yaxis[e].labels.offsetY;r.globals.isBarHorizontal?b=0:r.config.chart.type==="heatmap"&&(b-=p/2),b+=parseInt(i,10)/3;for(var y=h;y>=0;y--){var v=m(x[y],y,r),N=r.config.yaxis[e].labels.padding;r.config.yaxis[e].opposite&&r.config.yaxis.length!==0&&(N*=-1);var C=this.getTextAnchor(r.config.yaxis[e].labels.align,r.config.yaxis[e].opposite),S=this.axesUtils.getYAxisForeColor(n.colors,e),k=Array.isArray(S)?S[y]:S,A=J.listToArray(r.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(M){return M.textContent}),T=a.drawText({x:N,y:b,text:A.includes(v)&&!r.config.yaxis[e].labels.showDuplicates?"":v,textAnchor:C,fontSize:i,fontFamily:l,fontWeight:o,maxWidth:r.config.yaxis[e].labels.maxWidth,foreColor:k,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(n.cssClass)});d.add(T),this.addTooltip(T,v),r.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(a,T,firstLabel,r.config.yaxis[e].labels.rotate),b+=p}}return this.addYAxisTitle(a,c,e),this.addAxisBorder(a,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 a=document.createElementNS(this.w.globals.SVGNS,"title");a.textContent=Array.isArray(r)?r.join(" "):r,e.node.appendChild(a)}},{key:"rotateLabel",value:function(e,r,a,n){var i=e.rotateAroundCenter(a.node),l=e.rotateAroundCenter(r.node);r.node.setAttribute("transform","rotate(".concat(n," ").concat(i.x," ").concat(l.y,")"))}},{key:"addYAxisTitle",value:function(e,r,a){var n=this.w;if(n.config.yaxis[a].title.text!==void 0){var i=e.group({class:"apexcharts-yaxis-title"}),l=n.config.yaxis[a].opposite?n.globals.translateYAxisX[a]:0,o=e.drawText({x:l,y:n.globals.gridHeight/2+n.globals.translateY+n.config.yaxis[a].title.offsetY,text:n.config.yaxis[a].title.text,textAnchor:"end",foreColor:n.config.yaxis[a].title.style.color,fontSize:n.config.yaxis[a].title.style.fontSize,fontWeight:n.config.yaxis[a].title.style.fontWeight,fontFamily:n.config.yaxis[a].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(n.config.yaxis[a].title.style.cssClass)});i.add(o),r.add(i)}}},{key:"addAxisBorder",value:function(e,r,a,n,i){var l=this.w,o=l.config.yaxis[a].axisBorder,c=31+o.offsetX;if(l.config.yaxis[a].opposite&&(c=-31-o.offsetX),o.show){var d=e.drawLine(c,l.globals.translateY+o.offsetY-2,c,l.globals.gridHeight+l.globals.translateY+o.offsetY+2,o.color,0,o.width);r.add(d)}l.config.yaxis[a].axisTicks.show&&this.axesUtils.drawYAxisTicks(c,n,o,l.config.yaxis[a].axisTicks,a,i,r)}},{key:"drawYaxisInversed",value:function(e){var r=this.w,a=new ge(this.ctx),n=a.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),i=a.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(r.globals.translateXAxisX,", ").concat(r.globals.translateXAxisY,")")});n.add(i);var l=r.globals.yAxisScale[e].result.length-1,o=r.globals.gridWidth/l+.1,c=o+r.config.xaxis.labels.offsetX,d=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(),l=(h=p.slice()).length),r.config.xaxis.labels.show)for(var m=p.length?0:l;p.length?m<p.length:m>=0;p.length?m++:m--){var x=d(h[m],m,r),b=r.globals.gridWidth+r.globals.padHorizontal-(c-o+r.config.xaxis.labels.offsetX);if(p.length){var y=this.axesUtils.getLabel(h,p,b,m,this.drawnLabels,this.xaxisFontSize);b=y.x,x=y.text,this.drawnLabels.push(y.text),m===0&&r.globals.skipFirstTimelinelabel&&(x=""),m===h.length-1&&r.globals.skipLastTimelinelabel&&(x="")}var v=a.drawText({x:b,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)});i.add(v),v.tspan(x),this.addTooltip(v,x),c+=o}return this.inversedYAxisTitleText(n),this.inversedYAxisBorder(n),n}},{key:"inversedYAxisBorder",value:function(e){var r=this.w,a=new ge(this.ctx),n=r.config.xaxis.axisBorder;if(n.show){var i=0;r.config.chart.type==="bar"&&r.globals.isXNumeric&&(i-=15);var l=a.drawLine(r.globals.padHorizontal+i+n.offsetX,this.xAxisoffX,r.globals.gridWidth,this.xAxisoffX,n.color,0,n.height);this.elgrid&&this.elgrid.elGridBorders&&r.config.grid.show?this.elgrid.elGridBorders.add(l):e.add(l)}}},{key:"inversedYAxisTitleText",value:function(e){var r=this.w,a=new ge(this.ctx);if(r.config.xaxis.title.text!==void 0){var n=a.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),i=a.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)});n.add(i),e.add(n)}}},{key:"yAxisTitleRotate",value:function(e,r){var a=this.w,n=new ge(this.ctx),i=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),l=i?i.getBoundingClientRect():{width:0,height:0},o=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text")),c=o?o.getBoundingClientRect():{width:0,height:0};if(o){var d=this.xPaddingForYAxisTitle(e,l,c,r);o.setAttribute("x",d.xPos-(r?10:0));var h=n.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(r?-1*a.config.yaxis[e].title.rotate:a.config.yaxis[e].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,r,a,n){var i=this.w,l=0,o=10;return i.config.yaxis[e].title.text===void 0||e<0?{xPos:l,padd:0}:(n?l=r.width+i.config.yaxis[e].title.offsetX+a.width/2+o/2:(l=-1*r.width+i.config.yaxis[e].title.offsetX+o/2+a.width/2,i.globals.isBarHorizontal&&(o=25,l=-1*r.width-i.config.yaxis[e].title.offsetX-o)),{xPos:l,padd:o})}},{key:"setYAxisXPosition",value:function(e,r){var a=this.w,n=0,i=0,l=18,o=1;a.config.yaxis.length>1&&(this.multipleYs=!0),a.config.yaxis.forEach(function(c,d){var h=a.globals.ignoreYAxisIndexes.includes(d)||!c.show||c.floating||e[d].width===0,p=e[d].width+r[d].width;c.opposite?a.globals.isBarHorizontal?(i=a.globals.gridWidth+a.globals.translateX-1,a.globals.translateYAxisX[d]=i-c.labels.offsetX):(i=a.globals.gridWidth+a.globals.translateX+o,h||(o+=p+20),a.globals.translateYAxisX[d]=i-c.labels.offsetX+20):(n=a.globals.translateX-l,h||(l+=p+20),a.globals.translateYAxisX[d]=n+c.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;J.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(r,a){var n=e.config.yaxis[a];if(n&&!n.floating&&n.labels.align!==void 0){var i=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-texts-g")),l=J.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(a,"'] .apexcharts-yaxis-label"))),o=i.getBoundingClientRect();l.forEach(function(c){c.setAttribute("text-anchor",n.labels.align)}),n.labels.align!=="left"||n.opposite?n.labels.align==="center"?i.setAttribute("transform","translate(".concat(o.width/2*(n.opposite?1:-1),", 0)")):n.labels.align==="right"&&n.opposite&&i.setAttribute("transform","translate(".concat(o.width,", 0)")):i.setAttribute("transform","translate(-".concat(o.width,", 0)"))}})}}]),t}(),sK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w,this.documentEvent=J.bind(this.documentEvent,this)}return Ce(t,[{key:"addEventListener",value:function(e,r){var a=this.w;a.globals.events.hasOwnProperty(e)?a.globals.events[e].push(r):a.globals.events[e]=[r]}},{key:"removeEventListener",value:function(e,r){var a=this.w;if(a.globals.events.hasOwnProperty(e)){var n=a.globals.events[e].indexOf(r);n!==-1&&a.globals.events[e].splice(n,1)}}},{key:"fireEvent",value:function(e,r){var a=this.w;if(a.globals.events.hasOwnProperty(e)){r&&r.length||(r=[]);for(var n=a.globals.events[e],i=n.length,l=0;l<i;l++)n[l].apply(null,r)}}},{key:"setupEventHandlers",value:function(){var e=this,r=this.w,a=this.ctx,n=r.globals.dom.baseEl.querySelector(r.globals.chartClass);this.ctx.eventList.forEach(function(i){n.addEventListener(i,function(l){var o=l.target.getAttribute("i")===null&&r.globals.capturedSeriesIndex!==-1?r.globals.capturedSeriesIndex:l.target.getAttribute("i"),c=l.target.getAttribute("j")===null&&r.globals.capturedDataPointIndex!==-1?r.globals.capturedDataPointIndex:l.target.getAttribute("j"),d=Object.assign({},r,{seriesIndex:r.globals.axisCharts?o:0,dataPointIndex:c});l.type==="mousemove"||l.type==="touchmove"?typeof r.config.chart.events.mouseMove=="function"&&r.config.chart.events.mouseMove(l,a,d):l.type==="mouseleave"||l.type==="touchleave"?typeof r.config.chart.events.mouseLeave=="function"&&r.config.chart.events.mouseLeave(l,a,d):(l.type==="mouseup"&&l.which===1||l.type==="touchend")&&(typeof r.config.chart.events.click=="function"&&r.config.chart.events.click(l,a,d),a.ctx.events.fireEvent("click",[l,a,d]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(i){r.globals.dom.baseEl.addEventListener(i,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var r=this.w,a=e.target.className;if(e.type==="click"){var n=r.globals.dom.baseEl.querySelector(".apexcharts-menu");n&&n.classList.contains("apexcharts-menu-open")&&a!=="apexcharts-menu-icon"&&n.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}(),iK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(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 a=r.filter(function(i){return i.name===e})[0];if(!a)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var n=J.extend(l_,a);this.w.globals.locale=n.options}}]),t}(),lK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"drawAxis",value:function(e,r){var a,n,i=this,l=this.w.globals,o=this.w.config,c=new yf(this.ctx,r),d=new cN(this.ctx,r);l.axisCharts&&e!=="radar"&&(l.isBarHorizontal?(n=d.drawYaxisInversed(0),a=c.drawXaxisInversed(0),l.dom.elGraphical.add(a),l.dom.elGraphical.add(n)):(a=c.drawXaxis(),l.dom.elGraphical.add(a),o.yaxis.map(function(h,p){if(l.ignoreYAxisIndexes.indexOf(p)===-1&&(n=d.drawYaxis(p),l.dom.Paper.add(n),i.w.config.grid.position==="back")){var m=l.dom.Paper.children()[1];m.remove(),l.dom.Paper.add(m)}})))}}]),t}(),bj=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"drawXCrosshairs",value:function(){var e=this.w,r=new ge(this.ctx),a=new Kr(this.ctx),n=e.config.xaxis.crosshairs.fill.gradient,i=e.config.xaxis.crosshairs.dropShadow,l=e.config.xaxis.crosshairs.fill.type,o=n.colorFrom,c=n.colorTo,d=n.opacityFrom,h=n.opacityTo,p=n.stops,m=i.enabled,x=i.left,b=i.top,y=i.blur,v=i.color,N=i.opacity,C=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){l==="gradient"&&(C=r.drawGradient("vertical",o,c,d,h,null,p,null));var S=r.drawRect();e.config.xaxis.crosshairs.width===1&&(S=r.drawLine());var k=e.globals.gridHeight;(!J.isNumber(k)||k<0)&&(k=0);var A=e.config.xaxis.crosshairs.width;(!J.isNumber(A)||A<0)&&(A=0),S.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:k,width:A,height:k,fill:C,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=a.dropShadow(S,{left:x,top:b,blur:y,color:v,opacity:N})),e.globals.dom.elGraphical.add(S)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,r=new ge(this.ctx),a=e.config.yaxis[0].crosshairs,n=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var i=r.drawLine(-n,0,e.globals.gridWidth+n,0,a.stroke.color,a.stroke.dashArray,a.stroke.width);i.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(i)}var l=r.drawLine(-n,0,e.globals.gridWidth+n,0,a.stroke.color,0,0);l.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(l)}}]),t}(),oK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"checkResponsiveConfig",value:function(e){var r=this,a=this.w,n=a.config;if(n.responsive.length!==0){var i=n.responsive.slice();i.sort(function(d,h){return d.breakpoint>h.breakpoint?1:h.breakpoint>d.breakpoint?-1:0}).reverse();var l=new bf({}),o=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=i[0].breakpoint,p=window.innerWidth>0?window.innerWidth:screen.width;if(p>h){var m=J.clone(a.globals.initialConfig);m.series=J.clone(a.config.series);var x=or.extendArrayProps(l,m,a);d=J.extend(x,d),d=J.extend(a.config,d),r.overrideResponsiveOptions(d)}else for(var b=0;b<i.length;b++)p<i[b].breakpoint&&(d=or.extendArrayProps(l,i[b].options,a),d=J.extend(a.config,d),r.overrideResponsiveOptions(d))};if(e){var c=or.extendArrayProps(l,e,a);c=J.extend(a.config,c),o(c=J.extend(c,e))}else o({})}}},{key:"overrideResponsiveOptions",value:function(e){var r=new bf(e).init({responsiveOverride:!0});this.w.config=r}}]),t}(),cK=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 Ce(t,[{key:"checkHeatmapDistributed",value:function(){var e=this.w.config,r=e.chart,a=e.plotOptions;return r.type==="treemap"&&a.treemap&&a.treemap.distributed||r.type==="heatmap"&&a.heatmap&&a.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var e=this.w.config,r=e.chart,a=e.plotOptions;return a.bar&&a.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 a=Ar(e.config.colors||e.config.fill.colors||[]);e.globals.colors=this.getColors(a),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 n=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],n),this.applyDataLabelsColors(n),this.applyRadarPolygonsColors(),this.applyMarkersColors(n)}},{key:"getColors",value:function(e){var r=this,a=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,a.config.series.map(function(n,i){var l=e[i]||e[0];return typeof l=="function"?l({value:a.globals.axisCharts?a.globals.series[i][0]||0:a.globals.series[i],seriesIndex:i,dataPointIndex:i,w:r.w}):l})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,r){e.forEach(function(a,n){a&&(r[n]=a)})}},{key:"getMonochromeColors",value:function(e,r,a){var n=e.color,i=e.shadeIntensity,l=e.shadeTo,o=this.isBarDistributed||this.isHeatmapDistributed?r[0].length*r.length:r.length,c=1/(o/i),d=0;return Array.from({length:o},function(){var h=l==="dark"?a.shadeColor(-1*d,n):a.shadeColor(d,n);return d+=c,h})}},{key:"applyColorTypes",value:function(e,r){var a=this,n=this.w;e.forEach(function(i){n.globals[i].colors=n.config[i].colors===void 0?a.isColorFn?n.config.colors:r:n.config[i].colors.slice(),a.pushExtraColors(n.globals[i].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 a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=this.w,i=r||n.globals.series.length;if(a===null&&(a=this.isBarDistributed||this.isHeatmapDistributed||n.config.chart.type==="heatmap"&&n.config.plotOptions.heatmap&&n.config.plotOptions.heatmap.colorScale.inverse),a&&n.globals.series.length&&(i=n.globals.series[n.globals.maxValsInArrayIndex].length*n.globals.series.length),e.length<i)for(var l=i-e.length,o=0;o<l;o++)e.push(e[o])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var r=e.theme.mode,a=r==="dark"?"palette4":r==="light"?"palette1":e.theme.palette||"palette1",n=r==="dark"?"#f6f7f8":r==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=r||"light",e.chart.foreColor=n,e.theme.palette=a,e}},{key:"predefined",value:function(){var e=this.w.config.theme.palette,r=this.ctx.constructor.getThemePalettes();return r[e]||r.palette1}}]),t}(),dK=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var r=this.w,a=e==="title"?r.config.title:r.config.subtitle,n=r.globals.svgWidth/2,i=a.offsetY,l="middle";if(a.align==="left"?(n=10,l="start"):a.align==="right"&&(n=r.globals.svgWidth-10,l="end"),n+=a.offsetX,i=i+parseInt(a.style.fontSize,10)+a.margin/2,a.text!==void 0){var o=new ge(this.ctx).drawText({x:n,y:i,text:a.text,textAnchor:l,fontSize:a.style.fontSize,fontFamily:a.style.fontFamily,fontWeight:a.style.fontWeight,foreColor:a.style.color,opacity:1});o.node.setAttribute("class","apexcharts-".concat(e,"-text")),r.globals.dom.Paper.add(o)}}}]),t}(),uK=function(){function t(e){Se(this,t),this.w=e.w,this.dCtx=e}return Ce(t,[{key:"getTitleSubtitleCoords",value:function(e){var r=this.w,a=0,n=0,i=e==="title"?r.config.title.floating:r.config.subtitle.floating,l=r.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(l!==null&&!i){var o=l.getBoundingClientRect();a=o.width,n=r.globals.axisCharts?o.height+5:o.height}return{width:a,height:n}}},{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 a=Object.assign({},J.getBoundingClientRect(r));return r!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:a.x,y:a.y,height:a.height,width:a.height===0?0:a.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,a=[];r.config.series.forEach(function(c,d){c.data.forEach(function(h,p){var m;m=r.globals.series[d][p],n=r.config.dataLabels.formatter(m,{ctx:e.dCtx.ctx,seriesIndex:d,dataPointIndex:p,w:r}),a.push(n)})});var n=J.getLargestStringFromArr(a),i=new ge(this.dCtx.ctx),l=r.config.dataLabels.style,o=i.getTextRects(n,parseInt(l.fontSize),l.fontFamily);return{width:1.05*o.width,height:o.height}}},{key:"getLargestStringFromMultiArr",value:function(e,r){var a=e;if(this.w.globals.isMultiLineX){var n=r.map(function(l,o){return Array.isArray(l)?l.length:1}),i=Math.max.apply(Math,Ar(n));a=r[n.indexOf(i)]}return a}}]),t}(),hK=function(){function t(e){Se(this,t),this.w=e.w,this.dCtx=e}return Ce(t,[{key:"getxAxisLabelsCoords",value:function(){var e,r=this.w,a=r.globals.labels.slice();if(r.config.xaxis.convertedCatToNumeric&&a.length===0&&(a=r.globals.categoryLabels),r.globals.timescaleLabels.length>0){var n=this.getxAxisTimeScaleLabelsCoords();e={width:n.width,height:n.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 i=r.globals.xLabelFormatter,l=J.getLargestStringFromArr(a),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(l,a);r.globals.isBarHorizontal&&(o=l=r.globals.yAxisScale[0].result.reduce(function(b,y){return b.length>y.length?b:y},0));var c=new Jf(this.dCtx.ctx),d=l;l=c.xLabelFormat(i,l,d,{i:void 0,dateFormatter:new qr(this.dCtx.ctx).formatDate,w:r}),o=c.xLabelFormat(i,o,d,{i:void 0,dateFormatter:new qr(this.dCtx.ctx).formatDate,w:r}),(r.config.xaxis.convertedCatToNumeric&&l===void 0||String(l).trim()==="")&&(o=l="1");var h=new ge(this.dCtx.ctx),p=h.getTextRects(l,r.config.xaxis.labels.style.fontSize),m=p;if(l!==o&&(m=h.getTextRects(o,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*a.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(b){return h.getTextRects(b,r.config.xaxis.labels.style.fontSize,r.config.xaxis.labels.style.fontFamily,"rotate(".concat(r.config.xaxis.labels.rotate," 0 0)"),!1)};p=x(l),l!==o&&(m=x(o)),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 a,n=((e=r.config.xaxis.group.style)===null||e===void 0?void 0:e.fontSize)||r.config.xaxis.labels.style.fontSize,i=r.globals.groups.map(function(p){return p.title}),l=J.getLargestStringFromArr(i),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(l,i),c=new ge(this.dCtx.ctx),d=c.getTextRects(l,n),h=d;return l!==o&&(h=c.getTextRects(o,n)),a={width:d.width>=h.width?d.width:h.width,height:d.height>=h.height?d.height:h.height},r.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,r=0,a=0;if(e.config.xaxis.title.text!==void 0){var n=new ge(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);r=n.width,a=n.height}return{width:r,height:a}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,r=this.w;this.dCtx.timescaleLabels=r.globals.timescaleLabels.slice();var a=this.dCtx.timescaleLabels.map(function(i){return i.value}),n=a.reduce(function(i,l){return i===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):i.length>l.length?i:l},0);return 1.05*(e=new ge(this.dCtx.ctx).getTextRects(n,r.config.xaxis.labels.style.fontSize)).width*a.length>r.globals.gridWidth&&r.config.xaxis.labels.rotate!==0&&(r.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var r=this,a=this.w,n=a.globals,i=a.config,l=i.xaxis.type,o=e.width;n.skipLastTimelinelabel=!1,n.skipFirstTimelinelabel=!1;var c=a.config.yaxis[0].opposite&&a.globals.isBarHorizontal,d=function(h,p){i.yaxis.length>1&&function(m){return n.collapsedSeriesIndices.indexOf(m)!==-1}(p)||function(m){if(r.dCtx.timescaleLabels&&r.dCtx.timescaleLabels.length){var x=r.dCtx.timescaleLabels[0],b=r.dCtx.timescaleLabels[r.dCtx.timescaleLabels.length-1].position+o/1.75-r.dCtx.yAxisWidthRight,y=x.position-o/1.75+r.dCtx.yAxisWidthLeft,v=a.config.legend.position==="right"&&r.dCtx.lgRect.width>0?r.dCtx.lgRect.width:0;b>n.svgWidth-n.translateX-v&&(n.skipLastTimelinelabel=!0),y<-(m.show&&!m.floating||i.chart.type!=="bar"&&i.chart.type!=="candlestick"&&i.chart.type!=="rangeBar"&&i.chart.type!=="boxPlot"?10:o/1.75)&&(n.skipFirstTimelinelabel=!0)}else l==="datetime"?r.dCtx.gridPad.right<o&&!n.rotateXLabels&&(n.skipLastTimelinelabel=!0):l!=="datetime"&&r.dCtx.gridPad.right<o/2-r.dCtx.yAxisWidthRight&&!n.rotateXLabels&&!a.config.xaxis.labels.trim&&(r.dCtx.xPadRight=o/2+1)}(h)};i.yaxis.forEach(function(h,p){c?(r.dCtx.gridPad.left<o&&(r.dCtx.xPadLeft=o/2+1),r.dCtx.xPadRight=o/2+1):d(h,p)})}}]),t}(),fK=function(){function t(e){Se(this,t),this.w=e.w,this.dCtx=e}return Ce(t,[{key:"getyAxisLabelsCoords",value:function(){var e=this,r=this.w,a=[],n=10,i=new wl(this.dCtx.ctx);return r.config.yaxis.map(function(l,o){var c={seriesIndex:o,dataPointIndex:-1,w:r},d=r.globals.yAxisScale[o],h=0;if(!i.isYAxisHidden(o)&&l.labels.show&&l.labels.minWidth!==void 0&&(h=l.labels.minWidth),!i.isYAxisHidden(o)&&l.labels.show&&d.result.length){var p=r.globals.yLabelFormatters[o],m=d.niceMin===Number.MIN_VALUE?0:d.niceMin,x=d.result.reduce(function(k,A){var T,M;return((T=String(p(k,c)))===null||T===void 0?void 0:T.length)>((M=String(p(A,c)))===null||M===void 0?void 0:M.length)?k:A},m),b=x=p(x,c);if(x!==void 0&&x.length!==0||(x=d.niceMax),r.globals.isBarHorizontal){n=0;var y=r.globals.labels.slice();x=J.getLargestStringFromArr(y),x=p(x,{seriesIndex:o,dataPointIndex:-1,w:r}),b=e.dCtx.dimHelpers.getLargestStringFromMultiArr(x,y)}var v=new ge(e.dCtx.ctx),N="rotate(".concat(l.labels.rotate," 0 0)"),C=v.getTextRects(x,l.labels.style.fontSize,l.labels.style.fontFamily,N,!1),S=C;x!==b&&(S=v.getTextRects(b,l.labels.style.fontSize,l.labels.style.fontFamily,N,!1)),a.push({width:(h>S.width||h>C.width?h:S.width>C.width?S.width:C.width)+n,height:S.height>C.height?S.height:C.height})}else a.push({width:0,height:0})}),a}},{key:"getyAxisTitleCoords",value:function(){var e=this,r=this.w,a=[];return r.config.yaxis.map(function(n,i){if(n.show&&n.title.text!==void 0){var l=new ge(e.dCtx.ctx),o="rotate(".concat(n.title.rotate," 0 0)"),c=l.getTextRects(n.title.text,n.title.style.fontSize,n.title.style.fontFamily,o,!1);a.push({width:c.width,height:c.height})}else a.push({width:0,height:0})}),a}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,r=0,a=0,n=0,i=e.globals.yAxisScale.length>1?10:0,l=new wl(this.dCtx.ctx),o=function(c,d){var h=e.config.yaxis[d].floating,p=0;c.width>0&&!h?(p=c.width+i,function(m){return e.globals.ignoreYAxisIndexes.indexOf(m)>-1}(d)&&(p=p-c.width-i)):p=h||l.isYAxisHidden(d)?0:5,e.config.yaxis[d].opposite?n+=p:a+=p,r+=p};return e.globals.yLabelsCoords.map(function(c,d){o(c,d)}),e.globals.yTitleCoords.map(function(c,d){o(c,d)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(r=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=a,this.dCtx.yAxisWidthRight=n,r}}]),t}(),pK=function(){function t(e){Se(this,t),this.w=e.w,this.dCtx=e}return Ce(t,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var r=this.w,a=r.config,n=r.globals;if(n.noData||n.collapsedSeries.length+n.ancillaryCollapsedSeries.length===a.series.length)return 0;var i=function(x){return["bar","rangeBar","candlestick","boxPlot"].includes(x)},l=a.chart.type,o=0,c=i(l)?a.series.length:1;n.comboBarCount>0&&(c=n.comboBarCount),n.collapsedSeries.forEach(function(x){i(x.type)&&(c-=1)}),a.chart.stacked&&(c=1);var d=i(l)||n.comboBarCount>0,h=Math.abs(n.initialMaxX-n.initialMinX);if(d&&n.isXNumeric&&!n.isBarHorizontal&&c>0&&h!==0){h<=3&&(h=n.dataPoints);var p=h/e,m=n.minXDiff&&n.minXDiff/p>0?n.minXDiff/p:0;m>e/2&&(m/=2),(o=m*parseInt(a.plotOptions.bar.columnWidth,10)/100)<1&&(o=1),n.barPadForNumericAxis=o}return o}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,r=this.w,a=r.globals,n=this.dCtx.isSparkline||!a.axisCharts?0:10;["title","subtitle"].forEach(function(o){r.config[o].text!==void 0?n+=r.config[o].margin:n+=e.dCtx.isSparkline||!a.axisCharts?0:5}),!r.config.legend.show||r.config.legend.position!=="bottom"||r.config.legend.floating||a.axisCharts||(n+=10);var i=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),l=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");a.gridHeight-=i.height+l.height+n,a.translateY+=i.height+l.height+n}},{key:"setGridXPosForDualYAxis",value:function(e,r){var a=this.w,n=new wl(this.dCtx.ctx);a.config.yaxis.forEach(function(i,l){a.globals.ignoreYAxisIndexes.indexOf(l)!==-1||i.floating||n.isYAxisHidden(l)||(i.opposite&&(a.globals.translateX-=r[l].width+e[l].width+parseInt(i.labels.style.fontSize,10)/1.2+12),a.globals.translateX<2&&(a.globals.translateX=2))})}}]),t}(),jx=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 uK(this),this.dimYAxis=new fK(this),this.dimXAxis=new hK(this),this.dimGrid=new pK(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return Ce(t,[{key:"plotCoords",value:function(){var e=this,r=this.w,a=r.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var n=Array.isArray(r.config.stroke.width)?Math.max.apply(Math,Ar(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(l){var o=OR(l,2),c=o[0],d=o[1];e.gridPad[c]=Math.max(d,e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(n/2,this.gridPad.top),this.gridPad.bottom=Math.max(n/2,this.gridPad.bottom)),a.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),a.gridHeight=a.gridHeight-this.gridPad.top-this.gridPad.bottom,a.gridWidth=a.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var i=this.dimGrid.gridPadForColumnsInNumericAxis(a.gridWidth);a.gridWidth=a.gridWidth-2*i,a.translateX=a.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),a.translateY=a.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,r=this.w,a=r.globals,n=this.dimYAxis.getyAxisLabelsCoords(),i=this.dimYAxis.getyAxisTitleCoords();a.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),r.globals.yLabelsCoords=[],r.globals.yTitleCoords=[],r.config.yaxis.map(function(x,b){r.globals.yLabelsCoords.push({width:n[b].width,index:b}),r.globals.yTitleCoords.push({width:i[b].width,index:b})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var l=this.dimXAxis.getxAxisLabelsCoords(),o=this.dimXAxis.getxAxisGroupLabelsCoords(),c=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(l,c,o),a.translateXAxisY=r.globals.rotateXLabels?this.xAxisHeight/8:-4,a.translateXAxisX=r.globals.rotateXLabels&&r.globals.isXNumeric&&r.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,r.globals.isBarHorizontal&&(a.rotateXLabels=!1,a.translateXAxisY=parseInt(r.config.xaxis.labels.style.fontSize,10)/1.5*-1),a.translateXAxisY=a.translateXAxisY+r.config.xaxis.labels.offsetY,a.translateXAxisX=a.translateXAxisX+r.config.xaxis.labels.offsetX;var d=this.yAxisWidth,h=this.xAxisHeight;a.xAxisLabelsHeight=this.xAxisHeight-c.height,a.xAxisGroupLabelsHeight=a.xAxisLabelsHeight-l.height,a.xAxisLabelsWidth=this.xAxisWidth,a.xAxisHeight=this.xAxisHeight;var p=10;(r.config.chart.type==="radar"||this.isSparkline)&&(d=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||r.config.chart.type==="treemap")&&(d=0,h=0,p=0),this.isSparkline||r.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(l);var m=function(){a.translateX=d+e.datalabelsCoords.width,a.gridHeight=a.svgHeight-e.lgRect.height-h-(e.isSparkline||r.config.chart.type==="treemap"?0:r.globals.rotateXLabels?10:15),a.gridWidth=a.svgWidth-d-2*e.datalabelsCoords.width};switch(r.config.xaxis.position==="top"&&(p=a.xAxisHeight-r.config.xaxis.axisTicks.height-5),r.config.legend.position){case"bottom":a.translateY=p,m();break;case"top":a.translateY=this.lgRect.height+p,m();break;case"left":a.translateY=p,a.translateX=this.lgRect.width+d+this.datalabelsCoords.width,a.gridHeight=a.svgHeight-h-12,a.gridWidth=a.svgWidth-this.lgRect.width-d-2*this.datalabelsCoords.width;break;case"right":a.translateY=p,a.translateX=d+this.datalabelsCoords.width,a.gridHeight=a.svgHeight-h-12,a.gridWidth=a.svgWidth-this.lgRect.width-d-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,n),new cN(this.ctx).setYAxisXPosition(n,i)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,r=e.globals,a=e.config,n=0;e.config.legend.show&&!e.config.legend.floating&&(n=20);var i=a.chart.type==="pie"||a.chart.type==="polarArea"||a.chart.type==="donut"?"pie":"radialBar",l=a.plotOptions[i].offsetY,o=a.plotOptions[i].offsetX;if(!a.legend.show||a.legend.floating){r.gridHeight=r.svgHeight;var c=r.dom.elWrap.getBoundingClientRect().width;return r.gridWidth=Math.min(c,r.gridHeight),r.translateY=l,void(r.translateX=o+(r.svgWidth-r.gridWidth)/2)}switch(a.legend.position){case"bottom":r.gridHeight=r.svgHeight-this.lgRect.height,r.gridWidth=r.svgWidth,r.translateY=l-10,r.translateX=o+(r.svgWidth-r.gridWidth)/2;break;case"top":r.gridHeight=r.svgHeight-this.lgRect.height,r.gridWidth=r.svgWidth,r.translateY=this.lgRect.height+l+10,r.translateX=o+(r.svgWidth-r.gridWidth)/2;break;case"left":r.gridWidth=r.svgWidth-this.lgRect.width-n,r.gridHeight=a.chart.height!=="auto"?r.svgHeight:r.gridWidth,r.translateY=l,r.translateX=o+this.lgRect.width+n;break;case"right":r.gridWidth=r.svgWidth-this.lgRect.width-n-5,r.gridHeight=a.chart.height!=="auto"?r.svgHeight:r.gridWidth,r.translateY=l,r.translateX=o+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,r,a){var n=this.w,i=n.globals.hasXaxisGroups?2:1,l=a.height+e.height+r.height,o=n.globals.isMultiLineX?1.2:n.globals.LINE_HEIGHT_RATIO,c=n.globals.rotateXLabels?22:10,d=n.globals.rotateXLabels&&n.config.legend.position==="bottom"?10:0;this.xAxisHeight=l*o+i*c+d,this.xAxisWidth=e.width,this.xAxisHeight-r.height>n.config.xaxis.labels.maxHeight&&(this.xAxisHeight=n.config.xaxis.labels.maxHeight),n.config.xaxis.labels.minHeight&&this.xAxisHeight<n.config.xaxis.labels.minHeight&&(this.xAxisHeight=n.config.xaxis.labels.minHeight),n.config.xaxis.floating&&(this.xAxisHeight=0);var h=0,p=0;n.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}(),mK=function(){function t(e){Se(this,t),this.w=e.w,this.lgCtx=e}return Ce(t,[{key:"getLegendStyles",value:function(){var e,r,a,n=document.createElement("style");n.setAttribute("type","text/css");var i=((e=this.lgCtx.ctx)===null||e===void 0||(r=e.opts)===null||r===void 0||(a=r.chart)===null||a===void 0?void 0:a.nonce)||this.w.config.chart.nonce;i&&n.setAttribute("nonce",i);var l=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 n.appendChild(l),n}},{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 a=this,n=this.w;if(n.globals.axisCharts||n.config.chart.type==="radialBar"){n.globals.resized=!0;var i=null,l=null;n.globals.risingSeries=[],n.globals.axisCharts?(i=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),l=parseInt(i.getAttribute("data:realIndex"),10)):(i=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),l=parseInt(i.getAttribute("rel"),10)-1),r?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach(function(h){a.riseCollapsedSeries(h.cs,h.csi,l)}):this.hideSeries({seriesEl:i,realIndex:l})}else{var o=n.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(e+1,"'] path")),c=n.config.chart.type;if(c==="pie"||c==="polarArea"||c==="donut"){var d=n.config.plotOptions.pie.donut.labels;new ge(this.lgCtx.ctx).pathMouseDown(o,null),this.lgCtx.ctx.pie.printDataLabelsInner(o.node,d)}o.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(e){var r=e.realIndex,a=this.w,n=a.globals,i=J.clone(a.config.series);if(n.axisCharts){var l=a.config.yaxis[n.seriesYAxisReverseMap[r]],o={index:r,data:i[r].data.slice(),type:i[r].type||a.config.chart.type};if(l&&l.show&&l.showAlways)n.ancillaryCollapsedSeriesIndices.indexOf(r)<0&&(n.ancillaryCollapsedSeries.push(o),n.ancillaryCollapsedSeriesIndices.push(r));else if(n.collapsedSeriesIndices.indexOf(r)<0){n.collapsedSeries.push(o),n.collapsedSeriesIndices.push(r);var c=n.risingSeries.indexOf(r);n.risingSeries.splice(c,1)}}else n.collapsedSeries.push({index:r,data:i[r]}),n.collapsedSeriesIndices.push(r);return n.allSeriesCollapsed=n.collapsedSeries.length+n.ancillaryCollapsedSeries.length===a.config.series.length,this._getSeriesBasedOnCollapsedState(i)}},{key:"hideSeries",value:function(e){for(var r=e.seriesEl,a=e.realIndex,n=this.w,i=this.getSeriesAfterCollapsing({realIndex:a}),l=r.childNodes,o=0;o<l.length;o++)l[o].classList.contains("apexcharts-series-markers-wrap")&&(l[o].classList.contains("apexcharts-hide")?l[o].classList.remove("apexcharts-hide"):l[o].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(i,n.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,r,a){var n=this.w,i=J.clone(n.config.series);if(e.length>0){for(var l=0;l<e.length;l++)e[l].index===a&&(n.globals.axisCharts?i[a].data=e[l].data.slice():i[a]=e[l].data,typeof i[a]!="number"&&(i[a].hidden=!1),e.splice(l,1),r.splice(l,1),n.globals.risingSeries.push(a));i=this._getSeriesBasedOnCollapsedState(i),this.lgCtx.ctx.updateHelpers._updateSeries(i,n.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var r=this.w,a=0;return r.globals.axisCharts?e.forEach(function(n,i){r.globals.collapsedSeriesIndices.indexOf(i)<0&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0||(e[i].data=[],a++)}):e.forEach(function(n,i){!r.globals.collapsedSeriesIndices.indexOf(i)<0&&(e[i]=0,a++)}),r.globals.allSeriesCollapsed=a===e.length,e}}]),t}(),h_=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 mK(this)}return Ce(t,[{key:"init",value:function(){var e=this.w,r=e.globals,a=e.config,n=a.legend.showForSingleSeries&&r.series.length===1||this.isBarsDistributed||r.series.length>1;if(this.legendHelpers.appendToForeignObject(),(n||!r.axisCharts)&&a.legend.show){for(;r.dom.elLegendWrap.firstChild;)r.dom.elLegendWrap.removeChild(r.dom.elLegendWrap.firstChild);this.drawLegends(),a.legend.position==="bottom"||a.legend.position==="top"?this.legendAlignHorizontal():a.legend.position!=="right"&&a.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var r=e.i,a=e.fillcolor,n=this.w,i=document.createElement("span");i.classList.add("apexcharts-legend-marker");var l=n.config.legend.markers.shape||n.config.markers.shape,o=l;Array.isArray(l)&&(o=l[r]);var c=Array.isArray(n.config.legend.markers.size)?parseFloat(n.config.legend.markers.size[r]):parseFloat(n.config.legend.markers.size),d=Array.isArray(n.config.legend.markers.offsetX)?parseFloat(n.config.legend.markers.offsetX[r]):parseFloat(n.config.legend.markers.offsetX),h=Array.isArray(n.config.legend.markers.offsetY)?parseFloat(n.config.legend.markers.offsetY[r]):parseFloat(n.config.legend.markers.offsetY),p=Array.isArray(n.config.legend.markers.strokeWidth)?parseFloat(n.config.legend.markers.strokeWidth[r]):parseFloat(n.config.legend.markers.strokeWidth),m=i.style;if(m.height=2*(c+p)+"px",m.width=2*(c+p)+"px",m.left=d+"px",m.top=h+"px",n.config.legend.markers.customHTML)m.background="transparent",m.color=a[r],Array.isArray(n.config.legend.markers.customHTML)?n.config.legend.markers.customHTML[r]&&(i.innerHTML=n.config.legend.markers.customHTML[r]()):i.innerHTML=n.config.legend.markers.customHTML();else{var x=new Xd(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(o),seriesIndex:r,strokeWidth:p,size:c}),b=window.SVG().addTo(i).size("100%","100%"),y=new ge(this.ctx).drawMarker(0,0,ve(ve({},x),{},{pointFillColor:Array.isArray(a)?a[r]:x.pointFillColor,shape:o}));n.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(function(v){v.node.classList.contains("apexcharts-marker-triangle")?v.node.style.transform="translate(50%, 45%)":v.node.style.transform="translate(50%, 50%)"}),b.add(y)}return i}},{key:"drawLegends",value:function(){var e=this,r=this,a=this.w,n=a.config.legend.fontFamily,i=a.globals.seriesNames,l=a.config.legend.markers.fillColors?a.config.legend.markers.fillColors.slice():a.globals.colors.slice();if(a.config.chart.type==="heatmap"){var o=a.config.plotOptions.heatmap.colorScale.ranges;i=o.map(function(x){return x.name?x.name:x.from+" - "+x.to}),l=o.map(function(x){return x.color})}else this.isBarsDistributed&&(i=a.globals.labels.slice());a.config.legend.customLegendItems.length&&(i=a.config.legend.customLegendItems);var c=a.globals.legendFormatter,d=a.config.legend.inverseOrder,h=[];a.globals.seriesGroups.length>1&&a.config.legend.clusterGroupedSeries&&a.globals.seriesGroups.forEach(function(x,b){h[b]=document.createElement("div"),h[b].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(b)),a.config.legend.clusterGroupedSeriesOrientation==="horizontal"?a.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):h[b].classList.add("apexcharts-legend-group-vertical")});for(var p=function(x){var b,y=c(i[x],{seriesIndex:x,w:a}),v=!1,N=!1;if(a.globals.collapsedSeries.length>0)for(var C=0;C<a.globals.collapsedSeries.length;C++)a.globals.collapsedSeries[C].index===x&&(v=!0);if(a.globals.ancillaryCollapsedSeriesIndices.length>0)for(var S=0;S<a.globals.ancillaryCollapsedSeriesIndices.length;S++)a.globals.ancillaryCollapsedSeriesIndices[S]===x&&(N=!0);var k=e.createLegendMarker({i:x,fillcolor:l});ge.setAttrs(k,{rel:x+1,"data:collapsed":v||N}),(v||N)&&k.classList.add("apexcharts-inactive-legend");var A=document.createElement("div"),T=document.createElement("span");T.classList.add("apexcharts-legend-text"),T.innerHTML=Array.isArray(y)?y.join(" "):y;var M=a.config.legend.labels.useSeriesColors?a.globals.colors[x]:Array.isArray(a.config.legend.labels.colors)?(b=a.config.legend.labels.colors)===null||b===void 0?void 0:b[x]:a.config.legend.labels.colors;M||(M=a.config.chart.foreColor),T.style.color=M,T.style.fontSize=parseFloat(a.config.legend.fontSize)+"px",T.style.fontWeight=a.config.legend.fontWeight,T.style.fontFamily=n||a.config.chart.fontFamily,ge.setAttrs(T,{rel:x+1,i:x,"data:default-text":encodeURIComponent(y),"data:collapsed":v||N}),A.appendChild(k),A.appendChild(T);var O=new or(e.ctx);a.config.legend.showForZeroSeries||O.getSeriesTotalByIndex(x)===0&&O.seriesHaveSameValues(x)&&!O.isSeriesNull(x)&&a.globals.collapsedSeriesIndices.indexOf(x)===-1&&a.globals.ancillaryCollapsedSeriesIndices.indexOf(x)===-1&&A.classList.add("apexcharts-hidden-zero-series"),a.config.legend.showForNullSeries||O.isSeriesNull(x)&&a.globals.collapsedSeriesIndices.indexOf(x)===-1&&a.globals.ancillaryCollapsedSeriesIndices.indexOf(x)===-1&&A.classList.add("apexcharts-hidden-null-series"),h.length?a.globals.seriesGroups.forEach(function(_,R){var L;_.includes((L=a.config.series[x])===null||L===void 0?void 0:L.name)&&(a.globals.dom.elLegendWrap.appendChild(h[R]),h[R].appendChild(A))}):a.globals.dom.elLegendWrap.appendChild(A),a.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(a.config.legend.horizontalAlign)),a.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+a.config.legend.position),A.classList.add("apexcharts-legend-series"),A.style.margin="".concat(a.config.legend.itemMargin.vertical,"px ").concat(a.config.legend.itemMargin.horizontal,"px"),a.globals.dom.elLegendWrap.style.width=a.config.legend.width?a.config.legend.width+"px":"",a.globals.dom.elLegendWrap.style.height=a.config.legend.height?a.config.legend.height+"px":"",ge.setAttrs(A,{rel:x+1,seriesName:J.escapeString(i[x]),"data:collapsed":v||N}),(v||N)&&A.classList.add("apexcharts-inactive-legend"),a.config.legend.onItemClick.toggleDataSeries||A.classList.add("apexcharts-no-click")},m=d?i.length-1:0;d?m>=0:m<=i.length-1;d?m--:m++)p(m);a.globals.dom.elWrap.addEventListener("click",r.onLegendClick,!0),a.config.legend.onItemHover.highlightDataSeries&&a.config.legend.customLegendItems.length===0&&(a.globals.dom.elWrap.addEventListener("mousemove",r.onLegendHovered,!0),a.globals.dom.elWrap.addEventListener("mouseout",r.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,r){var a=this.w,n=a.globals.dom.elLegendWrap,i=n.clientHeight,l=0,o=0;if(a.config.legend.position==="bottom")o=a.globals.svgHeight-Math.min(i,a.globals.svgHeight/2)-5;else if(a.config.legend.position==="top"){var c=new jx(this.ctx),d=c.dimHelpers.getTitleSubtitleCoords("title").height,h=c.dimHelpers.getTitleSubtitleCoords("subtitle").height;o=(d>0?d-10:0)+(h>0?h-10:0)}n.style.position="absolute",l=l+e+a.config.legend.offsetX,o=o+r+a.config.legend.offsetY,n.style.left=l+"px",n.style.top=o+"px",a.config.legend.position==="right"&&(n.style.left="auto",n.style.right=25+a.config.legend.offsetX+"px"),["width","height"].forEach(function(p){n.style[p]&&(n.style[p]=parseInt(a.config.legend[p],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var r=new jx(this.ctx),a=r.dimHelpers.getTitleSubtitleCoords("title"),n=r.dimHelpers.getTitleSubtitleCoords("subtitle"),i=0;e.config.legend.position==="top"&&(i=a.height+n.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,i)}},{key:"legendAlignVertical",value:function(){var e=this.w,r=this.legendHelpers.getLegendDimensions(),a=0;e.config.legend.position==="left"&&(a=20),e.config.legend.position==="right"&&(a=e.globals.svgWidth-r.clww-10),this.setLegendWrapXY(a,20)}},{key:"onLegendHovered",value:function(e){var r=this.w,a=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(a){var n=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,n,this.w]),new _n(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&a&&new _n(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 a=parseInt(e.target.getAttribute("rel"),10)-1,n=e.target.getAttribute("data:collapsed")==="true",i=this.w.config.chart.events.legendClick;typeof i=="function"&&i(this.ctx,a,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,a,this.w]);var l=this.w.config.legend.markers.onClick;typeof l=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(l(this.ctx,a,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,a,this.w])),r.config.chart.type!=="treemap"&&r.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&r.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(a,n)}}}]),t}(),f_=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 Ce(t,[{key:"createToolbar",value:function(){var e=this,r=this.w,a=function(){return document.createElement("div")},n=a();if(n.setAttribute("class","apexcharts-toolbar"),n.style.top=r.config.chart.toolbar.offsetY+"px",n.style.right=3-r.config.chart.toolbar.offsetX+"px",r.globals.dom.elWrap.appendChild(n),this.elZoom=a(),this.elZoomIn=a(),this.elZoomOut=a(),this.elPan=a(),this.elSelection=a(),this.elZoomReset=a(),this.elMenuIcon=a(),this.elMenu=a(),this.elCustomIcons=[],this.t=r.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var i=0;i<this.t.customIcons.length;i++)this.elCustomIcons.push(a());var l=[],o=function(p,m,x){var b=p.toLowerCase();e.t[b]&&r.config.chart.zoom.enabled&&l.push({el:m,icon:typeof e.t[b]=="string"?e.t[b]:x,title:e.localeValues[p],class:"apexcharts-".concat(b,"-icon")})};o("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>
`),o("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&&l.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&&l.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"}),o("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&&l.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 d=0;d<this.elCustomIcons.length;d++)l.push({el:this.elCustomIcons[d],icon:this.t.customIcons[d].icon,title:this.t.customIcons[d].title,index:this.t.customIcons[d].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[d].class});l.forEach(function(p,m){p.index&&J.moveIndexInArray(l,m,p.index)});for(var h=0;h<l.length;h++)ge.setAttrs(l[h].el,{class:l[h].class,title:l[h].title}),l[h].el.innerHTML=l[h].icon,n.appendChild(l[h].el);this._createHamburgerMenu(n),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}],a=0;a<r.length;a++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[a].innerHTML=r[a].title,ge.setAttrs(this.elMenuItems[a],{class:"apexcharts-menu-item ".concat(r[a].name),title:r[a].title}),this.elMenu.appendChild(this.elMenuItems[a])}},{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(a){a.classList.contains("exportSVG")?a.addEventListener("click",e.handleDownload.bind(e,"svg")):a.classList.contains("exportPNG")?a.addEventListener("click",e.handleDownload.bind(e,"png")):a.classList.contains("exportCSV")&&a.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 a=e==="selection"?r.ctx.toolbar.elSelection:r.ctx.toolbar.elZoom,n=e==="selection"?"selectionEnabled":"zoomEnabled";r.w.globals[n]=!r.w.globals[n],a.classList.contains(r.ctx.toolbar.selectedClass)?a.classList.remove(r.ctx.toolbar.selectedClass):a.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,a=e==="pan"?this.elZoom:this.elPan;r&&r.classList.add(this.selectedClass),a&&a.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(a){a&&a.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,a=(this.minX+r)/2,n=(this.maxX+r)/2,i=this._getNewMinXMaxX(a,n);e.globals.disableZoomIn||this.zoomUpdateOptions(i.minX,i.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,a=this.minX-(r-this.minX),n=this.maxX-(r-this.maxX),i=this._getNewMinXMaxX(a,n);e.globals.disableZoomOut||this.zoomUpdateOptions(i.minX,i.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,r){var a=this.w.config.xaxis.convertedCatToNumeric;return{minX:a?Math.floor(e):e,maxX:a?Math.floor(r):r}}},{key:"zoomUpdateOptions",value:function(e,r){var a=this.w;if(e!==void 0||r!==void 0){if(!(a.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,r=a.globals.dataPoints),r-e<2))){var n={min:e,max:r},i=this.getBeforeZoomRange(n);i&&(n=i.xaxis);var l={xaxis:n},o=J.clone(a.globals.initialConfig.yaxis);a.config.chart.group||(l.yaxis=o),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(l,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(n,o)}}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 a=null;return typeof this.ev.beforeZoom=="function"&&(a=this.ev.beforeZoom(this,{xaxis:e,yaxis:r})),a}},{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,a=new qh(this.ctx);switch(e){case"svg":a.exportToSVG(this.ctx);break;case"png":a.exportToPng(this.ctx);break;case"csv":a.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 a=r.w;if(a.globals.lastXAxis.min=a.globals.initialConfig.xaxis.min,a.globals.lastXAxis.max=a.globals.initialConfig.xaxis.max,r.updateHelpers.revertDefaultAxisMinMax(),typeof a.config.chart.events.beforeResetZoom=="function"){var n=a.config.chart.events.beforeResetZoom(r,a);n&&r.updateHelpers.revertDefaultAxisMinMax(n)}typeof a.config.chart.events.zoomed=="function"&&r.ctx.toolbar.zoomCallback({min:a.config.xaxis.min,max:a.config.xaxis.max}),a.globals.zoomed=!1;var i=r.ctx.series.emptyCollapsedSeries(J.clone(a.globals.initialSeries));r.updateHelpers._updateSeries(i,a.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}(),gK=function(t){Gf(r,f_);var e=qf(r);function r(a){var n;return Se(this,r),(n=e.call(this,a)).ctx=a,n.w=a.w,n.dragged=!1,n.graphics=new ge(n.ctx),n.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],n.clientX=0,n.clientY=0,n.startX=0,n.endX=0,n.dragX=0,n.startY=0,n.endY=0,n.dragY=0,n.moveDirection="none",n.debounceTimer=null,n.debounceDelay=100,n.wheelDelay=400,n}return Ce(r,[{key:"init",value:function(a){var n=this,i=a.xyRatios,l=this.w,o=this;this.xyRatios=i,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=l.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new ir(0,0,l.globals.gridWidth,l.globals.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),l.globals.dom.Paper.add(this.zoomRect),l.globals.dom.Paper.add(this.selectionRect),l.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:l.globals.gridWidth,maxY:l.globals.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):l.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:l.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=l.globals.dom.baseEl.querySelector("".concat(l.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(c){n.hoverArea.addEventListener(c,o.svgMouseEvents.bind(o,i),{capture:!1,passive:!0})}),l.config.chart.zoom.enabled&&l.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",o.mouseWheelEvent.bind(o),{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(a,n){var i=this.w,l=this.ctx.toolbar,o=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,c=i.config.chart.toolbar.autoSelected;if(n.shiftKey?(this.shiftWasPressed=!0,l.enableZoomPanFromToolbar(c==="pan"?"zoom":"pan")):this.shiftWasPressed&&(l.enableZoomPanFromToolbar(c),this.shiftWasPressed=!1),n.target){var d,h=n.target.classList;if(n.target.parentNode&&n.target.parentNode!==null&&(d=n.target.parentNode.classList),!(h.contains("apexcharts-legend-marker")||h.contains("apexcharts-legend-text")||d&&d.contains("apexcharts-toolbar"))){if(this.clientX=n.type==="touchmove"||n.type==="touchstart"?n.touches[0].clientX:n.type==="touchend"?n.changedTouches[0].clientX:n.clientX,this.clientY=n.type==="touchmove"||n.type==="touchstart"?n.touches[0].clientY:n.type==="touchend"?n.changedTouches[0].clientY:n.clientY,n.type==="mousedown"&&n.which===1||n.type==="touchstart"){var p=this.gridRect.getBoundingClientRect();this.startX=this.clientX-p.left-i.globals.barPadForNumericAxis,this.startY=this.clientY-p.top,this.dragged=!1,this.w.globals.mousedown=!0}(n.type==="mousemove"&&n.which===1||n.type==="touchmove")&&(this.dragged=!0,i.globals.panEnabled?(i.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:o,xyRatios:a})):(this.w.globals.mousedown&&i.globals.zoomEnabled||this.w.globals.mousedown&&i.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:o}))),n.type!=="mouseup"&&n.type!=="touchend"&&n.type!=="mouseleave"||this.handleMouseUp({zoomtype:o}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(a){var n,i=a.zoomtype,l=a.isResized,o=this.w,c=(n=this.gridRect)===null||n===void 0?void 0:n.getBoundingClientRect();c&&(this.w.globals.mousedown||l)&&(this.endX=this.clientX-c.left-o.globals.barPadForNumericAxis,this.endY=this.clientY-c.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(o.globals.zoomEnabled||o.globals.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:i})),o.globals.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.globals.mousedown=!1}},{key:"mouseWheelEvent",value:function(a){var n=this,i=this.w;a.preventDefault();var l=Date.now();l-i.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(a),i.globals.lastWheelExecution=l),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){l-i.globals.lastWheelExecution>n.wheelDelay&&(n.executeMouseWheelZoom(a),i.globals.lastWheelExecution=l)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(a){var n,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var l=(n=this.gridRect)===null||n===void 0?void 0:n.getBoundingClientRect();if(l){var o,c,d,h=(a.clientX-l.left)/l.width,p=this.minX,m=this.maxX,x=m-p;if(a.deltaY<0){var b=p+h*x;c=b-(o=.5*x)/2,d=b+o/2}else c=p-(o=1.5*x)/2,d=m+o/2;if(!i.globals.isRangeBar){c=Math.max(c,i.globals.initialMinX),d=Math.min(d,i.globals.initialMaxX);var y=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(d-c<y){var v=(c+d)/2;c=v-y/2,d=v+y/2}}var N=this._getNewMinXMaxX(c,d);isNaN(N.minX)||isNaN(N.maxX)||this.zoomUpdateOptions(N.minX,N.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var a=this,n=this.w;if(this.selectionRect){var i=this.selectionRect.node.getBoundingClientRect();i.width>0&&i.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(l,o,c,d,h){return h==="l"||h==="r"?l.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):l.circle(0)},updateHandle:function(l,o){return l.center(o[0],o[1])}}).resize().on("resize",function(){var l=n.globals.zoomEnabled?n.config.chart.zoom.type:n.config.chart.selection.type;a.handleMouseUp({zoomtype:l,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var a=this.w,n=this.xyRatios;if(!a.globals.zoomEnabled){if(a.globals.selection!==void 0&&a.globals.selection!==null)this.drawSelectionRect(ve(ve({},a.globals.selection),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}));else if(a.config.chart.selection.xaxis.min!==void 0&&a.config.chart.selection.xaxis.max!==void 0){var i=(a.config.chart.selection.xaxis.min-a.globals.minX)/n.xRatio,l=a.globals.gridWidth-(a.globals.maxX-a.config.chart.selection.xaxis.max)/n.xRatio-i;a.globals.isRangeBar&&(i=(a.config.chart.selection.xaxis.min-a.globals.yAxisScale[0].niceMin)/n.invertedYRatio,l=(a.config.chart.selection.xaxis.max-a.config.chart.selection.xaxis.min)/n.invertedYRatio);var o={x:i,y:0,width:l,height:a.globals.gridHeight,translateX:a.globals.translateX,translateY:a.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(o),this.makeSelectionRectDraggable(),typeof a.config.chart.events.selection=="function"&&a.config.chart.events.selection(this.ctx,{xaxis:{min:a.config.chart.selection.xaxis.min,max:a.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(a){var n=a.x,i=a.y,l=a.width,o=a.height,c=a.translateX,d=c===void 0?0:c,h=a.translateY,p=h===void 0?0:h,m=this.w,x=this.zoomRect,b=this.selectionRect;if(this.dragged||m.globals.selection!==null){var y={transform:"translate("+d+", "+p+")"};m.globals.zoomEnabled&&this.dragged&&(l<0&&(l=1),x.attr({x:n,y:i,width:l,height:o,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,y)),m.globals.selectionEnabled&&(b.attr({x:n,y:i,width:l>0?l:0,height:o>0?o: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(b.node,y))}}},{key:"hideSelectionRect",value:function(a){a&&a.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(a){var n=a.context,i=a.zoomtype,l=this.w,o=n,c=this.gridRect.getBoundingClientRect(),d=o.startX-1,h=o.startY,p=!1,m=!1,x=o.clientX-c.left-l.globals.barPadForNumericAxis,b=o.clientY-c.top,y=x-d,v=b-h,N={translateX:l.globals.translateX,translateY:l.globals.translateY};return Math.abs(y+d)>l.globals.gridWidth?y=l.globals.gridWidth-d:x<0&&(y=d),d>x&&(p=!0,y=Math.abs(y)),h>b&&(m=!0,v=Math.abs(v)),N=ve(ve({},N=i==="x"?{x:p?d-y:d,y:0,width:y,height:l.globals.gridHeight}:i==="y"?{x:0,y:m?h-v:h,width:l.globals.gridWidth,height:v}:{x:p?d-y:d,y:m?h-v:h,width:y,height:v}),{},{translateX:l.globals.translateX,translateY:l.globals.translateY}),o.drawSelectionRect(N),o.selectionDragging("resizing"),N}},{key:"selectionDragging",value:function(a,n){var i=this,l=this.w;if(n){n.preventDefault();var o=n.detail,c=o.handler,d=o.box,h=d.x,p=d.y;h<this.constraints.x&&(h=this.constraints.x),p<this.constraints.y&&(p=this.constraints.y),d.x2>this.constraints.x2&&(h=this.constraints.x2-d.w),d.y2>this.constraints.y2&&(p=this.constraints.y2-d.h),c.move(h,p);var m=this.xyRatios,x=this.selectionRect,b=0;a==="resizing"&&(b=30);var y=function(N){return parseFloat(x.node.getAttribute(N))},v={x:y("x"),y:y("y"),width:y("width"),height:y("height")};l.globals.selection=v,typeof l.config.chart.events.selection=="function"&&l.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var N,C,S,k,A=i.gridRect.getBoundingClientRect(),T=x.node.getBoundingClientRect();l.globals.isRangeBar?(N=l.globals.yAxisScale[0].niceMin+(T.left-A.left)*m.invertedYRatio,C=l.globals.yAxisScale[0].niceMin+(T.right-A.left)*m.invertedYRatio,S=0,k=1):(N=l.globals.xAxisScale.niceMin+(T.left-A.left)*m.xRatio,C=l.globals.xAxisScale.niceMin+(T.right-A.left)*m.xRatio,S=l.globals.yAxisScale[0].niceMin+(A.bottom-T.bottom)*m.yRatio[0],k=l.globals.yAxisScale[0].niceMax-(T.top-A.top)*m.yRatio[0]);var M={xaxis:{min:N,max:C},yaxis:{min:S,max:k}};l.config.chart.events.selection(i.ctx,M),l.config.chart.brush.enabled&&l.config.chart.events.brushScrolled!==void 0&&l.config.chart.events.brushScrolled(i.ctx,M)},b))}}},{key:"selectionDrawn",value:function(a){var n,i,l=a.context,o=a.zoomtype,c=this.w,d=l,h=this.xyRatios,p=this.ctx.toolbar,m=c.globals.zoomEnabled?d.zoomRect.node.getBoundingClientRect():d.selectionRect.node.getBoundingClientRect(),x=d.gridRect.getBoundingClientRect(),b=m.left-x.left-c.globals.barPadForNumericAxis,y=m.right-x.left-c.globals.barPadForNumericAxis,v=m.top-x.top,N=m.bottom-x.top;c.globals.isRangeBar?(n=c.globals.yAxisScale[0].niceMin+b*h.invertedYRatio,i=c.globals.yAxisScale[0].niceMin+y*h.invertedYRatio):(n=c.globals.xAxisScale.niceMin+b*h.xRatio,i=c.globals.xAxisScale.niceMin+y*h.xRatio);var C=[],S=[];if(c.config.yaxis.forEach(function(R,L){var z=c.globals.seriesYAxisMap[L][0],F=c.globals.yAxisScale[L].niceMax-h.yRatio[z]*v,Y=c.globals.yAxisScale[L].niceMax-h.yRatio[z]*N;C.push(F),S.push(Y)}),d.dragged&&(d.dragX>10||d.dragY>10)&&n!==i){if(c.globals.zoomEnabled){var k=J.clone(c.globals.initialConfig.yaxis),A=J.clone(c.globals.initialConfig.xaxis);if(c.globals.zoomed=!0,c.config.xaxis.convertedCatToNumeric&&(n=Math.floor(n),i=Math.floor(i),n<1&&(n=1,i=c.globals.dataPoints),i-n<2&&(i=n+1)),o!=="xy"&&o!=="x"||(A={min:n,max:i}),o!=="xy"&&o!=="y"||k.forEach(function(R,L){k[L].min=S[L],k[L].max=C[L]}),p){var T=p.getBeforeZoomRange(A,k);T&&(A=T.xaxis?T.xaxis:A,k=T.yaxis?T.yaxis:k)}var M={xaxis:A};c.config.chart.group||(M.yaxis=k),d.ctx.updateHelpers._updateOptions(M,!1,d.w.config.chart.animations.dynamicAnimation.enabled),typeof c.config.chart.events.zoomed=="function"&&p.zoomCallback(A,k)}else if(c.globals.selectionEnabled){var O,_=null;O={min:n,max:i},o!=="xy"&&o!=="y"||(_=J.clone(c.config.yaxis)).forEach(function(R,L){_[L].min=S[L],_[L].max=C[L]}),c.globals.selection=d.selection,typeof c.config.chart.events.selection=="function"&&c.config.chart.events.selection(d.ctx,{xaxis:O,yaxis:_})}}}},{key:"panDragging",value:function(a){var n=a.context,i=this.w,l=n;if(i.globals.lastClientPosition.x!==void 0){var o=i.globals.lastClientPosition.x-l.clientX,c=i.globals.lastClientPosition.y-l.clientY;Math.abs(o)>Math.abs(c)&&o>0?this.moveDirection="left":Math.abs(o)>Math.abs(c)&&o<0?this.moveDirection="right":Math.abs(c)>Math.abs(o)&&c>0?this.moveDirection="up":Math.abs(c)>Math.abs(o)&&c<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:l.clientX,y:l.clientY};var d=i.globals.isRangeBar?i.globals.minY:i.globals.minX,h=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;l.panScrolled(d,h)}},{key:"panScrolled",value:function(a,n){var i=this.w,l=this.xyRatios,o=J.clone(i.globals.initialConfig.yaxis),c=l.xRatio,d=i.globals.minX,h=i.globals.maxX;i.globals.isRangeBar&&(c=l.invertedYRatio,d=i.globals.minY,h=i.globals.maxY),this.moveDirection==="left"?(a=d+i.globals.gridWidth/15*c,n=h+i.globals.gridWidth/15*c):this.moveDirection==="right"&&(a=d-i.globals.gridWidth/15*c,n=h-i.globals.gridWidth/15*c),i.globals.isRangeBar||(a<i.globals.initialMinX||n>i.globals.initialMaxX)&&(a=d,n=h);var p={xaxis:{min:a,max:n}};i.config.chart.group||(p.yaxis=o),this.updateScrolledChart(p,a,n)}},{key:"updateScrolledChart",value:function(a,n,i){var l=this.w;if(this.ctx.updateHelpers._updateOptions(a,!1,!1),typeof l.config.chart.events.scrolled=="function"){var o={xaxis:{min:n,max:i}};l.config.chart.events.scrolled(this.ctx,o),this.ctx.events.fireEvent("scrolled",o)}}}]),r}(),p_=function(){function t(e){Se(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return Ce(t,[{key:"getNearestValues",value:function(e){var r=e.hoverArea,a=e.elGrid,n=e.clientX,i=e.clientY,l=this.w,o=a.getBoundingClientRect(),c=o.width,d=o.height,h=c/(l.globals.dataPoints-1),p=d/l.globals.dataPoints,m=this.hasBars();!l.globals.comboCharts&&!m||l.config.xaxis.convertedCatToNumeric||(h=c/l.globals.dataPoints);var x=n-o.left-l.globals.barPadForNumericAxis,b=i-o.top;x<0||b<0||x>c||b>d?(r.classList.remove("hovering-zoom"),r.classList.remove("hovering-pan")):l.globals.zoomEnabled?(r.classList.remove("hovering-pan"),r.classList.add("hovering-zoom")):l.globals.panEnabled&&(r.classList.remove("hovering-zoom"),r.classList.add("hovering-pan"));var y=Math.round(x/h),v=Math.floor(b/p);m&&!l.config.xaxis.convertedCatToNumeric&&(y=Math.ceil(x/h),y-=1);var N=null,C=null,S=l.globals.seriesXvalues.map(function(O){return O.filter(function(_){return J.isNumber(_)})}),k=l.globals.seriesYvalues.map(function(O){return O.filter(function(_){return J.isNumber(_)})});if(l.globals.isXNumeric){var A=this.ttCtx.getElGrid().getBoundingClientRect(),T=x*(A.width/c),M=b*(A.height/d);N=(C=this.closestInMultiArray(T,M,S,k)).index,y=C.j,N!==null&&l.globals.hasNullValues&&(S=l.globals.seriesXvalues[N],y=(C=this.closestInArray(T,S)).j)}return l.globals.capturedSeriesIndex=N===null?-1:N,(!y||y<1)&&(y=0),l.globals.isBarHorizontal?l.globals.capturedDataPointIndex=v:l.globals.capturedDataPointIndex=y,{capturedSeries:N,j:l.globals.isBarHorizontal?v:y,hoverX:x,hoverY:b}}},{key:"getFirstActiveXArray",value:function(e){for(var r=this.w,a=0,n=e.map(function(l,o){return l.length>0?o:-1}),i=0;i<n.length;i++)if(n[i]!==-1&&r.globals.collapsedSeriesIndices.indexOf(i)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(i)===-1){a=n[i];break}return a}},{key:"closestInMultiArray",value:function(e,r,a,n){for(var i,l=this.w,o=1/0,c=null,d=null,h=0;h<a.length;h++)if(i=h,l.globals.collapsedSeriesIndices.indexOf(i)===-1&&l.globals.ancillaryCollapsedSeriesIndices.indexOf(i)===-1)for(var p=a[h],m=n[h],x=Math.min(p.length,m.length),b=0;b<x;b++){var y=e-p[b],v=Math.sqrt(y*y);if(!l.globals.allSeriesHasEqualX){var N=r-m[b];v=Math.sqrt(y*y+N*N)}v<o&&(o=v,c=h,d=b)}return{index:c,j:d}}},{key:"closestInArray",value:function(e,r){for(var a=r[0],n=null,i=Math.abs(e-a),l=0;l<r.length;l++){var o=Math.abs(e-r[l]);o<i&&(i=o,n=l)}return{j:n}}},{key:"isXoverlap",value:function(e){var r=[],a=this.w.globals.seriesX.filter(function(i){return i[0]!==void 0});if(a.length>0)for(var n=0;n<a.length-1;n++)a[n][e]!==void 0&&a[n+1][e]!==void 0&&a[n][e]!==a[n+1][e]&&r.push("unEqual");return r.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,r=this.w.globals.initialSeries,a=0;a<r.length-1;a++)if(r[a].data.length!==r[a+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return Ar(e).reduce(function(r,a){return r+a.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],a=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");a=Ar(a),r&&(a=a.filter(function(i){var l=Number(i.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(l)===-1})),a.sort(function(i,l){var o=Number(i.getAttribute("data:realIndex")),c=Number(l.getAttribute("data:realIndex"));return c<o?1:c>o?-1:0});var n=[];return a.forEach(function(i){n.push(i.querySelector(".apexcharts-marker"))}),n}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,r){var a=Number(e.getAttribute("cx")),n=Number(e.getAttribute("cy")),i=e.getAttribute("shape");return new ge(this.ctx).getMarkerPath(a,n,i,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,a=r.config.markers.hover.size;return a===void 0&&(a=r.globals.markers.size[e]+r.config.markers.hover.sizeOffset),a}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var r=this.w,a=this.ttCtx;a.allTooltipSeriesGroups.length===0&&(a.allTooltipSeriesGroups=r.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var n=a.allTooltipSeriesGroups,i=0;i<n.length;i++)e==="enable"?(n[i].classList.add("apexcharts-active"),n[i].style.display=r.config.tooltip.items.display):(n[i].classList.remove("apexcharts-active"),n[i].style.display="none")}}]),t}(),xK=function(){function t(e){Se(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new p_(e)}return Ce(t,[{key:"drawSeriesTexts",value:function(e){var r=e.shared,a=r===void 0||r,n=e.ttItems,i=e.i,l=i===void 0?0:i,o=e.j,c=o===void 0?null:o,d=e.y1,h=e.y2,p=e.e,m=this.w;m.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:l,j:c,y1:d,y2:h,w:m}):this.toggleActiveInactiveSeries(a,l);var x=this.getValuesToPrint({i:l,j:c});this.printLabels({i:l,j:c,values:x,ttItems:n,shared:a,e:p});var b=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=b.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=b.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var r,a=this,n=e.i,i=e.j,l=e.values,o=e.ttItems,c=e.shared,d=e.e,h=this.w,p=[],m=function(A){return h.globals.seriesGoals[A]&&h.globals.seriesGoals[A][i]&&Array.isArray(h.globals.seriesGoals[A][i])},x=l.xVal,b=l.zVal,y=l.xAxisTTVal,v="",N=h.globals.colors[n];i!==null&&h.config.plotOptions.bar.distributed&&(N=h.globals.colors[i]);for(var C=function(A,T){var M=a.getFormatters(n);v=a.getSeriesName({fn:M.yLbTitleFormatter,index:n,seriesIndex:n,j:i}),h.config.chart.type==="treemap"&&(v=M.yLbTitleFormatter(String(h.config.series[n].data[i].x),{series:h.globals.series,seriesIndex:n,dataPointIndex:i,w:h}));var O=h.config.tooltip.inverseOrder?T:A;if(h.globals.axisCharts){var _=function(z){var F,Y,X,H;return h.globals.isRangeData?M.yLbFormatter((F=h.globals.seriesRangeStart)===null||F===void 0||(Y=F[z])===null||Y===void 0?void 0:Y[i],{series:h.globals.seriesRangeStart,seriesIndex:z,dataPointIndex:i,w:h})+" - "+M.yLbFormatter((X=h.globals.seriesRangeEnd)===null||X===void 0||(H=X[z])===null||H===void 0?void 0:H[i],{series:h.globals.seriesRangeEnd,seriesIndex:z,dataPointIndex:i,w:h}):M.yLbFormatter(h.globals.series[z][i],{series:h.globals.series,seriesIndex:z,dataPointIndex:i,w:h})};if(c)M=a.getFormatters(O),v=a.getSeriesName({fn:M.yLbTitleFormatter,index:O,seriesIndex:n,j:i}),N=h.globals.colors[O],r=_(O),m(O)&&(p=h.globals.seriesGoals[O][i].map(function(z){return{attrs:z,val:M.yLbFormatter(z.value,{seriesIndex:O,dataPointIndex:i,w:h})}}));else{var R,L=d==null||(R=d.target)===null||R===void 0?void 0:R.getAttribute("fill");L&&(L.indexOf("url")!==-1?L.indexOf("Pattern")!==-1&&(N=h.globals.dom.baseEl.querySelector(L.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):N=L),r=_(n),m(n)&&Array.isArray(h.globals.seriesGoals[n][i])&&(p=h.globals.seriesGoals[n][i].map(function(z){return{attrs:z,val:M.yLbFormatter(z.value,{seriesIndex:n,dataPointIndex:i,w:h})}}))}}i===null&&(r=M.yLbFormatter(h.globals.series[n],ve(ve({},h),{},{seriesIndex:n,dataPointIndex:n}))),a.DOMHandling({i:n,t:O,j:i,ttItems:o,values:{val:r,goalVals:p,xVal:x,xAxisTTVal:y,zVal:b},seriesName:v,shared:c,pColor:N})},S=0,k=h.globals.series.length-1;S<h.globals.series.length;S++,k--)C(S,k)}},{key:"getFormatters",value:function(e){var r,a=this.w,n=a.globals.yLabelFormatters[e];return a.globals.ttVal!==void 0?Array.isArray(a.globals.ttVal)?(n=a.globals.ttVal[e]&&a.globals.ttVal[e].formatter,r=a.globals.ttVal[e]&&a.globals.ttVal[e].title&&a.globals.ttVal[e].title.formatter):(n=a.globals.ttVal.formatter,typeof a.globals.ttVal.title.formatter=="function"&&(r=a.globals.ttVal.title.formatter)):r=a.config.tooltip.y.title.formatter,typeof n!="function"&&(n=a.globals.yLabelFormatters[0]?a.globals.yLabelFormatters[0]:function(i){return i}),typeof r!="function"&&(r=function(i){return i?i+": ":""}),{yLbFormatter:n,yLbTitleFormatter:r}}},{key:"getSeriesName",value:function(e){var r=e.fn,a=e.index,n=e.seriesIndex,i=e.j,l=this.w;return r(String(l.globals.seriesNames[a]),{series:l.globals.series,seriesIndex:n,dataPointIndex:i,w:l})}},{key:"DOMHandling",value:function(e){e.i;var r=e.t,a=e.j,n=e.ttItems,i=e.values,l=e.seriesName,o=e.shared,c=e.pColor,d=this.w,h=this.ttCtx,p=i.val,m=i.goalVals,x=i.xVal,b=i.xAxisTTVal,y=i.zVal,v=null;v=n[r].children,d.config.tooltip.fillSeriesColor&&(n[r].style.backgroundColor=c,v[0].style.display="none"),h.showTooltipTitle&&(h.tooltipTitle===null&&(h.tooltipTitle=d.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),h.tooltipTitle.innerHTML=x),h.isXAxisTooltipEnabled&&(h.xaxisTooltipText.innerHTML=b!==""?b:x);var N=n[r].querySelector(".apexcharts-tooltip-text-y-label");N&&(N.innerHTML=l||"");var C=n[r].querySelector(".apexcharts-tooltip-text-y-value");C&&(C.innerHTML=p!==void 0?p:""),v[0]&&v[0].classList.contains("apexcharts-tooltip-marker")&&(d.config.tooltip.marker.fillColors&&Array.isArray(d.config.tooltip.marker.fillColors)&&(c=d.config.tooltip.marker.fillColors[r]),d.config.tooltip.fillSeriesColor?v[0].style.backgroundColor=c:v[0].style.color=c),d.config.tooltip.marker.show||(v[0].style.display="none");var S=n[r].querySelector(".apexcharts-tooltip-text-goals-label"),k=n[r].querySelector(".apexcharts-tooltip-text-goals-value");if(m.length&&d.globals.seriesGoals[r]){var A=function(){var O="<div>",_="<div>";m.forEach(function(R,L){O+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(R.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(R.attrs.name,"</div>"),_+="<div>".concat(R.val,"</div>")}),S.innerHTML=O+"</div>",k.innerHTML=_+"</div>"};o?d.globals.seriesGoals[r][a]&&Array.isArray(d.globals.seriesGoals[r][a])?A():(S.innerHTML="",k.innerHTML=""):A()}else S.innerHTML="",k.innerHTML="";if(y!==null&&(n[r].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=d.config.tooltip.z.title,n[r].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=y!==void 0?y:""),o&&v[0]){if(d.config.tooltip.hideEmptySeries){var T=n[r].querySelector(".apexcharts-tooltip-marker"),M=n[r].querySelector(".apexcharts-tooltip-text");parseFloat(p)==0?(T.style.display="none",M.style.display="none"):(T.style.display="block",M.style.display="block")}p==null||d.globals.ancillaryCollapsedSeriesIndices.indexOf(r)>-1||d.globals.collapsedSeriesIndices.indexOf(r)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&h.tConfig.enabledOnSeries.indexOf(r)===-1?v[0].parentNode.style.display="none":v[0].parentNode.style.display=d.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&h.tConfig.enabledOnSeries.indexOf(r)===-1&&(v[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,r){var a=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var n=a.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(r));n&&(n.classList.add("apexcharts-active"),n.style.display=a.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var r=e.i,a=e.j,n=this.w,i=this.ctx.series.filteredSeriesX(),l="",o="",c=null,d=null,h={series:n.globals.series,seriesIndex:r,dataPointIndex:a,w:n},p=n.globals.ttZFormatter;a===null?d=n.globals.series[r]:n.globals.isXNumeric&&n.config.chart.type!=="treemap"?(l=i[r][a],i[r].length===0&&(l=i[this.tooltipUtil.getFirstActiveXArray(i)][a])):l=new oN(this.ctx).isFormatXY()?n.config.series[r].data[a]!==void 0?n.config.series[r].data[a].x:"":n.globals.labels[a]!==void 0?n.globals.labels[a]:"";var m=l;return n.globals.isXNumeric&&n.config.xaxis.type==="datetime"?l=new Jf(this.ctx).xLabelFormat(n.globals.ttKeyFormatter,m,m,{i:void 0,dateFormatter:new qr(this.ctx).formatDate,w:this.w}):l=n.globals.isBarHorizontal?n.globals.yLabelFormatters[0](m,h):n.globals.xLabelFormatter(m,h),n.config.tooltip.x.formatter!==void 0&&(l=n.globals.ttKeyFormatter(m,h)),n.globals.seriesZ.length>0&&n.globals.seriesZ[r].length>0&&(c=p(n.globals.seriesZ[r][a],n)),o=typeof n.config.xaxis.tooltip.formatter=="function"?n.globals.xaxisTooltipFormatter(m,h):l,{val:Array.isArray(d)?d.join(" "):d,xVal:Array.isArray(l)?l.join(" "):l,xAxisTTVal:Array.isArray(o)?o.join(" "):o,zVal:c}}},{key:"handleCustomTooltip",value:function(e){var r=e.i,a=e.j,n=e.y1,i=e.y2,l=e.w,o=this.ttCtx.getElTooltip(),c=l.config.tooltip.custom;Array.isArray(c)&&c[r]&&(c=c[r]);var d=c({ctx:this.ctx,series:l.globals.series,seriesIndex:r,dataPointIndex:a,y1:n,y2:i,w:l});typeof d=="string"||typeof d=="number"?o.innerHTML=d:(d instanceof Element||typeof d.nodeName=="string")&&(o.innerHTML="",o.appendChild(d.cloneNode(!0)))}}]),t}(),m_=function(){function t(e){Se(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return Ce(t,[{key:"moveXCrosshairs",value:function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,a=this.ttCtx,n=this.w,i=a.getElXCrosshairs(),l=e-a.xcrosshairsWidth/2,o=n.globals.labels.slice().length;if(r!==null&&(l=n.globals.gridWidth/o*r),i===null||n.globals.isBarHorizontal||(i.setAttribute("x",l),i.setAttribute("x1",l),i.setAttribute("x2",l),i.setAttribute("y2",n.globals.gridHeight),i.classList.add("apexcharts-active")),l<0&&(l=0),l>n.globals.gridWidth&&(l=n.globals.gridWidth),a.isXAxisTooltipEnabled){var c=l;n.config.xaxis.crosshairs.width!=="tickWidth"&&n.config.xaxis.crosshairs.width!=="barWidth"||(c=l+a.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,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");var n=a.xaxisOffY+r.config.xaxis.tooltip.offsetY+r.globals.translateY+1+r.config.xaxis.offsetY;if(e-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=r.globals.translateX;var i;i=new ge(this.ctx).getTextRects(a.xaxisTooltipText.innerHTML),a.xaxisTooltipText.style.minWidth=i.width+"px",a.xaxisTooltip.style.left=e+"px",a.xaxisTooltip.style.top=n+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var r=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=r.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var n=parseInt(a.ycrosshairsHidden.getAttribute("y1"),10),i=r.globals.translateY+n,l=a.yaxisTTEls[e].getBoundingClientRect(),o=l.height,c=r.globals.translateYAxisX[e]-2;r.config.yaxis[e].opposite&&(c-=l.width),i-=o/2,r.globals.ignoreYAxisIndexes.indexOf(e)===-1&&i>0&&i<r.globals.gridHeight?(a.yaxisTTEls[e].classList.add("apexcharts-active"),a.yaxisTTEls[e].style.top=i+"px",a.yaxisTTEls[e].style.left=c+r.config.yaxis[e].tooltip.offsetX+"px"):a.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=this.w,i=this.ttCtx,l=i.getElTooltip(),o=i.tooltipRect,c=a!==null?parseFloat(a):1,d=parseFloat(e)+c+5,h=parseFloat(r)+c/2;if(d>n.globals.gridWidth/2&&(d=d-o.ttWidth-c-10),d>n.globals.gridWidth-o.ttWidth-10&&(d=n.globals.gridWidth-o.ttWidth),d<-20&&(d=-20),n.config.tooltip.followCursor){var p=i.getElGrid().getBoundingClientRect();(d=i.e.clientX-p.left)>n.globals.gridWidth/2&&(d-=i.tooltipRect.ttWidth),(h=i.e.clientY+n.globals.translateY-p.top)>n.globals.gridHeight/2&&(h-=i.tooltipRect.ttHeight)}else n.globals.isBarHorizontal||o.ttHeight/2+h>n.globals.gridHeight&&(h=n.globals.gridHeight-o.ttHeight+n.globals.translateY);isNaN(d)||(d+=n.globals.translateX,l.style.left=d+"px",l.style.top=h+"px")}},{key:"moveMarkers",value:function(e,r){var a=this.w,n=this.ttCtx;if(a.globals.markers.size[e]>0)for(var i=a.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),l=0;l<i.length;l++)parseInt(i[l].getAttribute("rel"),10)===r&&(n.marker.resetPointsSize(),n.marker.enlargeCurrentPoint(r,i[l]));else n.marker.resetPointsSize(),this.moveDynamicPointOnHover(r,e)}},{key:"moveDynamicPointOnHover",value:function(e,r){var a,n,i,l,o=this.w,c=this.ttCtx,d=new ge(this.ctx),h=o.globals.pointsArray,p=c.tooltipUtil.getHoverMarkerSize(r),m=o.config.series[r].type;if(!m||m!=="column"&&m!=="candlestick"&&m!=="boxPlot"){i=(a=h[r][e])===null||a===void 0?void 0:a[0],l=((n=h[r][e])===null||n===void 0?void 0:n[1])||0;var x=o.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"'] .apexcharts-series-markers path"));if(x&&l<o.globals.gridHeight&&l>0){var b=x.getAttribute("shape"),y=d.getMarkerPath(i,l,b,1.5*p);x.setAttribute("d",y)}this.moveXCrosshairs(i),c.fixedTooltip||this.moveTooltip(i,l,p)}}},{key:"moveDynamicPointsOnHover",value:function(e){var r,a=this.ttCtx,n=a.w,i=0,l=0,o=n.globals.pointsArray,c=new _n(this.ctx),d=new ge(this.ctx);r=c.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=a.tooltipUtil.getHoverMarkerSize(r);if(o[r]&&(i=o[r][e][0],l=o[r][e][1]),!isNaN(i)){var p=a.tooltipUtil.getAllMarkers();if(p.length)for(var m=0;m<n.globals.series.length;m++){var x=o[m];if(n.globals.comboCharts&&x===void 0&&p.splice(m,0,null),x&&x.length){var b=o[m][e][1],y=void 0;p[m].setAttribute("cx",i);var v=p[m].getAttribute("shape");if(n.config.chart.type==="rangeArea"&&!n.globals.comboCharts){var N=e+n.globals.series[m].length;y=o[m][N][1],b-=Math.abs(b-y)/2}if(b!==null&&!isNaN(b)&&b<n.globals.gridHeight+h&&b+h>0){var C=d.getMarkerPath(i,b,v,h);p[m].setAttribute("d",C)}else p[m].setAttribute("d","")}}this.moveXCrosshairs(i),a.fixedTooltip||this.moveTooltip(i,l||n.globals.gridHeight,h)}}},{key:"moveStickyTooltipOverBars",value:function(e,r){var a=this.w,n=this.ttCtx,i=a.globals.columnSeries?a.globals.columnSeries.length:a.globals.series.length;a.config.chart.stacked&&(i=a.globals.barGroups.length);var l=i>=2&&i%2==0?Math.floor(i/2):Math.floor(i/2)+1;a.globals.isBarHorizontal&&(l=new _n(this.ctx).getActiveConfigSeriesIndex("desc")+1);var o=a.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(l,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(l,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(l,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(l,"'] path[j='").concat(e,"']"));o||typeof r!="number"||(o=a.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=o?parseFloat(o.getAttribute("cx")):0,d=o?parseFloat(o.getAttribute("cy")):0,h=o?parseFloat(o.getAttribute("barWidth")):0,p=n.getElGrid().getBoundingClientRect(),m=o&&(o.classList.contains("apexcharts-candlestick-area")||o.classList.contains("apexcharts-boxPlot-area"));a.globals.isXNumeric?(o&&!m&&(c-=i%2!=0?h/2:0),o&&m&&(c-=h/2)):a.globals.isBarHorizontal||(c=n.xAxisTicksPositions[e-1]+n.dataPointsDividedWidth/2,isNaN(c)&&(c=n.xAxisTicksPositions[e]-n.dataPointsDividedWidth/2)),a.globals.isBarHorizontal?d-=n.tooltipRect.ttHeight:a.config.tooltip.followCursor?d=n.e.clientY-p.top-n.tooltipRect.ttHeight/2:d+n.tooltipRect.ttHeight+15>a.globals.gridHeight&&(d=a.globals.gridHeight),a.globals.isBarHorizontal||this.moveXCrosshairs(c),n.fixedTooltip||this.moveTooltip(c,d||a.globals.gridHeight)}}]),t}(),bK=function(){function t(e){Se(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new m_(e)}return Ce(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,r=new ge(this.ctx),a=new Xd(this.ctx),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");n=Ar(n),e.config.chart.stacked&&n.sort(function(p,m){return parseFloat(p.getAttribute("data:realIndex"))-parseFloat(m.getAttribute("data:realIndex"))});for(var i=0;i<n.length;i++){var l=n[i].querySelector(".apexcharts-series-markers-wrap");if(l!==null){var o=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 d=a.getMarkerConfig({cssClass:c,seriesIndex:Number(l.getAttribute("data:realIndex"))});(o=r.drawMarker(0,0,d)).node.setAttribute("default-marker-size",0);var h=document.createElementNS(e.globals.SVGNS,"g");h.classList.add("apexcharts-series-markers"),h.appendChild(o.node),l.appendChild(h)}}}},{key:"enlargeCurrentPoint",value:function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,i=this.w;i.config.chart.type!=="bubble"&&this.newPointSize(e,r);var l=r.getAttribute("cx"),o=r.getAttribute("cy");if(a!==null&&n!==null&&(l=a,o=n),this.tooltipPosition.moveXCrosshairs(l),!this.fixedTooltip){if(i.config.chart.type==="radar"){var c=this.ttCtx.getElGrid().getBoundingClientRect();l=this.ttCtx.e.clientX-c.left}this.tooltipPosition.moveTooltip(l,o,i.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var r=this.w,a=this,n=this.ttCtx,i=e,l=r.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),o=r.config.markers.hover.size,c=0;c<l.length;c++){var d=l[c].getAttribute("rel"),h=l[c].getAttribute("index");if(o===void 0&&(o=r.globals.markers.size[h]+r.config.markers.hover.sizeOffset),i===parseInt(d,10)){a.newPointSize(i,l[c]);var p=l[c].getAttribute("cx"),m=l[c].getAttribute("cy");a.tooltipPosition.moveXCrosshairs(p),n.fixedTooltip||a.tooltipPosition.moveTooltip(p,m,o)}else a.oldPointSize(l[c])}}},{key:"newPointSize",value:function(e,r){var a=this.w,n=a.config.markers.hover.size,i=e===0?r.parentNode.firstChild:r.parentNode.lastChild;if(i.getAttribute("default-marker-size")!=="0"){var l=parseInt(i.getAttribute("index"),10);n===void 0&&(n=a.globals.markers.size[l]+a.config.markers.hover.sizeOffset),n<0&&(n=0);var o=this.ttCtx.tooltipUtil.getPathFromPoint(r,n);r.setAttribute("d",o)}}},{key:"oldPointSize",value:function(e){var r=parseFloat(e.getAttribute("default-marker-size")),a=this.ttCtx.tooltipUtil.getPathFromPoint(e,r);e.setAttribute("d",a)}},{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 a=parseFloat(e[r].getAttribute("default-marker-size"));if(J.isNumber(a)&&a>0){var n=this.ttCtx.tooltipUtil.getPathFromPoint(e[r],a);e[r].setAttribute("d",n)}else e[r].setAttribute("d","M0,0")}}}]),t}(),yK=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 Ce(t,[{key:"getAttr",value:function(e,r){return parseFloat(e.target.getAttribute(r))}},{key:"handleHeatTreeTooltip",value:function(e){var r=e.e,a=e.opt,n=e.x,i=e.y,l=e.type,o=this.ttCtx,c=this.w;if(r.target.classList.contains("apexcharts-".concat(l,"-rect"))){var d=this.getAttr(r,"i"),h=this.getAttr(r,"j"),p=this.getAttr(r,"cx"),m=this.getAttr(r,"cy"),x=this.getAttr(r,"width"),b=this.getAttr(r,"height");if(o.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:d,j:h,shared:!1,e:r}),c.globals.capturedSeriesIndex=d,c.globals.capturedDataPointIndex=h,n=p+o.tooltipRect.ttWidth/2+x,i=m+o.tooltipRect.ttHeight/2-b/2,o.tooltipPosition.moveXCrosshairs(p+x/2),n>c.globals.gridWidth/2&&(n=p-o.tooltipRect.ttWidth/2+x),o.w.config.tooltip.followCursor){var y=c.globals.dom.elWrap.getBoundingClientRect();n=c.globals.clientX-y.left-(n>c.globals.gridWidth/2?o.tooltipRect.ttWidth:0),i=c.globals.clientY-y.top-(i>c.globals.gridHeight/2?o.tooltipRect.ttHeight:0)}}return{x:n,y:i}}},{key:"handleMarkerTooltip",value:function(e){var r,a,n=e.e,i=e.opt,l=e.x,o=e.y,c=this.w,d=this.ttCtx;if(n.target.classList.contains("apexcharts-marker")){var h=parseInt(i.paths.getAttribute("cx"),10),p=parseInt(i.paths.getAttribute("cy"),10),m=parseFloat(i.paths.getAttribute("val"));if(a=parseInt(i.paths.getAttribute("rel"),10),r=parseInt(i.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,d.intersect){var x=J.findAncestor(i.paths,"apexcharts-series");x&&(r=parseInt(x.getAttribute("data:realIndex"),10))}if(d.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:r,j:a,shared:!d.showOnIntersect&&c.config.tooltip.shared,e:n}),n.type==="mouseup"&&d.markerClick(n,r,a),c.globals.capturedSeriesIndex=r,c.globals.capturedDataPointIndex=a,l=h,o=p+c.globals.translateY-1.4*d.tooltipRect.ttHeight,d.w.config.tooltip.followCursor){var b=d.getElGrid().getBoundingClientRect();o=d.e.clientY+c.globals.translateY-b.top}m<0&&(o=p),d.marker.enlargeCurrentPoint(a,i.paths,l,o)}return{x:l,y:o}}},{key:"handleBarTooltip",value:function(e){var r,a,n=e.e,i=e.opt,l=this.w,o=this.ttCtx,c=o.getElTooltip(),d=0,h=0,p=0,m=this.getBarTooltipXY({e:n,opt:i});if(m.j!==null||m.barHeight!==0||m.barWidth!==0){r=m.i;var x=m.j;if(l.globals.capturedSeriesIndex=r,l.globals.capturedDataPointIndex=x,l.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!l.config.tooltip.shared?(h=m.x,p=m.y,a=Array.isArray(l.config.stroke.width)?l.config.stroke.width[r]:l.config.stroke.width,d=h):l.globals.comboCharts||l.config.tooltip.shared||(d/=2),isNaN(p)&&(p=l.globals.svgHeight-o.tooltipRect.ttHeight),parseInt(i.paths.parentNode.getAttribute("data:realIndex"),10),h+o.tooltipRect.ttWidth>l.globals.gridWidth?h-=o.tooltipRect.ttWidth:h<0&&(h=0),o.w.config.tooltip.followCursor){var b=o.getElGrid().getBoundingClientRect();p=o.e.clientY-b.top}o.tooltip===null&&(o.tooltip=l.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),l.config.tooltip.shared||(l.globals.comboBarCount>0?o.tooltipPosition.moveXCrosshairs(d+a/2):o.tooltipPosition.moveXCrosshairs(d)),!o.fixedTooltip&&(!l.config.tooltip.shared||l.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&(p=p+l.globals.translateY-o.tooltipRect.ttHeight/2,c.style.left=h+l.globals.translateX+"px",c.style.top=p+"px")}}},{key:"getBarTooltipXY",value:function(e){var r=this,a=e.e,n=e.opt,i=this.w,l=null,o=this.ttCtx,c=0,d=0,h=0,p=0,m=0,x=a.target.classList;if(x.contains("apexcharts-bar-area")||x.contains("apexcharts-candlestick-area")||x.contains("apexcharts-boxPlot-area")||x.contains("apexcharts-rangebar-area")){var b=a.target,y=b.getBoundingClientRect(),v=n.elGrid.getBoundingClientRect(),N=y.height;m=y.height;var C=y.width,S=parseInt(b.getAttribute("cx"),10),k=parseInt(b.getAttribute("cy"),10);p=parseFloat(b.getAttribute("barWidth"));var A=a.type==="touchmove"?a.touches[0].clientX:a.clientX;l=parseInt(b.getAttribute("j"),10),c=parseInt(b.parentNode.getAttribute("rel"),10)-1;var T=b.getAttribute("data-range-y1"),M=b.getAttribute("data-range-y2");i.globals.comboCharts&&(c=parseInt(b.parentNode.getAttribute("data:realIndex"),10));var O=function(R){return i.globals.isXNumeric?S-C/2:r.isVerticalGroupedRangeBar?S+C/2:S-o.dataPointsDividedWidth+C/2},_=function(){return k-o.dataPointsDividedHeight+N/2-o.tooltipRect.ttHeight/2};o.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:c,j:l,y1:T?parseInt(T,10):null,y2:M?parseInt(M,10):null,shared:!o.showOnIntersect&&i.config.tooltip.shared,e:a}),i.config.tooltip.followCursor?i.globals.isBarHorizontal?(d=A-v.left+15,h=_()):(d=O(),h=a.clientY-v.top-o.tooltipRect.ttHeight/2-15):i.globals.isBarHorizontal?((d=S)<o.xyRatios.baseLineInvertedY&&(d=S-o.tooltipRect.ttWidth),h=_()):(d=O(),h=k)}return{x:d,y:h,barHeight:m,barWidth:p,i:c,j:l}}}]),t}(),vK=function(){function t(e){Se(this,t),this.w=e.w,this.ttCtx=e}return Ce(t,[{key:"drawXaxisTooltip",value:function(){var e=this.w,r=this.ttCtx,a=e.config.xaxis.position==="bottom";r.xaxisOffY=a?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var n=a?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",i=e.globals.dom.elWrap;r.isXAxisTooltipEnabled&&e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(r.xaxisTooltip=document.createElement("div"),r.xaxisTooltip.setAttribute("class",n+" apexcharts-theme-"+e.config.tooltip.theme),i.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,a=0;a<e.config.yaxis.length;a++){var n=e.config.yaxis[a].opposite||e.config.yaxis[a].crosshairs.opposite;r.yaxisOffX=n?e.globals.gridWidth+1:1;var i="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(a,n?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),l=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(a))===null&&(r.yaxisTooltip=document.createElement("div"),r.yaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+e.config.tooltip.theme),l.appendChild(r.yaxisTooltip),a===0&&(r.yaxisTooltipText=[]),r.yaxisTooltipText[a]=document.createElement("div"),r.yaxisTooltipText[a].classList.add("apexcharts-yaxistooltip-text"),r.yaxisTooltip.appendChild(r.yaxisTooltipText[a]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,r=this.ttCtx,a=r.getElXCrosshairs();if(r.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var n=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(n!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var i=parseFloat(n.getAttribute("barWidth"));r.xcrosshairsWidth=i}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==="tickWidth"){var o=e.globals.labels.length;r.xcrosshairsWidth=e.globals.gridWidth/o}else if(e.config.xaxis.crosshairs.width==="barWidth"){var c=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(c!==null){var d=parseFloat(c.getAttribute("barWidth"));r.xcrosshairsWidth=d}else r.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(r.xcrosshairsWidth=0),a!==null&&r.xcrosshairsWidth>0&&a.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,a){var n=this.ttCtx,i=this.w,l=i.globals,o=l.seriesYAxisMap[e];if(n.yaxisTooltips[e]&&o.length>0){var c=l.yLabelFormatters[e],d=n.getElGrid().getBoundingClientRect(),h=o[0],p=0;a.yRatio.length>1&&(p=h);var m=(r-d.top)*a.yRatio[p],x=l.maxYArr[h]-l.minYArr[h],b=l.minYArr[h]+(x-m);i.config.yaxis[e].reversed&&(b=l.maxYArr[h]-(x-m)),n.tooltipPosition.moveYCrosshairs(r-d.top),n.yaxisTooltipText[e].innerHTML=c(b),n.tooltipPosition.moveYAxisTooltip(e)}}}]),t}(),_D=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 p_(this),this.tooltipLabels=new xK(this),this.tooltipPosition=new m_(this),this.marker=new bK(this),this.intersect=new yK(this),this.axesTooltip=new vK(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 Ce(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(l,o){return!!(l.show&&l.tooltip.enabled&&r.globals.axisCharts)}),this.allTooltipSeriesGroups=[],r.globals.axisCharts||(this.showTooltipTitle=!1);var a=document.createElement("div");if(a.classList.add("apexcharts-tooltip"),r.config.tooltip.cssClass&&a.classList.add(r.config.tooltip.cssClass),a.classList.add("apexcharts-theme-".concat(this.tConfig.theme||"light")),r.globals.dom.elWrap.appendChild(a),r.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var n=new yf(this.ctx);this.xAxisTicksPositions=n.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,a.appendChild(this.tooltipTitle));var i=r.globals.series.length;(r.globals.xyCharts||r.globals.comboCharts)&&this.tConfig.shared&&(i=this.showOnIntersect?1:r.globals.series.length),this.legendLabels=r.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(i),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var r=this,a=this.w,n=[],i=this.getElTooltip(),l=function(c){var d=document.createElement("div");d.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(c)),d.style.order=a.config.tooltip.inverseOrder?e-c:c+1;var h=document.createElement("span");h.classList.add("apexcharts-tooltip-marker"),a.config.tooltip.fillSeriesColor?h.style.backgroundColor=a.globals.colors[c]:h.style.color=a.globals.colors[c];var p=a.config.markers.shape,m=p;Array.isArray(p)&&(m=p[c]),h.setAttribute("shape",m),d.appendChild(h);var x=document.createElement("div");x.classList.add("apexcharts-tooltip-text"),x.style.fontFamily=r.tConfig.style.fontFamily||a.config.chart.fontFamily,x.style.fontSize=r.tConfig.style.fontSize,["y","goals","z"].forEach(function(b){var y=document.createElement("div");y.classList.add("apexcharts-tooltip-".concat(b,"-group"));var v=document.createElement("span");v.classList.add("apexcharts-tooltip-text-".concat(b,"-label")),y.appendChild(v);var N=document.createElement("span");N.classList.add("apexcharts-tooltip-text-".concat(b,"-value")),y.appendChild(N),x.appendChild(y)}),d.appendChild(x),i.appendChild(d),n.push(d)},o=0;o<e;o++)l(o);return n}},{key:"addSVGEvents",value:function(){var e=this.w,r=e.config.chart.type,a=this.getElTooltip(),n=!(r!=="bar"&&r!=="candlestick"&&r!=="boxPlot"&&r!=="rangeBar"),i=r==="area"||r==="line"||r==="scatter"||r==="bubble"||r==="radar",l=e.globals.dom.Paper.node,o=this.getElGrid();o&&(this.seriesBound=o.getBoundingClientRect());var c,d=[],h=[],p={hoverArea:l,elGrid:o,tooltipEl:a,tooltipY:d,tooltipX:h,ttItems:this.ttItems};if(e.globals.axisCharts&&(i?c=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):n?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++)d.push(c[m].getAttribute("cy")),h.push(c[m].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||n&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([l],p);else if(n&&!e.globals.comboCharts||i&&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 b=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");b.length>0&&this.addPathsEventListeners(b,p),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(p)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,r=this.getElTooltip(),a=r.getBoundingClientRect(),n=a.width+10,i=a.height+10,l=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY,c=this.tConfig.fixed.position.toLowerCase();return c.indexOf("right")>-1&&(l=l+e.globals.svgWidth-n+10),c.indexOf("bottom")>-1&&(o=o+e.globals.svgHeight-i-10),r.style.left=l+"px",r.style.top=o+"px",{x:l,y:o,ttWidth:n,ttHeight:i}}},{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 a=this,n=function(l){var o={paths:e[l],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[l].addEventListener(c,a.onSeriesHover.bind(a,o),{capture:!1,passive:!0})})},i=0;i<e.length;i++)n(i)}},{key:"onSeriesHover",value:function(e,r){var a=this,n=Date.now()-this.lastHoverTime;n>=20?this.seriesHover(e,r):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){a.seriesHover(e,r)},20-n))}},{key:"seriesHover",value:function(e,r){var a=this;this.lastHoverTime=Date.now();var n=[],i=this.w;i.config.chart.group&&(n=this.ctx.getGroupedCharts()),i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||i.globals.dataPoints===0)||(n.length?n.forEach(function(l){var o=a.getElTooltip(l),c={paths:e.paths,tooltipEl:o,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:l.w.globals.tooltip.ttItems};l.w.globals.minX===a.w.globals.minX&&l.w.globals.maxX===a.w.globals.maxX&&l.w.globals.tooltip.seriesHoverByContext({chartCtx:l,ttCtx:l.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,a=e.ttCtx,n=e.opt,i=e.e,l=r.w,o=this.getElTooltip(r);o&&(a.tooltipRect={x:0,y:0,ttWidth:o.getBoundingClientRect().width,ttHeight:o.getBoundingClientRect().height},a.e=i,a.tooltipUtil.hasBars()&&!l.globals.comboCharts&&!a.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new _n(r).toggleSeriesOnHover(i,i.target.parentNode),l.globals.axisCharts?a.axisChartsTooltips({e:i,opt:n,tooltipRect:a.tooltipRect}):a.nonAxisChartsTooltips({e:i,opt:n,tooltipRect:a.tooltipRect}),a.fixedTooltip&&a.drawFixedTooltipRect())}},{key:"axisChartsTooltips",value:function(e){var r,a,n=e.e,i=e.opt,l=this.w,o=i.elGrid.getBoundingClientRect(),c=n.type==="touchmove"?n.touches[0].clientX:n.clientX,d=n.type==="touchmove"?n.touches[0].clientY:n.clientY;if(this.clientY=d,this.clientX=c,l.globals.capturedSeriesIndex=-1,l.globals.capturedDataPointIndex=-1,d<o.top||d>o.top+o.height)this.handleMouseOut(i);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!l.config.tooltip.shared){var h=parseInt(i.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(i)}var p=this.getElTooltip(),m=this.getElXCrosshairs(),x=[];l.config.chart.group&&(x=this.ctx.getSyncedCharts());var b=l.globals.xyCharts||l.config.chart.type==="bar"&&!l.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||l.globals.comboCharts&&this.tooltipUtil.hasBars();if(n.type==="mousemove"||n.type==="touchmove"||n.type==="mouseup"){if(l.globals.collapsedSeries.length+l.globals.ancillaryCollapsedSeries.length===l.globals.series.length)return;m!==null&&m.classList.add("apexcharts-active");var y=this.yaxisTooltips.filter(function(C){return C===!0});if(this.ycrosshairs!==null&&y.length&&this.ycrosshairs.classList.add("apexcharts-active"),b&&!this.showOnIntersect||x.length>1)this.handleStickyTooltip(n,c,d,i);else if(l.config.chart.type==="heatmap"||l.config.chart.type==="treemap"){var v=this.intersect.handleHeatTreeTooltip({e:n,opt:i,x:r,y:a,type:l.config.chart.type});r=v.x,a=v.y,p.style.left=r+"px",p.style.top=a+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:n,opt:i}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:n,opt:i,x:r,y:a});if(this.yaxisTooltips.length)for(var N=0;N<l.config.yaxis.length;N++)this.axesTooltip.drawYaxisTooltipText(N,d,this.xyRatios);l.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),i.tooltipEl.classList.add("apexcharts-active")}else n.type!=="mouseout"&&n.type!=="touchend"||this.handleMouseOut(i)}}},{key:"nonAxisChartsTooltips",value:function(e){var r=e.e,a=e.opt,n=e.tooltipRect,i=this.w,l=a.paths.getAttribute("rel"),o=this.getElTooltip(),c=i.globals.dom.elWrap.getBoundingClientRect();if(r.type==="mousemove"||r.type==="touchmove"){i.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),o.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:parseInt(l,10)-1,shared:!1});var d=i.globals.clientX-c.left-n.ttWidth/2,h=i.globals.clientY-c.top-n.ttHeight-10;if(o.style.left=d+"px",o.style.top=h+"px",i.config.legend.tooltipHoverFormatter){var p=l-1,m=(0,i.config.legend.tooltipHoverFormatter)(this.legendLabels[p].getAttribute("data:default-text"),{seriesIndex:p,dataPointIndex:p,w:i});this.legendLabels[p].innerHTML=m}}else r.type!=="mouseout"&&r.type!=="touchend"||(o.classList.remove("apexcharts-active"),i.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),i.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(x){var b=x.getAttribute("data:default-text");x.innerHTML=decodeURIComponent(b)}))}},{key:"handleStickyTooltip",value:function(e,r,a,n){var i=this.w,l=this.tooltipUtil.getNearestValues({context:this,hoverArea:n.hoverArea,elGrid:n.elGrid,clientX:r,clientY:a}),o=l.j,c=l.capturedSeries;i.globals.collapsedSeriesIndices.includes(c)&&(c=null);var d=n.elGrid.getBoundingClientRect();if(l.hoverX<0||l.hoverX>d.width)this.handleMouseOut(n);else if(c!==null)this.handleStickyCapturedSeries(e,c,n,o);else if(this.tooltipUtil.isXoverlap(o)||i.globals.isBarHorizontal){var h=i.globals.series.findIndex(function(p,m){return!i.globals.collapsedSeriesIndices.includes(m)});this.create(e,this,h,o,n.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,r,a,n){var i=this.w;if(!this.tConfig.shared&&i.globals.series[r][n]===null)return void this.handleMouseOut(a);if(i.globals.series[r][n]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(n)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,r,n,a.ttItems):this.create(e,this,r,n,a.ttItems,!1);else if(this.tooltipUtil.isXoverlap(n)){var l=i.globals.series.findIndex(function(o,c){return!i.globals.collapsedSeriesIndices.includes(c)});this.create(e,this,l,n,a.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,r=new ge(this.ctx),a=e.globals.dom.Paper.find(".apexcharts-bar-area"),n=0;n<a.length;n++)r.pathMouseLeave(a[n])}},{key:"handleMouseOut",value:function(e){var r=this.w,a=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(),a!==null&&a.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 n=0;n<this.yaxisTTEls.length;n++)this.yaxisTTEls[n].classList.remove("apexcharts-active")}r.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(i){var l=i.getAttribute("data:default-text");i.innerHTML=decodeURIComponent(l)})}},{key:"markerClick",value:function(e,r,a){var n=this.w;typeof n.config.chart.events.markerClick=="function"&&n.config.chart.events.markerClick(e,this.ctx,{seriesIndex:r,dataPointIndex:a,w:n}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:r,dataPointIndex:a,w:n}])}},{key:"create",value:function(e,r,a,n,i){var l,o,c,d,h,p,m,x,b,y,v,N,C,S,k,A,T=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,M=this.w,O=r;e.type==="mouseup"&&this.markerClick(e,a,n),T===null&&(T=this.tConfig.shared);var _=this.tooltipUtil.hasMarkers(a),R=this.tooltipUtil.getElBars(),L=function(){M.globals.markers.largestSize>0?O.marker.enlargePoints(n):O.tooltipPosition.moveDynamicPointsOnHover(n)};if(M.config.legend.tooltipHoverFormatter){var z=M.config.legend.tooltipHoverFormatter,F=Array.from(this.legendLabels);F.forEach(function(K){var U=K.getAttribute("data:default-text");K.innerHTML=decodeURIComponent(U)});for(var Y=0;Y<F.length;Y++){var X=F[Y],H=parseInt(X.getAttribute("i"),10),W=decodeURIComponent(X.getAttribute("data:default-text")),V=z(W,{seriesIndex:T?H:a,dataPointIndex:n,w:M});if(T)X.innerHTML=M.globals.collapsedSeriesIndices.indexOf(H)<0?V:W;else if(X.innerHTML=H===a?V:W,a===H)break}}var Z=ve(ve({ttItems:i,i:a,j:n},((l=M.globals.seriesRange)===null||l===void 0||(o=l[a])===null||o===void 0||(c=o[n])===null||c===void 0||(d=c.y[0])===null||d===void 0?void 0:d.y1)!==void 0&&{y1:(h=M.globals.seriesRange)===null||h===void 0||(p=h[a])===null||p===void 0||(m=p[n])===null||m===void 0||(x=m.y[0])===null||x===void 0?void 0:x.y1}),((b=M.globals.seriesRange)===null||b===void 0||(y=b[a])===null||y===void 0||(v=y[n])===null||v===void 0||(N=v.y[0])===null||N===void 0?void 0:N.y2)!==void 0&&{y2:(C=M.globals.seriesRange)===null||C===void 0||(S=C[a])===null||S===void 0||(k=S[n])===null||k===void 0||(A=k.y[0])===null||A===void 0?void 0:A.y2});if(T){if(O.tooltipLabels.drawSeriesTexts(ve(ve({},Z),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),_)L();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(R),this.barSeriesHeight>0)){var B=new ge(this.ctx),G=M.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(n,"']"));this.deactivateHoverFilter(),O.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&L(),O.tooltipPosition.moveStickyTooltipOverBars(n,a);for(var te=0;te<G.length;te++)B.pathMouseEnter(G[te])}}else O.tooltipLabels.drawSeriesTexts(ve({shared:!1},Z)),this.tooltipUtil.hasBars()&&O.tooltipPosition.moveStickyTooltipOverBars(n,a),_&&O.tooltipPosition.moveMarkers(a,n)}}]),t}(),wK=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 Ce(t,[{key:"handleBarDataLabels",value:function(e){var r,a,n=e.x,i=e.y,l=e.y1,o=e.y2,c=e.i,d=e.j,h=e.realIndex,p=e.columnGroupIndex,m=e.series,x=e.barHeight,b=e.barWidth,y=e.barXPosition,v=e.barYPosition,N=e.visibleSeries,C=this.w,S=new ge(this.barCtx.ctx),k=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[h]:this.barCtx.strokeWidth;C.globals.isXNumeric&&!C.globals.isBarHorizontal?(r=n+parseFloat(b*(N+1)),a=i+parseFloat(x*(N+1))-k):(r=n+parseFloat(b*N),a=i+parseFloat(x*N));var A,T=null,M=n,O=i,_={},R=C.config.dataLabels,L=this.barCtx.barOptions.dataLabels,z=this.barCtx.barOptions.dataLabels.total;v!==void 0&&this.barCtx.isRangeBar&&(a=v,O=v),y!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(r=y,M=y);var F=R.offsetX,Y=R.offsetY,X={width:0,height:0};if(C.config.dataLabels.enabled){var H=C.globals.series[c][d];X=S.getTextRects(C.config.dataLabels.formatter?C.config.dataLabels.formatter(H,ve(ve({},C),{},{seriesIndex:c,dataPointIndex:d,w:C})):C.globals.yLabelFormatters[0](H),parseFloat(R.style.fontSize))}var W={x:n,y:i,i:c,j:d,realIndex:h,columnGroupIndex:p,bcx:r,bcy:a,barHeight:x,barWidth:b,textRects:X,strokeWidth:k,dataLabelsX:M,dataLabelsY:O,dataLabelsConfig:R,barDataLabelsConfig:L,barTotalDataLabelsConfig:z,offX:F,offY:Y};return _=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(W):this.calculateColumnsDataLabelsPosition(W),A=this.drawCalculatedDataLabels({x:_.dataLabelsX,y:_.dataLabelsY,val:this.barCtx.isRangeBar?[l,o]:C.config.chart.stackType==="100%"?m[h][d]:C.globals.series[h][d],i:h,j:d,barWidth:b,barHeight:x,textRects:X,dataLabelsConfig:R}),C.config.chart.stacked&&z.enabled&&(T=this.drawTotalDataLabels({x:_.totalDataLabelsX,y:_.totalDataLabelsY,barWidth:b,barHeight:x,realIndex:h,textAnchor:_.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:h,j:d}),dataLabelsConfig:R,barTotalDataLabelsConfig:z})),{dataLabelsPos:_,dataLabels:A,totalDataLabels:T}}},{key:"getStackedTotalDataLabel",value:function(e){var r=e.realIndex,a=e.j,n=this.w,i=this.barCtx.stackedSeriesTotals[a];return this.totalFormatter&&(i=this.totalFormatter(i,ve(ve({},n),{},{seriesIndex:r,dataPointIndex:a,w:n}))),i}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var r=this,a=this.w,n=e.i,i=e.j,l=e.realIndex;e.columnGroupIndex;var o,c,d=e.y,h=e.bcx,p=e.barWidth,m=e.barHeight,x=e.textRects,b=e.dataLabelsX,y=e.dataLabelsY,v=e.dataLabelsConfig,N=e.barDataLabelsConfig,C=e.barTotalDataLabelsConfig,S=e.strokeWidth,k=e.offX,A=e.offY,T=h;m=Math.abs(m);var M=a.config.plotOptions.bar.dataLabels.orientation==="vertical",O=this.barCtx.barHelpers.getZeroValueEncounters({i:n,j:i}).zeroEncounters;h-=S/2;var _=a.globals.gridWidth/a.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?b+=p/2:(b=a.globals.isXNumeric?h-p/2+k:h-_+p/2+k,!a.config.chart.stacked&&O>0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b-=p*O)),M&&(b=b+x.height/2-S/2-2);var R=a.globals.series[n][i]<0,L=d;switch(this.barCtx.isReversed&&(L=d+(R?m:-m)),N.position){case"center":y=M?R?L-m/2+A:L+m/2-A:R?L-m/2+x.height/2+A:L+m/2+x.height/2-A;break;case"bottom":y=M?R?L-m+A:L+m-A:R?L-m+x.height+S+A:L+m-x.height/2+S-A;break;case"top":y=M?R?L+A:L-A:R?L-x.height/2-A:L+x.height+A}var z=L;if(a.globals.seriesGroups.forEach(function(X){var H;(H=r.barCtx[X.join(",")])===null||H===void 0||H.prevY.forEach(function(W){z=R?Math.max(W[i],z):Math.min(W[i],z)})}),this.barCtx.lastActiveBarSerieIndex===l&&C.enabled){var F=new ge(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:l,j:i}),v.fontSize);o=R?z-F.height/2-A-C.offsetY+18:z+F.height+A+C.offsetY-18;var Y=_;c=T+(a.globals.isXNumeric?-p*a.globals.barGroups.length/2:a.globals.barGroups.length*p/2-(a.globals.barGroups.length-1)*p-Y)+C.offsetX}return a.config.chart.stacked||(y<0?y=0+S:y+x.height/3>a.globals.gridHeight&&(y=a.globals.gridHeight-S)),{bcx:h,bcy:d,dataLabelsX:b,dataLabelsY:y,totalDataLabelsX:c,totalDataLabelsY:o,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var r=this,a=this.w,n=e.x,i=e.i,l=e.j,o=e.realIndex,c=e.bcy,d=e.barHeight,h=e.barWidth,p=e.textRects,m=e.dataLabelsX,x=e.strokeWidth,b=e.dataLabelsConfig,y=e.barDataLabelsConfig,v=e.barTotalDataLabelsConfig,N=e.offX,C=e.offY,S=a.globals.gridHeight/a.globals.dataPoints,k=this.barCtx.barHelpers.getZeroValueEncounters({i,j:l}).zeroEncounters;h=Math.abs(h);var A,T,M=c-(this.barCtx.isRangeBar?0:S)+d/2+p.height/2+C-3;!a.config.chart.stacked&&k>0&&a.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(M-=d*k);var O="start",_=a.globals.series[i][l]<0,R=n;switch(this.barCtx.isReversed&&(R=n+(_?-h:h),O=_?"start":"end"),y.position){case"center":m=_?R+h/2-N:Math.max(p.width/2,R-h/2)+N;break;case"bottom":m=_?R+h-x-N:R-h+x+N;break;case"top":m=_?R-x-N:R-x+N}var L=R;if(a.globals.seriesGroups.forEach(function(F){var Y;(Y=r.barCtx[F.join(",")])===null||Y===void 0||Y.prevX.forEach(function(X){L=_?Math.min(X[l],L):Math.max(X[l],L)})}),this.barCtx.lastActiveBarSerieIndex===o&&v.enabled){var z=new ge(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:l}),b.fontSize);_?(A=L-x-N-v.offsetX,O="end"):A=L+N+v.offsetX+(this.barCtx.isReversed?-(h+x):x),T=M-p.height/2+z.height/2+v.offsetY+x,a.globals.barGroups.length>1&&(T-=a.globals.barGroups.length/2*(d/2))}return a.config.chart.stacked||(b.textAnchor==="start"?m-p.width<0?m=_?p.width+x:x:m+p.width>a.globals.gridWidth&&(m=_?a.globals.gridWidth-x:a.globals.gridWidth-p.width-x):b.textAnchor==="middle"?m-p.width/2<0?m=p.width/2+x:m+p.width/2>a.globals.gridWidth&&(m=a.globals.gridWidth-p.width/2-x):b.textAnchor==="end"&&(m<1?m=p.width+x:m+1>a.globals.gridWidth&&(m=a.globals.gridWidth-p.width-x))),{bcx:n,bcy:c,dataLabelsX:m,dataLabelsY:M,totalDataLabelsX:A,totalDataLabelsY:T,totalDataLabelsAnchor:O}}},{key:"drawCalculatedDataLabels",value:function(e){var r=e.x,a=e.y,n=e.val,i=e.i,l=e.j,o=e.textRects,c=e.barHeight,d=e.barWidth,h=e.dataLabelsConfig,p=this.w,m="rotate(0)";p.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(m="rotate(-90, ".concat(r,", ").concat(a,")"));var x=new wd(this.barCtx.ctx),b=new ge(this.barCtx.ctx),y=h.formatter,v=null,N=p.globals.collapsedSeriesIndices.indexOf(i)>-1;if(h.enabled&&!N){v=b.group({class:"apexcharts-data-labels",transform:m});var C="";n!==void 0&&(C=y(n,ve(ve({},p),{},{seriesIndex:i,dataPointIndex:l,w:p}))),!n&&p.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C="");var S=p.globals.series[i][l]<0,k=p.config.plotOptions.bar.dataLabels.position;p.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(k==="top"&&(h.textAnchor=S?"end":"start"),k==="center"&&(h.textAnchor="middle"),k==="bottom"&&(h.textAnchor=S?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&d<b.getTextRects(C,parseFloat(h.style.fontSize)).width&&(C=""),p.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?o.width/1.6>Math.abs(d)&&(C=""):o.height/1.6>Math.abs(c)&&(C=""));var A=ve({},h);this.barCtx.isHorizontal&&n<0&&(h.textAnchor==="start"?A.textAnchor="end":h.textAnchor==="end"&&(A.textAnchor="start")),x.plotDataLabelsText({x:r,y:a,text:C,i,j:l,parent:v,dataLabelsConfig:A,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return v}},{key:"drawTotalDataLabels",value:function(e){var r=e.x,a=e.y,n=e.val,i=e.realIndex,l=e.textAnchor,o=e.barTotalDataLabelsConfig;this.w;var c,d=new ge(this.barCtx.ctx);return o.enabled&&r!==void 0&&a!==void 0&&this.barCtx.lastActiveBarSerieIndex===i&&(c=d.drawText({x:r,y:a,foreColor:o.style.color,text:n,textAnchor:l,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight})),c}}]),t}(),jK=function(){function t(e){Se(this,t),this.w=e.w,this.barCtx=e}return Ce(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 a=0;a<e.length;a++)if(e[a].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[a].length),r.globals.isXNumeric)for(var n=0;n<e[a].length;n++)r.globals.seriesX[a][n]>r.globals.minX&&r.globals.seriesX[a][n]<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(i){return i.map(function(l){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,a,n,i,l,o,c,d,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)l=(n=h.globals.gridHeight/p)/m,h.globals.isXNumeric&&(l=(n=h.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),l=l*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(l=parseInt(this.barCtx.barOptions.barHeight,10)),d=this.barCtx.baseLineInvertedY+h.globals.padHorizontal+(this.barCtx.isReversed?h.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(d=h.globals.gridWidth/2),a=(n-l*this.barCtx.seriesLen)/2;else{if(i=h.globals.gridWidth/this.barCtx.visibleItems,h.config.xaxis.convertedCatToNumeric&&(i=h.globals.gridWidth/h.globals.dataPoints),o=i/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&&(i=h.globals.minXDiff/x),(o=i/m*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(o=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:o}).x:r=h.globals.padHorizontal+J.noExponents(i-o*this.barCtx.seriesLen)/2}return h.globals.barHeight=l,h.globals.barWidth=o,{x:r,y:a,yDivision:n,xDivision:i,barHeight:l,barWidth:o,zeroH:c,zeroW:d}}},{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,a,n){var i,l,o,c,d=this.w,h=this.barCtx.ctx.fill,p=null,m=this.barCtx.barOptions.distributed?a:r,x=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(b){e[r][a]>=b.from&&e[r][a]<=b.to&&(p=b.color,x=!0)}),{color:h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?m:n,dataPointIndex:a,color:p,value:e[r][a],fillConfig:(i=d.config.series[r].data[a])===null||i===void 0?void 0:i.fill,fillType:(l=d.config.series[r].data[a])!==null&&l!==void 0&&(o=l.fill)!==null&&o!==void 0&&o.type?(c=d.config.series[r].data[a])===null||c===void 0?void 0:c.fill.type:Array.isArray(d.config.fill.type)?d.config.fill.type[n]:d.config.fill.type}),useRangeColor:x}}},{key:"getStrokeWidth",value:function(e,r,a){var n=0,i=this.w;return this.barCtx.series[e][r]===void 0||this.barCtx.series[e][r]===null?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(n=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[a]:this.barCtx.strokeWidth)),n}},{key:"createBorderRadiusArr",value:function(e){var r,a=this.w,n=!this.w.config.chart.stacked||a.config.plotOptions.bar.borderRadius<=0,i=e.length,l=0|((r=e[0])===null||r===void 0?void 0:r.length),o=Array.from({length:i},function(){return Array(l).fill(n?"top":"none")});if(n)return o;for(var c=0;c<l;c++){for(var d=[],h=[],p=0,m=0;m<i;m++){var x=e[m][c];x>0?(d.push(m),p++):x<0&&(h.push(m),p++)}if(d.length>0&&h.length===0)if(d.length===1)o[d[0]][c]="both";else{var b,y=d[0],v=d[d.length-1],N=Th(d);try{for(N.s();!(b=N.n()).done;){var C=b.value;o[C][c]=C===y?"bottom":C===v?"top":"none"}}catch(H){N.e(H)}finally{N.f()}}else if(h.length>0&&d.length===0)if(h.length===1)o[h[0]][c]="both";else{var S,k=Math.max.apply(Math,h),A=Math.min.apply(Math,h),T=Th(h);try{for(T.s();!(S=T.n()).done;){var M=S.value;o[M][c]=M===k?"bottom":M===A?"top":"none"}}catch(H){T.e(H)}finally{T.f()}}else if(d.length>0&&h.length>0){var O,_=d[d.length-1],R=Th(d);try{for(R.s();!(O=R.n()).done;){var L=O.value;o[L][c]=L===_?"top":"none"}}catch(H){R.e(H)}finally{R.f()}var z,F=Math.max.apply(Math,h),Y=Th(h);try{for(Y.s();!(z=Y.n()).done;){var X=z.value;o[X][c]=X===F?"bottom":"none"}}catch(H){Y.e(H)}finally{Y.f()}}else p===1&&(o[d[0]||h[0]][c]="both")}return o}},{key:"barBackground",value:function(e){var r=e.j,a=e.i,n=e.x1,i=e.x2,l=e.y1,o=e.y2,c=e.elSeries,d=this.w,h=new ge(this.barCtx.ctx),p=new _n(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&p===a){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(n!==void 0?n:0,l!==void 0?l:0,i!==void 0?i:d.globals.gridWidth,o!==void 0?o:d.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,a=e.barWidth,n=e.barXPosition,i=e.y1,l=e.y2,o=e.strokeWidth,c=e.isReversed,d=e.series,h=e.seriesGroup,p=e.realIndex,m=e.i,x=e.j,b=e.w,y=new ge(this.barCtx.ctx);(o=Array.isArray(o)?o[p]:o)||(o=0);var v=a,N=n;(r=b.config.series[p].data[x])!==null&&r!==void 0&&r.columnWidthOffset&&(N=n-b.config.series[p].data[x].columnWidthOffset/2,v=a+b.config.series[p].data[x].columnWidthOffset);var C=o/2,S=N+C,k=N+v-C,A=(d[m][x]>=0?1:-1)*(c?-1:1);i+=.001-C*A,l+=.001+C*A;var T=y.move(S,i),M=y.move(S,i),O=y.line(k,i);if(b.globals.previousPaths.length>0&&(M=this.barCtx.getPreviousPath(p,x,!1)),T=T+y.line(S,l)+y.line(k,l)+O+(b.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[p][x]==="both"?" Z":" z"),M=M+y.line(S,i)+O+O+O+O+O+y.line(S,i)+(b.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[p][x]==="both"?" Z":" z"),this.arrBorderRadius[p][x]!=="none"&&(T=y.roundPathCorners(T,b.config.plotOptions.bar.borderRadius)),b.config.chart.stacked){var _=this.barCtx;(_=this.barCtx[h]).yArrj.push(l-C*A),_.yArrjF.push(Math.abs(i-l+o*A)),_.yArrjVal.push(this.barCtx.series[m][x])}return{pathTo:T,pathFrom:M}}},{key:"getBarpaths",value:function(e){var r,a=e.barYPosition,n=e.barHeight,i=e.x1,l=e.x2,o=e.strokeWidth,c=e.isReversed,d=e.series,h=e.seriesGroup,p=e.realIndex,m=e.i,x=e.j,b=e.w,y=new ge(this.barCtx.ctx);(o=Array.isArray(o)?o[p]:o)||(o=0);var v=a,N=n;(r=b.config.series[p].data[x])!==null&&r!==void 0&&r.barHeightOffset&&(v=a-b.config.series[p].data[x].barHeightOffset/2,N=n+b.config.series[p].data[x].barHeightOffset);var C=o/2,S=v+C,k=v+N-C,A=(d[m][x]>=0?1:-1)*(c?-1:1);i+=.001+C*A,l+=.001-C*A;var T=y.move(i,S),M=y.move(i,S);b.globals.previousPaths.length>0&&(M=this.barCtx.getPreviousPath(p,x,!1));var O=y.line(i,k);if(T=T+y.line(l,S)+y.line(l,k)+O+(b.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[p][x]==="both"?" Z":" z"),M=M+y.line(i,S)+O+O+O+O+O+y.line(i,S)+(b.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[p][x]==="both"?" Z":" z"),this.arrBorderRadius[p][x]!=="none"&&(T=y.roundPathCorners(T,b.config.plotOptions.bar.borderRadius)),b.config.chart.stacked){var _=this.barCtx;(_=this.barCtx[h]).xArrj.push(l+C*A),_.xArrjF.push(Math.abs(i-l-o*A)),_.xArrjVal.push(this.barCtx.series[m][x])}return{pathTo:T,pathFrom:M}}},{key:"checkZeroSeries",value:function(e){for(var r=e.series,a=this.w,n=0;n<r.length;n++){for(var i=0,l=0;l<r[a.globals.maxValsInArrayIndex].length;l++)i+=r[n][l];i===0&&this.barCtx.zeroSerieses.push(n)}}},{key:"getXForValue",value:function(e,r){var a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?r:null;return e!=null&&(a=r+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),a}},{key:"getYForValue",value:function(e,r,a){var n=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?r:null;return e!=null&&(n=r-e/this.barCtx.yRatio[a]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[a]:0)),n}},{key:"getGoalValues",value:function(e,r,a,n,i,l){var o=this,c=this.w,d=[],h=function(x,b){var y;d.push((bx(y={},e,e==="x"?o.getXForValue(x,r,!1):o.getYForValue(x,a,l,!1)),bx(y,"attrs",b),y))};if(c.globals.seriesGoals[n]&&c.globals.seriesGoals[n][i]&&Array.isArray(c.globals.seriesGoals[n][i])&&c.globals.seriesGoals[n][i].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[n],strokeWidth:e==="x"?c.globals.markers.size[n]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(p[n])?p[n][0]:p[n]};h(c.globals.seriesRangeStart[n][i],m),h(c.globals.seriesRangeEnd[n][i],ve(ve({},m),{},{strokeColor:Array.isArray(p[n])?p[n][1]:p[n]}))}return d}},{key:"drawGoalLine",value:function(e){var r=e.barXPosition,a=e.barYPosition,n=e.goalX,i=e.goalY,l=e.barWidth,o=e.barHeight,c=new ge(this.barCtx.ctx),d=c.group({className:"apexcharts-bar-goals-groups"});d.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:d.node}),d.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(n)&&n.forEach(function(p){if(p.x>=-1&&p.x<=c.w.globals.gridWidth+1){var m=p.attrs.strokeHeight!==void 0?p.attrs.strokeHeight:o/2,x=a+m+o/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),d.add(h)}}):Array.isArray(i)&&i.forEach(function(p){if(p.y>=-1&&p.y<=c.w.globals.gridHeight+1){var m=p.attrs.strokeWidth!==void 0?p.attrs.strokeWidth:l/2,x=r+m+l/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),d.add(h)}}),d}},{key:"drawBarShadow",value:function(e){var r=e.prevPaths,a=e.currPaths,n=e.color,i=this.w,l=r.x,o=r.x1,c=r.barYPosition,d=a.x,h=a.x1,p=a.barYPosition,m=c+a.barHeight,x=new ge(this.barCtx.ctx),b=new J,y=x.move(o,m)+x.line(l,m)+x.line(d,p)+x.line(h,p)+x.line(o,m)+(i.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return x.drawPath({d:y,fill:b.shadeColor(.5,J.rgb2hex(n)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var r,a=e.i,n=e.j,i=this.w,l=0,o=0;return(i.config.plotOptions.bar.horizontal?i.globals.series.map(function(c,d){return d}):((r=i.globals.columnSeries)===null||r===void 0?void 0:r.i.map(function(c){return c}))||[]).forEach(function(c){var d=i.globals.seriesPercent[c][n];d&&l++,c<a&&d===0&&o++}),{nonZeroColumns:l,zeroEncounters:o}}},{key:"getGroupIndex",value:function(e){var r=this.w,a=r.globals.seriesGroups.findIndex(function(l){return l.indexOf(r.globals.seriesNames[e])>-1}),n=this.barCtx.columnGroupIndices,i=n.indexOf(a);return i<0&&(n.push(a),i=n.length-1),{groupIndex:a,columnGroupIndex:i}}}]),t}(),jd=function(){function t(e,r){Se(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.barOptions=a.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=a.config.stroke.width,this.isNullValue=!1,this.isRangeBar=a.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&a.globals.seriesRange.length&&a.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 n=new _n(this.ctx);this.lastActiveBarSerieIndex=n.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var i=n.getBarSeriesIndices(),l=new or(this.ctx);this.stackedSeriesTotals=l.getStackedSeriesTotals(this.w.config.series.map(function(o,c){return i.indexOf(c)===-1?c:-1}).filter(function(o){return o!==-1})),this.barHelpers=new jK(this)}return Ce(t,[{key:"draw",value:function(e,r){var a=this.w,n=new ge(this.ctx),i=new or(this.ctx,a);e=i.getLogSeries(e),this.series=e,this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var l=n.group({class:"apexcharts-bar-series apexcharts-plot-series"});a.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 o=0,c=0;o<e.length;o++,c++){var d,h,p,m,x=void 0,b=void 0,y=[],v=[],N=a.globals.comboCharts?r[o]:o,C=this.barHelpers.getGroupIndex(N).columnGroupIndex,S=n.group({class:"apexcharts-series",rel:o+1,seriesName:J.escapeString(a.globals.seriesNames[N]),"data:realIndex":N});this.ctx.series.addCollapsedClassToSeries(S,N),e[o].length>0&&(this.visibleI=this.visibleI+1);var k=0,A=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[N],this.translationsIndex=N);var T=this.translationsIndex;this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed;var M=this.barHelpers.initialPositions(N);b=M.y,k=M.barHeight,h=M.yDivision,m=M.zeroW,x=M.x,A=M.barWidth,d=M.xDivision,p=M.zeroH,this.isHorizontal||v.push(x+A/2);var O=n.group({class:"apexcharts-datalabels","data:realIndex":N});a.globals.delayedElements.push({el:O.node}),O.node.classList.add("apexcharts-element-hidden");var _=n.group({class:"apexcharts-bar-goals-markers"}),R=n.group({class:"apexcharts-bar-shadows"});a.globals.delayedElements.push({el:R.node}),R.node.classList.add("apexcharts-element-hidden");for(var L=0;L<e[o].length;L++){var z=this.barHelpers.getStrokeWidth(o,L,N),F=null,Y={indexes:{i:o,j:L,realIndex:N,translationsIndex:T,bc:c},x,y:b,strokeWidth:z,elSeries:S};this.isHorizontal?(F=this.drawBarPaths(ve(ve({},Y),{},{barHeight:k,zeroW:m,yDivision:h})),A=this.series[o][L]/this.invertedYRatio):(F=this.drawColumnPaths(ve(ve({},Y),{},{xDivision:d,barWidth:A,zeroH:p})),k=this.series[o][L]/this.yRatio[T]);var X=this.barHelpers.getPathFillColor(e,o,L,N);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&L>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(a.globals.colors[o]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:F});R.add(W),a.config.chart.dropShadow.enabled&&new Kr(this.ctx).dropShadow(W,a.config.chart.dropShadow,N)}this.pathArr.push(F);var V=this.barHelpers.drawGoalLine({barXPosition:F.barXPosition,barYPosition:F.barYPosition,goalX:F.goalX,goalY:F.goalY,barHeight:k,barWidth:A});V&&_.add(V),b=F.y,x=F.x,L>0&&v.push(x+A/2),y.push(b),this.renderSeries(ve(ve({realIndex:N,pathFill:X.color},X.useRangeColor?{lineFill:X.color}:{}),{},{j:L,i:o,columnGroupIndex:C,pathFrom:F.pathFrom,pathTo:F.pathTo,strokeWidth:z,elSeries:S,x,y:b,series:e,barHeight:Math.abs(F.barHeight?F.barHeight:k),barWidth:Math.abs(F.barWidth?F.barWidth:A),elDataLabelsWrap:O,elGoalsMarkers:_,elBarShadows:R,visibleSeries:this.visibleI,type:"bar"}))}a.globals.seriesXvalues[N]=v,a.globals.seriesYvalues[N]=y,l.add(S)}return l}},{key:"renderSeries",value:function(e){var r=e.realIndex,a=e.pathFill,n=e.lineFill,i=e.j,l=e.i,o=e.columnGroupIndex,c=e.pathFrom,d=e.pathTo,h=e.strokeWidth,p=e.elSeries,m=e.x,x=e.y,b=e.y1,y=e.y2,v=e.series,N=e.barHeight,C=e.barWidth,S=e.barXPosition,k=e.barYPosition,A=e.elDataLabelsWrap,T=e.elGoalsMarkers,M=e.elBarShadows,O=e.visibleSeries,_=e.type,R=e.classes,L=this.w,z=new ge(this.ctx),F=!1;if(!n){var Y=typeof L.globals.stroke.colors[r]=="function"?function(Z){var B,G=L.config.stroke.colors;return Array.isArray(G)&&G.length>0&&((B=G[Z])||(B=""),typeof B=="function")?B({value:L.globals.series[Z][i],dataPointIndex:i,w:L}):B}(r):L.globals.stroke.colors[r];n=this.barOptions.distributed?L.globals.stroke.colors[i]:Y}var X=new wK(this).handleBarDataLabels({x:m,y:x,y1:b,y2:y,i:l,j:i,series:v,realIndex:r,columnGroupIndex:o,barHeight:N,barWidth:C,barXPosition:S,barYPosition:k,visibleSeries:O});L.globals.isBarHorizontal||(X.dataLabelsPos.dataLabelsX+Math.max(C,L.globals.barPadForNumericAxis)<0||X.dataLabelsPos.dataLabelsX-Math.max(C,L.globals.barPadForNumericAxis)>L.globals.gridWidth)&&(F=!0),L.config.series[l].data[i]&&L.config.series[l].data[i].strokeColor&&(n=L.config.series[l].data[i].strokeColor),this.isNullValue&&(a="none");var H=i/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4;if(!F){var W=z.renderPaths({i:l,j:i,realIndex:r,pathFrom:c,pathTo:d,stroke:n,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:a,animationDelay:H,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(_,"-area ").concat(R),chartType:_});W.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var V=L.config.forecastDataPoints;V.count>0&&i>=L.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)),b!==void 0&&y!==void 0&&(W.attr("data-range-y1",b),W.attr("data-range-y2",y)),new Kr(this.ctx).setSelectionFilter(W,r,i),p.add(W),W.attr({cy:X.dataLabelsPos.bcy,cx:X.dataLabelsPos.bcx,j:i,val:L.globals.series[l][i],barHeight:N,barWidth:C}),X.dataLabels!==null&&A.add(X.dataLabels),X.totalDataLabels&&A.add(X.totalDataLabels),p.add(A),T&&p.add(T),M&&p.add(M)}return p}},{key:"drawBarPaths",value:function(e){var r,a=e.indexes,n=e.barHeight,i=e.strokeWidth,l=e.zeroW,o=e.x,c=e.y,d=e.yDivision,h=e.elSeries,p=this.w,m=a.i,x=a.j;if(p.globals.isXNumeric)r=(c=(p.globals.seriesX[m][x]-p.globals.minX)/this.invertedXRatio-n)+n*this.visibleI;else if(p.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:m,j:x}),y=b.nonZeroColumns,v=b.zeroEncounters;y>0&&(n=this.seriesLen*n/y),r=c+n*this.visibleI,r-=n*v}else r=c+n*this.visibleI;this.isFunnel&&(l-=(this.barHelpers.getXForValue(this.series[m][x],l)-l)/2),o=this.barHelpers.getXForValue(this.series[m][x],l);var N=this.barHelpers.getBarpaths({barYPosition:r,barHeight:n,x1:l,x2:o,strokeWidth:i,isReversed:this.isReversed,series:this.series,realIndex:a.realIndex,i:m,j:x,w:p});return p.globals.isXNumeric||(c+=d),this.barHelpers.barBackground({j:x,i:m,y1:r-n*this.visibleI,y2:n*this.seriesLen,elSeries:h}),{pathTo:N.pathTo,pathFrom:N.pathFrom,x1:l,x:o,y:c,goalX:this.barHelpers.getGoalValues("x",l,null,m,x),barYPosition:r,barHeight:n}}},{key:"drawColumnPaths",value:function(e){var r,a=e.indexes,n=e.x,i=e.y,l=e.xDivision,o=e.barWidth,c=e.zeroH,d=e.strokeWidth,h=e.elSeries,p=this.w,m=a.realIndex,x=a.translationsIndex,b=a.i,y=a.j,v=a.bc;if(p.globals.isXNumeric){var N=this.getBarXForNumericXAxis({x:n,j:y,realIndex:m,barWidth:o});n=N.x,r=N.barXPosition}else if(p.config.plotOptions.bar.hideZeroBarsWhenGrouped){var C=this.barHelpers.getZeroValueEncounters({i:b,j:y}),S=C.nonZeroColumns,k=C.zeroEncounters;S>0&&(o=this.seriesLen*o/S),r=n+o*this.visibleI,r-=o*k}else r=n+o*this.visibleI;i=this.barHelpers.getYForValue(this.series[b][y],c,x);var A=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:o,y1:c,y2:i,strokeWidth:d,isReversed:this.isReversed,series:this.series,realIndex:m,i:b,j:y,w:p});return p.globals.isXNumeric||(n+=l),this.barHelpers.barBackground({bc:v,j:y,i:b,x1:r-d/2-o*this.visibleI,x2:o*this.seriesLen+d/2,elSeries:h}),{pathTo:A.pathTo,pathFrom:A.pathFrom,x:n,y:i,goalY:this.barHelpers.getGoalValues("y",null,c,b,y,x),barXPosition:r,barWidth:o}}},{key:"getBarXForNumericXAxis",value:function(e){var r=e.x,a=e.barWidth,n=e.realIndex,i=e.j,l=this.w,o=n;return l.globals.seriesX[n].length||(o=l.globals.maxValsInArrayIndex),J.isNumber(l.globals.seriesX[o][i])&&(r=(l.globals.seriesX[o][i]-l.globals.minX)/this.xRatio-a*this.seriesLen/2),{barXPosition:r+a*this.visibleI,x:r}}},{key:"getPreviousPath",value:function(e,r){for(var a=this.w,n="M 0 0",i=0;i<a.globals.previousPaths.length;i++){var l=a.globals.previousPaths[i];l.paths&&l.paths.length>0&&parseInt(l.realIndex,10)===parseInt(e,10)&&a.globals.previousPaths[i].paths[r]!==void 0&&(n=a.globals.previousPaths[i].paths[r].d)}return n}}]),t}(),LD=function(t){Gf(r,jd);var e=qf(r);function r(){return Se(this,r),e.apply(this,arguments)}return Ce(r,[{key:"draw",value:function(a,n){var i=this,l=this.w;this.graphics=new ge(this.ctx),this.bar=new jd(this.ctx,this.xyRatios);var o=new or(this.ctx,l);a=o.getLogSeries(a),this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a),l.config.chart.stackType==="100%"&&(a=l.globals.comboCharts?n.map(function(b){return l.globals.seriesPercent[b]}):l.globals.seriesPercent.slice()),this.series=a,this.barHelpers.initializeStackedPrevVars(this);for(var c=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),d=0,h=0,p=function(b,y){var v=void 0,N=void 0,C=void 0,S=void 0,k=l.globals.comboCharts?n[b]:b,A=i.barHelpers.getGroupIndex(k),T=A.groupIndex,M=A.columnGroupIndex;i.groupCtx=i[l.globals.seriesGroups[T]];var O=[],_=[],R=0;i.yRatio.length>1&&(i.yaxisIndex=l.globals.seriesYAxisReverseMap[k][0],R=k),i.isReversed=l.config.yaxis[i.yaxisIndex]&&l.config.yaxis[i.yaxisIndex].reversed;var L=i.graphics.group({class:"apexcharts-series",seriesName:J.escapeString(l.globals.seriesNames[k]),rel:b+1,"data:realIndex":k});i.ctx.series.addCollapsedClassToSeries(L,k);var z=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":k}),F=i.graphics.group({class:"apexcharts-bar-goals-markers"}),Y=0,X=0,H=i.initialPositions(d,h,v,N,C,S,R);h=H.y,Y=H.barHeight,N=H.yDivision,S=H.zeroW,d=H.x,X=H.barWidth,v=H.xDivision,C=H.zeroH,l.globals.barHeight=Y,l.globals.barWidth=X,i.barHelpers.initializeStackedXYVars(i),i.groupCtx.prevY.length===1&&i.groupCtx.prevY[0].every(function(re){return isNaN(re)})&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map(function(){return C}),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map(function(){return 0}));for(var W=0;W<l.globals.dataPoints;W++){var V=i.barHelpers.getStrokeWidth(b,W,k),Z={indexes:{i:b,j:W,realIndex:k,translationsIndex:R,bc:y},strokeWidth:V,x:d,y:h,elSeries:L,columnGroupIndex:M,seriesGroup:l.globals.seriesGroups[T]},B=null;i.isHorizontal?(B=i.drawStackedBarPaths(ve(ve({},Z),{},{zeroW:S,barHeight:Y,yDivision:N})),X=i.series[b][W]/i.invertedYRatio):(B=i.drawStackedColumnPaths(ve(ve({},Z),{},{xDivision:v,barWidth:X,zeroH:C})),Y=i.series[b][W]/i.yRatio[R]);var G=i.barHelpers.drawGoalLine({barXPosition:B.barXPosition,barYPosition:B.barYPosition,goalX:B.goalX,goalY:B.goalY,barHeight:Y,barWidth:X});G&&F.add(G),h=B.y,d=B.x,O.push(d),_.push(h);var te=i.barHelpers.getPathFillColor(a,b,W,k),K="",U=l.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(i.barHelpers.arrBorderRadius[k][W]==="bottom"&&l.globals.series[k][W]>0||i.barHelpers.arrBorderRadius[k][W]==="top"&&l.globals.series[k][W]<0)&&(K=U),L=i.renderSeries(ve(ve({realIndex:k,pathFill:te.color},te.useRangeColor?{lineFill:te.color}:{}),{},{j:W,i:b,columnGroupIndex:M,pathFrom:B.pathFrom,pathTo:B.pathTo,strokeWidth:V,elSeries:L,x:d,y:h,series:a,barHeight:Y,barWidth:X,elDataLabelsWrap:z,elGoalsMarkers:F,type:"bar",visibleSeries:M,classes:K}))}l.globals.seriesXvalues[k]=O,l.globals.seriesYvalues[k]=_,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),c.add(L)},m=0,x=0;m<a.length;m++,x++)p(m,x);return c}},{key:"initialPositions",value:function(a,n,i,l,o,c,d){var h,p,m=this.w;if(this.isHorizontal){l=m.globals.gridHeight/m.globals.dataPoints;var x=m.config.plotOptions.bar.barHeight;h=String(x).indexOf("%")===-1?parseInt(x,10):l*parseInt(x,10)/100,c=m.globals.padHorizontal+(this.isReversed?m.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),n=(l-h)/2}else{p=i=m.globals.gridWidth/m.globals.dataPoints;var b=m.config.plotOptions.bar.columnWidth;m.globals.isXNumeric&&m.globals.dataPoints>1?p=(i=m.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(b).indexOf("%")===-1?p=parseInt(b,10):p*=parseInt(b,10)/100,o=this.isReversed?this.baseLineY[d]:m.globals.gridHeight-this.baseLineY[d],a=m.globals.padHorizontal+(i-p)/2}var y=m.globals.barGroups.length||1;return{x:a,y:n,yDivision:l,xDivision:i,barHeight:h/y,barWidth:p/y,zeroH:o,zeroW:c}}},{key:"drawStackedBarPaths",value:function(a){for(var n,i=a.indexes,l=a.barHeight,o=a.strokeWidth,c=a.zeroW,d=a.x,h=a.y,p=a.columnGroupIndex,m=a.seriesGroup,x=a.yDivision,b=a.elSeries,y=this.w,v=h+p*l,N=i.i,C=i.j,S=i.realIndex,k=i.translationsIndex,A=0,T=0;T<this.groupCtx.prevXF.length;T++)A+=this.groupCtx.prevXF[T][C];var M=N;if(y.config.series[S].name&&(M=m.indexOf(y.config.series[S].name)),M>0){var O=c;this.groupCtx.prevXVal[M-1][C]<0?O=this.series[N][C]>=0?this.groupCtx.prevX[M-1][C]+A-2*(this.isReversed?A:0):this.groupCtx.prevX[M-1][C]:this.groupCtx.prevXVal[M-1][C]>=0&&(O=this.series[N][C]>=0?this.groupCtx.prevX[M-1][C]:this.groupCtx.prevX[M-1][C]-A+2*(this.isReversed?A:0)),n=O}else n=c;d=this.series[N][C]===null?n:n+this.series[N][C]/this.invertedYRatio-2*(this.isReversed?this.series[N][C]/this.invertedYRatio:0);var _=this.barHelpers.getBarpaths({barYPosition:v,barHeight:l,x1:n,x2:d,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:m,i:N,j:C,w:y});return this.barHelpers.barBackground({j:C,i:N,y1:v,y2:l,elSeries:b}),h+=x,{pathTo:_.pathTo,pathFrom:_.pathFrom,goalX:this.barHelpers.getGoalValues("x",c,null,N,C,k),barXPosition:n,barYPosition:v,x:d,y:h}}},{key:"drawStackedColumnPaths",value:function(a){var n=a.indexes,i=a.x,l=a.y,o=a.xDivision,c=a.barWidth,d=a.zeroH,h=a.columnGroupIndex,p=a.seriesGroup,m=a.elSeries,x=this.w,b=n.i,y=n.j,v=n.bc,N=n.realIndex,C=n.translationsIndex;if(x.globals.isXNumeric){var S=x.globals.seriesX[N][y];S||(S=0),i=(S-x.globals.minX)/this.xRatio-c/2*x.globals.barGroups.length}for(var k,A=i+h*c,T=0,M=0;M<this.groupCtx.prevYF.length;M++)T+=isNaN(this.groupCtx.prevYF[M][y])?0:this.groupCtx.prevYF[M][y];var O=b;if(p&&(O=p.indexOf(x.globals.seriesNames[N])),O>0&&!x.globals.isXNumeric||O>0&&x.globals.isXNumeric&&x.globals.seriesX[N-1][y]===x.globals.seriesX[N][y]){var _,R,L,z=Math.min(this.yRatio.length+1,N+1);if(this.groupCtx.prevY[O-1]!==void 0&&this.groupCtx.prevY[O-1].length)for(var F=1;F<z;F++){var Y;if(!isNaN((Y=this.groupCtx.prevY[O-F])===null||Y===void 0?void 0:Y[y])){L=this.groupCtx.prevY[O-F][y];break}}for(var X=1;X<z;X++){var H,W;if(((H=this.groupCtx.prevYVal[O-X])===null||H===void 0?void 0:H[y])<0){R=this.series[b][y]>=0?L-T+2*(this.isReversed?T:0):L;break}if(((W=this.groupCtx.prevYVal[O-X])===null||W===void 0?void 0:W[y])>=0){R=this.series[b][y]>=0?L:L+T-2*(this.isReversed?T:0);break}}R===void 0&&(R=x.globals.gridHeight),k=(_=this.groupCtx.prevYF[0])!==null&&_!==void 0&&_.every(function(Z){return Z===0})&&this.groupCtx.prevYF.slice(1,O).every(function(Z){return Z.every(function(B){return isNaN(B)})})?d:R}else k=d;l=this.series[b][y]?k-this.series[b][y]/this.yRatio[C]+2*(this.isReversed?this.series[b][y]/this.yRatio[C]:0):k;var V=this.barHelpers.getColumnPaths({barXPosition:A,barWidth:c,y1:k,y2:l,yRatio:this.yRatio[C],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:p,realIndex:n.realIndex,i:b,j:y,w:x});return this.barHelpers.barBackground({bc:v,j:y,i:b,x1:A,x2:c,elSeries:m}),{pathTo:V.pathTo,pathFrom:V.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,d,b,y),barXPosition:A,x:x.globals.isXNumeric?i:i+o,y:l}}}]),r}(),k1=function(t){Gf(r,jd);var e=qf(r);function r(){return Se(this,r),e.apply(this,arguments)}return Ce(r,[{key:"draw",value:function(a,n,i){var l=this,o=this.w,c=new ge(this.ctx),d=o.globals.comboCharts?n:o.config.chart.type,h=new Jn(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=o.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type==="ohlc";var p=new or(this.ctx,o);a=p.getLogSeries(a),this.series=a,this.yRatio=p.getLogYRatios(this.yRatio),this.barHelpers.initVariables(a);for(var m=c.group({class:"apexcharts-".concat(d,"-series apexcharts-plot-series")}),x=function(y){l.isBoxPlot=o.config.chart.type==="boxPlot"||o.config.series[y].type==="boxPlot";var v,N,C,S,k=void 0,A=void 0,T=[],M=[],O=o.globals.comboCharts?i[y]:y,_=l.barHelpers.getGroupIndex(O).columnGroupIndex,R=c.group({class:"apexcharts-series",seriesName:J.escapeString(o.globals.seriesNames[O]),rel:y+1,"data:realIndex":O});l.ctx.series.addCollapsedClassToSeries(R,O),a[y].length>0&&(l.visibleI=l.visibleI+1);var L,z,F=0;l.yRatio.length>1&&(l.yaxisIndex=o.globals.seriesYAxisReverseMap[O][0],F=O);var Y=l.barHelpers.initialPositions(O);A=Y.y,L=Y.barHeight,N=Y.yDivision,S=Y.zeroW,k=Y.x,z=Y.barWidth,v=Y.xDivision,C=Y.zeroH,M.push(k+z/2);for(var X=c.group({class:"apexcharts-datalabels","data:realIndex":O}),H=c.group({class:"apexcharts-bar-goals-markers"}),W=function(Z){var B=l.barHelpers.getStrokeWidth(y,Z,O),G=null,te={indexes:{i:y,j:Z,realIndex:O,translationsIndex:F},x:k,y:A,strokeWidth:B,elSeries:R};G=l.isHorizontal?l.drawHorizontalBoxPaths(ve(ve({},te),{},{yDivision:N,barHeight:L,zeroW:S})):l.drawVerticalBoxPaths(ve(ve({},te),{},{xDivision:v,barWidth:z,zeroH:C})),A=G.y,k=G.x;var K=l.barHelpers.drawGoalLine({barXPosition:G.barXPosition,barYPosition:G.barYPosition,goalX:G.goalX,goalY:G.goalY,barHeight:L,barWidth:z});K&&H.add(K),Z>0&&M.push(k+z/2),T.push(A),G.pathTo.forEach(function(U,re){var ne=!l.isBoxPlot&&l.candlestickOptions.wick.useFillColor?G.color[re]:o.globals.stroke.colors[y],we=h.fillPath({seriesNumber:O,dataPointIndex:Z,color:G.color[re],value:a[y][Z]});l.renderSeries({realIndex:O,pathFill:we,lineFill:ne,j:Z,i:y,pathFrom:G.pathFrom,pathTo:U,strokeWidth:B,elSeries:R,x:k,y:A,series:a,columnGroupIndex:_,barHeight:L,barWidth:z,elDataLabelsWrap:X,elGoalsMarkers:H,visibleSeries:l.visibleI,type:o.config.chart.type})})},V=0;V<o.globals.dataPoints;V++)W(V);o.globals.seriesXvalues[O]=M,o.globals.seriesYvalues[O]=T,m.add(R)},b=0;b<a.length;b++)x(b);return m}},{key:"drawVerticalBoxPaths",value:function(a){var n=a.indexes,i=a.x;a.y;var l=a.xDivision,o=a.barWidth,c=a.zeroH,d=a.strokeWidth,h=this.w,p=new ge(this.ctx),m=n.i,x=n.j,b=h.config.plotOptions.candlestick.colors,y=this.boxOptions.colors,v=n.realIndex,N=function(V){return Array.isArray(V)?V[v]:V},C=N(b.upward),S=N(b.downward),k=this.yRatio[n.translationsIndex],A=this.getOHLCValue(v,x),T=c,M=c,O=A.o<A.c?[C]:[S];this.isBoxPlot&&(O=[N(y.lower),N(y.upper)]);var _=Math.min(A.o,A.c),R=Math.max(A.o,A.c),L=A.m;h.globals.isXNumeric&&(i=(h.globals.seriesX[v][x]-h.globals.minX)/this.xRatio-o/2);var z=i+o*this.visibleI;this.series[m][x]===void 0||this.series[m][x]===null?(_=c,R=c):(_=c-_/k,R=c-R/k,T=c-A.h/k,M=c-A.l/k,L=c-A.m/k);var F=p.move(z,c),Y=p.move(z+o/2,_);if(h.globals.previousPaths.length>0&&(Y=this.getPreviousPath(v,x,!0)),this.isOHLC){var X=z+o/2,H=c-A.o/k,W=c-A.c/k;F=[p.move(X,T)+p.line(X,M)+p.move(X,H)+p.line(z,H)+p.move(X,W)+p.line(z+o,W)]}else F=this.isBoxPlot?[p.move(z,_)+p.line(z+o/2,_)+p.line(z+o/2,T)+p.line(z+o/4,T)+p.line(z+o-o/4,T)+p.line(z+o/2,T)+p.line(z+o/2,_)+p.line(z+o,_)+p.line(z+o,L)+p.line(z,L)+p.line(z,_+d/2),p.move(z,L)+p.line(z+o,L)+p.line(z+o,R)+p.line(z+o/2,R)+p.line(z+o/2,M)+p.line(z+o-o/4,M)+p.line(z+o/4,M)+p.line(z+o/2,M)+p.line(z+o/2,R)+p.line(z,R)+p.line(z,L)+"z"]:[p.move(z,R)+p.line(z+o/2,R)+p.line(z+o/2,T)+p.line(z+o/2,R)+p.line(z+o,R)+p.line(z+o,_)+p.line(z+o/2,_)+p.line(z+o/2,M)+p.line(z+o/2,_)+p.line(z,_)+p.line(z,R-d/2)];return Y+=p.move(z,_),h.globals.isXNumeric||(i+=l),{pathTo:F,pathFrom:Y,x:i,y:R,goalY:this.barHelpers.getGoalValues("y",null,c,m,x,n.translationsIndex),barXPosition:z,color:O}}},{key:"drawHorizontalBoxPaths",value:function(a){var n=a.indexes;a.x;var i=a.y,l=a.yDivision,o=a.barHeight,c=a.zeroW,d=a.strokeWidth,h=this.w,p=new ge(this.ctx),m=n.i,x=n.j,b=this.boxOptions.colors.lower;this.isBoxPlot&&(b=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var y=this.invertedYRatio,v=n.realIndex,N=this.getOHLCValue(v,x),C=c,S=c,k=Math.min(N.o,N.c),A=Math.max(N.o,N.c),T=N.m;h.globals.isXNumeric&&(i=(h.globals.seriesX[v][x]-h.globals.minX)/this.invertedXRatio-o/2);var M=i+o*this.visibleI;this.series[m][x]===void 0||this.series[m][x]===null?(k=c,A=c):(k=c+k/y,A=c+A/y,C=c+N.h/y,S=c+N.l/y,T=c+N.m/y);var O=p.move(c,M),_=p.move(k,M+o/2);return h.globals.previousPaths.length>0&&(_=this.getPreviousPath(v,x,!0)),O=[p.move(k,M)+p.line(k,M+o/2)+p.line(C,M+o/2)+p.line(C,M+o/2-o/4)+p.line(C,M+o/2+o/4)+p.line(C,M+o/2)+p.line(k,M+o/2)+p.line(k,M+o)+p.line(T,M+o)+p.line(T,M)+p.line(k+d/2,M),p.move(T,M)+p.line(T,M+o)+p.line(A,M+o)+p.line(A,M+o/2)+p.line(S,M+o/2)+p.line(S,M+o-o/4)+p.line(S,M+o/4)+p.line(S,M+o/2)+p.line(A,M+o/2)+p.line(A,M)+p.line(T,M)+"z"],_+=p.move(k,M),h.globals.isXNumeric||(i+=l),{pathTo:O,pathFrom:_,x:A,y:i,goalX:this.barHelpers.getGoalValues("x",c,null,m,x),barYPosition:M,color:b}}},{key:"getOHLCValue",value:function(a,n){var i=this.w,l=new or(this.ctx,i),o=l.getLogValAtSeriesIndex(i.globals.seriesCandleH[a][n],a),c=l.getLogValAtSeriesIndex(i.globals.seriesCandleO[a][n],a),d=l.getLogValAtSeriesIndex(i.globals.seriesCandleM[a][n],a),h=l.getLogValAtSeriesIndex(i.globals.seriesCandleC[a][n],a),p=l.getLogValAtSeriesIndex(i.globals.seriesCandleL[a][n],a);return{o:this.isBoxPlot?o:c,h:this.isBoxPlot?c:o,m:d,l:this.isBoxPlot?h:p,c:this.isBoxPlot?p:h}}}]),r}(),g_=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"checkColorRange",value:function(){var e=this.w,r=!1,a=e.config.plotOptions[e.config.chart.type];return a.colorScale.ranges.length>0&&a.colorScale.ranges.map(function(n,i){n.from<=0&&(r=!0)}),r}},{key:"getShadeColor",value:function(e,r,a,n){var i=this.w,l=1,o=i.config.plotOptions[e].shadeIntensity,c=this.determineColor(e,r,a);i.globals.hasNegs||n?l=i.config.plotOptions[e].reverseNegativeShade?c.percent<0?c.percent/100*(1.25*o):(1-c.percent/100)*(1.25*o):c.percent<=0?1-(1+c.percent/100)*o:(1-c.percent/100)*o:(l=1-c.percent/100,e==="treemap"&&(l=(1-c.percent/100)*(1.25*o)));var d=c.color,h=new J;if(i.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var p=h.shadeColor(-1*l,c.color);d=J.hexToRgba(J.isColorHex(p)?p:J.rgb2hex(p),i.config.fill.opacity)}else{var m=h.shadeColor(l,c.color);d=J.hexToRgba(J.isColorHex(m)?m:J.rgb2hex(m),i.config.fill.opacity)}return{color:d,colorProps:c}}},{key:"determineColor",value:function(e,r,a){var n=this.w,i=n.globals.series[r][a],l=n.config.plotOptions[e],o=l.colorScale.inverse?a:r;l.distributed&&n.config.chart.type==="treemap"&&(o=a);var c=n.globals.colors[o],d=null,h=Math.min.apply(Math,Ar(n.globals.series[r])),p=Math.max.apply(Math,Ar(n.globals.series[r]));l.distributed||e!=="heatmap"||(h=n.globals.minY,p=n.globals.maxY),l.colorScale.min!==void 0&&(h=l.colorScale.min<n.globals.minY?l.colorScale.min:n.globals.minY,p=l.colorScale.max>n.globals.maxY?l.colorScale.max:n.globals.maxY);var m=Math.abs(p)+Math.abs(h),x=100*i/(m===0?m-1e-6:m);return l.colorScale.ranges.length>0&&l.colorScale.ranges.map(function(b,y){if(i>=b.from&&i<=b.to){c=b.color,d=b.foreColor?b.foreColor:null,h=b.from,p=b.to;var v=Math.abs(p)+Math.abs(h);x=100*i/(v===0?v-1e-6:v)}}),{color:c,foreColor:d,percent:x}}},{key:"calculateDataLabels",value:function(e){var r=e.text,a=e.x,n=e.y,i=e.i,l=e.j,o=e.colorProps,c=e.fontSize,d=this.w.config.dataLabels,h=new ge(this.ctx),p=new wd(this.ctx),m=null;if(d.enabled){m=h.group({class:"apexcharts-data-labels"});var x=d.offsetX,b=d.offsetY,y=a+x,v=n+parseFloat(d.style.fontSize)/3+b;p.plotDataLabelsText({x:y,y:v,text:r,i,j:l,color:o.foreColor,parent:m,fontSize:c,dataLabelsConfig:d})}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}(),NK=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 g_(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return Ce(t,[{key:"draw",value:function(e){var r=this.w,a=new ge(this.ctx),n=a.group({class:"apexcharts-heatmap"});n.attr("clip-path","url(#gridRectMask".concat(r.globals.cuid,")"));var i=r.globals.gridWidth/r.globals.dataPoints,l=r.globals.gridHeight/r.globals.series.length,o=0,c=!1;this.negRange=this.helpers.checkColorRange();var d=e.slice();r.config.yaxis[0].reversed&&(c=!0,d.reverse());for(var h=c?0:d.length-1;c?h<d.length:h>=0;c?h++:h--){var p=a.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 Kr(this.ctx).dropShadow(p,m,h)}for(var x=0,b=r.config.plotOptions.heatmap.shadeIntensity,y=0,v=0;v<r.globals.dataPoints;v++)if(r.globals.seriesX.length&&!r.globals.allSeriesHasEqualX&&r.globals.minX+r.globals.minXDiff*v<r.globals.seriesX[h][y])x+=i;else{if(y>=d[h].length)break;var N=this.helpers.getShadeColor(r.config.chart.type,h,y,this.negRange),C=N.color,S=N.colorProps;r.config.fill.type==="image"&&(C=new Jn(this.ctx).fillPath({seriesNumber:h,dataPointIndex:y,opacity:r.globals.hasNegs?S.percent<0?1-(1+S.percent/100):b+S.percent/100:S.percent/100,patternID:J.randomId(),width:r.config.fill.image.width?r.config.fill.image.width:i,height:r.config.fill.image.height?r.config.fill.image.height:l}));var k=this.rectRadius,A=a.drawRect(x,o,i,l,k);if(A.attr({cx:x,cy:o}),A.node.classList.add("apexcharts-heatmap-rect"),p.add(A),A.attr({fill:C,i:h,index:h,j:y,val:e[h][y],"stroke-width":this.strokeWidth,stroke:r.config.plotOptions.heatmap.useFillColorAsStroke?C:r.globals.stroke.colors[0],color:C}),this.helpers.addListeners(A),r.config.chart.animations.enabled&&!r.globals.dataChanged){var T=1;r.globals.resized||(T=r.config.chart.animations.speed),this.animateHeatMap(A,x,o,i,l,T)}if(r.globals.dataChanged){var M=1;if(this.dynamicAnim.enabled&&r.globals.shouldAnimate){M=this.dynamicAnim.speed;var O=r.globals.previousPaths[h]&&r.globals.previousPaths[h][y]&&r.globals.previousPaths[h][y].color;O||(O="rgba(255, 255, 255, 0)"),this.animateHeatColor(A,J.isColorHex(O)?O:J.rgb2hex(O),J.isColorHex(C)?C:J.rgb2hex(C),M)}}var _=(0,r.config.dataLabels.formatter)(r.globals.series[h][y],{value:r.globals.series[h][y],seriesIndex:h,dataPointIndex:y,w:r}),R=this.helpers.calculateDataLabels({text:_,x:x+i/2,y:o+l/2,i:h,j:y,colorProps:S,series:d});R!==null&&p.add(R),x+=i,y++}o+=l,n.add(p)}var L=r.globals.yAxisScale[0].result.slice();return r.config.yaxis[0].reversed?L.unshift(""):L.push(""),r.globals.yAxisScale[0].result=L,n}},{key:"animateHeatMap",value:function(e,r,a,n,i,l){var o=new $d(this.ctx);o.animateRect(e,{x:r+n/2,y:a+i/2,width:0,height:0},{x:r,y:a,width:n,height:i},l,function(){o.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,r,a,n){e.attr({fill:r}).animate(n).attr({fill:a})}}]),t}(),x_=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"drawYAxisTexts",value:function(e,r,a,n){var i=this.w,l=i.config.yaxis[0],o=i.globals.yLabelFormatters[0];return new ge(this.ctx).drawText({x:e+l.labels.offsetX,y:r+l.labels.offsetY,text:o(n,a),textAnchor:"middle",fontSize:l.labels.style.fontSize,fontFamily:l.labels.style.fontFamily,foreColor:Array.isArray(l.labels.style.colors)?l.labels.style.colors[a]:l.labels.style.colors})}}]),t}(),b_=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 a=r.config.plotOptions.pie.customScale,n=r.globals.gridWidth/2,i=r.globals.gridHeight/2;this.translateX=n-n*a,this.translateY=i-i*a,this.dataLabelsGroup=new ge(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(a,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return Ce(t,[{key:"draw",value:function(e){var r=this,a=this.w,n=new ge(this.ctx),i=n.group({class:"apexcharts-pie"});if(a.globals.noData)return i;for(var l=0,o=0;o<e.length;o++)l+=J.negToZero(e[o]);var c=[],d=n.group();l===0&&(l=1e-5),e.forEach(function(S){r.maxY=Math.max(r.maxY,S)}),a.config.yaxis[0].max&&(this.maxY=a.config.yaxis[0].max),a.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(i);for(var h=0;h<e.length;h++){var p=this.fullAngle*J.negToZero(e[h])/l;c.push(p),this.chartType==="polarArea"?(c[h]=this.fullAngle/e.length,this.sliceSizes.push(a.globals.radialSize*e[h]/this.maxY)):this.sliceSizes.push(a.globals.radialSize)}if(a.globals.dataChanged){for(var m,x=0,b=0;b<a.globals.previousPaths.length;b++)x+=J.negToZero(a.globals.previousPaths[b]);for(var y=0;y<a.globals.previousPaths.length;y++)m=this.fullAngle*J.negToZero(a.globals.previousPaths[y])/x,this.prevSectorAngleArr.push(m)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var v=n.drawCircle(this.donutSize);v.attr({cx:this.centerX,cy:this.centerY,fill:a.config.plotOptions.pie.donut.background?a.config.plotOptions.pie.donut.background:"transparent"}),d.add(v)}var N=this.drawArcs(c,e);if(this.sliceLabels.forEach(function(S){N.add(S)}),d.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(a.config.plotOptions.pie.customScale,")")}),d.add(N),i.add(d),this.donutDataLabels.show){var C=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});i.add(C)}return a.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(i),i}},{key:"drawArcs",value:function(e,r){var a=this.w,n=new Kr(this.ctx),i=new ge(this.ctx),l=new Jn(this.ctx),o=i.group({class:"apexcharts-slices"}),c=this.initialAngle,d=this.initialAngle,h=this.initialAngle,p=this.initialAngle;this.strokeWidth=a.config.stroke.show?a.config.stroke.width:0;for(var m=0;m<e.length;m++){var x=i.group({class:"apexcharts-series apexcharts-pie-series",seriesName:J.escapeString(a.globals.seriesNames[m]),rel:m+1,"data:realIndex":m});o.add(x),d=p,h=(c=h)+e[m],p=d+this.prevSectorAngleArr[m];var b=h<c?this.fullAngle+h-c:h-c,y=l.fillPath({seriesNumber:m,size:this.sliceSizes[m],value:r[m]}),v=this.getChangedPath(d,p),N=i.drawPath({d:v,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[m]:this.lineColorArr,strokeWidth:0,fill:y,fillOpacity:a.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(m)});if(N.attr({index:0,j:m}),n.setSelectionFilter(N,0,m),a.config.chart.dropShadow.enabled){var C=a.config.chart.dropShadow;n.dropShadow(N,C,m)}this.addListeners(N,this.donutDataLabels),ge.setAttrs(N.node,{"data:angle":b,"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,a.globals.radialSize/1.25+a.config.plotOptions.pie.dataLabels.offset,(c+b/2)%this.fullAngle):this.chartType==="donut"&&(S=J.polarToCartesian(this.centerX,this.centerY,(a.globals.radialSize+this.donutSize)/2+a.config.plotOptions.pie.dataLabels.offset,(c+b/2)%this.fullAngle)),x.add(N);var k=0;if(!this.initialAnim||a.globals.resized||a.globals.dataChanged?this.animBeginArr.push(0):((k=b/this.fullAngle*a.config.chart.animations.speed)===0&&(k=1),this.animDur=k+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&a.globals.dataChanged?this.animatePaths(N,{size:this.sliceSizes[m],endAngle:h,startAngle:c,prevStartAngle:d,prevEndAngle:p,animateStartingPos:!0,i:m,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:a.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:k}),a.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&N.node.addEventListener("mouseup",this.pieClicked.bind(this,m)),a.globals.selectedDataPoints[0]!==void 0&&a.globals.selectedDataPoints[0].indexOf(m)>-1&&this.pieClicked(m),a.config.dataLabels.enabled){var A=S.x,T=S.y,M=100*b/this.fullAngle+"%";if(b!==0&&a.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[m]){var O=a.config.dataLabels.formatter;O!==void 0&&(M=O(a.globals.seriesPercent[m][0],{seriesIndex:m,w:a}));var _=a.globals.dataLabels.style.colors[m],R=i.group({class:"apexcharts-datalabels"}),L=i.drawText({x:A,y:T,text:M,textAnchor:"middle",fontSize:a.config.dataLabels.style.fontSize,fontFamily:a.config.dataLabels.style.fontFamily,fontWeight:a.config.dataLabels.style.fontWeight,foreColor:_});if(R.add(L),a.config.dataLabels.dropShadow.enabled){var z=a.config.dataLabels.dropShadow;n.dropShadow(L,z)}L.node.classList.add("apexcharts-pie-label"),a.config.chart.animations.animate&&a.globals.resized===!1&&(L.node.classList.add("apexcharts-pie-label-delay"),L.node.style.animationDelay=a.config.chart.animations.speed/940+"s"),this.sliceLabels.push(R)}}}return o}},{key:"addListeners",value:function(e,r){var a=new ge(this.ctx);e.node.addEventListener("mouseenter",a.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",a.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,r)),e.node.addEventListener("mousedown",a.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 a=this.w,n=r.endAngle<r.startAngle?this.fullAngle+r.endAngle-r.startAngle:r.endAngle-r.startAngle,i=n,l=r.startAngle,o=r.startAngle;r.prevStartAngle!==void 0&&r.prevEndAngle!==void 0&&(l=r.prevEndAngle,i=r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle),r.i===a.config.series.length-1&&(n+o>this.fullAngle?r.endAngle=r.endAngle-(n+o):n+o<this.fullAngle&&(r.endAngle=r.endAngle+(this.fullAngle-(n+o)))),n===this.fullAngle&&(n=this.fullAngle-.01),this.animateArc(e,l,o,n,i,r)}},{key:"animateArc",value:function(e,r,a,n,i,l){var o,c=this,d=this.w,h=new $d(this.ctx),p=l.size;(isNaN(r)||isNaN(i))&&(r=a,i=n,l.dur=0);var m=n,x=a,b=r<a?this.fullAngle+r-a:r-a;d.globals.dataChanged&&l.shouldSetPrevPaths&&l.prevEndAngle&&(o=c.getPiePath({me:c,startAngle:l.prevStartAngle,angle:l.prevEndAngle<l.prevStartAngle?this.fullAngle+l.prevEndAngle-l.prevStartAngle:l.prevEndAngle-l.prevStartAngle,size:p}),e.attr({d:o})),l.dur!==0?e.animate(l.dur,l.animBeginArr[l.i]).after(function(){c.chartType!=="pie"&&c.chartType!=="donut"&&c.chartType!=="polarArea"||this.animate(d.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":c.strokeWidth}),l.i===d.config.series.length-1&&h.animationCompleted(e)}).during(function(y){m=b+(n-b)*y,l.animateStartingPos&&(m=i+(n-i)*y,x=r-i+(a-(r-i))*y),o=c.getPiePath({me:c,startAngle:x,angle:m,size:p}),e.node.setAttribute("data:pathOrig",o),e.attr({d:o})}):(o=c.getPiePath({me:c,startAngle:x,angle:n,size:p}),l.isTrack||(d.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",o),e.attr({d:o,"stroke-width":c.strokeWidth}))}},{key:"pieClicked",value:function(e){var r,a=this.w,n=this,i=n.sliceSizes[e]+(a.config.plotOptions.pie.expandOnClick?4:0),l=a.globals.dom.Paper.findOne(".apexcharts-".concat(n.chartType.toLowerCase(),"-slice-").concat(e));if(l.attr("data:pieClicked")!=="true"){var o=a.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(o,function(p){p.setAttribute("data:pieClicked","false");var m=p.getAttribute("data:pathOrig");m&&p.setAttribute("d",m)}),a.globals.capturedDataPointIndex=e,l.attr("data:pieClicked","true");var c=parseInt(l.attr("data:startAngle"),10),d=parseInt(l.attr("data:angle"),10);r=n.getPiePath({me:n,startAngle:c,angle:d,size:i}),d!==360&&l.plot(r)}else{l.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(l.node,this.donutDataLabels);var h=l.attr("data:pathOrig");l.attr({d:h})}}},{key:"getChangedPath",value:function(e,r){var a="";return this.dynamicAnim&&this.w.globals.dataChanged&&(a=this.getPiePath({me:this,startAngle:e,angle:r-e,size:this.size})),a}},{key:"getPiePath",value:function(e){var r,a=e.me,n=e.startAngle,i=e.angle,l=e.size,o=new ge(this.ctx),c=n,d=Math.PI*(c-90)/180,h=i+n;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=a.centerX+l*Math.cos(d),x=a.centerY+l*Math.sin(d),b=a.centerX+l*Math.cos(p),y=a.centerY+l*Math.sin(p),v=J.polarToCartesian(a.centerX,a.centerY,a.donutSize,h),N=J.polarToCartesian(a.centerX,a.centerY,a.donutSize,c),C=i>180?1:0,S=["M",m,x,"A",l,l,0,C,1,b,y];return r=a.chartType==="donut"?[].concat(S,["L",v.x,v.y,"A",a.donutSize,a.donutSize,0,C,0,N.x,N.y,"L",m,x,"z"]).join(" "):a.chartType==="pie"||a.chartType==="polarArea"?[].concat(S,["L",a.centerX,a.centerY,"L",m,x]).join(" "):[].concat(S).join(" "),o.roundPathCorners(r,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var r=this.w,a=new u_(this.ctx),n=new ge(this.ctx),i=new x_(this.ctx),l=n.group(),o=n.group(),c=a.niceScale(0,Math.ceil(this.maxY),0),d=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 b=n.drawCircle(p);if(b.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 y=i.drawYAxisTexts(this.centerX,this.centerY-p+parseInt(r.config.yaxis[0].labels.style.fontSize,10)/2,x,d[x]);o.add(y)}l.add(b),p-=m}this.drawSpokes(e),e.add(l),e.add(o)}},{key:"renderInnerDataLabels",value:function(e,r,a){var n=this.w,i=new ge(this.ctx),l=r.total.show;e.node.innerHTML="",e.node.style.opacity=a.opacity;var o,c,d=a.centerX,h=this.donutDataLabels.total.label?a.centerY:a.centerY-a.centerY/6;o=r.name.color===void 0?n.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?n.config.chart.foreColor:r.value.color;var b=r.value.formatter,y="",v="";if(l?(o=r.total.color,p=r.total.fontSize,m=r.total.fontFamily,x=r.total.fontWeight,v=this.donutDataLabels.total.label?r.total.label:"",y=r.total.formatter(n)):n.globals.series.length===1&&(y=b(n.globals.series[0],n),v=n.globals.seriesNames[0]),v&&(v=r.name.formatter(v,r.total.show,n)),r.name.show){var N=i.drawText({x:d,y:h+parseFloat(r.name.offsetY),text:v,textAnchor:"middle",foreColor:o,fontSize:p,fontWeight:x,fontFamily:m});N.node.classList.add("apexcharts-datalabel-label"),e.add(N)}if(r.value.show){var C=r.name.show?parseFloat(r.value.offsetY)+16:r.value.offsetY,S=i.drawText({x:d,y:h+C,text:y,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,a,n){var i,l=this.w;n?i=e.name.color===void 0?l.globals.colors[parseInt(n.parentNode.getAttribute("rel"),10)-1]:e.name.color:l.globals.series.length>1&&e.total.show&&(i=e.total.color);var o=l.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),c=l.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");a=(0,e.value.formatter)(a,l),n||typeof e.total.formatter!="function"||(a=e.total.formatter(l));var d=r===e.total.label;r=this.donutDataLabels.total.label?e.name.formatter(r,d,l):"",o!==null&&(o.textContent=r),c!==null&&(c.textContent=a),o!==null&&(o.style.fill=i)}},{key:"printDataLabelsInner",value:function(e,r){var a=this.w,n=e.getAttribute("data:value"),i=a.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];a.globals.series.length>1&&this.printInnerLabels(r,i,n,e);var l=a.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");l!==null&&(l.style.opacity=1)}},{key:"drawSpokes",value:function(e){var r=this,a=this.w,n=new ge(this.ctx),i=a.config.plotOptions.polarArea.spokes;if(i.strokeWidth!==0){for(var l=[],o=360/a.globals.series.length,c=0;c<a.globals.series.length;c++)l.push(J.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize,a.config.plotOptions.pie.startAngle+o*c));l.forEach(function(d,h){var p=n.drawLine(d.x,d.y,r.centerX,r.centerY,Array.isArray(i.connectorColors)?i.connectorColors[h]:i.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"),a=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(a)}}}]),t}(),SK=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 or(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 Ce(t,[{key:"draw",value:function(e){var r=this,a=this.w,n=new Jn(this.ctx),i=[],l=new wd(this.ctx);e.length&&(this.dataPointsLen=e[a.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var o=a.globals.gridWidth/2,c=a.globals.gridHeight/2,d=o+a.config.plotOptions.radar.offsetX,h=c+a.config.plotOptions.radar.offsetY,p=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(d||0,", ").concat(h||0,")")}),m=[],x=null,b=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(v,N){var C=v.length===a.globals.dataPoints,S=r.graphics.group().attr({class:"apexcharts-series","data:longestSeries":C,seriesName:J.escapeString(a.globals.seriesNames[N]),rel:N+1,"data:realIndex":N});r.dataRadiusOfPercent[N]=[],r.dataRadius[N]=[],r.angleArr[N]=[],v.forEach(function(F,Y){var X=Math.abs(r.maxValue-r.minValue);F-=r.minValue,r.isLog&&(F=r.coreUtils.getLogVal(r.logBase,F,0)),r.dataRadiusOfPercent[N][Y]=F/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 k=r.createPaths(m,{x:0,y:0});x=r.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),b=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":N}),a.globals.delayedElements.push({el:x.node,index:N});var A={i:N,realIndex:N,animationDelay:N,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:a.globals.stroke.colors[N],strokeLineCap:a.config.stroke.lineCap},T=null;a.globals.previousPaths.length>0&&(T=r.getPreviousPath(N));for(var M=0;M<k.linePathsTo.length;M++){var O=r.graphics.renderPaths(ve(ve({},A),{},{pathFrom:T===null?k.linePathsFrom[M]:T,pathTo:k.linePathsTo[M],strokeWidth:Array.isArray(r.strokeWidth)?r.strokeWidth[N]:r.strokeWidth,fill:"none",drawShadow:!1}));S.add(O);var _=n.fillPath({seriesNumber:N}),R=r.graphics.renderPaths(ve(ve({},A),{},{pathFrom:T===null?k.areaPathsFrom[M]:T,pathTo:k.areaPathsTo[M],strokeWidth:0,fill:_,drawShadow:!1}));if(a.config.chart.dropShadow.enabled){var L=new Kr(r.ctx),z=a.config.chart.dropShadow;L.dropShadow(R,Object.assign({},z,{noUserSpaceOnUse:!0}),N)}S.add(R)}v.forEach(function(F,Y){var X=new Xd(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=a.config.dataLabels;if(V.enabled){var Z=V.formatter(a.globals.series[N][Y],{seriesIndex:N,dataPointIndex:Y,w:a});l.plotDataLabelsText({x:m[Y].x,y:m[Y].y,text:Z,textAnchor:"middle",i:N,j:N,parent:b,offsetCorrection:!1,dataLabelsConfig:ve({},V)})}S.add(b)}),i.push(S)}),this.drawPolygons({parent:p}),a.config.xaxis.labels.show){var y=this.drawXAxisTexts();p.add(y)}return i.forEach(function(v){p.add(v)}),p.add(this.yaxisLabels),p}},{key:"drawPolygons",value:function(e){for(var r=this,a=this.w,n=e.parent,i=new x_(this.ctx),l=a.globals.yAxisScale[0].result.reverse(),o=l.length,c=[],d=this.size/(o-1),h=0;h<o;h++)c[h]=d*h;c.reverse();var p=[],m=[];c.forEach(function(x,b){var y=J.getPolygonPos(x,r.dataPointsLen),v="";y.forEach(function(N,C){if(b===0){var S=r.graphics.drawLine(N.x,N.y,0,0,Array.isArray(r.polygons.connectorColors)?r.polygons.connectorColors[C]:r.polygons.connectorColors);m.push(S)}C===0&&r.yaxisLabelsTextsPos.push({x:N.x,y:N.y}),v+=N.x+","+N.y+" "}),p.push(v)}),p.forEach(function(x,b){var y=r.polygons.strokeColors,v=r.polygons.strokeWidth,N=r.graphics.drawPolygon(x,Array.isArray(y)?y[b]:y,Array.isArray(v)?v[b]:v,a.globals.radarPolygons.fill.colors[b]);n.add(N)}),m.forEach(function(x){n.add(x)}),a.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(x,b){var y=i.drawYAxisTexts(x.x,x.y,b,l[b]);r.yaxisLabels.add(y)})}},{key:"drawXAxisTexts",value:function(){var e=this,r=this.w,a=r.config.xaxis.labels,n=this.graphics.group({class:"apexcharts-xaxis"}),i=J.getPolygonPos(this.size,this.dataPointsLen);return r.globals.labels.forEach(function(l,o){var c=r.config.xaxis.labels.formatter,d=new wd(e.ctx);if(i[o]){var h=e.getTextPos(i[o],e.size),p=c(l,{seriesIndex:-1,dataPointIndex:o,w:r});d.plotDataLabelsText({x:h.newX,y:h.newY,text:p,textAnchor:h.textAnchor,i:o,j:o,parent:n,className:"apexcharts-xaxis-label",color:Array.isArray(a.style.colors)&&a.style.colors[o]?a.style.colors[o]:"#a8a8a8",dataLabelsConfig:ve({textAnchor:h.textAnchor,dropShadow:{enabled:!1}},a),offsetCorrection:!1}).on("click",function(m){if(typeof r.config.chart.events.xAxisLabelClick=="function"){var x=Object.assign({},r,{labelIndex:o});r.config.chart.events.xAxisLabelClick(m,e.ctx,x)}})}}),n}},{key:"createPaths",value:function(e,r){var a=this,n=[],i=[],l=[],o=[];if(e.length){i=[this.graphics.move(r.x,r.y)],o=[this.graphics.move(r.x,r.y)];var c=this.graphics.move(e[0].x,e[0].y),d=this.graphics.move(e[0].x,e[0].y);e.forEach(function(h,p){c+=a.graphics.line(h.x,h.y),d+=a.graphics.line(h.x,h.y),p===e.length-1&&(c+="Z",d+="Z")}),n.push(c),l.push(d)}return{linePathsFrom:i,linePathsTo:n,areaPathsFrom:o,areaPathsTo:l}}},{key:"getTextPos",value:function(e,r){var a="middle",n=e.x,i=e.y;return Math.abs(e.x)>=10?e.x>0?(a="start",n+=10):e.x<0&&(a="end",n-=10):a="middle",Math.abs(e.y)>=r-10&&(e.y<0?i-=10:e.y>0&&(i+=10)),{textAnchor:a,newX:n,newY:i}}},{key:"getPreviousPath",value:function(e){for(var r=this.w,a=null,n=0;n<r.globals.previousPaths.length;n++){var i=r.globals.previousPaths[n];i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(e,10)&&r.globals.previousPaths[n].paths[0]!==void 0&&(a=r.globals.previousPaths[n].paths[0].d)}return a}},{key:"getDataPointsPos",value:function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],r=r||[];for(var n=[],i=0;i<a;i++){var l={};l.x=e[i]*Math.sin(r[i]),l.y=-e[i]*Math.cos(r[i]),n.push(l)}return n}}]),t}(),CK=function(t){Gf(r,b_);var e=qf(r);function r(a){var n;Se(this,r),(n=e.call(this,a)).ctx=a,n.w=a.w,n.animBeginArr=[0],n.animDur=0;var i=n.w;return n.startAngle=i.config.plotOptions.radialBar.startAngle,n.endAngle=i.config.plotOptions.radialBar.endAngle,n.totalAngle=Math.abs(i.config.plotOptions.radialBar.endAngle-i.config.plotOptions.radialBar.startAngle),n.trackStartAngle=i.config.plotOptions.radialBar.track.startAngle,n.trackEndAngle=i.config.plotOptions.radialBar.track.endAngle,n.barLabels=n.w.config.plotOptions.radialBar.barLabels,n.donutDataLabels=n.w.config.plotOptions.radialBar.dataLabels,n.radialDataLabels=n.donutDataLabels,n.trackStartAngle||(n.trackStartAngle=n.startAngle),n.trackEndAngle||(n.trackEndAngle=n.endAngle),n.endAngle===360&&(n.endAngle=359.99),n.margin=parseInt(i.config.plotOptions.radialBar.track.margin,10),n.onBarLabelClick=n.onBarLabelClick.bind(ER(n)),n}return Ce(r,[{key:"draw",value:function(a){var n=this.w,i=new ge(this.ctx),l=i.group({class:"apexcharts-radialbar"});if(n.globals.noData)return l;var o=i.group(),c=this.defaultSize/2,d=n.globals.gridWidth/2,h=this.defaultSize/2.05;n.config.chart.sparkline.enabled||(h=h-n.config.stroke.width-n.config.chart.dropShadow.blur);var p=n.globals.fill.colors;if(n.config.plotOptions.radialBar.track.show){var m=this.drawTracks({size:h,centerX:d,centerY:c,colorArr:p,series:a});o.add(m)}var x=this.drawArcs({size:h,centerX:d,centerY:c,colorArr:p,series:a}),b=360;n.config.plotOptions.radialBar.startAngle<0&&(b=this.totalAngle);var y=(360-b)/360;if(n.globals.radialSize=h-h*y,this.radialDataLabels.value.show){var v=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);n.globals.radialSize+=v*y}return o.add(x.g),n.config.plotOptions.radialBar.hollow.position==="front"&&(x.g.add(x.elHollow),x.dataLabels&&x.g.add(x.dataLabels)),l.add(o),l}},{key:"drawTracks",value:function(a){var n=this.w,i=new ge(this.ctx),l=i.group({class:"apexcharts-tracks"}),o=new Kr(this.ctx),c=new Jn(this.ctx),d=this.getStrokeWidth(a);a.size=a.size-d/2;for(var h=0;h<a.series.length;h++){var p=i.group({class:"apexcharts-radialbar-track apexcharts-track"});l.add(p),p.attr({rel:h+1}),a.size=a.size-d-this.margin;var m=n.config.plotOptions.radialBar.track,x=c.fillPath({seriesNumber:0,size:a.size,fillColors:Array.isArray(m.background)?m.background[h]:m.background,solid:!0}),b=this.trackStartAngle,y=this.trackEndAngle;Math.abs(y)+Math.abs(b)>=360&&(y=360-Math.abs(this.startAngle)-.1);var v=i.drawPath({d:"",stroke:x,strokeWidth:d*parseInt(m.strokeWidth,10)/100,fill:"none",strokeOpacity:m.opacity,classes:"apexcharts-radialbar-area"});if(m.dropShadow.enabled){var N=m.dropShadow;o.dropShadow(v,N)}p.add(v),v.attr("id","apexcharts-radialbarTrack-"+h),this.animatePaths(v,{centerX:a.centerX,centerY:a.centerY,endAngle:y,startAngle:b,size:a.size,i:h,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return l}},{key:"drawArcs",value:function(a){var n=this.w,i=new ge(this.ctx),l=new Jn(this.ctx),o=new Kr(this.ctx),c=i.group(),d=this.getStrokeWidth(a);a.size=a.size-d/2;var h=n.config.plotOptions.radialBar.hollow.background,p=a.size-d*a.series.length-this.margin*a.series.length-d*parseInt(n.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,m=p-n.config.plotOptions.radialBar.hollow.margin;n.config.plotOptions.radialBar.hollow.image!==void 0&&(h=this.drawHollowImage(a,c,p,h));var x=this.drawHollow({size:m,centerX:a.centerX,centerY:a.centerY,fill:h||"transparent"});if(n.config.plotOptions.radialBar.hollow.dropShadow.enabled){var b=n.config.plotOptions.radialBar.hollow.dropShadow;o.dropShadow(x,b)}var y=1;!this.radialDataLabels.total.show&&n.globals.series.length>1&&(y=0);var v=null;if(this.radialDataLabels.show){var N=n.globals.dom.Paper.findOne(".apexcharts-datalabels-group");v=this.renderInnerDataLabels(N,this.radialDataLabels,{hollowSize:p,centerX:a.centerX,centerY:a.centerY,opacity:y})}n.config.plotOptions.radialBar.hollow.position==="back"&&(c.add(x),v&&c.add(v));var C=!1;n.config.plotOptions.radialBar.inverseOrder&&(C=!0);for(var S=C?a.series.length-1:0;C?S>=0:S<a.series.length;C?S--:S++){var k=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:J.escapeString(n.globals.seriesNames[S])});c.add(k),k.attr({rel:S+1,"data:realIndex":S}),this.ctx.series.addCollapsedClassToSeries(k,S),a.size=a.size-d-this.margin;var A=l.fillPath({seriesNumber:S,size:a.size,value:a.series[S]}),T=this.startAngle,M=void 0,O=J.negToZero(a.series[S]>100?100:a.series[S])/100,_=Math.round(this.totalAngle*O)+this.startAngle,R=void 0;n.globals.dataChanged&&(M=this.startAngle,R=Math.round(this.totalAngle*J.negToZero(n.globals.previousPaths[S])/100)+M),Math.abs(_)+Math.abs(T)>360&&(_-=.01),Math.abs(R)+Math.abs(M)>360&&(R-=.01);var L=_-T,z=Array.isArray(n.config.stroke.dashArray)?n.config.stroke.dashArray[S]:n.config.stroke.dashArray,F=i.drawPath({d:"",stroke:A,strokeWidth:d,fill:"none",fillOpacity:n.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+S,strokeDashArray:z});if(ge.setAttrs(F.node,{"data:angle":L,"data:value":a.series[S]}),n.config.chart.dropShadow.enabled){var Y=n.config.chart.dropShadow;o.dropShadow(F,Y,S)}if(o.setSelectionFilter(F,0,S),this.addListeners(F,this.radialDataLabels),k.add(F),F.attr({index:0,j:S}),this.barLabels.enabled){var X=J.polarToCartesian(a.centerX,a.centerY,a.size,T),H=this.barLabels.formatter(n.globals.seriesNames[S],{seriesIndex:S,w:n}),W=["apexcharts-radialbar-label"];this.barLabels.onClick||W.push("apexcharts-no-click");var V=this.barLabels.useSeriesColors?n.globals.colors[S]:n.config.chart.foreColor;V||(V=n.config.chart.foreColor);var Z=X.x+this.barLabels.offsetX,B=X.y+this.barLabels.offsetY,G=i.drawText({x:Z,y:B,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(B),transform:"rotate(".concat(T," 0 0)")}),k.add(G)}var te=0;!this.initialAnim||n.globals.resized||n.globals.dataChanged||(te=n.config.chart.animations.speed),n.globals.dataChanged&&(te=n.config.chart.animations.dynamicAnimation.speed),this.animDur=te/(1.2*a.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(F,{centerX:a.centerX,centerY:a.centerY,endAngle:_,startAngle:T,prevEndAngle:R,prevStartAngle:M,size:a.size,i:S,totalItems:2,animBeginArr:this.animBeginArr,dur:te,shouldSetPrevPaths:!0})}return{g:c,elHollow:x,dataLabels:v}}},{key:"drawHollow",value:function(a){var n=new ge(this.ctx).drawCircle(2*a.size);return n.attr({class:"apexcharts-radialbar-hollow",cx:a.centerX,cy:a.centerY,r:a.size,fill:a.fill}),n}},{key:"drawHollowImage",value:function(a,n,i,l){var o=this.w,c=new Jn(this.ctx),d=J.randomId(),h=o.config.plotOptions.radialBar.hollow.image;if(o.config.plotOptions.radialBar.hollow.imageClipped)c.clippedImgArea({width:i,height:i,image:h,patternID:"pattern".concat(o.globals.cuid).concat(d)}),l="url(#pattern".concat(o.globals.cuid).concat(d,")");else{var p=o.config.plotOptions.radialBar.hollow.imageWidth,m=o.config.plotOptions.radialBar.hollow.imageHeight;if(p===void 0&&m===void 0){var x=o.globals.dom.Paper.image(h,function(y){this.move(a.centerX-y.width/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-y.height/2+o.config.plotOptions.radialBar.hollow.imageOffsetY)});n.add(x)}else{var b=o.globals.dom.Paper.image(h,function(y){this.move(a.centerX-p/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,a.centerY-m/2+o.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(p,m)});n.add(b)}}return l}},{key:"getStrokeWidth",value:function(a){var n=this.w;return a.size*(100-parseInt(n.config.plotOptions.radialBar.hollow.size,10))/100/(a.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(a){var n=parseInt(a.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,l=this.w;i&&i(l.globals.seriesNames[n],{w:l,seriesIndex:n})}}]),r}(),AK=function(t){Gf(r,jd);var e=qf(r);function r(){return Se(this,r),e.apply(this,arguments)}return Ce(r,[{key:"draw",value:function(a,n){var i=this.w,l=new ge(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=a,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(a);for(var o=l.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),c=0;c<a.length;c++){var d,h,p,m,x=void 0,b=void 0,y=i.globals.comboCharts?n[c]:c,v=this.barHelpers.getGroupIndex(y).columnGroupIndex,N=l.group({class:"apexcharts-series",seriesName:J.escapeString(i.globals.seriesNames[y]),rel:c+1,"data:realIndex":y});this.ctx.series.addCollapsedClassToSeries(N,y),a[c].length>0&&(this.visibleI=this.visibleI+1);var C=0,S=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[y][0],k=y);var A=this.barHelpers.initialPositions(y);b=A.y,m=A.zeroW,x=A.x,S=A.barWidth,C=A.barHeight,d=A.xDivision,h=A.yDivision,p=A.zeroH;for(var T=l.group({class:"apexcharts-datalabels","data:realIndex":y}),M=l.group({class:"apexcharts-rangebar-goals-markers"}),O=0;O<i.globals.dataPoints;O++){var _=this.barHelpers.getStrokeWidth(c,O,y),R=this.seriesRangeStart[c][O],L=this.seriesRangeEnd[c][O],z=null,F=null,Y=null,X={x,y:b,strokeWidth:_,elSeries:N},H=this.seriesLen;if(i.config.plotOptions.bar.rangeBarGroupRows&&(H=1),i.config.series[c].data[O]===void 0)break;if(this.isHorizontal){Y=b+C*this.visibleI;var W=(h-C*H)/2;if(i.config.series[c].data[O].x){var V=this.detectOverlappingBars({i:c,j:O,barYPosition:Y,srty:W,barHeight:C,yDivision:h,initPositions:A});C=V.barHeight,Y=V.barYPosition}S=(z=this.drawRangeBarPaths(ve({indexes:{i:c,j:O,realIndex:y},barHeight:C,barYPosition:Y,zeroW:m,yDivision:h,y1:R,y2:L},X))).barWidth}else{i.globals.isXNumeric&&(x=(i.globals.seriesX[c][O]-i.globals.minX)/this.xRatio-S/2),F=x+S*this.visibleI;var Z=(d-S*H)/2;if(i.config.series[c].data[O].x){var B=this.detectOverlappingBars({i:c,j:O,barXPosition:F,srtx:Z,barWidth:S,xDivision:d,initPositions:A});S=B.barWidth,F=B.barXPosition}C=(z=this.drawRangeColumnPaths(ve({indexes:{i:c,j:O,realIndex:y,translationsIndex:k},barWidth:S,barXPosition:F,zeroH:p,xDivision:d},X))).barHeight}var G=this.barHelpers.drawGoalLine({barXPosition:z.barXPosition,barYPosition:Y,goalX:z.goalX,goalY:z.goalY,barHeight:C,barWidth:S});G&&M.add(G),b=z.y,x=z.x;var te=this.barHelpers.getPathFillColor(a,c,O,y);this.renderSeries({realIndex:y,pathFill:te.color,lineFill:te.useRangeColor?te.color:i.globals.stroke.colors[y],j:O,i:c,x,y:b,y1:R,y2:L,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:_,elSeries:N,series:a,barHeight:C,barWidth:S,barXPosition:F,barYPosition:Y,columnGroupIndex:v,elDataLabelsWrap:T,elGoalsMarkers:M,visibleSeries:this.visibleI,type:"rangebar"})}o.add(N)}return o}},{key:"detectOverlappingBars",value:function(a){var n=a.i,i=a.j,l=a.barYPosition,o=a.barXPosition,c=a.srty,d=a.srtx,h=a.barHeight,p=a.barWidth,m=a.yDivision,x=a.xDivision,b=a.initPositions,y=this.w,v=[],N=y.config.series[n].data[i].rangeName,C=y.config.series[n].data[i].x,S=Array.isArray(C)?C.join(" "):C,k=y.globals.labels.map(function(T){return Array.isArray(T)?T.join(" "):T}).indexOf(S),A=y.globals.seriesRange[n].findIndex(function(T){return T.x===S&&T.overlaps.length>0});return this.isHorizontal?(l=y.config.plotOptions.bar.rangeBarGroupRows?c+m*k:c+h*this.visibleI+m*k,A>-1&&!y.config.plotOptions.bar.rangeBarOverlap&&(v=y.globals.seriesRange[n][A].overlaps).indexOf(N)>-1&&(l=(h=b.barHeight/v.length)*this.visibleI+m*(100-parseInt(this.barOptions.barHeight,10))/100/2+h*(this.visibleI+v.indexOf(N))+m*k)):(k>-1&&!y.globals.timescaleLabels.length&&(o=y.config.plotOptions.bar.rangeBarGroupRows?d+x*k:d+p*this.visibleI+x*k),A>-1&&!y.config.plotOptions.bar.rangeBarOverlap&&(v=y.globals.seriesRange[n][A].overlaps).indexOf(N)>-1&&(o=(p=b.barWidth/v.length)*this.visibleI+x*(100-parseInt(this.barOptions.barWidth,10))/100/2+p*(this.visibleI+v.indexOf(N))+x*k)),{barYPosition:l,barXPosition:o,barHeight:h,barWidth:p}}},{key:"drawRangeColumnPaths",value:function(a){var n=a.indexes,i=a.x,l=a.xDivision,o=a.barWidth,c=a.barXPosition,d=a.zeroH,h=this.w,p=n.i,m=n.j,x=n.realIndex,b=n.translationsIndex,y=this.yRatio[b],v=this.getRangeValue(x,m),N=Math.min(v.start,v.end),C=Math.max(v.start,v.end);this.series[p][m]===void 0||this.series[p][m]===null?N=d:(N=d-N/y,C=d-C/y);var S=Math.abs(C-N),k=this.barHelpers.getColumnPaths({barXPosition:c,barWidth:o,y1:N,y2:C,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:x,i:x,j:m,w:h});if(h.globals.isXNumeric){var A=this.getBarXForNumericXAxis({x:i,j:m,realIndex:x,barWidth:o});i=A.x,c=A.barXPosition}else i+=l;return{pathTo:k.pathTo,pathFrom:k.pathFrom,barHeight:S,x:i,y:v.start<0&&v.end<0?N:C,goalY:this.barHelpers.getGoalValues("y",null,d,p,m,b),barXPosition:c}}},{key:"preventBarOverflow",value:function(a){var n=this.w;return a<0&&(a=0),a>n.globals.gridWidth&&(a=n.globals.gridWidth),a}},{key:"drawRangeBarPaths",value:function(a){var n=a.indexes,i=a.y,l=a.y1,o=a.y2,c=a.yDivision,d=a.barHeight,h=a.barYPosition,p=a.zeroW,m=this.w,x=n.realIndex,b=n.j,y=this.preventBarOverflow(p+l/this.invertedYRatio),v=this.preventBarOverflow(p+o/this.invertedYRatio),N=this.getRangeValue(x,b),C=Math.abs(v-y),S=this.barHelpers.getBarpaths({barYPosition:h,barHeight:d,x1:y,x2:v,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:x,realIndex:x,j:b,w:m});return m.globals.isXNumeric||(i+=c),{pathTo:S.pathTo,pathFrom:S.pathFrom,barWidth:C,x:N.start<0&&N.end<0?y:v,goalX:this.barHelpers.getGoalValues("x",p,null,x,b),y:i}}},{key:"getRangeValue",value:function(a,n){var i=this.w;return{start:i.globals.seriesRangeStart[a][n],end:i.globals.seriesRangeEnd[a][n]}}}]),r}(),kK=function(){function t(e){Se(this,t),this.w=e.w,this.lineCtx=e}return Ce(t,[{key:"sameValueSeriesFix",value:function(e,r){var a=this.w;if((a.config.fill.type==="gradient"||a.config.fill.type[e]==="gradient")&&new or(this.lineCtx.ctx,a).seriesHaveSameValues(e)){var n=r[e].slice();n[n.length-1]=n[n.length-1]+1e-6,r[e]=n}return r}},{key:"calculatePoints",value:function(e){var r=e.series,a=e.realIndex,n=e.x,i=e.y,l=e.i,o=e.j,c=e.prevY,d=this.w,h=[],p=[],m=this.lineCtx.categoryAxisCorrection+d.config.markers.offsetX;return d.globals.isXNumeric&&(m=(d.globals.seriesX[a][0]-d.globals.minX)/this.lineCtx.xRatio+d.config.markers.offsetX),o===0&&(h.push(m),p.push(J.isNumber(r[l][0])?c+d.config.markers.offsetY:null)),h.push(n+d.config.markers.offsetX),p.push(J.isNumber(r[l][o+1])?i+d.config.markers.offsetY:null),{x:h,y:p}}},{key:"checkPreviousPaths",value:function(e){for(var r=e.pathFromLine,a=e.pathFromArea,n=e.realIndex,i=this.w,l=0;l<i.globals.previousPaths.length;l++){var o=i.globals.previousPaths[l];(o.type==="line"||o.type==="area")&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(n,10)&&(o.type==="line"?(this.lineCtx.appendPathFrom=!1,r=i.globals.previousPaths[l].paths[0].d):o.type==="area"&&(this.lineCtx.appendPathFrom=!1,a=i.globals.previousPaths[l].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[l].paths[1]&&(r=i.globals.previousPaths[l].paths[1].d)))}return{pathFromLine:r,pathFromArea:a}}},{key:"determineFirstPrevY",value:function(e){var r,a,n,i=e.i,l=e.realIndex,o=e.series,c=e.prevY,d=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[l])===null||r===void 0?void 0:r.type)==="bar"||((a=this.w.config.series[l])===null||a===void 0?void 0:a.type)==="column");if(((n=o[i])===null||n===void 0?void 0:n[0])!==void 0)c=(d=m&&i>0?this.lineCtx.prevSeriesY[i-1][0]:this.lineCtx.zeroY)-o[i][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?o[i][0]/this.lineCtx.yRatio[h]:0);else if(m&&i>0&&o[i][0]===void 0){for(var x=i-1;x>=0;x--)if(o[x][0]!==null&&o[x][0]!==void 0){c=d=this.lineCtx.prevSeriesY[x][0];break}}return{prevY:c,lineYPosition:d}}}]),t}(),DK=function(t){for(var e,r,a,n,i=function(h){for(var p=[],m=h[0],x=h[1],b=p[0]=D1(m,x),y=1,v=h.length-1;y<v;y++)m=x,x=h[y+1],p[y]=.5*(b+(b=D1(m,x)));return p[y]=b,p}(t),l=t.length-1,o=[],c=0;c<l;c++)a=D1(t[c],t[c+1]),Math.abs(a)<1e-6?i[c]=i[c+1]=0:(n=(e=i[c]/a)*e+(r=i[c+1]/a)*r)>9&&(n=3*a/Math.sqrt(n),i[c]=n*e,i[c+1]=n*r);for(var d=0;d<=l;d++)n=(t[Math.min(l,d+1)][0]-t[Math.max(0,d-1)][0])/(6*(1+i[d]*i[d])),o.push([n||0,i[d]*n||0]);return o},TK=function(t){var e=DK(t),r=t[1],a=t[0],n=[],i=e[1],l=e[0];n.push(a,[a[0]+l[0],a[1]+l[1],r[0]-i[0],r[1]-i[1],r[0],r[1]]);for(var o=2,c=e.length;o<c;o++){var d=t[o],h=e[o];n.push([d[0]-h[0],d[1]-h[1],d[0],d[1]])}return n},MK=function(t,e,r){var a=t.slice(e,r);if(e){if(r-e>1&&a[1].length<6){var n=a[0].length;a[1]=[2*a[0][n-2]-a[0][n-4],2*a[0][n-1]-a[0][n-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function D1(t,e){return(e[1]-t[1])/(e[0]-t[0])}var T1=function(){function t(e,r,a){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")||a,this.scatter=new c_(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new kK(this),this.markers=new Xd(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return Ce(t,[{key:"draw",value:function(e,r,a,n){var i,l=this.w,o=new ge(this.ctx),c=l.globals.comboCharts?r:l.config.chart.type,d=o.group({class:"apexcharts-".concat(c,"-series apexcharts-plot-series")}),h=new or(this.ctx,l);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=l.globals.comboCharts?a[m]:m,b=this.yRatio.length>1?x:0;this._initSerieVariables(e,m,x);var y=[],v=[],N=[],C=l.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,x),l.globals.isXNumeric&&l.globals.seriesX.length>0&&(C=(l.globals.seriesX[x][0]-l.globals.minX)/this.xRatio),N.push(C);var S,k=C,A=void 0,T=k,M=this.zeroY,O=this.zeroY;M=this.lineHelpers.determineFirstPrevY({i:m,realIndex:x,series:e,prevY:M,lineYPosition:0,translationsIndex:b}).prevY,l.config.stroke.curve==="monotoneCubic"&&e[m][0]===null?y.push(null):y.push(M),S=M,c==="rangeArea"&&(A=O=this.lineHelpers.determineFirstPrevY({i:m,realIndex:x,series:n,prevY:O,lineYPosition:0,translationsIndex:b}).prevY,v.push(y[0]!==null?O:null));var _=this._calculatePathsFrom({type:c,series:e,i:m,realIndex:x,translationsIndex:b,prevX:T,prevY:M,prevY2:O}),R=[y[0]],L=[v[0]],z={type:c,series:e,realIndex:x,translationsIndex:b,i:m,x:C,y:1,pX:k,pY:S,pathsFrom:_,linePaths:[],areaPaths:[],seriesIndex:a,lineYPosition:0,xArrj:N,yArrj:y,y2Arrj:v,seriesRangeEnd:n},F=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:n,i:m,realIndex:x,prevX:T,prevY:O}),X=this._iterateOverDataPoints(ve(ve({},z),{},{series:n,xArrj:[C],yArrj:R,y2Arrj:L,pY:A,areaPaths:F.areaPaths,pathsFrom:Y,iterations:n[m].length-1,isRangeStart:!1})),H=F.linePaths.length/2,W=0;W<H;W++)F.linePaths[W]=X.linePaths[W+H]+F.linePaths[W];F.linePaths.splice(H),F.pathFromLine=X.pathFromLine+F.pathFromLine}else F.pathFromArea+="z";this._handlePaths({type:c,realIndex:x,i:m,paths:F}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),p.push(this.elSeries)}if(((i=l.config.series[0])===null||i===void 0?void 0:i.zIndex)!==void 0&&p.sort(function(B,G){return Number(B.node.getAttribute("zIndex"))-Number(G.node.getAttribute("zIndex"))}),l.config.chart.stacked)for(var V=p.length-1;V>=0;V--)d.add(p[V]);else for(var Z=0;Z<p.length;Z++)d.add(p[Z]);return d}},{key:"_initSerieVariables",value:function(e,r,a){var n=this.w,i=new ge(this.ctx);this.xDivision=n.globals.gridWidth/(n.globals.dataPoints-(n.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(n.config.stroke.width)?n.config.stroke.width[a]:n.config.stroke.width;var l=0;if(this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[a],l=a),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.zeroY=n.globals.gridHeight-this.baseLineY[l]-(this.isReversed?n.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[l]:0),this.areaBottomY=this.zeroY,(this.zeroY>n.globals.gridHeight||n.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=n.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=i.group({class:"apexcharts-series",zIndex:n.config.series[a].zIndex!==void 0?n.config.series[a].zIndex:a,seriesName:J.escapeString(n.globals.seriesNames[a])}),this.elPointsMain=i.group({class:"apexcharts-series-markers-wrap","data:realIndex":a}),n.globals.hasNullValues){var o=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[n.globals.gridHeight+n.globals.markers.largestSize]},seriesIndex:r,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});o!==null&&this.elPointsMain.add(o)}this.elDataLabelsWrap=i.group({class:"apexcharts-datalabels","data:realIndex":a});var c=e[r].length===n.globals.dataPoints;this.elSeries.attr({"data:longestSeries":c,rel:r+1,"data:realIndex":a}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var r,a,n,i,l=e.type,o=e.series,c=e.i,d=e.realIndex,h=e.translationsIndex,p=e.prevX,m=e.prevY,x=e.prevY2,b=this.w,y=new ge(this.ctx);if(o[c][0]===null){for(var v=0;v<o[c].length;v++)if(o[c][v]!==null){p=this.xDivision*v,m=this.zeroY-o[c][v]/this.yRatio[h],r=y.move(p,m),a=y.move(p,this.areaBottomY);break}}else r=y.move(p,m),l==="rangeArea"&&(r=y.move(p,x)+y.line(p,m)),a=y.move(p,this.areaBottomY)+y.line(p,m);if(n=y.move(0,this.areaBottomY)+y.line(0,this.areaBottomY),i=y.move(0,this.areaBottomY)+y.line(0,this.areaBottomY),b.globals.previousPaths.length>0){var N=this.lineHelpers.checkPreviousPaths({pathFromLine:n,pathFromArea:i,realIndex:d});n=N.pathFromLine,i=N.pathFromArea}return{prevX:p,prevY:m,linePath:r,areaPath:a,pathFromLine:n,pathFromArea:i}}},{key:"_handlePaths",value:function(e){var r=e.type,a=e.realIndex,n=e.i,i=e.paths,l=this.w,o=new ge(this.ctx),c=new Jn(this.ctx);this.prevSeriesY.push(i.yArrj),l.globals.seriesXvalues[a]=i.xArrj,l.globals.seriesYvalues[a]=i.yArrj;var d=l.config.forecastDataPoints;if(d.count>0&&r!=="rangeArea"){var h=l.globals.seriesXvalues[a][l.globals.seriesXvalues[a].length-d.count-1],p=o.drawRect(h,0,l.globals.gridWidth,l.globals.gridHeight,0);l.globals.dom.elForecastMask.appendChild(p.node);var m=o.drawRect(0,0,h,l.globals.gridHeight,0);l.globals.dom.elNonForecastMask.appendChild(m.node)}this.pointsChart||l.globals.delayedElements.push({el:this.elPointsMain.node,index:a});var x={i:n,realIndex:a,animationDelay:n,initialSpeed:l.config.chart.animations.speed,dataChangeSpeed:l.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(r)};if(r==="area")for(var b=c.fillPath({seriesNumber:a}),y=0;y<i.areaPaths.length;y++){var v=o.renderPaths(ve(ve({},x),{},{pathFrom:i.pathFromArea,pathTo:i.areaPaths[y],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:b}));this.elSeries.add(v)}if(l.config.stroke.show&&!this.pointsChart){var N=null;if(r==="line")N=c.fillPath({seriesNumber:a,i:n});else if(l.config.stroke.fill.type==="solid")N=l.globals.stroke.colors[a];else{var C=l.config.fill;l.config.fill=l.config.stroke.fill,N=c.fillPath({seriesNumber:a,i:n}),l.config.fill=C}for(var S=0;S<i.linePaths.length;S++){var k=N;r==="rangeArea"&&(k=c.fillPath({seriesNumber:a}));var A=ve(ve({},x),{},{pathFrom:i.pathFromLine,pathTo:i.linePaths[S],stroke:N,strokeWidth:this.strokeWidth,strokeLineCap:l.config.stroke.lineCap,fill:r==="rangeArea"?k:"none"}),T=o.renderPaths(A);if(this.elSeries.add(T),T.attr("fill-rule","evenodd"),d.count>0&&r!=="rangeArea"){var M=o.renderPaths(A);M.node.setAttribute("stroke-dasharray",d.dashArray),d.strokeWidth&&M.node.setAttribute("stroke-width",d.strokeWidth),this.elSeries.add(M),M.attr("clip-path","url(#forecastMask".concat(l.globals.cuid,")")),T.attr("clip-path","url(#nonForecastMask".concat(l.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var r,a,n=this,i=e.type,l=e.series,o=e.iterations,c=e.realIndex,d=e.translationsIndex,h=e.i,p=e.x,m=e.y,x=e.pX,b=e.pY,y=e.pathsFrom,v=e.linePaths,N=e.areaPaths,C=e.seriesIndex,S=e.lineYPosition,k=e.xArrj,A=e.yArrj,T=e.y2Arrj,M=e.isRangeStart,O=e.seriesRangeEnd,_=this.w,R=new ge(this.ctx),L=this.yRatio,z=y.prevY,F=y.linePath,Y=y.areaPath,X=y.pathFromLine,H=y.pathFromArea,W=J.isNumber(_.globals.minYArr[c])?_.globals.minYArr[c]:_.globals.minY;o||(o=_.globals.dataPoints>1?_.globals.dataPoints-1:_.globals.dataPoints);var V=function(ue,je){return je-ue/L[d]+2*(n.isReversed?ue/L[d]:0)},Z=m,B=_.config.chart.stacked&&!_.globals.comboCharts||_.config.chart.stacked&&_.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((r=this.w.config.series[c])===null||r===void 0?void 0:r.type)==="bar"||((a=this.w.config.series[c])===null||a===void 0?void 0:a.type)==="column"),G=_.config.stroke.curve;Array.isArray(G)&&(G=Array.isArray(C)?G[C[h]]:G[h]);for(var te,K=0,U=0;U<o&&l[h].length!==0;U++){var re=l[h][U+1]===void 0||l[h][U+1]===null;if(_.globals.isXNumeric){var ne=_.globals.seriesX[c][U+1];_.globals.seriesX[c][U+1]===void 0&&(ne=_.globals.seriesX[c][o-1]),p=(ne-_.globals.minX)/this.xRatio}else p+=this.xDivision;B?h>0&&_.globals.collapsedSeries.length<_.config.series.length-1?S=this.prevSeriesY[function(ue){for(var je=ue;je>0;je--){if(!(_.globals.collapsedSeriesIndices.indexOf(C?.[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(l[h][U+1],S),i==="rangeArea"&&(Z=V(O[h][U+1],S))),k.push(l[h][U+1]===null?null:p),!re||_.config.stroke.curve!=="smooth"&&_.config.stroke.curve!=="monotoneCubic"?(A.push(m),T.push(Z)):(A.push(null),T.push(null));var we=this.lineHelpers.calculatePoints({series:l,x:p,y:m,realIndex:c,i:h,j:U,prevY:z}),ye=this._createPaths({type:i,series:l,i:h,realIndex:c,j:U,x:p,y:m,y2:Z,xArrj:k,yArrj:A,y2Arrj:T,pX:x,pY:b,pathState:K,segmentStartX:te,linePath:F,areaPath:Y,linePaths:v,areaPaths:N,curve:G,isRangeStart:M});N=ye.areaPaths,v=ye.linePaths,x=ye.pX,b=ye.pY,K=ye.pathState,te=ye.segmentStartX,Y=ye.areaPath,F=ye.linePath,!this.appendPathFrom||_.globals.hasNullValues||G==="monotoneCubic"&&i==="rangeArea"||(X+=R.line(p,this.areaBottomY),H+=R.line(p,this.areaBottomY)),this.handleNullDataPoints(l,we,h,U,c),this._handleMarkersAndLabels({type:i,pointsPos:we,i:h,j:U,realIndex:c,isRangeStart:M})}return{yArrj:A,xArrj:k,pathFromArea:H,areaPaths:N,pathFromLine:X,linePaths:v,linePath:F,areaPath:Y}}},{key:"_handleMarkersAndLabels",value:function(e){var r=e.type,a=e.pointsPos,n=e.isRangeStart,i=e.i,l=e.j,o=e.realIndex,c=this.w,d=new wd(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,l,{realIndex:o,pointsPos:a,zRatio:this.zRatio,elParent:this.elPointsMain});else{c.globals.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers({pointsPos:a,seriesIndex:o,j:l+1});h!==null&&this.elPointsMain.add(h)}var p=d.drawDataLabel({type:r,isRangeStart:n,pos:a,i:o,j:l+1});p!==null&&this.elDataLabelsWrap.add(p)}},{key:"_createPaths",value:function(e){var r=e.type,a=e.series,n=e.i;e.realIndex;var i,l=e.j,o=e.x,c=e.y,d=e.xArrj,h=e.yArrj,p=e.y2,m=e.y2Arrj,x=e.pX,b=e.pY,y=e.pathState,v=e.segmentStartX,N=e.linePath,C=e.areaPath,S=e.linePaths,k=e.areaPaths,A=e.curve,T=e.isRangeStart,M=new ge(this.ctx),O=this.areaBottomY,_=r==="rangeArea",R=r==="rangeArea"&&T;switch(A){case"monotoneCubic":var L=T?h:m;switch(y){case 0:if(L[l+1]===null)break;y=1;case 1:if(!(_?d.length===a[n].length:l===a[n].length-2))break;case 2:var z=T?d:d.slice().reverse(),F=T?L:L.slice().reverse(),Y=(i=F,z.map(function(ne,we){return[ne,i[we]]}).filter(function(ne){return ne[1]!==null})),X=Y.length>1?TK(Y):Y,H=[];_&&(R?k=Y:H=k.reverse());var W=0,V=0;if(function(ne,we){for(var ye=function(pe){var Ue=[],_e=0;return pe.forEach(function(xt){xt!==null?_e++:_e>0&&(Ue.push(_e),_e=0)}),_e>0&&Ue.push(_e),Ue}(ne),ue=[],je=0,Te=0;je<ye.length;Te+=ye[je++])ue[je]=MK(we,Te,Te+ye[je]);return ue}(F,X).forEach(function(ne){W++;var we=function(je){for(var Te="",pe=0;pe<je.length;pe++){var Ue=je[pe],_e=Ue.length;_e>4?(Te+="C".concat(Ue[0],", ").concat(Ue[1]),Te+=", ".concat(Ue[2],", ").concat(Ue[3]),Te+=", ".concat(Ue[4],", ").concat(Ue[5])):_e>2&&(Te+="S".concat(Ue[0],", ").concat(Ue[1]),Te+=", ".concat(Ue[2],", ").concat(Ue[3]))}return Te}(ne),ye=V,ue=(V+=ne.length)-1;R?N=M.move(Y[ye][0],Y[ye][1])+we:_?N=M.move(H[ye][0],H[ye][1])+M.line(Y[ye][0],Y[ye][1])+we+M.line(H[ue][0],H[ue][1]):(N=M.move(Y[ye][0],Y[ye][1])+we,C=N+M.line(Y[ue][0],O)+M.line(Y[ye][0],O)+"z",k.push(C)),S.push(N)}),_&&W>1&&!R){var Z=S.slice(W).reverse();S.splice(W),Z.forEach(function(ne){return S.push(ne)})}y=0}break;case"smooth":var B=.35*(o-x);if(a[n][l]===null)y=0;else switch(y){case 0:if(v=x,N=R?M.move(x,m[l])+M.line(x,b):M.move(x,b),C=M.move(x,b),a[n][l+1]===null||a[n][l+1]===void 0){S.push(N),k.push(C);break}if(y=1,l<a[n].length-2){var G=M.curve(x+B,b,o-B,c,o,c);N+=G,C+=G;break}case 1:if(a[n][l+1]===null)N+=R?M.line(x,p):M.move(x,b),C+=M.line(x,O)+M.line(v,O)+"z",S.push(N),k.push(C),y=-1;else{var te=M.curve(x+B,b,o-B,c,o,c);N+=te,C+=te,l>=a[n].length-2&&(R&&(N+=M.curve(o,c,o,c,o,p)+M.move(o,p)),C+=M.curve(o,c,o,c,o,O)+M.line(v,O)+"z",S.push(N),k.push(C),y=-1)}}x=o,b=c;break;default:var K=function(ne,we,ye){var ue=[];switch(ne){case"stepline":ue=M.line(we,null,"H")+M.line(null,ye,"V");break;case"linestep":ue=M.line(null,ye,"V")+M.line(we,null,"H");break;case"straight":ue=M.line(we,ye)}return ue};if(a[n][l]===null)y=0;else switch(y){case 0:if(v=x,N=R?M.move(x,m[l])+M.line(x,b):M.move(x,b),C=M.move(x,b),a[n][l+1]===null||a[n][l+1]===void 0){S.push(N),k.push(C);break}if(y=1,l<a[n].length-2){var U=K(A,o,c);N+=U,C+=U;break}case 1:if(a[n][l+1]===null)N+=R?M.line(x,p):M.move(x,b),C+=M.line(x,O)+M.line(v,O)+"z",S.push(N),k.push(C),y=-1;else{var re=K(A,o,c);N+=re,C+=re,l>=a[n].length-2&&(R&&(N+=M.line(o,p)),C+=M.line(o,O)+M.line(v,O)+"z",S.push(N),k.push(C),y=-1)}}x=o,b=c}return{linePaths:S,areaPaths:k,pX:x,pY:b,pathState:y,segmentStartX:v,linePath:N,areaPath:C}}},{key:"handleNullDataPoints",value:function(e,r,a,n,i){var l=this.w;if(e[a][n]===null&&l.config.markers.showNullDataPoints||e[a].length===1){var o=this.strokeWidth-l.config.markers.strokeWidth/2;o>0||(o=0);var c=this.markers.plotChartMarkers({pointsPos:r,seriesIndex:i,j:n+1,pSize:o,alwaysDrawMarker:!0});c!==null&&this.elPointsMain.add(c)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(o,c,d,h){this.xoffset=o,this.yoffset=c,this.height=h,this.width=d,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(p){var m,x=[],b=this.xoffset,y=this.yoffset,v=i(p)/this.height,N=i(p)/this.width;if(this.width>=this.height)for(m=0;m<p.length;m++)x.push([b,y,b+v,y+p[m]/v]),y+=p[m]/v;else for(m=0;m<p.length;m++)x.push([b,y,b+p[m]/N,y+N]),b+=p[m]/N;return x},this.cutArea=function(p){var m;if(this.width>=this.height){var x=p/this.height,b=this.width-x;m=new t(this.xoffset+x,this.yoffset,b,this.height)}else{var y=p/this.width,v=this.height-y;m=new t(this.xoffset,this.yoffset+y,this.width,v)}return m}}function e(o,c,d,h,p){h=h===void 0?0:h,p=p===void 0?0:p;var m=r(function(x,b){var y,v=[],N=b/i(x);for(y=0;y<x.length;y++)v[y]=x[y]*N;return v}(o,c*d),[],new t(h,p,c,d),[]);return function(x){var b,y,v=[];for(b=0;b<x.length;b++)for(y=0;y<x[b].length;y++)v.push(x[b][y]);return v}(m)}function r(o,c,d,h){var p,m,x;if(o.length!==0)return p=d.shortestEdge(),function(b,y,v){var N;if(b.length===0)return!0;(N=b.slice()).push(y);var C=a(b,v),S=a(N,v);return C>=S}(c,m=o[0],p)?(c.push(m),r(o.slice(1),c,d,h)):(x=d.cutArea(i(c),h),h.push(d.getCoordinates(c)),r(o,[],x,h)),h;h.push(d.getCoordinates(c))}function a(o,c){var d=Math.min.apply(Math,o),h=Math.max.apply(Math,o),p=i(o);return Math.max(Math.pow(c,2)*h/Math.pow(p,2),Math.pow(p,2)/(Math.pow(c,2)*d))}function n(o){return o&&o.constructor===Array}function i(o){var c,d=0;for(c=0;c<o.length;c++)d+=o[c];return d}function l(o){var c,d=0;if(n(o[0]))for(c=0;c<o.length;c++)d+=l(o[c]);else d=i(o);return d}return function o(c,d,h,p,m){p=p===void 0?0:p,m=m===void 0?0:m;var x,b,y=[],v=[];if(n(c[0])){for(b=0;b<c.length;b++)y[b]=l(c[b]);for(x=e(y,d,h,p,m),b=0;b<c.length;b++)v.push(o(c[b],x[b][2]-x[b][0],x[b][3]-x[b][1],x[b][0],x[b][1]))}else v=e(c,d,h,p,m);return v}}();var EK=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 g_(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return Ce(t,[{key:"draw",value:function(e){var r=this,a=this.w,n=new ge(this.ctx),i=new Jn(this.ctx),l=n.group({class:"apexcharts-treemap"});if(a.globals.noData)return l;var o=[];return e.forEach(function(c){var d=c.map(function(h){return Math.abs(h)});o.push(d)}),this.negRange=this.helpers.checkColorRange(),a.config.series.forEach(function(c,d){c.data.forEach(function(h){Array.isArray(r.labels[d])||(r.labels[d]=[]),r.labels[d].push(h.x)})}),window.TreemapSquared.generate(o,a.globals.gridWidth,a.globals.gridHeight).forEach(function(c,d){var h=n.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:J.escapeString(a.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});if(a.config.chart.dropShadow.enabled){var p=a.config.chart.dropShadow;new Kr(r.ctx).dropShadow(l,p,d)}var m=n.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],B=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,B);var G=r.helpers.getShadeColor(a.config.chart.type,d,H,r.negRange),te=G.color,K=i.fillPath({color:te,seriesNumber:d,dataPointIndex:H}),U=n.drawRect(W,V,Z-W,B-V,a.config.plotOptions.treemap.borderRadius,"#fff",1,r.strokeWidth,a.config.plotOptions.treemap.useFillColorAsStroke?te:a.globals.stroke.colors[d]);U.attr({cx:W,cy:V,index:d,i:d,j:H,width:Z-W,height:B-V,fill:K}),U.node.classList.add("apexcharts-treemap-rect"),r.helpers.addListeners(U);var re={x:W+(Z-W)/2,y:V+(B-V)/2,width:0,height:0},ne={x:W,y:V,width:Z-W,height:B-V};if(a.config.chart.animations.enabled&&!a.globals.dataChanged){var we=1;a.globals.resized||(we=a.config.chart.animations.speed),r.animateTreemap(U,re,ne,we)}if(a.globals.dataChanged){var ye=1;r.dynamicAnim.enabled&&a.globals.shouldAnimate&&(ye=r.dynamicAnim.speed,a.globals.previousPaths[d]&&a.globals.previousPaths[d][H]&&a.globals.previousPaths[d][H].rect&&(re=a.globals.previousPaths[d][H].rect),r.animateTreemap(U,re,ne,ye))}var ue=r.getFontSize(X),je=a.config.dataLabels.formatter(r.labels[d][H],{value:a.globals.series[d][H],seriesIndex:d,dataPointIndex:H,w:a});a.config.plotOptions.treemap.dataLabels.format==="truncate"&&(ue=parseInt(a.config.dataLabels.style.fontSize,10),je=r.truncateLabels(je,ue,W,V,Z,B));var Te=null;a.globals.series[d][H]&&(Te=r.helpers.calculateDataLabels({text:je,x:(W+Z)/2,y:(V+B)/2+r.strokeWidth/2+ue/3,i:d,j:H,colorProps:G,fontSize:ue,series:e})),a.config.dataLabels.enabled&&Te&&r.rotateToFitLabel(Te,ue,je,W,V,Z,B),h.add(U),Te!==null&&h.add(Te)});var b=a.config.plotOptions.treemap.seriesTitle;if(a.config.series.length>1&&b&&b.show){var y=a.config.series[d].name||"";if(y&&x.xMin<1/0&&x.yMin<1/0){var v=b.offsetX,N=b.offsetY,C=b.borderColor,S=b.borderWidth,k=b.borderRadius,A=b.style,T=A.color||a.config.chart.foreColor,M={left:A.padding.left,right:A.padding.right,top:A.padding.top,bottom:A.padding.bottom},O=n.getTextRects(y,A.fontSize,A.fontFamily),_=O.width+M.left+M.right,R=O.height+M.top+M.bottom,L=x.xMin+(v||0),z=x.yMin+(N||0),F=n.drawRect(L,z,_,R,k,A.background,1,S,C),Y=n.drawText({x:L+M.left,y:z+M.top+.75*O.height,text:y,fontSize:A.fontSize,fontFamily:A.fontFamily,fontWeight:A.fontWeight,foreColor:T,cssClass:A.cssClass||""});h.add(F),h.add(Y)}}h.add(m),l.add(h)}),l}},{key:"getFontSize",value:function(e){var r=this.w,a=function n(i){var l,o=0;if(Array.isArray(i[0]))for(l=0;l<i.length;l++)o+=n(i[l]);else for(l=0;l<i.length;l++)o+=i[l].length;return o}(this.labels)/function n(i){var l,o=0;if(Array.isArray(i[0]))for(l=0;l<i.length;l++)o+=n(i[l]);else for(l=0;l<i.length;l++)o+=1;return o}(this.labels);return function(n,i){var l=n*i,o=Math.pow(l,.5);return Math.min(o/a,parseInt(r.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}},{key:"rotateToFitLabel",value:function(e,r,a,n,i,l,o){var c=new ge(this.ctx),d=c.getTextRects(a,r);if(d.width+this.w.config.stroke.width+5>l-n&&d.width<=o-i){var h=c.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(d.height/3,")"))}}},{key:"truncateLabels",value:function(e,r,a,n,i,l){var o=new ge(this.ctx),c=o.getTextRects(e,r).width+this.w.config.stroke.width+5>i-a&&l-n>i-a?l-n:i-a,d=o.getTextBasedOnMaxWidth({text:e,maxWidth:c,fontSize:r});return e.length!==d.length&&c/r<5?"":d}},{key:"animateTreemap",value:function(e,r,a,n){var i=new $d(this.ctx);i.animateRect(e,r,a,n,function(){i.animationCompleted(e)})}}]),t}(),y_=86400,PK=10/y_,OK=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 Ce(t,[{key:"calculateTimeScaleTicks",value:function(e,r){var a=this,n=this.w;if(n.globals.allSeriesCollapsed)return n.globals.labels=[],n.globals.timescaleLabels=[],[];var i=new qr(this.ctx),l=(r-e)/864e5;this.determineInterval(l),n.globals.disableZoomIn=!1,n.globals.disableZoomOut=!1,l<PK?n.globals.disableZoomIn=!0:l>5e4&&(n.globals.disableZoomOut=!0);var o=i.getTimeUnitsfromTimestamp(e,r,this.utc),c=n.globals.gridWidth/l,d=c/24,h=d/60,p=h/60,m=Math.floor(24*l),x=Math.floor(1440*l),b=Math.floor(l*y_),y=Math.floor(l),v=Math.floor(l/30),N=Math.floor(l/365),C={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},S={firstVal:C,currentMillisecond:C.minMillisecond,currentSecond:C.minSecond,currentMinute:C.minMinute,currentHour:C.minHour,currentMonthDate:C.minDate,currentDate:C.minDate,currentMonth:C.minMonth,currentYear:C.minYear,daysWidthOnXAxis:c,hoursWidthOnXAxis:d,minutesWidthOnXAxis:h,secondsWidthOnXAxis:p,numberOfSeconds:b,numberOfMinutes:x,numberOfHours:m,numberOfDays:y,numberOfMonths:v,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 k=this.timeScaleArray.map(function(A){var T={position:A.position,unit:A.unit,year:A.year,day:A.day?A.day:1,hour:A.hour?A.hour:0,month:A.month+1};return A.unit==="month"?ve(ve({},T),{},{day:1,value:A.value+1}):A.unit==="day"||A.unit==="hour"?ve(ve({},T),{},{value:A.value}):A.unit==="minute"?ve(ve({},T),{},{value:A.value,minute:A.value}):A.unit==="second"?ve(ve({},T),{},{value:A.value,minute:A.minute,second:A.second}):A});return k.filter(function(A){var T=1,M=Math.ceil(n.globals.gridWidth/120),O=A.value;n.config.xaxis.tickAmount!==void 0&&(M=n.config.xaxis.tickAmount),k.length>M&&(T=Math.floor(k.length/M));var _=!1,R=!1;switch(a.tickInterval){case"years":A.unit==="year"&&(_=!0);break;case"half_year":T=7,A.unit==="year"&&(_=!0);break;case"months":T=1,A.unit==="year"&&(_=!0);break;case"months_fortnight":T=15,A.unit!=="year"&&A.unit!=="month"||(_=!0),O===30&&(R=!0);break;case"months_days":T=10,A.unit==="month"&&(_=!0),O===30&&(R=!0);break;case"week_days":T=8,A.unit==="month"&&(_=!0);break;case"days":T=1,A.unit==="month"&&(_=!0);break;case"hours":A.unit==="day"&&(_=!0);break;case"minutes_fives":case"seconds_fives":O%5!=0&&(R=!0);break;case"seconds_tens":O%10!=0&&(R=!0)}if(a.tickInterval==="hours"||a.tickInterval==="minutes_fives"||a.tickInterval==="seconds_tens"||a.tickInterval==="seconds_fives"){if(!R)return!0}else if((O%T==0||_)&&!R)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,r){var a=this.w,n=this.formatDates(e),i=this.removeOverlappingTS(n);a.globals.timescaleLabels=i.slice(),new jx(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var r=24*e,a=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 a>15:this.tickInterval="minutes_fives";break;case a>5:this.tickInterval="minutes";break;case a>1:this.tickInterval="seconds_tens";break;case 60*a>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var r=e.firstVal,a=e.currentMonth,n=e.currentYear,i=e.daysWidthOnXAxis,l=e.numberOfYears,o=r.minYear,c=0,d=new qr(this.ctx),h="year";if(r.minDate>1||r.minMonth>0){var p=d.determineRemainingDaysOfYear(r.minYear,r.minMonth,r.minDate);c=(d.determineDaysOfYear(r.minYear)-p+1)*i,o=r.minYear+1,this.timeScaleArray.push({position:c,value:o,unit:h,year:o,month:J.monthMod(a+1)})}else r.minDate===1&&r.minMonth===0&&this.timeScaleArray.push({position:c,value:o,unit:h,year:n,month:J.monthMod(a+1)});for(var m=o,x=c,b=0;b<l;b++)m++,x=d.determineDaysOfYear(m-1)*i+x,this.timeScaleArray.push({position:x,value:m,unit:h,year:m,month:1})}},{key:"generateMonthScale",value:function(e){var r=e.firstVal,a=e.currentMonthDate,n=e.currentMonth,i=e.currentYear,l=e.daysWidthOnXAxis,o=e.numberOfMonths,c=n,d=0,h=new qr(this.ctx),p="month",m=0;if(r.minDate>1){d=(h.determineDaysOfMonths(n+1,r.minYear)-a+1)*l,c=J.monthMod(n+1);var x=i+m,b=J.monthMod(c),y=c;c===0&&(p="year",y=x,b=1,x+=m+=1),this.timeScaleArray.push({position:d,value:y,unit:p,year:x,month:b})}else this.timeScaleArray.push({position:d,value:c,unit:p,year:i,month:J.monthMod(n)});for(var v=c+1,N=d,C=0,S=1;C<o;C++,S++){(v=J.monthMod(v))===0?(p="year",m+=1):p="month";var k=this._getYear(i,v,m);N=h.determineDaysOfMonths(v,k)*l+N;var A=v===0?k:v;this.timeScaleArray.push({position:N,value:A,unit:p,year:k,month:v===0?1:v}),v++}}},{key:"generateDayScale",value:function(e){var r=e.firstVal,a=e.currentMonth,n=e.currentYear,i=e.hoursWidthOnXAxis,l=e.numberOfDays,o=new qr(this.ctx),c="day",d=r.minDate+1,h=d,p=function(S,k,A){return S>o.determineDaysOfMonths(k+1,A)&&(h=1,c="month",x=k+=1),k},m=(24-r.minHour)*i,x=d,b=p(h,a,n);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,d=r.minDate,x=d,b=p(h=d,a,n),x!==1&&(c="day")),this.timeScaleArray.push({position:m,value:x,unit:c,year:this._getYear(n,b,0),month:J.monthMod(b),day:h});for(var y=m,v=0;v<l;v++){c="day",b=p(h+=1,b,this._getYear(n,b,0));var N=this._getYear(n,b,0);y=24*i+y;var C=h===1?J.monthMod(b):h;this.timeScaleArray.push({position:y,value:C,unit:c,year:N,month:J.monthMod(b),day:C})}}},{key:"generateHourScale",value:function(e){var r=e.firstVal,a=e.currentDate,n=e.currentMonth,i=e.currentYear,l=e.minutesWidthOnXAxis,o=e.numberOfHours,c=new qr(this.ctx),d="hour",h=function(T,M){return T>c.determineDaysOfMonths(M+1,i)&&(v=1,M+=1),{month:M,date:v}},p=function(T,M){return T>c.determineDaysOfMonths(M+1,i)?M+=1:M},m=60-(r.minMinute+r.minSecond/60),x=m*l,b=r.minHour+1,y=b;m===60&&(x=0,y=b=r.minHour);var v=a;y>=24&&(y=0,d="day",b=v+=1);var N=h(v,n).month;N=p(v,N),b>31&&(b=v=1),this.timeScaleArray.push({position:x,value:b,unit:d,day:v,hour:y,year:i,month:J.monthMod(N)}),y++;for(var C=x,S=0;S<o;S++){d="hour",y>=24&&(y=0,d="day",N=h(v+=1,N).month,N=p(v,N));var k=this._getYear(i,N,0);C=60*l+C;var A=y===0?v:y;this.timeScaleArray.push({position:C,value:A,unit:d,hour:y,day:v,year:k,month:J.monthMod(N)}),y++}}},{key:"generateMinuteScale",value:function(e){for(var r=e.currentMillisecond,a=e.currentSecond,n=e.currentMinute,i=e.currentHour,l=e.currentDate,o=e.currentMonth,c=e.currentYear,d=e.minutesWidthOnXAxis,h=e.secondsWidthOnXAxis,p=e.numberOfMinutes,m=n+1,x=l,b=o,y=c,v=i,N=(60-a-r/1e3)*h,C=0;C<p;C++)m>=60&&(m=0,(v+=1)===24&&(v=0)),this.timeScaleArray.push({position:N,value:m,unit:"minute",hour:v,minute:m,day:x,year:this._getYear(y,b,0),month:J.monthMod(b)}),N+=d,m++}},{key:"generateSecondScale",value:function(e){for(var r=e.currentMillisecond,a=e.currentSecond,n=e.currentMinute,i=e.currentHour,l=e.currentDate,o=e.currentMonth,c=e.currentYear,d=e.secondsWidthOnXAxis,h=e.numberOfSeconds,p=a+1,m=n,x=l,b=o,y=c,v=i,N=(1e3-r)/1e3*d,C=0;C<h;C++)p>=60&&(p=0,++m>=60&&(m=0,++v===24&&(v=0))),this.timeScaleArray.push({position:N,value:p,unit:"second",hour:v,minute:m,second:p,day:x,year:this._getYear(y,b,0),month:J.monthMod(b)}),N+=d,p++}},{key:"createRawDateString",value:function(e,r){var a=e.year;return e.month===0&&(e.month=1),a+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?a+=e.unit==="day"?"-"+("0"+r).slice(-2):"-01":a+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?a+=e.unit==="hour"?"T"+("0"+r).slice(-2):"T00":a+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?a+=":"+("0"+r).slice(-2):a+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?a+=":"+("0"+r).slice(-2):a+=":00",this.utc&&(a+=".000Z"),a}},{key:"formatDates",value:function(e){var r=this,a=this.w;return e.map(function(n){var i=n.value.toString(),l=new qr(r.ctx),o=r.createRawDateString(n,i),c=l.getDate(l.parseDate(o));if(r.utc||(c=l.getDate(l.parseDateWithTimezone(o))),a.config.xaxis.labels.format===void 0){var d="dd MMM",h=a.config.xaxis.labels.datetimeFormatter;n.unit==="year"&&(d=h.year),n.unit==="month"&&(d=h.month),n.unit==="day"&&(d=h.day),n.unit==="hour"&&(d=h.hour),n.unit==="minute"&&(d=h.minute),n.unit==="second"&&(d=h.second),i=l.formatDate(c,d)}else i=l.formatDate(c,a.config.xaxis.labels.format);return{dateString:o,position:n.position,value:i,unit:n.unit,year:n.year,month:n.month}})}},{key:"removeOverlappingTS",value:function(e){var r,a=this,n=new ge(this.ctx),i=!1;e.length>0&&e[0].value&&e.every(function(c){return c.value.length===e[0].value.length})&&(i=!0,r=n.getTextRects(e[0].value).width);var l=0,o=e.map(function(c,d){if(d>0&&a.w.config.xaxis.labels.hideOverlappingLabels){var h=i?r:n.getTextRects(e[l].value).width,p=e[l].position;return c.position>p+h+10?(l=d,c):null}return c});return o=o.filter(function(c){return c!==null})}},{key:"_getYear",value:function(e,r,a){return e+Math.floor(r/12)+a}}]),t}(),RK=function(){function t(e,r){Se(this,t),this.ctx=r,this.w=r.w,this.el=e}return Ce(t,[{key:"setupElements",value:function(){var e=this.w,r=e.globals,a=e.config,n=a.chart.type;r.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(n),r.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(n),r.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(n)&&a.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(a.chart.offsetX,", ").concat(a.chart.offsetY,")")}),r.dom.Paper.node.style.background=a.theme.mode!=="dark"||a.chart.background?a.theme.mode!=="light"||a.chart.background?a.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 a=this.w,n=this.ctx,i=a.config,l=a.globals,o={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=i.chart.type||"line",d=null,h=0;l.series.forEach(function(T,M){var O,_,R=((O=e[M])===null||O===void 0?void 0:O.type)==="column"?"bar":((_=e[M])===null||_===void 0?void 0:_.type)||(c==="column"?"bar":c);o[R]?(R==="rangeArea"?(o[R].series.push(l.seriesRangeStart[M]),o[R].seriesRangeEnd.push(l.seriesRangeEnd[M])):o[R].series.push(T),o[R].i.push(M),R==="bar"&&(a.globals.columnSeries=o.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(R)?d=R:console.warn("You have specified an unrecognized series type (".concat(R,").")),c!==R&&R!=="scatter"&&h++}),h>0&&(d&&console.warn("Chart or series type ".concat(d," cannot appear with other chart or series types.")),o.bar.series.length>0&&i.plotOptions.bar.horizontal&&(h-=o.bar.series.length,o.bar={series:[],i:[]},a.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),l.comboCharts||(l.comboCharts=h>0);var p=new T1(n,r),m=new k1(n,r);n.pie=new b_(n);var x=new CK(n);n.rangeBar=new AK(n,r);var b=new SK(n),y=[];if(l.comboCharts){var v,N,C=new or(n);if(o.area.series.length>0&&(v=y).push.apply(v,Ar(C.drawSeriesByGroup(o.area,l.areaGroups,"area",p))),o.bar.series.length>0)if(i.chart.stacked){var S=new LD(n,r);y.push(S.draw(o.bar.series,o.bar.i))}else n.bar=new jd(n,r),y.push(n.bar.draw(o.bar.series,o.bar.i));if(o.rangeArea.series.length>0&&y.push(p.draw(o.rangeArea.series,"rangeArea",o.rangeArea.i,o.rangeArea.seriesRangeEnd)),o.line.series.length>0&&(N=y).push.apply(N,Ar(C.drawSeriesByGroup(o.line,l.lineGroups,"line",p))),o.candlestick.series.length>0&&y.push(m.draw(o.candlestick.series,"candlestick",o.candlestick.i)),o.boxPlot.series.length>0&&y.push(m.draw(o.boxPlot.series,"boxPlot",o.boxPlot.i)),o.rangeBar.series.length>0&&y.push(n.rangeBar.draw(o.rangeBar.series,o.rangeBar.i)),o.scatter.series.length>0){var k=new T1(n,r,!0);y.push(k.draw(o.scatter.series,"scatter",o.scatter.i))}if(o.bubble.series.length>0){var A=new T1(n,r,!0);y.push(A.draw(o.bubble.series,"bubble",o.bubble.i))}}else switch(i.chart.type){case"line":y=p.draw(l.series,"line");break;case"area":y=p.draw(l.series,"area");break;case"bar":i.chart.stacked?y=new LD(n,r).draw(l.series):(n.bar=new jd(n,r),y=n.bar.draw(l.series));break;case"candlestick":y=new k1(n,r).draw(l.series,"candlestick");break;case"boxPlot":y=new k1(n,r).draw(l.series,i.chart.type);break;case"rangeBar":y=n.rangeBar.draw(l.series);break;case"rangeArea":y=p.draw(l.seriesRangeStart,"rangeArea",void 0,l.seriesRangeEnd);break;case"heatmap":y=new NK(n,r).draw(l.series);break;case"treemap":y=new EK(n,r).draw(l.series);break;case"pie":case"donut":case"polarArea":y=n.pie.draw(l.series);break;case"radialBar":y=x.draw(l.series);break;case"radar":y=b.draw(l.series);break;default:y=p.draw(l.series)}return y}},{key:"setSVGDimensions",value:function(){var e=this.w,r=e.globals,a=e.config;a.chart.width=a.chart.width||"100%",a.chart.height=a.chart.height||"auto",r.svgWidth=a.chart.width,r.svgHeight=a.chart.height;var n=J.getDimensions(this.el),i=a.chart.width.toString().split(/[0-9]+/g).pop();i==="%"?J.isNumber(n[0])&&(n[0].width===0&&(n=J.getDimensions(this.el.parentNode)),r.svgWidth=n[0]*parseInt(a.chart.width,10)/100):i!=="px"&&i!==""||(r.svgWidth=parseInt(a.chart.width,10));var l=String(a.chart.height).toString().split(/[0-9]+/g).pop();if(r.svgHeight!=="auto"&&r.svgHeight!=="")if(l==="%"){var o=J.getDimensions(this.el.parentNode);r.svgHeight=o[1]*parseInt(a.chart.height,10)/100}else r.svgHeight=parseInt(a.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}),l!=="%"){var c=a.chart.sparkline.enabled?0:r.axisCharts?a.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,a=e.translateX;ge.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(a,", ").concat(r,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,r=e.globals,a=0,n=e.config.chart.sparkline.enabled?1:15;n+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(a=new h_(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var i=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),l=2.05*e.globals.radialSize;if(i&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var o=J.getBoundingClientRect(i);l=o.bottom;var c=o.bottom-o.top;l=Math.max(2.05*e.globals.radialSize,c)}var d=Math.ceil(l+r.translateY+a+n);r.dom.elLegendForeign&&r.dom.elLegendForeign.setAttribute("height",d),e.config.chart.height&&String(e.config.chart.height).includes("%")||(r.dom.elWrap.style.height="".concat(d,"px"),ge.setAttrs(r.dom.Paper.node,{height:d}),r.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(d,"px"))}},{key:"coreCalculations",value:function(){new xj(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,r=function(){return e.w.config.series.map(function(){return[]})},a=new o_,n=this.w.globals,i={dataWasParsed:n.dataWasParsed,originalSeries:n.originalSeries};a.initGlobalVars(n),n.seriesXvalues=r(),n.seriesYvalues=r(),i.dataWasParsed&&(n.dataWasParsed=i.dataWasParsed,n.originalSeries=i.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 bj(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new bj(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new OK(this.ctx);var a=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?a=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(a=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(a)}r=new or(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,a=this.w;if(a.config.chart.brush.enabled&&typeof a.config.chart.events.selection!="function"){var n=Array.isArray(a.config.chart.brush.targets)?a.config.chart.brush.targets:[a.config.chart.brush.target];n.forEach(function(i){var l=r.constructor.getChartByID(i);l.w.globals.brushSource=e.ctx,typeof l.w.config.chart.events.zoomed!="function"&&(l.w.config.chart.events.zoomed=function(){return e.updateSourceChart(l)}),typeof l.w.config.chart.events.scrolled!="function"&&(l.w.config.chart.events.scrolled=function(){return e.updateSourceChart(l)})}),a.config.chart.events.selection=function(i,l){n.forEach(function(o){r.constructor.getChartByID(o).ctx.updateHelpers._updateOptions({xaxis:{min:l.xaxis.min,max:l.xaxis.max}},!1,!1,!1,!1)})}}}}]),t}(),_K=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(t,[{key:"_updateOptions",value:function(e){var r=this,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],i=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],l=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(o){var c=[r.ctx];i&&(c=r.ctx.getSyncedCharts()),r.ctx.w.globals.isExecCalled&&(c=[r.ctx],r.ctx.w.globals.isExecCalled=!1),c.forEach(function(d,h){var p=d.w;if(p.globals.shouldAnimate=n,a||(p.globals.resized=!0,p.globals.dataChanged=!0,n&&d.series.getPreviousPaths()),e&&fa(e)==="object"&&(d.config=new bf(e),e=or.extendArrayProps(d.config,e,p),d.w.globals.chartID!==r.ctx.w.globals.chartID&&delete e.series,p.config=J.extend(p.config,e),l&&(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 b=0;b<p.globals.ancillaryCollapsedSeriesIndices.length;b++){var y=p.config.series[p.globals.ancillaryCollapsedSeriesIndices[b]];p.globals.ancillaryCollapsedSeries[b].data=p.globals.axisCharts?y.data.slice():y}d.series.emptyCollapsedSeries(p.config.series)}return d.update(e).then(function(){h===c.length-1&&o(d)})})})}},{key:"_updateSeries",value:function(e,r){var a=this,n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(i){var l,o=a.w;return o.globals.shouldAnimate=r,o.globals.dataChanged=!0,r&&a.ctx.series.getPreviousPaths(),o.globals.axisCharts?((l=e.map(function(c,d){return a._extendSeries(c,d)})).length===0&&(l=[{data:[]}]),o.config.series=l):o.config.series=e.slice(),n&&(o.globals.initialConfig.series=J.clone(o.config.series),o.globals.initialSeries=J.clone(o.config.series)),a.ctx.update().then(function(){i(a.ctx)})})}},{key:"_extendSeries",value:function(e,r){var a=this.w,n=a.config.series[r];return ve(ve({},a.config.series[r]),{},{name:e.name?e.name:n?.name,color:e.color?e.color:n?.color,type:e.type?e.type:n?.type,group:e.group?e.group:n?.group,hidden:e.hidden!==void 0?e.hidden:n?.hidden,data:e.data?e.data:n?.data,zIndex:e.zIndex!==void 0?e.zIndex:r})}},{key:"toggleDataPointSelection",value:function(e,r){var a=this.w,n=null,i=".apexcharts-series[data\\:realIndex='".concat(e,"']");return a.globals.axisCharts?n=a.globals.dom.Paper.findOne("".concat(i," path[j='").concat(r,"'], ").concat(i," circle[j='").concat(r,"'], ").concat(i," rect[j='").concat(r,"']")):r===void 0&&(n=a.globals.dom.Paper.findOne("".concat(i," path[j='").concat(e,"']")),a.config.chart.type!=="pie"&&a.config.chart.type!=="polarArea"&&a.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),n?(new ge(this.ctx).pathMouseDown(n,null),n.node?n.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var r=this.w;if(["min","max"].forEach(function(n){e.xaxis[n]!==void 0&&(r.config.xaxis[n]=e.xaxis[n],r.globals.lastXAxis[n]=e.xaxis[n])}),e.xaxis.categories&&e.xaxis.categories.length&&(r.config.xaxis.categories=e.xaxis.categories),r.config.xaxis.convertedCatToNumeric){var a=new xf(e);e=a.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,a){e.yaxis[a].min=0,e.yaxis[a].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,a=this.w,n=a.globals.lastXAxis,i=a.globals.lastYAxis;e&&e.xaxis&&(n=e.xaxis),e&&e.yaxis&&(i=e.yaxis),a.config.xaxis.min=n.min,a.config.xaxis.max=n.max;var l=function(o){i[o]!==void 0&&(a.config.yaxis[o].min=i[o].min,a.config.yaxis[o].max=i[o].max)};a.config.yaxis.map(function(o,c){a.globals.zoomed||i[c]!==void 0?l(c):r.ctx.opts.yaxis[c]!==void 0&&(o.min=r.ctx.opts.yaxis[c].min,o.max=r.ctx.opts.yaxis[c].max)})}}]),t}();(function(){function t(){for(var i=arguments.length>0&&arguments[0]!==p?arguments[0]:[],l=arguments.length>1?arguments[1]:p,o=arguments.length>2?arguments[2]:p,c=arguments.length>3?arguments[3]:p,d=arguments.length>4?arguments[4]:p,h=arguments.length>5?arguments[5]:p,p=arguments.length>6?arguments[6]:p,m=i.slice(l,o||p),x=c.slice(d,h||p),b=0,y={pos:[0,0],start:[0,0]},v={pos:[0,0],start:[0,0]};m[b]=e.call(y,m[b]),x[b]=e.call(v,x[b]),m[b][0]!=x[b][0]||m[b][0]=="M"||m[b][0]=="A"&&(m[b][4]!=x[b][4]||m[b][5]!=x[b][5])?(Array.prototype.splice.apply(m,[b,1].concat(a.call(y,m[b]))),Array.prototype.splice.apply(x,[b,1].concat(a.call(v,x[b])))):(m[b]=r.call(y,m[b]),x[b]=r.call(v,x[b])),!(++b==m.length&&b==x.length);)b==m.length&&m.push(["C",y.pos[0],y.pos[1],y.pos[0],y.pos[1],y.pos[0],y.pos[1]]),b==x.length&&x.push(["C",v.pos[0],v.pos[1],v.pos[0],v.pos[1],v.pos[0],v.pos[1]]);return{start:m,dest:x}}function e(i){switch(i[0]){case"z":case"Z":i[0]="L",i[1]=this.start[0],i[2]=this.start[1];break;case"H":i[0]="L",i[2]=this.pos[1];break;case"V":i[0]="L",i[2]=i[1],i[1]=this.pos[0];break;case"T":i[0]="Q",i[3]=i[1],i[4]=i[2],i[1]=this.reflection[1],i[2]=this.reflection[0];break;case"S":i[0]="C",i[6]=i[4],i[5]=i[3],i[4]=i[2],i[3]=i[1],i[2]=this.reflection[1],i[1]=this.reflection[0]}return i}function r(i){var l=i.length;return this.pos=[i[l-2],i[l-1]],"SCQT".indexOf(i[0])!=-1&&(this.reflection=[2*this.pos[0]-i[l-4],2*this.pos[1]-i[l-3]]),i}function a(i){var l=[i];switch(i[0]){case"M":return this.pos=this.start=[i[1],i[2]],l;case"L":i[5]=i[3]=i[1],i[6]=i[4]=i[2],i[1]=this.pos[0],i[2]=this.pos[1];break;case"Q":i[6]=i[4],i[5]=i[3],i[4]=1*i[4]/3+2*i[2]/3,i[3]=1*i[3]/3+2*i[1]/3,i[2]=1*this.pos[1]/3+2*i[2]/3,i[1]=1*this.pos[0]/3+2*i[1]/3;break;case"A":l=function(o,c){var d,h,p,m,x,b,y,v,N,C,S,k,A,T,M,O,_,R,L,z,F,Y,X,H,W,V,Z=Math.abs(c[1]),B=Math.abs(c[2]),G=c[3]%360,te=c[4],K=c[5],U=c[6],re=c[7],ne=new gt(o),we=new gt(U,re),ye=[];if(Z===0||B===0||ne.x===we.x&&ne.y===we.y)return[["C",ne.x,ne.y,we.x,we.y,we.x,we.y]];for(d=new gt((ne.x-we.x)/2,(ne.y-we.y)/2).transform(new ze().rotate(G)),h=d.x*d.x/(Z*Z)+d.y*d.y/(B*B),h>1&&(Z*=h=Math.sqrt(h),B*=h),p=new ze().rotate(G).scale(1/Z,1/B).rotate(-G),ne=ne.transform(p),we=we.transform(p),m=[we.x-ne.x,we.y-ne.y],b=m[0]*m[0]+m[1]*m[1],x=Math.sqrt(b),m[0]/=x,m[1]/=x,y=b<4?Math.sqrt(1-b/4):0,te===K&&(y*=-1),v=new gt((we.x+ne.x)/2+y*-m[1],(we.y+ne.y)/2+y*m[0]),N=new gt(ne.x-v.x,ne.y-v.y),C=new gt(we.x-v.x,we.y-v.y),S=Math.acos(N.x/Math.sqrt(N.x*N.x+N.y*N.y)),N.y<0&&(S*=-1),k=Math.acos(C.x/Math.sqrt(C.x*C.x+C.y*C.y)),C.y<0&&(k*=-1),K&&S>k&&(k+=2*Math.PI),!K&&S<k&&(k-=2*Math.PI),T=Math.ceil(2*Math.abs(S-k)/Math.PI),O=[],_=S,A=(k-S)/T,M=4*Math.tan(A/4)/3,F=0;F<=T;F++)L=Math.cos(_),R=Math.sin(_),z=new gt(v.x+L,v.y+R),O[F]=[new gt(z.x+M*R,z.y-M*L),z,new gt(z.x-M*R,z.y+M*L)],_+=A;for(O[0][0]=O[0][1].clone(),O[O.length-1][2]=O[O.length-1][1].clone(),p=new ze().rotate(G).scale(Z,B).rotate(-G),F=0,Y=O.length;F<Y;F++)O[F][0]=O[F][0].transform(p),O[F][1]=O[F][1].transform(p),O[F][2]=O[F][2].transform(p);for(F=1,Y=O.length;F<Y;F++)X=(z=O[F-1][2]).x,H=z.y,W=(z=O[F][0]).x,V=z.y,U=(z=O[F][1]).x,re=z.y,ye.push(["C",X,H,W,V,U,re]);return ye}(this.pos,i),i=l[0]}return i[0]="C",this.pos=[i[5],i[6]],this.reflection=[2*i[5]-i[3],2*i[6]-i[4]],l}function n(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1?arguments[1]:void 0;if(l===!1)return!1;for(var o=l,c=i.length;o<c;++o)if(i[o][0]=="M")return o;return!1}Ie(Zn,{morph:function(i,l,o,c,d){for(var h=this.parse(i),p=this.parse(l),m=0,x=0,b=!1,y=!1;m!==!1||x!==!1;){var v;b=n(h,m!==!1&&m+1),y=n(p,x!==!1&&x+1),m===!1&&(m=(v=new Zn(N.start).bbox()).height==0||v.width==0?h.push(h[0])-1:h.push(["M",v.x+v.width/2,v.y+v.height/2])-1),x===!1&&(x=(v=new Zn(N.dest).bbox()).height==0||v.width==0?p.push(p[0])-1:p.push(["M",v.x+v.width/2,v.y+v.height/2])-1);var N=t(h,m,b,p,x,y);h=h.slice(0,m).concat(N.start,b===!1?[]:h.slice(b)),p=p.slice(0,x).concat(N.dest,y===!1?[]:p.slice(y)),m=b!==!1&&m+N.start.length,x=y!==!1&&x+N.dest.length}this._array=h,this.destination=new Zn,this.destination._array=p;var C=this.fromArray(h.map(function(S,k){var A=p[k].map(function(T,M){return M===0?T:c.step(S[M],p[k][M],o,d[k],d)});return A}));return C}})})();const zD=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class LK{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(zD(e));const a=(r?"mouseup":"touchend")+".drag";ci(window,(r?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),ci(window,a,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){const{box:r,lastClick:a}=this,n=this.el.point(zD(e)),i=n.x-a.x,l=n.y-a.y;if(!i&&!l)return r;const o=r.x+i,c=r.y+l;this.box=new ir(o,c,r.w,r.h),this.lastClick=n,this.el.dispatch("dragmove",{event:e,handler:this,box:this.box}).defaultPrevented||this.move(o,c)}move(e,r){this.el.type==="svg"?hl.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}),On(window,"mousemove.drag"),On(window,"touchmove.drag"),On(window,"mouseup.drag"),On(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 yj(t,e,r,a=null){return function(n){n.preventDefault(),n.stopPropagation();var i=n.pageX||n.touches[0].pageX,l=n.pageY||n.touches[0].pageY;e.fire(t,{x:i,y:l,event:n,index:a,points:r})}}function vj([t,e],{a:r,b:a,c:n,d:i,e:l,f:o}){return[t*r+e*n+l,t*a+e*i+o]}Ie(Qr,{draggable(t=!0){return(this.remember("_draggable")||new LK(this)).init(t),this}});let v_=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new hl,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Kf();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 a=this.order[e];this.createHandle.call(this,this.selection,t,e,r,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",yj(a,this.el,this.handlePoints,e))})}createHandleFn(t){t.polyline()}updateHandleFn(t,e,r,a){const n=a.at(r-1),i=a[(r+1)%a.length],l=e,o=[l[0]-n[0],l[1]-n[1]],c=[l[0]-i[0],l[1]-i[1]],d=Math.sqrt(o[0]*o[0]+o[1]*o[1]),h=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p=[o[0]/d,o[1]/d],m=[c[0]/h,c[1]/h],x=[l[0]-10*p[0],l[1]-10*p[1]],b=[l[0]-10*m[0],l[1]-10*m[1]];t.plot([x,l,b])}updateResizeHandles(){this.handlePoints.forEach((t,e,r)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,r,a)})}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",yj("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=>vj(r,e)),this.rotationPoint=vj(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:r,y2:a,cx:n,cy:i}=this.el.bbox()){return[[t,r],[n,r],[e,r],[e,i],[e,a],[n,a],[t,a],[t,i]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const ID=t=>function(e=!0,r={}){typeof e=="object"&&(r=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof v_?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.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 wj(t,e,r,a=null){return function(n){n.preventDefault(),n.stopPropagation();var i=n.pageX||n.touches[0].pageX,l=n.pageY||n.touches[0].pageY;e.fire(t,{x:i,y:l,event:n,index:a,points:r})}}function jj([t,e],{a:r,b:a,c:n,d:i,e:l,f:o}){return[t*r+e*n+l,t*a+e*i+o]}Ie(Qr,{select:ID(v_)}),Ie([wo,jo,vo],{pointSelect:ID(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new hl,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Kf();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",yj("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=>vj(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class w_{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new hl,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const r=Kf();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,a)=>{const n=this.order[r];this.createHandle.call(this,this.selection,e,r,a,n),this.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",wj(n,this.el,this.handlePoints,r))})}createHandleFn(e){e.polyline()}updateHandleFn(e,r,a,n){const i=n.at(a-1),l=n[(a+1)%n.length],o=r,c=[o[0]-i[0],o[1]-i[1]],d=[o[0]-l[0],o[1]-l[1]],h=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p=Math.sqrt(d[0]*d[0]+d[1]*d[1]),m=[c[0]/h,c[1]/h],x=[d[0]/p,d[1]/p],b=[o[0]-10*m[0],o[1]-10*m[1]],y=[o[0]-10*x[0],o[1]-10*x[1]];e.plot([b,o,y])}updateResizeHandles(){this.handlePoints.forEach((e,r,a)=>{const n=this.order[r];this.updateHandle.call(this,this.selection.get(r+1),e,r,a,n)})}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 a=this.getPoint("t");e.get(0).plot(a[0],a[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",wj("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(a=>jj(a,r)),this.rotationPoint=jj(this.getRotationPoint(e),r)}getHandlePoints({x:e,x2:r,y:a,y2:n,cx:i,cy:l}=this.el.bbox()){return[[e,a],[i,a],[r,a],[r,l],[r,n],[i,n],[e,n],[e,l]]}getRotationPoint({y:e,cx:r}=this.el.bbox()){return[r,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const FD=t=>function(e=!0,r={}){typeof e=="object"&&(r=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof w_?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,r),this};Ie(Qr,{select:FD(w_)}),Ie([wo,jo,vo],{pointSelect:FD(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new hl,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=Kf();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",wj("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=>jj(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const qm=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),BD=t=>{let e=1/0,r=1/0,a=-1/0,n=-1/0;for(let i=0;i<t.length;i++){const l=t[i];e=Math.min(e,l[0]),r=Math.min(r,l[1]),a=Math.max(a,l[0]),n=Math.max(n,l[1])}return new ir(e,r,a-e,n-r)};class HD{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:a,points:n}=e.detail,i=!r.type.indexOf("mouse");if(i&&(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(qm(r)),this.index=a,this.points=n.slice();const l=(i?"mousemove":"touchmove")+".resize",o=(i?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?ci(window,l,this.movePoint):e.type==="rot"?ci(window,l,this.rotate):ci(window,l,this.resize),ci(window,o,this.endResize)}resize(e){this.lastEvent=e;const r=this.snapToGrid(this.el.point(qm(e)));let a=r.x-this.startPoint.x,n=r.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(a*=2,n*=2);const i=this.box.x+a,l=this.box.y+n,o=this.box.x2+a,c=this.box.y2+n;let d=new ir(this.box);if(this.eventType.includes("l")&&(d.x=Math.min(i,this.box.x2),d.x2=Math.max(i,this.box.x2)),this.eventType.includes("r")&&(d.x=Math.min(o,this.box.x),d.x2=Math.max(o,this.box.x)),this.eventType.includes("t")&&(d.y=Math.min(l,this.box.y2),d.y2=Math.max(l,this.box.y2)),this.eventType.includes("b")&&(d.y=Math.min(c,this.box.y),d.y2=Math.max(c,this.box.y)),d.width=d.x2-d.x,d.height=d.y2-d.y,this.preserveAspectRatio){const h=d.width/this.box.width,p=d.height/this.box.height,m=["lt","t","rt","r","rb","b","lb","l"],x=(m.indexOf(this.eventType)+4)%m.length,b=this.aroundCenter?[this.box.cx,this.box.cy]:this.points[x];let y=this.eventType.includes("t")||this.eventType.includes("b")?p:h;y=this.eventType.length===2?Math.max(h,p):y,d=function(v,N,C){const S=[[v.x,v.y],[v.x+v.width,v.y],[v.x+v.width,v.y+v.height],[v.x,v.y+v.height]].map(([k,A])=>{const T=k-N[0],M=(A-N[1])*C;return[T*C+N[0],M+N[1]]});return BD(S)}(this.box,b,y)}this.el.dispatch("resize",{box:new ir(d),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.size(d.width,d.height).move(d.x,d.y)}movePoint(e){this.lastEvent=e;const{x:r,y:a}=this.snapToGrid(this.el.point(qm(e))),n=this.el.array().slice();n[this.index]=[r,a],this.el.dispatch("resize",{box:BD(n),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(n)}rotate(e){this.lastEvent=e;const r=this.startPoint,a=this.el.point(qm(e)),{cx:n,cy:i}=this.box,l=r.x-n,o=r.y-i,c=a.x-n,d=a.y-i,h=Math.sqrt(l*l+o*o)*Math.sqrt(c*c+d*d);if(h===0)return;let p=Math.acos((l*c+o*d)/h)/Math.PI*180;if(!p)return;a.x<r.x&&(p=-p);const m=new ze(this.el),{x,y:b}=new gt(n,i).transformO(m),{rotate:y}=m.decompose(),v=this.snapToAngle(y+p)-y;this.el.dispatch("resize",{box:this.box,angle:v,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(m.rotateO(v,x,b))}endResize(e){this.eventType!=="rot"&&this.eventType!=="point"&&this.resize(e),this.lastEvent=null,this.eventType="",On(window,"mousemove.resize touchmove.resize"),On(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(Qr,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let r=this.remember("_ResizeHandler");return r||(t.prototype instanceof HD?(r=new t(this),t=!0):r=new HD(this),this.remember("_resizeHandler",r)),r.active(t,e),this}}),window.SVG===void 0&&(window.SVG=ZG),window.Apex===void 0&&(window.Apex={});var $D=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(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 $d(this.ctx),this.ctx.axes=new lK(this.ctx),this.ctx.core=new RK(this.ctx.el,this.ctx),this.ctx.config=new bf({}),this.ctx.data=new oN(this.ctx),this.ctx.grid=new d_(this.ctx),this.ctx.graphics=new ge(this.ctx),this.ctx.coreUtils=new or(this.ctx),this.ctx.crosshairs=new bj(this.ctx),this.ctx.events=new sK(this.ctx),this.ctx.exports=new qh(this.ctx),this.ctx.fill=new Jn(this.ctx),this.ctx.localization=new iK(this.ctx),this.ctx.options=new bo,this.ctx.responsive=new oK(this.ctx),this.ctx.series=new _n(this.ctx),this.ctx.theme=new cK(this.ctx),this.ctx.formatters=new Jf(this.ctx),this.ctx.titleSubtitle=new dK(this.ctx),this.ctx.legend=new h_(this.ctx),this.ctx.toolbar=new f_(this.ctx),this.ctx.tooltip=new _D(this.ctx),this.ctx.dimensions=new jx(this.ctx),this.ctx.updateHelpers=new _K(this.ctx),this.ctx.zoomPanSelection=new gK(this.ctx),this.ctx.w.globals.tooltip=new _D(this.ctx)}}]),t}(),YD=function(){function t(e){Se(this,t),this.ctx=e,this.w=e.w}return Ce(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,a=e.isUpdating,n=this.w.globals.dom.Paper.node;n.parentNode&&n.parentNode.parentNode&&!a&&(n.parentNode.parentNode.style.minHeight="unset");var i=this.w.globals.dom.baseEl;i&&this.ctx.eventList.forEach(function(o){i.removeEventListener(o,r.ctx.events.documentEvent)});var l=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(l.Paper),l.Paper.remove(),l.elWrap=null,l.elGraphical=null,l.elLegendWrap=null,l.elLegendForeign=null,l.baseEl=null,l.elGridRect=null,l.elGridRectMask=null,l.elGridRectBarMask=null,l.elGridRectMarkerMask=null,l.elForecastMask=null,l.elNonForecastMask=null,l.elDefs=null}}]),t}(),M1=new WeakMap,zK=function(){function t(e,r){Se(this,t),this.opts=r,this.ctx=this,this.w=new nK(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 $D(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 Ce(t,[{key:"render",value:function(){var e=this;return new Promise(function(r,a){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 n=e.w.config.chart.events.beforeMount;typeof n=="function"&&n(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(m,x){var b=!1;if(m.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var y=m.getBoundingClientRect();m.style.display!=="none"&&y.width!==0||(b=!0)}var v=new ResizeObserver(function(N){b&&x.call(m,N),b=!0});m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(m.children).forEach(function(N){return v.observe(N)}):v.observe(m),M1.set(x,v)}(e.el.parentNode,e.parentResizeHandler);var i=e.el.getRootNode&&e.el.getRootNode(),l=J.is("ShadowRoot",i),o=e.el.ownerDocument,c=l?i.getElementById("apexcharts-css"):o.getElementById("apexcharts-css");if(!c){var d;(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=((d=e.opts.chart)===null||d===void 0?void 0:d.nonce)||e.w.config.chart.nonce;h&&c.setAttribute("nonce",h),l?i.prepend(c):o.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){a(m)})}else a(new Error("Element not found"))})}},{key:"create",value:function(e,r){var a=this,n=this.w;new $D(this).initModules();var i=this.w.globals;if(i.noData=!1,i.animationEnded=!1,!J.elementExists(this.el)||(this.responsive.checkResponsiveConfig(r),n.config.xaxis.convertedCatToNumeric&&new xf(n.config).convertCatToNumericXaxis(n.config,this.ctx),this.core.setupElements(),n.config.chart.type==="treemap"&&(n.config.grid.show=!1,n.config.yaxis[0].show=!1),i.svgWidth===0))return i.animationEnded=!0,null;var l=e;e.forEach(function(m,x){m.hidden&&(l=a.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:x}))});var o=or.checkComboSeries(l,n.config.chart.type);i.comboCharts=o.comboCharts,i.comboBarCount=o.comboBarCount;var c=l.every(function(m){return m.data&&m.data.length===0});(l.length===0||c&&i.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(l),this.theme.init(),new Xd(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),i.noData&&i.collapsedSeries.length!==i.series.length&&!n.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),i.axisCharts&&(this.core.coreCalculations(),n.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=n.globals.minX,this.ctx.toolbar.maxX=n.globals.maxX),this.formatters.heatmapLabelFormatters(),new or(this).getLargestMarkerSize(),this.dimensions.plotCoords();var d=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(l,d),p=new wd(this);return p.bringForward(),n.config.dataLabels.background.enabled&&p.dataLabelsBackground(),this.core.shiftGraphPosition(),n.globals.dataPoints>50&&n.globals.dom.elWrap.classList.add("apexcharts-disable-transitions"),{elGraph:h,xyRatios:d,dimensions:{plot:{left:n.globals.translateX,top:n.globals.translateY,width:n.globals.gridWidth,height:n.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,a=this,n=a.w;return new Promise(function(i,l){if(a.el===null)return l(new Error("Not enough data to display or target element not found"));(r===null||n.globals.allSeriesCollapsed)&&a.series.handleNoData(),a.grid=new d_(a);var o,c,d=a.grid.drawGrid();if(a.annotations=new aK(a),a.annotations.drawImageAnnos(),a.annotations.drawTextAnnos(),n.config.grid.position==="back"&&(d&&n.globals.dom.elGraphical.add(d.el),d!=null&&(o=d.elGridBorders)!==null&&o!==void 0&&o.node&&n.globals.dom.elGraphical.add(d.elGridBorders)),Array.isArray(r.elGraph))for(var h=0;h<r.elGraph.length;h++)n.globals.dom.elGraphical.add(r.elGraph[h]);else n.globals.dom.elGraphical.add(r.elGraph);n.config.grid.position==="front"&&(d&&n.globals.dom.elGraphical.add(d.el),d!=null&&(c=d.elGridBorders)!==null&&c!==void 0&&c.node&&n.globals.dom.elGraphical.add(d.elGridBorders)),n.config.xaxis.crosshairs.position==="front"&&a.crosshairs.drawXCrosshairs(),n.config.yaxis[0].crosshairs.position==="front"&&a.crosshairs.drawYCrosshairs(),n.config.chart.type!=="treemap"&&a.axes.drawAxis(n.config.chart.type,d);var p=new yf(e.ctx,d),m=new cN(e.ctx,d);if(d!==null&&(p.xAxisLabelCorrections(d.xAxisTickWidth),m.setYAxisTextAlignments(),n.config.yaxis.map(function(b,y){n.globals.ignoreYAxisIndexes.indexOf(y)===-1&&m.yAxisTitleRotate(y,b.opposite)})),a.annotations.drawAxesAnnotations(),!n.globals.noData){if(n.config.tooltip.enabled&&!n.globals.noData&&a.w.globals.tooltip.drawTooltip(r.xyRatios),n.globals.axisCharts&&(n.globals.isXNumeric||n.config.xaxis.convertedCatToNumeric||n.globals.isRangeBar))(n.config.chart.zoom.enabled||n.config.chart.selection&&n.config.chart.selection.enabled||n.config.chart.pan&&n.config.chart.pan.enabled)&&a.zoomPanSelection.init({xyRatios:r.xyRatios});else{var x=n.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(b){x[b]=!1})}n.config.chart.toolbar.show&&!n.globals.allSeriesCollapsed&&a.toolbar.createToolbar()}n.globals.memory.methodsToExec.length>0&&n.globals.memory.methodsToExec.forEach(function(b){b.method(b.params,!1,b.context)}),n.globals.axisCharts||n.globals.noData||a.core.resizeNonAxisCharts(),i(a)})}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(r,a){var n=M1.get(a);n&&(n.disconnect(),M1.delete(a))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(r,a){r.id===J.escapeString(e)&&Apex._chartInstances.splice(a,1)}),new YD(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var r=this,a=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],i=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],l=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],o=this.w;return o.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,d){return r.updateHelpers._extendSeries(c,d)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,a,n,i,l))}},{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],a=!(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,a)}},{key:"appendSeries",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],n=this.w.config.series.slice();return n.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(n,r,a)}},{key:"appendData",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=this;a.w.globals.dataChanged=!0,a.series.getPreviousPaths();for(var n=a.w.config.series.slice(),i=0;i<n.length;i++)if(e[i]!==null&&e[i]!==void 0)for(var l=0;l<e[i].data.length;l++)n[i].data.push(e[i].data[l]);return a.w.config.series=n,r&&(a.w.globals.initialSeries=J.clone(a.w.config.series)),this.update()}},{key:"update",value:function(e){var r=this;return new Promise(function(a,n){if(r.lastUpdateOptions&&JSON.stringify(r.lastUpdateOptions)===JSON.stringify(e))return a(r);r.lastUpdateOptions=J.clone(e),new YD(r.ctx).clear({isUpdating:!0});var i=r.create(r.w.config.series,e);if(!i)return a(r);r.mount(i).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,a(r)}).catch(function(l){n(l)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),r=[this];return e.length&&(r=[],e.forEach(function(a){r.push(a)})),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],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this;a&&(n=a),n.annotations.addXaxisAnnotationExternal(e,r,n)}},{key:"addYaxisAnnotation",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this;a&&(n=a),n.annotations.addYaxisAnnotationExternal(e,r,n)}},{key:"addPointAnnotation",value:function(e){var r=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,n=this;a&&(n=a),n.annotations.addPointAnnotationExternal(e,r,n)}},{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,a=this;r&&(a=r),a.annotations.removeAnnotation(a,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 xj(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new xj(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 qh(this.ctx).dataURI(e)}},{key:"getSvgString",value:function(e){return new qh(this.ctx).getSvgString(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new qh(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 a=Apex._chartInstances.filter(function(n){return n.id===r})[0];return a&&a.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 a=this.getChartByID(e);if(a){a.w.globals.isExecCalled=!0;var n=null;if(a.publicMethods.indexOf(r)!==-1){for(var i=arguments.length,l=new Array(i>2?i-2:0),o=2;o<i;o++)l[o-2]=arguments[o];n=a[r].apply(a,l)}return n}}},{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 IK=Object.freeze(Object.defineProperty({__proto__:null,default:zK},Symbol.toStringTag,{value:"Module"})),FK=dH(IK);var E1={exports:{}},P1,UD;function BK(){if(UD)return P1;UD=1;var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return P1=t,P1}var O1,WD;function HK(){if(WD)return O1;WD=1;var t=BK();function e(){}function r(){}return r.resetWarningCache=e,O1=function(){function a(l,o,c,d,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}}a.isRequired=a;function n(){return a}var i={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:n,element:a,elementType:a,instanceOf:n,node:a,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:e};return i.PropTypes=i,i},O1}var XD;function $K(){return XD||(XD=1,E1.exports=HK()()),E1.exports}var VD;function YK(){return VD||(VD=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var e=o(Qo()),r=i(FK),a=i($K()),n=["type","width","height","series","options"];function i(k){return k&&k.__esModule?k:{default:k}}function l(k){var A,T;return typeof WeakMap!="function"?null:(A=new WeakMap,T=new WeakMap,(l=function(M){return M?T:A})(k))}function o(k,A){if(!A&&k&&k.__esModule)return k;if(k===null||p(k)!="object"&&typeof k!="function")return{default:k};if(A=l(A),A&&A.has(k))return A.get(k);var T,M,O={__proto__:null},_=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(T in k)T!=="default"&&{}.hasOwnProperty.call(k,T)&&((M=_?Object.getOwnPropertyDescriptor(k,T):null)&&(M.get||M.set)?Object.defineProperty(O,T,M):O[T]=k[T]);return O.default=k,A&&A.set(k,O),O}function c(){return(c=Object.assign?Object.assign.bind():function(k){for(var A=1;A<arguments.length;A++){var T,M=arguments[A];for(T in M)!{}.hasOwnProperty.call(M,T)||(k[T]=M[T])}return k}).apply(null,arguments)}function d(k,A){if(k==null)return{};var T,M=h(k,A);if(Object.getOwnPropertySymbols)for(var O=Object.getOwnPropertySymbols(k),_=0;_<O.length;_++)T=O[_],A.includes(T)||{}.propertyIsEnumerable.call(k,T)&&(M[T]=k[T]);return M}function h(k,A){if(k==null)return{};var T,M={};for(T in k)if({}.hasOwnProperty.call(k,T)){if(A.includes(T))continue;M[T]=k[T]}return M}function p(k){return(p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(k)}function m(k,A){var T,M=Object.keys(k);return Object.getOwnPropertySymbols&&(T=Object.getOwnPropertySymbols(k),A&&(T=T.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),M.push.apply(M,T)),M}function x(k){for(var A=1;A<arguments.length;A++){var T=arguments[A]!=null?arguments[A]:{};A%2?m(Object(T),!0).forEach(function(M){b(k,M,T[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(T)):m(Object(T)).forEach(function(M){Object.defineProperty(k,M,Object.getOwnPropertyDescriptor(T,M))})}return k}function b(k,A,T){return(A=y(A))in k?Object.defineProperty(k,A,{value:T,enumerable:!0,configurable:!0,writable:!0}):k[A]=T,k}function y(k){return k=v(k,"string"),p(k)=="symbol"?k:k+""}function v(k,A){if(p(k)!="object"||!k)return k;var T=k[Symbol.toPrimitive];if(T===void 0)return(A==="string"?String:Number)(k);if(T=T.call(k,A),p(T)!="object")return T;throw new TypeError("@@toPrimitive must return a primitive value.")}function N(k,A){var T=x({},k);return A.forEach(function(M){delete T[M]}),T}function C(k,A){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:new WeakSet;if(k!==A){if(p(k)!=="object"||k===null||p(A)!=="object"||A===null)return!1;if(!T.has(k)&&!T.has(A)){T.add(k),T.add(A);var M=Object.keys(k),O=Object.keys(A);if(M.length!==O.length)return!1;for(var _=0,R=M;_<R.length;_++){var L=R[_];if(!O.includes(L)||!C(k[L],A[L],T))return!1}}}return!0}function S(W){function A(V){return V&&p(V)==="object"&&!Array.isArray(V)}var L=W.type,T=L===void 0?"line":L,L=W.width,M=L===void 0?"100%":L,L=W.height,O=L===void 0?"auto":L,_=W.series,R=W.options,L=d(W,n),z=(0,e.useRef)(null),F=(0,e.useRef)(null),Y=(0,e.useRef)(),X=((0,e.useEffect)(function(){Y.current=R;var V=z.current;return F.current=new r.default(V,X()),F.current.render(),function(){F.current&&typeof F.current.destroy=="function"&&F.current.destroy()}},[]),(0,e.useEffect)(function(){var V=!C(F.current.w.config.series,_),Z=!C(Y.current,R)||O!==F.current.opts.chart.height||M!==F.current.opts.chart.width;(V||Z)&&(!V||Z?F.current.updateOptions(X()):F.current.updateSeries(_)),Y.current=R},[R,_,O,M]),function(){return H(R,{chart:{type:T,height:O,width:M},series:_})}),H=function(V,Z){var B=x({},V);return A(V)&&A(Z)&&Object.keys(Z).forEach(function(G){A(Z[G])&&G in V?B[G]=H(V[G],Z[G]):Object.assign(B,b({},G,Z[G]))}),B},W=N(L,Object.keys(S.propTypes));return e.default.createElement("div",c({ref:z},W))}S.propTypes={type:a.default.string.isRequired,series:a.default.array.isRequired,options:a.default.object.isRequired,width:a.default.oneOfType([a.default.string,a.default.number]),height:a.default.oneOfType([a.default.string,a.default.number])}}(h1)),h1}var UK=YK();const Jr=ns(UK),j_=({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 s.jsx(Jr,{options:e,series:r,type:"area",height:60,width:"100%"})},WK=[{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]}],XK=[{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"}],VK=()=>s.jsxs("div",{className:"",children:[s.jsx("div",{children:s.jsx(tc,{})}),s.jsxs("div",{className:"mt-8 flex items-center justify-around w-[80%] mx-auto",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-8 w-[70%]",children:[WK.map((t,e)=>s.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:[s.jsx("p",{className:"font-semibold",children:t.title}),s.jsx("h2",{className:"text-xl font-bold",children:t.money}),s.jsx(j_,{data:t.chartData})," "]},e)),s.jsxs("div",{className:"text-sm flex flex-col gap-4 items-start ",children:[s.jsxs("p",{children:[s.jsx("span",{className:"font-bold",children:"ID:"})," 12345"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-bold",children:"Name:"})," Lorem Ipsum"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-bold",children:"Contact:"})," +1233456478"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-bold",children:"Status:"})," pending"]})]})]}),s.jsx("div",{className:"w-[20%] flex justify-center bg-yellow-200 pt-0 rounded p-1",children:s.jsx("img",{src:"https://randomuser.me/api/portraits/men/75.jpg",alt:"Profile",className:"w-full h-60 rounded shadow object-cover"})})]}),s.jsx("div",{className:"flex justify-center mt-6 p-4",children:s.jsx("div",{className:"border border-yellow-300 rounded-xl px-8 pt-4 w-[80%]",children:XK.map((t,e)=>s.jsxs("div",{className:"mb-10",children:[s.jsx("h2",{className:"text-xl font-bold mb-4",children:t.heading}),s.jsxs("div",{className:"flex justify-center items-center ",children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("img",{src:t.image1,alt:"id card",className:"w-[70%] mb-2"}),s.jsx("h2",{className:"font-bold",children:t.title})]}),s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("img",{src:t.image2,alt:"id card",className:"w-[70%] mb-2"}),s.jsx("h2",{className:"font-bold",children:t.title2})]})]}),s.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[s.jsx("button",{className:"px-6 font-semibold py-1 text-sm rounded-full text-[#013220] bg-yellow-400",children:"Accept"}),s.jsx("button",{className:"px-6 font-semibold py-1 text-sm rounded-full text-[#013220] bg-yellow-400",children:"Reject"})]})]},e))})})]}),qK=[{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}],GK=()=>s.jsx(s.Fragment,{children:s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-end items-center gap-4",children:[s.jsxs("div",{className:"text-sm font-bold flex items-center gap-2",children:[s.jsx(Mq,{}),s.jsx("label",{htmlFor:"",children:"Date:"}),s.jsx("input",{type:"date",name:"",id:"",className:"bg-[#013220]"})]}),s.jsxs("div",{className:"flex justify-end  pt-2 text-sm font-semibold",children:[s.jsx("label",{htmlFor:"",children:"Sort By:"}),s.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[s.jsx("option",{value:"Month",children:"Completed"}),s.jsx("option",{value:"year",children:"Un-Completed"})]})]})]}),s.jsx(tc,{}),s.jsx("div",{className:" pt-4",children:s.jsxs("table",{className:"w-full text-sm text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-200",children:[s.jsx("th",{className:"px-3 py-3",children:"ID"}),s.jsx("th",{className:"px-4 py-3",children:"Date"}),s.jsx("th",{className:"px-4 py-3 text-cente",children:"Pick/Drop-off"}),s.jsx("th",{className:"px-4 py-3",children:"Driver Name"}),s.jsx("th",{className:"px-4 py-3",children:"Status"}),s.jsx("th",{className:"px-4 py-3",children:"Fare"}),s.jsx("th",{className:"px-4 py-3 text-center align-middle",children:"Action"})]})}),s.jsx("tbody",{children:qK.map((t,e)=>s.jsxs("tr",{children:[s.jsxs("td",{className:"px-3 py-3",children:["00",t.id]}),s.jsx("td",{className:"px-4 py-3",children:t.date}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{children:[s.jsxs("p",{children:["Pick-up: ",t.pick]}),s.jsxs("p",{children:["Drop-off: ",t.dropoff]})]})}),s.jsx("td",{className:"px-4 py-3",children:t.drivername}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsxs("td",{className:"px-4 py-3",children:["$",t.fare]}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"flex items-center gap-3 justify-center",children:s.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},e))})]})})]})}),KK=[{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"}],ZK=[{title:"Total Deposit",money:1e3,chartData:[20,40,86,60,90]},{title:"Total Withdraw",money:1e3,chartData:[10,22,34,25,15]}],QK=({sortBy:t,setSortBy:e,options:r})=>{const[a,n]=E.useState(!1);return s.jsxs("div",{className:"relative text-sm",children:[s.jsxs("button",{onClick:()=>n(!a),className:"flex items-center gap-2 px-3 ",children:["Sort By: ",t,s.jsx(G4,{className:`transition-transform duration-200 ${a?"rotate-180":""}`})]}),a&&s.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((i,l)=>s.jsx("li",{className:"px-2 py-2 hover:bg-yellow-500 hover:text-black cursor-pointer",onClick:()=>{e(i),n(!1)},children:i},l))})]})},JK=()=>{const[t,e]=E.useState("Earn"),r=["Earn","Rating","Complaints"];return s.jsxs("div",{className:"text-yellow-400 w-full pt-2 px-2",children:[s.jsxs("div",{className:"flex items-center justify-end flex-wrap gap-4 mb-4",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"text-sm flex items-center gap-1",children:[s.jsx(vD,{})," ",s.jsx("span",{children:"Date:"})]}),s.jsx("input",{type:"date",className:"bg-transparent  text-yellow-300 focus:outline-none text-sm"})]}),s.jsx("span",{className:"text-sm pr-3",children:"To"}),s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"text-sm flex items-center gap-1",children:[s.jsx(vD,{})," ",s.jsx("span",{children:"Date:"})]}),s.jsx("input",{type:"date",className:"bg-transparent  text-yellow-300 focus:outline-none text-sm"})]})]}),s.jsx(QK,{sortBy:t,setSortBy:e,options:r})]}),s.jsx(tc,{}),s.jsxs("div",{className:"pt-4",children:[s.jsx("div",{className:"flex justify-center gap-10 my-4 flex-wrap",children:ZK.map((a,n)=>s.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:[s.jsx("p",{className:"font-semibold text-xl",children:a.title}),s.jsxs("h3",{className:"font-bold text-2xl",children:["$",a.money]}),s.jsx(j_,{data:a.chartData})," "]},n))}),s.jsxs("table",{className:"w-full text-sm text-left table-fixed",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-200",children:[s.jsx("th",{className:"w-[20%] px-6 py-3",children:"Date"}),s.jsx("th",{className:"w-[20%] px-4 py-3",children:"Time"}),s.jsx("th",{className:"w-[20%] px-4 py-3",children:"Amount"}),s.jsx("th",{className:"w-[20%] px-4 py-3 text-center",children:"Payment Method"}),s.jsx("th",{className:"w-[20%] px-4 py-3 text-center",children:"Action"})]})}),s.jsx("tbody",{children:KK.map((a,n)=>s.jsxs("tr",{children:[s.jsx("td",{className:"w-[20%] px-6 py-3",children:a.date}),s.jsx("td",{className:"w-[20%] px-4 py-3",children:a.time}),s.jsxs("td",{className:"w-[20%] px-4 py-3",children:["$",a.amount]}),s.jsx("td",{className:"w-[20%] px-4 py-3 text-center",children:a.payment}),s.jsx("td",{className:"w-[20%] px-4 py-3",children:s.jsx("div",{className:"flex items-center gap-3 justify-center",children:s.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},n))})]})]})]})},eZ=[{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"}],tZ=()=>s.jsxs("div",{className:"text-yellow-400 w-full pt-2 px-2",children:[s.jsx(tc,{}),s.jsxs("div",{className:"px-8 py-6",children:[s.jsx("div",{className:" flex justify-between w-[95%] mx-auto pb-4",children:s.jsxs("h2",{className:"font-semibold",children:["Ratings Given By Client to ",s.jsx("br",{})," Drivers"]})}),s.jsxs("div",{className:" w-[95%] mx-auto",children:[s.jsx("h4",{className:"font-semibold",children:"Reviews"}),eZ.map((t,e)=>s.jsxs("div",{className:"border border-yellow-300 rounded-lg mb-6 px-4 pb-4 pt-2 ",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("div",{className:"flex gap-8 ",children:[s.jsx("div",{children:s.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:""})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-semibold",children:t.title}),s.jsx("span",{children:t.rating})]})]}),s.jsx("span",{children:t.date})]}),s.jsx("div",{children:t.desc})]}))]})]})]}),rZ=({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 s.jsx(Jr,{options:e,series:r,type:"area",height:60,width:"100%"})},aZ=[{total:"Total Earning",percent:"$100000",chartData:[20,40,86,60,90]},{total:"Team Members",percent:"10000",chartData:[20,40,86,60,90]}],nZ=()=>s.jsx("div",{className:" text-[#DDC104] mr-10  py-8",children:s.jsx("div",{className:" flex justify-center gap-24 items-center ",children:aZ.map((t,e)=>s.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:[s.jsx("p",{className:"text-lg font-semibold tracking-wide",children:t.total}),s.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),s.jsx(rZ,{data:t.chartData})," "]},e))})}),sZ=[{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"}],iZ=()=>s.jsx(s.Fragment,{children:s.jsx("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-2 rounded",children:s.jsxs("table",{className:"w-full border-collapse table-fixed",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[s.jsx("th",{className:"px-4 py-2",children:"ID"}),s.jsx("th",{className:"px-4 py-2",children:"Full Name"}),s.jsx("th",{className:"px-4 py-2",children:"Amount"}),s.jsx("th",{className:"px-4 py-2",children:"Date"}),s.jsx("th",{className:"px-4 py-2",children:"Source"}),s.jsx("th",{className:"px-4 py-2",children:"Action"})]})}),s.jsx("tbody",{children:sZ.map((t,e)=>s.jsxs("tr",{className:"text-left",children:[s.jsxs("td",{className:"px-4 py-2",children:["00",t.id]}),s.jsx("td",{className:"px-4 py-2",children:t.name}),s.jsxs("td",{className:"px-4 py-2",children:["$",t.amount]}),s.jsx("td",{className:"px-4 py-2",children:t.date}),s.jsx("td",{className:"px-4 py-2",children:t.source}),s.jsx("td",{className:"px-4 py-2",children:s.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))})]})})}),lZ=[{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"}],oZ=()=>s.jsx(s.Fragment,{children:s.jsx("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-2 rounded",children:s.jsxs("table",{className:"w-full border-collapse table-fixed",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[s.jsx("th",{className:"px-4 py-2",children:"ID"}),s.jsx("th",{className:"px-4 py-2",children:"Full Name"}),s.jsx("th",{className:"px-4 py-2",children:"Amount"}),s.jsx("th",{className:"px-4 py-2",children:"Date"}),s.jsx("th",{className:"px-4 py-2",children:"Source"}),s.jsx("th",{className:"px-4 py-2",children:"Action"})]})}),s.jsx("tbody",{children:lZ.map((t,e)=>s.jsxs("tr",{className:"text-left",children:[s.jsxs("td",{className:"px-4 py-2",children:["00",t.id]}),s.jsx("td",{className:"px-4 py-2",children:t.name}),s.jsxs("td",{className:"px-4 py-2",children:["$",t.amount]}),s.jsx("td",{className:"px-4 py-2",children:t.date}),s.jsx("td",{className:"px-4 py-2",children:t.source}),s.jsx("td",{className:"px-4 py-2",children:s.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))})]})})}),cZ=[{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"}],dZ=()=>s.jsx(s.Fragment,{children:s.jsx("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-2 rounded",children:s.jsxs("table",{className:"w-full border-collapse table-fixed",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[s.jsx("th",{className:"px-4 py-2",children:"ID"}),s.jsx("th",{className:"px-4 py-2",children:"Full Name"}),s.jsx("th",{className:"px-4 py-2",children:"Amount"}),s.jsx("th",{className:"px-4 py-2",children:"Date"}),s.jsx("th",{className:"px-4 py-2",children:"Source"}),s.jsx("th",{className:"px-4 py-2",children:"Action"})]})}),s.jsx("tbody",{children:cZ.map((t,e)=>s.jsxs("tr",{className:"text-left",children:[s.jsxs("td",{className:"px-4 py-2",children:["00",t.id]}),s.jsx("td",{className:"px-4 py-2",children:t.name}),s.jsxs("td",{className:"px-4 py-2",children:["$",t.amount]}),s.jsx("td",{className:"px-4 py-2",children:t.date}),s.jsx("td",{className:"px-4 py-2",children:t.source}),s.jsx("td",{className:"px-4 py-2",children:s.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))})]})})}),uZ=[{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"}],hZ=()=>s.jsx(s.Fragment,{children:s.jsx("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-2 rounded",children:s.jsxs("table",{className:"w-full  table-fixed",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[s.jsx("th",{className:"px-4 py-2",children:"ID"}),s.jsx("th",{className:"px-4 py-2",children:"Full Name"}),s.jsx("th",{className:"px-4 py-2",children:"Amount"}),s.jsx("th",{className:"px-4 py-2",children:"Date"}),s.jsx("th",{className:"px-4 py-2",children:"Source"}),s.jsx("th",{className:"px-4 py-2",children:"Action"})]})}),s.jsx("tbody",{children:uZ.map((t,e)=>s.jsxs("tr",{className:"text-left",children:[s.jsxs("td",{className:"px-4 py-2",children:["00",t.id]}),s.jsx("td",{className:"px-4 py-2",children:t.name}),s.jsxs("td",{className:"px-4 py-2",children:["$",t.amount]}),s.jsx("td",{className:"px-4 py-2",children:t.date}),s.jsx("td",{className:"px-4 py-2",children:t.source}),s.jsx("td",{className:"px-4 py-2",children:s.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))})]})})}),fZ=()=>{const[t,e]=E.useState(1),r=()=>{switch(t){case 1:return s.jsx(iZ,{});case 2:return s.jsx(oZ,{});case 3:return s.jsx(dZ,{});case 4:return s.jsx(hZ,{});default:return null}};return s.jsxs("div",{className:"w-[85%] mx-auto",children:[s.jsx("h2",{className:"text-lg font-semibold m-6",children:"DDR Balance: $1000"}),s.jsx("div",{className:"flex gap-20 ml-6 my-3",children:[1,2,3,4].map(a=>s.jsxs("button",{onClick:()=>e(a),className:`p-2 rounded border border-yellow-300
              ${t===a?"bg-yellow-400 text-black":"hover:bg-yellow-200"}`,children:["Level ",a]},a))}),s.jsx("div",{className:" w-[95%] mx-auto px-8 py-2 ",children:r()})]})},pZ=()=>{const t=["DDR","CCR","BBR","HLR","AMBESSADOR","Day"],[e,r]=E.useState("DDR");return s.jsxs("div",{className:"pl-5",children:[s.jsx("div",{className:"flex items-center border-b border-yellow-400 justify-between font-semibold text-yellow-400 flex-nowrap",children:t.map((a,n)=>s.jsxs(qe.Fragment,{children:[s.jsxs("div",{onClick:()=>r(a),className:`pr-2 cursor-pointer text-sm flex items-center gap-2 
                ${e===a?"border-b-2 border-yellow-400 pb-1":""} 
                ${a==="Day"?"border border-b-0 border-yellow-400 px-4 py-2":""}`,children:[a,a==="Day"&&s.jsx(vR,{className:"text-lg"})]}),n!==t.length-2&&n!==t.length-1&&s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"})]},n))}),s.jsx(fZ,{activeTitle:e})]})},mZ=({sortBy:t,setSortBy:e,options:r})=>{const[a,n]=E.useState(!1);return s.jsxs("div",{className:"relative text-sm flex justify-end",children:[s.jsxs("button",{onClick:()=>n(!a),className:"flex items-center gap-2 px-3 ",children:["Sort By: ",t,s.jsx(G4,{className:`transition-transform duration-200 ${a?"rotate-180":""}`})]}),a&&s.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((i,l)=>s.jsx("li",{className:"px-2 py-2 hover:bg-yellow-500 hover:text-black cursor-pointer",onClick:()=>{e(i),n(!1)},children:i},l))})]})},gZ=()=>{const[t,e]=E.useState("Earn"),r=["Earn","Rating","Complaints"];return s.jsxs("div",{children:[s.jsx(mZ,{sortBy:t,setSortBy:e,options:r}),s.jsx(tc,{}),s.jsx(nZ,{}),s.jsx(pZ,{})]})},xZ=({sortBy:t,setSortBy:e,options:r})=>{const[a,n]=E.useState(!1);return s.jsxs("div",{className:"relative text-sm ",children:[s.jsxs("button",{onClick:()=>n(!a),className:"flex items-center gap-2 px-3 ",children:["Sort By: ",t,s.jsx(G4,{className:`transition-transform duration-200 ${a?"rotate-180":""}`})]}),a&&s.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((i,l)=>s.jsx("li",{className:"px-2 py-2 hover:bg-yellow-500 hover:text-black cursor-pointer",onClick:()=>{e(i),n(!1)},children:i},l))})]})},bZ=()=>{const[t,e]=E.useState("Earn"),r=["Earn","Rating","Complaints"];return s.jsxs("div",{className:"flex items-center justify-end flex-wrap gap-4 m-4",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsx("div",{className:"text-sm flex items-center gap-1",children:s.jsx("span",{children:"Date Range:"})}),s.jsx("input",{type:"date",className:"bg-transparent rounded border py-1  border-yellow-300  text-yellow-300 focus:outline-none text-sm"})]}),s.jsx("span",{className:"text-sm pr-3",children:"To"}),s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"text-sm flex items-center gap-1",children:[" ",s.jsx("span",{children:"Date:"})]}),s.jsx("input",{type:"date",className:"bg-transparent rounded py-1  border border-yellow-300 text-yellow-300 focus:outline-none text-sm"})]})]}),s.jsx(xZ,{sortBy:t,setSortBy:e,options:r})]})},yZ=({onClose:t})=>s.jsx("div",{className:"fixed inset-0 z-10 flex justify-center items-center pt-16 bg-[#013220] bg-opacity-90",children:s.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:[s.jsxs("div",{className:"flex justify-end py-2 px-3",children:[s.jsx(Hd,{onClick:t,cursor:"pointer",size:25})," "]}),s.jsxs("div",{className:"flex flex-col gap-4  text-sm px-12 pt-6",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold",children:"Ticket ID:"}),s.jsx("span",{children:"TCK 1124"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold",children:"User:"}),s.jsx("span",{children:"Areeba Shah"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold",children:"Issue Type:"}),s.jsx("span",{children:"Driver Late"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"font-semibold block mb-2",children:[" ",s.jsx("span",{children:"Remarks:"})]}),s.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 "})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold",children:"Assigned To:"}),s.jsx("span",{children:"Admin A"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold",children:"Status:"}),s.jsx("span",{children:"Open"})]})]}),s.jsxs("div",{className:"flex justify-center gap-4 mt-10",children:[s.jsx("button",{className:"rounded-full bg-yellow-400 text-black px-4 py-2 hover:bg-yellow-300 transition",children:"Resolved"}),s.jsx("button",{className:"rounded-full bg-yellow-400 text-black px-4 py-1 hover:bg-yellow-300 transition",children:"Escalate"}),s.jsx("button",{onClick:t,className:"rounded-full bg-yellow-400 text-black px-4 py-1 hover:bg-yellow-300 transition",children:"Close"})]})]})}),vZ=[{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"}],wZ=()=>{const[t,e]=E.useState(!1);return s.jsx(s.Fragment,{children:s.jsxs("div",{children:[s.jsx(tc,{}),s.jsx(bZ,{}),s.jsx("div",{className:" p-8",children:s.jsxs("table",{className:"w-full text-sm text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border border-yellow-300 ",children:[s.jsx("th",{className:"px-4 py-3",children:"Date"}),s.jsx("th",{className:"px-4 py-3 text-cente",children:"Issue Summary"}),s.jsx("th",{className:"px-4 py-3",children:"Status"}),s.jsx("th",{className:"px-4 py-3",children:"Assigned To"}),s.jsx("th",{className:"px-4 py-3 text-center ",children:"Action"})]})}),s.jsx("tbody",{children:vZ.map((r,a)=>s.jsxs("tr",{children:[s.jsx("td",{className:"px-4 py-2",children:r.date}),s.jsx("td",{className:"px-4 py-2 ",children:r.issuesummary}),s.jsx("td",{className:"px-4 py-2",children:r.status}),s.jsx("td",{className:"px-4 py-2",children:r.assignedto}),s.jsx("td",{className:"px-4 py-2",children:s.jsx("div",{className:"flex items-center gap-3 justify-center",children:s.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"})})})]},a))})]})}),t&&s.jsx(yZ,{onClose:()=>e(!1)})]})})},jZ=()=>{const[t,e]=E.useState([]),[r,a]=E.useState(!1),[n,i]=E.useState(null),[l,o]=E.useState(!1),[c,d]=E.useState(null),[h,p]=E.useState({currentPage:1,totalPages:1,totalUsers:0,usersPerPage:10,hasNextPage:!1,hasPrevPage:!1,nextPage:null,prevPage:null}),m=async(N=1)=>{try{a(!0),i(null);const S=await Re.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),o(!0),setTimeout(()=>o(!1),3e3))}catch(C){console.error("Error fetching users without KYC:",C),i(C.response?.data?.message||"Failed to fetch users without KYC"),setTimeout(()=>i(null),5e3)}finally{a(!1)}};E.useEffect(()=>{m()},[]);const x=N=>{d(N)},b=()=>{d(null)},y=N=>{N>=1&&N<=h.totalPages&&m(N)},v=N=>new Date(N).toLocaleString();return s.jsxs("div",{className:"flex bg-[#013220] text-yellow-400 min-h-screen",children:[s.jsx(Ye,{}),s.jsx("div",{className:"flex-1 p-3 md:p-6 min-w-0",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.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:[s.jsx("h1",{className:"text-3xl font-bold text-yellow-400 mb-2",children:"Customer Support"}),s.jsx("p",{className:"text-gray-400",children:"Manage website users without KYC verification"})]}),r&&s.jsx("div",{className:"text-center py-8",children:s.jsx("div",{className:"animate-spin inline-block w-8 h-8 border-4 border-yellow-400 border-t-transparent rounded-full",role:"status",children:s.jsx("span",{className:"sr-only",children:"Loading..."})})}),n&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("span",{children:n})]}),l&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),s.jsxs("span",{children:["Users fetched successfully! Total: ",h.totalUsers]})]}),!r&&!n&&t.length>0&&s.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl border border-yellow-400/20 shadow-lg p-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-semibold text-yellow-400",children:"Users Without KYC"}),s.jsxs("div",{className:"text-sm text-gray-400",children:["Page ",h.currentPage," of ",h.totalPages," | Total: ",h.totalUsers," users"]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm text-left bg-[#013220] rounded-lg shadow border border-yellow-400/10",children:[s.jsx("thead",{className:"text-xs uppercase bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220]",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"User ID"}),s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Username"}),s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Name"}),s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Email"}),s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Phone"}),s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Gender"}),s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"KYC Level"}),s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Created At"}),s.jsx("th",{className:"px-4 py-3 font-medium text-center",children:"Action"})]})}),s.jsx("tbody",{children:t.map(N=>s.jsxs("tr",{className:"border-b border-yellow-400/10 hover:bg-yellow-400/5 text-yellow-400",children:[s.jsx("td",{className:"px-4 py-3 text-center",children:N.userId.slice(-6)}),s.jsx("td",{className:"px-4 py-3 text-center",children:N.username}),s.jsxs("td",{className:"px-4 py-3 text-center",children:[N.firstName," ",N.lastName]}),s.jsx("td",{className:"px-4 py-3 text-center",children:N.email}),s.jsx("td",{className:"px-4 py-3 text-center",children:N.phoneNumber}),s.jsx("td",{className:"px-4 py-3 text-center",children:N.gender||"N/A"}),s.jsx("td",{className:"px-4 py-3 text-center",children:N.kycLevel}),s.jsx("td",{className:"px-4 py-3 text-center",children:v(N.createdAt)}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"flex items-center gap-3 justify-center",children:s.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&&s.jsxs("div",{className:"flex justify-center items-center mt-6 gap-2",children:[s.jsx("button",{onClick:()=>y(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"}),s.jsxs("span",{className:"px-4 py-2 text-sm text-yellow-400",children:["Page ",h.currentPage," of ",h.totalPages]}),s.jsx("button",{onClick:()=>y(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&&!n&&t.length===0&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("span",{children:"No users without KYC found"})]}),c&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:s.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:[s.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4 text-yellow-400",children:"User Details"}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2 text-yellow-400",children:"User Information"}),s.jsx("table",{className:"w-full text-sm text-left bg-[#013220]/50 border border-yellow-400/20 rounded-lg shadow-lg",children:s.jsxs("tbody",{children:[s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"User ID"}),s.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.userId})]}),s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Username"}),s.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.username})]}),s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Full Name"}),s.jsxs("td",{className:"px-4 py-2 text-gray-300",children:[c.firstName," ",c.lastName]})]}),s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Email"}),s.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.email})]}),s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Phone Number"}),s.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.phoneNumber})]}),s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Gender"}),s.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.gender||"N/A"})]}),s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"KYC Level"}),s.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.kycLevel})]}),s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"KYC Status"}),s.jsx("td",{className:"px-4 py-2 text-gray-300",children:c.kycStatus||"Not Started"})]}),s.jsxs("tr",{className:"border-b border-yellow-400/20 hover:bg-yellow-400/5 transition-colors duration-200",children:[s.jsx("td",{className:"px-4 py-2 font-medium text-yellow-400",children:"Created At"}),s.jsx("td",{className:"px-4 py-2 text-gray-300",children:v(c.createdAt)})]})]})})]}),s.jsx("div",{className:"flex justify-end gap-3",children:s.jsx("button",{onClick:b,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"})})]})})]})})]})},dN=()=>{const t=hr(),e=r=>`menu-tab ${t.pathname===r?"active":""}`;return s.jsx("div",{className:"border-b border-yellow-300",children:s.jsxs("div",{className:"flex justify-between w-2/3 p-2",children:[s.jsx(De,{to:"/proposalmanagement",className:e("/proposalmanagement"),children:"Proposal Management"}),s.jsx(De,{to:"/agreementrecord",className:e("/agreementrecord"),children:"Agreement Generation & Record"}),s.jsx(De,{to:"/marketplacecontrol",className:e("/marketplacecontrol"),children:"Marketplace Control"})]})})},NZ=[{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"}],SZ=()=>s.jsxs("div",{className:"flex",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsx("div",{className:" border-b border-yellow-300",children:s.jsx(dN,{})}),s.jsxs("div",{className:"flex items-center justify-end gap-2 flex-wrap py-2",children:[s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsx("div",{className:"text-xs flex items-center gap-1",children:s.jsx("span",{children:"Date Range:"})}),s.jsx("input",{type:"date",className:"bg-transparent rounded border py-1  border-yellow-300  text-yellow-300 focus:outline-none text-xs"})]}),s.jsx("span",{className:"text-xs pr-3",children:"To"}),s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"text-xs flex items-center gap-1",children:[" ",s.jsx("span",{children:"Date:"})]}),s.jsx("input",{type:"date",className:"bg-transparent rounded py-1 text-xs  border border-yellow-300 text-yellow-300 focus:outline-none"})]}),s.jsx("label",{htmlFor:"",className:"text-xs ",children:"Sort By"}),s.jsxs("select",{name:"",id:"",className:"bg-[#013220]  text-xs focus:outline-none",children:[s.jsx("option",{value:"pending",children:"Pending"}),s.jsx("option",{value:"pending",children:"accepted"})]})]}),s.jsxs("table",{className:"w-full text-sm text-left border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-200 ",children:[s.jsx("th",{className:"px-3 py-3",children:"ID"}),s.jsx("th",{className:"px-4 py-3",children:"Driver"}),s.jsx("th",{className:"px-4 py-3",children:"Owner"}),s.jsx("th",{className:"px-4 py-3",children:"Vehicle"}),s.jsxs("th",{className:"px-4 py-3",children:["Type",s.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none",children:[s.jsx("option",{value:"",children:"Rental"}),s.jsx("option",{value:"",children:"Salaried"}),s.jsx("option",{value:"",children:"%"})]})]}),s.jsx("th",{className:"px-4 py-3",children:"Date"}),s.jsxs("th",{className:"px-4 py-3",children:["Status",s.jsxs("select",{className:" bg-[#013220] text-xs focus:outline-none",children:[s.jsx("option",{value:"active",children:"Active"}),s.jsx("option",{value:"non-active",children:"pending"})]})]}),s.jsx("th",{className:"px-4 py-3 text-center",children:"Actions"})]})}),s.jsx("tbody",{children:NZ.map((t,e)=>s.jsxs("tr",{children:[s.jsxs("td",{className:"px-3 py-3",children:["00",t.id]}),s.jsx("td",{className:"px-4 py-3",children:t.driver}),s.jsx("td",{className:"px-4 py-3",children:t.owner}),s.jsx("td",{className:"px-4 py-3",children:t.vehicle}),s.jsx("td",{className:"px-4 py-3",children:t.type}),s.jsx("td",{className:"px-4 py-3",children:t.date}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex gap-2 justify-center items-center",children:[s.jsx("button",{className:"text-yellow-400 border rounded-full px-1 py-1 border-yellow-400  hover:text-yellow-300",children:s.jsx(yR,{size:15})}),s.jsx("button",{className:"bg-yellow-400 text-black px-3 py-1 rounded-full text-xs font-medium hover:bg-yellow-300",children:"Approve"}),s.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))})]})]})]}),CZ=[{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"}],AZ=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsx(dN,{}),s.jsxs("div",{className:"flex items-center justify-end gap-2 flex-wrap py-2",children:[s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs",children:"Date Range:"}),s.jsx("input",{type:"date",className:"bg-transparent rounded border py-1 border-yellow-300 text-yellow-300 focus:outline-none text-xs"})]}),s.jsx("span",{className:"text-xs",children:"To"}),s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs",children:"Date:"}),s.jsx("input",{type:"date",className:"bg-transparent rounded py-1 text-xs border border-yellow-300 text-yellow-300 focus:outline-none"})]}),s.jsx("label",{className:"text-xs",children:"Sort By"}),s.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none border border-yellow-300 text-yellow-300",children:[s.jsx("option",{value:"pending",children:"Pending"}),s.jsx("option",{value:"accepted",children:"Accepted"})]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm text-left border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{className:"px-3 py-3",children:"ID"}),s.jsx("th",{className:"px-4 py-3",children:"Proposal ID"}),s.jsx("th",{className:"px-4 py-3",children:"Parties"}),s.jsxs("th",{className:"px-4 py-3",children:["Type",s.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none ml-1",children:[s.jsx("option",{value:"",children:"Rental"}),s.jsx("option",{value:"",children:"Salaried"}),s.jsx("option",{value:"",children:"%"})]})]}),s.jsx("th",{className:"px-4 py-3",children:"Date"}),s.jsxs("th",{className:"px-4 py-3",children:["Status",s.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none ml-1",children:[s.jsx("option",{value:"pending",children:"Pending"}),s.jsx("option",{value:"active",children:"Active"})]})]}),s.jsx("th",{className:"px-4 py-3 text-center",children:"Actions"})]})}),s.jsx("tbody",{children:CZ.map((t,e)=>s.jsxs("tr",{className:"",children:[s.jsxs("td",{className:"px-3 py-3",children:["00",t.id]}),s.jsx("td",{className:"px-4 py-3",children:t.proposalId}),s.jsx("td",{className:"px-4 py-3 whitespace-pre-line",children:t.parties}),s.jsx("td",{className:"px-4 py-3",children:t.type}),s.jsx("td",{className:"px-4 py-3",children:t.date}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex gap-2 justify-center items-center",children:[s.jsx("button",{className:"text-yellow-400 border rounded-full px-1 py-1 border-yellow-400 hover:text-yellow-300",children:s.jsx(yR,{size:15})}),s.jsx("button",{className:"bg-yellow-400 text-black px-3 py-1 rounded-full text-xs font-medium hover:bg-yellow-300",children:"Download"}),s.jsx("button",{className:"bg-yellow-400 px-3 py-1 rounded-full text-xs font-medium hover:bg-yellow-300 text-black",children:"Cancel"}),s.jsx("button",{className:"text-yellow-400 border rounded-full px-1 py-1 border-yellow-400 hover:text-yellow-300",children:s.jsx(Xq,{size:15})})]})})]},e))})]})})]})]}),kZ=[{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"}],DZ=[{vendorname:"Smith Joy",category:"Auto",status:"Active"},{vendorname:"Smith Joy",category:"Auto",status:"Active"},{vendorname:"Smith Joy",category:"Auto",status:"Active"}],TZ=[{proposalid:"PR-001",title:"Free Oil Change",flagReason:"Inappropriate",submittedby:"User123"}],MZ=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1  overflow-y-auto",children:[s.jsx(dN,{}),s.jsx("div",{className:" px-1 flex py-8 justify-around items-center flex-wrap ",children:kZ.map((t,e)=>s.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:[s.jsx("div",{className:"h-24 w-24 rounded-full border border-dashed border-yellow-400 overflow-hidden flex items-center justify-center",children:s.jsx("img",{className:"h-full w-full object-cover",src:t.image,alt:""})}),s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsxs("div",{className:"flex items-center gap-8",children:[s.jsx("span",{className:"font-semibold",children:"Name:"}),s.jsx("span",{className:"text-sm",children:t.name})]}),s.jsxs("div",{className:"flex items-center gap-8",children:[s.jsx("span",{className:"font-semibold",children:"Rating:"}),s.jsxs("span",{className:"text-sm",children:["⭐",t.rating]})]}),s.jsxs("div",{className:"flex items-center gap-6",children:[s.jsx("span",{className:"font-semibold",children:"Category:"}),s.jsx("span",{className:"text-sm",children:t.category})]})]})]},e))}),s.jsx("div",{className:"px-8",children:s.jsx("form",{children:s.jsxs("div",{className:"flex flex-col gap-8",children:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx("input",{type:"checkbox",id:"market-toggle",className:"accent-yellow-400"}),s.jsx("label",{htmlFor:"market-toggle",className:"text-sm",children:"Turns entire marketplace visibility for all users"})]}),s.jsxs("div",{className:"flex justify-center gap-6",children:[s.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"}),s.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"})]})]})})}),s.jsxs("div",{className:"mt-10 px-8",children:[s.jsx("h3",{className:"text-lg font-bold mb-1",children:"Vendor List:"}),s.jsx("span",{className:"text-sm flex justify-end w-2/3 underline",children:"Add Trusted Vendors"}),s.jsx("div",{className:"flex justify-center items-center mt-4",children:s.jsx("div",{className:"border border-yellow-300 rounded-md w-full max-w-3xl overflow-x-auto",children:s.jsxs("table",{className:"min-w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{className:"px-4 py-2 text-left",children:"Vendor Name"}),s.jsx("th",{className:"px-4 py-2 text-left",children:"Category"}),s.jsxs("th",{className:"px-4 py-2 text-left",children:["Status",s.jsxs("select",{className:"ml-2 bg-[#013220] text-yellow-300 rounded text-xs px-1 py-0.5 focus:outline-none",children:[s.jsx("option",{value:"active",children:"Active"}),s.jsx("option",{value:"pending",children:"Pending"})]})]}),s.jsx("th",{className:"px-4 py-2 text-left",children:"Action"})]})}),s.jsx("tbody",{children:DZ.map((t,e)=>s.jsxs("tr",{children:[s.jsx("td",{className:"px-4 py-2",children:t.vendorname}),s.jsx("td",{className:"px-4 py-2",children:t.category}),s.jsx("td",{className:"px-4 py-2",children:t.status}),s.jsx("td",{className:"px-4 py-2",children:s.jsx("button",{className:"text-sm bg-yellow-400 rounded-full px-2 py-1 text-black",children:"Remove"})})]},e))})]})})})]}),s.jsxs("div",{className:"mt-4 px-8",children:[s.jsx("h3",{className:"text-lg font-bold mb-1",children:"Proposal Moderation Queue:"}),s.jsxs("span",{className:"text-sm flex justify-end w-2/3",children:["Sorted By:",s.jsx("select",{name:"",id:"",className:"bg-[#013220] focus:outline-none ml-2",children:s.jsx("option",{value:"",children:"Flagged Only"})})]}),s.jsx("div",{className:"flex justify-center items-center mt-4",children:s.jsx("div",{className:"border border-yellow-300 rounded-md w-full max-w-3xl overflow-x-auto",children:s.jsxs("table",{className:"min-w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{className:"px-4 py-2 text-left",children:"Proposal ID"}),s.jsx("th",{className:"px-4 py-2 text-left",children:"Title"}),s.jsx("th",{className:"px-4 py-2 text-left",children:"Flag Reason"}),s.jsx("th",{className:"px-4 py-2 text-left",children:"Submitted By"}),s.jsx("th",{className:"px-4 py-2 text-left",children:"Action"})]})}),s.jsx("tbody",{children:TZ.map((t,e)=>s.jsxs("tr",{children:[s.jsx("td",{className:"px-4 py-2",children:t.proposalid}),s.jsx("td",{className:"px-4 py-2",children:t.title}),s.jsx("td",{className:"px-4 py-2",children:t.flagReason}),s.jsx("td",{className:"px-4 py-2",children:t.submittedby}),s.jsx("td",{className:"px-4 py-2",children:s.jsx("button",{className:"text-sm bg-yellow-400 rounded-full px-4 py-1 text-black",children:"Edit"})})]},e))})]})})}),s.jsxs("div",{className:"flex justify-center gap-6 mt-6",children:[s.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"}),s.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"})]})]})]})]}),ep=()=>{const t=hr(),e=r=>`menu-tab ${t.pathname===r?"active":""}`;return s.jsx("div",{className:" border-b border-yellow-300",children:s.jsxs("div",{className:"flex justify-between items-center w-2/3 p-2 ",children:[s.jsx(De,{to:"/overview",className:e("/overview"),children:s.jsx("span",{className:"font-semibold",children:"OverView"})}),s.jsx("div",{className:"h-3 w-[2px] bg-yellow-400 "}),s.jsx(De,{to:"/autolockRulesPanel",className:e("/autolockRulesPanel"),children:s.jsx("span",{className:"font-semibold",children:"Auto-Lock Rules Panel"})}),s.jsx("div",{className:"h-3 w-[2px] bg-yellow-400 "}),s.jsx(De,{to:"/ruleeditorpanel",className:e("/ruleeditorpanel"),children:s.jsx("span",{className:"font-semibold",children:"Rule Editor Panel"})}),s.jsx("div",{className:"h-3 w-[2px] bg-yellow-400 "}),s.jsx(De,{to:"/analytics",className:e("/analytics"),children:s.jsx("span",{className:"font-semibold",children:"Analytics"})})]})})},EZ=[{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"}],PZ=()=>s.jsxs("div",{className:"flex min-h-screen  ",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1",children:[s.jsx(ep,{}),s.jsxs("div",{className:"flex items-center justify-end gap-2 flex-wrap py-2",children:[s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsx("div",{className:"text-xs flex items-center gap-1",children:s.jsx("span",{children:"Date Range:"})}),s.jsx("input",{type:"date",className:"bg-transparent rounded border py-1  border-yellow-300  text-yellow-300 focus:outline-none text-xs"})]}),s.jsx("span",{className:"text-xs pr-3",children:"To"}),s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"text-xs flex items-center gap-1",children:[" ",s.jsx("span",{children:"Date:"})]}),s.jsx("input",{type:"date",className:"bg-transparent rounded py-1 text-xs  border border-yellow-300 text-yellow-300 focus:outline-none"})]}),s.jsx("label",{htmlFor:"",className:"text-xs ",children:"Sort By"}),s.jsxs("select",{name:"",id:"",className:"bg-[#013220]  text-xs focus:outline-none",children:[s.jsx("option",{value:"pending",children:"Pending"}),s.jsx("option",{value:"pending",children:"accepted"})]})]}),s.jsxs("table",{className:"w-full text-sm text-left border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-200 ",children:[s.jsx("th",{className:"px-3 py-3",children:"ID"}),s.jsx("th",{className:"px-4 py-3",children:"Name"}),s.jsxs("th",{className:"px-4 py-3",children:["Role",s.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none",children:[s.jsx("option",{value:"",children:"User"}),s.jsx("option",{value:"",children:"Driver"}),s.jsx("option",{value:"",children:"Both"})]})]}),s.jsxs("th",{className:"px-4 py-3",children:["Flag Type",s.jsxs("select",{className:"bg-[#013220] text-xs focus:outline-none",children:[s.jsx("option",{value:"multiple",children:"Booking"}),s.jsx("option",{value:"cancel",children:"Financial"}),s.jsx("option",{value:"cancel",children:"KYC"}),s.jsx("option",{value:"cancel",children:"Driver"}),s.jsx("option",{value:"cancel",children:"Referral"}),s.jsx("option",{value:"cancel",children:"Geo"})]})]}),s.jsx("th",{className:"px-4 py-3",children:"Score"}),s.jsx("th",{className:"px-4 py-3",children:"Last Activity"}),s.jsxs("th",{className:"px-4 py-3",children:["Status",s.jsxs("select",{className:" bg-[#013220] text-xs focus:outline-none",children:[s.jsx("option",{value:"active",children:"Auto Locked"}),s.jsx("option",{value:"non-active",children:"Locked"})]})]}),s.jsx("th",{className:"px-4 py-3 text-center",children:"Action"})]})}),s.jsx("tbody",{children:EZ.map((t,e)=>s.jsxs("tr",{children:[s.jsx("td",{className:"px-3 py-3",children:t.id}),s.jsx("td",{className:"px-4 py-3",children:t.name}),s.jsx("td",{className:"px-4 py-3 ",children:t.role}),s.jsx("td",{className:"px-4 py-3 whitespace-pre-line",children:t.flagtype}),s.jsx("td",{className:"px-4 py-3",children:t.Score}),s.jsx("td",{className:"px-4 py-3",children:t.LastActivity}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"flex gap-2 justify-center items-center",children:s.jsx(De,{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))})]})]})]}),OZ=[{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"}],RZ=()=>s.jsxs("div",{className:"flex min-h-screen  ",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1",children:[s.jsx(ep,{}),s.jsxs("div",{className:" flex justify-end pt-2 pb-6 px-4 gap-4 items-center border-b border-yellow-200 text-xs",children:[s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Date Range:"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-300 rounded px-2 py-1 text-yellow-300 focus:outline-none"})]}),s.jsx("span",{className:"text-sm",children:"To"}),s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Date:"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-300 rounded px-2 py-1 text-yellow-300 focus:outline-none"})]})]}),s.jsxs("div",{className:"w-[90%] px-10 py-4 flex justify-between items-center",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Auto-Lock Rules Panel"}),s.jsx("button",{className:"text-sm px-4 py-1 underline",children:"Edit"})]}),s.jsx("div",{className:"flex justify-center items-center px-4",children:s.jsxs("div",{className:"w-full max-w-3xl",children:[s.jsx("div",{className:"overflow-x-auto border border-yellow-300 rounded-lg",children:s.jsxs("table",{className:"w-full text-sm text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{className:"px-4 py-2 border-r border-yellow-300",children:"Rules"}),s.jsx("th",{className:"px-4 py-2 border-r border-yellow-300",children:"Threshold"}),s.jsx("th",{className:"px-4 py-2",children:"Status"})]})}),s.jsxs("tbody",{children:[s.jsxs("tr",{children:[s.jsx("td",{className:"px-4 py-4 border-r border-yellow-300",children:"Fraud Score"}),s.jsx("td",{className:"px-4 py-4 border-r border-yellow-300",children:">= 70"}),s.jsx("td",{className:"px-4 py-4",children:"Active"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"px-4 py-2 border-r border-yellow-300",children:"High-Risk Flags"}),s.jsx("td",{className:"px-4 py-2 border-r border-yellow-300",children:">= 3 in 7 days"}),s.jsx("td",{className:"px-4 py-2",children:"Active"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"px-4 py-2 border-r border-yellow-300",children:"Financial Abuse"}),s.jsx("td",{className:"px-4 py-2 border-r border-yellow-300",children:"Triggered once"}),s.jsx("td",{className:"px-4 py-2",children:"Active"})]})]})]})}),s.jsxs("div",{className:"flex gap-2 py-4 text-sm",children:[s.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),s.jsx("label",{children:"If a user crosses any of these limits, automation triggers below will apply."})]})]})}),s.jsx("div",{className:"w-[90%] px-10 py-4 flex justify-between items-center",children:s.jsxs("h2",{className:"text-lg font-semibold",children:["Toggle Controls ",s.jsx("span",{className:"text-yellow-400 text-xs",children:"(Automation Setting)"})]})}),s.jsx("div",{className:"flex justify-center items-center px-4",children:s.jsx("div",{className:"w-full max-w-3xl",children:s.jsxs("div",{className:"border border-yellow-300 rounded-lg p-4 space-y-4 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),s.jsx("label",{children:"Auto-Freeze Wallet"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),s.jsx("label",{children:"Notify User of Suspension via App + Email"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),s.jsx("label",{children:"Required Manual Unflag by Admin to Reinstate Account"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",className:"accent-yellow-300"}),s.jsx("label",{children:"Auto-Escalate to Fraud Dept if wallet frozen twice in 30 days"})]})]})})}),s.jsxs("div",{className:"w-[90%] px-10 py-4 flex justify-between items-center",children:[s.jsx("h2",{className:"text-lg font-semibold",children:"Rule Monitoring & History"}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-semibold",children:"Sort By"}),s.jsxs("select",{className:"bg-[#013220] focus:outline-none text-sm py-1 rounded",children:[s.jsx("option",{value:"today",children:"Today"}),s.jsx("option",{value:"weekly",children:"Weekly"}),s.jsx("option",{value:"monthly",children:"Monthly"})]})]})]}),s.jsx("div",{className:"flex justify-center items-center px-4",children:s.jsx("div",{className:"w-full max-w-3xl",children:s.jsx("div",{className:"border border-yellow-300 rounded-lg overflow-hidden",children:s.jsxs("div",{className:"w-full",children:[s.jsx("table",{className:"w-full text-sm text-left table-fixed",children:s.jsx("thead",{className:"",children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Rule"}),s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Current Threshold"}),s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Last Triggered"}),s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Action"})]})})}),s.jsx("div",{className:"max-h-[240px] overflow-y-auto scrollbar scrollbar-thumb-yellow-400 scrollbar-track-yellow-100",children:s.jsx("table",{className:"w-full text-sm text-left table-fixed",children:s.jsx("tbody",{children:OZ.map((t,e)=>s.jsxs("tr",{className:"border-b border-yellow-200",children:[s.jsx("td",{className:"px-4 py-4 w-1/4",children:t.rule}),s.jsx("td",{className:"px-4 py-4 w-1/4",children:t.currentThreshold}),s.jsx("td",{className:"px-4 py-4 w-1/4",children:t.lastTriggered}),s.jsx("td",{className:"px-4 py-4 w-1/4",children:s.jsx("button",{children:s.jsx(Gq,{size:20})})})]},e))})})})]})})})})]})]}),_Z=[{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}],LZ=()=>s.jsx("div",{children:s.jsx("div",{className:"flex justify-center items-center px-4",children:s.jsx("div",{className:"w-full max-w-3xl",children:s.jsx("div",{className:"border border-yellow-300 rounded-lg overflow-hidden",children:s.jsxs("div",{className:"w-full",children:[s.jsx("table",{className:"w-full text-sm text-left table-fixed",children:s.jsx("thead",{className:"",children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Date"}),s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Type"}),s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Method"}),s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Amount"}),s.jsx("th",{className:"px-4 py-2 w-1/4",children:"Flag"})]})})}),s.jsx("div",{className:"max-h-[240px] overflow-y-auto scrollbar scrollbar-thumb-yellow-400 scrollbar-track-yellow-100",children:s.jsx("table",{className:"w-full text-sm text-left table-fixed",children:s.jsx("tbody",{children:_Z.map((t,e)=>s.jsxs("tr",{className:"border-b border-yellow-200",children:[s.jsx("td",{className:"px-4 py-4 w-1/4",children:t.date}),s.jsx("td",{className:"px-4 py-4 w-1/4",children:t.type}),s.jsx("td",{className:"px-4 py-4 w-1/4",children:t.method}),s.jsx("td",{className:"px-4 py-4 w-1/4",children:t.amount}),s.jsx("td",{className:"px-4 py-4 w-1/4",children:s.jsx("button",{children:s.jsx(Xf,{size:20})})})]},e))})})})]})})})})}),zZ=()=>s.jsx("div",{children:s.jsx("div",{className:"flex justify-center items-center px-4 py-8",children:s.jsxs("div",{className:"w-full max-w-3xl",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h2",{className:"text-lg font-bold text-yellow-400",children:"Geo Analysis:"}),s.jsxs("div",{className:"flex  gap-6",children:[s.jsx("div",{className:"w-full h-[300px]",children:s.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"})}),s.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:[s.jsx("h3",{className:"text-red-500 font-bold text-xl mb-2 text-center",children:"Alert"}),s.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[s.jsx(Xh,{size:25,className:"text-yellow-300 mt-1"}),s.jsx("p",{className:"text-md",children:"Region Mismatched Detected"})]}),s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Xh,{size:25,className:"text-yellow-300 mt-1"}),s.jsx("p",{className:"text-md",children:"Distance anomaly: 800km deviation in 10 mins"})]})]})]})]}),s.jsxs("div",{className:" pt-6",children:[s.jsx("h3",{className:"text-yellow-400 font-semibold mb-4",children:"KYC Document:"}),s.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[s.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"}),s.jsx("p",{className:"text-sm text-red-800 font-medium",children:"Mismatched With System Record"})]}),s.jsxs("div",{className:"flex justify-between gap-2 pb-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("img",{src:"/card1.jpg",alt:"Front Side",className:"w-56 h-auto rounded shadow-md"}),s.jsx("p",{className:"text-sm text-yellow-300 text-center text-semibold",children:"Front Side"})]}),s.jsxs("div",{className:"flex gap-4 space-y-2",children:[s.jsxs("div",{children:[s.jsx("img",{src:"/card2.jpg",alt:"Back Side",className:"w-56 h-auto rounded shadow-md"}),s.jsx("p",{className:"text-sm text-yellow-300 text-center text-semibold pt-2",children:"Back Side"})]}),s.jsxs("div",{className:"self-start bg-gradient-to-br from-green-900 to-green-500 px-2 py-4 rounded-md shadow-lg",children:[s.jsx("h4",{className:"text-red-800 font-bold text-lg mb-1 text-center",children:"Alert"}),s.jsxs("div",{className:"flex justify-center gap-4",children:[s.jsx("div",{className:"",children:s.jsx(Xh,{size:30,className:"text-yellow-300 mt-1"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-yellow-200",children:"Duplicate CNIC detected in 2 accounts:"}),s.jsxs("ul",{className:"text-xs pl-4 text-yellow-100 list-disc",children:[s.jsx("li",{children:"CUST-7834 (this user)"}),s.jsx("li",{children:"CUST-7921 (flagged last week)"})]})]})]})]})]})]})]}),s.jsxs("div",{className:"flex justify-center gap-10 border-t pt-6 border-yellow-300",children:[s.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"}),s.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"}),s.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"}),s.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"})]})]})})}),IZ=()=>s.jsxs("div",{className:"min-h-screen",children:[s.jsx(ep,{}),s.jsx("div",{children:s.jsx("div",{className:"flex items-center gap-2 py-4 px-6",children:s.jsxs(De,{to:"/overview",className:"flex items-center gap-2",children:[s.jsx(Vf,{size:30,className:"cursor-pointer text-lg"}),s.jsx("span",{className:"text-lg font-semibold",children:"Back"})]})})}),s.jsxs("div",{className:" flex flex-col md:flex-row gap-8 justify-center items-start p-6 font-sans",children:[s.jsxs("div",{className:"bg-[#006C45] rounded-xl px-6 py-10 w-full md:w-[500px] shadow-lg",children:[s.jsx("div",{className:"flex justify-center -mt-1",children:s.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"})}),s.jsxs("div",{className:"mt-4 text-base space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold text-xl",children:"Name:"}),s.jsx("span",{className:"text-xl",children:"Farhan Ali"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold text-xl",children:"User ID:"}),s.jsx("span",{className:"text-xl",children:"CUST-7834"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"font-semibold text-xl",children:"Phone:"}),s.jsx("span",{className:"text-xl",children:"+92xxxxxxxxx"})]}),s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"font-semibold text-xl",children:"KYC Status:"}),s.jsxs("span",{className:"flex items-center gap-1 text-xl text-green-300",children:[s.jsx(gq,{})," Verified"]})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsx("span",{className:"font-semibold block mb-2 text-base",children:"Fraud Score Meter:"}),s.jsxs("div",{className:"w-full h-3 bg-gray-300 rounded-full relative",children:[s.jsx("div",{className:"h-3 bg-gradient-to-r from-yellow-400 via-yellow-500 to-green-400 rounded-full",style:{width:"70%"}}),s.jsx("div",{className:"absolute text-[10px] left-0 ",children:"10"}),s.jsx("div",{className:"absolute text-[10px] left-[70%] ",children:"60"}),s.jsx("div",{className:"absolute text-[10px] right-0",children:"100"})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsx("span",{className:"font-semibold block mb-2 text-xl",children:"Flag History:"}),s.jsxs("ul",{className:"list-disc list-inside space-y-1 text-lg",children:[s.jsx("li",{children:"3 ride cancellations in 1 day (24-Jul)"}),s.jsx("li",{children:"Logged in from 2 devices simultaneously"}),s.jsx("li",{children:"Duplicate payment attempts (same card ID)"})]})]})]}),s.jsxs("div",{className:"bg-[#004431] rounded-xl px-4 py-4 w-full md:w-[400px] shadow-lg relative",children:[s.jsxs("div",{className:"flex justify-between items-start mb-3",children:[s.jsx("h2",{className:" text-base font-semibold",children:"Booking Pattern"}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("label",{className:"text-[7px] ",children:"Date Range:"}),s.jsx("input",{type:"date",className:"bg-transparent  border border-yellow-300 rounded px-1 py-[2px] text-[9px] text-yellow-300 focus:outline-none"})]}),s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("label",{className:"text-[7px] ",children:"To"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-300 rounded px-1 py-[2px] text-[9px]  focus:outline-none"})]})]})]}),s.jsxs("div",{className:"text-[15px] space-y-2",children:[s.jsx("h2",{className:"font-semibold text-xl",children:"Time Line"}),s.jsxs("ul",{className:"list-disc space-y-1 text-sm px-6",children:[s.jsx("li",{children:"24 Jul, 2:00 PM: Cancelled ride (same driver as before)"}),s.jsx("li",{children:"24 Jul, 2:00 PM: Cancelled ride again (same pickup point)"}),s.jsx("li",{children:"24 Jul, 2:00 PM: No-show"})]})]}),s.jsxs("ul",{className:"mt-4 text-sm list-disc list-inside space-y-2",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(bR,{size:25})," ",s.jsx("span",{className:"underline text-lg font-semibold",children:"Repeated behavior"})]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(qq,{size:25})," ",s.jsx("span",{className:"underline text-lg font-semibold",children:"Same pickup/drop location flagged"})]})]})]})]}),s.jsx(LZ,{}),s.jsx(zZ,{})]}),FZ=()=>s.jsxs("div",{className:"flex min-h-screen  ",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1",children:[s.jsx(ep,{}),s.jsxs("div",{className:"py-8 font-sans px-6 mt-10",children:[s.jsx("h3",{className:"text-yellow-400 mb-4 text-xl font-semibold px-2",children:"Rule List:"}),s.jsx("div",{className:"flex justify-center",children:s.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)=>s.jsxs("div",{className:"flex justify-between items-center gap-4 py-2",children:[s.jsx("span",{className:"w-1/3",children:t.label}),s.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"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full",children:"Save"}),s.jsx(Dh,{size:25,className:"px-1 py-1 rounded-full bg-yellow-300 text-[#013220] cursor-pointer"})]})]},e))})}),s.jsx("h3",{className:"text-yellow-400 mb-4 mt-10 text-xl font-semibold px-2",children:"Editable Inputs:"}),s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"overflow-x-auto w-full max-w-3xl rounded-xl border border-yellow-500",children:s.jsx("table",{className:"w-full border-collapse text-sm text-left",children:s.jsxs("tbody",{children:[s.jsxs("tr",{children:[s.jsx("td",{className:"border border-yellow-500 px-4 py-6 font-medium",children:"Threshold values"}),s.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:s.jsx("input",{type:"number",defaultValue:3,className:"bg-transparent   border border-yellow-400 rounded-full px-1 py-1 w-16 text-center"})}),s.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full",children:"Save"}),s.jsx(Dh,{size:25,className:"p-1 rounded-full text-[#013220] bg-yellow-400 cursor-pointer"})]})})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"border border-yellow-500 px-4 py-6 font-medium",children:"Rule severity level"}),s.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:s.jsxs("div",{className:"flex justify-center gap-6",children:[s.jsxs("label",{className:"flex items-center gap-1",children:[s.jsx("input",{type:"radio",name:"severity"})," Low"]}),s.jsxs("label",{className:"flex items-center gap-1",children:[s.jsx("input",{type:"radio",name:"severity"})," Medium"]}),s.jsxs("label",{className:"flex items-center gap-1",children:[s.jsx("input",{type:"radio",name:"severity"})," High"]})]})}),s.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full",children:"Save"}),s.jsx(Dh,{size:25,className:"p-1 rounded-full text-[#013220] bg-yellow-400 cursor-pointer"})]})})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"border border-yellow-500 px-4 py-6 font-medium",children:"Fake Referral Pattern"}),s.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:s.jsxs("div",{className:"flex gap-4",children:[s.jsxs("label",{className:"flex items-center gap-1",children:[s.jsx("input",{type:"checkbox",className:"accent-[#013220] focus:right-0",defaultChecked:!0})," Warn User"]}),s.jsxs("label",{className:"flex items-center gap-1",children:[s.jsx("input",{type:"checkbox",className:"accent-[#013220] focus:right-0",defaultChecked:!0})," Flag for Review"]}),s.jsxs("label",{className:"flex items-center gap-1",children:[s.jsx("input",{type:"checkbox",className:"accent-[#013220] focus:right-0",defaultChecked:!0})," Auto Lock Account"]})]})}),s.jsx("td",{className:"border border-yellow-500 px-4 py-4",children:s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx("button",{className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full",children:"Save"}),s.jsx(Dh,{size:25,className:"p-1 rounded-full text-[#013220] bg-yellow-400 cursor-pointer"})]})})]})]})})})}),s.jsxs("div",{className:"flex justify-center gap-6 mt-10",children:[s.jsx("button",{className:"bg-yellow-400 text-[#013220] font-bold px-8 py-2 rounded-full shadow-md",children:"Save Rules"}),s.jsx("button",{className:"bg-yellow-400 text-[#013220] font-bold px-8 py-2 rounded-full shadow-md",children:"Cancel"})]})]})]})]}),BZ=()=>{const[t,e]=E.useState("Recovery"),r=["Recovery","Delivery","Car Services","Movers"];return s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between mx-4 mb-4",children:[s.jsx("div",{className:"flex gap-4",children:r.map(a=>s.jsx("button",{onClick:()=>e(a),className:`px-4 py-2 rounded transition ${t===a?"bg-yellow-400 text-black":"border border-yellow-400"}`,children:a},a))}),s.jsxs("div",{className:"bg-yellow-400 text-black rounded-full flex items-center font-semibold px-4 text-sm",children:[s.jsx("label",{htmlFor:"",children:"Sort By:"}),s.jsx("select",{className:"bg-transparent",children:s.jsx("option",{value:"",children:"Region"})})]})]}),s.jsx("div",{className:"w-full flex justify-center items-center p-4 rounded",children:s.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"})}),s.jsxs("p",{className:"mt-4 text-center",children:["Selected Service: ",s.jsx("span",{className:"font-bold",children:t})]})]})},HZ=({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 s.jsx(Jr,{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 YZ=[{total:"Total Booking",percent:"0",icon:$Z,chartData:[5,10,8,12,15]},{total:"Active Driver",percent:"0",icon:oG,chartData:[2,6,4,8,10]},{total:"Total Revenue",percent:0,icon:wq,chartData:[20,25,22,30,28]},{total:"Pending Approvals",percent:"Loading...",icon:DR,chartData:[1,3,2,4,5]}],UZ=()=>{const{user:t,isAuthenticated:e}=un(l=>l.auth),{data:r,isLoading:a,error:n}=FX(void 0,{skip:!e}),i=YZ.map(l=>l.total==="Pending Approvals"?{...l,percent:a?"Loading...":n?`Error: ${n?.message||"Unknown"}`:r?.pendingApprovals?.serviceProviderApprovals?.totalPending||r?.pendingApprovals?.totalPendingRequests||"0"}:l.total==="Total Revenue"?(console.log("Total Revenue Data:",r?.systemTotalEarnings),{...l,percent:a?"Loading...":n?`Error: ${n?.message||"Unknown"}`:r?.systemTotalEarnings?.totalMLMAmount||"0"}):l);return s.jsxs("div",{className:"text-[#DDC104] mr-10 px-10 py-8",children:[s.jsxs("div",{className:"flex justify-end pb-1",children:[s.jsx("label",{className:"text-sm text-[#DDC104] mr-2",children:"Sort By:"}),s.jsxs("select",{className:"bg-transparent text-[#DDC104] text-sm focus:outline-none",children:[s.jsx("option",{value:"monthly",className:"bg-yellow-400 text-black",children:"Monthly"}),s.jsx("option",{value:"weekly",className:"bg-yellow-400 text-black",children:"Weekly"}),s.jsx("option",{value:"yearly",className:"bg-yellow-400 text-black",children:"Yearly"})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-12",children:i.map((l,o)=>{const c=l.icon;return s.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:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx(c,{className:"text-4xl"}),s.jsx("p",{className:"text-xl font-bold m-0 tracking-wide",children:l.total})]}),s.jsx("h2",{className:"text-3xl font-bold",children:l.percent}),s.jsx("div",{className:"w-full pr-5 pb-5",children:s.jsx(HZ,{data:l.chartData})})]},o)})})]})},WZ=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1",children:[s.jsx(UZ,{}),s.jsx(BZ,{})]})]}),XZ=()=>{const t=Fn(),{dashboardData:e,leaderboard:r,loading:a,error:n}=un(l=>l.mlm);if(E.useEffect(()=>{t(Lg()),t(zg())},[t]),a)return s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"text-lg",children:"Loading MLM data..."})});if(n)return s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsxs("div",{className:"text-lg text-red-500",children:["Error: ",n]})});const i=e?.currentBalances?.ddr||0;return s.jsxs("div",{className:"w-[85%] mx-auto",children:[s.jsxs("div",{className:"flex justify-between items-center m-6",children:[s.jsxs("h2",{className:"text-lg font-semibold",children:["DDR Balance: $",i.toFixed(2)]}),r&&s.jsxs("div",{className:"text-sm text-gray-600",children:["Leaderboard Updated: ",new Date(r.leaderboard?.lastUpdated).toLocaleDateString()]})]}),s.jsxs("div",{className:"border mx-auto border-yellow-400 w-[95%] px-8 py-4 rounded",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-yellow-600",children:"DDR Leaderboard"}),s.jsxs("div",{className:"text-sm text-gray-600",children:["Last updated: ",r?.lastUpdated?new Date(r.lastUpdated).toLocaleString():"Just now"]})]}),s.jsxs("table",{className:"w-full border-collapse table-fixed",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400 text-left",children:[s.jsx("th",{className:"px-4 py-2",children:"Rank"}),s.jsx("th",{className:"px-4 py-2",children:"Full Name"}),s.jsx("th",{className:"px-4 py-2",children:"Total Earnings"}),s.jsx("th",{className:"px-4 py-2",children:"Level 1"}),s.jsx("th",{className:"px-4 py-2",children:"Level 2"}),s.jsx("th",{className:"px-4 py-2",children:"Level 3"}),s.jsx("th",{className:"px-4 py-2",children:"Level 4"})]})}),s.jsx("tbody",{children:r?.leaderboard?.topEarners?.length>0?r.leaderboard.topEarners.map((l,o)=>s.jsxs("tr",{className:"text-left hover:bg-gray-50",children:[s.jsx("td",{className:"px-4 py-2",children:s.jsxs("span",{className:"font-bold text-yellow-600",children:["#",l.rank]})}),s.jsx("td",{className:"px-4 py-2",children:s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold",children:l.name}),l.username&&s.jsxs("div",{className:"text-sm text-gray-600",children:["@",l.username]})]})}),s.jsxs("td",{className:"px-4 py-2 font-bold text-green-600",children:["$",l.earnings]}),s.jsxs("td",{className:"px-4 py-2 font-semibold",children:["$",l.levelBreakdown?.level1||0]}),s.jsxs("td",{className:"px-4 py-2 font-semibold",children:["$",l.levelBreakdown?.level2||0]}),s.jsxs("td",{className:"px-4 py-2 font-semibold",children:["$",l.levelBreakdown?.level3||0]}),s.jsxs("td",{className:"px-4 py-2 font-semibold",children:["$",l.levelBreakdown?.level4||0]})]},o)):s.jsx("tr",{children:s.jsx("td",{colSpan:"7",className:"px-4 py-8 text-center text-gray-500",children:"No leaderboard data available"})})})]}),s.jsxs("div",{className:"mt-4 text-center",children:[s.jsxs("div",{className:"text-sm text-gray-600",children:["Total Participants: ",r?.leaderboard?.totalParticipants||0]}),s.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"})]})]})]})},VZ=()=>{const[t,e]=E.useState([]),[r,a]=E.useState(null),[n,i]=E.useState(null),[l,o]=E.useState(null),[c,d]=E.useState(!0),[h,p]=E.useState(null),[m,x]=E.useState(!1),[b,y]=E.useState({name:"",requirement:"",duration:"",reward:"",type:"solo",newbieRidesOnly:!1,description:""});E.useEffect(()=>{(async()=>{try{d(!0);const A=await fetch("https://aaaogo.xyz/api/mlm/bbr/campaign");if(!A.ok)throw new Error(`Failed to fetch campaign data: ${A.status} ${A.statusText}`);const T=await A.json();if(console.log("Campaign API Response:",T),!T.success)throw new Error(T.message||"Campaign API returned an error");a(T.data?.currentCampaign||null);const M=await fetch("https://aaaogo.xyz/api/mlm/bbr/leaderboard");if(!M.ok)throw new Error(`Failed to fetch leaderboard data: ${M.status} ${M.statusText}`);const O=await M.json();if(console.log("Leaderboard API Response:",O),!O.success||!O.data)throw new Error("Invalid leaderboard API response format");e(O.data.leaderboard||[]),i(O.data.userPosition||null),o(O.data.pagination||null),d(!1)}catch(A){console.error("Fetch error:",A),p(A.message),d(!1),Ne.error(A.message)}})()},[]);const v=k=>{const{name:A,value:T,type:M,checked:O}=k.target;y(_=>({..._,[A]:M==="checkbox"?O:T}))},N=async k=>{if(k.preventDefault(),!b.name||!b.requirement||!b.duration||!b.reward){Ne.error("All fields except newbieRidesOnly and description are required.");return}try{const M=await fetch("https://aaaogo.xyz/api/mlm/admin/bbr/campaign",{method:m?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b.name,requirement:Number(b.requirement),duration:Number(b.duration),reward:Number(b.reward),type:b.type,newbieRidesOnly:b.newbieRidesOnly,description:b.description})});if(!M.ok)throw new Error(`Failed to ${m?"update":"create"} campaign: ${M.status} ${M.statusText}`);const O=await M.json();if(!O.success)throw new Error(O.message||`Failed to ${m?"update":"create"} campaign`);Ne.success(O.message||`Campaign ${m?"updated":"created"} successfully`),y({name:"",requirement:"",duration:"",reward:"",type:"solo",newbieRidesOnly:!1,description:""}),x(!1);const _=await fetch("https://aaaogo.xyz/api/mlm/bbr/campaign");if(_.ok){const R=await _.json();console.log("Refetched Campaign Data:",R),a(R.data?.currentCampaign||null)}else Ne.error("Failed to refresh campaign data")}catch(A){console.error(`${m?"Update":"Create"} campaign error:`,A),Ne.error(A.message)}},C=()=>{r&&(y({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 k=await fetch("https://aaaogo.xyz/api/mlm/admin/bbr/campaign",{method:"DELETE",headers:{"Content-Type":"application/json"}});if(!k.ok)throw new Error(`Failed to delete campaign: ${k.status} ${k.statusText}`);const A=await k.json();if(!A.success)throw new Error(A.message||"Failed to delete campaign");Ne.success(A.message||"Campaign deleted successfully"),a(null),y({name:"",requirement:"",duration:"",reward:"",type:"solo",newbieRidesOnly:!1,description:""}),x(!1)}catch(k){console.error("Delete campaign error:",k),Ne.error(k.message)}};return s.jsxs("div",{className:"p-4 rounded-lg text-yellow-400",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Bonus Booster Rewards (BBR)"}),s.jsxs("div",{className:"mb-6 p-4 border border-yellow-400 rounded-lg",children:[s.jsx("h3",{className:"text-md font-semibold mb-2",children:m?"Update Campaign":"Create New Campaign"}),s.jsxs("form",{onSubmit:N,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm",children:"Campaign Name"}),s.jsx("input",{type:"text",name:"name",value:b.name,onChange:v,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., Weekly Turbo Booster"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm",children:"Requirement (Rides)"}),s.jsx("input",{type:"number",name:"requirement",value:b.requirement,onChange:v,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 100"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm",children:"Duration (Days)"}),s.jsx("input",{type:"number",name:"duration",value:b.duration,onChange:v,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 7"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm",children:"Reward (AED)"}),s.jsx("input",{type:"number",name:"reward",value:b.reward,onChange:v,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 550"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm",children:"Type"}),s.jsxs("select",{name:"type",value:b.type,onChange:v,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",children:[s.jsx("option",{value:"solo",children:"Solo"}),s.jsx("option",{value:"team",children:"Team"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm",children:"Description"}),s.jsx("textarea",{name:"description",value:b.description,onChange:v,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., Complete rides to earn rewards!"})]}),s.jsx("div",{children:s.jsxs("label",{className:"flex items-center text-sm",children:[s.jsx("input",{type:"checkbox",name:"newbieRidesOnly",checked:b.newbieRidesOnly,onChange:v,className:"mr-2"}),"Newbie Rides Only"]})}),s.jsxs("div",{className:"flex gap-4",children:[s.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&&s.jsx("button",{type:"button",onClick:()=>{x(!1),y({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&&s.jsx("p",{className:"text-center",children:"Loading data..."}),h&&s.jsxs("p",{className:"text-red-500 text-center",children:["Error: ",h]}),r&&!c&&!h?s.jsxs("div",{className:"mb-6 p-4 border border-yellow-400 rounded-lg",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h3",{className:"text-md font-semibold",children:r.name}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:C,className:"px-3 py-1 bg-yellow-400 text-black rounded hover:bg-yellow-500",children:"Edit"}),s.jsx("button",{onClick:S,className:"px-3 py-1 bg-red-600 text-white rounded hover:bg-red-700",children:"Delete"})]})]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Requirement:"})," ",r.requirement," rides"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Reward:"})," AED ",r.reward?.amount||"N/A"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Duration:"})," ",r.duration," days"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Period:"})," ",r.startDate&&r.endDate?`${new Date(r.startDate).toLocaleDateString()} - ${new Date(r.endDate).toLocaleDateString()}`:"N/A"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Time Left:"})," ",r.timeLeft?`${r.timeLeft.days||0} days, ${r.timeLeft.hours||0} hours`:"N/A"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Type:"})," ",r.type]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Newbie Rides Only:"})," ",r.newbieRidesOnly?"Yes":"No"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Description:"})," ",r.description||"N/A"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Total Participants:"})," ",r.totalParticipants||0]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Total Winners:"})," ",r.totalWinners||0]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Total Reward Distributed:"})," AED ",r.totalRewardDistributed||0]})]}):!c&&!h?s.jsx("p",{className:"text-center",children:"No active campaign available"}):null,n&&!c&&!h&&s.jsxs("div",{className:"mb-6 p-4 border border-yellow-400 rounded-lg",children:[s.jsx("h3",{className:"text-md font-semibold mb-2",children:"Your Position"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Rank:"})," ",n.rank||"Not ranked"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Rides:"})," ",n.rides||0]})]}),!c&&!h&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-md font-semibold mb-2",children:"Leaderboard"}),t.length>0?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full border border-yellow-400 text-sm",children:[s.jsx("thead",{className:"border-b border-yellow-400",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3 py-2",children:"Rank"}),s.jsx("th",{className:"px-3 py-2",children:"Name"}),s.jsx("th",{className:"px-3 py-2",children:"Role"}),s.jsx("th",{className:"px-3 py-2",children:"Rides"}),s.jsx("th",{className:"px-3 py-2",children:"Ride Type"}),s.jsx("th",{className:"px-3 py-2",children:"Status"}),s.jsx("th",{className:"px-3 py-2",children:"Reward"})]})}),s.jsx("tbody",{children:t.map((k,A)=>s.jsxs("tr",{className:"text-center hover:bg-[#014b38]",children:[s.jsx("td",{className:"px-3 py-2",children:k.rank}),s.jsx("td",{className:"px-3 py-2",children:k.name.trim()}),s.jsx("td",{className:"px-3 py-2",children:k.role}),s.jsx("td",{className:"px-3 py-2",children:k.rides}),s.jsx("td",{className:"px-3 py-2",children:k.rideType}),s.jsx("td",{className:"px-3 py-2",children:k.status}),s.jsxs("td",{className:"px-3 py-2",children:["AED ",k.reward]})]},A))})]})}):s.jsx("p",{className:"text-center",children:"No leaderboard data available"})]}),l&&!c&&!h&&s.jsxs("div",{className:"mb-6 text-sm",children:[s.jsxs("p",{children:["Page: ",l.page," of ",l.hasMore?"multiple":"1"]}),s.jsxs("p",{children:["Items per page: ",l.limit]})]})]})},qZ=()=>{const[t,e]=E.useState(null),[r,a]=E.useState(!0),[n,i]=E.useState(null),[l,o]=E.useState({requiredPGP:"",requiredTGP:"",retirementAge:"",rewardAmount:""}),[c,d]=E.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 b=await fetch("https://aaaogo.xyz/api/mlm/admin/hlr/config");if(b.ok){const y=await b.json();y.success&&y.data&&o({requiredPGP:y.data.requiredPGP||"",requiredTGP:y.data.requiredTGP||"",retirementAge:y.data.retirementAge||"",rewardAmount:y.data.rewardAmount||""})}}catch(b){console.error("Failed to fetch HLR config:",b)}},m=b=>{const{name:y,value:v}=b.target;o(N=>({...N,[y]:v}))},x=async b=>{b.preventDefault(),d(!0);try{const y={};if(l.requiredPGP&&l.requiredPGP.trim()!==""&&(y.requiredPGP=Number(l.requiredPGP)),l.requiredTGP&&l.requiredTGP.trim()!==""&&(y.requiredTGP=Number(l.requiredTGP)),l.retirementAge&&l.retirementAge.trim()!==""&&(y.retirementAge=Number(l.retirementAge)),l.rewardAmount&&l.rewardAmount.trim()!==""&&(y.rewardAmount=Number(l.rewardAmount)),Object.keys(y).length===0){Ne.error("Please fill at least one field to update");return}const v=await fetch("https://aaaogo.xyz/api/mlm/admin/hlr/config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(y)});if(!v.ok)throw new Error(`Failed to update HLR config: ${v.status} ${v.statusText}`);const N=await v.json();if(!N.success)throw new Error(N.message||"Failed to update HLR configuration");Ne.success(N.message||"HLR configuration updated successfully"),p()}catch(y){console.error("Update HLR config error:",y),Ne.error(y.message)}finally{d(!1)}};return E.useEffect(()=>{(async()=>{try{const y=await fetch("https://aaaogo.xyz/api/mlm/hlr/leaderboard?page=1&limit=20");if(!y.ok)throw new Error("Failed to fetch leaderboard data");const v=await y.json();e(v.data)}catch(y){i(y.message)}finally{a(!1)}})(),p()},[]),r?s.jsx("div",{className:"p-4 text-yellow-400",children:"Loading..."}):n?s.jsxs("div",{className:"p-4 text-red-500",children:["Error: ",n]}):s.jsxs("div",{className:"p-4 rounded-lg text-yellow-400",children:[s.jsx("h2",{className:"text-lg font-bold mb-4",children:"Honorpay Loyalty Reward (HLR)"}),s.jsxs("div",{className:"mb-6 p-4 border border-yellow-400 rounded-lg",children:[s.jsx("h3",{className:"text-md font-semibold mb-2 text-yellow-400",children:"HLR Configuration"}),s.jsxs("form",{onSubmit:x,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-yellow-400",children:"Required PGP"}),s.jsx("input",{type:"number",name:"requiredPGP",value:l.requiredPGP,onChange:m,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 250000"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-yellow-400",children:"Required TGP"}),s.jsx("input",{type:"number",name:"requiredTGP",value:l.requiredTGP,onChange:m,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 7000000"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-yellow-400",children:"Retirement Age"}),s.jsx("input",{type:"number",name:"retirementAge",value:l.retirementAge,onChange:m,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 60"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-yellow-400",children:"Reward Amount (AED)"}),s.jsx("input",{type:"number",name:"rewardAmount",value:l.rewardAmount,onChange:m,className:"w-full p-2 border border-yellow-400 rounded bg-transparent text-yellow-400",placeholder:"e.g., 75000"})]})]}),s.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"})]})]}),s.jsx("div",{className:"overflow-x-auto mb-8",children:s.jsxs("table",{className:"w-full border border-yellow-400 text-sm",children:[s.jsx("thead",{className:"border-b border-yellow-400",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3 py-2",children:"Accumulated PGP"}),s.jsx("th",{className:"px-3 py-2",children:"Accumulated TGP"}),s.jsx("th",{className:"px-3 py-2",children:"Activity Requirement"}),s.jsx("th",{className:"px-3 py-2",children:"Time Limitation"})]})}),s.jsx("tbody",{children:s.jsxs("tr",{className:"text-center hover:bg-[#014b38]",children:[s.jsx("td",{className:"px-3 py-2",children:h.accumulatedPGP}),s.jsx("td",{className:"px-3 py-2",children:h.accumulatedTGP}),s.jsx("td",{className:"px-3 py-2",children:h.active}),s.jsx("td",{className:"px-3 py-2",children:h.timeLimit})]})})]})}),t?.requirements&&s.jsxs("div",{className:"mb-8",children:[s.jsx("h3",{className:"text-md font-semibold mb-2",children:"Requirements"}),s.jsxs("ul",{className:"list-disc list-inside",children:[s.jsxs("li",{children:["Required PGP: ",t.requirements.requiredPGP.toLocaleString()]}),s.jsxs("li",{children:["Required TGP: ",t.requirements.requiredTGP.toLocaleString()]}),s.jsxs("li",{children:["Retirement Age: ",t.requirements.retirementAge]}),s.jsxs("li",{children:["Reward Amount: $",t.requirements.rewardAmount.toLocaleString()]})]})]}),t?.statistics&&s.jsxs("div",{className:"mb-8",children:[s.jsx("h3",{className:"text-md font-semibold mb-2",children:"Statistics"}),s.jsxs("ul",{className:"list-disc list-inside",children:[s.jsxs("li",{children:["Total Participating: ",t.statistics.totalParticipating]}),s.jsxs("li",{children:["Total Qualified: ",t.statistics.totalQualified]}),s.jsxs("li",{children:["Qualification Rate: ",t.statistics.qualificationRate,"%"]})]})]}),t?.leaderboard&&s.jsxs("div",{className:"overflow-x-auto",children:[s.jsx("h3",{className:"text-md font-semibold mb-2",children:"Leaderboard"}),s.jsxs("table",{className:"w-full border border-yellow-400 text-sm",children:[s.jsx("thead",{className:"border-b border-yellow-400",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3 py-2",children:"Rank"}),s.jsx("th",{className:"px-3 py-2",children:"Name"}),s.jsx("th",{className:"px-3 py-2",children:"Country"}),s.jsx("th",{className:"px-3 py-2",children:"PGP"}),s.jsx("th",{className:"px-3 py-2",children:"TGP"}),s.jsx("th",{className:"px-3 py-2",children:"Total Points"}),s.jsx("th",{className:"px-3 py-2",children:"Status"}),s.jsx("th",{className:"px-3 py-2",children:"Qualified"})]})}),s.jsx("tbody",{children:t.leaderboard.map(b=>s.jsxs("tr",{className:"text-center hover:bg-[#014b38]",children:[s.jsx("td",{className:"px-3 py-2",children:b.rank}),s.jsx("td",{className:"px-3 py-2",children:b.name}),s.jsxs("td",{className:"px-3 py-2",children:[b.flag," ",b.country.toUpperCase()]}),s.jsx("td",{className:"px-3 py-2",children:b.pgp.toLocaleString()}),s.jsx("td",{className:"px-3 py-2",children:b.tgp.toLocaleString()}),s.jsx("td",{className:"px-3 py-2",children:b.totalPoints.toLocaleString()}),s.jsx("td",{className:"px-3 py-2",children:b.status}),s.jsx("td",{className:"px-3 py-2",children:b.isQualified?"Yes":"No"})]},b.rank))})]})]}),t?.pagination&&s.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]})]})},R1=({label:t,percentage:e,isEditing:r,onPercentageChange:a})=>{const o=148*Math.PI,c=o-e/100*o;return s.jsxs("div",{className:"relative flex flex-col items-center",children:[s.jsxs("svg",{height:160,width:160,children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"goldGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s.jsx("stop",{offset:"0%",stopColor:"#FFD700"}),s.jsx("stop",{offset:"100%",stopColor:"#FFA500"})]})}),s.jsx("circle",{stroke:"#2E4437",fill:"transparent",strokeWidth:12,r:74,cx:80,cy:80}),s.jsx("circle",{stroke:"url(#goldGradient)",fill:"transparent",strokeWidth:12,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:c,r:74,cx:80,cy:80,style:{transform:"rotate(90deg)",transformOrigin:"50% 50%"}})]}),s.jsxs("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-center",children:[s.jsx("div",{className:"font-semibold text-sm",children:t}),r?s.jsx("input",{type:"number",value:e,onChange:d=>a(parseInt(d.target.value)||0),className:"w-12 bg-transparent border border-yellow-400 rounded text-center text-sm font-semibold",min:"0",max:"100"}):s.jsxs("div",{className:"font-semibold text-sm",children:[e,"%"]})]})]})},GZ=()=>{const[t,e]=E.useState({legA:40,legB:30,legC:30}),[r,a]=E.useState(!1),[n,i]=E.useState(!0),[l,o]=E.useState(null);E.useEffect(()=>{c()},[]);const c=async()=>{try{const m=await Gt.get("/mlm/admin/crr/leg-percentages");m.data.success&&(e(m.data.data.legPercentages),o(m.data.data.lastUpdated))}catch(m){console.error("Error fetching leg percentages:",m),Ne.error("Failed to fetch leg percentages")}finally{i(!1)}},d=async()=>{try{const m=await Gt.put("/mlm/admin/crr/global-leg-percentages",{legPercentages:t});m.data.success&&(o(m.data.data.lastUpdated),a(!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(b=>({...b,[m]:x}))},p=()=>{a(!1),c()};return n?s.jsx("div",{className:"text-yellow-400",children:"Loading team structure..."}):s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Team Structure Compliance"}),s.jsx("div",{className:"flex gap-2",children:r?s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:d,className:"px-3 py-1 bg-green-600 text-white rounded text-sm font-semibold hover:bg-green-500",children:"Save"}),s.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"})]}):s.jsx("button",{onClick:()=>a(!0),className:"px-3 py-1 bg-yellow-600 text-black rounded text-sm font-semibold hover:bg-yellow-500",children:"Edit"})})]}),s.jsxs("div",{className:"py-10 flex justify-around gap-16 w-2/3",children:[s.jsx(R1,{label:"Leg A",percentage:t.legA,isEditing:r,onPercentageChange:m=>h("legA",m)}),s.jsx(R1,{label:"Leg B",percentage:t.legB,isEditing:r,onPercentageChange:m=>h("legB",m)}),s.jsx(R1,{label:"Leg C",percentage:t.legC,isEditing:r,onPercentageChange:m=>h("legC",m)})]}),l&&s.jsxs("div",{className:"text-sm text-gray-400 mt-2",children:["Last updated: ",new Date(l).toLocaleString()]})]})},KZ=()=>{const[t,e]=E.useState(null),[r,a]=E.useState(null),[n,i]=E.useState(!0),[l,o]=E.useState(null),[c,d]=E.useState(null),[h,p]=E.useState(!1);E.useEffect(()=>{(async()=>{try{const N=await(await fetch("https://aaaogo.xyz/api/mlm/crr/leaderboard")).json();N.success?e(N.data.leaderboard):o("Failed to load leaderboard data")}catch{o("Error fetching leaderboard data")}finally{i(!1)}})()},[]),E.useEffect(()=>{(async()=>{try{const N=await(await fetch("https://aaaogo.xyz/api/mlm/admin/crr/config")).json();N.success?(a(N.data),d(N.data)):o("Failed to load CRR configuration")}catch{o("Error fetching CRR configuration")}})()},[]);const m=(y,v,N,C)=>{d(S=>{const k={...S};return C?k.crrRanks[v].requirements[C]=Number(y.target.value):N==="crrConfig"?k.crrConfig[y.target.name]=y.target.type==="checkbox"?y.target.checked:Number(y.target.value):k.crrRanks[v][N]=N==="reward"?Number(y.target.value):y.target.value,k})},x=async y=>{y.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?(a(N.data),p(!1),Ne.success("CRR configuration updated successfully!")):o("Failed to update CRR configuration")}catch{o("Error updating CRR configuration")}};if(n)return s.jsx("div",{className:"p-4 text-center text-yellow-400",children:"Loading..."});if(l)return s.jsx("div",{className:"p-4 text-center text-red-500",children:l});const b=t?.topEarners[0]||{};return s.jsxs("div",{className:"p-4 space-y-6 w-full text-yellow-400",children:[s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx("h2",{className:"text-lg font-bold",children:t?.title||"🥇 CRR Leaderboard – Top Earners:"}),s.jsxs("h3",{className:"text-base font-semibold",children:["Estimated AED Earned: ",s.jsxs("span",{children:[b.earnings||0," AED"]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("label",{className:"font-medium",children:"Auto Reset:"}),s.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"}),s.jsx("span",{className:"font-medium",children:"To"}),s.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"}),s.jsxs("span",{className:"ml-4 text-sm font-medium",children:["Days Until Reset: ",r?.crrConfig?.resetDay||"N/A"]})]})]}),s.jsxs("div",{className:"rounded-lg",children:[s.jsx("h3",{className:"text-base font-semibold mb-4",children:"CRR Rank Configuration"}),h?s.jsxs("form",{onSubmit:x,className:"space-y-4",children:[c?.crrRanks&&Object.keys(c.crrRanks).map(y=>s.jsxs("div",{className:"border border-yellow-400 p-4 rounded-lg",children:[s.jsxs("h4",{className:"text-sm font-semibold",children:[c.crrRanks[y].name," ",c.crrRanks[y].icon]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"Name"}),s.jsx("input",{type:"text",value:c.crrRanks[y].name,onChange:v=>m(v,y,"name"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"Icon"}),s.jsx("input",{type:"text",value:c.crrRanks[y].icon,onChange:v=>m(v,y,"icon"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"Reward"}),s.jsx("input",{type:"number",value:c.crrRanks[y].reward,onChange:v=>m(v,y,"reward"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"Status"}),s.jsxs("select",{value:c.crrRanks[y].status,onChange:v=>m(v,y,"status"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full",children:[s.jsx("option",{value:"Achieved",children:"Achieved"}),s.jsx("option",{value:"Locked",children:"Locked"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"PGP Requirement"}),s.jsx("input",{type:"number",value:c.crrRanks[y].requirements.pgp,onChange:v=>m(v,y,"requirements","pgp"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"TGP Requirement"}),s.jsx("input",{type:"number",value:c.crrRanks[y].requirements.tgp,onChange:v=>m(v,y,"requirements","tgp"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]})]})]},y)),s.jsxs("div",{className:"border border-yellow-400 p-4 rounded-lg",children:[s.jsx("h4",{className:"text-sm font-semibold",children:"General Configuration"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"Monthly Reset"}),s.jsx("input",{type:"checkbox",name:"monthlyReset",checked:c?.crrConfig.monthlyReset,onChange:y=>m(y,null,"crrConfig"),className:"ml-2"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"Reset Day"}),s.jsx("input",{type:"number",name:"resetDay",value:c?.crrConfig.resetDay,onChange:y=>m(y,null,"crrConfig"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"Point Value"}),s.jsx("input",{type:"number",name:"pointValue",value:c?.crrConfig.pointValue,onChange:y=>m(y,null,"crrConfig"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-sm",children:"Leaderboard Update Interval (ms)"}),s.jsx("input",{type:"number",name:"leaderboardUpdateInterval",value:c?.crrConfig.leaderboardUpdateInterval,onChange:y=>m(y,null,"crrConfig"),className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-sm w-full"})]})]})]}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx("button",{type:"submit",className:"bg-yellow-400 text-black px-4 py-2 rounded hover:bg-yellow-500",children:"Save Changes"}),s.jsx("button",{type:"button",onClick:()=>p(!1),className:"bg-gray-600 text-white px-4 py-2 rounded hover:bg-gray-700",children:"Cancel"})]})]}):s.jsxs("div",{children:[s.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"}),s.jsx("div",{className:"grid grid-cols-2 gap-4",children:r?.crrRanks&&Object.keys(r.crrRanks).map(y=>s.jsxs("div",{className:"border border-yellow-400 p-4 rounded-lg",children:[s.jsxs("h4",{className:"text-sm font-semibold",children:[r.crrRanks[y].name," ",r.crrRanks[y].icon]}),s.jsxs("p",{children:["Reward: ",r.crrRanks[y].reward," AED"]}),s.jsxs("p",{children:["Status: ",r.crrRanks[y].status]}),s.jsxs("p",{children:["PGP Requirement: ",r.crrRanks[y].requirements.pgp]}),s.jsxs("p",{children:["TGP Requirement: ",r.crrRanks[y].requirements.tgp]})]},y))}),s.jsxs("div",{className:"border border-yellow-400 p-4 rounded-lg mt-4",children:[s.jsx("h4",{className:"text-sm font-semibold",children:"General Configuration"}),s.jsxs("p",{children:["Monthly Reset: ",r?.crrConfig.monthlyReset?"Enabled":"Disabled"]}),s.jsxs("p",{children:["Reset Day: ",r?.crrConfig.resetDay]}),s.jsxs("p",{children:["Point Value: ",r?.crrConfig.pointValue]}),s.jsxs("p",{children:["Leaderboard Update Interval: ",r?.crrConfig.leaderboardUpdateInterval," ms"]}),s.jsxs("p",{children:["Last Updated:"," ",r?.lastUpdated?new Date(r.lastUpdated).toLocaleString("en-US",{timeZone:"Asia/Karachi"}):"N/A"]})]})]})]}),s.jsxs("div",{className:"rounded-lg",children:[s.jsx("h3",{className:"text-base font-semibold mb-4",children:"Top Earners"}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full border border-yellow-400 text-sm",children:[s.jsx("thead",{className:"border-b border-yellow-400 bg-[#013723]",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3 py-2",children:"Position"}),s.jsx("th",{className:"px-3 py-2",children:"Name"}),s.jsx("th",{className:"px-3 py-2",children:"Username"}),s.jsx("th",{className:"px-3 py-2",children:"Rank"}),s.jsx("th",{className:"px-3 py-2",children:"Earnings"}),s.jsx("th",{className:"px-3 py-2",children:"PGP"}),s.jsx("th",{className:"px-3 py-2",children:"TGP"}),s.jsx("th",{className:"px-3 py-2",children:"Total Points"}),s.jsx("th",{className:"px-3 py-2",children:"Progress (PGP/TGP/Overall)"})]})}),s.jsx("tbody",{children:t?.topEarners.length>0?t.topEarners.map(y=>s.jsxs("tr",{className:"text-center hover:bg-[#014b38]",children:[s.jsx("td",{className:"px-3 py-2",children:y.position}),s.jsxs("td",{className:"px-3 py-2",children:[y.name," ",y.rankIcon]}),s.jsx("td",{className:"px-3 py-2",children:y.username}),s.jsx("td",{className:"px-3 py-2",children:y.rank}),s.jsxs("td",{className:"px-3 py-2",children:[y.earnings," AED"]}),s.jsx("td",{className:"px-3 py-2",children:y.qualificationPoints.pgp}),s.jsx("td",{className:"px-3 py-2",children:y.qualificationPoints.tgp}),s.jsx("td",{className:"px-3 py-2",children:y.qualificationPoints.total}),s.jsxs("td",{className:"px-3 py-2",children:[y.progress.pgp,"% / ",y.progress.tgp,"% /"," ",y.progress.overall,"%"]})]},y.position)):s.jsx("tr",{children:s.jsx("td",{colSpan:"9",className:"px-3 py-2 text-gray-400",children:"No top earners available."})})})]})})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("p",{children:["Total Participants: ",t?.totalParticipants||0]}),s.jsxs("p",{children:["Last Updated:"," ",t?.lastUpdated?new Date(t.lastUpdated).toLocaleString("en-US",{timeZone:"Asia/Karachi"}):"N/A"]})]}),t?.tip&&s.jsx("div",{className:"p-4 bg-[#013723] rounded-lg text-center text-sm",children:s.jsx("p",{children:t.tip})}),s.jsxs("div",{className:"p-4 rounded-lg shadow-lg",children:[s.jsx("h3",{className:"text-base font-semibold mb-4",children:"Team Structure"}),s.jsx(GZ,{})]})]})},ZZ=()=>{const[t,e]=E.useState(null),[r,a]=E.useState(null),[n,i]=E.useState(!0),[l,o]=E.useState(null);return E.useEffect(()=>{(async()=>{try{i(!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),a(m.data)}catch(d){o("Failed to fetch data"),console.error(d)}finally{i(!1)}})()},[]),n?s.jsx("div",{className:"text-center py-10 text-yellow-400",children:"Loading..."}):l?s.jsx("div",{className:"text-center py-10 text-red-500",children:l}):s.jsxs("div",{className:"container mx-auto p-4 text-yellow-400",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Pakistan Leaderboard"}),s.jsx("div",{className:"grid gap-4",children:t?.leaderboard?.map(c=>s.jsxs("div",{className:"flex items-center p-4 border border-yellow-400 rounded-lg hover:bg-[#014b38]",children:[s.jsx("span",{className:"w-12 text-lg font-bold",children:c.rank}),s.jsx("span",{className:"w-8 text-2xl",children:c.flag}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-semibold",children:c.name}),s.jsxs("p",{className:"text-yellow-400",children:["@",c.username]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"text-yellow-400",children:["Points: ",c.totalPoints]}),s.jsxs("p",{className:"text-sm text-yellow-400",children:["Achieved: ",new Date(c.achievedAt).toLocaleDateString()]})]})]},c.username))})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Global Ambassadors"}),s.jsx("div",{className:"grid gap-4",children:r?.ambassadors?.map(c=>s.jsxs("div",{className:"flex items-center p-4 border border-yellow-400 rounded-lg hover:bg-[#014b38]",children:[s.jsx("span",{className:"w-8 text-2xl",children:c.flag}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-semibold",children:c.name}),s.jsxs("p",{className:"text-yellow-400",children:["@",c.username]}),s.jsxs("p",{className:"text-sm text-yellow-400",children:["Country: ",c.country||"N/A"]})]}),s.jsxs("div",{className:"text-right",children:[s.jsxs("p",{className:"text-yellow-400",children:["Earnings: ",c.totalEarnings]}),s.jsxs("p",{className:"text-sm text-yellow-400",children:["Achieved: ",new Date(c.achievedAt).toLocaleDateString()]})]})]},c.id))}),s.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 tp(t){return t+.5|0}const ol=(t,e,r)=>Math.max(Math.min(t,r),e);function Mh(t){return ol(tp(t*2.55),0,255)}function fl(t){return ol(tp(t*255),0,255)}function ii(t){return ol(tp(t/2.55)/100,0,1)}function qD(t){return ol(tp(t*100),0,100)}const Cn={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},Nj=[..."0123456789ABCDEF"],QZ=t=>Nj[t&15],JZ=t=>Nj[(t&240)>>4]+Nj[t&15],Gm=t=>(t&240)>>4===(t&15),eQ=t=>Gm(t.r)&&Gm(t.g)&&Gm(t.b)&&Gm(t.a);function tQ(t){var e=t.length,r;return t[0]==="#"&&(e===4||e===5?r={r:255&Cn[t[1]]*17,g:255&Cn[t[2]]*17,b:255&Cn[t[3]]*17,a:e===5?Cn[t[4]]*17:255}:(e===7||e===9)&&(r={r:Cn[t[1]]<<4|Cn[t[2]],g:Cn[t[3]]<<4|Cn[t[4]],b:Cn[t[5]]<<4|Cn[t[6]],a:e===9?Cn[t[7]]<<4|Cn[t[8]]:255})),r}const rQ=(t,e)=>t<255?e(t):"";function aQ(t){var e=eQ(t)?QZ:JZ;return t?"#"+e(t.r)+e(t.g)+e(t.b)+rQ(t.a,e):void 0}const nQ=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function N_(t,e,r){const a=e*Math.min(r,1-r),n=(i,l=(i+t/30)%12)=>r-a*Math.max(Math.min(l-3,9-l,1),-1);return[n(0),n(8),n(4)]}function sQ(t,e,r){const a=(n,i=(n+t/60)%6)=>r-r*e*Math.max(Math.min(i,4-i,1),0);return[a(5),a(3),a(1)]}function iQ(t,e,r){const a=N_(t,1,.5);let n;for(e+r>1&&(n=1/(e+r),e*=n,r*=n),n=0;n<3;n++)a[n]*=1-e-r,a[n]+=e;return a}function lQ(t,e,r,a,n){return t===n?(e-r)/a+(e<r?6:0):e===n?(r-t)/a+2:(t-e)/a+4}function uN(t){const r=t.r/255,a=t.g/255,n=t.b/255,i=Math.max(r,a,n),l=Math.min(r,a,n),o=(i+l)/2;let c,d,h;return i!==l&&(h=i-l,d=o>.5?h/(2-i-l):h/(i+l),c=lQ(r,a,n,h,i),c=c*60+.5),[c|0,d||0,o]}function hN(t,e,r,a){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,r,a)).map(fl)}function fN(t,e,r){return hN(N_,t,e,r)}function oQ(t,e,r){return hN(iQ,t,e,r)}function cQ(t,e,r){return hN(sQ,t,e,r)}function S_(t){return(t%360+360)%360}function dQ(t){const e=nQ.exec(t);let r=255,a;if(!e)return;e[5]!==a&&(r=e[6]?Mh(+e[5]):fl(+e[5]));const n=S_(+e[2]),i=+e[3]/100,l=+e[4]/100;return e[1]==="hwb"?a=oQ(n,i,l):e[1]==="hsv"?a=cQ(n,i,l):a=fN(n,i,l),{r:a[0],g:a[1],b:a[2],a:r}}function uQ(t,e){var r=uN(t);r[0]=S_(r[0]+e),r=fN(r),t.r=r[0],t.g=r[1],t.b=r[2]}function hQ(t){if(!t)return;const e=uN(t),r=e[0],a=qD(e[1]),n=qD(e[2]);return t.a<255?`hsla(${r}, ${a}%, ${n}%, ${ii(t.a)})`:`hsl(${r}, ${a}%, ${n}%)`}const GD={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"},KD={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 fQ(){const t={},e=Object.keys(KD),r=Object.keys(GD);let a,n,i,l,o;for(a=0;a<e.length;a++){for(l=o=e[a],n=0;n<r.length;n++)i=r[n],o=o.replace(i,GD[i]);i=parseInt(KD[l],16),t[o]=[i>>16&255,i>>8&255,i&255]}return t}let Km;function pQ(t){Km||(Km=fQ(),Km.transparent=[0,0,0,0]);const e=Km[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const mQ=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function gQ(t){const e=mQ.exec(t);let r=255,a,n,i;if(e){if(e[7]!==a){const l=+e[7];r=e[8]?Mh(l):ol(l*255,0,255)}return a=+e[1],n=+e[3],i=+e[5],a=255&(e[2]?Mh(a):ol(a,0,255)),n=255&(e[4]?Mh(n):ol(n,0,255)),i=255&(e[6]?Mh(i):ol(i,0,255)),{r:a,g:n,b:i,a:r}}}function xQ(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ii(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const _1=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Gc=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function bQ(t,e,r){const a=Gc(ii(t.r)),n=Gc(ii(t.g)),i=Gc(ii(t.b));return{r:fl(_1(a+r*(Gc(ii(e.r))-a))),g:fl(_1(n+r*(Gc(ii(e.g))-n))),b:fl(_1(i+r*(Gc(ii(e.b))-i))),a:t.a+r*(e.a-t.a)}}function Zm(t,e,r){if(t){let a=uN(t);a[e]=Math.max(0,Math.min(a[e]+a[e]*r,e===0?360:1)),a=fN(a),t.r=a[0],t.g=a[1],t.b=a[2]}}function C_(t,e){return t&&Object.assign(e||{},t)}function ZD(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=fl(t[3]))):(e=C_(t,{r:0,g:0,b:0,a:1}),e.a=fl(e.a)),e}function yQ(t){return t.charAt(0)==="r"?gQ(t):dQ(t)}let A_=class Sj{constructor(e){if(e instanceof Sj)return e;const r=typeof e;let a;r==="object"?a=ZD(e):r==="string"&&(a=tQ(e)||pQ(e)||yQ(e)),this._rgb=a,this._valid=!!a}get valid(){return this._valid}get rgb(){var e=C_(this._rgb);return e&&(e.a=ii(e.a)),e}set rgb(e){this._rgb=ZD(e)}rgbString(){return this._valid?xQ(this._rgb):void 0}hexString(){return this._valid?aQ(this._rgb):void 0}hslString(){return this._valid?hQ(this._rgb):void 0}mix(e,r){if(e){const a=this.rgb,n=e.rgb;let i;const l=r===i?.5:r,o=2*l-1,c=a.a-n.a,d=((o*c===-1?o:(o+c)/(1+o*c))+1)/2;i=1-d,a.r=255&d*a.r+i*n.r+.5,a.g=255&d*a.g+i*n.g+.5,a.b=255&d*a.b+i*n.b+.5,a.a=l*a.a+(1-l)*n.a,this.rgb=a}return this}interpolate(e,r){return e&&(this._rgb=bQ(this._rgb,e._rgb,r)),this}clone(){return new Sj(this.rgb)}alpha(e){return this._rgb.a=fl(e),this}clearer(e){const r=this._rgb;return r.a*=1-e,this}greyscale(){const e=this._rgb,r=tp(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 Zm(this._rgb,2,e),this}darken(e){return Zm(this._rgb,2,-e),this}saturate(e){return Zm(this._rgb,1,e),this}desaturate(e){return Zm(this._rgb,1,-e),this}rotate(e){return uQ(this._rgb,e),this}};/*!
 * Chart.js v4.5.0
 * https://www.chartjs.org
 * (c) 2025 Chart.js Contributors
 * Released under the MIT License
 */function ti(){}const vQ=(()=>{let t=0;return()=>t++})();function ut(t){return t==null}function Cr(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 Ln(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function bs(t,e){return Ln(t)?t:e}function it(t,e){return typeof t>"u"?e:t}const wQ=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,k_=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Lt(t,e,r){if(t&&typeof t.call=="function")return t.apply(r,e)}function wt(t,e,r,a){let n,i,l;if(Cr(t))for(i=t.length,n=0;n<i;n++)e.call(r,t[n],n);else if(ot(t))for(l=Object.keys(t),i=l.length,n=0;n<i;n++)e.call(r,t[l[n]],l[n])}function Nx(t,e){let r,a,n,i;if(!t||!e||t.length!==e.length)return!1;for(r=0,a=t.length;r<a;++r)if(n=t[r],i=e[r],n.datasetIndex!==i.datasetIndex||n.index!==i.index)return!1;return!0}function Sx(t){if(Cr(t))return t.map(Sx);if(ot(t)){const e=Object.create(null),r=Object.keys(t),a=r.length;let n=0;for(;n<a;++n)e[r[n]]=Sx(t[r[n]]);return e}return t}function D_(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function jQ(t,e,r,a){if(!D_(t))return;const n=e[t],i=r[t];ot(n)&&ot(i)?Es(n,i,a):e[t]=Sx(i)}function Es(t,e,r){const a=Cr(e)?e:[e],n=a.length;if(!ot(t))return t;r=r||{};const i=r.merger||jQ;let l;for(let o=0;o<n;++o){if(l=a[o],!ot(l))continue;const c=Object.keys(l);for(let d=0,h=c.length;d<h;++d)i(c[d],t,l,r)}return t}function Gh(t,e){return Es(t,e,{merger:NQ})}function NQ(t,e,r){if(!D_(t))return;const a=e[t],n=r[t];ot(a)&&ot(n)?Gh(a,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Sx(n))}const QD={"":t=>t,x:t=>t.x,y:t=>t.y};function SQ(t){const e=t.split("."),r=[];let a="";for(const n of e)a+=n,a.endsWith("\\")?a=a.slice(0,-1)+".":(r.push(a),a="");return r}function CQ(t){const e=SQ(t);return r=>{for(const a of e){if(a==="")break;r=r&&r[a]}return r}}function Xo(t,e){return(QD[e]||(QD[e]=CQ(e)))(t)}function pN(t){return t.charAt(0).toUpperCase()+t.slice(1)}const vf=t=>typeof t<"u",jl=t=>typeof t=="function",JD=(t,e)=>{if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0};function AQ(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const Ut=Math.PI,br=2*Ut,Cx=Number.POSITIVE_INFINITY,kQ=Ut/180,kr=Ut/2,oo=Ut/4,e6=Ut*2/3,T_=Math.log10,pl=Math.sign;function Vg(t,e,r){return Math.abs(t-e)<r}function t6(t){const e=Math.round(t);t=Vg(t,e,t/1e3)?e:t;const r=Math.pow(10,Math.floor(T_(t))),a=t/r;return(a<=1?1:a<=2?2:a<=5?5:10)*r}function DQ(t){const e=[],r=Math.sqrt(t);let a;for(a=1;a<r;a++)t%a===0&&(e.push(a),e.push(t/a));return r===(r|0)&&e.push(r),e.sort((n,i)=>n-i).pop(),e}function TQ(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Ax(t){return!TQ(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function MQ(t,e){const r=Math.round(t);return r-e<=t&&r+e>=t}function EQ(t,e,r){let a,n,i;for(a=0,n=t.length;a<n;a++)i=t[a][r],isNaN(i)||(e.min=Math.min(e.min,i),e.max=Math.max(e.max,i))}function di(t){return t*(Ut/180)}function PQ(t){return t*(180/Ut)}function r6(t){if(!Ln(t))return;let e=1,r=0;for(;Math.round(t*e)/e!==t;)e*=10,r++;return r}function M_(t,e){const r=e.x-t.x,a=e.y-t.y,n=Math.sqrt(r*r+a*a);let i=Math.atan2(a,r);return i<-.5*Ut&&(i+=br),{angle:i,distance:n}}function OQ(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function js(t){return(t%br+br)%br}function kx(t,e,r,a){const n=js(t),i=js(e),l=js(r),o=js(i-n),c=js(l-n),d=js(n-i),h=js(n-l);return n===i||n===l||a&&i===l||o>c&&d<h}function Pa(t,e,r){return Math.max(e,Math.min(r,t))}function RQ(t){return Pa(t,-32768,32767)}function No(t,e,r,a=1e-6){return t>=Math.min(e,r)-a&&t<=Math.max(e,r)+a}function mN(t,e,r){r=r||(l=>t[l]<e);let a=t.length-1,n=0,i;for(;a-n>1;)i=n+a>>1,r(i)?n=i:a=i;return{lo:n,hi:a}}const Cj=(t,e,r,a)=>mN(t,r,a?n=>{const i=t[n][e];return i<r||i===r&&t[n+1][e]===r}:n=>t[n][e]<r),_Q=(t,e,r)=>mN(t,r,a=>t[a][e]>=r);function LQ(t,e,r){let a=0,n=t.length;for(;a<n&&t[a]<e;)a++;for(;n>a&&t[n-1]>r;)n--;return a>0||n<t.length?t.slice(a,n):t}const E_=["push","pop","shift","splice","unshift"];function zQ(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),E_.forEach(r=>{const a="_onData"+pN(r),n=t[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value(...i){const l=n.apply(this,i);return t._chartjs.listeners.forEach(o=>{typeof o[a]=="function"&&o[a](...i)}),l}})})}function a6(t,e){const r=t._chartjs;if(!r)return;const a=r.listeners,n=a.indexOf(e);n!==-1&&a.splice(n,1),!(a.length>0)&&(E_.forEach(i=>{delete t[i]}),delete t._chartjs)}function P_(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const O_=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function R_(t,e){let r=[],a=!1;return function(...n){r=n,a||(a=!0,O_.call(window,()=>{a=!1,t.apply(e,r)}))}}function IQ(t,e){let r;return function(...a){return e?(clearTimeout(r),r=setTimeout(t,e,a)):t.apply(this,a),e}}const __=t=>t==="start"?"left":t==="end"?"right":"center",Ka=(t,e,r)=>t==="start"?e:t==="end"?r:(e+r)/2,FQ=(t,e,r,a)=>t===(a?"left":"right")?r:t==="center"?(e+r)/2:e,Qm=t=>t===0||t===1,n6=(t,e,r)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*br/r)),s6=(t,e,r)=>Math.pow(2,-10*t)*Math.sin((t-e)*br/r)+1,Kh={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*kr)+1,easeOutSine:t=>Math.sin(t*kr),easeInOutSine:t=>-.5*(Math.cos(Ut*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=>Qm(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=>Qm(t)?t:n6(t,.075,.3),easeOutElastic:t=>Qm(t)?t:s6(t,.075,.3),easeInOutElastic(t){return Qm(t)?t:t<.5?.5*n6(t*2,.1125,.45):.5+.5*s6(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-Kh.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?Kh.easeInBounce(t*2)*.5:Kh.easeOutBounce(t*2-1)*.5+.5};function L_(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function i6(t){return L_(t)?t:new A_(t)}function L1(t){return L_(t)?t:new A_(t).saturate(.5).darken(.1).hexString()}const BQ=["x","y","borderWidth","radius","tension"],HQ=["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:HQ},numbers:{type:"number",properties:BQ}}),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 YQ(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const l6=new Map;function UQ(t,e){e=e||{};const r=t+JSON.stringify(e);let a=l6.get(r);return a||(a=new Intl.NumberFormat(t,e),l6.set(r,a)),a}function gN(t,e,r){return UQ(e,r).format(t)}const WQ={values(t){return Cr(t)?t:""+t},numeric(t,e,r){if(t===0)return"0";const a=this.chart.options.locale;let n,i=t;if(r.length>1){const d=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(d<1e-4||d>1e15)&&(n="scientific"),i=XQ(t,r)}const l=T_(Math.abs(i)),o=isNaN(l)?1:Math.max(Math.min(-1*Math.floor(l),20),0),c={notation:n,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(c,this.options.ticks.format),gN(t,a,c)}};function XQ(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 z_={formatters:WQ};function VQ(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:z_.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 Vo=Object.create(null),Aj=Object.create(null);function Zh(t,e){if(!e)return t;const r=e.split(".");for(let a=0,n=r.length;a<n;++a){const i=r[a];t=t[i]||(t[i]=Object.create(null))}return t}function z1(t,e,r){return typeof e=="string"?Es(Zh(t,e),r):Es(Zh(t,""),e)}class qQ{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=a=>a.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=(a,n)=>L1(n.backgroundColor),this.hoverBorderColor=(a,n)=>L1(n.borderColor),this.hoverColor=(a,n)=>L1(n.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 z1(this,e,r)}get(e){return Zh(this,e)}describe(e,r){return z1(Aj,e,r)}override(e,r){return z1(Vo,e,r)}route(e,r,a,n){const i=Zh(this,e),l=Zh(this,a),o="_"+r;Object.defineProperties(i,{[o]:{value:i[r],writable:!0},[r]:{enumerable:!0,get(){const c=this[o],d=l[n];return ot(c)?Object.assign({},d,c):it(c,d)},set(c){this[o]=c}}})}apply(e){e.forEach(r=>r(this))}}var lr=new qQ({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[$Q,YQ,VQ]);function GQ(t){return!t||ut(t.size)||ut(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function o6(t,e,r,a,n){let i=e[n];return i||(i=e[n]=t.measureText(n).width,r.push(n)),i>a&&(a=i),a}function co(t,e,r){const a=t.currentDevicePixelRatio,n=r!==0?Math.max(r/2,.5):0;return Math.round((e-n)*a)/a+n}function c6(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function kj(t,e,r,a){I_(t,e,r,a,null)}function I_(t,e,r,a,n){let i,l,o,c,d,h,p,m;const x=e.pointStyle,b=e.rotation,y=e.radius;let v=(b||0)*kQ;if(x&&typeof x=="object"&&(i=x.toString(),i==="[object HTMLImageElement]"||i==="[object HTMLCanvasElement]")){t.save(),t.translate(r,a),t.rotate(v),t.drawImage(x,-x.width/2,-x.height/2,x.width,x.height),t.restore();return}if(!(isNaN(y)||y<=0)){switch(t.beginPath(),x){default:n?t.ellipse(r,a,n/2,y,0,0,br):t.arc(r,a,y,0,br),t.closePath();break;case"triangle":h=n?n/2:y,t.moveTo(r+Math.sin(v)*h,a-Math.cos(v)*y),v+=e6,t.lineTo(r+Math.sin(v)*h,a-Math.cos(v)*y),v+=e6,t.lineTo(r+Math.sin(v)*h,a-Math.cos(v)*y),t.closePath();break;case"rectRounded":d=y*.516,c=y-d,l=Math.cos(v+oo)*c,p=Math.cos(v+oo)*(n?n/2-d:c),o=Math.sin(v+oo)*c,m=Math.sin(v+oo)*(n?n/2-d:c),t.arc(r-p,a-o,d,v-Ut,v-kr),t.arc(r+m,a-l,d,v-kr,v),t.arc(r+p,a+o,d,v,v+kr),t.arc(r-m,a+l,d,v+kr,v+Ut),t.closePath();break;case"rect":if(!b){c=Math.SQRT1_2*y,h=n?n/2:c,t.rect(r-h,a-c,2*h,2*c);break}v+=oo;case"rectRot":p=Math.cos(v)*(n?n/2:y),l=Math.cos(v)*y,o=Math.sin(v)*y,m=Math.sin(v)*(n?n/2:y),t.moveTo(r-p,a-o),t.lineTo(r+m,a-l),t.lineTo(r+p,a+o),t.lineTo(r-m,a+l),t.closePath();break;case"crossRot":v+=oo;case"cross":p=Math.cos(v)*(n?n/2:y),l=Math.cos(v)*y,o=Math.sin(v)*y,m=Math.sin(v)*(n?n/2:y),t.moveTo(r-p,a-o),t.lineTo(r+p,a+o),t.moveTo(r+m,a-l),t.lineTo(r-m,a+l);break;case"star":p=Math.cos(v)*(n?n/2:y),l=Math.cos(v)*y,o=Math.sin(v)*y,m=Math.sin(v)*(n?n/2:y),t.moveTo(r-p,a-o),t.lineTo(r+p,a+o),t.moveTo(r+m,a-l),t.lineTo(r-m,a+l),v+=oo,p=Math.cos(v)*(n?n/2:y),l=Math.cos(v)*y,o=Math.sin(v)*y,m=Math.sin(v)*(n?n/2:y),t.moveTo(r-p,a-o),t.lineTo(r+p,a+o),t.moveTo(r+m,a-l),t.lineTo(r-m,a+l);break;case"line":l=n?n/2:Math.cos(v)*y,o=Math.sin(v)*y,t.moveTo(r-l,a-o),t.lineTo(r+l,a+o);break;case"dash":t.moveTo(r,a),t.lineTo(r+Math.cos(v)*(n?n/2:y),a+Math.sin(v)*y);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function xN(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 bN(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function yN(t){t.restore()}function KQ(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),ut(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 ZQ(t,e,r,a,n){if(n.strikethrough||n.underline){const i=t.measureText(a),l=e-i.actualBoundingBoxLeft,o=e+i.actualBoundingBoxRight,c=r-i.actualBoundingBoxAscent,d=r+i.actualBoundingBoxDescent,h=n.strikethrough?(c+d)/2:d;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(l,h),t.lineTo(o,h),t.stroke()}}function QQ(t,e){const r=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=r}function Dx(t,e,r,a,n,i={}){const l=Cr(e)?e:[e],o=i.strokeWidth>0&&i.strokeColor!=="";let c,d;for(t.save(),t.font=n.string,KQ(t,i),c=0;c<l.length;++c)d=l[c],i.backdrop&&QQ(t,i.backdrop),o&&(i.strokeColor&&(t.strokeStyle=i.strokeColor),ut(i.strokeWidth)||(t.lineWidth=i.strokeWidth),t.strokeText(d,r,a,i.maxWidth)),t.fillText(d,r,a,i.maxWidth),ZQ(t,r,a,d,i),a+=Number(n.lineHeight);t.restore()}function Tx(t,e){const{x:r,y:a,w:n,h:i,radius:l}=e;t.arc(r+l.topLeft,a+l.topLeft,l.topLeft,1.5*Ut,Ut,!0),t.lineTo(r,a+i-l.bottomLeft),t.arc(r+l.bottomLeft,a+i-l.bottomLeft,l.bottomLeft,Ut,kr,!0),t.lineTo(r+n-l.bottomRight,a+i),t.arc(r+n-l.bottomRight,a+i-l.bottomRight,l.bottomRight,kr,0,!0),t.lineTo(r+n,a+l.topRight),t.arc(r+n-l.topRight,a+l.topRight,l.topRight,0,-kr,!0),t.lineTo(r+l.topLeft,a)}const JQ=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,eJ=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function tJ(t,e){const r=(""+t).match(JQ);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 rJ=t=>+t||0;function vN(t,e){const r={},a=ot(e),n=a?Object.keys(e):e,i=ot(t)?a?l=>it(t[l],t[e[l]]):l=>t[l]:()=>t;for(const l of n)r[l]=rJ(i(l));return r}function F_(t){return vN(t,{top:"y",right:"x",bottom:"y",left:"x"})}function hd(t){return vN(t,["topLeft","topRight","bottomLeft","bottomRight"])}function zn(t){const e=F_(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ma(t,e){t=t||{},e=e||lr.font;let r=it(t.size,e.size);typeof r=="string"&&(r=parseInt(r,10));let a=it(t.style,e.style);a&&!(""+a).match(eJ)&&(console.warn('Invalid font style specified: "'+a+'"'),a=void 0);const n={family:it(t.family,e.family),lineHeight:tJ(it(t.lineHeight,e.lineHeight),r),size:r,style:a,weight:it(t.weight,e.weight),string:""};return n.string=GQ(n),n}function qt(t,e,r,a){let n,i,l;for(n=0,i=t.length;n<i;++n)if(l=t[n],l!==void 0&&(e!==void 0&&typeof l=="function"&&(l=l(e)),r!==void 0&&Cr(l)&&(l=l[r%l.length]),l!==void 0))return l}function aJ(t,e,r){const{min:a,max:n}=t,i=k_(e,(n-a)/2),l=(o,c)=>r&&o===0?0:o+c;return{min:l(a,-Math.abs(i)),max:l(n,i)}}function Vd(t,e){return Object.assign(Object.create(t),e)}function wN(t,e=[""],r,a,n=()=>t[0]){const i=r||t;typeof a>"u"&&(a=Y_("_fallback",t));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:a,_getTarget:n,override:o=>wN([o,...t],e,i,a)};return new Proxy(l,{deleteProperty(o,c){return delete o[c],delete o._keys,delete t[0][c],!0},get(o,c){return H_(o,c,()=>uJ(c,e,t,o))},getOwnPropertyDescriptor(o,c){return Reflect.getOwnPropertyDescriptor(o._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(o,c){return u6(o).includes(c)},ownKeys(o){return u6(o)},set(o,c,d){const h=o._storage||(o._storage=n());return o[c]=h[c]=d,delete o._keys,!0}})}function Nd(t,e,r,a){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:r,_stack:new Set,_descriptors:B_(t,a),setContext:i=>Nd(t,i,r,a),override:i=>Nd(t.override(i),e,r,a)};return new Proxy(n,{deleteProperty(i,l){return delete i[l],delete t[l],!0},get(i,l,o){return H_(i,l,()=>sJ(i,l,o))},getOwnPropertyDescriptor(i,l){return i._descriptors.allKeys?Reflect.has(t,l)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,l)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(i,l){return Reflect.has(t,l)},ownKeys(){return Reflect.ownKeys(t)},set(i,l,o){return t[l]=o,delete i[l],!0}})}function B_(t,e={scriptable:!0,indexable:!0}){const{_scriptable:r=e.scriptable,_indexable:a=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:r,indexable:a,isScriptable:jl(r)?r:()=>r,isIndexable:jl(a)?a:()=>a}}const nJ=(t,e)=>t?t+pN(e):e,jN=(t,e)=>ot(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function H_(t,e,r){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const a=r();return t[e]=a,a}function sJ(t,e,r){const{_proxy:a,_context:n,_subProxy:i,_descriptors:l}=t;let o=a[e];return jl(o)&&l.isScriptable(e)&&(o=iJ(e,o,t,r)),Cr(o)&&o.length&&(o=lJ(e,o,t,l.isIndexable)),jN(e,o)&&(o=Nd(o,n,i&&i[e],l)),o}function iJ(t,e,r,a){const{_proxy:n,_context:i,_subProxy:l,_stack:o}=r;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let c=e(i,l||a);return o.delete(t),jN(t,c)&&(c=NN(n._scopes,n,t,c)),c}function lJ(t,e,r,a){const{_proxy:n,_context:i,_subProxy:l,_descriptors:o}=r;if(typeof i.index<"u"&&a(t))return e[i.index%e.length];if(ot(e[0])){const c=e,d=n._scopes.filter(h=>h!==c);e=[];for(const h of c){const p=NN(d,n,t,h);e.push(Nd(p,i,l&&l[t],o))}}return e}function $_(t,e,r){return jl(t)?t(e,r):t}const oJ=(t,e)=>t===!0?e:typeof t=="string"?Xo(e,t):void 0;function cJ(t,e,r,a,n){for(const i of e){const l=oJ(r,i);if(l){t.add(l);const o=$_(l._fallback,r,n);if(typeof o<"u"&&o!==r&&o!==a)return o}else if(l===!1&&typeof a<"u"&&r!==a)return null}return!1}function NN(t,e,r,a){const n=e._rootScopes,i=$_(e._fallback,r,a),l=[...t,...n],o=new Set;o.add(a);let c=d6(o,l,r,i||r,a);return c===null||typeof i<"u"&&i!==r&&(c=d6(o,l,i,c,a),c===null)?!1:wN(Array.from(o),[""],n,i,()=>dJ(e,r,a))}function d6(t,e,r,a,n){for(;r;)r=cJ(t,e,r,a,n);return r}function dJ(t,e,r){const a=t._getTarget();e in a||(a[e]={});const n=a[e];return Cr(n)&&ot(r)?r:n||{}}function uJ(t,e,r,a){let n;for(const i of e)if(n=Y_(nJ(i,t),r),typeof n<"u")return jN(t,n)?NN(r,a,t,n):n}function Y_(t,e){for(const r of e){if(!r)continue;const a=r[t];if(typeof a<"u")return a}}function u6(t){let e=t._keys;return e||(e=t._keys=hJ(t._scopes)),e}function hJ(t){const e=new Set;for(const r of t)for(const a of Object.keys(r).filter(n=>!n.startsWith("_")))e.add(a);return Array.from(e)}function SN(){return typeof window<"u"&&typeof document<"u"}function CN(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Mx(t,e,r){let a;return typeof t=="string"?(a=parseInt(t,10),t.indexOf("%")!==-1&&(a=a/100*e.parentNode[r])):a=t,a}const B0=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function fJ(t,e){return B0(t).getPropertyValue(e)}const pJ=["top","right","bottom","left"];function _o(t,e,r){const a={};r=r?"-"+r:"";for(let n=0;n<4;n++){const i=pJ[n];a[i]=parseFloat(t[e+"-"+i+r])||0}return a.width=a.left+a.right,a.height=a.top+a.bottom,a}const mJ=(t,e,r)=>(t>0||e>0)&&(!r||!r.shadowRoot);function gJ(t,e){const r=t.touches,a=r&&r.length?r[0]:t,{offsetX:n,offsetY:i}=a;let l=!1,o,c;if(mJ(n,i,t.target))o=n,c=i;else{const d=e.getBoundingClientRect();o=a.clientX-d.left,c=a.clientY-d.top,l=!0}return{x:o,y:c,box:l}}function mo(t,e){if("native"in t)return t;const{canvas:r,currentDevicePixelRatio:a}=e,n=B0(r),i=n.boxSizing==="border-box",l=_o(n,"padding"),o=_o(n,"border","width"),{x:c,y:d,box:h}=gJ(t,r),p=l.left+(h&&o.left),m=l.top+(h&&o.top);let{width:x,height:b}=e;return i&&(x-=l.width+o.width,b-=l.height+o.height),{x:Math.round((c-p)/x*r.width/a),y:Math.round((d-m)/b*r.height/a)}}function xJ(t,e,r){let a,n;if(e===void 0||r===void 0){const i=t&&CN(t);if(!i)e=t.clientWidth,r=t.clientHeight;else{const l=i.getBoundingClientRect(),o=B0(i),c=_o(o,"border","width"),d=_o(o,"padding");e=l.width-d.width-c.width,r=l.height-d.height-c.height,a=Mx(o.maxWidth,i,"clientWidth"),n=Mx(o.maxHeight,i,"clientHeight")}}return{width:e,height:r,maxWidth:a||Cx,maxHeight:n||Cx}}const Jm=t=>Math.round(t*10)/10;function bJ(t,e,r,a){const n=B0(t),i=_o(n,"margin"),l=Mx(n.maxWidth,t,"clientWidth")||Cx,o=Mx(n.maxHeight,t,"clientHeight")||Cx,c=xJ(t,e,r);let{width:d,height:h}=c;if(n.boxSizing==="content-box"){const m=_o(n,"border","width"),x=_o(n,"padding");d-=x.width+m.width,h-=x.height+m.height}return d=Math.max(0,d-i.width),h=Math.max(0,a?d/a:h-i.height),d=Jm(Math.min(d,l,c.maxWidth)),h=Jm(Math.min(h,o,c.maxHeight)),d&&!h&&(h=Jm(d/2)),(e!==void 0||r!==void 0)&&a&&c.height&&h>c.height&&(h=c.height,d=Jm(Math.floor(h*a))),{width:d,height:h}}function h6(t,e,r){const a=e||1,n=Math.floor(t.height*a),i=Math.floor(t.width*a);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const l=t.canvas;return l.style&&(r||!l.style.height&&!l.style.width)&&(l.style.height=`${t.height}px`,l.style.width=`${t.width}px`),t.currentDevicePixelRatio!==a||l.height!==n||l.width!==i?(t.currentDevicePixelRatio=a,l.height=n,l.width=i,t.ctx.setTransform(a,0,0,a,0,0),!0):!1}const yJ=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};SN()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function f6(t,e){const r=fJ(t,e),a=r&&r.match(/^(\d+)(\.\d+)?px$/);return a?+a[1]:void 0}const vJ=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,a){return r-a},leftForLtr(r,a){return r-a}}},wJ=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function fd(t,e,r){return t?vJ(e,r):wJ()}function U_(t,e){let r,a;(e==="ltr"||e==="rtl")&&(r=t.canvas.style,a=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",e,"important"),t.prevTextDirection=a)}function W_(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function eg(t,e,r){return t.options.clip?t[r]:e[r]}function jJ(t,e){const{xScale:r,yScale:a}=t;return r&&a?{left:eg(r,e,"left"),right:eg(r,e,"right"),top:eg(a,e,"top"),bottom:eg(a,e,"bottom")}:e}function NJ(t,e){const r=e._clip;if(r.disabled)return!1;const a=jJ(e,t.chartArea);return{left:r.left===!1?0:a.left-(r.left===!0?0:r.left),right:r.right===!1?t.width:a.right+(r.right===!0?0:r.right),top:r.top===!1?0:a.top-(r.top===!0?0:r.top),bottom:r.bottom===!1?t.height:a.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 SJ{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,r,a,n){const i=r.listeners[n],l=r.duration;i.forEach(o=>o({chart:e,initial:r.initial,numSteps:l,currentStep:Math.min(a-r.start,l)}))}_refresh(){this._request||(this._running=!0,this._request=O_.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let r=0;this._charts.forEach((a,n)=>{if(!a.running||!a.items.length)return;const i=a.items;let l=i.length-1,o=!1,c;for(;l>=0;--l)c=i[l],c._active?(c._total>a.duration&&(a.duration=c._total),c.tick(e),o=!0):(i[l]=i[i.length-1],i.pop());o&&(n.draw(),this._notify(n,a,e,"progress")),i.length||(a.running=!1,this._notify(n,a,e,"complete"),a.initial=!1),r+=i.length}),this._lastDate=e,r===0&&(this._running=!1)}_getAnims(e){const r=this._charts;let a=r.get(e);return a||(a={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(e,a)),a}listen(e,r,a){this._getAnims(e).listeners[r].push(a)}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((a,n)=>Math.max(a,n._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 a=r.items;let n=a.length-1;for(;n>=0;--n)a[n].cancel();r.items=[],this._notify(e,r,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var ni=new SJ;const p6="transparent",CJ={boolean(t,e,r){return r>.5?e:t},color(t,e,r){const a=i6(t||p6),n=a.valid&&i6(e||p6);return n&&n.valid?n.mix(a,r).hexString():e},number(t,e,r){return t+(e-t)*r}};class AJ{constructor(e,r,a,n){const i=r[a];n=qt([e.to,n,i,e.from]);const l=qt([e.from,i,n]);this._active=!0,this._fn=e.fn||CJ[e.type||typeof l],this._easing=Kh[e.easing]||Kh.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=a,this._from=l,this._to=n,this._promises=void 0}active(){return this._active}update(e,r,a){if(this._active){this._notify(!1);const n=this._target[this._prop],i=a-this._start,l=this._duration-i;this._start=a,this._duration=Math.floor(Math.max(l,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=qt([e.to,r,n,e.from]),this._from=qt([e.from,n,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const r=e-this._start,a=this._duration,n=this._prop,i=this._from,l=this._loop,o=this._to;let c;if(this._active=i!==o&&(l||r<a),!this._active){this._target[n]=o,this._notify(!0);return}if(r<0){this._target[n]=i;return}c=r/a%2,c=l&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[n]=this._fn(i,o,c)}wait(){const e=this._promises||(this._promises=[]);return new Promise((r,a)=>{e.push({res:r,rej:a})})}_notify(e){const r=e?"res":"rej",a=this._promises||[];for(let n=0;n<a.length;n++)a[n][r]()}}class X_{constructor(e,r){this._chart=e,this._properties=new Map,this.configure(r)}configure(e){if(!ot(e))return;const r=Object.keys(lr.animation),a=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const i=e[n];if(!ot(i))return;const l={};for(const o of r)l[o]=i[o];(Cr(i.properties)&&i.properties||[n]).forEach(o=>{(o===n||!a.has(o))&&a.set(o,l)})})}_animateOptions(e,r){const a=r.options,n=DJ(e,a);if(!n)return[];const i=this._createAnimations(n,a);return a.$shared&&kJ(e.options.$animations,a).then(()=>{e.options=a},()=>{}),i}_createAnimations(e,r){const a=this._properties,n=[],i=e.$animations||(e.$animations={}),l=Object.keys(r),o=Date.now();let c;for(c=l.length-1;c>=0;--c){const d=l[c];if(d.charAt(0)==="$")continue;if(d==="options"){n.push(...this._animateOptions(e,r));continue}const h=r[d];let p=i[d];const m=a.get(d);if(p)if(m&&p.active()){p.update(m,h,o);continue}else p.cancel();if(!m||!m.duration){e[d]=h;continue}i[d]=p=new AJ(m,e,d,h),n.push(p)}return n}update(e,r){if(this._properties.size===0){Object.assign(e,r);return}const a=this._createAnimations(e,r);if(a.length)return ni.add(this._chart,a),!0}}function kJ(t,e){const r=[],a=Object.keys(e);for(let n=0;n<a.length;n++){const i=t[a[n]];i&&i.active()&&r.push(i.wait())}return Promise.all(r)}function DJ(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 m6(t,e){const r=t&&t.options||{},a=r.reverse,n=r.min===void 0?e:0,i=r.max===void 0?e:0;return{start:a?i:n,end:a?n:i}}function TJ(t,e,r){if(r===!1)return!1;const a=m6(t,r),n=m6(e,r);return{top:n.end,right:a.end,bottom:n.start,left:a.start}}function MJ(t){let e,r,a,n;return ot(t)?(e=t.top,r=t.right,a=t.bottom,n=t.left):e=r=a=n=t,{top:e,right:r,bottom:a,left:n,disabled:t===!1}}function V_(t,e){const r=[],a=t._getSortedDatasetMetas(e);let n,i;for(n=0,i=a.length;n<i;++n)r.push(a[n].index);return r}function g6(t,e,r,a={}){const n=t.keys,i=a.mode==="single";let l,o,c,d;if(e===null)return;let h=!1;for(l=0,o=n.length;l<o;++l){if(c=+n[l],c===r){if(h=!0,a.all)continue;break}d=t.values[c],Ln(d)&&(i||e===0||pl(e)===pl(d))&&(e+=d)}return!h&&!a.all?0:e}function EJ(t,e){const{iScale:r,vScale:a}=e,n=r.axis==="x"?"x":"y",i=a.axis==="x"?"x":"y",l=Object.keys(t),o=new Array(l.length);let c,d,h;for(c=0,d=l.length;c<d;++c)h=l[c],o[c]={[n]:h,[i]:t[h]};return o}function I1(t,e){const r=t&&t.options.stacked;return r||r===void 0&&e.stack!==void 0}function PJ(t,e,r){return`${t.id}.${e.id}.${r.stack||r.type}`}function OJ(t){const{min:e,max:r,minDefined:a,maxDefined:n}=t.getUserBounds();return{min:a?e:Number.NEGATIVE_INFINITY,max:n?r:Number.POSITIVE_INFINITY}}function RJ(t,e,r){const a=t[e]||(t[e]={});return a[r]||(a[r]={})}function x6(t,e,r,a){for(const n of e.getMatchingVisibleMetas(a).reverse()){const i=t[n.index];if(r&&i>0||!r&&i<0)return n.index}return null}function b6(t,e){const{chart:r,_cachedMeta:a}=t,n=r._stacks||(r._stacks={}),{iScale:i,vScale:l,index:o}=a,c=i.axis,d=l.axis,h=PJ(i,l,a),p=e.length;let m;for(let x=0;x<p;++x){const b=e[x],{[c]:y,[d]:v}=b,N=b._stacks||(b._stacks={});m=N[d]=RJ(n,h,y),m[o]=v,m._top=x6(m,l,!0,a.type),m._bottom=x6(m,l,!1,a.type);const C=m._visualValues||(m._visualValues={});C[o]=v}}function F1(t,e){const r=t.scales;return Object.keys(r).filter(a=>r[a].axis===e).shift()}function _J(t,e){return Vd(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function LJ(t,e,r){return Vd(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:r,index:e,mode:"default",type:"data"})}function uh(t,e){const r=t.controller.index,a=t.vScale&&t.vScale.axis;if(a){e=e||t._parsed;for(const n of e){const i=n._stacks;if(!i||i[a]===void 0||i[a][r]===void 0)return;delete i[a][r],i[a]._visualValues!==void 0&&i[a]._visualValues[r]!==void 0&&delete i[a]._visualValues[r]}}}const B1=t=>t==="reset"||t==="none",y6=(t,e)=>e?t:Object.assign({},t),zJ=(t,e,r)=>t&&!e.hidden&&e._stacked&&{keys:V_(r,!0),values:null};class AN{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=I1(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&&uh(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,r=this._cachedMeta,a=this.getDataset(),n=(p,m,x,b)=>p==="x"?m:p==="r"?b:x,i=r.xAxisID=it(a.xAxisID,F1(e,"x")),l=r.yAxisID=it(a.yAxisID,F1(e,"y")),o=r.rAxisID=it(a.rAxisID,F1(e,"r")),c=r.indexAxis,d=r.iAxisID=n(c,i,l,o),h=r.vAxisID=n(c,l,i,o);r.xScale=this.getScaleForId(i),r.yScale=this.getScaleForId(l),r.rScale=this.getScaleForId(o),r.iScale=this.getScaleForId(d),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&&a6(this._data,this),e._stacked&&uh(e)}_dataCheck(){const e=this.getDataset(),r=e.data||(e.data=[]),a=this._data;if(ot(r)){const n=this._cachedMeta;this._data=EJ(r,n)}else if(a!==r){if(a){a6(a,this);const n=this._cachedMeta;uh(n),n._parsed=[]}r&&Object.isExtensible(r)&&zQ(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,a=this.getDataset();let n=!1;this._dataCheck();const i=r._stacked;r._stacked=I1(r.vScale,r),r.stack!==a.stack&&(n=!0,uh(r),r.stack=a.stack),this._resyncElements(e),(n||i!==r._stacked)&&(b6(this,r._parsed),r._stacked=I1(r.vScale,r))}configure(){const e=this.chart.config,r=e.datasetScopeKeys(this._type),a=e.getOptionScopes(this.getDataset(),r,!0);this.options=e.createResolver(a,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,r){const{_cachedMeta:a,_data:n}=this,{iScale:i,_stacked:l}=a,o=i.axis;let c=e===0&&r===n.length?!0:a._sorted,d=e>0&&a._parsed[e-1],h,p,m;if(this._parsing===!1)a._parsed=n,a._sorted=!0,m=n;else{Cr(n[e])?m=this.parseArrayData(a,n,e,r):ot(n[e])?m=this.parseObjectData(a,n,e,r):m=this.parsePrimitiveData(a,n,e,r);const x=()=>p[o]===null||d&&p[o]<d[o];for(h=0;h<r;++h)a._parsed[h+e]=p=m[h],c&&(x()&&(c=!1),d=p);a._sorted=c}l&&b6(this,m)}parsePrimitiveData(e,r,a,n){const{iScale:i,vScale:l}=e,o=i.axis,c=l.axis,d=i.getLabels(),h=i===l,p=new Array(n);let m,x,b;for(m=0,x=n;m<x;++m)b=m+a,p[m]={[o]:h||i.parse(d[b],b),[c]:l.parse(r[b],b)};return p}parseArrayData(e,r,a,n){const{xScale:i,yScale:l}=e,o=new Array(n);let c,d,h,p;for(c=0,d=n;c<d;++c)h=c+a,p=r[h],o[c]={x:i.parse(p[0],h),y:l.parse(p[1],h)};return o}parseObjectData(e,r,a,n){const{xScale:i,yScale:l}=e,{xAxisKey:o="x",yAxisKey:c="y"}=this._parsing,d=new Array(n);let h,p,m,x;for(h=0,p=n;h<p;++h)m=h+a,x=r[m],d[h]={x:i.parse(Xo(x,o),m),y:l.parse(Xo(x,c),m)};return d}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,r,a){const n=this.chart,i=this._cachedMeta,l=r[e.axis],o={keys:V_(n,!0),values:r._stacks[e.axis]._visualValues};return g6(o,l,i.index,{mode:a})}updateRangeFromParsed(e,r,a,n){const i=a[r.axis];let l=i===null?NaN:i;const o=n&&a._stacks[r.axis];n&&o&&(n.values=o,l=g6(n,i,this._cachedMeta.index)),e.min=Math.min(e.min,l),e.max=Math.max(e.max,l)}getMinMax(e,r){const a=this._cachedMeta,n=a._parsed,i=a._sorted&&e===a.iScale,l=n.length,o=this._getOtherScale(e),c=zJ(r,a,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:p}=OJ(o);let m,x;function b(){x=n[m];const y=x[o.axis];return!Ln(x[e.axis])||h>y||p<y}for(m=0;m<l&&!(!b()&&(this.updateRangeFromParsed(d,e,x,c),i));++m);if(i){for(m=l-1;m>=0;--m)if(!b()){this.updateRangeFromParsed(d,e,x,c);break}}return d}getAllParsedValues(e){const r=this._cachedMeta._parsed,a=[];let n,i,l;for(n=0,i=r.length;n<i;++n)l=r[n][e.axis],Ln(l)&&a.push(l);return a}getMaxOverflow(){return!1}getLabelAndValue(e){const r=this._cachedMeta,a=r.iScale,n=r.vScale,i=this.getParsed(e);return{label:a?""+a.getLabelForValue(i[a.axis]):"",value:n?""+n.getLabelForValue(i[n.axis]):""}}_update(e){const r=this._cachedMeta;this.update(e||"default"),r._clip=MJ(it(this.options.clip,TJ(r.xScale,r.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,r=this.chart,a=this._cachedMeta,n=a.data||[],i=r.chartArea,l=[],o=this._drawStart||0,c=this._drawCount||n.length-o,d=this.options.drawActiveElementsOnTop;let h;for(a.dataset&&a.dataset.draw(e,i,o,c),h=o;h<o+c;++h){const p=n[h];p.hidden||(p.active&&d?l.push(p):p.draw(e,i))}for(h=0;h<l.length;++h)l[h].draw(e,i)}getStyle(e,r){const a=r?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(a):this.resolveDataElementOptions(e||0,a)}getContext(e,r,a){const n=this.getDataset();let i;if(e>=0&&e<this._cachedMeta.data.length){const l=this._cachedMeta.data[e];i=l.$context||(l.$context=LJ(this.getContext(),e,l)),i.parsed=this.getParsed(e),i.raw=n.data[e],i.index=i.dataIndex=e}else i=this.$context||(this.$context=_J(this.chart.getContext(),this.index)),i.dataset=n,i.index=i.datasetIndex=this.index;return i.active=!!r,i.mode=a,i}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,r){return this._resolveElementOptions(this.dataElementType.id,r,e)}_resolveElementOptions(e,r="default",a){const n=r==="active",i=this._cachedDataOpts,l=e+"-"+r,o=i[l],c=this.enableOptionSharing&&vf(a);if(o)return y6(o,c);const d=this.chart.config,h=d.datasetElementScopeKeys(this._type,e),p=n?[`${e}Hover`,"hover",e,""]:[e,""],m=d.getOptionScopes(this.getDataset(),h),x=Object.keys(lr.elements[e]),b=()=>this.getContext(a,n,r),y=d.resolveNamedOptions(m,x,b,p);return y.$shared&&(y.$shared=c,i[l]=Object.freeze(y6(y,c))),y}_resolveAnimations(e,r,a){const n=this.chart,i=this._cachedDataOpts,l=`animation-${r}`,o=i[l];if(o)return o;let c;if(n.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,a,r))}const d=new X_(n,c&&c.animations);return c&&c._cacheable&&(i[l]=Object.freeze(d)),d}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,r){return!r||B1(e)||this.chart._animationsDisabled}_getSharedOptions(e,r){const a=this.resolveDataElementOptions(e,r),n=this._sharedOptions,i=this.getSharedOptions(a),l=this.includeOptions(r,i)||i!==n;return this.updateSharedOptions(i,r,a),{sharedOptions:i,includeOptions:l}}updateElement(e,r,a,n){B1(n)?Object.assign(e,a):this._resolveAnimations(r,n).update(e,a)}updateSharedOptions(e,r,a){e&&!B1(r)&&this._resolveAnimations(void 0,r).update(e,a)}_setStyle(e,r,a,n){e.active=n;const i=this.getStyle(r,n);this._resolveAnimations(r,a,n).update(e,{options:!n&&this.getSharedOptions(i)||i})}removeHoverStyle(e,r,a){this._setStyle(e,a,"active",!1)}setHoverStyle(e,r,a){this._setStyle(e,a,"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,a=this._cachedMeta.data;for(const[o,c,d]of this._syncList)this[o](c,d);this._syncList=[];const n=a.length,i=r.length,l=Math.min(i,n);l&&this.parse(0,l),i>n?this._insertElements(n,i-n,e):i<n&&this._removeElements(i,n-i)}_insertElements(e,r,a=!0){const n=this._cachedMeta,i=n.data,l=e+r;let o;const c=d=>{for(d.length+=r,o=d.length-1;o>=l;o--)d[o]=d[o-r]};for(c(i),o=e;o<l;++o)i[o]=new this.dataElementType;this._parsing&&c(n._parsed),this.parse(e,r),a&&this.updateElements(i,e,r,"reset")}updateElements(e,r,a,n){}_removeElements(e,r){const a=this._cachedMeta;if(this._parsing){const n=a._parsed.splice(e,r);a._stacked&&uh(a,n)}a.data.splice(e,r)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[r,a,n]=e;this[r](a,n)}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 a=arguments.length-2;a&&this._sync(["_insertElements",e,a])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function IJ(t,e){if(!t._cache.$bar){const r=t.getMatchingVisibleMetas(e);let a=[];for(let n=0,i=r.length;n<i;n++)a=a.concat(r[n].controller.getAllParsedValues(t));t._cache.$bar=P_(a.sort((n,i)=>n-i))}return t._cache.$bar}function FJ(t){const e=t.iScale,r=IJ(e,t.type);let a=e._length,n,i,l,o;const c=()=>{l===32767||l===-32768||(vf(o)&&(a=Math.min(a,Math.abs(l-o)||a)),o=l)};for(n=0,i=r.length;n<i;++n)l=e.getPixelForValue(r[n]),c();for(o=void 0,n=0,i=e.ticks.length;n<i;++n)l=e.getPixelForTick(n),c();return a}function BJ(t,e,r,a){const n=r.barThickness;let i,l;return ut(n)?(i=e.min*r.categoryPercentage,l=r.barPercentage):(i=n*a,l=1),{chunk:i/a,ratio:l,start:e.pixels[t]-i/2}}function HJ(t,e,r,a){const n=e.pixels,i=n[t];let l=t>0?n[t-1]:null,o=t<n.length-1?n[t+1]:null;const c=r.categoryPercentage;l===null&&(l=i-(o===null?e.end-e.start:o-i)),o===null&&(o=i+i-l);const d=i-(i-Math.min(l,o))/2*c;return{chunk:Math.abs(o-l)/2*c/a,ratio:r.barPercentage,start:d}}function $J(t,e,r,a){const n=r.parse(t[0],a),i=r.parse(t[1],a),l=Math.min(n,i),o=Math.max(n,i);let c=l,d=o;Math.abs(l)>Math.abs(o)&&(c=o,d=l),e[r.axis]=d,e._custom={barStart:c,barEnd:d,start:n,end:i,min:l,max:o}}function q_(t,e,r,a){return Cr(t)?$J(t,e,r,a):e[r.axis]=r.parse(t,a),e}function v6(t,e,r,a){const n=t.iScale,i=t.vScale,l=n.getLabels(),o=n===i,c=[];let d,h,p,m;for(d=r,h=r+a;d<h;++d)m=e[d],p={},p[n.axis]=o||n.parse(l[d],d),c.push(q_(m,p,i,d));return c}function H1(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function YJ(t,e,r){return t!==0?pl(t):(e.isHorizontal()?1:-1)*(e.min>=r?1:-1)}function UJ(t){let e,r,a,n,i;return t.horizontal?(e=t.base>t.x,r="left",a="right"):(e=t.base<t.y,r="bottom",a="top"),e?(n="end",i="start"):(n="start",i="end"),{start:r,end:a,reverse:e,top:n,bottom:i}}function WJ(t,e,r,a){let n=e.borderSkipped;const i={};if(!n){t.borderSkipped=i;return}if(n===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:l,end:o,reverse:c,top:d,bottom:h}=UJ(t);n==="middle"&&r&&(t.enableBorderRadius=!0,(r._top||0)===a?n=d:(r._bottom||0)===a?n=h:(i[w6(h,l,o,c)]=!0,n=d)),i[w6(n,l,o,c)]=!0,t.borderSkipped=i}function w6(t,e,r,a){return a?(t=XJ(t,e,r),t=j6(t,r,e)):t=j6(t,e,r),t}function XJ(t,e,r){return t===e?r:t===r?e:t}function j6(t,e,r){return t==="start"?e:t==="end"?r:t}function VJ(t,{inflateAmount:e},r){t.inflateAmount=e==="auto"?r===1?.33:0:e}class qJ extends AN{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,a,n){return v6(e,r,a,n)}parseArrayData(e,r,a,n){return v6(e,r,a,n)}parseObjectData(e,r,a,n){const{iScale:i,vScale:l}=e,{xAxisKey:o="x",yAxisKey:c="y"}=this._parsing,d=i.axis==="x"?o:c,h=l.axis==="x"?o:c,p=[];let m,x,b,y;for(m=a,x=a+n;m<x;++m)y=r[m],b={},b[i.axis]=i.parse(Xo(y,d),m),p.push(q_(Xo(y,h),b,l,m));return p}updateRangeFromParsed(e,r,a,n){super.updateRangeFromParsed(e,r,a,n);const i=a._custom;i&&r===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const r=this._cachedMeta,{iScale:a,vScale:n}=r,i=this.getParsed(e),l=i._custom,o=H1(l)?"["+l.start+", "+l.end+"]":""+n.getLabelForValue(i[n.axis]);return{label:""+a.getLabelForValue(i[a.axis]),value:o}}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,a,n){const i=n==="reset",{index:l,_cachedMeta:{vScale:o}}=this,c=o.getBasePixel(),d=o.isHorizontal(),h=this._getRuler(),{sharedOptions:p,includeOptions:m}=this._getSharedOptions(r,n);for(let x=r;x<r+a;x++){const b=this.getParsed(x),y=i||ut(b[o.axis])?{base:c,head:c}:this._calculateBarValuePixels(x),v=this._calculateBarIndexPixels(x,h),N=(b._stacks||{})[o.axis],C={horizontal:d,base:y.base,enableBorderRadius:!N||H1(b._custom)||l===N._top||l===N._bottom,x:d?y.head:v.center,y:d?v.center:y.head,height:d?v.size:Math.abs(y.size),width:d?Math.abs(y.size):v.size};m&&(C.options=p||this.resolveDataElementOptions(x,e[x].active?"active":n));const S=C.options||e[x].options;WJ(C,S,N,l),VJ(C,S,h.ratio),this.updateElement(e[x],x,C,n)}}_getStacks(e,r){const{iScale:a}=this._cachedMeta,n=a.getMatchingVisibleMetas(this._type).filter(h=>h.controller.options.grouped),i=a.options.stacked,l=[],o=this._cachedMeta.controller.getParsed(r),c=o&&o[a.axis],d=h=>{const p=h._parsed.find(x=>x[a.axis]===c),m=p&&p[h.vScale.axis];if(ut(m)||isNaN(m))return!0};for(const h of n)if(!(r!==void 0&&d(h))&&((i===!1||l.indexOf(h.stack)===-1||i===void 0&&h.stack===void 0)&&l.push(h.stack),h.index===e))break;return l.length||l.push(void 0),l}_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(a=>e[a].axis===r).shift()}_getAxis(){const e={},r=this.getFirstScaleIdForIndexAxis();for(const a of this.chart.data.datasets)e[it(this.chart.options.indexAxis==="x"?a.xAxisID:a.yAxisID,r)]=!0;return Object.keys(e)}_getStackIndex(e,r,a){const n=this._getStacks(e,a),i=r!==void 0?n.indexOf(r):-1;return i===-1?n.length-1:i}_getRuler(){const e=this.options,r=this._cachedMeta,a=r.iScale,n=[];let i,l;for(i=0,l=r.data.length;i<l;++i)n.push(a.getPixelForValue(this.getParsed(i)[a.axis],i));const o=e.barThickness;return{min:o||FJ(r),pixels:n,start:a._startPixel,end:a._endPixel,stackCount:this._getStackCount(),scale:a,grouped:e.grouped,ratio:o?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:r,_stacked:a,index:n},options:{base:i,minBarLength:l}}=this,o=i||0,c=this.getParsed(e),d=c._custom,h=H1(d);let p=c[r.axis],m=0,x=a?this.applyStack(r,c,a):p,b,y;x!==p&&(m=x-p,x=p),h&&(p=d.barStart,x=d.barEnd-d.barStart,p!==0&&pl(p)!==pl(d.barEnd)&&(m=0),m+=p);const v=!ut(i)&&!h?i:m;let N=r.getPixelForValue(v);if(this.chart.getDataVisibility(e)?b=r.getPixelForValue(m+x):b=N,y=b-N,Math.abs(y)<l){y=YJ(y,r,o)*l,p===o&&(N-=y/2);const C=r.getPixelForDecimal(0),S=r.getPixelForDecimal(1),k=Math.min(C,S),A=Math.max(C,S);N=Math.max(Math.min(N,A),k),b=N+y,a&&!h&&(c._stacks[r.axis]._visualValues[n]=r.getValueForPixel(b)-r.getValueForPixel(N))}if(N===r.getPixelForValue(o)){const C=pl(y)*r.getLineWidthForValue(o)/2;N+=C,y-=C}return{size:y,base:N,head:b,center:b+y/2}}_calculateBarIndexPixels(e,r){const a=r.scale,n=this.options,i=n.skipNull,l=it(n.maxBarThickness,1/0);let o,c;const d=this._getAxisCount();if(r.grouped){const h=i?this._getStackCount(e):r.stackCount,p=n.barThickness==="flex"?HJ(e,r,n,h*d):BJ(e,r,n,h*d),m=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,x=this._getAxis().indexOf(it(m,this.getFirstScaleIdForIndexAxis())),b=this._getStackIndex(this.index,this._cachedMeta.stack,i?e:void 0)+x;o=p.start+p.chunk*b+p.chunk/2,c=Math.min(l,p.chunk*p.ratio)}else o=a.getPixelForValue(this.getParsed(e)[a.axis],e),c=Math.min(l,r.min*r.ratio);return{base:o-c/2,head:o+c/2,center:o,size:c}}draw(){const e=this._cachedMeta,r=e.vScale,a=e.data,n=a.length;let i=0;for(;i<n;++i)this.getParsed(i)[r.axis]!==null&&!a[i].hidden&&a[i].draw(this._ctx)}}function GJ(t,e,r){let a=1,n=1,i=0,l=0;if(e<br){const o=t,c=o+e,d=Math.cos(o),h=Math.sin(o),p=Math.cos(c),m=Math.sin(c),x=(S,k,A)=>kx(S,o,c,!0)?1:Math.max(k,k*r,A,A*r),b=(S,k,A)=>kx(S,o,c,!0)?-1:Math.min(k,k*r,A,A*r),y=x(0,d,p),v=x(kr,h,m),N=b(Ut,d,p),C=b(Ut+kr,h,m);a=(y-N)/2,n=(v-C)/2,i=-(y+N)/2,l=-(v+C)/2}return{ratioX:a,ratioY:n,offsetX:i,offsetY:l}}class G_ extends AN{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:a,color:n}}=e.legend.options;return r.labels.map((i,l)=>{const c=e.getDatasetMeta(0).controller.getStyle(l);return{text:i,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:n,lineWidth:c.borderWidth,pointStyle:a,hidden:!e.getDataVisibility(l),index:l}})}return[]}},onClick(e,r,a){a.chart.toggleDataVisibility(r.index),a.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 a=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=a;else{let i=c=>+a[c];if(ot(a[e])){const{key:c="value"}=this._parsing;i=d=>+Xo(a[d],c)}let l,o;for(l=e,o=e+r;l<o;++l)n._parsed[l]=i(l)}}_getRotation(){return di(this.options.rotation-90)}_getCircumference(){return di(this.options.circumference)}_getRotationExtents(){let e=br,r=-br;for(let a=0;a<this.chart.data.datasets.length;++a)if(this.chart.isDatasetVisible(a)&&this.chart.getDatasetMeta(a).type===this._type){const n=this.chart.getDatasetMeta(a).controller,i=n._getRotation(),l=n._getCircumference();e=Math.min(e,i),r=Math.max(r,i+l)}return{rotation:e,circumference:r-e}}update(e){const r=this.chart,{chartArea:a}=r,n=this._cachedMeta,i=n.data,l=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,o=Math.max((Math.min(a.width,a.height)-l)/2,0),c=Math.min(wQ(this.options.cutout,o),1),d=this._getRingWeight(this.index),{circumference:h,rotation:p}=this._getRotationExtents(),{ratioX:m,ratioY:x,offsetX:b,offsetY:y}=GJ(p,h,c),v=(a.width-l)/m,N=(a.height-l)/x,C=Math.max(Math.min(v,N)/2,0),S=k_(this.options.radius,C),k=Math.max(S*c,0),A=(S-k)/this._getVisibleDatasetWeightTotal();this.offsetX=b*S,this.offsetY=y*S,n.total=this.calculateTotal(),this.outerRadius=S-A*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-A*d,0),this.updateElements(i,0,i.length,e)}_circumference(e,r){const a=this.options,n=this._cachedMeta,i=this._getCircumference();return r&&a.animation.animateRotate||!this.chart.getDataVisibility(e)||n._parsed[e]===null||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*i/br)}updateElements(e,r,a,n){const i=n==="reset",l=this.chart,o=l.chartArea,d=l.options.animation,h=(o.left+o.right)/2,p=(o.top+o.bottom)/2,m=i&&d.animateScale,x=m?0:this.innerRadius,b=m?0:this.outerRadius,{sharedOptions:y,includeOptions:v}=this._getSharedOptions(r,n);let N=this._getRotation(),C;for(C=0;C<r;++C)N+=this._circumference(C,i);for(C=r;C<r+a;++C){const S=this._circumference(C,i),k=e[C],A={x:h+this.offsetX,y:p+this.offsetY,startAngle:N,endAngle:N+S,circumference:S,outerRadius:b,innerRadius:x};v&&(A.options=y||this.resolveDataElementOptions(C,k.active?"active":n)),N+=S,this.updateElement(k,C,A,n)}}calculateTotal(){const e=this._cachedMeta,r=e.data;let a=0,n;for(n=0;n<r.length;n++){const i=e._parsed[n];i!==null&&!isNaN(i)&&this.chart.getDataVisibility(n)&&!r[n].hidden&&(a+=Math.abs(i))}return a}calculateCircumference(e){const r=this._cachedMeta.total;return r>0&&!isNaN(e)?br*(Math.abs(e)/r):0}getLabelAndValue(e){const r=this._cachedMeta,a=this.chart,n=a.data.labels||[],i=gN(r._parsed[e],a.options.locale);return{label:n[e]||"",value:i}}getMaxBorderWidth(e){let r=0;const a=this.chart;let n,i,l,o,c;if(!e){for(n=0,i=a.data.datasets.length;n<i;++n)if(a.isDatasetVisible(n)){l=a.getDatasetMeta(n),e=l.data,o=l.controller;break}}if(!e)return 0;for(n=0,i=e.length;n<i;++n)c=o.resolveDataElementOptions(n),c.borderAlign!=="inner"&&(r=Math.max(r,c.borderWidth||0,c.hoverBorderWidth||0));return r}getMaxOffset(e){let r=0;for(let a=0,n=e.length;a<n;++a){const i=this.resolveDataElementOptions(a);r=Math.max(r,i.offset||0,i.hoverOffset||0)}return r}_getRingWeightOffset(e){let r=0;for(let a=0;a<e;++a)this.chart.isDatasetVisible(a)&&(r+=this._getRingWeight(a));return r}_getRingWeight(e){return Math.max(it(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class KJ extends G_{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}}function uo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class kN{static override(e){Object.assign(kN.prototype,e)}options;constructor(e){this.options=e||{}}init(){}formats(){return uo()}parse(){return uo()}format(){return uo()}add(){return uo()}diff(){return uo()}startOf(){return uo()}endOf(){return uo()}}var ZJ={_date:kN};function QJ(t,e,r,a){const{controller:n,data:i,_sorted:l}=t,o=n._cachedMeta.iScale,c=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(o&&e===o.axis&&e!=="r"&&l&&i.length){const d=o._reversePixels?_Q:Cj;if(a){if(n._sharedOptions){const h=i[0],p=typeof h.getRange=="function"&&h.getRange(e);if(p){const m=d(i,e,r-p),x=d(i,e,r+p);return{lo:m.lo,hi:x.hi}}}}else{const h=d(i,e,r);if(c){const{vScale:p}=n._cachedMeta,{_parsed:m}=t,x=m.slice(0,h.lo+1).reverse().findIndex(y=>!ut(y[p.axis]));h.lo-=Math.max(0,x);const b=m.slice(h.hi).findIndex(y=>!ut(y[p.axis]));h.hi+=Math.max(0,b)}return h}}return{lo:0,hi:i.length-1}}function H0(t,e,r,a,n){const i=t.getSortedVisibleDatasetMetas(),l=r[e];for(let o=0,c=i.length;o<c;++o){const{index:d,data:h}=i[o],{lo:p,hi:m}=QJ(i[o],e,l,n);for(let x=p;x<=m;++x){const b=h[x];b.skip||a(b,d,x)}}}function JJ(t){const e=t.indexOf("x")!==-1,r=t.indexOf("y")!==-1;return function(a,n){const i=e?Math.abs(a.x-n.x):0,l=r?Math.abs(a.y-n.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(l,2))}}function $1(t,e,r,a,n){const i=[];return!n&&!t.isPointInArea(e)||H0(t,r,e,function(o,c,d){!n&&!xN(o,t.chartArea,0)||o.inRange(e.x,e.y,a)&&i.push({element:o,datasetIndex:c,index:d})},!0),i}function eee(t,e,r,a){let n=[];function i(l,o,c){const{startAngle:d,endAngle:h}=l.getProps(["startAngle","endAngle"],a),{angle:p}=M_(l,{x:e.x,y:e.y});kx(p,d,h)&&n.push({element:l,datasetIndex:o,index:c})}return H0(t,r,e,i),n}function tee(t,e,r,a,n,i){let l=[];const o=JJ(r);let c=Number.POSITIVE_INFINITY;function d(h,p,m){const x=h.inRange(e.x,e.y,n);if(a&&!x)return;const b=h.getCenterPoint(n);if(!(!!i||t.isPointInArea(b))&&!x)return;const v=o(e,b);v<c?(l=[{element:h,datasetIndex:p,index:m}],c=v):v===c&&l.push({element:h,datasetIndex:p,index:m})}return H0(t,r,e,d),l}function Y1(t,e,r,a,n,i){return!i&&!t.isPointInArea(e)?[]:r==="r"&&!a?eee(t,e,r,n):tee(t,e,r,a,n,i)}function N6(t,e,r,a,n){const i=[],l=r==="x"?"inXRange":"inYRange";let o=!1;return H0(t,r,e,(c,d,h)=>{c[l]&&c[l](e[r],n)&&(i.push({element:c,datasetIndex:d,index:h}),o=o||c.inRange(e.x,e.y,n))}),a&&!o?[]:i}var ree={modes:{index(t,e,r,a){const n=mo(e,t),i=r.axis||"x",l=r.includeInvisible||!1,o=r.intersect?$1(t,n,i,a,l):Y1(t,n,i,!1,a,l),c=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(d=>{const h=o[0].index,p=d.data[h];p&&!p.skip&&c.push({element:p,datasetIndex:d.index,index:h})}),c):[]},dataset(t,e,r,a){const n=mo(e,t),i=r.axis||"xy",l=r.includeInvisible||!1;let o=r.intersect?$1(t,n,i,a,l):Y1(t,n,i,!1,a,l);if(o.length>0){const c=o[0].datasetIndex,d=t.getDatasetMeta(c).data;o=[];for(let h=0;h<d.length;++h)o.push({element:d[h],datasetIndex:c,index:h})}return o},point(t,e,r,a){const n=mo(e,t),i=r.axis||"xy",l=r.includeInvisible||!1;return $1(t,n,i,a,l)},nearest(t,e,r,a){const n=mo(e,t),i=r.axis||"xy",l=r.includeInvisible||!1;return Y1(t,n,i,r.intersect,a,l)},x(t,e,r,a){const n=mo(e,t);return N6(t,n,"x",r.intersect,a)},y(t,e,r,a){const n=mo(e,t);return N6(t,n,"y",r.intersect,a)}}};const K_=["left","top","right","bottom"];function hh(t,e){return t.filter(r=>r.pos===e)}function S6(t,e){return t.filter(r=>K_.indexOf(r.pos)===-1&&r.box.axis===e)}function fh(t,e){return t.sort((r,a)=>{const n=e?a:r,i=e?r:a;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function aee(t){const e=[];let r,a,n,i,l,o;for(r=0,a=(t||[]).length;r<a;++r)n=t[r],{position:i,options:{stack:l,stackWeight:o=1}}=n,e.push({index:r,box:n,pos:i,horizontal:n.isHorizontal(),weight:n.weight,stack:l&&i+l,stackWeight:o});return e}function nee(t){const e={};for(const r of t){const{stack:a,pos:n,stackWeight:i}=r;if(!a||!K_.includes(n))continue;const l=e[a]||(e[a]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=i}return e}function see(t,e){const r=nee(t),{vBoxMaxWidth:a,hBoxMaxHeight:n}=e;let i,l,o;for(i=0,l=t.length;i<l;++i){o=t[i];const{fullSize:c}=o.box,d=r[o.stack],h=d&&o.stackWeight/d.weight;o.horizontal?(o.width=h?h*a:c&&e.availableWidth,o.height=n):(o.width=a,o.height=h?h*n:c&&e.availableHeight)}return r}function iee(t){const e=aee(t),r=fh(e.filter(d=>d.box.fullSize),!0),a=fh(hh(e,"left"),!0),n=fh(hh(e,"right")),i=fh(hh(e,"top"),!0),l=fh(hh(e,"bottom")),o=S6(e,"x"),c=S6(e,"y");return{fullSize:r,leftAndTop:a.concat(i),rightAndBottom:n.concat(c).concat(l).concat(o),chartArea:hh(e,"chartArea"),vertical:a.concat(n).concat(c),horizontal:i.concat(l).concat(o)}}function C6(t,e,r,a){return Math.max(t[r],e[r])+Math.max(t[a],e[a])}function Z_(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 lee(t,e,r,a){const{pos:n,box:i}=r,l=t.maxPadding;if(!ot(n)){r.size&&(t[n]-=r.size);const p=a[r.stack]||{size:0,count:1};p.size=Math.max(p.size,r.horizontal?i.height:i.width),r.size=p.size/p.count,t[n]+=r.size}i.getPadding&&Z_(l,i.getPadding());const o=Math.max(0,e.outerWidth-C6(l,t,"left","right")),c=Math.max(0,e.outerHeight-C6(l,t,"top","bottom")),d=o!==t.w,h=c!==t.h;return t.w=o,t.h=c,r.horizontal?{same:d,other:h}:{same:h,other:d}}function oee(t){const e=t.maxPadding;function r(a){const n=Math.max(e[a]-t[a],0);return t[a]+=n,n}t.y+=r("top"),t.x+=r("left"),r("right"),r("bottom")}function cee(t,e){const r=e.maxPadding;function a(n){const i={left:0,top:0,right:0,bottom:0};return n.forEach(l=>{i[l]=Math.max(e[l],r[l])}),i}return a(t?["left","right"]:["top","bottom"])}function Eh(t,e,r,a){const n=[];let i,l,o,c,d,h;for(i=0,l=t.length,d=0;i<l;++i){o=t[i],c=o.box,c.update(o.width||e.w,o.height||e.h,cee(o.horizontal,e));const{same:p,other:m}=lee(e,r,o,a);d|=p&&n.length,h=h||m,c.fullSize||n.push(o)}return d&&Eh(n,e,r,a)||h}function tg(t,e,r,a,n){t.top=r,t.left=e,t.right=e+a,t.bottom=r+n,t.width=a,t.height=n}function A6(t,e,r,a){const n=r.padding;let{x:i,y:l}=e;for(const o of t){const c=o.box,d=a[o.stack]||{placed:0,weight:1},h=o.stackWeight/d.weight||1;if(o.horizontal){const p=e.w*h,m=d.size||c.height;vf(d.start)&&(l=d.start),c.fullSize?tg(c,n.left,l,r.outerWidth-n.right-n.left,m):tg(c,e.left+d.placed,l,p,m),d.start=l,d.placed+=p,l=c.bottom}else{const p=e.h*h,m=d.size||c.width;vf(d.start)&&(i=d.start),c.fullSize?tg(c,i,n.top,m,r.outerHeight-n.bottom-n.top):tg(c,i,e.top+d.placed,m,p),d.start=i,d.placed+=p,i=c.right}}e.x=i,e.y=l}var cl={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,a){if(!t)return;const n=zn(t.options.layout.padding),i=Math.max(e-n.width,0),l=Math.max(r-n.height,0),o=iee(t.boxes),c=o.vertical,d=o.horizontal;wt(t.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const h=c.reduce((y,v)=>v.box.options&&v.box.options.display===!1?y:y+1,0)||1,p=Object.freeze({outerWidth:e,outerHeight:r,padding:n,availableWidth:i,availableHeight:l,vBoxMaxWidth:i/2/h,hBoxMaxHeight:l/2}),m=Object.assign({},n);Z_(m,zn(a));const x=Object.assign({maxPadding:m,w:i,h:l,x:n.left,y:n.top},n),b=see(c.concat(d),p);Eh(o.fullSize,x,p,b),Eh(c,x,p,b),Eh(d,x,p,b)&&Eh(c,x,p,b),oee(x),A6(o.leftAndTop,x,p,b),x.x+=x.w,x.y+=x.h,A6(o.rightAndBottom,x,p,b),t.chartArea={left:x.left,top:x.top,right:x.left+x.w,bottom:x.top+x.h,height:x.h,width:x.w},wt(o.chartArea,y=>{const v=y.box;Object.assign(v,t.chartArea),v.update(x.w,x.h,{left:0,top:0,right:0,bottom:0})})}};class Q_{acquireContext(e,r){}releaseContext(e){return!1}addEventListener(e,r,a){}removeEventListener(e,r,a){}getDevicePixelRatio(){return 1}getMaximumSize(e,r,a,n){return r=Math.max(0,r||e.width),a=a||e.height,{width:r,height:Math.max(0,n?Math.floor(r/n):a)}}isAttached(e){return!0}updateConfig(e){}}class dee extends Q_{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const qg="$chartjs",uee={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},k6=t=>t===null||t==="";function hee(t,e){const r=t.style,a=t.getAttribute("height"),n=t.getAttribute("width");if(t[qg]={initial:{height:a,width:n,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",k6(n)){const i=f6(t,"width");i!==void 0&&(t.width=i)}if(k6(a))if(t.style.height==="")t.height=t.width/(e||2);else{const i=f6(t,"height");i!==void 0&&(t.height=i)}return t}const J_=yJ?{passive:!0}:!1;function fee(t,e,r){t&&t.addEventListener(e,r,J_)}function pee(t,e,r){t&&t.canvas&&t.canvas.removeEventListener(e,r,J_)}function mee(t,e){const r=uee[t.type]||t.type,{x:a,y:n}=mo(t,e);return{type:r,chart:e,native:t,x:a!==void 0?a:null,y:n!==void 0?n:null}}function Ex(t,e){for(const r of t)if(r===e||r.contains(e))return!0}function gee(t,e,r){const a=t.canvas,n=new MutationObserver(i=>{let l=!1;for(const o of i)l=l||Ex(o.addedNodes,a),l=l&&!Ex(o.removedNodes,a);l&&r()});return n.observe(document,{childList:!0,subtree:!0}),n}function xee(t,e,r){const a=t.canvas,n=new MutationObserver(i=>{let l=!1;for(const o of i)l=l||Ex(o.removedNodes,a),l=l&&!Ex(o.addedNodes,a);l&&r()});return n.observe(document,{childList:!0,subtree:!0}),n}const wf=new Map;let D6=0;function eL(){const t=window.devicePixelRatio;t!==D6&&(D6=t,wf.forEach((e,r)=>{r.currentDevicePixelRatio!==t&&e()}))}function bee(t,e){wf.size||window.addEventListener("resize",eL),wf.set(t,e)}function yee(t){wf.delete(t),wf.size||window.removeEventListener("resize",eL)}function vee(t,e,r){const a=t.canvas,n=a&&CN(a);if(!n)return;const i=R_((o,c)=>{const d=n.clientWidth;r(o,c),d<n.clientWidth&&r()},window),l=new ResizeObserver(o=>{const c=o[0],d=c.contentRect.width,h=c.contentRect.height;d===0&&h===0||i(d,h)});return l.observe(n),bee(t,i),l}function U1(t,e,r){r&&r.disconnect(),e==="resize"&&yee(t)}function wee(t,e,r){const a=t.canvas,n=R_(i=>{t.ctx!==null&&r(mee(i,t))},t);return fee(a,e,n),n}class jee extends Q_{acquireContext(e,r){const a=e&&e.getContext&&e.getContext("2d");return a&&a.canvas===e?(hee(e,r),a):null}releaseContext(e){const r=e.canvas;if(!r[qg])return!1;const a=r[qg].initial;["height","width"].forEach(i=>{const l=a[i];ut(l)?r.removeAttribute(i):r.setAttribute(i,l)});const n=a.style||{};return Object.keys(n).forEach(i=>{r.style[i]=n[i]}),r.width=r.width,delete r[qg],!0}addEventListener(e,r,a){this.removeEventListener(e,r);const n=e.$proxies||(e.$proxies={}),l={attach:gee,detach:xee,resize:vee}[r]||wee;n[r]=l(e,r,a)}removeEventListener(e,r){const a=e.$proxies||(e.$proxies={}),n=a[r];if(!n)return;({attach:U1,detach:U1,resize:U1}[r]||pee)(e,r,n),a[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,r,a,n){return bJ(e,r,a,n)}isAttached(e){const r=e&&CN(e);return!!(r&&r.isConnected)}}function Nee(t){return!SN()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?dee:jee}let ac=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(e){const{x:r,y:a}=this.getProps(["x","y"],e);return{x:r,y:a}}hasValue(){return Ax(this.x)&&Ax(this.y)}getProps(e,r){const a=this.$animations;if(!r||!a)return this;const n={};return e.forEach(i=>{n[i]=a[i]&&a[i].active()?a[i]._to:this[i]}),n}};function See(t,e){const r=t.options.ticks,a=Cee(t),n=Math.min(r.maxTicksLimit||a,a),i=r.major.enabled?kee(e):[],l=i.length,o=i[0],c=i[l-1],d=[];if(l>n)return Dee(e,d,i,l/n),d;const h=Aee(i,e,n);if(l>0){let p,m;const x=l>1?Math.round((c-o)/(l-1)):null;for(rg(e,d,h,ut(x)?0:o-x,o),p=0,m=l-1;p<m;p++)rg(e,d,h,i[p],i[p+1]);return rg(e,d,h,c,ut(x)?e.length:c+x),d}return rg(e,d,h),d}function Cee(t){const e=t.options.offset,r=t._tickSize(),a=t._length/r+(e?0:1),n=t._maxLength/r;return Math.floor(Math.min(a,n))}function Aee(t,e,r){const a=Tee(t),n=e.length/r;if(!a)return Math.max(n,1);const i=DQ(a);for(let l=0,o=i.length-1;l<o;l++){const c=i[l];if(c>n)return c}return Math.max(n,1)}function kee(t){const e=[];let r,a;for(r=0,a=t.length;r<a;r++)t[r].major&&e.push(r);return e}function Dee(t,e,r,a){let n=0,i=r[0],l;for(a=Math.ceil(a),l=0;l<t.length;l++)l===i&&(e.push(t[l]),n++,i=r[n*a])}function rg(t,e,r,a,n){const i=it(a,0),l=Math.min(it(n,t.length),t.length);let o=0,c,d,h;for(r=Math.ceil(r),n&&(c=n-a,r=c/Math.floor(c/r)),h=i;h<0;)o++,h=Math.round(i+o*r);for(d=Math.max(i,0);d<l;d++)d===h&&(e.push(t[d]),o++,h=Math.round(i+o*r))}function Tee(t){const e=t.length;let r,a;if(e<2)return!1;for(a=t[0],r=1;r<e;++r)if(t[r]-t[r-1]!==a)return!1;return a}const Mee=t=>t==="left"?"right":t==="right"?"left":t,T6=(t,e,r)=>e==="top"||e==="left"?t[e]+r:t[e]-r,M6=(t,e)=>Math.min(e||t,t);function E6(t,e){const r=[],a=t.length/e,n=t.length;let i=0;for(;i<n;i+=a)r.push(t[Math.floor(i)]);return r}function Eee(t,e,r){const a=t.ticks.length,n=Math.min(e,a-1),i=t._startPixel,l=t._endPixel,o=1e-6;let c=t.getPixelForTick(n),d;if(!(r&&(a===1?d=Math.max(c-i,l-c):e===0?d=(t.getPixelForTick(1)-c)/2:d=(c-t.getPixelForTick(n-1))/2,c+=n<e?d:-d,c<i-o||c>l+o)))return c}function Pee(t,e){wt(t,r=>{const a=r.gc,n=a.length/2;let i;if(n>e){for(i=0;i<n;++i)delete r.data[a[i]];a.splice(0,n)}})}function ph(t){return t.drawTicks?t.tickLength:0}function P6(t,e){if(!t.display)return 0;const r=ma(t.font,e),a=zn(t.padding);return(Cr(t.text)?t.text.length:1)*r.lineHeight+a.height}function Oee(t,e){return Vd(t,{scale:e,type:"scale"})}function Ree(t,e,r){return Vd(t,{tick:r,index:e,type:"tick"})}function _ee(t,e,r){let a=__(t);return(r&&e!=="right"||!r&&e==="right")&&(a=Mee(a)),a}function Lee(t,e,r,a){const{top:n,left:i,bottom:l,right:o,chart:c}=t,{chartArea:d,scales:h}=c;let p=0,m,x,b;const y=l-n,v=o-i;if(t.isHorizontal()){if(x=Ka(a,i,o),ot(r)){const N=Object.keys(r)[0],C=r[N];b=h[N].getPixelForValue(C)+y-e}else r==="center"?b=(d.bottom+d.top)/2+y-e:b=T6(t,r,e);m=o-i}else{if(ot(r)){const N=Object.keys(r)[0],C=r[N];x=h[N].getPixelForValue(C)-v+e}else r==="center"?x=(d.left+d.right)/2-v+e:x=T6(t,r,e);b=Ka(a,l,n),p=r==="left"?-kr:kr}return{titleX:x,titleY:b,maxWidth:m,rotation:p}}class qd extends ac{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:a,_suggestedMax:n}=this;return e=bs(e,Number.POSITIVE_INFINITY),r=bs(r,Number.NEGATIVE_INFINITY),a=bs(a,Number.POSITIVE_INFINITY),n=bs(n,Number.NEGATIVE_INFINITY),{min:bs(e,a),max:bs(r,n),minDefined:Ln(e),maxDefined:Ln(r)}}getMinMax(e){let{min:r,max:a,minDefined:n,maxDefined:i}=this.getUserBounds(),l;if(n&&i)return{min:r,max:a};const o=this.getMatchingVisibleMetas();for(let c=0,d=o.length;c<d;++c)l=o[c].controller.getMinMax(this,e),n||(r=Math.min(r,l.min)),i||(a=Math.max(a,l.max));return r=i&&r>a?a:r,a=n&&r>a?r:a,{min:bs(r,bs(a,r)),max:bs(a,bs(r,a))}}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(){Lt(this.options.beforeUpdate,[this])}update(e,r,a){const{beginAtZero:n,grace:i,ticks:l}=this.options,o=l.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=r,this._margins=a=Object.assign({left:0,right:0,top:0,bottom:0},a),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+a.left+a.right:this.height+a.top+a.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=aJ(this,i,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=o<this.ticks.length;this._convertTicksToLabels(c?E6(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),l.display&&(l.autoSkip||l.source==="auto")&&(this.ticks=See(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,a;this.isHorizontal()?(r=this.left,a=this.right):(r=this.top,a=this.bottom,e=!e),this._startPixel=r,this._endPixel=a,this._reversePixels=e,this._length=a-r,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Lt(this.options.afterUpdate,[this])}beforeSetDimensions(){Lt(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(){Lt(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Lt(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Lt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const r=this.options.ticks;let a,n,i;for(a=0,n=e.length;a<n;a++)i=e[a],i.label=Lt(r.callback,[i.value,a,e],this)}afterTickToLabelConversion(){Lt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Lt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,r=e.ticks,a=M6(this.ticks.length,e.ticks.maxTicksLimit),n=r.minRotation||0,i=r.maxRotation;let l=n,o,c,d;if(!this._isVisible()||!r.display||n>=i||a<=1||!this.isHorizontal()){this.labelRotation=n;return}const h=this._getLabelSizes(),p=h.widest.width,m=h.highest.height,x=Pa(this.chart.width-p,0,this.maxWidth);o=e.offset?this.maxWidth/a:x/(a-1),p+6>o&&(o=x/(a-(e.offset?.5:1)),c=this.maxHeight-ph(e.grid)-r.padding-P6(e.title,this.chart.options.font),d=Math.sqrt(p*p+m*m),l=PQ(Math.min(Math.asin(Pa((h.highest.height+6)/o,-1,1)),Math.asin(Pa(c/d,-1,1))-Math.asin(Pa(m/d,-1,1)))),l=Math.max(n,Math.min(i,l))),this.labelRotation=l}afterCalculateLabelRotation(){Lt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Lt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:r,options:{ticks:a,title:n,grid:i}}=this,l=this._isVisible(),o=this.isHorizontal();if(l){const c=P6(n,r.options.font);if(o?(e.width=this.maxWidth,e.height=ph(i)+c):(e.height=this.maxHeight,e.width=ph(i)+c),a.display&&this.ticks.length){const{first:d,last:h,widest:p,highest:m}=this._getLabelSizes(),x=a.padding*2,b=di(this.labelRotation),y=Math.cos(b),v=Math.sin(b);if(o){const N=a.mirror?0:v*p.width+y*m.height;e.height=Math.min(this.maxHeight,e.height+N+x)}else{const N=a.mirror?0:y*p.width+v*m.height;e.width=Math.min(this.maxWidth,e.width+N+x)}this._calculatePadding(d,h,v,y)}}this._handleMargins(),o?(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,a,n){const{ticks:{align:i,padding:l},position:o}=this.options,c=this.labelRotation!==0,d=o!=="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?d?(m=n*e.width,x=a*r.height):(m=a*e.height,x=n*r.width):i==="start"?x=r.width:i==="end"?m=e.width:i!=="inner"&&(m=e.width/2,x=r.width/2),this.paddingLeft=Math.max((m-h+l)*this.width/(this.width-h),0),this.paddingRight=Math.max((x-p+l)*this.width/(this.width-p),0)}else{let h=r.height/2,p=e.height/2;i==="start"?(h=0,p=e.height):i==="end"&&(h=r.height,p=0),this.paddingTop=h+l,this.paddingBottom=p+l}}_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(){Lt(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,a;for(r=0,a=e.length;r<a;r++)ut(e[r].label)&&(e.splice(r,1),a--,r--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const r=this.options.ticks.sampleSize;let a=this.ticks;r<a.length&&(a=E6(a,r)),this._labelSizes=e=this._computeLabelSizes(a,a.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,r,a){const{ctx:n,_longestTextCache:i}=this,l=[],o=[],c=Math.floor(r/M6(r,a));let d=0,h=0,p,m,x,b,y,v,N,C,S,k,A;for(p=0;p<r;p+=c){if(b=e[p].label,y=this._resolveTickFontOptions(p),n.font=v=y.string,N=i[v]=i[v]||{data:{},gc:[]},C=y.lineHeight,S=k=0,!ut(b)&&!Cr(b))S=o6(n,N.data,N.gc,S,b),k=C;else if(Cr(b))for(m=0,x=b.length;m<x;++m)A=b[m],!ut(A)&&!Cr(A)&&(S=o6(n,N.data,N.gc,S,A),k+=C);l.push(S),o.push(k),d=Math.max(S,d),h=Math.max(k,h)}Pee(i,r);const T=l.indexOf(d),M=o.indexOf(h),O=_=>({width:l[_]||0,height:o[_]||0});return{first:O(0),last:O(r-1),widest:O(T),highest:O(M),widths:l,heights:o}}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 RQ(this._alignToPixels?co(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 a=r[e];return a.$context||(a.$context=Ree(this.getContext(),e,a))}return this.$context||(this.$context=Oee(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,r=di(this.labelRotation),a=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=this._getLabelSizes(),l=e.autoSkipPadding||0,o=i?i.widest.width+l:0,c=i?i.highest.height+l:0;return this.isHorizontal()?c*a>o*n?o/a:c/n:c*n<o*a?c/a:o/n}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const r=this.axis,a=this.chart,n=this.options,{grid:i,position:l,border:o}=n,c=i.offset,d=this.isHorizontal(),p=this.ticks.length+(c?1:0),m=ph(i),x=[],b=o.setContext(this.getContext()),y=b.display?b.width:0,v=y/2,N=function(H){return co(a,H,y)};let C,S,k,A,T,M,O,_,R,L,z,F;if(l==="top")C=N(this.bottom),M=this.bottom-m,_=C-v,L=N(e.top)+v,F=e.bottom;else if(l==="bottom")C=N(this.top),L=e.top,F=N(e.bottom)-v,M=C+v,_=this.top+m;else if(l==="left")C=N(this.right),T=this.right-m,O=C-v,R=N(e.left)+v,z=e.right;else if(l==="right")C=N(this.left),R=e.left,z=N(e.right)-v,T=C+v,O=this.left+m;else if(r==="x"){if(l==="center")C=N((e.top+e.bottom)/2+.5);else if(ot(l)){const H=Object.keys(l)[0],W=l[H];C=N(this.chart.scales[H].getPixelForValue(W))}L=e.top,F=e.bottom,M=C+v,_=M+m}else if(r==="y"){if(l==="center")C=N((e.left+e.right)/2);else if(ot(l)){const H=Object.keys(l)[0],W=l[H];C=N(this.chart.scales[H].getPixelForValue(W))}T=C-v,O=T-m,R=e.left,z=e.right}const Y=it(n.ticks.maxTicksLimit,p),X=Math.max(1,Math.ceil(p/Y));for(S=0;S<p;S+=X){const H=this.getContext(S),W=i.setContext(H),V=o.setContext(H),Z=W.lineWidth,B=W.color,G=V.dash||[],te=V.dashOffset,K=W.tickWidth,U=W.tickColor,re=W.tickBorderDash||[],ne=W.tickBorderDashOffset;k=Eee(this,S,c),k!==void 0&&(A=co(a,k,Z),d?T=O=R=z=A:M=_=L=F=A,x.push({tx1:T,ty1:M,tx2:O,ty2:_,x1:R,y1:L,x2:z,y2:F,width:Z,color:B,borderDash:G,borderDashOffset:te,tickWidth:K,tickColor:U,tickBorderDash:re,tickBorderDashOffset:ne}))}return this._ticksLength=p,this._borderValue=C,x}_computeLabelItems(e){const r=this.axis,a=this.options,{position:n,ticks:i}=a,l=this.isHorizontal(),o=this.ticks,{align:c,crossAlign:d,padding:h,mirror:p}=i,m=ph(a.grid),x=m+h,b=p?-h:x,y=-di(this.labelRotation),v=[];let N,C,S,k,A,T,M,O,_,R,L,z,F="middle";if(n==="top")T=this.bottom-b,M=this._getXAxisLabelAlignment();else if(n==="bottom")T=this.top+b,M=this._getXAxisLabelAlignment();else if(n==="left"){const X=this._getYAxisLabelAlignment(m);M=X.textAlign,A=X.x}else if(n==="right"){const X=this._getYAxisLabelAlignment(m);M=X.textAlign,A=X.x}else if(r==="x"){if(n==="center")T=(e.top+e.bottom)/2+x;else if(ot(n)){const X=Object.keys(n)[0],H=n[X];T=this.chart.scales[X].getPixelForValue(H)+x}M=this._getXAxisLabelAlignment()}else if(r==="y"){if(n==="center")A=(e.left+e.right)/2-x;else if(ot(n)){const X=Object.keys(n)[0],H=n[X];A=this.chart.scales[X].getPixelForValue(H)}M=this._getYAxisLabelAlignment(m).textAlign}r==="y"&&(c==="start"?F="top":c==="end"&&(F="bottom"));const Y=this._getLabelSizes();for(N=0,C=o.length;N<C;++N){S=o[N],k=S.label;const X=i.setContext(this.getContext(N));O=this.getPixelForTick(N)+i.labelOffset,_=this._resolveTickFontOptions(N),R=_.lineHeight,L=Cr(k)?k.length:1;const H=L/2,W=X.color,V=X.textStrokeColor,Z=X.textStrokeWidth;let B=M;l?(A=O,M==="inner"&&(N===C-1?B=this.options.reverse?"left":"right":N===0?B=this.options.reverse?"right":"left":B="center"),n==="top"?d==="near"||y!==0?z=-L*R+R/2:d==="center"?z=-Y.highest.height/2-H*R+R:z=-Y.highest.height+R/2:d==="near"||y!==0?z=R/2:d==="center"?z=Y.highest.height/2-H*R:z=Y.highest.height-L*R,p&&(z*=-1),y!==0&&!X.showLabelBackdrop&&(A+=R/2*Math.sin(y))):(T=O,z=(1-L)*R/2);let G;if(X.showLabelBackdrop){const te=zn(X.backdropPadding),K=Y.heights[N],U=Y.widths[N];let re=z-te.top,ne=0-te.left;switch(F){case"middle":re-=K/2;break;case"bottom":re-=K;break}switch(M){case"center":ne-=U/2;break;case"right":ne-=U;break;case"inner":N===C-1?ne-=U:N>0&&(ne-=U/2);break}G={left:ne,top:re,width:U+te.width,height:K+te.height,color:X.backdropColor}}v.push({label:k,font:_,textOffset:z,options:{rotation:y,color:W,strokeColor:V,strokeWidth:Z,textAlign:B,textBaseline:F,translation:[A,T],backdrop:G}})}return v}_getXAxisLabelAlignment(){const{position:e,ticks:r}=this.options;if(-di(this.labelRotation))return e==="top"?"left":"right";let n="center";return r.align==="start"?n="left":r.align==="end"?n="right":r.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:r,ticks:{crossAlign:a,mirror:n,padding:i}}=this.options,l=this._getLabelSizes(),o=e+i,c=l.widest.width;let d,h;return r==="left"?n?(h=this.right+i,a==="near"?d="left":a==="center"?(d="center",h+=c/2):(d="right",h+=c)):(h=this.right-o,a==="near"?d="right":a==="center"?(d="center",h-=c/2):(d="left",h=this.left)):r==="right"?n?(h=this.left+i,a==="near"?d="right":a==="center"?(d="center",h-=c/2):(d="left",h-=c)):(h=this.left+o,a==="near"?d="left":a==="center"?(d="center",h+=c/2):(d="right",h=this.right)):d="right",{textAlign:d,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:a,top:n,width:i,height:l}=this;r&&(e.save(),e.fillStyle=r,e.fillRect(a,n,i,l),e.restore())}getLineWidthForValue(e){const r=this.options.grid;if(!this._isVisible()||!r.display)return 0;const n=this.ticks.findIndex(i=>i.value===e);return n>=0?r.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){const r=this.options.grid,a=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let i,l;const o=(c,d,h)=>{!h.width||!h.color||(a.save(),a.lineWidth=h.width,a.strokeStyle=h.color,a.setLineDash(h.borderDash||[]),a.lineDashOffset=h.borderDashOffset,a.beginPath(),a.moveTo(c.x,c.y),a.lineTo(d.x,d.y),a.stroke(),a.restore())};if(r.display)for(i=0,l=n.length;i<l;++i){const c=n[i];r.drawOnChartArea&&o({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),r.drawTicks&&o({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:a,grid:n}}=this,i=a.setContext(this.getContext()),l=a.display?i.width:0;if(!l)return;const o=n.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,h,p,m;this.isHorizontal()?(d=co(e,this.left,l)-l/2,h=co(e,this.right,o)+o/2,p=m=c):(p=co(e,this.top,l)-l/2,m=co(e,this.bottom,o)+o/2,d=h=c),r.save(),r.lineWidth=i.width,r.strokeStyle=i.color,r.beginPath(),r.moveTo(d,p),r.lineTo(h,m),r.stroke(),r.restore()}drawLabels(e){if(!this.options.ticks.display)return;const a=this.ctx,n=this._computeLabelArea();n&&bN(a,n);const i=this.getLabelItems(e);for(const l of i){const o=l.options,c=l.font,d=l.label,h=l.textOffset;Dx(a,d,0,h,c,o)}n&&yN(a)}drawTitle(){const{ctx:e,options:{position:r,title:a,reverse:n}}=this;if(!a.display)return;const i=ma(a.font),l=zn(a.padding),o=a.align;let c=i.lineHeight/2;r==="bottom"||r==="center"||ot(r)?(c+=l.bottom,Cr(a.text)&&(c+=i.lineHeight*(a.text.length-1))):c+=l.top;const{titleX:d,titleY:h,maxWidth:p,rotation:m}=Lee(this,c,r,o);Dx(e,a.text,0,0,i,{color:a.color,maxWidth:p,rotation:m,textAlign:_ee(o,r,n),textBaseline:"middle",translation:[d,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,a=it(e.grid&&e.grid.z,-1),n=it(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==qd.prototype.draw?[{z:r,draw:i=>{this.draw(i)}}]:[{z:a,draw:i=>{this.drawBackground(),this.drawGrid(i),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:r,draw:i=>{this.drawLabels(i)}}]}getMatchingVisibleMetas(e){const r=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",n=[];let i,l;for(i=0,l=r.length;i<l;++i){const o=r[i];o[a]===this.id&&(!e||o.type===e)&&n.push(o)}return n}_resolveTickFontOptions(e){const r=this.options.ticks.setContext(this.getContext(e));return ma(r.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class ag{constructor(e,r,a){this.type=e,this.scope=r,this.override=a,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 a;Fee(r)&&(a=this.register(r));const n=this.items,i=e.id,l=this.scope+"."+i;if(!i)throw new Error("class does not have id: "+e);return i in n||(n[i]=e,zee(e,l,a),this.override&&lr.override(e.id,e.overrides)),l}get(e){return this.items[e]}unregister(e){const r=this.items,a=e.id,n=this.scope;a in r&&delete r[a],n&&a in lr[n]&&(delete lr[n][a],this.override&&delete Vo[a])}}function zee(t,e,r){const a=Es(Object.create(null),[r?lr.get(r):{},lr.get(e),t.defaults]);lr.set(e,a),t.defaultRoutes&&Iee(e,t.defaultRoutes),t.descriptors&&lr.describe(e,t.descriptors)}function Iee(t,e){Object.keys(e).forEach(r=>{const a=r.split("."),n=a.pop(),i=[t].concat(a).join("."),l=e[r].split("."),o=l.pop(),c=l.join(".");lr.route(i,n,c,o)})}function Fee(t){return"id"in t&&"defaults"in t}class Bee{constructor(){this.controllers=new ag(AN,"datasets",!0),this.elements=new ag(ac,"elements"),this.plugins=new ag(Object,"plugins"),this.scales=new ag(qd,"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,a){[...r].forEach(n=>{const i=a||this._getRegistryForType(n);a||i.isForType(n)||i===this.plugins&&n.id?this._exec(e,i,n):wt(n,l=>{const o=a||this._getRegistryForType(l);this._exec(e,o,l)})})}_exec(e,r,a){const n=pN(e);Lt(a["before"+n],[],a),r[e](a),Lt(a["after"+n],[],a)}_getRegistryForType(e){for(let r=0;r<this._typedRegistries.length;r++){const a=this._typedRegistries[r];if(a.isForType(e))return a}return this.plugins}_get(e,r,a){const n=r.get(e);if(n===void 0)throw new Error('"'+e+'" is not a registered '+a+".");return n}}var ws=new Bee;class Hee{constructor(){this._init=[]}notify(e,r,a,n){r==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const i=n?this._descriptors(e).filter(n):this._descriptors(e),l=this._notify(i,e,r,a);return r==="afterDestroy"&&(this._notify(i,e,"stop"),this._notify(this._init,e,"uninstall")),l}_notify(e,r,a,n){n=n||{};for(const i of e){const l=i.plugin,o=l[a],c=[r,n,i.options];if(Lt(o,c,l)===!1&&n.cancelable)return!1}return!0}invalidate(){ut(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 a=e&&e.config,n=it(a.options&&a.options.plugins,{}),i=$ee(a);return n===!1&&!r?[]:Uee(e,i,n,r)}_notifyStateChanges(e){const r=this._oldCache||[],a=this._cache,n=(i,l)=>i.filter(o=>!l.some(c=>o.plugin.id===c.plugin.id));this._notify(n(r,a),e,"stop"),this._notify(n(a,r),e,"start")}}function $ee(t){const e={},r=[],a=Object.keys(ws.plugins.items);for(let i=0;i<a.length;i++)r.push(ws.getPlugin(a[i]));const n=t.plugins||[];for(let i=0;i<n.length;i++){const l=n[i];r.indexOf(l)===-1&&(r.push(l),e[l.id]=!0)}return{plugins:r,localIds:e}}function Yee(t,e){return!e&&t===!1?null:t===!0?{}:t}function Uee(t,{plugins:e,localIds:r},a,n){const i=[],l=t.getContext();for(const o of e){const c=o.id,d=Yee(a[c],n);d!==null&&i.push({plugin:o,options:Wee(t.config,{plugin:o,local:r[c]},d,l)})}return i}function Wee(t,{plugin:e,local:r},a,n){const i=t.pluginScopeKeys(e),l=t.getOptionScopes(a,i);return r&&e.defaults&&l.push(e.defaults),t.createResolver(l,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Dj(t,e){const r=lr.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||r.indexAxis||"x"}function Xee(t,e){let r=t;return t==="_index_"?r=e:t==="_value_"&&(r=e==="x"?"y":"x"),r}function Vee(t,e){return t===e?"_index_":"_value_"}function O6(t){if(t==="x"||t==="y"||t==="r")return t}function qee(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function Tj(t,...e){if(O6(t))return t;for(const r of e){const a=r.axis||qee(r.position)||t.length>1&&O6(t[0].toLowerCase());if(a)return a}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function R6(t,e,r){if(r[e+"AxisID"]===t)return{axis:e}}function Gee(t,e){if(e.data&&e.data.datasets){const r=e.data.datasets.filter(a=>a.xAxisID===t||a.yAxisID===t);if(r.length)return R6(t,"x",r[0])||R6(t,"y",r[0])}return{}}function Kee(t,e){const r=Vo[t.type]||{scales:{}},a=e.scales||{},n=Dj(t.type,e),i=Object.create(null);return Object.keys(a).forEach(l=>{const o=a[l];if(!ot(o))return console.error(`Invalid scale configuration for scale: ${l}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${l}`);const c=Tj(l,o,Gee(l,t),lr.scales[o.type]),d=Vee(c,n),h=r.scales||{};i[l]=Gh(Object.create(null),[{axis:c},o,h[c],h[d]])}),t.data.datasets.forEach(l=>{const o=l.type||t.type,c=l.indexAxis||Dj(o,e),h=(Vo[o]||{}).scales||{};Object.keys(h).forEach(p=>{const m=Xee(p,c),x=l[m+"AxisID"]||m;i[x]=i[x]||Object.create(null),Gh(i[x],[{axis:m},a[x],h[p]])})}),Object.keys(i).forEach(l=>{const o=i[l];Gh(o,[lr.scales[o.type],lr.scale])}),i}function tL(t){const e=t.options||(t.options={});e.plugins=it(e.plugins,{}),e.scales=Kee(t,e)}function rL(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function Zee(t){return t=t||{},t.data=rL(t.data),tL(t),t}const _6=new Map,aL=new Set;function ng(t,e){let r=_6.get(t);return r||(r=e(),_6.set(t,r),aL.add(r)),r}const mh=(t,e,r)=>{const a=Xo(e,r);a!==void 0&&t.add(a)};class Qee{constructor(e){this._config=Zee(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=rL(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(),tL(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return ng(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,r){return ng(`${e}.transition.${r}`,()=>[[`datasets.${e}.transitions.${r}`,`transitions.${r}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,r){return ng(`${e}-${r}`,()=>[[`datasets.${e}.elements.${r}`,`datasets.${e}`,`elements.${r}`,""]])}pluginScopeKeys(e){const r=e.id,a=this.type;return ng(`${a}-plugin-${r}`,()=>[[`plugins.${r}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,r){const a=this._scopeCache;let n=a.get(e);return(!n||r)&&(n=new Map,a.set(e,n)),n}getOptionScopes(e,r,a){const{options:n,type:i}=this,l=this._cachedScopes(e,a),o=l.get(r);if(o)return o;const c=new Set;r.forEach(h=>{e&&(c.add(e),h.forEach(p=>mh(c,e,p))),h.forEach(p=>mh(c,n,p)),h.forEach(p=>mh(c,Vo[i]||{},p)),h.forEach(p=>mh(c,lr,p)),h.forEach(p=>mh(c,Aj,p))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),aL.has(r)&&l.set(r,d),d}chartOptionScopes(){const{options:e,type:r}=this;return[e,Vo[r]||{},lr.datasets[r]||{},{type:r},lr,Aj]}resolveNamedOptions(e,r,a,n=[""]){const i={$shared:!0},{resolver:l,subPrefixes:o}=L6(this._resolverCache,e,n);let c=l;if(ete(l,r)){i.$shared=!1,a=jl(a)?a():a;const d=this.createResolver(e,a,o);c=Nd(l,a,d)}for(const d of r)i[d]=c[d];return i}createResolver(e,r,a=[""],n){const{resolver:i}=L6(this._resolverCache,e,a);return ot(r)?Nd(i,r,void 0,n):i}}function L6(t,e,r){let a=t.get(e);a||(a=new Map,t.set(e,a));const n=r.join();let i=a.get(n);return i||(i={resolver:wN(e,r),subPrefixes:r.filter(o=>!o.toLowerCase().includes("hover"))},a.set(n,i)),i}const Jee=t=>ot(t)&&Object.getOwnPropertyNames(t).some(e=>jl(t[e]));function ete(t,e){const{isScriptable:r,isIndexable:a}=B_(t);for(const n of e){const i=r(n),l=a(n),o=(l||i)&&t[n];if(i&&(jl(o)||Jee(o))||l&&Cr(o))return!0}return!1}var tte="4.5.0";const rte=["top","bottom","left","right","chartArea"];function z6(t,e){return t==="top"||t==="bottom"||rte.indexOf(t)===-1&&e==="x"}function I6(t,e){return function(r,a){return r[t]===a[t]?r[e]-a[e]:r[t]-a[t]}}function F6(t){const e=t.chart,r=e.options.animation;e.notifyPlugins("afterRender"),Lt(r&&r.onComplete,[t],e)}function ate(t){const e=t.chart,r=e.options.animation;Lt(r&&r.onProgress,[t],e)}function nL(t){return SN()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Gg={},B6=t=>{const e=nL(t);return Object.values(Gg).filter(r=>r.canvas===e).pop()};function nte(t,e,r){const a=Object.keys(t);for(const n of a){const i=+n;if(i>=e){const l=t[n];delete t[n],(r>0||i>e)&&(t[i+r]=l)}}}function ste(t,e,r,a){return!r||t.type==="mouseout"?null:a?e:t}let Rs=class{static defaults=lr;static instances=Gg;static overrides=Vo;static registry=ws;static version=tte;static getChart=B6;static register(...e){ws.add(...e),H6()}static unregister(...e){ws.remove(...e),H6()}constructor(e,r){const a=this.config=new Qee(r),n=nL(e),i=B6(n);if(i)throw new Error("Canvas is already in use. Chart with ID '"+i.id+"' must be destroyed before the canvas with ID '"+i.canvas.id+"' can be reused.");const l=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||Nee(n)),this.platform.updateConfig(a);const o=this.platform.acquireContext(n,l.aspectRatio),c=o&&o.canvas,d=c&&c.height,h=c&&c.width;if(this.id=vQ(),this.ctx=o,this.canvas=c,this.width=h,this.height=d,this._options=l,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 Hee,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=IQ(p=>this.update(p),l.resizeDelay||0),this._dataChanges=[],Gg[this.id]=this,!o||!c){console.error("Failed to create chart: can't acquire context from the given item");return}ni.listen(this,"complete",F6),ni.listen(this,"progress",ate),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:r},width:a,height:n,_aspectRatio:i}=this;return ut(e)?r&&i?i:n?a/n: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 ws}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():h6(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return c6(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 a=this.options,n=this.canvas,i=a.maintainAspectRatio&&this.aspectRatio,l=this.platform.getMaximumSize(n,e,r,i),o=a.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=l.width,this.height=l.height,this._aspectRatio=this.aspectRatio,h6(this,o,!0)&&(this.notifyPlugins("resize",{size:l}),Lt(a.onResize,[this,l],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};wt(r,(a,n)=>{a.id=n})}buildOrUpdateScales(){const e=this.options,r=e.scales,a=this.scales,n=Object.keys(a).reduce((l,o)=>(l[o]=!1,l),{});let i=[];r&&(i=i.concat(Object.keys(r).map(l=>{const o=r[l],c=Tj(l,o),d=c==="r",h=c==="x";return{options:o,dposition:d?"chartArea":h?"bottom":"left",dtype:d?"radialLinear":h?"category":"linear"}}))),wt(i,l=>{const o=l.options,c=o.id,d=Tj(c,o),h=it(o.type,l.dtype);(o.position===void 0||z6(o.position,d)!==z6(l.dposition))&&(o.position=l.dposition),n[c]=!0;let p=null;if(c in a&&a[c].type===h)p=a[c];else{const m=ws.getScale(h);p=new m({id:c,type:h,ctx:this.ctx,chart:this}),a[p.id]=p}p.init(o,e)}),wt(n,(l,o)=>{l||delete a[o]}),wt(a,l=>{cl.configure(this,l,l.options),cl.addBox(this,l)})}_updateMetasets(){const e=this._metasets,r=this.data.datasets.length,a=e.length;if(e.sort((n,i)=>n.index-i.index),a>r){for(let n=r;n<a;++n)this._destroyDatasetMeta(n);e.splice(r,a-r)}this._sortedMetasets=e.slice(0).sort(I6("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:r}}=this;e.length>r.length&&delete this._stacks,e.forEach((a,n)=>{r.filter(i=>i===a._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const e=[],r=this.data.datasets;let a,n;for(this._removeUnreferencedMetasets(),a=0,n=r.length;a<n;a++){const i=r[a];let l=this.getDatasetMeta(a);const o=i.type||this.config.type;if(l.type&&l.type!==o&&(this._destroyDatasetMeta(a),l=this.getDatasetMeta(a)),l.type=o,l.indexAxis=i.indexAxis||Dj(o,this.options),l.order=i.order||0,l.index=a,l.label=""+i.label,l.visible=this.isDatasetVisible(a),l.controller)l.controller.updateIndex(a),l.controller.linkScales();else{const c=ws.getController(o),{datasetElementType:d,dataElementType:h}=lr.datasets[o];Object.assign(c,{dataElementType:ws.getElement(h),datasetElementType:d&&ws.getElement(d)}),l.controller=new c(this,a),e.push(l.controller)}}return this._updateMetasets(),e}_resetElements(){wt(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 a=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!a.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const i=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let l=0;for(let d=0,h=this.data.datasets.length;d<h;d++){const{controller:p}=this.getDatasetMeta(d),m=!n&&i.indexOf(p)===-1;p.buildOrUpdateElements(m),l=Math.max(+p.getMaxOverflow(),l)}l=this._minPadding=a.layout.autoPadding?l:0,this._updateLayout(l),n||wt(i,d=>{d.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(I6("z","_idx"));const{_active:o,_lastEvent:c}=this;c?this._eventHandler(c,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){wt(this.scales,e=>{cl.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,r=new Set(Object.keys(this._listeners)),a=new Set(e.events);(!JD(r,a)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,r=this._getUniformDataChanges()||[];for(const{method:a,start:n,count:i}of r){const l=a==="_removeElements"?-i:i;nte(e,n,l)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const r=this.data.datasets.length,a=i=>new Set(e.filter(l=>l[0]===i).map((l,o)=>o+","+l.splice(1).join(","))),n=a(0);for(let i=1;i<r;i++)if(!JD(n,a(i)))return;return Array.from(n).map(i=>i.split(",")).map(i=>({method:i[1],start:+i[2],count:+i[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;cl.update(this,this.width,this.height,e);const r=this.chartArea,a=r.width<=0||r.height<=0;this._layers=[],wt(this.boxes,n=>{a&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,i)=>{n._idx=i}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let r=0,a=this.data.datasets.length;r<a;++r)this.getDatasetMeta(r).controller.configure();for(let r=0,a=this.data.datasets.length;r<a;++r)this._updateDataset(r,jl(e)?e({datasetIndex:r}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,r){const a=this.getDatasetMeta(e),n={meta:a,index:e,mode:r,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(a.controller._update(r),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ni.has(this)?this.attached&&!ni.running(this)&&ni.start(this):(this.draw(),F6({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:a,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(a,n)}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,a=[];let n,i;for(n=0,i=r.length;n<i;++n){const l=r[n];(!e||l.visible)&&a.push(l)}return a}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,a={meta:e,index:e.index,cancelable:!0},n=NJ(this,e);this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(n&&bN(r,n),e.controller.draw(),n&&yN(r),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(e){return xN(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,r,a,n){const i=ree.modes[r];return typeof i=="function"?i(this,e,a,n):[]}getDatasetMeta(e){const r=this.data.datasets[e],a=this._metasets;let n=a.filter(i=>i&&i._dataset===r).pop();return n||(n={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},a.push(n)),n}getContext(){return this.$context||(this.$context=Vd(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const r=this.data.datasets[e];if(!r)return!1;const a=this.getDatasetMeta(e);return typeof a.hidden=="boolean"?!a.hidden:!r.hidden}setDatasetVisibility(e,r){const a=this.getDatasetMeta(e);a.hidden=!r}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,r,a){const n=a?"show":"hide",i=this.getDatasetMeta(e),l=i.controller._resolveAnimations(void 0,n);vf(r)?(i.data[r].hidden=!a,this.update()):(this.setDatasetVisibility(e,a),l.update(i,{visible:a}),this.update(o=>o.datasetIndex===e?n: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(),c6(e,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete Gg[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,a=(i,l)=>{r.addEventListener(this,i,l),e[i]=l},n=(i,l,o)=>{i.offsetX=l,i.offsetY=o,this._eventHandler(i)};wt(this.options.events,i=>a(i,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,r=this.platform,a=(c,d)=>{r.addEventListener(this,c,d),e[c]=d},n=(c,d)=>{e[c]&&(r.removeEventListener(this,c,d),delete e[c])},i=(c,d)=>{this.canvas&&this.resize(c,d)};let l;const o=()=>{n("attach",o),this.attached=!0,this.resize(),a("resize",i),a("detach",l)};l=()=>{this.attached=!1,n("resize",i),this._stop(),this._resize(0,0),a("attach",o)},r.isAttached(this.canvas)?o():l()}unbindEvents(){wt(this._listeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._listeners={},wt(this._responsiveListeners,(e,r)=>{this.platform.removeEventListener(this,r,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,r,a){const n=a?"set":"remove";let i,l,o,c;for(r==="dataset"&&(i=this.getDatasetMeta(e[0].datasetIndex),i.controller["_"+n+"DatasetHoverStyle"]()),o=0,c=e.length;o<c;++o){l=e[o];const d=l&&this.getDatasetMeta(l.datasetIndex).controller;d&&d[n+"HoverStyle"](l.element,l.datasetIndex,l.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const r=this._active||[],a=e.map(({datasetIndex:i,index:l})=>{const o=this.getDatasetMeta(i);if(!o)throw new Error("No dataset found at index "+i);return{datasetIndex:i,element:o.data[l],index:l}});!Nx(a,r)&&(this._active=a,this._lastEvent=null,this._updateHoverStyles(a,r))}notifyPlugins(e,r,a){return this._plugins.notify(this,e,r,a)}isPluginEnabled(e){return this._plugins._cache.filter(r=>r.plugin.id===e).length===1}_updateHoverStyles(e,r,a){const n=this.options.hover,i=(c,d)=>c.filter(h=>!d.some(p=>h.datasetIndex===p.datasetIndex&&h.index===p.index)),l=i(r,e),o=a?e:i(e,r);l.length&&this.updateHoverStyle(l,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}_eventHandler(e,r){const a={event:e,replay:r,cancelable:!0,inChartArea:this.isPointInArea(e)},n=l=>(l.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",a,n)===!1)return;const i=this._handleEvent(e,r,a.inChartArea);return a.cancelable=!1,this.notifyPlugins("afterEvent",a,n),(i||a.changed)&&this.render(),this}_handleEvent(e,r,a){const{_active:n=[],options:i}=this,l=r,o=this._getActiveElements(e,n,a,l),c=AQ(e),d=ste(e,this._lastEvent,a,c);a&&(this._lastEvent=null,Lt(i.onHover,[e,o,this],this),c&&Lt(i.onClick,[e,o,this],this));const h=!Nx(o,n);return(h||r)&&(this._active=o,this._updateHoverStyles(o,n,r)),this._lastEvent=d,h}_getActiveElements(e,r,a,n){if(e.type==="mouseout")return[];if(!a)return r;const i=this.options.hover;return this.getElementsAtEventForMode(e,i.mode,i,n)}};function H6(){return wt(Rs.instances,t=>t._plugins.invalidate())}function ite(t,e,r){const{startAngle:a,x:n,y:i,outerRadius:l,innerRadius:o,options:c}=e,{borderWidth:d,borderJoinStyle:h}=c,p=Math.min(d/l,js(a-r));if(t.beginPath(),t.arc(n,i,l-d/2,a+p/2,r-p/2),o>0){const m=Math.min(d/o,js(a-r));t.arc(n,i,o+d/2,r-m/2,a+m/2,!0)}else{const m=Math.min(d/2,l*js(a-r));if(h==="round")t.arc(n,i,m,r-Ut/2,a+Ut/2,!0);else if(h==="bevel"){const x=2*m*m,b=-x*Math.cos(r+Ut/2)+n,y=-x*Math.sin(r+Ut/2)+i,v=x*Math.cos(a+Ut/2)+n,N=x*Math.sin(a+Ut/2)+i;t.lineTo(b,y),t.lineTo(v,N)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function lte(t,e,r){const{startAngle:a,pixelMargin:n,x:i,y:l,outerRadius:o,innerRadius:c}=e;let d=n/o;t.beginPath(),t.arc(i,l,o,a-d,r+d),c>n?(d=n/c,t.arc(i,l,c,r+d,a-d,!0)):t.arc(i,l,n,r+kr,a-kr),t.closePath(),t.clip()}function ote(t){return vN(t,["outerStart","outerEnd","innerStart","innerEnd"])}function cte(t,e,r,a){const n=ote(t.options.borderRadius),i=(r-e)/2,l=Math.min(i,a*e/2),o=c=>{const d=(r-Math.min(i,c))*a/2;return Pa(c,0,Math.min(i,d))};return{outerStart:o(n.outerStart),outerEnd:o(n.outerEnd),innerStart:Pa(n.innerStart,0,l),innerEnd:Pa(n.innerEnd,0,l)}}function Kc(t,e,r,a){return{x:r+t*Math.cos(e),y:a+t*Math.sin(e)}}function Px(t,e,r,a,n,i){const{x:l,y:o,startAngle:c,pixelMargin:d,innerRadius:h}=e,p=Math.max(e.outerRadius+a+r-d,0),m=h>0?h+a+r+d:0;let x=0;const b=n-c;if(a){const X=h>0?h-a:0,H=p>0?p-a:0,W=(X+H)/2,V=W!==0?b*W/(W+a):b;x=(b-V)/2}const y=Math.max(.001,b*p-r/Ut)/p,v=(b-y)/2,N=c+v+x,C=n-v-x,{outerStart:S,outerEnd:k,innerStart:A,innerEnd:T}=cte(e,m,p,C-N),M=p-S,O=p-k,_=N+S/M,R=C-k/O,L=m+A,z=m+T,F=N+A/L,Y=C-T/z;if(t.beginPath(),i){const X=(_+R)/2;if(t.arc(l,o,p,_,X),t.arc(l,o,p,X,R),k>0){const Z=Kc(O,R,l,o);t.arc(Z.x,Z.y,k,R,C+kr)}const H=Kc(z,C,l,o);if(t.lineTo(H.x,H.y),T>0){const Z=Kc(z,Y,l,o);t.arc(Z.x,Z.y,T,C+kr,Y+Math.PI)}const W=(C-T/m+(N+A/m))/2;if(t.arc(l,o,m,C-T/m,W,!0),t.arc(l,o,m,W,N+A/m,!0),A>0){const Z=Kc(L,F,l,o);t.arc(Z.x,Z.y,A,F+Math.PI,N-kr)}const V=Kc(M,N,l,o);if(t.lineTo(V.x,V.y),S>0){const Z=Kc(M,_,l,o);t.arc(Z.x,Z.y,S,N-kr,_)}}else{t.moveTo(l,o);const X=Math.cos(_)*p+l,H=Math.sin(_)*p+o;t.lineTo(X,H);const W=Math.cos(R)*p+l,V=Math.sin(R)*p+o;t.lineTo(W,V)}t.closePath()}function dte(t,e,r,a,n){const{fullCircles:i,startAngle:l,circumference:o}=e;let c=e.endAngle;if(i){Px(t,e,r,a,c,n);for(let d=0;d<i;++d)t.fill();isNaN(o)||(c=l+(o%br||br))}return Px(t,e,r,a,c,n),t.fill(),c}function ute(t,e,r,a,n){const{fullCircles:i,startAngle:l,circumference:o,options:c}=e,{borderWidth:d,borderJoinStyle:h,borderDash:p,borderDashOffset:m,borderRadius:x}=c,b=c.borderAlign==="inner";if(!d)return;t.setLineDash(p||[]),t.lineDashOffset=m,b?(t.lineWidth=d*2,t.lineJoin=h||"round"):(t.lineWidth=d,t.lineJoin=h||"bevel");let y=e.endAngle;if(i){Px(t,e,r,a,y,n);for(let v=0;v<i;++v)t.stroke();isNaN(o)||(y=l+(o%br||br))}b&&lte(t,e,y),c.selfJoin&&y-l>=Ut&&x===0&&h!=="miter"&&ite(t,e,y),i||(Px(t,e,r,a,y,n),t.stroke())}class Ml extends ac{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,a){const n=this.getProps(["x","y"],a),{angle:i,distance:l}=M_(n,{x:e,y:r}),{startAngle:o,endAngle:c,innerRadius:d,outerRadius:h,circumference:p}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),m=(this.options.spacing+this.options.borderWidth)/2,x=it(p,c-o),b=kx(i,o,c)&&o!==c,y=x>=br||b,v=No(l,d+m,h+m);return y&&v}getCenterPoint(e){const{x:r,y:a,startAngle:n,endAngle:i,innerRadius:l,outerRadius:o}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:c,spacing:d}=this.options,h=(n+i)/2,p=(l+o+d+c)/2;return{x:r+Math.cos(h)*p,y:a+Math.sin(h)*p}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:r,circumference:a}=this,n=(r.offset||0)/4,i=(r.spacing||0)/2,l=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=a>br?Math.floor(a/br):0,a===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*n,Math.sin(o)*n);const c=1-Math.sin(Math.min(Ut,a||0)),d=n*c;e.fillStyle=r.backgroundColor,e.strokeStyle=r.borderColor,dte(e,this,d,i,l),ute(e,this,d,i,l),e.restore()}}function $6(t,e,r,a){const n=t.options,{[r]:i}=t.getProps([r],a);return Math.abs(e-i)<n.radius+n.hitRadius}class hte extends ac{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,a){const n=this.options,{x:i,y:l}=this.getProps(["x","y"],a);return Math.pow(e-i,2)+Math.pow(r-l,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(e,r){return $6(this,e,"x",r)}inYRange(e,r){return $6(this,e,"y",r)}getCenterPoint(e){const{x:r,y:a}=this.getProps(["x","y"],e);return{x:r,y:a}}size(e){e=e||this.options||{};let r=e.radius||0;r=Math.max(r,r&&e.hoverRadius||0);const a=r&&e.borderWidth||0;return(r+a)*2}draw(e,r){const a=this.options;this.skip||a.radius<.1||!xN(this,r,this.size(a)/2)||(e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.fillStyle=a.backgroundColor,kj(e,a,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}function sL(t,e){const{x:r,y:a,base:n,width:i,height:l}=t.getProps(["x","y","base","width","height"],e);let o,c,d,h,p;return t.horizontal?(p=l/2,o=Math.min(r,n),c=Math.max(r,n),d=a-p,h=a+p):(p=i/2,o=r-p,c=r+p,d=Math.min(a,n),h=Math.max(a,n)),{left:o,top:d,right:c,bottom:h}}function dl(t,e,r,a){return t?0:Pa(e,r,a)}function fte(t,e,r){const a=t.options.borderWidth,n=t.borderSkipped,i=F_(a);return{t:dl(n.top,i.top,0,r),r:dl(n.right,i.right,0,e),b:dl(n.bottom,i.bottom,0,r),l:dl(n.left,i.left,0,e)}}function pte(t,e,r){const{enableBorderRadius:a}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,i=hd(n),l=Math.min(e,r),o=t.borderSkipped,c=a||ot(n);return{topLeft:dl(!c||o.top||o.left,i.topLeft,0,l),topRight:dl(!c||o.top||o.right,i.topRight,0,l),bottomLeft:dl(!c||o.bottom||o.left,i.bottomLeft,0,l),bottomRight:dl(!c||o.bottom||o.right,i.bottomRight,0,l)}}function mte(t){const e=sL(t),r=e.right-e.left,a=e.bottom-e.top,n=fte(t,r/2,a/2),i=pte(t,r/2,a/2);return{outer:{x:e.left,y:e.top,w:r,h:a,radius:i},inner:{x:e.left+n.l,y:e.top+n.t,w:r-n.l-n.r,h:a-n.t-n.b,radius:{topLeft:Math.max(0,i.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,i.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,i.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,i.bottomRight-Math.max(n.b,n.r))}}}}function W1(t,e,r,a){const n=e===null,i=r===null,o=t&&!(n&&i)&&sL(t,a);return o&&(n||No(e,o.left,o.right))&&(i||No(r,o.top,o.bottom))}function gte(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function xte(t,e){t.rect(e.x,e.y,e.w,e.h)}function X1(t,e,r={}){const a=t.x!==r.x?-e:0,n=t.y!==r.y?-e:0,i=(t.x+t.w!==r.x+r.w?e:0)-a,l=(t.y+t.h!==r.y+r.h?e:0)-n;return{x:t.x+a,y:t.y+n,w:t.w+i,h:t.h+l,radius:t.radius}}class iL extends ac{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:a,backgroundColor:n}}=this,{inner:i,outer:l}=mte(this),o=gte(l.radius)?Tx:xte;e.save(),(l.w!==i.w||l.h!==i.h)&&(e.beginPath(),o(e,X1(l,r,i)),e.clip(),o(e,X1(i,-r,l)),e.fillStyle=a,e.fill("evenodd")),e.beginPath(),o(e,X1(i,r)),e.fillStyle=n,e.fill(),e.restore()}inRange(e,r,a){return W1(this,e,r,a)}inXRange(e,r){return W1(this,e,null,r)}inYRange(e,r){return W1(this,null,e,r)}getCenterPoint(e){const{x:r,y:a,base:n,horizontal:i}=this.getProps(["x","y","base","horizontal"],e);return{x:i?(r+n)/2:r,y:i?a:(a+n)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}const Y6=(t,e)=>{let{boxHeight:r=e,boxWidth:a=e}=t;return t.usePointStyle&&(r=Math.min(r,e),a=t.pointStyleWidth||Math.min(a,e)),{boxWidth:a,boxHeight:r,itemHeight:Math.max(e,r)}},bte=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class U6 extends ac{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,a){this.maxWidth=e,this.maxHeight=r,this._margins=a,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=Lt(e.generateLabels,[this.chart],this)||[];e.filter&&(r=r.filter(a=>e.filter(a,this.chart.data))),e.sort&&(r=r.sort((a,n)=>e.sort(a,n,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 a=e.labels,n=ma(a.font),i=n.size,l=this._computeTitleHeight(),{boxWidth:o,itemHeight:c}=Y6(a,i);let d,h;r.font=n.string,this.isHorizontal()?(d=this.maxWidth,h=this._fitRows(l,i,o,c)+10):(h=this.maxHeight,d=this._fitCols(l,n,o,c)+10),this.width=Math.min(d,e.maxWidth||this.maxWidth),this.height=Math.min(h,e.maxHeight||this.maxHeight)}_fitRows(e,r,a,n){const{ctx:i,maxWidth:l,options:{labels:{padding:o}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],h=n+o;let p=e;i.textAlign="left",i.textBaseline="middle";let m=-1,x=-h;return this.legendItems.forEach((b,y)=>{const v=a+r/2+i.measureText(b.text).width;(y===0||d[d.length-1]+v+2*o>l)&&(p+=h,d[d.length-(y>0?0:1)]=0,x+=h,m++),c[y]={left:0,top:x,row:m,width:v,height:n},d[d.length-1]+=v+o}),p}_fitCols(e,r,a,n){const{ctx:i,maxHeight:l,options:{labels:{padding:o}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],h=l-e;let p=o,m=0,x=0,b=0,y=0;return this.legendItems.forEach((v,N)=>{const{itemWidth:C,itemHeight:S}=yte(a,r,i,v,n);N>0&&x+S+2*o>h&&(p+=m+o,d.push({width:m,height:x}),b+=m+o,y++,m=x=0),c[N]={left:b,top:x,col:y,width:C,height:S},m=Math.max(m,C),x+=S+o}),p+=m,d.push({width:m,height:x}),p}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:a,labels:{padding:n},rtl:i}}=this,l=fd(i,this.left,this.width);if(this.isHorizontal()){let o=0,c=Ka(a,this.left+n,this.right-this.lineWidths[o]);for(const d of r)o!==d.row&&(o=d.row,c=Ka(a,this.left+n,this.right-this.lineWidths[o])),d.top+=this.top+e+n,d.left=l.leftForLtr(l.x(c),d.width),c+=d.width+n}else{let o=0,c=Ka(a,this.top+e+n,this.bottom-this.columnSizes[o].height);for(const d of r)d.col!==o&&(o=d.col,c=Ka(a,this.top+e+n,this.bottom-this.columnSizes[o].height)),d.top=c,d.left+=this.left+n,d.left=l.leftForLtr(l.x(d.left),d.width),c+=d.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;bN(e,this),this._draw(),yN(e)}}_draw(){const{options:e,columnSizes:r,lineWidths:a,ctx:n}=this,{align:i,labels:l}=e,o=lr.color,c=fd(e.rtl,this.left,this.width),d=ma(l.font),{padding:h}=l,p=d.size,m=p/2;let x;this.drawTitle(),n.textAlign=c.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=d.string;const{boxWidth:b,boxHeight:y,itemHeight:v}=Y6(l,p),N=function(T,M,O){if(isNaN(b)||b<=0||isNaN(y)||y<0)return;n.save();const _=it(O.lineWidth,1);if(n.fillStyle=it(O.fillStyle,o),n.lineCap=it(O.lineCap,"butt"),n.lineDashOffset=it(O.lineDashOffset,0),n.lineJoin=it(O.lineJoin,"miter"),n.lineWidth=_,n.strokeStyle=it(O.strokeStyle,o),n.setLineDash(it(O.lineDash,[])),l.usePointStyle){const R={radius:y*Math.SQRT2/2,pointStyle:O.pointStyle,rotation:O.rotation,borderWidth:_},L=c.xPlus(T,b/2),z=M+m;I_(n,R,L,z,l.pointStyleWidth&&b)}else{const R=M+Math.max((p-y)/2,0),L=c.leftForLtr(T,b),z=hd(O.borderRadius);n.beginPath(),Object.values(z).some(F=>F!==0)?Tx(n,{x:L,y:R,w:b,h:y,radius:z}):n.rect(L,R,b,y),n.fill(),_!==0&&n.stroke()}n.restore()},C=function(T,M,O){Dx(n,O.text,T,M+v/2,d,{strikethrough:O.hidden,textAlign:c.textAlign(O.textAlign)})},S=this.isHorizontal(),k=this._computeTitleHeight();S?x={x:Ka(i,this.left+h,this.right-a[0]),y:this.top+h+k,line:0}:x={x:this.left+h,y:Ka(i,this.top+k+h,this.bottom-r[0].height),line:0},U_(this.ctx,e.textDirection);const A=v+h;this.legendItems.forEach((T,M)=>{n.strokeStyle=T.fontColor,n.fillStyle=T.fontColor;const O=n.measureText(T.text).width,_=c.textAlign(T.textAlign||(T.textAlign=l.textAlign)),R=b+m+O;let L=x.x,z=x.y;c.setWidth(this.width),S?M>0&&L+R+h>this.right&&(z=x.y+=A,x.line++,L=x.x=Ka(i,this.left+h,this.right-a[x.line])):M>0&&z+A>this.bottom&&(L=x.x=L+r[x.line].width+h,x.line++,z=x.y=Ka(i,this.top+k+h,this.bottom-r[x.line].height));const F=c.x(L);if(N(F,z,T),L=FQ(_,L+b+m,S?L+R:this.right,e.rtl),C(c.x(L),z,T),S)x.x+=R+h;else if(typeof T.text!="string"){const Y=d.lineHeight;x.y+=lL(T,Y)+h}else x.y+=A}),W_(this.ctx,e.textDirection)}drawTitle(){const e=this.options,r=e.title,a=ma(r.font),n=zn(r.padding);if(!r.display)return;const i=fd(e.rtl,this.left,this.width),l=this.ctx,o=r.position,c=a.size/2,d=n.top+c;let h,p=this.left,m=this.width;if(this.isHorizontal())m=Math.max(...this.lineWidths),h=this.top+d,p=Ka(e.align,p,this.right-m);else{const b=this.columnSizes.reduce((y,v)=>Math.max(y,v.height),0);h=d+Ka(e.align,this.top,this.bottom-b-e.labels.padding-this._computeTitleHeight())}const x=Ka(o,p,p+m);l.textAlign=i.textAlign(__(o)),l.textBaseline="middle",l.strokeStyle=r.color,l.fillStyle=r.color,l.font=a.string,Dx(l,r.text,x,h,a)}_computeTitleHeight(){const e=this.options.title,r=ma(e.font),a=zn(e.padding);return e.display?r.lineHeight+a.height:0}_getLegendItemAt(e,r){let a,n,i;if(No(e,this.left,this.right)&&No(r,this.top,this.bottom)){for(i=this.legendHitBoxes,a=0;a<i.length;++a)if(n=i[a],No(e,n.left,n.left+n.width)&&No(r,n.top,n.top+n.height))return this.legendItems[a]}return null}handleEvent(e){const r=this.options;if(!jte(e.type,r))return;const a=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const n=this._hoveredItem,i=bte(n,a);n&&!i&&Lt(r.onLeave,[e,n,this],this),this._hoveredItem=a,a&&!i&&Lt(r.onHover,[e,a,this],this)}else a&&Lt(r.onClick,[e,a,this],this)}}function yte(t,e,r,a,n){const i=vte(a,t,e,r),l=wte(n,a,e.lineHeight);return{itemWidth:i,itemHeight:l}}function vte(t,e,r,a){let n=t.text;return n&&typeof n!="string"&&(n=n.reduce((i,l)=>i.length>l.length?i:l)),e+r.size/2+a.measureText(n).width}function wte(t,e,r){let a=t;return typeof e.text!="string"&&(a=lL(e,r)),a}function lL(t,e){const r=t.text?t.text.length:0;return e*r}function jte(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var nc={id:"legend",_element:U6,start(t,e,r){const a=t.legend=new U6({ctx:t.ctx,options:r,chart:t});cl.configure(t,a,r),cl.addBox(t,a)},stop(t){cl.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,r){const a=t.legend;cl.configure(t,a,r),a.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 a=e.datasetIndex,n=r.chart;n.isDatasetVisible(a)?(n.hide(a),e.hidden=!0):(n.show(a),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:a,textAlign:n,color:i,useBorderRadius:l,borderRadius:o}}=t.legend.options;return t._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(r?0:void 0),h=zn(d.borderWidth);return{text:e[c.index].label,fillStyle:d.backgroundColor,fontColor:i,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:d.borderColor,pointStyle:a||d.pointStyle,rotation:d.rotation,textAlign:n||d.textAlign,borderRadius:l&&(o||d.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 Ph={average(t){if(!t.length)return!1;let e,r,a=new Set,n=0,i=0;for(e=0,r=t.length;e<r;++e){const o=t[e].element;if(o&&o.hasValue()){const c=o.tooltipPosition();a.add(c.x),n+=c.y,++i}}return i===0||a.size===0?!1:{x:[...a].reduce((o,c)=>o+c)/a.size,y:n/i}},nearest(t,e){if(!t.length)return!1;let r=e.x,a=e.y,n=Number.POSITIVE_INFINITY,i,l,o;for(i=0,l=t.length;i<l;++i){const c=t[i].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),h=OQ(e,d);h<n&&(n=h,o=c)}}if(o){const c=o.tooltipPosition();r=c.x,a=c.y}return{x:r,y:a}}};function vs(t,e){return e&&(Cr(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function si(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
`)>-1?t.split(`
`):t}function Nte(t,e){const{element:r,datasetIndex:a,index:n}=e,i=t.getDatasetMeta(a).controller,{label:l,value:o}=i.getLabelAndValue(n);return{chart:t,label:l,parsed:i.getParsed(n),raw:t.data.datasets[a].data[n],formattedValue:o,dataset:i.getDataset(),dataIndex:n,datasetIndex:a,element:r}}function W6(t,e){const r=t.chart.ctx,{body:a,footer:n,title:i}=t,{boxWidth:l,boxHeight:o}=e,c=ma(e.bodyFont),d=ma(e.titleFont),h=ma(e.footerFont),p=i.length,m=n.length,x=a.length,b=zn(e.padding);let y=b.height,v=0,N=a.reduce((k,A)=>k+A.before.length+A.lines.length+A.after.length,0);if(N+=t.beforeBody.length+t.afterBody.length,p&&(y+=p*d.lineHeight+(p-1)*e.titleSpacing+e.titleMarginBottom),N){const k=e.displayColors?Math.max(o,c.lineHeight):c.lineHeight;y+=x*k+(N-x)*c.lineHeight+(N-1)*e.bodySpacing}m&&(y+=e.footerMarginTop+m*h.lineHeight+(m-1)*e.footerSpacing);let C=0;const S=function(k){v=Math.max(v,r.measureText(k).width+C)};return r.save(),r.font=d.string,wt(t.title,S),r.font=c.string,wt(t.beforeBody.concat(t.afterBody),S),C=e.displayColors?l+2+e.boxPadding:0,wt(a,k=>{wt(k.before,S),wt(k.lines,S),wt(k.after,S)}),C=0,r.font=h.string,wt(t.footer,S),r.restore(),v+=b.width,{width:v,height:y}}function Ste(t,e){const{y:r,height:a}=e;return r<a/2?"top":r>t.height-a/2?"bottom":"center"}function Cte(t,e,r,a){const{x:n,width:i}=a,l=r.caretSize+r.caretPadding;if(t==="left"&&n+i+l>e.width||t==="right"&&n-i-l<0)return!0}function Ate(t,e,r,a){const{x:n,width:i}=r,{width:l,chartArea:{left:o,right:c}}=t;let d="center";return a==="center"?d=n<=(o+c)/2?"left":"right":n<=i/2?d="left":n>=l-i/2&&(d="right"),Cte(d,t,e,r)&&(d="center"),d}function X6(t,e,r){const a=r.yAlign||e.yAlign||Ste(t,r);return{xAlign:r.xAlign||e.xAlign||Ate(t,e,r,a),yAlign:a}}function kte(t,e){let{x:r,width:a}=t;return e==="right"?r-=a:e==="center"&&(r-=a/2),r}function Dte(t,e,r){let{y:a,height:n}=t;return e==="top"?a+=r:e==="bottom"?a-=n+r:a-=n/2,a}function V6(t,e,r,a){const{caretSize:n,caretPadding:i,cornerRadius:l}=t,{xAlign:o,yAlign:c}=r,d=n+i,{topLeft:h,topRight:p,bottomLeft:m,bottomRight:x}=hd(l);let b=kte(e,o);const y=Dte(e,c,d);return c==="center"?o==="left"?b+=d:o==="right"&&(b-=d):o==="left"?b-=Math.max(h,m)+n:o==="right"&&(b+=Math.max(p,x)+n),{x:Pa(b,0,a.width-e.width),y:Pa(y,0,a.height-e.height)}}function sg(t,e,r){const a=zn(r.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-a.right:t.x+a.left}function q6(t){return vs([],si(t))}function Tte(t,e,r){return Vd(t,{tooltip:e,tooltipItems:r,type:"tooltip"})}function G6(t,e){const r=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return r?t.override(r):t}const oL={beforeTitle:ti,title(t){if(t.length>0){const e=t[0],r=e.chart.data.labels,a=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(a>0&&e.dataIndex<a)return r[e.dataIndex]}return""},afterTitle:ti,beforeBody:ti,beforeLabel:ti,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 ut(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:ti,afterBody:ti,beforeFooter:ti,footer:ti,afterFooter:ti};function ka(t,e,r,a){const n=t[e].call(r,a);return typeof n>"u"?oL[e].call(r,a):n}let K6=class extends ac{static positioners=Ph;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,a=this.options.setContext(this.getContext()),n=a.enabled&&r.options.animation&&a.animations,i=new X_(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(i)),i}getContext(){return this.$context||(this.$context=Tte(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,r){const{callbacks:a}=r,n=ka(a,"beforeTitle",this,e),i=ka(a,"title",this,e),l=ka(a,"afterTitle",this,e);let o=[];return o=vs(o,si(n)),o=vs(o,si(i)),o=vs(o,si(l)),o}getBeforeBody(e,r){return q6(ka(r.callbacks,"beforeBody",this,e))}getBody(e,r){const{callbacks:a}=r,n=[];return wt(e,i=>{const l={before:[],lines:[],after:[]},o=G6(a,i);vs(l.before,si(ka(o,"beforeLabel",this,i))),vs(l.lines,ka(o,"label",this,i)),vs(l.after,si(ka(o,"afterLabel",this,i))),n.push(l)}),n}getAfterBody(e,r){return q6(ka(r.callbacks,"afterBody",this,e))}getFooter(e,r){const{callbacks:a}=r,n=ka(a,"beforeFooter",this,e),i=ka(a,"footer",this,e),l=ka(a,"afterFooter",this,e);let o=[];return o=vs(o,si(n)),o=vs(o,si(i)),o=vs(o,si(l)),o}_createItems(e){const r=this._active,a=this.chart.data,n=[],i=[],l=[];let o=[],c,d;for(c=0,d=r.length;c<d;++c)o.push(Nte(this.chart,r[c]));return e.filter&&(o=o.filter((h,p,m)=>e.filter(h,p,m,a))),e.itemSort&&(o=o.sort((h,p)=>e.itemSort(h,p,a))),wt(o,h=>{const p=G6(e.callbacks,h);n.push(ka(p,"labelColor",this,h)),i.push(ka(p,"labelPointStyle",this,h)),l.push(ka(p,"labelTextColor",this,h))}),this.labelColors=n,this.labelPointStyles=i,this.labelTextColors=l,this.dataPoints=o,o}update(e,r){const a=this.options.setContext(this.getContext()),n=this._active;let i,l=[];if(!n.length)this.opacity!==0&&(i={opacity:0});else{const o=Ph[a.position].call(this,n,this._eventPosition);l=this._createItems(a),this.title=this.getTitle(l,a),this.beforeBody=this.getBeforeBody(l,a),this.body=this.getBody(l,a),this.afterBody=this.getAfterBody(l,a),this.footer=this.getFooter(l,a);const c=this._size=W6(this,a),d=Object.assign({},o,c),h=X6(this.chart,a,d),p=V6(a,d,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,i={opacity:1,x:p.x,y:p.y,width:c.width,height:c.height,caretX:o.x,caretY:o.y}}this._tooltipItems=l,this.$context=void 0,i&&this._resolveAnimations().update(this,i),e&&a.external&&a.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(e,r,a,n){const i=this.getCaretPosition(e,a,n);r.lineTo(i.x1,i.y1),r.lineTo(i.x2,i.y2),r.lineTo(i.x3,i.y3)}getCaretPosition(e,r,a){const{xAlign:n,yAlign:i}=this,{caretSize:l,cornerRadius:o}=a,{topLeft:c,topRight:d,bottomLeft:h,bottomRight:p}=hd(o),{x:m,y:x}=e,{width:b,height:y}=r;let v,N,C,S,k,A;return i==="center"?(k=x+y/2,n==="left"?(v=m,N=v-l,S=k+l,A=k-l):(v=m+b,N=v+l,S=k-l,A=k+l),C=v):(n==="left"?N=m+Math.max(c,h)+l:n==="right"?N=m+b-Math.max(d,p)-l:N=this.caretX,i==="top"?(S=x,k=S-l,v=N-l,C=N+l):(S=x+y,k=S+l,v=N+l,C=N-l),A=S),{x1:v,x2:N,x3:C,y1:S,y2:k,y3:A}}drawTitle(e,r,a){const n=this.title,i=n.length;let l,o,c;if(i){const d=fd(a.rtl,this.x,this.width);for(e.x=sg(this,a.titleAlign,a),r.textAlign=d.textAlign(a.titleAlign),r.textBaseline="middle",l=ma(a.titleFont),o=a.titleSpacing,r.fillStyle=a.titleColor,r.font=l.string,c=0;c<i;++c)r.fillText(n[c],d.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+o,c+1===i&&(e.y+=a.titleMarginBottom-o)}}_drawColorBox(e,r,a,n,i){const l=this.labelColors[a],o=this.labelPointStyles[a],{boxHeight:c,boxWidth:d}=i,h=ma(i.bodyFont),p=sg(this,"left",i),m=n.x(p),x=c<h.lineHeight?(h.lineHeight-c)/2:0,b=r.y+x;if(i.usePointStyle){const y={radius:Math.min(d,c)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},v=n.leftForLtr(m,d)+d/2,N=b+c/2;e.strokeStyle=i.multiKeyBackground,e.fillStyle=i.multiKeyBackground,kj(e,y,v,N),e.strokeStyle=l.borderColor,e.fillStyle=l.backgroundColor,kj(e,y,v,N)}else{e.lineWidth=ot(l.borderWidth)?Math.max(...Object.values(l.borderWidth)):l.borderWidth||1,e.strokeStyle=l.borderColor,e.setLineDash(l.borderDash||[]),e.lineDashOffset=l.borderDashOffset||0;const y=n.leftForLtr(m,d),v=n.leftForLtr(n.xPlus(m,1),d-2),N=hd(l.borderRadius);Object.values(N).some(C=>C!==0)?(e.beginPath(),e.fillStyle=i.multiKeyBackground,Tx(e,{x:y,y:b,w:d,h:c,radius:N}),e.fill(),e.stroke(),e.fillStyle=l.backgroundColor,e.beginPath(),Tx(e,{x:v,y:b+1,w:d-2,h:c-2,radius:N}),e.fill()):(e.fillStyle=i.multiKeyBackground,e.fillRect(y,b,d,c),e.strokeRect(y,b,d,c),e.fillStyle=l.backgroundColor,e.fillRect(v,b+1,d-2,c-2))}e.fillStyle=this.labelTextColors[a]}drawBody(e,r,a){const{body:n}=this,{bodySpacing:i,bodyAlign:l,displayColors:o,boxHeight:c,boxWidth:d,boxPadding:h}=a,p=ma(a.bodyFont);let m=p.lineHeight,x=0;const b=fd(a.rtl,this.x,this.width),y=function(O){r.fillText(O,b.x(e.x+x),e.y+m/2),e.y+=m+i},v=b.textAlign(l);let N,C,S,k,A,T,M;for(r.textAlign=l,r.textBaseline="middle",r.font=p.string,e.x=sg(this,v,a),r.fillStyle=a.bodyColor,wt(this.beforeBody,y),x=o&&v!=="right"?l==="center"?d/2+h:d+2+h:0,k=0,T=n.length;k<T;++k){for(N=n[k],C=this.labelTextColors[k],r.fillStyle=C,wt(N.before,y),S=N.lines,o&&S.length&&(this._drawColorBox(r,e,k,b,a),m=Math.max(p.lineHeight,c)),A=0,M=S.length;A<M;++A)y(S[A]),m=p.lineHeight;wt(N.after,y)}x=0,m=p.lineHeight,wt(this.afterBody,y),e.y-=i}drawFooter(e,r,a){const n=this.footer,i=n.length;let l,o;if(i){const c=fd(a.rtl,this.x,this.width);for(e.x=sg(this,a.footerAlign,a),e.y+=a.footerMarginTop,r.textAlign=c.textAlign(a.footerAlign),r.textBaseline="middle",l=ma(a.footerFont),r.fillStyle=a.footerColor,r.font=l.string,o=0;o<i;++o)r.fillText(n[o],c.x(e.x),e.y+l.lineHeight/2),e.y+=l.lineHeight+a.footerSpacing}}drawBackground(e,r,a,n){const{xAlign:i,yAlign:l}=this,{x:o,y:c}=e,{width:d,height:h}=a,{topLeft:p,topRight:m,bottomLeft:x,bottomRight:b}=hd(n.cornerRadius);r.fillStyle=n.backgroundColor,r.strokeStyle=n.borderColor,r.lineWidth=n.borderWidth,r.beginPath(),r.moveTo(o+p,c),l==="top"&&this.drawCaret(e,r,a,n),r.lineTo(o+d-m,c),r.quadraticCurveTo(o+d,c,o+d,c+m),l==="center"&&i==="right"&&this.drawCaret(e,r,a,n),r.lineTo(o+d,c+h-b),r.quadraticCurveTo(o+d,c+h,o+d-b,c+h),l==="bottom"&&this.drawCaret(e,r,a,n),r.lineTo(o+x,c+h),r.quadraticCurveTo(o,c+h,o,c+h-x),l==="center"&&i==="left"&&this.drawCaret(e,r,a,n),r.lineTo(o,c+p),r.quadraticCurveTo(o,c,o+p,c),r.closePath(),r.fill(),n.borderWidth>0&&r.stroke()}_updateAnimationTarget(e){const r=this.chart,a=this.$animations,n=a&&a.x,i=a&&a.y;if(n||i){const l=Ph[e.position].call(this,this._active,this._eventPosition);if(!l)return;const o=this._size=W6(this,e),c=Object.assign({},l,this._size),d=X6(r,e,c),h=V6(e,c,d,r);(n._to!==h.x||i._to!==h.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=o.width,this.height=o.height,this.caretX=l.x,this.caretY=l.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(e){const r=this.options.setContext(this.getContext());let a=this.opacity;if(!a)return;this._updateAnimationTarget(r);const n={width:this.width,height:this.height},i={x:this.x,y:this.y};a=Math.abs(a)<.001?0:a;const l=zn(r.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&o&&(e.save(),e.globalAlpha=a,this.drawBackground(i,e,n,r),U_(e,r.textDirection),i.y+=l.top,this.drawTitle(i,e,r),this.drawBody(i,e,r),this.drawFooter(i,e,r),W_(e,r.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,r){const a=this._active,n=e.map(({datasetIndex:o,index:c})=>{const d=this.chart.getDatasetMeta(o);if(!d)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:d.data[c],index:c}}),i=!Nx(a,n),l=this._positionChanged(n,r);(i||l)&&(this._active=n,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,r,a=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,i=this._active||[],l=this._getActiveElements(e,i,r,a),o=this._positionChanged(l,e),c=r||!Nx(l,i)||o;return c&&(this._active=l,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,r))),c}_getActiveElements(e,r,a,n){const i=this.options;if(e.type==="mouseout")return[];if(!n)return r.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const l=this.chart.getElementsAtEventForMode(e,i.mode,i,a);return i.reverse&&l.reverse(),l}_positionChanged(e,r){const{caretX:a,caretY:n,options:i}=this,l=Ph[i.position].call(this,e,r);return l!==!1&&(a!==l.x||n!==l.y)}};var sc={id:"tooltip",_element:K6,positioners:Ph,afterInit(t,e,r){r&&(t.tooltip=new K6({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:oL},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 Mte=(t,e,r,a)=>(typeof e=="string"?(r=t.push(e)-1,a.unshift({index:r,label:e})):isNaN(e)&&(r=null),r);function Ete(t,e,r,a){const n=t.indexOf(e);if(n===-1)return Mte(t,e,r,a);const i=t.lastIndexOf(e);return n!==i?r:n}const Pte=(t,e)=>t===null?null:Pa(Math.round(t),0,e);function Z6(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Ote extends qd{static id="category";static defaults={ticks:{callback:Z6}};constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const r=this._addedLabels;if(r.length){const a=this.getLabels();for(const{index:n,label:i}of r)a[n]===i&&a.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,r){if(ut(e))return null;const a=this.getLabels();return r=isFinite(r)&&a[r]===e?r:Ete(a,e,it(r,e),this._addedLabels),Pte(r,a.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:r}=this.getUserBounds();let{min:a,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(a=0),r||(n=this.getLabels().length-1)),this.min=a,this.max=n}buildTicks(){const e=this.min,r=this.max,a=this.options.offset,n=[];let i=this.getLabels();i=e===0&&r===i.length-1?i:i.slice(e,r+1),this._valueRange=Math.max(i.length-(a?0:1),1),this._startValue=this.min-(a?.5:0);for(let l=e;l<=r;l++)n.push({value:l});return n}getLabelForValue(e){return Z6.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 Rte(t,e){const r=[],{bounds:n,step:i,min:l,max:o,precision:c,count:d,maxTicks:h,maxDigits:p,includeBounds:m}=t,x=i||1,b=h-1,{min:y,max:v}=e,N=!ut(l),C=!ut(o),S=!ut(d),k=(v-y)/(p+1);let A=t6((v-y)/b/x)*x,T,M,O,_;if(A<1e-14&&!N&&!C)return[{value:y},{value:v}];_=Math.ceil(v/A)-Math.floor(y/A),_>b&&(A=t6(_*A/b/x)*x),ut(c)||(T=Math.pow(10,c),A=Math.ceil(A*T)/T),n==="ticks"?(M=Math.floor(y/A)*A,O=Math.ceil(v/A)*A):(M=y,O=v),N&&C&&i&&MQ((o-l)/i,A/1e3)?(_=Math.round(Math.min((o-l)/A,h)),A=(o-l)/_,M=l,O=o):S?(M=N?l:M,O=C?o:O,_=d-1,A=(O-M)/_):(_=(O-M)/A,Vg(_,Math.round(_),A/1e3)?_=Math.round(_):_=Math.ceil(_));const R=Math.max(r6(A),r6(M));T=Math.pow(10,ut(c)?R:c),M=Math.round(M*T)/T,O=Math.round(O*T)/T;let L=0;for(N&&(m&&M!==l?(r.push({value:l}),M<l&&L++,Vg(Math.round((M+L*A)*T)/T,l,Q6(l,k,t))&&L++):M<l&&L++);L<_;++L){const z=Math.round((M+L*A)*T)/T;if(C&&z>o)break;r.push({value:z})}return C&&m&&O!==o?r.length&&Vg(r[r.length-1].value,o,Q6(o,k,t))?r[r.length-1].value=o:r.push({value:o}):(!C||O===o)&&r.push({value:O}),r}function Q6(t,e,{horizontal:r,minRotation:a}){const n=di(a),i=(r?Math.sin(n):Math.cos(n))||.001,l=.75*e*(""+t).length;return Math.min(e/i,l)}class _te extends qd{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 ut(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:r,maxDefined:a}=this.getUserBounds();let{min:n,max:i}=this;const l=c=>n=r?n:c,o=c=>i=a?i:c;if(e){const c=pl(n),d=pl(i);c<0&&d<0?o(0):c>0&&d>0&&l(0)}if(n===i){let c=i===0?1:Math.abs(i*.05);o(i+c),e||l(n-c)}this.min=n,this.max=i}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:r,stepSize:a}=e,n;return a?(n=Math.ceil(this.max/a)-Math.floor(this.min/a)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${a} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),r=r||11),r&&(n=Math.min(r,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,r=e.ticks;let a=this.getTickLimit();a=Math.max(2,a);const n={maxTicks:a,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},i=this._range||this,l=Rte(n,i);return e.bounds==="ticks"&&EQ(l,this,"value"),e.reverse?(l.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),l}configure(){const e=this.ticks;let r=this.min,a=this.max;if(super.configure(),this.options.offset&&e.length){const n=(a-r)/Math.max(e.length-1,1)/2;r-=n,a+=n}this._startValue=r,this._endValue=a,this._valueRange=a-r}getLabelForValue(e){return gN(e,this.chart.options.locale,this.options.ticks.format)}}class Lte extends _te{static id="linear";static defaults={ticks:{callback:z_.formatters.numeric}};determineDataLimits(){const{min:e,max:r}=this.getMinMax(!0);this.min=Ln(e)?e:0,this.max=Ln(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),r=e?this.width:this.height,a=di(this.options.ticks.minRotation),n=(e?Math.sin(a):Math.cos(a))||.001,i=this._resolveTickFontOptions(0);return Math.ceil(r/Math.min(40,i.lineHeight/n))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}const $0={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}},Ea=Object.keys($0);function J6(t,e){return t-e}function eT(t,e){if(ut(e))return null;const r=t._adapter,{parser:a,round:n,isoWeekday:i}=t._parseOpts;let l=e;return typeof a=="function"&&(l=a(l)),Ln(l)||(l=typeof a=="string"?r.parse(l,a):r.parse(l)),l===null?null:(n&&(l=n==="week"&&(Ax(i)||i===!0)?r.startOf(l,"isoWeek",i):r.startOf(l,n)),+l)}function tT(t,e,r,a){const n=Ea.length;for(let i=Ea.indexOf(t);i<n-1;++i){const l=$0[Ea[i]],o=l.steps?l.steps:Number.MAX_SAFE_INTEGER;if(l.common&&Math.ceil((r-e)/(o*l.size))<=a)return Ea[i]}return Ea[n-1]}function zte(t,e,r,a,n){for(let i=Ea.length-1;i>=Ea.indexOf(r);i--){const l=Ea[i];if($0[l].common&&t._adapter.diff(n,a,l)>=e-1)return l}return Ea[r?Ea.indexOf(r):0]}function Ite(t){for(let e=Ea.indexOf(t)+1,r=Ea.length;e<r;++e)if($0[Ea[e]].common)return Ea[e]}function rT(t,e,r){if(!r)t[e]=!0;else if(r.length){const{lo:a,hi:n}=mN(r,e),i=r[a]>=e?r[a]:r[n];t[i]=!0}}function Fte(t,e,r,a){const n=t._adapter,i=+n.startOf(e[0].value,a),l=e[e.length-1].value;let o,c;for(o=i;o<=l;o=+n.add(o,1,a))c=r[o],c>=0&&(e[c].major=!0);return e}function aT(t,e,r){const a=[],n={},i=e.length;let l,o;for(l=0;l<i;++l)o=e[l],n[o]=l,a.push({value:o,major:!1});return i===0||!r?a:Fte(t,a,n,r)}class nT extends qd{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 a=e.time||(e.time={}),n=this._adapter=new ZJ._date(e.adapters.date);n.init(r),Gh(a.displayFormats,n.formats()),this._parseOpts={parser:a.parser,round:a.round,isoWeekday:a.isoWeekday},super.init(e),this._normalized=r.normalized}parse(e,r){return e===void 0?null:eT(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,r=this._adapter,a=e.time.unit||"day";let{min:n,max:i,minDefined:l,maxDefined:o}=this.getUserBounds();function c(d){!l&&!isNaN(d.min)&&(n=Math.min(n,d.min)),!o&&!isNaN(d.max)&&(i=Math.max(i,d.max))}(!l||!o)&&(c(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&c(this.getMinMax(!1))),n=Ln(n)&&!isNaN(n)?n:+r.startOf(Date.now(),a),i=Ln(i)&&!isNaN(i)?i:+r.endOf(Date.now(),a)+1,this.min=Math.min(n,i-1),this.max=Math.max(n+1,i)}_getLabelBounds(){const e=this.getLabelTimestamps();let r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;return e.length&&(r=e[0],a=e[e.length-1]),{min:r,max:a}}buildTicks(){const e=this.options,r=e.time,a=e.ticks,n=a.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const i=this.min,l=this.max,o=LQ(n,i,l);return this._unit=r.unit||(a.autoSkip?tT(r.minUnit,this.min,this.max,this._getLabelCapacity(i)):zte(this,o.length,r.minUnit,this.min,this.max)),this._majorUnit=!a.major.enabled||this._unit==="year"?void 0:Ite(this._unit),this.initOffsets(n),e.reverse&&o.reverse(),aT(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let r=0,a=0,n,i;this.options.offset&&e.length&&(n=this.getDecimalForValue(e[0]),e.length===1?r=1-n:r=(this.getDecimalForValue(e[1])-n)/2,i=this.getDecimalForValue(e[e.length-1]),e.length===1?a=i:a=(i-this.getDecimalForValue(e[e.length-2]))/2);const l=e.length<3?.5:.25;r=Pa(r,0,l),a=Pa(a,0,l),this._offsets={start:r,end:a,factor:1/(r+1+a)}}_generate(){const e=this._adapter,r=this.min,a=this.max,n=this.options,i=n.time,l=i.unit||tT(i.minUnit,r,a,this._getLabelCapacity(r)),o=it(n.ticks.stepSize,1),c=l==="week"?i.isoWeekday:!1,d=Ax(c)||c===!0,h={};let p=r,m,x;if(d&&(p=+e.startOf(p,"isoWeek",c)),p=+e.startOf(p,d?"day":l),e.diff(a,r,l)>1e5*o)throw new Error(r+" and "+a+" are too far apart with stepSize of "+o+" "+l);const b=n.ticks.source==="data"&&this.getDataTimestamps();for(m=p,x=0;m<a;m=+e.add(m,o,l),x++)rT(h,m,b);return(m===a||n.bounds==="ticks"||x===1)&&rT(h,m,b),Object.keys(h).sort(J6).map(y=>+y)}getLabelForValue(e){const r=this._adapter,a=this.options.time;return a.tooltipFormat?r.format(e,a.tooltipFormat):r.format(e,a.displayFormats.datetime)}format(e,r){const n=this.options.time.displayFormats,i=this._unit,l=r||n[i];return this._adapter.format(e,l)}_tickFormatFunction(e,r,a,n){const i=this.options,l=i.ticks.callback;if(l)return Lt(l,[e,r,a],this);const o=i.time.displayFormats,c=this._unit,d=this._majorUnit,h=c&&o[c],p=d&&o[d],m=a[r],x=d&&p&&m&&m.major;return this._adapter.format(e,n||(x?p:h))}generateTickLabels(e){let r,a,n;for(r=0,a=e.length;r<a;++r)n=e[r],n.label=this._tickFormatFunction(n.value,r,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const r=this._offsets,a=this.getDecimalForValue(e);return this.getPixelForDecimal((r.start+a)*r.factor)}getValueForPixel(e){const r=this._offsets,a=this.getDecimalForPixel(e)/r.factor-r.end;return this.min+a*(this.max-this.min)}_getLabelSize(e){const r=this.options.ticks,a=this.ctx.measureText(e).width,n=di(this.isHorizontal()?r.maxRotation:r.minRotation),i=Math.cos(n),l=Math.sin(n),o=this._resolveTickFontOptions(0).size;return{w:a*i+o*l,h:a*l+o*i}}_getLabelCapacity(e){const r=this.options.time,a=r.displayFormats,n=a[r.unit]||a.millisecond,i=this._tickFormatFunction(e,0,aT(this,[e],this._majorUnit),n),l=this._getLabelSize(i),o=Math.floor(this.isHorizontal()?this.width/l.w:this.height/l.h)-1;return o>0?o:1}getDataTimestamps(){let e=this._cache.data||[],r,a;if(e.length)return e;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(r=0,a=n.length;r<a;++r)e=e.concat(n[r].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let r,a;if(e.length)return e;const n=this.getLabels();for(r=0,a=n.length;r<a;++r)e.push(eT(this,n[r]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return P_(e.sort(J6))}}function ig(t,e,r){let a=0,n=t.length-1,i,l,o,c;r?(e>=t[a].pos&&e<=t[n].pos&&({lo:a,hi:n}=Cj(t,"pos",e)),{pos:i,time:o}=t[a],{pos:l,time:c}=t[n]):(e>=t[a].time&&e<=t[n].time&&({lo:a,hi:n}=Cj(t,"time",e)),{time:i,pos:o}=t[a],{time:l,pos:c}=t[n]);const d=l-i;return d?o+(c-o)*(e-i)/d:o}class U2e extends nT{static id="timeseries";static defaults=nT.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=ig(r,this.min),this._tableRange=ig(r,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:r,max:a}=this,n=[],i=[];let l,o,c,d,h;for(l=0,o=e.length;l<o;++l)d=e[l],d>=r&&d<=a&&n.push(d);if(n.length<2)return[{time:r,pos:0},{time:a,pos:1}];for(l=0,o=n.length;l<o;++l)h=n[l+1],c=n[l-1],d=n[l],Math.round((h+c)/2)!==d&&i.push({time:d,pos:l/(o-1)});return i}_generate(){const e=this.min,r=this.max;let a=super.getDataTimestamps();return(!a.includes(e)||!a.length)&&a.splice(0,0,e),(!a.includes(r)||a.length===1)&&a.push(r),a.sort((n,i)=>n-i)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const r=this.getDataTimestamps(),a=this.getLabelTimestamps();return r.length&&a.length?e=this.normalize(r.concat(a)):e=r.length?r:a,e=this._cache.all=e,e}getDecimalForValue(e){return(ig(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const r=this._offsets,a=this.getDecimalForPixel(e)/r.factor-r.end;return ig(this._table,a*this._tableRange+this._minPos,!0)}}const cL="label";function sT(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function Bte(t,e){const r=t.options;r&&e&&Object.assign(r,e)}function dL(t,e){t.labels=e}function uL(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:cL;const a=[];t.datasets=e.map(n=>{const i=t.datasets.find(l=>l[r]===n[r]);return!i||!n.data||a.includes(i)?{...n}:(a.push(i),Object.assign(i,n),i)})}function Hte(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cL;const r={labels:[],datasets:[]};return dL(r,t.labels),uL(r,t.datasets,e),r}function $te(t,e){const{height:r=150,width:a=300,redraw:n=!1,datasetIdKey:i,type:l,data:o,options:c,plugins:d=[],fallbackContent:h,updateMode:p,...m}=t,x=E.useRef(null),b=E.useRef(null),y=()=>{x.current&&(b.current=new Rs(x.current,{type:l,data:Hte(o,i),options:c&&{...c},plugins:d}),sT(e,b.current))},v=()=>{sT(e,null),b.current&&(b.current.destroy(),b.current=null)};return E.useEffect(()=>{!n&&b.current&&c&&Bte(b.current,c)},[n,c]),E.useEffect(()=>{!n&&b.current&&dL(b.current.config.data,o.labels)},[n,o.labels]),E.useEffect(()=>{!n&&b.current&&o.datasets&&uL(b.current.config.data,o.datasets,i)},[n,o.datasets]),E.useEffect(()=>{b.current&&(n?(v(),setTimeout(y)):b.current.update(p))},[n,c,o.labels,o.datasets,p]),E.useEffect(()=>{b.current&&(v(),setTimeout(y))},[l]),E.useEffect(()=>(y(),()=>v()),[]),qe.createElement("canvas",{ref:x,role:"img",height:r,width:a,...m},h)}const Yte=E.forwardRef($te);function DN(t,e){return Rs.register(e),E.forwardRef((r,a)=>qe.createElement(Yte,{...r,ref:a,type:t}))}const Ute=DN("bar",qJ),Mj=DN("doughnut",G_),rp=DN("pie",KJ);/*!
 * 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 iT=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}(),Qh={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):ut(t)||e.unshift(""+r);return e},textSize:function(t,e,r){var a=[].concat(e),n=a.length,i=t.font,l=0,o;for(t.font=r.string,o=0;o<n;++o)l=Math.max(t.measureText(a[o]).width,l);return t.font=i,{height:n*r.lineHeight,width:l}},bound:function(t,e,r){return Math.max(t,Math.min(e,r))},arrayDiff:function(t,e){var r=t.slice(),a=[],n,i,l,o;for(n=0,l=e.length;n<l;++n)o=e[n],i=r.indexOf(o),i===-1?a.push([o,1]):r.splice(i,1);for(n=0,l=r.length;n<l;++n)a.push([r[n],-1]);return a},rasterize:function(t){return Math.round(t*iT)/iT}};function V1(t,e){var r=e.x,a=e.y;if(r===null)return{x:0,y:-1};if(a===null)return{x:1,y:0};var n=t.x-r,i=t.y-a,l=Math.sqrt(n*n+i*i);return{x:l?n/l:0,y:l?i/l:-1}}function Wte(t,e,r,a,n){switch(n){case"center":r=a=0;break;case"bottom":r=0,a=1;break;case"right":r=1,a=0;break;case"left":r=-1,a=0;break;case"top":r=0,a=-1;break;case"start":r=-r,a=-a;break;case"end":break;default:n*=Math.PI/180,r=Math.cos(n),a=Math.sin(n);break}return{x:t,y:e,vx:r,vy:a}}var Xte=0,hL=1,fL=2,pL=4,mL=8;function lg(t,e,r){var a=Xte;return t<r.left?a|=hL:t>r.right&&(a|=fL),e<r.top?a|=mL:e>r.bottom&&(a|=pL),a}function Vte(t,e){for(var r=t.x0,a=t.y0,n=t.x1,i=t.y1,l=lg(r,a,e),o=lg(n,i,e),c,d,h;!(!(l|o)||l&o);)c=l||o,c&mL?(d=r+(n-r)*(e.top-a)/(i-a),h=e.top):c&pL?(d=r+(n-r)*(e.bottom-a)/(i-a),h=e.bottom):c&fL?(h=a+(i-a)*(e.right-r)/(n-r),d=e.right):c&hL&&(h=a+(i-a)*(e.left-r)/(n-r),d=e.left),c===l?(r=d,a=h,l=lg(r,a,e)):(n=d,i=h,o=lg(n,i,e));return{x0:r,x1:n,y0:a,y1:i}}function og(t,e){var r=e.anchor,a=t,n,i;return e.clamp&&(a=Vte(a,e.area)),r==="start"?(n=a.x0,i=a.y0):r==="end"?(n=a.x1,i=a.y1):(n=(a.x0+a.x1)/2,i=(a.y0+a.y1)/2),Wte(n,i,t.vx,t.vy,e.align)}var cg={arc:function(t,e){var r=(t.startAngle+t.endAngle)/2,a=Math.cos(r),n=Math.sin(r),i=t.innerRadius,l=t.outerRadius;return og({x0:t.x+a*i,y0:t.y+n*i,x1:t.x+a*l,y1:t.y+n*l,vx:a,vy:n},e)},point:function(t,e){var r=V1(t,e.origin),a=r.x*t.options.radius,n=r.y*t.options.radius;return og({x0:t.x-a,y0:t.y-n,x1:t.x+a,y1:t.y+n,vx:r.x,vy:r.y},e)},bar:function(t,e){var r=V1(t,e.origin),a=t.x,n=t.y,i=0,l=0;return t.horizontal?(a=Math.min(t.x,t.base),i=Math.abs(t.base-t.x)):(n=Math.min(t.y,t.base),l=Math.abs(t.base-t.y)),og({x0:a,y0:n+l,x1:a+i,y1:n,vx:r.x,vy:r.y},e)},fallback:function(t,e){var r=V1(t,e.origin);return og({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)}},ui=Qh.rasterize;function qte(t){var e=t.borderWidth||0,r=t.padding,a=t.size.height,n=t.size.width,i=-n/2,l=-a/2;return{frame:{x:i-r.left-e,y:l-r.top-e,w:n+r.width+e*2,h:a+r.height+e*2},text:{x:i,y:l,w:n,h:a}}}function Gte(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 a=r.getBasePixel();return t.horizontal?{x:a,y:null}:{x:null,y:a}}function Kte(t){return t instanceof Ml?cg.arc:t instanceof hte?cg.point:t instanceof iL?cg.bar:cg.fallback}function Zte(t,e,r,a,n,i){var l=Math.PI/2;if(i){var o=Math.min(i,n/2,a/2),c=e+o,d=r+o,h=e+a-o,p=r+n-o;t.moveTo(e,d),c<h&&d<p?(t.arc(c,d,o,-Math.PI,-l),t.arc(h,d,o,-l,0),t.arc(h,p,o,0,l),t.arc(c,p,o,l,Math.PI)):c<h?(t.moveTo(c,r),t.arc(h,d,o,-l,l),t.arc(c,d,o,l,Math.PI+l)):d<p?(t.arc(c,d,o,-Math.PI,0),t.arc(c,p,o,0,Math.PI)):t.arc(c,d,o,-Math.PI,Math.PI),t.closePath(),t.moveTo(e,r)}else t.rect(e,r,a,n)}function Qte(t,e,r){var a=r.backgroundColor,n=r.borderColor,i=r.borderWidth;!a&&(!n||!i)||(t.beginPath(),Zte(t,ui(e.x)+i/2,ui(e.y)+i/2,ui(e.w)-i,ui(e.h)-i,r.borderRadius),t.closePath(),a&&(t.fillStyle=a,t.fill()),n&&i&&(t.strokeStyle=n,t.lineWidth=i,t.lineJoin="miter",t.stroke()))}function Jte(t,e,r){var a=r.lineHeight,n=t.w,i=t.x,l=t.y+a/2;return e==="center"?i+=n/2:(e==="end"||e==="right")&&(i+=n),{h:a,w:n,x:i,y:l}}function ere(t,e,r){var a=t.shadowBlur,n=r.stroked,i=ui(r.x),l=ui(r.y),o=ui(r.w);n&&t.strokeText(e,i,l,o),r.filled&&(a&&n&&(t.shadowBlur=0),t.fillText(e,i,l,o),a&&n&&(t.shadowBlur=a))}function tre(t,e,r,a){var n=a.textAlign,i=a.color,l=!!i,o=a.font,c=e.length,d=a.textStrokeColor,h=a.textStrokeWidth,p=d&&h,m;if(!(!c||!l&&!p))for(r=Jte(r,n,o),t.font=o.string,t.textAlign=n,t.textBaseline="middle",t.shadowBlur=a.textShadowBlur,t.shadowColor=a.textShadowColor,l&&(t.fillStyle=i),p&&(t.lineJoin="round",t.lineWidth=h,t.strokeStyle=d),m=0,c=e.length;m<c;++m)ere(t,e[m],{stroked:p,filled:l,w:r.w,x:r.x,y:r.y+r.h*m})}var gL=function(t,e,r,a){var n=this;n._config=t,n._index=a,n._model=null,n._rects=null,n._ctx=e,n._el=r};Es(gL.prototype,{_modelize:function(t,e,r,a){var n=this,i=n._index,l=ma(qt([r.font,{}],a,i)),o=qt([r.color,lr.color],a,i);return{align:qt([r.align,"center"],a,i),anchor:qt([r.anchor,"center"],a,i),area:a.chart.chartArea,backgroundColor:qt([r.backgroundColor,null],a,i),borderColor:qt([r.borderColor,null],a,i),borderRadius:qt([r.borderRadius,0],a,i),borderWidth:qt([r.borderWidth,0],a,i),clamp:qt([r.clamp,!1],a,i),clip:qt([r.clip,!1],a,i),color:o,display:t,font:l,lines:e,offset:qt([r.offset,4],a,i),opacity:qt([r.opacity,1],a,i),origin:Gte(n._el,a),padding:zn(qt([r.padding,4],a,i)),positioner:Kte(n._el),rotation:qt([r.rotation,0],a,i)*(Math.PI/180),size:Qh.textSize(n._ctx,e,l),textAlign:qt([r.textAlign,"start"],a,i),textShadowBlur:qt([r.textShadowBlur,0],a,i),textShadowColor:qt([r.textShadowColor,o],a,i),textStrokeColor:qt([r.textStrokeColor,o],a,i),textStrokeWidth:qt([r.textStrokeWidth,0],a,i)}},update:function(t){var e=this,r=null,a=null,n=e._index,i=e._config,l,o,c,d=qt([i.display,!0],t,n);d&&(l=t.dataset.data[n],o=it(Lt(i.formatter,[l,t]),l),c=ut(o)?[]:Qh.toTextLines(o),c.length&&(r=e._modelize(d,c,i,t),a=qte(r))),e._model=r,e._rects=a},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,a=t.ctx,n=r._model,i=r._rects,l;this.visible()&&(a.save(),n.clip&&(l=n.area,a.beginPath(),a.rect(l.left,l.top,l.right-l.left,l.bottom-l.top),a.clip()),a.globalAlpha=Qh.bound(0,n.opacity,1),a.translate(ui(e.x),ui(e.y)),a.rotate(n.rotation),Qte(a,i.frame,n),tre(a,n.lines,i.text,n),a.restore())}});var rre=Number.MIN_SAFE_INTEGER||-9007199254740991,are=Number.MAX_SAFE_INTEGER||9007199254740991;function gh(t,e,r){var a=Math.cos(r),n=Math.sin(r),i=e.x,l=e.y;return{x:i+a*(t.x-i)-n*(t.y-l),y:l+n*(t.x-i)+a*(t.y-l)}}function lT(t,e){var r=are,a=rre,n=e.origin,i,l,o,c,d;for(i=0;i<t.length;++i)l=t[i],o=l.x-n.x,c=l.y-n.y,d=e.vx*o+e.vy*c,r=Math.min(r,d),a=Math.max(a,d);return{min:r,max:a}}function dg(t,e){var r=e.x-t.x,a=e.y-t.y,n=Math.sqrt(r*r+a*a);return{vx:(e.x-t.x)/n,vy:(e.y-t.y)/n,origin:t,ln:n}}var xL=function(){this._rotation=0,this._rect={x:0,y:0,w:0,h:0}};Es(xL.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,a=e._rect;return t=gh(t,e.center(),-e._rotation),!(t.x<a.x-r||t.y<a.y-r||t.x>a.x+a.w+r*2||t.y>a.y+a.h+r*2)},intersects:function(t){var e=this._points(),r=t._points(),a=[dg(e[0],e[1]),dg(e[0],e[3])],n,i,l;for(this._rotation!==t._rotation&&a.push(dg(r[0],r[1]),dg(r[0],r[3])),n=0;n<a.length;++n)if(i=lT(e,a[n]),l=lT(r,a[n]),i.max<l.min||l.max<i.min)return!1;return!0},_points:function(){var t=this,e=t._rect,r=t._rotation,a=t.center();return[gh({x:e.x,y:e.y},a,r),gh({x:e.x+e.w,y:e.y},a,r),gh({x:e.x+e.w,y:e.y+e.h},a,r),gh({x:e.x,y:e.y+e.h},a,r)]}});function bL(t,e,r){var a=e.positioner(t,e),n=a.vx,i=a.vy;if(!n&&!i)return{x:a.x,y:a.y};var l=r.w,o=r.h,c=e.rotation,d=Math.abs(l/2*Math.cos(c))+Math.abs(o/2*Math.sin(c)),h=Math.abs(l/2*Math.sin(c))+Math.abs(o/2*Math.cos(c)),p=1/Math.max(Math.abs(n),Math.abs(i));return d*=n*p,h*=i*p,d+=e.offset*n,h+=e.offset*i,{x:a.x+d,y:a.y+h}}function nre(t,e){var r,a,n,i;for(r=t.length-1;r>=0;--r)for(n=t[r].$layout,a=r-1;a>=0&&n._visible;--a)i=t[a].$layout,i._visible&&n._box.intersects(i._box)&&e(n,i);return t}function sre(t){var e,r,a,n,i,l,o;for(e=0,r=t.length;e<r;++e)a=t[e],n=a.$layout,n._visible&&(o=new Proxy(a._el,{get:(c,d)=>c.getProps([d],!0)[d]}),i=a.geometry(),l=bL(o,a.model(),i),n._box.update(l,i,a.rotation()));return nre(t,function(c,d){var h=c._hidable,p=d._hidable;h&&p||p?d._visible=!1:h&&(c._visible=!1)})}var Jh={prepare:function(t){var e=[],r,a,n,i,l;for(r=0,n=t.length;r<n;++r)for(a=0,i=t[r].length;a<i;++a)l=t[r][a],e.push(l),l.$layout={_box:new xL,_hidable:!1,_visible:!0,_set:r,_idx:l._index};return e.sort(function(o,c){var d=o.$layout,h=c.$layout;return d._idx===h._idx?h._set-d._set:h._idx-d._idx}),this.update(e),e},update:function(t){var e=!1,r,a,n,i,l;for(r=0,a=t.length;r<a;++r)n=t[r],i=n.model(),l=n.$layout,l._hidable=i&&i.display==="auto",l._visible=n.visible(),e|=l._hidable;e&&sre(t)},lookup:function(t,e){var r,a;for(r=t.length-1;r>=0;--r)if(a=t[r].$layout,a&&a._visible&&a._box.contains(e))return t[r];return null},draw:function(t,e){var r,a,n,i,l,o;for(r=0,a=e.length;r<a;++r)n=e[r],i=n.$layout,i._visible&&(l=n.geometry(),o=bL(n._el,n.model(),l),i._box.update(o,l,n.rotation()),n.draw(t,o))}},ire=function(t){if(ut(t))return null;var e=t,r,a,n;if(ot(t))if(!ut(t.label))e=t.label;else if(!ut(t.r))e=t.r;else for(e="",r=Object.keys(t),n=0,a=r.length;n<a;++n)e+=(n!==0?", ":"")+r[n]+": "+t[r[n]];return""+e},lre={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:ire,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},Ta="$datalabels",yL="$default";function ore(t,e){var r=t.datalabels,a={},n=[],i,l;return r===!1?null:(r===!0&&(r={}),e=Es({},[e,r]),i=e.labels||{},l=Object.keys(i),delete e.labels,l.length?l.forEach(function(o){i[o]&&n.push(Es({},[e,i[o],{_key:o}]))}):n.push(e),a=n.reduce(function(o,c){return wt(c.listeners||{},function(d,h){o[h]=o[h]||{},o[h][c._key||yL]=d}),delete c.listeners,o},{}),{labels:n,listeners:a})}function Ej(t,e,r,a){if(e){var n=r.$context,i=r.$groups,l;e[i._set]&&(l=e[i._set][i._key],l&&Lt(l,[n,a])===!0&&(t[Ta]._dirty=!0,r.update(n)))}}function cre(t,e,r,a,n){var i,l;!r&&!a||(r?a?r!==a&&(l=i=!0):l=!0:i=!0,l&&Ej(t,e.leave,r,n),i&&Ej(t,e.enter,a,n))}function dre(t,e){var r=t[Ta],a=r._listeners,n,i;if(!(!a.enter&&!a.leave)){if(e.type==="mousemove")i=Jh.lookup(r._labels,e);else if(e.type!=="mouseout")return;n=r._hovered,r._hovered=i,cre(t,a,n,i,e)}}function ure(t,e){var r=t[Ta],a=r._listeners.click,n=a&&Jh.lookup(r._labels,e);n&&Ej(t,a,n,e)}var ap={id:"datalabels",defaults:lre,beforeInit:function(t){t[Ta]={_actives:[]}},beforeUpdate:function(t){var e=t[Ta];e._listened=!1,e._listeners={},e._datasets=[],e._labels=[]},afterDatasetUpdate:function(t,e,r){var a=e.index,n=t[Ta],i=n._datasets[a]=[],l=t.isDatasetVisible(a),o=t.data.datasets[a],c=ore(o,r),d=e.meta.data||[],h=t.ctx,p,m,x,b,y,v,N,C;for(h.save(),p=0,x=d.length;p<x;++p)if(N=d[p],N[Ta]=[],l&&N&&t.getDataVisibility(p)&&!N.skip)for(m=0,b=c.labels.length;m<b;++m)y=c.labels[m],v=y._key,C=new gL(y,h,N,p),C.$groups={_set:a,_key:v||yL},C.$context={active:!1,chart:t,dataIndex:p,dataset:o,datasetIndex:a},C.update(C.$context),N[Ta].push(C),i.push(C);h.restore(),Es(n._listeners,c.listeners,{merger:function(S,k,A){k[S]=k[S]||{},k[S][e.index]=A[S],n._listened=!0}})},afterUpdate:function(t){t[Ta]._labels=Jh.prepare(t[Ta]._datasets)},afterDatasetsDraw:function(t){Jh.draw(t,t[Ta]._labels)},beforeEvent:function(t,e){if(t[Ta]._listened){var r=e.event;switch(r.type){case"mousemove":case"mouseout":dre(t,r);break;case"click":ure(t,r);break}}},afterEvent:function(t){var e=t[Ta],r=e._actives,a=e._actives=t.getActiveElements(),n=Qh.arrayDiff(r,a),i,l,o,c,d,h,p;for(i=0,l=n.length;i<l;++i)if(d=n[i],d[1])for(p=d[0].element[Ta]||[],o=0,c=p.length;o<c;++o)h=p[o],h.$context.active=d[1]===1,h.update(h.$context);(e._dirty||n.length)&&(Jh.update(e._labels),t.render()),delete e._dirty}};Rs.register(Ote,Lte,iL,Ml,sc,nc,ap);const hre=()=>{const t=Fn(),{dashboard:e,loading:r,error:a,success:n}=un(C=>C.mlm),[i,l]=E.useState(null),[o,c]=E.useState("All"),[d,h]=E.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:""});E.useEffect(()=>{t(Yh())},[t]),E.useEffect(()=>{if(e&&e.percentageConfiguration){const C={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(C),console.log("Initialized formData:",C)}},[e]),E.useEffect(()=>{if(n&&(Ne.success("Distributions updated successfully!"),t(Yh()),t(lD())),i||a){Ne.error(i||a);const C=setTimeout(()=>{l(null),t(lD())},5e3);return()=>clearTimeout(C)}},[n,i,a,t]);const p=C=>{const S=C.target.value===""?"":Number(parseFloat(C.target.value).toFixed(2));h({...d,[C.target.name]:S}),l(null),console.log("Form data changed:",{[C.target.name]:S})},m=()=>{const C=["ddr","crr","bbr","hlr","regionalAmbassador","porparleTeam","rop","companyOperations","technologyPool","foundationPool","publicShare","netProfit"],S=["ddrLevel1","ddrLevel2","ddrLevel3","ddrLevel4"],k=["gc","la","ceo","coo","cmo","cfo","cto","chro","topTeamPerform"],A=["winner","fighter"],T=["operationExpense","organizationEvent"],M=["chairmanFounder","shareholder1","shareholder2","shareholder3"],O=Object.fromEntries(Object.entries(d).map(([R,L])=>[R,L===""?e?.percentageConfiguration[R]||e?.percentageConfiguration.ddrSubDistribution?.[`level${R.match(/\d+/)}`]||e?.percentageConfiguration.porparleTeamSubDistribution?.[R]||e?.percentageConfiguration.topTeamPerformSubDistribution?.[R]||e?.percentageConfiguration.companyOperationsSubDistribution?.[R]||e?.percentageConfiguration.publicShareSubDistribution?.[R]||0:Number(L)]));for(const[R,L]of Object.entries(O))if(isNaN(L)||L<0)return`Invalid value for ${R.toUpperCase()}: must be a non-negative number`;const _=C.reduce((R,L)=>R+(O[L]||0),0);if(Math.abs(_-100)>.01)return`Main distribution percentages must sum to 100% (current: ${_.toFixed(2)}%)`;if(O.ddr>0){const R=S.reduce((L,z)=>L+(O[z]||0),0);if(Math.abs(R-O.ddr)>.01)return`DDR sub-distributions must sum to DDR total (${O.ddr}%): current ${R.toFixed(2)}%`}if(O.porparleTeam>0){const R=k.reduce((L,z)=>L+(O[z]||0),0);if(Math.abs(R-O.porparleTeam)>.01)return`Porparle Team sub-distributions must sum to porparleTeam total (${O.porparleTeam}%): current ${R.toFixed(2)}%`}if(O.topTeamPerform>0){const R=A.reduce((L,z)=>L+(O[z]||0),0);if(Math.abs(R-O.topTeamPerform)>.01)return`Top Team Performance sub-distributions must sum to topTeamPerform total (${O.topTeamPerform}%): current ${R.toFixed(2)}%`}if(O.companyOperations>0){const R=T.reduce((L,z)=>L+(O[z]||0),0);if(Math.abs(R-O.companyOperations)>.01)return`Company Operations sub-distributions must sum to companyOperations total (${O.companyOperations}%): current ${R.toFixed(2)}%`}if(O.publicShare>0){const R=M.reduce((L,z)=>L+(O[z]||0),0);if(Math.abs(R-O.publicShare)>.01)return`Public Share sub-distributions must sum to publicShare total (${O.publicShare}%): current ${R.toFixed(2)}%`}return null},x=C=>{C.preventDefault();const S=m();if(S){l(S),console.log("Validation error:",S);return}const k=Object.fromEntries(Object.entries(d).map(([A,T])=>[A,T===""?0:Number(T)]));console.log("Submitting payload:",k),t(_g(k))},b=C=>{c(C.target.value)},y={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}]},v={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 s.jsx("div",{className:"min-h-screen bg-[#013220] text-[#DDC104] p-8 font-sans",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx("h1",{className:"text-4xl font-bold mb-8 text-center tracking-wide",children:"MLM Payment Management Dashboard"}),r&&s.jsx("div",{className:"text-center py-8",children:s.jsx("div",{className:"animate-spin inline-block w-8 h-8 border-4 border-[#DDC104] border-t-transparent rounded-full",role:"status",children:s.jsx("span",{className:"sr-only",children:"Loading..."})})}),!r&&!a&&e&&s.jsxs("div",{className:"space-y-8",children:[s.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:[s.jsx("h2",{className:"text-2xl font-semibold mb-6 tracking-wide",children:"Financial Overview"}),s.jsxs("div",{className:"flex justify-around items-center flex-wrap gap-6",children:[s.jsxs("div",{className:"bg-[#013723] p-4 rounded-lg shadow w-60 overflow-hidden",children:[s.jsx("p",{className:"text-lg font-semibold tracking-wide",children:"Total MLM Amount"}),s.jsxs("p",{className:"text-2xl font-bold text-[#DDC104] truncate",children:[e.totalMLMAmount," AED"]})]}),s.jsxs("div",{className:"bg-[#013723] p-4 rounded-lg shadow w-60 overflow-hidden",children:[s.jsx("p",{className:"text-lg font-semibold tracking-wide",children:"Total Earnings"}),s.jsxs("p",{className:"text-2xl font-bold text-[#DDC104] truncate",children:[e.totalEarnings," AED"]})]}),s.jsxs("div",{className:"bg-[#013723] p-4 rounded-lg shadow w-60 overflow-hidden",children:[s.jsx("p",{className:"text-lg font-semibold tracking-wide",children:"Total Transactions"}),s.jsx("p",{className:"text-2xl font-bold text-[#DDC104] truncate",children:e.totalTransactions})]})]}),s.jsxs("div",{className:"mt-8",children:[s.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"Section Totals (AED)"}),s.jsx("div",{className:"bg-[#013723] p-4 rounded-lg",children:s.jsx(Ute,{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:(C,S)=>`${(C/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}}}}}})})]})]}),s.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:[s.jsx("h2",{className:"text-2xl font-semibold mb-6 tracking-wide",children:"Distribution Breakdown"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"Main Distributions (%)"}),s.jsx(Mj,{data:y,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:C=>`${C.toFixed(2)}%`,anchor:"center",align:"center"}}}})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"DDR Sub-Distributions (%)"}),s.jsx(Mj,{data:v,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:C=>`${C.toFixed(2)}%`,anchor:"center",align:"center"}}}})]})]})]}),s.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:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-semibold tracking-wide",children:"Recent Transactions"}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("label",{htmlFor:"sortBy",className:"text-sm mr-2",children:"Sort by:"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{id:"sortBy",value:o,onChange:b,className:"bg-transparent text-sm text-[#DDC104] focus:outline-none appearance-none pr-8",children:[s.jsx("option",{className:"bg-yellow-300 text-black",value:"All",children:"All"}),s.jsx("option",{className:"bg-yellow-300 text-black",value:"Daily",children:"Daily"}),s.jsx("option",{className:"bg-yellow-300 text-black",value:"Weekly",children:"Weekly"}),s.jsx("option",{className:"bg-yellow-300 text-black",value:"Monthly",children:"Monthly"})]}),s.jsx(V4,{className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-[#DDC104]"})]})]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"min-w-full table-auto bg-[#013723] rounded-lg shadow",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-[#038A59]",children:[s.jsx("th",{className:"px-6 py-3 text-left text-sm font-medium tracking-wide",children:"User"}),s.jsx("th",{className:"px-6 py-3 text-left text-sm font-medium tracking-wide",children:"Amount"}),s.jsx("th",{className:"px-6 py-3 text-left text-sm font-medium tracking-wide",children:"Ride ID"}),s.jsx("th",{className:"px-6 py-3 text-left text-sm font-medium tracking-wide",children:"Timestamp"})]})}),s.jsx("tbody",{children:e.recentTransactions.map((C,S)=>s.jsxs("tr",{className:"border-b border-[#013723] hover:bg-[#038A59]/50",children:[s.jsx("td",{className:"px-6 py-4",children:C.userId?.firstName&&C.userId?.lastName?`${C.userId.firstName} ${C.userId.lastName}`:C.userId?._id||"Unknown User"}),s.jsxs("td",{className:"px-6 py-4",children:[C.amount," AED"]}),s.jsx("td",{className:"px-6 py-3",children:C.rideId}),s.jsx("td",{className:"px-6 py-4",children:new Date(C.timestamp).toLocaleString()})]},S))})]})})]}),s.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:[s.jsx("h2",{className:"text-2xl font-semibold mb-6 tracking-wide",children:"Update MLM Distributions"}),s.jsxs("form",{onSubmit:x,className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.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(C=>s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{htmlFor:C,className:"block text-sm font-medium mb-1 tracking-wide",children:C.toUpperCase()}),s.jsx("input",{id:C,type:"number",name:C,value:d[C],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"})]},C))]}),s.jsxs("div",{children:[s.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(C=>s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{htmlFor:C,className:"block text-sm font-medium mb-1 tracking-wide",children:C.toUpperCase()}),s.jsx("input",{id:C,type:"number",name:C,value:d[C],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"})]},C))]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-semibold mb-4 tracking-wide",children:"Other Configurations"}),["operationExpense","organizationEvent","chairmanFounder","shareholder1","shareholder2","shareholder3"].map(C=>s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{htmlFor:C,className:"block text-sm font-medium mb-1 tracking-wide",children:C.toUpperCase()}),s.jsx("input",{id:C,type:"number",name:C,value:d[C],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"})]},C))]}),s.jsx("div",{className:"col-span-1 md:col-span-3",children:s.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"})})]})]})]})]})})},fre=()=>{const t=["DDR","CCR","BBR","HLR","AMBESSDOR","MLM MANAGEMENT","Day"],[e,r]=E.useState("DDR"),a=()=>{switch(e){case"CCR":return s.jsx(KZ,{});case"BBR":return s.jsx(VZ,{});case"HLR":return s.jsx(qZ,{});case"AMBESSDOR":return s.jsx(ZZ,{});case"MLM MANAGEMENT":return s.jsx(hre,{});default:return s.jsx(XZ,{activeTab:e})}};return s.jsxs("div",{className:"p-5",children:[s.jsx("div",{className:"flex border-b border-yellow-400 overflow-x-auto",children:s.jsx("div",{className:"flex flex-nowrap",children:t.map((n,i)=>s.jsxs("div",{className:"flex items-center",children:[s.jsxs("button",{onClick:()=>r(n),className:`px-4 py-2 text-sm font-semibold flex items-center gap-2 transition-colors duration-200
                  ${e===n?"border-b-2 border-yellow-400 text-yellow-400":"text-gray-300 hover:text-yellow-300"}
                  ${n==="Day"?"border border-yellow-400 border-b-0 rounded-t-md":""}`,children:[n,n==="Day"&&s.jsx(vR,{className:"text-lg"})]}),i<t.length-1&&s.jsx("div",{className:"w-[1px] h-6 bg-yellow-400/50"})]},i))})}),s.jsx("div",{className:"mt-4",children:a()})]})},pre=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsx("div",{className:"flex-1",children:s.jsx(fre,{})})]}),mre=()=>{const t=Fn(),e=un(U=>U.user||{}),{drivers:r=[],loading:a=!1,error:n=null,success:i=!1,editSuccess:l=!1,deleteSuccess:o=!1,totalDrivers:c=0,updateKey:d=0}=e,[h,p]=E.useState("All"),[m,x]=E.useState(null),[b,y]=E.useState(null),[v,N]=E.useState(null),[C,S]=E.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}}}),[k,A]=E.useState({}),[T,M]=E.useState({licenseImage:null,vehicleRegistrationCard:null,roadAuthorityCertificate:null,insuranceCertificate:null,vehicleImages:[]}),[O,_]=E.useState(!1),[R,L]=E.useState(null);E.useEffect(()=>{console.log("Fetching all drivers"),t(dd())},[t]),E.useEffect(()=>{if(n||l||o){console.log("Resetting state due to:",{error:n,editSuccess:l,deleteSuccess:o});const U=setTimeout(()=>{t(aR()),N(null),A({})},5e3);return()=>clearTimeout(U)}},[n,l,o,t]);const z=U=>{console.log("Sort changed to:",U.target.value),p(U.target.value)},F=U=>{console.log("Viewing driver:",U._id,"Driver data:",U),x(U)},Y=U=>{console.log("Editing driver:",U._id,"Driver data:",U),y(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}}}),M({licenseImage:null,vehicleRegistrationCard:null,roadAuthorityCertificate:null,insuranceCertificate:null,vehicleImages:[]}),A({})},X=()=>{console.log("Closing popup:",m?"View":"Edit"),x(null),y(null),A({}),M({licenseImage:null,vehicleRegistrationCard:null,roadAuthorityCertificate:null,insuranceCertificate:null,vehicleImages:[]})},H=U=>{const{name:re,value:ne}=U.target;if(re.includes("driverSettings.")){const[we,ye,ue]=re.split(".");S(je=>({...je,driverSettings:{...je.driverSettings,[ye]:{...je.driverSettings[ye],[ue]:ne==="true"?!0:ne==="false"?!1:ne}}}))}else S(we=>({...we,[re]:ne}));A(we=>({...we,[re]:""}))},W=U=>{const{name:re,files:ne}=U.target;M(re==="vehicleImages"?we=>({...we,[re]:Array.from(ne)}):we=>({...we,[re]:ne[0]}))},V=async U=>{U.preventDefault(),console.log("Submitting edit for userId:",b._id,"Data:",C,"Files:",T);try{const re=new FormData;Object.entries(C).forEach(([ne,we])=>{ne==="driverSettings"?re.append(ne,JSON.stringify(we)):we!==""&&re.append(ne,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(ne=>re.append("vehicleImages",ne)),await t(Fg({userId:b._id,userData:re})).unwrap(),console.log("Edit driver successful:",b._id),y(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}}}),M({licenseImage:null,vehicleRegistrationCard:null,roadAuthorityCertificate:null,insuranceCertificate:null,vehicleImages:[]})}catch(re){console.error("Edit driver failed:",re);try{const ne=typeof re=="string"?JSON.parse(re):re;A(typeof ne=="object"&&ne!==null?ne:{general:ne||"Failed to edit driver"})}catch{A({general:re||"Failed to edit driver"})}}},Z=U=>{L(U),_(!0)},B=async()=>{if(R){console.log("Initiating delete for userId:",R),N(R);try{await t(Wh(R)).unwrap(),console.log("Delete driver successful:",R)}catch(U){console.error("Delete driver failed:",U),N(null)}}_(!1),L(null)},G=()=>{_(!1),L(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:",d);const K="https://aaaogo.xyz/";return s.jsxs("div",{className:"flex min-h-screen bg-[#013220] text-[#DDC104] font-sans",children:[s.jsx(Ye,{}),s.jsx("div",{className:"flex-1 p-8",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsx("h1",{className:"text-4xl font-bold mb-8 text-center tracking-wide",children:"Driver Management Dashboard"}),a&&!v&&!b&&!m&&s.jsx("div",{className:"text-center py-8",children:s.jsx("div",{className:"animate-spin inline-block w-8 h-8 border-4 border-[#DDC104] border-t-transparent rounded-full",role:"status",children:s.jsx("span",{className:"sr-only",children:"Loading..."})})}),n&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("span",{children:typeof n=="string"&&n==="canceled"?"Request timed out. Please try again.":typeof n=="string"?n:n.general||"An error occurred"})]}),i&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),s.jsxs("span",{children:["Drivers fetched successfully! Total: ",c]})]}),l&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),s.jsx("span",{children:"Driver updated successfully!"})]}),o&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),s.jsx("span",{children:"Driver deleted successfully!"})]}),!a&&!n&&r.length>0&&s.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:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-semibold tracking-wide",children:"Driver List"}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("label",{htmlFor:"sortBy",className:"text-sm mr-2 tracking-wide",children:"Sort by:"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{id:"sortBy",value:h,onChange:z,className:"bg-transparent text-sm text-[#DDC104] focus:outline-none appearance-none pr-8",children:[s.jsx("option",{className:"bg-yellow-300 text-black",value:"All",children:"All"}),s.jsx("option",{className:"bg-yellow-300 text-black",value:"Pending",children:"Pending KYC"}),s.jsx("option",{className:"bg-yellow-300 text-black",value:"Approved",children:"Approved KYC"})]}),s.jsx(V4,{className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-[#DDC104]"})]})]})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-[#038A59] bg-[#038A59]",children:[s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"ID"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Username"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Email"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Phone"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Vehicle Type"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"KYC Status"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide text-center",children:"Action"})]})}),s.jsx("tbody",{children:te.map(U=>s.jsxs("tr",{className:"border-b border-[#013723] hover:bg-[#038A59]/50",children:[s.jsx("td",{className:"px-4 py-3",children:U._id.slice(-6)}),s.jsx("td",{className:"px-4 py-3",children:U.username}),s.jsx("td",{className:"px-4 py-3",children:U.email}),s.jsx("td",{className:"px-4 py-3",children:U.phoneNumber}),s.jsx("td",{className:"px-4 py-3",children:U.vehicle?.vehicleType||"N/A"}),s.jsx("td",{className:"px-4 py-3",children:U.kycStatus||"Pending"}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-3 justify-center",children:[s.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:v===U._id,children:s.jsx(AR,{size:16})}),s.jsx("button",{onClick:()=>F(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"}),s.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:v===U._id,children:v===U._id?s.jsx("div",{className:"animate-spin inline-block w-4 h-4 border-2 border-[#DDC104] border-t-transparent rounded-full"}):s.jsx(TR,{size:16})})]})})]},U._id))})]})})]}),!a&&!n&&r.length===0&&s.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:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsx("span",{children:"No drivers found"})]}),m&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:s.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:[s.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4",children:"Driver Details"}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Driver Information"}),s.jsx("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow no-scrollbar",children:s.jsxs("tbody",{children:[s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"ID"}),s.jsx("td",{className:"px-4 py-2",children:m._id?.slice(-6)||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Username"}),s.jsx("td",{className:"px-4 py-2",children:m.username||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Full Name"}),s.jsxs("td",{className:"px-4 py-2",children:[m.firstName||""," ",m.lastName||""]})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Email"}),s.jsx("td",{className:"px-4 py-2",children:m.email||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Phone Number"}),s.jsx("td",{className:"px-4 py-2",children:m.phoneNumber||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Gender"}),s.jsx("td",{className:"px-4 py-2",children:m.gender||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Country"}),s.jsx("td",{className:"px-4 py-2",children:m.country||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"KYC Status"}),s.jsx("td",{className:"px-4 py-2",children:m.kycStatus||"Pending"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"KYC Level"}),s.jsx("td",{className:"px-4 py-2",children:m.kycLevel!==void 0?m.kycLevel:"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Has Vehicle"}),s.jsx("td",{className:"px-4 py-2",children:m.hasVehicle?"Yes":"No"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Created At"}),s.jsx("td",{className:"px-4 py-2",children:m.createdAt?new Date(m.createdAt).toLocaleString():"N/A"})]})]})})]}),m.vehicle&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Vehicle Information"}),s.jsx("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow no-scrollbar",children:s.jsxs("tbody",{children:[s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Owner"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehicleOwnerName||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Company Name"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.companyName||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Plate"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehiclePlateNumber||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Model"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehicleMakeModel||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Chassis Number"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.chassisNumber||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Color"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehicleColor||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Registration Expiry"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.registrationExpiryDate?new Date(m.vehicle.registrationExpiryDate).toLocaleDateString():"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Service Type"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.serviceType||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Type"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.vehicleType||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Wheelchair Accessible"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.wheelchair?"Yes":"No"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Packing Helper"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.packingHelper?"Yes":"No"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Loading/Unloading Helper"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.loadingUnloadingHelper?"Yes":"No"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Fixing Helper"}),s.jsx("td",{className:"px-4 py-2",children:m.vehicle.fixingHelper?"Yes":"No"})]})]})})]}),m.pendingVehicleData&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Pending Vehicle Information"}),s.jsx("table",{className:"w-full text-sm text-left bg-[#013723] rounded-lg shadow no-scrollbar",children:s.jsxs("tbody",{children:[s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Owner"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehicleOwnerName||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Company Name"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.companyName||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Plate"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehiclePlateNumber||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Model"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehicleMakeModel||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Chassis Number"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.chassisNumber||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Color"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehicleColor||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Registration Expiry"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.registrationExpiryDate?new Date(m.pendingVehicleData.registrationExpiryDate).toLocaleDateString():"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Service Type"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.serviceType||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Vehicle Type"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.vehicleType||"N/A"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Wheelchair Accessible"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.wheelchair?"Yes":"No"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Packing Helper"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.packingHelper?"Yes":"No"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Loading/Unloading Helper"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.loadingUnloadingHelper?"Yes":"No"})]}),s.jsxs("tr",{className:"border-b border-[#038A59]",children:[s.jsx("td",{className:"px-4 py-2 font-medium",children:"Fixing Helper"}),s.jsx("td",{className:"px-4 py-2",children:m.pendingVehicleData.fixingHelper?"Yes":"No"})]})]})})]}),(m.vehicle||m.pendingVehicleData)&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-xl font-medium tracking-wide mb-2",children:"Vehicle Images"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[m.vehicle?.vehicleRegistrationCard?.front&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Registration Card (Front)"}),s.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&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Registration Card (Back)"}),s.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&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Road Authority Certificate"}),s.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&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Insurance Certificate"}),s.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)=>s.jsxs("div",{children:[s.jsxs("p",{className:"font-medium",children:["Vehicle Image ",re+1]}),s.jsx("img",{src:`${K}${U}`,alt:`Vehicle Image ${re+1}`,className:"w-full h-48 object-contain rounded-lg",onError:ne=>{ne.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]},re)),m.pendingVehicleData?.vehicleRegistrationCard?.front&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Pending Registration Card (Front)"}),s.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&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Pending Registration Card (Back)"}),s.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&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Pending Road Authority Certificate"}),s.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&&s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:"Pending Insurance Certificate"}),s.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)=>s.jsxs("div",{children:[s.jsxs("p",{className:"font-medium",children:["Pending Vehicle Image ",re+1]}),s.jsx("img",{src:`${K}${U}`,alt:`Pending Vehicle Image ${re+1}`,className:"w-full h-48 object-contain rounded-lg",onError:ne=>{ne.target.src="https://via.placeholder.com/150?text=Image+Not+Found"}})]},re))]})]}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.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"})})]})}),b&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:s.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:[s.jsx("h2",{className:"text-xl font-semibold tracking-wide mb-3",children:"Edit Driver"}),s.jsxs("form",{onSubmit:V,className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-medium tracking-wide mb-2",children:"Driver Information"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Username"}),s.jsx("input",{type:"text",name:"username",value:C.username,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.username&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.username})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"First Name"}),s.jsx("input",{type:"text",name:"firstName",value:C.firstName,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.firstName&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.firstName})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Last Name"}),s.jsx("input",{type:"text",name:"lastName",value:C.lastName,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.lastName&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.lastName})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Email"}),s.jsx("input",{type:"email",name:"email",value:C.email,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.email&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.email})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Phone Number"}),s.jsx("input",{type:"text",name:"phoneNumber",value:C.phoneNumber,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.phoneNumber&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.phoneNumber})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Gender"}),s.jsxs("select",{name:"gender",value:C.gender,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select Gender"}),s.jsx("option",{value:"Male",children:"Male"}),s.jsx("option",{value:"Female",children:"Female"}),s.jsx("option",{value:"Other",children:"Other"})]}),k.gender&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.gender})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Country"}),s.jsx("input",{type:"text",name:"country",value:C.country,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.country&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.country})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"KYC Level"}),s.jsxs("select",{name:"kycLevel",value:C.kycLevel,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select KYC Level"}),s.jsx("option",{value:"0",children:"0"}),s.jsx("option",{value:"1",children:"1"}),s.jsx("option",{value:"2",children:"2"})]}),k.kycLevel&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.kycLevel})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"KYC Status"}),s.jsxs("select",{name:"kycStatus",value:C.kycStatus,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select KYC Status"}),s.jsx("option",{value:"pending",children:"Pending"}),s.jsx("option",{value:"approved",children:"Approved"}),s.jsx("option",{value:"rejected",children:"Rejected"})]}),k.kycStatus&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.kycStatus})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Has Vehicle"}),s.jsxs("select",{name:"hasVehicle",value:C.hasVehicle,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select Vehicle Status"}),s.jsx("option",{value:"yes",children:"Yes"}),s.jsx("option",{value:"no",children:"No"})]}),k.hasVehicle&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.hasVehicle})]})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-medium tracking-wide mb-2",children:"Vehicle Information"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Owner Name"}),s.jsx("input",{type:"text",name:"vehicleOwnerName",value:C.vehicleOwnerName,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.vehicleOwnerName&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.vehicleOwnerName})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Company Name"}),s.jsx("input",{type:"text",name:"companyName",value:C.companyName,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.companyName&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.companyName})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Plate Number"}),s.jsx("input",{type:"text",name:"vehiclePlateNumber",value:C.vehiclePlateNumber,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.vehiclePlateNumber&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.vehiclePlateNumber})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Make/Model"}),s.jsx("input",{type:"text",name:"vehicleMakeModel",value:C.vehicleMakeModel,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.vehicleMakeModel&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.vehicleMakeModel})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Chassis Number"}),s.jsx("input",{type:"text",name:"chassisNumber",value:C.chassisNumber,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.chassisNumber&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.chassisNumber})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Color"}),s.jsx("input",{type:"text",name:"vehicleColor",value:C.vehicleColor,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.vehicleColor&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.vehicleColor})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Registration Expiry Date"}),s.jsx("input",{type:"date",name:"registrationExpiryDate",value:C.registrationExpiryDate,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.registrationExpiryDate&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.registrationExpiryDate})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Type"}),s.jsx("input",{type:"text",name:"vehicleType",value:C.vehicleType,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.vehicleType&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.vehicleType})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Service Type"}),s.jsx("input",{type:"text",name:"serviceType",value:C.serviceType,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.serviceType&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.serviceType})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Service Category"}),s.jsx("input",{type:"text",name:"serviceCategory",value:C.serviceCategory,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm"}),k.serviceCategory&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.serviceCategory})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Wheelchair Accessible"}),s.jsxs("select",{name:"wheelchair",value:C.wheelchair,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select Option"}),s.jsx("option",{value:"true",children:"Yes"}),s.jsx("option",{value:"false",children:"No"})]}),k.wheelchair&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.wheelchair})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Packing Helper"}),s.jsxs("select",{name:"packingHelper",value:C.packingHelper,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select Option"}),s.jsx("option",{value:"true",children:"Yes"}),s.jsx("option",{value:"false",children:"No"})]}),k.packingHelper&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.packingHelper})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Loading/Unloading Helper"}),s.jsxs("select",{name:"loadingUnloadingHelper",value:C.loadingUnloadingHelper,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select Option"}),s.jsx("option",{value:"true",children:"Yes"}),s.jsx("option",{value:"false",children:"No"})]}),k.loadingUnloadingHelper&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.loadingUnloadingHelper})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Fixing Helper"}),s.jsxs("select",{name:"fixingHelper",value:C.fixingHelper,onChange:H,className:"w-full p-1.5 bg-[#013723] border border-[#DDC104] rounded text-[#DDC104] focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Select Option"}),s.jsx("option",{value:"true",children:"Yes"}),s.jsx("option",{value:"false",children:"No"})]}),k.fixingHelper&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.fixingHelper})]})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-medium tracking-wide mb-2",children:"Driver Settings"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Auto Accept Enabled"}),s.jsxs("select",{name:"driverSettings.autoAccept.enabled",value:C.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:[s.jsx("option",{value:"false",children:"No"}),s.jsx("option",{value:"true",children:"Yes"})]}),k.autoAcceptEnabled&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.autoAcceptEnabled})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Pink Captain Mode"}),s.jsxs("select",{name:"driverSettings.ridePreferences.pinkCaptainMode",value:C.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:[s.jsx("option",{value:"false",children:"No"}),s.jsx("option",{value:"true",children:"Yes"})]}),k.pinkCaptainMode&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.pinkCaptainMode})]})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-base font-medium tracking-wide mb-2",children:"Documents"}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"License Image"}),s.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"}),k.licenseImage&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.licenseImage})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Registration Card"}),s.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"}),k.vehicleRegistrationCard&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.vehicleRegistrationCard})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Road Authority Certificate"}),s.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"}),k.roadAuthorityCertificate&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.roadAuthorityCertificate})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs font-medium",children:"Insurance Certificate"}),s.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"}),k.insuranceCertificate&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.insuranceCertificate})]}),s.jsxs("div",{className:"sm:col-span-2",children:[s.jsx("label",{className:"block text-xs font-medium",children:"Vehicle Images (up to 10)"}),s.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"}),k.vehicleImages&&s.jsx("p",{className:"text-red-500 text-xs mt-1",children:k.vehicleImages})]})]})]}),k.general&&s.jsx("div",{className:"text-red-500 text-xs mt-1",children:k.general}),s.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[s.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"}),s.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:a,children:a?s.jsx("div",{className:"animate-spin inline-block w-4 h-4 border-2 border-[#013723] border-t-transparent rounded-full"}):"Save"})]})]})]})})]})}),s.jsx(vd,{isOpen:O,title:"Delete Driver",message:"Are you sure you want to delete this driver? This action cannot be undone.",onConfirm:B,onClose:G})]})},gre=({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 s.jsx(Jr,{options:e,series:r,type:"area",height:60,width:"100%"})},xre=[{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]}],bre=[{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"}],yre=()=>s.jsxs("div",{children:[s.jsx(Tl,{}),s.jsxs("div",{className:"flex justify-end w-2/3 pt-8",children:[s.jsx("label",{children:"Sort By:"}),s.jsxs("select",{className:"bg-[#013220] focus:outline-none",children:[s.jsx("option",{value:"Month",children:"Month"}),s.jsx("option",{value:"year",children:"Year"})]})]}),s.jsxs("div",{className:"flex items-center justify-around w-[90%] mx-auto",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-10 w-[70%]",children:[xre.map((t,e)=>s.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:[s.jsx("p",{className:"font-semibold",children:t.title}),s.jsx("h2",{className:"text-xl font-bold",children:t.money}),s.jsx(gre,{data:t.chartData})," "]},e)),s.jsxs("div",{className:"text-sm flex flex-col gap-4 items-start ",children:[s.jsxs("p",{children:[s.jsx("span",{className:"font-bold",children:"ID:"})," 12345"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-bold",children:"Name:"})," Lorem Ipsum"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-bold",children:"Contact:"})," +1233456478"]})]})]}),s.jsx("div",{className:"w-[20%] flex justify-center bg-yellow-200 rounded p-1",children:s.jsx("img",{src:"https://randomuser.me/api/portraits/men/75.jpg",alt:"Profile",className:"w-full h-60 rounded shadow object-cover"})})]}),s.jsx("div",{className:"flex justify-center mt-6",children:s.jsx("div",{className:"border border-yellow-300 rounded-xl px-8 w-[80%]",children:bre.map((t,e)=>s.jsxs("div",{className:"mb-10",children:[s.jsx("h2",{className:"text-xl font-bold mb-4",children:t.heading}),s.jsxs("div",{className:"flex justify-center items-center",children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("img",{src:t.image1,alt:"id card",className:"w-[70%] mb-2"}),s.jsx("h2",{className:"font-bold",children:t.title})]}),s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("img",{src:t.image2,alt:"id card",className:"w-[70%] mb-2"}),s.jsx("h2",{className:"font-bold",children:t.title2})]})]}),s.jsxs("div",{className:"flex justify-center gap-4 mt-4",children:[s.jsx("button",{className:"px-6 font-semibold py-1 text-sm rounded-full text-[#013220] bg-yellow-400",children:"Accept"}),s.jsx("button",{className:"px-6 font-semibold py-1 text-sm rounded-full text-[#013220] bg-yellow-400",children:"Reject"})]})]},e))})}),s.jsxs("div",{className:"flex justify-center gap-8 p-8",children:[s.jsx("button",{className:"rounded-full bg-yellow-400 px-4 py-1.5 font-semibold text-[#013220]",children:"Accept All"}),s.jsx("button",{className:"rounded-full bg-yellow-400 px-6 py-1.5 text-[#013220] font-semibold",children:"Reject"})]})]});function vre(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 wre(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 jre=()=>s.jsxs("div",{className:"",children:[s.jsx("div",{children:s.jsx(Tl,{})}),s.jsxs("div",{className:"w-full mt-8 relative",children:[s.jsxs("div",{className:"flex flex-col px-4 py-2 gap-4 rounded-xl z-50 top-0 right-0 bg-white absolute",children:[s.jsx("div",{className:"flex justify-center",children:s.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:""})}),s.jsxs("div",{className:"pb-4 flex flex-col gap-2",children:[s.jsxs("div",{className:"flex gap-2 text-black items-center",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[" ",s.jsx(z0,{size:15})," ",s.jsx("h3",{className:"font-semibold",children:"Driver:"})]}),s.jsx("p",{className:"text-xs",children:"Ethel Lanon"})]}),s.jsxs("div",{className:"flex gap-2 text-black items-center",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[" ",s.jsx(wre,{size:15})," ",s.jsx("h3",{className:"font-semibold",children:"Status:"})]}),s.jsx("p",{className:"text-xs",children:"Active"})]}),s.jsxs("div",{className:"flex gap-2 text-black items-center",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[" ",s.jsx(uD,{size:15})," ",s.jsx("h3",{className:"font-semibold",children:"Vehicle:"})]}),s.jsx("p",{className:"text-xs",children:"Bike"})]}),s.jsxs("div",{className:"flex gap-2 text-black items-center",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[" ",s.jsx(uD,{size:15})," ",s.jsx("h3",{className:"font-semibold",children:"Location:"})]}),s.jsx("p",{className:"text-xs",children:"Christophemouts"})]})]})]}),s.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"})]})]}),Nre=[{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"}],Sre=()=>s.jsx(s.Fragment,{children:s.jsxs("div",{children:[s.jsx(Tl,{}),s.jsx("div",{className:"pt-4",children:s.jsxs("table",{className:"w-full text-sm text-left table-fixed",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-200",children:[s.jsx("th",{className:"w-[20%] px-6 py-3",children:"Date"}),s.jsx("th",{className:"w-[20%] px-4 py-3",children:"Time"}),s.jsx("th",{className:"w-[20%] px-4 py-3",children:"Amount"}),s.jsx("th",{className:"w-[20%] px-4 py-3 text-center",children:"Payment Method"}),s.jsx("th",{className:"w-[20%] px-4 py-3 text-center",children:"Action"})]})}),s.jsx("tbody",{children:Nre.map((t,e)=>s.jsxs("tr",{children:[s.jsx("td",{className:"w-[20%] px-6 py-3",children:t.date}),s.jsx("td",{className:"w-[20%] px-4 py-3",children:t.time}),s.jsxs("td",{className:"w-[20%] px-4 py-3",children:["$",t.amount]}),s.jsx("td",{className:"w-[20%] px-4 py-3 text-center",children:t.payment}),s.jsx("td",{className:"w-[20%] px-4 py-3",children:s.jsx("div",{className:"flex items-center gap-3 justify-center",children:s.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1.5 cursor-pointer rounded-full text-xs font-medium",children:"View"})})})]},e))})]})})]})}),Cre=[{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"}],Are=()=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex text-sm font-semibold justify-end pr-4 ",children:[s.jsx("label",{htmlFor:"",children:"Sort By:"}),s.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[s.jsx("option",{value:"high",children:"High"}),s.jsx("option",{value:"low",children:"Low"})]})]}),s.jsx(Tl,{}),s.jsxs("div",{className:"px-8 py-6",children:[s.jsxs("div",{className:"",children:[s.jsx("h2",{className:"font-semibold",children:"Ratings"}),s.jsx("span",{children:"⭐⭐⭐⭐⭐"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold",children:"Reviews"}),Cre.map((t,e)=>s.jsxs("div",{className:"border border-yellow-300 rounded-lg mb-6 px-4 pb-4 pt-2 ",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("div",{className:"flex gap-8 ",children:[s.jsx("div",{children:s.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:""})}),s.jsxs("div",{children:[s.jsx("h2",{className:"font-semibold",children:t.title}),s.jsx("span",{children:t.rating})]})]}),s.jsx("span",{children:t.date})]}),s.jsx("div",{children:t.desc})]}))]})]})]}),kre=()=>s.jsx("div",{children:s.jsx("div",{className:"py-6 flex flex-col items-center ",children:s.jsxs("form",{action:"",className:"max-w-6xl w-full mx-auto space-y-2",children:[s.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:""}),s.jsxs("div",{className:"flex relative mb-4",children:[s.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",s.jsx("input",{type:"file",id:"upload",className:"hidden"})]}),s.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"})]}),s.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"})]})})}),Dre=()=>s.jsx("div",{className:"py-6 flex flex-col items-center",children:s.jsxs("form",{action:"",className:"max-w-6xl w-full mx-auto space-y-2",children:[s.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:[s.jsx("option",{value:"",disabled:!0,children:" Duration"}),s.jsx("option",{value:"1day",children:"1 Day"}),s.jsx("option",{value:"3days",children:"3 Days"}),s.jsx("option",{value:"1week",children:"1 Week"}),s.jsx("option",{value:"1month",children:"1 Month"}),s.jsx("option",{value:"custom",children:"Custom"})]}),s.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}),s.jsxs("div",{className:"flex relative mb-4",children:[s.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",s.jsx("input",{type:"file",id:"upload",className:"hidden"})]}),s.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"})]}),s.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"})]})}),Tre=()=>s.jsx("div",{className:"py-6 flex flex-col items-center ",children:s.jsxs("form",{action:"",className:"max-w-6xl w-full mx-auto space-y-4",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("div",{children:s.jsx("label",{htmlFor:"",children:"Are you Sure you want to Ban this Driver"})}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"checkbox",className:"bg-[#01432B] accent-[#01432B] ",name:"",id:""}),s.jsx("label",{htmlFor:"",children:"Yes"}),s.jsx("input",{type:"checkbox",className:"bg-[#01432B] accent-[#01432B] ",name:"",id:""}),s.jsx("label",{htmlFor:"",children:"No"})]})]}),s.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:""}),s.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"})]})}),Mre=[{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"}],Ere=()=>{const[t,e]=E.useState("issuewarn");return s.jsxs("div",{children:[s.jsxs("div",{className:"flex text-sm font-semibold justify-end pr-4 ",children:[s.jsx("label",{htmlFor:"",children:"Sort By:"}),s.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[s.jsx("option",{value:"high",children:"High"}),s.jsx("option",{value:"low",children:"Low"})]})]}),s.jsx(Tl,{}),s.jsxs("div",{className:"flex justify-center items-center gap-32 mt-8",children:[s.jsxs("div",{className:"flex flex-col gap-2 text-sm w-[25%] max-w-md",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-x-0",children:[s.jsx("span",{className:"font-medium text-lg",children:"ID:"}),s.jsx("span",{className:"",children:"001"})]}),s.jsxs("div",{className:"grid grid-cols-2",children:[s.jsx("span",{className:"font-medium text-lg",children:"Name:"}),s.jsx("span",{className:"",children:"Smith Joy"})]}),s.jsxs("div",{className:"grid grid-cols-2",children:[s.jsx("span",{className:"font-medium text-lg",children:"Phone Number:"}),s.jsx("span",{className:"",children:"+97122222221"})]}),s.jsxs("div",{className:"grid grid-cols-2",children:[s.jsx("span",{className:"font-semibold text-lg ",children:"Status:"}),s.jsx("span",{className:"",children:"Active"})]}),s.jsxs("div",{className:"grid grid-cols-2",children:[s.jsx("span",{className:"font-medium text-lg",children:"Warning:"}),s.jsx("span",{className:"",children:"02"})]})]}),s.jsx("div",{className:"w-[200px] h-[240px] flex justify-center items-center bg-black rounded-lg p-1 shadow",children:s.jsx("img",{src:"https://randomuser.me/api/portraits/men/75.jpg",alt:"Profile",className:"w-full h-full rounded-lg object-cover"})})]}),s.jsx("div",{className:"border px-10 py-4 border-yellow-300 border-l-0 border-r-0",children:s.jsxs("div",{className:"flex gap-10",children:[s.jsx("button",{onClick:()=>e("issuewarn"),className:`${t=="issuewarn"?"btn-active":"btn-inactive"} `,children:"Issue Warning"}),s.jsx("button",{onClick:()=>e("tempban"),className:`${t=="tempban"?"btn-active":"btn-inactive"} `,children:"Temporary Ban"}),s.jsx("button",{onClick:()=>e("permanentban"),className:`${t=="permanentban"?"btn-active":"btn-inactive"} `,children:"Permanent Ban"})]})}),t==="issuewarn"&&s.jsx(kre,{}),t==="tempban"&&s.jsx(Dre,{}),t==="permanentban"&&s.jsx(Tre,{}),s.jsx("div",{className:"flex justify-center py-10",children:s.jsx("div",{className:"w-full max-w-7xl rounded-xl overflow-hidden border border-yellow-300",children:s.jsxs("table",{className:"w-full table-fixed border-collapse",children:[s.jsx("thead",{className:" text-yellow-400",children:s.jsxs("tr",{className:"text-left border-b border-yellow-300",children:[s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Date"}),s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Reason"}),s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Admin"}),s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Notes"}),s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Action"})]})}),s.jsx("tbody",{children:Mre.map((r,a)=>s.jsxs("tr",{children:[s.jsx("td",{className:"px-4 py-2",children:r.date}),s.jsx("td",{className:"px-4 py-2",children:r.reason}),s.jsx("td",{className:"px-4 py-2",children:r.admin}),s.jsx("td",{className:"px-4 py-2",children:r.notes}),s.jsx("td",{className:"px-4 py-2",children:r.action})]},a))})]})})})]})};function Pre(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 Ore=[{date:"24-July-25",rides:"15",distance:"180KM",earning:1200,latestart:1},{date:"24-July-25",rides:"15",distance:"180KM",earning:1200,latestart:1}],Rre=()=>{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 s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex text-sm font-semibold justify-end pr-4 ",children:[s.jsx("label",{htmlFor:"",children:"Sort By:"}),s.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[s.jsx("option",{value:"high",children:"Today"}),s.jsx("option",{value:"low",children:"Yesterday"}),s.jsx("option",{value:"low",children:"One Week"})]})]}),s.jsx(Tl,{}),s.jsxs("div",{className:"text-yellow-400 px-8 py-12 min-h-screen space-y-10",children:[s.jsxs("div",{className:"border max-w-4xl mx-auto w-full border-yellow-400 rounded-xl",children:[s.jsxs("div",{className:"flex justify-between px-6 py-4 items-center mb-4 border-b border-yellow-300",children:[s.jsx("h2",{className:"text-lg font-bold text-yellow-400",children:"Ride Per Day"}),s.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm",children:[s.jsx("span",{children:"Date Range :"}),s.jsx("span",{className:"border border-yellow-400 px-2 py-1 rounded",children:s.jsx("input",{type:"date",className:"bg-[#013220]"})}),s.jsx("span",{children:"To"}),s.jsx("span",{className:"border border-yellow-400 px-2 py-1 rounded",children:s.jsx("input",{type:"date",className:"bg-[#013220]"})})]})]}),s.jsx(Jr,{options:t,series:e,type:"bar",height:300})]}),s.jsx("div",{className:"flex justify-center items-center",children:s.jsxs("div",{className:"w-full max-w-4xl",children:[s.jsx("h3",{className:"font-semibold pb-2 text-lg",children:"KPT Card"}),s.jsx("div",{className:" rounded-xl border border-yellow-300 px-12 py-4",children:s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex justify-between ",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(lq,{}),s.jsx("p",{children:"Total Distance Coverd:"})]}),s.jsx("span",{children:"1,240km"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(jR,{}),s.jsx("p",{children:"Total Rides Completed:"})]}),s.jsx("span",{children:"512"})]}),s.jsxs("div",{className:"flex justify-between text-red-600",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Pre,{}),s.jsx("p",{children:"Rides Cancelled:"})]}),s.jsx("span",{children:"15"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Fq,{}),s.jsx("p",{children:"Late Starts:"})]}),s.jsx("span",{children:"6"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(kR,{}),s.jsx("p",{children:"Total Earnings:"})]}),s.jsx("span",{children:"425,000"})]})]})})]})}),s.jsx("div",{className:"flex justify-center py-6",children:s.jsxs("div",{className:" w-full max-w-6xl",children:[s.jsx("h3",{className:"font-semibold pb-2 text-lg",children:"Summay"}),s.jsx("div",{className:" rounded-xl overflow-hidden border border-yellow-300",children:s.jsxs("table",{className:"w-full table-fixed border-collapse",children:[s.jsx("thead",{className:" text-yellow-400",children:s.jsxs("tr",{className:"text-left border-b border-yellow-300",children:[s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Date"}),s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Rides"}),s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Distance"}),s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Earning"}),s.jsx("th",{className:"w-1/5 px-4 py-2",children:"Late Start"})]})}),s.jsx("tbody",{children:Ore.map((r,a)=>s.jsxs("tr",{children:[s.jsx("td",{className:"px-4 py-2",children:r.date}),s.jsx("td",{className:"px-4 py-2",children:r.rides}),s.jsx("td",{className:"px-4 py-2",children:r.distance}),s.jsx("td",{className:"px-4 py-2",children:r.earning}),s.jsx("td",{className:"px-4 py-2",children:r.latestart})]},a))})]})})]})})]})]})},_re=()=>{const[t,e]=E.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"]}}},a=[60,20,20];return s.jsxs("div",{className:"min-h-screen bg-[#013220] text-yellow-300 font-sans p-8",children:[s.jsxs("div",{className:"flex justify-between items-center flex-wrap mb-6",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Pie Chart :"}),s.jsxs("div",{className:"flex items-center gap-2 text-sm mt-2 md:mt-0",children:[s.jsx("span",{children:"Date Range:"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-300 px-2 py-1 rounded",defaultValue:"2025-07-18"}),s.jsx("span",{children:"to"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-300 px-2 py-1 rounded",defaultValue:"2025-07-21"})]})]}),s.jsxs("div",{className:"flex mt-12 items-start gap-8",children:[s.jsx("div",{className:"w-full md:w-1/2 flex justify-center",children:s.jsx(Jr,{options:r,series:a,type:"pie",width:"320"})}),s.jsxs("div",{className:"border border-yellow-300 rounded-xl p-4 w-full md:w-[200px] text-sm",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("label",{className:"block mb-4",children:"Select Region"}),s.jsxs("select",{value:t,onChange:n=>e(n.target.value),className:"w-full bg-[#013220] text-yellow-300 rounded-full border border-yellow-300 px-2 py-1 focus:outline-none",children:[s.jsx("option",{value:"Dubai",children:"Dubai"}),s.jsx("option",{value:"Karachi",children:"Karachi"}),s.jsx("option",{value:"Lahore",children:"Lahore"}),s.jsx("option",{value:"Riyadh",children:"Riyadh"})]})]}),s.jsxs("div",{className:"space-y-8",children:[s.jsx("div",{children:"12 GPS Spoofs"}),s.jsx("div",{children:"4 Referral Flags"}),s.jsx("div",{children:"Last Trigger: 2 hours ago"})]})]})]})]})},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 s.jsx(Jr,{options:e,series:r,type:"area",height:60,width:"100%"})},zre=[{rank:1,fullname:"Smith Joy",userid:"US-001",fraudScore:94,lastAction:"Wallet Frozen"}],Ire=[{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]}],Fre=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:" flex-1",children:[s.jsx(ep,{}),s.jsxs("div",{className:" bg-[#013220] text-yellow-300 p-8 font-sans",children:[s.jsxs("div",{className:"flex justify-center text-sm text-yellow-300 mb-2",children:["Sort By:",s.jsxs("select",{name:"",id:"",className:"bg-[#013220]",children:[s.jsx("option",{value:"today",children:"Today"}),s.jsx("option",{value:"weekly",children:"Weekly"}),s.jsx("option",{value:"monthly",children:"Monthly"})]})]}),s.jsx("div",{className:"flex justify-around mb-10",children:Ire.map((t,e)=>s.jsxs("div",{className:" shadow-md w-1/4 p-4 shadow-black/70 rounded-xl",children:[s.jsx("div",{className:"text-xl font-bold",children:t.title}),s.jsx("div",{className:"text-3xl font-bold text-yellow-400 my-2",children:t.value}),s.jsx("div",{}),s.jsx(Lre,{data:t.chartData})]},e))}),s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Top 5 Flagged Users (by Score)"}),s.jsx("div",{className:"border border-yellow-400 rounded-xl p-4",children:s.jsxs("table",{className:"w-full text-left table-auto border-separate border-spacing-y-2",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{children:"Rank"}),s.jsx("th",{children:"Full Name"}),s.jsx("th",{children:"User ID"}),s.jsx("th",{children:"Fraud Score"}),s.jsx("th",{className:"text-center",children:"Last Action"})]})}),s.jsx("tbody",{children:zre.map((t,e)=>s.jsxs("tr",{className:"rounded",children:[s.jsx("td",{className:"py-2 px-3",children:t.rank}),s.jsx("td",{className:"py-2 px-3",children:t.fullname}),s.jsx("td",{className:"py-2 px-3",children:t.userid}),s.jsx("td",{className:"py-2 px-3",children:t.fraudScore}),s.jsx("td",{className:"text-center py-2 px-3 text-yellow-400 font-medium",children:t.lastAction})]},e))})]})}),s.jsx("div",{children:s.jsx(_re,{})})]})]})]}),Bre={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"}]}]},Hre=({image:t})=>s.jsx("div",{className:"flex flex-col items-center relative z-10",children:s.jsx("img",{src:t,alt:"",className:"w-16 h-16 rounded-full border-4 border-yellow-400 shadow-lg bg-white"})}),vL=t=>s.jsxs("div",{className:"flex flex-col items-center relative ",children:[s.jsx(Hre,{image:t.image}),t.children&&s.jsxs("div",{className:"relative flex flex-col items-center mt-",children:[s.jsx("div",{className:"h-8 w-0.5 bg-yellow-400"}),s.jsxs("div",{className:"flex justify-center items-start relative mt-0",children:[s.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 bg-yellow-400 z-0"}),t.children.map((e,r)=>s.jsxs("div",{className:"flex flex-col items-center mx-4 relative",children:[s.jsx("div",{className:"h-6 w-0.5 bg-yellow-400 z-0"}),s.jsx("div",{className:"mt-",children:vL(e)})]},r))]})]})]}),$re=()=>s.jsxs(s.Fragment,{children:[s.jsx(Tl,{}),s.jsx("div",{className:"min-h-screen bg-[#013220] py-10 px-4  overflow-x-auto",children:s.jsx("div",{className:"flex justify-center",children:vL(Bre)})})]});Rs.register(Ml,sc,nc,ap);const Yre=()=>{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,a)=>a.chart.data.labels[a.dataIndex]}},layout:{padding:20}};return s.jsx("div",{style:{padding:"20px",borderRadius:"10px",display:"flex",justifyContent:"center"},children:s.jsx("div",{style:{width:"300px"},children:s.jsx(rp,{data:t,options:e})})})},ic=()=>{const t=hr(),e=E.useRef(null),r=i=>`menu-tab ${t.pathname===i?"active":""}`,a=()=>{e.current.scrollBy({left:-150,behavior:"smooth"})},n=()=>{e.current.scrollBy({left:150,behavior:"smooth"})};return s.jsxs("div",{className:"relative border-b border-yellow-400 px-6 py-2",children:[s.jsx("button",{onClick:a,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10  px-1",children:s.jsx(_0,{size:20})}),s.jsxs("div",{ref:e,className:"mx-6 flex gap-x-4 overflow-x-auto whitespace-nowrap scrollbar-hide",children:[s.jsx(De,{to:"/paymentoverview",className:r("/paymentoverview"),children:"Overview"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/walletadjustment",className:r("/walletadjustment"),children:"Wallet Adjustment"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/transactions",className:r("/transactions"),children:"Withdrawal Management"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/walletfreezingrules",className:r("/walletfreezingrules"),children:"Wallet Freezing Rules"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/transactionlog",className:r("/transactionlog"),children:"Transaction Logs"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/alertnotification",className:r("/alertnotification"),children:"Alert & Smart Notification"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/unachievedpool",className:r("/unachievedpool"),children:"Unachieved Pool Management"})]}),s.jsx("button",{onClick:n,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10  px-1",children:s.jsx(L0,{size:20})})]})},Ure=({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 s.jsx("div",{className:"w-full",children:s.jsx(Jr,{options:e,series:r,type:"area",height:40})})},Wre=[{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]}],Xre=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsx(ic,{}),s.jsxs("div",{className:"text-[#DDC104] p-6 overflow-y-auto",children:[s.jsxs("div",{className:"flex justify-end pb-4",children:[s.jsx("label",{className:"text-sm text-[#DDC104] mr-2",children:"Sort By:"}),s.jsxs("select",{className:"bg-transparent text-[#DDC104] text-sm focus:outline-none",children:[s.jsx("option",{value:"monthly",className:"bg-yellow-400 text-black",children:"Monthly"}),s.jsx("option",{value:"weekly",className:"bg-yellow-400 text-black",children:"Weekly"}),s.jsx("option",{value:"yearly",className:"bg-yellow-400 text-black",children:"Yearly"})]})]}),s.jsx("div",{className:"w-full max-w-2xl mx-auto grid grid-cols-1 sm:grid-cols-2 gap-6",children:Wre.map((t,e)=>s.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:[s.jsx("div",{className:"flex flex-col w-full",children:s.jsx("p",{className:"text-lg font-semibold tracking-wide mt-2",children:t.total})}),s.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),s.jsx(Ure,{data:t.chartData})]},e))}),s.jsxs("div",{className:"mt-8 flex justify-center items-center",children:[s.jsx(Yre,{}),s.jsxs("div",{className:"py-4 border border-yellow-300 rounded-xl ",children:[s.jsx("div",{className:"border-b border-yellow-300",children:s.jsx("h3",{className:"text-center px-4",children:"CRR"})}),s.jsxs("div",{className:"flex flex-col gap-6 px-6 py-4",children:[s.jsxs("div",{className:"flex justify-between gap-4",children:[s.jsx("p",{children:"Amount:"}),s.jsx("span",{children:"AED 45,000"})]}),s.jsxs("div",{className:"flex gap-8",children:[s.jsx("p",{children:"%age:"}),s.jsx("span",{children:"12%"})]})]})]})]})]})]})]}),oT=[{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"}],Vre=()=>{const[t,e]=E.useState(1),r=8,a=Math.ceil(oT.length/r),n=oT.slice((t-1)*r,t*r);return s.jsx("div",{className:"min-h-screen px-8 py-10  text-yellow-300 font-sans",children:s.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[s.jsxs("div",{className:"flex items-center border border-yellow-400 rounded-full px-4 py-2",children:[s.jsxs("select",{className:"bg-transparent w-full focus:outline-none bg-[#013220]",children:[s.jsx("option",{children:"Select User/Driver"}),s.jsx("option",{children:"User"}),s.jsx("option",{children:"Driver"})]}),s.jsx(Qq,{className:"text-yellow-300"})]}),s.jsx("div",{className:"text-center",children:s.jsx("button",{className:"bg-yellow-400 text-black px-6 py-2 rounded-full font-semibold",children:"Apply Adjustment"})}),s.jsxs("div",{className:"overflow-x-auto",children:[s.jsx("p",{className:"mb-2 font-semibold",children:"Paginated Table View:"}),s.jsxs("table",{className:"min-w-full text-left border border-yellow-400",children:[s.jsx("thead",{className:" text-yellow-300",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Date"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"User Name"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Type"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Amount"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Reason"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Admin"})]})}),s.jsx("tbody",{children:n.map((i,l)=>s.jsxs("tr",{className:"",children:[s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.date}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.userName}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.type}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.amount}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.reason}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.admin})]},l))})]})]}),s.jsxs("div",{className:"flex justify-center items-center mt-4 gap-2 text-yellow-300",children:[s.jsx("button",{onClick:()=>e(i=>Math.max(i-1,1)),className:"hover:underline disabled:opacity-50",disabled:t===1,children:"Previous"}),Array.from({length:a}).map((i,l)=>s.jsx("button",{onClick:()=>e(l+1),className:`w-8 h-8 rounded-full border border-yellow-400 text-center text-sm font-semibold ${t===l+1?"bg-yellow-400 text-black":""}`,children:l+1},l)),s.jsx("button",{onClick:()=>e(i=>Math.min(i+1,a)),className:"hover:underline disabled:opacity-50",disabled:t===a,children:"Next"})]})]})})},qre=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsx(ic,{}),s.jsx("div",{className:"flex-1 overflow-y-auto text-yellow-400 px-8 py-6 space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"col-span-2 flex items-center gap-4",children:[s.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"}),s.jsx(Kq,{size:32,className:"text-yellow-400 cursor-pointer"}),s.jsx(Zq,{size:32,className:"text-yellow-400 cursor-pointer"})]}),s.jsx("div",{className:"w-full border border-yellow-400 rounded-full overflow-hidden",children:s.jsxs("select",{className:"w-full block bg-transparent px-4 py-2 focus:outline-none appearance-none text-yellow-300",children:[s.jsx("option",{className:"bg-yellow-400 text-black",children:"Bonus"}),s.jsx("option",{className:"bg-yellow-400 text-black",children:"Penalty"}),s.jsx("option",{className:"bg-yellow-400 text-black",children:"Refund"})]})}),s.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"})]})}),s.jsx(Vre,{})]})]});function Gre(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 Kre=()=>s.jsxs("div",{className:" text-yellow-400 p-6 rounded-md w-full max-w-5xl mx-auto border border-yellow-500 mt-10",children:[s.jsx("h2",{className:"text-xl font-bold mb-4",children:"Withdrawal Settings :"}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block mb-1 font-medium",htmlFor:"withdrawal-frequency",children:"Withdrawal Frequency:"}),s.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:[s.jsx("option",{value:"",children:"Select Frequency"}),s.jsx("option",{value:"daily",children:"Daily"}),s.jsx("option",{value:"weekly",children:"Weekly"}),s.jsx("option",{value:"monthly",children:"Monthly"})]})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block mb-1 font-medium",htmlFor:"daily-limit",children:"Daily Limit Per User"}),s.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"})]}),s.jsxs("div",{className:"mb-6",children:[s.jsx("label",{className:"block mb-1 font-medium",htmlFor:"weekly-limit",children:"Weekly Limit"}),s.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"})]}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"font-bold mb-4",children:"Freeze Rules:"}),s.jsxs("label",{className:"flex items-center mb-4",children:[s.jsx("input",{type:"checkbox",name:"blockIfFlagged",className:"mr-2 accent-yellow-400",defaultChecked:!0}),"Block if user flagged"]}),s.jsxs("label",{className:"flex items-center mb-4",children:[s.jsx("input",{type:"checkbox",name:"blockIfKYCIncomplete",className:"mr-2 accent-yellow-400",defaultChecked:!0}),"Block if KYC incomplete"]}),s.jsxs("label",{className:"flex items-center",children:[s.jsx("input",{type:"checkbox",name:"blockIfShared",className:"mr-2 accent-yellow-400",defaultChecked:!0}),"Block if same account used by 2+ users"]})]}),s.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"})]}),Zre=()=>{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 s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsx(ic,{}),s.jsxs("div",{className:"w-[95%] mx-auto py-12 ",children:[s.jsx("h2",{className:"py-4",children:"Paginated Table View"}),s.jsx("div",{className:"w-full max-w-7xl border border-yellow-400 rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full max-w-5xl  text-sm text-yellow-300",children:[s.jsx("thead",{className:"border-b border-yellow-400",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left px-4 py-3",children:"Date"}),s.jsx("th",{className:"text-left px-4 py-3",children:"User Name"}),s.jsx("th",{className:"text-left px-4 py-3",children:"KYC"}),s.jsx("th",{className:"text-left px-4 py-3",children:"Amount"}),s.jsx("th",{className:"text-left px-4 py-3",children:"Date"}),s.jsx("th",{className:"text-left px-4 py-3",children:"Account Type"}),s.jsx("th",{className:"text-center px-4 py-3",children:"Action"})]})}),s.jsx("tbody",{className:"bg-transparent",children:t.map((e,r)=>s.jsxs("tr",{className:" ",children:[s.jsx("td",{className:"px-4 py-3",children:e.date}),s.jsx("td",{className:"px-4 py-3",children:e.userName}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(yD,{size:25})}),s.jsx("td",{className:"px-4 py-3",children:e.amount}),s.jsx("td",{className:"px-4 py-3",children:e.date}),s.jsx("td",{className:"px-4 py-3",children:e.accountType}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex gap-2 justify-center",children:[s.jsx("div",{className:"rounded-full p-1 border border-yellow-300",children:s.jsx(yD,{size:20})}),s.jsx("div",{className:"rounded-full p-1 border border-yellow-300",children:s.jsx(Gre,{size:20})}),s.jsx("div",{className:" rounded-full p-1 border border-yellow-300",children:s.jsx(Nq,{size:20})})]})})]}))})]})}),s.jsx(Kre,{})]})]})]})};function qo(t,...e){const r=new URL(`https://mui.com/production-error/?code=${t}`);return e.forEach(a=>r.searchParams.append("args[]",a)),`Minified MUI error #${t}; visit ${r} for the full message.`}const Qre="$$material";function Ox(){return Ox=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ox.apply(null,arguments)}function Jre(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 eae(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 tae=function(){function t(r){var a=this;this._insertTag=function(n){var i;a.tags.length===0?a.insertionPoint?i=a.insertionPoint.nextSibling:a.prepend?i=a.container.firstChild:i=a.before:i=a.tags[a.tags.length-1].nextSibling,a.container.insertBefore(n,i),a.tags.push(n)},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(a){a.forEach(this._insertTag)},e.insert=function(a){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(eae(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Jre(n);try{i.insertRule(a,i.cssRules.length)}catch{}}else n.appendChild(document.createTextNode(a));this.ctr++},e.flush=function(){this.tags.forEach(function(a){var n;return(n=a.parentNode)==null?void 0:n.removeChild(a)}),this.tags=[],this.ctr=0},t}(),sa="-ms-",Rx="-moz-",pt="-webkit-",wL="comm",TN="rule",MN="decl",rae="@import",jL="@keyframes",aae="@layer",nae=Math.abs,Y0=String.fromCharCode,sae=Object.assign;function iae(t,e){return Vr(t,0)^45?(((e<<2^Vr(t,0))<<2^Vr(t,1))<<2^Vr(t,2))<<2^Vr(t,3):0}function NL(t){return t.trim()}function lae(t,e){return(t=e.exec(t))?t[0]:t}function mt(t,e,r){return t.replace(e,r)}function Pj(t,e){return t.indexOf(e)}function Vr(t,e){return t.charCodeAt(e)|0}function jf(t,e,r){return t.slice(e,r)}function Ns(t){return t.length}function EN(t){return t.length}function ug(t,e){return e.push(t),t}function oae(t,e){return t.map(e).join("")}var U0=1,Sd=1,SL=0,Fa=0,xr=0,Gd="";function W0(t,e,r,a,n,i,l){return{value:t,root:e,parent:r,type:a,props:n,children:i,line:U0,column:Sd,length:l,return:""}}function xh(t,e){return sae(W0("",null,null,"",null,null,0),t,{length:-t.length},e)}function cae(){return xr}function dae(){return xr=Fa>0?Vr(Gd,--Fa):0,Sd--,xr===10&&(Sd=1,U0--),xr}function sn(){return xr=Fa<SL?Vr(Gd,Fa++):0,Sd++,xr===10&&(Sd=1,U0++),xr}function Ds(){return Vr(Gd,Fa)}function Kg(){return Fa}function np(t,e){return jf(Gd,t,e)}function Nf(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 CL(t){return U0=Sd=1,SL=Ns(Gd=t),Fa=0,[]}function AL(t){return Gd="",t}function Zg(t){return NL(np(Fa-1,Oj(t===91?t+2:t===40?t+1:t)))}function uae(t){for(;(xr=Ds())&&xr<33;)sn();return Nf(t)>2||Nf(xr)>3?"":" "}function hae(t,e){for(;--e&&sn()&&!(xr<48||xr>102||xr>57&&xr<65||xr>70&&xr<97););return np(t,Kg()+(e<6&&Ds()==32&&sn()==32))}function Oj(t){for(;sn();)switch(xr){case t:return Fa;case 34:case 39:t!==34&&t!==39&&Oj(xr);break;case 40:t===41&&Oj(t);break;case 92:sn();break}return Fa}function fae(t,e){for(;sn()&&t+xr!==57;)if(t+xr===84&&Ds()===47)break;return"/*"+np(e,Fa-1)+"*"+Y0(t===47?t:sn())}function pae(t){for(;!Nf(Ds());)sn();return np(t,Fa)}function mae(t){return AL(Qg("",null,null,null,[""],t=CL(t),0,[0],t))}function Qg(t,e,r,a,n,i,l,o,c){for(var d=0,h=0,p=l,m=0,x=0,b=0,y=1,v=1,N=1,C=0,S="",k=n,A=i,T=a,M=S;v;)switch(b=C,C=sn()){case 40:if(b!=108&&Vr(M,p-1)==58){Pj(M+=mt(Zg(C),"&","&\f"),"&\f")!=-1&&(N=-1);break}case 34:case 39:case 91:M+=Zg(C);break;case 9:case 10:case 13:case 32:M+=uae(b);break;case 92:M+=hae(Kg()-1,7);continue;case 47:switch(Ds()){case 42:case 47:ug(gae(fae(sn(),Kg()),e,r),c);break;default:M+="/"}break;case 123*y:o[d++]=Ns(M)*N;case 125*y:case 59:case 0:switch(C){case 0:case 125:v=0;case 59+h:N==-1&&(M=mt(M,/\f/g,"")),x>0&&Ns(M)-p&&ug(x>32?dT(M+";",a,r,p-1):dT(mt(M," ","")+";",a,r,p-2),c);break;case 59:M+=";";default:if(ug(T=cT(M,e,r,d,h,n,o,S,k=[],A=[],p),i),C===123)if(h===0)Qg(M,e,T,T,k,i,p,o,A);else switch(m===99&&Vr(M,3)===110?100:m){case 100:case 108:case 109:case 115:Qg(t,T,T,a&&ug(cT(t,T,T,0,0,n,o,S,n,k=[],p),A),n,A,p,o,a?k:A);break;default:Qg(M,T,T,T,[""],A,0,o,A)}}d=h=x=0,y=N=1,S=M="",p=l;break;case 58:p=1+Ns(M),x=b;default:if(y<1){if(C==123)--y;else if(C==125&&y++==0&&dae()==125)continue}switch(M+=Y0(C),C*y){case 38:N=h>0?1:(M+="\f",-1);break;case 44:o[d++]=(Ns(M)-1)*N,N=1;break;case 64:Ds()===45&&(M+=Zg(sn())),m=Ds(),h=p=Ns(S=M+=pae(Kg())),C++;break;case 45:b===45&&Ns(M)==2&&(y=0)}}return i}function cT(t,e,r,a,n,i,l,o,c,d,h){for(var p=n-1,m=n===0?i:[""],x=EN(m),b=0,y=0,v=0;b<a;++b)for(var N=0,C=jf(t,p+1,p=nae(y=l[b])),S=t;N<x;++N)(S=NL(y>0?m[N]+" "+C:mt(C,/&\f/g,m[N])))&&(c[v++]=S);return W0(t,e,r,n===0?TN:o,c,d,h)}function gae(t,e,r){return W0(t,e,r,wL,Y0(cae()),jf(t,2,-2),0)}function dT(t,e,r,a){return W0(t,e,r,MN,jf(t,0,a),jf(t,a+1,-1),a)}function pd(t,e){for(var r="",a=EN(t),n=0;n<a;n++)r+=e(t[n],n,t,e)||"";return r}function xae(t,e,r,a){switch(t.type){case aae:if(t.children.length)break;case rae:case MN:return t.return=t.return||t.value;case wL:return"";case jL:return t.return=t.value+"{"+pd(t.children,a)+"}";case TN:t.value=t.props.join(",")}return Ns(r=pd(t.children,a))?t.return=t.value+"{"+r+"}":""}function bae(t){var e=EN(t);return function(r,a,n,i){for(var l="",o=0;o<e;o++)l+=t[o](r,a,n,i)||"";return l}}function yae(t){return function(e){e.root||(e=e.return)&&t(e)}}function kL(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var vae=function(e,r,a){for(var n=0,i=0;n=i,i=Ds(),n===38&&i===12&&(r[a]=1),!Nf(i);)sn();return np(e,Fa)},wae=function(e,r){var a=-1,n=44;do switch(Nf(n)){case 0:n===38&&Ds()===12&&(r[a]=1),e[a]+=vae(Fa-1,r,a);break;case 2:e[a]+=Zg(n);break;case 4:if(n===44){e[++a]=Ds()===58?"&\f":"",r[a]=e[a].length;break}default:e[a]+=Y0(n)}while(n=sn());return e},jae=function(e,r){return AL(wae(CL(e),r))},uT=new WeakMap,Nae=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var r=e.value,a=e.parent,n=e.column===a.column&&e.line===a.line;a.type!=="rule";)if(a=a.parent,!a)return;if(!(e.props.length===1&&r.charCodeAt(0)!==58&&!uT.get(a))&&!n){uT.set(e,!0);for(var i=[],l=jae(r,i),o=a.props,c=0,d=0;c<l.length;c++)for(var h=0;h<o.length;h++,d++)e.props[d]=i[c]?l[c].replace(/&\f/g,o[h]):o[h]+" "+l[c]}}},Sae=function(e){if(e.type==="decl"){var r=e.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(e.return="",e.value="")}};function DL(t,e){switch(iae(t,e)){case 5103:return pt+"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 pt+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return pt+t+Rx+t+sa+t+t;case 6828:case 4268:return pt+t+sa+t+t;case 6165:return pt+t+sa+"flex-"+t+t;case 5187:return pt+t+mt(t,/(\w+).+(:[^]+)/,pt+"box-$1$2"+sa+"flex-$1$2")+t;case 5443:return pt+t+sa+"flex-item-"+mt(t,/flex-|-self/,"")+t;case 4675:return pt+t+sa+"flex-line-pack"+mt(t,/align-content|flex-|-self/,"")+t;case 5548:return pt+t+sa+mt(t,"shrink","negative")+t;case 5292:return pt+t+sa+mt(t,"basis","preferred-size")+t;case 6060:return pt+"box-"+mt(t,"-grow","")+pt+t+sa+mt(t,"grow","positive")+t;case 4554:return pt+mt(t,/([^-])(transform)/g,"$1"+pt+"$2")+t;case 6187:return mt(mt(mt(t,/(zoom-|grab)/,pt+"$1"),/(image-set)/,pt+"$1"),t,"")+t;case 5495:case 3959:return mt(t,/(image-set\([^]*)/,pt+"$1$`$1");case 4968:return mt(mt(t,/(.+:)(flex-)?(.*)/,pt+"box-pack:$3"+sa+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+pt+t+t;case 4095:case 3583:case 4068:case 2532:return mt(t,/(.+)-inline(.+)/,pt+"$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(Ns(t)-1-e>6)switch(Vr(t,e+1)){case 109:if(Vr(t,e+4)!==45)break;case 102:return mt(t,/(.+:)(.+)-([^]+)/,"$1"+pt+"$2-$3$1"+Rx+(Vr(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Pj(t,"stretch")?DL(mt(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Vr(t,e+1)!==115)break;case 6444:switch(Vr(t,Ns(t)-3-(~Pj(t,"!important")&&10))){case 107:return mt(t,":",":"+pt)+t;case 101:return mt(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+pt+(Vr(t,14)===45?"inline-":"")+"box$3$1"+pt+"$2$3$1"+sa+"$2box$3")+t}break;case 5936:switch(Vr(t,e+11)){case 114:return pt+t+sa+mt(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return pt+t+sa+mt(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return pt+t+sa+mt(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return pt+t+sa+t+t}return t}var Cae=function(e,r,a,n){if(e.length>-1&&!e.return)switch(e.type){case MN:e.return=DL(e.value,e.length);break;case jL:return pd([xh(e,{value:mt(e.value,"@","@"+pt)})],n);case TN:if(e.length)return oae(e.props,function(i){switch(lae(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pd([xh(e,{props:[mt(i,/:(read-\w+)/,":"+Rx+"$1")]})],n);case"::placeholder":return pd([xh(e,{props:[mt(i,/:(plac\w+)/,":"+pt+"input-$1")]}),xh(e,{props:[mt(i,/:(plac\w+)/,":"+Rx+"$1")]}),xh(e,{props:[mt(i,/:(plac\w+)/,sa+"input-$1")]})],n)}return""})}},Aae=[Cae],kae=function(e){var r=e.key;if(r==="css"){var a=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(a,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var n=e.stylisPlugins||Aae,i={},l,o=[];l=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),N=1;N<v.length;N++)i[v[N]]=!0;o.push(y)});var c,d=[Nae,Sae];{var h,p=[xae,yae(function(y){h.insert(y)})],m=bae(d.concat(n,p)),x=function(v){return pd(mae(v),m)};c=function(v,N,C,S){h=C,x(v?v+"{"+N.styles+"}":N.styles),S&&(b.inserted[N.name]=!0)}}var b={key:r,sheet:new tae({key:r,container:l,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:c};return b.sheet.hydrate(o),b},q1={exports:{}},yt={};/** @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 hT;function Dae(){if(hT)return yt;hT=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,n=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,l=t?Symbol.for("react.provider"):60109,o=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,d=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,b=t?Symbol.for("react.lazy"):60116,y=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,N=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function S(A){if(typeof A=="object"&&A!==null){var T=A.$$typeof;switch(T){case e:switch(A=A.type,A){case c:case d:case a:case i:case n:case p:return A;default:switch(A=A&&A.$$typeof,A){case o:case h:case b:case x:case l:return A;default:return T}}case r:return T}}}function k(A){return S(A)===d}return yt.AsyncMode=c,yt.ConcurrentMode=d,yt.ContextConsumer=o,yt.ContextProvider=l,yt.Element=e,yt.ForwardRef=h,yt.Fragment=a,yt.Lazy=b,yt.Memo=x,yt.Portal=r,yt.Profiler=i,yt.StrictMode=n,yt.Suspense=p,yt.isAsyncMode=function(A){return k(A)||S(A)===c},yt.isConcurrentMode=k,yt.isContextConsumer=function(A){return S(A)===o},yt.isContextProvider=function(A){return S(A)===l},yt.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===e},yt.isForwardRef=function(A){return S(A)===h},yt.isFragment=function(A){return S(A)===a},yt.isLazy=function(A){return S(A)===b},yt.isMemo=function(A){return S(A)===x},yt.isPortal=function(A){return S(A)===r},yt.isProfiler=function(A){return S(A)===i},yt.isStrictMode=function(A){return S(A)===n},yt.isSuspense=function(A){return S(A)===p},yt.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===a||A===d||A===i||A===n||A===p||A===m||typeof A=="object"&&A!==null&&(A.$$typeof===b||A.$$typeof===x||A.$$typeof===l||A.$$typeof===o||A.$$typeof===h||A.$$typeof===v||A.$$typeof===N||A.$$typeof===C||A.$$typeof===y)},yt.typeOf=S,yt}var fT;function TL(){return fT||(fT=1,q1.exports=Dae()),q1.exports}var G1,pT;function Tae(){if(pT)return G1;pT=1;var t=TL(),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},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},n={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[t.ForwardRef]=a,i[t.Memo]=n;function l(b){return t.isMemo(b)?n:i[b.$$typeof]||e}var o=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function x(b,y,v){if(typeof y!="string"){if(m){var N=p(y);N&&N!==m&&x(b,N,v)}var C=c(y);d&&(C=C.concat(d(y)));for(var S=l(b),k=l(y),A=0;A<C.length;++A){var T=C[A];if(!r[T]&&!(v&&v[T])&&!(k&&k[T])&&!(S&&S[T])){var M=h(y,T);try{o(b,T,M)}catch{}}}}return b}return G1=x,G1}Tae();var Mae=!0;function ML(t,e,r){var a="";return r.split(" ").forEach(function(n){t[n]!==void 0?e.push(t[n]+";"):n&&(a+=n+" ")}),a}var PN=function(e,r,a){var n=e.key+"-"+r.name;(a===!1||Mae===!1)&&e.registered[n]===void 0&&(e.registered[n]=r.styles)},EL=function(e,r,a){PN(e,r,a);var n=e.key+"-"+r.name;if(e.inserted[r.name]===void 0){var i=r;do e.insert(r===i?"."+n:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};function Eae(t){for(var e=0,r,a=0,n=t.length;n>=4;++a,n-=4)r=t.charCodeAt(a)&255|(t.charCodeAt(++a)&255)<<8|(t.charCodeAt(++a)&255)<<16|(t.charCodeAt(++a)&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(n){case 3:e^=(t.charCodeAt(a+2)&255)<<16;case 2:e^=(t.charCodeAt(a+1)&255)<<8;case 1:e^=t.charCodeAt(a)&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 Pae={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},Oae=/[A-Z]|^ms/g,Rae=/_EMO_([^_]+?)_([^]*?)_EMO_/g,PL=function(e){return e.charCodeAt(1)===45},mT=function(e){return e!=null&&typeof e!="boolean"},K1=kL(function(t){return PL(t)?t:t.replace(Oae,"-$&").toLowerCase()}),gT=function(e,r){switch(e){case"animation":case"animationName":if(typeof r=="string")return r.replace(Rae,function(a,n,i){return Ss={name:n,styles:i,next:Ss},n})}return Pae[e]!==1&&!PL(e)&&typeof r=="number"&&r!==0?r+"px":r};function Sf(t,e,r){if(r==null)return"";var a=r;if(a.__emotion_styles!==void 0)return a;switch(typeof r){case"boolean":return"";case"object":{var n=r;if(n.anim===1)return Ss={name:n.name,styles:n.styles,next:Ss},n.name;var i=r;if(i.styles!==void 0){var l=i.next;if(l!==void 0)for(;l!==void 0;)Ss={name:l.name,styles:l.styles,next:Ss},l=l.next;var o=i.styles+";";return o}return _ae(t,e,r)}case"function":{if(t!==void 0){var c=Ss,d=r(t);return Ss=c,Sf(t,e,d)}break}}var h=r;if(e==null)return h;var p=e[h];return p!==void 0?p:h}function _ae(t,e,r){var a="";if(Array.isArray(r))for(var n=0;n<r.length;n++)a+=Sf(t,e,r[n])+";";else for(var i in r){var l=r[i];if(typeof l!="object"){var o=l;e!=null&&e[o]!==void 0?a+=i+"{"+e[o]+"}":mT(o)&&(a+=K1(i)+":"+gT(i,o)+";")}else if(Array.isArray(l)&&typeof l[0]=="string"&&(e==null||e[l[0]]===void 0))for(var c=0;c<l.length;c++)mT(l[c])&&(a+=K1(i)+":"+gT(i,l[c])+";");else{var d=Sf(t,e,l);switch(i){case"animation":case"animationName":{a+=K1(i)+":"+d+";";break}default:a+=i+"{"+d+"}"}}}return a}var xT=/label:\s*([^\s;{]+)\s*(;|$)/g,Ss;function X0(t,e,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var a=!0,n="";Ss=void 0;var i=t[0];if(i==null||i.raw===void 0)a=!1,n+=Sf(r,e,i);else{var l=i;n+=l[0]}for(var o=1;o<t.length;o++)if(n+=Sf(r,e,t[o]),a){var c=i;n+=c[o]}xT.lastIndex=0;for(var d="",h;(h=xT.exec(n))!==null;)d+="-"+h[1];var p=Eae(n)+d;return{name:p,styles:n,next:Ss}}var Lae=function(e){return e()},zae=Pw.useInsertionEffect?Pw.useInsertionEffect:!1,OL=zae||Lae,RL=E.createContext(typeof HTMLElement<"u"?kae({key:"css"}):null);RL.Provider;var _L=function(e){return E.forwardRef(function(r,a){var n=E.useContext(RL);return e(r,n,a)})},LL=E.createContext({}),ON={}.hasOwnProperty,Rj="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Iae=function(e,r){var a={};for(var n in r)ON.call(r,n)&&(a[n]=r[n]);return a[Rj]=e,a},Fae=function(e){var r=e.cache,a=e.serialized,n=e.isStringTag;return PN(r,a,n),OL(function(){return EL(r,a,n)}),null},Bae=_L(function(t,e,r){var a=t.css;typeof a=="string"&&e.registered[a]!==void 0&&(a=e.registered[a]);var n=t[Rj],i=[a],l="";typeof t.className=="string"?l=ML(e.registered,i,t.className):t.className!=null&&(l=t.className+" ");var o=X0(i,void 0,E.useContext(LL));l+=e.key+"-"+o.name;var c={};for(var d in t)ON.call(t,d)&&d!=="css"&&d!==Rj&&(c[d]=t[d]);return c.className=l,r&&(c.ref=r),E.createElement(E.Fragment,null,E.createElement(Fae,{cache:e,serialized:o,isStringTag:typeof n=="string"}),E.createElement(n,c))}),Hae=Bae,bT=function(e,r){var a=arguments;if(r==null||!ON.call(r,"css"))return E.createElement.apply(void 0,a);var n=a.length,i=new Array(n);i[0]=Hae,i[1]=Iae(e,r);for(var l=2;l<n;l++)i[l]=a[l];return E.createElement.apply(null,i)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(bT||(bT={}));function $ae(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return X0(e)}function RN(){var t=$ae.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 Yae=/^((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)-.*))$/,Uae=kL(function(t){return Yae.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),Wae=Uae,Xae=function(e){return e!=="theme"},yT=function(e){return typeof e=="string"&&e.charCodeAt(0)>96?Wae:Xae},vT=function(e,r,a){var n;if(r){var i=r.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(l){return e.__emotion_forwardProp(l)&&i(l)}:i}return typeof n!="function"&&a&&(n=e.__emotion_forwardProp),n},Vae=function(e){var r=e.cache,a=e.serialized,n=e.isStringTag;return PN(r,a,n),OL(function(){return EL(r,a,n)}),null},qae=function t(e,r){var a=e.__emotion_real===e,n=a&&e.__emotion_base||e,i,l;r!==void 0&&(i=r.label,l=r.target);var o=vT(e,r,a),c=o||yT(n),d=!c("as");return function(){var h=arguments,p=a&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(i!==void 0&&p.push("label:"+i+";"),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,b=1;b<x;b++)p.push(h[b],m[b])}var y=_L(function(v,N,C){var S=d&&v.as||n,k="",A=[],T=v;if(v.theme==null){T={};for(var M in v)T[M]=v[M];T.theme=E.useContext(LL)}typeof v.className=="string"?k=ML(N.registered,A,v.className):v.className!=null&&(k=v.className+" ");var O=X0(p.concat(A),N.registered,T);k+=N.key+"-"+O.name,l!==void 0&&(k+=" "+l);var _=d&&o===void 0?yT(S):c,R={};for(var L in v)d&&L==="as"||_(L)&&(R[L]=v[L]);return R.className=k,C&&(R.ref=C),E.createElement(E.Fragment,null,E.createElement(Vae,{cache:N,serialized:O,isStringTag:typeof S=="string"}),E.createElement(S,R))});return y.displayName=i!==void 0?i:"Styled("+(typeof n=="string"?n:n.displayName||n.name||"Component")+")",y.defaultProps=e.defaultProps,y.__emotion_real=y,y.__emotion_base=n,y.__emotion_styles=p,y.__emotion_forwardProp=o,Object.defineProperty(y,"toString",{value:function(){return"."+l}}),y.withComponent=function(v,N){var C=t(v,Ox({},r,N,{shouldForwardProp:vT(y,N,!0)}));return C.apply(void 0,p)},y}},Gae=["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"],_j=qae.bind(null);Gae.forEach(function(t){_j[t]=_j(t)});function Kae(t,e){return _j(t,e)}function Zae(t,e){Array.isArray(t.__emotion_styles)&&(t.__emotion_styles=e(t.__emotion_styles))}const wT=[];function Lo(t){return wT[0]=t,X0(wT)}var Z1={exports:{}},Mt={};/**
 * @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 jT;function Qae(){if(jT)return Mt;jT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=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 b(y){if(typeof y=="object"&&y!==null){var v=y.$$typeof;switch(v){case t:switch(y=y.type,y){case r:case n:case a:case c:case d:case m:return y;default:switch(y=y&&y.$$typeof,y){case l:case o:case p:case h:return y;case i:return y;default:return v}}case e:return v}}}return Mt.ContextConsumer=i,Mt.ContextProvider=l,Mt.Element=t,Mt.ForwardRef=o,Mt.Fragment=r,Mt.Lazy=p,Mt.Memo=h,Mt.Portal=e,Mt.Profiler=n,Mt.StrictMode=a,Mt.Suspense=c,Mt.SuspenseList=d,Mt.isContextConsumer=function(y){return b(y)===i},Mt.isContextProvider=function(y){return b(y)===l},Mt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Mt.isForwardRef=function(y){return b(y)===o},Mt.isFragment=function(y){return b(y)===r},Mt.isLazy=function(y){return b(y)===p},Mt.isMemo=function(y){return b(y)===h},Mt.isPortal=function(y){return b(y)===e},Mt.isProfiler=function(y){return b(y)===n},Mt.isStrictMode=function(y){return b(y)===a},Mt.isSuspense=function(y){return b(y)===c},Mt.isSuspenseList=function(y){return b(y)===d},Mt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===n||y===a||y===c||y===d||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===h||y.$$typeof===l||y.$$typeof===i||y.$$typeof===o||y.$$typeof===x||y.getModuleId!==void 0)},Mt.typeOf=b,Mt}var NT;function Jae(){return NT||(NT=1,Z1.exports=Qae()),Z1.exports}var zL=Jae();function Cs(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 IL(t){if(E.isValidElement(t)||zL.isValidElementType(t)||!Cs(t))return t;const e={};return Object.keys(t).forEach(r=>{e[r]=IL(t[r])}),e}function ln(t,e,r={clone:!0}){const a=r.clone?{...t}:t;return Cs(t)&&Cs(e)&&Object.keys(e).forEach(n=>{E.isValidElement(e[n])||zL.isValidElementType(e[n])?a[n]=e[n]:Cs(e[n])&&Object.prototype.hasOwnProperty.call(t,n)&&Cs(t[n])?a[n]=ln(t[n],e[n],r):r.clone?a[n]=Cs(e[n])?IL(e[n]):e[n]:a[n]=e[n]}),a}const ene=t=>{const e=Object.keys(t).map(r=>({key:r,val:t[r]}))||[];return e.sort((r,a)=>r.val-a.val),e.reduce((r,a)=>({...r,[a.key]:a.val}),{})};function tne(t){const{values:e={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:a=5,...n}=t,i=ene(e),l=Object.keys(i);function o(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)-a/100}${r})`}function d(m,x){const b=l.indexOf(x);return`@media (min-width:${typeof e[m]=="number"?e[m]:m}${r}) and (max-width:${(b!==-1&&typeof e[l[b]]=="number"?e[l[b]]:x)-a/100}${r})`}function h(m){return l.indexOf(m)+1<l.length?d(m,l[l.indexOf(m)+1]):o(m)}function p(m){const x=l.indexOf(m);return x===0?o(l[1]):x===l.length-1?c(l[x]):d(m,l[l.indexOf(m)+1]).replace("@media","@media not all and")}return{keys:l,values:i,up:o,down:c,between:d,only:h,not:p,unit:r,...n}}function ST(t,e){if(!t.containerQueries)return e;const r=Object.keys(e).filter(a=>a.startsWith("@container")).sort((a,n)=>{const i=/min-width:\s*([0-9.]+)/;return+(a.match(i)?.[1]||0)-+(n.match(i)?.[1]||0)});return r.length?r.reduce((a,n)=>{const i=e[n];return delete a[n],a[n]=i,a},{...e}):e}function rne(t,e){return e==="@"||e.startsWith("@")&&(t.some(r=>e.startsWith(`@${r}`))||!!e.match(/^@\d/))}function ane(t,e){const r=e.match(/^@([^/]+)?\/?(.+)?$/);if(!r)return null;const[,a,n]=r,i=Number.isNaN(+a)?a||0:+a;return t.containerQueries(n).up(i)}function nne(t){const e=(i,l)=>i.replace("@media",l?`@container ${l}`:"@container");function r(i,l){i.up=(...o)=>e(t.breakpoints.up(...o),l),i.down=(...o)=>e(t.breakpoints.down(...o),l),i.between=(...o)=>e(t.breakpoints.between(...o),l),i.only=(...o)=>e(t.breakpoints.only(...o),l),i.not=(...o)=>{const c=e(t.breakpoints.not(...o),l);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const a={},n=i=>(r(a,i),a);return r(n),{...t,containerQueries:n}}const sne={borderRadius:4};function ef(t,e){return e?ln(t,e,{clone:!1}):t}const V0={xs:0,sm:600,md:900,lg:1200,xl:1536},CT={keys:["xs","sm","md","lg","xl"],up:t=>`@media (min-width:${V0[t]}px)`},ine={containerQueries:t=>({up:e=>{let r=typeof e=="number"?e:V0[e]||e;return typeof r=="number"&&(r=`${r}px`),t?`@container ${t} (min-width:${r})`:`@container (min-width:${r})`}})};function wi(t,e,r){const a=t.theme||{};if(Array.isArray(e)){const i=a.breakpoints||CT;return e.reduce((l,o,c)=>(l[i.up(i.keys[c])]=r(e[c]),l),{})}if(typeof e=="object"){const i=a.breakpoints||CT;return Object.keys(e).reduce((l,o)=>{if(rne(i.keys,o)){const c=ane(a.containerQueries?a:ine,o);c&&(l[c]=r(e[o],o))}else if(Object.keys(i.values||V0).includes(o)){const c=i.up(o);l[c]=r(e[o],o)}else{const c=o;l[c]=e[c]}return l},{})}return r(e)}function lne(t={}){return t.keys?.reduce((r,a)=>{const n=t.up(a);return r[n]={},r},{})||{}}function AT(t,e){return t.reduce((r,a)=>{const n=r[a];return(!n||Object.keys(n).length===0)&&delete r[a],r},e)}function za(t){if(typeof t!="string")throw new Error(qo(7));return t.charAt(0).toUpperCase()+t.slice(1)}function q0(t,e,r=!0){if(!e||typeof e!="string")return null;if(t&&t.vars&&r){const a=`vars.${e}`.split(".").reduce((n,i)=>n&&n[i]?n[i]:null,t);if(a!=null)return a}return e.split(".").reduce((a,n)=>a&&a[n]!=null?a[n]:null,t)}function _x(t,e,r,a=r){let n;return typeof t=="function"?n=t(r):Array.isArray(t)?n=t[r]||a:n=q0(t,r)||a,e&&(n=e(n,a,t)),n}function fr(t){const{prop:e,cssProperty:r=t.prop,themeKey:a,transform:n}=t,i=l=>{if(l[e]==null)return null;const o=l[e],c=l.theme,d=q0(c,a)||{};return wi(l,o,p=>{let m=_x(d,n,p);return p===m&&typeof p=="string"&&(m=_x(d,n,`${e}${p==="default"?"":za(p)}`,p)),r===!1?m:{[r]:m}})};return i.propTypes={},i.filterProps=[e],i}function one(t){const e={};return r=>(e[r]===void 0&&(e[r]=t(r)),e[r])}const cne={m:"margin",p:"padding"},dne={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},kT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},une=one(t=>{if(t.length>2)if(kT[t])t=kT[t];else return[t];const[e,r]=t.split(""),a=cne[e],n=dne[r]||"";return Array.isArray(n)?n.map(i=>a+i):[a+n]}),_N=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],LN=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[..._N,...LN];function sp(t,e,r,a){const n=q0(t,e,!0)??r;return typeof n=="number"||typeof n=="string"?i=>typeof i=="string"?i:typeof n=="string"?n.startsWith("var(")&&i===0?0:n.startsWith("var(")&&i===1?n:`calc(${i} * ${n})`:n*i:Array.isArray(n)?i=>{if(typeof i=="string")return i;const l=Math.abs(i),o=n[l];return i>=0?o:typeof o=="number"?-o:typeof o=="string"&&o.startsWith("var(")?`calc(-1 * ${o})`:`-${o}`}:typeof n=="function"?n:()=>{}}function zN(t){return sp(t,"spacing",8)}function ip(t,e){return typeof e=="string"||e==null?e:t(e)}function hne(t,e){return r=>t.reduce((a,n)=>(a[n]=ip(e,r),a),{})}function fne(t,e,r,a){if(!e.includes(r))return null;const n=une(r),i=hne(n,a),l=t[r];return wi(t,l,i)}function FL(t,e){const r=zN(t.theme);return Object.keys(t).map(a=>fne(t,e,a,r)).reduce(ef,{})}function ar(t){return FL(t,_N)}ar.propTypes={};ar.filterProps=_N;function nr(t){return FL(t,LN)}nr.propTypes={};nr.filterProps=LN;function BL(t=8,e=zN({spacing:t})){if(t.mui)return t;const r=(...a)=>(a.length===0?[1]:a).map(i=>{const l=e(i);return typeof l=="number"?`${l}px`:l}).join(" ");return r.mui=!0,r}function G0(...t){const e=t.reduce((a,n)=>(n.filterProps.forEach(i=>{a[i]=n}),a),{}),r=a=>Object.keys(a).reduce((n,i)=>e[i]?ef(n,e[i](a)):n,{});return r.propTypes={},r.filterProps=t.reduce((a,n)=>a.concat(n.filterProps),[]),r}function En(t){return typeof t!="number"?t:`${t}px solid`}function Bn(t,e){return fr({prop:t,themeKey:"borders",transform:e})}const pne=Bn("border",En),mne=Bn("borderTop",En),gne=Bn("borderRight",En),xne=Bn("borderBottom",En),bne=Bn("borderLeft",En),yne=Bn("borderColor"),vne=Bn("borderTopColor"),wne=Bn("borderRightColor"),jne=Bn("borderBottomColor"),Nne=Bn("borderLeftColor"),Sne=Bn("outline",En),Cne=Bn("outlineColor"),K0=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const e=sp(t.theme,"shape.borderRadius",4),r=a=>({borderRadius:ip(e,a)});return wi(t,t.borderRadius,r)}return null};K0.propTypes={};K0.filterProps=["borderRadius"];G0(pne,mne,gne,xne,bne,yne,vne,wne,jne,Nne,K0,Sne,Cne);const Z0=t=>{if(t.gap!==void 0&&t.gap!==null){const e=sp(t.theme,"spacing",8),r=a=>({gap:ip(e,a)});return wi(t,t.gap,r)}return null};Z0.propTypes={};Z0.filterProps=["gap"];const Q0=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const e=sp(t.theme,"spacing",8),r=a=>({columnGap:ip(e,a)});return wi(t,t.columnGap,r)}return null};Q0.propTypes={};Q0.filterProps=["columnGap"];const J0=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const e=sp(t.theme,"spacing",8),r=a=>({rowGap:ip(e,a)});return wi(t,t.rowGap,r)}return null};J0.propTypes={};J0.filterProps=["rowGap"];const Ane=fr({prop:"gridColumn"}),kne=fr({prop:"gridRow"}),Dne=fr({prop:"gridAutoFlow"}),Tne=fr({prop:"gridAutoColumns"}),Mne=fr({prop:"gridAutoRows"}),Ene=fr({prop:"gridTemplateColumns"}),Pne=fr({prop:"gridTemplateRows"}),One=fr({prop:"gridTemplateAreas"}),Rne=fr({prop:"gridArea"});G0(Z0,Q0,J0,Ane,kne,Dne,Tne,Mne,Ene,Pne,One,Rne);function md(t,e){return e==="grey"?e:t}const _ne=fr({prop:"color",themeKey:"palette",transform:md}),Lne=fr({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:md}),zne=fr({prop:"backgroundColor",themeKey:"palette",transform:md});G0(_ne,Lne,zne);function rn(t){return t<=1&&t!==0?`${t*100}%`:t}const Ine=fr({prop:"width",transform:rn}),IN=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const e=r=>{const a=t.theme?.breakpoints?.values?.[r]||V0[r];return a?t.theme?.breakpoints?.unit!=="px"?{maxWidth:`${a}${t.theme.breakpoints.unit}`}:{maxWidth:a}:{maxWidth:rn(r)}};return wi(t,t.maxWidth,e)}return null};IN.filterProps=["maxWidth"];const Fne=fr({prop:"minWidth",transform:rn}),Bne=fr({prop:"height",transform:rn}),Hne=fr({prop:"maxHeight",transform:rn}),$ne=fr({prop:"minHeight",transform:rn});fr({prop:"size",cssProperty:"width",transform:rn});fr({prop:"size",cssProperty:"height",transform:rn});const Yne=fr({prop:"boxSizing"});G0(Ine,IN,Fne,Bne,Hne,$ne,Yne);const lp={border:{themeKey:"borders",transform:En},borderTop:{themeKey:"borders",transform:En},borderRight:{themeKey:"borders",transform:En},borderBottom:{themeKey:"borders",transform:En},borderLeft:{themeKey:"borders",transform:En},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:En},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:K0},color:{themeKey:"palette",transform:md},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:md},backgroundColor:{themeKey:"palette",transform:md},p:{style:nr},pt:{style:nr},pr:{style:nr},pb:{style:nr},pl:{style:nr},px:{style:nr},py:{style:nr},padding:{style:nr},paddingTop:{style:nr},paddingRight:{style:nr},paddingBottom:{style:nr},paddingLeft:{style:nr},paddingX:{style:nr},paddingY:{style:nr},paddingInline:{style:nr},paddingInlineStart:{style:nr},paddingInlineEnd:{style:nr},paddingBlock:{style:nr},paddingBlockStart:{style:nr},paddingBlockEnd:{style:nr},m:{style:ar},mt:{style:ar},mr:{style:ar},mb:{style:ar},ml:{style:ar},mx:{style:ar},my:{style:ar},margin:{style:ar},marginTop:{style:ar},marginRight:{style:ar},marginBottom:{style:ar},marginLeft:{style:ar},marginX:{style:ar},marginY:{style:ar},marginInline:{style:ar},marginInlineStart:{style:ar},marginInlineEnd:{style:ar},marginBlock:{style:ar},marginBlockStart:{style:ar},marginBlockEnd:{style:ar},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:Z0},rowGap:{style:J0},columnGap:{style:Q0},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:rn},maxWidth:{style:IN},minWidth:{transform:rn},height:{transform:rn},maxHeight:{transform:rn},minHeight:{transform:rn},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 Une(...t){const e=t.reduce((a,n)=>a.concat(Object.keys(n)),[]),r=new Set(e);return t.every(a=>r.size===Object.keys(a).length)}function Wne(t,e){return typeof t=="function"?t(e):t}function Xne(){function t(r,a,n,i){const l={[r]:a,theme:n},o=i[r];if(!o)return{[r]:a};const{cssProperty:c=r,themeKey:d,transform:h,style:p}=o;if(a==null)return null;if(d==="typography"&&a==="inherit")return{[r]:a};const m=q0(n,d)||{};return p?p(l):wi(l,a,b=>{let y=_x(m,h,b);return b===y&&typeof b=="string"&&(y=_x(m,h,`${r}${b==="default"?"":za(b)}`,b)),c===!1?y:{[c]:y}})}function e(r){const{sx:a,theme:n={},nested:i}=r||{};if(!a)return null;const l=n.unstable_sxConfig??lp;function o(c){let d=c;if(typeof c=="function")d=c(n);else if(typeof c!="object")return c;if(!d)return null;const h=lne(n.breakpoints),p=Object.keys(h);let m=h;return Object.keys(d).forEach(x=>{const b=Wne(d[x],n);if(b!=null)if(typeof b=="object")if(l[x])m=ef(m,t(x,b,n,l));else{const y=wi({theme:n},b,v=>({[x]:v}));Une(y,b)?m[x]=e({sx:b,theme:n,nested:!0}):m=ef(m,y)}else m=ef(m,t(x,b,n,l))}),!i&&n.modularCssLayers?{"@layer sx":ST(n,AT(p,m))}:ST(n,AT(p,m))}return Array.isArray(a)?a.map(o):o(a)}return e}const Cd=Xne();Cd.filterProps=["sx"];function Vne(t,e){const r=this;if(r.vars){if(!r.colorSchemes?.[t]||typeof r.getColorSchemeSelector!="function")return{};let a=r.getColorSchemeSelector(t);return a==="&"?e:((a.includes("data-")||a.includes("."))&&(a=`*:where(${a.replace(/\s*&$/,"")}) &`),{[a]:e})}return r.palette.mode===t?e:{}}function HL(t={},...e){const{breakpoints:r={},palette:a={},spacing:n,shape:i={},...l}=t,o=tne(r),c=BL(n);let d=ln({breakpoints:o,direction:"ltr",components:{},palette:{mode:"light",...a},spacing:c,shape:{...sne,...i}},l);return d=nne(d),d.applyStyles=Vne,d=e.reduce((h,p)=>ln(h,p),d),d.unstable_sxConfig={...lp,...l?.unstable_sxConfig},d.unstable_sx=function(p){return Cd({sx:p,theme:this})},d}const qne=t=>{const e={systemProps:{},otherProps:{}},r=t?.theme?.unstable_sxConfig??lp;return Object.keys(t).forEach(a=>{r[a]?e.systemProps[a]=t[a]:e.otherProps[a]=t[a]}),e};function Gne(t){const{sx:e,...r}=t,{systemProps:a,otherProps:n}=qne(r);let i;return Array.isArray(e)?i=[a,...e]:typeof e=="function"?i=(...l)=>{const o=e(...l);return Cs(o)?{...a,...o}:a}:i={...a,...e},{...n,sx:i}}const DT=t=>t,Kne=()=>{let t=DT;return{configure(e){t=e},generate(e){return t(e)},reset(){t=DT}}},Zne=Kne();function $L(t){var e,r,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(r=$L(t[e]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}function Ke(){for(var t,e,r=0,a="",n=arguments.length;r<n;r++)(t=arguments[r])&&(e=$L(t))&&(a&&(a+=" "),a+=e);return a}const Qne={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 Kd(t,e,r="Mui"){const a=Qne[e];return a?`${r}-${a}`:`${Zne.generate(t)}-${e}`}function Zd(t,e,r="Mui"){const a={};return e.forEach(n=>{a[n]=Kd(t,n,r)}),a}function YL(t){const{variants:e,...r}=t,a={variants:e,style:Lo(r),isProcessed:!0};return a.style===r||e&&e.forEach(n=>{typeof n.style!="function"&&(n.style=Lo(n.style))}),a}const Jne=HL();function Q1(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}function So(t,e){return e&&t&&typeof t=="object"&&t.styles&&!t.styles.startsWith("@layer")&&(t.styles=`@layer ${e}{${String(t.styles)}}`),t}function ese(t){return t?(e,r)=>r[t]:null}function tse(t,e,r){t.theme=nse(t.theme)?r:t.theme[e]||t.theme}function Jg(t,e,r){const a=typeof e=="function"?e(t):e;if(Array.isArray(a))return a.flatMap(n=>Jg(t,n,r));if(Array.isArray(a?.variants)){let n;if(a.isProcessed)n=r?So(a.style,r):a.style;else{const{variants:i,...l}=a;n=r?So(Lo(l),r):l}return UL(t,a.variants,[n],r)}return a?.isProcessed?r?So(Lo(a.style),r):a.style:r?So(Lo(a),r):a}function UL(t,e,r=[],a=void 0){let n;e:for(let i=0;i<e.length;i+=1){const l=e[i];if(typeof l.props=="function"){if(n??={...t,...t.ownerState,ownerState:t.ownerState},!l.props(n))continue}else for(const o in l.props)if(t[o]!==l.props[o]&&t.ownerState?.[o]!==l.props[o])continue e;typeof l.style=="function"?(n??={...t,...t.ownerState,ownerState:t.ownerState},r.push(a?So(Lo(l.style(n)),a):l.style(n))):r.push(a?So(Lo(l.style),a):l.style)}return r}function rse(t={}){const{themeId:e,defaultTheme:r=Jne,rootShouldForwardProp:a=Q1,slotShouldForwardProp:n=Q1}=t;function i(o){tse(o,e,r)}return(o,c={})=>{Zae(o,T=>T.filter(M=>M!==Cd));const{name:d,slot:h,skipVariantsResolver:p,skipSx:m,overridesResolver:x=ese(ise(h)),...b}=c,y=d&&d.startsWith("Mui")||h?"components":"custom",v=p!==void 0?p:h&&h!=="Root"&&h!=="root"||!1,N=m||!1;let C=Q1;h==="Root"||h==="root"?C=a:h?C=n:sse(o)&&(C=void 0);const S=Kae(o,{shouldForwardProp:C,label:ase(),...b}),k=T=>{if(T.__emotion_real===T)return T;if(typeof T=="function")return function(O){return Jg(O,T,O.theme.modularCssLayers?y:void 0)};if(Cs(T)){const M=YL(T);return function(_){return M.variants?Jg(_,M,_.theme.modularCssLayers?y:void 0):_.theme.modularCssLayers?So(M.style,y):M.style}}return T},A=(...T)=>{const M=[],O=T.map(k),_=[];if(M.push(i),d&&x&&_.push(function(F){const X=F.theme.components?.[d]?.styleOverrides;if(!X)return null;const H={};for(const W in X)H[W]=Jg(F,X[W],F.theme.modularCssLayers?"theme":void 0);return x(F,H)}),d&&!v&&_.push(function(F){const X=F.theme?.components?.[d]?.variants;return X?UL(F,X,[],F.theme.modularCssLayers?"theme":void 0):null}),N||_.push(Cd),Array.isArray(O[0])){const z=O.shift(),F=new Array(M.length).fill(""),Y=new Array(_.length).fill("");let X;X=[...F,...z,...Y],X.raw=[...F,...z.raw,...Y],M.unshift(X)}const R=[...M,...O,..._],L=S(...R);return o.muiName&&(L.muiName=o.muiName),L};return S.withConfig&&(A.withConfig=S.withConfig),A}}function ase(t,e){return void 0}function nse(t){for(const e in t)return!1;return!0}function sse(t){return typeof t=="string"&&t.charCodeAt(0)>96}function ise(t){return t&&t.charAt(0).toLowerCase()+t.slice(1)}function Lj(t,e,r=!1){const a={...e};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=n;if(i==="components"||i==="slots")a[i]={...t[i],...a[i]};else if(i==="componentsProps"||i==="slotProps"){const l=t[i],o=e[i];if(!o)a[i]=l||{};else if(!l)a[i]=o;else{a[i]={...o};for(const c in l)if(Object.prototype.hasOwnProperty.call(l,c)){const d=c;a[i][d]=Lj(l[d],o[d],r)}}}else i==="className"&&r&&e.className?a.className=Ke(t?.className,e?.className):i==="style"&&r&&e.style?a.style={...t?.style,...e?.style}:a[i]===void 0&&(a[i]=t[i])}return a}const lse=typeof window<"u"?E.useLayoutEffect:E.useEffect;function ose(t,e=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(e,Math.min(t,r))}function FN(t,e=0,r=1){return ose(t,e,r)}function cse(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(a=>a+a)),r?`rgb${r.length===4?"a":""}(${r.map((a,n)=>n<3?parseInt(a,16):Math.round(parseInt(a,16)/255*1e3)/1e3).join(", ")})`:""}function Nl(t){if(t.type)return t;if(t.charAt(0)==="#")return Nl(cse(t));const e=t.indexOf("("),r=t.substring(0,e);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(qo(9,t));let a=t.substring(e+1,t.length-1),n;if(r==="color"){if(a=a.split(" "),n=a.shift(),a.length===4&&a[3].charAt(0)==="/"&&(a[3]=a[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(n))throw new Error(qo(10,n))}else a=a.split(",");return a=a.map(i=>parseFloat(i)),{type:r,values:a,colorSpace:n}}const dse=t=>{const e=Nl(t);return e.values.slice(0,3).map((r,a)=>e.type.includes("hsl")&&a!==0?`${r}%`:r).join(" ")},Oh=(t,e)=>{try{return dse(t)}catch{return t}};function eb(t){const{type:e,colorSpace:r}=t;let{values:a}=t;return e.includes("rgb")?a=a.map((n,i)=>i<3?parseInt(n,10):n):e.includes("hsl")&&(a[1]=`${a[1]}%`,a[2]=`${a[2]}%`),e.includes("color")?a=`${r} ${a.join(" ")}`:a=`${a.join(", ")}`,`${e}(${a})`}function WL(t){t=Nl(t);const{values:e}=t,r=e[0],a=e[1]/100,n=e[2]/100,i=a*Math.min(n,1-n),l=(d,h=(d+r/30)%12)=>n-i*Math.max(Math.min(h-3,9-h,1),-1);let o="rgb";const c=[Math.round(l(0)*255),Math.round(l(8)*255),Math.round(l(4)*255)];return t.type==="hsla"&&(o+="a",c.push(e[3])),eb({type:o,values:c})}function zj(t){t=Nl(t);let e=t.type==="hsl"||t.type==="hsla"?Nl(WL(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 use(t,e){const r=zj(t),a=zj(e);return(Math.max(r,a)+.05)/(Math.min(r,a)+.05)}function Ij(t,e){return t=Nl(t),e=FN(e),(t.type==="rgb"||t.type==="hsl")&&(t.type+="a"),t.type==="color"?t.values[3]=`/${e}`:t.values[3]=e,eb(t)}function hg(t,e,r){try{return Ij(t,e)}catch{return t}}function tb(t,e){if(t=Nl(t),e=FN(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 eb(t)}function Rt(t,e,r){try{return tb(t,e)}catch{return t}}function rb(t,e){if(t=Nl(t),e=FN(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 eb(t)}function _t(t,e,r){try{return rb(t,e)}catch{return t}}function hse(t,e=.15){return zj(t)>.5?tb(t,e):rb(t,e)}function fg(t,e,r){try{return hse(t,e)}catch{return t}}const fse=E.createContext(void 0);function pse(t){const{theme:e,name:r,props:a}=t;if(!e||!e.components||!e.components[r])return a;const n=e.components[r];return n.defaultProps?Lj(n.defaultProps,a,e.components.mergeClassNameAndStyle):!n.styleOverrides&&!n.variants?Lj(n,a,e.components.mergeClassNameAndStyle):a}function mse({props:t,name:e}){const r=E.useContext(fse);return pse({props:t,name:e,theme:{components:r}})}const TT={theme:void 0};function gse(t){let e,r;return function(n){let i=e;return(i===void 0||n.theme!==r)&&(TT.theme=n.theme,i=YL(t(TT)),e=i,r=n.theme),i}}function xse(t=""){function e(...a){if(!a.length)return"";const n=a[0];return typeof n=="string"&&!n.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}-`:""}${n}${e(...a.slice(1))})`:`, ${n}`}return(a,...n)=>`var(--${t?`${t}-`:""}${a}${e(...n)})`}const MT=(t,e,r,a=[])=>{let n=t;e.forEach((i,l)=>{l===e.length-1?Array.isArray(n)?n[Number(i)]=r:n&&typeof n=="object"&&(n[i]=r):n&&typeof n=="object"&&(n[i]||(n[i]=a.includes(i)?[]:{}),n=n[i])})},bse=(t,e,r)=>{function a(n,i=[],l=[]){Object.entries(n).forEach(([o,c])=>{(!r||r&&!r([...i,o]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?a(c,[...i,o],Array.isArray(c)?[...l,o]:l):e([...i,o],c,l))})}a(t)},yse=(t,e)=>typeof e=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(a=>t.includes(a))||t[t.length-1].toLowerCase().includes("opacity")?e:`${e}px`:e;function J1(t,e){const{prefix:r,shouldSkipGeneratingVar:a}=e||{},n={},i={},l={};return bse(t,(o,c,d)=>{if((typeof c=="string"||typeof c=="number")&&(!a||!a(o,c))){const h=`--${r?`${r}-`:""}${o.join("-")}`,p=yse(o,c);Object.assign(n,{[h]:p}),MT(i,o,`var(${h})`,d),MT(l,o,`var(${h}, ${p})`,d)}},o=>o[0]==="vars"),{css:n,vars:i,varsWithDefaults:l}}function vse(t,e={}){const{getSelector:r=v,disableCssColorScheme:a,colorSchemeSelector:n}=e,{colorSchemes:i={},components:l,defaultColorScheme:o="light",...c}=t,{vars:d,css:h,varsWithDefaults:p}=J1(c,e);let m=p;const x={},{[o]:b,...y}=i;if(Object.entries(y||{}).forEach(([S,k])=>{const{vars:A,css:T,varsWithDefaults:M}=J1(k,e);m=ln(m,M),x[S]={css:T,vars:A}}),b){const{css:S,vars:k,varsWithDefaults:A}=J1(b,e);m=ln(m,A),x[o]={css:S,vars:k}}function v(S,k){let A=n;if(n==="class"&&(A=".%s"),n==="data"&&(A="[data-%s]"),n?.startsWith("data-")&&!n.includes("%s")&&(A=`[${n}="%s"]`),S){if(A==="media")return t.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${i[S]?.palette?.mode||S})`]:{":root":k}};if(A)return t.defaultColorScheme===S?`:root, ${A.replace("%s",String(S))}`:A.replace("%s",String(S))}return":root"}return{vars:m,generateThemeVars:()=>{let S={...d};return Object.entries(x).forEach(([,{vars:k}])=>{S=ln(S,k)}),S},generateStyleSheets:()=>{const S=[],k=t.defaultColorScheme||"light";function A(O,_){Object.keys(_).length&&S.push(typeof O=="string"?{[O]:{..._}}:O)}A(r(void 0,{...h}),h);const{[k]:T,...M}=x;if(T){const{css:O}=T,_=i[k]?.palette?.mode,R=!a&&_?{colorScheme:_,...O}:{...O};A(r(k,{...R}),R)}return Object.entries(M).forEach(([O,{css:_}])=>{const R=i[O]?.palette?.mode,L=!a&&R?{colorScheme:R,..._}:{..._};A(r(O,{...L}),L)}),S}}}function wse(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 op(t,e,r=void 0){const a={};for(const n in t){const i=t[n];let l="",o=!0;for(let c=0;c<i.length;c+=1){const d=i[c];d&&(l+=(o===!0?"":" ")+e(d),o=!1,r&&r[d]&&(l+=" "+r[d]))}a[n]=l}return a}const Cf={black:"#000",white:"#fff"},jse={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"},Zc={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Qc={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},bh={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Jc={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},ed={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},td={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function XL(){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:Cf.white,default:Cf.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 Nse=XL();function VL(){return{text:{primary:Cf.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:Cf.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 ET=VL();function PT(t,e,r,a){const n=a.light||a,i=a.dark||a*1.5;t[e]||(t.hasOwnProperty(r)?t[e]=t[r]:e==="light"?t.light=rb(t.main,n):e==="dark"&&(t.dark=tb(t.main,i)))}function Sse(t="light"){return t==="dark"?{main:Jc[200],light:Jc[50],dark:Jc[400]}:{main:Jc[700],light:Jc[400],dark:Jc[800]}}function Cse(t="light"){return t==="dark"?{main:Zc[200],light:Zc[50],dark:Zc[400]}:{main:Zc[500],light:Zc[300],dark:Zc[700]}}function Ase(t="light"){return t==="dark"?{main:Qc[500],light:Qc[300],dark:Qc[700]}:{main:Qc[700],light:Qc[400],dark:Qc[800]}}function kse(t="light"){return t==="dark"?{main:ed[400],light:ed[300],dark:ed[700]}:{main:ed[700],light:ed[500],dark:ed[900]}}function Dse(t="light"){return t==="dark"?{main:td[400],light:td[300],dark:td[700]}:{main:td[800],light:td[500],dark:td[900]}}function Tse(t="light"){return t==="dark"?{main:bh[400],light:bh[300],dark:bh[700]}:{main:"#ed6c02",light:bh[500],dark:bh[900]}}function BN(t){const{mode:e="light",contrastThreshold:r=3,tonalOffset:a=.2,...n}=t,i=t.primary||Sse(e),l=t.secondary||Cse(e),o=t.error||Ase(e),c=t.info||kse(e),d=t.success||Dse(e),h=t.warning||Tse(e);function p(y){return use(y,ET.text.primary)>=r?ET.text.primary:Nse.text.primary}const m=({color:y,name:v,mainShade:N=500,lightShade:C=300,darkShade:S=700})=>{if(y={...y},!y.main&&y[N]&&(y.main=y[N]),!y.hasOwnProperty("main"))throw new Error(qo(11,v?` (${v})`:"",N));if(typeof y.main!="string")throw new Error(qo(12,v?` (${v})`:"",JSON.stringify(y.main)));return PT(y,"light",C,a),PT(y,"dark",S,a),y.contrastText||(y.contrastText=p(y.main)),y};let x;return e==="light"?x=XL():e==="dark"&&(x=VL()),ln({common:{...Cf},mode:e,primary:m({color:i,name:"primary"}),secondary:m({color:l,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:m({color:o,name:"error"}),warning:m({color:h,name:"warning"}),info:m({color:c,name:"info"}),success:m({color:d,name:"success"}),grey:jse,contrastThreshold:r,getContrastText:p,augmentColor:m,tonalOffset:a,...x},n)}function Mse(t){const e={};return Object.entries(t).forEach(a=>{const[n,i]=a;typeof i=="object"&&(e[n]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),e}function Ese(t,e){return{toolbar:{minHeight:56,[t.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[t.up("sm")]:{minHeight:64}},...e}}function Pse(t){return Math.round(t*1e5)/1e5}const OT={textTransform:"uppercase"},RT='"Roboto", "Helvetica", "Arial", sans-serif';function Ose(t,e){const{fontFamily:r=RT,fontSize:a=14,fontWeightLight:n=300,fontWeightRegular:i=400,fontWeightMedium:l=500,fontWeightBold:o=700,htmlFontSize:c=16,allVariants:d,pxToRem:h,...p}=typeof e=="function"?e(t):e,m=a/14,x=h||(v=>`${v/c*m}rem`),b=(v,N,C,S,k)=>({fontFamily:r,fontWeight:v,fontSize:x(N),lineHeight:C,...r===RT?{letterSpacing:`${Pse(S/N)}em`}:{},...k,...d}),y={h1:b(n,96,1.167,-1.5),h2:b(n,60,1.2,-.5),h3:b(i,48,1.167,0),h4:b(i,34,1.235,.25),h5:b(i,24,1.334,0),h6:b(l,20,1.6,.15),subtitle1:b(i,16,1.75,.15),subtitle2:b(l,14,1.57,.1),body1:b(i,16,1.5,.15),body2:b(i,14,1.43,.15),button:b(l,14,1.75,.4,OT),caption:b(i,12,1.66,.4),overline:b(i,12,2.66,1,OT),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return ln({htmlFontSize:c,pxToRem:x,fontFamily:r,fontSize:a,fontWeightLight:n,fontWeightRegular:i,fontWeightMedium:l,fontWeightBold:o,...y},p,{clone:!1})}const Rse=.2,_se=.14,Lse=.12;function Vt(...t){return[`${t[0]}px ${t[1]}px ${t[2]}px ${t[3]}px rgba(0,0,0,${Rse})`,`${t[4]}px ${t[5]}px ${t[6]}px ${t[7]}px rgba(0,0,0,${_se})`,`${t[8]}px ${t[9]}px ${t[10]}px ${t[11]}px rgba(0,0,0,${Lse})`].join(",")}const zse=["none",Vt(0,2,1,-1,0,1,1,0,0,1,3,0),Vt(0,3,1,-2,0,2,2,0,0,1,5,0),Vt(0,3,3,-2,0,3,4,0,0,1,8,0),Vt(0,2,4,-1,0,4,5,0,0,1,10,0),Vt(0,3,5,-1,0,5,8,0,0,1,14,0),Vt(0,3,5,-1,0,6,10,0,0,1,18,0),Vt(0,4,5,-2,0,7,10,1,0,2,16,1),Vt(0,5,5,-3,0,8,10,1,0,3,14,2),Vt(0,5,6,-3,0,9,12,1,0,3,16,2),Vt(0,6,6,-3,0,10,14,1,0,4,18,3),Vt(0,6,7,-4,0,11,15,1,0,4,20,3),Vt(0,7,8,-4,0,12,17,2,0,5,22,4),Vt(0,7,8,-4,0,13,19,2,0,5,24,4),Vt(0,7,9,-4,0,14,21,2,0,5,26,4),Vt(0,8,9,-5,0,15,22,2,0,6,28,5),Vt(0,8,10,-5,0,16,24,2,0,6,30,5),Vt(0,8,11,-5,0,17,26,2,0,6,32,5),Vt(0,9,11,-5,0,18,28,2,0,7,34,6),Vt(0,9,12,-6,0,19,29,2,0,7,36,6),Vt(0,10,13,-6,0,20,31,3,0,8,38,7),Vt(0,10,13,-6,0,21,33,3,0,8,40,7),Vt(0,10,14,-6,0,22,35,3,0,8,42,7),Vt(0,11,14,-7,0,23,36,3,0,9,44,8),Vt(0,11,15,-7,0,24,38,3,0,9,46,8)],Ise={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)"},Fse={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function _T(t){return`${Math.round(t)}ms`}function Bse(t){if(!t)return 0;const e=t/36;return Math.min(Math.round((4+15*e**.25+e/5)*10),3e3)}function Hse(t){const e={...Ise,...t.easing},r={...Fse,...t.duration};return{getAutoHeightDuration:Bse,create:(n=["all"],i={})=>{const{duration:l=r.standard,easing:o=e.easeInOut,delay:c=0,...d}=i;return(Array.isArray(n)?n:[n]).map(h=>`${h} ${typeof l=="string"?l:_T(l)} ${o} ${typeof c=="string"?c:_T(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 Yse(t){return Cs(t)||typeof t>"u"||typeof t=="string"||typeof t=="boolean"||typeof t=="number"||Array.isArray(t)}function qL(t={}){const e={...t};function r(a){const n=Object.entries(a);for(let i=0;i<n.length;i++){const[l,o]=n[i];!Yse(o)||l.startsWith("unstable_")?delete a[l]:Cs(o)&&(a[l]={...o},r(a[l]))}}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 Fj(t={},...e){const{breakpoints:r,mixins:a={},spacing:n,palette:i={},transitions:l={},typography:o={},shape:c,...d}=t;if(t.vars&&t.generateThemeVars===void 0)throw new Error(qo(20));const h=BN(i),p=HL(t);let m=ln(p,{mixins:Ese(p.breakpoints,a),palette:h,shadows:zse.slice(),typography:Ose(h,o),transitions:Hse(l),zIndex:{...$se}});return m=ln(m,d),m=e.reduce((x,b)=>ln(x,b),m),m.unstable_sxConfig={...lp,...d?.unstable_sxConfig},m.unstable_sx=function(b){return Cd({sx:b,theme:this})},m.toRuntimeSource=qL,m}function Use(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 Wse=[...Array(25)].map((t,e)=>{if(e===0)return"none";const r=Use(e);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function GL(t){return{inputPlaceholder:t==="dark"?.5:.42,inputUnderline:t==="dark"?.7:.42,switchTrackDisabled:t==="dark"?.2:.12,switchTrack:t==="dark"?.3:.38}}function KL(t){return t==="dark"?Wse:[]}function Xse(t){const{palette:e={mode:"light"},opacity:r,overlays:a,...n}=t,i=BN(e);return{palette:i,opacity:{...GL(i.mode),...r},overlays:a||KL(i.mode),...n}}function Vse(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 qse=t=>[...[...Array(25)].map((e,r)=>`--${t?`${t}-`:""}overlays-${r}`),`--${t?`${t}-`:""}palette-AppBar-darkBg`,`--${t?`${t}-`:""}palette-AppBar-darkColor`],Gse=t=>(e,r)=>{const a=t.rootSelector||":root",n=t.colorSchemeSelector;let i=n;if(n==="class"&&(i=".%s"),n==="data"&&(i="[data-%s]"),n?.startsWith("data-")&&!n.includes("%s")&&(i=`[${n}="%s"]`),t.defaultColorScheme===e){if(e==="dark"){const l={};return qse(t.cssVarPrefix).forEach(o=>{l[o]=r[o],delete r[o]}),i==="media"?{[a]:r,"@media (prefers-color-scheme: dark)":{[a]:l}}:i?{[i.replace("%s",e)]:l,[`${a}, ${i.replace("%s",e)}`]:r}:{[a]:{...r,...l}}}if(i&&i!=="media")return`${a}, ${i.replace("%s",String(e))}`}else if(e){if(i==="media")return{[`@media (prefers-color-scheme: ${String(e)})`]:{[a]:r}};if(i)return i.replace("%s",String(e))}return a};function Kse(t,e){e.forEach(r=>{t[r]||(t[r]={})})}function he(t,e,r){!t[e]&&r&&(t[e]=r)}function Rh(t){return typeof t!="string"||!t.startsWith("hsl")?t:WL(t)}function ri(t,e){`${e}Channel`in t||(t[`${e}Channel`]=Oh(Rh(t[e])))}function Zse(t){return typeof t=="number"?`${t}px`:typeof t=="string"||typeof t=="function"||Array.isArray(t)?t:"8px"}const ys=t=>{try{return t()}catch{}},Qse=(t="mui")=>xse(t);function e2(t,e,r,a){if(!e)return;e=e===!0?{}:e;const n=a==="dark"?"dark":"light";if(!r){t[a]=Xse({...e,palette:{mode:n,...e?.palette}});return}const{palette:i,...l}=Fj({...r,palette:{mode:n,...e?.palette}});return t[a]={...e,palette:i,opacity:{...GL(n),...e?.opacity},overlays:e?.overlays||KL(n)},l}function Jse(t={},...e){const{colorSchemes:r={light:!0},defaultColorScheme:a,disableCssColorScheme:n=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:l=Vse,colorSchemeSelector:o=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...d}=t,h=Object.keys(r)[0],p=a||(r.light&&h!=="light"?"light":h),m=Qse(i),{[p]:x,light:b,dark:y,...v}=r,N={...v};let C=x;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(C=!0),!C)throw new Error(qo(21,p));const S=e2(N,C,d,p);b&&!N.light&&e2(N,b,void 0,"light"),y&&!N.dark&&e2(N,y,void 0,"dark");let k={defaultColorScheme:p,...S,cssVarPrefix:i,colorSchemeSelector:o,rootSelector:c,getCssVar:m,colorSchemes:N,font:{...Mse(S.typography),...S.font},spacing:Zse(d.spacing)};Object.keys(k.colorSchemes).forEach(_=>{const R=k.colorSchemes[_].palette,L=z=>{const F=z.split("-"),Y=F[1],X=F[2];return m(z,R[Y][X])};if(R.mode==="light"&&(he(R.common,"background","#fff"),he(R.common,"onBackground","#000")),R.mode==="dark"&&(he(R.common,"background","#000"),he(R.common,"onBackground","#fff")),Kse(R,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),R.mode==="light"){he(R.Alert,"errorColor",Rt(R.error.light,.6)),he(R.Alert,"infoColor",Rt(R.info.light,.6)),he(R.Alert,"successColor",Rt(R.success.light,.6)),he(R.Alert,"warningColor",Rt(R.warning.light,.6)),he(R.Alert,"errorFilledBg",L("palette-error-main")),he(R.Alert,"infoFilledBg",L("palette-info-main")),he(R.Alert,"successFilledBg",L("palette-success-main")),he(R.Alert,"warningFilledBg",L("palette-warning-main")),he(R.Alert,"errorFilledColor",ys(()=>R.getContrastText(R.error.main))),he(R.Alert,"infoFilledColor",ys(()=>R.getContrastText(R.info.main))),he(R.Alert,"successFilledColor",ys(()=>R.getContrastText(R.success.main))),he(R.Alert,"warningFilledColor",ys(()=>R.getContrastText(R.warning.main))),he(R.Alert,"errorStandardBg",_t(R.error.light,.9)),he(R.Alert,"infoStandardBg",_t(R.info.light,.9)),he(R.Alert,"successStandardBg",_t(R.success.light,.9)),he(R.Alert,"warningStandardBg",_t(R.warning.light,.9)),he(R.Alert,"errorIconColor",L("palette-error-main")),he(R.Alert,"infoIconColor",L("palette-info-main")),he(R.Alert,"successIconColor",L("palette-success-main")),he(R.Alert,"warningIconColor",L("palette-warning-main")),he(R.AppBar,"defaultBg",L("palette-grey-100")),he(R.Avatar,"defaultBg",L("palette-grey-400")),he(R.Button,"inheritContainedBg",L("palette-grey-300")),he(R.Button,"inheritContainedHoverBg",L("palette-grey-A100")),he(R.Chip,"defaultBorder",L("palette-grey-400")),he(R.Chip,"defaultAvatarColor",L("palette-grey-700")),he(R.Chip,"defaultIconColor",L("palette-grey-700")),he(R.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),he(R.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),he(R.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),he(R.LinearProgress,"primaryBg",_t(R.primary.main,.62)),he(R.LinearProgress,"secondaryBg",_t(R.secondary.main,.62)),he(R.LinearProgress,"errorBg",_t(R.error.main,.62)),he(R.LinearProgress,"infoBg",_t(R.info.main,.62)),he(R.LinearProgress,"successBg",_t(R.success.main,.62)),he(R.LinearProgress,"warningBg",_t(R.warning.main,.62)),he(R.Skeleton,"bg",`rgba(${L("palette-text-primaryChannel")} / 0.11)`),he(R.Slider,"primaryTrack",_t(R.primary.main,.62)),he(R.Slider,"secondaryTrack",_t(R.secondary.main,.62)),he(R.Slider,"errorTrack",_t(R.error.main,.62)),he(R.Slider,"infoTrack",_t(R.info.main,.62)),he(R.Slider,"successTrack",_t(R.success.main,.62)),he(R.Slider,"warningTrack",_t(R.warning.main,.62));const z=fg(R.background.default,.8);he(R.SnackbarContent,"bg",z),he(R.SnackbarContent,"color",ys(()=>R.getContrastText(z))),he(R.SpeedDialAction,"fabHoverBg",fg(R.background.paper,.15)),he(R.StepConnector,"border",L("palette-grey-400")),he(R.StepContent,"border",L("palette-grey-400")),he(R.Switch,"defaultColor",L("palette-common-white")),he(R.Switch,"defaultDisabledColor",L("palette-grey-100")),he(R.Switch,"primaryDisabledColor",_t(R.primary.main,.62)),he(R.Switch,"secondaryDisabledColor",_t(R.secondary.main,.62)),he(R.Switch,"errorDisabledColor",_t(R.error.main,.62)),he(R.Switch,"infoDisabledColor",_t(R.info.main,.62)),he(R.Switch,"successDisabledColor",_t(R.success.main,.62)),he(R.Switch,"warningDisabledColor",_t(R.warning.main,.62)),he(R.TableCell,"border",_t(hg(R.divider,1),.88)),he(R.Tooltip,"bg",hg(R.grey[700],.92))}if(R.mode==="dark"){he(R.Alert,"errorColor",_t(R.error.light,.6)),he(R.Alert,"infoColor",_t(R.info.light,.6)),he(R.Alert,"successColor",_t(R.success.light,.6)),he(R.Alert,"warningColor",_t(R.warning.light,.6)),he(R.Alert,"errorFilledBg",L("palette-error-dark")),he(R.Alert,"infoFilledBg",L("palette-info-dark")),he(R.Alert,"successFilledBg",L("palette-success-dark")),he(R.Alert,"warningFilledBg",L("palette-warning-dark")),he(R.Alert,"errorFilledColor",ys(()=>R.getContrastText(R.error.dark))),he(R.Alert,"infoFilledColor",ys(()=>R.getContrastText(R.info.dark))),he(R.Alert,"successFilledColor",ys(()=>R.getContrastText(R.success.dark))),he(R.Alert,"warningFilledColor",ys(()=>R.getContrastText(R.warning.dark))),he(R.Alert,"errorStandardBg",Rt(R.error.light,.9)),he(R.Alert,"infoStandardBg",Rt(R.info.light,.9)),he(R.Alert,"successStandardBg",Rt(R.success.light,.9)),he(R.Alert,"warningStandardBg",Rt(R.warning.light,.9)),he(R.Alert,"errorIconColor",L("palette-error-main")),he(R.Alert,"infoIconColor",L("palette-info-main")),he(R.Alert,"successIconColor",L("palette-success-main")),he(R.Alert,"warningIconColor",L("palette-warning-main")),he(R.AppBar,"defaultBg",L("palette-grey-900")),he(R.AppBar,"darkBg",L("palette-background-paper")),he(R.AppBar,"darkColor",L("palette-text-primary")),he(R.Avatar,"defaultBg",L("palette-grey-600")),he(R.Button,"inheritContainedBg",L("palette-grey-800")),he(R.Button,"inheritContainedHoverBg",L("palette-grey-700")),he(R.Chip,"defaultBorder",L("palette-grey-700")),he(R.Chip,"defaultAvatarColor",L("palette-grey-300")),he(R.Chip,"defaultIconColor",L("palette-grey-300")),he(R.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),he(R.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),he(R.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),he(R.LinearProgress,"primaryBg",Rt(R.primary.main,.5)),he(R.LinearProgress,"secondaryBg",Rt(R.secondary.main,.5)),he(R.LinearProgress,"errorBg",Rt(R.error.main,.5)),he(R.LinearProgress,"infoBg",Rt(R.info.main,.5)),he(R.LinearProgress,"successBg",Rt(R.success.main,.5)),he(R.LinearProgress,"warningBg",Rt(R.warning.main,.5)),he(R.Skeleton,"bg",`rgba(${L("palette-text-primaryChannel")} / 0.13)`),he(R.Slider,"primaryTrack",Rt(R.primary.main,.5)),he(R.Slider,"secondaryTrack",Rt(R.secondary.main,.5)),he(R.Slider,"errorTrack",Rt(R.error.main,.5)),he(R.Slider,"infoTrack",Rt(R.info.main,.5)),he(R.Slider,"successTrack",Rt(R.success.main,.5)),he(R.Slider,"warningTrack",Rt(R.warning.main,.5));const z=fg(R.background.default,.98);he(R.SnackbarContent,"bg",z),he(R.SnackbarContent,"color",ys(()=>R.getContrastText(z))),he(R.SpeedDialAction,"fabHoverBg",fg(R.background.paper,.15)),he(R.StepConnector,"border",L("palette-grey-600")),he(R.StepContent,"border",L("palette-grey-600")),he(R.Switch,"defaultColor",L("palette-grey-300")),he(R.Switch,"defaultDisabledColor",L("palette-grey-600")),he(R.Switch,"primaryDisabledColor",Rt(R.primary.main,.55)),he(R.Switch,"secondaryDisabledColor",Rt(R.secondary.main,.55)),he(R.Switch,"errorDisabledColor",Rt(R.error.main,.55)),he(R.Switch,"infoDisabledColor",Rt(R.info.main,.55)),he(R.Switch,"successDisabledColor",Rt(R.success.main,.55)),he(R.Switch,"warningDisabledColor",Rt(R.warning.main,.55)),he(R.TableCell,"border",Rt(hg(R.divider,1),.68)),he(R.Tooltip,"bg",hg(R.grey[700],.92))}ri(R.background,"default"),ri(R.background,"paper"),ri(R.common,"background"),ri(R.common,"onBackground"),ri(R,"divider"),Object.keys(R).forEach(z=>{const F=R[z];z!=="tonalOffset"&&F&&typeof F=="object"&&(F.main&&he(R[z],"mainChannel",Oh(Rh(F.main))),F.light&&he(R[z],"lightChannel",Oh(Rh(F.light))),F.dark&&he(R[z],"darkChannel",Oh(Rh(F.dark))),F.contrastText&&he(R[z],"contrastTextChannel",Oh(Rh(F.contrastText))),z==="text"&&(ri(R[z],"primary"),ri(R[z],"secondary")),z==="action"&&(F.active&&ri(R[z],"active"),F.selected&&ri(R[z],"selected")))})}),k=e.reduce((_,R)=>ln(_,R),k);const A={prefix:i,disableCssColorScheme:n,shouldSkipGeneratingVar:l,getSelector:Gse(k)},{vars:T,generateThemeVars:M,generateStyleSheets:O}=vse(k,A);return k.vars=T,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([_,R])=>{k[_]=R}),k.generateThemeVars=M,k.generateStyleSheets=O,k.generateSpacing=function(){return BL(d.spacing,zN(this))},k.getColorSchemeSelector=wse(o),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=l,k.unstable_sxConfig={...lp,...d?.unstable_sxConfig},k.unstable_sx=function(R){return Cd({sx:R,theme:this})},k.toRuntimeSource=qL,k}function LT(t,e,r){t.colorSchemes&&r&&(t.colorSchemes[e]={...r!==!0&&r,palette:BN({...r===!0?{}:r.palette,mode:e})})}function eie(t={},...e){const{palette:r,cssVariables:a=!1,colorSchemes:n=r?void 0:{light:!0},defaultColorScheme:i=r?.mode,...l}=t,o=i||"light",c=n?.[o],d={...n,...r?{[o]:{...typeof c!="boolean"&&c,palette:r}}:void 0};if(a===!1){if(!("colorSchemes"in t))return Fj(t,...e);let h=r;"palette"in t||d[o]&&(d[o]!==!0?h=d[o].palette:o==="dark"&&(h={mode:"dark"}));const p=Fj({...t,palette:h},...e);return p.defaultColorScheme=o,p.colorSchemes=d,p.palette.mode==="light"&&(p.colorSchemes.light={...d.light!==!0&&d.light,palette:p.palette},LT(p,"dark",d.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:p.palette},LT(p,"light",d.light)),p}return!r&&!("light"in d)&&o==="light"&&(d.light=!0),Jse({...l,colorSchemes:d,defaultColorScheme:o,...typeof a!="boolean"&&a},...e)}const tie=eie();function rie(t){return t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"}const ZL=t=>rie(t)&&t!=="classes",fn=rse({themeId:Qre,defaultTheme:tie,rootShouldForwardProp:ZL});function aie(t){return typeof t.main=="string"}function nie(t,e=[]){if(!aie(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&&nie(e,t)}function sie(){return Gne}function iie(t){const{controlled:e,default:r}=t,{current:a}=E.useRef(e!==void 0),[n,i]=E.useState(r),l=a?e:n,o=E.useCallback(c=>{a||i(c)},[]);return[l,o]}const lie=E.createContext(void 0);function JL(){return E.useContext(lie)}function zT(t){try{return t.matches(":focus-visible")}catch{}return!1}function cp(t){return mse(t)}function Bj(...t){const e=E.useRef(void 0),r=E.useCallback(a=>{const n=t.map(i=>{if(i==null)return null;if(typeof i=="function"){const l=i,o=l(a);return typeof o=="function"?o:()=>{l(null)}}return i.current=a,()=>{i.current=null}});return()=>{n.forEach(i=>i?.())}},t);return E.useMemo(()=>t.every(a=>a==null)?null:a=>{e.current&&(e.current(),e.current=void 0),a!=null&&(e.current=r(a))},t)}function ex(t){const e=E.useRef(t);return lse(()=>{e.current=t}),E.useRef((...r)=>(0,e.current)(...r)).current}const IT={};function e9(t,e){const r=E.useRef(IT);return r.current===IT&&(r.current=t(e)),r}class Lx{static create(){return new Lx}static use(){const e=e9(Lx.create).current,[r,a]=E.useState(!1);return e.shouldMount=r,e.setShouldMount=a,E.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=cie(),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 oie(){return Lx.use()}function cie(){let t,e;const r=new Promise((a,n)=>{t=a,e=n});return r.resolve=t,r.reject=e,r}function die(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function Hj(t,e){return Hj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Hj(t,e)}function uie(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Hj(t,e)}const FT=qe.createContext(null);function hie(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function HN(t,e){var r=function(i){return e&&E.isValidElement(i)?e(i):i},a=Object.create(null);return t&&E.Children.map(t,function(n){return n}).forEach(function(n){a[n.key]=r(n)}),a}function fie(t,e){t=t||{},e=e||{};function r(h){return h in e?e[h]:t[h]}var a=Object.create(null),n=[];for(var i in t)i in e?n.length&&(a[i]=n,n=[]):n.push(i);var l,o={};for(var c in e){if(a[c])for(l=0;l<a[c].length;l++){var d=a[c][l];o[a[c][l]]=r(d)}o[c]=r(c)}for(l=0;l<n.length;l++)o[n[l]]=r(n[l]);return o}function Co(t,e,r){return r[e]!=null?r[e]:t.props[e]}function pie(t,e){return HN(t.children,function(r){return E.cloneElement(r,{onExited:e.bind(null,r),in:!0,appear:Co(r,"appear",t),enter:Co(r,"enter",t),exit:Co(r,"exit",t)})})}function mie(t,e,r){var a=HN(t.children),n=fie(e,a);return Object.keys(n).forEach(function(i){var l=n[i];if(E.isValidElement(l)){var o=i in e,c=i in a,d=e[i],h=E.isValidElement(d)&&!d.props.in;c&&(!o||h)?n[i]=E.cloneElement(l,{onExited:r.bind(null,l),in:!0,exit:Co(l,"exit",t),enter:Co(l,"enter",t)}):!c&&o&&!h?n[i]=E.cloneElement(l,{in:!1}):c&&o&&E.isValidElement(d)&&(n[i]=E.cloneElement(l,{onExited:r.bind(null,l),in:d.props.in,exit:Co(l,"exit",t),enter:Co(l,"enter",t)}))}}),n}var gie=Object.values||function(t){return Object.keys(t).map(function(e){return t[e]})},xie={component:"div",childFactory:function(e){return e}},$N=function(t){uie(e,t);function e(a,n){var i;i=t.call(this,a,n)||this;var l=i.handleExited.bind(hie(i));return i.state={contextValue:{isMounting:!0},handleExited:l,firstRender:!0},i}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(n,i){var l=i.children,o=i.handleExited,c=i.firstRender;return{children:c?pie(n,o):mie(n,l,o),firstRender:!1}},r.handleExited=function(n,i){var l=HN(this.props.children);n.key in l||(n.props.onExited&&n.props.onExited(i),this.mounted&&this.setState(function(o){var c=Ox({},o.children);return delete c[n.key],{children:c}}))},r.render=function(){var n=this.props,i=n.component,l=n.childFactory,o=die(n,["component","childFactory"]),c=this.state.contextValue,d=gie(this.state.children).map(l);return delete o.appear,delete o.enter,delete o.exit,i===null?qe.createElement(FT.Provider,{value:c},d):qe.createElement(FT.Provider,{value:c},qe.createElement(i,o,d))},e}(qe.Component);$N.propTypes={};$N.defaultProps=xie;const bie=[];function yie(t){E.useEffect(t,bie)}class YN{static create(){return new YN}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 vie(){const t=e9(YN.create).current;return yie(t.disposeEffect),t}function wie(t){const{className:e,classes:r,pulsate:a=!1,rippleX:n,rippleY:i,rippleSize:l,in:o,onExited:c,timeout:d}=t,[h,p]=E.useState(!1),m=Ke(e,r.ripple,r.rippleVisible,a&&r.ripplePulsate),x={width:l,height:l,top:-(l/2)+i,left:-(l/2)+n},b=Ke(r.child,h&&r.childLeaving,a&&r.childPulsate);return!o&&!h&&p(!0),E.useEffect(()=>{if(!o&&c!=null){const y=setTimeout(c,d);return()=>{clearTimeout(y)}}},[c,o,d]),s.jsx("span",{className:m,style:x,children:s.jsx("span",{className:b})})}const Mn=Zd("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),$j=550,jie=80,Nie=RN`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`,Sie=RN`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`,Cie=RN`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`,Aie=fn("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),kie=fn(wie,{name:"MuiTouchRipple",slot:"Ripple"})`
  opacity: 0;
  position: absolute;

  &.${Mn.rippleVisible} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${Nie};
    animation-duration: ${$j}ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
  }

  &.${Mn.ripplePulsate} {
    animation-duration: ${({theme:t})=>t.transitions.duration.shorter}ms;
  }

  & .${Mn.child} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${Mn.childLeaving} {
    opacity: 0;
    animation-name: ${Sie};
    animation-duration: ${$j}ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
  }

  & .${Mn.childPulsate} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${Cie};
    animation-duration: 2500ms;
    animation-timing-function: ${({theme:t})=>t.transitions.easing.easeInOut};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`,Die=E.forwardRef(function(e,r){const a=cp({props:e,name:"MuiTouchRipple"}),{center:n=!1,classes:i={},className:l,...o}=a,[c,d]=E.useState([]),h=E.useRef(0),p=E.useRef(null);E.useEffect(()=>{p.current&&(p.current(),p.current=null)},[c]);const m=E.useRef(!1),x=vie(),b=E.useRef(null),y=E.useRef(null),v=E.useCallback(k=>{const{pulsate:A,rippleX:T,rippleY:M,rippleSize:O,cb:_}=k;d(R=>[...R,s.jsx(kie,{classes:{ripple:Ke(i.ripple,Mn.ripple),rippleVisible:Ke(i.rippleVisible,Mn.rippleVisible),ripplePulsate:Ke(i.ripplePulsate,Mn.ripplePulsate),child:Ke(i.child,Mn.child),childLeaving:Ke(i.childLeaving,Mn.childLeaving),childPulsate:Ke(i.childPulsate,Mn.childPulsate)},timeout:$j,pulsate:A,rippleX:T,rippleY:M,rippleSize:O},h.current)]),h.current+=1,p.current=_},[i]),N=E.useCallback((k={},A={},T=()=>{})=>{const{pulsate:M=!1,center:O=n||A.pulsate,fakeElement:_=!1}=A;if(k?.type==="mousedown"&&m.current){m.current=!1;return}k?.type==="touchstart"&&(m.current=!0);const R=_?null:y.current,L=R?R.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,F,Y;if(O||k===void 0||k.clientX===0&&k.clientY===0||!k.clientX&&!k.touches)z=Math.round(L.width/2),F=Math.round(L.height/2);else{const{clientX:X,clientY:H}=k.touches&&k.touches.length>0?k.touches[0]:k;z=Math.round(X-L.left),F=Math.round(H-L.top)}if(O)Y=Math.sqrt((2*L.width**2+L.height**2)/3),Y%2===0&&(Y+=1);else{const X=Math.max(Math.abs((R?R.clientWidth:0)-z),z)*2+2,H=Math.max(Math.abs((R?R.clientHeight:0)-F),F)*2+2;Y=Math.sqrt(X**2+H**2)}k?.touches?b.current===null&&(b.current=()=>{v({pulsate:M,rippleX:z,rippleY:F,rippleSize:Y,cb:T})},x.start(jie,()=>{b.current&&(b.current(),b.current=null)})):v({pulsate:M,rippleX:z,rippleY:F,rippleSize:Y,cb:T})},[n,v,x]),C=E.useCallback(()=>{N({},{pulsate:!0})},[N]),S=E.useCallback((k,A)=>{if(x.clear(),k?.type==="touchend"&&b.current){b.current(),b.current=null,x.start(0,()=>{S(k,A)});return}b.current=null,d(T=>T.length>0?T.slice(1):T),p.current=A},[x]);return E.useImperativeHandle(r,()=>({pulsate:C,start:N,stop:S}),[C,N,S]),s.jsx(Aie,{className:Ke(Mn.root,i.root,l),ref:y,...o,children:s.jsx($N,{component:null,exit:!0,children:c})})});function Tie(t){return Kd("MuiButtonBase",t)}const Mie=Zd("MuiButtonBase",["root","disabled","focusVisible"]),Eie=t=>{const{disabled:e,focusVisible:r,focusVisibleClassName:a,classes:n}=t,l=op({root:["root",e&&"disabled",r&&"focusVisible"]},Tie,n);return r&&a&&(l.root+=` ${a}`),l},Pie=fn("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"},[`&.${Mie.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Oie=E.forwardRef(function(e,r){const a=cp({props:e,name:"MuiButtonBase"}),{action:n,centerRipple:i=!1,children:l,className:o,component:c="button",disabled:d=!1,disableRipple:h=!1,disableTouchRipple:p=!1,focusRipple:m=!1,focusVisibleClassName:x,LinkComponent:b="a",onBlur:y,onClick:v,onContextMenu:N,onDragLeave:C,onFocus:S,onFocusVisible:k,onKeyDown:A,onKeyUp:T,onMouseDown:M,onMouseLeave:O,onMouseUp:_,onTouchEnd:R,onTouchMove:L,onTouchStart:z,tabIndex:F=0,TouchRippleProps:Y,touchRippleRef:X,type:H,...W}=a,V=E.useRef(null),Z=oie(),B=Bj(Z.ref,X),[G,te]=E.useState(!1);d&&G&&te(!1),E.useImperativeHandle(n,()=>({focusVisible:()=>{te(!0),V.current.focus()}}),[]);const K=Z.shouldMount&&!h&&!d;E.useEffect(()=>{G&&m&&!h&&Z.pulsate()},[h,m,G,Z]);const U=ai(Z,"start",M,p),re=ai(Z,"stop",N,p),ne=ai(Z,"stop",C,p),we=ai(Z,"stop",_,p),ye=ai(Z,"stop",Xe=>{G&&Xe.preventDefault(),O&&O(Xe)},p),ue=ai(Z,"start",z,p),je=ai(Z,"stop",R,p),Te=ai(Z,"stop",L,p),pe=ai(Z,"stop",Xe=>{zT(Xe.target)||te(!1),y&&y(Xe)},!1),Ue=ex(Xe=>{V.current||(V.current=Xe.currentTarget),zT(Xe.target)&&(te(!0),k&&k(Xe)),S&&S(Xe)}),_e=()=>{const Xe=V.current;return c&&c!=="button"&&!(Xe.tagName==="A"&&Xe.href)},xt=ex(Xe=>{m&&!Xe.repeat&&G&&Xe.key===" "&&Z.stop(Xe,()=>{Z.start(Xe)}),Xe.target===Xe.currentTarget&&_e()&&Xe.key===" "&&Xe.preventDefault(),A&&A(Xe),Xe.target===Xe.currentTarget&&_e()&&Xe.key==="Enter"&&!d&&(Xe.preventDefault(),v&&v(Xe))}),Wt=ex(Xe=>{m&&Xe.key===" "&&G&&!Xe.defaultPrevented&&Z.stop(Xe,()=>{Z.pulsate(Xe)}),T&&T(Xe),v&&Xe.target===Xe.currentTarget&&_e()&&Xe.key===" "&&!Xe.defaultPrevented&&v(Xe)});let bt=c;bt==="button"&&(W.href||W.to)&&(bt=b);const va={};bt==="button"?(va.type=H===void 0?"button":H,va.disabled=d):(!W.href&&!W.to&&(va.role="button"),d&&(va["aria-disabled"]=d));const pn=Bj(r,V),Ht={...a,centerRipple:i,component:c,disabled:d,disableRipple:h,disableTouchRipple:p,focusRipple:m,tabIndex:F,focusVisible:G},Ha=Eie(Ht);return s.jsxs(Pie,{as:bt,className:Ke(Ha.root,o),ownerState:Ht,onBlur:pe,onClick:v,onContextMenu:re,onFocus:Ue,onKeyDown:xt,onKeyUp:Wt,onMouseDown:U,onMouseLeave:ye,onMouseUp:we,onDragLeave:ne,onTouchEnd:je,onTouchMove:Te,onTouchStart:ue,ref:pn,tabIndex:d?-1:F,type:H,...va,...W,children:[l,K?s.jsx(Die,{ref:B,center:i,...Y}):null]})});function ai(t,e,r,a=!1){return ex(n=>(r&&r(n),a||t[e](n),!0))}function Rie(t){return Kd("PrivateSwitchBase",t)}Zd("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);function _ie(t){return typeof t=="string"}function Lie(t,e,r){return t===void 0||_ie(t)?e:{...e,ownerState:{...e.ownerState,...r}}}function zie(t,e,r){return typeof t=="function"?t(e,r):t}function Iie(t,e=[]){if(t===void 0)return{};const r={};return Object.keys(t).filter(a=>a.match(/^on[A-Z]/)&&typeof t[a]=="function"&&!e.includes(a)).forEach(a=>{r[a]=t[a]}),r}function BT(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 Fie(t){const{getSlotProps:e,additionalProps:r,externalSlotProps:a,externalForwardedProps:n,className:i}=t;if(!e){const x=Ke(r?.className,i,n?.className,a?.className),b={...r?.style,...n?.style,...a?.style},y={...r,...n,...a};return x.length>0&&(y.className=x),Object.keys(b).length>0&&(y.style=b),{props:y,internalRef:void 0}}const l=Iie({...n,...a}),o=BT(a),c=BT(n),d=e(l),h=Ke(d?.className,r?.className,i,n?.className,a?.className),p={...d?.style,...r?.style,...n?.style,...a?.style},m={...d,...r,...c,...o};return h.length>0&&(m.className=h),Object.keys(p).length>0&&(m.style=p),{props:m,internalRef:d.ref}}function gd(t,e){const{className:r,elementType:a,ownerState:n,externalForwardedProps:i,internalForwardedProps:l,shouldForwardComponentProp:o=!1,...c}=e,{component:d,slots:h={[t]:void 0},slotProps:p={[t]:void 0},...m}=i,x=h[t]||a,b=zie(p[t],n),{props:{component:y,...v},internalRef:N}=Fie({className:r,...c,externalForwardedProps:t==="root"?m:void 0,externalSlotProps:b}),C=Bj(N,b?.ref,e.ref),S=t==="root"?y||d:y,k=Lie(x,{...t==="root"&&!d&&!h[t]&&l,...t!=="root"&&!h[t]&&l,...v,...S&&!o&&{as:S},...S&&o&&{component:S},ref:C},n);return[x,k]}const Bie=t=>{const{classes:e,checked:r,disabled:a,edge:n}=t,i={root:["root",r&&"checked",a&&"disabled",n&&`edge${za(n)}`],input:["input"]};return op(i,Rie,e)},Hie=fn(Oie,{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=fn("input",{name:"MuiSwitchBase",shouldForwardProp:ZL})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Yie=E.forwardRef(function(e,r){const{autoFocus:a,checked:n,checkedIcon:i,defaultChecked:l,disabled:o,disableFocusRipple:c=!1,edge:d=!1,icon:h,id:p,inputProps:m,inputRef:x,name:b,onBlur:y,onChange:v,onFocus:N,readOnly:C,required:S=!1,tabIndex:k,type:A,value:T,slots:M={},slotProps:O={},..._}=e,[R,L]=iie({controlled:n,default:!!l}),z=JL(),F=re=>{N&&N(re),z&&z.onFocus&&z.onFocus(re)},Y=re=>{y&&y(re),z&&z.onBlur&&z.onBlur(re)},X=re=>{if(re.nativeEvent.defaultPrevented)return;const ne=re.target.checked;L(ne),v&&v(re,ne)};let H=o;z&&typeof H>"u"&&(H=z.disabled);const W=A==="checkbox"||A==="radio",V={...e,checked:R,disabled:H,disableFocusRipple:c,edge:d},Z=Bie(V),B={slots:M,slotProps:{input:m,...O}},[G,te]=gd("root",{ref:r,elementType:Hie,className:Z.root,shouldForwardComponentProp:!0,externalForwardedProps:{...B,component:"span",..._},getSlotProps:re=>({...re,onFocus:ne=>{re.onFocus?.(ne),F(ne)},onBlur:ne=>{re.onBlur?.(ne),Y(ne)}}),ownerState:V,additionalProps:{centerRipple:!0,focusRipple:!c,disabled:H,role:void 0,tabIndex:null}}),[K,U]=gd("input",{ref:x,elementType:$ie,className:Z.input,externalForwardedProps:B,getSlotProps:re=>({...re,onChange:ne=>{re.onChange?.(ne),X(ne)}}),ownerState:V,additionalProps:{autoFocus:a,checked:n,defaultChecked:l,disabled:H,id:W?p:void 0,name:b,readOnly:C,required:S,tabIndex:k,type:A,...A==="checkbox"&&T===void 0?{}:{value:T}}});return s.jsxs(G,{...te,children:[s.jsx(K,{...U}),R?i:h]})}),Go=gse;function Uie(t){return Kd("MuiSwitch",t)}const ha=Zd("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),Wie=t=>{const{classes:e,edge:r,size:a,color:n,checked:i,disabled:l}=t,o={root:["root",r&&`edge${za(r)}`,`size${za(a)}`],switchBase:["switchBase",`color${za(n)}`,i&&"checked",l&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},c=op(o,Uie,e);return{...e,...c}},Xie=fn("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.root,r.edge&&e[`edge${za(r.edge)}`],e[`size${za(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,[`& .${ha.thumb}`]:{width:16,height:16},[`& .${ha.switchBase}`]:{padding:4,[`&.${ha.checked}`]:{transform:"translateX(16px)"}}}}]}),Vie=fn(Yie,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[e.switchBase,{[`& .${ha.input}`]:e.input},r.color!=="default"&&e[`color${za(r.color)}`]]}})(Go(({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}),[`&.${ha.checked}`]:{transform:"translateX(20px)"},[`&.${ha.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${ha.checked} + .${ha.track}`]:{opacity:.5},[`&.${ha.disabled} + .${ha.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${ha.input}`]:{left:"-100%",width:"300%"}})),Go(({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:Ij(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:{[`&.${ha.checked}`]:{color:(t.vars||t).palette[e].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:Ij(t.palette[e].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${ha.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${e}DisabledColor`]:`${t.palette.mode==="light"?rb(t.palette[e].main,.62):tb(t.palette[e].main,.55)}`}},[`&.${ha.checked} + .${ha.track}`]:{backgroundColor:(t.vars||t).palette[e].main}}}))]}))),qie=fn("span",{name:"MuiSwitch",slot:"Track"})(Go(({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}`}))),Gie=fn("span",{name:"MuiSwitch",slot:"Thumb"})(Go(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Kie=E.forwardRef(function(e,r){const a=cp({props:e,name:"MuiSwitch"}),{className:n,color:i="primary",edge:l=!1,size:o="medium",sx:c,slots:d={},slotProps:h={},...p}=a,m={...a,color:i,edge:l,size:o},x=Wie(m),b={slots:d,slotProps:h},[y,v]=gd("root",{className:Ke(x.root,n),elementType:Xie,externalForwardedProps:b,ownerState:m,additionalProps:{sx:c}}),[N,C]=gd("thumb",{className:x.thumb,elementType:Gie,externalForwardedProps:b,ownerState:m}),S=s.jsx(N,{...C}),[k,A]=gd("track",{className:x.track,elementType:qie,externalForwardedProps:b,ownerState:m});return s.jsxs(y,{...v,children:[s.jsx(Vie,{type:"checkbox",icon:S,checkedIcon:S,ref:r,ownerState:m,...p,classes:{...x,root:x.switchBase},slots:{...d.switchBase&&{root:d.switchBase},...d.input&&{input:d.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}}}),s.jsx(k,{...A})]})});function Zie(t){return Kd("MuiTypography",t)}Zd("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Qie={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Jie=sie(),ele=t=>{const{align:e,gutterBottom:r,noWrap:a,paragraph:n,variant:i,classes:l}=t,o={root:["root",i,t.align!=="inherit"&&`align${za(e)}`,r&&"gutterBottom",a&&"noWrap",n&&"paragraph"]};return op(o,Zie,l)},tle=fn("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${za(r.align)}`],r.noWrap&&e.noWrap,r.gutterBottom&&e.gutterBottom,r.paragraph&&e.paragraph]}})(Go(({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${za(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}}]}))),HT={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},$T=E.forwardRef(function(e,r){const{color:a,...n}=cp({props:e,name:"MuiTypography"}),i=!Qie[a],l=Jie({...n,...i&&{color:a}}),{align:o="inherit",className:c,component:d,gutterBottom:h=!1,noWrap:p=!1,paragraph:m=!1,variant:x="body1",variantMapping:b=HT,...y}=l,v={...l,align:o,color:a,className:c,component:d,gutterBottom:h,noWrap:p,paragraph:m,variant:x,variantMapping:b},N=d||(m?"p":b[x]||HT[x])||"span",C=ele(v);return s.jsx(tle,{as:N,ref:r,className:Ke(C.root,c),...y,ownerState:v,style:{...o!=="inherit"&&{"--Typography-textAlign":o},...y.style}})});function rle({props:t,states:e,muiFormControl:r}){return e.reduce((a,n)=>(a[n]=t[n],r&&typeof t[n]>"u"&&(a[n]=r[n]),a),{})}function ale(t){return Kd("MuiFormControlLabel",t)}const _h=Zd("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),nle=t=>{const{classes:e,disabled:r,labelPlacement:a,error:n,required:i}=t,l={root:["root",r&&"disabled",`labelPlacement${za(a)}`,n&&"error",i&&"required"],label:["label",r&&"disabled"],asterisk:["asterisk",n&&"error"]};return op(l,ale,e)},sle=fn("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:r}=t;return[{[`& .${_h.label}`]:e.label},e.root,e[`labelPlacement${za(r.labelPlacement)}`]]}})(Go(({theme:t})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${_h.disabled}`]:{cursor:"default"},[`& .${_h.label}`]:{[`&.${_h.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}}]}))),ile=fn("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Go(({theme:t})=>({[`&.${_h.error}`]:{color:(t.vars||t).palette.error.main}}))),YT=E.forwardRef(function(e,r){const a=cp({props:e,name:"MuiFormControlLabel"}),{checked:n,className:i,componentsProps:l={},control:o,disabled:c,disableTypography:d,inputRef:h,label:p,labelPlacement:m="end",name:x,onChange:b,required:y,slots:v={},slotProps:N={},value:C,...S}=a,k=JL(),A=c??o.props.disabled??k?.disabled,T=y??o.props.required,M={disabled:A,required:T};["checked","name","onChange","value","inputRef"].forEach(X=>{typeof o.props[X]>"u"&&typeof a[X]<"u"&&(M[X]=a[X])});const O=rle({props:a,muiFormControl:k,states:["error"]}),_={...a,disabled:A,labelPlacement:m,required:T,error:O.error},R=nle(_),L={slots:v,slotProps:{...l,...N}},[z,F]=gd("typography",{elementType:$T,externalForwardedProps:L,ownerState:_});let Y=p;return Y!=null&&Y.type!==$T&&!d&&(Y=s.jsx(z,{component:"span",...F,className:Ke(R.label,F?.className),children:Y})),s.jsxs(sle,{className:Ke(R.root,i),ownerState:_,ref:r,...S,children:[E.cloneElement(o,M),T?s.jsxs("div",{children:[Y,s.jsxs(ile,{ownerState:_,"aria-hidden":!0,className:R.asterisk,children:[" ","*"]})]}):Y]})}),UT=fn(Kie)(({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"}})),lle=()=>{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 s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1  overflow-hidden",children:[s.jsx(ic,{}),s.jsx("div",{className:"flex justify-end items-center pt-6  w-2/3",children:s.jsx("span",{className:"underline text-yellow-400 cursor-pointer",children:"Edit"})}),s.jsx("div",{className:"w-full max-w-7xl flex justify-center px-6  mb-8 relative",children:s.jsx("div",{className:"border border-yellow-500 rounded-xl  w-full max-w-3xl  p-6  mb-8 ",children:s.jsxs("div",{className:"",children:[s.jsx("span",{children:s.jsx("strong",{children:"Cancellation Abuse :"})}),s.jsxs("div",{className:"flex justify-between ",children:[s.jsxs("label",{className:"flex items-center gap-4 py-6",children:[s.jsx("input",{type:"checkbox",defaultChecked:!0,className:"accent-yellow-400",name:"cancelAbuse"}),"Freeze if cancels >3 in 24 hrs"]}),s.jsx(YT,{control:s.jsx(UT,{}),label:"On",className:"text-yellow-400"})]}),s.jsx("span",{className:"py-6",children:s.jsx("strong",{className:"py-6",children:"Suspicious Top-ups :"})}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("label",{className:"flex items-center gap-4 py-6",children:[s.jsx("input",{type:"checkbox",defaultChecked:!0,className:"accent-yellow-400",name:"cancelAbuse"}),"Freeze if same card used 3+ times in 1 day"]}),s.jsx(YT,{control:s.jsx(UT,{}),label:"On",className:"text-yellow-400"})]})]})})}),s.jsxs("div",{className:"mb-2 font-bold self-start flex justify-between gap-12",children:[s.jsx("h2",{className:"px-4 text-xl",children:"  Auto-Frozen Accounts Table:"}),s.jsxs("div",{className:"flex gap-2 items-center mr-4",children:[s.jsxs("span",{className:"float-right text-sm font-normal",children:["Sort By:",s.jsx("select",{name:"",id:"",className:"bg-[#013220] focus:outline-none bg-transparent",children:s.jsx("option",{value:"",children:" Reverification Needed Only Date"})})]}),s.jsx(q4,{}),s.jsx("span",{children:"Date"})]})]}),s.jsx("div",{className:"overflow-x-auto w-full max-w-5xl mx-auto",children:s.jsxs("table",{className:"min-w-full  border border-yellow-400 rounded text-left",children:[s.jsx("thead",{className:" text-yellow-300",children:s.jsxs("tr",{className:"border-b border-yellow-300 text-left",children:[s.jsx("th",{className:"p-3",children:"User Name"}),s.jsx("th",{className:"p-3",children:"Status"}),s.jsx("th",{className:"p-3",children:"Trigger Reason"}),s.jsx("th",{className:"p-3",children:"Reverify Needed"}),s.jsx("th",{className:"p-3",children:"Action"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{className:"",children:[s.jsx("td",{className:"p-3",children:e.username}),s.jsx("td",{className:"p-3",children:e.status}),s.jsx("td",{className:"p-3",children:r%2===0?"4 Cancels in 24h":"Reused Card ID across 2 accts"}),s.jsx("td",{className:"p-3",children:e.reverifyneeded}),s.jsx("td",{className:"p-3",children:s.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))})]})})]})]})},WT=[{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"}],ole=()=>{const[t,e]=E.useState(1),r=8,a=Math.ceil(WT.length/r),n=WT.slice((t-1)*r,t*r);return s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsx(ic,{}),s.jsx("div",{className:"min-h-screen px-8 py-10 font-sans",children:s.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6 flex-wrap gap-4",children:[s.jsx("p",{className:"font-semibold text-lg",children:"Main Table Layout:"}),s.jsxs("div",{className:"flex gap-4 items-center flex-wrap",children:[s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:"Amount Range"}),s.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"})]}),s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:"To"}),s.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"})]}),s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:"Date"}),s.jsx("input",{type:"date",className:"px-2 bg-transparent border border-yellow-300 rounded focus:outline-none focus:ring-1 focus:ring-yellow-400"})]})]})]}),s.jsx("div",{className:"overflow-x-auto rounded border border-yellow-400",children:s.jsxs("table",{className:"min-w-full text-left",children:[s.jsx("thead",{className:"",children:s.jsxs("tr",{children:[s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Type"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"User ID"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Amount"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Timestamp"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Notes"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Tags"}),s.jsx("th",{className:"py-2 px-4 border-b border-yellow-400",children:"Action"})]})}),s.jsx("tbody",{children:n.map((i,l)=>s.jsxs("tr",{children:[s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.type}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.Userid}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.amount}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400 whitespace-pre-line",children:i.timestamp}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400 whitespace-pre-line",children:i.notes}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:i.tags}),s.jsx("td",{className:"py-2 px-4 border-b border-yellow-400",children:s.jsx("button",{className:"bg-yellow-300 px-6 py-1 rounded-full text-black hover:bg-yellow-200",children:"Note"})})]},l))})]})}),s.jsxs("div",{className:"flex justify-center items-center mt-4 gap-2 text-yellow-300",children:[s.jsx("button",{onClick:()=>e(i=>Math.max(i-1,1)),className:"hover:underline disabled:opacity-50",disabled:t===1,children:"Previous"}),Array.from({length:a}).map((i,l)=>s.jsx("button",{onClick:()=>e(l+1),className:`w-8 h-8 rounded-full border border-yellow-400 text-center text-sm font-semibold ${t===l+1?"bg-yellow-400 text-black":""}`,children:l+1},l)),s.jsx("button",{onClick:()=>e(i=>Math.min(i+1,a)),className:"hover:underline disabled:opacity-50",disabled:t===a,children:"Next"})]})]})})]})]})},cle=()=>{const[t,e]=E.useState("general"),a={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 s.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(ic,{}),s.jsx("div",{className:"py-10",children:s.jsxs("h1",{className:"flex gap-2 items-center text-xl font-semibold pb-1 px-4",children:[s.jsx(dq,{})," ",a.length," Notifications"]})}),s.jsx("div",{className:"mb-6 px-4",children:s.jsxs("div",{className:"flex gap-8 text-sm font-semibold items-center border-b border-yellow-300 pb-2",children:[s.jsx("button",{onClick:()=>e("general"),className:`${t==="general"?"bg-yellow-400 text-black px-4 py-1 rounded":"hover:text-yellow-200"}`,children:"Critical"}),s.jsx("button",{onClick:()=>e("booking"),className:`${t==="booking"?"bg-yellow-400 text-black px-4 py-1 rounded":"hover:text-yellow-200"}`,children:"Warning"}),s.jsx("button",{onClick:()=>e("important"),className:`${t==="important"?"bg-yellow-400 text-black px-4 py-1 rounded":"hover:text-yellow-200"}`,children:"Info"})]})}),s.jsx("div",{className:"flex flex-col gap-4 px-6",children:a.length===0?s.jsx("div",{className:"text-sm text-center py-10",children:"No notifications found."}):a.map(n=>s.jsxs("div",{className:"bg-[#0A3A26] border border-[#3A4F3A] p-4 rounded-xl flex justify-between items-start",children:[s.jsxs("div",{className:"flex gap-4",children:[s.jsx("div",{className:"rounded-full border self-start  p-1 border-yellow-400 ",children:s.jsx(Rq,{size:30})}),s.jsxs("div",{className:"max-w-full",children:[s.jsx("p",{className:"font-semibold text-sm mb-1",children:n.message}),s.jsx("p",{className:"text-xs",children:n.detail}),s.jsxs("div",{className:"flex items-center text-xs mt-1",children:[s.jsx(NR,{className:"mr-1"}),n.time]})]})]}),s.jsx("button",{className:"text-yellow-400 relative text-sm whitespace-nowrap hover:underline",children:"Investigate"})]},n.id))})]})]})},pg=({title:t,amount:e,claimed:r,unclaimed:a})=>{const i=Math.round(r/100*10),l=10-i;return s.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:[s.jsx("h2",{className:"text-2xl font-bold mb-2",children:t}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs("p",{className:"text-lg font-semibold mb-4",children:["Amount: AED ",e.toLocaleString()]}),s.jsxs("div",{className:"flex flex-col text-medium mr-20",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"w-3 h-3 bg-green-400 rounded-full"}),s.jsx("span",{children:"Claimed"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"w-3 h-3 bg-yellow-400 rounded-full"}),s.jsx("span",{children:"Unclaimed"})]})]})]}),s.jsxs("div",{className:"space-y-1 font-semibold",children:[s.jsx("p",{className:"font-bold text-lg",children:"Status:"}),s.jsxs("div",{className:"flex justify-between  text-medium mr-20",children:[s.jsxs("div",{children:[s.jsxs("p",{className:"text-green-400",children:[r,"% Claimed"]}),s.jsxs("p",{className:"text-yellow-400",children:[a,"% Unclaimed"]})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx("p",{className:"text-sm font-semibold mb-1",children:"Progress Bar"}),s.jsxs("div",{className:"flex gap-1",children:[[...Array(i)].map((o,c)=>s.jsx("div",{className:"w-2 h-5 bg-green-400 rounded-sm"},`c-${c}`)),[...Array(l)].map((o,c)=>s.jsx("div",{className:"w-2 h-5 bg-yellow-400 rounded-sm"},`u-${c}`))]})]})]})]})]})},dle=()=>s.jsxs("div",{className:" min-h-screen py-10 space-y-10 px-4",children:[s.jsx("div",{className:"flex justify-end pr-8",children:s.jsxs("label",{className:"flex items-center text-yellow-400 font-medium",children:[s.jsx("span",{children:"Time:"}),s.jsxs("select",{className:"bg-transparent rounded focus:outline-none",children:[s.jsx("option",{children:"7 days"}),s.jsx("option",{children:"30 days"})]})]})}),s.jsx(pg,{title:"CRR Pool",amount:45e3,claimed:60,unclaimed:40}),s.jsx(pg,{title:"BBR Pool",amount:32750,claimed:75,unclaimed:25}),s.jsx(pg,{title:"Referral Pool",amount:32750,claimed:75,unclaimed:25}),s.jsx(pg,{title:"Loyalty Pool",amount:32750,claimed:30,unclaimed:75}),s.jsx("button",{className:"font-semibold block mx-auto bg-yellow-400 px-4 py-2 text-black rounded-full",children:"Explore Summary"})]}),ule=()=>{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 s.jsxs("div",{className:"overflow-x-auto max-w-6xl mx-auto mt-8 ",children:[s.jsxs("div",{className:"flex flex-wrap justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-semibold text-yellow-400",children:"Transfer History:"}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("span",{className:"text-sm font-medium",children:"Sort By:"}),s.jsxs("select",{className:"bg-transparent  text-sm  focus:outline-none",children:[s.jsx("option",{children:"Admin"}),s.jsx("option",{children:"User"})]})]})]}),s.jsx("div",{className:"border border-yellow-400",children:s.jsxs("table",{className:"w-full text-left ",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"text-sm px-4 py-2",children:"Date"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Admin"}),s.jsxs("th",{className:"text-sm px-4 py-2",children:["From ",s.jsx(hD,{className:"inline"})," To"]}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Amount"}),s.jsx("th",{className:"text-sm px-4 py-2 text-center",children:"Reason"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{className:"",children:[s.jsx("td",{className:"text-sm px-4 py-2",children:e.date}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.admin}),s.jsx("td",{className:"text-sm px-4 py-2",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("span",{children:e.from}),s.jsx(hD,{}),s.jsx("span",{children:e.to})]})}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.amount}),s.jsx("td",{className:"text-sm px-4 py-2 whitespace-pre-line text-center",children:e.reason})]},r))})]})})]})},hle=()=>{const t=e=>{e.preventDefault()};return s.jsxs("div",{children:[s.jsxs("form",{onSubmit:t,className:"max-w-5xl mx-auto space-y-10 mt-12",children:[s.jsxs("div",{className:"flex flex-wrap gap-6 items-center max-w-4xl mx-auto",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-medium",children:"From:"}),s.jsxs("select",{className:"bg-transparent border border-yellow-400 rounded-full px-4 py-1 focus:outline-none",children:[s.jsx("option",{children:"Select Source Pool"}),s.jsx("option",{children:"CRR Pool"}),s.jsx("option",{children:"BBR Pool"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-medium",children:"To:"}),s.jsxs("select",{className:"bg-transparent border border-yellow-400 rounded-full px-4 py-1 focus:outline-none",children:[s.jsx("option",{children:"Select Target Pool"}),s.jsx("option",{children:"CRR Pool"}),s.jsx("option",{children:"BBR Pool"})]})]})]}),s.jsx("div",{children:s.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)"})}),s.jsx("div",{children:s.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..."})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",id:"2fa",className:"accent-yellow-400 w-4 h-4"}),s.jsx("label",{htmlFor:"2fa",className:"text-sm",children:"Triggers 2FA + logs the transfer with timestamp & admin name"})]}),s.jsx("div",{className:"flex justify-center",children:s.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"})})]}),s.jsx(ule,{})]})},fle=()=>{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 s.jsxs("div",{className:"overflow-x-auto max-w-6xl mx-auto mt-8  ",children:[s.jsxs("div",{className:" flex flex-wrap justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-semibold text-yellow-400",children:"Transfer View:"}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("span",{className:"text-sm font-medium",children:"Sort By:"}),s.jsx(q4,{})]})]}),s.jsx("div",{className:"border border-yellow-400",children:s.jsxs("table",{className:"w-full text-left ",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"text-sm px-4 py-2",children:"Compain"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Amount(AED)"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Expiry Date"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Action"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{className:"",children:[s.jsx("td",{className:"text-sm px-4 py-2",children:e.compain}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.amount}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.expirydate}),s.jsx("td",{children:s.jsx("button",{className:"text-sm px-4 py-1 bg-yellow-400 rounded-full text-black",children:"Recall Fund"})})]},r))})]})}),s.jsxs("div",{className:"flex flex-col gap-6 mt-5",children:[s.jsxs("form",{action:"",children:[s.jsx("input",{type:"checkbox"}),s.jsx("label",{htmlFor:"",children:"Auto-flag bonuses if user inactive > 90 days"})]}),s.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 ple(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 mle(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 t2(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 gle=()=>{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 s.jsxs("div",{className:"overflow-x-auto max-w-6xl mx-auto mt-8  ",children:[s.jsxs("div",{className:" flex flex-wrap justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-semibold text-yellow-400",children:"History Table:"}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("span",{className:"text-sm font-medium",children:"Sort By:"}),s.jsx("select",{name:"",id:"",className:"bg-transparent focus:outline-none",children:s.jsx("option",{value:"",children:"Pool"})})]})]}),s.jsx("div",{className:"border border-yellow-400 rounded-lg",children:s.jsxs("table",{className:"w-full text-left ",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"text-sm px-4 py-2",children:"Date"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"From Pool"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"To Use Case"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Amount"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Status"}),s.jsx("th",{className:"text-sm px-4 py-2",children:"Admin"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{className:"",children:[s.jsx("td",{className:"text-sm px-4 py-2",children:e.date}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.frompool}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.tousecase}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.amount}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.status}),s.jsx("td",{className:"text-sm px-4 py-2",children:e.admin})]},r))})]})})]})},xle=()=>s.jsxs("div",{className:"w-full max-w-4xl mx-auto min-h-screen py-8",children:[s.jsxs("form",{className:"space-y-8 ",children:[s.jsxs("div",{className:"flex justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("label",{className:"whitespace-nowrap text-sm font-medium",children:"Source Pool:"}),s.jsx("div",{className:"w-1/2 border border-yellow-400 rounded-full px-4 py-2",children:s.jsx("select",{className:"w-full bg-transparent outline-none",children:s.jsx("option",{value:"",children:"CRR Pool"})})})]}),s.jsxs("div",{className:"flex items-center gap-4 flex-1",children:[s.jsx("label",{className:"whitespace-nowrap text-sm font-medium",children:"Available Balance:"}),s.jsx("div",{className:"w-1/2 border border-yellow-400 rounded-full px-4 py-2",children:s.jsx("p",{children:"AED 20,000"})})]})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("label",{className:"whitespace-nowrap text-sm font-medium",children:"Target Use Case:"}),s.jsx("div",{className:"flex-1 border border-yellow-400 rounded-full px-4 py-2",children:s.jsx("select",{className:"w-full bg-transparent outline-none",children:s.jsx("option",{value:"",children:"Crisis Aid"})})})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("label",{className:"whitespace-nowrap text-sm font-medium",children:"Amount:"}),s.jsx("div",{className:"flex-1 border border-yellow-400 rounded-full px-4 py-2",children:s.jsx("input",{type:"number",className:"w-full bg-transparent outline-none placeholder:text-yellow-400",placeholder:"Enter amount"})})]}),s.jsxs("div",{children:[s.jsx("label",{className:" text-sm font-medium",children:"optional"}),s.jsx("div",{className:"flex",children:s.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"})})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("div",{className:"border border-yellow-300",children:s.jsx(mle,{})}),s.jsx("label",{htmlFor:"addAnother",className:"text-sm",children:"Add Another Reassignment (dynamic row support)"})]}),s.jsxs("div",{className:"flex items-center justify-between py-2 px-4 border border-yellow-400 rounded-full",children:[s.jsx("label",{htmlFor:"effectiveDate",className:"text-sm",children:"Effective Date"}),s.jsx("div",{className:"flex items-center gap-2  px-4 py-2",children:s.jsx(q4,{})})]})]}),s.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:[s.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Reassignment Preview Card"}),s.jsxs("div",{className:"flex items-center ",children:[s.jsx("p",{children:"CRR Pool"}),s.jsx(t2,{size:20}),s.jsxs("p",{children:["Crisis Aid: ",s.jsx("span",{className:"font-semibold",children:"AED 5,000"})]})]}),s.jsxs("div",{className:"flex items-center ",children:[s.jsx("p",{children:"Referral Pool"}),s.jsx(t2,{size:20}),s.jsxs("p",{children:["Wallet Boost: ",s.jsx("span",{className:"font-semibold",children:"AED 3,000"})]})]}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("p",{children:"Scheduled for:"}),s.jsx(t2,{size:20}),s.jsx("p",{children:"02 Aug 2025"})]})]}),s.jsxs("div",{className:"flex  justify-center gap-4 mt-6",children:[s.jsx("button",{className:"bg-yellow-400 px-4 py-2 font-semibold text-sm text-black rounded-full",children:"Download Summary"}),s.jsx("button",{className:"bg-yellow-400 px-4 py-2 font-semibold text-sm text-black rounded-full",children:"Confirm & Submit"})]}),s.jsx(gle,{})]}),ble=()=>{const[t,e]=E.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 a;return t==="summary"?a=s.jsx(dle,{}):t==="transfer"?a=s.jsx(hle,{}):t==="recovery"?a=s.jsx(fle,{}):t==="reassignment"&&(a=s.jsx(xle,{})),s.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(ic,{}),s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsx("div",{className:"flex flex-wrap gap-4",children:r.map(n=>s.jsx("button",{onClick:()=>e(n.key),className:`px-4 py-2 rounded font-semibold transition duration-150 ${t===n.key?"bg-yellow-400 text-black":"border border-yellow-400 text-yellow-300 hover:bg-yellow-300 hover:text-black"}`,children:n.label},n.key))}),s.jsx("div",{children:a})]})]})]})},Hn=()=>{const t=hr(),e=E.useRef(null),r=i=>`menu-tab ${t.pathname===i?"active":""}`,a=()=>{e.current.scrollBy({left:-150,behavior:"smooth"})},n=()=>{e.current.scrollBy({left:150,behavior:"smooth"})};return s.jsxs("div",{className:"relative border-b border-yellow-400 px-6 py-2",children:[s.jsx("button",{onClick:a,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10  px-1",children:s.jsx(_0,{size:20})}),s.jsxs("div",{ref:e,className:"mx-6 flex gap-x-4 overflow-x-auto whitespace-nowrap scrollbar-hide",children:[s.jsx(De,{to:"/kycverification",className:r("/kycverification"),children:"KYC Verifications"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/serviceProvider",className:r("/serviceProvider"),children:"Service Provider"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/driverhiring",className:r("/driverhiring"),children:"Driver Hiring/Career Proposals"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/vendorreq",className:r("/vendorreq"),children:"Vendor Onboarding Requests"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/drawalRequest",className:r("/drawalRequest"),children:"Withdrawal Requests"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/complainresolve",className:r("/complainresolve"),children:"Complain Resolutions"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/accountedit",className:r("/accountedit"),children:"Manual Account Edits"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/promocode",className:r("/promocode"),children:"Promo Code or Offer Aprovals"})]}),s.jsx("button",{onClick:n,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10  px-1",children:s.jsx(L0,{size:20})})]})},Da="https://aaaogo.xyz",yle=()=>{const t=Fn();un(O=>O.auth.token);const[e,r]=E.useState({start:"",end:""}),[a,n]=E.useState("Pending"),[i,l]=E.useState("All"),[o,c]=E.useState(null),[d,h]=E.useState(!1),[p,m]=E.useState(null),{data:x,isLoading:b,isError:y,error:v}=zX(),N=x?.kycDetails||[],C=async(O,_)=>{try{await t(ul.endpoints.approveKyc.initiate({userId:O})).unwrap(),Ne.success(`KYC Level ${_} approved successfully`)}catch(R){Ne.error(R.data?.message||"Failed to approve KYC")}},S=O=>{m(O),h(!0)},k=async O=>{try{await t(ul.endpoints.rejectKyc.initiate({userId:p,reason:O})).unwrap(),Ne.success("KYC rejected successfully")}catch(_){Ne.error(_.data?.message||"Failed to reject KYC")}},A=O=>{c(O)},T=()=>{c(null)},M=(Array.isArray(N)?N:[]).filter(O=>i==="All"?!0:O.kycLevel===(i==="User"?0:1)).filter(O=>{if(!e.start||!e.end)return!0;const _=new Date(O.createdAt);return _>=new Date(e.start)&&_<=new Date(e.end)}).sort((O,_)=>a==="Pending"||a==="Approved"||a==="Rejected"?0:new Date(_.createdAt)-new Date(O.createdAt));return b?s.jsx("div",{className:"text-yellow-400 text-center py-8",children:"Loading..."}):y?s.jsx("div",{className:"text-red-500 text-center py-8",children:v.data?.message||"Failed to fetch KYC data"}):s.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden bg-[#013220] font-sans",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsxs("div",{className:"flex justify-end items-center mb-6 gap-4 px-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Date Range:"}),s.jsx("input",{type:"date",value:e.start,onChange:O=>r({...e,start:O.target.value}),className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"}),s.jsx("span",{children:"To"}),s.jsx("input",{type:"date",value:e.end,onChange:O=>r({...e,end:O.target.value}),className:"bg-[#013A2A] border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md w-28"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Sort By:"}),s.jsxs("select",{value:a,onChange:O=>n(O.target.value),className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md",children:[s.jsx("option",{value:"Pending",children:"Pending"}),s.jsx("option",{value:"Date",children:"Date"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Role:"}),s.jsxs("select",{value:i,onChange:O=>l(O.target.value),className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded-md",children:[s.jsx("option",{value:"All",children:"All"}),s.jsx("option",{value:"User",children:"User (Level 1)"}),s.jsx("option",{value:"Driver",children:"Driver (Level 2)"})]})]})]}),s.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:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400 bg-[#038A59]",children:[s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"User ID"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Name"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Role"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Documents"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Selfie Match"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Status"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Date"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Action"})]})}),s.jsx("tbody",{children:M.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:"8",className:"text-center py-8 text-yellow-400",children:"No users to approve KYC levels"})}):M.map(O=>s.jsxs("tr",{className:"text-sm border-b border-[#013723] hover:bg-[#038A59]/50",children:[s.jsx("td",{className:"px-4 py-3",children:O.userId}),s.jsx("td",{className:"px-4 py-3",children:O.name}),s.jsx("td",{className:"px-4 py-3",children:O.kycLevel===0?"User":"Driver"}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex flex-col gap-1",children:[O.cnicImages?.front&&typeof O.cnicImages.front=="string"&&s.jsx("a",{href:`${Da}/Uploads/${O.cnicImages.front.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"CNIC Front"}),O.cnicImages?.back&&typeof O.cnicImages.back=="string"&&s.jsx("a",{href:`${Da}/Uploads/${O.cnicImages.back.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"CNIC Back"}),O.selfieImage&&typeof O.selfieImage=="string"&&s.jsx("a",{href:`${Da}/Uploads/${O.selfieImage.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Selfie"}),O.kycLevel===1&&O.licenseImage&&typeof O.licenseImage=="string"&&s.jsx("a",{href:`${Da}/Uploads/${O.licenseImage.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"License"}),O.vehicleData&&s.jsxs("div",{children:[O.vehicleData.vehicleRegistrationCard&&typeof O.vehicleData.vehicleRegistrationCard=="string"&&s.jsx("a",{href:`${Da}/Uploads/${O.vehicleData.vehicleRegistrationCard.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Vehicle Registration"}),O.vehicleData.roadAuthorityCertificate&&typeof O.vehicleData.roadAuthorityCertificate=="string"&&s.jsx("a",{href:`${Da}/Uploads/${O.vehicleData.roadAuthorityCertificate.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300 ml-2",children:"Road Certificate"}),O.vehicleData.insuranceCertificate&&typeof O.vehicleData.insuranceCertificate=="string"&&s.jsx("a",{href:`${Da}/Uploads/${O.vehicleData.insuranceCertificate.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300 ml-2",children:"Insurance"})]})]})}),s.jsxs("td",{className:"px-4 py-3 flex items-center gap-2",children:[s.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:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M5 13l4 4L19 7"})}),"Match"]}),s.jsx("td",{className:"px-4 py-3",children:O.kycStatus}),s.jsx("td",{className:"px-4 py-3",children:new Date(O.createdAt).toLocaleDateString()}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{className:"bg-red-800 text-white px-4 py-1 rounded-full text-sm hover:bg-red-900",onClick:()=>S(O.userId),children:"Reject"}),s.jsx("button",{className:"bg-green-500 text-white px-4 py-1 rounded-full text-sm hover:bg-green-600",onClick:()=>C(O.userId,O.kycLevel+1),children:"Approve"}),s.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:()=>A(O),children:"View"})]})})]},O.userId))})]})}),o&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:s.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:[s.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4",children:"KYC Details"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"User ID:"})," ",o.userId]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Name:"})," ",o.name]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Role:"})," ",o.kycLevel===0?"User":"Driver"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"KYC Status:"})," ",o.kycStatus||"Pending"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Date:"})," ",new Date(o.createdAt).toLocaleString()]}),s.jsx("p",{children:s.jsx("span",{className:"font-medium",children:"Documents:"})}),s.jsxs("div",{className:"pl-4",children:[o.cnicImages?.front&&typeof o.cnicImages.front=="string"&&s.jsx("p",{children:s.jsx("a",{href:`${Da}/Uploads/${o.cnicImages.front.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"CNIC Front"})}),o.cnicImages?.back&&typeof o.cnicImages.back=="string"&&s.jsx("p",{children:s.jsx("a",{href:`${Da}/Uploads/${o.cnicImages.back.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"CNIC Back"})}),o.selfieImage&&typeof o.selfieImage=="string"&&s.jsx("p",{children:s.jsx("a",{href:`${Da}/Uploads/${o.selfieImage.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Selfie"})}),o.kycLevel===1&&o.licenseImage&&typeof o.licenseImage=="string"&&s.jsx("p",{children:s.jsx("a",{href:`${Da}/Uploads/${o.licenseImage.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"License"})}),o.vehicleData&&s.jsxs("div",{children:[o.vehicleData.vehicleRegistrationCard&&typeof o.vehicleData.vehicleRegistrationCard=="string"&&s.jsx("p",{children:s.jsx("a",{href:`${Da}/Uploads/${o.vehicleData.vehicleRegistrationCard.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Vehicle Registration"})}),o.vehicleData.roadAuthorityCertificate&&typeof o.vehicleData.roadAuthorityCertificate=="string"&&s.jsx("p",{children:s.jsx("a",{href:`${Da}/Uploads/${o.vehicleData.roadAuthorityCertificate.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Road Certificate"})}),o.vehicleData.insuranceCertificate&&typeof o.vehicleData.insuranceCertificate=="string"&&s.jsx("p",{children:s.jsx("a",{href:`${Da}/Uploads/${o.vehicleData.insuranceCertificate.replace(/^\/?uploads\//,"")}`,target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Insurance"})})]})]})]}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.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"})})]})}),s.jsx(vd,{isOpen:d,onClose:()=>h(!1),onConfirm:k,title:"Reject KYC",message:"Please provide a reason for rejecting this KYC:",showInput:!0,inputPlaceholder:"Enter reason for rejection..."})]})]})},vle="https://aaaogo.xyz",wle=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 s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-3 h-3 rounded-full ${e}`}),s.jsx("span",{children:t.charAt(0).toUpperCase()+t.slice(1)})]})},jle=()=>{const t=Fn(),{services:e,loading:r,error:a}=un(b=>b.services),[n,i]=E.useState(""),[l,o]=E.useState(null),[c,d]=E.useState("");E.useEffect(()=>{t(Bg())},[t]);const h=async b=>{try{await t(sR(b)).unwrap(),Ne.success("Service approved successfully")}catch(y){Ne.error(y.message||"Failed to approve service")}},p=async b=>{try{if(!c){Ne.error("Please provide a rejection reason");return}await t(iR({serviceId:b,reason:c})).unwrap(),Ne.success("Service rejected successfully"),d(""),o(null)}catch(y){Ne.error(y.message||"Failed to reject service")}},m=b=>{const y=b.replace(/^\/?uploads\/services\//,"");return`${vle}/${y}`},x=n?e.filter(b=>b.status===n):e;return r?s.jsx("div",{className:"text-yellow-400 text-center py-8",children:"Loading..."}):a?s.jsx("div",{className:"text-red-500 text-center py-8",children:a.message||"Failed to fetch services"}):s.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden bg-[#013220] font-sans",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 px-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Sort By:"}),s.jsxs("select",{className:"bg-transparent border border-yellow-400 rounded px-2 py-1 text-yellow-400",value:n,onChange:b=>i(b.target.value),children:[s.jsx("option",{value:"",children:"All"}),s.jsx("option",{value:"pending",children:"Pending"}),s.jsx("option",{value:"approved",children:"Approved"}),s.jsx("option",{value:"rejected",children:"Rejected"})]})]})}),s.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:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400 bg-[#038A59]",children:[s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Business Name"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Owner Name"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Area"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Service Offered"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Status"}),s.jsx("th",{className:"px-4 py-3 font-medium tracking-wide",children:"Action"})]})}),s.jsxs("tbody",{children:[x.map(b=>s.jsxs("tr",{className:"text-sm border-b border-[#013723] hover:bg-[#038A59]/50",children:[s.jsx("td",{className:"px-4 py-3",children:b.businessCompanyName}),s.jsx("td",{className:"px-4 py-3",children:b.ownerIdentification.fullName}),s.jsx("td",{className:"px-4 py-3",children:b.serviceArea}),s.jsx("td",{className:"px-4 py-3",children:b.serviceType}),s.jsx("td",{className:"px-4 py-3",children:wle(b.status)}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>o(b),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"}),b.status==="pending"&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>h(b._id),className:"bg-green-500 text-white px-4 py-1 rounded-full text-sm hover:bg-green-600",children:"Approve"}),s.jsx("button",{onClick:()=>o(b),className:"bg-red-800 text-white px-4 py-1 rounded-full text-sm hover:bg-red-900",children:"Reject"})]})]})})]},b._id)),x.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:"6",className:"text-center py-8 text-yellow-400",children:"No services to approve"})})]})]})}),l&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",role:"dialog","aria-modal":"true",tabIndex:"-1",children:s.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:[s.jsx("h2",{className:"text-2xl font-semibold tracking-wide mb-4",children:l.businessCompanyName}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Owner:"})," ",l.ownerIdentification.fullName]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Emirates ID:"})," ",l.ownerIdentification.emiratesId]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Trade License:"})," ",l.tradeLicenseNumber]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Company Type:"})," ",l.companyType]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Service Type:"})," ",l.serviceType]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Service Area:"})," ",l.serviceArea]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Business Phone:"})," ",l.businessPhoneNumber]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Contact Person:"})," ",l.managerOwnerReceptionName]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Contact Mobile:"})," ",l.contactPersonMobile]})]}),s.jsxs("div",{children:[s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Address:"})," ",l.businessAddress]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Opening Time:"})," ",l.openingTime]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Closing Time:"})," ",l.closingTime]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Staff Count:"})," ",l.numberOfStaff]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Services:"})," ",l.listOfServices]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Status:"})," ",l.status.charAt(0).toUpperCase()+l.status.slice(1)]}),l.rejectionReason&&s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Rejection Reason:"})," ",l.rejectionReason]})]})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx("h3",{className:"text-lg font-semibold tracking-wide",children:"Documents"}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 pl-4",children:[l.tradeLicenseCopy&&s.jsx("p",{children:s.jsx("a",{href:m(l.tradeLicenseCopy),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Trade License"})}),l.shopImages?.map((b,y)=>s.jsx("p",{children:s.jsxs("a",{href:m(b),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:["Shop Image ",y+1]})},y)),l.passportCopy?.map((b,y)=>s.jsx("p",{children:s.jsxs("a",{href:m(b),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:["Passport Copy ",y+1]})},y)),l.uploadedPriceList&&s.jsx("p",{children:s.jsx("a",{href:m(l.uploadedPriceList),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Price List"})}),l.uploadedPortfolio&&s.jsx("p",{children:s.jsx("a",{href:m(l.uploadedPortfolio),target:"_blank",rel:"noopener noreferrer",className:"underline text-yellow-400 hover:text-yellow-300",children:"Portfolio"})})]})]}),l.status==="pending"&&s.jsx("div",{className:"mt-4",children:s.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:b=>d(b.target.value)})}),s.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[s.jsx("button",{onClick:()=>{o(null),d("")},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"}),l.status==="pending"&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>h(l._id),className:"bg-green-500 text-white px-4 py-2 rounded-full text-sm hover:bg-green-600",children:"Approve"}),s.jsx("button",{onClick:()=>p(l._id),className:"bg-red-800 text-white px-4 py-2 rounded-full text-sm hover:bg-red-900",disabled:!c,children:"Reject"})]})]})]})})]})]})},Nle=[{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"}],Sle=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 s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-3 h-3 rounded-full ${e}`}),s.jsx("span",{children:t})]})},Cle=()=>{const{id:t}=OO(),e=Cl();return s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-y-auto",children:[s.jsx(Hn,{}),s.jsxs("div",{className:"flex items-center gap-2 mb-4 m-4",children:[s.jsx(R0,{size:25,className:"text-yellow-400 text-lg"}),s.jsx("button",{onClick:()=>e(-1),className:"text-yellow-400 hover:underline",children:"Back"})]}),s.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:[s.jsx("h2",{className:"text-2xl font-semibold mb-4 text-yellow-300",children:"Detail View"}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between px-12",children:[s.jsx("strong",{className:"w-36",children:"Business Name:"}),s.jsx("span",{children:"Rapid Recovery Hub"})]}),s.jsxs("div",{className:"flex items-center justify-between px-12",children:[s.jsx("strong",{className:"w-36",children:"Owner Name:"}),s.jsx("span",{children:"Usman Raza"})]}),s.jsxs("div",{className:"flex items-center justify-between px-12",children:[s.jsx("strong",{className:"w-36",children:"Status Badge:"}),s.jsxs("div",{className:"flex items-center justify-between px-12 gap-2",children:[s.jsx("div",{className:"w-3 h-3 rounded-full bg-red-500 "}),s.jsx("span",{children:"Pending"})]})]}),s.jsxs("div",{className:"flex items-center justify-between px-12",children:[s.jsx("strong",{className:"w-36",children:"Date Submitted:"}),s.jsx("span",{children:"Jul 29, 2025"})]}),s.jsxs("div",{className:"flex items-center justify-between px-12",children:[s.jsx("strong",{className:"w-36",children:"Area of Operation:"}),s.jsx("span",{children:"Lahore – DHA"})]}),s.jsxs("div",{className:"flex items-center justify-between px-12",children:[s.jsx("strong",{className:"w-36",children:"Services Offered:"}),s.jsx("span",{children:"Recovery • Workshop"})]})]})]}),s.jsxs("div",{className:"mx-auto border border-yellow-400 rounded-md overflow-hidden w-full max-w-4xl",children:[s.jsxs("div",{className:"grid grid-cols-3 border-b border-yellow-300 py-2 px-4 font-semibold text-yellow-400 w-full",children:[s.jsx("span",{children:"Document Type"}),s.jsx("span",{children:"Status"}),s.jsx("span",{className:"text-center",children:"Action"})]}),Nle.map((r,a)=>s.jsxs("div",{className:"grid grid-cols-3 items-center py-2 px-4",children:[s.jsx("span",{children:r.type}),s.jsx("span",{children:Sle(r.status)}),s.jsx("span",{children:r.status==="Missing"?s.jsx("button",{className:"text-xs block mx-auto bg-yellow-400 text-black px-1 py-1 rounded-md",children:"Request Upload"}):s.jsx("button",{className:"text-xs block mx-auto bg-yellow-400 text-black px-4 py-1 rounded-md",children:"View Detail"})})]},a))]}),s.jsxs("div",{className:"flex justify-center items-center pt-10 gap-6",children:[s.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full text-black text-sm font-semibold",children:"Approve Provider"}),s.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full text-black text-sm font-semibold",children:"Reject Application"}),s.jsx("button",{className:"bg-yellow-400 px-4 py-2 rounded-full text-black text-sm font-semibold",children:"Request More Info"})]})]})]})},Ale=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 s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-3 h-3 rounded-full ${e}`}),s.jsx("span",{children:t.charAt(0).toUpperCase()+t.slice(1)})]})},kle=()=>{const t=Fn(),{pendingHirings:e,totalPending:r,loading:a,error:n,success:i}=un(S=>S.driverHiring),[l,o]=E.useState(""),[c,d]=E.useState(null),[h,p]=E.useState(""),[m,x]=E.useState(null),b=localStorage.getItem("token");E.useEffect(()=>{t(Eg(b))},[t,b]),E.useEffect(()=>{if(i||n){const S=setTimeout(()=>{t(eR())},5e3);return()=>clearTimeout(S)}},[i,n,t]);const y=S=>{t(Hh({driverHiringId:S,token:b}))},v=S=>{h.trim()?(t($h({driverHiringId:S,reason:h,token:b})),p(""),d(null)):Ne.error("Please provide a reason for rejection")},N=S=>{x(m===S?null:S)},C=l?e.filter(S=>S.approvalStatus===l):e;return s.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 mx-2",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Sort By:"}),s.jsxs("select",{className:"bg-transparent focus:outline-none text-yellow-400 border border-yellow-400 rounded px-2 py-1",value:l,onChange:S=>o(S.target.value),children:[s.jsx("option",{value:"",children:"All"}),s.jsx("option",{value:"pending",children:"Pending"}),s.jsx("option",{value:"approved",children:"Approved"}),s.jsx("option",{value:"rejected",children:"Rejected"}),s.jsx("option",{value:"Under-review",children:"Under-review"})]})]})}),a&&s.jsx("p",{className:"text-blue-500 mx-2",children:"Loading..."}),n&&s.jsx("p",{className:"text-red-500 mx-2",children:n}),i&&s.jsx("p",{className:"text-green-500 mx-2",children:i}),s.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:s.jsxs("table",{className:"w-full text-left min-w-[800px]",children:[s.jsx("thead",{className:"sticky top-0 bg-gray-800",children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"px-4 py-3 w-[150px]",children:"Driver Name"}),s.jsx("th",{className:"px-4 py-3 w-[150px]",children:"Owner Name"}),s.jsx("th",{className:"px-4 py-3 w-[150px]",children:"Engagement"}),s.jsx("th",{className:"px-4 py-3 w-[150px]",children:"Terms"}),s.jsx("th",{className:"px-4 py-3 w-[120px]",children:"Submitted On"}),s.jsx("th",{className:"px-4 py-3 w-[100px]",children:"Status"}),s.jsx("th",{className:"px-4 py-3 w-[250px]",children:"Action"})]})}),s.jsxs("tbody",{children:[C.map(S=>s.jsxs(qe.Fragment,{children:[s.jsxs("tr",{className:"text-sm",children:[s.jsxs("td",{className:"px-4 py-3",children:[S.userId?.firstName," ",S.userId?.lastName||""]}),s.jsx("td",{className:"px-4 py-3",children:S.vehicleOwnerName}),s.jsx("td",{className:"px-4 py-3",children:S.engagementType}),s.jsx("td",{className:"px-4 py-3",children:S.engagementType==="Salary Based"?`PKR ${S.salaryOffered}`:S.engagementType}),s.jsx("td",{className:"px-4 py-3",children:new Date(S.createdAt).toLocaleDateString()}),s.jsx("td",{className:"px-4 py-3",children:Ale(S.approvalStatus)}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.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"&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>y(S._id),className:"bg-green-500 text-white px-4 py-1 rounded-full text-sm hover:bg-green-600",children:"Approve"}),s.jsx("button",{onClick:()=>d(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&&s.jsx("tr",{className:"bg-gray-800",children:s.jsx("td",{colSpan:"7",className:"px-4 py-4",children:s.jsx("div",{className:"max-h-[300px] overflow-y-auto pr-4 scrollbar-hide",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"User Information"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Username:"})," ",S.userId?.username]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Email:"})," ",S.userId?.email]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Phone:"})," ",S.userId?.phoneNumber]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Vehicle Information"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Vehicle Type:"})," ",S.vehicleType]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Plate Number:"})," ",S.vehiclePlateNumber]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Make & Model:"})," ",S.vehicleMakeModel]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Company Name:"})," ",S.companyName||"N/A"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Company Emirate:"})," ",S.companyEmirate||"N/A"]}),s.jsx("p",{children:s.jsx("strong",{children:"Registration Card:"})}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx("a",{href:`https://aaaogo.xyz/${S.registrationCard.front}`,target:"_blank",rel:"noopener noreferrer",className:"text-yellow-400 hover:underline",children:"Front"}),s.jsx("a",{href:`https://aaaogo.xyz/${S.registrationCard.back}`,target:"_blank",rel:"noopener noreferrer",className:"text-yellow-400 hover:underline",children:"Back"})]}),s.jsx("p",{children:s.jsx("strong",{children:"Vehicle Images:"})}),s.jsx("div",{className:"flex gap-4 flex-wrap",children:S.vehicleImages.map((k,A)=>s.jsxs("a",{href:`https://aaaogo.xyz/${k}`,target:"_blank",rel:"noopener noreferrer",className:"text-yellow-400 hover:underline",children:["Image ",A+1]},A))})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Hiring Details"}),s.jsxs("p",{children:[s.jsx("strong",{children:"Driver Can Offer Counter Rent:"})," ",S.driverCanOfferCounterRent?"Yes":"No"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Agreement Duration:"})," ",S.agreementDuration]}),S.customDurationAmount&&s.jsxs("p",{children:[s.jsx("strong",{children:"Custom Duration:"})," ",S.customDurationAmount," months"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Work Schedule:"})," ",S.workSchedule]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Shift Timing:"})," ",S.shiftTimingOrDutyHours]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Preferred Start Date:"})," ",new Date(S.preferredStartDate).toLocaleDateString()]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Information Confirmed:"})," ",S.informationConfirmed?"Yes":"No"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Auto-Generated Agreement:"})," ",S.autoGeneratedAgreement?"Yes":"No"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Mutual Approval:"})," ",S.mutualApproval?"Yes":"No"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Terms Agreed:"})," ",S.termsAgreed?"Yes":"No"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Digital Signature:"})," ",S.digitalSignature]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Admin Comments:"})," ",S.adminComments||"None"]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Created At:"})," ",new Date(S.createdAt).toLocaleDateString()]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Updated At:"})," ",new Date(S.updatedAt).toLocaleDateString()]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Total Applications:"})," ",S.driverApplications.length]}),S.selectedDriverId&&s.jsxs("p",{children:[s.jsx("strong",{children:"Selected Driver ID:"})," ",S.selectedDriverId]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Maintenance Responsibilities"}),s.jsx("p",{children:s.jsx("strong",{children:"Minor Maintenance:"})}),s.jsxs("ul",{className:"list-disc pl-5",children:[s.jsxs("li",{children:["Daily Fuel: Owner: ",S.maintenanceResponsibilities.minor.dailyFuel.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.minor.dailyFuel.driver?"Yes":"No"]}),s.jsxs("li",{children:["Car Wash: Owner: ",S.maintenanceResponsibilities.minor.carWash.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.minor.carWash.driver?"Yes":"No"]}),s.jsxs("li",{children:["Oil Change: Owner: ",S.maintenanceResponsibilities.minor.oilChange.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.minor.oilChange.driver?"Yes":"No"]}),s.jsxs("li",{children:["Tyre Pressure Check: Owner: ",S.maintenanceResponsibilities.minor.tyrePressureCheck.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.minor.tyrePressureCheck.driver?"Yes":"No"]})]}),s.jsx("p",{children:s.jsx("strong",{children:"Major Maintenance:"})}),s.jsxs("ul",{className:"list-disc pl-5",children:[s.jsxs("li",{children:["Engine Repairs: Owner: ",S.maintenanceResponsibilities.major.engineRepairs.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.major.engineRepairs.driver?"Yes":"No"]}),s.jsxs("li",{children:["Transmission System: Owner: ",S.maintenanceResponsibilities.major.transmissionSystem.owner?"Yes":"No",", Driver: ",S.maintenanceResponsibilities.major.transmissionSystem.driver?"Yes":"No"]}),s.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&&s.jsxs(s.Fragment,{children:[s.jsx("p",{children:s.jsx("strong",{children:"Custom Maintenance:"})}),s.jsx("ul",{className:"list-disc pl-5",children:S.maintenanceResponsibilities.custom.map((k,A)=>s.jsxs("li",{children:[k.name,": Owner: ",k.owner?"Yes":"No",", Driver: ",k.driver?"Yes":"No"]},A))})]})]})]})})})})]},S._id)),C.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:"7",className:"text-center py-4 text-yellow-400",children:"No matching data found."})})]})]})}),c&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:s.jsxs("div",{className:"bg-gray-800 p-6 rounded-lg max-w-md w-full",children:[s.jsx("h2",{className:"text-xl text-yellow-400 mb-4",children:"Reject Driver Hiring"}),s.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"}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:()=>d(null),className:"bg-gray-500 text-white px-4 py-1 rounded-full hover:bg-gray-600",children:"Cancel"}),s.jsx("button",{onClick:()=>v(c),className:"bg-red-800 text-white px-4 py-1 rounded-full hover:bg-red-900",children:"Submit"})]})]})}),s.jsx("style",{children:`
            .scrollbar-hide::-webkit-scrollbar {
              display: none;
            }
            .scrollbar-hide {
              -ms-overflow-style: none;  /* Internet Explorer 10+ */
              scrollbar-width: none;  /* Firefox */
            }
          `})]})]})},Dle=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 s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`w-3 h-3 rounded-full ${e}`}),s.jsx("span",{children:t})]})},Tle=()=>{const t=Cl(),{driverHiringId:e}=OO(),r=Fn(),{currentHiring:a,loading:n,error:i,success:l}=un(O=>O.driverHiring),o=localStorage.getItem("token"),[c,d]=E.useState(null),[h,p]=E.useState(""),[m,x]=E.useState(!1),[b,y]=E.useState(""),[v,N]=E.useState(!1),[C,S]=E.useState("");E.useEffect(()=>{if(!o){console.error("No token found in localStorage");return}e&&(console.log("Fetching driver hiring details for ID:",e),r(Pg({driverHiringId:e,token:o})))},[r,e,o]),E.useEffect(()=>{if(l||i){console.log("Status update:",{success:l,error:i});const O=setTimeout(()=>{r(eR())},5e3);return()=>clearTimeout(O)}},[l,i,r]);const k=()=>{if(!o||!e){console.error("Missing token or driverHiringId:",{token:o,driverHiringId:e}),Ne.error("Authentication or hiring ID missing");return}console.log("Approving hiring:",e),r(Hh({driverHiringId:e,token:o})).unwrap().then(()=>console.log("Approve successful")).catch(O=>console.error("Approve failed:",O))},A=()=>{if(!h.trim()){Ne.error("Please provide a reason for rejection");return}if(!o||!e){console.error("Missing token or driverHiringId:",{token:o,driverHiringId:e}),Ne.error("Authentication or hiring ID missing");return}console.log("Rejecting hiring:",e,"Reason:",h),r($h({driverHiringId:e,reason:h,token:o})).unwrap().then(()=>{console.log("Reject successful"),p(""),d(null)}).catch(O=>console.error("Reject failed:",O))},T=()=>{if(!b.trim()){Ne.error("Please provide new terms");return}if(!o||!e){console.error("Missing token or driverHiringId:",{token:o,driverHiringId:e}),Ne.error("Authentication or hiring ID missing");return}console.log("Updating terms for hiring:",e,"Terms:",b),r(Og({driverHiringId:e,terms:b,token:o})).unwrap().then(()=>{console.log("Update terms successful"),y(""),x(!1)}).catch(O=>console.error("Update terms failed:",O))},M=()=>{if(!C.trim()){Ne.error("Please provide a note");return}if(!o||!e){console.error("Missing token or driverHiringId:",{token:o,driverHiringId:e}),Ne.error("Authentication or hiring ID missing");return}console.log("Adding note for hiring:",e,"Note:",C),r(Rg({driverHiringId:e,note:C,token:o})).unwrap().then(()=>{console.log("Add note successful"),S(""),N(!1)}).catch(O=>console.error("Add note failed:",O))};return n&&!a?s.jsx("p",{className:"text-blue-500 text-center",children:"Loading..."}):i&&!a?s.jsx("p",{className:"text-red-500 text-center",children:i}):a?s.jsxs("div",{className:"flex min-h-screen text-yellow-400",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-y-auto",children:[s.jsx(Hn,{}),n&&s.jsx("p",{className:"text-blue-500 mx-2",children:"Loading..."}),i&&s.jsx("p",{className:"text-red-500 mx-2",children:i}),l&&s.jsx("p",{className:"text-green-500 mx-2",children:l}),s.jsxs("div",{className:"flex items-center gap-2 mb-4 m-4",children:[s.jsx(R0,{size:25,className:"text-yellow-400"}),s.jsx("button",{onClick:()=>t(-1),className:"text-yellow-400 hover:underline",children:"Back"})]}),s.jsx("h2",{className:"text-xl font-semibold text-center mb-4",children:"Agreement Summary:"}),s.jsx("div",{className:"flex justify-center items-center mb-6",children:s.jsx("div",{className:"max-w-2xl w-full border border-yellow-300 rounded-md overflow-hidden",children:s.jsxs("table",{className:"w-full table-fixed border border-yellow-300 text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-yellow-500 text-center",children:[s.jsx("th",{className:"border-r border-yellow-300 px-4 py-2 w-1/2",children:"Field"}),s.jsx("th",{className:"px-4 py-2",children:"Value"})]})}),s.jsxs("tbody",{className:"text-center",children:[s.jsxs("tr",{className:"border-t border-yellow-300",children:[s.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Driver Name"}),s.jsx("td",{className:"px-4 py-2",children:a.userId?.firstName||"N/A"})]}),s.jsxs("tr",{className:"border-t border-yellow-300",children:[s.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Owner Name"}),s.jsx("td",{className:"px-4 py-2",children:a.vehicleOwnerName||"N/A"})]}),s.jsxs("tr",{className:"border-t border-yellow-300",children:[s.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Engagement Type"}),s.jsx("td",{className:"px-4 py-2",children:a.engagementType||"N/A"})]}),s.jsxs("tr",{className:"border-t border-yellow-300",children:[s.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Terms"}),s.jsx("td",{className:"px-4 py-2",children:a.engagementType==="Salary Based"?`Salary: PKR ${a.salaryOffered||"N/A"}`:a.terms||"N/A"})]}),s.jsxs("tr",{className:"border-t border-yellow-300",children:[s.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Start Date"}),s.jsx("td",{className:"px-4 py-2",children:a.startDate?new Date(a.startDate).toLocaleDateString():"N/A"})]}),s.jsxs("tr",{className:"border-t border-yellow-300",children:[s.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Proposed Duration"}),s.jsx("td",{className:"px-4 py-2",children:a.proposedDuration||"N/A"})]}),s.jsxs("tr",{className:"border-t border-yellow-300",children:[s.jsx("td",{className:"border-r border-yellow-300 px-4 py-2",children:"Assigned Vehicle"}),s.jsx("td",{className:"px-4 py-2",children:a.assignedVehicle||"N/A"})]})]})]})})}),s.jsxs("div",{className:"mx-auto border border-yellow-400 rounded-md overflow-hidden w-full max-w-4xl mb-8",children:[s.jsxs("div",{className:"grid grid-cols-3 border-b border-yellow-300 py-2 px-4 font-semibold text-yellow-400",children:[s.jsx("span",{className:"pr-2",children:"Document Type"}),s.jsx("span",{className:"px-2",children:"Status"}),s.jsx("span",{className:"text-center pl-2",children:"Action"})]}),(a.documents||[]).map((O,_)=>s.jsxs("div",{className:"grid grid-cols-3 items-center py-2 px-4",children:[s.jsx("span",{className:"pr-2",children:O.type||"N/A"}),s.jsx("span",{className:"px-2",children:Dle(O.status)}),s.jsx("span",{className:"pl-2",children:O.status==="Missing"?s.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:",O.type),children:"Request Upload"}):s.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:",O.type),children:"View Detail"})})]},_)),(!a.documents||a.documents.length===0)&&s.jsx("div",{className:"text-center py-4 text-yellow-400",children:"No documents available"})]}),a.approvalStatus==="Pending"?s.jsxs("div",{className:"flex justify-center items-center pt-10 gap-6",children:[s.jsx("button",{onClick:k,className:"bg-yellow-400 px-8 py-2 rounded-full text-[#013220] text-sm font-semibold hover:bg-yellow-300",disabled:n,children:"Approve"}),s.jsx("button",{onClick:()=>d(e),className:"bg-yellow-400 px-12 py-2 rounded-full text-[#013220] text-sm font-semibold hover:bg-yellow-300",disabled:n,children:"Reject"}),s.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:n,children:"Modify Terms"}),s.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:n,children:"Add Internal Note"})]}):s.jsxs("p",{className:"text-center text-yellow-400",children:["This hiring is ",a.approvalStatus,". No further actions are available."]}),c&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:s.jsxs("div",{className:"bg-gray-800 p-6 rounded-lg max-w-md w-full",children:[s.jsx("h2",{className:"text-xl text-yellow-400 mb-4",children:"Reject Driver Hiring"}),s.jsx("textarea",{className:"w-full bg-transparent border border-yellow-400 text-yellow-400 p-2 rounded mb-4",value:h,onChange:O=>p(O.target.value),placeholder:"Enter reason for rejection",rows:"4"}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:()=>{console.log("Cancel reject modal"),p(""),d(null)},className:"bg-gray-500 text-white px-4 py-1 rounded-full hover:bg-gray-600",children:"Cancel"}),s.jsx("button",{onClick:A,className:"bg-red-800 text-white px-4 py-1 rounded-full hover:bg-red-900",disabled:n,children:"Submit"})]})]})}),m&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:s.jsxs("div",{className:"bg-gray-800 p-6 rounded-lg max-w-md w-full",children:[s.jsx("h2",{className:"text-xl text-yellow-400 mb-4",children:"Modify Terms"}),s.jsx("textarea",{className:"w-full bg-transparent border border-yellow-400 text-yellow-400 p-2 rounded mb-4",value:b,onChange:O=>y(O.target.value),placeholder:"Enter new terms",rows:"4"}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx("button",{onClick:()=>{console.log("Cancel terms modal"),y(""),x(!1)},className:"bg-gray-500 text-white px-4 py-1 rounded-full hover:bg-gray-600",children:"Cancel"}),s.jsx("button",{onClick:T,className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full hover:bg-yellow-300",disabled:n,children:"Submit"})]})]})}),v&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center",children:s.jsxs("div",{className:"bg-gray-800 p-6 rounded-lg max-w-md w-full",children:[s.jsx("h2",{className:"text-xl text-yellow-400 mb-4",children:"Add Internal Note"}),s.jsx("textarea",{className:"w-full bg-transparent border border-yellow-400 text-yellow-400 p-2 rounded mb-4",value:C,onChange:O=>S(O.target.value),placeholder:"Enter internal note",rows:"4"}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.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"}),s.jsx("button",{onClick:M,className:"bg-yellow-400 text-[#013220] px-4 py-1 rounded-full hover:bg-yellow-300",disabled:n,children:"Submit"})]})]})})]})]}):s.jsx("p",{className:"text-yellow-400 text-center",children:"No data available"})},Mle=Array(9).fill({businessname:"Al Noor Garage",contact:"+971-500123456",servicesOffered:"Recovery, Tuning",businessdoc:"view Document",location:"View Map"}),Ele=()=>s.jsxs("div",{className:"flex  text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 ",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Sort By:"}),s.jsxs("select",{className:"bg-transparent focus:outline",children:[s.jsx("option",{value:"",children:"Pending"}),s.jsx("option",{value:"",children:"Verified"}),s.jsx("option",{value:"",children:"Scheduled"})]})]})}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"Business' Name"}),s.jsx("th",{className:"px-4 py-3",children:"Contact Info"}),s.jsx("th",{className:"px-4 py-3",children:"Services Offered"}),s.jsx("th",{className:"px-4 py-3",children:"BusinessReg.Doc"}),s.jsx("th",{className:"px-4 py-3",children:"Location"}),s.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),s.jsx("tbody",{children:Mle.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.businessname}),s.jsx("td",{className:"px-4 py-3",children:t.contact}),s.jsx("td",{className:"px-4 py-3",children:t.servicesOffered}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("a",{href:"#",className:"underline text-yellow-400",children:t.businessdoc})}),s.jsx("td",{className:"px-4 py-3 underline",children:t.location}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hd,{className:"cursor-pointer hover:text-red-500",size:20}),s.jsx(Xf,{className:"cursor-pointer hover:text-green-500",size:16}),s.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"Scheduled"})]})})]},e))})]})})]})]}),Ple=Array(9).fill({userName:"Ahmed Raza",amount:"AED 1,500",method:"Bank Transfer",kycstatus:"Verified",datereq:"28-Aug-25",riskflag:"Normal"}),Ole=()=>s.jsxs("div",{className:"flex  text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsxs("div",{className:"flex justify-end items-center mb-6 gap-4 ",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]}),s.jsx("div",{children:s.jsxs("span",{children:["Risk Level:",s.jsxs("select",{name:"",id:"",className:"bg-transparent focus:outline-none",children:[s.jsx("option",{value:"",children:"High"}),s.jsx("option",{value:"",children:"Normal"})]})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"KYC Level:"}),s.jsxs("select",{className:"bg-transparent focus:outline",children:[s.jsx("option",{value:"",children:"Verified"}),s.jsx("option",{value:"",children:"Rejected"})]})]})]}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"User Name"}),s.jsx("th",{className:"px-4 py-3",children:"Amount"}),s.jsx("th",{className:"px-4 py-3",children:"Method"}),s.jsx("th",{className:"px-4 py-3",children:"KYC Status"}),s.jsx("th",{className:"px-4 py-3",children:"Date Requested"}),s.jsx("th",{className:"px-4 py-3",children:"Risk Flag"}),s.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),s.jsx("tbody",{children:Ple.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.userName}),s.jsx("td",{className:"px-4 py-3",children:t.amount}),s.jsx("td",{className:"px-4 py-3 flex items-center gap-2",children:t.method}),s.jsx("td",{className:"px-4 py-3",children:t.kycstatus}),s.jsx("td",{className:"px-4 py-3",children:t.datereq}),s.jsx("td",{className:"px-4 py-3",children:t.riskflag}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hd,{className:"cursor-pointer hover:text-red-500",size:20}),s.jsx(Xf,{className:"cursor-pointer hover:text-green-500",size:16}),s.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"Hold"})]})})]},e))})]})})]})]}),Rle=Array(9).fill({id:1,userName:"Ahmed Raza",status:"Bank Transfer",lastUpdate:"28-Aug-25",assignedto:"Normal"}),_le=()=>s.jsxs("div",{className:"flex  text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 ",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]})}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"User Name"}),s.jsx("th",{className:"px-4 py-3",children:"Status"}),s.jsx("th",{className:"px-4 py-3",children:"Last Updated"}),s.jsx("th",{className:"px-4 py-3",children:"Assigned To"}),s.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),s.jsx("tbody",{children:Rle.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.userName}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:t.lastUpdate}),s.jsx("td",{className:"px-4 py-3 flex items-center gap-2",children:t.assignedto}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(De,{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))})]})})]})]}),Lle=()=>s.jsxs("div",{className:"flex  text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsxs("div",{className:"flex items-center gap-2 mb-4 m-4",children:[s.jsx(R0,{size:25,className:"text-yellow-400"}),s.jsx(De,{to:"/complainresolve",className:"text-yellow-400 hover:underline",children:"Back"})]}),s.jsxs("div",{className:"p-6",children:[s.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Complaint Details:"}),s.jsxs("div",{className:"space-y-8 mx-auto w-full max-w-xl",children:[s.jsxs("div",{className:"flex",children:[s.jsx("span",{className:"w-32 font-semibold",children:"Title:"}),s.jsx("span",{children:"Refund not received"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold mb-1",children:"Content:"}),s.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"})]}),s.jsxs("div",{className:"flex",children:[s.jsx("span",{className:"w-32 font-semibold",children:"Attachments:"}),s.jsx("a",{href:"#",className:"text-yellow-300 underline",children:"View Image"})]}),s.jsxs("div",{className:"flex",children:[s.jsx("span",{className:"w-32 font-semibold",children:"Submitted On:"}),s.jsx("span",{children:"01–Aug–2025"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold mb-1",children:"Admin Notes:"}),s.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."})]}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold mb-1",children:"Previous Actions:"}),s.jsx("div",{className:"text-sm text-yellow-300",children:"• Logged by Sarah @ 01–Aug–2025: Refund re-initiated"})]}),s.jsxs("div",{className:"flex",children:[s.jsx("span",{className:"w-32 font-semibold",children:"Status:"}),s.jsx("span",{children:"In Progress"})]}),s.jsx("div",{className:"rounded-full",children:s.jsxs("select",{className:"focus:outline-none w-full bg-transparent  text-yellow-400 border border-yellow-400 rounded-xl py-2 px-4",children:[s.jsx("option",{children:"Assign To"}),s.jsx("option",{children:"Admin A"}),s.jsx("option",{children:"Admin B"})]})}),s.jsxs("div",{className:"flex gap-4 mt-6",children:[s.jsx("button",{className:"bg-yellow-400 text-green-900 font-semibold py-2 px-6 rounded-full",children:"Mark as Resolved"}),s.jsx("button",{className:"bg-yellow-400 text-green-900 font-semibold py-2 px-12 rounded-full",children:"Escalate"}),s.jsx("button",{className:"bg-yellow-400 text-green-900 font-semibold py-2 px-12 rounded-full",children:"Reopen"})]})]})]})]})]}),zle=Array(9).fill({id:1,code:"AAO15",Discounttype:"15% off fare",validperiod:"01-15 Aug 2025",campaignowner:"Marketing Team",currentstatus:"Pending Review"}),Ile=()=>s.jsxs("div",{className:"flex  text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsx("div",{className:"flex justify-end items-center mb-6 gap-4 ",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Sort By:"}),s.jsxs("select",{className:"bg-transparent focus:outline",children:[s.jsx("option",{value:"",children:"Pending"}),s.jsx("option",{value:"",children:"Approved"}),s.jsx("option",{value:"",children:"Rejected"}),s.jsx("option",{value:"",children:"Under Review"})]})]})}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"Code"}),s.jsx("th",{className:"px-4 py-3",children:"Discount Type"}),s.jsx("th",{className:"px-4 py-3",children:"Validity Period"}),s.jsx("th",{className:"px-4 py-3",children:"Campaign Owner"}),s.jsx("th",{className:"px-4 py-3",children:"Current Status"}),s.jsx("th",{className:"px-4 py-3 text-center",children:"Action"})]})}),s.jsx("tbody",{children:zle.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.code}),s.jsx("td",{className:"px-4 py-3",children:t.Discounttype}),s.jsx("td",{className:"px-4 py-3 flex items-center gap-2",children:t.validperiod}),s.jsx("td",{className:"px-4 py-3",children:t.campaignowner}),s.jsx("td",{className:"px-4 py-3",children:t.currentstatus}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hd,{className:"cursor-pointer hover:text-red-500",size:20}),s.jsx(Xf,{className:"cursor-pointer hover:text-green-500",size:16}),s.jsx("button",{className:"bg-yellow-400 text-black px-2 py-1 rounded-full  hover:bg-yellow-300",children:"Suggest Changes"}),s.jsx(De,{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))})]})})]})]}),Fle=()=>s.jsxs("div",{className:"flex  text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-semibold px-4 py-4",children:"Change Request Summary:"}),s.jsx("div",{className:"flex items-center justify-center  font-sans",children:s.jsxs("div",{className:"w-full max-w-4xl border border-yellow-400 rounded-xl p-10",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold mb-6",children:"Requested Change:"}),s.jsxs("div",{className:"flex items-center justify-around mb-8  w-full max-w-md mx-auto",children:[s.jsx("div",{className:"inline-block border border-yellow-300  px-4 py-2 rounded-full",children:"+971-500123456"}),s.jsx("div",{className:"px-4 font-semibold",children:"To"}),s.jsx("div",{className:"inline-block border border-yellow-300  px-4 py-2 rounded-full",children:"+971-585678910"})]})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold mb-6",children:"Requested Change:"}),s.jsxs("div",{className:"grid grid-cols-2 gap-y-4 text-sm mb-10 w-full max-w-md mx-auto",children:[s.jsx("p",{className:"font-semibold",children:"User:"}),s.jsx("p",{className:"",children:"Ahmed Raza"}),s.jsx("p",{className:"font-semibold",children:"User ID:"}),s.jsx("p",{className:"",children:"U-2025-01984"}),s.jsx("p",{className:"font-semibold",children:"Date of Request:"}),s.jsx("p",{className:"",children:"01 Aug 2025"})]})]}),s.jsxs("div",{className:"mb-8 w-full max-w-md mx-auto",children:[s.jsx("p",{className:"font-semibold mb-2",children:"Reason Submitted:"}),s.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."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold mb-2",children:"Supporting Document(s):"}),s.jsxs("div",{className:"space-y-2 text-sm w-full max-w-xl mx-auto",children:[s.jsxs("div",{className:" hover:text-yellow-200 cursor-pointer flex items-center",children:[s.jsx(bD,{size:20})," ",s.jsx("span",{className:"ml-2",children:"View Uploaded ID"})]}),s.jsxs("div",{className:" hover:text-yellow-200 cursor-pointer flex items-center",children:[s.jsx(bD,{size:20}),s.jsx("span",{className:"ml-2",children:"View Selfie with Document"})]})]})]})]})})]}),s.jsxs("div",{className:"mt-10 flex justify-center gap-10",children:[s.jsx("button",{className:"px-6 py-2 rounded-full text-green-900 bg-yellow-400 text-sm font-semibold",children:"Approve Request"}),s.jsx("button",{className:"px-8 py-2 rounded-full text-green-900 bg-yellow-400 text-sm font-semibold",children:"Reject Request"}),s.jsx("button",{className:"px-4 py-2 rounded-full text-green-900 bg-yellow-400 text-sm font-semibold",children:"Flag for Audit Review"})]})]})]}),Ble=()=>s.jsxs("div",{className:"flex  text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Hn,{}),s.jsxs("div",{className:"flex items-center gap-2 mb-4 m-4",children:[s.jsx(R0,{size:25,className:"text-yellow-400"}),s.jsx(De,{to:"/promocode",className:"text-yellow-400 hover:underline",children:"Back"})]}),s.jsxs("div",{className:"p-8",children:[s.jsx("h2",{className:"text-2xl font-bold mb-6",children:"Promo Code Details:"}),s.jsxs("div",{className:"w-full  text-yellow-400 flex flex-col items-center font-sans",children:[s.jsxs("div",{className:"w-full max-w-2xl border border-yellow-400 rounded-xl p-8",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-y-4 text-sm mb-8",children:[s.jsx("p",{className:"font-semibold",children:"Code:"}),s.jsx("p",{className:"",children:"AAA015"}),s.jsx("p",{className:"font-semibold",children:"Discount Structure:"}),s.jsx("p",{className:"",children:"15% off on total ride fare"}),s.jsx("p",{className:"font-semibold",children:"Redemption Limit:"}),s.jsx("p",{className:"",children:"1 per user, max 2,000 redemptions"}),s.jsx("p",{className:"font-semibold",children:"Eligible Users:"}),s.jsx("p",{className:"",children:"All UAE users"}),s.jsx("p",{className:"font-semibold",children:"Distribution Channel:"}),s.jsx("p",{className:"",children:"In-app banner + push notifications"}),s.jsx("p",{className:"col-span-2 font-bold mt-4",children:"Budget & Performance Impact"}),s.jsx("p",{className:"font-semibold",children:"Estimated Cost to Platform:"}),s.jsx("p",{className:"",children:"AED 60,000"}),s.jsx("p",{className:"font-semibold",children:"Projected Revenue Influence:"}),s.jsx("p",{className:"",children:"AED 60,000"}),s.jsx("p",{className:"font-semibold",children:"Forecasted ROI:"}),s.jsx("p",{className:"",children:"AED 60,000"}),s.jsx("p",{className:"font-semibold",children:"Break-even Target:"}),s.jsx("p",{className:"",children:"900 redemptions"})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-semibold mb-2",children:"Team Submission Notes"}),s.jsx("div",{className:"border border-yellow-400  rounded-md p-4 text-sm",children:s.jsx("p",{children:" Proposed as part of our UAE National Day awareness campaign. Targeting increased engagement in key metro areas."})})]})]}),s.jsxs("div",{className:"mt-6 flex gap-10",children:[s.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"}),s.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"}),s.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"})]})]})]})]})]});Rs.register(Ml,sc,nc,ap);const Hle=()=>{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,a)=>a.chart.data.labels[a.dataIndex]}}};return s.jsxs("div",{className:"p-4 rounded-lg",children:[s.jsx("h2",{className:"text-xl font-bold text-yellow-400 mb-4",children:"PieChart"}),s.jsx("div",{style:{width:"300px",margin:"auto"},children:s.jsx(rp,{data:t,options:e})})]})},$le=()=>{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 s.jsxs("div",{className:"flex text-yellow-400 min-h-screen overflow-hidden",children:[s.jsx(Ye,{}),s.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:[s.jsx("div",{className:"w-full max-w-2xl mx-auto border border-yellow-400 text-sm",children:s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"px-4 py-2 border-b border-yellow-300 font-semibold flex justify-between items-center",children:[s.jsx("p",{children:"Average Rating (All Time):"}),s.jsx("span",{className:"flex justify-center items-center gap-1 mt-1",children:"⭐ 4.3 / 5"})]}),s.jsxs("div",{className:"px-4 py-2 border-b border-yellow-300 font-semibold flex justify-between items-center",children:[s.jsx("p",{children:"Total Reviews Received"}),s.jsx("p",{children:"12,340"})]}),s.jsxs("div",{className:"px-4 py-2 border-b border-yellow-300 font-semibold flex justify-between items-center",children:[s.jsx("p",{children:"Reviews This Month"}),s.jsx("span",{className:"mt-1 block",children:"892"})]}),s.jsxs("div",{className:"px-4 py-2 border-b border-yellow-300 font-semibold flex justify-between items-center",children:[s.jsx("p",{children:"Flagged Reviews"}),s.jsx("span",{className:"mt-1 block",children:"36"})]})]})}),s.jsx("div",{className:"w-full max-w-5xl",children:s.jsx(Hle,{})}),s.jsxs("div",{className:"w-full max-w-5xl flex flex-col md:flex-row md:items-center justify-end gap-4 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("label",{htmlFor:"from",className:"font-medium",children:"Date Range:"}),s.jsx("input",{type:"date",id:"from",className:"bg-transparent border border-yellow-300 p-1 rounded",defaultValue:"2025-07-18"}),s.jsx("span",{children:"To"}),s.jsx("input",{type:"date",id:"to",className:"border border-yellow-300 bg-transparent p-1 rounded",defaultValue:"2025-07-21"})]}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("label",{htmlFor:"role",className:"font-medium mr-2",children:"Role:"}),s.jsxs("select",{id:"role",className:"bg-transparent bg-[#013220] focus:outline-none border border-yellow-300 p-1 rounded text-yellow-400",children:[s.jsx("option",{children:"Driver"}),s.jsx("option",{children:"Customer"})]})]})]}),s.jsx("div",{className:"w-full max-w-5xl border border-yellow-400 rounded-xl overflow-x-auto text-sm",children:s.jsxs("table",{className:"min-w-full text-left",children:[s.jsx("thead",{className:"text-yellow-300",children:s.jsxs("tr",{children:[s.jsx("th",{className:"p-3",children:"Reviewer"}),s.jsx("th",{className:"p-3",children:"Role"}),s.jsx("th",{className:"p-3",children:"Rating"}),s.jsx("th",{className:"p-3",children:"Review Text"}),s.jsx("th",{className:"p-3",children:"Target"}),s.jsx("th",{className:"p-3",children:"Date"}),s.jsx("th",{className:"p-3",children:"Action"})]})}),s.jsx("tbody",{children:t.map((e,r)=>s.jsxs("tr",{className:"border-t border-yellow-400",children:[s.jsx("td",{className:"p-3",children:e.reviewer}),s.jsx("td",{className:"p-3",children:e.role}),s.jsx("td",{className:"p-3",children:"⭐".repeat(e.rating)}),s.jsx("td",{className:"p-3",children:e.Reviewtext}),s.jsx("td",{className:"p-3",children:e.target}),s.jsx("td",{className:"p-3",children:e.date}),s.jsx("td",{className:"p-3",children:s.jsxs("div",{className:"flex gap-2 items-center",children:[e.role=="Customer"?s.jsx(bR,{size:25,className:"border border-yellow-300 rounded-full p-1 text-yellow-300"}):s.jsx(wR,{size:25,className:"text-yellow-300 border border-yellow-300 rounded-full p-1"}),s.jsx("button",{className:"bg-yellow-400 text-black px-3 py-1 rounded hover:bg-yellow-300 text-xs",children:"View"}),s.jsx(rj,{size:25,className:"border border-yellow-300 rounded-full p-1 cursor-pointer"})]})})]},r))})]})})]})]})},Yle=({chartData:t,period:e,onPeriodChange:r})=>{const a=[{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]}],n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],i=t?.datasets?t.datasets.map(h=>({name:h.label,data:h.data})):a,l=t?.labels||n,o=h=>({"Total Signups":"#DDC104","KYC Verifications":"#00FF66","Active Conversions":"#3B3BFF"})[h]||"#DDC104",c=i.map(h=>o(h.name)),d={chart:{type:"line",height:350,background:"#013220",toolbar:{show:!1}},stroke:{curve:"straight",width:3},colors:c,xaxis:{categories:l,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 s.jsxs("div",{className:"w-full max-w-5xl border-2 border-yellow-400 p-4 rounded",style:{backgroundColor:"#013220"},children:[s.jsxs("div",{className:"flex justify-between items-center border-b border-[#DDC104] pb-2 mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-[#DDC104]",children:"Analytics Chart"}),s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsxs("select",{value:e||"year",onChange:h=>r&&r(h.target.value),className:"bg-transparent border border-[#DDC104] text-[#DDC104] px-2 py-1 rounded text-sm focus:outline-none",children:[s.jsx("option",{value:"day",children:"Day"}),s.jsx("option",{value:"week",children:"Week"}),s.jsx("option",{value:"month",children:"Month"}),s.jsx("option",{value:"year",children:"Year"})]}),s.jsx(ff,{className:"text-xl text-[#DDC104] cursor-pointer"})]})]}),s.jsx(Jr,{options:d,series:i,type:"line",height:350})]})},XT=({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 s.jsx("div",{className:"w-full",children:s.jsx(Jr,{options:e,series:r,type:"area",height:40})})},_s=()=>{const t=hr(),e=E.useRef(null),r=i=>`menu-tab ${t.pathname===i?"active":""}`,a=()=>{e.current.scrollBy({left:-150,behavior:"smooth"})},n=()=>{e.current.scrollBy({left:150,behavior:"smooth"})};return s.jsxs("div",{className:"relative border-b border-yellow-400 px-6 py-2",children:[s.jsx("button",{onClick:a,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10  px-1",children:s.jsx(_0,{size:20})}),s.jsxs("div",{ref:e,className:"mx-6 flex gap-x-4 overflow-x-auto whitespace-nowrap scrollbar-hide",children:[s.jsx(De,{to:"/reportanalytics",className:r("/reportanalytics"),children:"Analytics"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/driverreport",className:r("/driverreport"),children:"Driver Reports"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/rideservicereport",className:r("/rideservicereport"),children:"Ride & Service Reports"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/earningandcommission",className:r("/earningandcommission"),children:"Earning & Commissions"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/approvalactivities",className:r("/approvalactivities"),children:"Approved Activities"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/teammlmreport",className:r("/teammlmreport"),children:"Team MLM Reports"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/withdrawalandtransaction",className:r("/withdrawalandtransaction"),children:"Withdrawal & Transaction Logs"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/customreportgenerator",className:r("/customreportgenerator"),children:"Custom Report Generator"})]}),s.jsx("button",{onClick:n,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10  px-1",children:s.jsx(L0,{size:20})})]})},Ule=()=>{const[t,e]=E.useState(null),[r,a]=E.useState(!0),[n,i]=E.useState(null),[l,o]=E.useState(""),[c,d]=E.useState(""),[h,p]=E.useState("year");E.useEffect(()=>{const N=new Date,C=new Date(N.getFullYear(),0,1),S=new Date(N.getFullYear(),11,31);o(C.toISOString().split("T")[0]),d(S.toISOString().split("T")[0])},[]);const m=async()=>{if(!(!l||!c)){a(!0),i(null);try{const N=new Date(l).toISOString().split("T")[0],C=new Date(c).toISOString().split("T")[0];console.log("API Request:",{period:h,startDate:N,endDate:C});const S=await Gt.get("/analytics/users",{params:{period:h,startDate:N,endDate:C}});S.data.success?e(S.data.data):i("Failed to fetch analytics data")}catch(N){console.error("Error fetching analytics data:",N),i(N.response?.data?.message||"Failed to fetch analytics data")}finally{a(!1)}}};E.useEffect(()=>{l&&c&&m()},[l,c,h]);const x=(N,C)=>{N==="start"?o(C):d(C)},b=N=>{p(N);const C=new Date;let S,k;switch(N){case"day":const M=new Date;M.setHours(0,0,0,0),S=M,k=new Date(M);break;case"week":const O=new Date(C);O.setDate(C.getDate()-C.getDay()+1);const _=new Date(O);_.setDate(O.getDate()+6),S=O,k=_;break;case"month":S=new Date(C.getFullYear(),C.getMonth(),1),k=new Date(C.getFullYear(),C.getMonth()+1,0);break;case"year":S=new Date(C.getFullYear(),0,1),k=new Date(C.getFullYear(),11,31);break;default:return}const A=S.toISOString().split("T")[0],T=k.toISOString().split("T")[0];console.log(`Period changed to ${N}:`,{startDateStr:A,endDateStr:T}),o(A),d(T)},v=(()=>{if(!t?.summary)return[];const{summary:N}=t;return[{total:"Total Users",percent:N.totalUsers?.toLocaleString()||"0",chartData:[10,20,15,30,25,35],Icon:z0},{total:"Active Users",percent:N.activeUsers?.toLocaleString()||"0",chartData:[5,10,8,12,14,18],Icon:MR},{total:"Verified KYC",percent:N.verifiedKYC?.toLocaleString()||"0",chartData:[5,15,25,35,30,40],Icon:aG},{total:"Unverified KYC",percent:N.unverifiedKYC?.toLocaleString()||"0",chartData:[40,35,30,25,20,15],Icon:Wq},{total:"Pending KYC",percent:N.pendingKYC?.toLocaleString()||"0",chartData:[20,18,16,14,12,10],Icon:_q},{total:"Rejected KYC",percent:N.rejectedKYC?.toLocaleString()||"0",chartData:[5,8,12,6,9,7],Icon:Hd}]})();return s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsxs("div",{className:" mr-10 px-10 py-10 overflow-hidden",children:[n&&s.jsx("div",{className:"bg-red-500/20 border border-red-500 text-red-400 px-4 py-2 rounded mb-4",children:n}),s.jsxs("div",{className:"flex items-center gap-4 py-2 justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm",children:[s.jsx("label",{htmlFor:"period",children:"Period:"}),s.jsxs("select",{id:"period",value:h,onChange:N=>b(N.target.value),className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded text-sm focus:outline-none",children:[s.jsx("option",{value:"day",children:"Day"}),s.jsx("option",{value:"week",children:"Week"}),s.jsx("option",{value:"month",children:"Month"}),s.jsx("option",{value:"year",children:"Year"})]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm",children:[s.jsx("label",{htmlFor:"from",children:"From:"}),s.jsx("input",{type:"date",id:"from",value:l,onChange:N=>x("start",N.target.value),className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded text-sm focus:outline-none"}),s.jsx("label",{htmlFor:"to",children:"To:"}),s.jsx("input",{type:"date",id:"to",value:c,onChange:N=>x("end",N.target.value),className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded text-sm focus:outline-none"})]})]}),r&&s.jsx("div",{className:"flex justify-center items-center py-20",children:s.jsx("div",{className:"text-yellow-400 text-lg",children:"Loading analytics data..."})}),!r&&v.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-1 mb-6",children:v.slice(0,1).map((N,C)=>{const S=N.Icon;return s.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:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx(S,{size:30}),s.jsx("p",{className:"text-lg font-semibold m-0 tracking-wide",children:N.total})]}),s.jsx("h2",{className:"text-3xl font-bold",children:N.percent}),s.jsx(XT,{data:N.chartData})]},C)})}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:v.slice(1).map((N,C)=>{const S=N.Icon;return s.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:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx(S,{size:30}),s.jsx("p",{className:"text-lg font-semibold m-0 tracking-wide",children:N.total})]}),s.jsx("h2",{className:"text-3xl font-bold",children:N.percent}),s.jsx(XT,{data:N.chartData})]},C)})})]}),!r&&t?.chartData&&s.jsx("div",{className:"pt-12",children:s.jsx(Yle,{chartData:t.chartData,period:h,onPeriodChange:b})})]})]})]})},Wle=({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 s.jsx("div",{className:"w-full",children:s.jsx(Jr,{options:e,series:r,type:"area",height:40})})},Xle=()=>{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 s.jsxs("div",{className:"w-full max-w-5xl border-2 border-yellow-400 p-4 rounded",style:{backgroundColor:"#013220"},children:[s.jsxs("div",{className:"flex justify-between items-center border-b border-[#DDC104] pb-2 mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-[#DDC104]",children:"Chart Type:"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("p",{className:"text-sm text-[#DDC104]",children:"Day"}),s.jsx(ff,{className:"text-xl text-[#DDC104] cursor-pointer"})]})]}),s.jsx(Jr,{options:e,series:t,type:"line",height:350})]})},Vle=[{total:"Total Driver",percent:"1,250",desc:"Last updated Aug 3, 2025",chartData:[20,18,16,14,12,10],Icon:Uq},{total:"Online Drivers",percent:"1,250",desc:"Currently active & available for booking",chartData:[5,15,25,35,30,40],Icon:MR},{total:"Unverified KYC",percent:"1,250",desc:"Driver inactive, logged out, or unavailable",chartData:[40,35,30,25,20,15],Icon:Jq}],qle=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsxs("div",{className:"mr-10 px-10 py-10 overflow-hidden",children:[s.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-4 py-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-yellow-400 text-sm",children:[s.jsx("label",{htmlFor:"from",children:"Date Range:"}),s.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"}),s.jsx("label",{htmlFor:"to",children:"To:"}),s.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"})]}),s.jsx("div",{className:"flex text-yellow-400 text-sm",children:s.jsxs("div",{className:"flex items-center",children:[s.jsx("label",{htmlFor:"service",children:"Service Type:"}),s.jsxs("select",{id:"service",className:"bg-transparent text-yellow-400  rounded focus:outline-none text-sm",children:[s.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Recovery"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Workshop"})]})]})}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("label",{htmlFor:"city",children:"City:"}),s.jsxs("select",{id:"city",className:"bg-transparent text-yellow-400  rounded focus:outline-none text-sm",children:[s.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Dubai"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Sharjah"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Abu Dhabi"})]})]}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("label",{htmlFor:"day",children:"Day:"}),s.jsxs("select",{id:"day",className:"bg-transparent text-yellow-400  rounded focus:outline-none text-sm",children:[s.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Today"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Last 7 Days"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Last 30 Days"})]})]})]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-6",children:Vle.map((t,e)=>{const r=t.Icon;return s.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:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx(r,{size:30}),s.jsx("p",{className:"text-lg font-semibold m-0 tracking-wide",children:t.total})]}),s.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),s.jsx("p",{className:"text-sm",children:t.desc}),s.jsx(Wle,{data:t.chartData})]},e)})}),s.jsx("div",{className:"pt-12",children:s.jsx(Xle,{})})]})]})]}),Gle=()=>{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 s.jsxs("div",{className:"w-full max-w-5xl",children:[s.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-4 pb-1",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-yellow-400 text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Date Range:"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded"}),s.jsx("span",{children:"To"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Platform"}),s.jsxs("select",{className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded",children:[s.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"App"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Web"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"City"}),s.jsxs("select",{className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded",children:[s.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Dubai"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Abu Dhabi"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Day"}),s.jsxs("select",{className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded",children:[s.jsx("option",{className:"bg-black text-yellow-400",children:"All"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Weekdays"}),s.jsx("option",{className:"bg-black text-yellow-400",children:"Weekends"})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-yellow-400",children:[s.jsx("span",{children:"Day"}),s.jsx(ff,{size:20})]})]}),s.jsxs("div",{className:"w-full max-w-5xl border-2 border-yellow-400 p-4 rounded",style:{backgroundColor:"#013220"},children:[s.jsxs("div",{className:"flex justify-between items-center border-b border-[#DDC104] pb-2 mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-[#DDC104]",children:"Chart Type:"}),s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx("p",{className:"text-sm text-[#DDC104]",children:"Day"}),s.jsx(ff,{className:"text-xl text-[#DDC104] cursor-pointer"})]})]}),s.jsx(Jr,{options:e,series:t,type:"line",height:350})]})]})},VT=({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 s.jsx("div",{className:"w-full",children:s.jsx(Jr,{options:e,series:r,type:"area",height:40})})},Kle=()=>{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 s.jsxs("div",{className:"w-full max-w-5xl  p-4 rounded",style:{backgroundColor:"#013220"},children:[s.jsx("h2",{className:"text-lg font-bold  mb-4",children:"Service-Wise Success Rate:"}),s.jsx(Jr,{options:e,series:t,type:"bar",height:350})]})};Rs.register(Ml,sc,nc);const Zle={id:"rotatedLabels",afterDraw(t){const{ctx:e,chartArea:{width:r,height:a}}=t,n=t.getDatasetMeta(0),i=t.data.datasets[0],l=t.data.labels,o=i.data.reduce((c,d)=>c+d,0);e.save(),e.font=" 2px sans-serif",e.fillStyle="yellow",e.textAlign="center",e.textBaseline="middle",n.data.forEach((c,d)=>{const{startAngle:h,endAngle:p,innerRadius:m,outerRadius:x}=c,b=(h+p)/2,y=(m+x)/2,v=r/2+Math.cos(b)*y,N=a/2+Math.sin(b)*y;e.translate(v,N),e.rotate(b);const C=Math.round(i.data[d]/o*100);e.fillText(`${l[d]} ${C}%`,0,0),e.rotate(-b),e.translate(-v,-N)}),e.restore()}},Qle=()=>{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 s.jsx("div",{style:{width:"80px",margin:"auto"},children:s.jsx(rp,{data:t,options:e,plugins:[Zle]})})},qT=[{total:"Total Bookings",percent:"1,832",desc:"Date Range: July 1-Aug 3",chartData:[10,20,15,30,25,35],Icon:jR},{total:"Completed Rides",percent:"1,702(93%)",chartData:[5,10,8,12,14,18],Icon:$q},{total:"Cancelled Rides",percent:"130(7%)",chartData:[20,18,16,14,12,10],Icon:Bq},{total:"Top Service Type",percent:"Ride (68%)",chartData:[5,15,25,35,30,40],Icon:vre},{total:"Peak Usage Time",percent:"5–7 PM, Mon–Fri",chartData:[40,35,30,25,20,15],Icon:Eq}],Jle=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsxs("div",{className:"mr-10 px-10 pb-6 pt-12 overflow-hidden",children:[s.jsxs("div",{className:"flex flex-wrap justify-between items-center gap-4 pb-6 ",children:[s.jsx("div",{className:"flex flex-wrap items-center gap-4 text-yellow-400 text-sm",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Date Range:"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded"}),s.jsx("span",{children:"To"}),s.jsx("input",{type:"date",className:"bg-transparent border border-yellow-400 text-yellow-400 px-2 py-1 rounded"})]})}),s.jsxs("div",{className:"flex items-center gap-2 text-yellow-400",children:[s.jsx("span",{children:"Day"}),s.jsx(ff,{size:20})]})]}),s.jsx("div",{className:"grid grid-cols-1 mb-6",children:qT.slice(0,1).map((t,e)=>{const r=t.Icon;return s.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:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx(r,{size:30,className:"text-yellow-400"}),s.jsx("p",{className:"text-xl font-semibold",children:t.total})]}),s.jsx("h2",{className:"text-3xl font-bold",children:t.percent}),s.jsx("p",{className:"text-sm text-yellow-400",children:t.desc}),s.jsx(VT,{data:t.chartData})]},e)})}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:qT.slice(1).map((t,e)=>{const r=t.Icon;return s.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:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx(r,{size:30,className:"text-yellow-400"}),s.jsx("p",{className:"text-md font-bold",children:t.total})]}),e===2?s.jsxs("div",{className:"flex items-center justify-center ",children:[s.jsx("h2",{className:"text-md ",children:t.percent}),s.jsx("div",{className:"flex-1",children:s.jsx(Qle,{})})]}):s.jsxs("div",{children:[s.jsx("h2",{className:"text-md font-bold",children:t.percent}),s.jsx(VT,{data:t.chartData})]})]},e)})}),s.jsx("div",{className:"pt-12",children:s.jsx(Gle,{})}),s.jsx("div",{className:"pt-6",children:s.jsx(Kle,{})})]})]})]});var r2={},a2={},GT;function eoe(){return GT||(GT=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r==="__proto__"}t.isUnsafeProperty=e}(a2)),a2}var n2={},KT;function t9(){return KT||(KT=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}(n2)),n2}var s2={},ZT;function r9(){return ZT||(ZT=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}(s2)),s2}var i2={},QT;function UN(){return QT||(QT=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){const a=[],n=r.length;if(n===0)return a;let i=0,l="",o="",c=!1;for(r.charCodeAt(0)===46&&(a.push(""),i++);i<n;){const d=r[i];o?d==="\\"&&i+1<n?(i++,l+=r[i]):d===o?o="":l+=d:c?d==='"'||d==="'"?o=d:d==="]"?(c=!1,a.push(l),l=""):l+=d:d==="["?(c=!0,l&&(a.push(l),l="")):d==="."?l&&(a.push(l),l=""):l+=d,i++}return l&&a.push(l),a}t.toPath=e}(i2)),i2}var JT;function WN(){return JT||(JT=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=eoe(),r=t9(),a=r9(),n=UN();function i(o,c,d){if(o==null)return d;switch(typeof c){case"string":{if(e.isUnsafeProperty(c))return d;const h=o[c];return h===void 0?r.isDeepKey(c)?i(o,n.toPath(c),d):d:h}case"number":case"symbol":{typeof c=="number"&&(c=a.toKey(c));const h=o[c];return h===void 0?d:h}default:{if(Array.isArray(c))return l(o,c,d);if(Object.is(c?.valueOf(),-0)?c="-0":c=String(c),e.isUnsafeProperty(c))return d;const h=o[c];return h===void 0?d:h}}}function l(o,c,d){if(c.length===0)return d;let h=o;for(let p=0;p<c.length;p++){if(h==null||e.isUnsafeProperty(c[p]))return d;h=h[c[p]]}return h===void 0?d:h}t.get=i}(r2)),r2}var l2,eM;function toe(){return eM||(eM=1,l2=WN().get),l2}var roe=toe();const Ko=ns(roe);var aoe=TL(),Oa=t=>t===0?0:t>0?1:-1,cn=t=>typeof t=="number"&&t!=+t,Ao=t=>typeof t=="string"&&t.indexOf("%")===t.length-1,Oe=t=>(typeof t=="number"||t instanceof Number)&&!cn(t),Ps=t=>Oe(t)||typeof t=="string",noe=0,Af=t=>{var e=++noe;return"".concat(t||"").concat(e)},rs=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Oe(e)&&typeof e!="string")return a;var i;if(Ao(e)){if(r==null)return a;var l=e.indexOf("%");i=r*parseFloat(e.slice(0,l))/100}else i=+e;return cn(i)&&(i=a),n&&r!=null&&i>r&&(i=r),i},a9=t=>{if(!Array.isArray(t))return!1;for(var e=t.length,r={},a=0;a<e;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1};function rd(t,e,r){return Oe(t)&&Oe(e)?t+r*(e-t):e}function soe(t,e,r){if(!(!t||!t.length))return t.find(a=>a&&(typeof e=="function"?e(a):Ko(a,e))===r)}var Dr=t=>t===null||typeof t>"u",dp=t=>Dr(t)?t:"".concat(t.charAt(0).toUpperCase()).concat(t.slice(1)),ioe=["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 XN(t){if(typeof t!="string")return!1;var e=ioe;return e.includes(t)}var loe=["viewBox","children"],tM=["points","pathLength"],o2={svg:loe,polygon:tM,polyline:tM},ooe=(t,e)=>{if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(E.isValidElement(t)&&(r=t.props),typeof r!="object"&&typeof r!="function")return null;var a={};return Object.keys(r).forEach(n=>{XN(n)&&(a[n]=i=>r[n](r,i))}),a},coe=(t,e,r)=>a=>(t(e,r,a),null),VN=(t,e,r)=>{if(t===null||typeof t!="object"&&typeof t!="function")return null;var a=null;return Object.keys(t).forEach(n=>{var i=t[n];XN(n)&&typeof i=="function"&&(a||(a={}),a[n]=coe(i,e,r))}),a},doe=["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 n9(t){if(typeof t!="string")return!1;var e=doe;return e.includes(t)}function up(t){var e=Object.entries(t).filter(r=>{var[a]=r;return n9(a)});return Object.fromEntries(e)}var rM=t=>typeof t=="string"?t:t?t.displayName||t.name||"Component":"",aM=null,c2=null,s9=t=>{if(t===aM&&Array.isArray(c2))return c2;var e=[];return E.Children.forEach(t,r=>{Dr(r)||(aoe.isFragment(r)?e=e.concat(s9(r.props.children)):e.push(r))}),c2=e,aM=t,e};function qN(t,e){var r=[],a=[];return Array.isArray(e)?a=e.map(n=>rM(n)):a=[rM(e)],s9(t).forEach(n=>{var i=Ko(n,"type.displayName")||Ko(n,"type.name");a.indexOf(i)!==-1&&r.push(n)}),r}var uoe=(t,e,r,a)=>{var n;if(typeof e=="symbol"||typeof e=="number")return!0;var i=(n=a&&o2?.[a])!==null&&n!==void 0?n:[],l=e.startsWith("data-"),o=typeof t!="function"&&(!!a&&i.includes(e)||n9(e)),c=!!r&&XN(e);return l||o||c},Ir=(t,e,r)=>{if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(E.isValidElement(t)&&(a=t.props),typeof a!="object"&&typeof a!="function")return null;var n={};return Object.keys(a).forEach(i=>{var l;uoe((l=a)===null||l===void 0?void 0:l[i],i,e,r)&&(n[i]=a[i])}),n},hoe=["children","width","height","viewBox","className","style","title","desc"];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 a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Yj.apply(null,arguments)}function foe(t,e){if(t==null)return{};var r,a,n=poe(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function poe(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var i9=E.forwardRef((t,e)=>{var{children:r,width:a,height:n,viewBox:i,className:l,style:o,title:c,desc:d}=t,h=foe(t,hoe),p=i||{width:a,height:n,x:0,y:0},m=Ke("recharts-surface",l);return E.createElement("svg",Yj({},Ir(h,!0,"svg"),{className:m,width:a,height:n,style:o,viewBox:"".concat(p.x," ").concat(p.y," ").concat(p.width," ").concat(p.height),ref:e}),E.createElement("title",null,c),E.createElement("desc",null,d),r)}),moe=["children","className"];function Uj(){return Uj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Uj.apply(null,arguments)}function goe(t,e){if(t==null)return{};var r,a,n=xoe(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function xoe(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var Sl=E.forwardRef((t,e)=>{var{children:r,className:a}=t,n=goe(t,moe),i=Ke("recharts-layer",a);return E.createElement("g",Uj({className:i},Ir(n,!0),{ref:e}),r)}),boe=E.createContext(null);function Ft(t){return function(){return t}}const l9=Math.cos,zx=Math.sin,os=Math.sqrt,Ix=Math.PI,ab=2*Ix,Wj=Math.PI,Xj=2*Wj,go=1e-6,yoe=Xj-go;function o9(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function voe(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return o9;const r=10**e;return function(a){this._+=a[0];for(let n=1,i=a.length;n<i;++n)this._+=Math.round(arguments[n]*r)/r+a[n]}}class woe{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?o9:voe(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,a,n){this._append`Q${+e},${+r},${this._x1=+a},${this._y1=+n}`}bezierCurveTo(e,r,a,n,i,l){this._append`C${+e},${+r},${+a},${+n},${this._x1=+i},${this._y1=+l}`}arcTo(e,r,a,n,i){if(e=+e,r=+r,a=+a,n=+n,i=+i,i<0)throw new Error(`negative radius: ${i}`);let l=this._x1,o=this._y1,c=a-e,d=n-r,h=l-e,p=o-r,m=h*h+p*p;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(m>go)if(!(Math.abs(p*c-d*h)>go)||!i)this._append`L${this._x1=e},${this._y1=r}`;else{let x=a-l,b=n-o,y=c*c+d*d,v=x*x+b*b,N=Math.sqrt(y),C=Math.sqrt(m),S=i*Math.tan((Wj-Math.acos((y+m-v)/(2*N*C)))/2),k=S/C,A=S/N;Math.abs(k-1)>go&&this._append`L${e+k*h},${r+k*p}`,this._append`A${i},${i},0,0,${+(p*x>h*b)},${this._x1=e+A*c},${this._y1=r+A*d}`}}arc(e,r,a,n,i,l){if(e=+e,r=+r,a=+a,l=!!l,a<0)throw new Error(`negative radius: ${a}`);let o=a*Math.cos(n),c=a*Math.sin(n),d=e+o,h=r+c,p=1^l,m=l?n-i:i-n;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>go||Math.abs(this._y1-h)>go)&&this._append`L${d},${h}`,a&&(m<0&&(m=m%Xj+Xj),m>yoe?this._append`A${a},${a},0,1,${p},${e-o},${r-c}A${a},${a},0,1,${p},${this._x1=d},${this._y1=h}`:m>go&&this._append`A${a},${a},0,${+(m>=Wj)},${p},${this._x1=e+a*Math.cos(i)},${this._y1=r+a*Math.sin(i)}`)}rect(e,r,a,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${a=+a}v${+n}h${-a}Z`}toString(){return this._}}function GN(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const a=Math.floor(r);if(!(a>=0))throw new RangeError(`invalid digits: ${r}`);e=a}return t},()=>new woe(e)}function KN(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function c9(t){this._context=t}c9.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 nb(t){return new c9(t)}function d9(t){return t[0]}function u9(t){return t[1]}function h9(t,e){var r=Ft(!0),a=null,n=nb,i=null,l=GN(o);t=typeof t=="function"?t:t===void 0?d9:Ft(t),e=typeof e=="function"?e:e===void 0?u9:Ft(e);function o(c){var d,h=(c=KN(c)).length,p,m=!1,x;for(a==null&&(i=n(x=l())),d=0;d<=h;++d)!(d<h&&r(p=c[d],d,c))===m&&((m=!m)?i.lineStart():i.lineEnd()),m&&i.point(+t(p,d,c),+e(p,d,c));if(x)return i=null,x+""||null}return o.x=function(c){return arguments.length?(t=typeof c=="function"?c:Ft(+c),o):t},o.y=function(c){return arguments.length?(e=typeof c=="function"?c:Ft(+c),o):e},o.defined=function(c){return arguments.length?(r=typeof c=="function"?c:Ft(!!c),o):r},o.curve=function(c){return arguments.length?(n=c,a!=null&&(i=n(a)),o):n},o.context=function(c){return arguments.length?(c==null?a=i=null:i=n(a=c),o):a},o}function mg(t,e,r){var a=null,n=Ft(!0),i=null,l=nb,o=null,c=GN(d);t=typeof t=="function"?t:t===void 0?d9:Ft(+t),e=typeof e=="function"?e:Ft(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?u9:Ft(+r);function d(p){var m,x,b,y=(p=KN(p)).length,v,N=!1,C,S=new Array(y),k=new Array(y);for(i==null&&(o=l(C=c())),m=0;m<=y;++m){if(!(m<y&&n(v=p[m],m,p))===N)if(N=!N)x=m,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),b=m-1;b>=x;--b)o.point(S[b],k[b]);o.lineEnd(),o.areaEnd()}N&&(S[m]=+t(v,m,p),k[m]=+e(v,m,p),o.point(a?+a(v,m,p):S[m],r?+r(v,m,p):k[m]))}if(C)return o=null,C+""||null}function h(){return h9().defined(n).curve(l).context(i)}return d.x=function(p){return arguments.length?(t=typeof p=="function"?p:Ft(+p),a=null,d):t},d.x0=function(p){return arguments.length?(t=typeof p=="function"?p:Ft(+p),d):t},d.x1=function(p){return arguments.length?(a=p==null?null:typeof p=="function"?p:Ft(+p),d):a},d.y=function(p){return arguments.length?(e=typeof p=="function"?p:Ft(+p),r=null,d):e},d.y0=function(p){return arguments.length?(e=typeof p=="function"?p:Ft(+p),d):e},d.y1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:Ft(+p),d):r},d.lineX0=d.lineY0=function(){return h().x(t).y(e)},d.lineY1=function(){return h().x(t).y(r)},d.lineX1=function(){return h().x(a).y(e)},d.defined=function(p){return arguments.length?(n=typeof p=="function"?p:Ft(!!p),d):n},d.curve=function(p){return arguments.length?(l=p,i!=null&&(o=l(i)),d):l},d.context=function(p){return arguments.length?(p==null?i=o=null:o=l(i=p),d):i},d}class f9{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 joe(t){return new f9(t,!0)}function Noe(t){return new f9(t,!1)}const ZN={draw(t,e){const r=os(e/Ix);t.moveTo(r,0),t.arc(0,0,r,0,ab)}},Soe={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()}},p9=os(1/3),Coe=p9*2,Aoe={draw(t,e){const r=os(e/Coe),a=r*p9;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},koe={draw(t,e){const r=os(e),a=-r/2;t.rect(a,a,r,r)}},Doe=.8908130915292852,m9=zx(Ix/10)/zx(7*Ix/10),Toe=zx(ab/10)*m9,Moe=-l9(ab/10)*m9,Eoe={draw(t,e){const r=os(e*Doe),a=Toe*r,n=Moe*r;t.moveTo(0,-r),t.lineTo(a,n);for(let i=1;i<5;++i){const l=ab*i/5,o=l9(l),c=zx(l);t.lineTo(c*r,-o*r),t.lineTo(o*a-c*n,c*a+o*n)}t.closePath()}},d2=os(3),Poe={draw(t,e){const r=-os(e/(d2*3));t.moveTo(0,r*2),t.lineTo(-d2*r,-r),t.lineTo(d2*r,-r),t.closePath()}},An=-.5,kn=os(3)/2,Vj=1/os(12),Ooe=(Vj/2+1)*3,Roe={draw(t,e){const r=os(e/Ooe),a=r/2,n=r*Vj,i=a,l=r*Vj+r,o=-i,c=l;t.moveTo(a,n),t.lineTo(i,l),t.lineTo(o,c),t.lineTo(An*a-kn*n,kn*a+An*n),t.lineTo(An*i-kn*l,kn*i+An*l),t.lineTo(An*o-kn*c,kn*o+An*c),t.lineTo(An*a+kn*n,An*n-kn*a),t.lineTo(An*i+kn*l,An*l-kn*i),t.lineTo(An*o+kn*c,An*c-kn*o),t.closePath()}};function _oe(t,e){let r=null,a=GN(n);t=typeof t=="function"?t:Ft(t||ZN),e=typeof e=="function"?e:Ft(e===void 0?64:+e);function n(){let i;if(r||(r=i=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:Ft(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:Ft(+i),n):e},n.context=function(i){return arguments.length?(r=i??null,n):r},n}function Fx(){}function Bx(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 g9(t){this._context=t}g9.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:Bx(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:Bx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Loe(t){return new g9(t)}function x9(t){this._context=t}x9.prototype={areaStart:Fx,areaEnd:Fx,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:Bx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function zoe(t){return new x9(t)}function b9(t){this._context=t}b9.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,a=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,a):this._context.moveTo(r,a);break;case 3:this._point=4;default:Bx(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ioe(t){return new b9(t)}function y9(t){this._context=t}y9.prototype={areaStart:Fx,areaEnd:Fx,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 Foe(t){return new y9(t)}function nM(t){return t<0?-1:1}function sM(t,e,r){var a=t._x1-t._x0,n=e-t._x1,i=(t._y1-t._y0)/(a||n<0&&-0),l=(r-t._y1)/(n||a<0&&-0),o=(i*n+l*a)/(a+n);return(nM(i)+nM(l))*Math.min(Math.abs(i),Math.abs(l),.5*Math.abs(o))||0}function iM(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function u2(t,e,r){var a=t._x0,n=t._y0,i=t._x1,l=t._y1,o=(i-a)/3;t._context.bezierCurveTo(a+o,n+o*e,i-o,l-o*r,i,l)}function Hx(t){this._context=t}Hx.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:u2(this,this._t0,iM(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,u2(this,iM(this,r=sM(this,t,e)),r);break;default:u2(this,this._t0,r=sM(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function v9(t){this._context=new w9(t)}(v9.prototype=Object.create(Hx.prototype)).point=function(t,e){Hx.prototype.point.call(this,e,t)};function w9(t){this._context=t}w9.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,a,n,i){this._context.bezierCurveTo(e,t,a,r,i,n)}};function Boe(t){return new Hx(t)}function Hoe(t){return new v9(t)}function j9(t){this._context=t}j9.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 a=lM(t),n=lM(e),i=0,l=1;l<r;++i,++l)this._context.bezierCurveTo(a[0][i],n[0][i],a[1][i],n[1][i],t[l],e[l]);(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 lM(t){var e,r=t.length-1,a,n=new Array(r),i=new Array(r),l=new Array(r);for(n[0]=0,i[0]=2,l[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,i[e]=4,l[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,i[r-1]=7,l[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)a=n[e]/i[e-1],i[e]-=a,l[e]-=a*l[e-1];for(n[r-1]=l[r-1]/i[r-1],e=r-2;e>=0;--e)n[e]=(l[e]-n[e+1])/i[e];for(i[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)i[e]=2*t[e+1]-n[e+1];return[n,i]}function $oe(t){return new j9(t)}function sb(t,e){this._context=t,this._t=e}sb.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 Yoe(t){return new sb(t,.5)}function Uoe(t){return new sb(t,0)}function Woe(t){return new sb(t,1)}function Ad(t,e){if((l=t.length)>1)for(var r=1,a,n,i=t[e[0]],l,o=i.length;r<l;++r)for(n=i,i=t[e[r]],a=0;a<o;++a)i[a][1]+=i[a][0]=isNaN(n[a][1])?n[a][0]:n[a][1]}function qj(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function Xoe(t,e){return t[e]}function Voe(t){const e=[];return e.key=t,e}function qoe(){var t=Ft([]),e=qj,r=Ad,a=Xoe;function n(i){var l=Array.from(t.apply(this,arguments),Voe),o,c=l.length,d=-1,h;for(const p of i)for(o=0,++d;o<c;++o)(l[o][d]=[0,+a(p,l[o].key,d,i)]).data=p;for(o=0,h=KN(e(l));o<c;++o)l[h[o]].index=o;return r(l,h),l}return n.keys=function(i){return arguments.length?(t=typeof i=="function"?i:Ft(Array.from(i)),n):t},n.value=function(i){return arguments.length?(a=typeof i=="function"?i:Ft(+i),n):a},n.order=function(i){return arguments.length?(e=i==null?qj:typeof i=="function"?i:Ft(Array.from(i)),n):e},n.offset=function(i){return arguments.length?(r=i??Ad,n):r},n}function Goe(t,e){if((a=t.length)>0){for(var r,a,n=0,i=t[0].length,l;n<i;++n){for(l=r=0;r<a;++r)l+=t[r][n][1]||0;if(l)for(r=0;r<a;++r)t[r][n][1]/=l}Ad(t,e)}}function Koe(t,e){if((n=t.length)>0){for(var r=0,a=t[e[0]],n,i=a.length;r<i;++r){for(var l=0,o=0;l<n;++l)o+=t[l][r][1]||0;a[r][1]+=a[r][0]=-o/2}Ad(t,e)}}function Zoe(t,e){if(!(!((l=t.length)>0)||!((i=(n=t[e[0]]).length)>0))){for(var r=0,a=1,n,i,l;a<i;++a){for(var o=0,c=0,d=0;o<l;++o){for(var h=t[e[o]],p=h[a][1]||0,m=h[a-1][1]||0,x=(p-m)/2,b=0;b<o;++b){var y=t[e[b]],v=y[a][1]||0,N=y[a-1][1]||0;x+=v-N}c+=p,d+=x*p}n[a-1][1]+=n[a-1][0]=r,c&&(r-=d/c)}n[a-1][1]+=n[a-1][0]=r,Ad(t,e)}}var Qoe=["type","size","sizeType"];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 a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Gj.apply(null,arguments)}function oM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function cM(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?oM(Object(r),!0).forEach(function(a){Joe(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oM(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Joe(t,e,r){return(e=ece(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ece(t){var e=tce(t,"string");return typeof e=="symbol"?e:e+""}function tce(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rce(t,e){if(t==null)return{};var r,a,n=ace(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ace(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var N9={symbolCircle:ZN,symbolCross:Soe,symbolDiamond:Aoe,symbolSquare:koe,symbolStar:Eoe,symbolTriangle:Poe,symbolWye:Roe},nce=Math.PI/180,sce=t=>{var e="symbol".concat(dp(t));return N9[e]||ZN},ice=(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 a=18*nce;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},lce=(t,e)=>{N9["symbol".concat(dp(t))]=e},S9=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,n=rce(t,Qoe),i=cM(cM({},n),{},{type:e,size:r,sizeType:a}),l=()=>{var p=sce(e),m=_oe().type(p).size(ice(r,a,e));return m()},{className:o,cx:c,cy:d}=i,h=Ir(i,!0);return c===+c&&d===+d&&r===+r?E.createElement("path",Gj({},h,{className:Ke("recharts-symbols",o),transform:"translate(".concat(c,", ").concat(d,")"),d:l()})):null};S9.registerSymbol=lce;var h2={},f2={},dM;function oce(){return dM||(dM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,a){const n=new Map;for(let i=0;i<r.length;i++){const l=r[i],o=a(l);n.has(o)||n.set(o,l)}return Array.from(n.values())}t.uniqBy=e}(f2)),f2}var p2={},uM;function C9(){return uM||(uM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r}t.identity=e}(p2)),p2}var m2={},g2={},x2={},hM;function cce(){return hM||(hM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Number.isSafeInteger(r)&&r>=0}t.isLength=e}(x2)),x2}var fM;function QN(){return fM||(fM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=cce();function r(a){return a!=null&&typeof a!="function"&&e.isLength(a.length)}t.isArrayLike=r}(g2)),g2}var b2={},pM;function dce(){return pM||(pM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="object"&&r!==null}t.isObjectLike=e}(b2)),b2}var mM;function uce(){return mM||(mM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=QN(),r=dce();function a(n){return r.isObjectLike(n)&&e.isArrayLike(n)}t.isArrayLikeObject=a}(m2)),m2}var y2={},v2={},gM;function hce(){return gM||(gM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=WN();function r(a){return function(n){return e.get(n,a)}}t.property=r}(v2)),v2}var w2={},j2={},N2={},S2={},xM;function A9(){return xM||(xM=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}(S2)),S2}var C2={},bM;function k9(){return bM||(bM=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}(C2)),C2}var A2={},yM;function JN(){return yM||(yM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,a){return r===a||Number.isNaN(r)&&Number.isNaN(a)}t.eq=e}(A2)),A2}var vM;function fce(){return vM||(vM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=eS(),r=A9(),a=k9(),n=JN();function i(p,m,x){return typeof x!="function"?e.isMatch(p,m):l(p,m,function b(y,v,N,C,S,k){const A=x(y,v,N,C,S,k);return A!==void 0?!!A:l(y,v,b,k)},new Map)}function l(p,m,x,b){if(m===p)return!0;switch(typeof m){case"object":return o(p,m,x,b);case"function":return Object.keys(m).length>0?l(p,{...m},x,b):n.eq(p,m);default:return r.isObject(p)?typeof m=="string"?m==="":!0:n.eq(p,m)}}function o(p,m,x,b){if(m==null)return!0;if(Array.isArray(m))return d(p,m,x,b);if(m instanceof Map)return c(p,m,x,b);if(m instanceof Set)return h(p,m,x,b);const y=Object.keys(m);if(p==null)return y.length===0;if(y.length===0)return!0;if(b&&b.has(m))return b.get(m)===p;b&&b.set(m,p);try{for(let v=0;v<y.length;v++){const N=y[v];if(!a.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,b))return!1}return!0}finally{b&&b.delete(m)}}function c(p,m,x,b){if(m.size===0)return!0;if(!(p instanceof Map))return!1;for(const[y,v]of m.entries()){const N=p.get(y);if(x(N,v,y,p,m,b)===!1)return!1}return!0}function d(p,m,x,b){if(m.length===0)return!0;if(!Array.isArray(p))return!1;const y=new Set;for(let v=0;v<m.length;v++){const N=m[v];let C=!1;for(let S=0;S<p.length;S++){if(y.has(S))continue;const k=p[S];let A=!1;if(x(k,N,v,p,m,b)&&(A=!0),A){y.add(S),C=!0;break}}if(!C)return!1}return!0}function h(p,m,x,b){return m.size===0?!0:p instanceof Set?d([...p],[...m],x,b):!1}t.isMatchWith=i,t.isSetMatch=h}(N2)),N2}var wM;function eS(){return wM||(wM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=fce();function r(a,n){return e.isMatchWith(a,n,()=>{})}t.isMatch=r}(j2)),j2}var k2={},D2={},T2={},jM;function D9(){return jM||(jM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Object.getOwnPropertySymbols(r).filter(a=>Object.prototype.propertyIsEnumerable.call(r,a))}t.getSymbols=e}(T2)),T2}var M2={},NM;function tS(){return NM||(NM=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}(M2)),M2}var E2={},SM;function rS(){return SM||(SM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e="[object RegExp]",r="[object String]",a="[object Number]",n="[object Boolean]",i="[object Arguments]",l="[object Symbol]",o="[object Date]",c="[object Map]",d="[object Set]",h="[object Array]",p="[object Function]",m="[object ArrayBuffer]",x="[object Object]",b="[object Error]",y="[object DataView]",v="[object Uint8Array]",N="[object Uint8ClampedArray]",C="[object Uint16Array]",S="[object Uint32Array]",k="[object BigUint64Array]",A="[object Int8Array]",T="[object Int16Array]",M="[object Int32Array]",O="[object BigInt64Array]",_="[object Float32Array]",R="[object Float64Array]";t.argumentsTag=i,t.arrayBufferTag=m,t.arrayTag=h,t.bigInt64ArrayTag=O,t.bigUint64ArrayTag=k,t.booleanTag=n,t.dataViewTag=y,t.dateTag=o,t.errorTag=b,t.float32ArrayTag=_,t.float64ArrayTag=R,t.functionTag=p,t.int16ArrayTag=T,t.int32ArrayTag=M,t.int8ArrayTag=A,t.mapTag=c,t.numberTag=a,t.objectTag=x,t.regexpTag=e,t.setTag=d,t.stringTag=r,t.symbolTag=l,t.uint16ArrayTag=C,t.uint32ArrayTag=S,t.uint8ArrayTag=v,t.uint8ClampedArrayTag=N}(E2)),E2}var P2={},CM;function pce(){return CM||(CM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}t.isTypedArray=e}(P2)),P2}var AM;function T9(){return AM||(AM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=D9(),r=tS(),a=rS(),n=k9(),i=pce();function l(h,p){return o(h,void 0,h,new Map,p)}function o(h,p,m,x=new Map,b=void 0){const y=b?.(h,p,m,x);if(y!=null)return y;if(n.isPrimitive(h))return h;if(x.has(h))return x.get(h);if(Array.isArray(h)){const v=new Array(h.length);x.set(h,v);for(let N=0;N<h.length;N++)v[N]=o(h[N],N,m,x,b);return Object.hasOwn(h,"index")&&(v.index=h.index),Object.hasOwn(h,"input")&&(v.input=h.input),v}if(h instanceof Date)return new Date(h.getTime());if(h instanceof RegExp){const v=new RegExp(h.source,h.flags);return v.lastIndex=h.lastIndex,v}if(h instanceof Map){const v=new Map;x.set(h,v);for(const[N,C]of h)v.set(N,o(C,N,m,x,b));return v}if(h instanceof Set){const v=new Set;x.set(h,v);for(const N of h)v.add(o(N,void 0,m,x,b));return v}if(typeof Buffer<"u"&&Buffer.isBuffer(h))return h.subarray();if(i.isTypedArray(h)){const v=new(Object.getPrototypeOf(h)).constructor(h.length);x.set(h,v);for(let N=0;N<h.length;N++)v[N]=o(h[N],N,m,x,b);return v}if(h instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&h instanceof SharedArrayBuffer)return h.slice(0);if(h instanceof DataView){const v=new DataView(h.buffer.slice(0),h.byteOffset,h.byteLength);return x.set(h,v),c(v,h,m,x,b),v}if(typeof File<"u"&&h instanceof File){const v=new File([h],h.name,{type:h.type});return x.set(h,v),c(v,h,m,x,b),v}if(h instanceof Blob){const v=new Blob([h],{type:h.type});return x.set(h,v),c(v,h,m,x,b),v}if(h instanceof Error){const v=new h.constructor;return x.set(h,v),v.message=h.message,v.name=h.name,v.stack=h.stack,v.cause=h.cause,c(v,h,m,x,b),v}if(typeof h=="object"&&d(h)){const v=Object.create(Object.getPrototypeOf(h));return x.set(h,v),c(v,h,m,x,b),v}return h}function c(h,p,m=h,x,b){const y=[...Object.keys(p),...e.getSymbols(p)];for(let v=0;v<y.length;v++){const N=y[v],C=Object.getOwnPropertyDescriptor(h,N);(C==null||C.writable)&&(h[N]=o(p[N],N,m,x,b))}}function d(h){switch(r.getTag(h)){case a.argumentsTag:case a.arrayTag:case a.arrayBufferTag:case a.dataViewTag:case a.booleanTag:case a.dateTag:case a.float32ArrayTag:case a.float64ArrayTag:case a.int8ArrayTag:case a.int16ArrayTag:case a.int32ArrayTag:case a.mapTag:case a.numberTag:case a.objectTag:case a.regexpTag:case a.setTag:case a.stringTag:case a.symbolTag:case a.uint8ArrayTag:case a.uint8ClampedArrayTag:case a.uint16ArrayTag:case a.uint32ArrayTag:return!0;default:return!1}}t.cloneDeepWith=l,t.cloneDeepWithImpl=o,t.copyProperties=c}(D2)),D2}var kM;function mce(){return kM||(kM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=T9();function r(a){return e.cloneDeepWithImpl(a,void 0,a,new Map,void 0)}t.cloneDeep=r}(k2)),k2}var DM;function gce(){return DM||(DM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=eS(),r=mce();function a(n){return n=r.cloneDeep(n),i=>e.isMatch(i,n)}t.matches=a}(w2)),w2}var O2={},R2={},_2={},TM;function xce(){return TM||(TM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=T9(),r=rS();function a(n,i){return e.cloneDeepWith(n,(l,o,c,d)=>{const h=i?.(l,o,c,d);if(h!=null)return h;if(typeof n=="object")switch(Object.prototype.toString.call(n)){case r.numberTag:case r.stringTag:case r.booleanTag:{const p=new n.constructor(n?.valueOf());return e.copyProperties(p,n),p}case r.argumentsTag:{const p={};return e.copyProperties(p,n),p.length=n.length,p[Symbol.iterator]=n[Symbol.iterator],p}default:return}})}t.cloneDeepWith=a}(_2)),_2}var MM;function bce(){return MM||(MM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=xce();function r(a){return e.cloneDeepWith(a)}t.cloneDeep=r}(R2)),R2}var L2={},z2={},EM;function M9(){return EM||(EM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=/^(?:0|[1-9]\d*)$/;function r(a,n=Number.MAX_SAFE_INTEGER){switch(typeof a){case"number":return Number.isInteger(a)&&a>=0&&a<n;case"symbol":return!1;case"string":return e.test(a)}}t.isIndex=r}(z2)),z2}var I2={},PM;function yce(){return PM||(PM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=tS();function r(a){return a!==null&&typeof a=="object"&&e.getTag(a)==="[object Arguments]"}t.isArguments=r}(I2)),I2}var OM;function vce(){return OM||(OM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=t9(),r=M9(),a=yce(),n=UN();function i(l,o){let c;if(Array.isArray(o)?c=o:typeof o=="string"&&e.isDeepKey(o)&&l?.[o]==null?c=n.toPath(o):c=[o],c.length===0)return!1;let d=l;for(let h=0;h<c.length;h++){const p=c[h];if((d==null||!Object.hasOwn(d,p))&&!((Array.isArray(d)||a.isArguments(d))&&r.isIndex(p)&&p<d.length))return!1;d=d[p]}return!0}t.has=i}(L2)),L2}var RM;function wce(){return RM||(RM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=eS(),r=r9(),a=bce(),n=WN(),i=vce();function l(o,c){switch(typeof o){case"object":{Object.is(o?.valueOf(),-0)&&(o="-0");break}case"number":{o=r.toKey(o);break}}return c=a.cloneDeep(c),function(d){const h=n.get(d,o);return h===void 0?i.has(d,o):c===void 0?h===void 0:e.isMatch(h,c)}}t.matchesProperty=l}(O2)),O2}var _M;function jce(){return _M||(_M=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=C9(),r=hce(),a=gce(),n=wce();function i(l){if(l==null)return e.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?n.matchesProperty(l[0],l[1]):a.matches(l);case"string":case"symbol":case"number":return r.property(l)}}t.iteratee=i}(y2)),y2}var LM;function Nce(){return LM||(LM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=oce(),r=C9(),a=uce(),n=jce();function i(l,o=r.identity){return a.isArrayLikeObject(l)?e.uniqBy(Array.from(l),n.iteratee(o)):[]}t.uniqBy=i}(h2)),h2}var F2,zM;function Sce(){return zM||(zM=1,F2=Nce().uniqBy),F2}var Cce=Sce();const IM=ns(Cce);function Ace(t,e,r){return e===!0?IM(t,r):typeof e=="function"?IM(t,e):t}var B2={exports:{}},H2={},$2={exports:{}},Y2={};/**
 * @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 FM;function kce(){if(FM)return Y2;FM=1;var t=Qo();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,a=t.useState,n=t.useEffect,i=t.useLayoutEffect,l=t.useDebugValue;function o(p,m){var x=m(),b=a({inst:{value:x,getSnapshot:m}}),y=b[0].inst,v=b[1];return i(function(){y.value=x,y.getSnapshot=m,c(y)&&v({inst:y})},[p,x,m]),n(function(){return c(y)&&v({inst:y}),p(function(){c(y)&&v({inst:y})})},[p]),l(x),x}function c(p){var m=p.getSnapshot;p=p.value;try{var x=m();return!r(p,x)}catch{return!0}}function d(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:o;return Y2.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,Y2}var BM;function Dce(){return BM||(BM=1,$2.exports=kce()),$2.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 HM;function Tce(){if(HM)return H2;HM=1;var t=Qo(),e=Dce();function r(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var a=typeof Object.is=="function"?Object.is:r,n=e.useSyncExternalStore,i=t.useRef,l=t.useEffect,o=t.useMemo,c=t.useDebugValue;return H2.useSyncExternalStoreWithSelector=function(d,h,p,m,x){var b=i(null);if(b.current===null){var y={hasValue:!1,value:null};b.current=y}else y=b.current;b=o(function(){function N(T){if(!C){if(C=!0,S=T,T=m(T),x!==void 0&&y.hasValue){var M=y.value;if(x(M,T))return k=M}return k=T}if(M=k,a(S,T))return M;var O=m(T);return x!==void 0&&x(M,O)?(S=T,M):(S=T,k=O)}var C=!1,S,k,A=p===void 0?null:p;return[function(){return N(h())},A===null?void 0:function(){return N(A())}]},[h,p,m,x]);var v=n(d,b[0],b[1]);return l(function(){y.hasValue=!0,y.value=v},[v]),c(v),v},H2}var $M;function Mce(){return $M||($M=1,B2.exports=Tce()),B2.exports}var Ece=Mce(),aS=E.createContext(null),Pce=t=>t,Fr=()=>{var t=E.useContext(aS);return t?t.store.dispatch:Pce},tx=()=>{},Oce=()=>tx,Rce=(t,e)=>t===e;function Fe(t){var e=E.useContext(aS);return Ece.useSyncExternalStoreWithSelector(e?e.subscription.addNestedSub:Oce,e?e.store.getState:tx,e?e.store.getState:tx,e?t:tx,Rce)}var U2={},W2={},X2={},YM;function _ce(){return YM||(YM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(a){return typeof a=="symbol"?1:a===null?2:a===void 0?3:a!==a?4:0}const r=(a,n,i)=>{if(a!==n){const l=e(a),o=e(n);if(l===o&&l===0){if(a<n)return i==="desc"?1:-1;if(a>n)return i==="desc"?-1:1}return i==="desc"?o-l:l-o}return 0};t.compareValues=r}(X2)),X2}var V2={},q2={},UM;function E9(){return UM||(UM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return typeof r=="symbol"||r instanceof Symbol}t.isSymbol=e}(q2)),q2}var WM;function Lce(){return WM||(WM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=E9(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function n(i,l){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||e.isSymbol(i)?!0:typeof i=="string"&&(a.test(i)||!r.test(i))||l!=null&&Object.hasOwn(l,i)}t.isKey=n}(V2)),V2}var XM;function zce(){return XM||(XM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=_ce(),r=Lce(),a=UN();function n(i,l,o,c){if(i==null)return[];o=c?void 0:o,Array.isArray(i)||(i=Object.values(i)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(o)||(o=o==null?[]:[o]),o=o.map(x=>String(x));const d=(x,b)=>{let y=x;for(let v=0;v<b.length&&y!=null;++v)y=y[b[v]];return y},h=(x,b)=>b==null||x==null?b:typeof x=="object"&&"key"in x?Object.hasOwn(b,x.key)?b[x.key]:d(b,x.path):typeof x=="function"?x(b):Array.isArray(x)?d(b,x):typeof b=="object"?b[x]:b,p=l.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:a.toPath(x)}));return i.map(x=>({original:x,criteria:p.map(b=>h(b,x))})).slice().sort((x,b)=>{for(let y=0;y<p.length;y++){const v=e.compareValues(x.criteria[y],b.criteria[y],o[y]);if(v!==0)return v}return 0}).map(x=>x.original)}t.orderBy=n}(W2)),W2}var G2={},VM;function Ice(){return VM||(VM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,a=1){const n=[],i=Math.floor(a),l=(o,c)=>{for(let d=0;d<o.length;d++){const h=o[d];Array.isArray(h)&&c<i?l(h,c+1):n.push(h)}};return l(r,0),n}t.flatten=e}(G2)),G2}var K2={},qM;function P9(){return qM||(qM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=M9(),r=QN(),a=A9(),n=JN();function i(l,o,c){return a.isObject(c)&&(typeof o=="number"&&r.isArrayLike(c)&&e.isIndex(o)&&o<c.length||typeof o=="string"&&o in c)?n.eq(c[o],l):!1}t.isIterateeCall=i}(K2)),K2}var GM;function Fce(){return GM||(GM=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=zce(),r=Ice(),a=P9();function n(i,...l){const o=l.length;return o>1&&a.isIterateeCall(i,l[0],l[1])?l=[]:o>2&&a.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),e.orderBy(i,r.flatten(l),["asc"])}t.sortBy=n}(U2)),U2}var Z2,KM;function Bce(){return KM||(KM=1,Z2=Fce().sortBy),Z2}var Hce=Bce();const ib=ns(Hce);var O9=t=>t.legend.settings,$ce=t=>t.legend.size,Yce=t=>t.legend.payload;de([Yce,O9],(t,e)=>{var{itemSorter:r}=e,a=t.flat(1);return r?ib(a,r):a});var gg=1;function Uce(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[e,r]=E.useState({height:0,left:0,top:0,width:0}),a=E.useCallback(n=>{if(n!=null){var i=n.getBoundingClientRect(),l={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(l.height-e.height)>gg||Math.abs(l.left-e.left)>gg||Math.abs(l.top-e.top)>gg||Math.abs(l.width-e.width)>gg)&&r({height:l.height,left:l.left,top:l.top,width:l.width})}},[e.width,e.height,e.top,e.left,...t]);return[e,a]}var Wce={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},R9=Yt({name:"chartLayout",initialState:Wce,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:Xce,setLayout:Vce,setChartSize:qce,setScale:Gce}=R9.actions,Kce=R9.reducer;function ZM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function QM(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ZM(Object(r),!0).forEach(function(a){Zce(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ZM(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Zce(t,e,r){return(e=Qce(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qce(t){var e=Jce(t,"string");return typeof e=="symbol"?e:e+""}function Jce(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var $x=Math.PI/180,ede=t=>t*180/Math.PI,Zr=(t,e,r,a)=>({x:t+Math.cos(-$x*a)*r,y:e+Math.sin(-$x*a)*r}),tde=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(a.left||0)-(a.right||0)),Math.abs(r-(a.top||0)-(a.bottom||0)))/2},rde=(t,e)=>{var{x:r,y:a}=t,{x:n,y:i}=e;return Math.sqrt((r-n)**2+(a-i)**2)},ade=(t,e)=>{var{x:r,y:a}=t,{cx:n,cy:i}=e,l=rde({x:r,y:a},{x:n,y:i});if(l<=0)return{radius:l,angle:0};var o=(r-n)/l,c=Math.acos(o);return a>i&&(c=2*Math.PI-c),{radius:l,angle:ede(c),angleInRadian:c}},nde=t=>{var{startAngle:e,endAngle:r}=t,a=Math.floor(e/360),n=Math.floor(r/360),i=Math.min(a,n);return{startAngle:e-i*360,endAngle:r-i*360}},sde=(t,e)=>{var{startAngle:r,endAngle:a}=e,n=Math.floor(r/360),i=Math.floor(a/360),l=Math.min(n,i);return t+l*360},ide=(t,e)=>{var{x:r,y:a}=t,{radius:n,angle:i}=ade({x:r,y:a},e),{innerRadius:l,outerRadius:o}=e;if(n<l||n>o||n===0)return null;var{startAngle:c,endAngle:d}=nde(e),h=i,p;if(c<=d){for(;h>d;)h-=360;for(;h<c;)h+=360;p=h>=c&&h<=d}else{for(;h>c;)h-=360;for(;h<d;)h+=360;p=h>=d&&h<=c}return p?QM(QM({},e),{},{radius:n,angle:sde(h,e)}):null};function _9(t,e,r){return Array.isArray(t)&&t&&e+r!==0?t.slice(e,r+1):t}function JM(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Pn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?JM(Object(r),!0).forEach(function(a){lde(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):JM(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function lde(t,e,r){return(e=ode(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ode(t){var e=cde(t,"string");return typeof e=="symbol"?e:e+""}function cde(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ba(t,e,r){return Dr(t)||Dr(e)?r:Ps(e)?Ko(t,e,r):typeof e=="function"?e(t):r}var dde=(t,e,r,a,n)=>{var i,l=-1,o=(i=e?.length)!==null&&i!==void 0?i:0;if(o<=1||t==null)return 0;if(a==="angleAxis"&&n!=null&&Math.abs(Math.abs(n[1]-n[0])-360)<=1e-6)for(var c=0;c<o;c++){var d=c>0?r[c-1].coordinate:r[o-1].coordinate,h=r[c].coordinate,p=c>=o-1?r[0].coordinate:r[c+1].coordinate,m=void 0;if(Oa(h-d)!==Oa(p-h)){var x=[];if(Oa(p-h)===Oa(n[1]-n[0])){m=p;var b=h+n[1]-n[0];x[0]=Math.min(b,(b+d)/2),x[1]=Math.max(b,(b+d)/2)}else{m=d;var y=p+n[1]-n[0];x[0]=Math.min(h,(y+h)/2),x[1]=Math.max(h,(y+h)/2)}var v=[Math.min(h,(m+h)/2),Math.max(h,(m+h)/2)];if(t>v[0]&&t<=v[1]||t>=x[0]&&t<=x[1]){({index:l}=r[c]);break}}else{var N=Math.min(d,p),C=Math.max(d,p);if(t>(N+h)/2&&t<=(C+h)/2){({index:l}=r[c]);break}}}else if(e){for(var S=0;S<o;S++)if(S===0&&t<=(e[S].coordinate+e[S+1].coordinate)/2||S>0&&S<o-1&&t>(e[S].coordinate+e[S-1].coordinate)/2&&t<=(e[S].coordinate+e[S+1].coordinate)/2||S===o-1&&t>(e[S].coordinate+e[S-1].coordinate)/2){({index:l}=e[S]);break}}return l},ude=(t,e,r)=>{if(e&&r){var{width:a,height:n}=r,{align:i,verticalAlign:l,layout:o}=e;if((o==="vertical"||o==="horizontal"&&l==="middle")&&i!=="center"&&Oe(t[i]))return Pn(Pn({},t),{},{[i]:t[i]+(a||0)});if((o==="horizontal"||o==="vertical"&&i==="center")&&l!=="middle"&&Oe(t[l]))return Pn(Pn({},t),{},{[l]:t[l]+(n||0)})}return t},lc=(t,e)=>t==="horizontal"&&e==="xAxis"||t==="vertical"&&e==="yAxis"||t==="centric"&&e==="angleAxis"||t==="radial"&&e==="radiusAxis",L9=(t,e,r,a)=>{if(a)return t.map(o=>o.coordinate);var n,i,l=t.map(o=>(o.coordinate===e&&(n=!0),o.coordinate===r&&(i=!0),o.coordinate));return n||l.push(e),i||l.push(r),l},z9=(t,e,r)=>{if(!t)return null;var{duplicateDomain:a,type:n,range:i,scale:l,realScaleType:o,isCategorical:c,categoricalDomain:d,tickCount:h,ticks:p,niceTicks:m,axisType:x}=t;if(!l)return null;var b=o==="scaleBand"&&l.bandwidth?l.bandwidth()/2:2,y=n==="category"&&l.bandwidth?l.bandwidth()/b:0;if(y=x==="angleAxis"&&i&&i.length>=2?Oa(i[0]-i[1])*2*y:y,p||m){var v=(p||m||[]).map((N,C)=>{var S=a?a.indexOf(N):N;return{coordinate:l(S)+y,value:N,offset:y,index:C}});return v.filter(N=>!cn(N.coordinate))}return c&&d?d.map((N,C)=>({coordinate:l(N)+y,value:N,index:C,offset:y})):l.ticks&&h!=null?l.ticks(h).map((N,C)=>({coordinate:l(N)+y,value:N,offset:y,index:C})):l.domain().map((N,C)=>({coordinate:l(N)+y,value:a?a[N]:N,index:C,offset:y}))},eE=1e-4,hde=t=>{var e=t.domain();if(!(!e||e.length<=2)){var r=e.length,a=t.range(),n=Math.min(a[0],a[1])-eE,i=Math.max(a[0],a[1])+eE,l=t(e[0]),o=t(e[r-1]);(l<n||l>i||o<n||o>i)&&t.domain([e[0],e[r-1]])}},fde=(t,e)=>{if(!e||e.length!==2||!Oe(e[0])||!Oe(e[1]))return t;var r=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]),n=[t[0],t[1]];return(!Oe(t[0])||t[0]<r)&&(n[0]=r),(!Oe(t[1])||t[1]>a)&&(n[1]=a),n[0]>a&&(n[0]=a),n[1]<r&&(n[1]=r),n},pde=t=>{var e=t.length;if(!(e<=0))for(var r=0,a=t[0].length;r<a;++r)for(var n=0,i=0,l=0;l<e;++l){var o=cn(t[l][r][1])?t[l][r][0]:t[l][r][1];o>=0?(t[l][r][0]=n,t[l][r][1]=n+o,n=t[l][r][1]):(t[l][r][0]=i,t[l][r][1]=i+o,i=t[l][r][1])}},mde=t=>{var e=t.length;if(!(e<=0))for(var r=0,a=t[0].length;r<a;++r)for(var n=0,i=0;i<e;++i){var l=cn(t[i][r][1])?t[i][r][0]:t[i][r][1];l>=0?(t[i][r][0]=n,t[i][r][1]=n+l,n=t[i][r][1]):(t[i][r][0]=0,t[i][r][1]=0)}},gde={sign:pde,expand:Goe,none:Ad,silhouette:Koe,wiggle:Zoe,positive:mde},xde=(t,e,r)=>{var a=gde[r],n=qoe().keys(e).value((i,l)=>+ba(i,l,0)).order(qj).offset(a);return n(t)};function bde(t){return t==null?void 0:String(t)}var tE=t=>{var{axis:e,ticks:r,offset:a,bandSize:n,entry:i,index:l}=t;if(e.type==="category")return r[l]?r[l].coordinate+a:null;var o=ba(i,e.dataKey,e.scale.domain()[l]);return Dr(o)?null:e.scale(o)-n/2+a},yde=t=>{var{numericAxis:e}=t,r=e.scale.domain();if(e.type==="number"){var a=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return a<=0&&n>=0?0:n<0?n:a}return r[0]},vde=t=>{var e=t.flat(2).filter(Oe);return[Math.min(...e),Math.max(...e)]},wde=t=>[t[0]===1/0?0:t[0],t[1]===-1/0?0:t[1]],jde=(t,e,r)=>{if(t!=null)return wde(Object.keys(t).reduce((a,n)=>{var i=t[n],{stackedData:l}=i,o=l.reduce((c,d)=>{var h=_9(d,e,r),p=vde(h);return[Math.min(c[0],p[0]),Math.max(c[1],p[1])]},[1/0,-1/0]);return[Math.min(o[0],a[0]),Math.max(o[1],a[1])]},[1/0,-1/0]))},rE=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,aE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nS=(t,e,r)=>{if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&e&&e.length>=2){for(var n=ib(e,h=>h.coordinate),i=1/0,l=1,o=n.length;l<o;l++){var c=n[l],d=n[l-1];i=Math.min((c.coordinate||0)-(d.coordinate||0),i)}return i===1/0?0:i}return r?void 0:0};function nE(t){var{tooltipEntrySettings:e,dataKey:r,payload:a,value:n,name:i}=t;return Pn(Pn({},e),{},{dataKey:r,payload:a,value:n,name:i})}function I9(t,e){if(t)return String(t);if(typeof e=="string")return e}function Nde(t,e,r,a,n){if(r==="horizontal"||r==="vertical"){var i=t>=n.left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height;return i?{x:t,y:e}:null}return a?ide({x:t,y:e},a):null}var Sde=(t,e,r,a)=>{var n=e.find(d=>d&&d.index===r);if(n){if(t==="horizontal")return{x:n.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:n.coordinate};if(t==="centric"){var i=n.coordinate,{radius:l}=a;return Pn(Pn(Pn({},a),Zr(a.cx,a.cy,l,i)),{},{angle:i,radius:l})}var o=n.coordinate,{angle:c}=a;return Pn(Pn(Pn({},a),Zr(a.cx,a.cy,o,c)),{},{angle:c,radius:o})}return{x:0,y:0}},Cde=(t,e)=>e==="horizontal"?t.x:e==="vertical"?t.y:e==="centric"?t.angle:t.radius,Ai=t=>t.layout.width,ki=t=>t.layout.height,Ade=t=>t.layout.scale,F9=t=>t.layout.margin,sS=de(t=>t.cartesianAxis.xAxis,t=>Object.values(t)),iS=de(t=>t.cartesianAxis.yAxis,t=>Object.values(t)),kde="data-recharts-item-index",Dde="data-recharts-item-data-key",lb=60;function sE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function rl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?sE(Object(r),!0).forEach(function(a){Tde(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):sE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Tde(t,e,r){return(e=Mde(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mde(t){var e=Ede(t,"string");return typeof e=="symbol"?e:e+""}function Ede(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Pde=t=>t.brush.height,Br=de([Ai,ki,F9,Pde,sS,iS,O9,$ce],(t,e,r,a,n,i,l,o)=>{var c=i.reduce((b,y)=>{var{orientation:v}=y;if(!y.mirror&&!y.hide){var N=typeof y.width=="number"?y.width:lb;return rl(rl({},b),{},{[v]:b[v]+N})}return b},{left:r.left||0,right:r.right||0}),d=n.reduce((b,y)=>{var{orientation:v}=y;return!y.mirror&&!y.hide?rl(rl({},b),{},{[v]:Ko(b,"".concat(v))+y.height}):b},{top:r.top||0,bottom:r.bottom||0}),h=rl(rl({},d),c),p=h.bottom;h.bottom+=a,h=ude(h,l,o);var m=t-h.left-h.right,x=e-h.top-h.bottom;return rl(rl({brushBottom:p},h),{},{width:Math.max(m,0),height:Math.max(x,0)})}),Ode=de(Br,t=>({x:t.left,y:t.top,width:t.width,height:t.height})),B9=de(Ai,ki,(t,e)=>({x:0,y:0,width:t,height:e})),Rde=E.createContext(null),$n=()=>E.useContext(Rde)!=null,ob=t=>t.brush,cb=de([ob,Br,F9],(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})),lS=()=>{var t,e=$n(),r=Fe(Ode),a=Fe(cb),n=(t=Fe(ob))===null||t===void 0?void 0:t.padding;return!e||!a||!n?r:{width:a.width-n.left-n.right,height:a.height-n.top-n.bottom,x:n.left,y:n.top}},_de={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},H9=()=>{var t;return(t=Fe(Br))!==null&&t!==void 0?t:_de},$9=()=>Fe(Ai),Y9=()=>Fe(ki),At=t=>t.layout.layoutType,oS=()=>Fe(At),Lde={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},U9=Yt({name:"legend",initialState:Lde,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=mi(t).payload.indexOf(e.payload);r>-1&&t.payload.splice(r,1)}}}),{setLegendSize:W2e,setLegendSettings:X2e,addLegendPayload:zde,removeLegendPayload:Ide}=U9.actions,Fde=U9.reducer;function Kj(){return Kj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Kj.apply(null,arguments)}function iE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Q2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?iE(Object(r),!0).forEach(function(a){Bde(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Bde(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 a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Yde(t){return Array.isArray(t)&&Ps(t[0])&&Ps(t[1])?t.join(" ~ "):t}var Ude=t=>{var{separator:e=" : ",contentStyle:r={},itemStyle:a={},labelStyle:n={},payload:i,formatter:l,itemSorter:o,wrapperClassName:c,labelClassName:d,label:h,labelFormatter:p,accessibilityLayer:m=!1}=t,x=()=>{if(i&&i.length){var A={padding:0,margin:0},T=(o?ib(i,o):i).map((M,O)=>{if(M.type==="none")return null;var _=M.formatter||l||Yde,{value:R,name:L}=M,z=R,F=L;if(_){var Y=_(R,L,M,O,i);if(Array.isArray(Y))[z,F]=Y;else if(Y!=null)z=Y;else return null}var X=Q2({display:"block",paddingTop:4,paddingBottom:4,color:M.color||"#000"},a);return E.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(O),style:X},Ps(F)?E.createElement("span",{className:"recharts-tooltip-item-name"},F):null,Ps(F)?E.createElement("span",{className:"recharts-tooltip-item-separator"},e):null,E.createElement("span",{className:"recharts-tooltip-item-value"},z),E.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return E.createElement("ul",{className:"recharts-tooltip-item-list",style:A},T)}return null},b=Q2({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),y=Q2({margin:0},n),v=!Dr(h),N=v?h:"",C=Ke("recharts-default-tooltip",c),S=Ke("recharts-tooltip-label",d);v&&p&&i!==void 0&&i!==null&&(N=p(h,i));var k=m?{role:"status","aria-live":"assertive"}:{};return E.createElement("div",Kj({className:C,style:b},k),E.createElement("p",{className:S,style:y},E.isValidElement(N)?N:"".concat(N)),x())},yh="recharts-tooltip-wrapper",Wde={visibility:"hidden"};function Xde(t){var{coordinate:e,translateX:r,translateY:a}=t;return Ke(yh,{["".concat(yh,"-right")]:Oe(r)&&e&&Oe(e.x)&&r>=e.x,["".concat(yh,"-left")]:Oe(r)&&e&&Oe(e.x)&&r<e.x,["".concat(yh,"-bottom")]:Oe(a)&&e&&Oe(e.y)&&a>=e.y,["".concat(yh,"-top")]:Oe(a)&&e&&Oe(e.y)&&a<e.y})}function lE(t){var{allowEscapeViewBox:e,coordinate:r,key:a,offsetTopLeft:n,position:i,reverseDirection:l,tooltipDimension:o,viewBox:c,viewBoxDimension:d}=t;if(i&&Oe(i[a]))return i[a];var h=r[a]-o-(n>0?n:0),p=r[a]+n;if(e[a])return l[a]?h:p;var m=c[a];if(m==null)return 0;if(l[a]){var x=h,b=m;return x<b?Math.max(p,m):Math.max(h,m)}if(d==null)return 0;var y=p+o,v=m+d;return y>v?Math.max(h,m):Math.max(p,m)}function Vde(t){var{translateX:e,translateY:r,useTranslate3d:a}=t;return{transform:a?"translate3d(".concat(e,"px, ").concat(r,"px, 0)"):"translate(".concat(e,"px, ").concat(r,"px)")}}function qde(t){var{allowEscapeViewBox:e,coordinate:r,offsetTopLeft:a,position:n,reverseDirection:i,tooltipBox:l,useTranslate3d:o,viewBox:c}=t,d,h,p;return l.height>0&&l.width>0&&r?(h=lE({allowEscapeViewBox:e,coordinate:r,key:"x",offsetTopLeft:a,position:n,reverseDirection:i,tooltipDimension:l.width,viewBox:c,viewBoxDimension:c.width}),p=lE({allowEscapeViewBox:e,coordinate:r,key:"y",offsetTopLeft:a,position:n,reverseDirection:i,tooltipDimension:l.height,viewBox:c,viewBoxDimension:c.height}),d=Vde({translateX:h,translateY:p,useTranslate3d:o})):d=Wde,{cssProperties:d,cssClasses:Xde({translateX:h,translateY:p,coordinate:r})}}function oE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function xg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?oE(Object(r),!0).forEach(function(a){Zj(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):oE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Zj(t,e,r){return(e=Gde(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gde(t){var e=Kde(t,"string");return typeof e=="symbol"?e:e+""}function Kde(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Zde extends E.PureComponent{constructor(){super(...arguments),Zj(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Zj(this,"handleKeyDown",e=>{if(e.key==="Escape"){var r,a,n,i;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(a=this.props.coordinate)===null||a===void 0?void 0:a.x)!==null&&r!==void 0?r:0,y:(n=(i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==null&&n!==void 0?n: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:a,animationEasing:n,children:i,coordinate:l,hasPayload:o,isAnimationActive:c,offset:d,position:h,reverseDirection:p,useTranslate3d:m,viewBox:x,wrapperStyle:b,lastBoundingBox:y,innerRef:v,hasPortalFromProps:N}=this.props,{cssClasses:C,cssProperties:S}=qde({allowEscapeViewBox:r,coordinate:l,offsetTopLeft:d,position:h,reverseDirection:p,tooltipBox:{height:y.height,width:y.width},useTranslate3d:m,viewBox:x}),k=N?{}:xg(xg({transition:c&&e?"transform ".concat(a,"ms ").concat(n):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&e&&o?"visible":"hidden",position:"absolute",top:0,left:0}),A=xg(xg({},k),{},{visibility:!this.state.dismissed&&e&&o?"visible":"hidden"},b);return E.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:C,style:A,ref:v},i)}}var Qde=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),hp={isSsr:Qde()},W9=()=>Fe(t=>t.rootProps.accessibilityLayer);function dn(t){return Number.isFinite(t)}function Yx(t){return typeof t=="number"&&t>0&&Number.isFinite(t)}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 a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Qj.apply(null,arguments)}function cE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function dE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cE(Object(r),!0).forEach(function(a){Jde(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}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 a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var uE={curveBasisClosed:zoe,curveBasisOpen:Ioe,curveBasis:Loe,curveBumpX:joe,curveBumpY:Noe,curveLinearClosed:Foe,curveLinear:nb,curveMonotoneX:Boe,curveMonotoneY:Hoe,curveNatural:$oe,curveStep:Yoe,curveStepAfter:Woe,curveStepBefore:Uoe},bg=t=>dn(t.x)&&dn(t.y),vh=t=>t.x,wh=t=>t.y,rue=(t,e)=>{if(typeof t=="function")return t;var r="curve".concat(dp(t));return(r==="curveMonotone"||r==="curveBump")&&e?uE["".concat(r).concat(e==="vertical"?"Y":"X")]:uE[r]||nb},aue=t=>{var{type:e="linear",points:r=[],baseLine:a,layout:n,connectNulls:i=!1}=t,l=rue(e,n),o=i?r.filter(bg):r,c;if(Array.isArray(a)){var d=i?a.filter(p=>bg(p)):a,h=o.map((p,m)=>dE(dE({},p),{},{base:d[m]}));return n==="vertical"?c=mg().y(wh).x1(vh).x0(p=>p.base.x):c=mg().x(vh).y1(wh).y0(p=>p.base.y),c.defined(bg).curve(l),c(h)}return n==="vertical"&&Oe(a)?c=mg().y(wh).x1(vh).x0(a):Oe(a)?c=mg().x(vh).y1(wh).y0(a):c=h9().x(vh).y(wh),c.defined(bg).curve(l),c(o)},nue=t=>{var{className:e,points:r,path:a,pathRef:n}=t;if((!r||!r.length)&&!a)return null;var i=r&&r.length?aue(t):a;return E.createElement("path",Qj({},up(t),ooe(t),{className:Ke("recharts-curve",e),d:i===null?void 0:i,ref:n}))},sue=["x","y","top","left","width","height","className"];function Jj(){return Jj=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Jj.apply(null,arguments)}function hE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function iue(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hE(Object(r),!0).forEach(function(a){lue(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function lue(t,e,r){return(e=oue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oue(t){var e=cue(t,"string");return typeof e=="symbol"?e:e+""}function cue(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function due(t,e){if(t==null)return{};var r,a,n=uue(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function uue(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var hue=(t,e,r,a,n,i)=>"M".concat(t,",").concat(n,"v").concat(a,"M").concat(i,",").concat(e,"h").concat(r),fue=t=>{var{x:e=0,y:r=0,top:a=0,left:n=0,width:i=0,height:l=0,className:o}=t,c=due(t,sue),d=iue({x:e,y:r,top:a,left:n,width:i,height:l},c);return!Oe(e)||!Oe(r)||!Oe(i)||!Oe(l)||!Oe(a)||!Oe(n)?null:E.createElement("path",Jj({},Ir(d,!0),{className:Ke("recharts-cross",o),d:hue(e,r,i,l,a,n)}))};function pue(t,e,r,a){var n=a/2;return{stroke:"none",fill:"#ccc",x:t==="horizontal"?e.x-n:r.left+.5,y:t==="horizontal"?r.top+.5:e.y-n,width:t==="horizontal"?a:r.width-1,height:t==="horizontal"?r.height-1:a}}function fE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function mue(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?fE(Object(r),!0).forEach(function(a){gue(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function gue(t,e,r){return(e=xue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xue(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 a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function El(t,e){var r=mue({},t),a=e,n=Object.keys(e),i=n.reduce((l,o)=>(l[o]===void 0&&a[o]!==void 0&&(l[o]=a[o]),l),r);return i}var J2={},ew={},tw={},pE;function yue(){return pE||(pE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){if(!r||typeof r!="object")return!1;const a=Object.getPrototypeOf(r);return a===null||a===Object.prototype||Object.getPrototypeOf(a)===null?Object.prototype.toString.call(r)==="[object Object]":!1}t.isPlainObject=e}(tw)),tw}var mE;function vue(){return mE||(mE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=yue(),r=D9(),a=tS(),n=rS(),i=JN();function l(d,h,p){return o(d,h,void 0,void 0,void 0,void 0,p)}function o(d,h,p,m,x,b,y){const v=y(d,h,p,m,x,b);if(v!==void 0)return v;if(typeof d==typeof h)switch(typeof d){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return d===h;case"number":return d===h||Object.is(d,h);case"function":return d===h;case"object":return c(d,h,b,y)}return c(d,h,b,y)}function c(d,h,p,m){if(Object.is(d,h))return!0;let x=a.getTag(d),b=a.getTag(h);if(x===n.argumentsTag&&(x=n.objectTag),b===n.argumentsTag&&(b=n.objectTag),x!==b)return!1;switch(x){case n.stringTag:return d.toString()===h.toString();case n.numberTag:{const N=d.valueOf(),C=h.valueOf();return i.eq(N,C)}case n.booleanTag:case n.dateTag:case n.symbolTag:return Object.is(d.valueOf(),h.valueOf());case n.regexpTag:return d.source===h.source&&d.flags===h.flags;case n.functionTag:return d===h}p=p??new Map;const y=p.get(d),v=p.get(h);if(y!=null&&v!=null)return y===h;p.set(d,h),p.set(h,d);try{switch(x){case n.mapTag:{if(d.size!==h.size)return!1;for(const[N,C]of d.entries())if(!h.has(N)||!o(C,h.get(N),N,d,h,p,m))return!1;return!0}case n.setTag:{if(d.size!==h.size)return!1;const N=Array.from(d.values()),C=Array.from(h.values());for(let S=0;S<N.length;S++){const k=N[S],A=C.findIndex(T=>o(k,T,void 0,d,h,p,m));if(A===-1)return!1;C.splice(A,1)}return!0}case n.arrayTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:case n.bigUint64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.bigInt64ArrayTag:case n.float32ArrayTag:case n.float64ArrayTag:{if(typeof Buffer<"u"&&Buffer.isBuffer(d)!==Buffer.isBuffer(h)||d.length!==h.length)return!1;for(let N=0;N<d.length;N++)if(!o(d[N],h[N],N,d,h,p,m))return!1;return!0}case n.arrayBufferTag:return d.byteLength!==h.byteLength?!1:c(new Uint8Array(d),new Uint8Array(h),p,m);case n.dataViewTag:return d.byteLength!==h.byteLength||d.byteOffset!==h.byteOffset?!1:c(new Uint8Array(d),new Uint8Array(h),p,m);case n.errorTag:return d.name===h.name&&d.message===h.message;case n.objectTag:{if(!(c(d.constructor,h.constructor,p,m)||e.isPlainObject(d)&&e.isPlainObject(h)))return!1;const C=[...Object.keys(d),...r.getSymbols(d)],S=[...Object.keys(h),...r.getSymbols(h)];if(C.length!==S.length)return!1;for(let k=0;k<C.length;k++){const A=C[k],T=d[A];if(!Object.hasOwn(h,A))return!1;const M=h[A];if(!o(T,M,A,d,h,p,m))return!1}return!0}default:return!1}}finally{p.delete(d),p.delete(h)}}t.isEqualWith=l}(ew)),ew}var rw={},gE;function wue(){return gE||(gE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(){}t.noop=e}(rw)),rw}var xE;function jue(){return xE||(xE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=vue(),r=wue();function a(n,i){return e.isEqualWith(n,i,r.noop)}t.isEqual=a}(J2)),J2}var aw,bE;function Nue(){return bE||(bE=1,aw=jue().isEqual),aw}var Sue=Nue();const Cue=ns(Sue);var Ux=1e-4,X9=(t,e)=>[0,3*t,3*e-6*t,3*t-3*e+1],V9=(t,e)=>t.map((r,a)=>r*e**a).reduce((r,a)=>r+a),yE=(t,e)=>r=>{var a=X9(t,e);return V9(a,r)},Aue=(t,e)=>r=>{var a=X9(t,e),n=[...a.map((i,l)=>i*l).slice(1),0];return V9(n,r)},vE=function(){for(var e,r,a,n,i=arguments.length,l=new Array(i),o=0;o<i;o++)l[o]=arguments[o];if(l.length===1)switch(l[0]){case"linear":[e,a,r,n]=[0,0,1,1];break;case"ease":[e,a,r,n]=[.25,.1,.25,1];break;case"ease-in":[e,a,r,n]=[.42,0,1,1];break;case"ease-out":[e,a,r,n]=[.42,0,.58,1];break;case"ease-in-out":[e,a,r,n]=[0,0,.58,1];break;default:{var c=l[0].split("(");c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4&&([e,a,r,n]=c[1].split(")")[0].split(",").map(b=>parseFloat(b)))}}else l.length===4&&([e,a,r,n]=l);var d=yE(e,r),h=yE(a,n),p=Aue(e,r),m=b=>b>1?1:b<0?0:b,x=b=>{for(var y=b>1?1:b,v=y,N=0;N<8;++N){var C=d(v)-y,S=p(v);if(Math.abs(C-y)<Ux||S<Ux)return h(v);v=m(v-C/S)}return h(v)};return x.isStepper=!1,x},kue=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:a=8,dt:n=17}=e,i=(l,o,c)=>{var d=-(l-o)*r,h=c*a,p=c+(d-h)*n/1e3,m=c*n/1e3+l;return Math.abs(m-o)<Ux&&Math.abs(p)<Ux?[o,0]:[m,p]};return i.isStepper=!0,i.dt=n,i},q9=t=>{if(typeof t=="string")switch(t){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return vE(t);case"spring":return kue();default:if(t.split("(")[0]==="cubic-bezier")return vE(t)}return typeof t=="function"?t:null};function wE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function jE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wE(Object(r),!0).forEach(function(a){Due(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Due(t,e,r){return(e=Tue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tue(t){var e=Mue(t,"string");return typeof e=="symbol"?e:e+""}function Mue(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Eue=t=>t.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())),Pue=(t,e,r)=>t.map(a=>"".concat(Eue(a)," ").concat(e,"ms ").concat(r)).join(","),Oue=(t,e)=>[Object.keys(t),Object.keys(e)].reduce((r,a)=>r.filter(n=>a.includes(n))),kf=(t,e)=>Object.keys(e).reduce((r,a)=>jE(jE({},r),{},{[a]:t(a,e[a])}),{});function NE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Xr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?NE(Object(r),!0).forEach(function(a){Rue(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):NE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Rue(t,e,r){return(e=_ue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _ue(t){var e=Lue(t,"string");return typeof e=="symbol"?e:e+""}function Lue(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Wx=(t,e,r)=>t+(e-t)*r,e4=t=>{var{from:e,to:r}=t;return e!==r},G9=(t,e,r)=>{var a=kf((n,i)=>{if(e4(i)){var[l,o]=t(i.from,i.to,i.velocity);return Xr(Xr({},i),{},{from:l,velocity:o})}return i},e);return r<1?kf((n,i)=>e4(i)?Xr(Xr({},i),{},{velocity:Wx(i.velocity,a[n].velocity,r),from:Wx(i.from,a[n].from,r)}):i,e):G9(t,a,r-1)};function zue(t,e,r,a,n,i){var l,o=a.reduce((m,x)=>Xr(Xr({},m),{},{[x]:{from:t[x],velocity:0,to:e[x]}}),{}),c=()=>kf((m,x)=>x.from,o),d=()=>!Object.values(o).filter(e4).length,h=null,p=m=>{l||(l=m);var x=m-l,b=x/r.dt;o=G9(r,o,b),n(Xr(Xr(Xr({},t),e),c())),l=m,d()||(h=i.setTimeout(p))};return()=>(h=i.setTimeout(p),()=>{h()})}function Iue(t,e,r,a,n,i,l){var o=null,c=n.reduce((p,m)=>Xr(Xr({},p),{},{[m]:[t[m],e[m]]}),{}),d,h=p=>{d||(d=p);var m=(p-d)/a,x=kf((y,v)=>Wx(...v,r(m)),c);if(i(Xr(Xr(Xr({},t),e),x)),m<1)o=l.setTimeout(h);else{var b=kf((y,v)=>Wx(...v,r(1)),c);i(Xr(Xr(Xr({},t),e),b))}};return()=>(o=l.setTimeout(h),()=>{o()})}const K9=(t,e,r,a,n,i)=>{var l=Oue(t,e);return r.isStepper===!0?zue(t,e,r,l,n,i):Iue(t,e,r,a,l,n,i)};function Fue(t){var e,r=()=>null,a=!1,n=null,i=l=>{if(!a){if(Array.isArray(l)){if(!l.length)return;var o=l,[c,...d]=o;if(typeof c=="number"){n=t.setTimeout(i.bind(null,d),c);return}i(c),n=t.setTimeout(i.bind(null,d));return}typeof l=="string"&&(e=l,r(e)),typeof l=="object"&&(e=l,r(e)),typeof l=="function"&&l()}};return{stop:()=>{a=!0},start:l=>{a=!1,n&&(n(),n=null),i(l)},subscribe:l=>(r=l,()=>{r=()=>null}),getTimeoutController:()=>t}}class Bue{setTimeout(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=performance.now(),n=null,i=l=>{l-a>=r?e(l):typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(i))};return n=requestAnimationFrame(i),()=>{cancelAnimationFrame(n)}}}function Hue(){return Fue(new Bue)}var $ue=E.createContext(Hue);function Z9(t,e){var r=E.useContext($ue);return E.useMemo(()=>e??r(t),[t,e,r])}var Yue=["children","begin","duration","attributeName","easing","isActive","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart","animationManager"];function t4(){return t4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},t4.apply(null,arguments)}function Uue(t,e){if(t==null)return{};var r,a,n=Wue(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Wue(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function SE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function al(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?SE(Object(r),!0).forEach(function(a){ko(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):SE(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ko(t,e,r){return(e=Xue(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xue(t){var e=Vue(t,"string");return typeof e=="symbol"?e:e+""}function Vue(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class cS extends E.PureComponent{constructor(e,r){super(e,r),ko(this,"mounted",!1),ko(this,"manager",void 0),ko(this,"stopJSAnimation",null),ko(this,"unSubscribe",null);var{isActive:a,attributeName:n,from:i,to:l,children:o,duration:c,animationManager:d}=this.props;if(this.manager=d,this.handleStyleChange=this.handleStyleChange.bind(this),this.changeStyle=this.changeStyle.bind(this),!a||c<=0){this.state={style:{}},typeof o=="function"&&(this.state={style:l});return}if(i){if(typeof o=="function"){this.state={style:i};return}this.state={style:n?{[n]:i}:i}}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:a,attributeName:n,shouldReAnimate:i,to:l,from:o}=this.props,{style:c}=this.state;if(a){if(!r){var d={style:n?{[n]:l}:l};this.state&&c&&(n&&c[n]!==l||!n&&c!==l)&&this.setState(d);return}if(!(Cue(e.to,l)&&e.canBegin&&e.isActive)){var h=!e.canBegin||!e.isActive;this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var p=h||i?o:e.to;if(this.state&&c){var m={style:n?{[n]:p}:p};(n&&c[n]!==p||!n&&c!==p)&&this.setState(m)}this.runAnimation(al(al({},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:a,duration:n,easing:i,begin:l,onAnimationEnd:o,onAnimationStart:c}=e,d=K9(r,a,q9(i),n,this.changeStyle,this.manager.getTimeoutController()),h=()=>{this.stopJSAnimation=d()};this.manager.start([c,l,h,n,o])}runAnimation(e){var{begin:r,duration:a,attributeName:n,to:i,easing:l,onAnimationStart:o,onAnimationEnd:c,children:d}=e;if(this.unSubscribe=this.manager.subscribe(this.handleStyleChange),typeof l=="function"||typeof d=="function"||l==="spring"){this.runJSAnimation(e);return}var h=n?{[n]:i}:i,p=Pue(Object.keys(h),a,l);this.manager.start([o,r,al(al({},h),{},{transition:p}),a,c])}render(){var e=this.props,{children:r,begin:a,duration:n,attributeName:i,easing:l,isActive:o,from:c,to:d,canBegin:h,onAnimationEnd:p,shouldReAnimate:m,onAnimationReStart:x,animationManager:b}=e,y=Uue(e,Yue),v=E.Children.count(r),N=this.state.style;if(typeof r=="function")return r(N);if(!o||v===0||n<=0)return r;var C=S=>{var{style:k={},className:A}=S.props,T=E.cloneElement(S,al(al({},y),{},{style:al(al({},k),N),className:A}));return T};return v===1?C(E.Children.only(r)):E.createElement("div",null,E.Children.map(r,S=>C(S)))}}ko(cS,"displayName","Animate");ko(cS,"defaultProps",{begin:0,duration:1e3,attributeName:"",easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}});function Xx(t){var e,r=Z9((e=t.attributeName)!==null&&e!==void 0?e:Object.keys(t.to).join(","),t.animationManager);return E.createElement(cS,t4({},t,{animationManager:r}))}function Vx(){return Vx=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Vx.apply(null,arguments)}var CE=(t,e,r,a,n)=>{var i=Math.min(Math.abs(r)/2,Math.abs(a)/2),l=a>=0?1:-1,o=r>=0?1:-1,c=a>=0&&r>=0||a<0&&r<0?1:0,d;if(i>0&&n instanceof Array){for(var h=[0,0,0,0],p=0,m=4;p<m;p++)h[p]=n[p]>i?i:n[p];d="M".concat(t,",").concat(e+l*h[0]),h[0]>0&&(d+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(c,",").concat(t+o*h[0],",").concat(e)),d+="L ".concat(t+r-o*h[1],",").concat(e),h[1]>0&&(d+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(c,`,
        `).concat(t+r,",").concat(e+l*h[1])),d+="L ".concat(t+r,",").concat(e+a-l*h[2]),h[2]>0&&(d+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(c,`,
        `).concat(t+r-o*h[2],",").concat(e+a)),d+="L ".concat(t+o*h[3],",").concat(e+a),h[3]>0&&(d+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(c,`,
        `).concat(t,",").concat(e+a-l*h[3])),d+="Z"}else if(i>0&&n===+n&&n>0){var x=Math.min(i,n);d="M ".concat(t,",").concat(e+l*x,`
            A `).concat(x,",").concat(x,",0,0,").concat(c,",").concat(t+o*x,",").concat(e,`
            L `).concat(t+r-o*x,",").concat(e,`
            A `).concat(x,",").concat(x,",0,0,").concat(c,",").concat(t+r,",").concat(e+l*x,`
            L `).concat(t+r,",").concat(e+a-l*x,`
            A `).concat(x,",").concat(x,",0,0,").concat(c,",").concat(t+r-o*x,",").concat(e+a,`
            L `).concat(t+o*x,",").concat(e+a,`
            A `).concat(x,",").concat(x,",0,0,").concat(c,",").concat(t,",").concat(e+a-l*x," Z")}else d="M ".concat(t,",").concat(e," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return d},que={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Q9=t=>{var e=El(t,que),r=E.useRef(null),[a,n]=E.useState(-1);E.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var N=r.current.getTotalLength();N&&n(N)}catch{}},[]);var{x:i,y:l,width:o,height:c,radius:d,className:h}=e,{animationEasing:p,animationDuration:m,animationBegin:x,isAnimationActive:b,isUpdateAnimationActive:y}=e;if(i!==+i||l!==+l||o!==+o||c!==+c||o===0||c===0)return null;var v=Ke("recharts-rectangle",h);return y?E.createElement(Xx,{canBegin:a>0,from:{width:o,height:c,x:i,y:l},to:{width:o,height:c,x:i,y:l},duration:m,animationEasing:p,isActive:y},N=>{var{width:C,height:S,x:k,y:A}=N;return E.createElement(Xx,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:m,isActive:b,easing:p},E.createElement("path",Vx({},Ir(e,!0),{className:v,d:CE(k,A,C,S,d),ref:r})))}):E.createElement("path",Vx({},Ir(e,!0),{className:v,d:CE(i,l,o,c,d)}))};function J9(t){var{cx:e,cy:r,radius:a,startAngle:n,endAngle:i}=t,l=Zr(e,r,a,n),o=Zr(e,r,a,i);return{points:[l,o],cx:e,cy:r,radius:a,startAngle:n,endAngle:i}}function r4(){return r4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},r4.apply(null,arguments)}var Gue=(t,e)=>{var r=Oa(e-t),a=Math.min(Math.abs(e-t),359.999);return r*a},yg=t=>{var{cx:e,cy:r,radius:a,angle:n,sign:i,isExternal:l,cornerRadius:o,cornerIsExternal:c}=t,d=o*(l?1:-1)+a,h=Math.asin(o/d)/$x,p=c?n:n+i*h,m=Zr(e,r,d,p),x=Zr(e,r,a,p),b=c?n-i*h:n,y=Zr(e,r,d*Math.cos(h*$x),b);return{center:m,circleTangency:x,lineTangency:y,theta:h}},e7=t=>{var{cx:e,cy:r,innerRadius:a,outerRadius:n,startAngle:i,endAngle:l}=t,o=Gue(i,l),c=i+o,d=Zr(e,r,n,i),h=Zr(e,r,n,c),p="M ".concat(d.x,",").concat(d.y,`
    A `).concat(n,",").concat(n,`,0,
    `).concat(+(Math.abs(o)>180),",").concat(+(i>c),`,
    `).concat(h.x,",").concat(h.y,`
  `);if(a>0){var m=Zr(e,r,a,i),x=Zr(e,r,a,c);p+="L ".concat(x.x,",").concat(x.y,`
            A `).concat(a,",").concat(a,`,0,
            `).concat(+(Math.abs(o)>180),",").concat(+(i<=c),`,
            `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(e,",").concat(r," Z");return p},Kue=t=>{var{cx:e,cy:r,innerRadius:a,outerRadius:n,cornerRadius:i,forceCornerRadius:l,cornerIsExternal:o,startAngle:c,endAngle:d}=t,h=Oa(d-c),{circleTangency:p,lineTangency:m,theta:x}=yg({cx:e,cy:r,radius:n,angle:c,sign:h,cornerRadius:i,cornerIsExternal:o}),{circleTangency:b,lineTangency:y,theta:v}=yg({cx:e,cy:r,radius:n,angle:d,sign:-h,cornerRadius:i,cornerIsExternal:o}),N=o?Math.abs(c-d):Math.abs(c-d)-x-v;if(N<0)return l?"M ".concat(m.x,",").concat(m.y,`
        a`).concat(i,",").concat(i,",0,0,1,").concat(i*2,`,0
        a`).concat(i,",").concat(i,",0,0,1,").concat(-i*2,`,0
      `):e7({cx:e,cy:r,innerRadius:a,outerRadius:n,startAngle:c,endAngle:d});var C="M ".concat(m.x,",").concat(m.y,`
    A`).concat(i,",").concat(i,",0,0,").concat(+(h<0),",").concat(p.x,",").concat(p.y,`
    A`).concat(n,",").concat(n,",0,").concat(+(N>180),",").concat(+(h<0),",").concat(b.x,",").concat(b.y,`
    A`).concat(i,",").concat(i,",0,0,").concat(+(h<0),",").concat(y.x,",").concat(y.y,`
  `);if(a>0){var{circleTangency:S,lineTangency:k,theta:A}=yg({cx:e,cy:r,radius:a,angle:c,sign:h,isExternal:!0,cornerRadius:i,cornerIsExternal:o}),{circleTangency:T,lineTangency:M,theta:O}=yg({cx:e,cy:r,radius:a,angle:d,sign:-h,isExternal:!0,cornerRadius:i,cornerIsExternal:o}),_=o?Math.abs(c-d):Math.abs(c-d)-A-O;if(_<0&&i===0)return"".concat(C,"L").concat(e,",").concat(r,"Z");C+="L".concat(M.x,",").concat(M.y,`
      A`).concat(i,",").concat(i,",0,0,").concat(+(h<0),",").concat(T.x,",").concat(T.y,`
      A`).concat(a,",").concat(a,",0,").concat(+(_>180),",").concat(+(h>0),",").concat(S.x,",").concat(S.y,`
      A`).concat(i,",").concat(i,",0,0,").concat(+(h<0),",").concat(k.x,",").concat(k.y,"Z")}else C+="L".concat(e,",").concat(r,"Z");return C},Zue={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},t7=t=>{var e=El(t,Zue),{cx:r,cy:a,innerRadius:n,outerRadius:i,cornerRadius:l,forceCornerRadius:o,cornerIsExternal:c,startAngle:d,endAngle:h,className:p}=e;if(i<n||d===h)return null;var m=Ke("recharts-sector",p),x=i-n,b=rs(l,x,0,!0),y;return b>0&&Math.abs(d-h)<360?y=Kue({cx:r,cy:a,innerRadius:n,outerRadius:i,cornerRadius:Math.min(b,x/2),forceCornerRadius:o,cornerIsExternal:c,startAngle:d,endAngle:h}):y=e7({cx:r,cy:a,innerRadius:n,outerRadius:i,startAngle:d,endAngle:h}),E.createElement("path",r4({},Ir(e,!0),{className:m,d:y}))};function Que(t,e,r){var a,n,i,l;if(t==="horizontal")a=e.x,i=a,n=r.top,l=r.top+r.height;else if(t==="vertical")n=e.y,l=n,a=r.left,i=r.left+r.width;else if(e.cx!=null&&e.cy!=null)if(t==="centric"){var{cx:o,cy:c,innerRadius:d,outerRadius:h,angle:p}=e,m=Zr(o,c,d,p),x=Zr(o,c,h,p);a=m.x,n=m.y,i=x.x,l=x.y}else return J9(e);return[{x:a,y:n},{x:i,y:l}]}var nw={},sw={},iw={},AE;function Jue(){return AE||(AE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=E9();function r(a){return e.isSymbol(a)?NaN:Number(a)}t.toNumber=r}(iw)),iw}var kE;function ehe(){return kE||(kE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Jue();function r(a){return a?(a=e.toNumber(a),a===1/0||a===-1/0?(a<0?-1:1)*Number.MAX_VALUE:a===a?a:0):a===0?a:0}t.toFinite=r}(sw)),sw}var DE;function the(){return DE||(DE=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=P9(),r=ehe();function a(n,i,l){l&&typeof l!="number"&&e.isIterateeCall(n,i,l)&&(i=l=void 0),n=r.toFinite(n),i===void 0?(i=n,n=0):i=r.toFinite(i),l=l===void 0?n<i?1:-1:r.toFinite(l);const o=Math.max(Math.ceil((i-n)/(l||1)),0),c=new Array(o);for(let d=0;d<o;d++)c[d]=n,n+=l;return c}t.range=a}(nw)),nw}var lw,TE;function rhe(){return TE||(TE=1,lw=the().range),lw}var ahe=rhe();const r7=ns(ahe);function ml(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nhe(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function dS(t){let e,r,a;t.length!==2?(e=ml,r=(o,c)=>ml(t(o),c),a=(o,c)=>t(o)-c):(e=t===ml||t===nhe?t:she,r=t,a=t);function n(o,c,d=0,h=o.length){if(d<h){if(e(c,c)!==0)return h;do{const p=d+h>>>1;r(o[p],c)<0?d=p+1:h=p}while(d<h)}return d}function i(o,c,d=0,h=o.length){if(d<h){if(e(c,c)!==0)return h;do{const p=d+h>>>1;r(o[p],c)<=0?d=p+1:h=p}while(d<h)}return d}function l(o,c,d=0,h=o.length){const p=n(o,c,d,h-1);return p>d&&a(o[p-1],c)>-a(o[p],c)?p-1:p}return{left:n,center:l,right:i}}function she(){return 0}function a7(t){return t===null?NaN:+t}function*ihe(t,e){for(let r of t)r!=null&&(r=+r)>=r&&(yield r)}const lhe=dS(ml),fp=lhe.right;dS(a7).center;class ME extends Map{constructor(e,r=dhe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[a,n]of e)this.set(a,n)}get(e){return super.get(EE(this,e))}has(e){return super.has(EE(this,e))}set(e,r){return super.set(ohe(this,e),r)}delete(e){return super.delete(che(this,e))}}function EE({_intern:t,_key:e},r){const a=e(r);return t.has(a)?t.get(a):r}function ohe({_intern:t,_key:e},r){const a=e(r);return t.has(a)?t.get(a):(t.set(a,r),r)}function che({_intern:t,_key:e},r){const a=e(r);return t.has(a)&&(r=t.get(a),t.delete(a)),r}function dhe(t){return t!==null&&typeof t=="object"?t.valueOf():t}function uhe(t=ml){if(t===ml)return n7;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const a=t(e,r);return a||a===0?a:(t(r,r)===0)-(t(e,e)===0)}}function n7(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const hhe=Math.sqrt(50),fhe=Math.sqrt(10),phe=Math.sqrt(2);function qx(t,e,r){const a=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(a)),i=a/Math.pow(10,n),l=i>=hhe?10:i>=fhe?5:i>=phe?2:1;let o,c,d;return n<0?(d=Math.pow(10,-n)/l,o=Math.round(t*d),c=Math.round(e*d),o/d<t&&++o,c/d>e&&--c,d=-d):(d=Math.pow(10,n)*l,o=Math.round(t/d),c=Math.round(e/d),o*d<t&&++o,c*d>e&&--c),c<o&&.5<=r&&r<2?qx(t,e,r*2):[o,c,d]}function a4(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const a=e<t,[n,i,l]=a?qx(e,t,r):qx(t,e,r);if(!(i>=n))return[];const o=i-n+1,c=new Array(o);if(a)if(l<0)for(let d=0;d<o;++d)c[d]=(i-d)/-l;else for(let d=0;d<o;++d)c[d]=(i-d)*l;else if(l<0)for(let d=0;d<o;++d)c[d]=(n+d)/-l;else for(let d=0;d<o;++d)c[d]=(n+d)*l;return c}function n4(t,e,r){return e=+e,t=+t,r=+r,qx(t,e,r)[2]}function s4(t,e,r){e=+e,t=+t,r=+r;const a=e<t,n=a?n4(e,t,r):n4(t,e,r);return(a?-1:1)*(n<0?1/-n:n)}function PE(t,e){let r;for(const a of t)a!=null&&(r<a||r===void 0&&a>=a)&&(r=a);return r}function OE(t,e){let r;for(const a of t)a!=null&&(r>a||r===void 0&&a>=a)&&(r=a);return r}function s7(t,e,r=0,a=1/0,n){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),a=Math.floor(Math.min(t.length-1,a)),!(r<=e&&e<=a))return t;for(n=n===void 0?n7:uhe(n);a>r;){if(a-r>600){const c=a-r+1,d=e-r+1,h=Math.log(c),p=.5*Math.exp(2*h/3),m=.5*Math.sqrt(h*p*(c-p)/c)*(d-c/2<0?-1:1),x=Math.max(r,Math.floor(e-d*p/c+m)),b=Math.min(a,Math.floor(e+(c-d)*p/c+m));s7(t,e,x,b,n)}const i=t[e];let l=r,o=a;for(jh(t,r,e),n(t[a],i)>0&&jh(t,r,a);l<o;){for(jh(t,l,o),++l,--o;n(t[l],i)<0;)++l;for(;n(t[o],i)>0;)--o}n(t[r],i)===0?jh(t,r,o):(++o,jh(t,o,a)),o<=e&&(r=o+1),e<=o&&(a=o-1)}return t}function jh(t,e,r){const a=t[e];t[e]=t[r],t[r]=a}function mhe(t,e,r){if(t=Float64Array.from(ihe(t)),!(!(a=t.length)||isNaN(e=+e))){if(e<=0||a<2)return OE(t);if(e>=1)return PE(t);var a,n=(a-1)*e,i=Math.floor(n),l=PE(s7(t,i).subarray(0,i+1)),o=OE(t.subarray(i+1));return l+(o-l)*(n-i)}}function ghe(t,e,r=a7){if(!(!(a=t.length)||isNaN(e=+e))){if(e<=0||a<2)return+r(t[0],0,t);if(e>=1)return+r(t[a-1],a-1,t);var a,n=(a-1)*e,i=Math.floor(n),l=+r(t[i],i,t),o=+r(t[i+1],i+1,t);return l+(o-l)*(n-i)}}function xhe(t,e,r){t=+t,e=+e,r=(n=arguments.length)<2?(e=t,t=0,1):n<3?1:+r;for(var a=-1,n=Math.max(0,Math.ceil((e-t)/r))|0,i=new Array(n);++a<n;)i[a]=t+a*r;return i}function Yn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Di(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 i4=Symbol("implicit");function uS(){var t=new ME,e=[],r=[],a=i4;function n(i){let l=t.get(i);if(l===void 0){if(a!==i4)return a;t.set(i,l=e.push(i)-1)}return r[l%r.length]}return n.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new ME;for(const l of i)t.has(l)||t.set(l,e.push(l)-1);return n},n.range=function(i){return arguments.length?(r=Array.from(i),n):r.slice()},n.unknown=function(i){return arguments.length?(a=i,n):a},n.copy=function(){return uS(e,r).unknown(a)},Yn.apply(n,arguments),n}function hS(){var t=uS().unknown(void 0),e=t.domain,r=t.range,a=0,n=1,i,l,o=!1,c=0,d=0,h=.5;delete t.unknown;function p(){var m=e().length,x=n<a,b=x?n:a,y=x?a:n;i=(y-b)/Math.max(1,m-c+d*2),o&&(i=Math.floor(i)),b+=(y-b-i*(m-c))*h,l=i*(1-c),o&&(b=Math.round(b),l=Math.round(l));var v=xhe(m).map(function(N){return b+i*N});return r(x?v.reverse():v)}return t.domain=function(m){return arguments.length?(e(m),p()):e()},t.range=function(m){return arguments.length?([a,n]=m,a=+a,n=+n,p()):[a,n]},t.rangeRound=function(m){return[a,n]=m,a=+a,n=+n,o=!0,p()},t.bandwidth=function(){return l},t.step=function(){return i},t.round=function(m){return arguments.length?(o=!!m,p()):o},t.padding=function(m){return arguments.length?(c=Math.min(1,d=+m),p()):c},t.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),p()):c},t.paddingOuter=function(m){return arguments.length?(d=+m,p()):d},t.align=function(m){return arguments.length?(h=Math.max(0,Math.min(1,m)),p()):h},t.copy=function(){return hS(e(),[a,n]).round(o).paddingInner(c).paddingOuter(d).align(h)},Yn.apply(p(),arguments)}function i7(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return i7(e())},t}function bhe(){return i7(hS.apply(null,arguments).paddingInner(1))}function fS(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function l7(t,e){var r=Object.create(t.prototype);for(var a in e)r[a]=e[a];return r}function pp(){}var Df=.7,Gx=1/Df,xd="\\s*([+-]?\\d+)\\s*",Tf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ts="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yhe=/^#([0-9a-f]{3,8})$/,vhe=new RegExp(`^rgb\\(${xd},${xd},${xd}\\)$`),whe=new RegExp(`^rgb\\(${Ts},${Ts},${Ts}\\)$`),jhe=new RegExp(`^rgba\\(${xd},${xd},${xd},${Tf}\\)$`),Nhe=new RegExp(`^rgba\\(${Ts},${Ts},${Ts},${Tf}\\)$`),She=new RegExp(`^hsl\\(${Tf},${Ts},${Ts}\\)$`),Che=new RegExp(`^hsla\\(${Tf},${Ts},${Ts},${Tf}\\)$`),RE={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};fS(pp,Mf,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:_E,formatHex:_E,formatHex8:Ahe,formatHsl:khe,formatRgb:LE,toString:LE});function _E(){return this.rgb().formatHex()}function Ahe(){return this.rgb().formatHex8()}function khe(){return o7(this).formatHsl()}function LE(){return this.rgb().formatRgb()}function Mf(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=yhe.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?zE(e):r===3?new Ra(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?vg(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?vg(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=vhe.exec(t))?new Ra(e[1],e[2],e[3],1):(e=whe.exec(t))?new Ra(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=jhe.exec(t))?vg(e[1],e[2],e[3],e[4]):(e=Nhe.exec(t))?vg(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=She.exec(t))?BE(e[1],e[2]/100,e[3]/100,1):(e=Che.exec(t))?BE(e[1],e[2]/100,e[3]/100,e[4]):RE.hasOwnProperty(t)?zE(RE[t]):t==="transparent"?new Ra(NaN,NaN,NaN,0):null}function zE(t){return new Ra(t>>16&255,t>>8&255,t&255,1)}function vg(t,e,r,a){return a<=0&&(t=e=r=NaN),new Ra(t,e,r,a)}function Dhe(t){return t instanceof pp||(t=Mf(t)),t?(t=t.rgb(),new Ra(t.r,t.g,t.b,t.opacity)):new Ra}function l4(t,e,r,a){return arguments.length===1?Dhe(t):new Ra(t,e,r,a??1)}function Ra(t,e,r,a){this.r=+t,this.g=+e,this.b=+r,this.opacity=+a}fS(Ra,l4,l7(pp,{brighter(t){return t=t==null?Gx:Math.pow(Gx,t),new Ra(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Df:Math.pow(Df,t),new Ra(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ra(zo(this.r),zo(this.g),zo(this.b),Kx(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:IE,formatHex:IE,formatHex8:The,formatRgb:FE,toString:FE}));function IE(){return`#${Do(this.r)}${Do(this.g)}${Do(this.b)}`}function The(){return`#${Do(this.r)}${Do(this.g)}${Do(this.b)}${Do((isNaN(this.opacity)?1:this.opacity)*255)}`}function FE(){const t=Kx(this.opacity);return`${t===1?"rgb(":"rgba("}${zo(this.r)}, ${zo(this.g)}, ${zo(this.b)}${t===1?")":`, ${t})`}`}function Kx(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function zo(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Do(t){return t=zo(t),(t<16?"0":"")+t.toString(16)}function BE(t,e,r,a){return a<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Kn(t,e,r,a)}function o7(t){if(t instanceof Kn)return new Kn(t.h,t.s,t.l,t.opacity);if(t instanceof pp||(t=Mf(t)),!t)return new Kn;if(t instanceof Kn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,a=t.b/255,n=Math.min(e,r,a),i=Math.max(e,r,a),l=NaN,o=i-n,c=(i+n)/2;return o?(e===i?l=(r-a)/o+(r<a)*6:r===i?l=(a-e)/o+2:l=(e-r)/o+4,o/=c<.5?i+n:2-i-n,l*=60):o=c>0&&c<1?0:l,new Kn(l,o,c,t.opacity)}function Mhe(t,e,r,a){return arguments.length===1?o7(t):new Kn(t,e,r,a??1)}function Kn(t,e,r,a){this.h=+t,this.s=+e,this.l=+r,this.opacity=+a}fS(Kn,Mhe,l7(pp,{brighter(t){return t=t==null?Gx:Math.pow(Gx,t),new Kn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Df:Math.pow(Df,t),new Kn(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,a=r+(r<.5?r:1-r)*e,n=2*r-a;return new Ra(ow(t>=240?t-240:t+120,n,a),ow(t,n,a),ow(t<120?t+240:t-120,n,a),this.opacity)},clamp(){return new Kn(HE(this.h),wg(this.s),wg(this.l),Kx(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=Kx(this.opacity);return`${t===1?"hsl(":"hsla("}${HE(this.h)}, ${wg(this.s)*100}%, ${wg(this.l)*100}%${t===1?")":`, ${t})`}`}}));function HE(t){return t=(t||0)%360,t<0?t+360:t}function wg(t){return Math.max(0,Math.min(1,t||0))}function ow(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 pS=t=>()=>t;function Ehe(t,e){return function(r){return t+r*e}}function Phe(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(a){return Math.pow(t+a*e,r)}}function Ohe(t){return(t=+t)==1?c7:function(e,r){return r-e?Phe(e,r,t):pS(isNaN(e)?r:e)}}function c7(t,e){var r=e-t;return r?Ehe(t,r):pS(isNaN(t)?e:t)}const $E=function t(e){var r=Ohe(e);function a(n,i){var l=r((n=l4(n)).r,(i=l4(i)).r),o=r(n.g,i.g),c=r(n.b,i.b),d=c7(n.opacity,i.opacity);return function(h){return n.r=l(h),n.g=o(h),n.b=c(h),n.opacity=d(h),n+""}}return a.gamma=t,a}(1);function Rhe(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,a=e.slice(),n;return function(i){for(n=0;n<r;++n)a[n]=t[n]*(1-i)+e[n]*i;return a}}function _he(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Lhe(t,e){var r=e?e.length:0,a=t?Math.min(r,t.length):0,n=new Array(a),i=new Array(r),l;for(l=0;l<a;++l)n[l]=Qd(t[l],e[l]);for(;l<r;++l)i[l]=e[l];return function(o){for(l=0;l<a;++l)i[l]=n[l](o);return i}}function zhe(t,e){var r=new Date;return t=+t,e=+e,function(a){return r.setTime(t*(1-a)+e*a),r}}function Zx(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function Ihe(t,e){var r={},a={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=Qd(t[n],e[n]):a[n]=e[n];return function(i){for(n in r)a[n]=r[n](i);return a}}var o4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cw=new RegExp(o4.source,"g");function Fhe(t){return function(){return t}}function Bhe(t){return function(e){return t(e)+""}}function Hhe(t,e){var r=o4.lastIndex=cw.lastIndex=0,a,n,i,l=-1,o=[],c=[];for(t=t+"",e=e+"";(a=o4.exec(t))&&(n=cw.exec(e));)(i=n.index)>r&&(i=e.slice(r,i),o[l]?o[l]+=i:o[++l]=i),(a=a[0])===(n=n[0])?o[l]?o[l]+=n:o[++l]=n:(o[++l]=null,c.push({i:l,x:Zx(a,n)})),r=cw.lastIndex;return r<e.length&&(i=e.slice(r),o[l]?o[l]+=i:o[++l]=i),o.length<2?c[0]?Bhe(c[0].x):Fhe(e):(e=c.length,function(d){for(var h=0,p;h<e;++h)o[(p=c[h]).i]=p.x(d);return o.join("")})}function Qd(t,e){var r=typeof e,a;return e==null||r==="boolean"?pS(e):(r==="number"?Zx:r==="string"?(a=Mf(e))?(e=a,$E):Hhe:e instanceof Mf?$E:e instanceof Date?zhe:_he(e)?Rhe:Array.isArray(e)?Lhe:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ihe:Zx)(t,e)}function mS(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=Qd);for(var r=0,a=e.length-1,n=e[0],i=new Array(a<0?0:a);r<a;)i[r]=t(n,n=e[++r]);return function(l){var o=Math.max(0,Math.min(a-1,Math.floor(l*=a)));return i[o](l-o)}}function Yhe(t){return function(){return t}}function Qx(t){return+t}var YE=[0,1];function ga(t){return t}function c4(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:Yhe(isNaN(e)?NaN:.5)}function Uhe(t,e){var r;return t>e&&(r=t,t=e,e=r),function(a){return Math.max(t,Math.min(e,a))}}function Whe(t,e,r){var a=t[0],n=t[1],i=e[0],l=e[1];return n<a?(a=c4(n,a),i=r(l,i)):(a=c4(a,n),i=r(i,l)),function(o){return i(a(o))}}function Xhe(t,e,r){var a=Math.min(t.length,e.length)-1,n=new Array(a),i=new Array(a),l=-1;for(t[a]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++l<a;)n[l]=c4(t[l],t[l+1]),i[l]=r(e[l],e[l+1]);return function(o){var c=fp(t,o,1,a)-1;return i[c](n[c](o))}}function mp(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function db(){var t=YE,e=YE,r=Qd,a,n,i,l=ga,o,c,d;function h(){var m=Math.min(t.length,e.length);return l!==ga&&(l=Uhe(t[0],t[m-1])),o=m>2?Xhe:Whe,c=d=null,p}function p(m){return m==null||isNaN(m=+m)?i:(c||(c=o(t.map(a),e,r)))(a(l(m)))}return p.invert=function(m){return l(n((d||(d=o(e,t.map(a),Zx)))(m)))},p.domain=function(m){return arguments.length?(t=Array.from(m,Qx),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=mS,h()},p.clamp=function(m){return arguments.length?(l=m?!0:ga,h()):l!==ga},p.interpolate=function(m){return arguments.length?(r=m,h()):r},p.unknown=function(m){return arguments.length?(i=m,p):i},function(m,x){return a=m,n=x,h()}}function gS(){return db()(ga,ga)}function Vhe(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Jx(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,a=t.slice(0,r);return[a.length>1?a[0]+a.slice(2):a,+t.slice(r+1)]}function kd(t){return t=Jx(Math.abs(t)),t?t[1]:NaN}function qhe(t,e){return function(r,a){for(var n=r.length,i=[],l=0,o=t[0],c=0;n>0&&o>0&&(c+o+1>a&&(o=Math.max(1,a-c)),i.push(r.substring(n-=o,n+o)),!((c+=o+1)>a));)o=t[l=(l+1)%t.length];return i.reverse().join(e)}}function Ghe(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var Khe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ef(t){if(!(e=Khe.exec(t)))throw new Error("invalid format: "+t);var e;return new xS({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]})}Ef.prototype=xS.prototype;function xS(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+""}xS.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 Zhe(t){e:for(var e=t.length,r=1,a=-1,n;r<e;++r)switch(t[r]){case".":a=n=r;break;case"0":a===0&&(a=r),n=r;break;default:if(!+t[r])break e;a>0&&(a=0);break}return a>0?t.slice(0,a)+t.slice(n+1):t}var d7;function Qhe(t,e){var r=Jx(t,e);if(!r)return t+"";var a=r[0],n=r[1],i=n-(d7=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,l=a.length;return i===l?a:i>l?a+new Array(i-l+1).join("0"):i>0?a.slice(0,i)+"."+a.slice(i):"0."+new Array(1-i).join("0")+Jx(t,Math.max(0,e+i-1))[0]}function UE(t,e){var r=Jx(t,e);if(!r)return t+"";var a=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+a:a.length>n+1?a.slice(0,n+1)+"."+a.slice(n+1):a+new Array(n-a.length+2).join("0")}const WE={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Vhe,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)=>UE(t*100,e),r:UE,s:Qhe,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function XE(t){return t}var VE=Array.prototype.map,qE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Jhe(t){var e=t.grouping===void 0||t.thousands===void 0?XE:qhe(VE.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",a=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?XE:Ghe(VE.call(t.numerals,String)),l=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function d(p){p=Ef(p);var m=p.fill,x=p.align,b=p.sign,y=p.symbol,v=p.zero,N=p.width,C=p.comma,S=p.precision,k=p.trim,A=p.type;A==="n"?(C=!0,A="g"):WE[A]||(S===void 0&&(S=12),k=!0,A="g"),(v||m==="0"&&x==="=")&&(v=!0,m="0",x="=");var T=y==="$"?r:y==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",M=y==="$"?a:/[%p]/.test(A)?l:"",O=WE[A],_=/[defgprs%]/.test(A);S=S===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function R(L){var z=T,F=M,Y,X,H;if(A==="c")F=O(L)+F,L="";else{L=+L;var W=L<0||1/L<0;if(L=isNaN(L)?c:O(Math.abs(L),S),k&&(L=Zhe(L)),W&&+L==0&&b!=="+"&&(W=!1),z=(W?b==="("?b:o:b==="-"||b==="("?"":b)+z,F=(A==="s"?qE[8+d7/3]:"")+F+(W&&b==="("?")":""),_){for(Y=-1,X=L.length;++Y<X;)if(H=L.charCodeAt(Y),48>H||H>57){F=(H===46?n+L.slice(Y+1):L.slice(Y))+F,L=L.slice(0,Y);break}}}C&&!v&&(L=e(L,1/0));var V=z.length+L.length+F.length,Z=V<N?new Array(N-V+1).join(m):"";switch(C&&v&&(L=e(Z+L,Z.length?N-F.length:1/0),Z=""),x){case"<":L=z+L+F+Z;break;case"=":L=z+Z+L+F;break;case"^":L=Z.slice(0,V=Z.length>>1)+z+L+F+Z.slice(V);break;default:L=Z+z+L+F;break}return i(L)}return R.toString=function(){return p+""},R}function h(p,m){var x=d((p=Ef(p),p.type="f",p)),b=Math.max(-8,Math.min(8,Math.floor(kd(m)/3)))*3,y=Math.pow(10,-b),v=qE[8+b/3];return function(N){return x(y*N)+v}}return{format:d,formatPrefix:h}}var jg,bS,u7;efe({thousands:",",grouping:[3],currency:["$",""]});function efe(t){return jg=Jhe(t),bS=jg.format,u7=jg.formatPrefix,jg}function tfe(t){return Math.max(0,-kd(Math.abs(t)))}function rfe(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(kd(e)/3)))*3-kd(Math.abs(t)))}function afe(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,kd(e)-kd(t))+1}function h7(t,e,r,a){var n=s4(t,e,r),i;switch(a=Ef(a??",f"),a.type){case"s":{var l=Math.max(Math.abs(t),Math.abs(e));return a.precision==null&&!isNaN(i=rfe(n,l))&&(a.precision=i),u7(a,l)}case"":case"e":case"g":case"p":case"r":{a.precision==null&&!isNaN(i=afe(n,Math.max(Math.abs(t),Math.abs(e))))&&(a.precision=i-(a.type==="e"));break}case"f":case"%":{a.precision==null&&!isNaN(i=tfe(n))&&(a.precision=i-(a.type==="%")*2);break}}return bS(a)}function Pl(t){var e=t.domain;return t.ticks=function(r){var a=e();return a4(a[0],a[a.length-1],r??10)},t.tickFormat=function(r,a){var n=e();return h7(n[0],n[n.length-1],r??10,a)},t.nice=function(r){r==null&&(r=10);var a=e(),n=0,i=a.length-1,l=a[n],o=a[i],c,d,h=10;for(o<l&&(d=l,l=o,o=d,d=n,n=i,i=d);h-- >0;){if(d=n4(l,o,r),d===c)return a[n]=l,a[i]=o,e(a);if(d>0)l=Math.floor(l/d)*d,o=Math.ceil(o/d)*d;else if(d<0)l=Math.ceil(l*d)/d,o=Math.floor(o*d)/d;else break;c=d}return t},t}function f7(){var t=gS();return t.copy=function(){return mp(t,f7())},Yn.apply(t,arguments),Pl(t)}function p7(t){var e;function r(a){return a==null||isNaN(a=+a)?e:a}return r.invert=r,r.domain=r.range=function(a){return arguments.length?(t=Array.from(a,Qx),r):t.slice()},r.unknown=function(a){return arguments.length?(e=a,r):e},r.copy=function(){return p7(t).unknown(e)},t=arguments.length?Array.from(t,Qx):[0,1],Pl(r)}function m7(t,e){t=t.slice();var r=0,a=t.length-1,n=t[r],i=t[a],l;return i<n&&(l=r,r=a,a=l,l=n,n=i,i=l),t[r]=e.floor(n),t[a]=e.ceil(i),t}function GE(t){return Math.log(t)}function KE(t){return Math.exp(t)}function nfe(t){return-Math.log(-t)}function sfe(t){return-Math.exp(-t)}function ife(t){return isFinite(t)?+("1e"+t):t<0?0:t}function lfe(t){return t===10?ife:t===Math.E?Math.exp:e=>Math.pow(t,e)}function ofe(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 ZE(t){return(e,r)=>-t(-e,r)}function yS(t){const e=t(GE,KE),r=e.domain;let a=10,n,i;function l(){return n=ofe(a),i=lfe(a),r()[0]<0?(n=ZE(n),i=ZE(i),t(nfe,sfe)):t(GE,KE),e}return e.base=function(o){return arguments.length?(a=+o,l()):a},e.domain=function(o){return arguments.length?(r(o),l()):r()},e.ticks=o=>{const c=r();let d=c[0],h=c[c.length-1];const p=h<d;p&&([d,h]=[h,d]);let m=n(d),x=n(h),b,y;const v=o==null?10:+o;let N=[];if(!(a%1)&&x-m<v){if(m=Math.floor(m),x=Math.ceil(x),d>0){for(;m<=x;++m)for(b=1;b<a;++b)if(y=m<0?b/i(-m):b*i(m),!(y<d)){if(y>h)break;N.push(y)}}else for(;m<=x;++m)for(b=a-1;b>=1;--b)if(y=m>0?b/i(-m):b*i(m),!(y<d)){if(y>h)break;N.push(y)}N.length*2<v&&(N=a4(d,h,v))}else N=a4(m,x,Math.min(x-m,v)).map(i);return p?N.reverse():N},e.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=a===10?"s":","),typeof c!="function"&&(!(a%1)&&(c=Ef(c)).precision==null&&(c.trim=!0),c=bS(c)),o===1/0)return c;const d=Math.max(1,a*o/e.ticks().length);return h=>{let p=h/i(Math.round(n(h)));return p*a<a-.5&&(p*=a),p<=d?c(h):""}},e.nice=()=>r(m7(r(),{floor:o=>i(Math.floor(n(o))),ceil:o=>i(Math.ceil(n(o)))})),e}function g7(){const t=yS(db()).domain([1,10]);return t.copy=()=>mp(t,g7()).base(t.base()),Yn.apply(t,arguments),t}function QE(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function JE(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function vS(t){var e=1,r=t(QE(e),JE(e));return r.constant=function(a){return arguments.length?t(QE(e=+a),JE(e)):e},Pl(r)}function x7(){var t=vS(db());return t.copy=function(){return mp(t,x7()).constant(t.constant())},Yn.apply(t,arguments)}function eP(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function cfe(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function dfe(t){return t<0?-t*t:t*t}function wS(t){var e=t(ga,ga),r=1;function a(){return r===1?t(ga,ga):r===.5?t(cfe,dfe):t(eP(r),eP(1/r))}return e.exponent=function(n){return arguments.length?(r=+n,a()):r},Pl(e)}function jS(){var t=wS(db());return t.copy=function(){return mp(t,jS()).exponent(t.exponent())},Yn.apply(t,arguments),t}function ufe(){return jS.apply(null,arguments).exponent(.5)}function tP(t){return Math.sign(t)*t*t}function hfe(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function b7(){var t=gS(),e=[0,1],r=!1,a;function n(i){var l=hfe(t(i));return isNaN(l)?a:r?Math.round(l):l}return n.invert=function(i){return t.invert(tP(i))},n.domain=function(i){return arguments.length?(t.domain(i),n):t.domain()},n.range=function(i){return arguments.length?(t.range((e=Array.from(i,Qx)).map(tP)),n):e.slice()},n.rangeRound=function(i){return n.range(i).round(!0)},n.round=function(i){return arguments.length?(r=!!i,n):r},n.clamp=function(i){return arguments.length?(t.clamp(i),n):t.clamp()},n.unknown=function(i){return arguments.length?(a=i,n):a},n.copy=function(){return b7(t.domain(),e).round(r).clamp(t.clamp()).unknown(a)},Yn.apply(n,arguments),Pl(n)}function y7(){var t=[],e=[],r=[],a;function n(){var l=0,o=Math.max(1,e.length);for(r=new Array(o-1);++l<o;)r[l-1]=ghe(t,l/o);return i}function i(l){return l==null||isNaN(l=+l)?a:e[fp(r,l)]}return i.invertExtent=function(l){var o=e.indexOf(l);return o<0?[NaN,NaN]:[o>0?r[o-1]:t[0],o<r.length?r[o]:t[t.length-1]]},i.domain=function(l){if(!arguments.length)return t.slice();t=[];for(let o of l)o!=null&&!isNaN(o=+o)&&t.push(o);return t.sort(ml),n()},i.range=function(l){return arguments.length?(e=Array.from(l),n()):e.slice()},i.unknown=function(l){return arguments.length?(a=l,i):a},i.quantiles=function(){return r.slice()},i.copy=function(){return y7().domain(t).range(e).unknown(a)},Yn.apply(i,arguments)}function v7(){var t=0,e=1,r=1,a=[.5],n=[0,1],i;function l(c){return c!=null&&c<=c?n[fp(a,c,0,r)]:i}function o(){var c=-1;for(a=new Array(r);++c<r;)a[c]=((c+1)*e-(c-r)*t)/(r+1);return l}return l.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,o()):[t,e]},l.range=function(c){return arguments.length?(r=(n=Array.from(c)).length-1,o()):n.slice()},l.invertExtent=function(c){var d=n.indexOf(c);return d<0?[NaN,NaN]:d<1?[t,a[0]]:d>=r?[a[r-1],e]:[a[d-1],a[d]]},l.unknown=function(c){return arguments.length&&(i=c),l},l.thresholds=function(){return a.slice()},l.copy=function(){return v7().domain([t,e]).range(n).unknown(i)},Yn.apply(Pl(l),arguments)}function w7(){var t=[.5],e=[0,1],r,a=1;function n(i){return i!=null&&i<=i?e[fp(t,i,0,a)]:r}return n.domain=function(i){return arguments.length?(t=Array.from(i),a=Math.min(t.length,e.length-1),n):t.slice()},n.range=function(i){return arguments.length?(e=Array.from(i),a=Math.min(t.length,e.length-1),n):e.slice()},n.invertExtent=function(i){var l=e.indexOf(i);return[t[l-1],t[l]]},n.unknown=function(i){return arguments.length?(r=i,n):r},n.copy=function(){return w7().domain(t).range(e).unknown(r)},Yn.apply(n,arguments)}const dw=new Date,uw=new Date;function Tr(t,e,r,a){function n(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return n.floor=i=>(t(i=new Date(+i)),i),n.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),n.round=i=>{const l=n(i),o=n.ceil(i);return i-l<o-i?l:o},n.offset=(i,l)=>(e(i=new Date(+i),l==null?1:Math.floor(l)),i),n.range=(i,l,o)=>{const c=[];if(i=n.ceil(i),o=o==null?1:Math.floor(o),!(i<l)||!(o>0))return c;let d;do c.push(d=new Date(+i)),e(i,o),t(i);while(d<i&&i<l);return c},n.filter=i=>Tr(l=>{if(l>=l)for(;t(l),!i(l);)l.setTime(l-1)},(l,o)=>{if(l>=l)if(o<0)for(;++o<=0;)for(;e(l,-1),!i(l););else for(;--o>=0;)for(;e(l,1),!i(l););}),r&&(n.count=(i,l)=>(dw.setTime(+i),uw.setTime(+l),t(dw),t(uw),Math.floor(r(dw,uw))),n.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?n.filter(a?l=>a(l)%i===0:l=>n.count(0,l)%i===0):n)),n}const e0=Tr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);e0.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Tr(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):e0);e0.range;const hi=1e3,Rn=hi*60,fi=Rn*60,ji=fi*24,NS=ji*7,rP=ji*30,hw=ji*365,To=Tr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*hi)},(t,e)=>(e-t)/hi,t=>t.getUTCSeconds());To.range;const SS=Tr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*hi)},(t,e)=>{t.setTime(+t+e*Rn)},(t,e)=>(e-t)/Rn,t=>t.getMinutes());SS.range;const CS=Tr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Rn)},(t,e)=>(e-t)/Rn,t=>t.getUTCMinutes());CS.range;const AS=Tr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*hi-t.getMinutes()*Rn)},(t,e)=>{t.setTime(+t+e*fi)},(t,e)=>(e-t)/fi,t=>t.getHours());AS.range;const kS=Tr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*fi)},(t,e)=>(e-t)/fi,t=>t.getUTCHours());kS.range;const gp=Tr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Rn)/ji,t=>t.getDate()-1);gp.range;const ub=Tr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ji,t=>t.getUTCDate()-1);ub.range;const j7=Tr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/ji,t=>Math.floor(t/ji));j7.range;function oc(t){return Tr(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())*Rn)/NS)}const hb=oc(0),t0=oc(1),ffe=oc(2),pfe=oc(3),Dd=oc(4),mfe=oc(5),gfe=oc(6);hb.range;t0.range;ffe.range;pfe.range;Dd.range;mfe.range;gfe.range;function cc(t){return Tr(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)/NS)}const fb=cc(0),r0=cc(1),xfe=cc(2),bfe=cc(3),Td=cc(4),yfe=cc(5),vfe=cc(6);fb.range;r0.range;xfe.range;bfe.range;Td.range;yfe.range;vfe.range;const DS=Tr(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());DS.range;const TS=Tr(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());TS.range;const Ni=Tr(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());Ni.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tr(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)});Ni.range;const Si=Tr(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());Si.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Tr(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)});Si.range;function N7(t,e,r,a,n,i){const l=[[To,1,hi],[To,5,5*hi],[To,15,15*hi],[To,30,30*hi],[i,1,Rn],[i,5,5*Rn],[i,15,15*Rn],[i,30,30*Rn],[n,1,fi],[n,3,3*fi],[n,6,6*fi],[n,12,12*fi],[a,1,ji],[a,2,2*ji],[r,1,NS],[e,1,rP],[e,3,3*rP],[t,1,hw]];function o(d,h,p){const m=h<d;m&&([d,h]=[h,d]);const x=p&&typeof p.range=="function"?p:c(d,h,p),b=x?x.range(d,+h+1):[];return m?b.reverse():b}function c(d,h,p){const m=Math.abs(h-d)/p,x=dS(([,,v])=>v).right(l,m);if(x===l.length)return t.every(s4(d/hw,h/hw,p));if(x===0)return e0.every(Math.max(s4(d,h,p),1));const[b,y]=l[m/l[x-1][2]<l[x][2]/m?x-1:x];return b.every(y)}return[o,c]}const[wfe,jfe]=N7(Si,TS,fb,j7,kS,CS),[Nfe,Sfe]=N7(Ni,DS,hb,gp,AS,SS);function fw(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 pw(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 Nh(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Cfe(t){var e=t.dateTime,r=t.date,a=t.time,n=t.periods,i=t.days,l=t.shortDays,o=t.months,c=t.shortMonths,d=Sh(n),h=Ch(n),p=Sh(i),m=Ch(i),x=Sh(l),b=Ch(l),y=Sh(o),v=Ch(o),N=Sh(c),C=Ch(c),S={a:W,A:V,b:Z,B,c:null,d:oP,e:oP,f:qfe,g:npe,G:ipe,H:Wfe,I:Xfe,j:Vfe,L:S7,m:Gfe,M:Kfe,p:G,q:te,Q:uP,s:hP,S:Zfe,u:Qfe,U:Jfe,V:epe,w:tpe,W:rpe,x:null,X:null,y:ape,Y:spe,Z:lpe,"%":dP},k={a:K,A:U,b:re,B:ne,c:null,d:cP,e:cP,f:upe,g:wpe,G:Npe,H:ope,I:cpe,j:dpe,L:A7,m:hpe,M:fpe,p:we,q:ye,Q:uP,s:hP,S:ppe,u:mpe,U:gpe,V:xpe,w:bpe,W:ype,x:null,X:null,y:vpe,Y:jpe,Z:Spe,"%":dP},A={a:R,A:L,b:z,B:F,c:Y,d:iP,e:iP,f:Hfe,g:sP,G:nP,H:lP,I:lP,j:zfe,L:Bfe,m:Lfe,M:Ife,p:_,q:_fe,Q:Yfe,s:Ufe,S:Ffe,u:Mfe,U:Efe,V:Pfe,w:Tfe,W:Ofe,x:X,X:H,y:sP,Y:nP,Z:Rfe,"%":$fe};S.x=T(r,S),S.X=T(a,S),S.c=T(e,S),k.x=T(r,k),k.X=T(a,k),k.c=T(e,k);function T(ue,je){return function(Te){var pe=[],Ue=-1,_e=0,xt=ue.length,Wt,bt,va;for(Te instanceof Date||(Te=new Date(+Te));++Ue<xt;)ue.charCodeAt(Ue)===37&&(pe.push(ue.slice(_e,Ue)),(bt=aP[Wt=ue.charAt(++Ue)])!=null?Wt=ue.charAt(++Ue):bt=Wt==="e"?" ":"0",(va=je[Wt])&&(Wt=va(Te,bt)),pe.push(Wt),_e=Ue+1);return pe.push(ue.slice(_e,Ue)),pe.join("")}}function M(ue,je){return function(Te){var pe=Nh(1900,void 0,1),Ue=O(pe,ue,Te+="",0),_e,xt;if(Ue!=Te.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?(_e=pw(Nh(pe.y,0,1)),xt=_e.getUTCDay(),_e=xt>4||xt===0?r0.ceil(_e):r0(_e),_e=ub.offset(_e,(pe.V-1)*7),pe.y=_e.getUTCFullYear(),pe.m=_e.getUTCMonth(),pe.d=_e.getUTCDate()+(pe.w+6)%7):(_e=fw(Nh(pe.y,0,1)),xt=_e.getDay(),_e=xt>4||xt===0?t0.ceil(_e):t0(_e),_e=gp.offset(_e,(pe.V-1)*7),pe.y=_e.getFullYear(),pe.m=_e.getMonth(),pe.d=_e.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),xt="Z"in pe?pw(Nh(pe.y,0,1)).getUTCDay():fw(Nh(pe.y,0,1)).getDay(),pe.m=0,pe.d="W"in pe?(pe.w+6)%7+pe.W*7-(xt+5)%7:pe.w+pe.U*7-(xt+6)%7);return"Z"in pe?(pe.H+=pe.Z/100|0,pe.M+=pe.Z%100,pw(pe)):fw(pe)}}function O(ue,je,Te,pe){for(var Ue=0,_e=je.length,xt=Te.length,Wt,bt;Ue<_e;){if(pe>=xt)return-1;if(Wt=je.charCodeAt(Ue++),Wt===37){if(Wt=je.charAt(Ue++),bt=A[Wt in aP?je.charAt(Ue++):Wt],!bt||(pe=bt(ue,Te,pe))<0)return-1}else if(Wt!=Te.charCodeAt(pe++))return-1}return pe}function _(ue,je,Te){var pe=d.exec(je.slice(Te));return pe?(ue.p=h.get(pe[0].toLowerCase()),Te+pe[0].length):-1}function R(ue,je,Te){var pe=x.exec(je.slice(Te));return pe?(ue.w=b.get(pe[0].toLowerCase()),Te+pe[0].length):-1}function L(ue,je,Te){var pe=p.exec(je.slice(Te));return pe?(ue.w=m.get(pe[0].toLowerCase()),Te+pe[0].length):-1}function z(ue,je,Te){var pe=N.exec(je.slice(Te));return pe?(ue.m=C.get(pe[0].toLowerCase()),Te+pe[0].length):-1}function F(ue,je,Te){var pe=y.exec(je.slice(Te));return pe?(ue.m=v.get(pe[0].toLowerCase()),Te+pe[0].length):-1}function Y(ue,je,Te){return O(ue,e,je,Te)}function X(ue,je,Te){return O(ue,r,je,Te)}function H(ue,je,Te){return O(ue,a,je,Te)}function W(ue){return l[ue.getDay()]}function V(ue){return i[ue.getDay()]}function Z(ue){return c[ue.getMonth()]}function B(ue){return o[ue.getMonth()]}function G(ue){return n[+(ue.getHours()>=12)]}function te(ue){return 1+~~(ue.getMonth()/3)}function K(ue){return l[ue.getUTCDay()]}function U(ue){return i[ue.getUTCDay()]}function re(ue){return c[ue.getUTCMonth()]}function ne(ue){return o[ue.getUTCMonth()]}function we(ue){return n[+(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=M(ue+="",!1);return je.toString=function(){return ue},je},utcFormat:function(ue){var je=T(ue+="",k);return je.toString=function(){return ue},je},utcParse:function(ue){var je=M(ue+="",!0);return je.toString=function(){return ue},je}}}var aP={"-":"",_:" ",0:"0"},Hr=/^\s*\d+/,Afe=/^%/,kfe=/[\\^$*+?|[\]().{}]/g;function ht(t,e,r){var a=t<0?"-":"",n=(a?-t:t)+"",i=n.length;return a+(i<r?new Array(r-i+1).join(e)+n:n)}function Dfe(t){return t.replace(kfe,"\\$&")}function Sh(t){return new RegExp("^(?:"+t.map(Dfe).join("|")+")","i")}function Ch(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function Tfe(t,e,r){var a=Hr.exec(e.slice(r,r+1));return a?(t.w=+a[0],r+a[0].length):-1}function Mfe(t,e,r){var a=Hr.exec(e.slice(r,r+1));return a?(t.u=+a[0],r+a[0].length):-1}function Efe(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.U=+a[0],r+a[0].length):-1}function Pfe(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.V=+a[0],r+a[0].length):-1}function Ofe(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.W=+a[0],r+a[0].length):-1}function nP(t,e,r){var a=Hr.exec(e.slice(r,r+4));return a?(t.y=+a[0],r+a[0].length):-1}function sP(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.y=+a[0]+(+a[0]>68?1900:2e3),r+a[0].length):-1}function Rfe(t,e,r){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return a?(t.Z=a[1]?0:-(a[2]+(a[3]||"00")),r+a[0].length):-1}function _fe(t,e,r){var a=Hr.exec(e.slice(r,r+1));return a?(t.q=a[0]*3-3,r+a[0].length):-1}function Lfe(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.m=a[0]-1,r+a[0].length):-1}function iP(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.d=+a[0],r+a[0].length):-1}function zfe(t,e,r){var a=Hr.exec(e.slice(r,r+3));return a?(t.m=0,t.d=+a[0],r+a[0].length):-1}function lP(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.H=+a[0],r+a[0].length):-1}function Ife(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.M=+a[0],r+a[0].length):-1}function Ffe(t,e,r){var a=Hr.exec(e.slice(r,r+2));return a?(t.S=+a[0],r+a[0].length):-1}function Bfe(t,e,r){var a=Hr.exec(e.slice(r,r+3));return a?(t.L=+a[0],r+a[0].length):-1}function Hfe(t,e,r){var a=Hr.exec(e.slice(r,r+6));return a?(t.L=Math.floor(a[0]/1e3),r+a[0].length):-1}function $fe(t,e,r){var a=Afe.exec(e.slice(r,r+1));return a?r+a[0].length:-1}function Yfe(t,e,r){var a=Hr.exec(e.slice(r));return a?(t.Q=+a[0],r+a[0].length):-1}function Ufe(t,e,r){var a=Hr.exec(e.slice(r));return a?(t.s=+a[0],r+a[0].length):-1}function oP(t,e){return ht(t.getDate(),e,2)}function Wfe(t,e){return ht(t.getHours(),e,2)}function Xfe(t,e){return ht(t.getHours()%12||12,e,2)}function Vfe(t,e){return ht(1+gp.count(Ni(t),t),e,3)}function S7(t,e){return ht(t.getMilliseconds(),e,3)}function qfe(t,e){return S7(t,e)+"000"}function Gfe(t,e){return ht(t.getMonth()+1,e,2)}function Kfe(t,e){return ht(t.getMinutes(),e,2)}function Zfe(t,e){return ht(t.getSeconds(),e,2)}function Qfe(t){var e=t.getDay();return e===0?7:e}function Jfe(t,e){return ht(hb.count(Ni(t)-1,t),e,2)}function C7(t){var e=t.getDay();return e>=4||e===0?Dd(t):Dd.ceil(t)}function epe(t,e){return t=C7(t),ht(Dd.count(Ni(t),t)+(Ni(t).getDay()===4),e,2)}function tpe(t){return t.getDay()}function rpe(t,e){return ht(t0.count(Ni(t)-1,t),e,2)}function ape(t,e){return ht(t.getFullYear()%100,e,2)}function npe(t,e){return t=C7(t),ht(t.getFullYear()%100,e,2)}function spe(t,e){return ht(t.getFullYear()%1e4,e,4)}function ipe(t,e){var r=t.getDay();return t=r>=4||r===0?Dd(t):Dd.ceil(t),ht(t.getFullYear()%1e4,e,4)}function lpe(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ht(e/60|0,"0",2)+ht(e%60,"0",2)}function cP(t,e){return ht(t.getUTCDate(),e,2)}function ope(t,e){return ht(t.getUTCHours(),e,2)}function cpe(t,e){return ht(t.getUTCHours()%12||12,e,2)}function dpe(t,e){return ht(1+ub.count(Si(t),t),e,3)}function A7(t,e){return ht(t.getUTCMilliseconds(),e,3)}function upe(t,e){return A7(t,e)+"000"}function hpe(t,e){return ht(t.getUTCMonth()+1,e,2)}function fpe(t,e){return ht(t.getUTCMinutes(),e,2)}function ppe(t,e){return ht(t.getUTCSeconds(),e,2)}function mpe(t){var e=t.getUTCDay();return e===0?7:e}function gpe(t,e){return ht(fb.count(Si(t)-1,t),e,2)}function k7(t){var e=t.getUTCDay();return e>=4||e===0?Td(t):Td.ceil(t)}function xpe(t,e){return t=k7(t),ht(Td.count(Si(t),t)+(Si(t).getUTCDay()===4),e,2)}function bpe(t){return t.getUTCDay()}function ype(t,e){return ht(r0.count(Si(t)-1,t),e,2)}function vpe(t,e){return ht(t.getUTCFullYear()%100,e,2)}function wpe(t,e){return t=k7(t),ht(t.getUTCFullYear()%100,e,2)}function jpe(t,e){return ht(t.getUTCFullYear()%1e4,e,4)}function Npe(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Td(t):Td.ceil(t),ht(t.getUTCFullYear()%1e4,e,4)}function Spe(){return"+0000"}function dP(){return"%"}function uP(t){return+t}function hP(t){return Math.floor(+t/1e3)}var ad,D7,T7;Cpe({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 Cpe(t){return ad=Cfe(t),D7=ad.format,ad.parse,T7=ad.utcFormat,ad.utcParse,ad}function Ape(t){return new Date(t)}function kpe(t){return t instanceof Date?+t:+new Date(+t)}function MS(t,e,r,a,n,i,l,o,c,d){var h=gS(),p=h.invert,m=h.domain,x=d(".%L"),b=d(":%S"),y=d("%I:%M"),v=d("%I %p"),N=d("%a %d"),C=d("%b %d"),S=d("%B"),k=d("%Y");function A(T){return(c(T)<T?x:o(T)<T?b:l(T)<T?y:i(T)<T?v:a(T)<T?n(T)<T?N:C:r(T)<T?S:k)(T)}return h.invert=function(T){return new Date(p(T))},h.domain=function(T){return arguments.length?m(Array.from(T,kpe)):m().map(Ape)},h.ticks=function(T){var M=m();return t(M[0],M[M.length-1],T??10)},h.tickFormat=function(T,M){return M==null?A:d(M)},h.nice=function(T){var M=m();return(!T||typeof T.range!="function")&&(T=e(M[0],M[M.length-1],T??10)),T?m(m7(M,T)):h},h.copy=function(){return mp(h,MS(t,e,r,a,n,i,l,o,c,d))},h}function Dpe(){return Yn.apply(MS(Nfe,Sfe,Ni,DS,hb,gp,AS,SS,To,D7).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Tpe(){return Yn.apply(MS(wfe,jfe,Si,TS,fb,ub,kS,CS,To,T7).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function pb(){var t=0,e=1,r,a,n,i,l=ga,o=!1,c;function d(p){return p==null||isNaN(p=+p)?c:l(n===0?.5:(p=(i(p)-r)*n,o?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([t,e]=p,r=i(t=+t),a=i(e=+e),n=r===a?0:1/(a-r),d):[t,e]},d.clamp=function(p){return arguments.length?(o=!!p,d):o},d.interpolator=function(p){return arguments.length?(l=p,d):l};function h(p){return function(m){var x,b;return arguments.length?([x,b]=m,l=p(x,b),d):[l(0),l(1)]}}return d.range=h(Qd),d.rangeRound=h(mS),d.unknown=function(p){return arguments.length?(c=p,d):c},function(p){return i=p,r=p(t),a=p(e),n=r===a?0:1/(a-r),d}}function Ol(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function M7(){var t=Pl(pb()(ga));return t.copy=function(){return Ol(t,M7())},Di.apply(t,arguments)}function E7(){var t=yS(pb()).domain([1,10]);return t.copy=function(){return Ol(t,E7()).base(t.base())},Di.apply(t,arguments)}function P7(){var t=vS(pb());return t.copy=function(){return Ol(t,P7()).constant(t.constant())},Di.apply(t,arguments)}function ES(){var t=wS(pb());return t.copy=function(){return Ol(t,ES()).exponent(t.exponent())},Di.apply(t,arguments)}function Mpe(){return ES.apply(null,arguments).exponent(.5)}function O7(){var t=[],e=ga;function r(a){if(a!=null&&!isNaN(a=+a))return e((fp(t,a,1)-1)/(t.length-1))}return r.domain=function(a){if(!arguments.length)return t.slice();t=[];for(let n of a)n!=null&&!isNaN(n=+n)&&t.push(n);return t.sort(ml),r},r.interpolator=function(a){return arguments.length?(e=a,r):e},r.range=function(){return t.map((a,n)=>e(n/(t.length-1)))},r.quantiles=function(a){return Array.from({length:a+1},(n,i)=>mhe(t,i/a))},r.copy=function(){return O7(e).domain(t)},Di.apply(r,arguments)}function mb(){var t=0,e=.5,r=1,a=1,n,i,l,o,c,d=ga,h,p=!1,m;function x(y){return isNaN(y=+y)?m:(y=.5+((y=+h(y))-i)*(a*y<a*i?o:c),d(p?Math.max(0,Math.min(1,y)):y))}x.domain=function(y){return arguments.length?([t,e,r]=y,n=h(t=+t),i=h(e=+e),l=h(r=+r),o=n===i?0:.5/(i-n),c=i===l?0:.5/(l-i),a=i<n?-1:1,x):[t,e,r]},x.clamp=function(y){return arguments.length?(p=!!y,x):p},x.interpolator=function(y){return arguments.length?(d=y,x):d};function b(y){return function(v){var N,C,S;return arguments.length?([N,C,S]=v,d=$he(y,[N,C,S]),x):[d(0),d(.5),d(1)]}}return x.range=b(Qd),x.rangeRound=b(mS),x.unknown=function(y){return arguments.length?(m=y,x):m},function(y){return h=y,n=y(t),i=y(e),l=y(r),o=n===i?0:.5/(i-n),c=i===l?0:.5/(l-i),a=i<n?-1:1,x}}function R7(){var t=Pl(mb()(ga));return t.copy=function(){return Ol(t,R7())},Di.apply(t,arguments)}function _7(){var t=yS(mb()).domain([.1,1,10]);return t.copy=function(){return Ol(t,_7()).base(t.base())},Di.apply(t,arguments)}function L7(){var t=vS(mb());return t.copy=function(){return Ol(t,L7()).constant(t.constant())},Di.apply(t,arguments)}function PS(){var t=wS(mb());return t.copy=function(){return Ol(t,PS()).exponent(t.exponent())},Di.apply(t,arguments)}function Epe(){return PS.apply(null,arguments).exponent(.5)}const Lh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:hS,scaleDiverging:R7,scaleDivergingLog:_7,scaleDivergingPow:PS,scaleDivergingSqrt:Epe,scaleDivergingSymlog:L7,scaleIdentity:p7,scaleImplicit:i4,scaleLinear:f7,scaleLog:g7,scaleOrdinal:uS,scalePoint:bhe,scalePow:jS,scaleQuantile:y7,scaleQuantize:v7,scaleRadial:b7,scaleSequential:M7,scaleSequentialLog:E7,scaleSequentialPow:ES,scaleSequentialQuantile:O7,scaleSequentialSqrt:Mpe,scaleSequentialSymlog:P7,scaleSqrt:ufe,scaleSymlog:x7,scaleThreshold:w7,scaleTime:Dpe,scaleUtc:Tpe,tickFormat:h7},Symbol.toStringTag,{value:"Module"}));var Rl=t=>t.chartData,Ppe=de([Rl],t=>{var e=t.chartData!=null?t.chartData.length-1:0;return{chartData:t.chartData,computedData:t.computedData,dataEndIndex:e,dataStartIndex:0}}),OS=(t,e,r,a)=>a?Ppe(t):Rl(t);function Md(t){if(Array.isArray(t)&&t.length===2){var[e,r]=t;if(dn(e)&&dn(r))return!0}return!1}function fP(t,e,r){return r?t:[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}function Ope(t,e){if(e&&typeof t!="function"&&Array.isArray(t)&&t.length===2){var[r,a]=t,n,i;if(dn(r))n=r;else if(typeof r=="function")return;if(dn(a))i=a;else if(typeof a=="function")return;var l=[n,i];if(Md(l))return l}}function Rpe(t,e,r){if(!(!r&&e==null)){if(typeof t=="function"&&e!=null)try{var a=t(e,r);if(Md(a))return fP(a,e,r)}catch{}if(Array.isArray(t)&&t.length===2){var[n,i]=t,l,o;if(n==="auto")e!=null&&(l=Math.min(...e));else if(Oe(n))l=n;else if(typeof n=="function")try{e!=null&&(l=n(e?.[0]))}catch{}else if(typeof n=="string"&&rE.test(n)){var c=rE.exec(n);if(c==null||e==null)l=void 0;else{var d=+c[1];l=e[0]-d}}else l=e?.[0];if(i==="auto")e!=null&&(o=Math.max(...e));else if(Oe(i))o=i;else if(typeof i=="function")try{e!=null&&(o=i(e?.[1]))}catch{}else if(typeof i=="string"&&aE.test(i)){var h=aE.exec(i);if(h==null||e==null)o=void 0;else{var p=+h[1];o=e[1]+p}}else o=e?.[1];var m=[l,o];if(Md(m))return e==null?m:fP(m,e,r)}}}var Jd=1e9,_pe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},_S,Kt=!0,In="[DecimalError] ",Io=In+"Invalid argument: ",RS=In+"Exponent out of range: ",eu=Math.floor,xo=Math.pow,Lpe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,an,zr=1e7,$t=7,z7=9007199254740991,a0=eu(z7/$t),Me={};Me.absoluteValue=Me.abs=function(){var t=new this.constructor(this);return t.s&&(t.s=1),t};Me.comparedTo=Me.cmp=function(t){var e,r,a,n,i=this;if(t=new i.constructor(t),i.s!==t.s)return i.s||-t.s;if(i.e!==t.e)return i.e>t.e^i.s<0?1:-1;for(a=i.d.length,n=t.d.length,e=0,r=a<n?a:n;e<r;++e)if(i.d[e]!==t.d[e])return i.d[e]>t.d[e]^i.s<0?1:-1;return a===n?0:a>n^i.s<0?1:-1};Me.decimalPlaces=Me.dp=function(){var t=this,e=t.d.length-1,r=(e-t.e)*$t;if(e=t.d[e],e)for(;e%10==0;e/=10)r--;return r<0?0:r};Me.dividedBy=Me.div=function(t){return gi(this,new this.constructor(t))};Me.dividedToIntegerBy=Me.idiv=function(t){var e=this,r=e.constructor;return zt(gi(e,new r(t),0,1),r.precision)};Me.equals=Me.eq=function(t){return!this.cmp(t)};Me.exponent=function(){return yr(this)};Me.greaterThan=Me.gt=function(t){return this.cmp(t)>0};Me.greaterThanOrEqualTo=Me.gte=function(t){return this.cmp(t)>=0};Me.isInteger=Me.isint=function(){return this.e>this.d.length-2};Me.isNegative=Me.isneg=function(){return this.s<0};Me.isPositive=Me.ispos=function(){return this.s>0};Me.isZero=function(){return this.s===0};Me.lessThan=Me.lt=function(t){return this.cmp(t)<0};Me.lessThanOrEqualTo=Me.lte=function(t){return this.cmp(t)<1};Me.logarithm=Me.log=function(t){var e,r=this,a=r.constructor,n=a.precision,i=n+5;if(t===void 0)t=new a(10);else if(t=new a(t),t.s<1||t.eq(an))throw Error(In+"NaN");if(r.s<1)throw Error(In+(r.s?"NaN":"-Infinity"));return r.eq(an)?new a(0):(Kt=!1,e=gi(Pf(r,i),Pf(t,i),i),Kt=!0,zt(e,n))};Me.minus=Me.sub=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?B7(e,t):I7(e,(t.s=-t.s,t))};Me.modulo=Me.mod=function(t){var e,r=this,a=r.constructor,n=a.precision;if(t=new a(t),!t.s)throw Error(In+"NaN");return r.s?(Kt=!1,e=gi(r,t,0,1).times(t),Kt=!0,r.minus(e)):zt(new a(r),n)};Me.naturalExponential=Me.exp=function(){return F7(this)};Me.naturalLogarithm=Me.ln=function(){return Pf(this)};Me.negated=Me.neg=function(){var t=new this.constructor(this);return t.s=-t.s||0,t};Me.plus=Me.add=function(t){var e=this;return t=new e.constructor(t),e.s==t.s?I7(e,t):B7(e,(t.s=-t.s,t))};Me.precision=Me.sd=function(t){var e,r,a,n=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Io+t);if(e=yr(n)+1,a=n.d.length-1,r=a*$t+1,a=n.d[a],a){for(;a%10==0;a/=10)r--;for(a=n.d[0];a>=10;a/=10)r++}return t&&e>r?e:r};Me.squareRoot=Me.sqrt=function(){var t,e,r,a,n,i,l,o=this,c=o.constructor;if(o.s<1){if(!o.s)return new c(0);throw Error(In+"NaN")}for(t=yr(o),Kt=!1,n=Math.sqrt(+o),n==0||n==1/0?(e=ks(o.d),(e.length+t)%2==0&&(e+="0"),n=Math.sqrt(e),t=eu((t+1)/2)-(t<0||t%2),n==1/0?e="5e"+t:(e=n.toExponential(),e=e.slice(0,e.indexOf("e")+1)+t),a=new c(e)):a=new c(n.toString()),r=c.precision,n=l=r+3;;)if(i=a,a=i.plus(gi(o,i,l+2)).times(.5),ks(i.d).slice(0,l)===(e=ks(a.d)).slice(0,l)){if(e=e.slice(l-3,l+1),n==l&&e=="4999"){if(zt(i,r+1,0),i.times(i).eq(o)){a=i;break}}else if(e!="9999")break;l+=4}return Kt=!0,zt(a,r)};Me.times=Me.mul=function(t){var e,r,a,n,i,l,o,c,d,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,d=x.length,c<d&&(i=m,m=x,x=i,l=c,c=d,d=l),i=[],l=c+d,a=l;a--;)i.push(0);for(a=d;--a>=0;){for(e=0,n=c+a;n>a;)o=i[n]+x[a]*m[n-a-1]+e,i[n--]=o%zr|0,e=o/zr|0;i[n]=(i[n]+e)%zr|0}for(;!i[--l];)i.pop();return e?++r:i.shift(),t.d=i,t.e=r,Kt?zt(t,p.precision):t};Me.toDecimalPlaces=Me.todp=function(t,e){var r=this,a=r.constructor;return r=new a(r),t===void 0?r:(Os(t,0,Jd),e===void 0?e=a.rounding:Os(e,0,8),zt(r,t+yr(r)+1,e))};Me.toExponential=function(t,e){var r,a=this,n=a.constructor;return t===void 0?r=Zo(a,!0):(Os(t,0,Jd),e===void 0?e=n.rounding:Os(e,0,8),a=zt(new n(a),t+1,e),r=Zo(a,!0,t+1)),r};Me.toFixed=function(t,e){var r,a,n=this,i=n.constructor;return t===void 0?Zo(n):(Os(t,0,Jd),e===void 0?e=i.rounding:Os(e,0,8),a=zt(new i(n),t+yr(n)+1,e),r=Zo(a.abs(),!1,t+yr(a)+1),n.isneg()&&!n.isZero()?"-"+r:r)};Me.toInteger=Me.toint=function(){var t=this,e=t.constructor;return zt(new e(t),yr(t)+1,e.rounding)};Me.toNumber=function(){return+this};Me.toPower=Me.pow=function(t){var e,r,a,n,i,l,o=this,c=o.constructor,d=12,h=+(t=new c(t));if(!t.s)return new c(an);if(o=new c(o),!o.s){if(t.s<1)throw Error(In+"Infinity");return o}if(o.eq(an))return o;if(a=c.precision,t.eq(an))return zt(o,a);if(e=t.e,r=t.d.length-1,l=e>=r,i=o.s,l){if((r=h<0?-h:h)<=z7){for(n=new c(an),e=Math.ceil(a/$t+4),Kt=!1;r%2&&(n=n.times(o),mP(n.d,e)),r=eu(r/2),r!==0;)o=o.times(o),mP(o.d,e);return Kt=!0,t.s<0?new c(an).div(n):zt(n,a)}}else if(i<0)throw Error(In+"NaN");return i=i<0&&t.d[Math.max(e,r)]&1?-1:1,o.s=1,Kt=!1,n=t.times(Pf(o,a+d)),Kt=!0,n=F7(n),n.s=i,n};Me.toPrecision=function(t,e){var r,a,n=this,i=n.constructor;return t===void 0?(r=yr(n),a=Zo(n,r<=i.toExpNeg||r>=i.toExpPos)):(Os(t,1,Jd),e===void 0?e=i.rounding:Os(e,0,8),n=zt(new i(n),t,e),r=yr(n),a=Zo(n,t<=r||r<=i.toExpNeg,t)),a};Me.toSignificantDigits=Me.tosd=function(t,e){var r=this,a=r.constructor;return t===void 0?(t=a.precision,e=a.rounding):(Os(t,1,Jd),e===void 0?e=a.rounding:Os(e,0,8)),zt(new a(r),t,e)};Me.toString=Me.valueOf=Me.val=Me.toJSON=Me[Symbol.for("nodejs.util.inspect.custom")]=function(){var t=this,e=yr(t),r=t.constructor;return Zo(t,e<=r.toExpNeg||e>=r.toExpPos)};function I7(t,e){var r,a,n,i,l,o,c,d,h=t.constructor,p=h.precision;if(!t.s||!e.s)return e.s||(e=new h(t)),Kt?zt(e,p):e;if(c=t.d,d=e.d,l=t.e,n=e.e,c=c.slice(),i=l-n,i){for(i<0?(a=c,i=-i,o=d.length):(a=d,n=l,o=c.length),l=Math.ceil(p/$t),o=l>o?l+1:o+1,i>o&&(i=o,a.length=1),a.reverse();i--;)a.push(0);a.reverse()}for(o=c.length,i=d.length,o-i<0&&(i=o,a=d,d=c,c=a),r=0;i;)r=(c[--i]=c[i]+d[i]+r)/zr|0,c[i]%=zr;for(r&&(c.unshift(r),++n),o=c.length;c[--o]==0;)c.pop();return e.d=c,e.e=n,Kt?zt(e,p):e}function Os(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Io+t)}function ks(t){var e,r,a,n=t.length-1,i="",l=t[0];if(n>0){for(i+=l,e=1;e<n;e++)a=t[e]+"",r=$t-a.length,r&&(i+=nl(r)),i+=a;l=t[e],a=l+"",r=$t-a.length,r&&(i+=nl(r))}else if(l===0)return"0";for(;l%10===0;)l/=10;return i+l}var gi=function(){function t(a,n){var i,l=0,o=a.length;for(a=a.slice();o--;)i=a[o]*n+l,a[o]=i%zr|0,l=i/zr|0;return l&&a.unshift(l),a}function e(a,n,i,l){var o,c;if(i!=l)c=i>l?1:-1;else for(o=c=0;o<i;o++)if(a[o]!=n[o]){c=a[o]>n[o]?1:-1;break}return c}function r(a,n,i){for(var l=0;i--;)a[i]-=l,l=a[i]<n[i]?1:0,a[i]=l*zr+a[i]-n[i];for(;!a[0]&&a.length>1;)a.shift()}return function(a,n,i,l){var o,c,d,h,p,m,x,b,y,v,N,C,S,k,A,T,M,O,_=a.constructor,R=a.s==n.s?1:-1,L=a.d,z=n.d;if(!a.s)return new _(a);if(!n.s)throw Error(In+"Division by zero");for(c=a.e-n.e,M=z.length,A=L.length,x=new _(R),b=x.d=[],d=0;z[d]==(L[d]||0);)++d;if(z[d]>(L[d]||0)&&--c,i==null?C=i=_.precision:l?C=i+(yr(a)-yr(n))+1:C=i,C<0)return new _(0);if(C=C/$t+2|0,d=0,M==1)for(h=0,z=z[0],C++;(d<A||h)&&C--;d++)S=h*zr+(L[d]||0),b[d]=S/z|0,h=S%z|0;else{for(h=zr/(z[0]+1)|0,h>1&&(z=t(z,h),L=t(L,h),M=z.length,A=L.length),k=M,y=L.slice(0,M),v=y.length;v<M;)y[v++]=0;O=z.slice(),O.unshift(0),T=z[0],z[1]>=zr/2&&++T;do h=0,o=e(z,y,M,v),o<0?(N=y[0],M!=v&&(N=N*zr+(y[1]||0)),h=N/T|0,h>1?(h>=zr&&(h=zr-1),p=t(z,h),m=p.length,v=y.length,o=e(p,y,m,v),o==1&&(h--,r(p,M<m?O:z,m))):(h==0&&(o=h=1),p=z.slice()),m=p.length,m<v&&p.unshift(0),r(y,p,v),o==-1&&(v=y.length,o=e(z,y,M,v),o<1&&(h++,r(y,M<v?O:z,v))),v=y.length):o===0&&(h++,y=[0]),b[d++]=h,o&&y[0]?y[v++]=L[k]||0:(y=[L[k]],v=1);while((k++<A||y[0]!==void 0)&&C--)}return b[0]||b.shift(),x.e=c,zt(x,l?i+yr(x)+1:i)}}();function F7(t,e){var r,a,n,i,l,o,c=0,d=0,h=t.constructor,p=h.precision;if(yr(t)>16)throw Error(RS+yr(t));if(!t.s)return new h(an);for(Kt=!1,o=p,l=new h(.03125);t.abs().gte(.1);)t=t.times(l),d+=5;for(a=Math.log(xo(2,d))/Math.LN10*2+5|0,o+=a,r=n=i=new h(an),h.precision=o;;){if(n=zt(n.times(t),o),r=r.times(++c),l=i.plus(gi(n,r,o)),ks(l.d).slice(0,o)===ks(i.d).slice(0,o)){for(;d--;)i=zt(i.times(i),o);return h.precision=p,e==null?(Kt=!0,zt(i,p)):i}i=l}}function yr(t){for(var e=t.e*$t,r=t.d[0];r>=10;r/=10)e++;return e}function mw(t,e,r){if(e>t.LN10.sd())throw Kt=!0,r&&(t.precision=r),Error(In+"LN10 precision limit exceeded");return zt(new t(t.LN10),e)}function nl(t){for(var e="";t--;)e+="0";return e}function Pf(t,e){var r,a,n,i,l,o,c,d,h,p=1,m=10,x=t,b=x.d,y=x.constructor,v=y.precision;if(x.s<1)throw Error(In+(x.s?"NaN":"-Infinity"));if(x.eq(an))return new y(0);if(e==null?(Kt=!1,d=v):d=e,x.eq(10))return e==null&&(Kt=!0),mw(y,d);if(d+=m,y.precision=d,r=ks(b),a=r.charAt(0),i=yr(x),Math.abs(i)<15e14){for(;a<7&&a!=1||a==1&&r.charAt(1)>3;)x=x.times(t),r=ks(x.d),a=r.charAt(0),p++;i=yr(x),a>1?(x=new y("0."+r),i++):x=new y(a+"."+r.slice(1))}else return c=mw(y,d+2,v).times(i+""),x=Pf(new y(a+"."+r.slice(1)),d-m).plus(c),y.precision=v,e==null?(Kt=!0,zt(x,v)):x;for(o=l=x=gi(x.minus(an),x.plus(an),d),h=zt(x.times(x),d),n=3;;){if(l=zt(l.times(h),d),c=o.plus(gi(l,new y(n),d)),ks(c.d).slice(0,d)===ks(o.d).slice(0,d))return o=o.times(2),i!==0&&(o=o.plus(mw(y,d+2,v).times(i+""))),o=gi(o,new y(p),d),y.precision=v,e==null?(Kt=!0,zt(o,v)):o;o=c,n+=2}}function pP(t,e){var r,a,n;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(a=e.search(/e/i))>0?(r<0&&(r=a),r+=+e.slice(a+1),e=e.substring(0,a)):r<0&&(r=e.length),a=0;e.charCodeAt(a)===48;)++a;for(n=e.length;e.charCodeAt(n-1)===48;)--n;if(e=e.slice(a,n),e){if(n-=a,r=r-a-1,t.e=eu(r/$t),t.d=[],a=(r+1)%$t,r<0&&(a+=$t),a<n){for(a&&t.d.push(+e.slice(0,a)),n-=$t;a<n;)t.d.push(+e.slice(a,a+=$t));e=e.slice(a),a=$t-e.length}else a-=n;for(;a--;)e+="0";if(t.d.push(+e),Kt&&(t.e>a0||t.e<-a0))throw Error(RS+r)}else t.s=0,t.e=0,t.d=[0];return t}function zt(t,e,r){var a,n,i,l,o,c,d,h,p=t.d;for(l=1,i=p[0];i>=10;i/=10)l++;if(a=e-l,a<0)a+=$t,n=e,d=p[h=0];else{if(h=Math.ceil((a+1)/$t),i=p.length,h>=i)return t;for(d=i=p[h],l=1;i>=10;i/=10)l++;a%=$t,n=a-$t+l}if(r!==void 0&&(i=xo(10,l-n-1),o=d/i%10|0,c=e<0||p[h+1]!==void 0||d%i,c=r<4?(o||c)&&(r==0||r==(t.s<0?3:2)):o>5||o==5&&(r==4||c||r==6&&(a>0?n>0?d/xo(10,l-n):0:p[h-1])%10&1||r==(t.s<0?8:7))),e<1||!p[0])return c?(i=yr(t),p.length=1,e=e-i-1,p[0]=xo(10,($t-e%$t)%$t),t.e=eu(-e/$t)||0):(p.length=1,p[0]=t.e=t.s=0),t;if(a==0?(p.length=h,i=1,h--):(p.length=h+1,i=xo(10,$t-a),p[h]=n>0?(d/xo(10,l-n)%xo(10,n)|0)*i:0),c)for(;;)if(h==0){(p[0]+=i)==zr&&(p[0]=1,++t.e);break}else{if(p[h]+=i,p[h]!=zr)break;p[h--]=0,i=1}for(a=p.length;p[--a]===0;)p.pop();if(Kt&&(t.e>a0||t.e<-a0))throw Error(RS+yr(t));return t}function B7(t,e){var r,a,n,i,l,o,c,d,h,p,m=t.constructor,x=m.precision;if(!t.s||!e.s)return e.s?e.s=-e.s:e=new m(t),Kt?zt(e,x):e;if(c=t.d,p=e.d,a=e.e,d=t.e,c=c.slice(),l=d-a,l){for(h=l<0,h?(r=c,l=-l,o=p.length):(r=p,a=d,o=c.length),n=Math.max(Math.ceil(x/$t),o)+2,l>n&&(l=n,r.length=1),r.reverse(),n=l;n--;)r.push(0);r.reverse()}else{for(n=c.length,o=p.length,h=n<o,h&&(o=n),n=0;n<o;n++)if(c[n]!=p[n]){h=c[n]<p[n];break}l=0}for(h&&(r=c,c=p,p=r,e.s=-e.s),o=c.length,n=p.length-o;n>0;--n)c[o++]=0;for(n=p.length;n>l;){if(c[--n]<p[n]){for(i=n;i&&c[--i]===0;)c[i]=zr-1;--c[i],c[n]+=zr}c[n]-=p[n]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--a;return c[0]?(e.d=c,e.e=a,Kt?zt(e,x):e):new m(0)}function Zo(t,e,r){var a,n=yr(t),i=ks(t.d),l=i.length;return e?(r&&(a=r-l)>0?i=i.charAt(0)+"."+i.slice(1)+nl(a):l>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(n<0?"e":"e+")+n):n<0?(i="0."+nl(-n-1)+i,r&&(a=r-l)>0&&(i+=nl(a))):n>=l?(i+=nl(n+1-l),r&&(a=r-n-1)>0&&(i=i+"."+nl(a))):((a=n+1)<l&&(i=i.slice(0,a)+"."+i.slice(a)),r&&(a=r-l)>0&&(n+1===l&&(i+="."),i+=nl(a))),t.s<0?"-"+i:i}function mP(t,e){if(t.length>e)return t.length=e,!0}function H7(t){var e,r,a;function n(i){var l=this;if(!(l instanceof n))return new n(i);if(l.constructor=n,i instanceof n){l.s=i.s,l.e=i.e,l.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Io+i);if(i>0)l.s=1;else if(i<0)i=-i,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(i===~~i&&i<1e7){l.e=0,l.d=[i];return}return pP(l,i.toString())}else if(typeof i!="string")throw Error(Io+i);if(i.charCodeAt(0)===45?(i=i.slice(1),l.s=-1):l.s=1,Lpe.test(i))pP(l,i);else throw Error(Io+i)}if(n.prototype=Me,n.ROUND_UP=0,n.ROUND_DOWN=1,n.ROUND_CEIL=2,n.ROUND_FLOOR=3,n.ROUND_HALF_UP=4,n.ROUND_HALF_DOWN=5,n.ROUND_HALF_EVEN=6,n.ROUND_HALF_CEIL=7,n.ROUND_HALF_FLOOR=8,n.clone=H7,n.config=n.set=zpe,t===void 0&&(t={}),t)for(a=["precision","rounding","toExpNeg","toExpPos","LN10"],e=0;e<a.length;)t.hasOwnProperty(r=a[e++])||(t[r]=this[r]);return n.config(t),n}function zpe(t){if(!t||typeof t!="object")throw Error(In+"Object expected");var e,r,a,n=["precision",1,Jd,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(e=0;e<n.length;e+=3)if((a=t[r=n[e]])!==void 0)if(eu(a)===a&&a>=n[e+1]&&a<=n[e+2])this[r]=a;else throw Error(Io+r+": "+a);if((a=t[r="LN10"])!==void 0)if(a==Math.LN10)this[r]=new this(a);else throw Error(Io+r+": "+a);return this}var _S=H7(_pe);an=new _S(1);const Ct=_S;var Ipe=t=>t,$7={},Y7=t=>t===$7,gP=t=>function e(){return arguments.length===0||arguments.length===1&&Y7(arguments.length<=0?void 0:arguments[0])?e:t(...arguments)},U7=(t,e)=>t===1?e:gP(function(){for(var r=arguments.length,a=new Array(r),n=0;n<r;n++)a[n]=arguments[n];var i=a.filter(l=>l!==$7).length;return i>=t?e(...a):U7(t-i,gP(function(){for(var l=arguments.length,o=new Array(l),c=0;c<l;c++)o[c]=arguments[c];var d=a.map(h=>Y7(h)?o.shift():h);return e(...d,...o)}))}),gb=t=>U7(t.length,t),d4=(t,e)=>{for(var r=[],a=t;a<e;++a)r[a-t]=a;return r},Fpe=gb((t,e)=>Array.isArray(e)?e.map(t):Object.keys(e).map(r=>e[r]).map(t)),Bpe=function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];if(!r.length)return Ipe;var n=r.reverse(),i=n[0],l=n.slice(1);return function(){return l.reduce((o,c)=>c(o),i(...arguments))}},u4=t=>Array.isArray(t)?t.reverse():t.split("").reverse().join(""),W7=t=>{var e=null,r=null;return function(){for(var a=arguments.length,n=new Array(a),i=0;i<a;i++)n[i]=arguments[i];return e&&n.every((l,o)=>{var c;return l===((c=e)===null||c===void 0?void 0:c[o])})||(e=n,r=t(...n)),r}};function X7(t){var e;return t===0?e=1:e=Math.floor(new Ct(t).abs().log(10).toNumber())+1,e}function V7(t,e,r){for(var a=new Ct(t),n=0,i=[];a.lt(e)&&n<1e5;)i.push(a.toNumber()),a=a.add(r),n++;return i}gb((t,e,r)=>{var a=+t,n=+e;return a+r*(n-a)});gb((t,e,r)=>{var a=e-+t;return a=a||1/0,(r-t)/a});gb((t,e,r)=>{var a=e-+t;return a=a||1/0,Math.max(0,Math.min(1,(r-t)/a))});var q7=t=>{var[e,r]=t,[a,n]=[e,r];return e>r&&([a,n]=[r,e]),[a,n]},G7=(t,e,r)=>{if(t.lte(0))return new Ct(0);var a=X7(t.toNumber()),n=new Ct(10).pow(a),i=t.div(n),l=a!==1?.05:.1,o=new Ct(Math.ceil(i.div(l).toNumber())).add(r).mul(l),c=o.mul(n);return e?new Ct(c.toNumber()):new Ct(Math.ceil(c.toNumber()))},Hpe=(t,e,r)=>{var a=new Ct(1),n=new Ct(t);if(!n.isint()&&r){var i=Math.abs(t);i<1?(a=new Ct(10).pow(X7(t)-1),n=new Ct(Math.floor(n.div(a).toNumber())).mul(a)):i>1&&(n=new Ct(Math.floor(t)))}else t===0?n=new Ct(Math.floor((e-1)/2)):r||(n=new Ct(Math.floor(t)));var l=Math.floor((e-1)/2),o=Bpe(Fpe(c=>n.add(new Ct(c-l).mul(a)).toNumber()),d4);return o(0,e)},K7=function(e,r,a,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-e)/(a-1)))return{step:new Ct(0),tickMin:new Ct(0),tickMax:new Ct(0)};var l=G7(new Ct(r).sub(e).div(a-1),n,i),o;e<=0&&r>=0?o=new Ct(0):(o=new Ct(e).add(r).div(2),o=o.sub(new Ct(o).mod(l)));var c=Math.ceil(o.sub(e).div(l).toNumber()),d=Math.ceil(new Ct(r).sub(o).div(l).toNumber()),h=c+d+1;return h>a?K7(e,r,a,n,i+1):(h<a&&(d=r>0?d+(a-h):d,c=r>0?c:c+(a-h)),{step:l,tickMin:o.sub(new Ct(c).mul(l)),tickMax:o.add(new Ct(d).mul(l))})};function $pe(t){var[e,r]=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=Math.max(a,2),[l,o]=q7([e,r]);if(l===-1/0||o===1/0){var c=o===1/0?[l,...d4(0,a-1).map(()=>1/0)]:[...d4(0,a-1).map(()=>-1/0),o];return e>r?u4(c):c}if(l===o)return Hpe(l,a,n);var{step:d,tickMin:h,tickMax:p}=K7(l,o,i,n,0),m=V7(h,p.add(new Ct(.1).mul(d)),d);return e>r?u4(m):m}function Ype(t,e){var[r,a]=t,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[i,l]=q7([r,a]);if(i===-1/0||l===1/0)return[r,a];if(i===l)return[i];var o=Math.max(e,2),c=G7(new Ct(l).sub(i).div(o-1),n,0),d=[...V7(new Ct(i),new Ct(l),c),l];return n===!1&&(d=d.map(h=>Math.round(h))),r>a?u4(d):d}var Upe=W7($pe),Wpe=W7(Ype),Z7=t=>t.rootProps.maxBarSize,Xpe=t=>t.rootProps.barGap,Q7=t=>t.rootProps.barCategoryGap,Vpe=t=>t.rootProps.barSize,xb=t=>t.rootProps.stackOffset,LS=t=>t.options.chartName,zS=t=>t.rootProps.syncId,J7=t=>t.rootProps.syncMethod,IS=t=>t.options.eventEmitter,li={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},Ja={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},bb=(t,e)=>{if(!(!t||!e))return t!=null&&t.reversed?[e[1],e[0]]:e},qpe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:li.angleAxisId,includeHidden:!1,name:void 0,reversed:li.reversed,scale:li.scale,tick:li.tick,tickCount:void 0,ticks:void 0,type:li.type,unit:void 0},Gpe={allowDataOverflow:Ja.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ja.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ja.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ja.scale,tick:Ja.tick,tickCount:Ja.tickCount,ticks:void 0,type:Ja.type,unit:void 0},Kpe={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:li.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:li.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:li.scale,tick:li.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Zpe={allowDataOverflow:Ja.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ja.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ja.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ja.scale,tick:Ja.tick,tickCount:Ja.tickCount,ticks:void 0,type:"category",unit:void 0},FS=(t,e)=>t.polarAxis.angleAxis[e]!=null?t.polarAxis.angleAxis[e]:t.layout.layoutType==="radial"?Kpe:qpe,BS=(t,e)=>t.polarAxis.radiusAxis[e]!=null?t.polarAxis.radiusAxis[e]:t.layout.layoutType==="radial"?Zpe:Gpe,yb=t=>t.polarOptions,HS=de([Ai,ki,Br],tde),ez=de([yb,HS],(t,e)=>{if(t!=null)return rs(t.innerRadius,e,0)}),tz=de([yb,HS],(t,e)=>{if(t!=null)return rs(t.outerRadius,e,e*.8)}),Qpe=t=>{if(t==null)return[0,0];var{startAngle:e,endAngle:r}=t;return[e,r]},rz=de([yb],Qpe);de([FS,rz],bb);var az=de([HS,ez,tz],(t,e,r)=>{if(!(t==null||e==null||r==null))return[e,r]});de([BS,az],bb);var nz=de([At,yb,ez,tz,Ai,ki],(t,e,r,a,n,i)=>{if(!(t!=="centric"&&t!=="radial"||e==null||r==null||a==null)){var{cx:l,cy:o,startAngle:c,endAngle:d}=e;return{cx:rs(l,n,n/2),cy:rs(o,i,i/2),innerRadius:r,outerRadius:a,startAngle:c,endAngle:d,clockWise:!1}}}),vr=(t,e)=>e,vb=(t,e,r)=>r;function $S(t){return t?.id}var Mr=t=>{var e=At(t);return e==="horizontal"?"xAxis":e==="vertical"?"yAxis":e==="centric"?"angleAxis":"radiusAxis"},tu=t=>t.tooltip.settings.axisId,Er=t=>{var e=Mr(t),r=tu(t);return xp(t,e,r)};function sz(t,e,r){var{chartData:a=[]}=e,n=r?.dataKey,i=new Map;return t.forEach(l=>{var o,c=(o=l.data)!==null&&o!==void 0?o:a;if(!(c==null||c.length===0)){var d=$S(l);c.forEach((h,p)=>{var m=n==null?p:String(ba(h,n,null)),x=ba(h,l.dataKey,0),b;i.has(m)?b=i.get(m):b={},Object.assign(b,{[d]:x}),i.set(m,b)})}}),Array.from(i.values())}function wb(t){return t.stackId!=null&&t.dataKey!=null}function xP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function n0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xP(Object(r),!0).forEach(function(a){Jpe(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Jpe(t,e,r){return(e=eme(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eme(t){var e=tme(t,"string");return typeof e=="symbol"?e:e+""}function tme(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var h4=[0,"auto"],Za={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},Ti=(t,e)=>{var r=t.cartesianAxis.xAxis[e];return r??Za},Qa={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:h4,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:lb},_l=(t,e)=>{var r=t.cartesianAxis.yAxis[e];return r??Qa},rme={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:""},YS=(t,e)=>{var r=t.cartesianAxis.zAxis[e];return r??rme},Ba=(t,e,r)=>{switch(e){case"xAxis":return Ti(t,r);case"yAxis":return _l(t,r);case"zAxis":return YS(t,r);case"angleAxis":return FS(t,r);case"radiusAxis":return BS(t,r);default:throw new Error("Unexpected axis type: ".concat(e))}},ame=(t,e,r)=>{switch(e){case"xAxis":return Ti(t,r);case"yAxis":return _l(t,r);default:throw new Error("Unexpected axis type: ".concat(e))}},xp=(t,e,r)=>{switch(e){case"xAxis":return Ti(t,r);case"yAxis":return _l(t,r);case"angleAxis":return FS(t,r);case"radiusAxis":return BS(t,r);default:throw new Error("Unexpected axis type: ".concat(e))}},iz=t=>t.graphicalItems.cartesianItems.some(e=>e.type==="bar")||t.graphicalItems.polarItems.some(e=>e.type==="radialBar");function lz(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 US=t=>t.graphicalItems.cartesianItems,nme=de([vr,vb],lz),oz=(t,e,r)=>t.filter(r).filter(a=>e?.includeHidden===!0?!0:!a.hide),bp=de([US,Ba,nme],oz),cz=de([bp],t=>t.filter(e=>e.type==="area"||e.type==="bar").filter(wb)),dz=t=>t.filter(e=>!("stackId"in e)||e.stackId===void 0),uz=de([bp],dz),hz=t=>t.map(e=>e.data).filter(Boolean).flat(1),sme=de([bp],hz),fz=(t,e)=>{var{chartData:r=[],dataStartIndex:a,dataEndIndex:n}=e;return t.length>0?t:r.slice(a,n+1)},WS=de([sme,OS],fz),pz=(t,e,r)=>e?.dataKey!=null?t.map(a=>({value:ba(a,e.dataKey)})):r.length>0?r.map(a=>a.dataKey).flatMap(a=>t.map(n=>({value:ba(n,a)}))):t.map(a=>({value:a})),jb=de([WS,Ba,bp],pz);function mz(t,e){switch(t){case"xAxis":return e.direction==="x";case"yAxis":return e.direction==="y";default:return!1}}function dc(t){return t.filter(e=>Ps(e)||e instanceof Date).map(Number).filter(e=>cn(e)===!1)}function ime(t,e,r){return!r||typeof e!="number"||cn(e)?[]:r.length?dc(r.flatMap(a=>{var n=ba(t,a.dataKey),i,l;if(Array.isArray(n)?[i,l]=n:i=l=n,!(!dn(i)||!dn(l)))return[e-i,e+l]})):[]}var lme=de([cz,OS,Er],sz),gz=(t,e,r)=>{var a={},n=e.reduce((i,l)=>(l.stackId==null||(i[l.stackId]==null&&(i[l.stackId]=[]),i[l.stackId].push(l)),i),a);return Object.fromEntries(Object.entries(n).map(i=>{var[l,o]=i,c=o.map($S);return[l,{stackedData:xde(t,c,r),graphicalItems:o}]}))},f4=de([lme,cz,xb],gz),xz=(t,e,r)=>{var{dataStartIndex:a,dataEndIndex:n}=e;if(r!=="zAxis"){var i=jde(t,a,n);if(!(i!=null&&i[0]===0&&i[1]===0))return i}},ome=de([f4,Rl,vr],xz),bz=(t,e,r,a,n)=>r.length>0?t.flatMap(i=>r.flatMap(l=>{var o,c,d=(o=a[l.id])===null||o===void 0?void 0:o.filter(p=>mz(n,p)),h=ba(i,(c=e.dataKey)!==null&&c!==void 0?c:l.dataKey);return{value:h,errorDomain:ime(i,h,d)}})).filter(Boolean):e?.dataKey!=null?t.map(i=>({value:ba(i,e.dataKey),errorDomain:[]})):t.map(i=>({value:i,errorDomain:[]})),Nb=t=>t.errorBars,yz=(t,e,r)=>t.flatMap(a=>e[a.id]).filter(Boolean).filter(a=>mz(r,a));de([uz,Nb,vr],yz);var cme=de([WS,Ba,uz,Nb,vr],bz);function dme(t){var{value:e}=t;if(Ps(e)||e instanceof Date)return e}var bP=t=>{var e=t.flatMap(a=>[a.value,a.errorDomain]).flat(1),r=dc(e);if(r.length!==0)return[Math.min(...r),Math.max(...r)]},ume=(t,e,r)=>{var a=t.map(dme).filter(n=>n!=null);return r&&(e.dataKey==null||e.allowDuplicatedCategory&&a9(a))?r7(0,t.length):e.allowDuplicatedCategory?a:Array.from(new Set(a))},XS=t=>{var e;if(t==null||!("domain"in t))return h4;if(t.domain!=null)return t.domain;if(t.ticks!=null){if(t.type==="number"){var r=dc(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:h4},s0=function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];var n=r.filter(Boolean);if(n.length!==0){var i=n.flat(),l=Math.min(...i),o=Math.max(...i);return[l,o]}},vz=t=>t.referenceElements.dots,ru=(t,e,r)=>t.filter(a=>a.ifOverflow==="extendDomain").filter(a=>e==="xAxis"?a.xAxisId===r:a.yAxisId===r),hme=de([vz,vr,vb],ru),wz=t=>t.referenceElements.areas,fme=de([wz,vr,vb],ru),jz=t=>t.referenceElements.lines,pme=de([jz,vr,vb],ru),Nz=(t,e)=>{var r=dc(t.map(a=>e==="xAxis"?a.x:a.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},mme=de(hme,vr,Nz),Sz=(t,e)=>{var r=dc(t.flatMap(a=>[e==="xAxis"?a.x1:a.y1,e==="xAxis"?a.x2:a.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},gme=de([fme,vr],Sz),Cz=(t,e)=>{var r=dc(t.map(a=>e==="xAxis"?a.x:a.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},xme=de(pme,vr,Cz),bme=de(mme,xme,gme,(t,e,r)=>s0(t,r,e)),yme=de([Ba],XS),Az=(t,e,r,a,n,i,l)=>{var o=Ope(e,t.allowDataOverflow);if(o!=null)return o;var c=i==="vertical"&&l==="xAxis"||i==="horizontal"&&l==="yAxis",d=c?s0(r,n,bP(a)):s0(n,bP(a));return Rpe(e,d,t.allowDataOverflow)},vme=de([Ba,yme,ome,cme,bme,At,vr],Az),wme=[0,1],kz=(t,e,r,a,n,i,l)=>{if(!((t==null||r==null||r.length===0)&&l===void 0)){var{dataKey:o,type:c}=t,d=lc(e,i);return d&&o==null?r7(0,r.length):c==="category"?ume(a,t,d):n==="expand"?wme:l}},VS=de([Ba,At,WS,jb,xb,vr,vme],kz),Dz=(t,e,r,a,n)=>{if(t!=null){var{scale:i,type:l}=t;if(i==="auto")return e==="radial"&&n==="radiusAxis"?"band":e==="radial"&&n==="angleAxis"?"linear":l==="category"&&a&&(a.indexOf("LineChart")>=0||a.indexOf("AreaChart")>=0||a.indexOf("ComposedChart")>=0&&!r)?"point":l==="category"?"band":"linear";if(typeof i=="string"){var o="scale".concat(dp(i));return o in Lh?o:"point"}}},yp=de([Ba,At,iz,LS,vr],Dz);function jme(t){if(t!=null){if(t in Lh)return Lh[t]();var e="scale".concat(dp(t));if(e in Lh)return Lh[e]()}}function qS(t,e,r,a){if(!(r==null||a==null)){if(typeof t.scale=="function")return t.scale.copy().domain(r).range(a);var n=jme(e);if(n!=null){var i=n.domain(r).range(a);return hde(i),i}}}var Tz=(t,e,r)=>{var a=XS(e);if(!(r!=="auto"&&r!=="linear")){if(e!=null&&e.tickCount&&Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto")&&Md(t))return Upe(t,e.tickCount,e.allowDecimals);if(e!=null&&e.tickCount&&e.type==="number"&&Md(t))return Wpe(t,e.tickCount,e.allowDecimals)}},GS=de([VS,xp,yp],Tz),Mz=(t,e,r,a)=>{if(a!=="angleAxis"&&t?.type==="number"&&Md(e)&&Array.isArray(r)&&r.length>0){var n=e[0],i=r[0],l=e[1],o=r[r.length-1];return[Math.min(n,i),Math.max(l,o)]}return e},Nme=de([Ba,VS,GS,vr],Mz),Sme=de(jb,Ba,(t,e)=>{if(!(!e||e.type!=="number")){var r=1/0,a=Array.from(dc(t.map(o=>o.value))).sort((o,c)=>o-c);if(a.length<2)return 1/0;var n=a[a.length-1]-a[0];if(n===0)return 1/0;for(var i=0;i<a.length-1;i++){var l=a[i+1]-a[i];r=Math.min(r,l)}return r/n}}),Ez=de(Sme,At,Q7,Br,(t,e,r,a)=>a,(t,e,r,a,n)=>{if(!dn(t))return 0;var i=e==="vertical"?a.height:a.width;if(n==="gap")return t*i/2;if(n==="no-gap"){var l=rs(r,t*i),o=t*i/2;return o-l-(o-l)/i*l}return 0}),Cme=(t,e)=>{var r=Ti(t,e);return r==null||typeof r.padding!="string"?0:Ez(t,"xAxis",e,r.padding)},Ame=(t,e)=>{var r=_l(t,e);return r==null||typeof r.padding!="string"?0:Ez(t,"yAxis",e,r.padding)},kme=de(Ti,Cme,(t,e)=>{var r,a;if(t==null)return{left:0,right:0};var{padding:n}=t;return typeof n=="string"?{left:e,right:e}:{left:((r=n.left)!==null&&r!==void 0?r:0)+e,right:((a=n.right)!==null&&a!==void 0?a:0)+e}}),Dme=de(_l,Ame,(t,e)=>{var r,a;if(t==null)return{top:0,bottom:0};var{padding:n}=t;return typeof n=="string"?{top:e,bottom:e}:{top:((r=n.top)!==null&&r!==void 0?r:0)+e,bottom:((a=n.bottom)!==null&&a!==void 0?a:0)+e}}),Tme=de([Br,kme,cb,ob,(t,e,r)=>r],(t,e,r,a,n)=>{var{padding:i}=a;return n?[i.left,r.width-i.right]:[t.left+e.left,t.left+t.width-e.right]}),Mme=de([Br,At,Dme,cb,ob,(t,e,r)=>r],(t,e,r,a,n,i)=>{var{padding:l}=n;return i?[a.height-l.bottom,l.top]:e==="horizontal"?[t.top+t.height-r.bottom,t.top+r.top]:[t.top+r.top,t.top+t.height-r.bottom]}),vp=(t,e,r,a)=>{var n;switch(e){case"xAxis":return Tme(t,r,a);case"yAxis":return Mme(t,r,a);case"zAxis":return(n=YS(t,r))===null||n===void 0?void 0:n.range;case"angleAxis":return rz(t);case"radiusAxis":return az(t,r);default:return}},Pz=de([Ba,vp],bb),au=de([Ba,yp,Nme,Pz],qS);de([bp,Nb,vr],yz);function Oz(t,e){return t.id<e.id?-1:t.id>e.id?1:0}var Sb=(t,e)=>e,Cb=(t,e,r)=>r,Eme=de(sS,Sb,Cb,(t,e,r)=>t.filter(a=>a.orientation===e).filter(a=>a.mirror===r).sort(Oz)),Pme=de(iS,Sb,Cb,(t,e,r)=>t.filter(a=>a.orientation===e).filter(a=>a.mirror===r).sort(Oz)),Rz=(t,e)=>({width:t.width,height:e.height}),Ome=(t,e)=>{var r=typeof e.width=="number"?e.width:lb;return{width:r,height:t.height}},_z=de(Br,Ti,Rz),Rme=(t,e,r)=>{switch(e){case"top":return t.top;case"bottom":return r-t.bottom;default:return 0}},_me=(t,e,r)=>{switch(e){case"left":return t.left;case"right":return r-t.right;default:return 0}},Lme=de(ki,Br,Eme,Sb,Cb,(t,e,r,a,n)=>{var i={},l;return r.forEach(o=>{var c=Rz(e,o);l==null&&(l=Rme(e,a,t));var d=a==="top"&&!n||a==="bottom"&&n;i[o.id]=l-Number(d)*c.height,l+=(d?-1:1)*c.height}),i}),zme=de(Ai,Br,Pme,Sb,Cb,(t,e,r,a,n)=>{var i={},l;return r.forEach(o=>{var c=Ome(e,o);l==null&&(l=_me(e,a,t));var d=a==="left"&&!n||a==="right"&&n;i[o.id]=l-Number(d)*c.width,l+=(d?-1:1)*c.width}),i}),Ime=(t,e)=>{var r=Br(t),a=Ti(t,e);if(a!=null){var n=Lme(t,a.orientation,a.mirror),i=n[e];return i==null?{x:r.left,y:0}:{x:r.left,y:i}}},Fme=(t,e)=>{var r=Br(t),a=_l(t,e);if(a!=null){var n=zme(t,a.orientation,a.mirror),i=n[e];return i==null?{x:0,y:r.top}:{x:i,y:r.top}}},Lz=de(Br,_l,(t,e)=>{var r=typeof e.width=="number"?e.width:lb;return{width:r,height:t.height}}),yP=(t,e,r)=>{switch(e){case"xAxis":return _z(t,r).width;case"yAxis":return Lz(t,r).height;default:return}},zz=(t,e,r,a)=>{if(r!=null){var{allowDuplicatedCategory:n,type:i,dataKey:l}=r,o=lc(t,a),c=e.map(d=>d.value);if(l&&o&&i==="category"&&n&&a9(c))return c}},KS=de([At,jb,Ba,vr],zz),Iz=(t,e,r,a)=>{if(!(r==null||r.dataKey==null)){var{type:n,scale:i}=r,l=lc(t,a);if(l&&(n==="number"||i!=="auto"))return e.map(o=>o.value)}},ZS=de([At,jb,xp,vr],Iz),vP=de([At,ame,yp,au,KS,ZS,vp,GS,vr],(t,e,r,a,n,i,l,o,c)=>{if(e==null)return null;var d=lc(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:i,duplicateDomain:n,isCategorical:d,niceTicks:o,range:l,realScaleType:r,scale:a}}),Bme=(t,e,r,a,n,i,l,o,c)=>{if(!(e==null||a==null)){var d=lc(t,c),{type:h,ticks:p,tickCount:m}=e,x=r==="scaleBand"&&typeof a.bandwidth=="function"?a.bandwidth()/2:2,b=h==="category"&&a.bandwidth?a.bandwidth()/x:0;b=c==="angleAxis"&&i!=null&&i.length>=2?Oa(i[0]-i[1])*2*b:b;var y=p||n;if(y){var v=y.map((N,C)=>{var S=l?l.indexOf(N):N;return{index:C,coordinate:a(S)+b,value:N,offset:b}});return v.filter(N=>!cn(N.coordinate))}return d&&o?o.map((N,C)=>({coordinate:a(N)+b,value:N,index:C,offset:b})):a.ticks?a.ticks(m).map(N=>({coordinate:a(N)+b,value:N,offset:b})):a.domain().map((N,C)=>({coordinate:a(N)+b,value:l?l[N]:N,index:C,offset:b}))}},Fz=de([At,xp,yp,au,GS,vp,KS,ZS,vr],Bme),Hme=(t,e,r,a,n,i,l)=>{if(!(e==null||r==null||a==null||a[0]===a[1])){var o=lc(t,l),{tickCount:c}=e,d=0;return d=l==="angleAxis"&&a?.length>=2?Oa(a[0]-a[1])*2*d:d,o&&i?i.map((h,p)=>({coordinate:r(h)+d,value:h,index:p,offset:d})):r.ticks?r.ticks(c).map(h=>({coordinate:r(h)+d,value:h,offset:d})):r.domain().map((h,p)=>({coordinate:r(h)+d,value:n?n[h]:h,index:p,offset:d}))}},Ed=de([At,xp,au,vp,KS,ZS,vr],Hme),Pd=de(Ba,au,(t,e)=>{if(!(t==null||e==null))return n0(n0({},t),{},{scale:e})}),$me=de([Ba,yp,VS,Pz],qS);de((t,e,r)=>YS(t,r),$me,(t,e)=>{if(!(t==null||e==null))return n0(n0({},t),{},{scale:e})});var Yme=de([At,sS,iS],(t,e,r)=>{switch(t){case"horizontal":return e.some(a=>a.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(a=>a.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Bz=t=>t.options.defaultTooltipEventType,Hz=t=>t.options.validateTooltipEventTypes;function $z(t,e,r){if(t==null)return e;var a=t?"axis":"item";return r==null?e:r.includes(a)?a:e}function QS(t,e){var r=Bz(t),a=Hz(t);return $z(e,r,a)}function Ume(t){return Fe(e=>QS(e,t))}var Yz=(t,e)=>{var r,a=Number(e);if(!(cn(a)||e==null))return a>=0?t==null||(r=t[a])===null||r===void 0?void 0:r.value:void 0},Wme=t=>t.tooltip.settings,ll={active:!1,index:null,dataKey:void 0,coordinate:void 0},Xme={itemInteraction:{click:ll,hover:ll},axisInteraction:{click:ll,hover:ll},keyboardInteraction:ll,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}},Uz=Yt({name:"tooltip",initialState:Xme,reducers:{addTooltipEntrySettings(t,e){t.tooltipItemPayloads.push(e.payload)},removeTooltipEntrySettings(t,e){var r=mi(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:Vme,removeTooltipEntrySettings:qme,setTooltipSettingsState:Gme,setActiveMouseOverItemIndex:Wz,mouseLeaveItem:Kme,mouseLeaveChart:Xz,setActiveClickItemIndex:Zme,setMouseOverAxisIndex:Vz,setMouseClickAxisIndex:Qme,setSyncInteraction:p4,setKeyboardInteraction:m4}=Uz.actions,Jme=Uz.reducer;function wP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Ng(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wP(Object(r),!0).forEach(function(a){ege(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ege(t,e,r){return(e=tge(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tge(t){var e=rge(t,"string");return typeof e=="symbol"?e:e+""}function rge(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function age(t,e,r){return e==="axis"?r==="click"?t.axisInteraction.click:t.axisInteraction.hover:r==="click"?t.itemInteraction.click:t.itemInteraction.hover}function nge(t){return t.index!=null}var qz=(t,e,r,a)=>{if(e==null)return ll;var n=age(t,e,r);if(n==null)return ll;if(n.active)return n;if(t.keyboardInteraction.active)return t.keyboardInteraction;if(t.syncInteraction.active&&t.syncInteraction.index!=null)return t.syncInteraction;var i=t.settings.active===!0;if(nge(n)){if(i)return Ng(Ng({},n),{},{active:!0})}else if(a!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:a};return Ng(Ng({},ll),{},{coordinate:n.coordinate})},JS=(t,e)=>{var r=t?.index;if(r==null)return null;var a=Number(r);if(!dn(a))return r;var n=0,i=1/0;return e.length>0&&(i=e.length-1),String(Math.max(n,Math.min(a,i)))},Gz=(t,e,r,a,n,i,l,o)=>{if(!(i==null||o==null)){var c=l[0],d=c==null?void 0:o(c.positions,i);if(d!=null)return d;var h=n?.[Number(i)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(a.top+e)/2};default:return{x:(a.left+t)/2,y:h.coordinate}}}},Kz=(t,e,r,a)=>{if(e==="axis")return t.tooltipItemPayloads;if(t.tooltipItemPayloads.length===0)return[];var n;return r==="hover"?n=t.itemInteraction.hover.dataKey:n=t.itemInteraction.click.dataKey,n==null&&a!=null?[t.tooltipItemPayloads[0]]:t.tooltipItemPayloads.filter(i=>{var l;return((l=i.settings)===null||l===void 0?void 0:l.dataKey)===n})},wp=t=>t.options.tooltipPayloadSearcher,nu=t=>t.tooltip;function jP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function NP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jP(Object(r),!0).forEach(function(a){sge(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function sge(t,e,r){return(e=ige(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ige(t){var e=lge(t,"string");return typeof e=="symbol"?e:e+""}function lge(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oge(t,e){return t??e}var Zz=(t,e,r,a,n,i,l)=>{if(!(e==null||i==null)){var{chartData:o,computedData:c,dataStartIndex:d,dataEndIndex:h}=r,p=[];return t.reduce((m,x)=>{var b,{dataDefinedOnItem:y,settings:v}=x,N=oge(y,o),C=Array.isArray(N)?_9(N,d,h):N,S=(b=v?.dataKey)!==null&&b!==void 0?b:a?.dataKey,k=v?.nameKey,A;if(a!=null&&a.dataKey&&Array.isArray(C)&&!Array.isArray(C[0])&&l==="axis"?A=soe(C,a.dataKey,n):A=i(C,e,c,k),Array.isArray(A))A.forEach(M=>{var O=NP(NP({},v),{},{name:M.name,unit:M.unit,color:void 0,fill:void 0});m.push(nE({tooltipEntrySettings:O,dataKey:M.dataKey,payload:M.payload,value:ba(M.payload,M.dataKey),name:M.name}))});else{var T;m.push(nE({tooltipEntrySettings:v,dataKey:S,payload:A,value:ba(A,S),name:(T=ba(A,k))!==null&&T!==void 0?T:v?.name}))}return m},p)}},e3=de([Er,At,iz,LS,Mr],Dz),cge=de([t=>t.graphicalItems.cartesianItems,t=>t.graphicalItems.polarItems],(t,e)=>[...t,...e]),dge=de([Mr,tu],lz),jp=de([cge,Er,dge],oz),uge=de([jp],t=>t.filter(wb)),hge=de([jp],hz),su=de([hge,Rl],fz),fge=de([uge,Rl,Er],sz),t3=de([su,Er,jp],pz),pge=de([Er],XS),mge=de([jp],t=>t.filter(wb)),gge=de([fge,mge,xb],gz),xge=de([gge,Rl,Mr],xz),bge=de([jp],dz),yge=de([su,Er,bge,Nb,Mr],bz),vge=de([vz,Mr,tu],ru),wge=de([vge,Mr],Nz),jge=de([wz,Mr,tu],ru),Nge=de([jge,Mr],Sz),Sge=de([jz,Mr,tu],ru),Cge=de([Sge,Mr],Cz),Age=de([wge,Cge,Nge],s0),kge=de([Er,pge,xge,yge,Age,At,Mr],Az),Qz=de([Er,At,su,t3,xb,Mr,kge],kz),Dge=de([Qz,Er,e3],Tz),Tge=de([Er,Qz,Dge,Mr],Mz),Jz=t=>{var e=Mr(t),r=tu(t),a=!1;return vp(t,e,r,a)},eI=de([Er,Jz],bb),tI=de([Er,e3,Tge,eI],qS),Mge=de([At,t3,Er,Mr],zz),Ege=de([At,t3,Er,Mr],Iz),Pge=(t,e,r,a,n,i,l,o)=>{if(e){var{type:c}=e,d=lc(t,o);if(a){var h=r==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,p=c==="category"&&a.bandwidth?a.bandwidth()/h:0;return p=o==="angleAxis"&&n!=null&&n?.length>=2?Oa(n[0]-n[1])*2*p:p,d&&l?l.map((m,x)=>({coordinate:a(m)+p,value:m,index:x,offset:p})):a.domain().map((m,x)=>({coordinate:a(m)+p,value:i?i[m]:m,index:x,offset:p}))}}},Mi=de([At,Er,e3,tI,Jz,Mge,Ege,Mr],Pge),r3=de([Bz,Hz,Wme],(t,e,r)=>$z(r.shared,t,e)),rI=t=>t.tooltip.settings.trigger,a3=t=>t.tooltip.settings.defaultIndex,Ab=de([nu,r3,rI,a3],qz),Od=de([Ab,su],JS),aI=de([Mi,Od],Yz),nI=de([Ab],t=>{if(t)return t.dataKey}),sI=de([nu,r3,rI,a3],Kz),Oge=de([Ai,ki,At,Br,Mi,a3,sI,wp],Gz),Rge=de([Ab,Oge],(t,e)=>t!=null&&t.coordinate?t.coordinate:e),_ge=de([Ab],t=>t.active),Lge=de([sI,Od,Rl,Er,aI,wp,r3],Zz);de([Lge],t=>{if(t!=null){var e=t.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(e))}});function SP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function CP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?SP(Object(r),!0).forEach(function(a){zge(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):SP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function zge(t,e,r){return(e=Ige(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ige(t){var e=Fge(t,"string");return typeof e=="symbol"?e:e+""}function Fge(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Bge=()=>Fe(Er),Hge=()=>{var t=Bge(),e=Fe(Mi),r=Fe(tI);return nS(CP(CP({},t),{},{scale:r}),e)},$ge=()=>Fe(LS),n3=(t,e)=>e,iI=(t,e,r)=>r,s3=(t,e,r,a)=>a,Yge=de(Mi,t=>ib(t,e=>e.coordinate)),i3=de([nu,n3,iI,s3],qz),lI=de([i3,su],JS),Uge=(t,e,r)=>{if(e!=null){var a=nu(t);return e==="axis"?r==="hover"?a.axisInteraction.hover.dataKey:a.axisInteraction.click.dataKey:r==="hover"?a.itemInteraction.hover.dataKey:a.itemInteraction.click.dataKey}},oI=de([nu,n3,iI,s3],Kz),i0=de([Ai,ki,At,Br,Mi,s3,oI,wp],Gz),Wge=de([i3,i0],(t,e)=>{var r;return(r=t.coordinate)!==null&&r!==void 0?r:e}),cI=de(Mi,lI,Yz),Xge=de([oI,lI,Rl,Er,cI,wp,n3],Zz),Vge=de([i3],t=>({isActive:t.active,activeIndex:t.index})),qge=(t,e,r,a,n,i,l,o)=>{if(!(!t||!e||!a||!n||!i)){var c=Nde(t.chartX,t.chartY,e,r,o);if(c){var d=Cde(c,e),h=dde(d,l,i,a,n),p=Sde(e,i,h,c);return{activeIndex:String(h),activeCoordinate:p}}}};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 a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},g4.apply(null,arguments)}function AP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Sg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?AP(Object(r),!0).forEach(function(a){Gge(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Gge(t,e,r){return(e=Kge(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Kge(t){var e=Zge(t,"string");return typeof e=="symbol"?e:e+""}function Zge(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qge(t){var{coordinate:e,payload:r,index:a,offset:n,tooltipAxisBandSize:i,layout:l,cursor:o,tooltipEventType:c,chartName:d}=t,h=e,p=r,m=a;if(!o||!h||d!=="ScatterChart"&&c!=="axis")return null;var x,b;if(d==="ScatterChart")x=h,b=fue;else if(d==="BarChart")x=pue(l,h,n,i),b=Q9;else if(l==="radial"){var{cx:y,cy:v,radius:N,startAngle:C,endAngle:S}=J9(h);x={cx:y,cy:v,startAngle:C,endAngle:S,innerRadius:N,outerRadius:N},b=t7}else x={points:Que(l,h,n)},b=nue;var k=typeof o=="object"&&"className"in o?o.className:void 0,A=Sg(Sg(Sg(Sg({stroke:"#ccc",pointerEvents:"none"},n),x),Ir(o,!1)),{},{payload:p,payloadIndex:m,className:Ke("recharts-tooltip-cursor",k)});return E.isValidElement(o)?E.cloneElement(o,A):E.createElement(b,A)}function Jge(t){var e=Hge(),r=H9(),a=oS(),n=$ge();return E.createElement(Qge,g4({},t,{coordinate:t.coordinate,index:t.index,payload:t.payload,offset:r,layout:a,tooltipAxisBandSize:e,chartName:n}))}var dI=E.createContext(null),exe=()=>E.useContext(dI),gw={exports:{}},kP;function txe(){return kP||(kP=1,function(t){var e=Object.prototype.hasOwnProperty,r="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(r=!1));function n(c,d,h){this.fn=c,this.context=d,this.once=h||!1}function i(c,d,h,p,m){if(typeof h!="function")throw new TypeError("The listener must be a function");var x=new n(h,p||c,m),b=r?r+d:d;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],x]:c._events[b].push(x):(c._events[b]=x,c._eventsCount++),c}function l(c,d){--c._eventsCount===0?c._events=new a:delete c._events[d]}function o(){this._events=new a,this._eventsCount=0}o.prototype.eventNames=function(){var d=[],h,p;if(this._eventsCount===0)return d;for(p in h=this._events)e.call(h,p)&&d.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(h)):d},o.prototype.listeners=function(d){var h=r?r+d:d,p=this._events[h];if(!p)return[];if(p.fn)return[p.fn];for(var m=0,x=p.length,b=new Array(x);m<x;m++)b[m]=p[m].fn;return b},o.prototype.listenerCount=function(d){var h=r?r+d:d,p=this._events[h];return p?p.fn?1:p.length:0},o.prototype.emit=function(d,h,p,m,x,b){var y=r?r+d:d;if(!this._events[y])return!1;var v=this._events[y],N=arguments.length,C,S;if(v.fn){switch(v.once&&this.removeListener(d,v.fn,void 0,!0),N){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,h),!0;case 3:return v.fn.call(v.context,h,p),!0;case 4:return v.fn.call(v.context,h,p,m),!0;case 5:return v.fn.call(v.context,h,p,m,x),!0;case 6:return v.fn.call(v.context,h,p,m,x,b),!0}for(S=1,C=new Array(N-1);S<N;S++)C[S-1]=arguments[S];v.fn.apply(v.context,C)}else{var k=v.length,A;for(S=0;S<k;S++)switch(v[S].once&&this.removeListener(d,v[S].fn,void 0,!0),N){case 1:v[S].fn.call(v[S].context);break;case 2:v[S].fn.call(v[S].context,h);break;case 3:v[S].fn.call(v[S].context,h,p);break;case 4:v[S].fn.call(v[S].context,h,p,m);break;default:if(!C)for(A=1,C=new Array(N-1);A<N;A++)C[A-1]=arguments[A];v[S].fn.apply(v[S].context,C)}}return!0},o.prototype.on=function(d,h,p){return i(this,d,h,p,!1)},o.prototype.once=function(d,h,p){return i(this,d,h,p,!0)},o.prototype.removeListener=function(d,h,p,m){var x=r?r+d:d;if(!this._events[x])return this;if(!h)return l(this,x),this;var b=this._events[x];if(b.fn)b.fn===h&&(!m||b.once)&&(!p||b.context===p)&&l(this,x);else{for(var y=0,v=[],N=b.length;y<N;y++)(b[y].fn!==h||m&&!b[y].once||p&&b[y].context!==p)&&v.push(b[y]);v.length?this._events[x]=v.length===1?v[0]:v:l(this,x)}return this},o.prototype.removeAllListeners=function(d){var h;return d?(h=r?r+d:d,this._events[h]&&l(this,h)):(this._events=new a,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,t.exports=o}(gw)),gw.exports}var rxe=txe();const axe=ns(rxe);var Of=new axe,x4="recharts.syncEvent.tooltip",DP="recharts.syncEvent.brush";function nxe(t,e){if(e){var r=Number.parseInt(e,10);if(!cn(r))return t?.[r]}}var sxe={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},uI=Yt({name:"options",initialState:sxe,reducers:{createEventEmitter:t=>{t.eventEmitter==null&&(t.eventEmitter=Symbol("rechartsEventEmitter"))}}}),ixe=uI.reducer,{createEventEmitter:lxe}=uI.actions;function oxe(t){return t.tooltip.syncInteraction}var cxe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},hI=Yt({name:"chartData",initialState:cxe,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:a}=e.payload;r!=null&&(t.dataStartIndex=r),a!=null&&(t.dataEndIndex=a)}}}),{setChartData:TP,setDataStartEndIndexes:dxe,setComputedData:V2e}=hI.actions,uxe=hI.reducer,fI=()=>{};function hxe(){var t=Fe(zS),e=Fe(IS),r=Fr(),a=Fe(J7),n=Fe(Mi),i=oS(),l=lS(),o=Fe(c=>c.rootProps.className);E.useEffect(()=>{if(t==null)return fI;var c=(d,h,p)=>{if(e!==p&&t===d){if(a==="index"){r(h);return}if(n!=null){var m;if(typeof a=="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},b=a(n,x);m=n[b]}else a==="value"&&(m=n.find(T=>String(T.value)===h.payload.label));var{coordinate:y}=h.payload;if(m==null||h.payload.active===!1||y==null||l==null){r(p4({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:v,y:N}=y,C=Math.min(v,l.x+l.width),S=Math.min(N,l.y+l.height),k={x:i==="horizontal"?m.coordinate:C,y:i==="horizontal"?S:m.coordinate},A=p4({active:h.payload.active,coordinate:k,dataKey:h.payload.dataKey,index:String(m.index),label:h.payload.label});r(A)}}};return Of.on(x4,c),()=>{Of.off(x4,c)}},[o,r,e,t,a,n,i,l])}function fxe(){var t=Fe(zS),e=Fe(IS),r=Fr();E.useEffect(()=>{if(t==null)return fI;var a=(n,i,l)=>{e!==l&&t===n&&r(dxe(i))};return Of.on(DP,a),()=>{Of.off(DP,a)}},[r,e,t])}function pxe(){var t=Fr();E.useEffect(()=>{t(lxe())},[t]),hxe(),fxe()}function mxe(t,e,r,a,n,i){var l=Fe(m=>Uge(m,t,e)),o=Fe(IS),c=Fe(zS),d=Fe(J7),h=Fe(oxe),p=h?.active;E.useEffect(()=>{if(!p&&c!=null&&o!=null){var m=p4({active:i,coordinate:r,dataKey:l,index:n,label:typeof a=="number"?String(a):a});Of.emit(x4,c,m,o)}},[p,r,l,n,a,o,c,d,i])}function MP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function EP(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?MP(Object(r),!0).forEach(function(a){gxe(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):MP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function gxe(t,e,r){return(e=xxe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function xxe(t){var e=bxe(t,"string");return typeof e=="symbol"?e:e+""}function bxe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yxe(t){return t.dataKey}function vxe(t,e){return E.isValidElement(t)?E.cloneElement(t,e):typeof t=="function"?E.createElement(t,e):E.createElement(Ude,e)}var PP=[],wxe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!hp.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function jxe(t){var e=El(t,wxe),{active:r,allowEscapeViewBox:a,animationDuration:n,animationEasing:i,content:l,filterNull:o,isAnimationActive:c,offset:d,payloadUniqBy:h,position:p,reverseDirection:m,useTranslate3d:x,wrapperStyle:b,cursor:y,shared:v,trigger:N,defaultIndex:C,portal:S,axisId:k}=e,A=Fr(),T=typeof C=="number"?String(C):C;E.useEffect(()=>{A(Gme({shared:v,trigger:N,axisId:k,active:r,defaultIndex:T}))},[A,v,N,k,r,T]);var M=lS(),O=W9(),_=Ume(v),{activeIndex:R,isActive:L}=Fe(re=>Vge(re,_,N,T)),z=Fe(re=>Xge(re,_,N,T)),F=Fe(re=>cI(re,_,N,T)),Y=Fe(re=>Wge(re,_,N,T)),X=z,H=exe(),W=r??L,[V,Z]=Uce([X,W]),B=_==="axis"?F:void 0;mxe(_,N,Y,B,R,W);var G=S??H;if(G==null)return null;var te=X??PP;W||(te=PP),o&&te.length&&(te=Ace(X.filter(re=>re.value!=null&&(re.hide!==!0||e.includeHidden)),h,yxe));var K=te.length>0,U=E.createElement(Zde,{allowEscapeViewBox:a,animationDuration:n,animationEasing:i,isAnimationActive:c,active:W,coordinate:Y,hasPayload:K,offset:d,position:p,reverseDirection:m,useTranslate3d:x,viewBox:M,wrapperStyle:b,lastBoundingBox:V,innerRef:Z,hasPortalFromProps:!!S},vxe(l,EP(EP({},e),{},{payload:te,label:B,active:W,coordinate:Y,accessibilityLayer:O})));return E.createElement(E.Fragment,null,H$.createPortal(U,G),W&&E.createElement(Jge,{cursor:y,tooltipEventType:_,coordinate:Y,payload:X,index:R}))}var xw={},bw={},yw={},OP;function Nxe(){return OP||(OP=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r,a,{signal:n,edges:i}={}){let l,o=null;const c=i!=null&&i.includes("leading"),d=i==null||i.includes("trailing"),h=()=>{o!==null&&(r.apply(l,o),l=void 0,o=null)},p=()=>{d&&h(),y()};let m=null;const x=()=>{m!=null&&clearTimeout(m),m=setTimeout(()=>{m=null,p()},a)},b=()=>{m!==null&&(clearTimeout(m),m=null)},y=()=>{b(),l=void 0,o=null},v=()=>{h()},N=function(...C){if(n?.aborted)return;l=this,o=C;const S=m==null;x(),c&&S&&h()};return N.schedule=x,N.cancel=y,N.flush=v,n?.addEventListener("abort",y,{once:!0}),N}t.debounce=e}(yw)),yw}var RP;function Sxe(){return RP||(RP=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Nxe();function r(a,n=0,i={}){typeof i!="object"&&(i={});const{leading:l=!1,trailing:o=!0,maxWait:c}=i,d=Array(2);l&&(d[0]="leading"),o&&(d[1]="trailing");let h,p=null;const m=e.debounce(function(...y){h=a.apply(this,y),p=null},n,{edges:d}),x=function(...y){return c!=null&&(p===null&&(p=Date.now()),Date.now()-p>=c)?(h=a.apply(this,y),p=Date.now(),m.cancel(),m.schedule(),h):(m.apply(this,y),h)},b=()=>(m.flush(),h);return x.cancel=m.cancel,x.flush=b,x}t.debounce=r}(bw)),bw}var _P;function Cxe(){return _P||(_P=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=Sxe();function r(a,n=0,i={}){const{leading:l=!0,trailing:o=!0}=i;return e.debounce(a,n,{leading:l,maxWait:n,trailing:o})}t.throttle=r}(xw)),xw}var vw,LP;function Axe(){return LP||(LP=1,vw=Cxe().throttle),vw}var kxe=Axe();const Dxe=ns(kxe);var tf=function(e,r){for(var a=arguments.length,n=new Array(a>2?a-2:0),i=2;i<a;i++)n[i-2]=arguments[i]};function zP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function ww(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zP(Object(r),!0).forEach(function(a){Txe(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Txe(t,e,r){return(e=Mxe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mxe(t){var e=Exe(t,"string");return typeof e=="symbol"?e:e+""}function Exe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Pxe=E.forwardRef((t,e)=>{var{aspect:r,initialDimension:a={width:-1,height:-1},width:n="100%",height:i="100%",minWidth:l=0,minHeight:o,maxHeight:c,children:d,debounce:h=0,id:p,className:m,onResize:x,style:b={}}=t,y=E.useRef(null),v=E.useRef();v.current=x,E.useImperativeHandle(e,()=>y.current);var[N,C]=E.useState({containerWidth:a.width,containerHeight:a.height}),S=E.useCallback((A,T)=>{C(M=>{var O=Math.round(A),_=Math.round(T);return M.containerWidth===O&&M.containerHeight===_?M:{containerWidth:O,containerHeight:_}})},[]);E.useEffect(()=>{var A=_=>{var R,{width:L,height:z}=_[0].contentRect;S(L,z),(R=v.current)===null||R===void 0||R.call(v,L,z)};h>0&&(A=Dxe(A,h,{trailing:!0,leading:!1}));var T=new ResizeObserver(A),{width:M,height:O}=y.current.getBoundingClientRect();return S(M,O),T.observe(y.current),()=>{T.disconnect()}},[S,h]);var k=E.useMemo(()=>{var{containerWidth:A,containerHeight:T}=N;if(A<0||T<0)return null;tf(Ao(n)||Ao(i),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,n,i),tf(!r||r>0,"The aspect(%s) must be greater than zero.",r);var M=Ao(n)?A:n,O=Ao(i)?T:i;return r&&r>0&&(M?O=M/r:O&&(M=O*r),c&&O>c&&(O=c)),tf(M>0||O>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.`,M,O,n,i,l,o,r),E.Children.map(d,_=>E.cloneElement(_,{width:M,height:O,style:ww({width:M,height:O},_.props.style)}))},[r,d,i,c,o,l,N,n]);return E.createElement("div",{id:p?"".concat(p):void 0,className:Ke("recharts-responsive-container",m),style:ww(ww({},b),{},{width:n,height:i,minWidth:l,minHeight:o,maxHeight:c}),ref:y},E.createElement("div",{style:{width:0,height:0,overflow:"visible"}},k))}),pI=t=>null;pI.displayName="Cell";function Oxe(t,e,r){return(e=Rxe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Rxe(t){var e=_xe(t,"string");return typeof e=="symbol"?e:e+""}function _xe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Lxe{constructor(e){Oxe(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 a=this.cache.keys().next().value;this.cache.delete(a)}this.cache.set(e,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function IP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function zxe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?IP(Object(r),!0).forEach(function(a){Ixe(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Ixe(t,e,r){return(e=Fxe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fxe(t){var e=Bxe(t,"string");return typeof e=="symbol"?e:e+""}function Bxe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Hxe={cacheSize:2e3,enableCache:!0},mI=zxe({},Hxe),FP=new Lxe(mI.cacheSize),$xe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},BP="recharts_measurement_span";function Yxe(t,e){var r=e.fontSize||"",a=e.fontFamily||"",n=e.fontWeight||"",i=e.fontStyle||"",l=e.letterSpacing||"",o=e.textTransform||"";return"".concat(t,"|").concat(r,"|").concat(a,"|").concat(n,"|").concat(i,"|").concat(l,"|").concat(o)}var HP=(t,e)=>{try{var r=document.getElementById(BP);r||(r=document.createElement("span"),r.setAttribute("id",BP),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,$xe,e),r.textContent="".concat(t);var a=r.getBoundingClientRect();return{width:a.width,height:a.height}}catch{return{width:0,height:0}}},rf=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||hp.isSsr)return{width:0,height:0};if(!mI.enableCache)return HP(e,r);var a=Yxe(e,r),n=FP.get(a);if(n)return n;var i=HP(e,r);return FP.set(a,i),i},$P=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,YP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Uxe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Wxe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,gI={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Xxe=Object.keys(gI),id="NaN";function Vxe(t,e){return t*gI[e]}class Ma{static parse(e){var r,[,a,n]=(r=Wxe.exec(e))!==null&&r!==void 0?r:[];return new Ma(parseFloat(a),n??"")}constructor(e,r){this.num=e,this.unit=r,this.num=e,this.unit=r,cn(e)&&(this.unit=""),r!==""&&!Uxe.test(r)&&(this.num=NaN,this.unit=""),Xxe.includes(r)&&(this.num=Vxe(e,r),this.unit="px")}add(e){return this.unit!==e.unit?new Ma(NaN,""):new Ma(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new Ma(NaN,""):new Ma(this.num-e.num,this.unit)}multiply(e){return this.unit!==""&&e.unit!==""&&this.unit!==e.unit?new Ma(NaN,""):new Ma(this.num*e.num,this.unit||e.unit)}divide(e){return this.unit!==""&&e.unit!==""&&this.unit!==e.unit?new Ma(NaN,""):new Ma(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return cn(this.num)}}function xI(t){if(t.includes(id))return id;for(var e=t;e.includes("*")||e.includes("/");){var r,[,a,n,i]=(r=$P.exec(e))!==null&&r!==void 0?r:[],l=Ma.parse(a??""),o=Ma.parse(i??""),c=n==="*"?l.multiply(o):l.divide(o);if(c.isNaN())return id;e=e.replace($P,c.toString())}for(;e.includes("+")||/.-\d+(?:\.\d+)?/.test(e);){var d,[,h,p,m]=(d=YP.exec(e))!==null&&d!==void 0?d:[],x=Ma.parse(h??""),b=Ma.parse(m??""),y=p==="+"?x.add(b):x.subtract(b);if(y.isNaN())return id;e=e.replace(YP,y.toString())}return e}var UP=/\(([^()]*)\)/;function qxe(t){for(var e=t,r;(r=UP.exec(e))!=null;){var[,a]=r;e=e.replace(UP,xI(a))}return e}function Gxe(t){var e=t.replace(/\s+/g,"");return e=qxe(e),e=xI(e),e}function Kxe(t){try{return Gxe(t)}catch{return id}}function jw(t){var e=Kxe(t.slice(5,-1));return e===id?"":e}var Zxe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Qxe=["dx","dy","angle","className","breakAll"];function b4(){return b4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},b4.apply(null,arguments)}function WP(t,e){if(t==null)return{};var r,a,n=Jxe(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Jxe(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var bI=/[ \f\n\r\t\v\u2028\u2029]+/,yI=t=>{var{children:e,breakAll:r,style:a}=t;try{var n=[];Dr(e)||(r?n=e.toString().split(""):n=e.toString().split(bI));var i=n.map(o=>({word:o,width:rf(o,a).width})),l=r?0:rf(" ",a).width;return{wordsWithComputedWidth:i,spaceWidth:l}}catch{return null}},e0e=(t,e,r,a,n)=>{var{maxLines:i,children:l,style:o,breakAll:c}=t,d=Oe(i),h=l,p=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return L.reduce((z,F)=>{var{word:Y,width:X}=F,H=z[z.length-1];if(H&&(a==null||n||H.width+X+r<Number(a)))H.words.push(Y),H.width+=X+r;else{var W={words:[Y],width:X};z.push(W)}return z},[])},m=p(e),x=R=>R.reduce((L,z)=>L.width>z.width?L:z);if(!d||n)return m;var b=m.length>i||x(m).width>Number(a);if(!b)return m;for(var y="…",v=R=>{var L=h.slice(0,R),z=yI({breakAll:c,style:o,children:L+y}).wordsWithComputedWidth,F=p(z),Y=F.length>i||x(F).width>Number(a);return[Y,F]},N=0,C=h.length-1,S=0,k;N<=C&&S<=h.length-1;){var A=Math.floor((N+C)/2),T=A-1,[M,O]=v(T),[_]=v(A);if(!M&&!_&&(N=A+1),M&&_&&(C=A-1),!M&&_){k=O;break}S++}return k||m},XP=t=>{var e=Dr(t)?[]:t.toString().split(bI);return[{words:e}]},t0e=t=>{var{width:e,scaleToFit:r,children:a,style:n,breakAll:i,maxLines:l}=t;if((e||r)&&!hp.isSsr){var o,c,d=yI({breakAll:i,children:a,style:n});if(d){var{wordsWithComputedWidth:h,spaceWidth:p}=d;o=h,c=p}else return XP(a);return e0e({breakAll:i,children:a,maxLines:l,style:n},o,c,e,r)}return XP(a)},VP="#808080",l3=E.forwardRef((t,e)=>{var{x:r=0,y:a=0,lineHeight:n="1em",capHeight:i="0.71em",scaleToFit:l=!1,textAnchor:o="start",verticalAnchor:c="end",fill:d=VP}=t,h=WP(t,Zxe),p=E.useMemo(()=>t0e({breakAll:h.breakAll,children:h.children,maxLines:h.maxLines,scaleToFit:l,style:h.style,width:h.width}),[h.breakAll,h.children,h.maxLines,l,h.style,h.width]),{dx:m,dy:x,angle:b,className:y,breakAll:v}=h,N=WP(h,Qxe);if(!Ps(r)||!Ps(a))return null;var C=r+(Oe(m)?m:0),S=a+(Oe(x)?x:0),k;switch(c){case"start":k=jw("calc(".concat(i,")"));break;case"middle":k=jw("calc(".concat((p.length-1)/2," * -").concat(n," + (").concat(i," / 2))"));break;default:k=jw("calc(".concat(p.length-1," * -").concat(n,")"));break}var A=[];if(l){var T=p[0].width,{width:M}=h;A.push("scale(".concat(Oe(M)?M/T:1,")"))}return b&&A.push("rotate(".concat(b,", ").concat(C,", ").concat(S,")")),A.length&&(N.transform=A.join(" ")),E.createElement("text",b4({},Ir(N,!0),{ref:e,x:C,y:S,className:Ke("recharts-text",y),textAnchor:o,fill:d.includes("url")?VP:d}),p.map((O,_)=>{var R=O.words.join(v?"":" ");return E.createElement("tspan",{x:C,dy:_===0?k:n,key:"".concat(R,"-").concat(_)},R)}))});l3.displayName="Text";var r0e=["offset"],a0e=["labelRef"];function qP(t,e){if(t==null)return{};var r,a,n=n0e(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function n0e(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function GP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function sr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?GP(Object(r),!0).forEach(function(a){s0e(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):GP(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function s0e(t,e,r){return(e=i0e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i0e(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 a=r.call(t,e);if(typeof a!="object")return a;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 a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},oi.apply(null,arguments)}var o0e=t=>{var{value:e,formatter:r}=t,a=Dr(t.children)?e:t.children;return typeof r=="function"?r(a):a},o3=t=>t!=null&&typeof t=="function",c0e=(t,e)=>{var r=Oa(e-t),a=Math.min(Math.abs(e-t),360);return r*a},d0e=(t,e,r,a)=>{var{position:n,offset:i,className:l}=t,{cx:o,cy:c,innerRadius:d,outerRadius:h,startAngle:p,endAngle:m,clockWise:x}=a,b=(d+h)/2,y=c0e(p,m),v=y>=0?1:-1,N,C;n==="insideStart"?(N=p+v*i,C=x):n==="insideEnd"?(N=m-v*i,C=!x):n==="end"&&(N=m+v*i,C=x),C=y<=0?C:!C;var S=Zr(o,c,b,N),k=Zr(o,c,b,N+(C?1:-1)*359),A="M".concat(S.x,",").concat(S.y,`
    A`).concat(b,",").concat(b,",0,1,").concat(C?0:1,`,
    `).concat(k.x,",").concat(k.y),T=Dr(t.id)?Af("recharts-radial-line-"):t.id;return E.createElement("text",oi({},r,{dominantBaseline:"central",className:Ke("recharts-radial-bar-label",l)}),E.createElement("defs",null,E.createElement("path",{id:T,d:A})),E.createElement("textPath",{xlinkHref:"#".concat(T)},e))},u0e=(t,e,r)=>{var{cx:a,cy:n,innerRadius:i,outerRadius:l,startAngle:o,endAngle:c}=t,d=(o+c)/2;if(r==="outside"){var{x:h,y:p}=Zr(a,n,l+e,d);return{x:h,y:p,textAnchor:h>=a?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:a,y:n,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:a,y:n,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:a,y:n,textAnchor:"middle",verticalAnchor:"end"};var m=(i+l)/2,{x,y:b}=Zr(a,n,m,d);return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},h0e=(t,e)=>{var{parentViewBox:r,offset:a,position:n}=t,{x:i,y:l,width:o,height:c}=e,d=c>=0?1:-1,h=d*a,p=d>0?"end":"start",m=d>0?"start":"end",x=o>=0?1:-1,b=x*a,y=x>0?"end":"start",v=x>0?"start":"end";if(n==="top"){var N={x:i+o/2,y:l-d*a,textAnchor:"middle",verticalAnchor:p};return sr(sr({},N),r?{height:Math.max(l-r.y,0),width:o}:{})}if(n==="bottom"){var C={x:i+o/2,y:l+c+h,textAnchor:"middle",verticalAnchor:m};return sr(sr({},C),r?{height:Math.max(r.y+r.height-(l+c),0),width:o}:{})}if(n==="left"){var S={x:i-b,y:l+c/2,textAnchor:y,verticalAnchor:"middle"};return sr(sr({},S),r?{width:Math.max(S.x-r.x,0),height:c}:{})}if(n==="right"){var k={x:i+o+b,y:l+c/2,textAnchor:v,verticalAnchor:"middle"};return sr(sr({},k),r?{width:Math.max(r.x+r.width-k.x,0),height:c}:{})}var A=r?{width:o,height:c}:{};return n==="insideLeft"?sr({x:i+b,y:l+c/2,textAnchor:v,verticalAnchor:"middle"},A):n==="insideRight"?sr({x:i+o-b,y:l+c/2,textAnchor:y,verticalAnchor:"middle"},A):n==="insideTop"?sr({x:i+o/2,y:l+h,textAnchor:"middle",verticalAnchor:m},A):n==="insideBottom"?sr({x:i+o/2,y:l+c-h,textAnchor:"middle",verticalAnchor:p},A):n==="insideTopLeft"?sr({x:i+b,y:l+h,textAnchor:v,verticalAnchor:m},A):n==="insideTopRight"?sr({x:i+o-b,y:l+h,textAnchor:y,verticalAnchor:m},A):n==="insideBottomLeft"?sr({x:i+b,y:l+c-h,textAnchor:v,verticalAnchor:p},A):n==="insideBottomRight"?sr({x:i+o-b,y:l+c-h,textAnchor:y,verticalAnchor:p},A):n&&typeof n=="object"&&(Oe(n.x)||Ao(n.x))&&(Oe(n.y)||Ao(n.y))?sr({x:i+rs(n.x,o),y:l+rs(n.y,c),textAnchor:"end",verticalAnchor:"end"},A):sr({x:i+o/2,y:l+c/2,textAnchor:"middle",verticalAnchor:"middle"},A)},f0e=t=>"cx"in t&&Oe(t.cx);function en(t){var{offset:e=5}=t,r=qP(t,r0e),a=sr({offset:e},r),{viewBox:n,position:i,value:l,children:o,content:c,className:d="",textBreakAll:h,labelRef:p}=a,m=Fe(nz),x=lS(),b=i==="center"?x:m??x,y=n||b;if(!y||Dr(l)&&Dr(o)&&!E.isValidElement(c)&&typeof c!="function")return null;var v=sr(sr({},a),{},{viewBox:y});if(E.isValidElement(c)){var{labelRef:N}=v,C=qP(v,a0e);return E.cloneElement(c,C)}var S;if(typeof c=="function"){if(S=E.createElement(c,v),E.isValidElement(S))return S}else S=o0e(a);var k=f0e(y),A=Ir(a,!0);if(k&&(i==="insideStart"||i==="insideEnd"||i==="end"))return d0e(a,S,A,y);var T=k?u0e(y,a.offset,a.position):h0e(a,y);return E.createElement(l3,oi({ref:p,className:Ke("recharts-label",d)},A,T,{breakAll:h}),S)}en.displayName="Label";var vI=t=>{var{cx:e,cy:r,angle:a,startAngle:n,endAngle:i,r:l,radius:o,innerRadius:c,outerRadius:d,x:h,y:p,top:m,left:x,width:b,height:y,clockWise:v,labelViewBox:N}=t;if(N)return N;if(Oe(b)&&Oe(y)){if(Oe(h)&&Oe(p))return{x:h,y:p,width:b,height:y};if(Oe(m)&&Oe(x))return{x:m,y:x,width:b,height:y}}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:n||a||0,endAngle:i||a||0,innerRadius:c||0,outerRadius:d||o||l||0,clockWise:v};if(t.viewBox)return t.viewBox},p0e=(t,e,r)=>{if(!t)return null;var a={viewBox:e,labelRef:r};return t===!0?E.createElement(en,oi({key:"label-implicit"},a)):Ps(t)?E.createElement(en,oi({key:"label-implicit",value:t},a)):E.isValidElement(t)?t.type===en?E.cloneElement(t,sr({key:"label-implicit"},a)):E.createElement(en,oi({key:"label-implicit",content:t},a)):o3(t)?E.createElement(en,oi({key:"label-implicit",content:t},a)):t&&typeof t=="object"?E.createElement(en,oi({},t,{key:"label-implicit"},a)):null},m0e=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&a&&!e.label)return null;var{children:n,labelRef:i}=e,l=vI(e),o=qN(n,en).map((d,h)=>E.cloneElement(d,{viewBox:r||l,key:"label-".concat(h)}));if(!a)return o;var c=p0e(e.label,r||l,i);return[c,...o]};en.parseViewBox=vI;en.renderCallByParent=m0e;var Nw={},Sw={},KP;function g0e(){return KP||(KP=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return r[r.length-1]}t.last=e}(Sw)),Sw}var Cw={},ZP;function x0e(){return ZP||(ZP=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(r){return Array.isArray(r)?r:Array.from(r)}t.toArray=e}(Cw)),Cw}var QP;function b0e(){return QP||(QP=1,function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=g0e(),r=x0e(),a=QN();function n(i){if(a.isArrayLike(i))return e.last(r.toArray(i))}t.last=n}(Nw)),Nw}var Aw,JP;function y0e(){return JP||(JP=1,Aw=b0e().last),Aw}var v0e=y0e();const w0e=ns(v0e);var j0e=["valueAccessor"],N0e=["data","dataKey","clockWise","id","textBreakAll"];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 a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},l0.apply(null,arguments)}function eO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function tO(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eO(Object(r),!0).forEach(function(a){S0e(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function S0e(t,e,r){return(e=C0e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C0e(t){var e=A0e(t,"string");return typeof e=="symbol"?e:e+""}function A0e(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rO(t,e){if(t==null)return{};var r,a,n=k0e(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function k0e(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var D0e=t=>Array.isArray(t.value)?w0e(t.value):t.value;function Fo(t){var{valueAccessor:e=D0e}=t,r=rO(t,j0e),{data:a,dataKey:n,clockWise:i,id:l,textBreakAll:o}=r,c=rO(r,N0e);return!a||!a.length?null:E.createElement(Sl,{className:"recharts-label-list"},a.map((d,h)=>{var p=Dr(n)?e(d,h):ba(d&&d.payload,n),m=Dr(l)?{}:{id:"".concat(l,"-").concat(h)};return E.createElement(en,l0({},Ir(d,!0),c,m,{parentViewBox:d.parentViewBox,value:p,textBreakAll:o,viewBox:en.parseViewBox(Dr(i)?d:tO(tO({},d),{},{clockWise:i})),key:"label-".concat(h),index:h}))}))}Fo.displayName="LabelList";function T0e(t,e){return t?t===!0?E.createElement(Fo,{key:"labelList-implicit",data:e}):E.isValidElement(t)||o3(t)?E.createElement(Fo,{key:"labelList-implicit",data:e,content:t}):typeof t=="object"?E.createElement(Fo,l0({data:e},t,{key:"labelList-implicit"})):null:null}function M0e(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:a}=t,n=qN(a,Fo).map((l,o)=>E.cloneElement(l,{data:e,key:"labelList-".concat(o)}));if(!r)return n;var i=T0e(t.label,e);return[i,...n]}Fo.renderCallByParent=M0e;var E0e={radiusAxis:{},angleAxis:{}},wI=Yt({name:"polarAxis",initialState:E0e,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:q2e,removeRadiusAxis:G2e,addAngleAxis:K2e,removeAngleAxis:Z2e}=wI.actions,P0e=wI.reducer,kw={},aO;function O0e(){return aO||(aO=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 n=r[Symbol.toStringTag];return n==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${n}]`}let a=r;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(r)===a}t.isPlainObject=e}(kw)),kw}var Dw,nO;function R0e(){return nO||(nO=1,Dw=O0e().isPlainObject),Dw}var _0e=R0e();const L0e=ns(_0e);function o0(){return o0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},o0.apply(null,arguments)}var sO=(t,e,r,a,n)=>{var i=r-a,l;return l="M ".concat(t,",").concat(e),l+="L ".concat(t+r,",").concat(e),l+="L ".concat(t+r-i/2,",").concat(e+n),l+="L ".concat(t+r-i/2-a,",").concat(e+n),l+="L ".concat(t,",").concat(e," Z"),l},z0e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},I0e=t=>{var e=El(t,z0e),r=E.useRef(),[a,n]=E.useState(-1);E.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var v=r.current.getTotalLength();v&&n(v)}catch{}},[]);var{x:i,y:l,upperWidth:o,lowerWidth:c,height:d,className:h}=e,{animationEasing:p,animationDuration:m,animationBegin:x,isUpdateAnimationActive:b}=e;if(i!==+i||l!==+l||o!==+o||c!==+c||d!==+d||o===0&&c===0||d===0)return null;var y=Ke("recharts-trapezoid",h);return b?E.createElement(Xx,{canBegin:a>0,from:{upperWidth:0,lowerWidth:0,height:d,x:i,y:l},to:{upperWidth:o,lowerWidth:c,height:d,x:i,y:l},duration:m,animationEasing:p,isActive:b},v=>{var{upperWidth:N,lowerWidth:C,height:S,x:k,y:A}=v;return E.createElement(Xx,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:m,easing:p},E.createElement("path",o0({},Ir(e,!0),{className:y,d:sO(k,A,N,C,S),ref:r})))}):E.createElement("g",null,E.createElement("path",o0({},Ir(e,!0),{className:y,d:sO(i,l,o,c,d)})))},F0e=["option","shapeType","propTransformer","activeClassName","isActive"];function B0e(t,e){if(t==null)return{};var r,a,n=H0e(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function H0e(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function iO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function c0(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?iO(Object(r),!0).forEach(function(a){$0e(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):iO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function $0e(t,e,r){return(e=Y0e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Y0e(t){var e=U0e(t,"string");return typeof e=="symbol"?e:e+""}function U0e(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function W0e(t,e){return c0(c0({},e),t)}function X0e(t,e){return t==="symbols"}function lO(t){var{shapeType:e,elementProps:r}=t;switch(e){case"rectangle":return E.createElement(Q9,r);case"trapezoid":return E.createElement(I0e,r);case"sector":return E.createElement(t7,r);case"symbols":if(X0e(e))return E.createElement(S9,r);break;default:return null}}function V0e(t){return E.isValidElement(t)?t.props:t}function q0e(t){var{option:e,shapeType:r,propTransformer:a=W0e,activeClassName:n="recharts-active-shape",isActive:i}=t,l=B0e(t,F0e),o;if(E.isValidElement(e))o=E.cloneElement(e,c0(c0({},l),V0e(e)));else if(typeof e=="function")o=e(l);else if(L0e(e)&&typeof e!="boolean"){var c=a(e,l);o=E.createElement(lO,{shapeType:r,elementProps:c})}else{var d=l;o=E.createElement(lO,{shapeType:r,elementProps:d})}return i?E.createElement(Sl,{className:n},o):o}var jI=(t,e)=>{var r=Fr();return(a,n)=>i=>{t?.(a,n,i),r(Wz({activeIndex:String(n),activeDataKey:e,activeCoordinate:a.tooltipPosition}))}},NI=t=>{var e=Fr();return(r,a)=>n=>{t?.(r,a,n),e(Kme())}},SI=(t,e)=>{var r=Fr();return(a,n)=>i=>{t?.(a,n,i),r(Zme({activeIndex:String(n),activeDataKey:e,activeCoordinate:a.tooltipPosition}))}};function G0e(t){var{fn:e,args:r}=t,a=Fr(),n=$n();return E.useEffect(()=>{if(!n){var i=e(r);return a(Vme(i)),()=>{a(qme(i))}}},[e,r,a,n]),null}var K0e=()=>{};function Z0e(t){var{legendPayload:e}=t,r=Fr(),a=$n();return E.useEffect(()=>a?K0e:(r(zde(e)),()=>{r(Ide(e))}),[r,a,e]),null}function Q0e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=E.useRef(Af(e)),a=E.useRef(t);return a.current!==t&&(r.current=Af(e),a.current=t),r.current}var Tw,J0e=()=>{var[t]=E.useState(()=>Af("uid-"));return t},ebe=(Tw=Pw.useId)!==null&&Tw!==void 0?Tw:J0e;function tbe(t,e){var r=ebe();return e||(t?"".concat(t,"-").concat(r):r)}var rbe=E.createContext(void 0),abe=t=>{var{id:e,type:r,children:a}=t,n=tbe("recharts-".concat(r),e);return E.createElement(rbe.Provider,{value:n},a(n))},nbe={cartesianItems:[],polarItems:[]},CI=Yt({name:"graphicalItems",initialState:nbe,reducers:{addCartesianGraphicalItem(t,e){t.cartesianItems.push(e.payload)},replaceCartesianGraphicalItem(t,e){var{prev:r,next:a}=e.payload,n=mi(t).cartesianItems.indexOf(r);n>-1&&(t.cartesianItems[n]=a)},removeCartesianGraphicalItem(t,e){var r=mi(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=mi(t).polarItems.indexOf(e.payload);r>-1&&t.polarItems.splice(r,1)}}}),{addCartesianGraphicalItem:sbe,replaceCartesianGraphicalItem:ibe,removeCartesianGraphicalItem:lbe,addPolarGraphicalItem:Q2e,removePolarGraphicalItem:J2e}=CI.actions,obe=CI.reducer;function cbe(t){var e=Fr(),r=E.useRef(null);return E.useEffect(()=>{r.current===null?e(sbe(t)):r.current!==t&&e(ibe({prev:r.current,next:t})),r.current=t},[e,t]),E.useEffect(()=>()=>{r.current&&(e(lbe(r.current)),r.current=null)},[e]),null}function dbe(){}var ube={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},oO={t:0},Mw={t:1};function hbe(t){var e=El(t,ube),{isActive:r,canBegin:a,duration:n,easing:i,begin:l,onAnimationEnd:o,onAnimationStart:c,children:d}=e,h=Z9("JavascriptAnimate",e.animationManager),[p,m]=E.useState(r?oO:Mw),x=E.useRef(null);return E.useEffect(()=>{r||m(Mw)},[r]),E.useEffect(()=>{if(!r||!a)return dbe;var b=K9(oO,Mw,q9(i),n,m,h.getTimeoutController()),y=()=>{x.current=b()};return h.start([c,l,y,n,o]),()=>{h.stop(),x.current&&x.current(),o()}},[r,a,n,i,l,c,o,h]),d(p.t)}var fbe=de([Br],t=>{if(t)return{top:t.top,bottom:t.bottom,left:t.left,right:t.right}}),pbe=de([fbe,Ai,ki],(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)}}),AI=()=>Fe(pbe),mbe="Invariant failed";function gbe(t,e){throw new Error(mbe)}var xbe=["x","y"];function y4(){return y4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},y4.apply(null,arguments)}function cO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Ah(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?cO(Object(r),!0).forEach(function(a){bbe(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function bbe(t,e,r){return(e=ybe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ybe(t){var e=vbe(t,"string");return typeof e=="symbol"?e:e+""}function vbe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wbe(t,e){if(t==null)return{};var r,a,n=jbe(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function jbe(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function Nbe(t,e){var{x:r,y:a}=t,n=wbe(t,xbe),i="".concat(r),l=parseInt(i,10),o="".concat(a),c=parseInt(o,10),d="".concat(e.height||n.height),h=parseInt(d,10),p="".concat(e.width||n.width),m=parseInt(p,10);return Ah(Ah(Ah(Ah(Ah({},e),n),l?{x:l}:{}),c?{y:c}:{}),{},{height:h,width:m,name:e.name,radius:e.radius})}function kI(t){return E.createElement(q0e,y4({shapeType:"rectangle",propTransformer:Nbe,activeClassName:"recharts-active-bar"},t))}var Sbe=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(a,n)=>{if(Oe(e))return e;var i=Oe(a)||Dr(a);return i?e(a,n):(i||gbe(),r)}},Cbe={},DI=Yt({name:"errorBars",initialState:Cbe,reducers:{addErrorBar:(t,e)=>{var{itemId:r,errorBar:a}=e.payload;t[r]||(t[r]=[]),t[r].push(a)},removeErrorBar:(t,e)=>{var{itemId:r,errorBar:a}=e.payload;t[r]&&(t[r]=t[r].filter(n=>n.dataKey!==a.dataKey||n.direction!==a.direction))}}}),{addErrorBar:ewe,removeErrorBar:twe}=DI.actions,Abe=DI.reducer,kbe=["children"];function Dbe(t,e){if(t==null)return{};var r,a,n=Tbe(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Tbe(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var Mbe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Ebe=E.createContext(Mbe);function Pbe(t){var{children:e}=t,r=Dbe(t,kbe);return E.createElement(Ebe.Provider,{value:r},e)}function TI(t,e){var r,a,n=Fe(d=>Ti(d,t)),i=Fe(d=>_l(d,e)),l=(r=n?.allowDataOverflow)!==null&&r!==void 0?r:Za.allowDataOverflow,o=(a=i?.allowDataOverflow)!==null&&a!==void 0?a:Qa.allowDataOverflow,c=l||o;return{needClip:c,needClipX:l,needClipY:o}}function Obe(t){var{xAxisId:e,yAxisId:r,clipPathId:a}=t,n=AI(),{needClipX:i,needClipY:l,needClip:o}=TI(e,r);if(!o)return null;var{x:c,y:d,width:h,height:p}=n;return E.createElement("clipPath",{id:"clipPath-".concat(a)},E.createElement("rect",{x:i?c:c-h/2,y:l?d:d-p/2,width:i?h:h*2,height:l?p:p*2}))}var Rbe=["onMouseEnter","onMouseLeave","onClick"],_be=["value","background","tooltipPosition"],Lbe=["id"],zbe=["onMouseEnter","onClick","onMouseLeave"];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 a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Rd.apply(null,arguments)}function dO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function la(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?dO(Object(r),!0).forEach(function(a){Ibe(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):dO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Ibe(t,e,r){return(e=Fbe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Fbe(t){var e=Bbe(t,"string");return typeof e=="symbol"?e:e+""}function Bbe(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function d0(t,e){if(t==null)return{};var r,a,n=Hbe(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Hbe(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var $be=t=>{var{dataKey:e,name:r,fill:a,legendType:n,hide:i}=t;return[{inactive:i,dataKey:e,type:n,color:a,value:I9(r,e),payload:t}]};function Ybe(t){var{dataKey:e,stroke:r,strokeWidth:a,fill:n,name:i,hide:l,unit:o}=t;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:a,fill:n,dataKey:e,nameKey:void 0,name:I9(i,e),hide:l,type:t.tooltipType,color:t.fill,unit:o}}}function Ube(t){var e=Fe(Od),{data:r,dataKey:a,background:n,allOtherBarProps:i}=t,{onMouseEnter:l,onMouseLeave:o,onClick:c}=i,d=d0(i,Rbe),h=jI(l,a),p=NI(o),m=SI(c,a);if(!n||r==null)return null;var x=Ir(n,!1);return E.createElement(E.Fragment,null,r.map((b,y)=>{var{value:v,background:N,tooltipPosition:C}=b,S=d0(b,_be);if(!N)return null;var k=h(b,y),A=p(b,y),T=m(b,y),M=la(la(la(la(la({option:n,isActive:String(y)===e},S),{},{fill:"#eee"},N),x),VN(d,b,y)),{},{onMouseEnter:k,onMouseLeave:A,onClick:T,dataKey:a,index:y,className:"recharts-bar-background-rectangle"});return E.createElement(kI,Rd({key:"background-bar-".concat(y)},M))}))}function MI(t){var{data:e,props:r,showLabels:a}=t,n=up(r),{id:i}=n,l=d0(n,Lbe),{shape:o,dataKey:c,activeBar:d}=r,h=Fe(Od),p=Fe(nI),{onMouseEnter:m,onClick:x,onMouseLeave:b}=r,y=d0(r,zbe),v=jI(m,c),N=NI(b),C=SI(x,c);return e?E.createElement(E.Fragment,null,e.map((S,k)=>{var A=d&&String(k)===h&&(p==null||c===p),T=A?d:o,M=la(la(la({},l),S),{},{isActive:A,option:T,index:k,dataKey:c});return E.createElement(Sl,Rd({className:"recharts-bar-rectangle"},VN(y,S,k),{onMouseEnter:v(S,k),onMouseLeave:N(S,k),onClick:C(S,k),key:"rectangle-".concat(S?.x,"-").concat(S?.y,"-").concat(S?.value,"-").concat(k)}),E.createElement(kI,M))}),a&&Fo.renderCallByParent(r,e)):null}function Wbe(t){var{props:e,previousRectanglesRef:r}=t,{data:a,layout:n,isAnimationActive:i,animationBegin:l,animationDuration:o,animationEasing:c,onAnimationEnd:d,onAnimationStart:h}=e,p=r.current,m=Q0e(e,"recharts-bar-"),[x,b]=E.useState(!1),y=E.useCallback(()=>{typeof d=="function"&&d(),b(!1)},[d]),v=E.useCallback(()=>{typeof h=="function"&&h(),b(!0)},[h]);return E.createElement(hbe,{begin:l,duration:o,isActive:i,easing:c,onAnimationEnd:y,onAnimationStart:v,key:m},N=>{var C=N===1?a:a?.map((S,k)=>{var A=p&&p[k];if(A)return la(la({},S),{},{x:rd(A.x,S.x,N),y:rd(A.y,S.y,N),width:rd(A.width,S.width,N),height:rd(A.height,S.height,N)});if(n==="horizontal"){var T=rd(0,S.height,N);return la(la({},S),{},{y:S.y+S.height-T,height:T})}var M=rd(0,S.width,N);return la(la({},S),{},{width:M})});return N>0&&(r.current=C??null),C==null?null:E.createElement(Sl,null,E.createElement(MI,{props:e,data:C,showLabels:!x}))})}function Xbe(t){var{data:e,isAnimationActive:r}=t,a=E.useRef(null);return r&&e&&e.length&&(a.current==null||a.current!==e)?E.createElement(Wbe,{previousRectanglesRef:a,props:t}):E.createElement(MI,{props:t,data:e,showLabels:!0})}var EI=0,Vbe=(t,e)=>{var r=Array.isArray(t.value)?t.value[1]:t.value;return{x:t.x,y:t.y,value:r,errorVal:ba(t,e)}};class qbe extends E.PureComponent{render(){var{hide:e,data:r,dataKey:a,className:n,xAxisId:i,yAxisId:l,needClip:o,background:c,id:d}=this.props;if(e)return null;var h=Ke("recharts-bar",n),p=d;return E.createElement(Sl,{className:h,id:d},o&&E.createElement("defs",null,E.createElement(Obe,{clipPathId:p,xAxisId:i,yAxisId:l})),E.createElement(Sl,{className:"recharts-bar-rectangles",clipPath:o?"url(#clipPath-".concat(p,")"):void 0},E.createElement(Ube,{data:r,dataKey:a,background:c,allOtherBarProps:this.props}),E.createElement(Xbe,this.props)),this.props.children)}}var Gbe={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!hp.isSsr,legendType:"rect",minPointSize:EI,xAxisId:0,yAxisId:0};function Kbe(t){var{xAxisId:e,yAxisId:r,hide:a,legendType:n,minPointSize:i,activeBar:l,animationBegin:o,animationDuration:c,animationEasing:d,isAnimationActive:h}=t,{needClip:p}=TI(e,r),m=oS(),x=$n(),b=qN(t.children,pI),y=Fe(C=>Nye(C,e,r,x,t.id,b));if(m!=="vertical"&&m!=="horizontal")return null;var v,N=y?.[0];return N==null||N.height==null||N.width==null?v=0:v=m==="vertical"?N.height/2:N.width/2,E.createElement(Pbe,{xAxisId:e,yAxisId:r,data:y,dataPointFormatter:Vbe,errorBarOffset:v},E.createElement(qbe,Rd({},t,{layout:m,needClip:p,data:y,xAxisId:e,yAxisId:r,hide:a,legendType:n,minPointSize:i,activeBar:l,animationBegin:o,animationDuration:c,animationEasing:d,isAnimationActive:h})))}function Zbe(t){var{layout:e,barSettings:{dataKey:r,minPointSize:a},pos:n,bandSize:i,xAxis:l,yAxis:o,xAxisTicks:c,yAxisTicks:d,stackedData:h,displayedData:p,offset:m,cells:x}=t,b=e==="horizontal"?o:l,y=h?b.scale.domain():null,v=yde({numericAxis:b});return p.map((N,C)=>{var S,k,A,T,M,O;h?S=fde(h[C],y):(S=ba(N,r),Array.isArray(S)||(S=[v,S]));var _=Sbe(a,EI)(S[1],C);if(e==="horizontal"){var R,[L,z]=[o.scale(S[0]),o.scale(S[1])];k=tE({axis:l,ticks:c,bandSize:i,offset:n.offset,entry:N,index:C}),A=(R=z??L)!==null&&R!==void 0?R:void 0,T=n.size;var F=L-z;if(M=cn(F)?0:F,O={x:k,y:m.top,width:T,height:m.height},Math.abs(_)>0&&Math.abs(M)<Math.abs(_)){var Y=Oa(M||_)*(Math.abs(_)-Math.abs(M));A-=Y,M+=Y}}else{var[X,H]=[l.scale(S[0]),l.scale(S[1])];if(k=X,A=tE({axis:o,ticks:d,bandSize:i,offset:n.offset,entry:N,index:C}),T=H-X,M=n.size,O={x:m.left,y:A,width:m.width,height:M},Math.abs(_)>0&&Math.abs(T)<Math.abs(_)){var W=Oa(T||_)*(Math.abs(_)-Math.abs(T));T+=W}}if(k==null||A==null||T==null||M==null)return null;var V=la(la({},N),{},{x:k,y:A,width:T,height:M,value:h?S:S[1],payload:N,background:O,tooltipPosition:{x:k+T/2,y:A+M/2}},x&&x[C]&&x[C].props);return V}).filter(Boolean)}function PI(t){var e=El(t,Gbe),r=$n();return E.createElement(abe,{id:e.id,type:"bar"},a=>E.createElement(E.Fragment,null,E.createElement(Z0e,{legendPayload:$be(e)}),E.createElement(G0e,{fn:Ybe,args:e}),E.createElement(cbe,{type:"bar",id:a,data:void 0,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,stackId:bde(e.stackId),hide:e.hide,barSize:e.barSize,minPointSize:e.minPointSize,maxBarSize:e.maxBarSize,isPanorama:r}),E.createElement(Kbe,Rd({},e,{id:a}))))}PI.displayName="Bar";function uO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Cg(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?uO(Object(r),!0).forEach(function(a){Qbe(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):uO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Qbe(t,e,r){return(e=Jbe(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Jbe(t){var e=eye(t,"string");return typeof e=="symbol"?e:e+""}function eye(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var tye=(t,e)=>e,rye=(t,e,r)=>r,aye=(t,e,r,a)=>a,nye=(t,e,r,a,n)=>n,Np=de([US,nye],(t,e)=>t.filter(r=>r.type==="bar").find(r=>r.id===e)),sye=de([Np],t=>t?.maxBarSize),iye=(t,e,r,a,n,i)=>i,hO=(t,e,r)=>{var a=r??t;if(!Dr(a))return rs(a,e,0)},lye=de([At,US,tye,rye,aye],(t,e,r,a,n)=>e.filter(i=>t==="horizontal"?i.xAxisId===r:i.yAxisId===a).filter(i=>i.isPanorama===n).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),oye=(t,e,r,a)=>{var n=At(t);return n==="horizontal"?f4(t,"yAxis",r,a):f4(t,"xAxis",e,a)},cye=(t,e,r)=>{var a=At(t);return a==="horizontal"?yP(t,"xAxis",e):yP(t,"yAxis",r)},dye=(t,e,r)=>{var a={},n=t.filter(wb),i=t.filter(d=>d.stackId==null),l=n.reduce((d,h)=>(d[h.stackId]||(d[h.stackId]=[]),d[h.stackId].push(h),d),a),o=Object.entries(l).map(d=>{var[h,p]=d,m=p.map(b=>b.dataKey),x=hO(e,r,p[0].barSize);return{stackId:h,dataKeys:m,barSize:x}}),c=i.map(d=>{var h=[d.dataKey].filter(m=>m!=null),p=hO(e,r,d.barSize);return{stackId:void 0,dataKeys:h,barSize:p}});return[...o,...c]},uye=de([lye,Vpe,cye],dye),hye=(t,e,r,a,n)=>{var i,l,o=Np(t,e,r,a,n);if(o!=null){var c=At(t),d=Z7(t),{maxBarSize:h}=o,p=Dr(h)?d:h,m,x;return c==="horizontal"?(m=Pd(t,"xAxis",e,a),x=Ed(t,"xAxis",e,a)):(m=Pd(t,"yAxis",r,a),x=Ed(t,"yAxis",r,a)),(i=(l=nS(m,x,!0))!==null&&l!==void 0?l:p)!==null&&i!==void 0?i:0}},OI=(t,e,r,a)=>{var n=At(t),i,l;return n==="horizontal"?(i=Pd(t,"xAxis",e,a),l=Ed(t,"xAxis",e,a)):(i=Pd(t,"yAxis",r,a),l=Ed(t,"yAxis",r,a)),nS(i,l)};function fye(t,e,r,a,n){var i=a.length;if(!(i<1)){var l=rs(t,r,0,!0),o,c=[];if(dn(a[0].barSize)){var d=!1,h=r/i,p=a.reduce((N,C)=>N+(C.barSize||0),0);p+=(i-1)*l,p>=r&&(p-=(i-1)*l,l=0),p>=r&&h>0&&(d=!0,h*=.9,p=i*h);var m=(r-p)/2>>0,x={offset:m-l,size:0};o=a.reduce((N,C)=>{var S,k={stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:x.offset+x.size+l,size:d?h:(S=C.barSize)!==null&&S!==void 0?S:0}},A=[...N,k];return x=A[A.length-1].position,A},c)}else{var b=rs(e,r,0,!0);r-2*b-(i-1)*l<=0&&(l=0);var y=(r-2*b-(i-1)*l)/i;y>1&&(y>>=0);var v=dn(n)?Math.min(y,n):y;o=a.reduce((N,C,S)=>[...N,{stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:b+(y+l)*S+(y-v)/2,size:v}}],c)}return o}}var pye=(t,e,r,a,n,i,l)=>{var o=Dr(l)?e:l,c=fye(r,a,n!==i?n:i,t,o);return n!==i&&c!=null&&(c=c.map(d=>Cg(Cg({},d),{},{position:Cg(Cg({},d.position),{},{offset:d.position.offset-n/2})}))),c},mye=de([uye,Z7,Xpe,Q7,hye,OI,sye],pye),gye=(t,e,r,a)=>Pd(t,"xAxis",e,a),xye=(t,e,r,a)=>Pd(t,"yAxis",r,a),bye=(t,e,r,a)=>Ed(t,"xAxis",e,a),yye=(t,e,r,a)=>Ed(t,"yAxis",r,a),vye=de([mye,Np],(t,e)=>{if(!(t==null||e==null)){var r=t.find(a=>a.stackId===e.stackId&&e.dataKey!=null&&a.dataKeys.includes(e.dataKey));if(r!=null)return r.position}}),wye=(t,e)=>{var r=$S(e);if(!(!t||r==null||e==null)){var{stackId:a}=e;if(a!=null){var n=t[a];if(n){var{stackedData:i}=n;if(i)return i.find(l=>l.key===r)}}}},jye=de([oye,Np],wye),Nye=de([Br,gye,xye,bye,yye,vye,At,OS,OI,jye,Np,iye],(t,e,r,a,n,i,l,o,c,d,h,p)=>{var{chartData:m,dataStartIndex:x,dataEndIndex:b}=o;if(!(h==null||i==null||l!=="horizontal"&&l!=="vertical"||e==null||r==null||a==null||n==null||c==null)){var{data:y}=h,v;if(y!=null&&y.length>0?v=y:v=m?.slice(x,b+1),v!=null)return Zbe({layout:l,barSettings:h,pos:i,bandSize:c,xAxis:e,yAxis:r,xAxisTicks:a,yAxisTicks:n,stackedData:d,displayedData:v,offset:t,cells:p})}}),Sye=t=>{var{chartData:e}=t,r=Fr(),a=$n();return E.useEffect(()=>a?()=>{}:(r(TP(e)),()=>{r(TP(void 0))}),[e,r,a]),null},fO={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},RI=Yt({name:"brush",initialState:fO,reducers:{setBrushSettings(t,e){return e.payload==null?fO:e.payload}}}),{setBrushSettings:rwe}=RI.actions,Cye=RI.reducer;function Aye(t,e,r){return(e=kye(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kye(t){var e=Dye(t,"string");return typeof e=="symbol"?e:e+""}function Dye(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class c3{static create(e){return new c3(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:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e!==void 0){if(a)switch(a){case"start":return this.scale(e);case"middle":{var n=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+n}case"end":{var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i}default:return this.scale(e)}if(r){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+l}return this.scale(e)}}isInRange(e){var r=this.range(),a=r[0],n=r[r.length-1];return a<=n?e>=a&&e<=n:e>=n&&e<=a}}Aye(c3,"EPS",1e-4);function Tye(t){return(t%180+180)%180}var Mye=function(e){var{width:r,height:a}=e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Tye(n),l=i*Math.PI/180,o=Math.atan(a/r),c=l>o&&l<Math.PI-o?a/Math.sin(l):r/Math.cos(l);return Math.abs(c)},Eye={dots:[],areas:[],lines:[]},_I=Yt({name:"referenceElements",initialState:Eye,reducers:{addDot:(t,e)=>{t.dots.push(e.payload)},removeDot:(t,e)=>{var r=mi(t).dots.findIndex(a=>a===e.payload);r!==-1&&t.dots.splice(r,1)},addArea:(t,e)=>{t.areas.push(e.payload)},removeArea:(t,e)=>{var r=mi(t).areas.findIndex(a=>a===e.payload);r!==-1&&t.areas.splice(r,1)},addLine:(t,e)=>{t.lines.push(e.payload)},removeLine:(t,e)=>{var r=mi(t).lines.findIndex(a=>a===e.payload);r!==-1&&t.lines.splice(r,1)}}}),{addDot:awe,removeDot:nwe,addArea:swe,removeArea:iwe,addLine:lwe,removeLine:owe}=_I.actions,Pye=_I.reducer,Oye=E.createContext(void 0),Rye=t=>{var{children:e}=t,[r]=E.useState("".concat(Af("recharts"),"-clip")),a=AI();if(a==null)return null;var{x:n,y:i,width:l,height:o}=a;return E.createElement(Oye.Provider,{value:r},E.createElement("defs",null,E.createElement("clipPath",{id:r},E.createElement("rect",{x:n,y:i,height:o,width:l}))),e)};function Ew(t,e){for(var r in t)if({}.hasOwnProperty.call(t,r)&&(!{}.hasOwnProperty.call(e,r)||t[r]!==e[r]))return!1;for(var a in e)if({}.hasOwnProperty.call(e,a)&&!{}.hasOwnProperty.call(t,a))return!1;return!0}function LI(t,e,r){if(e<1)return[];if(e===1&&r===void 0)return t;for(var a=[],n=0;n<t.length;n+=e)a.push(t[n]);return a}function _ye(t,e,r){var a={width:t.width+e.width,height:t.height+e.height};return Mye(a,r)}function Lye(t,e,r){var a=r==="width",{x:n,y:i,width:l,height:o}=t;return e===1?{start:a?n:i,end:a?n+l:i+o}:{start:a?n+l:i+o,end:a?n:i}}function u0(t,e,r,a,n){if(t*e<t*a||t*e>t*n)return!1;var i=r();return t*(e-t*i/2-a)>=0&&t*(e+t*i/2-n)<=0}function zye(t,e){return LI(t,e+1)}function Iye(t,e,r,a,n){for(var i=(a||[]).slice(),{start:l,end:o}=e,c=0,d=1,h=l,p=function(){var b=a?.[c];if(b===void 0)return{v:LI(a,d)};var y=c,v,N=()=>(v===void 0&&(v=r(b,y)),v),C=b.coordinate,S=c===0||u0(t,C,N,h,o);S||(c=0,h=l,d+=1),S&&(h=C+t*(N()/2+n),c+=d)},m;d<=i.length;)if(m=p(),m)return m.v;return[]}function pO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function ia(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pO(Object(r),!0).forEach(function(a){Fye(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Fye(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=Hye(t,"string");return typeof e=="symbol"?e:e+""}function Hye(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $ye(t,e,r,a,n){for(var i=(a||[]).slice(),l=i.length,{start:o}=e,{end:c}=e,d=function(m){var x=i[m],b,y=()=>(b===void 0&&(b=r(x,m)),b);if(m===l-1){var v=t*(x.coordinate+t*y()/2-c);i[m]=x=ia(ia({},x),{},{tickCoord:v>0?x.coordinate-v*t:x.coordinate})}else i[m]=x=ia(ia({},x),{},{tickCoord:x.coordinate});var N=u0(t,x.tickCoord,y,o,c);N&&(c=x.tickCoord-t*(y()/2+n),i[m]=ia(ia({},x),{},{isShow:!0}))},h=l-1;h>=0;h--)d(h);return i}function Yye(t,e,r,a,n,i){var l=(a||[]).slice(),o=l.length,{start:c,end:d}=e;if(i){var h=a[o-1],p=r(h,o-1),m=t*(h.coordinate+t*p/2-d);l[o-1]=h=ia(ia({},h),{},{tickCoord:m>0?h.coordinate-m*t:h.coordinate});var x=u0(t,h.tickCoord,()=>p,c,d);x&&(d=h.tickCoord-t*(p/2+n),l[o-1]=ia(ia({},h),{},{isShow:!0}))}for(var b=i?o-1:o,y=function(C){var S=l[C],k,A=()=>(k===void 0&&(k=r(S,C)),k);if(C===0){var T=t*(S.coordinate-t*A()/2-c);l[C]=S=ia(ia({},S),{},{tickCoord:T<0?S.coordinate-T*t:S.coordinate})}else l[C]=S=ia(ia({},S),{},{tickCoord:S.coordinate});var M=u0(t,S.tickCoord,A,c,d);M&&(c=S.tickCoord+t*(A()/2+n),l[C]=ia(ia({},S),{},{isShow:!0}))},v=0;v<b;v++)y(v);return l}function d3(t,e,r){var{tick:a,ticks:n,viewBox:i,minTickGap:l,orientation:o,interval:c,tickFormatter:d,unit:h,angle:p}=t;if(!n||!n.length||!a)return[];if(Oe(c)||hp.isSsr){var m;return(m=zye(n,Oe(c)?c:0))!==null&&m!==void 0?m:[]}var x=[],b=o==="top"||o==="bottom"?"width":"height",y=h&&b==="width"?rf(h,{fontSize:e,letterSpacing:r}):{width:0,height:0},v=(S,k)=>{var A=typeof d=="function"?d(S.value,k):S.value;return b==="width"?_ye(rf(A,{fontSize:e,letterSpacing:r}),y,p):rf(A,{fontSize:e,letterSpacing:r})[b]},N=n.length>=2?Oa(n[1].coordinate-n[0].coordinate):1,C=Lye(i,N,b);return c==="equidistantPreserveStart"?Iye(N,C,v,n,l):(c==="preserveStart"||c==="preserveStartEnd"?x=Yye(N,C,v,n,l,c==="preserveStartEnd"):x=$ye(N,C,v,n,l),x.filter(S=>S.isShow))}var Uye=["viewBox"],Wye=["viewBox"];function ld(){return ld=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ld.apply(null,arguments)}function mO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function Nr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mO(Object(r),!0).forEach(function(a){u3(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function gO(t,e){if(t==null)return{};var r,a,n=Xye(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Xye(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function u3(t,e,r){return(e=Vye(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vye(t){var e=qye(t,"string");return typeof e=="symbol"?e:e+""}function qye(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Ll extends E.Component{constructor(e){super(e),this.tickRefs=E.createRef(),this.tickRefs.current=[],this.state={fontSize:"",letterSpacing:""}}shouldComponentUpdate(e,r){var{viewBox:a}=e,n=gO(e,Uye),i=this.props,{viewBox:l}=i,o=gO(i,Wye);return!Ew(a,l)||!Ew(n,o)||!Ew(r,this.state)}getTickLineCoord(e){var{x:r,y:a,width:n,height:i,orientation:l,tickSize:o,mirror:c,tickMargin:d}=this.props,h,p,m,x,b,y,v=c?-1:1,N=e.tickSize||o,C=Oe(e.tickCoord)?e.tickCoord:e.coordinate;switch(l){case"top":h=p=e.coordinate,x=a+ +!c*i,m=x-v*N,y=m-v*d,b=C;break;case"left":m=x=e.coordinate,p=r+ +!c*n,h=p-v*N,b=h-v*d,y=C;break;case"right":m=x=e.coordinate,p=r+ +c*n,h=p+v*N,b=h+v*d,y=C;break;default:h=p=e.coordinate,x=a+ +c*i,m=x+v*N,y=m+v*d,b=C;break}return{line:{x1:h,y1:m,x2:p,y2:x},tick:{x:b,y}}}getTickTextAnchor(){var{orientation:e,mirror:r}=this.props,a;switch(e){case"left":a=r?"start":"end";break;case"right":a=r?"end":"start";break;default:a="middle";break}return a}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:a,height:n,orientation:i,mirror:l,axisLine:o}=this.props,c=Nr(Nr(Nr({},Ir(this.props,!1)),Ir(o,!1)),{},{fill:"none"});if(i==="top"||i==="bottom"){var d=+(i==="top"&&!l||i==="bottom"&&l);c=Nr(Nr({},c),{},{x1:e,y1:r+d*n,x2:e+a,y2:r+d*n})}else{var h=+(i==="left"&&!l||i==="right"&&l);c=Nr(Nr({},c),{},{x1:e+h*a,y1:r,x2:e+h*a,y2:r+n})}return E.createElement("line",ld({},c,{className:Ke("recharts-cartesian-axis-line",Ko(o,"className"))}))}static renderTickItem(e,r,a){var n,i=Ke(r.className,"recharts-cartesian-axis-tick-value");if(E.isValidElement(e))n=E.cloneElement(e,Nr(Nr({},r),{},{className:i}));else if(typeof e=="function")n=e(Nr(Nr({},r),{},{className:i}));else{var l="recharts-cartesian-axis-tick-value";typeof e!="boolean"&&(l=Ke(l,e.className)),n=E.createElement(l3,ld({},r,{className:l}),a)}return n}renderTicks(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],{tickLine:n,stroke:i,tick:l,tickFormatter:o,unit:c,padding:d}=this.props,h=d3(Nr(Nr({},this.props),{},{ticks:a}),e,r),p=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),x=up(this.props),b=Ir(l,!1),y=Nr(Nr({},x),{},{fill:"none"},Ir(n,!1)),v=h.map((N,C)=>{var{line:S,tick:k}=this.getTickLineCoord(N),A=Nr(Nr(Nr(Nr({textAnchor:p,verticalAnchor:m},x),{},{stroke:"none",fill:i},b),k),{},{index:C,payload:N,visibleTicksCount:h.length,tickFormatter:o,padding:d});return E.createElement(Sl,ld({className:"recharts-cartesian-axis-tick",key:"tick-".concat(N.value,"-").concat(N.coordinate,"-").concat(N.tickCoord)},VN(this.props,N,C)),n&&E.createElement("line",ld({},y,S,{className:Ke("recharts-cartesian-axis-tick-line",Ko(n,"className"))})),l&&Ll.renderTickItem(l,A,"".concat(typeof o=="function"?o(N.value,C):N.value).concat(c||"")))});return v.length>0?E.createElement("g",{className:"recharts-cartesian-axis-ticks"},v):null}render(){var{axisLine:e,width:r,height:a,className:n,hide:i}=this.props;if(i)return null;var{ticks:l}=this.props;return r!=null&&r<=0||a!=null&&a<=0?null:E.createElement(Sl,{className:Ke("recharts-cartesian-axis",n),ref:o=>{if(o){var c=o.getElementsByClassName("recharts-cartesian-axis-tick-value");this.tickRefs.current=Array.from(c);var d=c[0];if(d){var h=window.getComputedStyle(d).fontSize,p=window.getComputedStyle(d).letterSpacing;(h!==this.state.fontSize||p!==this.state.letterSpacing)&&this.setState({fontSize:window.getComputedStyle(d).fontSize,letterSpacing:window.getComputedStyle(d).letterSpacing})}}}},e&&this.renderAxisLine(),this.renderTicks(this.state.fontSize,this.state.letterSpacing,l),en.renderCallByParent(this.props))}}u3(Ll,"displayName","CartesianAxis");u3(Ll,"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 Gye=["x1","y1","x2","y2","key"],Kye=["offset"],Zye=["xAxisId","yAxisId"],Qye=["xAxisId","yAxisId"];function xO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function oa(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xO(Object(r),!0).forEach(function(a){Jye(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Jye(t,e,r){return(e=eve(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eve(t){var e=tve(t,"string");return typeof e=="symbol"?e:e+""}function tve(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Mo(){return Mo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Mo.apply(null,arguments)}function h0(t,e){if(t==null)return{};var r,a,n=rve(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function rve(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var ave=t=>{var{fill:e}=t;if(!e||e==="none")return null;var{fillOpacity:r,x:a,y:n,width:i,height:l,ry:o}=t;return E.createElement("rect",{x:a,y:n,ry:o,width:i,height:l,stroke:"none",fill:e,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function zI(t,e){var r;if(E.isValidElement(t))r=E.cloneElement(t,e);else if(typeof t=="function")r=t(e);else{var{x1:a,y1:n,x2:i,y2:l,key:o}=e,c=h0(e,Gye),d=up(c),{offset:h}=d,p=h0(d,Kye);r=E.createElement("line",Mo({},p,{x1:a,y1:n,x2:i,y2:l,fill:"none",key:o}))}return r}function nve(t){var{x:e,width:r,horizontal:a=!0,horizontalPoints:n}=t;if(!a||!n||!n.length)return null;var{xAxisId:i,yAxisId:l}=t,o=h0(t,Zye),c=n.map((d,h)=>{var p=oa(oa({},o),{},{x1:e,y1:d,x2:e+r,y2:d,key:"line-".concat(h),index:h});return zI(a,p)});return E.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function sve(t){var{y:e,height:r,vertical:a=!0,verticalPoints:n}=t;if(!a||!n||!n.length)return null;var{xAxisId:i,yAxisId:l}=t,o=h0(t,Qye),c=n.map((d,h)=>{var p=oa(oa({},o),{},{x1:d,y1:e,x2:d,y2:e+r,key:"line-".concat(h),index:h});return zI(a,p)});return E.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function ive(t){var{horizontalFill:e,fillOpacity:r,x:a,y:n,width:i,height:l,horizontalPoints:o,horizontal:c=!0}=t;if(!c||!e||!e.length)return null;var d=o.map(p=>Math.round(p+n-n)).sort((p,m)=>p-m);n!==d[0]&&d.unshift(0);var h=d.map((p,m)=>{var x=!d[m+1],b=x?n+l-p:d[m+1]-p;if(b<=0)return null;var y=m%e.length;return E.createElement("rect",{key:"react-".concat(m),y:p,x:a,height:b,width:i,stroke:"none",fill:e[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return E.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function lve(t){var{vertical:e=!0,verticalFill:r,fillOpacity:a,x:n,y:i,width:l,height:o,verticalPoints:c}=t;if(!e||!r||!r.length)return null;var d=c.map(p=>Math.round(p+n-n)).sort((p,m)=>p-m);n!==d[0]&&d.unshift(0);var h=d.map((p,m)=>{var x=!d[m+1],b=x?n+l-p:d[m+1]-p;if(b<=0)return null;var y=m%r.length;return E.createElement("rect",{key:"react-".concat(m),x:p,y:i,width:b,height:o,stroke:"none",fill:r[y],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return E.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var ove=(t,e)=>{var{xAxis:r,width:a,height:n,offset:i}=t;return L9(d3(oa(oa(oa({},Ll.defaultProps),r),{},{ticks:z9(r),viewBox:{x:0,y:0,width:a,height:n}})),i.left,i.left+i.width,e)},cve=(t,e)=>{var{yAxis:r,width:a,height:n,offset:i}=t;return L9(d3(oa(oa(oa({},Ll.defaultProps),r),{},{ticks:z9(r),viewBox:{x:0,y:0,width:a,height:n}})),i.top,i.top+i.height,e)},dve={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function II(t){var e=$9(),r=Y9(),a=H9(),n=oa(oa({},El(t,dve)),{},{x:Oe(t.x)?t.x:a.left,y:Oe(t.y)?t.y:a.top,width:Oe(t.width)?t.width:a.width,height:Oe(t.height)?t.height:a.height}),{xAxisId:i,yAxisId:l,x:o,y:c,width:d,height:h,syncWithTicks:p,horizontalValues:m,verticalValues:x}=n,b=$n(),y=Fe(_=>vP(_,"xAxis",i,b)),v=Fe(_=>vP(_,"yAxis",l,b));if(!Oe(d)||d<=0||!Oe(h)||h<=0||!Oe(o)||o!==+o||!Oe(c)||c!==+c)return null;var N=n.verticalCoordinatesGenerator||ove,C=n.horizontalCoordinatesGenerator||cve,{horizontalPoints:S,verticalPoints:k}=n;if((!S||!S.length)&&typeof C=="function"){var A=m&&m.length,T=C({yAxis:v?oa(oa({},v),{},{ticks:A?m:v.ticks}):void 0,width:e,height:r,offset:a},A?!0:p);tf(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof T,"]")),Array.isArray(T)&&(S=T)}if((!k||!k.length)&&typeof N=="function"){var M=x&&x.length,O=N({xAxis:y?oa(oa({},y),{},{ticks:M?x:y.ticks}):void 0,width:e,height:r,offset:a},M?!0:p);tf(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(k=O)}return E.createElement("g",{className:"recharts-cartesian-grid"},E.createElement(ave,{fill:n.fill,fillOpacity:n.fillOpacity,x:n.x,y:n.y,width:n.width,height:n.height,ry:n.ry}),E.createElement(ive,Mo({},n,{horizontalPoints:S})),E.createElement(lve,Mo({},n,{verticalPoints:k})),E.createElement(nve,Mo({},n,{offset:a,horizontalPoints:S,xAxis:y,yAxis:v})),E.createElement(sve,Mo({},n,{offset:a,verticalPoints:k,xAxis:y,yAxis:v})))}II.displayName="CartesianGrid";function bO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}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(a){uve(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function uve(t,e,r){return(e=hve(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hve(t){var e=fve(t,"string");return typeof e=="symbol"?e:e+""}function fve(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var pve={xAxis:{},yAxis:{},zAxis:{}},FI=Yt({name:"cartesianAxis",initialState:pve,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:a}=e.payload;t.yAxis[r]&&(t.yAxis[r]=yO(yO({},t.yAxis[r]),{},{width:a}))}}}),{addXAxis:mve,removeXAxis:gve,addYAxis:xve,removeYAxis:bve,addZAxis:cwe,removeZAxis:dwe,updateYAxisWidth:yve}=FI.actions,vve=FI.reducer,wve=["children"],jve=["dangerouslySetInnerHTML","ticks"];function BI(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 a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function v4(){return v4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},v4.apply(null,arguments)}function HI(t,e){if(t==null)return{};var r,a,n=Cve(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Cve(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function Ave(t){var e=Fr(),r=E.useMemo(()=>{var{children:i}=t,l=HI(t,wve);return l},[t]),a=Fe(i=>Ti(i,r.id)),n=r===a;return E.useEffect(()=>(e(mve(r)),()=>{e(gve(r))}),[r,e]),n?t.children:null}var kve=t=>{var{xAxisId:e,className:r}=t,a=Fe(B9),n=$n(),i="xAxis",l=Fe(x=>au(x,i,e,n)),o=Fe(x=>Fz(x,i,e,n)),c=Fe(x=>_z(x,e)),d=Fe(x=>Ime(x,e));if(c==null||d==null)return null;var{dangerouslySetInnerHTML:h,ticks:p}=t,m=HI(t,jve);return E.createElement(Ll,v4({},m,{scale:l,x:d.x,y:d.y,width:c.width,height:c.height,className:Ke("recharts-".concat(i," ").concat(i),r),viewBox:a,ticks:o}))},Dve=t=>{var e,r,a,n,i;return E.createElement(Ave,{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:(a=t.angle)!==null&&a!==void 0?a:0,minTickGap:(n=t.minTickGap)!==null&&n!==void 0?n:5,tick:(i=t.tick)!==null&&i!==void 0?i:!0,tickFormatter:t.tickFormatter},E.createElement(kve,t))};class h3 extends E.Component{render(){return E.createElement(Dve,this.props)}}BI(h3,"displayName","XAxis");BI(h3,"defaultProps",{allowDataOverflow:Za.allowDataOverflow,allowDecimals:Za.allowDecimals,allowDuplicatedCategory:Za.allowDuplicatedCategory,height:Za.height,hide:!1,mirror:Za.mirror,orientation:Za.orientation,padding:Za.padding,reversed:Za.reversed,scale:Za.scale,tickCount:Za.tickCount,type:Za.type,xAxisId:0});var Tve=t=>{var{ticks:e,label:r,labelGapWithTick:a=5,tickSize:n=0,tickMargin:i=0}=t,l=0;if(e){e.forEach(h=>{if(h){var p=h.getBoundingClientRect();p.width>l&&(l=p.width)}});var o=r?r.getBoundingClientRect().width:0,c=n+i,d=l+c+o+(r?a:0);return Math.round(d)}return 0},Mve=["dangerouslySetInnerHTML","ticks"];function $I(t,e,r){return(e=Eve(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Eve(t){var e=Pve(t,"string");return typeof e=="symbol"?e:e+""}function Pve(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function w4(){return w4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},w4.apply(null,arguments)}function Ove(t,e){if(t==null)return{};var r,a,n=Rve(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Rve(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function _ve(t){var e=Fr();return E.useEffect(()=>(e(xve(t)),()=>{e(bve(t))}),[t,e]),null}var Lve=t=>{var e,{yAxisId:r,className:a,width:n,label:i}=t,l=E.useRef(null),o=E.useRef(null),c=Fe(B9),d=$n(),h=Fr(),p="yAxis",m=Fe(S=>au(S,p,r,d)),x=Fe(S=>Lz(S,r)),b=Fe(S=>Fme(S,r)),y=Fe(S=>Fz(S,p,r,d));if(E.useLayoutEffect(()=>{var S;if(!(n!=="auto"||!x||o3(i)||E.isValidElement(i))){var k=l.current,A=k==null||(S=k.tickRefs)===null||S===void 0?void 0:S.current,{tickSize:T,tickMargin:M}=k.props,O=Tve({ticks:A,label:o.current,labelGapWithTick:5,tickSize:T,tickMargin:M});Math.round(x.width)!==Math.round(O)&&h(yve({id:r,width:O}))}},[l,l==null||(e=l.current)===null||e===void 0||(e=e.tickRefs)===null||e===void 0?void 0:e.current,x?.width,x,h,i,r,n]),x==null||b==null)return null;var{dangerouslySetInnerHTML:v,ticks:N}=t,C=Ove(t,Mve);return E.createElement(Ll,w4({},C,{ref:l,labelRef:o,scale:m,x:b.x,y:b.y,width:x.width,height:x.height,className:Ke("recharts-".concat(p," ").concat(p),a),viewBox:c,ticks:y}))},zve=t=>{var e,r,a,n,i;return E.createElement(E.Fragment,null,E.createElement(_ve,{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:(a=t.angle)!==null&&a!==void 0?a:0,minTickGap:(n=t.minTickGap)!==null&&n!==void 0?n:5,tick:(i=t.tick)!==null&&i!==void 0?i:!0,tickFormatter:t.tickFormatter}),E.createElement(Lve,t))},Ive={allowDataOverflow:Qa.allowDataOverflow,allowDecimals:Qa.allowDecimals,allowDuplicatedCategory:Qa.allowDuplicatedCategory,hide:!1,mirror:Qa.mirror,orientation:Qa.orientation,padding:Qa.padding,reversed:Qa.reversed,scale:Qa.scale,tickCount:Qa.tickCount,type:Qa.type,width:Qa.width,yAxisId:0};class f3 extends E.Component{render(){return E.createElement(zve,this.props)}}$I(f3,"displayName","YAxis");$I(f3,"defaultProps",Ive);var Fve=(t,e)=>e,p3=de([Fve,At,nz,Mr,eI,Mi,Yge,Br],qge),m3=t=>{var e=t.currentTarget.getBoundingClientRect(),r=e.width/t.currentTarget.offsetWidth,a=e.height/t.currentTarget.offsetHeight;return{chartX:Math.round((t.clientX-e.left)/r),chartY:Math.round((t.clientY-e.top)/a)}},YI=ur("mouseClick"),UI=Bf();UI.startListening({actionCreator:YI,effect:(t,e)=>{var r=t.payload,a=p3(e.getState(),m3(r));a?.activeIndex!=null&&e.dispatch(Qme({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}});var j4=ur("mouseMove"),WI=Bf();WI.startListening({actionCreator:j4,effect:(t,e)=>{var r=t.payload,a=e.getState(),n=QS(a,a.tooltip.settings.shared),i=p3(a,m3(r));n==="axis"&&(i?.activeIndex!=null?e.dispatch(Vz({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate})):e.dispatch(Xz()))}});function Bve(t,e){return e instanceof HTMLElement?"HTMLElement <".concat(e.tagName,' class="').concat(e.className,'">'):e===window?"global.window":e}var vO={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},XI=Yt({name:"rootProps",initialState:vO,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:vO.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}}}),Hve=XI.reducer,{updateOptions:$ve}=XI.actions,VI=Yt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(t,e)=>e.payload}}),{updatePolarOptions:uwe}=VI.actions,Yve=VI.reducer,qI=ur("keyDown"),GI=ur("focus"),g3=Bf();g3.startListening({actionCreator:qI,effect:(t,e)=>{var r=e.getState(),a=r.rootProps.accessibilityLayer!==!1;if(a){var{keyboardInteraction:n}=r.tooltip,i=t.payload;if(!(i!=="ArrowRight"&&i!=="ArrowLeft"&&i!=="Enter")){var l=Number(JS(n,su(r))),o=Mi(r);if(i==="Enter"){var c=i0(r,"axis","hover",String(n.index));e.dispatch(m4({active:!n.active,activeIndex:n.index,activeDataKey:n.dataKey,activeCoordinate:c}));return}var d=Yme(r),h=d==="left-to-right"?1:-1,p=i==="ArrowRight"?1:-1,m=l+p*h;if(!(o==null||m>=o.length||m<0)){var x=i0(r,"axis","hover",String(m));e.dispatch(m4({active:!0,activeIndex:m.toString(),activeDataKey:void 0,activeCoordinate:x}))}}}}});g3.startListening({actionCreator:GI,effect:(t,e)=>{var r=e.getState(),a=r.rootProps.accessibilityLayer!==!1;if(a){var{keyboardInteraction:n}=r.tooltip;if(!n.active&&n.index==null){var i="0",l=i0(r,"axis","hover",String(i));e.dispatch(m4({activeDataKey:void 0,active:!0,activeIndex:i,activeCoordinate:l}))}}}});var Dn=ur("externalEvent"),KI=Bf();KI.startListening({actionCreator:Dn,effect:(t,e)=>{if(t.payload.handler!=null){var r=e.getState(),a={activeCoordinate:Rge(r),activeDataKey:nI(r),activeIndex:Od(r),activeLabel:aI(r),activeTooltipIndex:Od(r),isTooltipActive:_ge(r)};t.payload.handler(a,t.payload.reactEvent)}}});var Uve=de([nu],t=>t.tooltipItemPayloads),Wve=de([Uve,wp,(t,e,r)=>e,(t,e,r)=>r],(t,e,r,a)=>{var n=t.find(o=>o.settings.dataKey===a);if(n!=null){var{positions:i}=n;if(i!=null){var l=e(i,r);return l}}}),ZI=ur("touchMove"),QI=Bf();QI.startListening({actionCreator:ZI,effect:(t,e)=>{var r=t.payload,a=e.getState(),n=QS(a,a.tooltip.settings.shared);if(n==="axis"){var i=p3(a,m3({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));i?.activeIndex!=null&&e.dispatch(Vz({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}else if(n==="item"){var l,o=r.touches[0],c=document.elementFromPoint(o.clientX,o.clientY);if(!c||!c.getAttribute)return;var d=c.getAttribute(kde),h=(l=c.getAttribute(Dde))!==null&&l!==void 0?l:void 0,p=Wve(e.getState(),d,h);e.dispatch(Wz({activeDataKey:h,activeIndex:d,activeCoordinate:p}))}}});var Xve=P4({brush:Cye,cartesianAxis:vve,chartData:uxe,errorBars:Abe,graphicalItems:obe,layout:Kce,legend:Fde,options:ixe,polarAxis:P0e,polarOptions:Yve,referenceElements:Pye,rootProps:Hve,tooltip:Jme}),Vve=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return r8({reducer:Xve,preloadedState:e,middleware:a=>a({serializableCheck:!1}).concat([UI.middleware,WI.middleware,g3.middleware,KI.middleware,QI.middleware]),devTools:{serialize:{replacer:Bve},name:"recharts-".concat(r)}})};function qve(t){var{preloadedState:e,children:r,reduxStoreName:a}=t,n=$n(),i=E.useRef(null);if(n)return r;i.current==null&&(i.current=Vve(e,a));var l=aS;return E.createElement(YO,{context:l,store:i.current},r)}function Gve(t){var{layout:e,width:r,height:a,margin:n}=t,i=Fr(),l=$n();return E.useEffect(()=>{l||(i(Vce(e)),i(qce({width:r,height:a})),i(Xce(n)))},[i,l,e,r,a,n]),null}function Kve(t){var e=Fr();return E.useEffect(()=>{e($ve(t))},[e,t]),null}var Zve=["children"];function Qve(t,e){if(t==null)return{};var r,a,n=Jve(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Jve(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function f0(){return f0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},f0.apply(null,arguments)}var e1e={width:"100%",height:"100%"},t1e=E.forwardRef((t,e)=>{var r=$9(),a=Y9(),n=W9();if(!Yx(r)||!Yx(a))return null;var{children:i,otherAttributes:l,title:o,desc:c}=t,d,h;return typeof l.tabIndex=="number"?d=l.tabIndex:d=n?0:void 0,typeof l.role=="string"?h=l.role:h=n?"application":void 0,E.createElement(i9,f0({},l,{title:o,desc:c,role:h,tabIndex:d,width:r,height:a,style:e1e,ref:e}),i)}),r1e=t=>{var{children:e}=t,r=Fe(cb);if(!r)return null;var{width:a,height:n,y:i,x:l}=r;return E.createElement(i9,{width:a,height:n,x:l,y:i},e)},wO=E.forwardRef((t,e)=>{var{children:r}=t,a=Qve(t,Zve),n=$n();return n?E.createElement(r1e,null,r):E.createElement(t1e,f0({ref:e},a),r)});function a1e(){var t=Fr(),[e,r]=E.useState(null),a=Fe(Ade);return E.useEffect(()=>{if(e!=null){var n=e.getBoundingClientRect(),i=n.width/e.offsetWidth;dn(i)&&i!==a&&t(Gce(i))}},[e,t,a]),r}function jO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,a)}return r}function n1e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jO(Object(r),!0).forEach(function(a){s1e(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jO(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function s1e(t,e,r){return(e=i1e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i1e(t){var e=l1e(t,"string");return typeof e=="symbol"?e:e+""}function l1e(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var o1e=E.forwardRef((t,e)=>{var{children:r,className:a,height:n,onClick:i,onContextMenu:l,onDoubleClick:o,onMouseDown:c,onMouseEnter:d,onMouseLeave:h,onMouseMove:p,onMouseUp:m,onTouchEnd:x,onTouchMove:b,onTouchStart:y,style:v,width:N}=t,C=Fr(),[S,k]=E.useState(null),[A,T]=E.useState(null);pxe();var M=a1e(),O=E.useCallback(te=>{M(te),typeof e=="function"&&e(te),k(te),T(te)},[M,e,k,T]),_=E.useCallback(te=>{C(YI(te)),C(Dn({handler:i,reactEvent:te}))},[C,i]),R=E.useCallback(te=>{C(j4(te)),C(Dn({handler:d,reactEvent:te}))},[C,d]),L=E.useCallback(te=>{C(Xz()),C(Dn({handler:h,reactEvent:te}))},[C,h]),z=E.useCallback(te=>{C(j4(te)),C(Dn({handler:p,reactEvent:te}))},[C,p]),F=E.useCallback(()=>{C(GI())},[C]),Y=E.useCallback(te=>{C(qI(te.key))},[C]),X=E.useCallback(te=>{C(Dn({handler:l,reactEvent:te}))},[C,l]),H=E.useCallback(te=>{C(Dn({handler:o,reactEvent:te}))},[C,o]),W=E.useCallback(te=>{C(Dn({handler:c,reactEvent:te}))},[C,c]),V=E.useCallback(te=>{C(Dn({handler:m,reactEvent:te}))},[C,m]),Z=E.useCallback(te=>{C(Dn({handler:y,reactEvent:te}))},[C,y]),B=E.useCallback(te=>{C(ZI(te)),C(Dn({handler:b,reactEvent:te}))},[C,b]),G=E.useCallback(te=>{C(Dn({handler:x,reactEvent:te}))},[C,x]);return E.createElement(dI.Provider,{value:S},E.createElement(boe.Provider,{value:A},E.createElement("div",{className:Ke("recharts-wrapper",a),style:n1e({position:"relative",cursor:"default",width:N,height:n},v),onClick:_,onContextMenu:X,onDoubleClick:H,onFocus:F,onKeyDown:Y,onMouseDown:W,onMouseEnter:R,onMouseLeave:L,onMouseMove:z,onMouseUp:V,onTouchEnd:G,onTouchMove:B,onTouchStart:Z,ref:O},r)))}),c1e=["children","className","width","height","style","compact","title","desc"];function d1e(t,e){if(t==null)return{};var r,a,n=u1e(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function u1e(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var h1e=E.forwardRef((t,e)=>{var{children:r,className:a,width:n,height:i,style:l,compact:o,title:c,desc:d}=t,h=d1e(t,c1e),p=up(h);return o?E.createElement(wO,{otherAttributes:p,title:c,desc:d},r):E.createElement(o1e,{className:a,style:l,width:n,height:i,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},E.createElement(wO,{otherAttributes:p,title:c,desc:d,ref:e},E.createElement(Rye,null,r)))}),f1e=["width","height"];function N4(){return N4=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},N4.apply(null,arguments)}function p1e(t,e){if(t==null)return{};var r,a,n=m1e(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function m1e(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var g1e={top:5,right:5,bottom:5,left:5},x1e={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:g1e,reverseStackOrder:!1,syncMethod:"index"},b1e=E.forwardRef(function(e,r){var a,n=El(e.categoricalChartProps,x1e),{width:i,height:l}=n,o=p1e(n,f1e);if(!Yx(i)||!Yx(l))return null;var{chartName:c,defaultTooltipEventType:d,validateTooltipEventTypes:h,tooltipPayloadSearcher:p,categoricalChartProps:m}=e,x={chartName:c,defaultTooltipEventType:d,validateTooltipEventTypes:h,tooltipPayloadSearcher:p,eventEmitter:void 0};return E.createElement(qve,{preloadedState:{options:x},reduxStoreName:(a=m.id)!==null&&a!==void 0?a:c},E.createElement(Sye,{chartData:m.data}),E.createElement(Gve,{width:i,height:l,layout:n.layout,margin:n.margin}),E.createElement(Kve,{accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className}),E.createElement(h1e,N4({},o,{width:i,height:l,ref:r})))}),y1e=["axis","item"],v1e=E.forwardRef((t,e)=>E.createElement(b1e,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:y1e,tooltipPayloadSearcher:nxe,categoricalChartProps:t,ref:e}));const w1e=()=>{const[t,e]=E.useState("18/July/25"),[r,a]=E.useState("21/July/25"),[n,i]=E.useState("Day"),l=Array(6).fill({title:"Payment Failures",count:124,percent:"26%"}),o=[{name:"Login Issues",value:45},{name:"Account Issues",value:25},{name:"Payment Issues",value:55},{name:"Technical Issues",value:15}];return s.jsxs("div",{className:"text-yellow-400 min-h-screen p-6",children:[s.jsx("div",{className:"border border-yellow-400 rounded-lg p-4 overflow-x-auto",children:s.jsxs("table",{className:"w-full border-collapse",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400",children:[s.jsx("th",{className:"p-2 text-left",children:"Issue Category"}),s.jsx("th",{className:"p-2 text-left",children:"Ticket Count"}),s.jsx("th",{className:"p-2 text-left",children:"% of Total"}),s.jsx("th",{className:"p-2 text-left",children:"Action"})]})}),s.jsx("tbody",{children:l.map((c,d)=>s.jsxs("tr",{className:"border-b border-yellow-400 last:border-none",children:[s.jsx("td",{className:"p-2",children:c.title}),s.jsx("td",{className:"p-2",children:c.count}),s.jsx("td",{className:"p-2",children:c.percent}),s.jsx("td",{className:"p-2",children:s.jsx("button",{className:"bg-yellow-400 text-[#003d2d] px-3 py-1 rounded-full text-sm font-semibold",children:"View"})})]},d))})]})}),s.jsxs("div",{className:"flex items-center justify-center gap-4 mt-6 text-sm",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.jsx("input",{type:"date",value:r,onChange:c=>a(c.target.value),className:"border border-yellow-400 bg-transparent px-2 py-1 rounded text-yellow-400"}),s.jsx("span",{children:"Sort:"}),s.jsxs("select",{value:n,onChange:c=>i(c.target.value),className:"border border-yellow-400 bg-transparent px-2 py-1 rounded text-yellow-400",children:[s.jsx("option",{value:"Day",children:"Day"}),s.jsx("option",{value:"Week",children:"Week"}),s.jsx("option",{value:"Month",children:"Month"})]})]}),s.jsxs("div",{className:"border border-yellow-400 rounded-lg p-4 mt-6",children:[s.jsx("h2",{className:"font-semibold mb-4",children:"Chart Type:"}),s.jsx(Pxe,{width:"100%",height:250,children:s.jsxs(v1e,{data:o,margin:{top:10,right:20,left:0,bottom:0},children:[s.jsx(II,{strokeDasharray:"3 3",stroke:"#FFD700"}),s.jsx(h3,{dataKey:"name",stroke:"#FFD700"}),s.jsx(f3,{stroke:"#FFD700"}),s.jsx(jxe,{contentStyle:{backgroundColor:"#003d2d",borderColor:"#FFD700"},labelStyle:{color:"#FFD700"}}),s.jsx(PI,{dataKey:"value",fill:"#FFD700",barSize:40,radius:[8,8,0,0]})]})})]})]})};Rs.register(Ml,sc,nc);const j1e=()=>{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 a=t.labels[r.dataIndex],n=t.datasets[0].data[r.dataIndex];return`${a}: ${n}`}}}}};return s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsxs("div",{style:{color:"yellow",padding:"40px",textAlign:"center"},children:[s.jsx("h3",{style:{marginBottom:"20px"},children:"Complaint Tickets"}),s.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:[s.jsxs("div",{style:{position:"relative",width:"300px",height:"300px"},children:[s.jsx(Mj,{data:t,options:e}),s.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",s.jsx("br",{}),"Tickets"]})]}),s.jsxs("div",{style:{marginLeft:"30px",textAlign:"left",lineHeight:"1.8"},children:[s.jsxs("p",{children:[s.jsx("span",{style:{color:"#ffffff"},children:"●"})," Total Tickets Raised"]}),s.jsxs("p",{children:[s.jsx("span",{style:{color:"#1E1EFF"},children:"●"})," Open Tickets"]}),s.jsxs("p",{children:[s.jsx("span",{style:{color:"#FFD700"},children:"●"})," In Progress Tickets"]}),s.jsxs("p",{children:[s.jsx("span",{style:{color:"#00FF00"},children:"●"})," Closed Tickets"]})]})]})]}),s.jsx(w1e,{})]})]})};Rs.register(Ml,sc,nc,ap);const N1e=()=>{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,a)=>a.chart.data.labels[a.dataIndex]}}};return s.jsxs("div",{className:"",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Company Expenses Chart:"}),s.jsx("div",{style:{width:"400px",margin:"auto"},children:s.jsx(rp,{data:t,options:e})})]})},S1e=[{name:"Ali",role:"Angel Investor",Share:"10%",lastAction:"Wallet Frozen",earning:"AED 15,000"}],C1e=()=>s.jsxs("div",{className:" bg-[#013220] text-yellow-300 p-8 font-sans",children:[s.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Stakeholder Panel:"}),s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Shareholder Earnings:"}),s.jsx("div",{className:"border border-yellow-400 rounded-xl p-4",children:s.jsxs("table",{className:"w-full  table-auto border-separate border-spacing-y-2",children:[s.jsx("thead",{className:" text-left border-b border-yellow-300",children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{className:"py-2 px-4",children:"Name"}),s.jsx("th",{className:"py-2 px-4",children:"Role"}),s.jsx("th",{className:"py-2 px-4",children:"Share %"}),s.jsx("th",{className:"py-2 px-4",children:"Earnings"})]})}),s.jsx("tbody",{children:S1e.map((t,e)=>s.jsxs("tr",{className:"rounded",children:[s.jsx("td",{className:"py-2 px-4",children:t.name}),s.jsx("td",{className:"py-2 px-4",children:t.role}),s.jsx("td",{className:"py-2 px-4",children:t.Share}),s.jsx("td",{className:"py-2 px-4",children:t.earning})]},e))})]})})]}),A1e=()=>{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 s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsx("div",{className:"w-full md:w-1/2 mx-auto rounded-lg overflow-hidden border border-yellow-300",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("th",{className:"text-left px-4 py-2",children:"KPI"}),s.jsx("th",{className:"text-left px-4 py-2",children:"Value"})]})}),s.jsx("tbody",{children:t.map((a,n)=>s.jsxs("tr",{className:"border-b border-yellow-300",children:[s.jsx("td",{className:"px-4 py-2",children:a.name}),s.jsx("td",{className:"px-4 py-2",children:a.value})]},n))})]})}),s.jsx("div",{className:"text-lg font-semibold text-yellow-300",children:"Team Earnings: AED 78,000"}),s.jsx("div",{className:"p-4 rounded-lg  w-3/4 mx-auto border border-yellow-400",style:{backgroundColor:"#013220"},children:s.jsx(Jr,{options:r,series:e,type:"line",height:350})}),s.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:[s.jsxs("h3",{className:"gap-3 text-3xl font-semibold mb-4 flex px-4",children:[s.jsx(kR,{size:30})," Withdrawals: Today vs Yesterday"]}),s.jsxs("div",{className:"space-y-4 mt-6",children:[s.jsxs("div",{className:"flex gap-6 px-10",children:[s.jsx("span",{className:"w-28 font-semibold",children:"Today:"}),s.jsx("p",{className:"font-semibold",children:"AED 18,000"})]}),s.jsxs("div",{className:"flex gap-6 px-10",children:[s.jsx("span",{className:"w-28 font-semibold",children:"Yesterday:"}),s.jsx("p",{className:"font-semibold",children:"AED 24,000"})]}),s.jsxs("div",{className:"flex gap-6 px-10 font-semibold",children:[s.jsx("span",{className:"w-28 font-semibold",children:"Change:"}),s.jsxs("span",{className:"text-red-500 flex items-center gap-1",children:[s.jsx(ple,{})," -25%"]})]})]})]}),s.jsx(C1e,{}),s.jsx(N1e,{})]})]})]})},k1e=Array(9).fill({name:"Umair Khan",proposaltype:"Rental Driver",decisiondate:"28 Jul '25",status:"Pending"}),D1e=()=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]}),s.jsx("div",{children:s.jsxs("span",{children:["Type:",s.jsxs("select",{className:"bg-transparent focus:outline-none ml-1",children:[s.jsx("option",{value:"",children:"Driver"}),s.jsx("option",{value:"",children:"Rental Driver"})]})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Status:"}),s.jsxs("select",{className:"bg-transparent focus:outline-none",children:[s.jsx("option",{value:"",children:"Pending"}),s.jsx("option",{value:"",children:"Approved"})]})]})]}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400  text-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"Name"}),s.jsx("th",{className:"px-4 py-3",children:"Proposal Type"}),s.jsx("th",{className:"px-4 py-3",children:"Decision Date"}),s.jsx("th",{className:"px-4 py-3",children:"Status"}),s.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),s.jsx("tbody",{children:k1e.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.name}),s.jsx("td",{className:"px-4 py-3",children:t.proposaltype}),s.jsx("td",{className:"px-4 py-3",children:t.decisiondate}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"View"})})]},e))})]})})]}),T1e=[{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"}],M1e=()=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-end items-center my-6 gap-4 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]}),s.jsx("div",{children:s.jsxs("span",{children:["Admin:",s.jsxs("select",{className:"bg-transparent focus:outline-none ml-1",children:[s.jsx("option",{value:"",children:"Admin Rehan"}),s.jsx("option",{value:""})]})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"User Role:"}),s.jsxs("select",{className:"bg-transparent focus:outline-none",children:[s.jsx("option",{value:"",children:"All"}),s.jsx("option",{value:""})]})]})]}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left table-fixed",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400 text-yellow-400",children:[s.jsx("th",{className:"px-4 py-3 w-1/6",children:"Edited By"}),s.jsx("th",{className:"px-4 py-3 w-1/6",children:"Field Changed"}),s.jsx("th",{className:"px-4 py-3 w-1/6",children:"User Affected"}),s.jsx("th",{className:"px-4 py-3 w-1/6",children:"Timestamp"}),s.jsx("th",{className:"px-4 py-3 w-1/4",children:"Notes"}),s.jsx("th",{className:"px-4 py-3 w-1/12",children:"Audit"})]})}),s.jsx("tbody",{children:T1e.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.editedby}),s.jsx("td",{className:"px-4 py-3",children:t.fieldchanged}),s.jsx("td",{className:"px-4 py-3",children:t.useraffected}),s.jsx("td",{className:"px-4 py-3",children:t.timestamp}),s.jsx("td",{className:"px-4 py-3 whitespace-pre-line",children:t.notes}),s.jsx("td",{className:"px-4 py-3",children:t.audit})]},e))})]})})]}),E1e=Array(9).fill({applicationid:"12345",type:"Driver",area:"Pending",submitted:"28 Jul '25",status:"Pending"}),P1e=()=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]}),s.jsx("div",{children:s.jsxs("span",{children:["Type:",s.jsxs("select",{className:"bg-transparent focus:outline-none ml-1",children:[s.jsx("option",{value:"",children:"Driver"}),s.jsx("option",{value:"",children:"Rental Driver"})]})]})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:"Status:"}),s.jsxs("select",{className:"bg-transparent focus:outline-none",children:[s.jsx("option",{value:"",children:"Pending"}),s.jsx("option",{value:"",children:"Approved"})]})]})]}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400  text-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"Application ID"}),s.jsxs("th",{className:"px-4 py-3",children:["Type",s.jsxs("select",{name:"",id:"",className:"bg-transparent focus:outline-none ",children:[s.jsx("option",{value:"",children:"Driver"}),s.jsx("option",{value:"",children:"Rental Driver"})]})]}),s.jsx("th",{className:"px-4 py-3",children:"Area"}),s.jsx("th",{className:"px-4 py-3",children:"Submitted"}),s.jsx("th",{className:"px-4 py-3",children:"Status"}),s.jsx("th",{className:"px-4 py-3 text-center",children:"Action"})]})}),s.jsx("tbody",{children:E1e.map((t,e)=>s.jsxs("tr",{className:" text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.applicationid}),s.jsx("td",{className:"px-4 py-3",children:t.type}),s.jsx("td",{className:"px-4 py-3",children:t.area}),s.jsx("td",{className:"px-4 py-3",children:t.submitted}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx(Hd,{className:"cursor-pointer hover:text-red-500",size:20}),s.jsx(Xf,{className:"cursor-pointer hover:text-green-500",size:16}),s.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"View"})]})})]},e))})]})})]}),O1e=Array(9).fill({sentto:"Driver:Rizwan",type:"Rental Agreement",senton:"Aug 1",status:"Pending"}),R1e=()=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[s.jsxs("div",{className:"flex items-center text-sm",children:[s.jsx("span",{children:"Date Range:"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]}),s.jsx("div",{className:"text-sm",children:s.jsxs("span",{children:["Type:",s.jsxs("select",{className:"bg-transparent focus:outline-none ml-1",children:[s.jsx("option",{value:"",children:"Driver"}),s.jsx("option",{value:"",children:"Rental Driver"})]})]})}),s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx("span",{children:"Status:"}),s.jsxs("select",{className:"bg-transparent focus:outline-none",children:[s.jsx("option",{value:"",children:"Pending"}),s.jsx("option",{value:"",children:"Approved"})]})]})]}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400  text-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"Sent To"}),s.jsx("th",{className:"px-4 py-3",children:"Type"}),s.jsx("th",{className:"px-4 py-3",children:"Sent On"}),s.jsx("th",{className:"px-4 py-3",children:"Status"}),s.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),s.jsx("tbody",{children:O1e.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.sentto}),s.jsx("td",{className:"px-4 py-3",children:t.type}),s.jsx("td",{className:"px-4 py-3",children:t.senton}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:s.jsx("button",{className:"bg-yellow-400 text-black px-4 py-1 rounded-full text-sm hover:bg-yellow-300",children:"Resend"})})]},e))})]})})]}),_1e=()=>{const[t,e]=E.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 a;return t==="driver"?a=s.jsx(P1e,{}):t==="career"?a=s.jsx(D1e,{}):t==="manual"?a=s.jsx(M1e,{}):t==="agreement"&&(a=s.jsx(R1e,{})),s.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsxs("div",{className:"p-6 space-y-6",children:[s.jsx("div",{className:"flex justify-between",children:r.map(n=>s.jsx("button",{onClick:()=>e(n.key),className:`px-8 py-2 rounded font-semibold transition duration-150 ${t===n.key?"bg-yellow-400 text-black":"border border-yellow-400 text-yellow-300 hover:bg-yellow-300 hover:text-black"}`,children:n.label},n.key))}),s.jsx("div",{children:a})]})]})]})},L1e={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"}]}]},JI=({node:t})=>s.jsxs("div",{className:"flex flex-col items-center relative",children:[s.jsx("div",{className:"w-16 h-16 rounded-full overflow-hidden border-4 border-yellow-300 bg-yellow-300 z-10",children:s.jsx("img",{src:t.image,alt:"",className:"w-full h-full object-cover"})}),t.children&&s.jsx("div",{className:"h-6 w-0.5 bg-yellow-300"}),t.children&&s.jsxs("div",{className:"flex justify-center items-start relative pt-6",children:[s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-fit flex justify-center",children:s.jsx("div",{className:"h-0.5 bg-yellow-300",style:{width:`${t.children.length*90}px`}})}),t.children.map((e,r)=>s.jsxs("div",{className:"flex flex-col items-center relative mx-2",children:[s.jsx("div",{className:"w-0.5 h-6 bg-white absolute top-0 left-1/2 transform -translate-x-1/2"}),s.jsx(JI,{node:e})]},r))]})]}),z1e=()=>s.jsxs("div",{className:"min-h-screen py-10 w-full overflow-x-auto",children:[s.jsx("h2",{className:"text-xl font-bold text-yellow-400 px-4 mb-10",children:"Tree View Growth"}),s.jsx("div",{className:"flex justify-center border border-yellow-300 w-full max-w-3xl  py-10 mx-auto",children:s.jsx(JI,{node:L1e})})]}),I1e=[{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"}],F1e=()=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[s.jsxs("div",{className:"flex items-center text-sm gap-2",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]}),s.jsx("div",{children:s.jsxs("span",{children:["Type:",s.jsxs("select",{className:"bg-transparent focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Driver"}),s.jsx("option",{value:"",children:"Rental Driver"})]})]})}),s.jsxs("div",{className:"flex items-center text-sm pr-6",children:[s.jsx("span",{children:"City:"}),s.jsxs("select",{className:"bg-transparent focus:outline-none",children:[s.jsx("option",{value:"",children:"Dubai"}),s.jsx("option",{value:"",children:"Dubai"})]})]})]}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400  text-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"Rank"}),s.jsx("th",{className:"px-4 py-3",children:"User Name"}),s.jsx("th",{className:"px-4 py-3",children:"Total Income"}),s.jsx("th",{className:"px-4 py-3",children:"Rank Title"}),s.jsx("th",{className:"px-4 py-3",children:"BBR Status"})]})}),s.jsx("tbody",{children:I1e.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.Rank}),s.jsx("td",{className:"px-4 py-3",children:t.username}),s.jsx("td",{className:"px-4 py-3",children:t.totalincome}),s.jsx("td",{className:"px-4 py-3",children:t.Ranktitle}),s.jsx("td",{className:"px-4 py-3",children:t.bbrstatus})]},e))})]})})]}),B1e=[{total:"Total Downline Income",percent:"AED 754,000",desc:"Earnings generated from all levels",Icon:iG},{total:"Total Team Size",percent:"1,250 Members",desc:"Users in direct + indirect downline",Icon:rG},{total:"Top Rank Achiever",percent:"Aku Zafar(Gold Rank)",desc:"Highest rank achieved in this period",Icon:sG}],H1e=()=>s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsx("div",{className:"mr-10 px-10 py-10 overflow-hidden",children:s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mt-6",children:B1e.map((t,e)=>{const r=t.Icon;return s.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:[s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx(r,{size:30}),s.jsx("p",{className:"text-lg font-semibold m-0 tracking-wide",children:t.total})]}),s.jsx("h2",{className:"text-2xl font-bold",children:t.percent}),s.jsx("p",{className:"text-sm",children:t.desc})]},e)})})}),s.jsx(z1e,{}),s.jsx(F1e,{})]})]}),$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"}],Y1e=()=>s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-end items-center my-6 gap-4",children:[s.jsxs("div",{className:"flex items-center text-sm gap-2",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]}),s.jsx("div",{children:s.jsxs("span",{children:["Type:",s.jsxs("select",{className:"bg-transparent focus:outline-none text-sm",children:[s.jsx("option",{value:"",children:"Driver"}),s.jsx("option",{value:"",children:"Rental Driver"})]})]})}),s.jsxs("div",{className:"flex items-center text-sm pr-6",children:[s.jsx("span",{children:"Status:"}),s.jsxs("select",{className:"bg-transparent focus:outline-none",children:[s.jsx("option",{value:"",children:"Failed"}),s.jsx("option",{value:"",children:"Success"})]})]})]}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400  text-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"User"}),s.jsx("th",{className:"px-4 py-3",children:"Transaction ID"}),s.jsx("th",{className:"px-4 py-3",children:"Reason"}),s.jsx("th",{className:"px-4 py-3",children:"Date"}),s.jsx("th",{className:"px-4 py-3",children:"Status"}),s.jsx("th",{className:"px-4 py-3",children:"Action"})]})}),s.jsx("tbody",{children:$1e.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.user}),s.jsx("td",{className:"px-4 py-3",children:t.transactionid}),s.jsx("td",{className:"px-4 py-3",children:t.reason}),s.jsx("td",{className:"px-4 py-3",children:t.date}),s.jsx("td",{className:"px-4 py-3",children:t.status}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex gap-2",children:[s.jsx("div",{className:"p-1 border border-yellow-300 rounded-full",children:s.jsx(pq,{size:20})}),s.jsx("div",{className:"p-1 border border-yellow-300 rounded-full flex justify-center ",children:s.jsx(wR,{size:20})})]})})]},e))})]})})]}),U1e=()=>{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 s.jsxs("div",{className:"bg-[#013220] p-4 rounded-lg",children:[s.jsx("h2",{className:"mb-4 text-xl font-semibold",children:"Weekly Rides Overview"}),s.jsxs("div",{className:"flex justify-end",children:[s.jsxs("div",{className:"flex items-center text-sm gap-2",children:[s.jsx("span",{children:"Date Range :"}),s.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"}),s.jsx("span",{children:"To"}),s.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"})]}),s.jsxs("div",{className:"flex items-center text-sm pr-6",children:[s.jsx("span",{children:"Transaction Type:"}),s.jsxs("select",{className:"bg-transparent focus:outline-none",children:[s.jsx("option",{value:"",children:"Top-Ups"}),s.jsx("option",{value:"",children:"Deduction"})]})]})]}),s.jsxs("div",{className:"border border-yellow-300 rounded-xl ",children:[s.jsx("h2",{className:"border-b border-yellow-300 px-4 py-6 font-semibold text-lg",children:"Chart Type "}),s.jsx(Jr,{options:t,series:e,type:"line",height:350})]})]})};Rs.register(Ml,sc,nc,ap);const W1e=()=>{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,a)=>`${a.chart.data.labels[a.dataIndex]}
${r}%`,anchor:"center",align:"center"}}};return s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsxs("div",{className:"flex justify-between w-1/2 px-6 py-6",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Payout Distribution"}),s.jsxs("div",{className:"flex gap-5",children:[s.jsxs("div",{children:[s.jsx("input",{type:"radio",name:"chartitem",id:""}),s.jsx("label",{htmlFor:"",children:"Pie Chart"})]}),s.jsx("input",{type:"radio",name:"chartitem",id:""}),s.jsx("label",{htmlFor:"",children:"Table"})]})]}),s.jsx("div",{style:{width:"300px",margin:"auto"},children:s.jsx(rp,{data:t,options:e})}),s.jsx(Y1e,{}),s.jsx(U1e,{})]})]})};function X1e(){return s.jsxs("div",{className:"flex bg-[#13220] min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsx("div",{className:"flex items-center justify-center p-6",children:s.jsxs("div",{className:"w-full max-w-5xl space-y-6",children:[s.jsx("h2",{className:"text-yellow-400 font-medium",children:"Build Your Custom Report"}),s.jsxs("select",{className:"w-full border border-yellow-400 text-yellow-400 bg-transparent rounded-full px-4 py-3 outline-none",children:[s.jsx("option",{value:"",className:"bg-[#003328]",children:"User Type"}),s.jsx("option",{value:"admin",className:"bg-[#003328]",children:"Admin"}),s.jsx("option",{value:"customer",className:"bg-[#003328]",children:"Customer"})]}),s.jsxs("div",{className:"flex items-center gap-4 justify-center",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-yellow-400",children:"From"}),s.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"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-yellow-400",children:"To"}),s.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"})]})]}),s.jsxs("select",{className:"w-full border border-yellow-400 text-yellow-400 bg-transparent rounded-full px-4 py-3 outline-none",children:[s.jsx("option",{value:"",className:"bg-[#003328]",children:"City"}),s.jsx("option",{value:"newyork",className:"bg-[#003328]",children:"New York"}),s.jsx("option",{value:"london",className:"bg-[#003328]",children:"London"})]}),s.jsxs("select",{className:"w-full border border-yellow-400 text-yellow-400 bg-transparent rounded-full px-4 py-3 outline-none",children:[s.jsx("option",{value:"",className:"bg-[#003328]",children:"Category"}),s.jsx("option",{value:"food",className:"bg-[#003328]",children:"Food"}),s.jsx("option",{value:"travel",className:"bg-[#003328]",children:"Travel"})]}),s.jsx("div",{className:"text-center",children:s.jsx(De,{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 V1e=[{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"}],q1e=()=>s.jsx(s.Fragment,{children:s.jsxs("div",{className:"flex bg-[#13220] min-h-screen ",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(_s,{}),s.jsx("div",{className:"p-4",children:s.jsx("h2",{className:"text-lg font-semibold pt-6",children:"Build your Custom Report"})}),s.jsx("div",{className:"mx-4 overflow-x-auto border border-yellow-400 rounded-xl my-6",children:s.jsxs("table",{className:"w-full text-left",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"border-b border-yellow-400  text-yellow-400",children:[s.jsx("th",{className:"px-4 py-3",children:"Name"}),s.jsx("th",{className:"px-4 py-3",children:"Service Type"}),s.jsx("th",{className:"px-4 py-3",children:"Booking ID"}),s.jsx("th",{className:"px-4 py-3",children:"Date"}),s.jsx("th",{className:"px-4 py-3",children:"Amount"}),s.jsx("th",{className:"px-4 py-3",children:"Status"})]})}),s.jsx("tbody",{children:V1e.map((t,e)=>s.jsxs("tr",{className:"text-sm",children:[s.jsx("td",{className:"px-4 py-3",children:t.name}),s.jsx("td",{className:"px-4 py-3",children:t.servicetype}),s.jsx("td",{className:"px-4 py-3",children:t.Bookingid}),s.jsx("td",{className:"px-4 py-3",children:t.date}),s.jsx("td",{className:"px-4 py-3",children:t.amount}),s.jsx("td",{className:"px-4 py-3",children:t.status})]},e))})]})})]})]})}),G1e={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"}]}]},eF=({node:t})=>s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsxs("div",{className:"relative flex flex-col items-center",children:[s.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&&s.jsx("div",{className:"w-0.5 bg-yellow-500 h-6"})]}),t.children&&t.children.length>0&&s.jsxs("div",{className:"relative flex justify-center mt-3",children:[s.jsx("div",{className:"absolute top-0 left-0 right-0 flex justify-center",children:s.jsx("div",{className:"bg-yellow-500 w-full h-0.5"})}),s.jsx("div",{className:"flex gap-16 pt-2",children:t.children.map((e,r)=>s.jsxs("div",{className:"relative flex flex-col items-center",children:[s.jsx("div",{className:"absolute -top-2 left-1/2 -translate-x-1/2 w-0.5 bg-yellow-500 h-2"}),s.jsx(eF,{node:e})]},r))})]})]});function K1e(){return s.jsxs(s.Fragment,{children:[s.jsx(tc,{}),s.jsx("div",{children:s.jsxs("div",{className:"flex items-center gap-2 justify-end",children:[s.jsxs("div",{className:"flex items-center pt-2 ",children:[s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsx("div",{className:"text-sm flex items-center gap-1",children:s.jsx("span",{children:"Date Range:"})}),s.jsx("input",{type:"date",className:"bg-transparent rounded border py-1  border-yellow-300  text-yellow-300 focus:outline-none text-sm"})]}),s.jsx("span",{className:"text-sm pr-3",children:"To"}),s.jsxs("label",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"text-sm flex items-center gap-1",children:[" ",s.jsx("span",{children:"Date:"})]}),s.jsx("input",{type:"date",className:"bg-transparent rounded py-1  border border-yellow-300 text-yellow-300 focus:outline-none text-sm"})]})]}),s.jsxs("div",{className:"pr-4  text-sm",children:[s.jsx("label",{htmlFor:"",children:"Sort By: "}),s.jsx("select",{name:"",id:"",className:"bg-transparent focus:outline-none",children:s.jsx("option",{value:"",children:"Name"})})]})]})}),s.jsx("div",{className:" min-h-screen pt-10 flex justify-center items-start w-full max-w-5xl mx-auto",children:s.jsx("div",{className:"relative flex flex-col items-center ",children:s.jsx(eF,{node:G1e})})})]})}const Z1e=({theme:t="light"})=>{const[e,r]=E.useState({identifier:"",password:""}),[a,n]=E.useState(!1),[i,l]=E.useState({}),o=Fn(),c=Cl(),{isAuthenticated:d,error:h,loading:p}=un(N=>N.auth),[m,{isLoading:x}]=LX();E.useEffect(()=>{d&&c("/home")},[d,c]);const b=N=>{const{name:C,value:S}=N.target;r(k=>({...k,[C]:S})),l(k=>({...k,[C]:"",form:""})),o(E5(null))},y=()=>{const N={};return e.identifier.trim()||(N.identifier="Email or phone number is required"),e.password||(N.password="Password is required"),l(N),Object.keys(N).length===0},v=async N=>{if(N.preventDefault(),!!y()){o(P5(!0));try{const S={[e.identifier.includes("@")?"email":"phone"]:e.identifier,password:e.password},k=await m(S).unwrap();o(g8({user:k.user,token:k.token})),c("/home")}catch(C){o(E5(C?.data?.message||"Login failed. Please try again.")),l(S=>({...S,form:C?.data?.message||"Login failed"}))}finally{o(P5(!1))}}};return s.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:s.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:s.jsxs("div",{className:"w-full flex flex-col justify-center items-center p-6 sm:p-10",children:[s.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"}),(i.form||h)&&s.jsx("p",{className:`text-sm mb-4 text-center ${t==="dark"?"text-red-400":"text-red-600"}`,children:i.form||h}),s.jsxs("form",{onSubmit:v,className:"w-full max-w-sm space-y-4",children:[s.jsxs("div",{children:[i.identifier&&s.jsx("p",{className:`text-sm mb-1 ${t==="dark"?"text-red-400":"text-red-600"}`,children:i.identifier}),s.jsx("input",{type:"text",name:"identifier",value:e.identifier,onChange:b,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 ${i.identifier?"!border-red-500":""}`:`bg-white border-gray-300 text-gray-900 placeholder-gray-500 ${i.identifier?"!border-red-600":""}`}`,disabled:x||p})]}),s.jsxs("div",{children:[i.password&&s.jsx("p",{className:`text-sm mb-1 ${t==="dark"?"text-red-400":"text-red-600"}`,children:i.password}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:a?"text":"password",name:"password",value:e.password,onChange:b,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 ${i.password?"!border-red-500":""}`:`bg-white border-gray-300 text-gray-900 placeholder-gray-500 ${i.password?"!border-red-600":""}`}`,disabled:x||p}),s.jsx("div",{className:`absolute right-3 top-3 cursor-pointer ${t==="dark"?"text-gray-300":"text-gray-500"}`,onClick:()=>n(!a),children:a?s.jsx(xq,{}):s.jsx(SR,{})})]})]}),s.jsxs("div",{className:`flex justify-between items-center text-sm ${t==="dark"?"text-gray-300":"text-gray-600"}`,children:[s.jsxs("label",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",className:`w-4 h-4 ${t==="dark"?"text-yellow-400":"text-[#013220]"}`,disabled:x||p}),"Remember me"]}),s.jsx(De,{to:"/forgot-password",className:`hover:underline ${t==="dark"?"text-teal-400":"text-teal-600"}`,children:"Forgot password?"})]}),s.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"})]})]})})})},Q1e=()=>{const[t,e]=E.useState([]),[r,a]=E.useState({username:"",firstName:"",email:"",phoneNumber:"",password:"",permissions:[]}),[n,i]=E.useState(null),[l,o]=E.useState({}),[c,d]=E.useState(!1),[h,p]=E.useState(null),m=["home","mlm","dispatch","drivermanagement","customermanagement","proposalmanagement","overview","paymentoverview","chatdetail","kycverification","reportanalytics","reviewandrating","adminmanagement"];E.useEffect(()=>{x()},[]);const x=async()=>{try{const T=await Re.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")}},b=T=>{const{name:M,value:O}=T.target;n?i({...n,[M]:O}):a({...r,[M]:O}),o({...l,[M]:""})},y=T=>{n?i({...n,permissions:n.permissions.includes(T)?n.permissions.filter(M=>M!==T):[...n.permissions,T]}):a({...r,permissions:r.permissions.includes(T)?r.permissions.filter(M=>M!==T):[...r.permissions,T]})},v=T=>{const M={};return T.username||(M.username="Username is required"),T.firstName||(M.firstName="First name is required"),T.email||(M.email="Email is required"),T.phoneNumber||(M.phoneNumber="Phone number is required"),!n&&!T.password&&(M.password="Password is required"),T.permissions.length===0&&(M.permissions="At least one permission is required"),M},N=async T=>{T.preventDefault();const M=v(r);if(Object.keys(M).length>0){o(M),Object.values(M).forEach(O=>Ne.error(O));return}try{const O=await Re.post("https://aaaogo.xyz/api/user/admin/add-admin",r,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});Ne.success(O.data.message||"Admin added successfully"),a({username:"",firstName:"",email:"",phoneNumber:"",password:"",permissions:[]}),o({}),x()}catch(O){const _=O.response?.data?.errors||{};o(_),Ne.error(O.response?.data?.message||"Failed to add admin")}},C=async T=>{T.preventDefault();const M=v(n);if(Object.keys(M).length>0){o(M),Object.values(M).forEach(O=>Ne.error(O));return}try{await Re.put(`https://aaaogo.xyz/api/user/admin/edit-admin/${n._id}`,n,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),Ne.success("Admin updated successfully"),i(null),o({}),x()}catch(O){const _=O.response?.data?.errors||{};o(_),Ne.error(O.response?.data?.message||"Failed to update admin")}},S=T=>{p(T),d(!0)},k=async()=>{if(h)try{await Re.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")}d(!1),p(null)},A=()=>{d(!1),p(null)};return s.jsxs("div",{className:"p-6 bg-[#013220] min-h-screen text-[#DDC104]",children:[s.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Admin Management"}),s.jsxs("div",{className:"mb-8 p-6 bg-[#013220] border border-[#3A5719] rounded-lg shadow-md",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4",children:n?"Edit Admin":"Add New Admin"}),s.jsxs("form",{onSubmit:n?C:N,children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[s.jsxs("div",{children:[s.jsx("input",{type:"text",name:"username",value:n?n.username:r.username,onChange:b,placeholder:"Username",className:"p-2 border border-[#DDC104] rounded w-full bg-[#013220] text-[#DDC104] placeholder-[#DDC104] focus:outline-none focus:border-yellow-400"}),l.username&&s.jsx("p",{className:"text-red-500 text-sm",children:l.username})]}),s.jsxs("div",{children:[s.jsx("input",{type:"text",name:"firstName",value:n?n.firstName:r.firstName,onChange:b,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"}),l.firstName&&s.jsx("p",{className:"text-red-500 text-sm",children:l.firstName})]}),s.jsxs("div",{children:[s.jsx("input",{type:"email",name:"email",value:n?n.email:r.email,onChange:b,placeholder:"Email",className:"p-2 border border-[#DDC104] rounded w-full bg-[#013220] text-[#DDC104] placeholder-[#DDC104] focus:outline-none focus:border-yellow-400"}),l.email&&s.jsx("p",{className:"text-red-500 text-sm",children:l.email})]}),s.jsxs("div",{children:[s.jsx("input",{type:"tel",name:"phoneNumber",value:n?n.phoneNumber:r.phoneNumber,onChange:b,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"}),l.phoneNumber&&s.jsx("p",{className:"text-red-500 text-sm",children:l.phoneNumber})]}),!n&&s.jsxs("div",{children:[s.jsx("input",{type:"password",name:"password",value:r.password,onChange:b,placeholder:"Password",className:"p-2 border border-[#DDC104] rounded w-full bg-[#013220] text-[#DDC104] placeholder-[#DDC104] focus:outline-none focus:border-yellow-400"}),l.password&&s.jsx("p",{className:"text-red-500 text-sm",children:l.password})]})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"Permissions"}),s.jsx("div",{className:"grid grid-cols-3 gap-2",children:m.map(T=>s.jsxs("label",{className:"flex items-center text-[#DDC104]",children:[s.jsx("input",{type:"checkbox",checked:n?n.permissions.includes(T):r.permissions.includes(T),onChange:()=>y(T),className:"mr-2 accent-[#DDC104]"}),T.charAt(0).toUpperCase()+T.slice(1)]},T))}),l.permissions&&s.jsx("p",{className:"text-red-500 text-sm",children:l.permissions})]}),s.jsx("button",{type:"submit",className:"bg-[#DDC104] text-[#013220] px-4 py-2 rounded hover:bg-yellow-400 hover:text-black transition",children:n?"Update Admin":"Add Admin"}),n&&s.jsx("button",{type:"button",onClick:()=>{i(null),o({})},className:"ml-2 bg-gray-300 text-[#013220] px-4 py-2 rounded hover:bg-gray-400 hover:text-black transition",children:"Cancel"})]})]}),s.jsxs("div",{className:"p-6 bg-[#013220] border border-[#3A5719] rounded-lg shadow-md",children:[s.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Current Admins"}),t.length===0?s.jsx("p",{children:"No admins found."}):s.jsx("div",{className:"grid gap-4",children:t.map(T=>s.jsxs("div",{className:"p-4 border border-[#DDC104] rounded-lg flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsxs("p",{children:[s.jsx("strong",{children:"Username:"})," ",T.username]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Name:"})," ",T.firstName," ",T.lastName||""]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Email:"})," ",T.email]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Phone:"})," ",T.phoneNumber]}),s.jsxs("p",{children:[s.jsx("strong",{children:"Permissions:"})," ",T.adminPermissions.join(", ")]})]}),s.jsxs("div",{children:[s.jsx("button",{onClick:()=>i({...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"}),s.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))})]}),s.jsx(vd,{isOpen:c,title:"Delete Admin",message:"Are you sure you want to delete this admin? This action cannot be undone.",onConfirm:k,onClose:A})]})},NO=["low","medium","high","urgent"],J1e=["technical","billing","account","booking","payment","driver","vehicle","mlm","general","other"],e2e=()=>{const[t,e]=E.useState([]),[r,a]=E.useState(!0),[n,i]=E.useState(!1),[l,o]=E.useState(null),[c,d]=E.useState(!1),[h,p]=E.useState({status:"all",priority:"all",category:"all",search:""}),[m,x]=E.useState({currentPage:1,totalPages:1,totalTickets:0,limit:10}),[b,y]=E.useState(!1),[v,N]=E.useState({ticketId:"",assignedTo:"",internalNote:""}),[C,S]=E.useState([]),[k,A]=E.useState(!1),[T,M]=E.useState({message:"",isInternal:!1}),[O,_]=E.useState(!1),[R,L]=E.useState([]),[z,F]=E.useState(null),[Y,X]=E.useState(!1),[H,W]=E.useState(!1),[V,Z]=E.useState("all"),[B,G]=E.useState([]),[te,K]=E.useState([]),[U,re]=E.useState([]),[ne,we]=E.useState(!1),[ye,ue]=E.useState({currentPage:1,totalPages:1,totalResponses:0}),[je,Te]=E.useState(!1),[pe,Ue]=E.useState(null),[_e,xt]=E.useState([]),[Wt,bt]=E.useState({currentPage:1,totalPages:1,totalTickets:0}),[va,pn]=E.useState(!1),[Ht,Ha]=E.useState({ticketId:"",escalateTo:"",reason:""}),[Xe,iu]=E.useState(!1),[kb,uc]=E.useState(!1),[zl,da]=E.useState([]),[cs,Pr]=E.useState(!1),[Il,Fl]=E.useState({ticketId:"",newStatus:"",note:""}),[Db,Ls]=E.useState(!1),[ea,wa]=E.useState({ticketId:"",currentPriority:"",newPriority:"",reason:""}),ta=async(Q=m.currentPage,Pe=!1)=>{try{a(!0);const Ze="https://aaaogo.xyz/api",We=Pe?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 Ul=await Re.get(`${Ze}/support/tickets?${nt}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});Ul.data.success&&(e(Ul.data.data.tickets),x({...Ul.data.data.pagination,limit:10}))}catch(Ze){console.error("Error fetching tickets:",Ze),Ne.error("Failed to fetch tickets")}finally{a(!1)}},Bl=async(Q,Pe,Ze)=>{try{const nt=await Re.patch(`https://aaaogo.xyz/api/support/tickets/${Q}/escalate`,{escalateTo:Pe,reason:Ze},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(nt.data.success)return nt.data}catch(We){throw console.error("Error escalating ticket:",We),We}},Tb=async()=>{try{const Pe=await Re.get("https://aaaogo.xyz/api/user/admins-and-superadmins",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(Pe.data.success)return Pe.data.users}catch(Q){throw console.error("Error fetching admins and superadmins:",Q),Q}},Hl=(Q,Pe)=>{p(Ze=>({...Ze,[Q]:Pe})),Q!=="search"&&(i(!0),x(Ze=>({...Ze,currentPage:1})),setTimeout(()=>{ta(1,!0),i(!1)},100))},Sp=Q=>{i(!0),x(Pe=>({...Pe,limit:parseInt(Q),currentPage:1})),setTimeout(()=>{ta(1,!0),i(!1)},100)},$l=Q=>{a(!0),x(Pe=>({...Pe,currentPage:Q})),ta(Q)},zs=async(Q=1,Pe=10,Ze="",We="",nt="desc",Ul=!1)=>{try{a(!0);const Pi="https://aaaogo.xyz/api",Oi=new URLSearchParams({page:Q.toString(),limit:Pe.toString(),sortOrder:nt});Ze&&Oi.append("priority",Ze),We&&Oi.append("category",We);const ra=await Re.get(`${Pi}/support/escalated-tickets?${Oi}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});ra.data.success&&(xt(ra.data.data.tickets),Ul||V==="escalated"?(e(ra.data.data.tickets),bt(ra.data.data.pagination),x(ra.data.data.pagination)):bt(ra.data.data.pagination))}catch(Pi){console.error("Error fetching escalated tickets:",Pi),Ne.error("Failed to fetch escalated tickets. Please try again.")}finally{a(!1)}},Cp=async Q=>{try{const Ze=await Re.get(`https://aaaogo.xyz/api/support/tickets/${Q}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});Ze.data.success&&(o(Ze.data.data.ticket),d(!0),$a(Q))}catch(Pe){console.error("Error fetching ticket details:",Pe)}},Ap=async(Q,Pe,Ze="")=>{try{const nt=await Re.patch(`https://aaaogo.xyz/api/support/tickets/${Q}/status`,{status:Pe,internalNote:Ze},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});nt.data.success&&(ta(m.currentPage),l&&l._id===Q&&o(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")}},kp=()=>{Ap(Il.ticketId,Il.newStatus,Il.note),Pr(!1),Fl({ticketId:"",newStatus:"",note:""})},lu=async(Q,Pe,Ze="")=>{try{const nt=await Re.patch(`https://aaaogo.xyz/api/support/tickets/${Q}/priority`,{priority:Pe,reason:Ze},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});nt.data.success&&(ta(m.currentPage),l&&l._id===Q&&o(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")}},ou=()=>{lu(ea.ticketId,ea.newPriority,ea.reason),Ls(!1),wa({ticketId:"",currentPriority:"",newPriority:"",reason:""})},Dp=async(Q,Pe,Ze="")=>{try{const nt=await Re.patch(`https://aaaogo.xyz/api/support/tickets/${Q}/assign`,{agentId:Pe,internalNote:Ze},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(nt.data.success)return ta(m.currentPage),l&&l._id===Q&&o(nt.data.data.ticket),nt.data}catch(We){throw console.error("Error assigning ticket:",We),We}},Mb=async(Q,Pe,Ze=!1)=>{try{const nt=await Re.post(`https://aaaogo.xyz/api/support/tickets/${Q}/responses`,{message:Pe,isInternal:Ze},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(nt.data.success)return l&&l._id===Q&&Cp(Q),nt.data}catch(We){throw console.error("Error adding ticket response:",We),We}},ds=async()=>{try{const Pe=await Re.get("https://aaaogo.xyz/api/support/statistics",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});if(Pe.data.success)return Pe.data.data}catch(Q){throw console.error("Error fetching ticket statistics:",Q),Q}},pr=async(Q=1,Pe=!1)=>{try{a(!0);const We=await Re.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),(Pe||V==="assigned")&&(e(We.data.data.tickets),x(We.data.data.pagination)))}catch(Ze){console.error("Error fetching assigned tickets:",Ze)}finally{a(!1)}},Or=async(Q=1,Pe=!1)=>{try{a(!0);const We=await Re.get(`https://aaaogo.xyz/api/support/unassigned-tickets?page=${Q}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});We.data.success&&(K(We.data.data.tickets),(Pe||V==="unassigned")&&(e(We.data.data.tickets),x(We.data.data.pagination)))}catch(Ze){console.error("Error fetching unassigned tickets:",Ze)}finally{a(!1)}},$a=async(Q,Pe=1)=>{try{we(!0);const We=await Re.get(`https://aaaogo.xyz/api/support/tickets/${Q}/responses?page=${Pe}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});We.data.success&&(re(We.data.data.responses),L(We.data.data.responses),ue(We.data.data.pagination))}catch(Ze){console.error("Error fetching ticket responses:",Ze),Ne.error("Failed to fetch ticket responses. Please try again.")}finally{we(!1)}},hc=async()=>{if(!v.assignedTo){Ne.error("Please select an agent");return}try{A(!0),await Dp(v.ticketId,v.assignedTo,v.internalNote),uc(!1),N({ticketId:"",assignedTo:"",internalNote:""}),Ne.success("Ticket assigned successfully!"),Is()}catch{Ne.error("Failed to assign ticket. Please try again.")}finally{A(!1)}},Eb=async()=>{if(!T.message.trim()){Ne.error("Please enter a message");return}try{_(!0),await Mb(l._id,T.message,T.isInternal),M({message:"",isInternal:!1}),$a(l._id),Ne.success("Response added successfully!")}catch{Ne.error("Failed to add response. Please try again.")}finally{_(!1)}},Pb=async()=>{try{W(!0);const Q=await ds();F(Q),X(!0)}catch{Ne.error("Failed to fetch statistics. Please try again.")}finally{W(!1)}},Tp=async()=>{try{iu(!0),await Bl(Ht.ticketId,Ht.escalateTo,Ht.reason),pn(!1),Ha({ticketId:"",escalateTo:"",reason:""}),Ne.success("Ticket escalated successfully!"),Is()}catch{Ne.error("Failed to escalate ticket. Please try again.")}finally{iu(!1)}},Yl=Q=>{Ha({...Ht,ticketId:Q}),pn(!0)},cu=(Q,Pe)=>{wa({...ea,ticketId:Q,currentPriority:Pe}),Ls(!0)},Ei=async Q=>{try{const Pe=await Tb();da(Pe),N({...v,ticketId:Q}),uc(!0)}catch{Ne.error("Failed to load admins. Please try again.")}},Un=Q=>{switch(Z(Q),e([]),a(!0),Q){case"all":ta(1,!0);break;case"assigned":pr(1,!0);break;case"unassigned":Or(1,!0);break;case"escalated":zs(1,10,"","","desc",!0);break;default:ta(1,!0)}},Is=()=>{switch(V){case"assigned":pr();break;case"unassigned":Or();break;case"escalated":zs();break;default:ta()}};E.useEffect(()=>{ta()},[]),E.useEffect(()=>{V==="all"?ta():V==="assigned"?pr():V==="unassigned"?Or():V==="escalated"&&zs()},[h.status,h.priority,h.category,m.currentPage,m.limit,V]);const Wn=Q=>{switch(Q){case"high":return s.jsx(gD,{className:"text-red-500",size:20});case"medium":return s.jsx(Xh,{className:"text-yellow-500",size:16});case"low":return s.jsx(xD,{className:"text-green-500",size:20});default:return s.jsx(xD,{className:"text-gray-500",size:20})}},er=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"}},us=Q=>new Date(Q).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),du=t.filter(Q=>{const Pe=h.status==="all"||Q.status===h.status,Ze=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 Pe&&Ze&&We&&nt});return s.jsxs("div",{className:"flex bg-[#013220] text-yellow-400 min-h-screen",children:[s.jsx(mR,{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"}}}}),s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 p-3 md:p-6 min-w-0",children:[s.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:[s.jsxs("div",{className:"mb-4 sm:mb-0",children:[s.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-yellow-400",children:"Customer Support"}),s.jsx("p",{className:"text-gray-400 mt-1 text-sm md:text-base",children:"Manage and track customer tickets efficiently"})]}),s.jsxs("div",{className:"flex gap-2 md:gap-3 flex-wrap",children:[s.jsxs("button",{onClick:Pb,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:[s.jsx(fD,{size:16,className:"md:w-5 md:h-5"}),H?"Loading...":"Statistics"]}),s.jsxs("button",{onClick:Is,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:[s.jsx(aj,{size:20}),"Refresh"]})]})]}),s.jsxs("div",{className:"flex gap-3 mb-8 bg-[#1a4a2e] p-2 rounded-xl border border-yellow-400/20",children:[s.jsx("button",{onClick:()=>Un("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"}),s.jsxs("button",{onClick:()=>Un("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 ",s.jsx("span",{className:"bg-green-500 text-white px-2 py-1 rounded-full text-xs ml-2",children:B.length})]}),s.jsxs("button",{onClick:()=>Un("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 ",s.jsx("span",{className:"bg-red-500 text-white px-2 py-1 rounded-full text-xs ml-2",children:te.length})]}),s.jsxs("button",{onClick:()=>Un("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 ",s.jsx("span",{className:"bg-orange-500 text-white px-2 py-1 rounded-full text-xs ml-2",children:_e.length})]})]}),s.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:[n&&s.jsxs("div",{className:"flex items-center gap-2 mb-4 text-yellow-300",children:[s.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-yellow-400"}),s.jsx("span",{className:"text-sm",children:"Applying filters..."})]}),s.jsxs("div",{className:"flex flex-wrap gap-6 items-center",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-yellow-400/20 rounded-lg",children:s.jsx(fD,{size:20,className:"text-yellow-400"})}),s.jsx("span",{className:"font-semibold text-lg text-yellow-300",children:"Filters:"})]}),s.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:[s.jsx(Lq,{size:20,className:"text-yellow-400"}),s.jsx("input",{type:"text",placeholder:"Search tickets by ID, subject, or user...",value:h.search,onChange:Q=>Hl("search",Q.target.value),className:"bg-transparent text-white placeholder-gray-400 focus:outline-none flex-1 min-w-[200px]"})]}),s.jsxs("select",{value:h.status,onChange:Q=>Hl("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:[s.jsx("option",{value:"all",className:"bg-[#013220]",children:"All Status"}),s.jsx("option",{value:"open",className:"bg-[#013220]",children:"Open"}),s.jsx("option",{value:"in-progress",className:"bg-[#013220]",children:"In Progress"}),s.jsx("option",{value:"resolved",className:"bg-[#013220]",children:"Resolved"}),s.jsx("option",{value:"closed",className:"bg-[#013220]",children:"Closed"})]}),s.jsxs("select",{value:h.priority,onChange:Q=>Hl("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:[s.jsx("option",{value:"all",className:"bg-[#013220]",children:"All Priority"}),NO.map(Q=>s.jsx("option",{value:Q,className:"capitalize bg-[#013220]",children:Q.charAt(0).toUpperCase()+Q.slice(1)},Q))]}),s.jsxs("select",{value:h.category,onChange:Q=>Hl("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:[s.jsx("option",{value:"all",className:"bg-[#013220]",children:"All Categories"}),J1e.map(Q=>s.jsx("option",{value:Q,className:"capitalize bg-[#013220]",children:Q.charAt(0).toUpperCase()+Q.slice(1)},Q))]})]}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("label",{className:"text-yellow-300 text-sm font-medium mb-2",children:"Items per page"}),s.jsxs("select",{value:m.limit,onChange:Q=>Sp(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:[s.jsx("option",{value:10,className:"bg-[#013220]",children:"10"}),s.jsx("option",{value:25,className:"bg-[#013220]",children:"25"}),s.jsx("option",{value:50,className:"bg-[#013220]",children:"50"}),s.jsx("option",{value:100,className:"bg-[#013220]",children:"100"})]})]})]}),s.jsx("div",{className:"bg-gradient-to-br from-[#1a4a2e] to-[#2d5a3d] border border-yellow-400/30 rounded-xl overflow-hidden shadow-2xl",children:r?s.jsxs("div",{className:"flex flex-col justify-center items-center py-16",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-yellow-400 mb-4"}),s.jsx("p",{className:"text-yellow-300 font-medium",children:"Loading tickets..."})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full",children:[s.jsx("thead",{className:"bg-gradient-to-r from-yellow-400 to-yellow-300 text-[#013220]",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Ticket ID"}),s.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Customer"}),s.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Subject"}),s.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Priority"}),s.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Status"}),s.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Category"}),s.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Created"}),s.jsx("th",{className:"px-6 py-4 text-left font-bold tracking-wide",children:"Actions"})]})}),s.jsx("tbody",{children:du.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:"8",className:"px-4 py-8 text-center text-gray-400",children:"No tickets found"})}):du.map(Q=>s.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:[s.jsx("td",{className:"px-4 py-4 font-mono text-sm font-medium text-yellow-300",children:Q.ticketId}),s.jsx("td",{className:"px-4 py-4",children:s.jsxs("div",{children:[s.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"}),s.jsx("div",{className:"text-sm text-gray-400 group-hover:text-gray-300 transition-colors",children:Q.user&&Q.user.email||"N/A"})]})}),s.jsx("td",{className:"px-4 py-4",children:s.jsx("div",{className:"max-w-xs truncate font-medium",title:Q.subject,children:Q.subject})}),s.jsx("td",{className:"px-4 py-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[Wn(Q.priority),s.jsx("span",{className:"capitalize font-medium",children:Q.priority})]})}),s.jsx("td",{className:"px-4 py-4",children:s.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-medium border whitespace-nowrap ${er(Q.status)}`,children:Q.status.replace("-"," ").toUpperCase()})}),s.jsx("td",{className:"px-4 py-4 capitalize font-medium",children:Q.category}),s.jsx("td",{className:"px-4 py-4 text-sm text-gray-300",children:us(Q.createdAt)}),s.jsx("td",{className:"px-4 py-4",children:s.jsxs("div",{className:"flex gap-1",children:[s.jsx("button",{onClick:()=>Cp(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:s.jsx(SR,{size:14})}),s.jsx("button",{onClick:()=>{o(Q),d(!0),$a(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:s.jsx(Dh,{size:14})}),s.jsx("button",{onClick:()=>Ei(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:s.jsx(d1,{size:14})}),s.jsx("button",{onClick:()=>{Ue(Q),Te(!0),$a(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:s.jsx(uq,{size:14})}),s.jsx("button",{onClick:()=>Yl(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:s.jsx(mD,{size:14})}),s.jsx("button",{onClick:()=>cu(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:s.jsx(gD,{size:14})})]})})]},Q._id))})]})}),m.totalPages>1&&s.jsxs("div",{className:"flex justify-between items-center p-4 border-t border-yellow-400/20",children:[s.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"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{onClick:()=>$l(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"}),s.jsx("div",{className:"flex gap-1",children:(()=>{const Q=[];let Ze=Math.max(1,m.currentPage-Math.floor(2.5)),We=Math.min(m.totalPages,Ze+5-1);We-Ze+1<5&&(Ze=Math.max(1,We-5+1));for(let nt=Ze;nt<=We;nt++)Q.push(s.jsx("button",{onClick:()=>$l(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})()}),s.jsx("button",{onClick:()=>$l(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&&l&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:s.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:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsxs("h2",{className:"text-xl font-bold",children:["Ticket Details - ",l.ticketId]}),s.jsx("button",{onClick:()=>d(!1),className:"text-gray-400 hover:text-white text-2xl",children:"×"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2",children:"Customer Information"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Name:"})," ",l.user?`${l.user.firstName||"N/A"} ${l.user.lastName||""}`:"N/A"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Email:"})," ",l.user&&l.user.email||"N/A"]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Phone:"})," ",l.user&&l.user.phoneNumber||"N/A"]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2",children:"Ticket Information"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Subject:"})," ",l.subject]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Category:"})," ",l.category]}),s.jsxs("p",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-medium",children:"Priority:"}),Wn(l.priority),s.jsx("span",{className:"capitalize",children:l.priority})]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Created:"})," ",us(l.createdAt)]}),s.jsxs("p",{children:[s.jsx("span",{className:"font-medium",children:"Last Updated:"})," ",us(l.updatedAt)]})]})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2 mb-4",children:"Description"}),s.jsx("p",{className:"bg-[#1a4a2e] p-4 rounded border border-yellow-400/20",children:l.description})]}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2 mb-4",children:"Update Status"}),s.jsxs("div",{className:"flex gap-4 items-center",children:[s.jsxs("select",{value:l.status,onChange:Q=>{const Pe=Q.target.value;Fl({ticketId:l._id,newStatus:Pe,note:""}),Pr(!0)},className:"bg-[#1a4a2e] border border-yellow-400/50 rounded px-3 py-2 focus:outline-none focus:border-yellow-400",children:[s.jsx("option",{value:"open",children:"Open"}),s.jsx("option",{value:"in-progress",children:"In Progress"}),s.jsx("option",{value:"resolved",children:"Resolved"}),s.jsx("option",{value:"closed",children:"Closed"})]}),s.jsxs("span",{className:`px-3 py-1 rounded-full text-sm border whitespace-nowrap ${er(l.status)}`,children:["Current: ",l.status.replace("-"," ").toUpperCase()]})]})]}),l.internalNotes&&l.internalNotes.length>0&&s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2 mb-4",children:"Internal Notes"}),s.jsx("div",{className:"space-y-2",children:l.internalNotes.map((Q,Pe)=>s.jsxs("div",{className:"bg-[#1a4a2e] p-3 rounded border border-yellow-400/20",children:[s.jsx("p",{className:"text-sm",children:Q.note}),s.jsx("p",{className:"text-xs text-gray-400 mt-1",children:us(Q.addedAt)})]},Pe))})]}),s.jsxs("div",{className:"mt-6",children:[s.jsx("h3",{className:"text-lg font-semibold border-b border-yellow-400/30 pb-2 mb-4",children:"Responses"}),s.jsx("div",{className:"space-y-3 mb-4 max-h-60 overflow-y-auto",children:R.length>0?R.map((Q,Pe)=>s.jsxs("div",{className:`p-3 rounded border ${Q.isInternal?"bg-[#1a4a2e] border-yellow-400/20":"bg-[#0f3a1f] border-green-400/20"}`,children:[s.jsxs("div",{className:"flex justify-between items-start mb-2",children:[s.jsxs("span",{className:"text-sm font-medium text-yellow-400",children:[Q.respondent?.firstName," ",Q.respondent?.lastName]}),s.jsxs("div",{className:"flex items-center gap-2",children:[Q.isInternal&&s.jsx("span",{className:"text-xs bg-yellow-400/20 text-yellow-400 px-2 py-1 rounded",children:"Internal"}),s.jsx("span",{className:"text-xs text-gray-400",children:us(Q.createdAt)})]})]}),s.jsx("p",{className:"text-sm",children:Q.message})]},Pe)):s.jsx("p",{className:"text-gray-400 text-sm italic",children:"No responses yet"})}),s.jsxs("div",{className:"border-t border-yellow-400/30 pt-4",children:[s.jsx("h4",{className:"text-md font-medium text-yellow-400 mb-3",children:"Add Response"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("textarea",{value:T.message,onChange:Q=>M({...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}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx("input",{type:"checkbox",checked:T.isInternal,onChange:Q=>M({...T,isInternal:Q.target.checked}),className:"rounded border-yellow-400/50 bg-[#1a4a2e] text-yellow-400 focus:ring-yellow-400"}),s.jsx("span",{className:"text-yellow-400",children:"Internal response (not visible to customer)"})]}),s.jsx("button",{onClick:Eb,disabled:O||!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:O?"Adding...":"Add Response"})]})]})]})]})]})})}),b&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-md mx-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-yellow-400",children:"Assign Ticket"}),s.jsx("button",{onClick:()=>{y(!1),N({ticketId:"",assignedTo:"",internalNote:""})},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Select Agent"}),s.jsxs("select",{value:v.assignedTo,onChange:Q=>N({...v,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:[s.jsx("option",{value:"",children:"Choose an agent..."}),C.map(Q=>s.jsxs("option",{value:Q._id,children:[Q.firstName," ",Q.lastName," (",Q.email,")"]},Q._id))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Internal Note (Optional)"}),s.jsx("textarea",{value:v.internalNote,onChange:Q=>N({...v,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})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx("button",{onClick:()=>{y(!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:k,children:"Cancel"}),s.jsx("button",{onClick:hc,disabled:k||!v.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:k?"Assigning...":"Assign Ticket"})]})]})]})}),va&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-[#013220] border border-red-400 rounded-lg p-6 w-full max-w-md mx-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-red-400",children:"Escalate Ticket"}),s.jsx("button",{onClick:()=>{pn(!1),Ha({ticketId:"",escalateTo:"",reason:""})},className:"text-gray-400 hover:text-red-400 text-2xl",children:"×"})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-red-900/20 border border-red-400/30 rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-red-400",children:[s.jsx(Xh,{size:16}),s.jsx("span",{className:"text-sm font-medium",children:"Escalation Notice"})]}),s.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."})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-sm font-medium text-red-400 mb-2",children:["Escalate To (Agent ID) ",s.jsx("span",{className:"text-red-500",children:"*"})]}),s.jsx("input",{type:"text",value:Ht.escalateTo,onChange:Q=>Ha({...Ht,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}),Ht.escalateTo&&Ht.escalateTo.length<3&&s.jsx("p",{className:"text-red-400 text-xs mt-1",children:"Agent ID must be at least 3 characters long"})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-sm font-medium text-red-400 mb-2",children:["Escalation Reason ",s.jsx("span",{className:"text-red-500",children:"*"})]}),s.jsx("textarea",{value:Ht.reason,onChange:Q=>Ha({...Ht,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}),s.jsxs("div",{className:"flex justify-between items-center mt-1",children:[s.jsx("p",{className:"text-red-400 text-xs",children:Ht.reason.length<10&&Ht.reason.length>0?"Please provide more detailed reasoning":""}),s.jsxs("span",{className:"text-xs text-gray-400",children:[Ht.reason.length,"/500"]})]})]}),s.jsxs("div",{className:"flex gap-4 pt-6 border-t border-red-400/20",children:[s.jsx("button",{onClick:()=>{pn(!1),Ha({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"}),s.jsx("button",{onClick:Tp,disabled:Xe||!Ht.escalateTo||Ht.escalateTo.length<3||!Ht.reason||Ht.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?s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Escalating..."]}):s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx(mD,{size:18}),"Escalate Ticket"]})})]})]})]})}),kb&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-md mx-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-yellow-400",children:"Assign Ticket"}),s.jsx("button",{onClick:()=>{uc(!1),N({ticketId:"",assignedTo:""})},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-yellow-900/20 border border-yellow-400/30 rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-yellow-400",children:[s.jsx(d1,{size:16}),s.jsx("span",{className:"text-sm font-medium",children:"Ticket Assignment"})]}),s.jsx("p",{className:"text-sm text-yellow-300 mt-2",children:"Select an admin or superadmin to assign this ticket to."})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:["Assign To ",s.jsx("span",{className:"text-red-500",children:"*"})]}),s.jsxs("select",{value:v.assignedTo,onChange:Q=>N({...v,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:[s.jsx("option",{value:"",children:"Select admin or superadmin..."}),zl.map(Q=>s.jsxs("option",{value:Q._id,children:[Q.firstName," ",Q.lastName," (",Q.username,") - ",Q.role.toUpperCase()]},Q._id))]})]}),s.jsxs("div",{className:"flex gap-4 pt-6 border-t border-yellow-400/20",children:[s.jsx("button",{onClick:()=>{uc(!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:k,children:"Cancel"}),s.jsx("button",{onClick:hc,disabled:k||!v.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:k?s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx("div",{className:"w-4 h-4 border-2 border-[#013220]/30 border-t-[#013220] rounded-full animate-spin"}),"Assigning..."]}):s.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s.jsx(d1,{size:18}),"Assign Ticket"]})})]})]})]})}),Y&&z&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.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:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsx("h2",{className:"text-2xl font-bold text-yellow-400",children:"Ticket Statistics"}),s.jsx("button",{onClick:()=>X(!1),className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:[s.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-yellow-400 mb-2",children:"Total Tickets"}),s.jsx("p",{className:"text-3xl font-bold text-white",children:z.overview.totalTickets})]}),s.jsxs("div",{className:"bg-[#1a4a2e] border border-green-400/30 rounded-lg p-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-green-400 mb-2",children:"Open Tickets"}),s.jsx("p",{className:"text-3xl font-bold text-white",children:z.overview.openTickets})]}),s.jsxs("div",{className:"bg-[#1a4a2e] border border-red-400/30 rounded-lg p-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-red-400 mb-2",children:"Unassigned"}),s.jsx("p",{className:"text-3xl font-bold text-white",children:z.overview.unassignedTickets})]}),s.jsxs("div",{className:"bg-[#1a4a2e] border border-blue-400/30 rounded-lg p-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-blue-400 mb-2",children:"Avg Resolution (hrs)"}),s.jsx("p",{className:"text-3xl font-bold text-white",children:z.overview.avgResolutionTimeHours})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[s.jsx("h3",{className:"text-xl font-semibold text-yellow-400 mb-4",children:"Status Distribution"}),s.jsx("div",{className:"space-y-3",children:z.statusStats.map((Q,Pe)=>s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"capitalize text-gray-300",children:Q._id.replace("-"," ")}),s.jsx("span",{className:"font-bold text-yellow-400",children:Q.count})]},Pe))})]}),s.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[s.jsx("h3",{className:"text-xl font-semibold text-yellow-400 mb-4",children:"Priority Distribution"}),s.jsx("div",{className:"space-y-3",children:z.priorityStats.map((Q,Pe)=>s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[Wn(Q._id),s.jsx("span",{className:"capitalize text-gray-300",children:Q._id})]}),s.jsx("span",{className:"font-bold text-yellow-400",children:Q.count})]},Pe))})]}),s.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[s.jsx("h3",{className:"text-xl font-semibold text-yellow-400 mb-4",children:"Category Distribution"}),s.jsx("div",{className:"space-y-3",children:z.categoryStats.map((Q,Pe)=>s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("span",{className:"capitalize text-gray-300",children:Q._id}),s.jsx("span",{className:"font-bold text-yellow-400",children:Q.count})]},Pe))})]}),s.jsxs("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4",children:[s.jsx("h3",{className:"text-xl font-semibold text-yellow-400 mb-4",children:"Agent Workload"}),s.jsx("div",{className:"space-y-3",children:z.agentWorkload.map((Q,Pe)=>s.jsxs("div",{className:"border-b border-yellow-400/20 pb-2",children:[s.jsxs("div",{className:"flex justify-between items-center mb-1",children:[s.jsx("span",{className:"font-medium text-gray-300",children:Q.agentName}),s.jsxs("span",{className:"font-bold text-yellow-400",children:[Q.ticketCount," tickets"]})]}),s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsx("span",{className:"text-gray-400",children:Q.agentEmail}),s.jsxs("span",{className:"text-red-400",children:[Q.highPriorityCount," high priority"]})]})]},Pe))})]})]}),s.jsx("div",{className:"flex justify-center mt-6",children:s.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&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.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:[s.jsxs("div",{className:"flex justify-between items-center mb-6",children:[s.jsxs("h2",{className:"text-2xl font-bold text-yellow-400",children:["Responses for Ticket #",pe.ticketNumber]}),s.jsx("button",{onClick:()=>{Te(!1),Ue(null),re([])},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),s.jsx("div",{className:"bg-[#1a4a2e] border border-yellow-400/30 rounded-lg p-4 mb-6",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-400 text-sm",children:"Subject:"}),s.jsx("p",{className:"text-yellow-400 font-medium",children:pe.subject})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-400 text-sm",children:"Status:"}),s.jsx("p",{className:`font-medium ${er(pe.status)}`,children:pe.status.replace("-"," ").toUpperCase()})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-400 text-sm",children:"Priority:"}),s.jsxs("div",{className:"flex items-center gap-2",children:[Wn(pe.priority),s.jsx("span",{className:"text-white capitalize",children:pe.priority})]})]})]})}),s.jsx("div",{className:"space-y-4 mb-6",children:ne?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx("div",{className:"text-yellow-400",children:"Loading responses..."})}):U.length===0?s.jsx("div",{className:"text-center py-8 text-gray-400",children:"No responses found for this ticket."}):U.map(Q=>s.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:[s.jsxs("div",{className:"flex justify-between items-start mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.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&&s.jsx("div",{className:"px-2 py-1 rounded text-xs font-medium bg-purple-600 text-white",children:"AUTOMATED"}),Q.isInternal&&s.jsx("div",{className:"px-2 py-1 rounded text-xs font-medium bg-red-600 text-white",children:"INTERNAL"})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-sm text-gray-400",children:us(Q.createdAt)}),Q.respondent&&s.jsxs("div",{className:"text-xs text-yellow-400",children:[Q.respondent.firstName," ",Q.respondent.lastName]})]})]}),s.jsx("div",{className:"text-white",children:Q.message}),(Q.automationTrigger||Q.isEdited)&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-600 text-xs text-gray-400",children:[Q.automationTrigger&&s.jsxs("div",{children:["Trigger: ",Q.automationTrigger]}),Q.isEdited&&s.jsxs("div",{children:["Edited at: ",us(Q.editedAt)]})]})]},Q._id))}),ye.totalPages>1&&s.jsxs("div",{className:"flex justify-center gap-2 mb-6",children:[s.jsx("button",{onClick:()=>$a(pe._id,ye.currentPage-1),disabled:!ye.hasPrevPage||ne,className:"px-3 py-1 bg-yellow-400 text-[#013220] rounded disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),s.jsxs("span",{className:"px-3 py-1 text-yellow-400",children:["Page ",ye.currentPage," of ",ye.totalPages]}),s.jsx("button",{onClick:()=>$a(pe._id,ye.currentPage+1),disabled:!ye.hasNextPage||ne,className:"px-3 py-1 bg-yellow-400 text-[#013220] rounded disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]}),s.jsx("div",{className:"flex justify-center",children:s.jsx("button",{onClick:()=>{Te(!1),Ue(null),re([])},className:"px-6 py-2 bg-yellow-400 text-[#013220] rounded-lg hover:bg-yellow-300 transition-colors",children:"Close"})})]})}),cs&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-md mx-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-yellow-400",children:"Add Internal Note"}),s.jsx("button",{onClick:()=>{Pr(!1),Fl({ticketId:"",newStatus:"",note:""})},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-yellow-400 text-sm font-medium mb-2",children:"Internal Note (Optional)"}),s.jsx("textarea",{value:Il.note,onChange:Q=>Fl({...Il,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})]}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx("button",{onClick:()=>{Pr(!1),Fl({ticketId:"",newStatus:"",note:""})},className:"px-4 py-2 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition-colors",children:"Cancel"}),s.jsx("button",{onClick:kp,className:"px-4 py-2 bg-yellow-400 text-[#013220] rounded-lg hover:bg-yellow-300 transition-colors font-medium",children:"Update Status"})]})]})]})}),Db&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-[#013220] border border-yellow-400 rounded-lg p-6 w-full max-w-md mx-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-4",children:[s.jsx("h2",{className:"text-xl font-bold text-yellow-400",children:"Change Ticket Priority"}),s.jsx("button",{onClick:()=>{Ls(!1),wa({ticketId:"",currentPriority:"",newPriority:"",reason:""})},className:"text-gray-400 hover:text-yellow-400 text-2xl",children:"×"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{children:s.jsxs("label",{className:"block text-yellow-400 text-sm font-medium mb-2",children:["Current Priority: ",s.jsx("span",{className:"capitalize text-white",children:ea.currentPriority})]})}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-yellow-400 text-sm font-medium mb-2",children:"New Priority"}),s.jsxs("select",{value:ea.newPriority,onChange:Q=>wa({...ea,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:[s.jsx("option",{value:"",children:"Select new priority"}),NO.map(Q=>s.jsx("option",{value:Q,className:"capitalize",children:Q},Q))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-yellow-400 text-sm font-medium mb-2",children:"Reason for Priority Change"}),s.jsx("textarea",{value:ea.reason,onChange:Q=>wa({...ea,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})]}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx("button",{onClick:()=>{Ls(!1),wa({ticketId:"",currentPriority:"",newPriority:"",reason:""})},className:"px-4 py-2 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition-colors",children:"Cancel"}),s.jsx("button",{onClick:ou,disabled:!ea.newPriority||!ea.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"})]})]})]})})]})]})},t2e=()=>{const[t,e]=E.useState("officials"),[r,a]=E.useState([]),[n,i]=E.useState([]),[l,o]=E.useState(!1),[c,d]=E.useState(!1),[h,p]=E.useState(!1),[m,x]=E.useState(null),[b,y]=E.useState({title:"",description:"",picture:null}),[v,N]=E.useState({currentPage:1,totalPages:1,totalPosts:0}),[C,S]=E.useState(!1),[k,A]=E.useState(null),[T,M]=E.useState(!1),[O,_]=E.useState(null),R="https://aaaogo.xyz/api",L="https://aaaogo.xyz",z=async()=>{try{o(!0);const K=await Re.get(`${R}/offers`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});K.data.success&&a(K.data.offers)}catch(K){console.error("Error fetching officials:",K),Ne.error("Failed to fetch officials")}finally{o(!1)}},F=async(K=1)=>{try{o(!0);const U=await Re.get(`${R}/posts/feed?page=${K}&limit=10`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});U.data.success&&(i(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{o(!1)}},Y=async K=>{if(K.preventDefault(),!b.title||!b.description){Ne.error("Title and description are required");return}try{o(!0);const U=new FormData;U.append("title",b.title),U.append("description",b.description),b.picture&&U.append("picture",b.picture),(await Re.post(`${R}/offers`,U,{headers:{"Content-Type":"multipart/form-data",Authorization:`Bearer ${localStorage.getItem("token")}`}})).data.success&&(Ne.success("Official created successfully"),d(!1),y({title:"",description:"",picture:null}),z())}catch(U){console.error("Error creating official:",U),Ne.error("Failed to create official")}finally{o(!1)}},X=async K=>{if(K.preventDefault(),!b.title||!b.description){Ne.error("Title and description are required");return}try{o(!0);const U=new FormData;U.append("title",b.title),U.append("description",b.description),b.picture&&U.append("picture",b.picture),(await Re.put(`${R}/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),y({title:"",description:"",picture:null}),z())}catch(U){console.error("Error updating official:",U),Ne.error("Failed to update official")}finally{o(!1)}},H=K=>{_(K),M(!0)},W=async()=>{if(O)try{o(!0),(await Re.delete(`${R}/offers/${O}`,{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{o(!1),M(!1),_(null)}},V=async K=>{A(K),S(!0)},Z=async()=>{if(k)try{o(!0),(await Re.delete(`${R}/posts/${k}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}})).data.success&&(Ne.success("Post deleted successfully"),F(v.currentPage))}catch(K){console.error("Error deleting post:",K),Ne.error("Failed to delete post")}finally{o(!1),S(!1),A(null)}},B=K=>{const{name:U,value:re,files:ne}=K.target;y(U==="picture"?we=>({...we,picture:ne[0]}):we=>({...we,[U]:re}))},G=K=>{x(K),y({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 E.useEffect(()=>{t==="officials"?z():t==="feed"&&F()},[t]),s.jsxs("div",{className:"flex bg-[#013220] text-yellow-400 min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 p-3 md:p-6 min-w-0",children:[s.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:[s.jsx("h1",{className:"text-3xl font-bold text-yellow-400 mb-2",children:"Officials and Feed"}),s.jsx("p",{className:"text-gray-400",children:"Manage officials and view community feeds"})]}),s.jsx("div",{className:"mb-6",children:s.jsx("div",{className:"bg-[#1a4a2e] p-2 rounded-xl border border-yellow-400/20",children:s.jsxs("nav",{className:"flex space-x-3",children:[s.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"}),s.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"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex justify-between items-center mb-6",children:s.jsxs("div",{className:"flex space-x-3",children:[s.jsxs("button",{onClick:()=>d(!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:[s.jsx(Iq,{size:20}),s.jsx("span",{children:"Add Official"})]}),s.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:[s.jsx(aj,{size:20}),s.jsx("span",{children:"Refresh"})]})]})}),l?s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:r.map(K=>s.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:[s.jsxs("div",{className:"h-48 bg-[#013220] flex items-center justify-center border-b border-yellow-400/20",children:[K.picture?s.jsx("img",{src:`${L}/${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"}}):s.jsx(u1,{size:48,className:"text-yellow-400/50"}),s.jsx("div",{className:"w-full h-full flex items-center justify-center",style:{display:"none"},children:s.jsx(u1,{size:48,className:"text-yellow-400/50"})})]}),s.jsxs("div",{className:"p-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-yellow-400 mb-2",children:K.title}),s.jsx("p",{className:"text-gray-400 text-sm mb-3 line-clamp-3",children:K.description}),s.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500 mb-3",children:[s.jsxs("span",{children:["Created: ",te(K.createdAt)]}),s.jsxs("span",{className:"text-yellow-400",children:["❤️ ",K.likes?.length||0]})]}),s.jsxs("div",{className:"flex space-x-2",children:[s.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:[s.jsx(ec,{size:16}),s.jsx("span",{children:"Edit"})]}),s.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:[s.jsx(rj,{size:16}),s.jsx("span",{children:"Delete"})]})]})]})]},K._id))}),r.length===0&&!l&&s.jsxs("div",{className:"text-center py-12 bg-[#1a4a2e] rounded-xl border border-yellow-400/20",children:[s.jsx(u1,{size:64,className:"mx-auto text-yellow-400/50 mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-yellow-400 mb-2",children:"No officials found"}),s.jsx("p",{className:"text-gray-400",children:"Get started by creating your first official."})]})]}),t==="feed"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between items-center mb-6 bg-[#1a4a2e] p-4 rounded-xl border border-yellow-400/20",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-xl font-semibold text-yellow-400",children:"Community Feed"}),s.jsxs("p",{className:"text-gray-400 text-sm",children:["Total posts: ",v.totalPosts]})]}),s.jsxs("button",{onClick:()=>F(v.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:[s.jsx(aj,{size:20}),s.jsx("span",{children:"Refresh"})]})]}),l?s.jsx("div",{className:"flex justify-center items-center h-64",children:s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-green-600"})}):s.jsx("div",{className:"space-y-6",children:n.map(K=>s.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl shadow-lg p-6 border border-yellow-400/20 hover:shadow-2xl transition-all duration-300",children:[s.jsxs("div",{className:"flex items-center mb-4",children:[s.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:s.jsx(z0,{className:"text-[#013220]"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-yellow-400",children:K.author.name}),s.jsxs("p",{className:"text-sm text-gray-400",children:["@",K.author.username]})]}),s.jsx("div",{className:"ml-auto text-sm text-gray-400",children:te(K.createdAt)})]}),s.jsx("div",{className:"mb-4",children:s.jsx("p",{className:"text-gray-300 leading-relaxed",children:K.content})}),K.media&&K.media.length>0&&s.jsx("div",{className:"mb-4 grid grid-cols-2 gap-2",children:K.media.map((U,re)=>s.jsx("img",{src:`${L}/${U.replace(/^\/?/,"")}`,alt:`Post media ${re+1}`,className:"rounded-lg object-cover h-48 w-full",onError:ne=>{ne.target.src="https://via.placeholder.com/300x200?text=Image+Not+Found"}},re))}),s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-yellow-400/20",children:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 text-gray-400",children:[s.jsx(yq,{className:"text-red-400"}),s.jsxs("span",{className:"text-sm",children:[K.likes?.length||0," likes"]})]}),s.jsxs("div",{className:"flex items-center space-x-2 text-gray-400",children:[s.jsx(pD,{className:"text-yellow-400"}),s.jsxs("span",{className:"text-sm",children:[K.comments?.length||0," comments"]})]})]}),s.jsx("div",{className:"flex items-center space-x-2",children:s.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:l,children:[s.jsx(rj,{size:16}),s.jsx("span",{children:"Delete"})]})})]}),K.comments&&K.comments.length>0&&s.jsxs("div",{className:"mt-4 pt-4 border-t border-yellow-400/20",children:[s.jsx("h5",{className:"font-medium text-yellow-400 mb-2",children:"Comments:"}),K.comments.slice(0,2).map(U=>s.jsxs("div",{className:"mb-2 p-3 bg-[#013220] rounded-lg border border-yellow-400/10",children:[s.jsxs("div",{className:"flex items-center mb-1",children:[s.jsx("span",{className:"font-medium text-sm text-yellow-400",children:U.author.name}),s.jsx("span",{className:"text-xs text-gray-500 ml-2",children:te(U.createdAt)})]}),s.jsx("p",{className:"text-sm text-gray-300",children:U.content})]},U._id)),K.comments.length>2&&s.jsxs("p",{className:"text-sm text-gray-400",children:["... and ",K.comments.length-2," more comments"]})]})]},K._id))}),v.totalPages>1&&s.jsx("div",{className:"flex justify-center mt-8",children:s.jsx("div",{className:"flex space-x-2",children:Array.from({length:v.totalPages},(K,U)=>U+1).map(K=>s.jsx("button",{onClick:()=>F(K),className:`px-3 py-2 rounded-lg transition-all duration-200 ${K===v.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))})}),n.length===0&&!l&&s.jsxs("div",{className:"text-center py-12 bg-[#1a4a2e] rounded-xl border border-yellow-400/20",children:[s.jsx(pD,{size:64,className:"mx-auto text-yellow-400/50 mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-yellow-400 mb-2",children:"No posts found"}),s.jsx("p",{className:"text-gray-400",children:"The community feed is empty."})]})]}),c&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl p-6 w-full max-w-md border border-yellow-400/30 shadow-2xl",children:[s.jsx("h2",{className:"text-xl font-bold mb-4 text-yellow-400",children:"Create New Official"}),s.jsxs("form",{onSubmit:Y,children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Title"}),s.jsx("input",{type:"text",name:"title",value:b.title,onChange:B,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})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Description"}),s.jsx("textarea",{name:"description",value:b.description,onChange:B,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})]}),s.jsxs("div",{className:"mb-6",children:[s.jsx("label",{className:"block text-sm font-medium text-yellow-400 mb-2",children:"Picture"}),s.jsx("input",{type:"file",name:"picture",onChange:B,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"})]}),s.jsxs("div",{className:"flex space-x-3",children:[s.jsx("button",{type:"submit",disabled:l,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:l?"Creating...":"Create"}),s.jsx("button",{type:"button",onClick:()=>d(!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&&s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:s.jsxs("div",{className:"bg-[#1a4a2e] rounded-xl p-6 w-full max-w-md border border-yellow-400/30 shadow-2xl",children:[s.jsx("h2",{className:"text-xl font-bold mb-4 text-yellow-400",children:"Edit Official"}),s.jsxs("form",{onSubmit:X,children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Title"}),s.jsx("input",{type:"text",name:"title",value:b.title,onChange:B,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})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),s.jsx("textarea",{name:"description",value:b.description,onChange:B,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})]}),s.jsxs("div",{className:"mb-6",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Picture"}),s.jsx("input",{type:"file",name:"picture",onChange:B,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"})]}),s.jsxs("div",{className:"flex space-x-3",children:[s.jsx("button",{type:"submit",disabled:l,className:"flex-1 bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-md disabled:opacity-50",children:l?"Updating...":"Update"}),s.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"})]})]})]})}),s.jsx(vd,{isOpen:C,onClose:()=>{S(!1),A(null)},onConfirm:Z,title:"Delete Post",message:"Are you sure you want to delete this post? This action cannot be undone."}),s.jsx(vd,{isOpen:T,onClose:()=>{M(!1),_(null)},onConfirm:W,title:"Delete Official",message:"Are you sure you want to delete this official? This action cannot be undone."})]})]})},r2e=()=>{const t=hr(),e=E.useRef(null),r=i=>`menu-tab ${t.pathname===i?"active":""}`,a=()=>{e.current.scrollBy({left:-150,behavior:"smooth"})},n=()=>{e.current.scrollBy({left:150,behavior:"smooth"})};return s.jsxs("div",{className:"relative border-b border-yellow-400 px-6 py-2",children:[s.jsx("button",{onClick:a,className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 px-1",children:s.jsx(_0,{size:20})}),s.jsxs("div",{ref:e,className:"mx-6 flex gap-x-4 overflow-x-auto whitespace-nowrap scrollbar-hide",children:[s.jsx(De,{to:"/bookingcharges",className:r("/bookingcharges"),children:"General Pricing"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/bookingcharges/carcab",className:r("/bookingcharges/carcab"),children:"Car/Cab"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/bookingcharges/bike",className:r("/bookingcharges/bike"),children:"Bike"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/bookingcharges/carrecovery",className:r("/bookingcharges/carrecovery"),children:"Car Recovery"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/bookingcharges/shiftingmovers",className:r("/bookingcharges/shiftingmovers"),children:"Shifting & Movers"}),s.jsx("div",{className:"w-[2px] h-3 bg-yellow-400"}),s.jsx(De,{to:"/bookingcharges/appointmentservices",className:r("/bookingcharges/appointmentservices"),children:"Appointment Services"})]}),s.jsx("button",{onClick:n,className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 px-1",children:s.jsx(L0,{size:20})})]})},a2e=({isOpen:t,onClose:e,title:r,data:a,onSave:n,loading:i=!1})=>{const[l,o]=E.useState(a||{}),[c,d]=E.useState(!1),h=qe.useRef({});qe.useEffect(()=>{t&&a&&o(a)},[t,a]),E.useCallback((v,N)=>{o(C=>{const S=v.split("."),k={...C};let A=k;for(let T=0;T<S.length-1;T++){const M=S[T],O=S[T+1];Number.isInteger(Number(O))?Array.isArray(A[M])||(A[M]=[]):(typeof A[M]!="object"||A[M]===null||Array.isArray(A[M]))&&(A[M]={}),A=A[M]}return A[S[S.length-1]]=N,k})},[]);const p=(v,N,C,S)=>{const k=N.split(".");let A=v;for(let M=0;M<k.length-1;M++){const O=k[M];(typeof A[O]!="object"||A[O]===null||Array.isArray(A[O]))&&(A[O]={}),A=A[O]}let T=C;S==="number"?T=C===""?null:Number(C):S==="boolean"&&(T=!!C),A[k[k.length-1]]=T},m=async v=>{v.preventDefault(),d(!0);try{const N=JSON.parse(JSON.stringify(l)),C=Object.entries(h.current||{});for(const[S,k]of C)p(N,S,k.v,k.t);await n(N),Ne.success("Configuration updated successfully!"),e()}catch(N){Ne.error("Failed to update configuration"),console.error("Update error:",N)}finally{d(!1)}},x=({label:v,path:N,type:C="text",suffix:S="",min:k,max:A,step:T})=>{const M=qe.useRef(null);return s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:v}),s.jsx("input",{ref:M,type:C,defaultValue:y(l,N)??"",onChange:O=>{h.current[N]={v:O.target.value,t:C}},className:"w-full px-3 py-2 bg-[#0f3025] border border-[#2b5a46] rounded-md text-[#DDC104] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DDC104] focus:border-[#DDC104]",min:k,max:A,step:T}),S&&s.jsx("span",{className:"ml-2 text-gray-400",children:S})]})},b=({label:v,path:N})=>{const C=qe.useRef(null);return s.jsxs("div",{className:"mb-4 flex items-center",children:[s.jsx("input",{ref:C,type:"checkbox",defaultChecked:!!y(l,N),onChange:S=>{h.current[N]={v:S.target.checked,t:"boolean"}},className:"mr-3 h-4 w-4 text-[#013220] focus:ring-[#DDC104] border-[#2b5a46] rounded bg-[#0f3025]"}),s.jsx("label",{className:"text-sm font-medium text-gray-300",children:v})]})},y=(v,N)=>N.split(".").reduce((C,S)=>C?.[S],v);return t?s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex justify-between items-center p-6 border-b border-[#DDC104]",children:[s.jsx("h2",{className:"text-xl font-semibold text-[#DDC104]",children:r}),s.jsx("button",{onClick:e,className:"text-gray-400 hover:text-[#DDC104] transition-colors",children:s.jsx(Dl,{size:24})})]}),s.jsxs("form",{onSubmit:m,className:"p-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"General Settings"}),s.jsx(x,{label:"Currency",path:"currency"}),s.jsx(x,{label:"Minimum Fare",path:"minimumFare",type:"number",suffix:"AED",min:"0"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"text-md font-medium text-gray-300",children:"Base Fare"}),s.jsx(x,{label:"Amount",path:"baseFare.amount",type:"number",suffix:"AED",min:"0"}),s.jsx(x,{label:"Coverage KM",path:"baseFare.coverageKm",type:"number",suffix:"km",min:"0"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"text-md font-medium text-gray-300",children:"Per KM Rate"}),s.jsx(x,{label:"After Base Coverage",path:"perKmRate.afterBaseCoverage",type:"number",suffix:"AED/km",min:"0",step:"0.1"}),s.jsx(b,{label:"City Wise Adjustment Enabled",path:"perKmRate.cityWiseAdjustment.enabled"}),s.jsx(x,{label:"Above KM",path:"perKmRate.cityWiseAdjustment.aboveKm",type:"number",suffix:"km",min:"0"}),s.jsx(x,{label:"Adjusted Rate",path:"perKmRate.cityWiseAdjustment.adjustedRate",type:"number",suffix:"AED/km",min:"0",step:"0.1"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Platform & Charges"}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"text-md font-medium text-gray-300",children:"Platform Fee"}),s.jsx(x,{label:"Total Percentage",path:"platformFee.percentage",type:"number",suffix:"%",min:"0",max:"100",step:"0.1"}),s.jsx(x,{label:"Driver Share",path:"platformFee.driverShare",type:"number",suffix:"%",min:"0",max:"100",step:"0.1"}),s.jsx(x,{label:"Customer Share",path:"platformFee.customerShare",type:"number",suffix:"%",min:"0",max:"100",step:"0.1"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"text-md font-medium text-gray-300",children:"Cancellation Charges"}),s.jsx(x,{label:"Before Arrival",path:"cancellationCharges.beforeArrival",type:"number",suffix:"AED",min:"0"}),s.jsx(x,{label:"After 25% Distance",path:"cancellationCharges.after25PercentDistance",type:"number",suffix:"AED",min:"0"}),s.jsx(x,{label:"After 50% Distance",path:"cancellationCharges.after50PercentDistance",type:"number",suffix:"AED",min:"0"}),s.jsx(x,{label:"After Arrival",path:"cancellationCharges.afterArrival",type:"number",suffix:"AED",min:"0"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h4",{className:"text-md font-medium text-gray-300",children:"Waiting Charges"}),s.jsx(x,{label:"Free Minutes",path:"waitingCharges.freeMinutes",type:"number",suffix:"min",min:"0"}),s.jsx(x,{label:"Per Minute Rate",path:"waitingCharges.perMinuteRate",type:"number",suffix:"AED/min",min:"0",step:"0.1"}),s.jsx(x,{label:"Maximum Charge",path:"waitingCharges.maximumCharge",type:"number",suffix:"AED",min:"0"})]})]})]}),s.jsxs("div",{className:"mt-6 space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Night Charges"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(b,{label:"Enabled",path:"nightCharges.enabled"}),s.jsx(x,{label:"Start Hour",path:"nightCharges.startHour",type:"number",suffix:":00",min:"0",max:"23"}),s.jsx(x,{label:"End Hour",path:"nightCharges.endHour",type:"number",suffix:":00",min:"0",max:"23"}),s.jsx(x,{label:"Fixed Amount",path:"nightCharges.fixedAmount",type:"number",suffix:"AED",min:"0"}),s.jsx(x,{label:"Multiplier",path:"nightCharges.multiplier",type:"number",suffix:"x",min:"1",step:"0.1"})]})]}),s.jsxs("div",{className:"mt-6 space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Surge Pricing"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(b,{label:"Enabled",path:"surgePricing.enabled"}),s.jsx(b,{label:"Admin Controlled",path:"surgePricing.adminControlled"})]})]}),s.jsxs("div",{className:"mt-6 space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"VAT Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(b,{label:"Enabled",path:"vat.enabled"}),s.jsx(x,{label:"Percentage",path:"vat.percentage",type:"number",suffix:"%",min:"0",max:"100",step:"0.1"})]})]}),s.jsxs("div",{className:"flex justify-end gap-4 mt-8 pt-6 border-t border-gray-700",children:[s.jsx("button",{type:"button",onClick:e,className:"px-6 py-2 bg-[#0f3025] border border-[#2b5a46] text-[#DDC104] rounded-md hover:bg-[#2b5a46] transition-colors",disabled:c,children:"Cancel"}),s.jsx("button",{type:"submit",disabled:c,className:"px-6 py-2 bg-[#DDC104] text-[#013220] rounded-md hover:bg-yellow-300 transition-colors flex items-center gap-2 disabled:opacity-50",children:c?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-[#013220]"}),"Saving..."]}):s.jsxs(s.Fragment,{children:[s.jsx(kl,{size:16}),"Save Changes"]})})]})]})]})}):null};class as{static async updateComprehensivePricing(e){try{return(await Gt.put("/admin/comprehensive-pricing/update-all",e)).data}catch(r){throw console.error("Error updating comprehensive pricing:",r),r}}static async updateGeneralPricing(e){try{const r={currency:e.currency,baseFare:e.baseFare,perKmRate:e.perKmRate,minimumFare:e.minimumFare,platformFee:e.platformFee,cancellationCharges:e.cancellationCharges,waitingCharges:e.waitingCharges,nightCharges:e.nightCharges,surgePricing:e.surgePricing,vat:e.vat};return(await Gt.put("/admin/comprehensive-pricing/update-all",r)).data}catch(r){throw console.error("Error updating general pricing:",r),r}}static async updateServiceTypePricing(e,r){try{const a={serviceTypes:{[e]:r}};return(await Gt.put("/admin/comprehensive-pricing/update-all",a)).data}catch(a){throw console.error(`Error updating ${e} pricing:`,a),a}}static async updateCarRecoveryService(e){try{const r={serviceTypes:{carRecovery:e}};return(await Gt.put("/admin/comprehensive-pricing/update-all",r)).data}catch(r){throw console.error("Error updating car recovery pricing:",r),r}}static async updateShiftingMoversPricing(e){try{const r={serviceTypes:{shiftingMovers:e}};return(await Gt.put("/admin/comprehensive-pricing/update-all",r)).data}catch(r){throw console.error("Error updating shifting movers pricing:",r),r}}static async updateAppointmentServices(e){try{const r={appointmentServices:e};return(await Gt.put("/admin/comprehensive-pricing/update-all",r)).data}catch(r){throw console.error("Error updating appointment services:",r),r}}static async updateRoundTripSettings(e){try{const r={roundTrip:e};return(await Gt.put("/admin/comprehensive-pricing/update-all",r)).data}catch(r){throw console.error("Error updating round trip settings:",r),r}}static async updateVehicleType(e,r,a){try{const n={serviceTypes:{[e]:{vehicleTypes:{[r]:a}}}};return(await Gt.put("/admin/comprehensive-pricing/update-all",n)).data}catch(n){throw console.error(`Error updating ${e}/${r} pricing:`,n),n}}static async updateSubcategory(e,r,a,n){try{const i={serviceTypes:{carRecovery:{serviceTypes:{[e]:{subCategories:{[a]:n}}}}}};return(await Gt.put("/admin/comprehensive-pricing/update-all",i)).data}catch(i){throw console.error(`Error updating ${e}/${a} pricing:`,i),i}}static validatePricingData(e){const r=[];return e.currency||r.push("Currency is required"),e.minimumFare<0&&r.push("Minimum fare must be non-negative"),e.baseFare?.amount<0&&r.push("Base fare amount must be non-negative"),e.baseFare?.coverageKm<0&&r.push("Base fare coverage must be non-negative"),e.perKmRate?.afterBaseCoverage<0&&r.push("Per KM rate must be non-negative"),(e.platformFee?.percentage<0||e.platformFee?.percentage>100)&&r.push("Platform fee percentage must be between 0 and 100"),e.nightCharges?.enabled&&((e.nightCharges.startHour<0||e.nightCharges.startHour>23)&&r.push("Night charges start hour must be between 0 and 23"),(e.nightCharges.endHour<0||e.nightCharges.endHour>23)&&r.push("Night charges end hour must be between 0 and 23"),e.nightCharges.fixedAmount<0&&r.push("Night charges fixed amount must be non-negative"),e.nightCharges.multiplier<1&&r.push("Night charges multiplier must be at least 1")),e.surgePricing?.enabled&&e.surgePricing.levels&&e.surgePricing.levels.forEach((a,n)=>{a.demandRatio<1&&r.push(`Surge level ${n+1}: Demand ratio must be at least 1`),a.multiplier<1&&r.push(`Surge level ${n+1}: Multiplier must be at least 1`)}),r}}const SO=({data:t,onDataUpdate:e})=>{const[r,a]=E.useState(!1),[n,i]=E.useState(null),l=({disabled:m=!1,onClick:x})=>s.jsxs("button",{disabled:m,onClick:x,className:`px-3 py-1 rounded text-sm font-medium transition-colors ${m?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-[#DDC104] text-[#013220] hover:bg-yellow-300"}`,title:m?"Update functionality coming soon":"Edit configuration",children:[s.jsx(ec,{size:16,className:"inline mr-1"}),"Edit"]}),o=m=>{i(m),a(!0)},c=async m=>{try{const x=as.validatePricingData(m);if(x.length>0)throw new Error(x.join(", "));await as.updateGeneralPricing(m),e&&e()}catch(x){throw x}},d=({title:m,children:x,className:b="",cardType:y})=>s.jsxs("div",{className:`bg-[#013220] border border-[#DDC104] rounded-lg p-4 ${b}`,children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104]",children:m}),s.jsx(l,{onClick:()=>o(y)})]}),x]}),h=({label:m,value:x,suffix:b=""})=>s.jsxs("div",{className:"flex justify-between py-2 border-b border-[#2b5a46] last:border-b-0",children:[s.jsxs("span",{className:"text-gray-300",children:[m,":"]}),s.jsxs("span",{className:"text-[#DDC104] font-medium",children:[x,b]})]}),p=({level:m,index:x})=>s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded p-3",children:[s.jsxs("div",{className:"flex justify-between items-center mb-2",children:[s.jsxs("span",{className:"text-sm font-medium text-[#DDC104]",children:["Level ",x+1]}),s.jsxs("span",{className:"text-xs text-gray-400",children:["ID: ",m._id]})]}),s.jsx(h,{label:"Demand Ratio",value:m.demandRatio,suffix:"x"}),s.jsx(h,{label:"Multiplier",value:m.multiplier,suffix:"x"})]});return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(d,{title:"Base Fare",cardType:"general",children:[s.jsx(h,{label:"Amount",value:t.baseFare?.amount,suffix:" AED"}),s.jsx(h,{label:"Coverage KM",value:t.baseFare?.coverageKm,suffix:" km"})]}),s.jsxs(d,{title:"Per KM Rate",cardType:"general",children:[s.jsx(h,{label:"After Base Coverage",value:t.perKmRate?.afterBaseCoverage,suffix:" AED/km"}),s.jsxs("div",{className:"mt-3",children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-2",children:"City Wise Adjustment"}),s.jsxs("div",{className:"bg-[#0f3025] rounded p-3",children:[s.jsx(h,{label:"Enabled",value:t.perKmRate?.cityWiseAdjustment?.enabled?"Yes":"No"}),s.jsx(h,{label:"Above KM",value:t.perKmRate?.cityWiseAdjustment?.aboveKm,suffix:" km"}),s.jsx(h,{label:"Adjusted Rate",value:t.perKmRate?.cityWiseAdjustment?.adjustedRate,suffix:" AED/km"})]})]})]}),s.jsxs(d,{title:"Platform Fee",cardType:"general",children:[s.jsx(h,{label:"Total Percentage",value:t.platformFee?.percentage,suffix:"%"}),s.jsx(h,{label:"Driver Share",value:t.platformFee?.driverShare,suffix:"%"}),s.jsx(h,{label:"Customer Share",value:t.platformFee?.customerShare,suffix:"%"})]}),s.jsxs(d,{title:"Cancellation Charges",cardType:"general",children:[s.jsx(h,{label:"Before Arrival",value:t.cancellationCharges?.beforeArrival,suffix:" AED"}),s.jsx(h,{label:"After 25% Distance",value:t.cancellationCharges?.after25PercentDistance,suffix:" AED"}),s.jsx(h,{label:"After 50% Distance",value:t.cancellationCharges?.after50PercentDistance,suffix:" AED"}),s.jsx(h,{label:"After Arrival",value:t.cancellationCharges?.afterArrival,suffix:" AED"})]}),s.jsxs(d,{title:"Waiting Charges",cardType:"general",children:[s.jsx(h,{label:"Free Minutes",value:t.waitingCharges?.freeMinutes,suffix:" min"}),s.jsx(h,{label:"Per Minute Rate",value:t.waitingCharges?.perMinuteRate,suffix:" AED/min"}),s.jsx(h,{label:"Maximum Charge",value:t.waitingCharges?.maximumCharge,suffix:" AED"})]}),s.jsxs(d,{title:"Night Charges",cardType:"general",children:[s.jsx(h,{label:"Enabled",value:t.nightCharges?.enabled?"Yes":"No"}),s.jsx(h,{label:"Start Hour",value:t.nightCharges?.startHour,suffix:":00"}),s.jsx(h,{label:"End Hour",value:t.nightCharges?.endHour,suffix:":00"}),s.jsx(h,{label:"Fixed Amount",value:t.nightCharges?.fixedAmount,suffix:" AED"}),s.jsx(h,{label:"Multiplier",value:t.nightCharges?.multiplier,suffix:"x"})]})]}),s.jsxs(d,{title:"Surge Pricing",className:"col-span-full",cardType:"general",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[s.jsx(h,{label:"Enabled",value:t.surgePricing?.enabled?"Yes":"No"}),s.jsx(h,{label:"Admin Controlled",value:t.surgePricing?.adminControlled?"Yes":"No"}),s.jsx(h,{label:"Levels Count",value:t.surgePricing?.levels?.length||0})]}),t.surgePricing?.levels&&t.surgePricing.levels.length>0&&s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Surge Levels"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:t.surgePricing.levels.map((m,x)=>s.jsx(p,{level:m,index:x},m._id))})]})]}),s.jsxs(d,{title:"VAT Configuration",cardType:"general",children:[s.jsx(h,{label:"Enabled",value:t.vat?.enabled?"Yes":"No"}),s.jsx(h,{label:"Percentage",value:t.vat?.percentage,suffix:"%"})]}),s.jsxs(d,{title:"General Settings",cardType:"general",children:[s.jsx(h,{label:"Minimum Fare",value:t.minimumFare,suffix:" AED"}),s.jsx(h,{label:"Currency",value:t.currency}),s.jsx(h,{label:"Status",value:t.isActive?"Active":"Inactive"})]}),s.jsx(a2e,{isOpen:r,onClose:()=>a(!1),title:"Edit General Pricing Configuration",data:t,onSave:c})]})},tF=({isOpen:t,onClose:e,title:r,data:a,onSave:n,serviceType:i,loading:l=!1})=>{const[o,c]=E.useState(a||{}),[d,h]=E.useState(!1),p=qe.useRef({});qe.useEffect(()=>{t&&a&&c(a)},[t,a]),E.useCallback((k,A)=>{c(T=>{const M=k.split("."),O={...T};let _=O;for(let R=0;R<M.length-1;R++)_[M[R]]||(_[M[R]]={}),_=_[M[R]];return _[M[M.length-1]]=A,O})},[]),E.useCallback((k,A,T)=>{c(M=>{const O={...M};if(O.vehicleTypes||(O.vehicleTypes={}),O.vehicleTypes[k]||(O.vehicleTypes[k]={}),A.includes(".")){const[_,R]=A.split(".");O.vehicleTypes[k][_]||(O.vehicleTypes[k][_]={}),O.vehicleTypes[k][_][R]=T}else O.vehicleTypes[k][A]=T;return O})},[]);const m=(k,A,T,M)=>{const O=A.split(".");let _=k;for(let L=0;L<O.length-1;L++){const z=O[L];(typeof _[z]!="object"||_[z]===null||Array.isArray(_[z]))&&(_[z]={}),_=_[z]}let R=T;M==="number"?R=T===""?null:Number(T):M==="boolean"&&(R=!!T),_[O[O.length-1]]=R},x=async k=>{k.preventDefault(),h(!0);try{const A=JSON.parse(JSON.stringify(o)),T=Object.entries(p.current||{});for(const[M,O]of T)m(A,M,O.v,O.t);await n(A),Ne.success("Service configuration updated successfully!"),e()}catch(A){Ne.error("Failed to update service configuration"),console.error("Update error:",A)}finally{h(!1)}},b=(k,A,T)=>{const M=k?.vehicleTypes?.[A];if(M)return T.split(".").reduce((O,_)=>O?.[_],M)},y=({label:k,path:A,type:T="text",suffix:M="",min:O,max:_,step:R,vehicleType:L=null})=>{const z=qe.useRef(null);return s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:k}),s.jsx("input",{ref:z,type:T,defaultValue:L?b(o,L,A)??"":N(o,A)??"",onChange:F=>{const Y=L?`vehicleTypes.${L}.${A}`:A;p.current[Y]={v:F.target.value,t:T}},className:"w-full px-3 py-2 bg-[#0f3025] border border-[#2b5a46] rounded-md text-[#DDC104] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DDC104] focus:border-[#DDC104]",min:O,max:_,step:R}),M&&s.jsx("span",{className:"ml-2 text-gray-400",children:M})]})},v=({label:k,path:A,vehicleType:T=null})=>{const M=qe.useRef(null);return s.jsxs("div",{className:"mb-4 flex items-center",children:[s.jsx("input",{ref:M,type:"checkbox",defaultChecked:T?!!b(o,T,A):!!N(o,A),onChange:O=>{const _=T?`vehicleTypes.${T}.${A}`:A;p.current[_]={v:O.target.checked,t:"boolean"}},className:"mr-3 h-4 w-4 text-[#013220] focus:ring-[#DDC104] border-[#2b5a46] rounded bg-[#0f3025]"}),s.jsx("label",{className:"text-sm font-medium text-gray-300",children:k})]})},N=(k,A)=>A.split(".").reduce((T,M)=>T?.[M],k),C=({vehicleType:k,vehicleData:A})=>s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded-lg p-4",children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104] mb-4 capitalize",children:k}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(y,{label:"Base Fare",path:"baseFare",type:"number",suffix:"AED",min:"0",vehicleType:k}),s.jsx(y,{label:"Per KM Rate",path:"perKmRate",type:"number",suffix:"AED/km",min:"0",step:"0.1",vehicleType:k})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-3",children:"Night Charges"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(v,{label:"Enabled",path:"nightCharges.enabled",vehicleType:k}),s.jsx(y,{label:"Start Hour",path:"nightCharges.startHour",type:"number",suffix:":00",min:"0",max:"23",vehicleType:k}),s.jsx(y,{label:"End Hour",path:"nightCharges.endHour",type:"number",suffix:":00",min:"0",max:"23",vehicleType:k}),s.jsx(y,{label:"Fixed Amount",path:"nightCharges.fixedAmount",type:"number",suffix:"AED",min:"0",vehicleType:k}),s.jsx(y,{label:"Multiplier",path:"nightCharges.multiplier",type:"number",suffix:"x",min:"1",step:"0.1",vehicleType:k})]})]})]});if(!t)return null;const S=o.vehicleTypes||{};return s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg max-w-6xl w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex justify-between items-center p-6 border-b border-[#DDC104]",children:[s.jsx("h2",{className:"text-xl font-semibold text-[#DDC104]",children:r}),s.jsx("button",{onClick:e,className:"text-gray-400 hover:text-[#DDC104] transition-colors",children:s.jsx(Dl,{size:24})})]}),s.jsxs("form",{onSubmit:x,className:"p-6",children:[s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Service Overview"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(v,{label:"Service Enabled",path:"enabled"}),s.jsx(y,{label:"Minimum Fare",path:"minimumFare",type:"number",suffix:"AED",min:"0"}),i==="bike"&&s.jsxs(s.Fragment,{children:[s.jsx(y,{label:"Base Fare",path:"baseFare",type:"number",suffix:"AED",min:"0"}),s.jsx(y,{label:"Per KM Rate",path:"perKmRate",type:"number",suffix:"AED/km",min:"0",step:"0.1"})]})]})]}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Vehicle Types"}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:Object.entries(S).map(([k,A])=>s.jsx(C,{vehicleType:k,vehicleData:A},k))})]}),s.jsxs("div",{className:"flex justify-end gap-4 mt-8 pt-6 border-t border-gray-700",children:[s.jsx("button",{type:"button",onClick:e,className:"px-6 py-2 bg-[#0f3025] border border-[#2b5a46] text-[#DDC104] rounded-md hover:bg-[#2b5a46] transition-colors",disabled:d,children:"Cancel"}),s.jsx("button",{type:"submit",disabled:d,className:"px-6 py-2 bg-[#DDC104] text-[#013220] rounded-md hover:bg-yellow-300 transition-colors flex items-center gap-2 disabled:opacity-50",children:d?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-[#013220]"}),"Saving..."]}):s.jsxs(s.Fragment,{children:[s.jsx(kl,{size:16}),"Save Changes"]})})]})]})]})})},rF=({isOpen:t,onClose:e,vehicleType:r,vehicleData:a,onSave:n,serviceType:i})=>{const[l,o]=E.useState(a||{}),[c,d]=E.useState(!1),h=qe.useRef({});qe.useEffect(()=>{t&&a&&(o(a),h.current={})},[t,a]);const p=(v,N,C,S)=>{const k=N.split(".");let A=v;for(let M=0;M<k.length-1;M++){const O=k[M];(typeof A[O]!="object"||A[O]===null||Array.isArray(A[O]))&&(A[O]={}),A=A[O]}let T=C;S==="number"?T=C===""?null:Number(C):S==="boolean"&&(T=!!C),A[k[k.length-1]]=T},m=async v=>{v.preventDefault(),d(!0);try{const N=JSON.parse(JSON.stringify(l)),C=Object.entries(h.current||{});for(const[S,k]of C)p(N,S,k.v,k.t);await n(N),Ne.success(`${r} configuration updated successfully!`),e()}catch(N){Ne.error("Failed to update vehicle type configuration"),console.error("Update error:",N)}finally{d(!1)}},x=(v,N)=>N.split(".").reduce((C,S)=>C?.[S],v),b=({label:v,path:N,type:C="text",suffix:S="",min:k,max:A,step:T})=>{const M=qe.useRef(null);return s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:v}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("input",{ref:M,type:C,defaultValue:x(l,N)??"",onChange:O=>{h.current[N]={v:O.target.value,t:C==="number"?"number":"text"}},className:"flex-1 px-3 py-2 bg-[#0f3025] border border-[#2b5a46] rounded-md text-[#DDC104] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DDC104] focus:border-[#DDC104]",min:k,max:A,step:T}),S&&s.jsx("span",{className:"ml-2 text-gray-400 text-sm",children:S})]})]})},y=({label:v,path:N})=>{const C=qe.useRef(null);return s.jsxs("div",{className:"mb-4 flex items-center",children:[s.jsx("input",{ref:C,type:"checkbox",defaultChecked:!!x(l,N),onChange:S=>{h.current[N]={v:S.target.checked,t:"boolean"}},className:"mr-3 h-4 w-4 text-[#013220] focus:ring-[#DDC104] border-[#2b5a46] rounded bg-[#0f3025]"}),s.jsx("label",{className:"text-sm font-medium text-gray-300",children:v})]})};return t?s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg max-w-2xl w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex justify-between items-center p-6 border-b border-[#DDC104]",children:[s.jsxs("h2",{className:"text-xl font-semibold text-[#DDC104] capitalize",children:["Edit ",r," - ",i==="carCab"?"Car/Cab":"Bike"]}),s.jsx("button",{onClick:e,className:"text-gray-400 hover:text-[#DDC104] transition-colors",children:s.jsx(Dl,{size:24})})]}),s.jsxs("form",{onSubmit:m,className:"p-6",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Basic Pricing"}),s.jsx(b,{label:"Base Fare",path:"baseFare",type:"number",suffix:"AED",min:"0",step:"0.01"}),s.jsx(b,{label:"Per KM Rate",path:"perKmRate",type:"number",suffix:"AED/km",min:"0",step:"0.01"})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Night Charges"}),s.jsx(y,{label:"Enabled",path:"nightCharges.enabled"}),l.nightCharges?.enabled&&s.jsxs(s.Fragment,{children:[s.jsx(b,{label:"Start Hour",path:"nightCharges.startHour",type:"number",suffix:":00",min:"0",max:"23"}),s.jsx(b,{label:"End Hour",path:"nightCharges.endHour",type:"number",suffix:":00",min:"0",max:"23"}),s.jsx(b,{label:"Fixed Amount",path:"nightCharges.fixedAmount",type:"number",suffix:"AED",min:"0",step:"0.01"}),s.jsx(b,{label:"Multiplier",path:"nightCharges.multiplier",type:"number",suffix:"x",min:"1",step:"0.01"})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 mt-6 pt-6 border-t border-[#2b5a46]",children:[s.jsx("button",{type:"button",onClick:e,className:"px-4 py-2 bg-[#0f3025] text-gray-300 rounded-md hover:bg-[#2b5a46] transition-colors border border-[#2b5a46]",disabled:c,children:"Cancel"}),s.jsxs("button",{type:"submit",disabled:c,className:"px-4 py-2 bg-[#DDC104] text-[#013220] rounded-md hover:bg-yellow-300 transition-colors font-medium disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[s.jsx(kl,{size:18}),c?"Saving...":"Save Changes"]})]})]})]})}):null},n2e=({data:t,onDataUpdate:e})=>{const[r,a]=E.useState("economy"),[n,i]=E.useState(!1),[l,o]=E.useState(!1),[c,d]=E.useState(null),h=({disabled:A=!1,onClick:T})=>s.jsxs("button",{disabled:A,onClick:T,className:`px-3 py-1 rounded text-sm font-medium transition-colors ${A?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-[#DDC104] text-[#013220] hover:bg-yellow-300"}`,title:A?"Update functionality coming soon":"Edit configuration",children:[s.jsx(ec,{size:16,className:"inline mr-1"}),"Edit"]}),p=()=>{i(!0)},m=async A=>{try{await as.updateServiceTypePricing("carCab",A),e&&e()}catch(T){throw T}},x=(A,T)=>{d({type:A,data:T}),o(!0)},b=async A=>{try{await as.updateVehicleType("carCab",c.type,A),e&&e()}catch(T){throw T}},y=({title:A,children:T,className:M=""})=>s.jsxs("div",{className:`bg-[#013220] border border-[#DDC104] rounded-lg p-4 ${M}`,children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104]",children:A}),s.jsx(h,{onClick:p})]}),T]}),v=({label:A,value:T,suffix:M=""})=>s.jsxs("div",{className:"flex justify-between py-2 border-b border-[#2b5a46] last:border-b-0",children:[s.jsxs("span",{className:"text-gray-300",children:[A,":"]}),s.jsxs("span",{className:"text-[#DDC104] font-medium",children:[T,M]})]}),N=({vehicleType:A,vehicleData:T})=>s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded-lg p-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104] capitalize",children:A}),s.jsx(h,{onClick:()=>x(A,T)})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-2",children:"Basic Pricing"}),s.jsx(v,{label:"Base Fare",value:T.baseFare,suffix:" AED"}),s.jsx(v,{label:"Per KM Rate",value:T.perKmRate,suffix:" AED/km"})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-2",children:"Night Charges"}),s.jsx(v,{label:"Enabled",value:T.nightCharges?.enabled?"Yes":"No"}),T.nightCharges?.enabled&&s.jsxs(s.Fragment,{children:[s.jsx(v,{label:"Start Hour",value:T.nightCharges.startHour,suffix:":00"}),s.jsx(v,{label:"End Hour",value:T.nightCharges.endHour,suffix:":00"}),s.jsx(v,{label:"Fixed Amount",value:T.nightCharges.fixedAmount,suffix:" AED"}),s.jsx(v,{label:"Multiplier",value:T.nightCharges.multiplier,suffix:"x"})]})]})]})]}),C=t?.serviceTypes?.carCab,S=C?.vehicleTypes||{};if(!C)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-[#DDC104] text-lg",children:"Car/Cab pricing data not available"})});const k=Object.keys(S);return s.jsxs("div",{className:"space-y-6",children:[s.jsx(y,{title:"Car/Cab Service Overview",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(v,{label:"Service Enabled",value:C.enabled?"Yes":"No"}),s.jsx(v,{label:"Minimum Fare",value:C.minimumFare,suffix:" AED"}),s.jsx(v,{label:"Vehicle Types",value:k.length})]})}),s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg",children:[s.jsx("div",{className:"border-b border-[#DDC104]",children:s.jsx("nav",{className:"flex space-x-8 px-6",children:k.map(A=>s.jsx("button",{onClick:()=>a(A),className:`py-4 px-1 border-b-2 font-medium text-sm transition-colors ${r===A?"border-[#DDC104] text-[#DDC104]":"border-transparent text-gray-400 hover:text-gray-300 hover:border-gray-300"}`,children:A.charAt(0).toUpperCase()+A.slice(1)},A))})}),s.jsx("div",{className:"p-6",children:r&&S[r]&&s.jsx(N,{vehicleType:r,vehicleData:S[r]})})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-semibold text-[#DDC104] mb-4",children:"All Vehicle Types Overview"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:k.map(A=>s.jsx(N,{vehicleType:A,vehicleData:S[A]},A))})]}),s.jsx(tF,{isOpen:n,onClose:()=>i(!1),title:"Edit Car/Cab Pricing Configuration",data:C,onSave:m,serviceType:"carCab"}),c&&s.jsx(rF,{isOpen:l,onClose:()=>o(!1),vehicleType:c.type,vehicleData:c.data,onSave:b,serviceType:"carCab"})]})},s2e=({data:t,onDataUpdate:e})=>{const[r,a]=E.useState("economy"),[n,i]=E.useState(!1),[l,o]=E.useState(!1),[c,d]=E.useState(null),h=({disabled:A=!1,onClick:T})=>s.jsxs("button",{disabled:A,onClick:T,className:`px-3 py-1 rounded text-sm font-medium transition-colors ${A?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-[#DDC104] text-[#013220] hover:bg-yellow-300"}`,title:A?"Update functionality coming soon":"Edit configuration",children:[s.jsx(ec,{size:16,className:"inline mr-1"}),"Edit"]}),p=()=>{i(!0)},m=async A=>{try{await as.updateServiceTypePricing("bike",A),e&&e()}catch(T){throw T}},x=(A,T)=>{d({type:A,data:T}),o(!0)},b=async A=>{try{await as.updateVehicleType("bike",c.type,A),e&&e()}catch(T){throw T}},y=({title:A,children:T,className:M=""})=>s.jsxs("div",{className:`bg-[#013220] border border-[#DDC104] rounded-lg p-4 ${M}`,children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104]",children:A}),s.jsx(h,{onClick:p})]}),T]}),v=({label:A,value:T,suffix:M=""})=>s.jsxs("div",{className:"flex justify-between py-2 border-b border-[#2b5a46] last:border-b-0",children:[s.jsxs("span",{className:"text-gray-300",children:[A,":"]}),s.jsxs("span",{className:"text-[#DDC104] font-medium",children:[T,M]})]}),N=({vehicleType:A,vehicleData:T})=>s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded-lg p-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104] capitalize",children:A}),s.jsx(h,{onClick:()=>x(A,T)})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-2",children:"Basic Pricing"}),s.jsx(v,{label:"Base Fare",value:T.baseFare,suffix:" AED"}),s.jsx(v,{label:"Per KM Rate",value:T.perKmRate,suffix:" AED/km"})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-2",children:"Night Charges"}),s.jsx(v,{label:"Enabled",value:T.nightCharges?.enabled?"Yes":"No"}),T.nightCharges?.enabled&&s.jsxs(s.Fragment,{children:[s.jsx(v,{label:"Start Hour",value:T.nightCharges.startHour,suffix:":00"}),s.jsx(v,{label:"End Hour",value:T.nightCharges.endHour,suffix:":00"}),s.jsx(v,{label:"Fixed Amount",value:T.nightCharges.fixedAmount,suffix:" AED"}),s.jsx(v,{label:"Multiplier",value:T.nightCharges.multiplier,suffix:"x"})]})]})]})]}),C=t?.serviceTypes?.bike,S=C?.vehicleTypes||{};if(!C)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-[#DDC104] text-lg",children:"Bike pricing data not available"})});const k=Object.keys(S);return s.jsxs("div",{className:"space-y-6",children:[s.jsx(y,{title:"Bike Service Overview",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsx(v,{label:"Service Enabled",value:C.enabled?"Yes":"No"}),s.jsx(v,{label:"Minimum Fare",value:C.minimumFare,suffix:" AED"}),s.jsx(v,{label:"Base Fare",value:C.baseFare,suffix:" AED"}),s.jsx(v,{label:"Per KM Rate",value:C.perKmRate,suffix:" AED/km"})]})}),s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg",children:[s.jsx("div",{className:"border-b border-[#DDC104]",children:s.jsx("nav",{className:"flex space-x-8 px-6",children:k.map(A=>s.jsx("button",{onClick:()=>a(A),className:`py-4 px-1 border-b-2 font-medium text-sm transition-colors ${r===A?"border-[#DDC104] text-[#DDC104]":"border-transparent text-gray-400 hover:text-gray-300 hover:border-gray-300"}`,children:A.charAt(0).toUpperCase()+A.slice(1)},A))})}),s.jsx("div",{className:"p-6",children:r&&S[r]&&s.jsx(N,{vehicleType:r,vehicleData:S[r]})})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-xl font-semibold text-[#DDC104] mb-4",children:"All Vehicle Types Overview"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:k.map(A=>s.jsx(N,{vehicleType:A,vehicleData:S[A]},A))})]}),s.jsx(tF,{isOpen:n,onClose:()=>i(!1),title:"Edit Bike Pricing Configuration",data:C,onSave:m,serviceType:"bike"}),c&&s.jsx(rF,{isOpen:l,onClose:()=>o(!1),vehicleType:c.type,vehicleData:c.data,onSave:b,serviceType:"bike"})]})},i2e=({isOpen:t,onClose:e,title:r,data:a,onSave:n})=>{const[i,l]=E.useState(""),[o,c]=E.useState(""),[d,h]=E.useState(!1);E.useEffect(()=>{if(t)try{l(JSON.stringify(a,null,2)),c("")}catch{l("")}},[t,a]);const p=async m=>{m.preventDefault(),h(!0),c("");try{const x=JSON.parse(i);await n(x),e()}catch(x){c(x.message||"Invalid JSON")}finally{h(!1)}};return t?s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg max-w-5xl w-full max-h-[90vh] overflow-hidden",children:[s.jsxs("div",{className:"flex justify-between items-center p-4 border-b border-[#DDC104]",children:[s.jsx("h2",{className:"text-xl font-semibold text-[#DDC104]",children:r}),s.jsx("button",{onClick:e,className:"text-gray-400 hover:text-[#DDC104]",children:s.jsx(Dl,{size:24})})]}),s.jsxs("form",{onSubmit:p,className:"flex flex-col h-[70vh]",children:[s.jsx("textarea",{className:"flex-1 font-mono text-sm p-4 bg-gray-800 text-[#DDC104] outline-none border-0",value:i,onChange:m=>l(m.target.value),spellCheck:!1}),o&&s.jsx("div",{className:"px-4 py-2 text-red-400 text-sm border-t border-[#7f1d1d] bg-[#1f2937]",children:o}),s.jsxs("div",{className:"flex justify-end gap-3 p-4 border-t border-gray-700",children:[s.jsx("button",{type:"button",onClick:e,className:"px-5 py-2 bg-gray-600 text-gray-200 rounded-md hover:bg-gray-700",disabled:d,children:"Cancel"}),s.jsxs("button",{type:"submit",disabled:d,className:"px-5 py-2 bg-[#DDC104] text-[#013220] rounded-md hover:bg-yellow-300 flex items-center gap-2",children:[s.jsx(kl,{size:16})," Save"]})]})]})]})}):null},l2e=({isOpen:t,onClose:e,data:r,onSaved:a})=>{const[n,i]=E.useState({}),[l,o]=E.useState(!1),c=qe.useRef({});E.useEffect(()=>{t&&r&&i(r)},[t,r]),E.useCallback((b,y)=>{i(v=>{const N=b.split("."),C={...v};let S=C;for(let k=0;k<N.length-1;k++){const A=N[k];(typeof S[A]!="object"||S[A]==null||Array.isArray(S[A]))&&(S[A]={}),S=S[A]}return S[N[N.length-1]]=y,C})},[]);const d=b=>b.split(".").reduce((y,v)=>y?.[v],n),h=({label:b,path:y,type:v="number",step:N,min:C,max:S,suffix:k})=>{const A=qe.useRef(null);return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-gray-300 mb-1",children:b}),s.jsx("input",{ref:A,type:v,defaultValue:d(y)??"",onChange:T=>{c.current[y]={v:T.target.value,t:v}},step:N,min:C,max:S,className:"w-full px-3 py-2 bg-[#0f3025] border border-[#2b5a46] rounded text-[#DDC104] focus:outline-none focus:ring-2 focus:ring-[#DDC104] focus:border-[#DDC104]"}),k&&s.jsx("span",{className:"text-xs text-gray-400 ml-1",children:k})]})},p=({label:b,path:y})=>{const v=qe.useRef(null);return s.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[s.jsx("input",{ref:v,type:"checkbox",defaultChecked:!!d(y),onChange:N=>{c.current[y]={v:N.target.checked,t:"boolean"}},className:"h-4 w-4 text-[#013220] bg-[#0f3025] border-[#2b5a46] rounded focus:ring-[#DDC104]"}),b]})},m=(b,y,v,N)=>{const C=y.split(".");let S=b;for(let A=0;A<C.length-1;A++){const T=C[A];(typeof S[T]!="object"||S[T]===null||Array.isArray(S[T]))&&(S[T]={}),S=S[T]}let k=v;N==="number"?k=v===""?null:Number(v):N==="boolean"&&(k=!!v),S[C[C.length-1]]=k},x=async b=>{b.preventDefault(),o(!0);try{const y=JSON.parse(JSON.stringify(n)),v=Object.entries(c.current||{});for(const[N,C]of v)m(y,N,C.v,C.t);await as.updateCarRecoveryService(y),a&&a(),e()}finally{o(!1)}};return t?s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg max-w-5xl w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[#DDC104]",children:[s.jsx("h2",{className:"text-lg font-semibold text-[#DDC104]",children:"Edit Car Recovery"}),s.jsx("button",{onClick:e,className:"text-gray-400 hover:text-[#DDC104]",children:s.jsx(Dl,{size:20})})]}),s.jsxs("form",{onSubmit:x,className:"p-4 space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(p,{label:"Enabled",path:"enabled"}),s.jsx(h,{label:"Minimum Fare",path:"minimumFare"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(h,{label:"Base Fare Amount",path:"baseFare.amount"}),s.jsx(h,{label:"Base Coverage KM",path:"baseFare.coverageKm"}),s.jsx(h,{label:"Per KM after Base",path:"perKmRate.afterBaseCoverage",step:"0.1"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(p,{label:"City Adj Enabled",path:"perKmRate.cityWiseAdjustment.enabled"}),s.jsx(h,{label:"City Adj Above KM",path:"perKmRate.cityWiseAdjustment.aboveKm"}),s.jsx(h,{label:"City Adj Rate",path:"perKmRate.cityWiseAdjustment.adjustedRate",step:"0.1"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(h,{label:"Platform %",path:"platformFee.percentage",step:"0.1"}),s.jsx(h,{label:"Driver Share %",path:"platformFee.driverShare",step:"0.1"}),s.jsx(h,{label:"Customer Share %",path:"platformFee.customerShare",step:"0.1"})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Cancellation Charges"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(h,{label:"Before Arrival",path:"cancellationCharges.beforeArrival"}),s.jsx(h,{label:"After 50% Distance",path:"cancellationCharges.after50PercentDistance"}),s.jsx(h,{label:"After Arrival",path:"cancellationCharges.afterArrival"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Waiting Charges"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsx(h,{label:"Free Minutes",path:"waitingCharges.freeMinutes"}),s.jsx(h,{label:"Per Minute",path:"waitingCharges.perMinuteRate",step:"0.1"}),s.jsx(h,{label:"Max Charge",path:"waitingCharges.maximumCharge"}),s.jsx(p,{label:"Popup Enabled",path:"waitingCharges.driverControlPopup.enabled"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Night Charges"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[s.jsx(p,{label:"Enabled",path:"nightCharges.enabled"}),s.jsx(h,{label:"Start Hour",path:"nightCharges.startHour"}),s.jsx(h,{label:"End Hour",path:"nightCharges.endHour"}),s.jsx(h,{label:"Fixed Amount",path:"nightCharges.fixedAmount"}),s.jsx(h,{label:"Multiplier",path:"nightCharges.multiplier",step:"0.05"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Surge Pricing"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(p,{label:"Enabled",path:"surgePricing.enabled"}),s.jsx(p,{label:"Admin Controlled",path:"surgePricing.adminControlled"}),s.jsx(p,{label:"1.5x",path:"surgePricing.surge1_5x"})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[s.jsx("button",{type:"button",onClick:e,className:"px-5 py-2 bg-[#0f3025] border border-[#2b5a46] text-[#DDC104] rounded hover:bg-[#2b5a46]",children:"Cancel"}),s.jsxs("button",{type:"submit",disabled:l,className:"px-5 py-2 bg-[#DDC104] text-[#013220] rounded flex items-center gap-2",children:[s.jsx(kl,{size:16})," Save"]})]})]})]})}):null},o2e=({isOpen:t,onClose:e,subcategoryName:r,subcategoryData:a,onSave:n,parentService:i})=>{const[l,o]=E.useState(a||{}),[c,d]=E.useState(!1),h=qe.useRef({});qe.useEffect(()=>{t&&a&&(o(a),h.current={})},[t,a]);const p=(v,N,C,S)=>{const k=N.split(".");let A=v;for(let M=0;M<k.length-1;M++){const O=k[M];(typeof A[O]!="object"||A[O]===null||Array.isArray(A[O]))&&(A[O]={}),A=A[O]}let T=C;S==="number"?T=C===""?null:Number(C):S==="boolean"&&(T=!!C),A[k[k.length-1]]=T},m=async v=>{v.preventDefault(),d(!0);try{const N=JSON.parse(JSON.stringify(l)),C=Object.entries(h.current||{});for(const[S,k]of C)p(N,S,k.v,k.t);await n(N),Ne.success(`${r} configuration updated successfully!`),e()}catch(N){Ne.error("Failed to update subcategory configuration"),console.error("Update error:",N)}finally{d(!1)}},x=(v,N)=>N.split(".").reduce((C,S)=>C?.[S],v),b=({label:v,path:N,type:C="text",suffix:S="",min:k,max:A,step:T})=>{const M=qe.useRef(null);return s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:v}),s.jsxs("div",{className:"flex items-center",children:[s.jsx("input",{ref:M,type:C,defaultValue:x(l,N)??"",onChange:O=>{h.current[N]={v:O.target.value,t:C==="number"?"number":"text"}},className:"flex-1 px-3 py-2 bg-[#0f3025] border border-[#2b5a46] rounded-md text-[#DDC104] placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-[#DDC104] focus:border-[#DDC104]",min:k,max:A,step:T}),S&&s.jsx("span",{className:"ml-2 text-gray-400 text-sm",children:S})]})]})},y=({label:v,path:N})=>{const C=qe.useRef(null);return s.jsxs("div",{className:"mb-4 flex items-center",children:[s.jsx("input",{ref:C,type:"checkbox",defaultChecked:!!x(l,N),onChange:S=>{h.current[N]={v:S.target.checked,t:"boolean"}},className:"mr-3 h-4 w-4 text-[#013220] focus:ring-[#DDC104] border-[#2b5a46] rounded bg-[#0f3025]"}),s.jsx("label",{className:"text-sm font-medium text-gray-300",children:v})]})};return t?s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg max-w-3xl w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex justify-between items-center p-6 border-b border-[#DDC104]",children:[s.jsxs("h2",{className:"text-xl font-semibold text-[#DDC104] capitalize",children:["Edit ",r," - ",i]}),s.jsx("button",{onClick:e,className:"text-gray-400 hover:text-[#DDC104] transition-colors",children:s.jsx(Dl,{size:24})})]}),s.jsxs("form",{onSubmit:m,className:"p-6",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Basic Pricing"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(b,{label:"Base Fare Amount",path:"baseFare.amount",type:"number",suffix:"AED",min:"0",step:"0.01"}),s.jsx(b,{label:"Coverage KM",path:"baseFare.coverageKm",type:"number",suffix:"km",min:"0",step:"0.1"})]}),s.jsx(b,{label:"Per KM Rate (After Base Coverage)",path:"perKmRate.afterBaseCoverage",type:"number",suffix:"AED/km",min:"0",step:"0.01"}),l.perKmRate?.cityWiseAdjustment&&s.jsxs(s.Fragment,{children:[s.jsx(y,{label:"City Wise Adjustment Enabled",path:"perKmRate.cityWiseAdjustment.enabled"}),l.perKmRate.cityWiseAdjustment.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(b,{label:"Above KM",path:"perKmRate.cityWiseAdjustment.aboveKm",type:"number",suffix:"km",min:"0",step:"0.1"}),s.jsx(b,{label:"Adjusted Rate",path:"perKmRate.cityWiseAdjustment.adjustedRate",type:"number",suffix:"AED/km",min:"0",step:"0.01"})]})]}),s.jsx(b,{label:"Convenience Fee",path:"convenienceFee",type:"number",suffix:"AED",min:"0",step:"0.01"})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Waiting Charges"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(b,{label:"Free Minutes",path:"waitingCharges.freeMinutes",type:"number",suffix:"min",min:"0"}),s.jsx(b,{label:"Per Minute Rate",path:"waitingCharges.perMinuteRate",type:"number",suffix:"AED/min",min:"0",step:"0.01"}),s.jsx(b,{label:"Maximum Charge",path:"waitingCharges.maximumCharge",type:"number",suffix:"AED",min:"0",step:"0.01"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Night Charges"}),s.jsx(y,{label:"Enabled",path:"nightCharges.enabled"}),l.nightCharges?.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(b,{label:"Start Hour",path:"nightCharges.startHour",type:"number",suffix:":00",min:"0",max:"23"}),s.jsx(b,{label:"End Hour",path:"nightCharges.endHour",type:"number",suffix:":00",min:"0",max:"23"}),s.jsx(b,{label:"Fixed Amount",path:"nightCharges.fixedAmount",type:"number",suffix:"AED",min:"0",step:"0.01"}),s.jsx(b,{label:"Multiplier",path:"nightCharges.multiplier",type:"number",suffix:"x",min:"1",step:"0.01"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Surge Pricing"}),s.jsx(y,{label:"Enabled",path:"surgePricing.enabled"}),s.jsx(y,{label:"Admin Controlled",path:"surgePricing.adminControlled"}),l.surgePricing?.levels&&l.surgePricing.levels.length>0&&s.jsx("div",{className:"mt-4",children:s.jsxs("p",{className:"text-sm text-gray-400",children:[l.surgePricing.levels.length," surge level(s) configured"]})})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 mt-6 pt-6 border-t border-[#2b5a46]",children:[s.jsx("button",{type:"button",onClick:e,className:"px-4 py-2 bg-[#0f3025] text-gray-300 rounded-md hover:bg-[#2b5a46] transition-colors border border-[#2b5a46]",disabled:c,children:"Cancel"}),s.jsxs("button",{type:"submit",disabled:c,className:"px-4 py-2 bg-[#DDC104] text-[#013220] rounded-md hover:bg-yellow-300 transition-colors font-medium disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:[s.jsx(kl,{size:18}),c?"Saving...":"Save Changes"]})]})]})]})}):null},c2e=({data:t,onDataUpdate:e})=>{const[r,a]=E.useState("winching"),[n,i]=E.useState(!1),[l,o]=E.useState(null),c=({disabled:A=!1,onClick:T})=>s.jsxs("button",{disabled:A,onClick:T,className:`px-3 py-1 rounded text-sm font-medium transition-colors ${A?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-[#DDC104] text-[#013220] hover:bg-yellow-300"}`,title:A?"Update functionality coming soon":"Edit configuration",children:[s.jsx(ec,{size:16,className:"inline mr-1"}),"Edit"]}),[d,h]=E.useState(!1),p=(A,T,M)=>{o({name:A,data:T,parent:M}),i(!0)},m=async A=>{try{await as.updateSubcategory(l.parent,l.parent,l.name,A),e&&e()}catch(T){throw T}},x=({title:A,children:T,className:M=""})=>s.jsxs("div",{className:`bg-[#013220] border border-[#DDC104] rounded-lg p-4 ${M}`,children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104]",children:A}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(c,{onClick:()=>h(!0)}),s.jsx("button",{className:"px-3 py-1 rounded text-sm font-medium bg-[#0f3025] text-gray-200 hover:bg-[#2b5a46] border border-[#2b5a46]",title:"Edit as JSON",onClick:()=>C(!0),children:"JSON"})]})]}),T]}),b=({label:A,value:T,suffix:M=""})=>s.jsxs("div",{className:"flex justify-between py-2 border-b border-[#2b5a46] last:border-b-0",children:[s.jsxs("span",{className:"text-gray-300",children:[A,":"]}),s.jsxs("span",{className:"text-[#DDC104] font-medium",children:[T,M]})]}),y=({serviceName:A,serviceData:T,parentService:M})=>s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded-lg p-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104] capitalize",children:A}),s.jsx(c,{onClick:()=>p(A,T,M)})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-2",children:"Basic Pricing"}),s.jsx(b,{label:"Base Fare",value:T.baseFare?.amount,suffix:" AED"}),s.jsx(b,{label:"Coverage KM",value:T.baseFare?.coverageKm,suffix:" km"}),s.jsx(b,{label:"Per KM Rate",value:T.perKmRate?.afterBaseCoverage,suffix:" AED/km"}),s.jsx(b,{label:"Convenience Fee",value:T.convenienceFee,suffix:" AED"})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-2",children:"Waiting Charges"}),s.jsx(b,{label:"Free Minutes",value:T.waitingCharges?.freeMinutes,suffix:" min"}),s.jsx(b,{label:"Per Minute Rate",value:T.waitingCharges?.perMinuteRate,suffix:" AED/min"}),s.jsx(b,{label:"Maximum Charge",value:T.waitingCharges?.maximumCharge,suffix:" AED"})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-2",children:"Night Charges"}),s.jsx(b,{label:"Enabled",value:T.nightCharges?.enabled?"Yes":"No"}),T.nightCharges?.enabled&&s.jsxs(s.Fragment,{children:[s.jsx(b,{label:"Start Hour",value:T.nightCharges.startHour,suffix:":00"}),s.jsx(b,{label:"End Hour",value:T.nightCharges.endHour,suffix:":00"}),s.jsx(b,{label:"Fixed Amount",value:T.nightCharges.fixedAmount,suffix:" AED"}),s.jsx(b,{label:"Multiplier",value:T.nightCharges.multiplier,suffix:"x"})]})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-2",children:"Surge Pricing"}),s.jsx(b,{label:"Enabled",value:T.surgePricing?.enabled?"Yes":"No"}),s.jsx(b,{label:"Admin Controlled",value:T.surgePricing?.adminControlled?"Yes":"No"}),T.surgePricing?.levels&&T.surgePricing.levels.length>0&&s.jsx("div",{className:"mt-2",children:s.jsxs("span",{className:"text-xs text-gray-400",children:["Levels: ",T.surgePricing.levels.length]})})]})]})]}),v=t?.serviceTypes?.carRecovery,[N,C]=E.useState(!1),S=v?.serviceTypes||{};if(!v)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-[#DDC104] text-lg",children:"Car Recovery pricing data not available"})});const k=Object.keys(S);return s.jsxs("div",{className:"space-y-6",children:[s.jsx(x,{title:"Car Recovery Service Overview",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(b,{label:"Service Enabled",value:v.enabled?"Yes":"No"}),s.jsx(b,{label:"Minimum Fare",value:v.minimumFare,suffix:" AED"}),s.jsx(b,{label:"Service Types",value:k.length})]})}),s.jsx(x,{title:"General Car Recovery Settings",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Base Configuration"}),s.jsx(b,{label:"Base Fare",value:v.baseFare?.amount,suffix:" AED"}),s.jsx(b,{label:"Coverage KM",value:v.baseFare?.coverageKm,suffix:" km"}),s.jsx(b,{label:"Per KM Rate",value:v.perKmRate?.afterBaseCoverage,suffix:" AED/km"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Platform Fee"}),s.jsx(b,{label:"Percentage",value:v.platformFee?.percentage,suffix:"%"}),s.jsx(b,{label:"Driver Share",value:v.platformFee?.driverShare,suffix:"%"}),s.jsx(b,{label:"Customer Share",value:v.platformFee?.customerShare,suffix:"%"})]})]})}),s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg",children:[s.jsx("div",{className:"border-b border-[#DDC104]",children:s.jsx("nav",{className:"flex space-x-8 px-6",children:k.map(A=>s.jsx("button",{onClick:()=>a(A),className:`py-4 px-1 border-b-2 font-medium text-sm transition-colors ${r===A?"border-[#DDC104] text-[#DDC104]":"border-transparent text-gray-400 hover:text-gray-300 hover:border-gray-300"}`,children:A.charAt(0).toUpperCase()+A.slice(1).replace(/([A-Z])/g," $1")},A))})}),s.jsxs("div",{className:"p-6",children:[r==="winching"&&S.winching&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded-lg p-4",children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Winching Service Overview"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[s.jsx(b,{label:"Service Enabled",value:S.winching.enabled?"Yes":"No"}),s.jsx(b,{label:"Min Charges Driver Arriving",value:S.winching.minimumChargesForDriverArriving,suffix:" AED"}),s.jsx(b,{label:"Default Convenience Fee",value:S.winching.convenienceFee?.default,suffix:" AED"})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-3",children:"Convenience Fee Options"}),s.jsx("div",{className:"flex gap-2",children:S.winching.convenienceFee?.options?.map((A,T)=>s.jsxs("span",{className:"px-3 py-1 bg-[#2b5a46] rounded text-sm text-[#DDC104]",children:[A," AED"]},T))})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Winching Subcategories"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Object.entries(S.winching.subCategories||{}).map(([A,T])=>s.jsx(y,{serviceName:A,serviceData:T,parentService:"winching"},A))})]})]}),r==="roadsideAssistance"&&S.roadsideAssistance&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded-lg p-4",children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Roadside Assistance Overview"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[s.jsx(b,{label:"Service Enabled",value:S.roadsideAssistance.enabled?"Yes":"No"}),s.jsx(b,{label:"Min Charges Driver Arriving",value:S.roadsideAssistance.minimumChargesForDriverArriving,suffix:" AED"}),s.jsx(b,{label:"Default Convenience Fee",value:S.roadsideAssistance.convenienceFee?.default,suffix:" AED"})]}),s.jsxs("div",{children:[s.jsx("h5",{className:"text-sm font-medium text-gray-300 mb-3",children:"Convenience Fee Options"}),s.jsx("div",{className:"flex gap-2",children:S.roadsideAssistance.convenienceFee?.options?.map((A,T)=>s.jsxs("span",{className:"px-3 py-1 bg-[#2b5a46] rounded text-sm text-[#DDC104]",children:[A," AED"]},T))})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104] mb-4",children:"Roadside Assistance Subcategories"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:Object.entries(S.roadsideAssistance.subCategories||{}).map(([A,T])=>s.jsx(y,{serviceName:A,serviceData:T,parentService:"roadsideAssistance"},A))})]})]}),r==="keyUnlockerServices"&&S.keyUnlockerServices&&s.jsx(y,{serviceName:"Key Unlocker Services",serviceData:S.keyUnlockerServices,parentService:"keyUnlockerServices"})]})]}),s.jsx(i2e,{isOpen:N,onClose:()=>C(!1),title:"Edit Car Recovery Configuration (JSON)",data:v,onSave:async A=>{await as.updateCarRecoveryService(A),e&&e()}}),s.jsx(l2e,{isOpen:d,onClose:()=>h(!1),data:v,onSaved:e}),l&&s.jsx(o2e,{isOpen:n,onClose:()=>i(!1),subcategoryName:l.name,subcategoryData:l.data,onSave:m,parentService:l.parent})]})},d2e=({isOpen:t,onClose:e,data:r,onSaved:a})=>{const[n,i]=E.useState({}),[l,o]=E.useState(!1);qe.useRef({}),E.useEffect(()=>{t&&r&&i(r)},[t,r]);const c=E.useCallback((x,b)=>{i(y=>{const v=x.split("."),N={...y};let C=N;for(let S=0;S<v.length-1;S++){const k=v[S];(typeof C[k]!="object"||C[k]==null||Array.isArray(C[k]))&&(C[k]={}),C=C[k]}return C[v[v.length-1]]=b,N})},[]),d=x=>x.split(".").reduce((b,y)=>b?.[y],n),h=({label:x,path:b,type:y="number",step:v,min:N,max:C,suffix:S})=>{const k=qe.useRef(null);return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-gray-300 mb-1",children:x}),s.jsx("input",{ref:k,type:y,defaultValue:d(b)??"",onChange:A=>c(b,A.target.value),step:v,min:N,max:C,className:"w-full px-3 py-2 bg-[#0f3025] border border-[#2b5a46] rounded text-[#DDC104] focus:outline-none focus:ring-2 focus:ring-[#DDC104]"}),S&&s.jsx("span",{className:"text-xs text-gray-400 ml-1",children:S})]})},p=({label:x,path:b})=>{const y=qe.useRef(null);return s.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[s.jsx("input",{ref:y,type:"checkbox",defaultChecked:!!d(b),onChange:v=>c(b,v.target.checked),className:"h-4 w-4 text-[#013220] bg-[#0f3025] border-[#2b5a46] rounded focus:ring-[#DDC104]"}),x]})},m=async x=>{x.preventDefault(),o(!0);try{await as.updateShiftingMoversPricing(n),a&&a(),e()}finally{o(!1)}};return t?s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg max-w-5xl w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[#DDC104]",children:[s.jsx("h2",{className:"text-lg font-semibold text-[#DDC104]",children:"Edit Shifting & Movers"}),s.jsx("button",{onClick:e,className:"text-gray-400 hover:text-[#DDC104]",children:s.jsx(Dl,{size:20})})]}),s.jsxs("form",{onSubmit:m,className:"p-4 space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(p,{label:"Enabled",path:"enabled"}),s.jsx(h,{label:"Start Fare",path:"vehicleCost.startFare"}),s.jsx(h,{label:"Coverage KM",path:"vehicleCost.coverageKm"}),s.jsx(h,{label:"Per KM Rate",path:"vehicleCost.perKmRate",step:"0.1"})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Basic Services"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(h,{label:"Loader Flat Fee",path:"basicServices.loadingUnloadingHelper.flatFee"}),s.jsx(p,{label:"Loader In Basic",path:"basicServices.loadingUnloadingHelper.includeInBasicFare"}),s.jsx(h,{label:"Loader Base Limit",path:"basicServices.loadingUnloadingHelper.baseLimit"}),s.jsx(h,{label:"Packers Flat Fee",path:"basicServices.packers.flatFee"}),s.jsx(p,{label:"Packers In Basic",path:"basicServices.packers.includeInBasicFare"}),s.jsx(h,{label:"Packers Base Limit",path:"basicServices.packers.baseLimit"}),s.jsx(h,{label:"Fixers Flat Fee",path:"basicServices.fixers.flatFee"}),s.jsx(p,{label:"Fixers In Basic",path:"basicServices.fixers.includeInBasicFare"}),s.jsx(h,{label:"Fixers Base Limit",path:"basicServices.fixers.baseLimit"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Pickup Policy"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(h,{label:"Ground Extra",path:"pickupLocationPolicy.groundFloor.extraCharge"}),s.jsx(h,{label:"Lift Base Limit",path:"pickupLocationPolicy.lift.baseLimit"}),s.jsx(h,{label:"Lift Base Coverage",path:"pickupLocationPolicy.lift.baseCoverage",type:"text"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Dropoff Policy"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(h,{label:"Ground Extra",path:"dropoffLocationPolicy.groundFloor.extraCharge"}),s.jsx(h,{label:"Lift Base Limit",path:"dropoffLocationPolicy.lift.baseLimit"}),s.jsx(h,{label:"Lift Base Coverage",path:"dropoffLocationPolicy.lift.baseCoverage",type:"text"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(h,{label:"Packing: Bed",path:"packingFares.bed"}),s.jsx(h,{label:"Fixing: Bed",path:"fixingFares.bed"}),s.jsx(h,{label:"Loading: Bed",path:"loadingUnloadingFares.bed"})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[s.jsx("button",{type:"button",onClick:e,className:"px-5 py-2 bg-[#0f3025] border border-[#2b5a46] text-[#DDC104] rounded hover:bg-[#2b5a46]",children:"Cancel"}),s.jsxs("button",{type:"submit",disabled:l,className:"px-5 py-2 bg-[#DDC104] text-[#013220] rounded flex items-center gap-2",children:[s.jsx(kl,{size:16})," Save"]})]})]})]})}):null},u2e=({data:t,onDataUpdate:e})=>{const r=({disabled:d=!1,onClick:h})=>s.jsxs("button",{disabled:d,onClick:h,className:`px-3 py-1 rounded text-sm font-medium transition-colors ${d?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-[#DDC104] text-[#013220] hover:bg-yellow-300"}`,title:d?"Update functionality coming soon":"Edit configuration",children:[s.jsx(ec,{size:16,className:"inline mr-1"}),"Edit"]}),[a,n]=E.useState(!1),i=({title:d,children:h,className:p=""})=>s.jsxs("div",{className:`bg-[#013220] border border-[#DDC104] rounded-lg p-4 ${p}`,children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104]",children:d}),s.jsx(r,{onClick:()=>n(!0)})]}),h]}),l=({label:d,value:h,suffix:p=""})=>s.jsxs("div",{className:"flex justify-between py-2 border-b border-[#2b5a46] last:border-b-0",children:[s.jsxs("span",{className:"text-gray-300",children:[d,":"]}),s.jsxs("span",{className:"text-[#DDC104] font-medium",children:[h,p]})]}),o=({title:d,data:h,columns:p})=>s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded-lg p-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104]",children:d}),s.jsx(r,{})]}),s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{children:s.jsx("tr",{className:"border-b border-[#2b5a46]",children:p.map((m,x)=>s.jsx("th",{className:"text-left py-2 px-3 text-gray-300 font-medium",children:m},x))})}),s.jsx("tbody",{children:Object.entries(h).map(([m,x])=>s.jsxs("tr",{className:"border-b border-gray-700",children:[s.jsx("td",{className:"py-2 px-3 text-gray-300 capitalize",children:m}),s.jsxs("td",{className:"py-2 px-3 text-[#DDC104] font-medium",children:[x," AED"]})]},m))})]})})]}),c=t?.serviceTypes?.shiftingMovers;return c?s.jsxs("div",{className:"space-y-6",children:[s.jsx(i,{title:"Shifting & Movers Service Overview",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(l,{label:"Service Enabled",value:c.enabled?"Yes":"No"}),s.jsx(l,{label:"Start Fare",value:c.vehicleCost?.startFare,suffix:" AED"}),s.jsx(l,{label:"Coverage KM",value:c.vehicleCost?.coverageKm,suffix:" km"}),s.jsx(l,{label:"Per KM Rate",value:c.vehicleCost?.perKmRate,suffix:" AED/km"})]})}),s.jsx(i,{title:"Vehicle Cost Configuration",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(l,{label:"Start Fare",value:c.vehicleCost?.startFare,suffix:" AED"}),s.jsx(l,{label:"Coverage KM",value:c.vehicleCost?.coverageKm,suffix:" km"}),s.jsx(l,{label:"Per KM Rate",value:c.vehicleCost?.perKmRate,suffix:" AED/km"})]})}),s.jsx(i,{title:"Basic Services",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Loading/Unloading Helper"}),s.jsx(l,{label:"Flat Fee",value:c.basicServices?.loadingUnloadingHelper?.flatFee,suffix:" AED"}),s.jsx(l,{label:"Include in Basic Fare",value:c.basicServices?.loadingUnloadingHelper?.includeInBasicFare?"Yes":"No"}),s.jsx(l,{label:"Base Limit",value:c.basicServices?.loadingUnloadingHelper?.baseLimit})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Packers"}),s.jsx(l,{label:"Flat Fee",value:c.basicServices?.packers?.flatFee,suffix:" AED"}),s.jsx(l,{label:"Include in Basic Fare",value:c.basicServices?.packers?.includeInBasicFare?"Yes":"No"}),s.jsx(l,{label:"Base Limit",value:c.basicServices?.packers?.baseLimit})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Fixers"}),s.jsx(l,{label:"Flat Fee",value:c.basicServices?.fixers?.flatFee,suffix:" AED"}),s.jsx(l,{label:"Include in Basic Fare",value:c.basicServices?.fixers?.includeInBasicFare?"Yes":"No"}),s.jsx(l,{label:"Base Limit",value:c.basicServices?.fixers?.baseLimit})]})]})}),s.jsx(i,{title:"Pickup Location Policy",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Ground Floor"}),s.jsx(l,{label:"Extra Charge",value:c.pickupLocationPolicy?.groundFloor?.extraCharge,suffix:" AED"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Stairs"}),s.jsx("div",{className:"text-xs text-gray-400 mb-2",children:"Per Floor Fare"}),s.jsxs("div",{className:"space-y-1",children:[Object.entries(c.pickupLocationPolicy?.stairs?.perFloorFare||{}).slice(0,3).map(([d,h])=>s.jsxs("div",{className:"flex justify-between text-xs",children:[s.jsxs("span",{className:"text-gray-400 capitalize",children:[d,":"]}),s.jsxs("span",{className:"text-[#DDC104]",children:[h," AED"]})]},d)),s.jsx("div",{className:"text-xs text-gray-500",children:"... and more"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Lift"}),s.jsx(l,{label:"Base Limit",value:c.pickupLocationPolicy?.lift?.baseLimit}),s.jsx(l,{label:"Base Coverage",value:c.pickupLocationPolicy?.lift?.baseCoverage}),s.jsx("div",{className:"text-xs text-gray-400 mt-2",children:"Minor charges apply"})]})]})}),s.jsx(i,{title:"Dropoff Location Policy",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Ground Floor"}),s.jsx(l,{label:"Extra Charge",value:c.dropoffLocationPolicy?.groundFloor?.extraCharge,suffix:" AED"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Stairs"}),s.jsx("div",{className:"text-xs text-gray-400 mb-2",children:"Per Floor Fare"}),s.jsxs("div",{className:"space-y-1",children:[Object.entries(c.dropoffLocationPolicy?.stairs?.perFloorFare||{}).slice(0,3).map(([d,h])=>s.jsxs("div",{className:"flex justify-between text-xs",children:[s.jsxs("span",{className:"text-gray-400 capitalize",children:[d,":"]}),s.jsxs("span",{className:"text-[#DDC104]",children:[h," AED"]})]},d)),s.jsx("div",{className:"text-xs text-gray-500",children:"... and more"})]})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Lift"}),s.jsx(l,{label:"Base Limit",value:c.dropoffLocationPolicy?.lift?.baseLimit}),s.jsx(l,{label:"Base Coverage",value:c.dropoffLocationPolicy?.lift?.baseCoverage}),s.jsx("div",{className:"text-xs text-gray-400 mt-2",children:"Minor charges apply"})]})]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsx(o,{title:"Packing Fares",data:c.packingFares,columns:["Item","Price"]}),s.jsx(o,{title:"Fixing Fares",data:c.fixingFares,columns:["Item","Price"]}),s.jsx(o,{title:"Loading/Unloading Fares",data:c.loadingUnloadingFares,columns:["Item","Price"]})]}),s.jsx(d2e,{isOpen:a,onClose:()=>n(!1),data:c,onSaved:e})]}):s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-[#DDC104] text-lg",children:"Shifting & Movers pricing data not available"})})},h2e=({isOpen:t,onClose:e,data:r,onSaved:a})=>{const[n,i]=E.useState({}),[l,o]=E.useState(!1);qe.useRef({}),E.useEffect(()=>{t&&r&&i(r)},[t,r]);const c=E.useCallback((x,b)=>{i(y=>{const v=x.split("."),N={...y};let C=N;for(let S=0;S<v.length-1;S++){const k=v[S];(typeof C[k]!="object"||C[k]==null||Array.isArray(C[k]))&&(C[k]={}),C=C[k]}return C[v[v.length-1]]=b,N})},[]),d=x=>x.split(".").reduce((b,y)=>b?.[y],n),h=({label:x,path:b,type:y="number",step:v,min:N,max:C,suffix:S})=>{const k=qe.useRef(null);return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm text-gray-300 mb-1",children:x}),s.jsx("input",{ref:k,type:y,defaultValue:d(b)??"",onChange:A=>c(b,A.target.value),step:v,min:N,max:C,className:"w-full px-3 py-2 bg-[#0f3025] border border-[#2b5a46] rounded text-[#DDC104] focus:outline-none focus:ring-2 focus:ring-[#DDC104]"}),S&&s.jsx("span",{className:"text-xs text-gray-400 ml-1",children:S})]})},p=({label:x,path:b})=>{const y=qe.useRef(null);return s.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[s.jsx("input",{ref:y,type:"checkbox",defaultChecked:!!d(b),onChange:v=>c(b,v.target.checked),className:"h-4 w-4 text-[#013220] bg-[#0f3025] border-[#2b5a46] rounded focus:ring-[#DDC104]"}),x]})},m=async x=>{x.preventDefault(),o(!0);try{await as.updateAppointmentServices(n),a&&a(),e()}finally{o(!1)}};return t?s.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4",children:s.jsxs("div",{className:"bg-[#013220] border border-[#DDC104] rounded-lg max-w-5xl w-full max-h-[90vh] overflow-y-auto",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-[#DDC104]",children:[s.jsx("h2",{className:"text-lg font-semibold text-[#DDC104]",children:"Edit Appointment Services"}),s.jsx("button",{onClick:e,className:"text-gray-400 hover:text-[#DDC104]",children:s.jsx(Dl,{size:20})})]}),s.jsxs("form",{onSubmit:m,className:"p-4 space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(p,{label:"Enabled",path:"enabled"}),s.jsx(h,{label:"Fixed Appointment Fee",path:"fixedAppointmentFee"})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Confirmation System"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsx(p,{label:"Enabled",path:"confirmationSystem.enabled"}),s.jsx(h,{label:"Survey Timeout Hours",path:"confirmationSystem.surveyTimeoutHours"}),s.jsx(p,{label:"Auto GPS Check-In",path:"confirmationSystem.autoGpsCheckIn"}),s.jsx(h,{label:"Rating Threshold",path:"confirmationSystem.ratingThreshold"}),s.jsx(p,{label:"Dispute Enabled",path:"confirmationSystem.disputeHandling.enabled"}),s.jsx(p,{label:"Admin Review Required",path:"confirmationSystem.disputeHandling.adminReviewRequired"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Success Criteria"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(p,{label:"Both Confirm Good",path:"successCriteria.bothConfirmGood"}),s.jsx(p,{label:"One Confirms Service",path:"successCriteria.oneConfirmsService"}),s.jsx(p,{label:"No Show Both",path:"successCriteria.noShowBoth"})]})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-[#DDC104] font-semibold mb-2",children:"Penalty System"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(p,{label:"Penalty Enabled",path:"penaltySystem.enabled"}),s.jsx(h,{label:"Too Many No Shows Threshold",path:"penaltySystem.tooManyNoShows.threshold"}),s.jsx(h,{label:"Too Many No Shows Penalty",path:"penaltySystem.tooManyNoShows.penalty",type:"text"}),s.jsx(h,{label:"Bad Ratings Threshold",path:"penaltySystem.badRatings.threshold"}),s.jsx(h,{label:"Bad Ratings Consecutive Limit",path:"penaltySystem.badRatings.consecutiveLimit"}),s.jsx(h,{label:"Bad Ratings Penalty",path:"penaltySystem.badRatings.penalty",type:"text"})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[s.jsx("button",{type:"button",onClick:e,className:"px-5 py-2 bg-[#0f3025] border border-[#2b5a46] text-[#DDC104] rounded hover:bg-[#2b5a46]",children:"Cancel"}),s.jsxs("button",{type:"submit",disabled:l,className:"px-5 py-2 bg-[#DDC104] text-[#013220] rounded flex items-center gap-2",children:[s.jsx(kl,{size:16})," Save"]})]})]})]})}):null},f2e=({data:t,onDataUpdate:e})=>{const r=({disabled:d=!1,onClick:h})=>s.jsxs("button",{disabled:d,onClick:h,className:`px-3 py-1 rounded text-sm font-medium transition-colors ${d?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-[#DDC104] text-[#013220] hover:bg-yellow-300"}`,title:d?"Update functionality coming soon":"Edit configuration",children:[s.jsx(ec,{size:16,className:"inline mr-1"}),"Edit"]}),[a,n]=E.useState(!1),i=({title:d,children:h,className:p=""})=>s.jsxs("div",{className:`bg-[#013220] border border-[#DDC104] rounded-lg p-4 ${p}`,children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h3",{className:"text-lg font-semibold text-[#DDC104]",children:d}),s.jsx(r,{onClick:()=>n(!0)})]}),h]}),l=({label:d,value:h,suffix:p=""})=>s.jsxs("div",{className:"flex justify-between py-2 border-b border-[#2b5a46] last:border-b-0",children:[s.jsxs("span",{className:"text-gray-300",children:[d,":"]}),s.jsxs("span",{className:"text-[#DDC104] font-medium",children:[h,p]})]}),o=({questions:d,title:h})=>s.jsxs("div",{className:"bg-[#0f3025] border border-[#2b5a46] rounded-lg p-4",children:[s.jsxs("div",{className:"flex justify-between items-center mb-3",children:[s.jsx("h4",{className:"text-lg font-semibold text-[#DDC104]",children:h}),s.jsx(r,{})]}),d.map((p,m)=>s.jsxs("div",{className:"mb-4 last:mb-0",children:[s.jsx("div",{className:"text-sm font-medium text-gray-300 mb-2",children:p.question}),s.jsx("div",{className:"flex flex-wrap gap-2",children:p.options.map((x,b)=>s.jsx("span",{className:"px-2 py-1 bg-[#2b5a46] rounded text-xs text-[#DDC104]",children:x},b))})]},p._id||m))]}),c=t?.appointmentServices;return c?s.jsxs("div",{className:"space-y-6",children:[s.jsx(i,{title:"Appointment Services Overview",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(l,{label:"Service Enabled",value:c.enabled?"Yes":"No"}),s.jsx(l,{label:"Fixed Appointment Fee",value:c.fixedAppointmentFee,suffix:" AED"}),s.jsx(l,{label:"Penalty System Enabled",value:c.penaltySystem?.enabled?"Yes":"No"})]})}),s.jsx(i,{title:"Confirmation System",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"General Settings"}),s.jsx(l,{label:"System Enabled",value:c.confirmationSystem?.enabled?"Yes":"No"}),s.jsx(l,{label:"Survey Timeout Hours",value:c.confirmationSystem?.surveyTimeoutHours,suffix:" hrs"}),s.jsx(l,{label:"Auto GPS Check-in",value:c.confirmationSystem?.autoGpsCheckIn?"Yes":"No"}),s.jsx(l,{label:"Rating Threshold",value:c.confirmationSystem?.ratingThreshold})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Dispute Handling"}),s.jsx(l,{label:"Enabled",value:c.confirmationSystem?.disputeHandling?.enabled?"Yes":"No"}),s.jsx(l,{label:"Admin Review Required",value:c.confirmationSystem?.disputeHandling?.adminReviewRequired?"Yes":"No"})]})]})}),s.jsx(o,{title:"Customer Survey Questions",questions:c.customerSurvey?.questions||[]}),s.jsx(o,{title:"Provider Survey Questions",questions:c.providerSurvey?.questions||[]}),s.jsx(i,{title:"Success Criteria",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Confirmation Rules"}),s.jsx(l,{label:"Both Confirm Good",value:c.successCriteria?.bothConfirmGood?"Yes":"No"}),s.jsx(l,{label:"One Confirms Service",value:c.successCriteria?.oneConfirmsService?"Yes":"No"}),s.jsx(l,{label:"No Show Both",value:c.successCriteria?.noShowBoth?"Yes":"No"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Conflict Resolution"}),s.jsx(l,{label:"Method",value:c.successCriteria?.conflictResolution||"N/A"})]})]})}),s.jsx(i,{title:"Penalty System",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Too Many No Shows"}),s.jsx(l,{label:"Threshold",value:c.penaltySystem?.tooManyNoShows?.threshold}),s.jsx(l,{label:"Penalty",value:c.penaltySystem?.tooManyNoShows?.penalty||"N/A"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Bad Ratings"}),s.jsx(l,{label:"Threshold",value:c.penaltySystem?.badRatings?.threshold}),s.jsx(l,{label:"Consecutive Limit",value:c.penaltySystem?.badRatings?.consecutiveLimit}),s.jsx(l,{label:"Penalty",value:c.penaltySystem?.badRatings?.penalty||"N/A"})]})]})}),s.jsx(i,{title:"Survey Settings",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Customer Survey"}),s.jsx(l,{label:"Rating Required",value:c.customerSurvey?.ratingRequired?"Yes":"No"}),s.jsx(l,{label:"Feedback Optional",value:c.customerSurvey?.feedbackOptional?"Yes":"No"})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-300 mb-3",children:"Provider Survey"}),s.jsx(l,{label:"Rating Required",value:c.providerSurvey?.ratingRequired?"Yes":"No"}),s.jsx(l,{label:"Feedback Optional",value:c.providerSurvey?.feedbackOptional?"Yes":"No"})]})]})}),s.jsx(h2e,{isOpen:a,onClose:()=>n(!1),data:c,onSaved:e})]}):s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-[#DDC104] text-lg",children:"Appointment Services pricing data not available"})})},nd=()=>{const t=hr(),[e,r]=E.useState(null),[a,n]=E.useState(!0),[i,l]=E.useState(null);E.useEffect(()=>{o()},[]);const o=async()=>{try{n(!0),l(null);const d=await Gt.get("/admin/comprehensive-pricing/");d.data.success?r(d.data.data):l("Failed to fetch pricing data")}catch(d){console.error("Error fetching pricing data:",d),l(d.response?.data?.message||"Failed to fetch pricing data")}finally{n(!1)}},c=()=>{if(a)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-[#DDC104] text-lg",children:"Loading pricing configuration..."})});if(i)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsxs("div",{className:"text-red-400 text-lg",children:["Error: ",i]})});if(!e)return s.jsx("div",{className:"flex items-center justify-center h-64",children:s.jsx("div",{className:"text-[#DDC104] text-lg",children:"No pricing data available"})});switch(t.pathname){case"/bookingcharges":return s.jsx(SO,{data:e,onDataUpdate:o});case"/bookingcharges/carcab":return s.jsx(n2e,{data:e,onDataUpdate:o});case"/bookingcharges/bike":return s.jsx(s2e,{data:e,onDataUpdate:o});case"/bookingcharges/carrecovery":return s.jsx(c2e,{data:e,onDataUpdate:o});case"/bookingcharges/shiftingmovers":return s.jsx(u2e,{data:e,onDataUpdate:o});case"/bookingcharges/appointmentservices":return s.jsx(f2e,{data:e,onDataUpdate:o});default:return s.jsx(SO,{data:e,onDataUpdate:o})}};return s.jsxs("div",{className:"flex bg-[#013220] text-[#DDC104] min-h-screen",children:[s.jsx(Ye,{}),s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsx("div",{className:"bg-[#013220] border-b border-[#DDC104]",children:s.jsx(r2e,{})}),s.jsxs("div",{className:"flex-1 p-6",children:[e&&s.jsxs("div",{className:"mb-6 p-4 bg-[#013220] border border-[#DDC104] rounded-lg",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h1",{className:"text-2xl font-bold text-[#DDC104]",children:"Booking Charges Configuration"}),s.jsxs("div",{className:"text-sm text-gray-400",children:["Last updated: ",new Date(e.updatedAt).toLocaleString(),e.lastUpdatedBy&&s.jsxs("span",{className:"ml-2",children:["by ",e.lastUpdatedBy.email]})]})]}),s.jsxs("div",{className:"mt-2 text-sm text-gray-400",children:["Currency: ",e.currency," | Status: ",e.isActive?"Active":"Inactive"]})]}),c()]})]})]})},p2e=({children:t})=>{const e=hr(),r=e.pathname==="/livelocation"||e.pathname==="/";return s.jsxs("div",{className:"bg-[#013220] text-[#DDC104] min-h-screen",children:[!r&&s.jsx(Oq,{}),s.jsx("div",{className:"min-h-screen",children:t}),s.jsx(mR,{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"}}}})]})},m2e=()=>{const t=Fn();return E.useEffect(()=>{t(O5()),Jw.startTokenRefreshCheck();const e=setInterval(()=>{t(O5())},300*1e3);return()=>{clearInterval(e),Jw.stopTokenRefreshCheck()}},[t]),s.jsx(p2e,{children:s.jsxs(c$,{children:[s.jsx(Ae,{path:"/",element:s.jsx(Z1e,{})}),s.jsx(Ae,{path:"/home",element:s.jsx(ke,{children:s.jsx(WZ,{})})}),s.jsx(Ae,{path:"/mlm",element:s.jsx(ke,{children:s.jsx(pre,{})})}),s.jsx(Ae,{path:"/notification",element:s.jsx(ke,{children:s.jsx(dG,{})})}),s.jsx(Ae,{path:"/chatdetail",element:s.jsx(ke,{children:s.jsx(vG,{})})}),s.jsx(Ae,{path:"/dispatch",element:s.jsx(ke,{children:s.jsx(gG,{})})}),s.jsx(Ae,{path:"/livelocation",element:s.jsx(ke,{children:s.jsx(yG,{})})}),s.jsx(Ae,{path:"/customersupport",element:s.jsx(ke,{children:s.jsx(e2e,{})})}),s.jsx(Ae,{path:"/websiteuser",element:s.jsx(ke,{children:s.jsx(jZ,{})})}),s.jsx(Ae,{path:"/adminmanagement",element:s.jsx(ke,{children:s.jsx(Q1e,{})})}),s.jsx(Ae,{path:"/drivermanagement",element:s.jsx(ke,{children:s.jsx(mre,{})})}),s.jsx(Ae,{path:"/driverprofile",element:s.jsx(ke,{children:s.jsx(yre,{})})}),s.jsx(Ae,{path:"/drivermonitoring",element:s.jsx(ke,{children:s.jsx(jre,{})})}),s.jsx(Ae,{path:"/driverhistory",element:s.jsx(ke,{children:s.jsx(bG,{})})}),s.jsx(Ae,{path:"/earningandpayouts",element:s.jsx(ke,{children:s.jsx(Sre,{})})}),s.jsx(Ae,{path:"/ratings",element:s.jsx(ke,{children:s.jsx(Are,{})})}),s.jsx(Ae,{path:"/penalty",element:s.jsx(ke,{children:s.jsx(Ere,{})})}),s.jsx(Ae,{path:"/report",element:s.jsx(ke,{children:s.jsx(Rre,{})})}),s.jsx(Ae,{path:"/referraltree",element:s.jsx(ke,{children:s.jsx($re,{})})}),s.jsx(Ae,{path:"/customermanagement",element:s.jsx(ke,{children:s.jsx(wG,{})})}),s.jsx(Ae,{path:"/customerprofile",element:s.jsx(ke,{children:s.jsx(VK,{})})}),s.jsx(Ae,{path:"/customerhistory",element:s.jsx(ke,{children:s.jsx(GK,{})})}),s.jsx(Ae,{path:"/customerearningpayout",element:s.jsx(ke,{children:s.jsx(JK,{})})}),s.jsx(Ae,{path:"/customermlm",element:s.jsx(ke,{children:s.jsx(gZ,{})})}),s.jsx(Ae,{path:"/customerrating",element:s.jsx(ke,{children:s.jsx(tZ,{})})}),s.jsx(Ae,{path:"/customercomplain",element:s.jsx(ke,{children:s.jsx(wZ,{})})}),s.jsx(Ae,{path:"/customerreferraltree",element:s.jsx(ke,{children:s.jsx(K1e,{})})}),s.jsx(Ae,{path:"/proposalmanagement",element:s.jsx(ke,{children:s.jsx(SZ,{})})}),s.jsx(Ae,{path:"/agreementrecord",element:s.jsx(ke,{children:s.jsx(AZ,{})})}),s.jsx(Ae,{path:"/marketplacecontrol",element:s.jsx(ke,{children:s.jsx(MZ,{})})}),s.jsx(Ae,{path:"/overview",element:s.jsx(ke,{children:s.jsx(PZ,{})})}),s.jsx(Ae,{path:"/fraudprofile/:id",element:s.jsx(ke,{children:s.jsx(IZ,{})})}),s.jsx(Ae,{path:"/autolockRulesPanel",element:s.jsx(ke,{children:s.jsx(RZ,{})})}),s.jsx(Ae,{path:"/ruleeditorpanel",element:s.jsx(ke,{children:s.jsx(FZ,{})})}),s.jsx(Ae,{path:"/analytics",element:s.jsx(ke,{children:s.jsx(Fre,{})})}),s.jsx(Ae,{path:"/paymentoverview",element:s.jsx(ke,{children:s.jsx(Xre,{})})}),s.jsx(Ae,{path:"/walletadjustment",element:s.jsx(ke,{children:s.jsx(qre,{})})}),s.jsx(Ae,{path:"/transactions",element:s.jsx(ke,{children:s.jsx(Zre,{})})}),s.jsx(Ae,{path:"/walletfreezingrules",element:s.jsx(ke,{children:s.jsx(lle,{})})}),s.jsx(Ae,{path:"/transactionlog",element:s.jsx(ke,{children:s.jsx(ole,{})})}),s.jsx(Ae,{path:"/alertnotification",element:s.jsx(ke,{children:s.jsx(cle,{})})}),s.jsx(Ae,{path:"/unachievedpool",element:s.jsx(ke,{children:s.jsx(ble,{})})}),s.jsx(Ae,{path:"/kycverification",element:s.jsx(ke,{children:s.jsx(yle,{})})}),s.jsx(Ae,{path:"/serviceProvider",element:s.jsx(ke,{children:s.jsx(jle,{})})}),s.jsx(Ae,{path:"/serviceProviderDetail/:id",element:s.jsx(ke,{children:s.jsx(Cle,{})})}),s.jsx(Ae,{path:"/driverhiring",element:s.jsx(ke,{children:s.jsx(kle,{})})}),s.jsx(Ae,{path:"/driverhiringdetail/:id",element:s.jsx(ke,{children:s.jsx(Tle,{})})}),s.jsx(Ae,{path:"/vendorreq",element:s.jsx(ke,{children:s.jsx(Ele,{})})}),s.jsx(Ae,{path:"/drawalRequest",element:s.jsx(ke,{children:s.jsx(Ole,{})})}),s.jsx(Ae,{path:"/complainresolve",element:s.jsx(ke,{children:s.jsx(_le,{})})}),s.jsx(Ae,{path:"/complaindetail/:id",element:s.jsx(ke,{children:s.jsx(Lle,{})})}),s.jsx(Ae,{path:"/promocode",element:s.jsx(ke,{children:s.jsx(Ile,{})})}),s.jsx(Ae,{path:"/promocodedetail/:id",element:s.jsx(ke,{children:s.jsx(Ble,{})})}),s.jsx(Ae,{path:"/accountedit",element:s.jsx(ke,{children:s.jsx(Fle,{})})}),s.jsx(Ae,{path:"/reviewandrating",element:s.jsx(ke,{children:s.jsx($le,{})})}),s.jsx(Ae,{path:"/officialsandfeed",element:s.jsx(ke,{children:s.jsx(t2e,{})})}),s.jsx(Ae,{path:"/bookingcharges",element:s.jsx(ke,{children:s.jsx(nd,{})})}),s.jsx(Ae,{path:"/bookingcharges/carcab",element:s.jsx(ke,{children:s.jsx(nd,{})})}),s.jsx(Ae,{path:"/bookingcharges/bike",element:s.jsx(ke,{children:s.jsx(nd,{})})}),s.jsx(Ae,{path:"/bookingcharges/carrecovery",element:s.jsx(ke,{children:s.jsx(nd,{})})}),s.jsx(Ae,{path:"/bookingcharges/shiftingmovers",element:s.jsx(ke,{children:s.jsx(nd,{})})}),s.jsx(Ae,{path:"/bookingcharges/appointmentservices",element:s.jsx(ke,{children:s.jsx(nd,{})})}),s.jsx(Ae,{path:"/reportanalytics",element:s.jsx(ke,{children:s.jsx(Ule,{})})}),s.jsx(Ae,{path:"/driverreport",element:s.jsx(ke,{children:s.jsx(qle,{})})}),s.jsx(Ae,{path:"/rideservicereport",element:s.jsx(ke,{children:s.jsx(Jle,{})})}),s.jsx(Ae,{path:"/supportreport",element:s.jsx(ke,{children:s.jsx(j1e,{})})}),s.jsx(Ae,{path:"/earningandcommission",element:s.jsx(ke,{children:s.jsx(A1e,{})})}),s.jsx(Ae,{path:"/approvalactivities",element:s.jsx(ke,{children:s.jsx(_1e,{})})}),s.jsx(Ae,{path:"/teammlmreport",element:s.jsx(ke,{children:s.jsx(H1e,{})})}),s.jsx(Ae,{path:"/withdrawalandtransaction",element:s.jsx(ke,{children:s.jsx(W1e,{})})}),s.jsx(Ae,{path:"/customreportgenerator",element:s.jsx(ke,{children:s.jsx(X1e,{})})}),s.jsx(Ae,{path:"/customreporttable",element:s.jsx(ke,{children:s.jsx(q1e,{})})})]})})},g2e=()=>s.jsx(P$,{children:s.jsx(m2e,{})});yH.createRoot(document.getElementById("root")).render(s.jsx(E.StrictMode,{children:s.jsx(YO,{store:tn,children:s.jsx(g2e,{})})}));
