/home/awneajlw/.trash/assets.29/index-DEuFiXUs.js
function v6(e,a){for(var r=0;r<a.length;r++){const n=a[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Or(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sh={exports:{}},ko={};/**
 * @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 u2;function j6(){if(u2)return ko;u2=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(n,i,o){var c=null;if(o!==void 0&&(c=""+o),i.key!==void 0&&(c=""+i.key),"key"in i){o={};for(var m in i)m!=="key"&&(o[m]=i[m])}else o=i;return i=o.ref,{$$typeof:e,type:n,key:c,ref:i!==void 0?i:null,props:o}}return ko.Fragment=a,ko.jsx=r,ko.jsxs=r,ko}var m2;function N6(){return m2||(m2=1,Sh.exports=j6()),Sh.exports}var t=N6(),Ch={exports:{}},_e={};/**
 * @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 f2;function w6(){if(f2)return _e;f2=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),j=Symbol.iterator;function v(P){return P===null||typeof P!="object"?null:(P=j&&P[j]||P["@@iterator"],typeof P=="function"?P:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,A={};function g(P,H,ee){this.props=P,this.context=H,this.refs=A,this.updater=ee||w}g.prototype.isReactComponent={},g.prototype.setState=function(P,H){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,H,"setState")},g.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function C(){}C.prototype=g.prototype;function E(P,H,ee){this.props=P,this.context=H,this.refs=A,this.updater=ee||w}var O=E.prototype=new C;O.constructor=E,S(O,g.prototype),O.isPureReactComponent=!0;var D=Array.isArray;function B(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function R(P,H,ee){var pe=ee.ref;return{$$typeof:e,type:P,key:H,ref:pe!==void 0?pe:null,props:ee}}function z(P,H){return R(P.type,H,P.props)}function U(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function X(P){var H={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(ee){return H[ee]})}var fe=/\/+/g;function se(P,H){return typeof P=="object"&&P!==null&&P.key!=null?X(""+P.key):H.toString(36)}function ie(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(B,B):(P.status="pending",P.then(function(H){P.status==="pending"&&(P.status="fulfilled",P.value=H)},function(H){P.status==="pending"&&(P.status="rejected",P.reason=H)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function V(P,H,ee,pe,ve){var ue=typeof P;(ue==="undefined"||ue==="boolean")&&(P=null);var he=!1;if(P===null)he=!0;else switch(ue){case"bigint":case"string":case"number":he=!0;break;case"object":switch(P.$$typeof){case e:case a:he=!0;break;case p:return he=P._init,V(he(P._payload),H,ee,pe,ve)}}if(he)return ve=ve(P),he=pe===""?"."+se(P,0):pe,D(ve)?(ee="",he!=null&&(ee=he.replace(fe,"$&/")+"/"),V(ve,H,ee,"",function(xe){return xe})):ve!=null&&(U(ve)&&(ve=z(ve,ee+(ve.key==null||P&&P.key===ve.key?"":(""+ve.key).replace(fe,"$&/")+"/")+he)),H.push(ve)),1;he=0;var te=pe===""?".":pe+":";if(D(P))for(var G=0;G<P.length;G++)pe=P[G],ue=te+se(pe,G),he+=V(pe,H,ee,ue,ve);else if(G=v(P),typeof G=="function")for(P=G.call(P),G=0;!(pe=P.next()).done;)pe=pe.value,ue=te+se(pe,G++),he+=V(pe,H,ee,ue,ve);else if(ue==="object"){if(typeof P.then=="function")return V(ie(P),H,ee,pe,ve);throw H=String(P),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return he}function K(P,H,ee){if(P==null)return P;var pe=[],ve=0;return V(P,pe,"","",function(ue){return H.call(ee,ue,ve++)}),pe}function ce(P){if(P._status===-1){var H=P._result;H=H(),H.then(function(ee){(P._status===0||P._status===-1)&&(P._status=1,P._result=ee)},function(ee){(P._status===0||P._status===-1)&&(P._status=2,P._result=ee)}),P._status===-1&&(P._status=0,P._result=H)}if(P._status===1)return P._result.default;throw P._result}var $=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},I={map:K,forEach:function(P,H,ee){K(P,function(){H.apply(this,arguments)},ee)},count:function(P){var H=0;return K(P,function(){H++}),H},toArray:function(P){return K(P,function(H){return H})||[]},only:function(P){if(!U(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return _e.Activity=x,_e.Children=I,_e.Component=g,_e.Fragment=r,_e.Profiler=i,_e.PureComponent=E,_e.StrictMode=n,_e.Suspense=u,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,_e.__COMPILER_RUNTIME={__proto__:null,c:function(P){return L.H.useMemoCache(P)}},_e.cache=function(P){return function(){return P.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(P,H,ee){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var pe=S({},P.props),ve=P.key;if(H!=null)for(ue in H.key!==void 0&&(ve=""+H.key),H)!T.call(H,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&H.ref===void 0||(pe[ue]=H[ue]);var ue=arguments.length-2;if(ue===1)pe.children=ee;else if(1<ue){for(var he=Array(ue),te=0;te<ue;te++)he[te]=arguments[te+2];pe.children=he}return R(P.type,ve,pe)},_e.createContext=function(P){return P={$$typeof:c,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:o,_context:P},P},_e.createElement=function(P,H,ee){var pe,ve={},ue=null;if(H!=null)for(pe in H.key!==void 0&&(ue=""+H.key),H)T.call(H,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(ve[pe]=H[pe]);var he=arguments.length-2;if(he===1)ve.children=ee;else if(1<he){for(var te=Array(he),G=0;G<he;G++)te[G]=arguments[G+2];ve.children=te}if(P&&P.defaultProps)for(pe in he=P.defaultProps,he)ve[pe]===void 0&&(ve[pe]=he[pe]);return R(P,ue,ve)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(P){return{$$typeof:m,render:P}},_e.isValidElement=U,_e.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:ce}},_e.memo=function(P,H){return{$$typeof:h,type:P,compare:H===void 0?null:H}},_e.startTransition=function(P){var H=L.T,ee={};L.T=ee;try{var pe=P(),ve=L.S;ve!==null&&ve(ee,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(B,$)}catch(ue){$(ue)}finally{H!==null&&ee.types!==null&&(H.types=ee.types),L.T=H}},_e.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},_e.use=function(P){return L.H.use(P)},_e.useActionState=function(P,H,ee){return L.H.useActionState(P,H,ee)},_e.useCallback=function(P,H){return L.H.useCallback(P,H)},_e.useContext=function(P){return L.H.useContext(P)},_e.useDebugValue=function(){},_e.useDeferredValue=function(P,H){return L.H.useDeferredValue(P,H)},_e.useEffect=function(P,H){return L.H.useEffect(P,H)},_e.useEffectEvent=function(P){return L.H.useEffectEvent(P)},_e.useId=function(){return L.H.useId()},_e.useImperativeHandle=function(P,H,ee){return L.H.useImperativeHandle(P,H,ee)},_e.useInsertionEffect=function(P,H){return L.H.useInsertionEffect(P,H)},_e.useLayoutEffect=function(P,H){return L.H.useLayoutEffect(P,H)},_e.useMemo=function(P,H){return L.H.useMemo(P,H)},_e.useOptimistic=function(P,H){return L.H.useOptimistic(P,H)},_e.useReducer=function(P,H,ee){return L.H.useReducer(P,H,ee)},_e.useRef=function(P){return L.H.useRef(P)},_e.useState=function(P){return L.H.useState(P)},_e.useSyncExternalStore=function(P,H,ee){return L.H.useSyncExternalStore(P,H,ee)},_e.useTransition=function(){return L.H.useTransition()},_e.version="19.2.0",_e}var p2;function hi(){return p2||(p2=1,Ch.exports=w6()),Ch.exports}var b=hi();const pr=Or(b),A6=v6({__proto__:null,default:pr},[b]);var Eh={exports:{}},Oo={},kh={exports:{}},Oh={};/**
 * @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 h2;function S6(){return h2||(h2=1,(function(e){function a(V,K){var ce=V.length;V.push(K);e:for(;0<ce;){var $=ce-1>>>1,I=V[$];if(0<i(I,K))V[$]=K,V[ce]=I,ce=$;else break e}}function r(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var K=V[0],ce=V.pop();if(ce!==K){V[0]=ce;e:for(var $=0,I=V.length,P=I>>>1;$<P;){var H=2*($+1)-1,ee=V[H],pe=H+1,ve=V[pe];if(0>i(ee,ce))pe<I&&0>i(ve,ee)?(V[$]=ve,V[pe]=ce,$=pe):(V[$]=ee,V[H]=ce,$=H);else if(pe<I&&0>i(ve,ce))V[$]=ve,V[pe]=ce,$=pe;else break e}}return K}function i(V,K){var ce=V.sortIndex-K.sortIndex;return ce!==0?ce:V.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,m=c.now();e.unstable_now=function(){return c.now()-m}}var u=[],h=[],p=1,x=null,j=3,v=!1,w=!1,S=!1,A=!1,g=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function O(V){for(var K=r(h);K!==null;){if(K.callback===null)n(h);else if(K.startTime<=V)n(h),K.sortIndex=K.expirationTime,a(u,K);else break;K=r(h)}}function D(V){if(S=!1,O(V),!w)if(r(u)!==null)w=!0,B||(B=!0,X());else{var K=r(h);K!==null&&ie(D,K.startTime-V)}}var B=!1,L=-1,T=5,R=-1;function z(){return A?!0:!(e.unstable_now()-R<T)}function U(){if(A=!1,B){var V=e.unstable_now();R=V;var K=!0;try{e:{w=!1,S&&(S=!1,C(L),L=-1),v=!0;var ce=j;try{t:{for(O(V),x=r(u);x!==null&&!(x.expirationTime>V&&z());){var $=x.callback;if(typeof $=="function"){x.callback=null,j=x.priorityLevel;var I=$(x.expirationTime<=V);if(V=e.unstable_now(),typeof I=="function"){x.callback=I,O(V),K=!0;break t}x===r(u)&&n(u),O(V)}else n(u);x=r(u)}if(x!==null)K=!0;else{var P=r(h);P!==null&&ie(D,P.startTime-V),K=!1}}break e}finally{x=null,j=ce,v=!1}K=void 0}}finally{K?X():B=!1}}}var X;if(typeof E=="function")X=function(){E(U)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,se=fe.port2;fe.port1.onmessage=U,X=function(){se.postMessage(null)}}else X=function(){g(U,0)};function ie(V,K){L=g(function(){V(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function(V){switch(j){case 1:case 2:case 3:var K=3;break;default:K=j}var ce=j;j=K;try{return V()}finally{j=ce}},e.unstable_requestPaint=function(){A=!0},e.unstable_runWithPriority=function(V,K){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var ce=j;j=V;try{return K()}finally{j=ce}},e.unstable_scheduleCallback=function(V,K,ce){var $=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?$+ce:$):ce=$,V){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=ce+I,V={id:p++,callback:K,priorityLevel:V,startTime:ce,expirationTime:I,sortIndex:-1},ce>$?(V.sortIndex=ce,a(h,V),r(u)===null&&V===r(h)&&(S?(C(L),L=-1):S=!0,ie(D,ce-$))):(V.sortIndex=I,a(u,V),w||v||(w=!0,B||(B=!0,X()))),V},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(V){var K=j;return function(){var ce=j;j=K;try{return V.apply(this,arguments)}finally{j=ce}}}})(Oh)),Oh}var x2;function C6(){return x2||(x2=1,kh.exports=S6()),kh.exports}var Dh={exports:{}},ca={};/**
 * @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 g2;function E6(){if(g2)return ca;g2=1;var e=hi();function a(u){var h="https://react.dev/errors/"+u;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+u+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(u,h,p){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:x==null?null:""+x,children:u,containerInfo:h,implementation:p}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(u,h){if(u==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return ca.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,ca.createPortal=function(u,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(a(299));return o(u,h,null,p)},ca.flushSync=function(u){var h=c.T,p=n.p;try{if(c.T=null,n.p=2,u)return u()}finally{c.T=h,n.p=p,n.d.f()}},ca.preconnect=function(u,h){typeof u=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(u,h))},ca.prefetchDNS=function(u){typeof u=="string"&&n.d.D(u)},ca.preinit=function(u,h){if(typeof u=="string"&&h&&typeof h.as=="string"){var p=h.as,x=m(p,h.crossOrigin),j=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?n.d.S(u,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:j,fetchPriority:v}):p==="script"&&n.d.X(u,{crossOrigin:x,integrity:j,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},ca.preinitModule=function(u,h){if(typeof u=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=m(h.as,h.crossOrigin);n.d.M(u,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&n.d.M(u)},ca.preload=function(u,h){if(typeof u=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,x=m(p,h.crossOrigin);n.d.L(u,p,{crossOrigin:x,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},ca.preloadModule=function(u,h){if(typeof u=="string")if(h){var p=m(h.as,h.crossOrigin);n.d.m(u,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else n.d.m(u)},ca.requestFormReset=function(u){n.d.r(u)},ca.unstable_batchedUpdates=function(u,h){return u(h)},ca.useFormState=function(u,h,p){return c.H.useFormState(u,h,p)},ca.useFormStatus=function(){return c.H.useHostTransitionStatus()},ca.version="19.2.0",ca}var b2;function uC(){if(b2)return Dh.exports;b2=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Dh.exports=E6(),Dh.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 y2;function k6(){if(y2)return Oo;y2=1;var e=C6(),a=hi(),r=uC();function n(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function c(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function m(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(o(s)!==s)throw Error(n(188))}function h(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(n(188));return l!==s?null:s}for(var d=s,f=l;;){var y=d.return;if(y===null)break;var N=y.alternate;if(N===null){if(f=y.return,f!==null){d=f;continue}break}if(y.child===N.child){for(N=y.child;N;){if(N===d)return u(y),s;if(N===f)return u(y),l;N=N.sibling}throw Error(n(188))}if(d.return!==f.return)d=y,f=N;else{for(var k=!1,_=y.child;_;){if(_===d){k=!0,d=y,f=N;break}if(_===f){k=!0,f=y,d=N;break}_=_.sibling}if(!k){for(_=N.child;_;){if(_===d){k=!0,d=N,f=y;break}if(_===f){k=!0,f=N,d=y;break}_=_.sibling}if(!k)throw Error(n(189))}}if(d.alternate!==f)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?s:l}function p(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=p(s),l!==null)return l;s=s.sibling}return null}var x=Object.assign,j=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function X(s){return s===null||typeof s!="object"?null:(s=U&&s[U]||s["@@iterator"],typeof s=="function"?s:null)}var fe=Symbol.for("react.client.reference");function se(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===fe?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case S:return"Fragment";case g:return"Profiler";case A:return"StrictMode";case D:return"Suspense";case B:return"SuspenseList";case R:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case w:return"Portal";case E:return s.displayName||"Context";case C:return(s._context.displayName||"Context")+".Consumer";case O:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case L:return l=s.displayName||null,l!==null?l:se(s.type)||"Memo";case T:l=s._payload,s=s._init;try{return se(s(l))}catch{}}return null}var ie=Array.isArray,V=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},$=[],I=-1;function P(s){return{current:s}}function H(s){0>I||(s.current=$[I],$[I]=null,I--)}function ee(s,l){I++,$[I]=s.current,s.current=l}var pe=P(null),ve=P(null),ue=P(null),he=P(null);function te(s,l){switch(ee(ue,l),ee(ve,s),ee(pe,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?MN(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=MN(l),s=_N(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}H(pe),ee(pe,s)}function G(){H(pe),H(ve),H(ue)}function xe(s){s.memoizedState!==null&&ee(he,s);var l=pe.current,d=_N(l,s.type);l!==d&&(ee(ve,s),ee(pe,d))}function Ne(s){ve.current===s&&(H(pe),H(ve)),he.current===s&&(H(he),Ao._currentValue=ce)}var ne,Me;function je(s){if(ne===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);ne=l&&l[1]||"",Me=-1<d.stack.indexOf(`
    at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ne+s+Me}var ke=!1;function Ce(s,l){if(!s||ke)return"";ke=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(l){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(re){var Z=re}Reflect.construct(s,[],me)}else{try{me.call()}catch(re){Z=re}s.call(me.prototype)}}else{try{throw Error()}catch(re){Z=re}(me=s())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(re){if(re&&Z&&typeof re.stack=="string")return[re.stack,Z.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=f.DetermineComponentFrameRoot(),k=N[0],_=N[1];if(k&&_){var q=k.split(`
`),Q=_.split(`
`);for(y=f=0;f<q.length&&!q[f].includes("DetermineComponentFrameRoot");)f++;for(;y<Q.length&&!Q[y].includes("DetermineComponentFrameRoot");)y++;if(f===q.length||y===Q.length)for(f=q.length-1,y=Q.length-1;1<=f&&0<=y&&q[f]!==Q[y];)y--;for(;1<=f&&0<=y;f--,y--)if(q[f]!==Q[y]){if(f!==1||y!==1)do if(f--,y--,0>y||q[f]!==Q[y]){var oe=`
`+q[f].replace(" at new "," at ");return s.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",s.displayName)),oe}while(1<=f&&0<=y);break}}}finally{ke=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?je(d):""}function Ke(s,l){switch(s.tag){case 26:case 27:case 5:return je(s.type);case 16:return je("Lazy");case 13:return s.child!==l&&l!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Ce(s.type,!1);case 11:return Ce(s.type.render,!1);case 1:return Ce(s.type,!0);case 31:return je("Activity");default:return""}}function dt(s){try{var l="",d=null;do l+=Ke(s,d),d=s,s=s.return;while(s);return l}catch(f){return`
Error generating stack: `+f.message+`
`+f.stack}}var Zt=Object.prototype.hasOwnProperty,Qa=e.unstable_scheduleCallback,Ti=e.unstable_cancelCallback,df=e.unstable_shouldYield,uf=e.unstable_requestPaint,ye=e.unstable_now,Pe=e.unstable_getCurrentPriorityLevel,jt=e.unstable_ImmediatePriority,St=e.unstable_UserBlockingPriority,Ut=e.unstable_NormalPriority,As=e.unstable_LowPriority,Kr=e.unstable_IdlePriority,Ri=e.log,Pi=e.unstable_setDisableYieldValue,Gr=null,$t=null;function Xa(s){if(typeof Ri=="function"&&Pi(s),$t&&typeof $t.setStrictMode=="function")try{$t.setStrictMode(Gr,s)}catch{}}var ea=Math.clz32?Math.clz32:mf,Mi=Math.log,_i=Math.LN2;function mf(s){return s>>>=0,s===0?32:31-(Mi(s)/_i|0)|0}var Tc=256,Rc=262144,Pc=4194304;function Ss(s){var l=s&42;if(l!==0)return l;switch(s&-s){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:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Mc(s,l,d){var f=s.pendingLanes;if(f===0)return 0;var y=0,N=s.suspendedLanes,k=s.pingedLanes;s=s.warmLanes;var _=f&134217727;return _!==0?(f=_&~N,f!==0?y=Ss(f):(k&=_,k!==0?y=Ss(k):d||(d=_&~s,d!==0&&(y=Ss(d))))):(_=f&~N,_!==0?y=Ss(_):k!==0?y=Ss(k):d||(d=f&~s,d!==0&&(y=Ss(d)))),y===0?0:l!==0&&l!==y&&(l&N)===0&&(N=y&-y,d=l&-l,N>=d||N===32&&(d&4194048)!==0)?l:y}function zi(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function iD(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 hy(){var s=Pc;return Pc<<=1,(Pc&62914560)===0&&(Pc=4194304),s}function ff(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function Li(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function oD(s,l,d,f,y,N){var k=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var _=s.entanglements,q=s.expirationTimes,Q=s.hiddenUpdates;for(d=k&~d;0<d;){var oe=31-ea(d),me=1<<oe;_[oe]=0,q[oe]=-1;var Z=Q[oe];if(Z!==null)for(Q[oe]=null,oe=0;oe<Z.length;oe++){var re=Z[oe];re!==null&&(re.lane&=-536870913)}d&=~me}f!==0&&xy(s,f,0),N!==0&&y===0&&s.tag!==0&&(s.suspendedLanes|=N&~(k&~l))}function xy(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var f=31-ea(l);s.entangledLanes|=l,s.entanglements[f]=s.entanglements[f]|1073741824|d&261930}function gy(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var f=31-ea(d),y=1<<f;y&l|s[f]&l&&(s[f]|=l),d&=~y}}function by(s,l){var d=l&-l;return d=(d&42)!==0?1:pf(d),(d&(s.suspendedLanes|l))!==0?0:d}function pf(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function hf(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function yy(){var s=K.p;return s!==0?s:(s=window.event,s===void 0?32:n2(s.type))}function vy(s,l){var d=K.p;try{return K.p=s,l()}finally{K.p=d}}var In=Math.random().toString(36).slice(2),ta="__reactFiber$"+In,Aa="__reactProps$"+In,pl="__reactContainer$"+In,xf="__reactEvents$"+In,cD="__reactListeners$"+In,dD="__reactHandles$"+In,jy="__reactResources$"+In,Bi="__reactMarker$"+In;function gf(s){delete s[ta],delete s[Aa],delete s[xf],delete s[cD],delete s[dD]}function hl(s){var l=s[ta];if(l)return l;for(var d=s.parentNode;d;){if(l=d[pl]||d[ta]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=$N(s);s!==null;){if(d=s[ta])return d;s=$N(s)}return l}s=d,d=s.parentNode}return null}function xl(s){if(s=s[ta]||s[pl]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Ii(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(n(33))}function gl(s){var l=s[jy];return l||(l=s[jy]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function qt(s){s[Bi]=!0}var Ny=new Set,wy={};function Cs(s,l){bl(s,l),bl(s+"Capture",l)}function bl(s,l){for(wy[s]=l,s=0;s<l.length;s++)Ny.add(l[s])}var uD=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]*$"),Ay={},Sy={};function mD(s){return Zt.call(Sy,s)?!0:Zt.call(Ay,s)?!1:uD.test(s)?Sy[s]=!0:(Ay[s]=!0,!1)}function _c(s,l,d){if(mD(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var f=l.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function zc(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function Jr(s,l,d,f){if(f===null)s.removeAttribute(d);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+f)}}function Za(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Cy(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function fD(s,l,d){var f=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var y=f.get,N=f.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return y.call(this)},set:function(k){d=""+k,N.call(this,k)}}),Object.defineProperty(s,l,{enumerable:f.enumerable}),{getValue:function(){return d},setValue:function(k){d=""+k},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function bf(s){if(!s._valueTracker){var l=Cy(s)?"checked":"value";s._valueTracker=fD(s,l,""+s[l])}}function Ey(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),f="";return s&&(f=Cy(s)?s.checked?"true":"false":s.value),s=f,s!==d?(l.setValue(s),!0):!1}function Lc(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var pD=/[\n"\\]/g;function er(s){return s.replace(pD,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function yf(s,l,d,f,y,N,k,_){s.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?s.type=k:s.removeAttribute("type"),l!=null?k==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+Za(l)):s.value!==""+Za(l)&&(s.value=""+Za(l)):k!=="submit"&&k!=="reset"||s.removeAttribute("value"),l!=null?vf(s,k,Za(l)):d!=null?vf(s,k,Za(d)):f!=null&&s.removeAttribute("value"),y==null&&N!=null&&(s.defaultChecked=!!N),y!=null&&(s.checked=y&&typeof y!="function"&&typeof y!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?s.name=""+Za(_):s.removeAttribute("name")}function ky(s,l,d,f,y,N,k,_){if(N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(s.type=N),l!=null||d!=null){if(!(N!=="submit"&&N!=="reset"||l!=null)){bf(s);return}d=d!=null?""+Za(d):"",l=l!=null?""+Za(l):d,_||l===s.value||(s.value=l),s.defaultValue=l}f=f??y,f=typeof f!="function"&&typeof f!="symbol"&&!!f,s.checked=_?s.checked:!!f,s.defaultChecked=!!f,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(s.name=k),bf(s)}function vf(s,l,d){l==="number"&&Lc(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function yl(s,l,d,f){if(s=s.options,l){l={};for(var y=0;y<d.length;y++)l["$"+d[y]]=!0;for(d=0;d<s.length;d++)y=l.hasOwnProperty("$"+s[d].value),s[d].selected!==y&&(s[d].selected=y),y&&f&&(s[d].defaultSelected=!0)}else{for(d=""+Za(d),l=null,y=0;y<s.length;y++){if(s[y].value===d){s[y].selected=!0,f&&(s[y].defaultSelected=!0);return}l!==null||s[y].disabled||(l=s[y])}l!==null&&(l.selected=!0)}}function Oy(s,l,d){if(l!=null&&(l=""+Za(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+Za(d):""}function Dy(s,l,d,f){if(l==null){if(f!=null){if(d!=null)throw Error(n(92));if(ie(f)){if(1<f.length)throw Error(n(93));f=f[0]}d=f}d==null&&(d=""),l=d}d=Za(l),s.defaultValue=d,f=s.textContent,f===d&&f!==""&&f!==null&&(s.value=f),bf(s)}function vl(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var hD=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 Ty(s,l,d){var f=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?f?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":f?s.setProperty(l,d):typeof d!="number"||d===0||hD.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function Ry(s,l,d){if(l!=null&&typeof l!="object")throw Error(n(62));if(s=s.style,d!=null){for(var f in d)!d.hasOwnProperty(f)||l!=null&&l.hasOwnProperty(f)||(f.indexOf("--")===0?s.setProperty(f,""):f==="float"?s.cssFloat="":s[f]="");for(var y in l)f=l[y],l.hasOwnProperty(y)&&d[y]!==f&&Ty(s,y,f)}else for(var N in l)l.hasOwnProperty(N)&&Ty(s,N,l[N])}function jf(s){if(s.indexOf("-")===-1)return!1;switch(s){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 xD=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"]]),gD=/^[\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 Bc(s){return gD.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Wr(){}var Nf=null;function wf(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var jl=null,Nl=null;function Py(s){var l=xl(s);if(l&&(s=l.stateNode)){var d=s[Aa]||null;e:switch(s=l.stateNode,l.type){case"input":if(yf(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+er(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var f=d[l];if(f!==s&&f.form===s.form){var y=f[Aa]||null;if(!y)throw Error(n(90));yf(f,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(l=0;l<d.length;l++)f=d[l],f.form===s.form&&Ey(f)}break e;case"textarea":Oy(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&yl(s,!!d.multiple,l,!1)}}}var Af=!1;function My(s,l,d){if(Af)return s(l,d);Af=!0;try{var f=s(l);return f}finally{if(Af=!1,(jl!==null||Nl!==null)&&(Sd(),jl&&(l=jl,s=Nl,Nl=jl=null,Py(l),s)))for(l=0;l<s.length;l++)Py(s[l])}}function Fi(s,l){var d=s.stateNode;if(d===null)return null;var f=d[Aa]||null;if(f===null)return null;d=f[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(s=s.type,f=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!f;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(n(231,l,typeof d));return d}var Qr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sf=!1;if(Qr)try{var Ui={};Object.defineProperty(Ui,"passive",{get:function(){Sf=!0}}),window.addEventListener("test",Ui,Ui),window.removeEventListener("test",Ui,Ui)}catch{Sf=!1}var Fn=null,Cf=null,Ic=null;function _y(){if(Ic)return Ic;var s,l=Cf,d=l.length,f,y="value"in Fn?Fn.value:Fn.textContent,N=y.length;for(s=0;s<d&&l[s]===y[s];s++);var k=d-s;for(f=1;f<=k&&l[d-f]===y[N-f];f++);return Ic=y.slice(s,1<f?1-f:void 0)}function Fc(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function Uc(){return!0}function zy(){return!1}function Sa(s){function l(d,f,y,N,k){this._reactName=d,this._targetInst=y,this.type=f,this.nativeEvent=N,this.target=k,this.currentTarget=null;for(var _ in s)s.hasOwnProperty(_)&&(d=s[_],this[_]=d?d(N):N[_]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?Uc:zy,this.isPropagationStopped=zy,this}return x(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Uc)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Uc)},persist:function(){},isPersistent:Uc}),l}var Es={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$c=Sa(Es),$i=x({},Es,{view:0,detail:0}),bD=Sa($i),Ef,kf,qi,qc=x({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Df,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==qi&&(qi&&s.type==="mousemove"?(Ef=s.screenX-qi.screenX,kf=s.screenY-qi.screenY):kf=Ef=0,qi=s),Ef)},movementY:function(s){return"movementY"in s?s.movementY:kf}}),Ly=Sa(qc),yD=x({},qc,{dataTransfer:0}),vD=Sa(yD),jD=x({},$i,{relatedTarget:0}),Of=Sa(jD),ND=x({},Es,{animationName:0,elapsedTime:0,pseudoElement:0}),wD=Sa(ND),AD=x({},Es,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),SD=Sa(AD),CD=x({},Es,{data:0}),By=Sa(CD),ED={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kD={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"},OD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function DD(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=OD[s])?!!l[s]:!1}function Df(){return DD}var TD=x({},$i,{key:function(s){if(s.key){var l=ED[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=Fc(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?kD[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Df,charCode:function(s){return s.type==="keypress"?Fc(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Fc(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),RD=Sa(TD),PD=x({},qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Iy=Sa(PD),MD=x({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Df}),_D=Sa(MD),zD=x({},Es,{propertyName:0,elapsedTime:0,pseudoElement:0}),LD=Sa(zD),BD=x({},qc,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),ID=Sa(BD),FD=x({},Es,{newState:0,oldState:0}),UD=Sa(FD),$D=[9,13,27,32],Tf=Qr&&"CompositionEvent"in window,Hi=null;Qr&&"documentMode"in document&&(Hi=document.documentMode);var qD=Qr&&"TextEvent"in window&&!Hi,Fy=Qr&&(!Tf||Hi&&8<Hi&&11>=Hi),Uy=" ",$y=!1;function qy(s,l){switch(s){case"keyup":return $D.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hy(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var wl=!1;function HD(s,l){switch(s){case"compositionend":return Hy(l);case"keypress":return l.which!==32?null:($y=!0,Uy);case"textInput":return s=l.data,s===Uy&&$y?null:s;default:return null}}function VD(s,l){if(wl)return s==="compositionend"||!Tf&&qy(s,l)?(s=_y(),Ic=Cf=Fn=null,wl=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Fy&&l.locale!=="ko"?null:l.data;default:return null}}var YD={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 Vy(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!YD[s.type]:l==="textarea"}function Yy(s,l,d,f){jl?Nl?Nl.push(f):Nl=[f]:jl=f,l=Rd(l,"onChange"),0<l.length&&(d=new $c("onChange","change",null,d,f),s.push({event:d,listeners:l}))}var Vi=null,Yi=null;function KD(s){kN(s,0)}function Hc(s){var l=Ii(s);if(Ey(l))return s}function Ky(s,l){if(s==="change")return l}var Gy=!1;if(Qr){var Rf;if(Qr){var Pf="oninput"in document;if(!Pf){var Jy=document.createElement("div");Jy.setAttribute("oninput","return;"),Pf=typeof Jy.oninput=="function"}Rf=Pf}else Rf=!1;Gy=Rf&&(!document.documentMode||9<document.documentMode)}function Wy(){Vi&&(Vi.detachEvent("onpropertychange",Qy),Yi=Vi=null)}function Qy(s){if(s.propertyName==="value"&&Hc(Yi)){var l=[];Yy(l,Yi,s,wf(s)),My(KD,l)}}function GD(s,l,d){s==="focusin"?(Wy(),Vi=l,Yi=d,Vi.attachEvent("onpropertychange",Qy)):s==="focusout"&&Wy()}function JD(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Hc(Yi)}function WD(s,l){if(s==="click")return Hc(l)}function QD(s,l){if(s==="input"||s==="change")return Hc(l)}function XD(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var La=typeof Object.is=="function"?Object.is:XD;function Ki(s,l){if(La(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),f=Object.keys(l);if(d.length!==f.length)return!1;for(f=0;f<d.length;f++){var y=d[f];if(!Zt.call(l,y)||!La(s[y],l[y]))return!1}return!0}function Xy(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Zy(s,l){var d=Xy(s);s=0;for(var f;d;){if(d.nodeType===3){if(f=s+d.textContent.length,s<=l&&f>=l)return{node:d,offset:l-s};s=f}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=Xy(d)}}function ev(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?ev(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function tv(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Lc(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=Lc(s.document)}return l}function Mf(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var ZD=Qr&&"documentMode"in document&&11>=document.documentMode,Al=null,_f=null,Gi=null,zf=!1;function av(s,l,d){var f=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;zf||Al==null||Al!==Lc(f)||(f=Al,"selectionStart"in f&&Mf(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Gi&&Ki(Gi,f)||(Gi=f,f=Rd(_f,"onSelect"),0<f.length&&(l=new $c("onSelect","select",null,l,d),s.push({event:l,listeners:f}),l.target=Al)))}function ks(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var Sl={animationend:ks("Animation","AnimationEnd"),animationiteration:ks("Animation","AnimationIteration"),animationstart:ks("Animation","AnimationStart"),transitionrun:ks("Transition","TransitionRun"),transitionstart:ks("Transition","TransitionStart"),transitioncancel:ks("Transition","TransitionCancel"),transitionend:ks("Transition","TransitionEnd")},Lf={},rv={};Qr&&(rv=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function Os(s){if(Lf[s])return Lf[s];if(!Sl[s])return s;var l=Sl[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in rv)return Lf[s]=l[d];return s}var nv=Os("animationend"),sv=Os("animationiteration"),lv=Os("animationstart"),eT=Os("transitionrun"),tT=Os("transitionstart"),aT=Os("transitioncancel"),iv=Os("transitionend"),ov=new Map,Bf="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(" ");Bf.push("scrollEnd");function Nr(s,l){ov.set(s,l),Cs(l,[s])}var Vc=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},tr=[],Cl=0,If=0;function Yc(){for(var s=Cl,l=If=Cl=0;l<s;){var d=tr[l];tr[l++]=null;var f=tr[l];tr[l++]=null;var y=tr[l];tr[l++]=null;var N=tr[l];if(tr[l++]=null,f!==null&&y!==null){var k=f.pending;k===null?y.next=y:(y.next=k.next,k.next=y),f.pending=y}N!==0&&cv(d,y,N)}}function Kc(s,l,d,f){tr[Cl++]=s,tr[Cl++]=l,tr[Cl++]=d,tr[Cl++]=f,If|=f,s.lanes|=f,s=s.alternate,s!==null&&(s.lanes|=f)}function Ff(s,l,d,f){return Kc(s,l,d,f),Gc(s)}function Ds(s,l){return Kc(s,null,null,l),Gc(s)}function cv(s,l,d){s.lanes|=d;var f=s.alternate;f!==null&&(f.lanes|=d);for(var y=!1,N=s.return;N!==null;)N.childLanes|=d,f=N.alternate,f!==null&&(f.childLanes|=d),N.tag===22&&(s=N.stateNode,s===null||s._visibility&1||(y=!0)),s=N,N=N.return;return s.tag===3?(N=s.stateNode,y&&l!==null&&(y=31-ea(d),s=N.hiddenUpdates,f=s[y],f===null?s[y]=[l]:f.push(l),l.lane=d|536870912),N):null}function Gc(s){if(50<go)throw go=0,Jp=null,Error(n(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var El={};function rT(s,l,d,f){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ba(s,l,d,f){return new rT(s,l,d,f)}function Uf(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Xr(s,l){var d=s.alternate;return d===null?(d=Ba(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function dv(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function Jc(s,l,d,f,y,N){var k=0;if(f=s,typeof s=="function")Uf(s)&&(k=1);else if(typeof s=="string")k=o6(s,d,pe.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case R:return s=Ba(31,d,l,y),s.elementType=R,s.lanes=N,s;case S:return Ts(d.children,y,N,l);case A:k=8,y|=24;break;case g:return s=Ba(12,d,l,y|2),s.elementType=g,s.lanes=N,s;case D:return s=Ba(13,d,l,y),s.elementType=D,s.lanes=N,s;case B:return s=Ba(19,d,l,y),s.elementType=B,s.lanes=N,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case E:k=10;break e;case C:k=9;break e;case O:k=11;break e;case L:k=14;break e;case T:k=16,f=null;break e}k=29,d=Error(n(130,s===null?"null":typeof s,"")),f=null}return l=Ba(k,d,l,y),l.elementType=s,l.type=f,l.lanes=N,l}function Ts(s,l,d,f){return s=Ba(7,s,f,l),s.lanes=d,s}function $f(s,l,d){return s=Ba(6,s,null,l),s.lanes=d,s}function uv(s){var l=Ba(18,null,null,0);return l.stateNode=s,l}function qf(s,l,d){return l=Ba(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var mv=new WeakMap;function ar(s,l){if(typeof s=="object"&&s!==null){var d=mv.get(s);return d!==void 0?d:(l={value:s,source:l,stack:dt(l)},mv.set(s,l),l)}return{value:s,source:l,stack:dt(l)}}var kl=[],Ol=0,Wc=null,Ji=0,rr=[],nr=0,Un=null,Mr=1,_r="";function Zr(s,l){kl[Ol++]=Ji,kl[Ol++]=Wc,Wc=s,Ji=l}function fv(s,l,d){rr[nr++]=Mr,rr[nr++]=_r,rr[nr++]=Un,Un=s;var f=Mr;s=_r;var y=32-ea(f)-1;f&=~(1<<y),d+=1;var N=32-ea(l)+y;if(30<N){var k=y-y%5;N=(f&(1<<k)-1).toString(32),f>>=k,y-=k,Mr=1<<32-ea(l)+y|d<<y|f,_r=N+s}else Mr=1<<N|d<<y|f,_r=s}function Hf(s){s.return!==null&&(Zr(s,1),fv(s,1,0))}function Vf(s){for(;s===Wc;)Wc=kl[--Ol],kl[Ol]=null,Ji=kl[--Ol],kl[Ol]=null;for(;s===Un;)Un=rr[--nr],rr[nr]=null,_r=rr[--nr],rr[nr]=null,Mr=rr[--nr],rr[nr]=null}function pv(s,l){rr[nr++]=Mr,rr[nr++]=_r,rr[nr++]=Un,Mr=l.id,_r=l.overflow,Un=s}var aa=null,ft=null,He=!1,$n=null,sr=!1,Yf=Error(n(519));function qn(s){var l=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wi(ar(l,s)),Yf}function hv(s){var l=s.stateNode,d=s.type,f=s.memoizedProps;switch(l[ta]=s,l[Aa]=f,d){case"dialog":Ue("cancel",l),Ue("close",l);break;case"iframe":case"object":case"embed":Ue("load",l);break;case"video":case"audio":for(d=0;d<yo.length;d++)Ue(yo[d],l);break;case"source":Ue("error",l);break;case"img":case"image":case"link":Ue("error",l),Ue("load",l);break;case"details":Ue("toggle",l);break;case"input":Ue("invalid",l),ky(l,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":Ue("invalid",l);break;case"textarea":Ue("invalid",l),Dy(l,f.value,f.defaultValue,f.children)}d=f.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||f.suppressHydrationWarning===!0||RN(l.textContent,d)?(f.popover!=null&&(Ue("beforetoggle",l),Ue("toggle",l)),f.onScroll!=null&&Ue("scroll",l),f.onScrollEnd!=null&&Ue("scrollend",l),f.onClick!=null&&(l.onclick=Wr),l=!0):l=!1,l||qn(s,!0)}function xv(s){for(aa=s.return;aa;)switch(aa.tag){case 5:case 31:case 13:sr=!1;return;case 27:case 3:sr=!0;return;default:aa=aa.return}}function Dl(s){if(s!==aa)return!1;if(!He)return xv(s),He=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||dh(s.type,s.memoizedProps)),d=!d),d&&ft&&qn(s),xv(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));ft=UN(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(317));ft=UN(s)}else l===27?(l=ft,rs(s.type)?(s=hh,hh=null,ft=s):ft=l):ft=aa?ir(s.stateNode.nextSibling):null;return!0}function Rs(){ft=aa=null,He=!1}function Kf(){var s=$n;return s!==null&&(Oa===null?Oa=s:Oa.push.apply(Oa,s),$n=null),s}function Wi(s){$n===null?$n=[s]:$n.push(s)}var Gf=P(null),Ps=null,en=null;function Hn(s,l,d){ee(Gf,l._currentValue),l._currentValue=d}function tn(s){s._currentValue=Gf.current,H(Gf)}function Jf(s,l,d){for(;s!==null;){var f=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,f!==null&&(f.childLanes|=l)):f!==null&&(f.childLanes&l)!==l&&(f.childLanes|=l),s===d)break;s=s.return}}function Wf(s,l,d,f){var y=s.child;for(y!==null&&(y.return=s);y!==null;){var N=y.dependencies;if(N!==null){var k=y.child;N=N.firstContext;e:for(;N!==null;){var _=N;N=y;for(var q=0;q<l.length;q++)if(_.context===l[q]){N.lanes|=d,_=N.alternate,_!==null&&(_.lanes|=d),Jf(N.return,d,s),f||(k=null);break e}N=_.next}}else if(y.tag===18){if(k=y.return,k===null)throw Error(n(341));k.lanes|=d,N=k.alternate,N!==null&&(N.lanes|=d),Jf(k,d,s),k=null}else k=y.child;if(k!==null)k.return=y;else for(k=y;k!==null;){if(k===s){k=null;break}if(y=k.sibling,y!==null){y.return=k.return,k=y;break}k=k.return}y=k}}function Tl(s,l,d,f){s=null;for(var y=l,N=!1;y!==null;){if(!N){if((y.flags&524288)!==0)N=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var k=y.alternate;if(k===null)throw Error(n(387));if(k=k.memoizedProps,k!==null){var _=y.type;La(y.pendingProps.value,k.value)||(s!==null?s.push(_):s=[_])}}else if(y===he.current){if(k=y.alternate,k===null)throw Error(n(387));k.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(s!==null?s.push(Ao):s=[Ao])}y=y.return}s!==null&&Wf(l,s,d,f),l.flags|=262144}function Qc(s){for(s=s.firstContext;s!==null;){if(!La(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Ms(s){Ps=s,en=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function ra(s){return gv(Ps,s)}function Xc(s,l){return Ps===null&&Ms(s),gv(s,l)}function gv(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},en===null){if(s===null)throw Error(n(308));en=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else en=en.next=l;return d}var nT=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,f){s.push(f)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},sT=e.unstable_scheduleCallback,lT=e.unstable_NormalPriority,Ot={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qf(){return{controller:new nT,data:new Map,refCount:0}}function Qi(s){s.refCount--,s.refCount===0&&sT(lT,function(){s.controller.abort()})}var Xi=null,Xf=0,Rl=0,Pl=null;function iT(s,l){if(Xi===null){var d=Xi=[];Xf=0,Rl=th(),Pl={status:"pending",value:void 0,then:function(f){d.push(f)}}}return Xf++,l.then(bv,bv),l}function bv(){if(--Xf===0&&Xi!==null){Pl!==null&&(Pl.status="fulfilled");var s=Xi;Xi=null,Rl=0,Pl=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function oT(s,l){var d=[],f={status:"pending",value:null,reason:null,then:function(y){d.push(y)}};return s.then(function(){f.status="fulfilled",f.value=l;for(var y=0;y<d.length;y++)(0,d[y])(l)},function(y){for(f.status="rejected",f.reason=y,y=0;y<d.length;y++)(0,d[y])(void 0)}),f}var yv=V.S;V.S=function(s,l){aN=ye(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&iT(s,l),yv!==null&&yv(s,l)};var _s=P(null);function Zf(){var s=_s.current;return s!==null?s:it.pooledCache}function Zc(s,l){l===null?ee(_s,_s.current):ee(_s,l.pool)}function vv(){var s=Zf();return s===null?null:{parent:Ot._currentValue,pool:s}}var Ml=Error(n(460)),ep=Error(n(474)),ed=Error(n(542)),td={then:function(){}};function jv(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Nv(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(Wr,Wr),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Av(s),s;default:if(typeof l.status=="string")l.then(Wr,Wr);else{if(s=it,s!==null&&100<s.shellSuspendCounter)throw Error(n(482));s=l,s.status="pending",s.then(function(f){if(l.status==="pending"){var y=l;y.status="fulfilled",y.value=f}},function(f){if(l.status==="pending"){var y=l;y.status="rejected",y.reason=f}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Av(s),s}throw Ls=l,Ml}}function zs(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ls=d,Ml):d}}var Ls=null;function wv(){if(Ls===null)throw Error(n(459));var s=Ls;return Ls=null,s}function Av(s){if(s===Ml||s===ed)throw Error(n(483))}var _l=null,Zi=0;function ad(s){var l=Zi;return Zi+=1,_l===null&&(_l=[]),Nv(_l,s,l)}function eo(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function rd(s,l){throw l.$$typeof===j?Error(n(525)):(s=Object.prototype.toString.call(l),Error(n(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function Sv(s){function l(J,Y){if(s){var W=J.deletions;W===null?(J.deletions=[Y],J.flags|=16):W.push(Y)}}function d(J,Y){if(!s)return null;for(;Y!==null;)l(J,Y),Y=Y.sibling;return null}function f(J){for(var Y=new Map;J!==null;)J.key!==null?Y.set(J.key,J):Y.set(J.index,J),J=J.sibling;return Y}function y(J,Y){return J=Xr(J,Y),J.index=0,J.sibling=null,J}function N(J,Y,W){return J.index=W,s?(W=J.alternate,W!==null?(W=W.index,W<Y?(J.flags|=67108866,Y):W):(J.flags|=67108866,Y)):(J.flags|=1048576,Y)}function k(J){return s&&J.alternate===null&&(J.flags|=67108866),J}function _(J,Y,W,de){return Y===null||Y.tag!==6?(Y=$f(W,J.mode,de),Y.return=J,Y):(Y=y(Y,W),Y.return=J,Y)}function q(J,Y,W,de){var Oe=W.type;return Oe===S?oe(J,Y,W.props.children,de,W.key):Y!==null&&(Y.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===T&&zs(Oe)===Y.type)?(Y=y(Y,W.props),eo(Y,W),Y.return=J,Y):(Y=Jc(W.type,W.key,W.props,null,J.mode,de),eo(Y,W),Y.return=J,Y)}function Q(J,Y,W,de){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==W.containerInfo||Y.stateNode.implementation!==W.implementation?(Y=qf(W,J.mode,de),Y.return=J,Y):(Y=y(Y,W.children||[]),Y.return=J,Y)}function oe(J,Y,W,de,Oe){return Y===null||Y.tag!==7?(Y=Ts(W,J.mode,de,Oe),Y.return=J,Y):(Y=y(Y,W),Y.return=J,Y)}function me(J,Y,W){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return Y=$f(""+Y,J.mode,W),Y.return=J,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case v:return W=Jc(Y.type,Y.key,Y.props,null,J.mode,W),eo(W,Y),W.return=J,W;case w:return Y=qf(Y,J.mode,W),Y.return=J,Y;case T:return Y=zs(Y),me(J,Y,W)}if(ie(Y)||X(Y))return Y=Ts(Y,J.mode,W,null),Y.return=J,Y;if(typeof Y.then=="function")return me(J,ad(Y),W);if(Y.$$typeof===E)return me(J,Xc(J,Y),W);rd(J,Y)}return null}function Z(J,Y,W,de){var Oe=Y!==null?Y.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Oe!==null?null:_(J,Y,""+W,de);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case v:return W.key===Oe?q(J,Y,W,de):null;case w:return W.key===Oe?Q(J,Y,W,de):null;case T:return W=zs(W),Z(J,Y,W,de)}if(ie(W)||X(W))return Oe!==null?null:oe(J,Y,W,de,null);if(typeof W.then=="function")return Z(J,Y,ad(W),de);if(W.$$typeof===E)return Z(J,Y,Xc(J,W),de);rd(J,W)}return null}function re(J,Y,W,de,Oe){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return J=J.get(W)||null,_(Y,J,""+de,Oe);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case v:return J=J.get(de.key===null?W:de.key)||null,q(Y,J,de,Oe);case w:return J=J.get(de.key===null?W:de.key)||null,Q(Y,J,de,Oe);case T:return de=zs(de),re(J,Y,W,de,Oe)}if(ie(de)||X(de))return J=J.get(W)||null,oe(Y,J,de,Oe,null);if(typeof de.then=="function")return re(J,Y,W,ad(de),Oe);if(de.$$typeof===E)return re(J,Y,W,Xc(Y,de),Oe);rd(Y,de)}return null}function Se(J,Y,W,de){for(var Oe=null,Ge=null,Ee=Y,Ie=Y=0,qe=null;Ee!==null&&Ie<W.length;Ie++){Ee.index>Ie?(qe=Ee,Ee=null):qe=Ee.sibling;var Je=Z(J,Ee,W[Ie],de);if(Je===null){Ee===null&&(Ee=qe);break}s&&Ee&&Je.alternate===null&&l(J,Ee),Y=N(Je,Y,Ie),Ge===null?Oe=Je:Ge.sibling=Je,Ge=Je,Ee=qe}if(Ie===W.length)return d(J,Ee),He&&Zr(J,Ie),Oe;if(Ee===null){for(;Ie<W.length;Ie++)Ee=me(J,W[Ie],de),Ee!==null&&(Y=N(Ee,Y,Ie),Ge===null?Oe=Ee:Ge.sibling=Ee,Ge=Ee);return He&&Zr(J,Ie),Oe}for(Ee=f(Ee);Ie<W.length;Ie++)qe=re(Ee,J,Ie,W[Ie],de),qe!==null&&(s&&qe.alternate!==null&&Ee.delete(qe.key===null?Ie:qe.key),Y=N(qe,Y,Ie),Ge===null?Oe=qe:Ge.sibling=qe,Ge=qe);return s&&Ee.forEach(function(os){return l(J,os)}),He&&Zr(J,Ie),Oe}function Re(J,Y,W,de){if(W==null)throw Error(n(151));for(var Oe=null,Ge=null,Ee=Y,Ie=Y=0,qe=null,Je=W.next();Ee!==null&&!Je.done;Ie++,Je=W.next()){Ee.index>Ie?(qe=Ee,Ee=null):qe=Ee.sibling;var os=Z(J,Ee,Je.value,de);if(os===null){Ee===null&&(Ee=qe);break}s&&Ee&&os.alternate===null&&l(J,Ee),Y=N(os,Y,Ie),Ge===null?Oe=os:Ge.sibling=os,Ge=os,Ee=qe}if(Je.done)return d(J,Ee),He&&Zr(J,Ie),Oe;if(Ee===null){for(;!Je.done;Ie++,Je=W.next())Je=me(J,Je.value,de),Je!==null&&(Y=N(Je,Y,Ie),Ge===null?Oe=Je:Ge.sibling=Je,Ge=Je);return He&&Zr(J,Ie),Oe}for(Ee=f(Ee);!Je.done;Ie++,Je=W.next())Je=re(Ee,J,Ie,Je.value,de),Je!==null&&(s&&Je.alternate!==null&&Ee.delete(Je.key===null?Ie:Je.key),Y=N(Je,Y,Ie),Ge===null?Oe=Je:Ge.sibling=Je,Ge=Je);return s&&Ee.forEach(function(y6){return l(J,y6)}),He&&Zr(J,Ie),Oe}function st(J,Y,W,de){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case v:e:{for(var Oe=W.key;Y!==null;){if(Y.key===Oe){if(Oe=W.type,Oe===S){if(Y.tag===7){d(J,Y.sibling),de=y(Y,W.props.children),de.return=J,J=de;break e}}else if(Y.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===T&&zs(Oe)===Y.type){d(J,Y.sibling),de=y(Y,W.props),eo(de,W),de.return=J,J=de;break e}d(J,Y);break}else l(J,Y);Y=Y.sibling}W.type===S?(de=Ts(W.props.children,J.mode,de,W.key),de.return=J,J=de):(de=Jc(W.type,W.key,W.props,null,J.mode,de),eo(de,W),de.return=J,J=de)}return k(J);case w:e:{for(Oe=W.key;Y!==null;){if(Y.key===Oe)if(Y.tag===4&&Y.stateNode.containerInfo===W.containerInfo&&Y.stateNode.implementation===W.implementation){d(J,Y.sibling),de=y(Y,W.children||[]),de.return=J,J=de;break e}else{d(J,Y);break}else l(J,Y);Y=Y.sibling}de=qf(W,J.mode,de),de.return=J,J=de}return k(J);case T:return W=zs(W),st(J,Y,W,de)}if(ie(W))return Se(J,Y,W,de);if(X(W)){if(Oe=X(W),typeof Oe!="function")throw Error(n(150));return W=Oe.call(W),Re(J,Y,W,de)}if(typeof W.then=="function")return st(J,Y,ad(W),de);if(W.$$typeof===E)return st(J,Y,Xc(J,W),de);rd(J,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,Y!==null&&Y.tag===6?(d(J,Y.sibling),de=y(Y,W),de.return=J,J=de):(d(J,Y),de=$f(W,J.mode,de),de.return=J,J=de),k(J)):d(J,Y)}return function(J,Y,W,de){try{Zi=0;var Oe=st(J,Y,W,de);return _l=null,Oe}catch(Ee){if(Ee===Ml||Ee===ed)throw Ee;var Ge=Ba(29,Ee,null,J.mode);return Ge.lanes=de,Ge.return=J,Ge}finally{}}}var Bs=Sv(!0),Cv=Sv(!1),Vn=!1;function tp(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ap(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Yn(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Kn(s,l,d){var f=s.updateQueue;if(f===null)return null;if(f=f.shared,(Xe&2)!==0){var y=f.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),f.pending=l,l=Gc(s),cv(s,null,d),l}return Kc(s,f,l,d),Gc(s)}function to(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var f=l.lanes;f&=s.pendingLanes,d|=f,l.lanes=d,gy(s,d)}}function rp(s,l){var d=s.updateQueue,f=s.alternate;if(f!==null&&(f=f.updateQueue,d===f)){var y=null,N=null;if(d=d.firstBaseUpdate,d!==null){do{var k={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};N===null?y=N=k:N=N.next=k,d=d.next}while(d!==null);N===null?y=N=l:N=N.next=l}else y=N=l;d={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:N,shared:f.shared,callbacks:f.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var np=!1;function ao(){if(np){var s=Pl;if(s!==null)throw s}}function ro(s,l,d,f){np=!1;var y=s.updateQueue;Vn=!1;var N=y.firstBaseUpdate,k=y.lastBaseUpdate,_=y.shared.pending;if(_!==null){y.shared.pending=null;var q=_,Q=q.next;q.next=null,k===null?N=Q:k.next=Q,k=q;var oe=s.alternate;oe!==null&&(oe=oe.updateQueue,_=oe.lastBaseUpdate,_!==k&&(_===null?oe.firstBaseUpdate=Q:_.next=Q,oe.lastBaseUpdate=q))}if(N!==null){var me=y.baseState;k=0,oe=Q=q=null,_=N;do{var Z=_.lane&-536870913,re=Z!==_.lane;if(re?($e&Z)===Z:(f&Z)===Z){Z!==0&&Z===Rl&&(np=!0),oe!==null&&(oe=oe.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Se=s,Re=_;Z=l;var st=d;switch(Re.tag){case 1:if(Se=Re.payload,typeof Se=="function"){me=Se.call(st,me,Z);break e}me=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Re.payload,Z=typeof Se=="function"?Se.call(st,me,Z):Se,Z==null)break e;me=x({},me,Z);break e;case 2:Vn=!0}}Z=_.callback,Z!==null&&(s.flags|=64,re&&(s.flags|=8192),re=y.callbacks,re===null?y.callbacks=[Z]:re.push(Z))}else re={lane:Z,tag:_.tag,payload:_.payload,callback:_.callback,next:null},oe===null?(Q=oe=re,q=me):oe=oe.next=re,k|=Z;if(_=_.next,_===null){if(_=y.shared.pending,_===null)break;re=_,_=re.next,re.next=null,y.lastBaseUpdate=re,y.shared.pending=null}}while(!0);oe===null&&(q=me),y.baseState=q,y.firstBaseUpdate=Q,y.lastBaseUpdate=oe,N===null&&(y.shared.lanes=0),Xn|=k,s.lanes=k,s.memoizedState=me}}function Ev(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function kv(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)Ev(d[s],l)}var zl=P(null),nd=P(0);function Ov(s,l){s=un,ee(nd,s),ee(zl,l),un=s|l.baseLanes}function sp(){ee(nd,un),ee(zl,zl.current)}function lp(){un=nd.current,H(zl),H(nd)}var Ia=P(null),lr=null;function Gn(s){var l=s.alternate;ee(Ct,Ct.current&1),ee(Ia,s),lr===null&&(l===null||zl.current!==null||l.memoizedState!==null)&&(lr=s)}function ip(s){ee(Ct,Ct.current),ee(Ia,s),lr===null&&(lr=s)}function Dv(s){s.tag===22?(ee(Ct,Ct.current),ee(Ia,s),lr===null&&(lr=s)):Jn()}function Jn(){ee(Ct,Ct.current),ee(Ia,Ia.current)}function Fa(s){H(Ia),lr===s&&(lr=null),H(Ct)}var Ct=P(0);function sd(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||fh(d)||ph(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var an=0,Le=null,rt=null,Dt=null,ld=!1,Ll=!1,Is=!1,id=0,no=0,Bl=null,cT=0;function wt(){throw Error(n(321))}function op(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!La(s[d],l[d]))return!1;return!0}function cp(s,l,d,f,y,N){return an=N,Le=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,V.H=s===null||s.memoizedState===null?fj:Ap,Is=!1,N=d(f,y),Is=!1,Ll&&(N=Rv(l,d,f,y)),Tv(s),N}function Tv(s){V.H=io;var l=rt!==null&&rt.next!==null;if(an=0,Dt=rt=Le=null,ld=!1,no=0,Bl=null,l)throw Error(n(300));s===null||Tt||(s=s.dependencies,s!==null&&Qc(s)&&(Tt=!0))}function Rv(s,l,d,f){Le=s;var y=0;do{if(Ll&&(Bl=null),no=0,Ll=!1,25<=y)throw Error(n(301));if(y+=1,Dt=rt=null,s.updateQueue!=null){var N=s.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}V.H=pj,N=l(d,f)}while(Ll);return N}function dT(){var s=V.H,l=s.useState()[0];return l=typeof l.then=="function"?so(l):l,s=s.useState()[0],(rt!==null?rt.memoizedState:null)!==s&&(Le.flags|=1024),l}function dp(){var s=id!==0;return id=0,s}function up(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function mp(s){if(ld){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}ld=!1}an=0,Dt=rt=Le=null,Ll=!1,no=id=0,Bl=null}function ha(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?Le.memoizedState=Dt=s:Dt=Dt.next=s,Dt}function Et(){if(rt===null){var s=Le.alternate;s=s!==null?s.memoizedState:null}else s=rt.next;var l=Dt===null?Le.memoizedState:Dt.next;if(l!==null)Dt=l,rt=s;else{if(s===null)throw Le.alternate===null?Error(n(467)):Error(n(310));rt=s,s={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Dt===null?Le.memoizedState=Dt=s:Dt=Dt.next=s}return Dt}function od(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function so(s){var l=no;return no+=1,Bl===null&&(Bl=[]),s=Nv(Bl,s,l),l=Le,(Dt===null?l.memoizedState:Dt.next)===null&&(l=l.alternate,V.H=l===null||l.memoizedState===null?fj:Ap),s}function cd(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return so(s);if(s.$$typeof===E)return ra(s)}throw Error(n(438,String(s)))}function fp(s){var l=null,d=Le.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var f=Le.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(l={data:f.data.map(function(y){return y.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=od(),Le.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),f=0;f<s;f++)d[f]=z;return l.index++,d}function rn(s,l){return typeof l=="function"?l(s):l}function dd(s){var l=Et();return pp(l,rt,s)}function pp(s,l,d){var f=s.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=d;var y=s.baseQueue,N=f.pending;if(N!==null){if(y!==null){var k=y.next;y.next=N.next,N.next=k}l.baseQueue=y=N,f.pending=null}if(N=s.baseState,y===null)s.memoizedState=N;else{l=y.next;var _=k=null,q=null,Q=l,oe=!1;do{var me=Q.lane&-536870913;if(me!==Q.lane?($e&me)===me:(an&me)===me){var Z=Q.revertLane;if(Z===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),me===Rl&&(oe=!0);else if((an&Z)===Z){Q=Q.next,Z===Rl&&(oe=!0);continue}else me={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},q===null?(_=q=me,k=N):q=q.next=me,Le.lanes|=Z,Xn|=Z;me=Q.action,Is&&d(N,me),N=Q.hasEagerState?Q.eagerState:d(N,me)}else Z={lane:me,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},q===null?(_=q=Z,k=N):q=q.next=Z,Le.lanes|=me,Xn|=me;Q=Q.next}while(Q!==null&&Q!==l);if(q===null?k=N:q.next=_,!La(N,s.memoizedState)&&(Tt=!0,oe&&(d=Pl,d!==null)))throw d;s.memoizedState=N,s.baseState=k,s.baseQueue=q,f.lastRenderedState=N}return y===null&&(f.lanes=0),[s.memoizedState,f.dispatch]}function hp(s){var l=Et(),d=l.queue;if(d===null)throw Error(n(311));d.lastRenderedReducer=s;var f=d.dispatch,y=d.pending,N=l.memoizedState;if(y!==null){d.pending=null;var k=y=y.next;do N=s(N,k.action),k=k.next;while(k!==y);La(N,l.memoizedState)||(Tt=!0),l.memoizedState=N,l.baseQueue===null&&(l.baseState=N),d.lastRenderedState=N}return[N,f]}function Pv(s,l,d){var f=Le,y=Et(),N=He;if(N){if(d===void 0)throw Error(n(407));d=d()}else d=l();var k=!La((rt||y).memoizedState,d);if(k&&(y.memoizedState=d,Tt=!0),y=y.queue,bp(zv.bind(null,f,y,s),[s]),y.getSnapshot!==l||k||Dt!==null&&Dt.memoizedState.tag&1){if(f.flags|=2048,Il(9,{destroy:void 0},_v.bind(null,f,y,d,l),null),it===null)throw Error(n(349));N||(an&127)!==0||Mv(f,l,d)}return d}function Mv(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=Le.updateQueue,l===null?(l=od(),Le.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function _v(s,l,d,f){l.value=d,l.getSnapshot=f,Lv(l)&&Bv(s)}function zv(s,l,d){return d(function(){Lv(l)&&Bv(s)})}function Lv(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!La(s,d)}catch{return!0}}function Bv(s){var l=Ds(s,2);l!==null&&Da(l,s,2)}function xp(s){var l=ha();if(typeof s=="function"){var d=s;if(s=d(),Is){Xa(!0);try{d()}finally{Xa(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:s},l}function Iv(s,l,d,f){return s.baseState=d,pp(s,rt,typeof f=="function"?f:rn)}function uT(s,l,d,f,y){if(fd(s))throw Error(n(485));if(s=l.action,s!==null){var N={payload:y,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){N.listeners.push(k)}};V.T!==null?d(!0):N.isTransition=!1,f(N),d=l.pending,d===null?(N.next=l.pending=N,Fv(l,N)):(N.next=d.next,l.pending=d.next=N)}}function Fv(s,l){var d=l.action,f=l.payload,y=s.state;if(l.isTransition){var N=V.T,k={};V.T=k;try{var _=d(y,f),q=V.S;q!==null&&q(k,_),Uv(s,l,_)}catch(Q){gp(s,l,Q)}finally{N!==null&&k.types!==null&&(N.types=k.types),V.T=N}}else try{N=d(y,f),Uv(s,l,N)}catch(Q){gp(s,l,Q)}}function Uv(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(f){$v(s,l,f)},function(f){return gp(s,l,f)}):$v(s,l,d)}function $v(s,l,d){l.status="fulfilled",l.value=d,qv(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,Fv(s,d)))}function gp(s,l,d){var f=s.pending;if(s.pending=null,f!==null){f=f.next;do l.status="rejected",l.reason=d,qv(l),l=l.next;while(l!==f)}s.action=null}function qv(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function Hv(s,l){return l}function Vv(s,l){if(He){var d=it.formState;if(d!==null){e:{var f=Le;if(He){if(ft){t:{for(var y=ft,N=sr;y.nodeType!==8;){if(!N){y=null;break t}if(y=ir(y.nextSibling),y===null){y=null;break t}}N=y.data,y=N==="F!"||N==="F"?y:null}if(y){ft=ir(y.nextSibling),f=y.data==="F!";break e}}qn(f)}f=!1}f&&(l=d[0])}}return d=ha(),d.memoizedState=d.baseState=l,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hv,lastRenderedState:l},d.queue=f,d=dj.bind(null,Le,f),f.dispatch=d,f=xp(!1),N=wp.bind(null,Le,!1,f.queue),f=ha(),y={state:l,dispatch:null,action:s,pending:null},f.queue=y,d=uT.bind(null,Le,y,N,d),y.dispatch=d,f.memoizedState=s,[l,d,!1]}function Yv(s){var l=Et();return Kv(l,rt,s)}function Kv(s,l,d){if(l=pp(s,l,Hv)[0],s=dd(rn)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var f=so(l)}catch(k){throw k===Ml?ed:k}else f=l;l=Et();var y=l.queue,N=y.dispatch;return d!==l.memoizedState&&(Le.flags|=2048,Il(9,{destroy:void 0},mT.bind(null,y,d),null)),[f,N,s]}function mT(s,l){s.action=l}function Gv(s){var l=Et(),d=rt;if(d!==null)return Kv(l,d,s);Et(),l=l.memoizedState,d=Et();var f=d.queue.dispatch;return d.memoizedState=s,[l,f,!1]}function Il(s,l,d,f){return s={tag:s,create:d,deps:f,inst:l,next:null},l=Le.updateQueue,l===null&&(l=od(),Le.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(f=d.next,d.next=s,s.next=f,l.lastEffect=s),s}function Jv(){return Et().memoizedState}function ud(s,l,d,f){var y=ha();Le.flags|=s,y.memoizedState=Il(1|l,{destroy:void 0},d,f===void 0?null:f)}function md(s,l,d,f){var y=Et();f=f===void 0?null:f;var N=y.memoizedState.inst;rt!==null&&f!==null&&op(f,rt.memoizedState.deps)?y.memoizedState=Il(l,N,d,f):(Le.flags|=s,y.memoizedState=Il(1|l,N,d,f))}function Wv(s,l){ud(8390656,8,s,l)}function bp(s,l){md(2048,8,s,l)}function fT(s){Le.flags|=4;var l=Le.updateQueue;if(l===null)l=od(),Le.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function Qv(s){var l=Et().memoizedState;return fT({ref:l,nextImpl:s}),function(){if((Xe&2)!==0)throw Error(n(440));return l.impl.apply(void 0,arguments)}}function Xv(s,l){return md(4,2,s,l)}function Zv(s,l){return md(4,4,s,l)}function ej(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function tj(s,l,d){d=d!=null?d.concat([s]):null,md(4,4,ej.bind(null,l,s),d)}function yp(){}function aj(s,l){var d=Et();l=l===void 0?null:l;var f=d.memoizedState;return l!==null&&op(l,f[1])?f[0]:(d.memoizedState=[s,l],s)}function rj(s,l){var d=Et();l=l===void 0?null:l;var f=d.memoizedState;if(l!==null&&op(l,f[1]))return f[0];if(f=s(),Is){Xa(!0);try{s()}finally{Xa(!1)}}return d.memoizedState=[f,l],f}function vp(s,l,d){return d===void 0||(an&1073741824)!==0&&($e&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=nN(),Le.lanes|=s,Xn|=s,d)}function nj(s,l,d,f){return La(d,l)?d:zl.current!==null?(s=vp(s,d,f),La(s,l)||(Tt=!0),s):(an&42)===0||(an&1073741824)!==0&&($e&261930)===0?(Tt=!0,s.memoizedState=d):(s=nN(),Le.lanes|=s,Xn|=s,l)}function sj(s,l,d,f,y){var N=K.p;K.p=N!==0&&8>N?N:8;var k=V.T,_={};V.T=_,wp(s,!1,l,d);try{var q=y(),Q=V.S;if(Q!==null&&Q(_,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var oe=oT(q,f);lo(s,l,oe,qa(s))}else lo(s,l,f,qa(s))}catch(me){lo(s,l,{then:function(){},status:"rejected",reason:me},qa())}finally{K.p=N,k!==null&&_.types!==null&&(k.types=_.types),V.T=k}}function pT(){}function jp(s,l,d,f){if(s.tag!==5)throw Error(n(476));var y=lj(s).queue;sj(s,y,l,ce,d===null?pT:function(){return ij(s),d(f)})}function lj(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:ce},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rn,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function ij(s){var l=lj(s);l.next===null&&(l=s.alternate.memoizedState),lo(s,l.next.queue,{},qa())}function Np(){return ra(Ao)}function oj(){return Et().memoizedState}function cj(){return Et().memoizedState}function hT(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=qa();s=Yn(d);var f=Kn(l,s,d);f!==null&&(Da(f,l,d),to(f,l,d)),l={cache:Qf()},s.payload=l;return}l=l.return}}function xT(s,l,d){var f=qa();d={lane:f,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},fd(s)?uj(l,d):(d=Ff(s,l,d,f),d!==null&&(Da(d,s,f),mj(d,l,f)))}function dj(s,l,d){var f=qa();lo(s,l,d,f)}function lo(s,l,d,f){var y={lane:f,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(fd(s))uj(l,y);else{var N=s.alternate;if(s.lanes===0&&(N===null||N.lanes===0)&&(N=l.lastRenderedReducer,N!==null))try{var k=l.lastRenderedState,_=N(k,d);if(y.hasEagerState=!0,y.eagerState=_,La(_,k))return Kc(s,l,y,0),it===null&&Yc(),!1}catch{}finally{}if(d=Ff(s,l,y,f),d!==null)return Da(d,s,f),mj(d,l,f),!0}return!1}function wp(s,l,d,f){if(f={lane:2,revertLane:th(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},fd(s)){if(l)throw Error(n(479))}else l=Ff(s,d,f,2),l!==null&&Da(l,s,2)}function fd(s){var l=s.alternate;return s===Le||l!==null&&l===Le}function uj(s,l){Ll=ld=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function mj(s,l,d){if((d&4194048)!==0){var f=l.lanes;f&=s.pendingLanes,d|=f,l.lanes=d,gy(s,d)}}var io={readContext:ra,use:cd,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};io.useEffectEvent=wt;var fj={readContext:ra,use:cd,useCallback:function(s,l){return ha().memoizedState=[s,l===void 0?null:l],s},useContext:ra,useEffect:Wv,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,ud(4194308,4,ej.bind(null,l,s),d)},useLayoutEffect:function(s,l){return ud(4194308,4,s,l)},useInsertionEffect:function(s,l){ud(4,2,s,l)},useMemo:function(s,l){var d=ha();l=l===void 0?null:l;var f=s();if(Is){Xa(!0);try{s()}finally{Xa(!1)}}return d.memoizedState=[f,l],f},useReducer:function(s,l,d){var f=ha();if(d!==void 0){var y=d(l);if(Is){Xa(!0);try{d(l)}finally{Xa(!1)}}}else y=l;return f.memoizedState=f.baseState=y,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:y},f.queue=s,s=s.dispatch=xT.bind(null,Le,s),[f.memoizedState,s]},useRef:function(s){var l=ha();return s={current:s},l.memoizedState=s},useState:function(s){s=xp(s);var l=s.queue,d=dj.bind(null,Le,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:yp,useDeferredValue:function(s,l){var d=ha();return vp(d,s,l)},useTransition:function(){var s=xp(!1);return s=sj.bind(null,Le,s.queue,!0,!1),ha().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var f=Le,y=ha();if(He){if(d===void 0)throw Error(n(407));d=d()}else{if(d=l(),it===null)throw Error(n(349));($e&127)!==0||Mv(f,l,d)}y.memoizedState=d;var N={value:d,getSnapshot:l};return y.queue=N,Wv(zv.bind(null,f,N,s),[s]),f.flags|=2048,Il(9,{destroy:void 0},_v.bind(null,f,N,d,l),null),d},useId:function(){var s=ha(),l=it.identifierPrefix;if(He){var d=_r,f=Mr;d=(f&~(1<<32-ea(f)-1)).toString(32)+d,l="_"+l+"R_"+d,d=id++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=cT++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Np,useFormState:Vv,useActionState:Vv,useOptimistic:function(s){var l=ha();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=wp.bind(null,Le,!0,d),d.dispatch=l,[s,l]},useMemoCache:fp,useCacheRefresh:function(){return ha().memoizedState=hT.bind(null,Le)},useEffectEvent:function(s){var l=ha(),d={impl:s};return l.memoizedState=d,function(){if((Xe&2)!==0)throw Error(n(440));return d.impl.apply(void 0,arguments)}}},Ap={readContext:ra,use:cd,useCallback:aj,useContext:ra,useEffect:bp,useImperativeHandle:tj,useInsertionEffect:Xv,useLayoutEffect:Zv,useMemo:rj,useReducer:dd,useRef:Jv,useState:function(){return dd(rn)},useDebugValue:yp,useDeferredValue:function(s,l){var d=Et();return nj(d,rt.memoizedState,s,l)},useTransition:function(){var s=dd(rn)[0],l=Et().memoizedState;return[typeof s=="boolean"?s:so(s),l]},useSyncExternalStore:Pv,useId:oj,useHostTransitionStatus:Np,useFormState:Yv,useActionState:Yv,useOptimistic:function(s,l){var d=Et();return Iv(d,rt,s,l)},useMemoCache:fp,useCacheRefresh:cj};Ap.useEffectEvent=Qv;var pj={readContext:ra,use:cd,useCallback:aj,useContext:ra,useEffect:bp,useImperativeHandle:tj,useInsertionEffect:Xv,useLayoutEffect:Zv,useMemo:rj,useReducer:hp,useRef:Jv,useState:function(){return hp(rn)},useDebugValue:yp,useDeferredValue:function(s,l){var d=Et();return rt===null?vp(d,s,l):nj(d,rt.memoizedState,s,l)},useTransition:function(){var s=hp(rn)[0],l=Et().memoizedState;return[typeof s=="boolean"?s:so(s),l]},useSyncExternalStore:Pv,useId:oj,useHostTransitionStatus:Np,useFormState:Gv,useActionState:Gv,useOptimistic:function(s,l){var d=Et();return rt!==null?Iv(d,rt,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:fp,useCacheRefresh:cj};pj.useEffectEvent=Qv;function Sp(s,l,d,f){l=s.memoizedState,d=d(f,l),d=d==null?l:x({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var Cp={enqueueSetState:function(s,l,d){s=s._reactInternals;var f=qa(),y=Yn(f);y.payload=l,d!=null&&(y.callback=d),l=Kn(s,y,f),l!==null&&(Da(l,s,f),to(l,s,f))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var f=qa(),y=Yn(f);y.tag=1,y.payload=l,d!=null&&(y.callback=d),l=Kn(s,y,f),l!==null&&(Da(l,s,f),to(l,s,f))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=qa(),f=Yn(d);f.tag=2,l!=null&&(f.callback=l),l=Kn(s,f,d),l!==null&&(Da(l,s,d),to(l,s,d))}};function hj(s,l,d,f,y,N,k){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(f,N,k):l.prototype&&l.prototype.isPureReactComponent?!Ki(d,f)||!Ki(y,N):!0}function xj(s,l,d,f){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,f),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,f),l.state!==s&&Cp.enqueueReplaceState(l,l.state,null)}function Fs(s,l){var d=l;if("ref"in l){d={};for(var f in l)f!=="ref"&&(d[f]=l[f])}if(s=s.defaultProps){d===l&&(d=x({},d));for(var y in s)d[y]===void 0&&(d[y]=s[y])}return d}function gj(s){Vc(s)}function bj(s){console.error(s)}function yj(s){Vc(s)}function pd(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(f){setTimeout(function(){throw f})}}function vj(s,l,d){try{var f=s.onCaughtError;f(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Ep(s,l,d){return d=Yn(d),d.tag=3,d.payload={element:null},d.callback=function(){pd(s,l)},d}function jj(s){return s=Yn(s),s.tag=3,s}function Nj(s,l,d,f){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var N=f.value;s.payload=function(){return y(N)},s.callback=function(){vj(l,d,f)}}var k=d.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(s.callback=function(){vj(l,d,f),typeof y!="function"&&(Zn===null?Zn=new Set([this]):Zn.add(this));var _=f.stack;this.componentDidCatch(f.value,{componentStack:_!==null?_:""})})}function gT(s,l,d,f,y){if(d.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(l=d.alternate,l!==null&&Tl(l,d,y,!0),d=Ia.current,d!==null){switch(d.tag){case 31:case 13:return lr===null?Cd():d.alternate===null&&At===0&&(At=3),d.flags&=-257,d.flags|=65536,d.lanes=y,f===td?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([f]):l.add(f),Xp(s,f,y)),!1;case 22:return d.flags|=65536,f===td?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([f])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([f]):d.add(f)),Xp(s,f,y)),!1}throw Error(n(435,d.tag))}return Xp(s,f,y),Cd(),!1}if(He)return l=Ia.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=y,f!==Yf&&(s=Error(n(422),{cause:f}),Wi(ar(s,d)))):(f!==Yf&&(l=Error(n(423),{cause:f}),Wi(ar(l,d))),s=s.current.alternate,s.flags|=65536,y&=-y,s.lanes|=y,f=ar(f,d),y=Ep(s.stateNode,f,y),rp(s,y),At!==4&&(At=2)),!1;var N=Error(n(520),{cause:f});if(N=ar(N,d),xo===null?xo=[N]:xo.push(N),At!==4&&(At=2),l===null)return!0;f=ar(f,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=y&-y,d.lanes|=s,s=Ep(d.stateNode,f,s),rp(d,s),!1;case 1:if(l=d.type,N=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Zn===null||!Zn.has(N))))return d.flags|=65536,y&=-y,d.lanes|=y,y=jj(y),Nj(y,s,d,f),rp(d,y),!1}d=d.return}while(d!==null);return!1}var kp=Error(n(461)),Tt=!1;function na(s,l,d,f){l.child=s===null?Cv(l,null,d,f):Bs(l,s.child,d,f)}function wj(s,l,d,f,y){d=d.render;var N=l.ref;if("ref"in f){var k={};for(var _ in f)_!=="ref"&&(k[_]=f[_])}else k=f;return Ms(l),f=cp(s,l,d,k,N,y),_=dp(),s!==null&&!Tt?(up(s,l,y),nn(s,l,y)):(He&&_&&Hf(l),l.flags|=1,na(s,l,f,y),l.child)}function Aj(s,l,d,f,y){if(s===null){var N=d.type;return typeof N=="function"&&!Uf(N)&&N.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=N,Sj(s,l,N,f,y)):(s=Jc(d.type,null,f,l,l.mode,y),s.ref=l.ref,s.return=l,l.child=s)}if(N=s.child,!zp(s,y)){var k=N.memoizedProps;if(d=d.compare,d=d!==null?d:Ki,d(k,f)&&s.ref===l.ref)return nn(s,l,y)}return l.flags|=1,s=Xr(N,f),s.ref=l.ref,s.return=l,l.child=s}function Sj(s,l,d,f,y){if(s!==null){var N=s.memoizedProps;if(Ki(N,f)&&s.ref===l.ref)if(Tt=!1,l.pendingProps=f=N,zp(s,y))(s.flags&131072)!==0&&(Tt=!0);else return l.lanes=s.lanes,nn(s,l,y)}return Op(s,l,d,f,y)}function Cj(s,l,d,f){var y=f.children,N=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((l.flags&128)!==0){if(N=N!==null?N.baseLanes|d:d,s!==null){for(f=l.child=s.child,y=0;f!==null;)y=y|f.lanes|f.childLanes,f=f.sibling;f=y&~N}else f=0,l.child=null;return Ej(s,l,N,d,f)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&Zc(l,N!==null?N.cachePool:null),N!==null?Ov(l,N):sp(),Dv(l);else return f=l.lanes=536870912,Ej(s,l,N!==null?N.baseLanes|d:d,d,f)}else N!==null?(Zc(l,N.cachePool),Ov(l,N),Jn(),l.memoizedState=null):(s!==null&&Zc(l,null),sp(),Jn());return na(s,l,y,d),l.child}function oo(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function Ej(s,l,d,f,y){var N=Zf();return N=N===null?null:{parent:Ot._currentValue,pool:N},l.memoizedState={baseLanes:d,cachePool:N},s!==null&&Zc(l,null),sp(),Dv(l),s!==null&&Tl(s,l,f,!0),l.childLanes=y,null}function hd(s,l){return l=gd({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function kj(s,l,d){return Bs(l,s.child,null,d),s=hd(l,l.pendingProps),s.flags|=2,Fa(l),l.memoizedState=null,s}function bT(s,l,d){var f=l.pendingProps,y=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(He){if(f.mode==="hidden")return s=hd(l,f),l.lanes=536870912,oo(null,s);if(ip(l),(s=ft)?(s=FN(s,sr),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Un!==null?{id:Mr,overflow:_r}:null,retryLane:536870912,hydrationErrors:null},d=uv(s),d.return=l,l.child=d,aa=l,ft=null)):s=null,s===null)throw qn(l);return l.lanes=536870912,null}return hd(l,f)}var N=s.memoizedState;if(N!==null){var k=N.dehydrated;if(ip(l),y)if(l.flags&256)l.flags&=-257,l=kj(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(n(558));else if(Tt||Tl(s,l,d,!1),y=(d&s.childLanes)!==0,Tt||y){if(f=it,f!==null&&(k=by(f,d),k!==0&&k!==N.retryLane))throw N.retryLane=k,Ds(s,k),Da(f,s,k),kp;Cd(),l=kj(s,l,d)}else s=N.treeContext,ft=ir(k.nextSibling),aa=l,He=!0,$n=null,sr=!1,s!==null&&pv(l,s),l=hd(l,f),l.flags|=4096;return l}return s=Xr(s.child,{mode:f.mode,children:f.children}),s.ref=l.ref,l.child=s,s.return=l,s}function xd(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(n(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function Op(s,l,d,f,y){return Ms(l),d=cp(s,l,d,f,void 0,y),f=dp(),s!==null&&!Tt?(up(s,l,y),nn(s,l,y)):(He&&f&&Hf(l),l.flags|=1,na(s,l,d,y),l.child)}function Oj(s,l,d,f,y,N){return Ms(l),l.updateQueue=null,d=Rv(l,f,d,y),Tv(s),f=dp(),s!==null&&!Tt?(up(s,l,N),nn(s,l,N)):(He&&f&&Hf(l),l.flags|=1,na(s,l,d,N),l.child)}function Dj(s,l,d,f,y){if(Ms(l),l.stateNode===null){var N=El,k=d.contextType;typeof k=="object"&&k!==null&&(N=ra(k)),N=new d(f,N),l.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=Cp,l.stateNode=N,N._reactInternals=l,N=l.stateNode,N.props=f,N.state=l.memoizedState,N.refs={},tp(l),k=d.contextType,N.context=typeof k=="object"&&k!==null?ra(k):El,N.state=l.memoizedState,k=d.getDerivedStateFromProps,typeof k=="function"&&(Sp(l,d,k,f),N.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(k=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),k!==N.state&&Cp.enqueueReplaceState(N,N.state,null),ro(l,f,N,y),ao(),N.state=l.memoizedState),typeof N.componentDidMount=="function"&&(l.flags|=4194308),f=!0}else if(s===null){N=l.stateNode;var _=l.memoizedProps,q=Fs(d,_);N.props=q;var Q=N.context,oe=d.contextType;k=El,typeof oe=="object"&&oe!==null&&(k=ra(oe));var me=d.getDerivedStateFromProps;oe=typeof me=="function"||typeof N.getSnapshotBeforeUpdate=="function",_=l.pendingProps!==_,oe||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(_||Q!==k)&&xj(l,N,f,k),Vn=!1;var Z=l.memoizedState;N.state=Z,ro(l,f,N,y),ao(),Q=l.memoizedState,_||Z!==Q||Vn?(typeof me=="function"&&(Sp(l,d,me,f),Q=l.memoizedState),(q=Vn||hj(l,d,q,f,Z,Q,k))?(oe||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(l.flags|=4194308)):(typeof N.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=f,l.memoizedState=Q),N.props=f,N.state=Q,N.context=k,f=q):(typeof N.componentDidMount=="function"&&(l.flags|=4194308),f=!1)}else{N=l.stateNode,ap(s,l),k=l.memoizedProps,oe=Fs(d,k),N.props=oe,me=l.pendingProps,Z=N.context,Q=d.contextType,q=El,typeof Q=="object"&&Q!==null&&(q=ra(Q)),_=d.getDerivedStateFromProps,(Q=typeof _=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(k!==me||Z!==q)&&xj(l,N,f,q),Vn=!1,Z=l.memoizedState,N.state=Z,ro(l,f,N,y),ao();var re=l.memoizedState;k!==me||Z!==re||Vn||s!==null&&s.dependencies!==null&&Qc(s.dependencies)?(typeof _=="function"&&(Sp(l,d,_,f),re=l.memoizedState),(oe=Vn||hj(l,d,oe,f,Z,re,q)||s!==null&&s.dependencies!==null&&Qc(s.dependencies))?(Q||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(f,re,q),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(f,re,q)),typeof N.componentDidUpdate=="function"&&(l.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof N.componentDidUpdate!="function"||k===s.memoizedProps&&Z===s.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||k===s.memoizedProps&&Z===s.memoizedState||(l.flags|=1024),l.memoizedProps=f,l.memoizedState=re),N.props=f,N.state=re,N.context=q,f=oe):(typeof N.componentDidUpdate!="function"||k===s.memoizedProps&&Z===s.memoizedState||(l.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||k===s.memoizedProps&&Z===s.memoizedState||(l.flags|=1024),f=!1)}return N=f,xd(s,l),f=(l.flags&128)!==0,N||f?(N=l.stateNode,d=f&&typeof d.getDerivedStateFromError!="function"?null:N.render(),l.flags|=1,s!==null&&f?(l.child=Bs(l,s.child,null,y),l.child=Bs(l,null,d,y)):na(s,l,d,y),l.memoizedState=N.state,s=l.child):s=nn(s,l,y),s}function Tj(s,l,d,f){return Rs(),l.flags|=256,na(s,l,d,f),l.child}var Dp={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tp(s){return{baseLanes:s,cachePool:vv()}}function Rp(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=$a),s}function Rj(s,l,d){var f=l.pendingProps,y=!1,N=(l.flags&128)!==0,k;if((k=N)||(k=s!==null&&s.memoizedState===null?!1:(Ct.current&2)!==0),k&&(y=!0,l.flags&=-129),k=(l.flags&32)!==0,l.flags&=-33,s===null){if(He){if(y?Gn(l):Jn(),(s=ft)?(s=FN(s,sr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:Un!==null?{id:Mr,overflow:_r}:null,retryLane:536870912,hydrationErrors:null},d=uv(s),d.return=l,l.child=d,aa=l,ft=null)):s=null,s===null)throw qn(l);return ph(s)?l.lanes=32:l.lanes=536870912,null}var _=f.children;return f=f.fallback,y?(Jn(),y=l.mode,_=gd({mode:"hidden",children:_},y),f=Ts(f,y,d,null),_.return=l,f.return=l,_.sibling=f,l.child=_,f=l.child,f.memoizedState=Tp(d),f.childLanes=Rp(s,k,d),l.memoizedState=Dp,oo(null,f)):(Gn(l),Pp(l,_))}var q=s.memoizedState;if(q!==null&&(_=q.dehydrated,_!==null)){if(N)l.flags&256?(Gn(l),l.flags&=-257,l=Mp(s,l,d)):l.memoizedState!==null?(Jn(),l.child=s.child,l.flags|=128,l=null):(Jn(),_=f.fallback,y=l.mode,f=gd({mode:"visible",children:f.children},y),_=Ts(_,y,d,null),_.flags|=2,f.return=l,_.return=l,f.sibling=_,l.child=f,Bs(l,s.child,null,d),f=l.child,f.memoizedState=Tp(d),f.childLanes=Rp(s,k,d),l.memoizedState=Dp,l=oo(null,f));else if(Gn(l),ph(_)){if(k=_.nextSibling&&_.nextSibling.dataset,k)var Q=k.dgst;k=Q,f=Error(n(419)),f.stack="",f.digest=k,Wi({value:f,source:null,stack:null}),l=Mp(s,l,d)}else if(Tt||Tl(s,l,d,!1),k=(d&s.childLanes)!==0,Tt||k){if(k=it,k!==null&&(f=by(k,d),f!==0&&f!==q.retryLane))throw q.retryLane=f,Ds(s,f),Da(k,s,f),kp;fh(_)||Cd(),l=Mp(s,l,d)}else fh(_)?(l.flags|=192,l.child=s.child,l=null):(s=q.treeContext,ft=ir(_.nextSibling),aa=l,He=!0,$n=null,sr=!1,s!==null&&pv(l,s),l=Pp(l,f.children),l.flags|=4096);return l}return y?(Jn(),_=f.fallback,y=l.mode,q=s.child,Q=q.sibling,f=Xr(q,{mode:"hidden",children:f.children}),f.subtreeFlags=q.subtreeFlags&65011712,Q!==null?_=Xr(Q,_):(_=Ts(_,y,d,null),_.flags|=2),_.return=l,f.return=l,f.sibling=_,l.child=f,oo(null,f),f=l.child,_=s.child.memoizedState,_===null?_=Tp(d):(y=_.cachePool,y!==null?(q=Ot._currentValue,y=y.parent!==q?{parent:q,pool:q}:y):y=vv(),_={baseLanes:_.baseLanes|d,cachePool:y}),f.memoizedState=_,f.childLanes=Rp(s,k,d),l.memoizedState=Dp,oo(s.child,f)):(Gn(l),d=s.child,s=d.sibling,d=Xr(d,{mode:"visible",children:f.children}),d.return=l,d.sibling=null,s!==null&&(k=l.deletions,k===null?(l.deletions=[s],l.flags|=16):k.push(s)),l.child=d,l.memoizedState=null,d)}function Pp(s,l){return l=gd({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function gd(s,l){return s=Ba(22,s,null,l),s.lanes=0,s}function Mp(s,l,d){return Bs(l,s.child,null,d),s=Pp(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function Pj(s,l,d){s.lanes|=l;var f=s.alternate;f!==null&&(f.lanes|=l),Jf(s.return,l,d)}function _p(s,l,d,f,y,N){var k=s.memoizedState;k===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:f,tail:d,tailMode:y,treeForkCount:N}:(k.isBackwards=l,k.rendering=null,k.renderingStartTime=0,k.last=f,k.tail=d,k.tailMode=y,k.treeForkCount=N)}function Mj(s,l,d){var f=l.pendingProps,y=f.revealOrder,N=f.tail;f=f.children;var k=Ct.current,_=(k&2)!==0;if(_?(k=k&1|2,l.flags|=128):k&=1,ee(Ct,k),na(s,l,f,d),f=He?Ji:0,!_&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Pj(s,d,l);else if(s.tag===19)Pj(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(y){case"forwards":for(d=l.child,y=null;d!==null;)s=d.alternate,s!==null&&sd(s)===null&&(y=d),d=d.sibling;d=y,d===null?(y=l.child,l.child=null):(y=d.sibling,d.sibling=null),_p(l,!1,y,d,N,f);break;case"backwards":case"unstable_legacy-backwards":for(d=null,y=l.child,l.child=null;y!==null;){if(s=y.alternate,s!==null&&sd(s)===null){l.child=y;break}s=y.sibling,y.sibling=d,d=y,y=s}_p(l,!0,d,null,N,f);break;case"together":_p(l,!1,null,null,void 0,f);break;default:l.memoizedState=null}return l.child}function nn(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),Xn|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(Tl(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(n(153));if(l.child!==null){for(s=l.child,d=Xr(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=Xr(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function zp(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&Qc(s)))}function yT(s,l,d){switch(l.tag){case 3:te(l,l.stateNode.containerInfo),Hn(l,Ot,s.memoizedState.cache),Rs();break;case 27:case 5:xe(l);break;case 4:te(l,l.stateNode.containerInfo);break;case 10:Hn(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,ip(l),null;break;case 13:var f=l.memoizedState;if(f!==null)return f.dehydrated!==null?(Gn(l),l.flags|=128,null):(d&l.child.childLanes)!==0?Rj(s,l,d):(Gn(l),s=nn(s,l,d),s!==null?s.sibling:null);Gn(l);break;case 19:var y=(s.flags&128)!==0;if(f=(d&l.childLanes)!==0,f||(Tl(s,l,d,!1),f=(d&l.childLanes)!==0),y){if(f)return Mj(s,l,d);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),ee(Ct,Ct.current),f)break;return null;case 22:return l.lanes=0,Cj(s,l,d,l.pendingProps);case 24:Hn(l,Ot,s.memoizedState.cache)}return nn(s,l,d)}function _j(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)Tt=!0;else{if(!zp(s,d)&&(l.flags&128)===0)return Tt=!1,yT(s,l,d);Tt=(s.flags&131072)!==0}else Tt=!1,He&&(l.flags&1048576)!==0&&fv(l,Ji,l.index);switch(l.lanes=0,l.tag){case 16:e:{var f=l.pendingProps;if(s=zs(l.elementType),l.type=s,typeof s=="function")Uf(s)?(f=Fs(s,f),l.tag=1,l=Dj(null,l,s,f,d)):(l.tag=0,l=Op(null,l,s,f,d));else{if(s!=null){var y=s.$$typeof;if(y===O){l.tag=11,l=wj(null,l,s,f,d);break e}else if(y===L){l.tag=14,l=Aj(null,l,s,f,d);break e}}throw l=se(s)||s,Error(n(306,l,""))}}return l;case 0:return Op(s,l,l.type,l.pendingProps,d);case 1:return f=l.type,y=Fs(f,l.pendingProps),Dj(s,l,f,y,d);case 3:e:{if(te(l,l.stateNode.containerInfo),s===null)throw Error(n(387));f=l.pendingProps;var N=l.memoizedState;y=N.element,ap(s,l),ro(l,f,null,d);var k=l.memoizedState;if(f=k.cache,Hn(l,Ot,f),f!==N.cache&&Wf(l,[Ot],d,!0),ao(),f=k.element,N.isDehydrated)if(N={element:f,isDehydrated:!1,cache:k.cache},l.updateQueue.baseState=N,l.memoizedState=N,l.flags&256){l=Tj(s,l,f,d);break e}else if(f!==y){y=ar(Error(n(424)),l),Wi(y),l=Tj(s,l,f,d);break e}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(ft=ir(s.firstChild),aa=l,He=!0,$n=null,sr=!0,d=Cv(l,null,f,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Rs(),f===y){l=nn(s,l,d);break e}na(s,l,f,d)}l=l.child}return l;case 26:return xd(s,l),s===null?(d=YN(l.type,null,l.pendingProps,null))?l.memoizedState=d:He||(d=l.type,s=l.pendingProps,f=Pd(ue.current).createElement(d),f[ta]=l,f[Aa]=s,sa(f,d,s),qt(f),l.stateNode=f):l.memoizedState=YN(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return xe(l),s===null&&He&&(f=l.stateNode=qN(l.type,l.pendingProps,ue.current),aa=l,sr=!0,y=ft,rs(l.type)?(hh=y,ft=ir(f.firstChild)):ft=y),na(s,l,l.pendingProps.children,d),xd(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&He&&((y=f=ft)&&(f=JT(f,l.type,l.pendingProps,sr),f!==null?(l.stateNode=f,aa=l,ft=ir(f.firstChild),sr=!1,y=!0):y=!1),y||qn(l)),xe(l),y=l.type,N=l.pendingProps,k=s!==null?s.memoizedProps:null,f=N.children,dh(y,N)?f=null:k!==null&&dh(y,k)&&(l.flags|=32),l.memoizedState!==null&&(y=cp(s,l,dT,null,null,d),Ao._currentValue=y),xd(s,l),na(s,l,f,d),l.child;case 6:return s===null&&He&&((s=d=ft)&&(d=WT(d,l.pendingProps,sr),d!==null?(l.stateNode=d,aa=l,ft=null,s=!0):s=!1),s||qn(l)),null;case 13:return Rj(s,l,d);case 4:return te(l,l.stateNode.containerInfo),f=l.pendingProps,s===null?l.child=Bs(l,null,f,d):na(s,l,f,d),l.child;case 11:return wj(s,l,l.type,l.pendingProps,d);case 7:return na(s,l,l.pendingProps,d),l.child;case 8:return na(s,l,l.pendingProps.children,d),l.child;case 12:return na(s,l,l.pendingProps.children,d),l.child;case 10:return f=l.pendingProps,Hn(l,l.type,f.value),na(s,l,f.children,d),l.child;case 9:return y=l.type._context,f=l.pendingProps.children,Ms(l),y=ra(y),f=f(y),l.flags|=1,na(s,l,f,d),l.child;case 14:return Aj(s,l,l.type,l.pendingProps,d);case 15:return Sj(s,l,l.type,l.pendingProps,d);case 19:return Mj(s,l,d);case 31:return bT(s,l,d);case 22:return Cj(s,l,d,l.pendingProps);case 24:return Ms(l),f=ra(Ot),s===null?(y=Zf(),y===null&&(y=it,N=Qf(),y.pooledCache=N,N.refCount++,N!==null&&(y.pooledCacheLanes|=d),y=N),l.memoizedState={parent:f,cache:y},tp(l),Hn(l,Ot,y)):((s.lanes&d)!==0&&(ap(s,l),ro(l,null,null,d),ao()),y=s.memoizedState,N=l.memoizedState,y.parent!==f?(y={parent:f,cache:f},l.memoizedState=y,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=y),Hn(l,Ot,f)):(f=N.cache,Hn(l,Ot,f),f!==y.cache&&Wf(l,[Ot],d,!0))),na(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(n(156,l.tag))}function sn(s){s.flags|=4}function Lp(s,l,d,f,y){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(y&335544128)===y)if(s.stateNode.complete)s.flags|=8192;else if(oN())s.flags|=8192;else throw Ls=td,ep}else s.flags&=-16777217}function zj(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!QN(l))if(oN())s.flags|=8192;else throw Ls=td,ep}function bd(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?hy():536870912,s.lanes|=l,ql|=l)}function co(s,l){if(!He)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var f=null;d!==null;)d.alternate!==null&&(f=d),d=d.sibling;f===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:f.sibling=null}}function pt(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,f=0;if(l)for(var y=s.child;y!==null;)d|=y.lanes|y.childLanes,f|=y.subtreeFlags&65011712,f|=y.flags&65011712,y.return=s,y=y.sibling;else for(y=s.child;y!==null;)d|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=s,y=y.sibling;return s.subtreeFlags|=f,s.childLanes=d,l}function vT(s,l,d){var f=l.pendingProps;switch(Vf(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(l),null;case 1:return pt(l),null;case 3:return d=l.stateNode,f=null,s!==null&&(f=s.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),tn(Ot),G(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Dl(l)?sn(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Kf())),pt(l),null;case 26:var y=l.type,N=l.memoizedState;return s===null?(sn(l),N!==null?(pt(l),zj(l,N)):(pt(l),Lp(l,y,null,f,d))):N?N!==s.memoizedState?(sn(l),pt(l),zj(l,N)):(pt(l),l.flags&=-16777217):(s=s.memoizedProps,s!==f&&sn(l),pt(l),Lp(l,y,s,f,d)),null;case 27:if(Ne(l),d=ue.current,y=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==f&&sn(l);else{if(!f){if(l.stateNode===null)throw Error(n(166));return pt(l),null}s=pe.current,Dl(l)?hv(l):(s=qN(y,f,d),l.stateNode=s,sn(l))}return pt(l),null;case 5:if(Ne(l),y=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==f&&sn(l);else{if(!f){if(l.stateNode===null)throw Error(n(166));return pt(l),null}if(N=pe.current,Dl(l))hv(l);else{var k=Pd(ue.current);switch(N){case 1:N=k.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:N=k.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":N=k.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":N=k.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":N=k.createElement("div"),N.innerHTML="<script><\/script>",N=N.removeChild(N.firstChild);break;case"select":N=typeof f.is=="string"?k.createElement("select",{is:f.is}):k.createElement("select"),f.multiple?N.multiple=!0:f.size&&(N.size=f.size);break;default:N=typeof f.is=="string"?k.createElement(y,{is:f.is}):k.createElement(y)}}N[ta]=l,N[Aa]=f;e:for(k=l.child;k!==null;){if(k.tag===5||k.tag===6)N.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===l)break e;for(;k.sibling===null;){if(k.return===null||k.return===l)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}l.stateNode=N;e:switch(sa(N,y,f),y){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&sn(l)}}return pt(l),Lp(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==f&&sn(l);else{if(typeof f!="string"&&l.stateNode===null)throw Error(n(166));if(s=ue.current,Dl(l)){if(s=l.stateNode,d=l.memoizedProps,f=null,y=aa,y!==null)switch(y.tag){case 27:case 5:f=y.memoizedProps}s[ta]=l,s=!!(s.nodeValue===d||f!==null&&f.suppressHydrationWarning===!0||RN(s.nodeValue,d)),s||qn(l,!0)}else s=Pd(s).createTextNode(f),s[ta]=l,l.stateNode=s}return pt(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(f=Dl(l),d!==null){if(s===null){if(!f)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[ta]=l}else Rs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;pt(l),s=!1}else d=Kf(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Fa(l),l):(Fa(l),null);if((l.flags&128)!==0)throw Error(n(558))}return pt(l),null;case 13:if(f=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(y=Dl(l),f!==null&&f.dehydrated!==null){if(s===null){if(!y)throw Error(n(318));if(y=l.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[ta]=l}else Rs(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;pt(l),y=!1}else y=Kf(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=y),y=!0;if(!y)return l.flags&256?(Fa(l),l):(Fa(l),null)}return Fa(l),(l.flags&128)!==0?(l.lanes=d,l):(d=f!==null,s=s!==null&&s.memoizedState!==null,d&&(f=l.child,y=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(y=f.alternate.memoizedState.cachePool.pool),N=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(N=f.memoizedState.cachePool.pool),N!==y&&(f.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),bd(l,l.updateQueue),pt(l),null);case 4:return G(),s===null&&sh(l.stateNode.containerInfo),pt(l),null;case 10:return tn(l.type),pt(l),null;case 19:if(H(Ct),f=l.memoizedState,f===null)return pt(l),null;if(y=(l.flags&128)!==0,N=f.rendering,N===null)if(y)co(f,!1);else{if(At!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(N=sd(s),N!==null){for(l.flags|=128,co(f,!1),s=N.updateQueue,l.updateQueue=s,bd(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)dv(d,s),d=d.sibling;return ee(Ct,Ct.current&1|2),He&&Zr(l,f.treeForkCount),l.child}s=s.sibling}f.tail!==null&&ye()>wd&&(l.flags|=128,y=!0,co(f,!1),l.lanes=4194304)}else{if(!y)if(s=sd(N),s!==null){if(l.flags|=128,y=!0,s=s.updateQueue,l.updateQueue=s,bd(l,s),co(f,!0),f.tail===null&&f.tailMode==="hidden"&&!N.alternate&&!He)return pt(l),null}else 2*ye()-f.renderingStartTime>wd&&d!==536870912&&(l.flags|=128,y=!0,co(f,!1),l.lanes=4194304);f.isBackwards?(N.sibling=l.child,l.child=N):(s=f.last,s!==null?s.sibling=N:l.child=N,f.last=N)}return f.tail!==null?(s=f.tail,f.rendering=s,f.tail=s.sibling,f.renderingStartTime=ye(),s.sibling=null,d=Ct.current,ee(Ct,y?d&1|2:d&1),He&&Zr(l,f.treeForkCount),s):(pt(l),null);case 22:case 23:return Fa(l),lp(),f=l.memoizedState!==null,s!==null?s.memoizedState!==null!==f&&(l.flags|=8192):f&&(l.flags|=8192),f?(d&536870912)!==0&&(l.flags&128)===0&&(pt(l),l.subtreeFlags&6&&(l.flags|=8192)):pt(l),d=l.updateQueue,d!==null&&bd(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==d&&(l.flags|=2048),s!==null&&H(_s),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),tn(Ot),pt(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function jT(s,l){switch(Vf(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return tn(Ot),G(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Ne(l),null;case 31:if(l.memoizedState!==null){if(Fa(l),l.alternate===null)throw Error(n(340));Rs()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Fa(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Rs()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return H(Ct),null;case 4:return G(),null;case 10:return tn(l.type),null;case 22:case 23:return Fa(l),lp(),s!==null&&H(_s),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return tn(Ot),null;case 25:return null;default:return null}}function Lj(s,l){switch(Vf(l),l.tag){case 3:tn(Ot),G();break;case 26:case 27:case 5:Ne(l);break;case 4:G();break;case 31:l.memoizedState!==null&&Fa(l);break;case 13:Fa(l);break;case 19:H(Ct);break;case 10:tn(l.type);break;case 22:case 23:Fa(l),lp(),s!==null&&H(_s);break;case 24:tn(Ot)}}function uo(s,l){try{var d=l.updateQueue,f=d!==null?d.lastEffect:null;if(f!==null){var y=f.next;d=y;do{if((d.tag&s)===s){f=void 0;var N=d.create,k=d.inst;f=N(),k.destroy=f}d=d.next}while(d!==y)}}catch(_){et(l,l.return,_)}}function Wn(s,l,d){try{var f=l.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var N=y.next;f=N;do{if((f.tag&s)===s){var k=f.inst,_=k.destroy;if(_!==void 0){k.destroy=void 0,y=l;var q=d,Q=_;try{Q()}catch(oe){et(y,q,oe)}}}f=f.next}while(f!==N)}}catch(oe){et(l,l.return,oe)}}function Bj(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{kv(l,d)}catch(f){et(s,s.return,f)}}}function Ij(s,l,d){d.props=Fs(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(f){et(s,l,f)}}function mo(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var f=s.stateNode;break;case 30:f=s.stateNode;break;default:f=s.stateNode}typeof d=="function"?s.refCleanup=d(f):d.current=f}}catch(y){et(s,l,y)}}function zr(s,l){var d=s.ref,f=s.refCleanup;if(d!==null)if(typeof f=="function")try{f()}catch(y){et(s,l,y)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(y){et(s,l,y)}else d.current=null}function Fj(s){var l=s.type,d=s.memoizedProps,f=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&f.focus();break e;case"img":d.src?f.src=d.src:d.srcSet&&(f.srcset=d.srcSet)}}catch(y){et(s,s.return,y)}}function Bp(s,l,d){try{var f=s.stateNode;qT(f,s.type,d,l),f[Aa]=l}catch(y){et(s,s.return,y)}}function Uj(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&rs(s.type)||s.tag===4}function Ip(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Uj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&rs(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Fp(s,l,d){var f=s.tag;if(f===5||f===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Wr));else if(f!==4&&(f===27&&rs(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(Fp(s,l,d),s=s.sibling;s!==null;)Fp(s,l,d),s=s.sibling}function yd(s,l,d){var f=s.tag;if(f===5||f===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(f!==4&&(f===27&&rs(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(yd(s,l,d),s=s.sibling;s!==null;)yd(s,l,d),s=s.sibling}function $j(s){var l=s.stateNode,d=s.memoizedProps;try{for(var f=s.type,y=l.attributes;y.length;)l.removeAttributeNode(y[0]);sa(l,f,d),l[ta]=s,l[Aa]=d}catch(N){et(s,s.return,N)}}var ln=!1,Rt=!1,Up=!1,qj=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function NT(s,l){if(s=s.containerInfo,oh=Fd,s=tv(s),Mf(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var f=d.getSelection&&d.getSelection();if(f&&f.rangeCount!==0){d=f.anchorNode;var y=f.anchorOffset,N=f.focusNode;f=f.focusOffset;try{d.nodeType,N.nodeType}catch{d=null;break e}var k=0,_=-1,q=-1,Q=0,oe=0,me=s,Z=null;t:for(;;){for(var re;me!==d||y!==0&&me.nodeType!==3||(_=k+y),me!==N||f!==0&&me.nodeType!==3||(q=k+f),me.nodeType===3&&(k+=me.nodeValue.length),(re=me.firstChild)!==null;)Z=me,me=re;for(;;){if(me===s)break t;if(Z===d&&++Q===y&&(_=k),Z===N&&++oe===f&&(q=k),(re=me.nextSibling)!==null)break;me=Z,Z=me.parentNode}me=re}d=_===-1||q===-1?null:{start:_,end:q}}else d=null}d=d||{start:0,end:0}}else d=null;for(ch={focusedElem:s,selectionRange:d},Fd=!1,Ht=l;Ht!==null;)if(l=Ht,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Ht=s;else for(;Ht!==null;){switch(l=Ht,N=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)y=s[d],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&N!==null){s=void 0,d=l,y=N.memoizedProps,N=N.memoizedState,f=d.stateNode;try{var Se=Fs(d.type,y);s=f.getSnapshotBeforeUpdate(Se,N),f.__reactInternalSnapshotBeforeUpdate=s}catch(Re){et(d,d.return,Re)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)mh(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":mh(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(n(163))}if(s=l.sibling,s!==null){s.return=l.return,Ht=s;break}Ht=l.return}}function Hj(s,l,d){var f=d.flags;switch(d.tag){case 0:case 11:case 15:cn(s,d),f&4&&uo(5,d);break;case 1:if(cn(s,d),f&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(k){et(d,d.return,k)}else{var y=Fs(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(y,l,s.__reactInternalSnapshotBeforeUpdate)}catch(k){et(d,d.return,k)}}f&64&&Bj(d),f&512&&mo(d,d.return);break;case 3:if(cn(s,d),f&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{kv(s,l)}catch(k){et(d,d.return,k)}}break;case 27:l===null&&f&4&&$j(d);case 26:case 5:cn(s,d),l===null&&f&4&&Fj(d),f&512&&mo(d,d.return);break;case 12:cn(s,d);break;case 31:cn(s,d),f&4&&Kj(s,d);break;case 13:cn(s,d),f&4&&Gj(s,d),f&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=TT.bind(null,d),QT(s,d))));break;case 22:if(f=d.memoizedState!==null||ln,!f){l=l!==null&&l.memoizedState!==null||Rt,y=ln;var N=Rt;ln=f,(Rt=l)&&!N?dn(s,d,(d.subtreeFlags&8772)!==0):cn(s,d),ln=y,Rt=N}break;case 30:break;default:cn(s,d)}}function Vj(s){var l=s.alternate;l!==null&&(s.alternate=null,Vj(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&gf(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var bt=null,Ca=!1;function on(s,l,d){for(d=d.child;d!==null;)Yj(s,l,d),d=d.sibling}function Yj(s,l,d){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(Gr,d)}catch{}switch(d.tag){case 26:Rt||zr(d,l),on(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Rt||zr(d,l);var f=bt,y=Ca;rs(d.type)&&(bt=d.stateNode,Ca=!1),on(s,l,d),jo(d.stateNode),bt=f,Ca=y;break;case 5:Rt||zr(d,l);case 6:if(f=bt,y=Ca,bt=null,on(s,l,d),bt=f,Ca=y,bt!==null)if(Ca)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(d.stateNode)}catch(N){et(d,l,N)}else try{bt.removeChild(d.stateNode)}catch(N){et(d,l,N)}break;case 18:bt!==null&&(Ca?(s=bt,BN(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),Ql(s)):BN(bt,d.stateNode));break;case 4:f=bt,y=Ca,bt=d.stateNode.containerInfo,Ca=!0,on(s,l,d),bt=f,Ca=y;break;case 0:case 11:case 14:case 15:Wn(2,d,l),Rt||Wn(4,d,l),on(s,l,d);break;case 1:Rt||(zr(d,l),f=d.stateNode,typeof f.componentWillUnmount=="function"&&Ij(d,l,f)),on(s,l,d);break;case 21:on(s,l,d);break;case 22:Rt=(f=Rt)||d.memoizedState!==null,on(s,l,d),Rt=f;break;default:on(s,l,d)}}function Kj(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Ql(s)}catch(d){et(l,l.return,d)}}}function Gj(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Ql(s)}catch(d){et(l,l.return,d)}}function wT(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new qj),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new qj),l;default:throw Error(n(435,s.tag))}}function vd(s,l){var d=wT(s);l.forEach(function(f){if(!d.has(f)){d.add(f);var y=RT.bind(null,s,f);f.then(y,y)}})}function Ea(s,l){var d=l.deletions;if(d!==null)for(var f=0;f<d.length;f++){var y=d[f],N=s,k=l,_=k;e:for(;_!==null;){switch(_.tag){case 27:if(rs(_.type)){bt=_.stateNode,Ca=!1;break e}break;case 5:bt=_.stateNode,Ca=!1;break e;case 3:case 4:bt=_.stateNode.containerInfo,Ca=!0;break e}_=_.return}if(bt===null)throw Error(n(160));Yj(N,k,y),bt=null,Ca=!1,N=y.alternate,N!==null&&(N.return=null),y.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Jj(l,s),l=l.sibling}var wr=null;function Jj(s,l){var d=s.alternate,f=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Ea(l,s),ka(s),f&4&&(Wn(3,s,s.return),uo(3,s),Wn(5,s,s.return));break;case 1:Ea(l,s),ka(s),f&512&&(Rt||d===null||zr(d,d.return)),f&64&&ln&&(s=s.updateQueue,s!==null&&(f=s.callbacks,f!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?f:d.concat(f))));break;case 26:var y=wr;if(Ea(l,s),ka(s),f&512&&(Rt||d===null||zr(d,d.return)),f&4){var N=d!==null?d.memoizedState:null;if(f=s.memoizedState,d===null)if(f===null)if(s.stateNode===null){e:{f=s.type,d=s.memoizedProps,y=y.ownerDocument||y;t:switch(f){case"title":N=y.getElementsByTagName("title")[0],(!N||N[Bi]||N[ta]||N.namespaceURI==="http://www.w3.org/2000/svg"||N.hasAttribute("itemprop"))&&(N=y.createElement(f),y.head.insertBefore(N,y.querySelector("head > title"))),sa(N,f,d),N[ta]=s,qt(N),f=N;break e;case"link":var k=JN("link","href",y).get(f+(d.href||""));if(k){for(var _=0;_<k.length;_++)if(N=k[_],N.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&N.getAttribute("rel")===(d.rel==null?null:d.rel)&&N.getAttribute("title")===(d.title==null?null:d.title)&&N.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){k.splice(_,1);break t}}N=y.createElement(f),sa(N,f,d),y.head.appendChild(N);break;case"meta":if(k=JN("meta","content",y).get(f+(d.content||""))){for(_=0;_<k.length;_++)if(N=k[_],N.getAttribute("content")===(d.content==null?null:""+d.content)&&N.getAttribute("name")===(d.name==null?null:d.name)&&N.getAttribute("property")===(d.property==null?null:d.property)&&N.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&N.getAttribute("charset")===(d.charSet==null?null:d.charSet)){k.splice(_,1);break t}}N=y.createElement(f),sa(N,f,d),y.head.appendChild(N);break;default:throw Error(n(468,f))}N[ta]=s,qt(N),f=N}s.stateNode=f}else WN(y,s.type,s.stateNode);else s.stateNode=GN(y,f,s.memoizedProps);else N!==f?(N===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):N.count--,f===null?WN(y,s.type,s.stateNode):GN(y,f,s.memoizedProps)):f===null&&s.stateNode!==null&&Bp(s,s.memoizedProps,d.memoizedProps)}break;case 27:Ea(l,s),ka(s),f&512&&(Rt||d===null||zr(d,d.return)),d!==null&&f&4&&Bp(s,s.memoizedProps,d.memoizedProps);break;case 5:if(Ea(l,s),ka(s),f&512&&(Rt||d===null||zr(d,d.return)),s.flags&32){y=s.stateNode;try{vl(y,"")}catch(Se){et(s,s.return,Se)}}f&4&&s.stateNode!=null&&(y=s.memoizedProps,Bp(s,y,d!==null?d.memoizedProps:y)),f&1024&&(Up=!0);break;case 6:if(Ea(l,s),ka(s),f&4){if(s.stateNode===null)throw Error(n(162));f=s.memoizedProps,d=s.stateNode;try{d.nodeValue=f}catch(Se){et(s,s.return,Se)}}break;case 3:if(zd=null,y=wr,wr=Md(l.containerInfo),Ea(l,s),wr=y,ka(s),f&4&&d!==null&&d.memoizedState.isDehydrated)try{Ql(l.containerInfo)}catch(Se){et(s,s.return,Se)}Up&&(Up=!1,Wj(s));break;case 4:f=wr,wr=Md(s.stateNode.containerInfo),Ea(l,s),ka(s),wr=f;break;case 12:Ea(l,s),ka(s);break;case 31:Ea(l,s),ka(s),f&4&&(f=s.updateQueue,f!==null&&(s.updateQueue=null,vd(s,f)));break;case 13:Ea(l,s),ka(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Nd=ye()),f&4&&(f=s.updateQueue,f!==null&&(s.updateQueue=null,vd(s,f)));break;case 22:y=s.memoizedState!==null;var q=d!==null&&d.memoizedState!==null,Q=ln,oe=Rt;if(ln=Q||y,Rt=oe||q,Ea(l,s),Rt=oe,ln=Q,ka(s),f&8192)e:for(l=s.stateNode,l._visibility=y?l._visibility&-2:l._visibility|1,y&&(d===null||q||ln||Rt||Us(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){q=d=l;try{if(N=q.stateNode,y)k=N.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{_=q.stateNode;var me=q.memoizedProps.style,Z=me!=null&&me.hasOwnProperty("display")?me.display:null;_.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(Se){et(q,q.return,Se)}}}else if(l.tag===6){if(d===null){q=l;try{q.stateNode.nodeValue=y?"":q.memoizedProps}catch(Se){et(q,q.return,Se)}}}else if(l.tag===18){if(d===null){q=l;try{var re=q.stateNode;y?IN(re,!0):IN(q.stateNode,!1)}catch(Se){et(q,q.return,Se)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}f&4&&(f=s.updateQueue,f!==null&&(d=f.retryQueue,d!==null&&(f.retryQueue=null,vd(s,d))));break;case 19:Ea(l,s),ka(s),f&4&&(f=s.updateQueue,f!==null&&(s.updateQueue=null,vd(s,f)));break;case 30:break;case 21:break;default:Ea(l,s),ka(s)}}function ka(s){var l=s.flags;if(l&2){try{for(var d,f=s.return;f!==null;){if(Uj(f)){d=f;break}f=f.return}if(d==null)throw Error(n(160));switch(d.tag){case 27:var y=d.stateNode,N=Ip(s);yd(s,N,y);break;case 5:var k=d.stateNode;d.flags&32&&(vl(k,""),d.flags&=-33);var _=Ip(s);yd(s,_,k);break;case 3:case 4:var q=d.stateNode.containerInfo,Q=Ip(s);Fp(s,Q,q);break;default:throw Error(n(161))}}catch(oe){et(s,s.return,oe)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function Wj(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;Wj(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function cn(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)Hj(s,l.alternate,l),l=l.sibling}function Us(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:Wn(4,l,l.return),Us(l);break;case 1:zr(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&Ij(l,l.return,d),Us(l);break;case 27:jo(l.stateNode);case 26:case 5:zr(l,l.return),Us(l);break;case 22:l.memoizedState===null&&Us(l);break;case 30:Us(l);break;default:Us(l)}s=s.sibling}}function dn(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var f=l.alternate,y=s,N=l,k=N.flags;switch(N.tag){case 0:case 11:case 15:dn(y,N,d),uo(4,N);break;case 1:if(dn(y,N,d),f=N,y=f.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(Q){et(f,f.return,Q)}if(f=N,y=f.updateQueue,y!==null){var _=f.stateNode;try{var q=y.shared.hiddenCallbacks;if(q!==null)for(y.shared.hiddenCallbacks=null,y=0;y<q.length;y++)Ev(q[y],_)}catch(Q){et(f,f.return,Q)}}d&&k&64&&Bj(N),mo(N,N.return);break;case 27:$j(N);case 26:case 5:dn(y,N,d),d&&f===null&&k&4&&Fj(N),mo(N,N.return);break;case 12:dn(y,N,d);break;case 31:dn(y,N,d),d&&k&4&&Kj(y,N);break;case 13:dn(y,N,d),d&&k&4&&Gj(y,N);break;case 22:N.memoizedState===null&&dn(y,N,d),mo(N,N.return);break;case 30:break;default:dn(y,N,d)}l=l.sibling}}function $p(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Qi(d))}function qp(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Qi(s))}function Ar(s,l,d,f){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Qj(s,l,d,f),l=l.sibling}function Qj(s,l,d,f){var y=l.flags;switch(l.tag){case 0:case 11:case 15:Ar(s,l,d,f),y&2048&&uo(9,l);break;case 1:Ar(s,l,d,f);break;case 3:Ar(s,l,d,f),y&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Qi(s)));break;case 12:if(y&2048){Ar(s,l,d,f),s=l.stateNode;try{var N=l.memoizedProps,k=N.id,_=N.onPostCommit;typeof _=="function"&&_(k,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(q){et(l,l.return,q)}}else Ar(s,l,d,f);break;case 31:Ar(s,l,d,f);break;case 13:Ar(s,l,d,f);break;case 23:break;case 22:N=l.stateNode,k=l.alternate,l.memoizedState!==null?N._visibility&2?Ar(s,l,d,f):fo(s,l):N._visibility&2?Ar(s,l,d,f):(N._visibility|=2,Fl(s,l,d,f,(l.subtreeFlags&10256)!==0||!1)),y&2048&&$p(k,l);break;case 24:Ar(s,l,d,f),y&2048&&qp(l.alternate,l);break;default:Ar(s,l,d,f)}}function Fl(s,l,d,f,y){for(y=y&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var N=s,k=l,_=d,q=f,Q=k.flags;switch(k.tag){case 0:case 11:case 15:Fl(N,k,_,q,y),uo(8,k);break;case 23:break;case 22:var oe=k.stateNode;k.memoizedState!==null?oe._visibility&2?Fl(N,k,_,q,y):fo(N,k):(oe._visibility|=2,Fl(N,k,_,q,y)),y&&Q&2048&&$p(k.alternate,k);break;case 24:Fl(N,k,_,q,y),y&&Q&2048&&qp(k.alternate,k);break;default:Fl(N,k,_,q,y)}l=l.sibling}}function fo(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,f=l,y=f.flags;switch(f.tag){case 22:fo(d,f),y&2048&&$p(f.alternate,f);break;case 24:fo(d,f),y&2048&&qp(f.alternate,f);break;default:fo(d,f)}l=l.sibling}}var po=8192;function Ul(s,l,d){if(s.subtreeFlags&po)for(s=s.child;s!==null;)Xj(s,l,d),s=s.sibling}function Xj(s,l,d){switch(s.tag){case 26:Ul(s,l,d),s.flags&po&&s.memoizedState!==null&&c6(d,wr,s.memoizedState,s.memoizedProps);break;case 5:Ul(s,l,d);break;case 3:case 4:var f=wr;wr=Md(s.stateNode.containerInfo),Ul(s,l,d),wr=f;break;case 22:s.memoizedState===null&&(f=s.alternate,f!==null&&f.memoizedState!==null?(f=po,po=16777216,Ul(s,l,d),po=f):Ul(s,l,d));break;default:Ul(s,l,d)}}function Zj(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function ho(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var f=l[d];Ht=f,tN(f,s)}Zj(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)eN(s),s=s.sibling}function eN(s){switch(s.tag){case 0:case 11:case 15:ho(s),s.flags&2048&&Wn(9,s,s.return);break;case 3:ho(s);break;case 12:ho(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,jd(s)):ho(s);break;default:ho(s)}}function jd(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var f=l[d];Ht=f,tN(f,s)}Zj(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:Wn(8,l,l.return),jd(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,jd(l));break;default:jd(l)}s=s.sibling}}function tN(s,l){for(;Ht!==null;){var d=Ht;switch(d.tag){case 0:case 11:case 15:Wn(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var f=d.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:Qi(d.memoizedState.cache)}if(f=d.child,f!==null)f.return=d,Ht=f;else e:for(d=s;Ht!==null;){f=Ht;var y=f.sibling,N=f.return;if(Vj(f),f===d){Ht=null;break e}if(y!==null){y.return=N,Ht=y;break e}Ht=N}}}var AT={getCacheForType:function(s){var l=ra(Ot),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return ra(Ot).controller.signal}},ST=typeof WeakMap=="function"?WeakMap:Map,Xe=0,it=null,Fe=null,$e=0,Ze=0,Ua=null,Qn=!1,$l=!1,Hp=!1,un=0,At=0,Xn=0,$s=0,Vp=0,$a=0,ql=0,xo=null,Oa=null,Yp=!1,Nd=0,aN=0,wd=1/0,Ad=null,Zn=null,Mt=0,es=null,Hl=null,mn=0,Kp=0,Gp=null,rN=null,go=0,Jp=null;function qa(){return(Xe&2)!==0&&$e!==0?$e&-$e:V.T!==null?th():yy()}function nN(){if($a===0)if(($e&536870912)===0||He){var s=Rc;Rc<<=1,(Rc&3932160)===0&&(Rc=262144),$a=s}else $a=536870912;return s=Ia.current,s!==null&&(s.flags|=32),$a}function Da(s,l,d){(s===it&&(Ze===2||Ze===9)||s.cancelPendingCommit!==null)&&(Vl(s,0),ts(s,$e,$a,!1)),Li(s,d),((Xe&2)===0||s!==it)&&(s===it&&((Xe&2)===0&&($s|=d),At===4&&ts(s,$e,$a,!1)),Lr(s))}function sN(s,l,d){if((Xe&6)!==0)throw Error(n(327));var f=!d&&(l&127)===0&&(l&s.expiredLanes)===0||zi(s,l),y=f?kT(s,l):Qp(s,l,!0),N=f;do{if(y===0){$l&&!f&&ts(s,l,0,!1);break}else{if(d=s.current.alternate,N&&!CT(d)){y=Qp(s,l,!1),N=!1;continue}if(y===2){if(N=l,s.errorRecoveryDisabledLanes&N)var k=0;else k=s.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){l=k;e:{var _=s;y=xo;var q=_.current.memoizedState.isDehydrated;if(q&&(Vl(_,k).flags|=256),k=Qp(_,k,!1),k!==2){if(Hp&&!q){_.errorRecoveryDisabledLanes|=N,$s|=N,y=4;break e}N=Oa,Oa=y,N!==null&&(Oa===null?Oa=N:Oa.push.apply(Oa,N))}y=k}if(N=!1,y!==2)continue}}if(y===1){Vl(s,0),ts(s,l,0,!0);break}e:{switch(f=s,N=y,N){case 0:case 1:throw Error(n(345));case 4:if((l&4194048)!==l)break;case 6:ts(f,l,$a,!Qn);break e;case 2:Oa=null;break;case 3:case 5:break;default:throw Error(n(329))}if((l&62914560)===l&&(y=Nd+300-ye(),10<y)){if(ts(f,l,$a,!Qn),Mc(f,0,!0)!==0)break e;mn=l,f.timeoutHandle=zN(lN.bind(null,f,d,Oa,Ad,Yp,l,$a,$s,ql,Qn,N,"Throttled",-0,0),y);break e}lN(f,d,Oa,Ad,Yp,l,$a,$s,ql,Qn,N,null,-0,0)}}break}while(!0);Lr(s)}function lN(s,l,d,f,y,N,k,_,q,Q,oe,me,Z,re){if(s.timeoutHandle=-1,me=l.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wr},Xj(l,N,me);var Se=(N&62914560)===N?Nd-ye():(N&4194048)===N?aN-ye():0;if(Se=d6(me,Se),Se!==null){mn=N,s.cancelPendingCommit=Se(pN.bind(null,s,l,N,d,f,y,k,_,q,oe,me,null,Z,re)),ts(s,N,k,!Q);return}}pN(s,l,N,d,f,y,k,_,q)}function CT(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var f=0;f<d.length;f++){var y=d[f],N=y.getSnapshot;y=y.value;try{if(!La(N(),y))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ts(s,l,d,f){l&=~Vp,l&=~$s,s.suspendedLanes|=l,s.pingedLanes&=~l,f&&(s.warmLanes|=l),f=s.expirationTimes;for(var y=l;0<y;){var N=31-ea(y),k=1<<N;f[N]=-1,y&=~k}d!==0&&xy(s,d,l)}function Sd(){return(Xe&6)===0?(bo(0),!1):!0}function Wp(){if(Fe!==null){if(Ze===0)var s=Fe.return;else s=Fe,en=Ps=null,mp(s),_l=null,Zi=0,s=Fe;for(;s!==null;)Lj(s.alternate,s),s=s.return;Fe=null}}function Vl(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,YT(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),mn=0,Wp(),it=s,Fe=d=Xr(s.current,null),$e=l,Ze=0,Ua=null,Qn=!1,$l=zi(s,l),Hp=!1,ql=$a=Vp=$s=Xn=At=0,Oa=xo=null,Yp=!1,(l&8)!==0&&(l|=l&32);var f=s.entangledLanes;if(f!==0)for(s=s.entanglements,f&=l;0<f;){var y=31-ea(f),N=1<<y;l|=s[y],f&=~N}return un=l,Yc(),d}function iN(s,l){Le=null,V.H=io,l===Ml||l===ed?(l=wv(),Ze=3):l===ep?(l=wv(),Ze=4):Ze=l===kp?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Ua=l,Fe===null&&(At=1,pd(s,ar(l,s.current)))}function oN(){var s=Ia.current;return s===null?!0:($e&4194048)===$e?lr===null:($e&62914560)===$e||($e&536870912)!==0?s===lr:!1}function cN(){var s=V.H;return V.H=io,s===null?io:s}function dN(){var s=V.A;return V.A=AT,s}function Cd(){At=4,Qn||($e&4194048)!==$e&&Ia.current!==null||($l=!0),(Xn&134217727)===0&&($s&134217727)===0||it===null||ts(it,$e,$a,!1)}function Qp(s,l,d){var f=Xe;Xe|=2;var y=cN(),N=dN();(it!==s||$e!==l)&&(Ad=null,Vl(s,l)),l=!1;var k=At;e:do try{if(Ze!==0&&Fe!==null){var _=Fe,q=Ua;switch(Ze){case 8:Wp(),k=6;break e;case 3:case 2:case 9:case 6:Ia.current===null&&(l=!0);var Q=Ze;if(Ze=0,Ua=null,Yl(s,_,q,Q),d&&$l){k=0;break e}break;default:Q=Ze,Ze=0,Ua=null,Yl(s,_,q,Q)}}ET(),k=At;break}catch(oe){iN(s,oe)}while(!0);return l&&s.shellSuspendCounter++,en=Ps=null,Xe=f,V.H=y,V.A=N,Fe===null&&(it=null,$e=0,Yc()),k}function ET(){for(;Fe!==null;)uN(Fe)}function kT(s,l){var d=Xe;Xe|=2;var f=cN(),y=dN();it!==s||$e!==l?(Ad=null,wd=ye()+500,Vl(s,l)):$l=zi(s,l);e:do try{if(Ze!==0&&Fe!==null){l=Fe;var N=Ua;t:switch(Ze){case 1:Ze=0,Ua=null,Yl(s,l,N,1);break;case 2:case 9:if(jv(N)){Ze=0,Ua=null,mN(l);break}l=function(){Ze!==2&&Ze!==9||it!==s||(Ze=7),Lr(s)},N.then(l,l);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:jv(N)?(Ze=0,Ua=null,mN(l)):(Ze=0,Ua=null,Yl(s,l,N,7));break;case 5:var k=null;switch(Fe.tag){case 26:k=Fe.memoizedState;case 5:case 27:var _=Fe;if(k?QN(k):_.stateNode.complete){Ze=0,Ua=null;var q=_.sibling;if(q!==null)Fe=q;else{var Q=_.return;Q!==null?(Fe=Q,Ed(Q)):Fe=null}break t}}Ze=0,Ua=null,Yl(s,l,N,5);break;case 6:Ze=0,Ua=null,Yl(s,l,N,6);break;case 8:Wp(),At=6;break e;default:throw Error(n(462))}}OT();break}catch(oe){iN(s,oe)}while(!0);return en=Ps=null,V.H=f,V.A=y,Xe=d,Fe!==null?0:(it=null,$e=0,Yc(),At)}function OT(){for(;Fe!==null&&!df();)uN(Fe)}function uN(s){var l=_j(s.alternate,s,un);s.memoizedProps=s.pendingProps,l===null?Ed(s):Fe=l}function mN(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=Oj(d,l,l.pendingProps,l.type,void 0,$e);break;case 11:l=Oj(d,l,l.pendingProps,l.type.render,l.ref,$e);break;case 5:mp(l);default:Lj(d,l),l=Fe=dv(l,un),l=_j(d,l,un)}s.memoizedProps=s.pendingProps,l===null?Ed(s):Fe=l}function Yl(s,l,d,f){en=Ps=null,mp(l),_l=null,Zi=0;var y=l.return;try{if(gT(s,y,l,d,$e)){At=1,pd(s,ar(d,s.current)),Fe=null;return}}catch(N){if(y!==null)throw Fe=y,N;At=1,pd(s,ar(d,s.current)),Fe=null;return}l.flags&32768?(He||f===1?s=!0:$l||($e&536870912)!==0?s=!1:(Qn=s=!0,(f===2||f===9||f===3||f===6)&&(f=Ia.current,f!==null&&f.tag===13&&(f.flags|=16384))),fN(l,s)):Ed(l)}function Ed(s){var l=s;do{if((l.flags&32768)!==0){fN(l,Qn);return}s=l.return;var d=vT(l.alternate,l,un);if(d!==null){Fe=d;return}if(l=l.sibling,l!==null){Fe=l;return}Fe=l=s}while(l!==null);At===0&&(At=5)}function fN(s,l){do{var d=jT(s.alternate,s);if(d!==null){d.flags&=32767,Fe=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){Fe=s;return}Fe=s=d}while(s!==null);At=6,Fe=null}function pN(s,l,d,f,y,N,k,_,q){s.cancelPendingCommit=null;do kd();while(Mt!==0);if((Xe&6)!==0)throw Error(n(327));if(l!==null){if(l===s.current)throw Error(n(177));if(N=l.lanes|l.childLanes,N|=If,oD(s,d,N,k,_,q),s===it&&(Fe=it=null,$e=0),Hl=l,es=s,mn=d,Kp=N,Gp=y,rN=f,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,PT(Ut,function(){return yN(),null})):(s.callbackNode=null,s.callbackPriority=0),f=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||f){f=V.T,V.T=null,y=K.p,K.p=2,k=Xe,Xe|=4;try{NT(s,l,d)}finally{Xe=k,K.p=y,V.T=f}}Mt=1,hN(),xN(),gN()}}function hN(){if(Mt===1){Mt=0;var s=es,l=Hl,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=V.T,V.T=null;var f=K.p;K.p=2;var y=Xe;Xe|=4;try{Jj(l,s);var N=ch,k=tv(s.containerInfo),_=N.focusedElem,q=N.selectionRange;if(k!==_&&_&&_.ownerDocument&&ev(_.ownerDocument.documentElement,_)){if(q!==null&&Mf(_)){var Q=q.start,oe=q.end;if(oe===void 0&&(oe=Q),"selectionStart"in _)_.selectionStart=Q,_.selectionEnd=Math.min(oe,_.value.length);else{var me=_.ownerDocument||document,Z=me&&me.defaultView||window;if(Z.getSelection){var re=Z.getSelection(),Se=_.textContent.length,Re=Math.min(q.start,Se),st=q.end===void 0?Re:Math.min(q.end,Se);!re.extend&&Re>st&&(k=st,st=Re,Re=k);var J=Zy(_,Re),Y=Zy(_,st);if(J&&Y&&(re.rangeCount!==1||re.anchorNode!==J.node||re.anchorOffset!==J.offset||re.focusNode!==Y.node||re.focusOffset!==Y.offset)){var W=me.createRange();W.setStart(J.node,J.offset),re.removeAllRanges(),Re>st?(re.addRange(W),re.extend(Y.node,Y.offset)):(W.setEnd(Y.node,Y.offset),re.addRange(W))}}}}for(me=[],re=_;re=re.parentNode;)re.nodeType===1&&me.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<me.length;_++){var de=me[_];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}Fd=!!oh,ch=oh=null}finally{Xe=y,K.p=f,V.T=d}}s.current=l,Mt=2}}function xN(){if(Mt===2){Mt=0;var s=es,l=Hl,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=V.T,V.T=null;var f=K.p;K.p=2;var y=Xe;Xe|=4;try{Hj(s,l.alternate,l)}finally{Xe=y,K.p=f,V.T=d}}Mt=3}}function gN(){if(Mt===4||Mt===3){Mt=0,uf();var s=es,l=Hl,d=mn,f=rN;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Mt=5:(Mt=0,Hl=es=null,bN(s,s.pendingLanes));var y=s.pendingLanes;if(y===0&&(Zn=null),hf(d),l=l.stateNode,$t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(Gr,l,void 0,(l.current.flags&128)===128)}catch{}if(f!==null){l=V.T,y=K.p,K.p=2,V.T=null;try{for(var N=s.onRecoverableError,k=0;k<f.length;k++){var _=f[k];N(_.value,{componentStack:_.stack})}}finally{V.T=l,K.p=y}}(mn&3)!==0&&kd(),Lr(s),y=s.pendingLanes,(d&261930)!==0&&(y&42)!==0?s===Jp?go++:(go=0,Jp=s):go=0,bo(0)}}function bN(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Qi(l)))}function kd(){return hN(),xN(),gN(),yN()}function yN(){if(Mt!==5)return!1;var s=es,l=Kp;Kp=0;var d=hf(mn),f=V.T,y=K.p;try{K.p=32>d?32:d,V.T=null,d=Gp,Gp=null;var N=es,k=mn;if(Mt=0,Hl=es=null,mn=0,(Xe&6)!==0)throw Error(n(331));var _=Xe;if(Xe|=4,eN(N.current),Qj(N,N.current,k,d),Xe=_,bo(0,!1),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(Gr,N)}catch{}return!0}finally{K.p=y,V.T=f,bN(s,l)}}function vN(s,l,d){l=ar(d,l),l=Ep(s.stateNode,l,2),s=Kn(s,l,2),s!==null&&(Li(s,2),Lr(s))}function et(s,l,d){if(s.tag===3)vN(s,s,d);else for(;l!==null;){if(l.tag===3){vN(l,s,d);break}else if(l.tag===1){var f=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Zn===null||!Zn.has(f))){s=ar(d,s),d=jj(2),f=Kn(l,d,2),f!==null&&(Nj(d,f,l,s),Li(f,2),Lr(f));break}}l=l.return}}function Xp(s,l,d){var f=s.pingCache;if(f===null){f=s.pingCache=new ST;var y=new Set;f.set(l,y)}else y=f.get(l),y===void 0&&(y=new Set,f.set(l,y));y.has(d)||(Hp=!0,y.add(d),s=DT.bind(null,s,l,d),l.then(s,s))}function DT(s,l,d){var f=s.pingCache;f!==null&&f.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,it===s&&($e&d)===d&&(At===4||At===3&&($e&62914560)===$e&&300>ye()-Nd?(Xe&2)===0&&Vl(s,0):Vp|=d,ql===$e&&(ql=0)),Lr(s)}function jN(s,l){l===0&&(l=hy()),s=Ds(s,l),s!==null&&(Li(s,l),Lr(s))}function TT(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),jN(s,d)}function RT(s,l){var d=0;switch(s.tag){case 31:case 13:var f=s.stateNode,y=s.memoizedState;y!==null&&(d=y.retryLane);break;case 19:f=s.stateNode;break;case 22:f=s.stateNode._retryCache;break;default:throw Error(n(314))}f!==null&&f.delete(l),jN(s,d)}function PT(s,l){return Qa(s,l)}var Od=null,Kl=null,Zp=!1,Dd=!1,eh=!1,as=0;function Lr(s){s!==Kl&&s.next===null&&(Kl===null?Od=Kl=s:Kl=Kl.next=s),Dd=!0,Zp||(Zp=!0,_T())}function bo(s,l){if(!eh&&Dd){eh=!0;do for(var d=!1,f=Od;f!==null;){if(s!==0){var y=f.pendingLanes;if(y===0)var N=0;else{var k=f.suspendedLanes,_=f.pingedLanes;N=(1<<31-ea(42|s)+1)-1,N&=y&~(k&~_),N=N&201326741?N&201326741|1:N?N|2:0}N!==0&&(d=!0,SN(f,N))}else N=$e,N=Mc(f,f===it?N:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(N&3)===0||zi(f,N)||(d=!0,SN(f,N));f=f.next}while(d);eh=!1}}function MT(){NN()}function NN(){Dd=Zp=!1;var s=0;as!==0&&VT()&&(s=as);for(var l=ye(),d=null,f=Od;f!==null;){var y=f.next,N=wN(f,l);N===0?(f.next=null,d===null?Od=y:d.next=y,y===null&&(Kl=d)):(d=f,(s!==0||(N&3)!==0)&&(Dd=!0)),f=y}Mt!==0&&Mt!==5||bo(s),as!==0&&(as=0)}function wN(s,l){for(var d=s.suspendedLanes,f=s.pingedLanes,y=s.expirationTimes,N=s.pendingLanes&-62914561;0<N;){var k=31-ea(N),_=1<<k,q=y[k];q===-1?((_&d)===0||(_&f)!==0)&&(y[k]=iD(_,l)):q<=l&&(s.expiredLanes|=_),N&=~_}if(l=it,d=$e,d=Mc(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),f=s.callbackNode,d===0||s===l&&(Ze===2||Ze===9)||s.cancelPendingCommit!==null)return f!==null&&f!==null&&Ti(f),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||zi(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(f!==null&&Ti(f),hf(d)){case 2:case 8:d=St;break;case 32:d=Ut;break;case 268435456:d=Kr;break;default:d=Ut}return f=AN.bind(null,s),d=Qa(d,f),s.callbackPriority=l,s.callbackNode=d,l}return f!==null&&f!==null&&Ti(f),s.callbackPriority=2,s.callbackNode=null,2}function AN(s,l){if(Mt!==0&&Mt!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(kd()&&s.callbackNode!==d)return null;var f=$e;return f=Mc(s,s===it?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),f===0?null:(sN(s,f,l),wN(s,ye()),s.callbackNode!=null&&s.callbackNode===d?AN.bind(null,s):null)}function SN(s,l){if(kd())return null;sN(s,l,!0)}function _T(){KT(function(){(Xe&6)!==0?Qa(jt,MT):NN()})}function th(){if(as===0){var s=Rl;s===0&&(s=Tc,Tc<<=1,(Tc&261888)===0&&(Tc=256)),as=s}return as}function CN(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Bc(""+s)}function EN(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function zT(s,l,d,f,y){if(l==="submit"&&d&&d.stateNode===y){var N=CN((y[Aa]||null).action),k=f.submitter;k&&(l=(l=k[Aa]||null)?CN(l.formAction):k.getAttribute("formAction"),l!==null&&(N=l,k=null));var _=new $c("action","action",null,f,y);s.push({event:_,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(as!==0){var q=k?EN(y,k):new FormData(y);jp(d,{pending:!0,data:q,method:y.method,action:N},null,q)}}else typeof N=="function"&&(_.preventDefault(),q=k?EN(y,k):new FormData(y),jp(d,{pending:!0,data:q,method:y.method,action:N},N,q))},currentTarget:y}]})}}for(var ah=0;ah<Bf.length;ah++){var rh=Bf[ah],LT=rh.toLowerCase(),BT=rh[0].toUpperCase()+rh.slice(1);Nr(LT,"on"+BT)}Nr(nv,"onAnimationEnd"),Nr(sv,"onAnimationIteration"),Nr(lv,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(eT,"onTransitionRun"),Nr(tT,"onTransitionStart"),Nr(aT,"onTransitionCancel"),Nr(iv,"onTransitionEnd"),bl("onMouseEnter",["mouseout","mouseover"]),bl("onMouseLeave",["mouseout","mouseover"]),bl("onPointerEnter",["pointerout","pointerover"]),bl("onPointerLeave",["pointerout","pointerover"]),Cs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Cs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Cs("onBeforeInput",["compositionend","keypress","textInput","paste"]),Cs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Cs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Cs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yo="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(" "),IT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yo));function kN(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var f=s[d],y=f.event;f=f.listeners;e:{var N=void 0;if(l)for(var k=f.length-1;0<=k;k--){var _=f[k],q=_.instance,Q=_.currentTarget;if(_=_.listener,q!==N&&y.isPropagationStopped())break e;N=_,y.currentTarget=Q;try{N(y)}catch(oe){Vc(oe)}y.currentTarget=null,N=q}else for(k=0;k<f.length;k++){if(_=f[k],q=_.instance,Q=_.currentTarget,_=_.listener,q!==N&&y.isPropagationStopped())break e;N=_,y.currentTarget=Q;try{N(y)}catch(oe){Vc(oe)}y.currentTarget=null,N=q}}}}function Ue(s,l){var d=l[xf];d===void 0&&(d=l[xf]=new Set);var f=s+"__bubble";d.has(f)||(ON(l,s,2,!1),d.add(f))}function nh(s,l,d){var f=0;l&&(f|=4),ON(d,s,f,l)}var Td="_reactListening"+Math.random().toString(36).slice(2);function sh(s){if(!s[Td]){s[Td]=!0,Ny.forEach(function(d){d!=="selectionchange"&&(IT.has(d)||nh(d,!1,s),nh(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Td]||(l[Td]=!0,nh("selectionchange",!1,l))}}function ON(s,l,d,f){switch(n2(l)){case 2:var y=f6;break;case 8:y=p6;break;default:y=vh}d=y.bind(null,l,d,s),y=void 0,!Sf||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),f?y!==void 0?s.addEventListener(l,d,{capture:!0,passive:y}):s.addEventListener(l,d,!0):y!==void 0?s.addEventListener(l,d,{passive:y}):s.addEventListener(l,d,!1)}function lh(s,l,d,f,y){var N=f;if((l&1)===0&&(l&2)===0&&f!==null)e:for(;;){if(f===null)return;var k=f.tag;if(k===3||k===4){var _=f.stateNode.containerInfo;if(_===y)break;if(k===4)for(k=f.return;k!==null;){var q=k.tag;if((q===3||q===4)&&k.stateNode.containerInfo===y)return;k=k.return}for(;_!==null;){if(k=hl(_),k===null)return;if(q=k.tag,q===5||q===6||q===26||q===27){f=N=k;continue e}_=_.parentNode}}f=f.return}My(function(){var Q=N,oe=wf(d),me=[];e:{var Z=ov.get(s);if(Z!==void 0){var re=$c,Se=s;switch(s){case"keypress":if(Fc(d)===0)break e;case"keydown":case"keyup":re=RD;break;case"focusin":Se="focus",re=Of;break;case"focusout":Se="blur",re=Of;break;case"beforeblur":case"afterblur":re=Of;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Ly;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=vD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=_D;break;case nv:case sv:case lv:re=wD;break;case iv:re=LD;break;case"scroll":case"scrollend":re=bD;break;case"wheel":re=ID;break;case"copy":case"cut":case"paste":re=SD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=Iy;break;case"toggle":case"beforetoggle":re=UD}var Re=(l&4)!==0,st=!Re&&(s==="scroll"||s==="scrollend"),J=Re?Z!==null?Z+"Capture":null:Z;Re=[];for(var Y=Q,W;Y!==null;){var de=Y;if(W=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||W===null||J===null||(de=Fi(Y,J),de!=null&&Re.push(vo(Y,de,W))),st)break;Y=Y.return}0<Re.length&&(Z=new re(Z,Se,null,d,oe),me.push({event:Z,listeners:Re}))}}if((l&7)===0){e:{if(Z=s==="mouseover"||s==="pointerover",re=s==="mouseout"||s==="pointerout",Z&&d!==Nf&&(Se=d.relatedTarget||d.fromElement)&&(hl(Se)||Se[pl]))break e;if((re||Z)&&(Z=oe.window===oe?oe:(Z=oe.ownerDocument)?Z.defaultView||Z.parentWindow:window,re?(Se=d.relatedTarget||d.toElement,re=Q,Se=Se?hl(Se):null,Se!==null&&(st=o(Se),Re=Se.tag,Se!==st||Re!==5&&Re!==27&&Re!==6)&&(Se=null)):(re=null,Se=Q),re!==Se)){if(Re=Ly,de="onMouseLeave",J="onMouseEnter",Y="mouse",(s==="pointerout"||s==="pointerover")&&(Re=Iy,de="onPointerLeave",J="onPointerEnter",Y="pointer"),st=re==null?Z:Ii(re),W=Se==null?Z:Ii(Se),Z=new Re(de,Y+"leave",re,d,oe),Z.target=st,Z.relatedTarget=W,de=null,hl(oe)===Q&&(Re=new Re(J,Y+"enter",Se,d,oe),Re.target=W,Re.relatedTarget=st,de=Re),st=de,re&&Se)t:{for(Re=FT,J=re,Y=Se,W=0,de=J;de;de=Re(de))W++;de=0;for(var Oe=Y;Oe;Oe=Re(Oe))de++;for(;0<W-de;)J=Re(J),W--;for(;0<de-W;)Y=Re(Y),de--;for(;W--;){if(J===Y||Y!==null&&J===Y.alternate){Re=J;break t}J=Re(J),Y=Re(Y)}Re=null}else Re=null;re!==null&&DN(me,Z,re,Re,!1),Se!==null&&st!==null&&DN(me,st,Se,Re,!0)}}e:{if(Z=Q?Ii(Q):window,re=Z.nodeName&&Z.nodeName.toLowerCase(),re==="select"||re==="input"&&Z.type==="file")var Ge=Ky;else if(Vy(Z))if(Gy)Ge=QD;else{Ge=JD;var Ee=GD}else re=Z.nodeName,!re||re.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?Q&&jf(Q.elementType)&&(Ge=Ky):Ge=WD;if(Ge&&(Ge=Ge(s,Q))){Yy(me,Ge,d,oe);break e}Ee&&Ee(s,Z,Q),s==="focusout"&&Q&&Z.type==="number"&&Q.memoizedProps.value!=null&&vf(Z,"number",Z.value)}switch(Ee=Q?Ii(Q):window,s){case"focusin":(Vy(Ee)||Ee.contentEditable==="true")&&(Al=Ee,_f=Q,Gi=null);break;case"focusout":Gi=_f=Al=null;break;case"mousedown":zf=!0;break;case"contextmenu":case"mouseup":case"dragend":zf=!1,av(me,d,oe);break;case"selectionchange":if(ZD)break;case"keydown":case"keyup":av(me,d,oe)}var Ie;if(Tf)e:{switch(s){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else wl?qy(s,d)&&(qe="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(qe="onCompositionStart");qe&&(Fy&&d.locale!=="ko"&&(wl||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&wl&&(Ie=_y()):(Fn=oe,Cf="value"in Fn?Fn.value:Fn.textContent,wl=!0)),Ee=Rd(Q,qe),0<Ee.length&&(qe=new By(qe,s,null,d,oe),me.push({event:qe,listeners:Ee}),Ie?qe.data=Ie:(Ie=Hy(d),Ie!==null&&(qe.data=Ie)))),(Ie=qD?HD(s,d):VD(s,d))&&(qe=Rd(Q,"onBeforeInput"),0<qe.length&&(Ee=new By("onBeforeInput","beforeinput",null,d,oe),me.push({event:Ee,listeners:qe}),Ee.data=Ie)),zT(me,s,Q,d,oe)}kN(me,l)})}function vo(s,l,d){return{instance:s,listener:l,currentTarget:d}}function Rd(s,l){for(var d=l+"Capture",f=[];s!==null;){var y=s,N=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||N===null||(y=Fi(s,d),y!=null&&f.unshift(vo(s,y,N)),y=Fi(s,l),y!=null&&f.push(vo(s,y,N))),s.tag===3)return f;s=s.return}return[]}function FT(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function DN(s,l,d,f,y){for(var N=l._reactName,k=[];d!==null&&d!==f;){var _=d,q=_.alternate,Q=_.stateNode;if(_=_.tag,q!==null&&q===f)break;_!==5&&_!==26&&_!==27||Q===null||(q=Q,y?(Q=Fi(d,N),Q!=null&&k.unshift(vo(d,Q,q))):y||(Q=Fi(d,N),Q!=null&&k.push(vo(d,Q,q)))),d=d.return}k.length!==0&&s.push({event:l,listeners:k})}var UT=/\r\n?/g,$T=/\u0000|\uFFFD/g;function TN(s){return(typeof s=="string"?s:""+s).replace(UT,`
`).replace($T,"")}function RN(s,l){return l=TN(l),TN(s)===l}function nt(s,l,d,f,y,N){switch(d){case"children":typeof f=="string"?l==="body"||l==="textarea"&&f===""||vl(s,f):(typeof f=="number"||typeof f=="bigint")&&l!=="body"&&vl(s,""+f);break;case"className":zc(s,"class",f);break;case"tabIndex":zc(s,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":zc(s,d,f);break;case"style":Ry(s,f,N);break;case"data":if(l!=="object"){zc(s,"data",f);break}case"src":case"href":if(f===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){s.removeAttribute(d);break}f=Bc(""+f),s.setAttribute(d,f);break;case"action":case"formAction":if(typeof f=="function"){s.setAttribute(d,"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 N=="function"&&(d==="formAction"?(l!=="input"&&nt(s,l,"name",y.name,y,null),nt(s,l,"formEncType",y.formEncType,y,null),nt(s,l,"formMethod",y.formMethod,y,null),nt(s,l,"formTarget",y.formTarget,y,null)):(nt(s,l,"encType",y.encType,y,null),nt(s,l,"method",y.method,y,null),nt(s,l,"target",y.target,y,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){s.removeAttribute(d);break}f=Bc(""+f),s.setAttribute(d,f);break;case"onClick":f!=null&&(s.onclick=Wr);break;case"onScroll":f!=null&&Ue("scroll",s);break;case"onScrollEnd":f!=null&&Ue("scrollend",s);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(n(61));if(d=f.__html,d!=null){if(y.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"multiple":s.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":s.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){s.removeAttribute("xlink:href");break}d=Bc(""+f),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?s.setAttribute(d,""+f):s.removeAttribute(d);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":f&&typeof f!="function"&&typeof f!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":f===!0?s.setAttribute(d,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?s.setAttribute(d,f):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?s.setAttribute(d,f):s.removeAttribute(d);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?s.removeAttribute(d):s.setAttribute(d,f);break;case"popover":Ue("beforetoggle",s),Ue("toggle",s),_c(s,"popover",f);break;case"xlinkActuate":Jr(s,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Jr(s,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Jr(s,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Jr(s,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Jr(s,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Jr(s,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Jr(s,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Jr(s,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Jr(s,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":_c(s,"is",f);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=xD.get(d)||d,_c(s,d,f))}}function ih(s,l,d,f,y,N){switch(d){case"style":Ry(s,f,N);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(n(61));if(d=f.__html,d!=null){if(y.children!=null)throw Error(n(60));s.innerHTML=d}}break;case"children":typeof f=="string"?vl(s,f):(typeof f=="number"||typeof f=="bigint")&&vl(s,""+f);break;case"onScroll":f!=null&&Ue("scroll",s);break;case"onScrollEnd":f!=null&&Ue("scrollend",s);break;case"onClick":f!=null&&(s.onclick=Wr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wy.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),l=d.slice(2,y?d.length-7:void 0),N=s[Aa]||null,N=N!=null?N[d]:null,typeof N=="function"&&s.removeEventListener(l,N,y),typeof f=="function")){typeof N!="function"&&N!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,f,y);break e}d in s?s[d]=f:f===!0?s.setAttribute(d,""):_c(s,d,f)}}}function sa(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ue("error",s),Ue("load",s);var f=!1,y=!1,N;for(N in d)if(d.hasOwnProperty(N)){var k=d[N];if(k!=null)switch(N){case"src":f=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:nt(s,l,N,k,d,null)}}y&&nt(s,l,"srcSet",d.srcSet,d,null),f&&nt(s,l,"src",d.src,d,null);return;case"input":Ue("invalid",s);var _=N=k=y=null,q=null,Q=null;for(f in d)if(d.hasOwnProperty(f)){var oe=d[f];if(oe!=null)switch(f){case"name":y=oe;break;case"type":k=oe;break;case"checked":q=oe;break;case"defaultChecked":Q=oe;break;case"value":N=oe;break;case"defaultValue":_=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(n(137,l));break;default:nt(s,l,f,oe,d,null)}}ky(s,N,_,q,Q,k,y,!1);return;case"select":Ue("invalid",s),f=k=N=null;for(y in d)if(d.hasOwnProperty(y)&&(_=d[y],_!=null))switch(y){case"value":N=_;break;case"defaultValue":k=_;break;case"multiple":f=_;default:nt(s,l,y,_,d,null)}l=N,d=k,s.multiple=!!f,l!=null?yl(s,!!f,l,!1):d!=null&&yl(s,!!f,d,!0);return;case"textarea":Ue("invalid",s),N=y=f=null;for(k in d)if(d.hasOwnProperty(k)&&(_=d[k],_!=null))switch(k){case"value":f=_;break;case"defaultValue":y=_;break;case"children":N=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(n(91));break;default:nt(s,l,k,_,d,null)}Dy(s,f,y,N);return;case"option":for(q in d)if(d.hasOwnProperty(q)&&(f=d[q],f!=null))switch(q){case"selected":s.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:nt(s,l,q,f,d,null)}return;case"dialog":Ue("beforetoggle",s),Ue("toggle",s),Ue("cancel",s),Ue("close",s);break;case"iframe":case"object":Ue("load",s);break;case"video":case"audio":for(f=0;f<yo.length;f++)Ue(yo[f],s);break;case"image":Ue("error",s),Ue("load",s);break;case"details":Ue("toggle",s);break;case"embed":case"source":case"link":Ue("error",s),Ue("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in d)if(d.hasOwnProperty(Q)&&(f=d[Q],f!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,l));default:nt(s,l,Q,f,d,null)}return;default:if(jf(l)){for(oe in d)d.hasOwnProperty(oe)&&(f=d[oe],f!==void 0&&ih(s,l,oe,f,d,void 0));return}}for(_ in d)d.hasOwnProperty(_)&&(f=d[_],f!=null&&nt(s,l,_,f,d,null))}function qT(s,l,d,f){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,N=null,k=null,_=null,q=null,Q=null,oe=null;for(re in d){var me=d[re];if(d.hasOwnProperty(re)&&me!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":q=me;default:f.hasOwnProperty(re)||nt(s,l,re,null,f,me)}}for(var Z in f){var re=f[Z];if(me=d[Z],f.hasOwnProperty(Z)&&(re!=null||me!=null))switch(Z){case"type":N=re;break;case"name":y=re;break;case"checked":Q=re;break;case"defaultChecked":oe=re;break;case"value":k=re;break;case"defaultValue":_=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(n(137,l));break;default:re!==me&&nt(s,l,Z,re,f,me)}}yf(s,k,_,q,Q,oe,N,y);return;case"select":re=k=_=Z=null;for(N in d)if(q=d[N],d.hasOwnProperty(N)&&q!=null)switch(N){case"value":break;case"multiple":re=q;default:f.hasOwnProperty(N)||nt(s,l,N,null,f,q)}for(y in f)if(N=f[y],q=d[y],f.hasOwnProperty(y)&&(N!=null||q!=null))switch(y){case"value":Z=N;break;case"defaultValue":_=N;break;case"multiple":k=N;default:N!==q&&nt(s,l,y,N,f,q)}l=_,d=k,f=re,Z!=null?yl(s,!!d,Z,!1):!!f!=!!d&&(l!=null?yl(s,!!d,l,!0):yl(s,!!d,d?[]:"",!1));return;case"textarea":re=Z=null;for(_ in d)if(y=d[_],d.hasOwnProperty(_)&&y!=null&&!f.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:nt(s,l,_,null,f,y)}for(k in f)if(y=f[k],N=d[k],f.hasOwnProperty(k)&&(y!=null||N!=null))switch(k){case"value":Z=y;break;case"defaultValue":re=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(n(91));break;default:y!==N&&nt(s,l,k,y,f,N)}Oy(s,Z,re);return;case"option":for(var Se in d)if(Z=d[Se],d.hasOwnProperty(Se)&&Z!=null&&!f.hasOwnProperty(Se))switch(Se){case"selected":s.selected=!1;break;default:nt(s,l,Se,null,f,Z)}for(q in f)if(Z=f[q],re=d[q],f.hasOwnProperty(q)&&Z!==re&&(Z!=null||re!=null))switch(q){case"selected":s.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:nt(s,l,q,Z,f,re)}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 Re in d)Z=d[Re],d.hasOwnProperty(Re)&&Z!=null&&!f.hasOwnProperty(Re)&&nt(s,l,Re,null,f,Z);for(Q in f)if(Z=f[Q],re=d[Q],f.hasOwnProperty(Q)&&Z!==re&&(Z!=null||re!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(n(137,l));break;default:nt(s,l,Q,Z,f,re)}return;default:if(jf(l)){for(var st in d)Z=d[st],d.hasOwnProperty(st)&&Z!==void 0&&!f.hasOwnProperty(st)&&ih(s,l,st,void 0,f,Z);for(oe in f)Z=f[oe],re=d[oe],!f.hasOwnProperty(oe)||Z===re||Z===void 0&&re===void 0||ih(s,l,oe,Z,f,re);return}}for(var J in d)Z=d[J],d.hasOwnProperty(J)&&Z!=null&&!f.hasOwnProperty(J)&&nt(s,l,J,null,f,Z);for(me in f)Z=f[me],re=d[me],!f.hasOwnProperty(me)||Z===re||Z==null&&re==null||nt(s,l,me,Z,f,re)}function PN(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function HT(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),f=0;f<d.length;f++){var y=d[f],N=y.transferSize,k=y.initiatorType,_=y.duration;if(N&&_&&PN(k)){for(k=0,_=y.responseEnd,f+=1;f<d.length;f++){var q=d[f],Q=q.startTime;if(Q>_)break;var oe=q.transferSize,me=q.initiatorType;oe&&PN(me)&&(q=q.responseEnd,k+=oe*(q<_?1:(_-Q)/(q-Q)))}if(--f,l+=8*(N+k)/(y.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var oh=null,ch=null;function Pd(s){return s.nodeType===9?s:s.ownerDocument}function MN(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _N(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function dh(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var uh=null;function VT(){var s=window.event;return s&&s.type==="popstate"?s===uh?!1:(uh=s,!0):(uh=null,!1)}var zN=typeof setTimeout=="function"?setTimeout:void 0,YT=typeof clearTimeout=="function"?clearTimeout:void 0,LN=typeof Promise=="function"?Promise:void 0,KT=typeof queueMicrotask=="function"?queueMicrotask:typeof LN<"u"?function(s){return LN.resolve(null).then(s).catch(GT)}:zN;function GT(s){setTimeout(function(){throw s})}function rs(s){return s==="head"}function BN(s,l){var d=l,f=0;do{var y=d.nextSibling;if(s.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(f===0){s.removeChild(y),Ql(l);return}f--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")f++;else if(d==="html")jo(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,jo(d);for(var N=d.firstChild;N;){var k=N.nextSibling,_=N.nodeName;N[Bi]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&N.rel.toLowerCase()==="stylesheet"||d.removeChild(N),N=k}}else d==="body"&&jo(s.ownerDocument.body);d=y}while(d);Ql(l)}function IN(s,l){var d=s;s=0;do{var f=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),f&&f.nodeType===8)if(d=f.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=f}while(d)}function mh(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":mh(d),gf(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function JT(s,l,d,f){for(;s.nodeType===1;){var y=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!f&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(f){if(!s[Bi])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(N=s.getAttribute("rel"),N==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(N!==y.rel||s.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||s.getAttribute("title")!==(y.title==null?null:y.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(N=s.getAttribute("src"),(N!==(y.src==null?null:y.src)||s.getAttribute("type")!==(y.type==null?null:y.type)||s.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&N&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var N=y.name==null?null:""+y.name;if(y.type==="hidden"&&s.getAttribute("name")===N)return s}else return s;if(s=ir(s.nextSibling),s===null)break}return null}function WT(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ir(s.nextSibling),s===null))return null;return s}function FN(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ir(s.nextSibling),s===null))return null;return s}function fh(s){return s.data==="$?"||s.data==="$~"}function ph(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function QT(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var f=function(){l(),d.removeEventListener("DOMContentLoaded",f)};d.addEventListener("DOMContentLoaded",f),s._reactRetry=f}}function ir(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var hh=null;function UN(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ir(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function $N(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function qN(s,l,d){switch(l=Pd(d),s){case"html":if(s=l.documentElement,!s)throw Error(n(452));return s;case"head":if(s=l.head,!s)throw Error(n(453));return s;case"body":if(s=l.body,!s)throw Error(n(454));return s;default:throw Error(n(451))}}function jo(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);gf(s)}var or=new Map,HN=new Set;function Md(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var fn=K.d;K.d={f:XT,r:ZT,D:e6,C:t6,L:a6,m:r6,X:s6,S:n6,M:l6};function XT(){var s=fn.f(),l=Sd();return s||l}function ZT(s){var l=xl(s);l!==null&&l.tag===5&&l.type==="form"?ij(l):fn.r(s)}var Gl=typeof document>"u"?null:document;function VN(s,l,d){var f=Gl;if(f&&typeof l=="string"&&l){var y=er(l);y='link[rel="'+s+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),HN.has(y)||(HN.add(y),s={rel:s,crossOrigin:d,href:l},f.querySelector(y)===null&&(l=f.createElement("link"),sa(l,"link",s),qt(l),f.head.appendChild(l)))}}function e6(s){fn.D(s),VN("dns-prefetch",s,null)}function t6(s,l){fn.C(s,l),VN("preconnect",s,l)}function a6(s,l,d){fn.L(s,l,d);var f=Gl;if(f&&s&&l){var y='link[rel="preload"][as="'+er(l)+'"]';l==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+er(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+er(d.imageSizes)+'"]')):y+='[href="'+er(s)+'"]';var N=y;switch(l){case"style":N=Jl(s);break;case"script":N=Wl(s)}or.has(N)||(s=x({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),or.set(N,s),f.querySelector(y)!==null||l==="style"&&f.querySelector(No(N))||l==="script"&&f.querySelector(wo(N))||(l=f.createElement("link"),sa(l,"link",s),qt(l),f.head.appendChild(l)))}}function r6(s,l){fn.m(s,l);var d=Gl;if(d&&s){var f=l&&typeof l.as=="string"?l.as:"script",y='link[rel="modulepreload"][as="'+er(f)+'"][href="'+er(s)+'"]',N=y;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":N=Wl(s)}if(!or.has(N)&&(s=x({rel:"modulepreload",href:s},l),or.set(N,s),d.querySelector(y)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(wo(N)))return}f=d.createElement("link"),sa(f,"link",s),qt(f),d.head.appendChild(f)}}}function n6(s,l,d){fn.S(s,l,d);var f=Gl;if(f&&s){var y=gl(f).hoistableStyles,N=Jl(s);l=l||"default";var k=y.get(N);if(!k){var _={loading:0,preload:null};if(k=f.querySelector(No(N)))_.loading=5;else{s=x({rel:"stylesheet",href:s,"data-precedence":l},d),(d=or.get(N))&&xh(s,d);var q=k=f.createElement("link");qt(q),sa(q,"link",s),q._p=new Promise(function(Q,oe){q.onload=Q,q.onerror=oe}),q.addEventListener("load",function(){_.loading|=1}),q.addEventListener("error",function(){_.loading|=2}),_.loading|=4,_d(k,l,f)}k={type:"stylesheet",instance:k,count:1,state:_},y.set(N,k)}}}function s6(s,l){fn.X(s,l);var d=Gl;if(d&&s){var f=gl(d).hoistableScripts,y=Wl(s),N=f.get(y);N||(N=d.querySelector(wo(y)),N||(s=x({src:s,async:!0},l),(l=or.get(y))&&gh(s,l),N=d.createElement("script"),qt(N),sa(N,"link",s),d.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},f.set(y,N))}}function l6(s,l){fn.M(s,l);var d=Gl;if(d&&s){var f=gl(d).hoistableScripts,y=Wl(s),N=f.get(y);N||(N=d.querySelector(wo(y)),N||(s=x({src:s,async:!0,type:"module"},l),(l=or.get(y))&&gh(s,l),N=d.createElement("script"),qt(N),sa(N,"link",s),d.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},f.set(y,N))}}function YN(s,l,d,f){var y=(y=ue.current)?Md(y):null;if(!y)throw Error(n(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Jl(d.href),d=gl(y).hoistableStyles,f=d.get(l),f||(f={type:"style",instance:null,count:0,state:null},d.set(l,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=Jl(d.href);var N=gl(y).hoistableStyles,k=N.get(s);if(k||(y=y.ownerDocument||y,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},N.set(s,k),(N=y.querySelector(No(s)))&&!N._p&&(k.instance=N,k.state.loading=5),or.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},or.set(s,d),N||i6(y,s,d,k.state))),l&&f===null)throw Error(n(528,""));return k}if(l&&f!==null)throw Error(n(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Wl(d),d=gl(y).hoistableScripts,f=d.get(l),f||(f={type:"script",instance:null,count:0,state:null},d.set(l,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,s))}}function Jl(s){return'href="'+er(s)+'"'}function No(s){return'link[rel="stylesheet"]['+s+"]"}function KN(s){return x({},s,{"data-precedence":s.precedence,precedence:null})}function i6(s,l,d,f){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?f.loading=1:(l=s.createElement("link"),f.preload=l,l.addEventListener("load",function(){return f.loading|=1}),l.addEventListener("error",function(){return f.loading|=2}),sa(l,"link",d),qt(l),s.head.appendChild(l))}function Wl(s){return'[src="'+er(s)+'"]'}function wo(s){return"script[async]"+s}function GN(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var f=s.querySelector('style[data-href~="'+er(d.href)+'"]');if(f)return l.instance=f,qt(f),f;var y=x({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return f=(s.ownerDocument||s).createElement("style"),qt(f),sa(f,"style",y),_d(f,d.precedence,s),l.instance=f;case"stylesheet":y=Jl(d.href);var N=s.querySelector(No(y));if(N)return l.state.loading|=4,l.instance=N,qt(N),N;f=KN(d),(y=or.get(y))&&xh(f,y),N=(s.ownerDocument||s).createElement("link"),qt(N);var k=N;return k._p=new Promise(function(_,q){k.onload=_,k.onerror=q}),sa(N,"link",f),l.state.loading|=4,_d(N,d.precedence,s),l.instance=N;case"script":return N=Wl(d.src),(y=s.querySelector(wo(N)))?(l.instance=y,qt(y),y):(f=d,(y=or.get(N))&&(f=x({},d),gh(f,y)),s=s.ownerDocument||s,y=s.createElement("script"),qt(y),sa(y,"link",f),s.head.appendChild(y),l.instance=y);case"void":return null;default:throw Error(n(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(f=l.instance,l.state.loading|=4,_d(f,d.precedence,s));return l.instance}function _d(s,l,d){for(var f=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=f.length?f[f.length-1]:null,N=y,k=0;k<f.length;k++){var _=f[k];if(_.dataset.precedence===l)N=_;else if(N!==y)break}N?N.parentNode.insertBefore(s,N.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function xh(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function gh(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var zd=null;function JN(s,l,d){if(zd===null){var f=new Map,y=zd=new Map;y.set(d,f)}else y=zd,f=y.get(d),f||(f=new Map,y.set(d,f));if(f.has(s))return f;for(f.set(s,null),d=d.getElementsByTagName(s),y=0;y<d.length;y++){var N=d[y];if(!(N[Bi]||N[ta]||s==="link"&&N.getAttribute("rel")==="stylesheet")&&N.namespaceURI!=="http://www.w3.org/2000/svg"){var k=N.getAttribute(l)||"";k=s+k;var _=f.get(k);_?_.push(N):f.set(k,[N])}}return f}function WN(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function o6(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function QN(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function c6(s,l,d,f){if(d.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var y=Jl(f.href),N=l.querySelector(No(y));if(N){l=N._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Ld.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=N,qt(N);return}N=l.ownerDocument||l,f=KN(f),(y=or.get(y))&&xh(f,y),N=N.createElement("link"),qt(N);var k=N;k._p=new Promise(function(_,q){k.onload=_,k.onerror=q}),sa(N,"link",f),d.instance=N}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=Ld.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var bh=0;function d6(s,l){return s.stylesheets&&s.count===0&&Id(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var f=setTimeout(function(){if(s.stylesheets&&Id(s,s.stylesheets),s.unsuspend){var N=s.unsuspend;s.unsuspend=null,N()}},6e4+l);0<s.imgBytes&&bh===0&&(bh=62500*HT());var y=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&Id(s,s.stylesheets),s.unsuspend)){var N=s.unsuspend;s.unsuspend=null,N()}},(s.imgBytes>bh?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(f),clearTimeout(y)}}:null}function Ld(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Id(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Bd=null;function Id(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Bd=new Map,l.forEach(u6,s),Bd=null,Ld.call(s))}function u6(s,l){if(!(l.state.loading&4)){var d=Bd.get(s);if(d)var f=d.get(null);else{d=new Map,Bd.set(s,d);for(var y=s.querySelectorAll("link[data-precedence],style[data-precedence]"),N=0;N<y.length;N++){var k=y[N];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(d.set(k.dataset.precedence,k),f=k)}f&&d.set(null,f)}y=l.instance,k=y.getAttribute("data-precedence"),N=d.get(k)||f,N===f&&d.set(null,y),d.set(k,y),this.count++,f=Ld.bind(this),y.addEventListener("load",f),y.addEventListener("error",f),N?N.parentNode.insertBefore(y,N.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(y,s.firstChild)),l.state.loading|=4}}var Ao={$$typeof:E,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function m6(s,l,d,f,y,N,k,_,q){this.tag=1,this.containerInfo=s,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=ff(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ff(0),this.hiddenUpdates=ff(null),this.identifierPrefix=f,this.onUncaughtError=y,this.onCaughtError=N,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function XN(s,l,d,f,y,N,k,_,q,Q,oe,me){return s=new m6(s,l,d,k,q,Q,oe,me,_),l=1,N===!0&&(l|=24),N=Ba(3,null,null,l),s.current=N,N.stateNode=s,l=Qf(),l.refCount++,s.pooledCache=l,l.refCount++,N.memoizedState={element:f,isDehydrated:d,cache:l},tp(N),s}function ZN(s){return s?(s=El,s):El}function e2(s,l,d,f,y,N){y=ZN(y),f.context===null?f.context=y:f.pendingContext=y,f=Yn(l),f.payload={element:d},N=N===void 0?null:N,N!==null&&(f.callback=N),d=Kn(s,f,l),d!==null&&(Da(d,s,l),to(d,s,l))}function t2(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function yh(s,l){t2(s,l),(s=s.alternate)&&t2(s,l)}function a2(s){if(s.tag===13||s.tag===31){var l=Ds(s,67108864);l!==null&&Da(l,s,67108864),yh(s,67108864)}}function r2(s){if(s.tag===13||s.tag===31){var l=qa();l=pf(l);var d=Ds(s,l);d!==null&&Da(d,s,l),yh(s,l)}}var Fd=!0;function f6(s,l,d,f){var y=V.T;V.T=null;var N=K.p;try{K.p=2,vh(s,l,d,f)}finally{K.p=N,V.T=y}}function p6(s,l,d,f){var y=V.T;V.T=null;var N=K.p;try{K.p=8,vh(s,l,d,f)}finally{K.p=N,V.T=y}}function vh(s,l,d,f){if(Fd){var y=jh(f);if(y===null)lh(s,l,f,Ud,d),s2(s,f);else if(x6(y,s,l,d,f))f.stopPropagation();else if(s2(s,f),l&4&&-1<h6.indexOf(s)){for(;y!==null;){var N=xl(y);if(N!==null)switch(N.tag){case 3:if(N=N.stateNode,N.current.memoizedState.isDehydrated){var k=Ss(N.pendingLanes);if(k!==0){var _=N;for(_.pendingLanes|=2,_.entangledLanes|=2;k;){var q=1<<31-ea(k);_.entanglements[1]|=q,k&=~q}Lr(N),(Xe&6)===0&&(wd=ye()+500,bo(0))}}break;case 31:case 13:_=Ds(N,2),_!==null&&Da(_,N,2),Sd(),yh(N,2)}if(N=jh(f),N===null&&lh(s,l,f,Ud,d),N===y)break;y=N}y!==null&&f.stopPropagation()}else lh(s,l,f,null,d)}}function jh(s){return s=wf(s),Nh(s)}var Ud=null;function Nh(s){if(Ud=null,s=hl(s),s!==null){var l=o(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=c(l),s!==null)return s;s=null}else if(d===31){if(s=m(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return Ud=s,null}function n2(s){switch(s){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(Pe()){case jt:return 2;case St:return 8;case Ut:case As:return 32;case Kr:return 268435456;default:return 32}default:return 32}}var wh=!1,ns=null,ss=null,ls=null,So=new Map,Co=new Map,is=[],h6="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 s2(s,l){switch(s){case"focusin":case"focusout":ns=null;break;case"dragenter":case"dragleave":ss=null;break;case"mouseover":case"mouseout":ls=null;break;case"pointerover":case"pointerout":So.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Co.delete(l.pointerId)}}function Eo(s,l,d,f,y,N){return s===null||s.nativeEvent!==N?(s={blockedOn:l,domEventName:d,eventSystemFlags:f,nativeEvent:N,targetContainers:[y]},l!==null&&(l=xl(l),l!==null&&a2(l)),s):(s.eventSystemFlags|=f,l=s.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),s)}function x6(s,l,d,f,y){switch(l){case"focusin":return ns=Eo(ns,s,l,d,f,y),!0;case"dragenter":return ss=Eo(ss,s,l,d,f,y),!0;case"mouseover":return ls=Eo(ls,s,l,d,f,y),!0;case"pointerover":var N=y.pointerId;return So.set(N,Eo(So.get(N)||null,s,l,d,f,y)),!0;case"gotpointercapture":return N=y.pointerId,Co.set(N,Eo(Co.get(N)||null,s,l,d,f,y)),!0}return!1}function l2(s){var l=hl(s.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=c(d),l!==null){s.blockedOn=l,vy(s.priority,function(){r2(d)});return}}else if(l===31){if(l=m(d),l!==null){s.blockedOn=l,vy(s.priority,function(){r2(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function $d(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=jh(s.nativeEvent);if(d===null){d=s.nativeEvent;var f=new d.constructor(d.type,d);Nf=f,d.target.dispatchEvent(f),Nf=null}else return l=xl(d),l!==null&&a2(l),s.blockedOn=d,!1;l.shift()}return!0}function i2(s,l,d){$d(s)&&d.delete(l)}function g6(){wh=!1,ns!==null&&$d(ns)&&(ns=null),ss!==null&&$d(ss)&&(ss=null),ls!==null&&$d(ls)&&(ls=null),So.forEach(i2),Co.forEach(i2)}function qd(s,l){s.blockedOn===l&&(s.blockedOn=null,wh||(wh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,g6)))}var Hd=null;function o2(s){Hd!==s&&(Hd=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Hd===s&&(Hd=null);for(var l=0;l<s.length;l+=3){var d=s[l],f=s[l+1],y=s[l+2];if(typeof f!="function"){if(Nh(f||d)===null)continue;break}var N=xl(d);N!==null&&(s.splice(l,3),l-=3,jp(N,{pending:!0,data:y,method:d.method,action:f},f,y))}}))}function Ql(s){function l(q){return qd(q,s)}ns!==null&&qd(ns,s),ss!==null&&qd(ss,s),ls!==null&&qd(ls,s),So.forEach(l),Co.forEach(l);for(var d=0;d<is.length;d++){var f=is[d];f.blockedOn===s&&(f.blockedOn=null)}for(;0<is.length&&(d=is[0],d.blockedOn===null);)l2(d),d.blockedOn===null&&is.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(f=0;f<d.length;f+=3){var y=d[f],N=d[f+1],k=y[Aa]||null;if(typeof N=="function")k||o2(d);else if(k){var _=null;if(N&&N.hasAttribute("formAction")){if(y=N,k=N[Aa]||null)_=k.formAction;else if(Nh(y)!==null)continue}else _=k.action;typeof _=="function"?d[f+1]=_:(d.splice(f,3),f-=3),o2(d)}}}function c2(){function s(N){N.canIntercept&&N.info==="react-transition"&&N.intercept({handler:function(){return new Promise(function(k){return y=k})},focusReset:"manual",scroll:"manual"})}function l(){y!==null&&(y(),y=null),f||setTimeout(d,20)}function d(){if(!f&&!navigation.transition){var N=navigation.currentEntry;N&&N.url!=null&&navigation.navigate(N.url,{state:N.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,y=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){f=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),y!==null&&(y(),y=null)}}}function Ah(s){this._internalRoot=s}Vd.prototype.render=Ah.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(n(409));var d=l.current,f=qa();e2(d,f,s,l,null,null)},Vd.prototype.unmount=Ah.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;e2(s.current,2,null,s,null,null),Sd(),l[pl]=null}};function Vd(s){this._internalRoot=s}Vd.prototype.unstable_scheduleHydration=function(s){if(s){var l=yy();s={blockedOn:null,target:s,priority:l};for(var d=0;d<is.length&&l!==0&&l<is[d].priority;d++);is.splice(d,0,s),d===0&&l2(s)}};var d2=a.version;if(d2!=="19.2.0")throw Error(n(527,d2,"19.2.0"));K.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(n(188)):(s=Object.keys(s).join(","),Error(n(268,s)));return s=h(l),s=s!==null?p(s):null,s=s===null?null:s.stateNode,s};var b6={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yd.isDisabled&&Yd.supportsFiber)try{Gr=Yd.inject(b6),$t=Yd}catch{}}return Oo.createRoot=function(s,l){if(!i(s))throw Error(n(299));var d=!1,f="",y=gj,N=bj,k=yj;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError)),l=XN(s,1,!1,null,null,d,f,null,y,N,k,c2),s[pl]=l.current,sh(s),new Ah(l)},Oo.hydrateRoot=function(s,l,d){if(!i(s))throw Error(n(299));var f=!1,y="",N=gj,k=bj,_=yj,q=null;return d!=null&&(d.unstable_strictMode===!0&&(f=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(N=d.onUncaughtError),d.onCaughtError!==void 0&&(k=d.onCaughtError),d.onRecoverableError!==void 0&&(_=d.onRecoverableError),d.formState!==void 0&&(q=d.formState)),l=XN(s,1,!0,l,d??null,f,y,q,N,k,_,c2),l.context=ZN(null),d=l.current,f=qa(),f=pf(f),y=Yn(f),y.callback=null,Kn(d,y,f),d=f,l.current.lanes=d,Li(l,d),Lr(l),s[pl]=l.current,sh(s),new Vd(l)},Oo.version="19.2.0",Oo}var v2;function O6(){if(v2)return Eh.exports;v2=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(a){console.error(a)}}return e(),Eh.exports=k6(),Eh.exports}var D6=O6(),Th={exports:{}},Rh={};/**
 * @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 j2;function T6(){if(j2)return Rh;j2=1;var e=hi();function a(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var r=typeof Object.is=="function"?Object.is:a,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,c=e.useMemo,m=e.useDebugValue;return Rh.useSyncExternalStoreWithSelector=function(u,h,p,x,j){var v=i(null);if(v.current===null){var w={hasValue:!1,value:null};v.current=w}else w=v.current;v=c(function(){function A(D){if(!g){if(g=!0,C=D,D=x(D),j!==void 0&&w.hasValue){var B=w.value;if(j(B,D))return E=B}return E=D}if(B=E,r(C,D))return B;var L=x(D);return j!==void 0&&j(B,L)?(C=D,B):(C=D,E=L)}var g=!1,C,E,O=p===void 0?null:p;return[function(){return A(h())},O===null?void 0:function(){return A(O())}]},[h,p,x,j]);var S=n(u,v[0],v[1]);return o(function(){w.hasValue=!0,w.value=S},[S]),m(S),S},Rh}var N2;function R6(){return N2||(N2=1,Th.exports=T6()),Th.exports}var P6=R6();function M6(e){e()}function _6(){let e=null,a=null;return{clear(){e=null,a=null},notify(){M6(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=a={callback:r,next:null,prev:a};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:a=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var w2={notify(){},get:()=>[]};function z6(e,a){let r,n=w2,i=0,o=!1;function c(S){p();const A=n.subscribe(S);let g=!1;return()=>{g||(g=!0,A(),x())}}function m(){n.notify()}function u(){w.onStateChange&&w.onStateChange()}function h(){return o}function p(){i++,r||(r=e.subscribe(u),n=_6())}function x(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=w2)}function j(){o||(o=!0,p())}function v(){o&&(o=!1,x())}const w={addNestedSub:c,notifyNestedSubs:m,handleChangeWrapper:u,isSubscribed:h,trySubscribe:j,tryUnsubscribe:v,getListeners:()=>n};return w}var L6=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",B6=L6(),I6=()=>typeof navigator<"u"&&navigator.product==="ReactNative",F6=I6(),U6=()=>B6||F6?b.useLayoutEffect:b.useEffect,$6=U6(),q6=Symbol.for("react-redux-context"),H6=typeof globalThis<"u"?globalThis:{};function V6(){if(!b.createContext)return{};const e=H6[q6]??=new Map;let a=e.get(b.createContext);return a||(a=b.createContext(null),e.set(b.createContext,a)),a}var ps=V6();function Y6(e){const{children:a,context:r,serverState:n,store:i}=e,o=b.useMemo(()=>{const u=z6(i);return{store:i,subscription:u,getServerState:n?()=>n:void 0}},[i,n]),c=b.useMemo(()=>i.getState(),[i]);$6(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),c!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,c]);const m=r||ps;return b.createElement(m.Provider,{value:o},a)}var mC=Y6;function Sb(e=ps){return function(){return b.useContext(e)}}var fC=Sb();function pC(e=ps){const a=e===ps?fC:Sb(e),r=()=>{const{store:n}=a();return n};return Object.assign(r,{withTypes:()=>r}),r}var K6=pC();function G6(e=ps){const a=e===ps?K6:pC(e),r=()=>a().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var bs=G6(),J6=(e,a)=>e===a;function W6(e=ps){const a=e===ps?fC:Sb(e),r=(n,i={})=>{const{equalityFn:o=J6}=typeof i=="function"?{equalityFn:i}:i,c=a(),{store:m,subscription:u,getServerState:h}=c;b.useRef(!0);const p=b.useCallback({[n.name](j){return n(j)}}[n.name],[n]),x=P6.useSyncExternalStoreWithSelector(u.addNestedSub,m.getState,h||m.getState,p,o);return b.useDebugValue(x),x};return Object.assign(r,{withTypes:()=>r}),r}var br=W6();function la(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Q6=typeof Symbol=="function"&&Symbol.observable||"@@observable",A2=Q6,Ph=()=>Math.random().toString(36).substring(7).split("").join("."),X6={INIT:`@@redux/INIT${Ph()}`,REPLACE:`@@redux/REPLACE${Ph()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ph()}`},Eu=X6;function Cb(e){if(typeof e!="object"||e===null)return!1;let a=e;for(;Object.getPrototypeOf(a)!==null;)a=Object.getPrototypeOf(a);return Object.getPrototypeOf(e)===a||Object.getPrototypeOf(e)===null}function hC(e,a,r){if(typeof e!="function")throw new Error(la(2));if(typeof a=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(la(0));if(typeof a=="function"&&typeof r>"u"&&(r=a,a=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(la(1));return r(hC)(e,a)}let n=e,i=a,o=new Map,c=o,m=0,u=!1;function h(){c===o&&(c=new Map,o.forEach((A,g)=>{c.set(g,A)}))}function p(){if(u)throw new Error(la(3));return i}function x(A){if(typeof A!="function")throw new Error(la(4));if(u)throw new Error(la(5));let g=!0;h();const C=m++;return c.set(C,A),function(){if(g){if(u)throw new Error(la(6));g=!1,h(),c.delete(C),o=null}}}function j(A){if(!Cb(A))throw new Error(la(7));if(typeof A.type>"u")throw new Error(la(8));if(typeof A.type!="string")throw new Error(la(17));if(u)throw new Error(la(9));try{u=!0,i=n(i,A)}finally{u=!1}return(o=c).forEach(C=>{C()}),A}function v(A){if(typeof A!="function")throw new Error(la(10));n=A,j({type:Eu.REPLACE})}function w(){const A=x;return{subscribe(g){if(typeof g!="object"||g===null)throw new Error(la(11));function C(){const O=g;O.next&&O.next(p())}return C(),{unsubscribe:A(C)}},[A2](){return this}}}return j({type:Eu.INIT}),{dispatch:j,subscribe:x,getState:p,replaceReducer:v,[A2]:w}}function Z6(e){Object.keys(e).forEach(a=>{const r=e[a];if(typeof r(void 0,{type:Eu.INIT})>"u")throw new Error(la(12));if(typeof r(void 0,{type:Eu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(la(13))})}function xC(e){const a=Object.keys(e),r={};for(let o=0;o<a.length;o++){const c=a[o];typeof e[c]=="function"&&(r[c]=e[c])}const n=Object.keys(r);let i;try{Z6(r)}catch(o){i=o}return function(c={},m){if(i)throw i;let u=!1;const h={};for(let p=0;p<n.length;p++){const x=n[p],j=r[x],v=c[x],w=j(v,m);if(typeof w>"u")throw m&&m.type,new Error(la(14));h[x]=w,u=u||w!==v}return u=u||n.length!==Object.keys(c).length,u?h:c}}function ku(...e){return e.length===0?a=>a:e.length===1?e[0]:e.reduce((a,r)=>(...n)=>a(r(...n)))}function e5(...e){return a=>(r,n)=>{const i=a(r,n);let o=()=>{throw new Error(la(15))};const c={getState:i.getState,dispatch:(u,...h)=>o(u,...h)},m=e.map(u=>u(c));return o=ku(...m)(i.dispatch),{...i,dispatch:o}}}function gC(e){return Cb(e)&&"type"in e&&typeof e.type=="string"}var bC=Symbol.for("immer-nothing"),S2=Symbol.for("immer-draftable"),Ja=Symbol.for("immer-state");function Sr(e,...a){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jo=Object.getPrototypeOf;function rl(e){return!!e&&!!e[Ja]}function Nn(e){return e?yC(e)||Array.isArray(e)||!!e[S2]||!!e.constructor?.[S2]||oc(e)||Nm(e):!1}var t5=Object.prototype.constructor.toString(),C2=new WeakMap;function yC(e){if(!e||typeof e!="object")return!1;const a=Object.getPrototypeOf(e);if(a===null||a===Object.prototype)return!0;const r=Object.hasOwnProperty.call(a,"constructor")&&a.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=C2.get(r);return n===void 0&&(n=Function.toString.call(r),C2.set(r,n)),n===t5}function Ou(e,a,r=!0){jm(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{a(i,e[i],e)}):e.forEach((n,i)=>a(i,n,e))}function jm(e){const a=e[Ja];return a?a.type_:Array.isArray(e)?1:oc(e)?2:Nm(e)?3:0}function Ng(e,a){return jm(e)===2?e.has(a):Object.prototype.hasOwnProperty.call(e,a)}function vC(e,a,r){const n=jm(e);n===2?e.set(a,r):n===3?e.add(r):e[a]=r}function a5(e,a){return e===a?e!==0||1/e===1/a:e!==e&&a!==a}function oc(e){return e instanceof Map}function Nm(e){return e instanceof Set}function qs(e){return e.copy_||e.base_}function wg(e,a){if(oc(e))return new Map(e);if(Nm(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=yC(e);if(a===!0||a==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Ja];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const c=i[o],m=n[c];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[c]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[c]})}return Object.create(Jo(e),n)}else{const n=Jo(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Eb(e,a=!1){return wm(e)||rl(e)||!Nn(e)||(jm(e)>1&&Object.defineProperties(e,{set:Kd,add:Kd,clear:Kd,delete:Kd}),Object.freeze(e),a&&Object.values(e).forEach(r=>Eb(r,!0))),e}function r5(){Sr(2)}var Kd={value:r5};function wm(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var n5={};function nl(e){const a=n5[e];return a||Sr(0,e),a}var Wo;function jC(){return Wo}function s5(e,a){return{drafts_:[],parent_:e,immer_:a,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function E2(e,a){a&&(nl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=a)}function Ag(e){Sg(e),e.drafts_.forEach(l5),e.drafts_=null}function Sg(e){e===Wo&&(Wo=e.parent_)}function k2(e){return Wo=s5(Wo,e)}function l5(e){const a=e[Ja];a.type_===0||a.type_===1?a.revoke_():a.revoked_=!0}function O2(e,a){a.unfinalizedDrafts_=a.drafts_.length;const r=a.drafts_[0];return e!==void 0&&e!==r?(r[Ja].modified_&&(Ag(a),Sr(4)),Nn(e)&&(e=Du(a,e),a.parent_||Tu(a,e)),a.patches_&&nl("Patches").generateReplacementPatches_(r[Ja].base_,e,a.patches_,a.inversePatches_)):e=Du(a,r,[]),Ag(a),a.patches_&&a.patchListener_(a.patches_,a.inversePatches_),e!==bC?e:void 0}function Du(e,a,r){if(wm(a))return a;const n=e.immer_.shouldUseStrictIteration(),i=a[Ja];if(!i)return Ou(a,(o,c)=>D2(e,i,a,o,c,r),n),a;if(i.scope_!==e)return a;if(!i.modified_)return Tu(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let c=o,m=!1;i.type_===3&&(c=new Set(o),o.clear(),m=!0),Ou(c,(u,h)=>D2(e,i,o,u,h,r,m),n),Tu(e,o,!1),r&&e.patches_&&nl("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function D2(e,a,r,n,i,o,c){if(i==null||typeof i!="object"&&!c)return;const m=wm(i);if(!(m&&!c)){if(rl(i)){const u=o&&a&&a.type_!==3&&!Ng(a.assigned_,n)?o.concat(n):void 0,h=Du(e,i,u);if(vC(r,n,h),rl(h))e.canAutoFreeze_=!1;else return}else c&&r.add(i);if(Nn(i)&&!m){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||a&&a.base_&&a.base_[n]===i&&m)return;Du(e,i),(!a||!a.scope_.parent_)&&typeof n!="symbol"&&(oc(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Tu(e,i)}}}function Tu(e,a,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Eb(a,r)}function i5(e,a){const r=Array.isArray(e),n={type_:r?1:0,scope_:a?a.scope_:jC(),modified_:!1,finalized_:!1,assigned_:{},parent_:a,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=kb;r&&(i=[n],o=Qo);const{revoke:c,proxy:m}=Proxy.revocable(i,o);return n.draft_=m,n.revoke_=c,m}var kb={get(e,a){if(a===Ja)return e;const r=qs(e);if(!Ng(r,a))return o5(e,r,a);const n=r[a];return e.finalized_||!Nn(n)?n:n===Mh(e.base_,a)?(_h(e),e.copy_[a]=Eg(n,e)):n},has(e,a){return a in qs(e)},ownKeys(e){return Reflect.ownKeys(qs(e))},set(e,a,r){const n=NC(qs(e),a);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Mh(qs(e),a),o=i?.[Ja];if(o&&o.base_===r)return e.copy_[a]=r,e.assigned_[a]=!1,!0;if(a5(r,i)&&(r!==void 0||Ng(e.base_,a)))return!0;_h(e),Cg(e)}return e.copy_[a]===r&&(r!==void 0||a in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[a])||(e.copy_[a]=r,e.assigned_[a]=!0),!0},deleteProperty(e,a){return Mh(e.base_,a)!==void 0||a in e.base_?(e.assigned_[a]=!1,_h(e),Cg(e)):delete e.assigned_[a],e.copy_&&delete e.copy_[a],!0},getOwnPropertyDescriptor(e,a){const r=qs(e),n=Reflect.getOwnPropertyDescriptor(r,a);return n&&{writable:!0,configurable:e.type_!==1||a!=="length",enumerable:n.enumerable,value:r[a]}},defineProperty(){Sr(11)},getPrototypeOf(e){return Jo(e.base_)},setPrototypeOf(){Sr(12)}},Qo={};Ou(kb,(e,a)=>{Qo[e]=function(){return arguments[0]=arguments[0][0],a.apply(this,arguments)}});Qo.deleteProperty=function(e,a){return Qo.set.call(this,e,a,void 0)};Qo.set=function(e,a,r){return kb.set.call(this,e[0],a,r,e[0])};function Mh(e,a){const r=e[Ja];return(r?qs(r):e)[a]}function o5(e,a,r){const n=NC(a,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function NC(e,a){if(!(a in e))return;let r=Jo(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,a);if(n)return n;r=Jo(r)}}function Cg(e){e.modified_||(e.modified_=!0,e.parent_&&Cg(e.parent_))}function _h(e){e.copy_||(e.copy_=wg(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var c5=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(a,r,n)=>{if(typeof a=="function"&&typeof r!="function"){const o=r;r=a;const c=this;return function(u=o,...h){return c.produce(u,p=>r.call(this,p,...h))}}typeof r!="function"&&Sr(6),n!==void 0&&typeof n!="function"&&Sr(7);let i;if(Nn(a)){const o=k2(this),c=Eg(a,void 0);let m=!0;try{i=r(c),m=!1}finally{m?Ag(o):Sg(o)}return E2(o,n),O2(i,o)}else if(!a||typeof a!="object"){if(i=r(a),i===void 0&&(i=a),i===bC&&(i=void 0),this.autoFreeze_&&Eb(i,!0),n){const o=[],c=[];nl("Patches").generateReplacementPatches_(a,i,o,c),n(o,c)}return i}else Sr(1,a)},this.produceWithPatches=(a,r)=>{if(typeof a=="function")return(c,...m)=>this.produceWithPatches(c,u=>a(u,...m));let n,i;return[this.produce(a,r,(c,m)=>{n=c,i=m}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Nn(e)||Sr(8),rl(e)&&(e=yn(e));const a=k2(this),r=Eg(e,void 0);return r[Ja].isManual_=!0,Sg(a),r}finishDraft(e,a){const r=e&&e[Ja];(!r||!r.isManual_)&&Sr(9);const{scope_:n}=r;return E2(n,a),O2(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,a){let r;for(r=a.length-1;r>=0;r--){const i=a[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(a=a.slice(r+1));const n=nl("Patches").applyPatches_;return rl(e)?n(e,a):this.produce(e,i=>n(i,a))}};function Eg(e,a){const r=oc(e)?nl("MapSet").proxyMap_(e,a):Nm(e)?nl("MapSet").proxySet_(e,a):i5(e,a);return(a?a.scope_:jC()).drafts_.push(r),r}function yn(e){return rl(e)||Sr(10,e),wC(e)}function wC(e){if(!Nn(e)||wm(e))return e;const a=e[Ja];let r,n=!0;if(a){if(!a.modified_)return a.base_;a.finalized_=!0,r=wg(e,a.scope_.immer_.useStrictShallowCopy_),n=a.scope_.immer_.shouldUseStrictIteration()}else r=wg(e,!0);return Ou(r,(i,o)=>{vC(r,i,wC(o))},n),a&&(a.finalized_=!1),r}var d5=new c5,AC=d5.produce;function u5(e,a=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(a)}function m5(e,a=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(a)}function f5(e,a="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${a}[${r}]`)}}var T2=e=>Array.isArray(e)?e:[e];function p5(e){const a=Array.isArray(e[0])?e[0]:e;return f5(a,"createSelector expects all input-selectors to be functions, but received the following types: "),a}function h5(e,a){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,a));return r}var x5=class{constructor(e){this.value=e}deref(){return this.value}},g5=typeof WeakRef<"u"?WeakRef:x5,b5=0,R2=1;function Gd(){return{s:b5,v:void 0,o:null,p:null}}function SC(e,a={}){let r=Gd();const{resultEqualityCheck:n}=a;let i,o=0;function c(){let m=r;const{length:u}=arguments;for(let x=0,j=u;x<j;x++){const v=arguments[x];if(typeof v=="function"||typeof v=="object"&&v!==null){let w=m.o;w===null&&(m.o=w=new WeakMap);const S=w.get(v);S===void 0?(m=Gd(),w.set(v,m)):m=S}else{let w=m.p;w===null&&(m.p=w=new Map);const S=w.get(v);S===void 0?(m=Gd(),w.set(v,m)):m=S}}const h=m;let p;if(m.s===R2)p=m.v;else if(p=e.apply(null,arguments),o++,n){const x=i?.deref?.()??i;x!=null&&n(x,p)&&(p=x,o!==0&&o--),i=typeof p=="object"&&p!==null||typeof p=="function"?new g5(p):p}return h.s=R2,h.v=p,p}return c.clearCache=()=>{r=Gd(),c.resetResultsCount()},c.resultsCount=()=>o,c.resetResultsCount=()=>{o=0},c}function y5(e,...a){const r=typeof e=="function"?{memoize:e,memoizeOptions:a}:e,n=(...i)=>{let o=0,c=0,m,u={},h=i.pop();typeof h=="object"&&(u=h,h=i.pop()),u5(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...u},{memoize:x,memoizeOptions:j=[],argsMemoize:v=SC,argsMemoizeOptions:w=[]}=p,S=T2(j),A=T2(w),g=p5(i),C=x(function(){return o++,h.apply(null,arguments)},...S),E=v(function(){c++;const D=h5(g,arguments);return m=C.apply(null,D),m},...A);return Object.assign(E,{resultFunc:h,memoizedResultFunc:C,dependencies:g,dependencyRecomputations:()=>c,resetDependencyRecomputations:()=>{c=0},lastResult:()=>m,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:x,argsMemoize:v})};return Object.assign(n,{withTypes:()=>n}),n}var le=y5(SC),v5=Object.assign((e,a=le)=>{m5(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(o=>e[o]);return a(n,(...o)=>o.reduce((c,m,u)=>(c[r[u]]=m,c),{}))},{withTypes:()=>v5});function CC(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var j5=CC(),N5=CC,w5=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ku:ku.apply(null,arguments)},A5=e=>e&&typeof e.match=="function";function ja(e,a){function r(...n){if(a){let i=a(...n);if(!i)throw new Error(Ga(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>gC(n)&&n.type===e,r}var EC=class Uo extends Array{constructor(...a){super(...a),Object.setPrototypeOf(this,Uo.prototype)}static get[Symbol.species](){return Uo}concat(...a){return super.concat.apply(this,a)}prepend(...a){return a.length===1&&Array.isArray(a[0])?new Uo(...a[0].concat(this)):new Uo(...a.concat(this))}};function P2(e){return Nn(e)?AC(e,()=>{}):e}function Jd(e,a,r){return e.has(a)?e.get(a):e.set(a,r(a)).get(a)}function S5(e){return typeof e=="boolean"}var C5=()=>function(a){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=a??{};let c=new EC;return r&&(S5(r)?c.push(j5):c.push(N5(r.extraArgument))),c},kC="RTK_autoBatch",xa=()=>e=>({payload:e,meta:{[kC]:!0}}),M2=e=>a=>{setTimeout(a,e)},OC=(e={type:"raf"})=>a=>(...r)=>{const n=a(...r);let i=!0,o=!1,c=!1;const m=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:M2(10):e.type==="callback"?e.queueNotification:M2(e.timeout),h=()=>{c=!1,o&&(o=!1,m.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const x=()=>i&&p(),j=n.subscribe(x);return m.add(p),()=>{j(),m.delete(p)}},dispatch(p){try{return i=!p?.meta?.[kC],o=!i,o&&(c||(c=!0,u(h))),n.dispatch(p)}finally{i=!0}}})},E5=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new EC(e);return n&&i.push(OC(typeof n=="object"?n:void 0)),i};function DC(e){const a=C5(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:c=void 0,enhancers:m=void 0}=e||{};let u;if(typeof r=="function")u=r;else if(Cb(r))u=xC(r);else throw new Error(Ga(1));let h;typeof n=="function"?h=n(a):h=a();let p=ku;i&&(p=w5({trace:!1,...typeof i=="object"&&i}));const x=e5(...h),j=E5(x);let v=typeof m=="function"?m(j):j();const w=p(...v);return hC(u,c,w)}function TC(e){const a={},r=[];let n;const i={addCase(o,c){const m=typeof o=="string"?o:o.type;if(!m)throw new Error(Ga(28));if(m in a)throw new Error(Ga(29));return a[m]=c,i},addAsyncThunk(o,c){return c.pending&&(a[o.pending.type]=c.pending),c.rejected&&(a[o.rejected.type]=c.rejected),c.fulfilled&&(a[o.fulfilled.type]=c.fulfilled),c.settled&&r.push({matcher:o.settled,reducer:c.settled}),i},addMatcher(o,c){return r.push({matcher:o,reducer:c}),i},addDefaultCase(o){return n=o,i}};return e(i),[a,r,n]}function k5(e){return typeof e=="function"}function O5(e,a){let[r,n,i]=TC(a),o;if(k5(e))o=()=>P2(e());else{const m=P2(e);o=()=>m}function c(m=o(),u){let h=[r[u.type],...n.filter(({matcher:p})=>p(u)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[i]),h.reduce((p,x)=>{if(x)if(rl(p)){const v=x(p,u);return v===void 0?p:v}else{if(Nn(p))return AC(p,j=>x(j,u));{const j=x(p,u);if(j===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return j}}return p},m)}return c.getInitialState=o,c}var D5=(e,a)=>A5(e)?e.match(a):e(a);function T5(...e){return a=>e.some(r=>D5(r,a))}var R5="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",RC=(e=21)=>{let a="",r=e;for(;r--;)a+=R5[Math.random()*64|0];return a},P5=["name","message","stack","code"],zh=class{constructor(e,a){this.payload=e,this.meta=a}_type},_2=class{constructor(e,a){this.payload=e,this.meta=a}_type},M5=e=>{if(typeof e=="object"&&e!==null){const a={};for(const r of P5)typeof e[r]=="string"&&(a[r]=e[r]);return a}return{message:String(e)}},z2="External signal was aborted",ys=(()=>{function e(a,r,n){const i=ja(a+"/fulfilled",(u,h,p,x)=>({payload:u,meta:{...x||{},arg:p,requestId:h,requestStatus:"fulfilled"}})),o=ja(a+"/pending",(u,h,p)=>({payload:void 0,meta:{...p||{},arg:h,requestId:u,requestStatus:"pending"}})),c=ja(a+"/rejected",(u,h,p,x,j)=>({payload:x,error:(n&&n.serializeError||M5)(u||"Rejected"),meta:{...j||{},arg:p,requestId:h,rejectedWithValue:!!x,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function m(u,{signal:h}={}){return(p,x,j)=>{const v=n?.idGenerator?n.idGenerator(u):RC(),w=new AbortController;let S,A;function g(E){A=E,w.abort()}h&&(h.aborted?g(z2):h.addEventListener("abort",()=>g(z2),{once:!0}));const C=(async function(){let E;try{let D=n?.condition?.(u,{getState:x,extra:j});if(z5(D)&&(D=await D),D===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const B=new Promise((L,T)=>{S=()=>{T({name:"AbortError",message:A||"Aborted"})},w.signal.addEventListener("abort",S)});p(o(v,u,n?.getPendingMeta?.({requestId:v,arg:u},{getState:x,extra:j}))),E=await Promise.race([B,Promise.resolve(r(u,{dispatch:p,getState:x,extra:j,requestId:v,signal:w.signal,abort:g,rejectWithValue:(L,T)=>new zh(L,T),fulfillWithValue:(L,T)=>new _2(L,T)})).then(L=>{if(L instanceof zh)throw L;return L instanceof _2?i(L.payload,v,u,L.meta):i(L,v,u)})])}catch(D){E=D instanceof zh?c(null,v,u,D.payload,D.meta):c(D,v,u)}finally{S&&w.signal.removeEventListener("abort",S)}return n&&!n.dispatchConditionRejection&&c.match(E)&&E.meta.condition||p(E),E})();return Object.assign(C,{abort:g,requestId:v,arg:u,unwrap(){return C.then(_5)}})}}return Object.assign(m,{pending:o,rejected:c,fulfilled:i,settled:T5(c,i),typePrefix:a})}return e.withTypes=()=>e,e})();function _5(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function z5(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var L5=Symbol.for("rtk-slice-createasyncthunk");function B5(e,a){return`${e}/${a}`}function I5({creators:e}={}){const a=e?.asyncThunk?.[L5];return function(n){const{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Ga(11));const c=(typeof n.reducers=="function"?n.reducers(U5()):n.reducers)||{},m=Object.keys(c),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(E,O){const D=typeof E=="string"?E:E.type;if(!D)throw new Error(Ga(12));if(D in u.sliceCaseReducersByType)throw new Error(Ga(13));return u.sliceCaseReducersByType[D]=O,h},addMatcher(E,O){return u.sliceMatchers.push({matcher:E,reducer:O}),h},exposeAction(E,O){return u.actionCreators[E]=O,h},exposeCaseReducer(E,O){return u.sliceCaseReducersByName[E]=O,h}};m.forEach(E=>{const O=c[E],D={reducerName:E,type:B5(i,E),createNotation:typeof n.reducers=="function"};q5(O)?V5(D,O,h,a):$5(D,O,h)});function p(){const[E={},O=[],D=void 0]=typeof n.extraReducers=="function"?TC(n.extraReducers):[n.extraReducers],B={...E,...u.sliceCaseReducersByType};return O5(n.initialState,L=>{for(let T in B)L.addCase(T,B[T]);for(let T of u.sliceMatchers)L.addMatcher(T.matcher,T.reducer);for(let T of O)L.addMatcher(T.matcher,T.reducer);D&&L.addDefaultCase(D)})}const x=E=>E,j=new Map,v=new WeakMap;let w;function S(E,O){return w||(w=p()),w(E,O)}function A(){return w||(w=p()),w.getInitialState()}function g(E,O=!1){function D(L){let T=L[E];return typeof T>"u"&&O&&(T=Jd(v,D,A)),T}function B(L=x){const T=Jd(j,O,()=>new WeakMap);return Jd(T,L,()=>{const R={};for(const[z,U]of Object.entries(n.selectors??{}))R[z]=F5(U,L,()=>Jd(v,L,A),O);return R})}return{reducerPath:E,getSelectors:B,get selectors(){return B(D)},selectSlice:D}}const C={name:i,reducer:S,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:A,...g(o),injectInto(E,{reducerPath:O,...D}={}){const B=O??o;return E.inject({reducerPath:B,reducer:S},D),{...C,...g(B,!0)}}};return C}}function F5(e,a,r,n){function i(o,...c){let m=a(o);return typeof m>"u"&&n&&(m=r()),e(m,...c)}return i.unwrapped=e,i}var za=I5();function U5(){function e(a,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:a,...r}}return e.withTypes=()=>e,{reducer(a){return Object.assign({[a.name](...r){return a(...r)}}[a.name],{_reducerDefinitionType:"reducer"})},preparedReducer(a,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:a,reducer:r}},asyncThunk:e}}function $5({type:e,reducerName:a,createNotation:r},n,i){let o,c;if("reducer"in n){if(r&&!H5(n))throw new Error(Ga(17));o=n.reducer,c=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(a,o).exposeAction(a,c?ja(e,c):ja(e))}function q5(e){return e._reducerDefinitionType==="asyncThunk"}function H5(e){return e._reducerDefinitionType==="reducerWithPrepare"}function V5({type:e,reducerName:a},r,n,i){if(!i)throw new Error(Ga(18));const{payloadCreator:o,fulfilled:c,pending:m,rejected:u,settled:h,options:p}=r,x=i(e,o,p);n.exposeAction(a,x),c&&n.addCase(x.fulfilled,c),m&&n.addCase(x.pending,m),u&&n.addCase(x.rejected,u),h&&n.addMatcher(x.settled,h),n.exposeCaseReducer(a,{fulfilled:c||Wd,pending:m||Wd,rejected:u||Wd,settled:h||Wd})}function Wd(){}var Y5="task",PC="listener",MC="completed",Ob="cancelled",K5=`task-${Ob}`,G5=`task-${MC}`,kg=`${PC}-${Ob}`,J5=`${PC}-${MC}`,Am=class{constructor(e){this.code=e,this.message=`${Y5} ${Ob} (reason: ${e})`}name="TaskAbortError";message},Db=(e,a)=>{if(typeof e!="function")throw new TypeError(Ga(32))},Ru=()=>{},_C=(e,a=Ru)=>(e.catch(a),e),zC=(e,a)=>(e.addEventListener("abort",a,{once:!0}),()=>e.removeEventListener("abort",a)),Qs=(e,a)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:a,configurable:!0,writable:!0}),e.abort(a))},Xs=e=>{if(e.aborted){const{reason:a}=e;throw new Am(a)}};function LC(e,a){let r=Ru;return new Promise((n,i)=>{const o=()=>i(new Am(e.reason));if(e.aborted){o();return}r=zC(e,o),a.finally(()=>r()).then(n,i)}).finally(()=>{r=Ru})}var W5=async(e,a)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Am?"cancelled":"rejected",error:r}}finally{a?.()}},Pu=e=>a=>_C(LC(e,a).then(r=>(Xs(e),r))),BC=e=>{const a=Pu(e);return r=>a(new Promise(n=>setTimeout(n,r)))},{assign:ti}=Object,L2={},Sm="listenerMiddleware",Q5=(e,a)=>{const r=n=>zC(e,()=>Qs(n,e.reason));return(n,i)=>{Db(n);const o=new AbortController;r(o);const c=W5(async()=>{Xs(e),Xs(o.signal);const m=await n({pause:Pu(o.signal),delay:BC(o.signal),signal:o.signal});return Xs(o.signal),m},()=>Qs(o,G5));return i?.autoJoin&&a.push(c.catch(Ru)),{result:Pu(e)(c),cancel(){Qs(o,K5)}}}},X5=(e,a)=>{const r=async(n,i)=>{Xs(a);let o=()=>{};const m=[new Promise((u,h)=>{let p=e({predicate:n,effect:(x,j)=>{j.unsubscribe(),u([x,j.getState(),j.getOriginalState()])}});o=()=>{p(),h()}})];i!=null&&m.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await LC(a,Promise.race(m));return Xs(a),u}finally{o()}};return(n,i)=>_C(r(n,i))},IC=e=>{let{type:a,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(a)i=ja(a).match;else if(r)a=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(Ga(21));return Db(o),{predicate:i,type:a,effect:o}},FC=ti(e=>{const{type:a,predicate:r,effect:n}=IC(e);return{id:RC(),effect:n,type:a,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Ga(22))}}},{withTypes:()=>FC}),B2=(e,a)=>{const{type:r,effect:n,predicate:i}=IC(a);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Og=e=>{e.pending.forEach(a=>{Qs(a,kg)})},Z5=(e,a)=>()=>{for(const r of a.keys())Og(r);e.clear()},I2=(e,a,r)=>{try{e(a,r)}catch(n){setTimeout(()=>{throw n},0)}},UC=ti(ja(`${Sm}/add`),{withTypes:()=>UC}),eR=ja(`${Sm}/removeAll`),$C=ti(ja(`${Sm}/remove`),{withTypes:()=>$C}),tR=(...e)=>{console.error(`${Sm}/error`,...e)},cc=(e={})=>{const a=new Map,r=new Map,n=v=>{const w=r.get(v)??0;r.set(v,w+1)},i=v=>{const w=r.get(v)??1;w===1?r.delete(v):r.set(v,w-1)},{extra:o,onError:c=tR}=e;Db(c);const m=v=>(v.unsubscribe=()=>a.delete(v.id),a.set(v.id,v),w=>{v.unsubscribe(),w?.cancelActive&&Og(v)}),u=v=>{const w=B2(a,v)??FC(v);return m(w)};ti(u,{withTypes:()=>u});const h=v=>{const w=B2(a,v);return w&&(w.unsubscribe(),v.cancelActive&&Og(w)),!!w};ti(h,{withTypes:()=>h});const p=async(v,w,S,A)=>{const g=new AbortController,C=X5(u,g.signal),E=[];try{v.pending.add(g),n(v),await Promise.resolve(v.effect(w,ti({},S,{getOriginalState:A,condition:(O,D)=>C(O,D).then(Boolean),take:C,delay:BC(g.signal),pause:Pu(g.signal),extra:o,signal:g.signal,fork:Q5(g.signal,E),unsubscribe:v.unsubscribe,subscribe:()=>{a.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((O,D,B)=>{O!==g&&(Qs(O,kg),B.delete(O))})},cancel:()=>{Qs(g,kg),v.pending.delete(g)},throwIfCancelled:()=>{Xs(g.signal)}})))}catch(O){O instanceof Am||I2(c,O,{raisedBy:"effect"})}finally{await Promise.all(E),Qs(g,J5),i(v),v.pending.delete(g)}},x=Z5(a,r);return{middleware:v=>w=>S=>{if(!gC(S))return w(S);if(UC.match(S))return u(S.payload);if(eR.match(S)){x();return}if($C.match(S))return h(S.payload);let A=v.getState();const g=()=>{if(A===L2)throw new Error(Ga(23));return A};let C;try{if(C=w(S),a.size>0){const E=v.getState(),O=Array.from(a.values());for(const D of O){let B=!1;try{B=D.predicate(S,E,A)}catch(L){B=!1,I2(c,L,{raisedBy:"predicate"})}B&&p(D,S,v,g)}}}finally{A=L2}return C},startListening:u,stopListening:h,clearListeners:x}};function Ga(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function qC(e,a){return function(){return e.apply(a,arguments)}}const{toString:aR}=Object.prototype,{getPrototypeOf:Tb}=Object,{iterator:Cm,toStringTag:HC}=Symbol,Em=(e=>a=>{const r=aR.call(a);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Dr=e=>(e=e.toLowerCase(),a=>Em(a)===e),km=e=>a=>typeof a===e,{isArray:xi}=Array,ri=km("undefined");function dc(e){return e!==null&&!ri(e)&&e.constructor!==null&&!ri(e.constructor)&&Ma(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const VC=Dr("ArrayBuffer");function rR(e){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(e):a=e&&e.buffer&&VC(e.buffer),a}const nR=km("string"),Ma=km("function"),YC=km("number"),uc=e=>e!==null&&typeof e=="object",sR=e=>e===!0||e===!1,xu=e=>{if(Em(e)!=="object")return!1;const a=Tb(e);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(HC in e)&&!(Cm in e)},lR=e=>{if(!uc(e)||dc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},iR=Dr("Date"),oR=Dr("File"),cR=Dr("Blob"),dR=Dr("FileList"),uR=e=>uc(e)&&Ma(e.pipe),mR=e=>{let a;return e&&(typeof FormData=="function"&&e instanceof FormData||Ma(e.append)&&((a=Em(e))==="formdata"||a==="object"&&Ma(e.toString)&&e.toString()==="[object FormData]"))},fR=Dr("URLSearchParams"),[pR,hR,xR,gR]=["ReadableStream","Request","Response","Headers"].map(Dr),bR=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function mc(e,a,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),xi(e))for(n=0,i=e.length;n<i;n++)a.call(null,e[n],n,e);else{if(dc(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),c=o.length;let m;for(n=0;n<c;n++)m=o[n],a.call(null,e[m],m,e)}}function KC(e,a){if(dc(e))return null;a=a.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],a===i.toLowerCase())return i;return null}const Ks=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,GC=e=>!ri(e)&&e!==Ks;function Dg(){const{caseless:e,skipUndefined:a}=GC(this)&&this||{},r={},n=(i,o)=>{const c=e&&KC(r,o)||o;xu(r[c])&&xu(i)?r[c]=Dg(r[c],i):xu(i)?r[c]=Dg({},i):xi(i)?r[c]=i.slice():(!a||!ri(i))&&(r[c]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&mc(arguments[i],n);return r}const yR=(e,a,r,{allOwnKeys:n}={})=>(mc(a,(i,o)=>{r&&Ma(i)?e[o]=qC(i,r):e[o]=i},{allOwnKeys:n}),e),vR=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),jR=(e,a,r,n)=>{e.prototype=Object.create(a.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:a.prototype}),r&&Object.assign(e.prototype,r)},NR=(e,a,r,n)=>{let i,o,c;const m={};if(a=a||{},e==null)return a;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)c=i[o],(!n||n(c,e,a))&&!m[c]&&(a[c]=e[c],m[c]=!0);e=r!==!1&&Tb(e)}while(e&&(!r||r(e,a))&&e!==Object.prototype);return a},wR=(e,a,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=a.length;const n=e.indexOf(a,r);return n!==-1&&n===r},AR=e=>{if(!e)return null;if(xi(e))return e;let a=e.length;if(!YC(a))return null;const r=new Array(a);for(;a-- >0;)r[a]=e[a];return r},SR=(e=>a=>e&&a instanceof e)(typeof Uint8Array<"u"&&Tb(Uint8Array)),CR=(e,a)=>{const n=(e&&e[Cm]).call(e);let i;for(;(i=n.next())&&!i.done;){const o=i.value;a.call(e,o[0],o[1])}},ER=(e,a)=>{let r;const n=[];for(;(r=e.exec(a))!==null;)n.push(r);return n},kR=Dr("HTMLFormElement"),OR=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),F2=(({hasOwnProperty:e})=>(a,r)=>e.call(a,r))(Object.prototype),DR=Dr("RegExp"),JC=(e,a)=>{const r=Object.getOwnPropertyDescriptors(e),n={};mc(r,(i,o)=>{let c;(c=a(i,o,e))!==!1&&(n[o]=c||i)}),Object.defineProperties(e,n)},TR=e=>{JC(e,(a,r)=>{if(Ma(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Ma(n)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},RR=(e,a)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return xi(e)?n(e):n(String(e).split(a)),r},PR=()=>{},MR=(e,a)=>e!=null&&Number.isFinite(e=+e)?e:a;function _R(e){return!!(e&&Ma(e.append)&&e[HC]==="FormData"&&e[Cm])}const zR=e=>{const a=new Array(10),r=(n,i)=>{if(uc(n)){if(a.indexOf(n)>=0)return;if(dc(n))return n;if(!("toJSON"in n)){a[i]=n;const o=xi(n)?[]:{};return mc(n,(c,m)=>{const u=r(c,i+1);!ri(u)&&(o[m]=u)}),a[i]=void 0,o}}return n};return r(e,0)},LR=Dr("AsyncFunction"),BR=e=>e&&(uc(e)||Ma(e))&&Ma(e.then)&&Ma(e.catch),WC=((e,a)=>e?setImmediate:a?((r,n)=>(Ks.addEventListener("message",({source:i,data:o})=>{i===Ks&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),Ks.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ma(Ks.postMessage)),IR=typeof queueMicrotask<"u"?queueMicrotask.bind(Ks):typeof process<"u"&&process.nextTick||WC,FR=e=>e!=null&&Ma(e[Cm]),ae={isArray:xi,isArrayBuffer:VC,isBuffer:dc,isFormData:mR,isArrayBufferView:rR,isString:nR,isNumber:YC,isBoolean:sR,isObject:uc,isPlainObject:xu,isEmptyObject:lR,isReadableStream:pR,isRequest:hR,isResponse:xR,isHeaders:gR,isUndefined:ri,isDate:iR,isFile:oR,isBlob:cR,isRegExp:DR,isFunction:Ma,isStream:uR,isURLSearchParams:fR,isTypedArray:SR,isFileList:dR,forEach:mc,merge:Dg,extend:yR,trim:bR,stripBOM:vR,inherits:jR,toFlatObject:NR,kindOf:Em,kindOfTest:Dr,endsWith:wR,toArray:AR,forEachEntry:CR,matchAll:ER,isHTMLForm:kR,hasOwnProperty:F2,hasOwnProp:F2,reduceDescriptors:JC,freezeMethods:TR,toObjectSet:RR,toCamelCase:OR,noop:PR,toFiniteNumber:MR,findKey:KC,global:Ks,isContextDefined:GC,isSpecCompliantForm:_R,toJSONObject:zR,isAsyncFn:LR,isThenable:BR,setImmediate:WC,asap:IR,isIterable:FR};function Be(e,a,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",a&&(this.code=a),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ae.inherits(Be,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:ae.toJSONObject(this.config),code:this.code,status:this.status}}});const QC=Be.prototype,XC={};["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(e=>{XC[e]={value:e}});Object.defineProperties(Be,XC);Object.defineProperty(QC,"isAxiosError",{value:!0});Be.from=(e,a,r,n,i,o)=>{const c=Object.create(QC);ae.toFlatObject(e,c,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const m=e&&e.message?e.message:"Error",u=a==null&&e?e.code:a;return Be.call(c,m,u,r,n,i),e&&c.cause==null&&Object.defineProperty(c,"cause",{value:e,configurable:!0}),c.name=e&&e.name||"Error",o&&Object.assign(c,o),c};const UR=null;function Tg(e){return ae.isPlainObject(e)||ae.isArray(e)}function ZC(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function U2(e,a,r){return e?e.concat(a).map(function(i,o){return i=ZC(i),!r&&o?"["+i+"]":i}).join(r?".":""):a}function $R(e){return ae.isArray(e)&&!e.some(Tg)}const qR=ae.toFlatObject(ae,{},null,function(a){return/^is[A-Z]/.test(a)});function Om(e,a,r){if(!ae.isObject(e))throw new TypeError("target must be an object");a=a||new FormData,r=ae.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,A){return!ae.isUndefined(A[S])});const n=r.metaTokens,i=r.visitor||p,o=r.dots,c=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(a);if(!ae.isFunction(i))throw new TypeError("visitor must be a function");function h(w){if(w===null)return"";if(ae.isDate(w))return w.toISOString();if(ae.isBoolean(w))return w.toString();if(!u&&ae.isBlob(w))throw new Be("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(w)||ae.isTypedArray(w)?u&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function p(w,S,A){let g=w;if(w&&!A&&typeof w=="object"){if(ae.endsWith(S,"{}"))S=n?S:S.slice(0,-2),w=JSON.stringify(w);else if(ae.isArray(w)&&$R(w)||(ae.isFileList(w)||ae.endsWith(S,"[]"))&&(g=ae.toArray(w)))return S=ZC(S),g.forEach(function(E,O){!(ae.isUndefined(E)||E===null)&&a.append(c===!0?U2([S],O,o):c===null?S:S+"[]",h(E))}),!1}return Tg(w)?!0:(a.append(U2(A,S,o),h(w)),!1)}const x=[],j=Object.assign(qR,{defaultVisitor:p,convertValue:h,isVisitable:Tg});function v(w,S){if(!ae.isUndefined(w)){if(x.indexOf(w)!==-1)throw Error("Circular reference detected in "+S.join("."));x.push(w),ae.forEach(w,function(g,C){(!(ae.isUndefined(g)||g===null)&&i.call(a,g,ae.isString(C)?C.trim():C,S,j))===!0&&v(g,S?S.concat(C):[C])}),x.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return v(e),a}function $2(e){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return a[n]})}function Rb(e,a){this._pairs=[],e&&Om(e,this,a)}const e3=Rb.prototype;e3.append=function(a,r){this._pairs.push([a,r])};e3.toString=function(a){const r=a?function(n){return a.call(this,n,$2)}:$2;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function HR(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function t3(e,a,r){if(!a)return e;const n=r&&r.encode||HR;ae.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(a,r):o=ae.isURLSearchParams(a)?a.toString():new Rb(a,r).toString(n),o){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class q2{constructor(){this.handlers=[]}use(a,r,n){return this.handlers.push({fulfilled:a,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){ae.forEach(this.handlers,function(n){n!==null&&a(n)})}}const a3={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},VR=typeof URLSearchParams<"u"?URLSearchParams:Rb,YR=typeof FormData<"u"?FormData:null,KR=typeof Blob<"u"?Blob:null,GR={isBrowser:!0,classes:{URLSearchParams:VR,FormData:YR,Blob:KR},protocols:["http","https","file","blob","url","data"]},Pb=typeof window<"u"&&typeof document<"u",Rg=typeof navigator=="object"&&navigator||void 0,JR=Pb&&(!Rg||["ReactNative","NativeScript","NS"].indexOf(Rg.product)<0),WR=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",QR=Pb&&window.location.href||"http://localhost",XR=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Pb,hasStandardBrowserEnv:JR,hasStandardBrowserWebWorkerEnv:WR,navigator:Rg,origin:QR},Symbol.toStringTag,{value:"Module"})),ma={...XR,...GR};function ZR(e,a){return Om(e,new ma.classes.URLSearchParams,{visitor:function(r,n,i,o){return ma.isNode&&ae.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...a})}function eP(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(a=>a[0]==="[]"?"":a[1]||a[0])}function tP(e){const a={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],a[o]=e[o];return a}function r3(e){function a(r,n,i,o){let c=r[o++];if(c==="__proto__")return!0;const m=Number.isFinite(+c),u=o>=r.length;return c=!c&&ae.isArray(i)?i.length:c,u?(ae.hasOwnProp(i,c)?i[c]=[i[c],n]:i[c]=n,!m):((!i[c]||!ae.isObject(i[c]))&&(i[c]=[]),a(r,n,i[c],o)&&ae.isArray(i[c])&&(i[c]=tP(i[c])),!m)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const r={};return ae.forEachEntry(e,(n,i)=>{a(eP(n),i,r,0)}),r}return null}function aP(e,a,r){if(ae.isString(e))try{return(a||JSON.parse)(e),ae.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const fc={transitional:a3,adapter:["xhr","http","fetch"],transformRequest:[function(a,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=ae.isObject(a);if(o&&ae.isHTMLForm(a)&&(a=new FormData(a)),ae.isFormData(a))return i?JSON.stringify(r3(a)):a;if(ae.isArrayBuffer(a)||ae.isBuffer(a)||ae.isStream(a)||ae.isFile(a)||ae.isBlob(a)||ae.isReadableStream(a))return a;if(ae.isArrayBufferView(a))return a.buffer;if(ae.isURLSearchParams(a))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let m;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return ZR(a,this.formSerializer).toString();if((m=ae.isFileList(a))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Om(m?{"files[]":a}:a,u&&new u,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),aP(a)):a}],transformResponse:[function(a){const r=this.transitional||fc.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(ae.isResponse(a)||ae.isReadableStream(a))return a;if(a&&ae.isString(a)&&(n&&!this.responseType||i)){const c=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(a,this.parseReviver)}catch(m){if(c)throw m.name==="SyntaxError"?Be.from(m,Be.ERR_BAD_RESPONSE,this,null,this.response):m}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ma.classes.FormData,Blob:ma.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ae.forEach(["delete","get","head","post","put","patch"],e=>{fc.headers[e]={}});const rP=ae.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"]),nP=e=>{const a={};let r,n,i;return e&&e.split(`
`).forEach(function(c){i=c.indexOf(":"),r=c.substring(0,i).trim().toLowerCase(),n=c.substring(i+1).trim(),!(!r||a[r]&&rP[r])&&(r==="set-cookie"?a[r]?a[r].push(n):a[r]=[n]:a[r]=a[r]?a[r]+", "+n:n)}),a},H2=Symbol("internals");function Do(e){return e&&String(e).trim().toLowerCase()}function gu(e){return e===!1||e==null?e:ae.isArray(e)?e.map(gu):String(e)}function sP(e){const a=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)a[n[1]]=n[2];return a}const lP=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Lh(e,a,r,n,i){if(ae.isFunction(n))return n.call(this,a,r);if(i&&(a=r),!!ae.isString(a)){if(ae.isString(n))return a.indexOf(n)!==-1;if(ae.isRegExp(n))return n.test(a)}}function iP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,r,n)=>r.toUpperCase()+n)}function oP(e,a){const r=ae.toCamelCase(" "+a);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,o,c){return this[n].call(this,a,i,o,c)},configurable:!0})})}let _a=class{constructor(a){a&&this.set(a)}set(a,r,n){const i=this;function o(m,u,h){const p=Do(u);if(!p)throw new Error("header name must be a non-empty string");const x=ae.findKey(i,p);(!x||i[x]===void 0||h===!0||h===void 0&&i[x]!==!1)&&(i[x||u]=gu(m))}const c=(m,u)=>ae.forEach(m,(h,p)=>o(h,p,u));if(ae.isPlainObject(a)||a instanceof this.constructor)c(a,r);else if(ae.isString(a)&&(a=a.trim())&&!lP(a))c(nP(a),r);else if(ae.isObject(a)&&ae.isIterable(a)){let m={},u,h;for(const p of a){if(!ae.isArray(p))throw TypeError("Object iterator must return a key-value pair");m[h=p[0]]=(u=m[h])?ae.isArray(u)?[...u,p[1]]:[u,p[1]]:p[1]}c(m,r)}else a!=null&&o(r,a,n);return this}get(a,r){if(a=Do(a),a){const n=ae.findKey(this,a);if(n){const i=this[n];if(!r)return i;if(r===!0)return sP(i);if(ae.isFunction(r))return r.call(this,i,n);if(ae.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,r){if(a=Do(a),a){const n=ae.findKey(this,a);return!!(n&&this[n]!==void 0&&(!r||Lh(this,this[n],n,r)))}return!1}delete(a,r){const n=this;let i=!1;function o(c){if(c=Do(c),c){const m=ae.findKey(n,c);m&&(!r||Lh(n,n[m],m,r))&&(delete n[m],i=!0)}}return ae.isArray(a)?a.forEach(o):o(a),i}clear(a){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!a||Lh(this,this[o],o,a,!0))&&(delete this[o],i=!0)}return i}normalize(a){const r=this,n={};return ae.forEach(this,(i,o)=>{const c=ae.findKey(n,o);if(c){r[c]=gu(i),delete r[o];return}const m=a?iP(o):String(o).trim();m!==o&&delete r[o],r[m]=gu(i),n[m]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const r=Object.create(null);return ae.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=a&&ae.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,r])=>a+": "+r).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...r){const n=new this(a);return r.forEach(i=>n.set(i)),n}static accessor(a){const n=(this[H2]=this[H2]={accessors:{}}).accessors,i=this.prototype;function o(c){const m=Do(c);n[m]||(oP(i,c),n[m]=!0)}return ae.isArray(a)?a.forEach(o):o(a),this}};_a.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ae.reduceDescriptors(_a.prototype,({value:e},a)=>{let r=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(n){this[r]=n}}});ae.freezeMethods(_a);function Bh(e,a){const r=this||fc,n=a||r,i=_a.from(n.headers);let o=n.data;return ae.forEach(e,function(m){o=m.call(r,o,i.normalize(),a?a.status:void 0)}),i.normalize(),o}function n3(e){return!!(e&&e.__CANCEL__)}function gi(e,a,r){Be.call(this,e??"canceled",Be.ERR_CANCELED,a,r),this.name="CanceledError"}ae.inherits(gi,Be,{__CANCEL__:!0});function s3(e,a,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):a(new Be("Request failed with status code "+r.status,[Be.ERR_BAD_REQUEST,Be.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function cP(e){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return a&&a[1]||""}function dP(e,a){e=e||10;const r=new Array(e),n=new Array(e);let i=0,o=0,c;return a=a!==void 0?a:1e3,function(u){const h=Date.now(),p=n[o];c||(c=h),r[i]=u,n[i]=h;let x=o,j=0;for(;x!==i;)j+=r[x++],x=x%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),h-c<a)return;const v=p&&h-p;return v?Math.round(j*1e3/v):void 0}}function uP(e,a){let r=0,n=1e3/a,i,o;const c=(h,p=Date.now())=>{r=p,i=null,o&&(clearTimeout(o),o=null),e(...h)};return[(...h)=>{const p=Date.now(),x=p-r;x>=n?c(h,p):(i=h,o||(o=setTimeout(()=>{o=null,c(i)},n-x)))},()=>i&&c(i)]}const Mu=(e,a,r=3)=>{let n=0;const i=dP(50,250);return uP(o=>{const c=o.loaded,m=o.lengthComputable?o.total:void 0,u=c-n,h=i(u),p=c<=m;n=c;const x={loaded:c,total:m,progress:m?c/m:void 0,bytes:u,rate:h||void 0,estimated:h&&m&&p?(m-c)/h:void 0,event:o,lengthComputable:m!=null,[a?"download":"upload"]:!0};e(x)},r)},V2=(e,a)=>{const r=e!=null;return[n=>a[0]({lengthComputable:r,total:e,loaded:n}),a[1]]},Y2=e=>(...a)=>ae.asap(()=>e(...a)),mP=ma.hasStandardBrowserEnv?((e,a)=>r=>(r=new URL(r,ma.origin),e.protocol===r.protocol&&e.host===r.host&&(a||e.port===r.port)))(new URL(ma.origin),ma.navigator&&/(msie|trident)/i.test(ma.navigator.userAgent)):()=>!0,fP=ma.hasStandardBrowserEnv?{write(e,a,r,n,i,o,c){if(typeof document>"u")return;const m=[`${e}=${encodeURIComponent(a)}`];ae.isNumber(r)&&m.push(`expires=${new Date(r).toUTCString()}`),ae.isString(n)&&m.push(`path=${n}`),ae.isString(i)&&m.push(`domain=${i}`),o===!0&&m.push("secure"),ae.isString(c)&&m.push(`SameSite=${c}`),document.cookie=m.join("; ")},read(e){if(typeof document>"u")return null;const a=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return a?decodeURIComponent(a[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function pP(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function hP(e,a){return a?e.replace(/\/?\/$/,"")+"/"+a.replace(/^\/+/,""):e}function l3(e,a,r){let n=!pP(a);return e&&(n||r==!1)?hP(e,a):a}const K2=e=>e instanceof _a?{...e}:e;function sl(e,a){a=a||{};const r={};function n(h,p,x,j){return ae.isPlainObject(h)&&ae.isPlainObject(p)?ae.merge.call({caseless:j},h,p):ae.isPlainObject(p)?ae.merge({},p):ae.isArray(p)?p.slice():p}function i(h,p,x,j){if(ae.isUndefined(p)){if(!ae.isUndefined(h))return n(void 0,h,x,j)}else return n(h,p,x,j)}function o(h,p){if(!ae.isUndefined(p))return n(void 0,p)}function c(h,p){if(ae.isUndefined(p)){if(!ae.isUndefined(h))return n(void 0,h)}else return n(void 0,p)}function m(h,p,x){if(x in a)return n(h,p);if(x in e)return n(void 0,h)}const u={url:o,method:o,data:o,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:m,headers:(h,p,x)=>i(K2(h),K2(p),x,!0)};return ae.forEach(Object.keys({...e,...a}),function(p){const x=u[p]||i,j=x(e[p],a[p],p);ae.isUndefined(j)&&x!==m||(r[p]=j)}),r}const i3=e=>{const a=sl({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:c,auth:m}=a;if(a.headers=c=_a.from(c),a.url=t3(l3(a.baseURL,a.url,a.allowAbsoluteUrls),e.params,e.paramsSerializer),m&&c.set("Authorization","Basic "+btoa((m.username||"")+":"+(m.password?unescape(encodeURIComponent(m.password)):""))),ae.isFormData(r)){if(ma.hasStandardBrowserEnv||ma.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if(ae.isFunction(r.getHeaders)){const u=r.getHeaders(),h=["content-type","content-length"];Object.entries(u).forEach(([p,x])=>{h.includes(p.toLowerCase())&&c.set(p,x)})}}if(ma.hasStandardBrowserEnv&&(n&&ae.isFunction(n)&&(n=n(a)),n||n!==!1&&mP(a.url))){const u=i&&o&&fP.read(o);u&&c.set(i,u)}return a},xP=typeof XMLHttpRequest<"u",gP=xP&&function(e){return new Promise(function(r,n){const i=i3(e);let o=i.data;const c=_a.from(i.headers).normalize();let{responseType:m,onUploadProgress:u,onDownloadProgress:h}=i,p,x,j,v,w;function S(){v&&v(),w&&w(),i.cancelToken&&i.cancelToken.unsubscribe(p),i.signal&&i.signal.removeEventListener("abort",p)}let A=new XMLHttpRequest;A.open(i.method.toUpperCase(),i.url,!0),A.timeout=i.timeout;function g(){if(!A)return;const E=_a.from("getAllResponseHeaders"in A&&A.getAllResponseHeaders()),D={data:!m||m==="text"||m==="json"?A.responseText:A.response,status:A.status,statusText:A.statusText,headers:E,config:e,request:A};s3(function(L){r(L),S()},function(L){n(L),S()},D),A=null}"onloadend"in A?A.onloadend=g:A.onreadystatechange=function(){!A||A.readyState!==4||A.status===0&&!(A.responseURL&&A.responseURL.indexOf("file:")===0)||setTimeout(g)},A.onabort=function(){A&&(n(new Be("Request aborted",Be.ECONNABORTED,e,A)),A=null)},A.onerror=function(O){const D=O&&O.message?O.message:"Network Error",B=new Be(D,Be.ERR_NETWORK,e,A);B.event=O||null,n(B),A=null},A.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const D=i.transitional||a3;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),n(new Be(O,D.clarifyTimeoutError?Be.ETIMEDOUT:Be.ECONNABORTED,e,A)),A=null},o===void 0&&c.setContentType(null),"setRequestHeader"in A&&ae.forEach(c.toJSON(),function(O,D){A.setRequestHeader(D,O)}),ae.isUndefined(i.withCredentials)||(A.withCredentials=!!i.withCredentials),m&&m!=="json"&&(A.responseType=i.responseType),h&&([j,w]=Mu(h,!0),A.addEventListener("progress",j)),u&&A.upload&&([x,v]=Mu(u),A.upload.addEventListener("progress",x),A.upload.addEventListener("loadend",v)),(i.cancelToken||i.signal)&&(p=E=>{A&&(n(!E||E.type?new gi(null,e,A):E),A.abort(),A=null)},i.cancelToken&&i.cancelToken.subscribe(p),i.signal&&(i.signal.aborted?p():i.signal.addEventListener("abort",p)));const C=cP(i.url);if(C&&ma.protocols.indexOf(C)===-1){n(new Be("Unsupported protocol "+C+":",Be.ERR_BAD_REQUEST,e));return}A.send(o||null)})},bP=(e,a)=>{const{length:r}=e=e?e.filter(Boolean):[];if(a||r){let n=new AbortController,i;const o=function(h){if(!i){i=!0,m();const p=h instanceof Error?h:this.reason;n.abort(p instanceof Be?p:new gi(p instanceof Error?p.message:p))}};let c=a&&setTimeout(()=>{c=null,o(new Be(`timeout ${a} of ms exceeded`,Be.ETIMEDOUT))},a);const m=()=>{e&&(c&&clearTimeout(c),c=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(o):h.removeEventListener("abort",o)}),e=null)};e.forEach(h=>h.addEventListener("abort",o));const{signal:u}=n;return u.unsubscribe=()=>ae.asap(m),u}},yP=function*(e,a){let r=e.byteLength;if(r<a){yield e;return}let n=0,i;for(;n<r;)i=n+a,yield e.slice(n,i),n=i},vP=async function*(e,a){for await(const r of jP(e))yield*yP(r,a)},jP=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const a=e.getReader();try{for(;;){const{done:r,value:n}=await a.read();if(r)break;yield n}}finally{await a.cancel()}},G2=(e,a,r,n)=>{const i=vP(e,a);let o=0,c,m=u=>{c||(c=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:h,value:p}=await i.next();if(h){m(),u.close();return}let x=p.byteLength;if(r){let j=o+=x;r(j)}u.enqueue(new Uint8Array(p))}catch(h){throw m(h),h}},cancel(u){return m(u),i.return()}},{highWaterMark:2})},J2=64*1024,{isFunction:Qd}=ae,NP=(({Request:e,Response:a})=>({Request:e,Response:a}))(ae.global),{ReadableStream:W2,TextEncoder:Q2}=ae.global,X2=(e,...a)=>{try{return!!e(...a)}catch{return!1}},wP=e=>{e=ae.merge.call({skipUndefined:!0},NP,e);const{fetch:a,Request:r,Response:n}=e,i=a?Qd(a):typeof fetch=="function",o=Qd(r),c=Qd(n);if(!i)return!1;const m=i&&Qd(W2),u=i&&(typeof Q2=="function"?(w=>S=>w.encode(S))(new Q2):async w=>new Uint8Array(await new r(w).arrayBuffer())),h=o&&m&&X2(()=>{let w=!1;const S=new r(ma.origin,{body:new W2,method:"POST",get duplex(){return w=!0,"half"}}).headers.has("Content-Type");return w&&!S}),p=c&&m&&X2(()=>ae.isReadableStream(new n("").body)),x={stream:p&&(w=>w.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!x[w]&&(x[w]=(S,A)=>{let g=S&&S[w];if(g)return g.call(S);throw new Be(`Response type '${w}' is not supported`,Be.ERR_NOT_SUPPORT,A)})});const j=async w=>{if(w==null)return 0;if(ae.isBlob(w))return w.size;if(ae.isSpecCompliantForm(w))return(await new r(ma.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(ae.isArrayBufferView(w)||ae.isArrayBuffer(w))return w.byteLength;if(ae.isURLSearchParams(w)&&(w=w+""),ae.isString(w))return(await u(w)).byteLength},v=async(w,S)=>{const A=ae.toFiniteNumber(w.getContentLength());return A??j(S)};return async w=>{let{url:S,method:A,data:g,signal:C,cancelToken:E,timeout:O,onDownloadProgress:D,onUploadProgress:B,responseType:L,headers:T,withCredentials:R="same-origin",fetchOptions:z}=i3(w),U=a||fetch;L=L?(L+"").toLowerCase():"text";let X=bP([C,E&&E.toAbortSignal()],O),fe=null;const se=X&&X.unsubscribe&&(()=>{X.unsubscribe()});let ie;try{if(B&&h&&A!=="get"&&A!=="head"&&(ie=await v(T,g))!==0){let P=new r(S,{method:"POST",body:g,duplex:"half"}),H;if(ae.isFormData(g)&&(H=P.headers.get("content-type"))&&T.setContentType(H),P.body){const[ee,pe]=V2(ie,Mu(Y2(B)));g=G2(P.body,J2,ee,pe)}}ae.isString(R)||(R=R?"include":"omit");const V=o&&"credentials"in r.prototype,K={...z,signal:X,method:A.toUpperCase(),headers:T.normalize().toJSON(),body:g,duplex:"half",credentials:V?R:void 0};fe=o&&new r(S,K);let ce=await(o?U(fe,z):U(S,K));const $=p&&(L==="stream"||L==="response");if(p&&(D||$&&se)){const P={};["status","statusText","headers"].forEach(ve=>{P[ve]=ce[ve]});const H=ae.toFiniteNumber(ce.headers.get("content-length")),[ee,pe]=D&&V2(H,Mu(Y2(D),!0))||[];ce=new n(G2(ce.body,J2,ee,()=>{pe&&pe(),se&&se()}),P)}L=L||"text";let I=await x[ae.findKey(x,L)||"text"](ce,w);return!$&&se&&se(),await new Promise((P,H)=>{s3(P,H,{data:I,headers:_a.from(ce.headers),status:ce.status,statusText:ce.statusText,config:w,request:fe})})}catch(V){throw se&&se(),V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)?Object.assign(new Be("Network Error",Be.ERR_NETWORK,w,fe),{cause:V.cause||V}):Be.from(V,V&&V.code,w,fe)}}},AP=new Map,o3=e=>{let a=e&&e.env||{};const{fetch:r,Request:n,Response:i}=a,o=[n,i,r];let c=o.length,m=c,u,h,p=AP;for(;m--;)u=o[m],h=p.get(u),h===void 0&&p.set(u,h=m?new Map:wP(a)),p=h;return h};o3();const Mb={http:UR,xhr:gP,fetch:{get:o3}};ae.forEach(Mb,(e,a)=>{if(e){try{Object.defineProperty(e,"name",{value:a})}catch{}Object.defineProperty(e,"adapterName",{value:a})}});const Z2=e=>`- ${e}`,SP=e=>ae.isFunction(e)||e===null||e===!1;function CP(e,a){e=ae.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let c=0;c<r;c++){n=e[c];let m;if(i=n,!SP(n)&&(i=Mb[(m=String(n)).toLowerCase()],i===void 0))throw new Be(`Unknown adapter '${m}'`);if(i&&(ae.isFunction(i)||(i=i.get(a))))break;o[m||"#"+c]=i}if(!i){const c=Object.entries(o).map(([u,h])=>`adapter ${u} `+(h===!1?"is not supported by the environment":"is not available in the build"));let m=r?c.length>1?`since :
`+c.map(Z2).join(`
`):" "+Z2(c[0]):"as no adapter specified";throw new Be("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return i}const c3={getAdapter:CP,adapters:Mb};function Ih(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gi(null,e)}function ew(e){return Ih(e),e.headers=_a.from(e.headers),e.data=Bh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),c3.getAdapter(e.adapter||fc.adapter,e)(e).then(function(n){return Ih(e),n.data=Bh.call(e,e.transformResponse,n),n.headers=_a.from(n.headers),n},function(n){return n3(n)||(Ih(e),n&&n.response&&(n.response.data=Bh.call(e,e.transformResponse,n.response),n.response.headers=_a.from(n.response.headers))),Promise.reject(n)})}const d3="1.13.1",Dm={};["object","boolean","number","function","string","symbol"].forEach((e,a)=>{Dm[e]=function(n){return typeof n===e||"a"+(a<1?"n ":" ")+e}});const tw={};Dm.transitional=function(a,r,n){function i(o,c){return"[Axios v"+d3+"] Transitional option '"+o+"'"+c+(n?". "+n:"")}return(o,c,m)=>{if(a===!1)throw new Be(i(c," has been removed"+(r?" in "+r:"")),Be.ERR_DEPRECATED);return r&&!tw[c]&&(tw[c]=!0,console.warn(i(c," has been deprecated since v"+r+" and will be removed in the near future"))),a?a(o,c,m):!0}};Dm.spelling=function(a){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${a}`),!0)};function EP(e,a,r){if(typeof e!="object")throw new Be("options must be an object",Be.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],c=a[o];if(c){const m=e[o],u=m===void 0||c(m,o,e);if(u!==!0)throw new Be("option "+o+" must be "+u,Be.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Be("Unknown option "+o,Be.ERR_BAD_OPTION)}}const bu={assertOptions:EP,validators:Dm},Br=bu.validators;let Zs=class{constructor(a){this.defaults=a||{},this.interceptors={request:new q2,response:new q2}}async request(a,r){try{return await this._request(a,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+o):n.stack=o}catch{}}throw n}}_request(a,r){typeof a=="string"?(r=r||{},r.url=a):r=a||{},r=sl(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&bu.assertOptions(n,{silentJSONParsing:Br.transitional(Br.boolean),forcedJSONParsing:Br.transitional(Br.boolean),clarifyTimeoutError:Br.transitional(Br.boolean)},!1),i!=null&&(ae.isFunction(i)?r.paramsSerializer={serialize:i}:bu.assertOptions(i,{encode:Br.function,serialize:Br.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),bu.assertOptions(r,{baseUrl:Br.spelling("baseURL"),withXsrfToken:Br.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=o&&ae.merge(o.common,o[r.method]);o&&ae.forEach(["delete","get","head","post","put","patch","common"],w=>{delete o[w]}),r.headers=_a.concat(c,o);const m=[];let u=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(u=u&&S.synchronous,m.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let p,x=0,j;if(!u){const w=[ew.bind(this),void 0];for(w.unshift(...m),w.push(...h),j=w.length,p=Promise.resolve(r);x<j;)p=p.then(w[x++],w[x++]);return p}j=m.length;let v=r;for(;x<j;){const w=m[x++],S=m[x++];try{v=w(v)}catch(A){S.call(this,A);break}}try{p=ew.call(this,v)}catch(w){return Promise.reject(w)}for(x=0,j=h.length;x<j;)p=p.then(h[x++],h[x++]);return p}getUri(a){a=sl(this.defaults,a);const r=l3(a.baseURL,a.url,a.allowAbsoluteUrls);return t3(r,a.params,a.paramsSerializer)}};ae.forEach(["delete","get","head","options"],function(a){Zs.prototype[a]=function(r,n){return this.request(sl(n||{},{method:a,url:r,data:(n||{}).data}))}});ae.forEach(["post","put","patch"],function(a){function r(n){return function(o,c,m){return this.request(sl(m||{},{method:a,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:c}))}}Zs.prototype[a]=r(),Zs.prototype[a+"Form"]=r(!0)});let kP=class u3{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const c=new Promise(m=>{n.subscribe(m),o=m}).then(i);return c.cancel=function(){n.unsubscribe(o)},c},a(function(o,c,m){n.reason||(n.reason=new gi(o,c,m),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const r=this._listeners.indexOf(a);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const a=new AbortController,r=n=>{a.abort(n)};return this.subscribe(r),a.signal.unsubscribe=()=>this.unsubscribe(r),a.signal}static source(){let a;return{token:new u3(function(i){a=i}),cancel:a}}};function OP(e){return function(r){return e.apply(null,r)}}function DP(e){return ae.isObject(e)&&e.isAxiosError===!0}const Pg={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Pg).forEach(([e,a])=>{Pg[a]=e});function m3(e){const a=new Zs(e),r=qC(Zs.prototype.request,a);return ae.extend(r,Zs.prototype,a,{allOwnKeys:!0}),ae.extend(r,a,null,{allOwnKeys:!0}),r.create=function(i){return m3(sl(e,i))},r}const F=m3(fc);F.Axios=Zs;F.CanceledError=gi;F.CancelToken=kP;F.isCancel=n3;F.VERSION=d3;F.toFormData=Om;F.AxiosError=Be;F.Cancel=F.CanceledError;F.all=function(a){return Promise.all(a)};F.spread=OP;F.isAxiosError=DP;F.mergeConfig=sl;F.AxiosHeaders=_a;F.formToJSON=e=>r3(ae.isHTMLForm(e)?new FormData(e):e);F.getAdapter=c3.getAdapter;F.HttpStatusCode=Pg;F.default=F;const{Axios:DQ,AxiosError:TQ,CanceledError:RQ,isCancel:PQ,CancelToken:MQ,VERSION:_Q,all:zQ,Cancel:LQ,isAxiosError:BQ,spread:IQ,toFormData:FQ,AxiosHeaders:UQ,HttpStatusCode:$Q,formToJSON:qQ,getAdapter:HQ,mergeConfig:VQ}=F,ya="http://213.199.41.219:3001/api/users";F.interceptors.request.use(e=>{const a=localStorage.getItem("token");return console.log("Request config:",{url:e.url,token:a,method:e.method,headers:e.headers}),a&&(e.headers.Authorization=`Bearer ${a}`),e},e=>Promise.reject(e));F.interceptors.response.use(e=>(console.log("Response received:",{url:e.config.url,status:e.status,data:e.data}),e),e=>(console.log("Response error:",{url:e.config?.url,status:e.response?.status,data:e.response?.data}),e.response?.status===401&&localStorage.removeItem("token"),Promise.reject(e)));const TP=async(e,a)=>await F.post(`${ya}/login`,{email:e,password:a}),RP=async(e,a,r)=>await F.post(`${ya}/register`,{username:e,email:a,password:r}),PP=async e=>{const a=localStorage.getItem("registerEmail");return await F.post(`${ya}/verify-otp`,{email:a,otp:e})},MP=async()=>{const e=localStorage.getItem("registerEmail");return await F.post(`${ya}/resend-otp`,{email:e})},_P=async e=>await F.post(`${ya}/forgot-password`,{email:e}),zP=async(e,a,r)=>await F.post(`${ya}/reset-password`,{email:e,otp:a,newPassword:r}),LP=async()=>await F.get(`${ya}/me`),BP=async e=>{if(console.log("Preparing upload with file:",e),!e)throw console.log("No file provided for upload"),new Error("No file provided");const a=new FormData;a.append("profilePicture",e),console.log("FormData contents before send:");for(let i of a.entries())console.log("Entry:",i[0],i[1]);const r={headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}},n=await F.post(`${ya}/upload-profile-picture`,a,r);return console.log("Upload response:",n.data),n},IP=async(e,a,r)=>await F.post(`${ya}/create-admin`,{username:e,email:a,password:r}),FP=async(e,a)=>await F.put(`${ya}/users/${e}/permissions`,{permittedPages:a}),Fh=async()=>await F.get(`${ya}/`),qo=ys("user/login",async({email:e,password:a},{rejectWithValue:r})=>{try{const n=await TP(e,a);return localStorage.setItem("token",n.data.token),n.data}catch(n){return r(n.response?.data?.message||"Login failed")}}),Ho=ys("user/register",async({username:e,email:a,password:r},{rejectWithValue:n})=>{try{const i=await RP(e,a,r);return localStorage.setItem("registerEmail",a),i.data}catch(i){return n(i.response?.data?.message||"Signup failed")}}),Vo=ys("user/verifyOtp",async(e,{rejectWithValue:a})=>{try{const r=await PP(e);return localStorage.setItem("token",r.data.token),localStorage.removeItem("registerEmail"),r.data}catch(r){return a(r.response?.data?.message||"OTP verification failed")}}),yu=ys("user/resendOtp",async(e,{rejectWithValue:a})=>{try{return(await MP()).data}catch(r){return a(r.response?.data?.message||"Failed to resend OTP")}}),Yo=ys("user/forgotPassword",async(e,{rejectWithValue:a})=>{try{return(await _P(e)).data}catch(r){return a(r.response?.data?.message||"Failed to send OTP")}}),Ko=ys("user/resetPassword",async({email:e,otp:a,newPassword:r},{rejectWithValue:n})=>{try{return(await zP(e,a,r)).data}catch(i){return n(i.response?.data?.message||"Password reset failed")}}),el=ys("user/getAuthUser",async(e,{rejectWithValue:a})=>{try{return(await LP()).data}catch(r){return localStorage.removeItem("token"),a(r.response?.data?.message||"Authentication check failed")}}),vu=ys("user/uploadProfilePicture",async(e,{rejectWithValue:a})=>{console.log("Starting uploadProfilePicture with file:",e);try{const r=await BP(e);return console.log("Upload successful, response:",r.data),r.data}catch(r){return console.log("Upload failed:",r.response?.data?.message||r.message),a(r.response?.data?.message||"Profile picture upload failed")}}),f3=za({name:"user",initialState:{user:null,isAuthenticated:!1,loading:!1,error:null,success:null},reducers:{logout:e=>{e.user=null,e.isAuthenticated=!1,e.error=null,e.success="Logged out successfully!",localStorage.removeItem("token"),localStorage.removeItem("registerEmail")},clearMessages:e=>{e.error=null,e.success=null}},extraReducers:e=>{e.addCase(qo.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(qo.fulfilled,(a,r)=>{a.loading=!1,a.isAuthenticated=!0,a.user=r.payload.user,a.success="Login successful!"}).addCase(qo.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(Ho.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(Ho.fulfilled,(a,r)=>{a.loading=!1,a.success="Registration successful! Please verify OTP sent to your email."}).addCase(Ho.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(Vo.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(Vo.fulfilled,(a,r)=>{a.loading=!1,a.isAuthenticated=!0,a.user=r.payload.user,a.success="OTP verified successfully!"}).addCase(Vo.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(yu.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(yu.fulfilled,a=>{a.loading=!1,a.success="OTP resent successfully to your email."}).addCase(yu.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(Yo.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(Yo.fulfilled,(a,r)=>{a.loading=!1,a.success="Password reset OTP sent to your email."}).addCase(Yo.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(Ko.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(Ko.fulfilled,(a,r)=>{a.loading=!1,a.success="Password reset successfully! Please login."}).addCase(Ko.rejected,(a,r)=>{a.loading=!1,a.error=r.payload}).addCase(el.pending,a=>{a.loading=!0,a.error=null}).addCase(el.fulfilled,(a,r)=>{a.loading=!1,a.isAuthenticated=!0,a.user=r.payload.user}).addCase(el.rejected,(a,r)=>{a.loading=!1,a.isAuthenticated=!1,a.user=null,a.error=r.payload}).addCase(vu.pending,a=>{a.loading=!0,a.error=null,a.success=null}).addCase(vu.fulfilled,(a,r)=>{a.loading=!1,a.user=r.payload.user,a.success=r.payload.message}).addCase(vu.rejected,(a,r)=>{a.loading=!1,a.error=r.payload})}}),{logout:UP,clearMessages:hs}=f3.actions,$P=f3.reducer,qP=DC({reducer:{user:$P}});/**
 * react-router v7.9.5
 *
 * 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 aw="popstate";function HP(e={}){function a(n,i){let{pathname:o,search:c,hash:m}=n.location;return Mg("",{pathname:o,search:c,hash:m},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Xo(i)}return YP(a,r,null,e)}function vt(e,a){if(e===!1||e===null||typeof e>"u")throw new Error(a)}function Er(e,a){if(!e){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function VP(){return Math.random().toString(36).substring(2,10)}function rw(e,a){return{usr:e.state,key:e.key,idx:a}}function Mg(e,a,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof a=="string"?bi(a):a,state:r,key:a&&a.key||n||VP()}}function Xo({pathname:e="/",search:a="",hash:r=""}){return a&&a!=="?"&&(e+=a.charAt(0)==="?"?a:"?"+a),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function bi(e){let a={};if(e){let r=e.indexOf("#");r>=0&&(a.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(a.search=e.substring(n),e=e.substring(0,n)),e&&(a.pathname=e)}return a}function YP(e,a,r,n={}){let{window:i=document.defaultView,v5Compat:o=!1}=n,c=i.history,m="POP",u=null,h=p();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function p(){return(c.state||{idx:null}).idx}function x(){m="POP";let A=p(),g=A==null?null:A-h;h=A,u&&u({action:m,location:S.location,delta:g})}function j(A,g){m="PUSH";let C=Mg(S.location,A,g);h=p()+1;let E=rw(C,h),O=S.createHref(C);try{c.pushState(E,"",O)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;i.location.assign(O)}o&&u&&u({action:m,location:S.location,delta:1})}function v(A,g){m="REPLACE";let C=Mg(S.location,A,g);h=p();let E=rw(C,h),O=S.createHref(C);c.replaceState(E,"",O),o&&u&&u({action:m,location:S.location,delta:0})}function w(A){return KP(A)}let S={get action(){return m},get location(){return e(i,c)},listen(A){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(aw,x),u=A,()=>{i.removeEventListener(aw,x),u=null}},createHref(A){return a(i,A)},createURL:w,encodeLocation(A){let g=w(A);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:j,replace:v,go(A){return c.go(A)}};return S}function KP(e,a=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),vt(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Xo(e);return n=n.replace(/ $/,"%20"),!a&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function p3(e,a,r="/"){return GP(e,a,r,!1)}function GP(e,a,r,n){let i=typeof a=="string"?bi(a):a,o=wn(i.pathname||"/",r);if(o==null)return null;let c=h3(e);JP(c);let m=null;for(let u=0;m==null&&u<c.length;++u){let h=l7(o);m=n7(c[u],h,n)}return m}function h3(e,a=[],r=[],n="",i=!1){let o=(c,m,u=i,h)=>{let p={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:m,route:c};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&u)return;vt(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let x=vn([n,p.relativePath]),j=r.concat(p);c.children&&c.children.length>0&&(vt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),h3(c.children,a,j,x,u)),!(c.path==null&&!c.index)&&a.push({path:x,score:a7(x,c.index),routesMeta:j})};return e.forEach((c,m)=>{if(c.path===""||!c.path?.includes("?"))o(c,m);else for(let u of x3(c.path))o(c,m,!0,u)}),a}function x3(e){let a=e.split("/");if(a.length===0)return[];let[r,...n]=a,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let c=x3(n.join("/")),m=[];return m.push(...c.map(u=>u===""?o:[o,u].join("/"))),i&&m.push(...c),m.map(u=>e.startsWith("/")&&u===""?"/":u)}function JP(e){e.sort((a,r)=>a.score!==r.score?r.score-a.score:r7(a.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var WP=/^:[\w-]+$/,QP=3,XP=2,ZP=1,e7=10,t7=-2,nw=e=>e==="*";function a7(e,a){let r=e.split("/"),n=r.length;return r.some(nw)&&(n+=t7),a&&(n+=XP),r.filter(i=>!nw(i)).reduce((i,o)=>i+(WP.test(o)?QP:o===""?ZP:e7),n)}function r7(e,a){return e.length===a.length&&e.slice(0,-1).every((n,i)=>n===a[i])?e[e.length-1]-a[a.length-1]:0}function n7(e,a,r=!1){let{routesMeta:n}=e,i={},o="/",c=[];for(let m=0;m<n.length;++m){let u=n[m],h=m===n.length-1,p=o==="/"?a:a.slice(o.length)||"/",x=_u({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},p),j=u.route;if(!x&&h&&r&&!n[n.length-1].route.index&&(x=_u({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},p)),!x)return null;Object.assign(i,x.params),c.push({params:i,pathname:vn([o,x.pathname]),pathnameBase:d7(vn([o,x.pathnameBase])),route:j}),x.pathnameBase!=="/"&&(o=vn([o,x.pathnameBase]))}return c}function _u(e,a){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=s7(e.path,e.caseSensitive,e.end),i=a.match(r);if(!i)return null;let o=i[0],c=o.replace(/(.)\/+$/,"$1"),m=i.slice(1);return{params:n.reduce((h,{paramName:p,isOptional:x},j)=>{if(p==="*"){let w=m[j]||"";c=o.slice(0,o.length-w.length).replace(/(.)\/+$/,"$1")}const v=m[j];return x&&!v?h[p]=void 0:h[p]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:e}}function s7(e,a=!1,r=!0){Er(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,m,u)=>(n.push({paramName:m,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,a?void 0:"i"),n]}function l7(e){try{return e.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return Er(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),e}}function wn(e,a){if(a==="/")return e;if(!e.toLowerCase().startsWith(a.toLowerCase()))return null;let r=a.endsWith("/")?a.length-1:a.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function i7(e,a="/"){let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?bi(e):e;return{pathname:r?r.startsWith("/")?r:o7(r,a):a,search:u7(n),hash:m7(i)}}function o7(e,a){let r=a.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function Uh(e,a,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${a}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function c7(e){return e.filter((a,r)=>r===0||a.route.path&&a.route.path.length>0)}function _b(e){let a=c7(e);return a.map((r,n)=>n===a.length-1?r.pathname:r.pathnameBase)}function zb(e,a,r,n=!1){let i;typeof e=="string"?i=bi(e):(i={...e},vt(!i.pathname||!i.pathname.includes("?"),Uh("?","pathname","search",i)),vt(!i.pathname||!i.pathname.includes("#"),Uh("#","pathname","hash",i)),vt(!i.search||!i.search.includes("#"),Uh("#","search","hash",i)));let o=e===""||i.pathname==="",c=o?"/":i.pathname,m;if(c==null)m=r;else{let x=a.length-1;if(!n&&c.startsWith("..")){let j=c.split("/");for(;j[0]==="..";)j.shift(),x-=1;i.pathname=j.join("/")}m=x>=0?a[x]:"/"}let u=i7(i,m),h=c&&c!=="/"&&c.endsWith("/"),p=(o||c===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(h||p)&&(u.pathname+="/"),u}var vn=e=>e.join("/").replace(/\/\/+/g,"/"),d7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),u7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,m7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function f7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var g3=["POST","PUT","PATCH","DELETE"];new Set(g3);var p7=["GET",...g3];new Set(p7);var yi=b.createContext(null);yi.displayName="DataRouter";var Tm=b.createContext(null);Tm.displayName="DataRouterState";b.createContext(!1);var b3=b.createContext({isTransitioning:!1});b3.displayName="ViewTransition";var h7=b.createContext(new Map);h7.displayName="Fetchers";var x7=b.createContext(null);x7.displayName="Await";var Tr=b.createContext(null);Tr.displayName="Navigation";var pc=b.createContext(null);pc.displayName="Location";var Yr=b.createContext({outlet:null,matches:[],isDataRoute:!1});Yr.displayName="Route";var Lb=b.createContext(null);Lb.displayName="RouteError";function g7(e,{relative:a}={}){vt(vi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=b.useContext(Tr),{hash:i,pathname:o,search:c}=hc(e,{relative:a}),m=o;return r!=="/"&&(m=o==="/"?r:vn([r,o])),n.createHref({pathname:m,search:c,hash:i})}function vi(){return b.useContext(pc)!=null}function yr(){return vt(vi(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(pc).location}var y3="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function v3(e){b.useContext(Tr).static||b.useLayoutEffect(e)}function Dn(){let{isDataRoute:e}=b.useContext(Yr);return e?D7():b7()}function b7(){vt(vi(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(yi),{basename:a,navigator:r}=b.useContext(Tr),{matches:n}=b.useContext(Yr),{pathname:i}=yr(),o=JSON.stringify(_b(n)),c=b.useRef(!1);return v3(()=>{c.current=!0}),b.useCallback((u,h={})=>{if(Er(c.current,y3),!c.current)return;if(typeof u=="number"){r.go(u);return}let p=zb(u,JSON.parse(o),i,h.relative==="path");e==null&&a!=="/"&&(p.pathname=p.pathname==="/"?a:vn([a,p.pathname])),(h.replace?r.replace:r.push)(p,h.state,h)},[a,r,o,i,e])}b.createContext(null);function hc(e,{relative:a}={}){let{matches:r}=b.useContext(Yr),{pathname:n}=yr(),i=JSON.stringify(_b(r));return b.useMemo(()=>zb(e,JSON.parse(i),n,a==="path"),[e,i,n,a])}function y7(e,a){return j3(e,a)}function j3(e,a,r,n,i){vt(vi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=b.useContext(Tr),{matches:c}=b.useContext(Yr),m=c[c.length-1],u=m?m.params:{},h=m?m.pathname:"/",p=m?m.pathnameBase:"/",x=m&&m.route;{let C=x&&x.path||"";N3(h,!x||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${C}">) 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="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let j=yr(),v;if(a){let C=typeof a=="string"?bi(a):a;vt(p==="/"||C.pathname?.startsWith(p),`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 "${p}" but pathname "${C.pathname}" was given in the \`location\` prop.`),v=C}else v=j;let w=v.pathname||"/",S=w;if(p!=="/"){let C=p.replace(/^\//,"").split("/");S="/"+w.replace(/^\//,"").split("/").slice(C.length).join("/")}let A=p3(e,{pathname:S});Er(x||A!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Er(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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 g=A7(A&&A.map(C=>Object.assign({},C,{params:Object.assign({},u,C.params),pathname:vn([p,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?p:vn([p,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),c,r,n,i);return a&&g?b.createElement(pc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},g):g}function v7(){let e=O7(),a=f7(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:o},"ErrorBoundary")," or"," ",b.createElement("code",{style:o},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},a),r?b.createElement("pre",{style:i},r):null,c)}var j7=b.createElement(v7,null),N7=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,a){return a.location!==e.location||a.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:a.error,location:a.location,revalidation:e.revalidation||a.revalidation}}componentDidCatch(e,a){this.props.unstable_onError?this.props.unstable_onError(e,a):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?b.createElement(Yr.Provider,{value:this.props.routeContext},b.createElement(Lb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function w7({routeContext:e,match:a,children:r}){let n=b.useContext(yi);return n&&n.static&&n.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=a.route.id),b.createElement(Yr.Provider,{value:e},r)}function A7(e,a=[],r=null,n=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(a.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,c=r?.errors;if(c!=null){let h=o.findIndex(p=>p.route.id&&c?.[p.route.id]!==void 0);vt(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let m=!1,u=-1;if(r)for(let h=0;h<o.length;h++){let p=o[h];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(u=h),p.route.id){let{loaderData:x,errors:j}=r,v=p.route.loader&&!x.hasOwnProperty(p.route.id)&&(!j||j[p.route.id]===void 0);if(p.route.lazy||v){m=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((h,p,x)=>{let j,v=!1,w=null,S=null;r&&(j=c&&p.route.id?c[p.route.id]:void 0,w=p.route.errorElement||j7,m&&(u<0&&x===0?(N3("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,S=null):u===x&&(v=!0,S=p.route.hydrateFallbackElement||null)));let A=a.concat(o.slice(0,x+1)),g=()=>{let C;return j?C=w:v?C=S:p.route.Component?C=b.createElement(p.route.Component,null):p.route.element?C=p.route.element:C=h,b.createElement(w7,{match:p,routeContext:{outlet:h,matches:A,isDataRoute:r!=null},children:C})};return r&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?b.createElement(N7,{location:r.location,revalidation:r.revalidation,component:w,error:j,children:g(),routeContext:{outlet:null,matches:A,isDataRoute:!0},unstable_onError:n}):g()},null)}function Bb(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function S7(e){let a=b.useContext(yi);return vt(a,Bb(e)),a}function C7(e){let a=b.useContext(Tm);return vt(a,Bb(e)),a}function E7(e){let a=b.useContext(Yr);return vt(a,Bb(e)),a}function Ib(e){let a=E7(e),r=a.matches[a.matches.length-1];return vt(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function k7(){return Ib("useRouteId")}function O7(){let e=b.useContext(Lb),a=C7("useRouteError"),r=Ib("useRouteError");return e!==void 0?e:a.errors?.[r]}function D7(){let{router:e}=S7("useNavigate"),a=Ib("useNavigate"),r=b.useRef(!1);return v3(()=>{r.current=!0}),b.useCallback(async(i,o={})=>{Er(r.current,y3),r.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:a,...o}))},[e,a])}var sw={};function N3(e,a,r){!a&&!sw[e]&&(sw[e]=!0,Er(!1,r))}b.memo(T7);function T7({routes:e,future:a,state:r,unstable_onError:n}){return j3(e,void 0,r,n,a)}function $h({to:e,replace:a,state:r,relative:n}){vt(vi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=b.useContext(Tr);Er(!i,"<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:o}=b.useContext(Yr),{pathname:c}=yr(),m=Dn(),u=zb(e,_b(o),c,n==="path"),h=JSON.stringify(u);return b.useEffect(()=>{m(JSON.parse(h),{replace:a,state:r,relative:n})},[m,h,n,a,r]),null}function ge(e){vt(!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 R7({basename:e="/",children:a=null,location:r,navigationType:n="POP",navigator:i,static:o=!1}){vt(!vi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),m=b.useMemo(()=>({basename:c,navigator:i,static:o,future:{}}),[c,i,o]);typeof r=="string"&&(r=bi(r));let{pathname:u="/",search:h="",hash:p="",state:x=null,key:j="default"}=r,v=b.useMemo(()=>{let w=wn(u,c);return w==null?null:{location:{pathname:w,search:h,hash:p,state:x,key:j},navigationType:n}},[c,u,h,p,x,j,n]);return Er(v!=null,`<Router basename="${c}"> is not able to match the URL "${u}${h}${p}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:b.createElement(Tr.Provider,{value:m},b.createElement(pc.Provider,{children:a,value:v}))}function P7({children:e,location:a}){return y7(_g(e),a)}function _g(e,a=[]){let r=[];return b.Children.forEach(e,(n,i)=>{if(!b.isValidElement(n))return;let o=[...a,i];if(n.type===b.Fragment){r.push.apply(r,_g(n.props.children,o));return}vt(n.type===ge,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),vt(!n.props.index||!n.props.children,"An index route cannot have child routes.");let c={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(c.children=_g(n.props.children,o)),r.push(c)}),r}var ju="get",Nu="application/x-www-form-urlencoded";function Rm(e){return e!=null&&typeof e.tagName=="string"}function M7(e){return Rm(e)&&e.tagName.toLowerCase()==="button"}function _7(e){return Rm(e)&&e.tagName.toLowerCase()==="form"}function z7(e){return Rm(e)&&e.tagName.toLowerCase()==="input"}function L7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function B7(e,a){return e.button===0&&(!a||a==="_self")&&!L7(e)}var Xd=null;function I7(){if(Xd===null)try{new FormData(document.createElement("form"),0),Xd=!1}catch{Xd=!0}return Xd}var F7=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function qh(e){return e!=null&&!F7.has(e)?(Er(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Nu}"`),null):e}function U7(e,a){let r,n,i,o,c;if(_7(e)){let m=e.getAttribute("action");n=m?wn(m,a):null,r=e.getAttribute("method")||ju,i=qh(e.getAttribute("enctype"))||Nu,o=new FormData(e)}else if(M7(e)||z7(e)&&(e.type==="submit"||e.type==="image")){let m=e.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||m.getAttribute("action");if(n=u?wn(u,a):null,r=e.getAttribute("formmethod")||m.getAttribute("method")||ju,i=qh(e.getAttribute("formenctype"))||qh(m.getAttribute("enctype"))||Nu,o=new FormData(m,e),!I7()){let{name:h,type:p,value:x}=e;if(p==="image"){let j=h?`${h}.`:"";o.append(`${j}x`,"0"),o.append(`${j}y`,"0")}else h&&o.append(h,x)}}else{if(Rm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ju,n=null,i=Nu,c=e}return o&&i==="text/plain"&&(c=o,o=void 0),{action:n,method:r.toLowerCase(),encType:i,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fb(e,a){if(e===!1||e===null||typeof e>"u")throw new Error(a)}function $7(e,a,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:a&&wn(n.pathname,a)==="/"?n.pathname=`${a.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function q7(e,a){if(e.id in a)return a[e.id];try{let r=await import(e.module);return a[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function H7(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function V7(e,a,r){let n=await Promise.all(e.map(async i=>{let o=a.routes[i.route.id];if(o){let c=await q7(o,r);return c.links?c.links():[]}return[]}));return J7(n.flat(1).filter(H7).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function lw(e,a,r,n,i,o){let c=(u,h)=>r[h]?u.route.id!==r[h].route.id:!0,m=(u,h)=>r[h].pathname!==u.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==u.params["*"];return o==="assets"?a.filter((u,h)=>c(u,h)||m(u,h)):o==="data"?a.filter((u,h)=>{let p=n.routes[u.route.id];if(!p||!p.hasLoader)return!1;if(c(u,h)||m(u,h))return!0;if(u.route.shouldRevalidate){let x=u.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function Y7(e,a,{includeHydrateFallback:r}={}){return K7(e.map(n=>{let i=a.routes[n.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),r&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function K7(e){return[...new Set(e)]}function G7(e){let a={},r=Object.keys(e).sort();for(let n of r)a[n]=e[n];return a}function J7(e,a){let r=new Set;return new Set(a),e.reduce((n,i)=>{let o=JSON.stringify(G7(i));return r.has(o)||(r.add(o),n.push({key:o,link:i})),n},[])}function w3(){let e=b.useContext(yi);return Fb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function W7(){let e=b.useContext(Tm);return Fb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ub=b.createContext(void 0);Ub.displayName="FrameworkContext";function A3(){let e=b.useContext(Ub);return Fb(e,"You must render this element inside a <HydratedRouter> element"),e}function Q7(e,a){let r=b.useContext(Ub),[n,i]=b.useState(!1),[o,c]=b.useState(!1),{onFocus:m,onBlur:u,onMouseEnter:h,onMouseLeave:p,onTouchStart:x}=a,j=b.useRef(null);b.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let S=g=>{g.forEach(C=>{c(C.isIntersecting)})},A=new IntersectionObserver(S,{threshold:.5});return j.current&&A.observe(j.current),()=>{A.disconnect()}}},[e]),b.useEffect(()=>{if(n){let S=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(S)}}},[n]);let v=()=>{i(!0)},w=()=>{i(!1),c(!1)};return r?e!=="intent"?[o,j,{}]:[o,j,{onFocus:To(m,v),onBlur:To(u,w),onMouseEnter:To(h,v),onMouseLeave:To(p,w),onTouchStart:To(x,v)}]:[!1,j,{}]}function To(e,a){return r=>{e&&e(r),r.defaultPrevented||a(r)}}function X7({page:e,...a}){let{router:r}=w3(),n=b.useMemo(()=>p3(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?b.createElement(eM,{page:e,matches:n,...a}):null}function Z7(e){let{manifest:a,routeModules:r}=A3(),[n,i]=b.useState([]);return b.useEffect(()=>{let o=!1;return V7(e,a,r).then(c=>{o||i(c)}),()=>{o=!0}},[e,a,r]),n}function eM({page:e,matches:a,...r}){let n=yr(),{manifest:i,routeModules:o}=A3(),{basename:c}=w3(),{loaderData:m,matches:u}=W7(),h=b.useMemo(()=>lw(e,a,u,i,n,"data"),[e,a,u,i,n]),p=b.useMemo(()=>lw(e,a,u,i,n,"assets"),[e,a,u,i,n]),x=b.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let w=new Set,S=!1;if(a.forEach(g=>{let C=i.routes[g.route.id];!C||!C.hasLoader||(!h.some(E=>E.route.id===g.route.id)&&g.route.id in m&&o[g.route.id]?.shouldRevalidate||C.hasClientLoader?S=!0:w.add(g.route.id))}),w.size===0)return[];let A=$7(e,c,"data");return S&&w.size>0&&A.searchParams.set("_routes",a.filter(g=>w.has(g.route.id)).map(g=>g.route.id).join(",")),[A.pathname+A.search]},[c,m,n,i,h,a,e,o]),j=b.useMemo(()=>Y7(p,i),[p,i]),v=Z7(p);return b.createElement(b.Fragment,null,x.map(w=>b.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...r})),j.map(w=>b.createElement("link",{key:w,rel:"modulepreload",href:w,...r})),v.map(({key:w,link:S})=>b.createElement("link",{key:w,nonce:r.nonce,...S})))}function tM(...e){return a=>{e.forEach(r=>{typeof r=="function"?r(a):r!=null&&(r.current=a)})}}var S3=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{S3&&(window.__reactRouterVersion="7.9.5")}catch{}function aM({basename:e,children:a,window:r}){let n=b.useRef();n.current==null&&(n.current=HP({window:r,v5Compat:!0}));let i=n.current,[o,c]=b.useState({action:i.action,location:i.location}),m=b.useCallback(u=>{b.startTransition(()=>c(u))},[c]);return b.useLayoutEffect(()=>i.listen(m),[i,m]),b.createElement(R7,{basename:e,children:a,location:o.location,navigationType:o.action,navigator:i})}var C3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fr=b.forwardRef(function({onClick:a,discover:r="render",prefetch:n="none",relative:i,reloadDocument:o,replace:c,state:m,target:u,to:h,preventScrollReset:p,viewTransition:x,...j},v){let{basename:w}=b.useContext(Tr),S=typeof h=="string"&&C3.test(h),A,g=!1;if(typeof h=="string"&&S&&(A=h,S3))try{let R=new URL(window.location.href),z=h.startsWith("//")?new URL(R.protocol+h):new URL(h),U=wn(z.pathname,w);z.origin===R.origin&&U!=null?h=U+z.search+z.hash:g=!0}catch{Er(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=g7(h,{relative:i}),[E,O,D]=Q7(n,j),B=sM(h,{replace:c,state:m,target:u,preventScrollReset:p,relative:i,viewTransition:x});function L(R){a&&a(R),R.defaultPrevented||B(R)}let T=b.createElement("a",{...j,...D,href:A||C,onClick:g||o?a:L,ref:tM(v,O),target:u,"data-discover":!S&&r==="render"?"true":void 0});return E&&!S?b.createElement(b.Fragment,null,T,b.createElement(X7,{page:C})):T});Fr.displayName="Link";var Vt=b.forwardRef(function({"aria-current":a="page",caseSensitive:r=!1,className:n="",end:i=!1,style:o,to:c,viewTransition:m,children:u,...h},p){let x=hc(c,{relative:h.relative}),j=yr(),v=b.useContext(Tm),{navigator:w,basename:S}=b.useContext(Tr),A=v!=null&&dM(x)&&m===!0,g=w.encodeLocation?w.encodeLocation(x).pathname:x.pathname,C=j.pathname,E=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(C=C.toLowerCase(),E=E?E.toLowerCase():null,g=g.toLowerCase()),E&&S&&(E=wn(E,S)||E);const O=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let D=C===g||!i&&C.startsWith(g)&&C.charAt(O)==="/",B=E!=null&&(E===g||!i&&E.startsWith(g)&&E.charAt(g.length)==="/"),L={isActive:D,isPending:B,isTransitioning:A},T=D?a:void 0,R;typeof n=="function"?R=n(L):R=[n,D?"active":null,B?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let z=typeof o=="function"?o(L):o;return b.createElement(Fr,{...h,"aria-current":T,className:R,ref:p,style:z,to:c,viewTransition:m},typeof u=="function"?u(L):u)});Vt.displayName="NavLink";var rM=b.forwardRef(({discover:e="render",fetcherKey:a,navigate:r,reloadDocument:n,replace:i,state:o,method:c=ju,action:m,onSubmit:u,relative:h,preventScrollReset:p,viewTransition:x,...j},v)=>{let w=oM(),S=cM(m,{relative:h}),A=c.toLowerCase()==="get"?"get":"post",g=typeof m=="string"&&C3.test(m),C=E=>{if(u&&u(E),E.defaultPrevented)return;E.preventDefault();let O=E.nativeEvent.submitter,D=O?.getAttribute("formmethod")||c;w(O||E.currentTarget,{fetcherKey:a,method:D,navigate:r,replace:i,state:o,relative:h,preventScrollReset:p,viewTransition:x})};return b.createElement("form",{ref:v,method:A,action:S,onSubmit:n?u:C,...j,"data-discover":!g&&e==="render"?"true":void 0})});rM.displayName="Form";function nM(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function E3(e){let a=b.useContext(yi);return vt(a,nM(e)),a}function sM(e,{target:a,replace:r,state:n,preventScrollReset:i,relative:o,viewTransition:c}={}){let m=Dn(),u=yr(),h=hc(e,{relative:o});return b.useCallback(p=>{if(B7(p,a)){p.preventDefault();let x=r!==void 0?r:Xo(u)===Xo(h);m(e,{replace:x,state:n,preventScrollReset:i,relative:o,viewTransition:c})}},[u,m,h,r,n,a,e,i,o,c])}var lM=0,iM=()=>`__${String(++lM)}__`;function oM(){let{router:e}=E3("useSubmit"),{basename:a}=b.useContext(Tr),r=k7();return b.useCallback(async(n,i={})=>{let{action:o,method:c,encType:m,formData:u,body:h}=U7(n,a);if(i.navigate===!1){let p=i.fetcherKey||iM();await e.fetch(p,r,i.action||o,{preventScrollReset:i.preventScrollReset,formData:u,body:h,formMethod:i.method||c,formEncType:i.encType||m,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:u,body:h,formMethod:i.method||c,formEncType:i.encType||m,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,a,r])}function cM(e,{relative:a}={}){let{basename:r}=b.useContext(Tr),n=b.useContext(Yr);vt(n,"useFormAction must be used inside a RouteContext");let[i]=n.matches.slice(-1),o={...hc(e||".",{relative:a})},c=yr();if(e==null){o.search=c.search;let m=new URLSearchParams(o.search),u=m.getAll("index");if(u.some(p=>p==="")){m.delete("index"),u.filter(x=>x).forEach(x=>m.append("index",x));let p=m.toString();o.search=p?`?${p}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:vn([r,o.pathname])),Xo(o)}function dM(e,{relative:a}={}){let r=b.useContext(b3);vt(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=E3("useViewTransitionState"),i=hc(e,{relative:a});if(!r.isTransitioning)return!1;let o=wn(r.currentLocation.pathname,n)||r.currentLocation.pathname,c=wn(r.nextLocation.pathname,n)||r.nextLocation.pathname;return _u(i.pathname,c)!=null||_u(i.pathname,o)!=null}var uM=uC();let mM={data:""},fM=e=>{if(typeof window=="object"){let a=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return a.nonce=window.__nonce__,a.parentNode||(e||document.head).appendChild(a),a.firstChild}return e||mM},pM=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,hM=/\/\*[^]*?\*\/|  +/g,iw=/\n+/g,us=(e,a)=>{let r="",n="",i="";for(let o in e){let c=e[o];o[0]=="@"?o[1]=="i"?r=o+" "+c+";":n+=o[1]=="f"?us(c,o):o+"{"+us(c,o[1]=="k"?"":a)+"}":typeof c=="object"?n+=us(c,a?a.replace(/([^,])+/g,m=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,m):m?m+" "+u:u)):o):c!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=us.p?us.p(o,c):o+":"+c+";")}return r+(a&&i?a+"{"+i+"}":i)+n},pn={},k3=e=>{if(typeof e=="object"){let a="";for(let r in e)a+=r+k3(e[r]);return a}return e},xM=(e,a,r,n,i)=>{let o=k3(e),c=pn[o]||(pn[o]=(u=>{let h=0,p=11;for(;h<u.length;)p=101*p+u.charCodeAt(h++)>>>0;return"go"+p})(o));if(!pn[c]){let u=o!==e?e:(h=>{let p,x,j=[{}];for(;p=pM.exec(h.replace(hM,""));)p[4]?j.shift():p[3]?(x=p[3].replace(iw," ").trim(),j.unshift(j[0][x]=j[0][x]||{})):j[0][p[1]]=p[2].replace(iw," ").trim();return j[0]})(e);pn[c]=us(i?{["@keyframes "+c]:u}:u,r?"":"."+c)}let m=r&&pn.g?pn.g:null;return r&&(pn.g=pn[c]),((u,h,p,x)=>{x?h.data=h.data.replace(x,u):h.data.indexOf(u)===-1&&(h.data=p?u+h.data:h.data+u)})(pn[c],a,n,m),c},gM=(e,a,r)=>e.reduce((n,i,o)=>{let c=a[o];if(c&&c.call){let m=c(r),u=m&&m.props&&m.props.className||/^go/.test(m)&&m;c=u?"."+u:m&&typeof m=="object"?m.props?"":us(m,""):m===!1?"":m}return n+i+(c??"")},"");function Pm(e){let a=this||{},r=e.call?e(a.p):e;return xM(r.unshift?r.raw?gM(r,[].slice.call(arguments,1),a.p):r.reduce((n,i)=>Object.assign(n,i&&i.call?i(a.p):i),{}):r,fM(a.target),a.g,a.o,a.k)}let O3,zg,Lg;Pm.bind({g:1});let An=Pm.bind({k:1});function bM(e,a,r,n){us.p=a,O3=e,zg=r,Lg=n}function vs(e,a){let r=this||{};return function(){let n=arguments;function i(o,c){let m=Object.assign({},o),u=m.className||i.className;r.p=Object.assign({theme:zg&&zg()},m),r.o=/ *go\d+/.test(u),m.className=Pm.apply(r,n)+(u?" "+u:"");let h=e;return e[0]&&(h=m.as||e,delete m.as),Lg&&h[0]&&Lg(m),O3(h,m)}return i}}var yM=e=>typeof e=="function",zu=(e,a)=>yM(e)?e(a):e,vM=(()=>{let e=0;return()=>(++e).toString()})(),D3=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let a=matchMedia("(prefers-reduced-motion: reduce)");e=!a||a.matches}return e}})(),jM=20,$b="default",T3=(e,a)=>{let{toastLimit:r}=e.settings;switch(a.type){case 0:return{...e,toasts:[a.toast,...e.toasts].slice(0,r)};case 1:return{...e,toasts:e.toasts.map(c=>c.id===a.toast.id?{...c,...a.toast}:c)};case 2:let{toast:n}=a;return T3(e,{type:e.toasts.find(c=>c.id===n.id)?1:0,toast:n});case 3:let{toastId:i}=a;return{...e,toasts:e.toasts.map(c=>c.id===i||i===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return a.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(c=>c.id!==a.toastId)};case 5:return{...e,pausedAt:a.time};case 6:let o=a.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+o}))}}},wu=[],R3={toasts:[],pausedAt:void 0,settings:{toastLimit:jM}},Ur={},P3=(e,a=$b)=>{Ur[a]=T3(Ur[a]||R3,e),wu.forEach(([r,n])=>{r===a&&n(Ur[a])})},M3=e=>Object.keys(Ur).forEach(a=>P3(e,a)),NM=e=>Object.keys(Ur).find(a=>Ur[a].toasts.some(r=>r.id===e)),Mm=(e=$b)=>a=>{P3(a,e)},wM={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},AM=(e={},a=$b)=>{let[r,n]=b.useState(Ur[a]||R3),i=b.useRef(Ur[a]);b.useEffect(()=>(i.current!==Ur[a]&&n(Ur[a]),wu.push([a,n]),()=>{let c=wu.findIndex(([m])=>m===a);c>-1&&wu.splice(c,1)}),[a]);let o=r.toasts.map(c=>{var m,u,h;return{...e,...e[c.type],...c,removeDelay:c.removeDelay||((m=e[c.type])==null?void 0:m.removeDelay)||e?.removeDelay,duration:c.duration||((u=e[c.type])==null?void 0:u.duration)||e?.duration||wM[c.type],style:{...e.style,...(h=e[c.type])==null?void 0:h.style,...c.style}}});return{...r,toasts:o}},SM=(e,a="blank",r)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:a,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:r?.id||vM()}),xc=e=>(a,r)=>{let n=SM(a,e,r);return Mm(n.toasterId||NM(n.id))({type:2,toast:n}),n.id},M=(e,a)=>xc("blank")(e,a);M.error=xc("error");M.success=xc("success");M.loading=xc("loading");M.custom=xc("custom");M.dismiss=(e,a)=>{let r={type:3,toastId:e};a?Mm(a)(r):M3(r)};M.dismissAll=e=>M.dismiss(void 0,e);M.remove=(e,a)=>{let r={type:4,toastId:e};a?Mm(a)(r):M3(r)};M.removeAll=e=>M.remove(void 0,e);M.promise=(e,a,r)=>{let n=M.loading(a.loading,{...r,...r?.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let o=a.success?zu(a.success,i):void 0;return o?M.success(o,{id:n,...r,...r?.success}):M.dismiss(n),i}).catch(i=>{let o=a.error?zu(a.error,i):void 0;o?M.error(o,{id:n,...r,...r?.error}):M.dismiss(n)}),e};var CM=1e3,EM=(e,a="default")=>{let{toasts:r,pausedAt:n}=AM(e,a),i=b.useRef(new Map).current,o=b.useCallback((x,j=CM)=>{if(i.has(x))return;let v=setTimeout(()=>{i.delete(x),c({type:4,toastId:x})},j);i.set(x,v)},[]);b.useEffect(()=>{if(n)return;let x=Date.now(),j=r.map(v=>{if(v.duration===1/0)return;let w=(v.duration||0)+v.pauseDuration-(x-v.createdAt);if(w<0){v.visible&&M.dismiss(v.id);return}return setTimeout(()=>M.dismiss(v.id,a),w)});return()=>{j.forEach(v=>v&&clearTimeout(v))}},[r,n,a]);let c=b.useCallback(Mm(a),[a]),m=b.useCallback(()=>{c({type:5,time:Date.now()})},[c]),u=b.useCallback((x,j)=>{c({type:1,toast:{id:x,height:j}})},[c]),h=b.useCallback(()=>{n&&c({type:6,time:Date.now()})},[n,c]),p=b.useCallback((x,j)=>{let{reverseOrder:v=!1,gutter:w=8,defaultPosition:S}=j||{},A=r.filter(E=>(E.position||S)===(x.position||S)&&E.height),g=A.findIndex(E=>E.id===x.id),C=A.filter((E,O)=>O<g&&E.visible).length;return A.filter(E=>E.visible).slice(...v?[C+1]:[0,C]).reduce((E,O)=>E+(O.height||0)+w,0)},[r]);return b.useEffect(()=>{r.forEach(x=>{if(x.dismissed)o(x.id,x.removeDelay);else{let j=i.get(x.id);j&&(clearTimeout(j),i.delete(x.id))}})},[r,o]),{toasts:r,handlers:{updateHeight:u,startPause:m,endPause:h,calculateOffset:p}}},kM=An`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
 transform: scale(1) rotate(45deg);
  opacity: 1;
}`,OM=An`
from {
  transform: scale(0);
  opacity: 0;
}
to {
  transform: scale(1);
  opacity: 1;
}`,DM=An`
from {
  transform: scale(0) rotate(90deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(90deg);
	opacity: 1;
}`,TM=vs("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#ff4b4b"};
  position: relative;
  transform: rotate(45deg);

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

  &:after,
  &:before {
    content: '';
    animation: ${OM} 0.15s ease-out forwards;
    animation-delay: 150ms;
    position: absolute;
    border-radius: 3px;
    opacity: 0;
    background: ${e=>e.secondary||"#fff"};
    bottom: 9px;
    left: 4px;
    height: 2px;
    width: 12px;
  }

  &:before {
    animation: ${DM} 0.15s ease-out forwards;
    animation-delay: 180ms;
    transform: rotate(90deg);
  }
`,RM=An`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
`,PM=vs("div")`
  width: 12px;
  height: 12px;
  box-sizing: border-box;
  border: 2px solid;
  border-radius: 100%;
  border-color: ${e=>e.secondary||"#e0e0e0"};
  border-right-color: ${e=>e.primary||"#616161"};
  animation: ${RM} 1s linear infinite;
`,MM=An`
from {
  transform: scale(0) rotate(45deg);
	opacity: 0;
}
to {
  transform: scale(1) rotate(45deg);
	opacity: 1;
}`,_M=An`
0% {
	height: 0;
	width: 0;
	opacity: 0;
}
40% {
  height: 0;
	width: 6px;
	opacity: 1;
}
100% {
  opacity: 1;
  height: 10px;
}`,zM=vs("div")`
  width: 20px;
  opacity: 0;
  height: 20px;
  border-radius: 10px;
  background: ${e=>e.primary||"#61d345"};
  position: relative;
  transform: rotate(45deg);

  animation: ${MM} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
  animation-delay: 100ms;
  &:after {
    content: '';
    box-sizing: border-box;
    animation: ${_M} 0.2s ease-out forwards;
    opacity: 0;
    animation-delay: 200ms;
    position: absolute;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-color: ${e=>e.secondary||"#fff"};
    bottom: 6px;
    left: 6px;
    height: 10px;
    width: 6px;
  }
`,LM=vs("div")`
  position: absolute;
`,BM=vs("div")`
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 20px;
  min-height: 20px;
`,IM=An`
from {
  transform: scale(0.6);
  opacity: 0.4;
}
to {
  transform: scale(1);
  opacity: 1;
}`,FM=vs("div")`
  position: relative;
  transform: scale(0.6);
  opacity: 0.4;
  min-width: 20px;
  animation: ${IM} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
    forwards;
`,UM=({toast:e})=>{let{icon:a,type:r,iconTheme:n}=e;return a!==void 0?typeof a=="string"?b.createElement(FM,null,a):a:r==="blank"?null:b.createElement(BM,null,b.createElement(PM,{...n}),r!=="loading"&&b.createElement(LM,null,r==="error"?b.createElement(TM,{...n}):b.createElement(zM,{...n})))},$M=e=>`
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
`,qM=e=>`
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
`,HM="0%{opacity:0;} 100%{opacity:1;}",VM="0%{opacity:1;} 100%{opacity:0;}",YM=vs("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;
`,KM=vs("div")`
  display: flex;
  justify-content: center;
  margin: 4px 10px;
  color: inherit;
  flex: 1 1 auto;
  white-space: pre-line;
`,GM=(e,a)=>{let r=e.includes("top")?1:-1,[n,i]=D3()?[HM,VM]:[$M(r),qM(r)];return{animation:a?`${An(n)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${An(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},JM=b.memo(({toast:e,position:a,style:r,children:n})=>{let i=e.height?GM(e.position||a||"top-center",e.visible):{opacity:0},o=b.createElement(UM,{toast:e}),c=b.createElement(KM,{...e.ariaProps},zu(e.message,e));return b.createElement(YM,{className:e.className,style:{...i,...r,...e.style}},typeof n=="function"?n({icon:o,message:c}):b.createElement(b.Fragment,null,o,c))});bM(b.createElement);var WM=({id:e,className:a,style:r,onHeightUpdate:n,children:i})=>{let o=b.useCallback(c=>{if(c){let m=()=>{let u=c.getBoundingClientRect().height;n(e,u)};m(),new MutationObserver(m).observe(c,{subtree:!0,childList:!0,characterData:!0})}},[e,n]);return b.createElement("div",{ref:o,className:a,style:r},i)},QM=(e,a)=>{let r=e.includes("top"),n=r?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:D3()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${a*(r?1:-1)}px)`,...n,...i}},XM=Pm`
  z-index: 9999;
  > * {
    pointer-events: auto;
  }
`,Zd=16,ZM=({reverseOrder:e,position:a="top-center",toastOptions:r,gutter:n,children:i,toasterId:o,containerStyle:c,containerClassName:m})=>{let{toasts:u,handlers:h}=EM(r,o);return b.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:Zd,left:Zd,right:Zd,bottom:Zd,pointerEvents:"none",...c},className:m,onMouseEnter:h.startPause,onMouseLeave:h.endPause},u.map(p=>{let x=p.position||a,j=h.calculateOffset(p,{reverseOrder:e,gutter:n,defaultPosition:a}),v=QM(x,j);return b.createElement(WM,{id:p.id,key:p.id,onHeightUpdate:h.updateHeight,className:p.visible?XM:"",style:v},p.type==="custom"?zu(p.message,p):i?i(p):b.createElement(JM,{toast:p,position:x}))}))},We=M;const e_="/assets/logo-CsRe-4-6.png";var _3={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ow=pr.createContext&&pr.createContext(_3),t_=["attr","size","title"];function a_(e,a){if(e==null)return{};var r=r_(e,a),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(a.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function r_(e,a){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(a.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lu.apply(this,arguments)}function cw(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bu(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?cw(Object(r),!0).forEach(function(n){n_(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n_(e,a,r){return a=s_(a),a in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function s_(e){var a=l_(e,"string");return typeof a=="symbol"?a:a+""}function l_(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function z3(e){return e&&e.map((a,r)=>pr.createElement(a.tag,Bu({key:r},a.attr),z3(a.child)))}function Ye(e){return a=>pr.createElement(i_,Lu({attr:Bu({},e.attr)},a),z3(e.child))}function i_(e){var a=r=>{var{attr:n,size:i,title:o}=e,c=a_(e,t_),m=i||r.size||"1em",u;return r.className&&(u=r.className),e.className&&(u=(u?u+" ":"")+e.className),pr.createElement("svg",Lu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,c,{className:u,style:Bu(Bu({color:e.color||r.color},r.style),e.style),height:m,width:m,xmlns:"http://www.w3.org/2000/svg"}),o&&pr.createElement("title",null,o),e.children)};return ow!==void 0?pr.createElement(ow.Consumer,null,r=>a(r)):a(_3)}function o_(e){return Ye({attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.715 17.301c-.017-.018-1.717-1.854-1.73-6.32-.009-2.607-1.69-4.824-4.019-5.641l.034-.34c0-1.103-.896-2-2-2s-2 .897-2 2l.034.338c-2.336.816-4.019 3.036-4.019 5.646 0 4.462-1.711 6.296-1.721 6.306-.287.286-.374.716-.22 1.091s.521.619.926.619h3.143c.447 1.72 1.999 3 3.857 3s3.41-1.28 3.857-3h3.143c.4 0 .758-.243.915-.61s.076-.799-.2-1.089zm-7.715-10.301c2.189 0 3.978 1.789 3.984 3.987.002.728.046 1.396.118 2.013h-8.2c.071-.617.113-1.286.113-2.016.001-2.196 1.788-3.984 3.985-3.984zm0 13c-.737 0-1.375-.405-1.722-1h3.443c-.346.595-.984 1-1.721 1zm-5.186-3c.352-.736.705-1.731.938-3h8.502c.234 1.269.588 2.264.938 3h-10.378z"},child:[]}]})(e)}function c_(e){return Ye({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4z"},child:[]}]})(e)}function dw(e){return Ye({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M8.5 11.5a.5.5 0 0 1-1 0V7.707L6.354 8.854a.5.5 0 1 1-.708-.708l2-2a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1-.708.708L8.5 7.707z"},child:[]},{tag:"path",attr:{d:"M14 14V4.5L9.5 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2M9.5 3A1.5 1.5 0 0 0 11 4.5h2V14a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5.5z"},child:[]}]})(e)}function d_(e){return Ye({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M2.5 8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1"},child:[]},{tag:"path",attr:{d:"M5 1a2 2 0 0 0-2 2v2H2a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h1v1a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-1h1a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-1V3a2 2 0 0 0-2-2zM4 3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2H4zm1 5a2 2 0 0 0-2 2v1H2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v-1a2 2 0 0 0-2-2zm7 2v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1"},child:[]}]})(e)}const u_=()=>{const e=yr(),a=Dn(),r=bs(),{user:n,isAuthenticated:i,loading:o,error:c,success:m}=br($=>$.user),[u,h]=b.useState(!1),[p,x]=b.useState(null),[j,v]=b.useState(null),w=b.useRef(null),S=b.useRef(null),A=b.useRef([]),g=b.useRef(null),[C,E]=b.useState(0),[O,D]=b.useState(!1),[B,L]=b.useState([]),[T,R]=b.useState(!1),z=async()=>{try{const $=localStorage.getItem("token"),I=await fetch("/api/expenses/requests",{headers:{Authorization:`Bearer ${$}`}}).then(ve=>ve.json()).catch(()=>({requests:[]})),P=await fetch("/api/expenses/",{headers:{Authorization:`Bearer ${$}`}}).then(ve=>ve.json()).catch(()=>({expenses:[]})),H=(I.requests||[]).length,ee=Date.now()-1440*60*1e3,pe=(P.expenses||[]).filter(ve=>new Date(ve.createdAt||ve.date).getTime()>=ee&&ve.createdBy?.role==="admin").length;E(H+pe)}catch($){console.error("notif fetch failed",$)}};b.useEffect(()=>{z();const $=setInterval(z,3e4);return()=>clearInterval($)},[]);const U=async()=>{R(!0);try{const $=localStorage.getItem("token"),I=await F.get("/api/expenses/requests",{headers:{Authorization:`Bearer ${$}`}}).catch(()=>({data:{requests:[]}})),P=await F.get("/api/expenses/",{headers:{Authorization:`Bearer ${$}`}}).catch(()=>({data:{expenses:[]}})),H=(I.data?.requests||[]).map(ue=>({id:ue._id,kind:"request",requestType:ue.requestType,requestedBy:ue.requestedBy,payload:ue.payload,createdAt:ue.createdAt,expenseId:ue.expenseId})),ee=Date.now()-1440*60*1e3,pe=(P.data?.expenses||[]).filter(ue=>new Date(ue.createdAt||ue.date).getTime()>=ee&&ue.createdBy?.role==="admin").map(ue=>({id:ue._id,kind:"added",expenseName:ue.expenseName,amount:ue.amount,createdBy:ue.createdBy,createdAt:ue.createdAt||ue.date})),ve=[...H,...pe].sort((ue,he)=>new Date(he.createdAt)-new Date(ue.createdAt));L(ve)}catch($){console.error("load notifications failed",$),We.error("Failed to load notifications")}finally{R(!1)}},X=async()=>{const $=!O;D($),$&&await U()},fe=async($,I)=>{try{const P=localStorage.getItem("token"),H=await F.post(`/api/expenses/requests/${$}/handle`,{action:I},{headers:{Authorization:`Bearer ${P}`}});We.success(H.data?.message||"Done"),z(),await U()}catch(P){console.error("handle request failed",P),We.error(P.response?.data?.message||"Failed")}};b.useEffect(()=>{console.log("API_URL:",ya),console.log("User state:",n),console.log("Token:",localStorage.getItem("token")),n?.profilePicture&&console.log("Profile picture URL:",`${ya}${n.profilePicture}`),i&&!n&&r(el())},[r,i,n]),b.useEffect(()=>{if(m&&w.current!==m){We.dismiss(),(A.current||[]).forEach(P=>clearTimeout(P)),A.current=[],w.current=null,w.current=m;const $=We.success(m,{duration:1e3});g.current=$,r(hs());const I=setTimeout(()=>{try{$&&We.dismiss($)}catch{}w.current===m&&(w.current=null),g.current===$&&(g.current=null)},1200);A.current.push(I)}},[m,r]),b.useEffect(()=>{if(c&&S.current!==c){We.dismiss(),(A.current||[]).forEach(P=>clearTimeout(P)),A.current=[],S.current=null,S.current=c;const $=We.error(c,{duration:1e3});g.current=$,r(hs());const I=setTimeout(()=>{try{$&&We.dismiss($)}catch{}S.current===c&&(S.current=null),g.current===$&&(g.current=null)},1200);A.current.push(I)}},[c,r]),b.useEffect(()=>()=>{(A.current||[]).forEach($=>clearTimeout($)),A.current=[]},[]);const se=()=>{r(UP()),a("/login")},ie=$=>{const I=$.target.files[0];if(console.log("Selected file in handleFileChange:",I),I){if(!["image/jpeg","image/png"].includes(I.type)){console.log("Invalid file type. Please use JPEG or PNG."),v(null),x(null);return}if(I.size>5*1024*1024){console.log("File size exceeds 5MB limit."),v(null),x(null);return}v(I);const P=new FileReader;P.onloadend=()=>{x(P.result)},P.readAsDataURL(I)}else console.log("No file selected"),x(null),v(null)},V=()=>{console.log("Upload triggered with selectedFile:",j),j?(console.log("File details:",{name:j.name,type:j.type,size:j.size}),r(vu(j)).then($=>{console.log("Dispatch result:",$),$.meta.requestStatus==="fulfilled"&&(r(el()),h(!1),x(null),v(null))})):console.log("No file to upload")},K=()=>{h(!1),x(null),v(null)},ce=$=>{const I="https://via.placeholder.com/150?text=Profile";if(!$)return I;try{return`${new URL($).toString()}?t=${Date.now()}`}catch{try{const H=new URL(ya).origin,ee=$.startsWith("/")?$:`/${$}`;return`${H}${ee}?t=${Date.now()}`}catch{return`${ya}${$}?t=${Date.now()}`}}};return t.jsxs("div",{className:"w-full bg-gradient-to-r from-white to-green-700 px-6 py-3 flex justify-between items-center shadow-md",children:[t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsx("img",{src:e_,alt:"Logo",className:"w-14 h-14"}),t.jsxs("div",{children:[t.jsx("h1",{className:"text-3xl font-semibold text-black",children:e.pathname==="/candidates-cv"?"Candidates CV":e.pathname==="/candidate"?"Candidate":e.pathname==="/allied-form"?"Allied Form":e.pathname==="/visa-form"?"Visa Form":e.pathname==="/undertaking-letter"?"Undertaking Letter":e.pathname==="/expense"?"Expense":e.pathname==="/deposit-slip"?"Deposit Slip":e.pathname==="/nbpchallan"?"NBP CHALLAN":e.pathname==="/contract-letter"?"Contract Letter":"Dashboard"}),t.jsx("p",{className:"text-sm text-black font-semibold",children:"Welcome back! Here's what's happening with your visa processes."})]})]}),t.jsxs("div",{className:"flex items-center space-x-4",children:[t.jsxs(Fr,{to:"/candidates-cv",className:"flex items-center gap-2 bg-white text-sm px-3 py-1.5 rounded-md border border-gray-300 shadow hover:shadow-md cursor-pointer",children:[t.jsx(dw,{className:"text-gray-600 font-bold"}),"UPLOAD CV"]}),t.jsxs("label",{className:"flex items-center gap-2 bg-white text-sm px-3 py-1.5 rounded-md border border-gray-300 shadow hover:shadow-md cursor-pointer",children:[t.jsx(dw,{className:"text-gray-600 font-bold"}),"Report",t.jsx("input",{type:"file",className:"hidden",onChange:$=>ie($)})]}),t.jsxs("div",{className:"relative bg-white rounded-full px-3 py-3",children:[t.jsxs("div",{onClick:X,className:"cursor-pointer",children:[t.jsx(o_,{className:"text-black text-2xl"}),C>0&&t.jsx("span",{className:"absolute -top-2 -right-2 bg-red-600 text-white text-xs w-5 h-5 flex items-center justify-center rounded-full",children:C})]}),O&&t.jsxs("div",{className:"absolute right-0 mt-12 w-96 bg-white rounded shadow-lg border border-gray-300 z-50 p-3",children:[t.jsxs("div",{className:"flex justify-between items-center mb-2",children:[t.jsx("div",{className:"font-medium",children:"Notifications"}),t.jsxs("div",{className:"text-xs text-gray-500",children:[B.length," items"]})]}),T?t.jsx("div",{className:"text-center text-sm text-gray-500",children:"Loading..."}):B.length===0?t.jsx("div",{className:"text-sm text-gray-500",children:"No notifications"}):t.jsx("ul",{className:"space-y-2 max-h-64 overflow-auto",children:B.map($=>t.jsxs("li",{className:"p-2 border rounded flex justify-between items-start",children:[t.jsx("div",{className:"text-sm",children:$.kind==="request"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"font-medium",children:[$.requestType.toUpperCase()," request"]}),t.jsxs("div",{className:"text-xs text-gray-600",children:["From: ",$.requestedBy?.username||"Unknown"]}),t.jsxs("div",{className:"text-xs text-gray-700",children:["Payload: ",JSON.stringify($.payload||{})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"font-medium",children:"New Expense added"}),t.jsxs("div",{className:"text-xs text-gray-600",children:[$.expenseName," —"," ",Number($.amount).toLocaleString()]}),t.jsxs("div",{className:"text-xs text-gray-600",children:["By: ",$.createdBy?.username]})]})}),t.jsx("div",{className:"flex flex-col gap-2",children:$.kind==="request"?t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>fe($.id,"approve"),className:"px-2 py-1 bg-green-600 text-white rounded text-xs",children:"Approve"}),t.jsx("button",{onClick:()=>fe($.id,"reject"),className:"px-2 py-1 bg-red-600 text-white rounded text-xs",children:"Reject"})]}):t.jsx("button",{onClick:()=>{a("/expense"),D(!1)},className:"px-2 py-1 bg-blue-600 text-white rounded text-xs",children:"View"})})]},$.id))})]})]}),t.jsxs("div",{className:"flex items-center space-x-2",children:[t.jsx("label",{className:"cursor-pointer",onClick:()=>h(!0),children:t.jsx("img",{src:i&&n?.profilePicture?ce(n.profilePicture):"https://via.placeholder.com/150?text=Profile",alt:"User",className:"w-12 h-12 rounded-full object-cover"})}),t.jsxs("div",{className:"text-left",children:[t.jsx("p",{className:"text-base font-medium text-white",children:i&&n?n.username:"Guest"}),t.jsx("p",{className:"text-xs text-white",children:i&&n?n.role:"N/A"})]})]}),i&&n?.role==="superadmin"&&t.jsx("div",{children:t.jsx(Fr,{to:"/super-admin",className:"ml-4 bg-white text-black px-3 py-1 rounded-md",children:"Super Admin"})}),i&&t.jsx("button",{onClick:se,className:"bg-red-600 text-white text-sm px-3 py-1.5 rounded-md hover:bg-red-700 transition duration-200",children:"Logout"})]}),u&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-lg w-96",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Upload Profile Picture"}),t.jsx("input",{type:"file",accept:"image/jpeg,image/png",className:"mb-4 w-full",onChange:ie}),p&&t.jsx("div",{className:"mb-4",children:t.jsx("img",{src:p,alt:"Preview",className:"w-32 h-32 object-cover rounded-full mx-auto"})}),t.jsxs("div",{className:"flex justify-end space-x-2",children:[t.jsx("button",{onClick:K,className:"bg-gray-300 text-black px-4 py-2 rounded-md hover:bg-gray-400",children:"Cancel"}),t.jsx("button",{onClick:V,disabled:!j,className:`px-4 py-2 rounded-md ${j?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"}`,children:"Upload"})]})]})}),o&&t.jsx("div",{className:"text-white text-sm",children:"Uploading..."}),c&&t.jsx("div",{className:"text-red-500 text-sm",children:c}),m&&t.jsx("div",{className:"text-green-500 text-sm",children:m})]})};function m_(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z"},child:[]}]})(e)}function uw(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.187 3.588a2.75 2.75 0 0 0-3.889 0L5.575 13.31a4.5 4.5 0 0 0 6.364 6.364l8.662-8.662a.75.75 0 0 1 1.061 1.06L13 20.735a6 6 0 0 1-8.485-8.485l9.723-9.723a4.247 4.247 0 0 1 4.124-1.139 4.247 4.247 0 0 1 3.025 3.025 4.247 4.247 0 0 1-1.139 4.124l-9.193 9.193a2.64 2.64 0 0 1-1.858.779 2.626 2.626 0 0 1-1.854-.779c-.196-.196-.338-.47-.43-.726a2.822 2.822 0 0 1-.168-.946c0-.7.284-1.373.775-1.864l8.132-8.131a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734l-8.131 8.132a1.148 1.148 0 0 0-.336.803c.003.204.053.405.146.587.01.018.018.028.02.032.22.215.501.332.786.332.29 0 .58-.121.798-.34l9.192-9.192a2.75 2.75 0 0 0 0-3.89Z"},child:[]}]})(e)}function f_(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function p_(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},child:[]},{tag:"path",attr:{d:"M14 2v4a2 2 0 0 0 2 2h4"},child:[]},{tag:"path",attr:{d:"m9 15 2 2 4-4"},child:[]}]})(e)}function h_(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z"},child:[]},{tag:"path",attr:{d:"M22 10v6"},child:[]},{tag:"path",attr:{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5"},child:[]}]})(e)}function x_(e){return Ye({attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM216 408c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-102.1-31 31c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l72-72c9.4-9.4 24.6-9.4 33.9 0l72 72c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-31-31L216 408z"},child:[]}]})(e)}function g_(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M34.9 289.5l-22.2-22.2c-9.4-9.4-9.4-24.6 0-33.9L207 39c9.4-9.4 24.6-9.4 33.9 0l194.3 194.3c9.4 9.4 9.4 24.6 0 33.9L413 289.4c-9.5 9.5-25 9.3-34.3-.4L264 168.6V456c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24V168.6L69.2 289.1c-9.3 9.8-24.8 10-34.3.4z"},child:[]}]})(e)}function Hh(e){return Ye({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:[]}]})(e)}function xt(e){return Ye({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:[]}]})(e)}function Kt(e){return Ye({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:[]}]})(e)}function L3(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function Ve(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function mt(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 192V77.25c0-8.49-3.37-16.62-9.37-22.63L393.37 9.37c-6-6-14.14-9.37-22.63-9.37H96C78.33 0 64 14.33 64 32v160c-35.35 0-64 28.65-64 64v112c0 8.84 7.16 16 16 16h48v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h48c8.84 0 16-7.16 16-16V256c0-35.35-28.65-64-64-64zm-64 256H128v-96h256v96zm0-224H128V64h192v48c0 8.84 7.16 16 16 16h48v96zm48 72c-13.25 0-24-10.75-24-24 0-13.26 10.75-24 24-24s24 10.74 24 24c0 13.25-10.75 24-24 24z"},child:[]}]})(e)}function Tn(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM224 416c-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64s64 28.654 64 64c0 35.346-28.654 64-64 64zm96-304.52V212c0 6.627-5.373 12-12 12H76c-6.627 0-12-5.373-12-12V108c0-6.627 5.373-12 12-12h228.52c3.183 0 6.235 1.264 8.485 3.515l3.48 3.48A11.996 11.996 0 0 1 320 111.48z"},child:[]}]})(e)}function pa(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function Rn(e){return Ye({attr:{viewBox:"0 0 352 512"},child:[{tag:"path",attr:{d:"M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"},child:[]}]})(e)}function Jt(e){return Ye({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 64H192C85.961 64 0 149.961 0 256s85.961 192 192 192h192c106.039 0 192-85.961 192-192S490.039 64 384 64zM64 256c0-70.741 57.249-128 128-128 70.741 0 128 57.249 128 128 0 70.741-57.249 128-128 128-70.741 0-128-57.249-128-128zm320 128h-48.905c65.217-72.858 65.236-183.12 0-256H384c70.741 0 128 57.249 128 128 0 70.74-57.249 128-128 128z"},child:[]}]})(e)}function Wt(e){return Ye({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 64H192C86 64 0 150 0 256s86 192 192 192h192c106 0 192-86 192-192S490 64 384 64zm0 320c-70.8 0-128-57.3-128-128 0-70.8 57.3-128 128-128 70.8 0 128 57.3 128 128 0 70.8-57.3 128-128 128z"},child:[]}]})(e)}function ze(e){return Ye({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.72 23.72 0 0 0-21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16zM53.2 467a48 48 0 0 0 47.9 45h245.8a48 48 0 0 0 47.9-45L416 128H32z"},child:[]}]})(e)}function B3(e){return Ye({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:[]}]})(e)}function b_(e){return Ye({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M204,168a52.06,52.06,0,0,1-52,52H140v12a12,12,0,0,1-24,0V220H104a52.06,52.06,0,0,1-52-52,12,12,0,0,1,24,0,28,28,0,0,0,28,28h48a28,28,0,0,0,0-56H112a52,52,0,0,1,0-104h4V24a12,12,0,0,1,24,0V36h4a52.06,52.06,0,0,1,52,52,12,12,0,0,1-24,0,28,28,0,0,0-28-28H112a28,28,0,0,0,0,56h40A52.06,52.06,0,0,1,204,168Z"},child:[]}]})(e)}function y_(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z"},child:[]}]})(e)}function I3(e){return Ye({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},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:[]}]})(e)}const Rr=()=>{const e=yr(),a="flex items-center gap-3 px-5 py-3 rounded-md cursor-pointer transition-all select-none",{user:r}=br(o=>o.user),n=o=>r?r.role==="superadmin"?!0:Array.isArray(r.permittedPages)?r.permittedPages.map(m=>(m||"").toLowerCase()).includes((o||"").toLowerCase()):!1:!1,i=o=>e.pathname===o;return t.jsxs("div",{className:"w-full min-h-screen bg-white p-4",children:[n("/dashboard")&&t.jsxs(Fr,{to:"/dashboard",className:`${a} ${i("/")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(m_,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Dashboard"})]}),n("/candidate")&&t.jsxs(Fr,{to:"/candidate",className:`${a} mt-2 ${i("/Candidate")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(f_,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Candidates"})]}),n("/visa-form")&&t.jsxs(Fr,{to:"/visa-form",className:`${a} mt-2 ${i("/visa-form")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(p_,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Visa Form"})]}),n("/nbpchallan")&&t.jsxs(Fr,{to:"/nbpchallan",className:`${a} mt-2 ${i("/nbpchallan")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(h_,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"NBP CHALLAN"})]}),n("/candidates-cv")&&t.jsxs(Fr,{to:"/candidates-cv",className:`${a} mt-2 ${i("/candidates-cv")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(x_,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Candidates CV"})]}),n("/expense")&&t.jsxs(Fr,{to:"/expense",className:`${a} mt-2 ${i("/expense")?"bg-green-700 text-white":"bg-green-100 text-black"}`,children:[t.jsx(b_,{size:20}),t.jsx("span",{className:"text-sm font-semibold",children:"Expenses"})]})]})},v_="/assets/bg1-B0liz1tf.jpeg",j_="/assets/bg2-Bss1oyLA.jpeg",N_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAWbSURBVHgB7ZxPiBtVHMd/b3apwupSUBfsxeSiHtY/qBD00jbpNVTxEjyt7H0x94VWKPS4ei2E9rgHZau5eOim9KASUFg0F71MetBisLKoOVjbec732VlmfvveZDLvTbbdzAdCZpNpZub7fv/e701HkIYduXNyOVheI49OCxKvk6QKHScE7UmSQ3pAXzQWG9f0uzBu3L/xrud5V8PNkzQfDGUgP+YCefE/bsqbW6EoOzQ/ooCK8MTV8NovxD88sBh8IaW8SHOMFPKThmi0sa2E2b2/uwbVqISCIHjv3OK560qYXtDzw7cKlYB9IUR1QVmLEGtUEvFkGFJ+82iBzlNJgtBQzniqTinhvOYdu+LNDRWPSrSUwhgohTFQCmNgkY6A8T9j6t/uk/+7T6O/RjS+N1bvYOXpFVo6saTeV0+tUvWZqtqeNSKseiXNAIjR+7lH/WGfBr8Opvq3EKf5SlMJNSuRChcGgnQHXer+2FXbNiw9sUT1l+rUXG0WLlChwkCM7e+3rQXhQJTWmy0lUlEUIgyE6Hzbod5PPeM+GP3V50PXeGqFqs9VE9+N/hwpd/P/8FNFhTDrb6+r33KNc2EQRDe7mwfBlFOr1A7iRRYgEARGfNIB67nUvOTctZwKkyYKBFl/Zz33BeA3t7/b1gpUhDjOhIHJtz9vHxIFZr5xeoNq1Rq5ANaDuMWPA1G23t9y5lbOCjzEFNPJuhIFIK7orAPHxjm4wokwKgawQFuU76f9Ns4BmdAF1sIo3w9NO06RovBjcNdBHHJRHlgLgxHiLoQaYxYVKo6xcWYj8RmmFygobbESBoLwLFF/sV5o4cVBtsMrTvcH+yrbShjUGPwEWm+1yDX+XZ8Gd8zzK5QBcWA1pronK1bCcJOFtbh2IcSM9mdt2vxyU9VIOnBMbjWYrNqQWxi4EdoGceovu3UhiBIP7GqacNfX7otqOo7OmqchtzD8BNFDwdzHFVyU+HF0YIrBM5SN1eQWhvdUqs9WyRUmUZCB0lyVD4zJurJg5UpxXFlLmiiTsp2uGs5L7tYm99+0kUStg1dUd5j2tREFoNOXOMd7RxBjxv9mOyhcrvPN//MobJtm37ai6LCxmPzCZIz4/OR0rYkiRLEltzDovGUBM2ud70fiFCmKTU2VWxieGk0ZAOnV1CZA/8alKId6QSfy92byW8wUGcA029a5o42l8BLiSCyGZ4BJa0VZWhG27oPmeZysfWUduYXhXTmkxrSJHkgTx1YU3RSAD9405I8xmikApvuT0InjItDy2TQqcRtXslq7htXErQRzE8SaSSeE7698cEWNMkbVtoGt+kKstYrVShus2g4YZX5RKOayopv45YFnNmXNp+ymKFbC4AT4yKhF+zvTLdrboGvEY8Bs+0LWPd/mq81Do375q8tW5XhWTI143pvJg7UwsJrWG8l2JjJU2jKtC0yrnq4a8U7WlWA1PKtMWsO2wfTbLhvxzlYidevS0QWk3fUwLX2/r10KxrF5U9yGmS3qYyRtzDxagoUwnEd6UT9ikgtBILyydvxQ66DJZerfPha3gUQg+Ha+7qSu7SCTobhTNw8tJy8qumkRaf/Y3DgUx3TLhi0QAm7pIi2bKPzmRIgCV4D1uLg5EQUlBCnCSuLM7HbWqOcLkaZd1oC7YV6GdFy0IBEzEyaOWsXEevQvAxr9PVKWhLiEF1qmuPjopsXaC7WZiRHnSIR5HCj/L4GBUhgDpTAGSmEMeCRoSCVJBO15kuQelSSRdNujgG5RSQIZyOteyLVwe59KIoZ4ZIp3VpzdD4LgQypR4FkyeFdZCU+/kFJ+SnNOqMHBA3YSTxzafbB7UQhxgeYQGEZjofFR9PehRzE9fJYMxKnQfKBCCbwm/qEw7Q2BQkc7L0hUwj+P24MxhqpMkXQLyQdxlu/wH01CIWTGaPzFAAAAAElFTkSuQmCC",w_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAY4SURBVHgB7ZxPbBRVHMd/b3a3XTQBDuCNuiaaSCCRtCcxRC0E5ETrhQMC7YGeUU8aCRAbvKG90kP/kB642OWENUIlaL3QpgdJTSCxtF5oe2hJkP3Tnef7vu02s29nusO8N7OmO59k053pdnbmO7/3e78/r8PIBT4+tJt2JnqI2IfE+CGxK0PbCjZLnObFld5mR88Nu35C3cF/udlFFh8Sb3dTczAvRLqqCmQ5N/jk6PdClHFqHlFARpjHEJ+8edm5c9Ni5C84v0LNDKcfhOV8jrdSGH53tAeqUQyRzbrZsbPZsjD3Rv+mbedgA7NKrPRWYsNaeiimQpq49QzO9xTFVMP4R5awlkMUo8Deg8VkKEYlY1GMK7EwHsTCeBAL40GSGgR/vkL2whyVlhbE+2Xi+X+Jr62IKOI1Yq3ll/XGm2TtbRM/24jt2ktREqkwPP+C1qd/ptLiHNmLf7l/6DlSljKlJzObu61971Ly4BFKvN0uRHudwiYSYSqCrE9PSMsIAoQsiBfbuUcKlOw4HqpATORJnEIEYhSnxgML4gUESn3QTckDRygMQrMYWEk+O+A9ZATSj7Ttl34EF7qJENGGD1p6Shw+yEVU+KjCnUGyny1QS+cZMk0owvC1Zcrf+k5enArESEhf0UEJ4Tf8AF9TejJN638+qPnd+swElf6Zo/Tpr4wOLeNDaStRku3Hhfl/KsUJduwVKv4x7ioQLC59/ltj4hgVxksUnHTLyT7fFlKP9UcPqDg5RjxXPcSYmNZ3nOsnExgN8PI/DdaIghgkffrruqKUZ64JedH1gMNNn+0ny+mXcAzhjwr3xsgExoTBzKM6WojSKkRhu/bU/fv8yCUqCCuAQ83dulb38zgmjq2KI33OFg7fL0aEwRCCME4wfFpPXfTlT+A7nJZm+7wwiNPSJb4jXf0dhTs3pAXqYESY4lS2Zl8rTtiHpegCq0we7q7ah6kcAaXWcUkTWIvqFxCZ4oSjItV+QqYMTspRdnCr0RamOFN7Z1Lvd1PUpFSrQZCo4Wu0hbEfT1dtw1qiGEIqiX37a6ymKKwmKFrCIGRXp2eYdaNIKXlTOZ0INpz0hFFMFTMRi9C3qFjvdFRty+G0tEhB0BJGjRcSIiFsJOXiVvWN4cKqg6AljGqmyJIbDap+TuzlBQqCnvNdU3KiBjhdFaZEwpQLVgcyWww3mPa/vPGFr7xJRU0R7EY4X2Oka9OGSiEqN/KNDCKjxqgwqPYHAU5TDdAqwEe8HPyyJhfzwq0OFAQ9YdQ7nQte14UwOy5c90wlIIyfrFktgwadELSEMTUDVIDzTotCU8vJCzW+QuLDX9jK9GwF7EfpCaPcjZJooJlAFqL6rlcNL1gS6sRb4ZYfMeXm+T4H0kDNTeAwYe6mSpgQJtlxQtZr/GTrKJirBD0X7aGkmnzp8UMyiVs064VaJLc0bpD2rIRWiJPSo9+0q2dBwJSuDqPkweDNOG1hYOpOMM6Lv2cpalCIdyJbuQcaKAxMXb0zpgrSfkG1TrUWtG91MBLgoWLnWpCOIGL1KsTr9rSNCIP4w60gnbs9EKq/qTT41KBO11qAsZTArSCNClpO9IvCsByvrifawCZWQBjNlVo/6avtDsJyxAWY9DnwKbnRS65dz5bOz8gEITT1V8SdvObe1Bd3MnW4K/CyMbl4aOpH1+p/uanfH3jBQM3xwlg4tJU4AALJ3pOPAAw+iou6rZcgYLMVbEgUENqKKohT+HVMRMLT3l+OqFaI4xpBC/9kL3svHKoAn2Jq+FSdW9hLzYqIaR5OGKuTVJBLzTrPULJOYhn4+GELA7Za8POqyIBSRNt4mRw6Nd8ThTAVIBCWhclIdenVajdyOSuWp6HTGaIgFSIVxolc+iEKW1jziymd516UF0BTOWCUBSas19tovUYhhpOGCfN/J/5fAg9iYTyIhfEgFsYDCDNPMQp81iJOsxSj8lRYTOk+xVTDWdYSg2lYvFulmA34PB6ZYrGPe1fJtnsppgxnV/FDzkrsWG+WOB+gZofzzQfsVD1xiN8duUKMXaZmRBgGO3r+YmWz9lFM8ukgXIjDMtQUCP9qW714ZoxzL/P8OATCk0IYy4it7fZgjPmNMOU+WaVh6WcV/gOsWtGo/osgZAAAAABJRU5ErkJggg==",A_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAASQSURBVHgB7Zy9cxNHGMafXVnCDhSSCzLYFCh8qLAzgUDB4NhJJqE1SUMZTJcy6dIBf0GgSwdt3MShSeFJmAyGwIxNPBMzAziSnBnijF0EFTDCknWbfWV9nXSrnM57K2Htb0Ye6+7k8z337vu1q2Pw4M7vIh49gBkOfCgEToLhCPYWywxYk9f248QJdsvrANa84f5T8ZkTwU0mEEc/wLAGB9eaBeKNb+6vim8Fxw99Iwoh5GhguPnbqrjSuLlmMfd2dlxFHyPFuH7uOPu68rsU5ZmYIdVgQcnB51MpNrcjzJ8iWzYpC5ErvEQyUrYWYAaWKoM8gg0u3e8FWFwwho+4DFUnYXETwXt8DyZvu0f6Ww6LJ1YYBVYYBVYYBQMIgXxRYOHJNtZzAusvHHRKYj/DZGoAY4cj6BbahVnMbuP20jZeS3GC8uKVQGazgItnoziTDOXe/S9az/r4eQmzD4rQRfVvdUMcrT7m9iN9olQhccgKTaPtVixmSuUh0MiZZATvHPTvJ2YfFry3d8FytJ1pPed2suQ4L56NoRNmH7bZZ1gcbUPpdcFtLSNxBt2YHFY9ncd4WYcpcXpamPPvDshXtGW7CXF6PvM9P94dcd6IkqAb4vSUMINRt8NezNQv2rQ4RlNKqqEyGw7ylXSFaqKjb9fvzWiCIb1Zj24Lz0qV43aOSbzFcCjB8U9T/RVGKDcqzPWftlqSwOn3o/ggtfNvfCotIv3zVm1fXqYA8yv+rIHEGZIWp6vwNDaUVp63ZsbE3af1Cz96kNdECgLVarowJszwAe+Ej4ZTI2RBXr7ENMaG0kicl0uEBWkh+UqWPCxF8SobyNFSnTX/R7FsZf++8m5hkK/aTXujHUZ9DF0svfyQUIjWCAnn1wd1im1tKrDCKLDCKDDqY+ZXirj7pBTIYaoy37AwZjHpTUc6y+BNcnKy6Y3OZxyCYoeSAmPCUFa7m3SdPt9YV4WNUR9zaTLmWRb4oTlDDhvjEzamLzAo1scosMIoMDqUqEkVtNt2Wjah9qTzpQr5u1+2EJTHfzv4ZnpfuRllAmO3IMhykEaoVZHeCKfF4IXRPGY3EYk+Sz1hUxgbSkMxhi8/2efq/PtlMMYxfpgbDfVGnS9dWC+0Lf1gw7WC0IShajpsmpeeDHW26qQt2oYSLRBazNanLzJSmO8fFKTTDWeBYXqzJKdL3MIcSug7lzZhxqRzHHzEXP2WJSnUUlbfXE87yH/5bbT7QdtQoqhzaUqjLXfI9Gm9Tl2rj6Fc5QvZWjAZVmkhAE2zjI3qHbLaw/W4bEaNyol3cr5LMmfJF1GbYNMJTeCNDHNMpiItqyR0wO6tCnN59huEzWMUWGEUWGEUWGEUcAisweJGYJm+XrwMixuBv7gM1r/C4oZhjt3JinisBHqEQf88AaQd0rVMnGBJ/nGS5WSZdxmWKtfoRzkqTR1jcw7DDVhqD9iphevJY+wrp6JWXyJwY+I4u1p921J9VZ4OcqVfHm0gC8Ucd3D5XIrNNW5XlqVlgTguyKh1RB60tx6MQbmbTFMoIu9/iVunTrFc8yH/AS/tiMyNGY4DAAAAAElFTkSuQmCC",S_="/assets/NAVTTC-C2gOFBrd.png",Vh="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCABYAFgDASIAAhEBAxEB/8QAHQAAAQQDAQEAAAAAAAAAAAAACAAFBgcDBAkCAf/EADkQAAEDAwIDBgUDAgUFAAAAAAECAwQABREGEgchMQgTFEFRYSJCcYGRIzKhFVIWFzOxwUNyk6LR/8QAGgEBAQEAAwEAAAAAAAAAAAAABgUEAQIDAP/EAC4RAAEDAgUCBQIHAAAAAAAAAAEAAgMEEQUSEyExQWEGFVFxsTLRIlKRoeHw8f/aAAwDAQACEQMRAD8A6DJjn0rKmP8ASsFrvdrujaXI8lBBGRzpw3q+RIxSIS5hshpZZYkx/avXh/UVss5UravkfKqD7YXaKn8BtEIa0rFDuorwoxo8taQpu3ZSSHCk/vcIB2JPIY3K+UK83zFguV6RQGVwY3kqfcROMnCrhQlI4ga1gWt9YCkQwFvylg9CGGgpzB8iUgH1qs0duvszLleFOrLsg5xvXZX0pH15ZH4rnHcbjftdNTnBLlzLvIWp9x59wuPyVnG9alk5UpXXOc4GOlQyRB1Ho6R31xsKFxgdzhkIK0EZx8vQ9KivxeTMWttslcXhuHIHPLj3H+FdptE8S+HPElnvdCaytl5UEhamGHsPoB81NKwsD3xipMpiuQGkWkutQtbaHnPRHG3Bv8O6UOxHPVCxjKckZB5jIPTmDr7Mnafn6wmMcPeJTwN3Vtbg3FeAZCjyQhw+ZUQUpWee4bFZJQtfekxxkr9KXYrPiPhiSmiM9OczRv3t69/2RIKYPpWJbJ9KdFsn+2sDjeBkjl71cEyMZE1rZ65FKvcubBjAqefQnHvSrjXAXGmgj0zxE1ZpjAg3FbzQx+m8onA9j1q6tEdpCE+4iHfd0RzkMuH4SfY0Nry+6UE86ytrSRhYB9iKOR1D492lJJqWOTkbo/dPautF/QlcGU24SN2ArNc9O3dr22cQOMjemYDjS4+m2fAIKMKL8kkF9wn+1OENj/sPrT/G1ncdKQZMy33N6OhppSlIC/hUMdMHoKD2JqJV24nNXKU53pk3FLYx0yVdAPQA/k5r1lrDIyy74fQacuoTcDhEjw14c2uMll+SwkvKAO4jmTVvOcK9PagiuRLkwHG3k7SMAHHnz9TVfab1dYbO0iTeHnmozR2qfEZxbSfqtKSKu/S99sV4gIl2mc3IaUjcFJ6Y+9Gq4EO2TWkccoJQnSOF44P8WGNPx5C0ad1TvjDcrIae2koUB5Ec+nUZHzGn+Ywq3JYvQbKJcJ9QeS0rGFJVsfSCOnMJWD1BIPUCpF2oNSaTS/ZAxd2VXa23CO/3CMqWE94Ac4HLIzUMvtwc8Ldg48VbriFYz0DrRSr8lIV9qwSB0jmPPJ2VKJwY0ttsi/sXayhtaft/+JW3lXFLKW5DyG8peUBgO8uhUMKI8iT7Uxar7XDK21N2W3yHlHluI2pH5oXNP34XiDHhuuJLiW1BJ8ztP/xX8VvvpQhv4uR6UngrpnxNzHdAa3C4IalwbxyFMtS8b9e30OOG5+EaV8rQ5gfU0qrmQ6SktpBIPSlXbOTyV0EEbRYNCIdGjLc+6FnYfevUrh/GeGWVAe9SO32OUQMkfmpDDsDuBuNVRQxehUY4lL2Qh9p6S1oDS7UJlfeSJikrcQDg7N2Ej2BVn7JNClw5cF44n2xMhwJEaU3tbAwkcicD3zkk9aJbtepM/Vr9rfX8QlI2g/K020dv/ssfzQo6B1db7FxI8ZMgKkRpctphkpIBYcLoCHefpk59j9qkOFpHNHRKKUjQY93XlF9N0Jxbu11R/SNWzrXYkbMItwbSSgfu378hWeQwMAAedWlwLtS7Rer9DfkKkMOMkxy+kJKF8xu+Hl6emSCcDOBm0bc3HLa9EUQtTaTtT648qb9BSeI0TU05VssMNDUz9JDslsrHfKKgkq8tmNowMHrz55GGpcXse13QK5C1jHM35VEdoDSeurJf1S4upbk1bhJSp2Mruw3Ib3ggqGM59/xitzVE5MKNK+Lk/wCDltnpkEJBx93D+Kvrj5pefK4eH+uxIiLjFaS4RHJLaF9VISpXxFOemaFl2+s6l0o3bS+PH29tyHnzUgAKb6+Y3Nq/NTnSGZkZt9Ox+6pBjI85afqWpwi1Y2jXdltc539GTKWyo4+UrUARRb3LQEcFRDKcgfbNARYrpCsl+Vdp7ZDSm3Cy6gEmK45jY59UPIwR6EjzrptpNTt60bZrpcWNkqRDQXknruHLP3AB+9IaClFRcXQzG6o02WS177KhL1pKWy/tYjApIycetKr5mWmKcksJpVW8uZ1UDzd35VJobwGMYp8jPjAA51EIskcjmneNNIx8VVi30UMlDH22eHk5pv8AzEtrDrkVaVMyVNMlXcrUlICiR5FSEnmORJ9cDnazYr0+8l6JDk85AQ28lskF0c0gHzORnFduHi1MjOx5DTT7TqCh1pxAWhxJ6pUk8iD6GoWzwb4UphvWyLw/szDcpC2lhEcZwvOcE/t5nIxjBwamzYdnkMjTa6t0uMaMIikbe3why4UcQE6j0rbL4+VRHrrCStZbIKmHiNqlJ3DBG4EjIqaaa0lq9ahKOs9XPBxwlS4rsZKVJz/aUcvUYqt71bYVmvMu12VQTFhPuMMKSAAUpURnkAOfX7072bjDqbRcZx1lLbyGRuO9RHIUarInNvlTvDaogh3yp7xinzdH6AucjUmqp90R4cgJnhkKZHkd6EJKj165z9q582vUL7yV3yOpaUOOF7kcEoQ4GyfuhX+3pU57QnGTWvFiZ4a6PJj2xK97cGMcpcI+ZxXzEeQ5JHuag1nsi0xI1sWC2pwp784/02wQpXL1JAH1JrJDEIYjn5K0TSvmms0bD5Kk0yI0lUuWQ2G3GwslwHuyl7G4bRzJKhkJ9fSumekYjtn0XYbW/OVMdjWyMhySoYLyg0nKyPLNBBwc4I37izdnJrjSoOl7e60w5LcB/V2AEtNj51Y6noncMnPKjmccZjMtxmBtaZQlptOeiUgAD8AUmwOJ4YZHDY2shnimeNz2QsNyLk9vT+/wvEt7kedKm6VJBzSq6ii+RZucYVWDUXEfRWh2w5rLV1ps2eiJclKXFfRsZWfsmg/419prUn9VnaP4dXBMCDFcMZ+6RyfESHAMLS2v/poByAU/EcZyAcUPEh+RLdXKmyHHnnTlbrqitSj6knmT71854ZsVQgw90gzPNgjh1n2+eG2m3VQtHaeu+qXkq2F9RECL9UqWFOK/8Y+tMWiu1fxC4tC6uNxbTYIsVSWvCwkKckbF5wtTyyT5EZSlPPPtQZripXzWB16A/wDNSLh3ql/QeqY1/jsqeZx3U2MOXiI6iNyPTcMBSSehSPes8sji0hqoQ0EDHC4v7opEW9TznebTnOa0LpYnJiFspbIChg8utWpp+zWnUVqg6hsT6JdsuLKX4r7fLcg+o8lAggg8wQQelPo0bCQps93kk8/b3onPOMyYU8Tg1DpA7O8nUKDIQ6Iyk5LYP7VfjmPqKmGnex9pe4Npc1VfNQBltshUK3rbjhbuT8ZdAK8AdEjz5knpRC2eztR8JYZA/wCalEOArbtUnYFdB6VihnDJM+UH3Wqoiklj08xb7Wv+qqyFrLhNwptdt0ObvF0rFjJ7iHHuiHYocUokk988kJcWpRJJ3Ekk1JEXmHcWjIt0+NLaHVcd5LqR90kipRf7Hbbhp652u7wmJsWRFcS7GktpcaX8J6pUCDXOTXsSFw14j3i2aClyLSxbnh3Xg3loMdZSkqbSQchIUSdvQZPIUrw7ExVnTc21h04QvEMB0PxtkJJPXujkkzwAcGlVB8H+NjusWEad1K+F3hpBLMrASJaRzwoDADgHPkMKx69VVwNB3R6SJ0TsrkHkV0lK1ZJHRRPXIA/PWs4WQB0B9SevtilSrByk9rL6lO44A+I8uXlWYNbSVEEkDP2z60qVckL5XP2fuO8jhTdF2m9pdlaVnO75LCRvXCdOB4hlPmDy3o+YAEfEOZ12STZ9S2+NebLPYnQJjYcYkRlhTbiT5g/wR1BGDgilSo/jMDGgSjk8q7hczzeM8BSCHDQy2PLHtW7nYAcHPQe1KlUC1lY55Ua4pa4tfD3h/etW3gpS3Fiq7psnBeeUMNtj3UogVy0v90n3p6Vebi+HZd0lLfkKB+ZSiVfbJP8AFKlSXBY2iJz+pNvj7o/ijiZGt6Jw03fH7Hf4t0j/AAGDIQtAHkAoDH4/3pUqVIYnkCyiSwskN3Bf/9k=",C_=()=>{const e=[{title:"Total Candidates",value:256,percent:"+12% from last month",buttonLabel:"UPLOAD CV",bgImage:v_,accept:".pdf,.doc,.docx"},{title:"Monthly Expense",value:"256,300",percent:"+12% from last month",buttonLabel:"ADD EXPENSE",bgImage:j_,accept:".xlsx,.csv"},{title:"Completed Visas",value:256,percent:"+12% from last month",image:N_},{title:"Pending Protector",value:256,percent:"+12% from last month",image:w_},{title:"Active Cases",value:256,percent:"+12% from last month",image:A_},{title:"NAVTTC Tests",value:256,percent:"+12% from last month",image:S_}],a=[{name:"Ahmed Khan",code:"CN000001",detail:"Visa approved for Saudi Arabia",time:"2 hours ago",status:"Pending",avatar:null},{name:"Fatima Ali",code:"CN000002",detail:"NAVTTC test scheduled for Electrician",time:"4 hours ago",status:"Approved",avatar:Vh},{name:"Ahmed Khan",code:"CN000003",detail:"Visa approved for Saudi Arabia",time:"2 hours ago",status:"Pending",avatar:Vh},{name:"Fatima Ali",code:"CN000004",detail:"NAVTTC test scheduled for Electrician",time:"4 hours ago",status:"REJECTED",avatar:Vh}],r=(n,i)=>{const o=n.target.files[0];o&&console.log(`${i} file selected:`,o.name)};return t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[25%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"flex-1 p-6",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:"Summary"}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:e.slice(0,2).map((n,i)=>t.jsx("div",{className:"relative h-44 text-white rounded-xl overflow-hidden shadow-md",style:{backgroundImage:`url(${n.bgImage})`,backgroundSize:"cover",backgroundPosition:"center"},children:t.jsxs("div",{className:"absolute inset-0 bg-black bg-opacity-40 p-4 flex flex-col justify-between",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-semibold",children:n.title}),t.jsx("p",{className:"text-3xl font-bold mt-2",children:n.value}),t.jsxs("p",{className:"text-sm flex items-center mt-1",children:[t.jsx(g_,{className:"mr-1 text-green-400"}),n.percent]})]}),t.jsxs("label",{className:"self-start mt-2 bg-white text-black text-sm font-medium px-3 py-1 rounded-full cursor-pointer flex items-center",children:[t.jsx(Ve,{className:"inline mr-1"}),n.buttonLabel,t.jsx("input",{type:"file",accept:n.accept,className:"hidden",onChange:o=>r(o,n.buttonLabel)})]})]})},i))}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:e.slice(2).map((n,i)=>t.jsxs("div",{className:"bg-white p-4 rounded-xl shadow-md flex justify-between items-center",children:[t.jsxs("div",{children:[t.jsx("h3",{className:"text-md font-semibold text-gray-700",children:n.title}),t.jsx("p",{className:"text-2xl font-bold text-black mt-1",children:n.value}),t.jsx("p",{className:"text-green-500 text-sm mt-1",children:n.percent})]}),n.image&&t.jsx("img",{src:n.image,alt:"icon",className:"h-12 w-12 object-contain"})]},i))}),t.jsxs("div",{className:"bg-white shadow-lg rounded-xl p-6 mt-10",children:[t.jsx("h3",{className:"text-lg font-semibold text-green-600 mb-4",children:"Total Candidates"}),["CV Collection","Medical Process","NAVTTC Tests","E-Number Issued","Embassy Submission","Visa Approved","Protector Completed"].map((n,i)=>t.jsxs("div",{className:"mb-4",children:[t.jsxs("div",{className:"flex justify-between items-center mb-1",children:[t.jsx("span",{className:"text-sm text-gray-700",children:n}),t.jsx("span",{className:"text-sm text-gray-700",children:"245/245"})]}),t.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:t.jsx("div",{className:"bg-green-600 h-2 rounded-full",style:{width:`${90-i*10}%`}})})]},i))]}),t.jsxs("div",{className:"mt-10 bg-gradient-to-b from-green-200 to-green-100 p-4 rounded-xl shadow-md",children:[t.jsx("h3",{className:"text-md font-semibold text-green-600 mb-4",children:"Recent Cases"}),t.jsx("div",{className:"grid gap-4",children:a.map((n,i)=>t.jsxs("div",{className:"bg-white rounded-full p-4 shadow flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[n.avatar?t.jsx("img",{src:n.avatar,className:"w-12 h-12 rounded-full object-cover",alt:"user"}):t.jsx("div",{className:"w-12 h-12 rounded-full bg-gray-300"}),t.jsxs("div",{children:[t.jsxs("p",{className:"font-medium text-sm text-gray-800",children:[n.name," ",t.jsxs("span",{className:"text-xs text-gray-500 ml-2",children:["Code: ",n.code]})]}),t.jsx("p",{className:"text-sm text-gray-600",children:n.detail}),t.jsx("p",{className:"text-xs text-gray-500 mt-1",children:n.time})]})]}),t.jsx("button",{className:`px-3 py-1 text-xs font-semibold rounded-full ${n.status==="Pending"?"bg-orange-100 text-orange-500":n.status==="Approved"?"bg-green-100 text-green-600":"bg-red-100 text-red-500"}`,children:n.status})]},i))})]}),t.jsxs("div",{className:"bg-green-100 p-6 rounded-xl mt-8 shadow-md",children:[t.jsx("h3",{className:"text-md font-semibold text-green-800 mb-4",children:"Monthly Expenses"}),t.jsxs("p",{className:"text-3xl font-bold text-black mb-6",children:["PKR 2,450,000 ",t.jsx("span",{className:"text-yellow-500",children:"🟡"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm text-gray-700",children:[t.jsx("div",{children:"Visa Fees"}),t.jsx("div",{className:"text-right",children:"PKR 890,000"}),t.jsx("div",{children:"Medical Fees"}),t.jsx("div",{className:"text-right",children:"PKR 456,000"}),t.jsx("div",{children:"Transport Fees"}),t.jsx("div",{className:"text-right",children:"PKR 234,000"}),t.jsx("div",{children:"Electric Bill"}),t.jsx("div",{className:"text-right",children:"PKR 234,000"})]}),t.jsx("hr",{className:"my-4 border-gray-300"}),t.jsxs("div",{className:"flex justify-between font-semibold text-black",children:[t.jsx("span",{children:"Total"}),t.jsx("span",{children:"PKR 2,450,000"})]}),t.jsxs("div",{className:"flex gap-4 mt-6",children:[t.jsx("button",{className:"flex-1 text-green-700 font-medium py-2 rounded-lg bg-white hover:bg-green-50 transition",children:"Print Report"}),t.jsx("button",{className:"flex-1 bg-green-600 text-white font-medium py-2 rounded-lg hover:bg-green-700 transition",children:"View Full Report"})]})]})]})]})},mw="/assets/img1-CO5AlUww.png",fw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},pw=e=>e==="Medical Pending"||e==="Collect VISA"?"text-green-600":e==="VISA pending"?"text-orange-500":e==="Failed Medical Test"?"text-red-600":"text-gray-600",hw=(e,a)=>[...new Set(e.map(r=>r[a]))],E_=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(""),[c,m]=b.useState("all"),[u,h]=b.useState("all"),[p,x]=b.useState(""),[j,v]=b.useState(""),[w,S]=b.useState(!1),[A,g]=b.useState(null),[C,E]=b.useState(!1);b.useEffect(()=>{(async()=>{try{const U=await fetch(`${typeof import.meta<"u","http://213.199.41.219:3001"}/api/candidates/`);if(!U.ok)throw new Error("Failed to fetch candidates");const X=await U.json(),fe=D?.current?.state?.newCandidate;if(fe){const se=X.some(ie=>ie._id===fe._id);a(se?X:[fe,...X])}else a(X)}catch(z){console.error(z)}finally{n(!1)}})()},[]);const D={current:yr()},B=e.filter(R=>{const z=i.toLowerCase(),U=R.name||"",X=R.profession||"";if(!(U.toLowerCase().includes(z)||X.toLowerCase().includes(z))||c!=="all"&&X!==c||u!=="all"&&R.status!==u)return!1;const se=R.receiveDate?new Date(R.receiveDate):null,ie=p?new Date(p):null,V=j?new Date(j):null;return!(ie&&se&&se<ie||V&&se&&se>V)}),L=()=>{m("all"),h("all"),x(""),v("")},T=async R=>{try{const U=await fetch(`${typeof import.meta<"u","http://213.199.41.219:3001"}/api/candidates/${R._id}`);if(!U.ok)throw new Error("Failed to fetch candidate details");const X=await U.json();g(X),E(!0)}catch(z){console.error(z),alert("Failed to load candidate details")}};return t.jsxs("div",{children:[t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%]",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"w-[80%] p-6 space-y-6 bg-gray-50 relative",children:[t.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4 bg-green-100 p-4 rounded-lg mb-4",children:[t.jsx("input",{type:"text",placeholder:"Search by Candidate name or Profession",className:"flex-1 px-4 py-2 border border-gray-300 rounded-md outline-none",value:i,onChange:R=>o(R.target.value)}),t.jsxs("div",{className:"flex gap-2 relative",children:[t.jsxs("button",{className:"bg-green-600 text-white px-8 py-2 rounded-md flex items-center gap-2 hover:bg-green-700",onClick:()=>S(!w),children:[t.jsx(L3,{})," Filter"]}),t.jsxs("button",{className:"bg-green-600 text-white px-8 py-2 rounded-md flex items-center gap-2 hover:bg-green-700",children:[t.jsx(mt,{})," Print"]}),w&&t.jsxs("div",{className:"absolute top-full right-0 mt-12 w-72 bg-white rounded shadow-lg border border-gray-300 z-20 p-4",children:[t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Profession"}),t.jsxs("select",{className:"w-full border border-gray-300 rounded px-2 py-1",value:c,onChange:R=>m(R.target.value),children:[t.jsx("option",{value:"all",children:"All"}),hw(e,"profession").map(R=>t.jsx("option",{value:R,children:R},R))]})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Status"}),t.jsxs("select",{className:"w-full border border-gray-300 rounded px-2 py-1",value:u,onChange:R=>h(R.target.value),children:[t.jsx("option",{value:"all",children:"All"}),hw(e,"status").map(R=>t.jsx("option",{value:R,children:R},R))]})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Date From"}),t.jsx("input",{type:"date",className:"w-full border border-gray-300 rounded px-2 py-1",value:p,onChange:R=>x(R.target.value)})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Date To"}),t.jsx("input",{type:"date",className:"w-full border border-gray-300 rounded px-2 py-1",value:j,onChange:R=>v(R.target.value)})]}),t.jsxs("div",{className:"flex justify-between mt-4",children:[t.jsx("button",{className:"px-4 py-2 bg-gray-300 rounded",onClick:()=>{L(),S(!1)},children:"Reset"}),t.jsx("button",{className:"px-4 py-2 bg-green-600 text-white rounded",onClick:()=>S(!1),children:"Apply"})]})]})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full border border-gray-300 bg-white rounded-md text-sm",children:[t.jsx("thead",{className:"bg-gray-100 text-gray-700",children:t.jsxs("tr",{children:[t.jsx("th",{className:"p-3 border",children:"NO#"}),t.jsx("th",{className:"p-3 border",children:"Candidates"}),t.jsx("th",{className:"p-3 border",children:"Profession"}),t.jsx("th",{className:"p-3 border",children:"Source"}),t.jsx("th",{className:"p-3 border",children:"Status"}),t.jsx("th",{className:"p-3 border",children:"Received Date"}),t.jsx("th",{className:"p-3 border",children:"Actions"})]})}),t.jsx("tbody",{children:r?t.jsx("tr",{children:t.jsx("td",{colSpan:7,className:"text-center p-4 text-gray-500",children:"Loading candidates..."})}):B.length>0?B.map((R,z)=>t.jsxs("tr",{className:"text-center hover:bg-gray-50",children:[t.jsx("td",{className:"p-2 border",children:String(z+1).padStart(2,"0")}),t.jsxs("td",{className:"p-2 border flex items-center gap-2",children:[t.jsx("img",{src:R.profilePicture||mw,alt:"profile",className:"w-8 h-8 rounded-full"}),t.jsxs("div",{className:"text-left",children:[t.jsx("p",{className:"font-medium",children:R.name}),t.jsx("p",{className:"text-xs text-gray-500",children:R.city})]})]}),t.jsxs("td",{className:"p-2 border",children:[t.jsx("p",{className:"font-medium",children:R.profession}),t.jsx("p",{className:"text-xs text-gray-500",children:R.qualification})]}),t.jsx("td",{className:"p-2 border",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(y_,{className:"text-xl text-gray-700"}),t.jsx("span",{children:"Email"})]})}),t.jsx("td",{className:`p-2 border font-medium ${pw(R.status)}`,children:R.status}),t.jsx("td",{className:"p-2 border",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(c_,{className:"text-sm"}),t.jsx("span",{children:R.receiveDate?new Date(R.receiveDate).toLocaleDateString():"N/A"})]})}),t.jsx("td",{className:"p-2 border",children:t.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t.jsx("button",{onClick:()=>T(R),className:"bg-green-600 text-white px-2 py-1 rounded hover:bg-green-700",children:t.jsx(Kt,{})}),t.jsx("button",{className:"bg-green-600 text-white px-2 py-1 rounded hover:bg-green-700",children:t.jsx(mt,{})})]})})]},R._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:7,className:"text-center p-4 text-gray-500",children:"No candidates found."})})})]})})]})]}),C&&A&&t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50",children:t.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-4xl w-full max-h-[90vh] overflow-y-auto",children:t.jsxs("div",{className:"p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-2xl font-bold text-gray-800",children:"Candidate Details"}),t.jsx("button",{onClick:()=>E(!1),className:"text-gray-500 hover:text-gray-700 text-2xl",children:"×"})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("img",{src:A.profilePicture||mw,alt:"Profile",className:"w-32 h-32 rounded-full object-cover border-4 border-green-200"}),t.jsx("h3",{className:"text-xl font-semibold mt-4",children:A.name}),t.jsx("p",{className:"text-gray-600",children:A.profession})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-700",children:"Personal Information"}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Name"}),t.jsx("p",{className:"text-sm",children:A.name||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Father Name"}),t.jsx("p",{className:"text-sm",children:A.fatherName||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Gender"}),t.jsx("p",{className:"text-sm",children:A.gender||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Age"}),t.jsx("p",{className:"text-sm",children:A.age||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"CNIC"}),t.jsx("p",{className:"text-sm",children:A.cnic||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Passport"}),t.jsx("p",{className:"text-sm",children:A.passport||"N/A"})]})]})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-700",children:"Contact Information"}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Address"}),t.jsx("p",{className:"text-sm",children:A.address||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"City"}),t.jsx("p",{className:"text-sm",children:A.city||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"State"}),t.jsx("p",{className:"text-sm",children:A.state||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Country"}),t.jsx("p",{className:"text-sm",children:A.country||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Contact"}),t.jsx("p",{className:"text-sm",children:A.contact||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Marital Status"}),t.jsx("p",{className:"text-sm",children:A.maritalStatus||"N/A"})]})]})]}),t.jsxs("div",{className:"space-y-4",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-700",children:"Professional Information"}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Profession"}),t.jsx("p",{className:"text-sm",children:A.profession||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Qualification"}),t.jsx("p",{className:"text-sm",children:A.qualification||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Salary"}),t.jsx("p",{className:"text-sm",children:A.salary||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Status"}),t.jsx("p",{className:`text-sm font-medium ${pw(A.status)}`,children:A.status||"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Receive Date"}),t.jsx("p",{className:"text-sm",children:A.receiveDate?new Date(A.receiveDate).toLocaleDateString():"N/A"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600",children:"Place of Birth"}),t.jsx("p",{className:"text-sm",children:A.placeOfBirth||"N/A"})]})]})]})]}),A.documents&&A.documents.length>0&&t.jsxs("div",{className:"mt-8",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-700 mb-4",children:"Documents"}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:A.documents.map((R,z)=>t.jsxs("div",{className:"border rounded-lg p-4 bg-gray-50",children:[t.jsx("h5",{className:"font-medium text-gray-800 mb-2",children:R.title}),t.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.jsx("span",{className:`px-2 py-1 rounded text-xs ${R.done?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:R.done?"Done":"Pending"}),t.jsx("span",{className:`px-2 py-1 rounded text-xs ${R.passed?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:R.passed?"Passed":"Not Passed"})]}),t.jsx("button",{onClick:()=>window.open(R.url,"_blank"),className:"bg-green-600 text-white px-3 py-1 rounded text-sm hover:bg-green-700",children:"View Document"})]},z))})]}),t.jsx("div",{className:"flex justify-end mt-6",children:t.jsx("button",{onClick:()=>E(!1),className:"bg-gray-500 text-white px-6 py-2 rounded hover:bg-gray-600",children:"Close"})})]})})})]})},Yh="/assets/NBP%20logo-Cbl9ZFaV.png",k_=()=>t.jsx("div",{children:t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"flex-1 p-4 bg-white text-xs font-sans",children:[t.jsxs("div",{className:"max-w-5xl mx-auto  border-black",children:[t.jsxs("div",{className:"flex justify-between items-start p-2",children:[t.jsx("div",{children:t.jsx("img",{src:Yh,alt:"NBP Logo",className:"w-24"})}),t.jsxs("div",{className:"text-center flex-1 -ml-20",children:[t.jsx("h1",{className:"text-base font-bold",children:"SPECIALIZED DEPOSIT SLIP"}),t.jsx("p",{className:"text-[10px]",children:"On behalf of Bureau of Emigration & Overseas Employment"}),t.jsx("p",{className:"text-[11px] font-bold mt-1",children:"EMIGRANT THROUGH OVERSEAS EMPLOYMENT PROMOTER"}),t.jsx("p",{className:"text-[11px] font-bold",children:"FOR SHORT TERM EMPLOYEMENT / INSURANCE EXEMPT"})]}),t.jsxs("div",{className:"text-center text-[10px] space-y-1",children:[t.jsx("p",{className:"font-semibold",children:"Bank copy"}),t.jsx("div",{className:"border-b border-black inline-block w-24"}),t.jsx("p",{children:"Deposit slip no."}),t.jsx("input",{type:"text",className:"ml-3 text-center placeholder-black border-b border-black inline-block w-28 bg-transparent focus:outline-none",placeholder:"12345"})]})]}),t.jsx("div",{className:"mt-4 border border-black divide-x divide-black text-[11px] bg-gray-300",children:t.jsxs("div",{className:"grid grid-cols-4",children:[t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Collecting Branch Name"}),t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Branch Code"}),t.jsxs("div",{className:"p-1 col-span-2 bg-gray-300 flex items-center",children:[t.jsx("span",{className:"font-bold text-black mr-2",children:"Date:"}),t.jsx("div",{className:"flex",children:Array.from({length:8}).map((e,a)=>t.jsx("input",{maxLength:1,className:"border border-black w-6 h-6 text-center bg-white -ml-[1px]"},a))})]})]})}),t.jsxs("div",{className:" border-black border-t-0 bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-2  border-black",children:[t.jsx("div",{className:"bg-white p-1 font-semibold text-[11px]",children:"Emigrant Information"}),t.jsx("div",{className:"bg-white p-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border-l border-t border-black",children:[t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-2 p-1 text-[11px] font-semibold",children:"Emigrant Name:"}),t.jsx("input",{type:"text",value:"MUHAMMAD FAROOQ",className:"col-span-4 p-1 font-bold text-[11px] border-black bg-gray-300 border-r"})]}),t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-1 p-1 text-[11px]",children:"CNIC"}),t.jsx("input",{type:"text",className:"col-span-5 p-1  border-l border-r border-black"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] gap-2 border border-black",children:[t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center border-r border-black",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Mobile):"}),t.jsx("input",{type:"text",placeholder:"0301-1234567",className:"p-1 font-bold text-black bg-gray-300 w-full "})]}),t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Residence):"}),t.jsx("input",{type:"text",placeholder:"051-1234567",className:"p-1 text-black font-bold bg-gray-300 w-full"})]})]})]}),t.jsxs("div",{className:"text-[11px] ",children:[t.jsxs("div",{className:"bg-white p-1  border-black",children:["Particular of Payments _"," ",t.jsx("span",{className:"font-semibold",children:"CREDIT TO BE MADE THROUGH TRANSACTION CODE “ZBOEOP”"})]}),t.jsxs("div",{className:"grid grid-cols-2 bg-gray-300",children:[t.jsx("div",{className:"flex items-center justify-center text-center border border-black",children:t.jsxs("div",{children:[t.jsx("p",{children:"Payments made on behalf of"}),t.jsxs("p",{className:"font-bold text-[12px] leading-snug",children:["Director General ",t.jsx("br",{})," Bureau of Emigration & Overseas Employment"]})]})}),t.jsxs("div",{className:"grid grid-cols-2  border=l",children:[t.jsx("div",{className:"border-b border-r border-t border-black p-1",children:"OPF Welfare Fund"}),t.jsx("div",{className:"border-b border-black border-r border-t p-1 text-right font-bold",children:"2000"}),t.jsx("div",{className:"border-b border-r border-black p-1",children:"State Life Insurance Premium"}),t.jsx("div",{className:"border-b border-black border-r p-1 text-right font-bold",children:"2500"}),t.jsx("div",{className:"border-r border-black p-1",children:"OEC Emigration Promotion FEE"}),t.jsx("div",{className:"p-1 text-right font-bold border-r border-black",children:"200"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] border-black border-t-0",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2 border-r",children:"Amount in Words:"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"bg-gray-300 p-2 flex justify-between items-center font-bold border-l border-t border-r border-black",children:[t.jsx("span",{children:"Total:"}),t.jsx("span",{children:"4700"})]})]})]}),t.jsxs("div",{className:"text-[11px] border-black border-t-0 bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-3 text-center font-bold border-b border-black",children:[t.jsx("div",{className:"p-1 border-r border-black border-l border-t",children:"Received By"}),t.jsx("div",{className:"p-1 border-r border-black border-t",children:"Authorized By"}),t.jsx("div",{className:"p-1 border-r border-black border-t",children:"Depositor’s Signature"})]}),t.jsxs("div",{className:"grid grid-cols-3 text-left border-b border-black",children:[t.jsx("div",{className:"p-2 border-r border-black border-l",children:t.jsx("p",{className:"mt-16 text-center",children:"Cashier’s Stamp & Signature"})}),t.jsx("div",{className:"p-2 border-r border-black",children:t.jsx("p",{className:"mt-16 text-center",children:"Authorized Officer’s Signature"})}),t.jsxs("div",{className:"p-2 border-black border-r",children:[t.jsxs("p",{className:"mb-2",children:["Name:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{className:"mb-2",children:["Contact Number:",t.jsx("input",{type:"tel",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{children:["Signature:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]})]})]})]}),t.jsxs("div",{className:"flex justify-between text-[10px] border-b border-black px-8 pb-2 mt-1 font-semibold",children:[t.jsx("p",{children:"Note: for branch use only"}),t.jsx("p",{children:"- Only cash is acceptable"}),t.jsx("p",{children:"- Separate slip for every individual"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:"flex-1 p-4 bg-white text-xs font-sans",children:t.jsxs("div",{className:"max-w-5xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-start p-2",children:[t.jsx("div",{children:t.jsx("img",{src:Yh,alt:"NBP Logo",className:"w-24"})}),t.jsxs("div",{className:"text-center flex-1 -ml-20",children:[t.jsx("h1",{className:"text-base font-bold",children:"SPECIALIZED DEPOSIT SLIP"}),t.jsx("p",{className:"text-[10px]",children:"On behalf of Bureau of Emigration & Overseas Employment"}),t.jsx("p",{className:"text-[11px] font-bold mt-1",children:"EMIGRANT THROUGH OVERSEAS EMPLOYMENT PROMOTER"}),t.jsx("p",{className:"text-[11px] font-bold",children:"FOR SHORT TERM EMPLOYEMENT / INSURANCE EXEMPT"})]}),t.jsxs("div",{className:"text-center  text-[10px] space-y-1",children:[t.jsx("p",{className:"font-semibold",children:"Deposite copy"}),t.jsx("div",{className:"border-b border-black inline-block w-24"}),t.jsx("p",{className:"font-semibold",children:"Deposit slip no."}),t.jsx("input",{type:"text",className:"ml-3 text-center font-semibold placeholder-gray-800 border-b border-black inline-block w-24 bg-transparent focus:outline-none",placeholder:"12345"})]})]}),t.jsx("div",{className:"mt-4 border border-black divide-x divide-black text-[11px] bg-gray-300",children:t.jsxs("div",{className:"grid grid-cols-4",children:[t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Collecting Branch Name"}),t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Branch Code"}),t.jsxs("div",{className:"p-1 col-span-2 bg-gray-300 flex items-center",children:[t.jsx("span",{className:"font-bold text-black mr-2",children:"Date:"}),t.jsx("div",{className:"flex",children:Array.from({length:8}).map((e,a)=>t.jsx("input",{maxLength:1,className:"border border-black w-6 h-6 text-center bg-white -ml-[1px]"},a))})]})]})}),t.jsxs("div",{className:" bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-2  border-black",children:[t.jsx("div",{className:"bg-white p-1 font-semibold text-[11px]",children:"Emigrant Information"}),t.jsx("div",{className:"bg-white p-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border border-black",children:[t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-2 p-1 text-[11px] font-semibold",children:"Emigrant Name:"}),t.jsx("input",{type:"text",value:"MUHAMMAD FAROOQ",className:"col-span-4 p-1 font-bold text-[11px] bg-gray-300 border-black"})]}),t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-1 p-1 text-[11px]",children:"CNIC"}),t.jsx("input",{type:"text",className:"col-span-5 p-1 border-l border-black"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] gap-2 border-b border-black border-l border-r",children:[t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Mobile):"}),t.jsx("input",{type:"text",placeholder:"0301-1234567",className:"p-1 font-bold text-black bg-gray-300 w-full"})]}),t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Residence):"}),t.jsx("input",{type:"text",placeholder:"051-1234567",className:"p-1 text-black font-bold bg-gray-300 w-full"})]})]})]}),t.jsxs("div",{className:" mt-4 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-1 border-b border-black",children:["Particular of Payments _"," ",t.jsx("span",{className:"font-semibold",children:"CREDIT TO BE MADE THROUGH TRANSACTION CODE “ZBOEOP”"})]}),t.jsxs("div",{className:"grid grid-cols-2 bg-gray-300",children:[t.jsx("div",{className:"flex items-center justify-center text-center p-2 border-r border-black",children:t.jsxs("div",{children:[t.jsx("p",{children:"Payments made on behalf of"}),t.jsxs("p",{className:"font-bold text-[12px] leading-snug",children:["Director General ",t.jsx("br",{})," Bureau of Emigration & Overseas Employment"]})]})}),t.jsxs("div",{className:"grid grid-cols-2 border-r border-black",children:[t.jsx("div",{className:"border-b border-r border-black p-1",children:"OPF Welfare Fund"}),t.jsx("div",{className:"border-b border-black p-1 text-right font-bold",children:"2000"}),t.jsx("div",{className:"border-b border-r border-black p-1",children:"State Life Insurance Premium"}),t.jsx("div",{className:"border-b border-black p-1 text-right font-bold",children:"2500"}),t.jsx("div",{className:"border-r border-black p-1",children:"OEC Emigration Promotion FEE"}),t.jsx("div",{className:"p-1 text-right font-bold",children:"200"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px]  border-t-0",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2",children:"Amount in Words:"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"bg-gray-300 p-2 flex justify-between items-center font-bold border-l border-t border-r border-black",children:[t.jsx("span",{children:"Total:"}),t.jsx("span",{children:"4700"})]})]})]}),t.jsxs("div",{className:"text-[11px] border-black border-t-0 bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-3 text-center font-bold border-b border-black",children:[t.jsx("div",{className:"p-1 border-r border-t border-black border-l",children:"Received By"}),t.jsx("div",{className:"p-1 border-r border-t border-black",children:"Authorized By"}),t.jsx("div",{className:"p-1 border-r border-t border-black",children:"Depositor’s Signature"})]}),t.jsxs("div",{className:"grid grid-cols-3 text-left border-b border-black",children:[t.jsx("div",{className:"p-2 border-r border-black border-l",children:t.jsx("p",{className:"mt-16 text-center",children:"Cashier’s Stamp & Signature"})}),t.jsx("div",{className:"p-2 border-r border-black",children:t.jsx("p",{className:"mt-16 text-center",children:"Authorized Officer’s Signature"})}),t.jsxs("div",{className:"p-2 border-black border-r",children:[t.jsxs("p",{className:"mb-2",children:["Name:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{className:"mb-2",children:["Contact Number:",t.jsx("input",{type:"tel",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{children:["Signature:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]})]})]})]}),t.jsxs("div",{className:"flex justify-between text-[10px] mt-1 font-semibold",children:[t.jsx("p",{children:"Note: for branch use only"}),t.jsx("p",{children:"- Only cash is acceptable"}),t.jsx("p",{children:"- Separate slip for every individual"})]})]})}),t.jsx("div",{children:t.jsx("div",{className:"flex-1 p-4 bg-white text-xs font-sans",children:t.jsxs("div",{className:"max-w-5xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-start p-2",children:[t.jsx("div",{children:t.jsx("img",{src:Yh,alt:"NBP Logo",className:"w-24"})}),t.jsxs("div",{className:"text-center flex-1 -ml-20",children:[t.jsx("h1",{className:"text-base font-bold",children:"SPECIALIZED DEPOSIT SLIP"}),t.jsx("p",{className:"text-[10px]",children:"On behalf of Bureau of Emigration & Overseas Employment"}),t.jsx("p",{className:"text-[11px] font-bold mt-1",children:"EMIGRANT THROUGH OVERSEAS EMPLOYMENT PROMOTER"}),t.jsx("p",{className:"text-[11px] font-bold",children:"FOR SHORT TERM EMPLOYEMENT / INSURANCE EXEMPT"})]}),t.jsxs("div",{className:"text-center  text-[10px] space-y-1",children:[t.jsx("p",{className:"font-semibold",children:"Deposite copy"}),t.jsx("div",{className:"border-b border-black inline-block w-24"}),t.jsx("p",{className:"font-semibold",children:"Deposit slip no."}),t.jsx("input",{type:"text",className:"ml-3 text-center font-semibold placeholder-gray-800 border-b border-black inline-block w-24 bg-transparent focus:outline-none",placeholder:"12345"})]})]}),t.jsx("div",{className:"mt-4 border border-black divide-x divide-black text-[11px] bg-gray-300",children:t.jsxs("div",{className:"grid grid-cols-4",children:[t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Collecting Branch Name"}),t.jsx("input",{type:"text",className:"p-1 bg-gray-300 font-bold text-black",placeholder:"Branch Code"}),t.jsxs("div",{className:"p-1 col-span-2 bg-gray-300 flex items-center",children:[t.jsx("span",{className:"font-bold text-black mr-2",children:"Date:"}),t.jsx("div",{className:"flex",children:Array.from({length:8}).map((e,a)=>t.jsx("input",{maxLength:1,className:"border border-black w-6 h-6 text-center bg-white -ml-[1px]"},a))})]})]})}),t.jsxs("div",{className:" bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-2  border-black",children:[t.jsx("div",{className:"bg-white p-1 font-semibold text-[11px]",children:"Emigrant Information"}),t.jsx("div",{className:"bg-white p-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border border-black",children:[t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-2 p-1 text-[11px] font-semibold",children:"Emigrant Name:"}),t.jsx("input",{type:"text",value:"MUHAMMAD FAROOQ",className:"col-span-4 p-1 font-bold text-[11px] bg-gray-300 border-black"})]}),t.jsxs("div",{className:"grid grid-cols-6",children:[t.jsx("label",{className:"col-span-1 p-1 text-[11px]",children:"CNIC"}),t.jsx("input",{type:"text",className:"col-span-5 p-1 border-l border-black"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px] gap-2 border-b border-black border-l border-r",children:[t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Mobile):"}),t.jsx("input",{type:"text",placeholder:"0301-1234567",className:"p-1 font-bold text-black bg-gray-300 w-full"})]}),t.jsxs("div",{className:"bg-gray-300 p-1 flex items-center",children:[t.jsx("label",{className:"font-bold text-black mr-2 whitespace-nowrap",children:"Telephone (Residence):"}),t.jsx("input",{type:"text",placeholder:"051-1234567",className:"p-1 text-black font-bold bg-gray-300 w-full"})]})]})]}),t.jsxs("div",{className:" mt-4 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-1 border-b border-black",children:["Particular of Payments _"," ",t.jsx("span",{className:"font-semibold",children:"CREDIT TO BE MADE THROUGH TRANSACTION CODE “ZBOEOP”"})]}),t.jsxs("div",{className:"grid grid-cols-2 bg-gray-300",children:[t.jsx("div",{className:"flex items-center justify-center text-center p-2 border-r border-black",children:t.jsxs("div",{children:[t.jsx("p",{children:"Payments made on behalf of"}),t.jsxs("p",{className:"font-bold text-[12px] leading-snug",children:["Director General ",t.jsx("br",{})," Bureau of Emigration & Overseas Employment"]})]})}),t.jsxs("div",{className:"grid grid-cols-2 border-r border-black",children:[t.jsx("div",{className:"border-b border-r border-black p-1",children:"OPF Welfare Fund"}),t.jsx("div",{className:"border-b border-black p-1 text-right font-bold",children:"2000"}),t.jsx("div",{className:"border-b border-r border-black p-1",children:"State Life Insurance Premium"}),t.jsx("div",{className:"border-b border-black p-1 text-right font-bold",children:"2500"}),t.jsx("div",{className:"border-r border-black p-1",children:"OEC Emigration Promotion FEE"}),t.jsx("div",{className:"p-1 text-right font-bold",children:"200"})]})]}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px]  border-t-0",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2",children:"Amount in Words:"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"bg-gray-300 p-2 flex justify-between items-center font-bold border-l border-t border-r border-black",children:[t.jsx("span",{children:"Total:"}),t.jsx("span",{children:"4700"})]})]})]}),t.jsxs("div",{className:"text-[11px] border-black border-t-0 bg-gray-300",children:[t.jsxs("div",{className:"grid grid-cols-3 text-center font-bold border-b border-black",children:[t.jsx("div",{className:"p-1 border-r border-t border-black border-l",children:"Received By"}),t.jsx("div",{className:"p-1 border-r border-t border-black",children:"Authorized By"}),t.jsx("div",{className:"p-1 border-r border-t border-black",children:"Depositor’s Signature"})]}),t.jsxs("div",{className:"grid grid-cols-3 text-left border-b border-black",children:[t.jsx("div",{className:"p-2 border-r border-black border-l",children:t.jsx("p",{className:"mt-16 text-center",children:"Cashier’s Stamp & Signature"})}),t.jsx("div",{className:"p-2 border-r border-black",children:t.jsx("p",{className:"mt-16 text-center",children:"Authorized Officer’s Signature"})}),t.jsxs("div",{className:"p-2 border-black border-r",children:[t.jsxs("p",{className:"mb-2",children:["Name:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{className:"mb-2",children:["Contact Number:",t.jsx("input",{type:"tel",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]}),t.jsxs("p",{children:["Signature:",t.jsx("input",{type:"text",className:"ml-2 w-40 border-b border-black outline-none bg-transparent"})]})]})]})]}),t.jsxs("div",{className:"flex justify-between text-[10px] mt-1 font-semibold",children:[t.jsx("p",{children:"Note: for branch use only"}),t.jsx("p",{children:"- Only cash is acceptable"}),t.jsx("p",{children:"- Separate slip for every individual"})]})]})})})]})]})]})});function O_(e){return Ye({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:[]}]})(e)}function F3(e){return Ye({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M416 277.333H277.333V416h-42.666V277.333H96v-42.666h138.667V96h42.666v138.667H416v42.666z"},child:[]}]})(e)}const Ro="/assets/profile-ChU7r_Bt.png",D_={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},T_=()=>{const[e,a]=b.useState({}),[r,n]=b.useState({show:!1,message:"",type:"info"}),i=(ue,he="info",te=2500)=>{n({show:!0,message:ue,type:he}),setTimeout(()=>n({show:!1,message:"",type:he}),te)},o=ue=>{const{name:he,value:te}=ue.target;a(G=>({...G,[he]:te}))},[c,m]=b.useState(null),[u,h]=b.useState(Ro),p=b.useRef(),[x,j]=b.useState(!1),[v,w]=b.useState([]),S=ue=>{const he=ue.target.files&&ue.target.files[0];if(he){m(he),w([{name:he.name,type:he.type}]),j(!0);try{const te=URL.createObjectURL(he);h(te)}catch{h(Ro)}}},A=["Waqala Papers","Company’s Agreement","Driving Lic.","Degree’s copies","Agency’s Undertaking","Agency’s valid License copy","Police character certificate","FIR & Newspaper","Degree’s copies (2)"],[g,C]=b.useState(()=>A.map(()=>null)),E=b.useRef(A.map(()=>pr.createRef())),[O,D]=b.useState(()=>A.map(()=>!1)),[B,L]=b.useState(()=>A.map(()=>!1)),T=["Medical Test","NAVTTC Test","POLICE CHARACTER CERTIFICATE."],[R,z]=b.useState(()=>T.map(()=>({done:!1,passed:!1}))),[U,X]=b.useState(()=>T.map(()=>null)),fe=b.useRef(T.map(()=>pr.createRef())),se=(ue,he)=>{z(te=>{const G=[...te];return G[ue]={...G[ue],[he]:!G[ue][he]},G})},ie=ue=>{const he=E.current[ue];he&&he.current&&he.current.click()},V=ue=>{const he=fe.current[ue];he&&he.current&&he.current.click()},K=(ue,he)=>{const te=he.target.files&&he.target.files[0];te&&(C(G=>{const xe=[...G];return xe[ue]=te,xe}),w([{name:te.name,type:te.type}]),j(!0))},ce=(ue,he)=>{const te=he.target.files&&he.target.files[0];te&&(X(G=>{const xe=[...G];return xe[ue]=te,xe}),w([{name:te.name,type:te.type}]),j(!0))},$=Dn(),I=ue=>{C(he=>{const te=[...he];return te[ue]=null,te}),D(he=>{const te=[...he];return te[ue]=!1,te}),L(he=>{const te=[...he];return te[ue]=!1,te})},P=ue=>{if(!ue){i("No file attached","error");return}const he=URL.createObjectURL(ue);window.open(he,"_blank")},H=()=>{window.print()},ee=async ue=>{if(ue&&ue.preventDefault&&ue.preventDefault(),!(c||g.some(Boolean))){i("No files selected to upload","error");return}const te=e.cnic||"";if(!/^[0-9]{13}$/.test(te)){i("CNIC must be exactly 13 digits (Pakistan format)","error");return}const G=new FormData;c&&G.append("profilePicture",c);const xe=[];U.forEach((ne,Me)=>{ne&&xe.push({title:`${T[Me]}-${ne.name}`,file:ne,done:R[Me]?.done||!1,passed:R[Me]?.passed||!1})}),g.forEach((ne,Me)=>{ne&&xe.push({title:`${A[Me]}-${ne.name}`,file:ne,done:O[Me]||!1,passed:B[Me]||!1})});const Ne=xe.map(ne=>({title:ne.title,done:ne.done,passed:ne.passed}));xe.forEach(ne=>G.append("documents",ne.file,ne.title)),G.append("documentsMeta",JSON.stringify(Ne)),Object.entries(e).forEach(([ne,Me])=>{G.append(ne,Me)}),R.forEach((ne,Me)=>{G.append(`step${Me}_done`,ne.done),G.append(`step${Me}_passed`,ne.passed)});try{const ne=localStorage.getItem("token"),je=await fetch((typeof import.meta<"u","http://213.199.41.219:3001")+"/api/candidates/",{method:"POST",headers:ne?{Authorization:`Bearer ${ne}`}:{},body:G});if(!je.ok){const Ce=await je.json().catch(()=>({message:je.statusText}));throw new Error(Ce.message||"Upload failed")}const ke=await je.json();i("Candidate saved successfully","success"),a({}),C(A.map(()=>null)),m(null),h(Ro),console.log("created candidate",ke.candidate),ke&&ke.candidate&&$("/candidate",{state:{newCandidate:ke.candidate}})}catch(ne){console.error(ne),i("Upload failed: "+(ne.message||ne),"error")}},pe=({show:ue,message:he,type:te})=>{if(!ue)return null;let G="bg-gray-800";return te==="error"&&(G="bg-red-600"),te==="success"&&(G="bg-green-600"),t.jsx("div",{className:`fixed top-6 right-6 z-[100] px-4 py-2 rounded text-white shadow-lg ${G} animate-fade-in`,style:{minWidth:180,maxWidth:320},children:he})},ve=({open:ue,files:he,onClose:te})=>ue?t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 min-w-[260px] max-w-[90vw]",children:[t.jsx("h3",{className:"text-lg font-bold mb-4",children:"File Uploaded"}),t.jsx("ul",{className:"mb-4",children:he.map((G,xe)=>t.jsx("li",{className:"text-sm text-gray-800 truncate max-w-xs",title:G.name,children:t.jsx("span",{className:"font-medium",children:G.name})},xe))}),t.jsx("button",{onClick:te,className:"px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700",children:"Close"})]})}):null;return t.jsxs("div",{children:[t.jsx(pe,{show:r.show,message:r.message,type:r.type}),t.jsx(ve,{open:x,files:v,onClose:()=>j(!1)}),t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%]",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"w-[80%] p-6 space-y-6",children:[t.jsxs("div",{className:"w-full",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx(O_,{className:"text-3xl text-black cursor-pointer mr-4"}),t.jsx("div",{className:"flex-1",children:t.jsx("div",{className:"w-full bg-gray-300 h-3 rounded-full relative",children:t.jsx("div",{className:"bg-green-600 h-3 rounded-full",style:{width:"30%"}})})})]}),t.jsx("p",{className:"text-center text-sm font-medium text-gray-700 mt-1",children:"Progress Completed 30%"})]}),t.jsxs("form",{onSubmit:ee,className:"flex items-start justify-between",children:[t.jsxs("div",{className:"w-[50%] space-y-4",children:[t.jsx("h2",{className:"text-xl font-bold text-black mb-4",children:"Candidate Details"}),[{label:"Name",name:"name",type:"text"},{label:"Father Name",name:"fatherName",type:"text"},{label:"Profession",name:"profession",type:"text"},{label:"Qualification",name:"qualification",type:"text"},{label:"Place of Birth",name:"placeOfBirth",type:"text"},{label:"CNIC No.",name:"cnic",type:"text"},{label:"Passport No.",name:"passport",type:"text"},{label:"Address",name:"address",type:"text"},{label:"City",name:"city",type:"text"},{label:"State",name:"state",type:"text"},{label:"Country",name:"country",type:"text"},{label:"Contact No. (Residence)",name:"contact",type:"text"},{label:"Marital Status",name:"maritalStatus",type:"text"},{label:"Salary",name:"salary",type:"text"}].map(ue=>t.jsxs("div",{children:[t.jsxs("label",{className:"block mb-1",children:[ue.label,":"]}),t.jsx("input",{name:ue.name,value:e[ue.name]||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",type:ue.type})]},ue.name)),t.jsxs("div",{className:"flex space-x-4",children:[t.jsxs("div",{className:"w-1/2",children:[t.jsx("label",{children:"Gender:"}),t.jsxs("select",{name:"gender",value:e.gender||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",children:[t.jsx("option",{value:"",children:"Select"}),t.jsx("option",{children:"Male"}),t.jsx("option",{children:"Female"}),t.jsx("option",{children:"Other"})]})]}),t.jsxs("div",{className:"w-1/2",children:[t.jsx("label",{children:"Age:"}),t.jsx("input",{name:"age",value:e.age||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",type:"number"})]})]}),t.jsxs("div",{className:"flex space-x-4",children:[t.jsxs("div",{className:"w-1/2",children:[t.jsx("label",{children:"PP Issue Date:"}),t.jsx("input",{name:"ppIssue",value:e.ppIssue||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",type:"date"})]}),t.jsxs("div",{className:"w-1/2",children:[t.jsx("label",{children:"PP Expiry Date:"}),t.jsx("input",{name:"ppExpiry",value:e.ppExpiry||"",onChange:o,className:"w-full p-2 bg-green-200 rounded-md",type:"date"})]})]})]}),t.jsxs("div",{className:"w-[35%] flex flex-col items-center space-y-4",children:[t.jsx("h3",{className:"text-lg font-semibold text-gray-700",children:"CV # 01"}),t.jsx("input",{ref:p,type:"file",accept:"image/*",className:"hidden",onChange:S}),t.jsxs("div",{className:"flex flex-col items-center",children:[t.jsx("img",{src:u,alt:"Candidate",className:"w-40 h-40 object-fill rounded-md border-2 border-blue-300 shadow-md mb-2"}),t.jsxs("div",{className:"flex gap-2 items-center",children:[t.jsx("button",{type:"button",onClick:()=>p.current&&p.current.click(),className:"px-3 py-1 bg-green-600 text-white rounded",children:"Attach"}),t.jsx("button",{type:"button",onClick:()=>c?P(c):alert("No profile picture attached"),className:"px-3 py-1 bg-green-600 text-white rounded",children:"View"}),t.jsx("button",{type:"button",onClick:()=>{m(null),h(Ro)},className:"px-3 py-1 bg-red-500 text-white rounded",children:"Remove"})]})]}),t.jsx("p",{className:"text-base font-medium text-black",children:"CV Approved By"}),t.jsx("h4",{className:"bg-green-200 px-10 text-center py-1 rounded text-black font-bold",children:"Voco Hotel"}),t.jsxs("button",{type:"button",onClick:H,className:"flex items-center space-x-2 bg-green-600 text-white px-4 py-2 rounded",children:[t.jsx(d_,{}),t.jsx("span",{children:"Print"})]}),t.jsxs("div",{className:"space-y-4 w-full",children:[T.map((ue,he)=>t.jsxs("div",{className:"flex items-center justify-between space-x-2",children:[t.jsx("span",{className:"w-1/3",children:ue}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-xs",children:"Done"}),t.jsxs("label",{className:"inline-flex items-center cursor-pointer relative",children:[t.jsx("input",{type:"checkbox",className:"sr-only peer",checked:R[he]?.done||!1,onChange:()=>se(he,"done")}),t.jsx("div",{className:"w-12 h-6 bg-gray-300 peer-checked:bg-green-500 rounded-full transition duration-300"}),t.jsx("div",{className:"absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition-transform duration-300 peer-checked:translate-x-6"})]})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-xs",children:"Passed"}),t.jsxs("label",{className:"inline-flex items-center cursor-pointer relative",children:[t.jsx("input",{type:"checkbox",className:"sr-only peer",checked:R[he]?.passed||!1,onChange:()=>se(he,"passed")}),t.jsx("div",{className:"w-12 h-6 bg-gray-300 peer-checked:bg-green-500 rounded-full transition duration-300"}),t.jsx("div",{className:"absolute left-1 top-1 bg-white w-4 h-4 rounded-full transition-transform duration-300 peer-checked:translate-x-6"})]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>V(he),className:"text-white px-3 py-2 bg-green-600 rounded-md",children:t.jsx(uw,{size:18})}),t.jsx("button",{type:"button",onClick:()=>P(U[he]),className:"text-white px-3 py-2 bg-green-600 rounded-md",children:t.jsx(Kt,{size:16})}),t.jsx("input",{ref:fe.current[he],type:"file",className:"hidden",onChange:te=>ce(he,te)})]})]},he)),t.jsxs("div",{className:"flex justify-between space-x-4",children:[t.jsxs("div",{className:"w-1/2",children:[t.jsx("h5",{className:"font-semibold",children:"Status"}),t.jsxs("select",{name:"status",value:e.status||"",onChange:o,className:"w-full bg-green-200 text-black p-2 rounded",children:[t.jsx("option",{value:"Applied",children:"Applied"}),t.jsx("option",{value:"Approved",children:"Approved"}),t.jsx("option",{value:"Rejected",children:"Rejected"})]})]}),t.jsxs("div",{className:"w-1/2",children:[t.jsx("h5",{className:"font-semibold",children:"Receive Date"}),t.jsx("input",{name:"receiveDate",value:e.receiveDate||"",onChange:o,type:"date",className:"w-full p-2 bg-green-200 text-black rounded"})]})]}),A.map((ue,he)=>t.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-md",children:[t.jsx("h5",{className:"text-sm font-semibold text-gray-700",children:ue}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{type:"button",onClick:()=>ie(he),className:"text-white px-3 py-2 bg-green-600 rounded-md",children:t.jsx(uw,{size:18})}),t.jsx("button",{type:"button",onClick:()=>P(g[he]),className:"text-white px-3 py-2 bg-green-600 rounded-md",children:t.jsx(Kt,{size:16})}),t.jsx("button",{type:"button",onClick:()=>I(he),className:"text-white px-3 py-2 bg-red-500 rounded-md",children:"Remove"}),t.jsx("input",{ref:E.current[he],type:"file",className:"hidden",onChange:te=>K(he,te)})]})]},he)),t.jsxs("div",{className:"flex justify-center mt-4 gap-4",children:[t.jsx("button",{type:"submit",className:"flex items-center space-x-2 bg-blue-600 text-white px-6 py-2 rounded",children:"Save / Upload"}),t.jsx("button",{type:"button",onClick:()=>{a({}),C(A.map(()=>null)),m(null),h(Ro)},className:"flex items-center space-x-2 bg-gray-400 text-black px-6 py-2 rounded",children:"Reset"})]})]})]})]})]})]})]})},R_=()=>t.jsxs("div",{className:"flex min-h-screen bg-gray-100",children:[t.jsx("div",{className:"w-[25%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsx("div",{className:"flex-1 p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto p-8 bg-white text-black font-sans border border-gray-300",children:[t.jsx("div",{className:"flex justify-start mb-4",children:t.jsxs("p",{className:"font-bold",children:["DATE: ",t.jsx("span",{className:"font-bold",children:"10/06/2025"})]})}),t.jsx("h1",{className:"text-center font-bold underline mb-6",children:"CONTRACT LETTER"}),[{label:"FIRST PARTY",placeholder:" ة جᣎ ᡫ  للخدمات الᘘحᗫᖁة ᣃكة الشخص الواحد"},{label:"VISA No.",placeholder:"1304977335"},{label:"VISA ID",placeholder:"7001769202"}].map((e,a)=>t.jsxs("div",{className:"mb-3 flex items-center",children:[t.jsx("label",{className:"w-56",children:e.label}),t.jsx("input",{type:"text",placeholder:e.placeholder,className:"flex-1 border-none bg-transparent pl-10 text-black focus:outline-none placeholder-black"})]},a)),t.jsx("hr",{className:"border-black my-6"}),[{label:"SECOND PARTY NAME",placeholder:"WAJAHAT MALIK S/O MUNIR AHMED MALIK"},{label:"PASSPORT No",placeholder:"GW0767311"},{label:"TRADE",placeholder:"عامل تنظيف ع"},{label:"SALARY",placeholder:"1700 SR"}].map((e,a)=>t.jsxs("div",{className:"mb-3 flex items-center",children:[t.jsx("label",{className:"w-56",children:e.label}),t.jsx("input",{type:"text",placeholder:e.placeholder,className:"flex-1 border-none bg-transparent pl-10 font-bold text-black focus:outline-none placeholder-black"})]},a)),t.jsx("hr",{className:"border-black my-4"}),t.jsx("h2",{className:"font-bold mb-4 underline",children:"TERMS & CONDITIONS"}),t.jsxs("ol",{className:"list-decimal pl-6 space-y-4 text-justify",children:[t.jsx("li",{children:"CONTRACT IS FOR ONE YEAR. RECRUITED PERSONNEL WILL BE ON A PROBATION PERIOD OF 90 DAYS. CONFIRMATION WILL BE GRANTED UPON SUCCESSFUL COMPLETION OF THIS PERIOD."}),t.jsx("li",{children:"WORKING HOURS WILL BE 08 HOURS PER DAY AND 48 HOURS PER WEEK."}),t.jsx("li",{children:"FOOD WILL BE PROVIDED BY THE COMPANY."}),t.jsx("li",{children:"FREE ACCOMMODATION AND TRANSPORTATION WILL BE PROVIDED BY THE COMPANY."}),t.jsx("li",{children:"A FREE ROUND-TRIP TICKET WILL BE PROVIDED UPON COMPLETION OF ONE YEAR OF SERVICE."}),t.jsx("li",{children:"MEDICAL SERVICES WILL BE AVAILABLE FOR THE EMPLOYEE ONLY, AS PER PRIVATE SECTOR STANDARDS IN KSA."}),t.jsx("li",{children:"ALL OTHER BENEFITS WILL BE PROVIDED ACCORDING TO SAUDI LABOR LAW."})]}),t.jsx("p",{className:"mt-6 ml-6",children:"THANKING YOU"}),t.jsxs("div",{className:"flex justify-between mt-12",children:[t.jsxs("div",{className:"ml-12",children:[t.jsx("p",{className:"font-bold",children:"PROMOTER:"}),t.jsx("p",{className:"mt-4 font-bold",children:"QURESHI BROTHERS OEP"}),t.jsx("p",{className:"font-bold",children:"0696/RWP"})]}),t.jsxs("div",{className:"mr-12",children:[t.jsx("p",{className:"font-bold",children:"SECOND PARTY SIGN & THUMB"}),t.jsx("p",{className:"mt-4 font-bold",children:"WAJAHAT MALIK"}),t.jsx("div",{className:"border-t border-black w-48 mt-8"})]})]})]})})]}),P_=()=>t.jsxs("div",{className:"flex min-h-screen bg-white",children:[t.jsx("div",{className:"w-[25%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsx("div",{className:"flex-1 flex justify-center p-6",children:t.jsxs("div",{className:"w-[750px] min-h-[1250px] mx-auto p-10 bg-white text-black text-base leading-relaxed space-y-4 shadow-md",children:[t.jsxs("div",{className:"flex justify-between mb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"font-bold",children:"THE ROYAL CONSULATE"}),t.jsx("p",{className:"font-bold",children:"Kingdom of Saudi Arabia"}),t.jsx("p",{className:"font-bold",children:"ISLAMABAD"})]}),t.jsx("div",{className:"text-right",children:t.jsxs("label",{className:"font-semibold",children:["DATE:"," ",t.jsx("input",{type:"date",defaultValue:"2025-06-10",className:"outline-none"})]})})]}),t.jsxs("p",{className:"font-bold",children:["SUBJECT: ",t.jsx("span",{className:"font-bold underline",children:"UNDERTAKING"})]}),t.jsx("p",{children:"Dear Sir,"}),t.jsxs("p",{children:["We do hereby undertake"," ",t.jsx("input",{type:"text",placeholder:"WAJAHAT MALIK",className:"outline-none w-[135px] inline-block placeholder-black font-bold text-black"})," ","S/O"," ",t.jsx("input",{type:"text",placeholder:"MUNIR AHMED MALIK",className:"outline-none w-[180px] inline-block placeholder-black font-bold text-black"})," ","Passport No."," ",t.jsx("input",{type:"text",placeholder:"GW0767311",className:"outline-none w-[90px] inline-block placeholder-black font-bold text-blac"})," ","is proceeding to Saudi Arabia on visa No."," ",t.jsx("input",{type:"text",placeholder:"1304977335",className:"foutline-none w-[90px] inline-block placeholder-black font-bold text-blac"})," ","under sponsor ID"," ",t.jsx("input",{type:"text",placeholder:"7001769202",className:"outline-none w-[95px] inline-block placeholder-black font-bold text-black"}),". This candidate has no valid Saudi visa, if he is deported back from the Kingdom of Saudi Arabia, we should be held responsible for that."]}),t.jsx("p",{children:"IF there is any minor mistake in E- number “profession” due to Arabic-English Conversion by system, kindly issue visa as per profession mentioned on visa form. Both agency and candidate are absolutely agreed upon that."}),t.jsx("p",{className:"font-bold",children:": I Know and Agree All the Terms & Conditions in the Agreement."}),t.jsxs("table",{className:"w-full text-left border border-black",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-black",children:[t.jsx("th",{className:"p-2 border-r border-black",children:"Sr No."}),t.jsx("th",{className:"p-2 border-r border-black",children:"NAME"}),t.jsx("th",{className:"p-2 border-r border-black",children:"PASSPORT NUMBER"}),t.jsx("th",{className:"p-2",children:"E-NUMBER"})]})}),t.jsx("tbody",{children:t.jsxs("tr",{children:[t.jsx("td",{className:"p-2 border-r border-black font-bold",children:"01"}),t.jsx("td",{className:"p-2 border-r border-black font-bold",children:t.jsx("input",{type:"text",placeholder:"WAJAHAT MALIK",className:"outline-none  inline-block placeholder-black font-bold text-black"})}),t.jsx("td",{className:"p-2 border-r border-black font-bold",children:t.jsx("input",{type:"text",placeholder:"GW0767311",className:"font-bold placeholder-black text-black outline-none w-[110px] inline-block"})}),t.jsx("td",{className:"p-2 font-bold",children:t.jsx("input",{type:"text",placeholder:"E794009519",className:"font-bold placeholder-black text-black outline-none w-[120px] inline-block"})})]})})]}),t.jsxs("div",{className:"flex justify-between mt-10",children:[t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"font-bold",children:"TANWEER AHMED"}),t.jsx("p",{className:"font-bold",children:"QURESHI BROTHERS OEP"}),t.jsx("p",{className:"font-bold",children:"0696/RWP"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("input",{type:"text",placeholder:"WAJAHAT MALIK",className:"font-bold text-black outline-none w-[135px] inline-block text-center placeholder-black"}),t.jsx("div",{className:"mt-8 border-t border-black w-40 mx-auto"})]})]})]})})]}),M_=()=>t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%] bg-white border-r border-gray-300",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"w-[80%] overflow-x-auto",children:[t.jsxs("div",{className:"font-[times] p-6 max-w-4xl mx-auto border-b border-black text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("label",{className:"font-bold",children:"FORM NO."}),t.jsx("input",{type:"text",placeholder:"32-A",className:"outline-none border-none placeholder-black text-black"})]}),t.jsx("p",{children:"Challan of Cash paid into:"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"font-bold uppercase",children:"TREASURY/SUB-TREASURY"}),t.jsx("p",{className:"font-bold uppercase",children:"NATIONAL BANK OF PAKISTAN"}),t.jsx("p",{className:"font-bold uppercase",children:"STATE BANK OF PAKISTAN"})]})]}),t.jsx("div",{className:"mt-4 border border-black",children:t.jsxs("div",{className:"grid grid-cols-[25%_20%_15%_40%] divide-x divide-black",children:[t.jsxs("div",{className:"flex flex-col text-left border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"BY WHOM TENDER"}),t.jsxs("div",{className:"flex flex-col justify-start p-1 overflow-hidden text-sm leading-tight transform -rotate-90 break-words min-h-[200px]",children:[t.jsx("p",{className:"font-bold text-center",children:"Emigrant Name:"}),t.jsx("input",{type:"text",placeholder:"MR. IMTIAZ KHAN",className:"border-none outline-none placeholder-black mt-2 ml-3 text-black bg-transparent font-bold"}),t.jsxs("div",{className:"flex items-center gap-1 mt-1 ml-3",children:[t.jsx("p",{className:"font-bold",children:"P.PNo."}),t.jsx("input",{type:"text",placeholder:"Error",className:"border-none outline-none placeholder-black text-black bg-transparent"})]}),t.jsx("p",{className:"mt-2 font-bold ml-2 ",children:"MergeField was not found in header record of data source."}),t.jsx("p",{className:"font-semibold mt-2 ml-2 text-left",children:"Mr.QURESHI BROTHERS OEP LICENCE #:"}),t.jsx("input",{type:"text",placeholder:"",className:"border-none outline-none placeholder-black text-black bg-transparent"})]})]}),t.jsxs("div",{className:"flex flex-col text-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"TO BE FILLED BY REMITTER"}),t.jsxs("div",{className:"flex flex-1 min-h-24",children:[t.jsx("div",{className:"w-[65%] flex items-center justify-center text-center border-r border-black p-1 overflow-hidden",children:t.jsx("p",{className:"transform -rotate-90 break-words",children:"Director General, Bureau of Emigration and Overseas Employment"})}),t.jsx("div",{className:"w-[35%] flex items-center justify-center text-center p-1 overflow-hidden",children:t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:underline transform -rotate-90 break-words border-none outline-none bg-transparent"})})]})]}),t.jsxs("div",{className:"flex flex-col text-left justify-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"AMOUNT"}),t.jsxs("div",{className:"flex flex-col justify-center items-center overflow-hidden leading-tight transform -rotate-90 h-full w-full",children:[t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent text-center w-full"}),t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"text-lg font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent w-auto"}),t.jsx("div",{className:"border-b border-black flex-1"})]})]})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center px-2",children:"TO BE FILLED BY THE DEPARTMENT OFFICER OF THE TREASURY"}),t.jsxs("div",{className:"grid grid-cols-[55%_45%] flex-1 min-h-[200px]",children:[t.jsxs("div",{className:"flex flex-col justify-start p-1 mt-6 pl-3 transform -rotate-90 overflow-hidden text-xs leading-tight break-words",children:[t.jsx("p",{children:"Manpower Management"}),t.jsx("input",{type:"text",placeholder:"Coa 0139109-029-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"0000191",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee"}),t.jsx("input",{type:"text",placeholder:"Miscellaneous C02906-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"code 130",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee from Pakistan"}),t.jsx("p",{children:"working abroad"})]}),t.jsx("div",{className:"pl-2 border-l border-black flex items-start p-2 overflow-hidden text-xs",children:t.jsx("p",{className:"break-words",children:"Date Correct Received and Grant Receipt Signature and Full Designation of the Officer ordering the money to be paid in."})})]})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"p-2 font-bold border-l border-t border-r border-b border-black",children:[t.jsxs("span",{children:["Total Rs. ",t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]}),t.jsxs("p",{children:["in word Rs. ",t.jsx("input",{type:"text",placeholder:"(Five Hundred Rupees Only)",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]})]})]}),t.jsxs("div",{className:"mt-4 text-sm",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Signature:"}),t.jsx("span",{className:"border-b border-black w-48 inline-block"})]}),t.jsx("p",{className:"text-right w-[320px]",children:"To be used only in case of remittances to Bank through in Officer of Government. Treasury/Officer/Agent/Manager."})]}),t.jsxs("div",{className:"flex items-center mt-2",children:[t.jsx("span",{className:"mr-2",children:"Received Payment:-"}),t.jsx("span",{className:"border-b border-black w-48 inline-block mr-4"}),t.jsx("span",{className:"mr-2",children:"Date:"}),t.jsx("span",{className:"border-b border-black w-32 inline-block"})]})]})]}),t.jsxs("div",{className:"font-[times] p-6 max-w-4xl mx-auto border-b border-black text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("label",{className:"font-bold",children:"FORM NO."}),t.jsx("input",{type:"text",placeholder:"32-A",className:"outline-none border-none placeholder-black text-black"})]}),t.jsx("p",{children:"Challan of Cash paid into:"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"font-bold uppercase",children:"TREASURY/SUB-TREASURY"}),t.jsx("p",{className:"font-bold uppercase",children:"NATIONAL BANK OF PAKISTAN"}),t.jsx("p",{className:"font-bold uppercase",children:"STATE BANK OF PAKISTAN"})]})]}),t.jsx("div",{className:"mt-4 border border-black",children:t.jsxs("div",{className:"grid grid-cols-[25%_20%_15%_40%] divide-x divide-black",children:[t.jsxs("div",{className:"flex flex-col text-left border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"BY WHOM TENDER"}),t.jsxs("div",{className:"flex flex-col justify-start p-1 overflow-hidden text-sm leading-tight transform -rotate-90 break-words min-h-[200px]",children:[t.jsx("p",{className:"font-bold text-center",children:"Emigrant Name:"}),t.jsx("input",{type:"text",placeholder:"MR. IMTIAZ KHAN",className:"border-none outline-none placeholder-black mt-2 ml-3 text-black bg-transparent font-bold"}),t.jsxs("div",{className:"flex items-center gap-1 mt-1 ml-3",children:[t.jsx("p",{className:"font-bold",children:"P.PNo."}),t.jsx("input",{type:"text",placeholder:"Error",className:"border-none outline-none placeholder-black text-black bg-transparent"})]}),t.jsx("p",{className:"mt-2 font-bold ml-2 ",children:"MergeField was not found in header record of data source."}),t.jsx("p",{className:"font-semibold mt-2 ml-2 text-left",children:"Mr.QURESHI BROTHERS OEP LICENCE #:"}),t.jsx("input",{type:"text",placeholder:"",className:"border-none outline-none placeholder-black text-black bg-transparent"})]})]}),t.jsxs("div",{className:"flex flex-col text-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"TO BE FILLED BY REMITTER"}),t.jsxs("div",{className:"flex flex-1 min-h-24",children:[t.jsx("div",{className:"w-[65%] flex items-center justify-center text-center border-r border-black p-1 overflow-hidden",children:t.jsx("p",{className:"transform -rotate-90 break-words",children:"Director General, Bureau of Emigration and Overseas Employment"})}),t.jsx("div",{className:"w-[35%] flex items-center justify-center text-center p-1 overflow-hidden",children:t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:underline transform -rotate-90 break-words border-none outline-none bg-transparent"})})]})]}),t.jsxs("div",{className:"flex flex-col text-left justify-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"AMOUNT"}),t.jsxs("div",{className:"flex flex-col justify-center items-center overflow-hidden leading-tight transform -rotate-90 h-full w-full",children:[t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent text-center w-full"}),t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"text-lg font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent w-auto"}),t.jsx("div",{className:"border-b border-black flex-1"})]})]})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center px-2",children:"TO BE FILLED BY THE DEPARTMENT OFFICER OF THE TREASURY"}),t.jsxs("div",{className:"grid grid-cols-[55%_45%] flex-1 min-h-[200px]",children:[t.jsxs("div",{className:"flex flex-col justify-start p-1 mt-6 pl-3 transform -rotate-90 overflow-hidden text-xs leading-tight break-words",children:[t.jsx("p",{children:"Manpower Management"}),t.jsx("input",{type:"text",placeholder:"Coa 0139109-029-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"0000191",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee"}),t.jsx("input",{type:"text",placeholder:"Miscellaneous C02906-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"code 130",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee from Pakistan"}),t.jsx("p",{children:"working abroad"})]}),t.jsx("div",{className:"pl-2 border-l border-black flex items-start p-2 overflow-hidden text-xs",children:t.jsx("p",{className:"break-words",children:"Date Correct Received and Grant Receipt Signature and Full Designation of the Officer ordering the money to be paid in."})})]})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"p-2 font-bold border-l border-t border-r border-b border-black",children:[t.jsxs("span",{children:["Total Rs. ",t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]}),t.jsxs("p",{children:["in word Rs. ",t.jsx("input",{type:"text",placeholder:"(Five Hundred Rupees Only)",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]})]})]}),t.jsxs("div",{className:"mt-4 text-sm",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Signature:"}),t.jsx("span",{className:"border-b border-black w-48 inline-block"})]}),t.jsx("p",{className:"text-right w-[320px]",children:"To be used only in case of remittances to Bank through in Officer of Government. Treasury/Officer/Agent/Manager."})]}),t.jsxs("div",{className:"flex items-center mt-2",children:[t.jsx("span",{className:"mr-2",children:"Received Payment:-"}),t.jsx("span",{className:"border-b border-black w-48 inline-block mr-4"}),t.jsx("span",{className:"mr-2",children:"Date:"}),t.jsx("span",{className:"border-b border-black w-32 inline-block"})]})]})]}),t.jsxs("div",{className:"font-[times] p-6 max-w-4xl mx-auto text-sm",children:[t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("label",{className:"font-bold",children:"FORM NO."}),t.jsx("input",{type:"text",placeholder:"32-A",className:"outline-none border-none placeholder-black text-black"})]}),t.jsx("p",{children:"Challan of Cash paid into:"})]}),t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"font-bold uppercase",children:"TREASURY/SUB-TREASURY"}),t.jsx("p",{className:"font-bold uppercase",children:"NATIONAL BANK OF PAKISTAN"}),t.jsx("p",{className:"font-bold uppercase",children:"STATE BANK OF PAKISTAN"})]})]}),t.jsx("div",{className:"mt-4 border border-black",children:t.jsxs("div",{className:"grid grid-cols-[25%_20%_15%_40%] divide-x divide-black",children:[t.jsxs("div",{className:"flex flex-col text-left border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"BY WHOM TENDER"}),t.jsxs("div",{className:"flex flex-col justify-start p-1 overflow-hidden text-sm leading-tight transform -rotate-90 break-words min-h-[200px]",children:[t.jsx("p",{className:"font-bold text-center",children:"Emigrant Name:"}),t.jsx("input",{type:"text",placeholder:"MR. IMTIAZ KHAN",className:"border-none outline-none placeholder-black mt-2 ml-3 text-black bg-transparent font-bold"}),t.jsxs("div",{className:"flex items-center gap-1 mt-1 ml-3",children:[t.jsx("p",{className:"font-bold",children:"P.PNo."}),t.jsx("input",{type:"text",placeholder:"Error",className:"border-none outline-none placeholder-black text-black bg-transparent"})]}),t.jsx("p",{className:"mt-2 font-bold ml-2 ",children:"MergeField was not found in header record of data source."}),t.jsx("p",{className:"font-semibold mt-2 ml-2 text-left",children:"Mr.QURESHI BROTHERS OEP LICENCE #:"}),t.jsx("input",{type:"text",placeholder:"",className:"border-none outline-none placeholder-black text-black bg-transparent"})]})]}),t.jsxs("div",{className:"flex flex-col text-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"TO BE FILLED BY REMITTER"}),t.jsxs("div",{className:"flex flex-1 min-h-24",children:[t.jsx("div",{className:"w-[65%] flex items-center justify-center text-center border-r border-black p-1 overflow-hidden",children:t.jsx("p",{className:"transform -rotate-90 break-words",children:"Director General, Bureau of Emigration and Overseas Employment"})}),t.jsx("div",{className:"w-[35%] flex items-center justify-center text-center p-1 overflow-hidden",children:t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:underline transform -rotate-90 break-words border-none outline-none bg-transparent"})})]})]}),t.jsxs("div",{className:"flex flex-col text-left justify-start border-r border-black",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center",children:"AMOUNT"}),t.jsxs("div",{className:"flex flex-col justify-center items-center overflow-hidden leading-tight transform -rotate-90 h-full w-full",children:[t.jsx("input",{type:"text",placeholder:"REGISTRATION FEE",className:"font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent text-center w-full"}),t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"text-lg font-bold text-black placeholder-black placeholder:font-bold border-none outline-none bg-transparent w-auto"}),t.jsx("div",{className:"border-b border-black flex-1"})]})]})]}),t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"font-bold border-b border-black flex items-center justify-center h-16 text-center px-2",children:"TO BE FILLED BY THE DEPARTMENT OFFICER OF THE TREASURY"}),t.jsxs("div",{className:"grid grid-cols-[55%_45%] flex-1 min-h-[200px]",children:[t.jsxs("div",{className:"flex flex-col justify-start p-1 mt-6 pl-3 transform -rotate-90 overflow-hidden text-xs leading-tight break-words",children:[t.jsx("p",{children:"Manpower Management"}),t.jsx("input",{type:"text",placeholder:"Coa 0139109-029-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"0000191",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee"}),t.jsx("input",{type:"text",placeholder:"Miscellaneous C02906-",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("input",{type:"text",placeholder:"code 130",className:"border-none outline-none bg-transparent text-black placeholder-black"}),t.jsx("p",{children:"Registration fee from Pakistan"}),t.jsx("p",{children:"working abroad"})]}),t.jsx("div",{className:"pl-2 border-l border-black flex items-start p-2 overflow-hidden text-xs",children:t.jsx("p",{className:"break-words",children:"Date Correct Received and Grant Receipt Signature and Full Designation of the Officer ordering the money to be paid in."})})]})]})]})}),t.jsxs("div",{className:"grid grid-cols-2 text-[11px]",children:[t.jsxs("div",{className:"bg-white p-2 flex items-center",children:[t.jsx("span",{className:"font-bold mr-2"}),t.jsx("div",{className:"flex-1 h-[1.5rem] bg-white border-none"})]}),t.jsxs("div",{className:"p-2 font-bold border-l border-t border-r border-b border-black",children:[t.jsxs("span",{children:["Total Rs. ",t.jsx("input",{type:"text",placeholder:"Rs: 500/-",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]}),t.jsxs("p",{children:["in word Rs. ",t.jsx("input",{type:"text",placeholder:"(Five Hundred Rupees Only)",className:"border-none outline-none bg-transparent text-black placeholder-black placeholder:font-bold"})]})]})]}),t.jsxs("div",{className:"mt-4 text-sm",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Signature:"}),t.jsx("span",{className:"border-b border-black w-48 inline-block"})]}),t.jsx("p",{className:"text-right w-[320px]",children:"To be used only in case of remittances to Bank through in Officer of Government. Treasury/Officer/Agent/Manager."})]}),t.jsxs("div",{className:"flex items-center mt-2",children:[t.jsx("span",{className:"mr-2",children:"Received Payment:-"}),t.jsx("span",{className:"border-b border-black w-48 inline-block mr-4"}),t.jsx("span",{className:"mr-2",children:"Date:"}),t.jsx("span",{className:"border-b border-black w-32 inline-block"})]})]})]})]})]}),__="/assets/logo-CozoLrY8.png",z_=()=>t.jsxs("div",{className:"flex min-h-screen bg-gray-50",children:[t.jsx("div",{className:"hidden md:block w-[25%] bg-white border-r border-gray-200",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"flex-1 bg-white p-4 md:p-6 overflow-auto",children:[t.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between pb-2",children:[t.jsxs("div",{className:"w-40 h-40 border border-green-500 flex flex-col items-center justify-center text-xs text-gray-500 md:mb-0 leading-snug text-center relative",children:[t.jsx("p",{className:"text-sm text-gray-600 mb-1",children:"صورة"}),t.jsx("p",{children:"Paste Photo Here"}),t.jsx("button",{className:"absolute -bottom-3 right-0 text-white px-2 py-1 bg-green-600 rounded-md",children:t.jsx(Kt,{size:14})})]}),t.jsx("div",{className:"flex justify-center",children:t.jsx("img",{src:__,alt:"Saudi Logo",className:"w-40 h-40 object-contain"})}),t.jsxs("div",{className:"text-center md:text-right md:mt-0 md:mr-12",children:[t.jsx("p",{className:"text-green-500 border-b border-green-500 py-2 mb-4",children:"سفارة المملكة العربية السعودية"}),t.jsx("h3",{className:"text-green-500 text-sm md:text-base",children:"EMBASSY OF SAUDI ARABIA"}),t.jsx("p",{className:"text-green-500 text-xs md:text-sm",children:"CONSULAR SECTION"})]})]}),t.jsxs("div",{className:"border border-green-700 text-xs md:text-sm",children:[t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsx("div",{className:"w-[20%] font-semibold p-2",children:"FULL NAME"}),t.jsx("p",{className:"flex items-center justify-center flex-grow px-6 py-1",children:t.jsx("input",{type:"text",placeholder:"WAJAHAT MALIK S/O MUNIR AHMED MALIK",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[20%] p-2 text-right pr-4",children:":الاسم الكامل"})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex py-2 border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-[20%] font-semibold px-2",children:"DATEOFBIRTH:"}),t.jsx("div",{className:"flex-grow px-4",children:t.jsx("input",{type:"text",placeholder:"05-06-1990 (45) YEARS",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[20%] text-right pr-4",children:":تاريخ الولادة"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-[20%] font-semibold px-2",children:"PLACEOFBIRTH:"}),t.jsx("div",{className:"flex-grow px-4",children:t.jsx("input",{type:"text",placeholder:"RAWALPINDI, PAK",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[20%] text-right pr-4",children:":محل الولادة"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-[20%] font-semibold p-2",children:"PREVIOUSNATIONALITY:"}),t.jsx("div",{className:"flex items-center justify-center flex-grow px-4 py-1",children:t.jsx("input",{type:"text",placeholder:"PAKISTAN",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[25%] p-2 text-right pr-4 whitespace-nowrap",dir:"rtl",children:"الجنسية السابقة:"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-[20%] font-semibold p-2",children:"PRESENTNATIONALITY:"}),t.jsx("div",{className:"flex items-center justify-center flex-grow px-4 py-1",children:t.jsx("input",{type:"text",placeholder:"PAKISTAN",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-[25%] p-2 text-right pr-4 whitespace-nowrap",dir:"rtl",children:"الجنسية الحالية:"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"grid grid-cols-4 border-r border-green-700 text-center",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 font-semibold flex flex-col justify-center",children:[t.jsx("span",{className:"text-sm"}),t.jsx("span",{children:"GENDER"})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex flex-col justify-center",children:[t.jsx("span",{className:"text-sm",children:"أنثى"}),t.jsx("span",{children:"FEMALE"})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex flex-col justify-center",children:[t.jsx("span",{className:"text-sm",children:"ذكر"}),t.jsx("span",{children:"MALE"})]}),t.jsx("div",{className:"p-2 flex flex-col justify-center",children:t.jsx("span",{className:"text-sm",children:":جنس"})})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"MARITALSTATUS"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",placeholder:"MARRIED",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsxs("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:["الحالة الاجتماعية:"," "]})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"SECT:"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",placeholder:"SUNNI",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"المذهب:"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"RELIGION"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",placeholder:"ISLAM",className:"bg-transparent outline-none placeholder-black text-center w-full"})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"الديانة:"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"QUALIFICATION:"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-center w-full"})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"الموهل العلمي:"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"PROFESSION"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("input",{type:"text",defaultValue:"عامل تصنيع",className:"bg-transparent outline-none text-center w-full"})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"المهنة:"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700 items-center",children:[t.jsx("div",{className:"w-1/4 font-semibold p-2",children:"HOME ADDRESS & PHONE:"}),t.jsx("div",{className:"flex-grow p-2",children:t.jsx("textarea",{placeholder:`House No. P/138, Street No. 1, MHALLAH IMAMBARHA, Rawalpindi
0300-1234567`,className:"bg-transparent outline-none text-center w-full resize-none placeholder-black",rows:2})}),t.jsx("div",{className:"w-1/4 p-2 text-right whitespace-nowrap",dir:"rtl",children:"عنوان المنزل ورقم التلفون:"})]}),t.jsxs("div",{className:"flex border-b border-green-700 items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"BUSINESS ADDRESS & PHONE:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("textarea",{placeholder:"",className:"bg-transparent outline-none text-center w-full resize-none placeholder-black",rows:2})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"عنوان محل العمل ورقم التلفون:"})]}),t.jsx("div",{className:"border-b border-green-700 p-2",children:t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"whitespace-nowrap mr-2",children:"Purpose of Travel:"}),t.jsx("div",{className:"grid grid-cols-7 gap-0 flex-1",children:[{en:"WORK",ar:"عمل"},{en:"TRANSIT",ar:"ترانمرور"},{en:"VISIT",ar:"زيارة"},{en:"UMRAH",ar:"عمرة"},{en:"RESIDENCE",ar:"إقامة"},{en:"HAJJ",ar:"حج"},{en:"DIPLOMACY",ar:"دبلوماسية"}].map((e,a)=>t.jsxs("div",{className:"border border-green-700 p-2 flex flex-col justify-center text-center",children:[t.jsx("span",{className:"text-xs",children:e.ar}),t.jsx("span",{children:e.en})]},a))}),t.jsx("span",{className:"whitespace-nowrap ml-2",children:":غرض السفر"})]})}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"DATE OF ISSUE:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"12/09/2022",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"تاريخ الإصدار:"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"PASSPORT NO:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"GW123456789",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"رقم جوازالسفر:"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"DATE OF EXPIRY:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"24/05/2028",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsxs("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:["تاريخ الإنتھاء:"," "]})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"PLACE OF ISSUE:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"PAKISTAN",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"محل الإصدار:"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"flex border-r border-green-700 items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"DATE OF ARRIVAL:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsxs("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:["تاريخ الوصول:"," "]})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"w-1/3 font-semibold p-2",children:"DATE OF DEPARTURE:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"تاريخ المغادرة:"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700 items-center",children:[t.jsx("div",{className:"w-2/3 font-semibold p-2",children:"DURATION OF STAY IN THE KINGDOM:"}),t.jsx("div",{className:"w-1/3 p-2",children:t.jsx("input",{type:"text",placeholder:"2 YEARS",className:"bg-transparent outline-none text-center w-full placeholder-black"})}),t.jsx("div",{className:"w-1/3 p-2 text-right whitespace-nowrap",dir:"rtl",children:"مدة الإقامة بالمملكة:"})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-6 border-b border-green-700 text-right",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":تاريخ"}),t.jsx("div",{className:"font-semibold",children:"DATE"})]})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsx("button",{className:"text-white px-2 py-1 bg-green-600 rounded-md",children:t.jsx(Kt,{size:14})})]}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":ايصال رقم"}),t.jsx("div",{className:"font-semibold",children:"SLIP NO"})]})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":بیشيك رقم"}),t.jsx("div",{className:"font-semibold",children:"CHEQUE NO"})]})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":نقدا"}),t.jsx("div",{className:"font-semibold",children:"CASH"})]})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none text-left w-1/2 placeholder-black"}),t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":مجاملة"}),t.jsx("div",{className:"font-semibold",children:"FREE"})]})]}),t.jsx("div",{className:"border-green-700 p-2 flex items-center justify-between",children:t.jsxs("div",{className:"flex flex-col items-end",children:[t.jsx("div",{className:"text-sm",children:":طريق الدفع"}),t.jsx("div",{className:"font-semibold",children:"MODE OF PAYMENT"})]})})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("div",{className:"flex flex-col items-start",children:t.jsx("span",{className:"font-semibold",children:"RELATIONSHIP:"})}),t.jsx("input",{type:"text",className:"bg-transparent outline-none  w-40 text-center",placeholder:""}),t.jsx("div",{className:"flex flex-col items-end",children:t.jsx("span",{className:"text-sm",children:":صلة"})})]}),t.jsx("div",{className:"p-2 text-right",children:t.jsx("div",{className:"text-sm",children:":اسم المحرم"})})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"font-semibold",children:"DESTINATION:"}),t.jsx("input",{type:"text",placeholder:"AL RIYADH, KYC",className:"bg-transparent outline-none placeholder-black px-1 py-[2px] text-sm"})]}),t.jsx("div",{className:"flex flex-col items-end",children:t.jsx("span",{className:"text-sm",children:":جهة الوصول"})})]}),t.jsxs("div",{className:"p-2 flex justify-between items-center",children:[t.jsx("div",{className:"font-semibold",children:"CARRIER'S NAME:"}),t.jsx("div",{className:"flex flex-col items-end",children:t.jsx("span",{className:"text-sm",children:":اسم الشركة الناقلة"})})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 border-b border-green-700",children:[t.jsx("div",{className:"border-r border-green-700 p-2 flex items-center justify-start",children:t.jsx("span",{className:"font-semibold",children:"DEPENDENTS TRAVELING IN THE SAME PASSPORT"})}),t.jsx("div",{className:"p-2 flex items-center justify-start",children:t.jsx("span",{className:"text-sm",children:"إيضاحات تخص أفراد العائلة (المضافين) علي نفس جوازالسفر"})})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 border-b border-green-700",children:[t.jsxs("div",{className:"border-r border-green-700 p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"RELATIONSHIP"}),t.jsx("span",{className:"text-sm",children:"نوع الصلة"})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"DATE OF BIRTH"}),t.jsx("span",{className:"text-sm",children:"تاريخ الولادة"})]}),t.jsxs("div",{className:"border-r border-green-700 p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"SEX"}),t.jsx("span",{className:"text-sm",children:"الجنس"})]}),t.jsxs("div",{className:"p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"FULL NAME"}),t.jsx("span",{className:"text-sm",children:"الاسم الكامل"})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 border-b border-green-700",children:[t.jsx("div",{className:"border-r border-green-700 ",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none  px-1 ",placeholder:""})}),t.jsx("div",{className:"border-r border-green-700 ",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none px-2 ",placeholder:""})}),t.jsx("div",{className:"border-r border-green-700 ",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none  px-2 ",placeholder:""})}),t.jsx("div",{className:"p-3",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none  px-2",placeholder:""})})]}),t.jsxs("div",{className:"border-b border-green-700 p-2 flex justify-between items-center",children:[t.jsx("span",{className:"font-semibold",children:"Name and Address of Company/Individual in the Kingdom"}),t.jsx("span",{className:"text-right font-semibold",children:"شركة جنى للخدمات البحرية شركة الشخص الواحد"})]}),t.jsx("div",{className:"p-3 border-b border-green-700",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none ",placeholder:""})}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsx("div",{className:"w-2/3 p-2",children:t.jsx("span",{className:"text-sm font-medium",children:"The undersigned hereby clarify that all the information I have provided are correct. I'll abide by the laws of the Kingdom during the period of my residence in it."})}),t.jsx("div",{className:"w-1/3 p-2 text-sm font-medium text-right",children:"ناالموقع ادناه اقربان كل المعلومات اللتي دونتها صحيصة وساكون ملتزمابقوانين المملكة اثناء فترة وجودي بها"})]}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsxs("div",{className:"w-1/3 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none px-2 py-1 w-24"}),t.jsx("button",{className:"text-white px-2 py-1 bg-green-600 rounded-md",children:t.jsx(Kt,{size:14})})]}),t.jsxs("div",{className:"flex flex-col text-right text-sm",children:[t.jsx("div",{children:":التاريخ"}),t.jsx("div",{className:"font-medium",children:"Date:"})]})]}),t.jsxs("div",{className:"w-1/3 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none px-2 py-1 w-24"}),t.jsxs("div",{className:"flex flex-col text-right text-sm",children:[t.jsx("div",{children:":التوقيع"}),t.jsx("div",{className:"font-medium",children:"Signature:"})]})]}),t.jsxs("div",{className:"w-1/3 p-2 flex items-center justify-between",children:[t.jsx("input",{type:"text",placeholder:"Wajahat Malik",className:"bg-transparent outline-none placeholder-black px-2 py-1 w-40 text-right"}),t.jsxs("div",{className:"flex flex-col text-right text-sm",children:[t.jsx("div",{children:":الإسم"}),t.jsx("div",{className:"font-medium",children:"Name:"})]})]})]}),t.jsx("div",{className:"bg-gray-400 border-b border-green-700 bg-gray-100 p-2",children:t.jsxs("div",{className:"flex flex-col items-center",children:["للإستعمال الرسمي فقط",t.jsx("div",{className:"text-sm"}),t.jsx("div",{className:"text-sm font-medium",children:"For Office Use Only"})]})}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsxs("div",{className:"w-1/2 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("div",{className:"text-sm font-medium",children:"Date"}),t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none px-2 py-1 w-40 mx-2"}),t.jsx("div",{className:"text-sm",children:":تاريخه"})]}),t.jsxs("div",{className:"w-1/2 p-2 flex items-center justify-between",children:[t.jsx("div",{className:"text-sm font-medium",children:"Authorization"}),t.jsx("input",{type:"text",placeholder:"",className:"bg-transparent outline-none px-2 py-1 w-40 mx-2"}),t.jsx("div",{className:"text-sm",children:":رقم الامر المعتمد عليه في اعطاء التاشيرة"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsx("div",{className:"w-1/6 border-r border-green-700 p-2 flex flex-col items-start",children:t.jsx("div",{className:"text-sm font-medium",children:"Visit/Work For"})}),t.jsx("div",{className:"w-4/6 border-r border-green-700 p-2 flex items-center",children:t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none px-2 py-1",placeholder:""})}),t.jsx("div",{className:"w-1/6 p-2 flex flex-col items-start",children:t.jsx("div",{className:"text-sm",children:":لزيارة - العمل لدي"})})]}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsxs("div",{className:"w-1/2 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Date:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":وتاريخ"})]}),t.jsxs("div",{className:"w-1/2 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Visa Number:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":شرله برقم"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700",children:[t.jsxs("div",{className:"w-1/3 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Fee Collected:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":المبلغ المحصل"})]}),t.jsxs("div",{className:"w-1/3 border-r border-green-700 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Type:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":نوعها"})]}),t.jsxs("div",{className:"w-1/3 p-2 flex items-center justify-between",children:[t.jsx("span",{className:"text-sm font-medium",children:"Duration:"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none text-center w-1/3",placeholder:"",style:{border:"none"}}),t.jsx("span",{className:"text-sm",children:":مدتها"})]})]}),t.jsxs("div",{className:"flex border-b border-green-700 h-20",children:[t.jsxs("div",{className:"w-1/2 border-r border-green-700 flex flex-col items-center justify-center",children:[t.jsx("span",{className:"text-sm",children:"رئيس القسم القنصلي"}),t.jsx("span",{className:"text-sm font-medium",children:"Head of Consular Section"})]}),t.jsxs("div",{className:"w-1/2 flex flex-col items-center justify-center",children:[t.jsx("span",{className:"text-sm",children:"مدقق البيانات"}),t.jsx("span",{className:"text-sm font-medium",children:"Checked By"})]})]})]})]})]}),L_="/assets/Banklogo-DzcKreOP.png",B_=()=>t.jsx("div",{children:t.jsxs("div",{className:"flex min-h-screen",children:[t.jsx("div",{className:"w-[20%] border-r border-gray-300",children:t.jsx(Rr,{})}),t.jsxs("div",{className:"w-[80%] p-8 m-2 text-sm border border-black",children:[t.jsxs("div",{className:"flex justify-between items-center border-black pb-4 mb-6",children:[t.jsx("img",{src:L_,alt:"logo",className:"w-24 h-20 object-contain"}),t.jsxs("div",{className:"text-center flex-1 -ml-24",children:[t.jsx("h2",{className:"text-lg font-bold uppercase",children:"Request for Issuance of Form-7"}),t.jsx("p",{className:"text-xs",children:"(Under Emigration Rules-1979)"})]}),t.jsx("div",{className:"text-right",children:t.jsxs("p",{children:["Date:"," ",t.jsx("input",{type:"text",className:"border-b border-black px-4 bg-transparent outline-none w-28",placeholder:"1-1-2025"})]})})]}),t.jsx("p",{className:"mb-6 ml-16 font-[times]",children:"I/We request for issuance of form-7 (under Emigration Rules 1979) as per appended details:"}),t.jsxs("div",{className:"mb-6 font-[times]",children:[t.jsx("div",{className:"px-3 py-1 font-bold",children:"A. Depositor Details"}),t.jsxs("div",{className:"grid grid-cols-2 gap-0 border border-black",children:[t.jsxs("div",{className:"grid grid-cols-2 border-b border-r border-black",children:[t.jsx("p",{className:"border-r border-black text-center px-2 py-1",children:"Name"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 py-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border-b border-black",children:[t.jsx("p",{className:"border-r border-black text-center px-2 py-1",children:"S/O"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 py-1"})]}),t.jsxs("div",{className:"grid grid-cols-2 border-r border-black",children:[t.jsx("p",{className:"border-r border-black text-center px-2 py-1",children:"Contact Number"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 py-1"})]}),t.jsxs("div",{className:"grid grid-cols-2",children:[t.jsx("p",{className:"border-r border-black text-center px-2 py-1",children:"ID Number*"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 py-1"})]})]})]}),t.jsx("div",{className:"px-3 py-1 font-normal font-[times]",children:"B. Intending Emigrant(s) Details (List attached for more than one Intending Emigrant)"}),t.jsxs("div",{className:"grid grid-cols-4 border border-black mb-6 font-[times]",children:[t.jsx("p",{className:"border-r border-b border-black flex items-center justify-center px-2 py-1",children:"Name"}),t.jsx("input",{type:"text",className:"border-r border-b border-black bg-transparent outline-none px-2 py-1"}),t.jsx("p",{className:"border-r border-b border-black flex items-center justify-center px-2 py-1",children:"S/O"}),t.jsx("input",{type:"text",className:"border-b border-black bg-transparent outline-none px-2 py-1"}),t.jsx("p",{className:"border-r border-b border-black flex items-center justify-center px-2 py-1",children:"Contact Number"}),t.jsx("input",{type:"text",className:"border-r border-b border-black bg-transparent outline-none px-2 py-1"}),t.jsx("p",{className:"border-r border-b border-black flex items-center justify-center px-2 py-1",children:"ID Number*"}),t.jsx("input",{type:"text",className:"border-b border-black bg-transparent outline-none px-2 py-1"}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1"}),t.jsx("input",{type:"text",className:"col-span-3 bg-transparent outline-none px-2 py-1 w-full",style:{borderBottom:"1px solid black"}}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1 row-span-2",children:"Address"}),t.jsx("input",{type:"text",className:"border-r border-black bg-transparent outline-none px-2 py-1 row-span-2"}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1",children:"Passport Number"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none px-2 py-1"})]}),t.jsxs("div",{className:"mb-6 grid-row-3 font-[times]",children:[t.jsx("div",{className:"px-3 grid grid-cols-2 py-1 font-semibold",children:"B. Overseas Employment Promoter (O.E.P) Details"}),t.jsx("div",{className:"font-[times] p-1",children:t.jsxs("div",{className:"grid border border-black",children:[t.jsxs("div",{className:"grid grid-cols-2",children:[t.jsx("p",{className:"border-r border-black text-left px-2 font-normal flex items-center h-[28px] leading-none",children:"Name"}),t.jsx("input",{type:"text",className:"w-full bg-transparent outline-none text-center px-2 h-[28px] leading-none"})]}),t.jsxs("div",{className:"grid grid-cols-4 border-t border-black",children:[t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1"}),t.jsx("input",{type:"text",className:"col-span-3 bg-transparent outline-none px-2 w-full border-b border-black flex items-center py-1"}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1 row-span-2",children:"Address"}),t.jsx("input",{type:"text",className:"border-r border-black bg-transparent outline-none px-2 row-span-2 flex items-center py-1"}),t.jsx("p",{className:"border-r border-black flex items-center justify-center px-2 py-1",children:"O.E.P License Number"}),t.jsx("input",{type:"text",className:"bg-transparent outline-none px-2 flex items-center py-1"})]})]})})]}),t.jsxs("div",{className:"mb-6 font-[times]",children:[t.jsx("div",{className:" px-3 py-1 font-semibold ",children:"D. Deposit Details"}),t.jsxs("div",{className:"p-3 px-10 space-y-4 font-[times]",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 border border-black"}),t.jsx("span",{className:"w-20 font-bold",children:"Account #"}),t.jsxs("div",{className:"flex items-center gap-1",children:[[...Array(4)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`acc-${a}`)),t.jsx("div",{className:"w-3 h-6 flex items-center justify-center",children:"-"}),[...Array(4)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`acc-${a+4}`)),t.jsx("div",{className:"w-3 h-6 flex items-center justify-center",children:"-"}),[...Array(4)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`acc-${a+8}`)),t.jsx("div",{className:"w-3 h-6 flex items-center justify-center",children:"-"}),[...Array(4)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`acc-${a+12}`))]}),t.jsx("span",{className:"w-20 ml-8 font-bold",children:"Cheque #"}),t.jsxs("div",{className:"flex items-center gap-1",children:[[...Array(5)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`cheque-${a}`)),t.jsx("div",{className:"w-3 h-6 flex items-center justify-center",children:"-"}),[...Array(3)].map((e,a)=>t.jsx("input",{type:"text",maxLength:1,className:"w-6 h-6 border border-black text-center outline-none"},`cheque-${a+5}`))]})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-8 h-8 border border-black"}),t.jsx("label",{className:"select-none font-bold",children:"Cash"})]}),t.jsxs("div",{className:"flex items-center gap-4 pt-4",children:[t.jsx("p",{className:"font-bold font-sans",children:"Amount in Figures"}),t.jsx("p",{className:"text-base font-sans",children:"6000/-"})]}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("p",{className:"font-bold font-sans",children:"Amount in Words"}),t.jsx("p",{className:"text-base font-sans",children:"SIX THOUSAND ONLY"})]})]}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-sans mt-4",children:"I/We Understand that this deposit is governed by Emigration Rules-1979 and refund against form-7 shall only be made to the depositor."}),t.jsx("p",{className:"text-sm font-sans mt-4",children:"All Claims against any Form-7 will only be processed after endorsement by the concerned Protector of Emigrants, Bureau of Emigration & Overseas Employment. (BE&OE), Ministry of Overseas Pakistanis & Human Resource Development, Government of Pakistan."})]}),t.jsxs("div",{className:"mt-12 font-sans",children:[t.jsxs("div",{className:"text-sm mb-8 px-20",children:[t.jsx("p",{className:"border-t border-black w-48 text-center",children:"(Signature of the Depositors)"}),t.jsx("p",{children:"* Cop(ies) of CNIC/SNIC/NICOP is mandatory"})]}),t.jsxs("div",{className:" pt-2",children:[t.jsx("p",{className:"font-bold text-center border p-1 border-black",children:"FOR BANK USE ONLY"}),t.jsx("div",{className:"grid grid-cols-1 mt-6 font-sans",children:t.jsxs("div",{className:"px-20",children:[t.jsx("p",{children:"Form-7 Issued from Serial No. _________________________ to serial No. _________________________"}),t.jsx("p",{className:"mt-3",children:"Total Form Issued _________________________"})]})})]})]})]}),t.jsxs("div",{className:"flex justify-center space-x-60 pr-8 mt-6 font-sans",children:[t.jsx("div",{className:"text-center",children:t.jsx("p",{className:" font-bold w-40",children:"Authorized Signatures"})}),t.jsx("div",{className:"text-center",children:t.jsx("p",{className:"font-bold w-40",children:"Authorized Signatures"})})]})]})]})});function U3(e){var a,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(a=0;a<i;a++)e[a]&&(r=U3(e[a]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function gt(){for(var e,a,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(a=U3(e))&&(n&&(n+=" "),n+=a);return n}var I_=["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 qb(e){if(typeof e!="string")return!1;var a=I_;return a.includes(e)}var F_=["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 $3(e){if(typeof e!="string")return!1;var a=F_;return a.includes(e)}function q3(e){return typeof e=="string"&&e.startsWith("data-")}function Sn(e){var a=Object.entries(e).filter(r=>{var[n]=r;return $3(n)||q3(n)});return Object.fromEntries(a)}function Hb(e){if(e==null)return null;if(b.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var a=e.props;return Sn(a)}return typeof e=="object"&&!Array.isArray(e)?Sn(e):null}function hr(e){var a=Object.entries(e).filter(r=>{var[n]=r;return $3(n)||q3(n)||qb(n)});return Object.fromEntries(a)}var U_=["children","width","height","viewBox","className","style","title","desc"];function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bg.apply(null,arguments)}function $_(e,a){if(e==null)return{};var r,n,i=q_(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function q_(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var H3=b.forwardRef((e,a)=>{var{children:r,width:n,height:i,viewBox:o,className:c,style:m,title:u,desc:h}=e,p=$_(e,U_),x=o||{width:n,height:i,x:0,y:0},j=gt("recharts-surface",c);return b.createElement("svg",Bg({},hr(p),{className:j,width:n,height:i,style:m,viewBox:"".concat(x.x," ").concat(x.y," ").concat(x.width," ").concat(x.height),ref:a}),b.createElement("title",null,u),b.createElement("desc",null,h),r)}),H_=["children","className"];function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ig.apply(null,arguments)}function V_(e,a){if(e==null)return{};var r,n,i=Y_(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Y_(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var xs=b.forwardRef((e,a)=>{var{children:r,className:n}=e,i=V_(e,H_),o=gt("recharts-layer",n);return b.createElement("g",Ig({className:o},hr(i),{ref:a}),r)}),K_=b.createContext(null);function ut(e){return function(){return e}}const V3=Math.cos,Iu=Math.sin,Pr=Math.sqrt,Fu=Math.PI,_m=2*Fu,Fg=Math.PI,Ug=2*Fg,Hs=1e-6,G_=Ug-Hs;function Y3(e){this._+=e[0];for(let a=1,r=e.length;a<r;++a)this._+=arguments[a]+e[a]}function J_(e){let a=Math.floor(e);if(!(a>=0))throw new Error(`invalid digits: ${e}`);if(a>15)return Y3;const r=10**a;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class W_{constructor(a){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=a==null?Y3:J_(a)}moveTo(a,r){this._append`M${this._x0=this._x1=+a},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(a,r){this._append`L${this._x1=+a},${this._y1=+r}`}quadraticCurveTo(a,r,n,i){this._append`Q${+a},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(a,r,n,i,o,c){this._append`C${+a},${+r},${+n},${+i},${this._x1=+o},${this._y1=+c}`}arcTo(a,r,n,i,o){if(a=+a,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let c=this._x1,m=this._y1,u=n-a,h=i-r,p=c-a,x=m-r,j=p*p+x*x;if(this._x1===null)this._append`M${this._x1=a},${this._y1=r}`;else if(j>Hs)if(!(Math.abs(x*u-h*p)>Hs)||!o)this._append`L${this._x1=a},${this._y1=r}`;else{let v=n-c,w=i-m,S=u*u+h*h,A=v*v+w*w,g=Math.sqrt(S),C=Math.sqrt(j),E=o*Math.tan((Fg-Math.acos((S+j-A)/(2*g*C)))/2),O=E/C,D=E/g;Math.abs(O-1)>Hs&&this._append`L${a+O*p},${r+O*x}`,this._append`A${o},${o},0,0,${+(x*v>p*w)},${this._x1=a+D*u},${this._y1=r+D*h}`}}arc(a,r,n,i,o,c){if(a=+a,r=+r,n=+n,c=!!c,n<0)throw new Error(`negative radius: ${n}`);let m=n*Math.cos(i),u=n*Math.sin(i),h=a+m,p=r+u,x=1^c,j=c?i-o:o-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Hs||Math.abs(this._y1-p)>Hs)&&this._append`L${h},${p}`,n&&(j<0&&(j=j%Ug+Ug),j>G_?this._append`A${n},${n},0,1,${x},${a-m},${r-u}A${n},${n},0,1,${x},${this._x1=h},${this._y1=p}`:j>Hs&&this._append`A${n},${n},0,${+(j>=Fg)},${x},${this._x1=a+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(a,r,n,i){this._append`M${this._x0=this._x1=+a},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Vb(e){let a=3;return e.digits=function(r){if(!arguments.length)return a;if(r==null)a=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);a=n}return e},()=>new W_(a)}function Yb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function K3(e){this._context=e}K3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,a){switch(e=+e,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,a):this._context.moveTo(e,a);break;case 1:this._point=2;default:this._context.lineTo(e,a);break}}};function zm(e){return new K3(e)}function G3(e){return e[0]}function J3(e){return e[1]}function W3(e,a){var r=ut(!0),n=null,i=zm,o=null,c=Vb(m);e=typeof e=="function"?e:e===void 0?G3:ut(e),a=typeof a=="function"?a:a===void 0?J3:ut(a);function m(u){var h,p=(u=Yb(u)).length,x,j=!1,v;for(n==null&&(o=i(v=c())),h=0;h<=p;++h)!(h<p&&r(x=u[h],h,u))===j&&((j=!j)?o.lineStart():o.lineEnd()),j&&o.point(+e(x,h,u),+a(x,h,u));if(v)return o=null,v+""||null}return m.x=function(u){return arguments.length?(e=typeof u=="function"?u:ut(+u),m):e},m.y=function(u){return arguments.length?(a=typeof u=="function"?u:ut(+u),m):a},m.defined=function(u){return arguments.length?(r=typeof u=="function"?u:ut(!!u),m):r},m.curve=function(u){return arguments.length?(i=u,n!=null&&(o=i(n)),m):i},m.context=function(u){return arguments.length?(u==null?n=o=null:o=i(n=u),m):n},m}function eu(e,a,r){var n=null,i=ut(!0),o=null,c=zm,m=null,u=Vb(h);e=typeof e=="function"?e:e===void 0?G3:ut(+e),a=typeof a=="function"?a:ut(a===void 0?0:+a),r=typeof r=="function"?r:r===void 0?J3:ut(+r);function h(x){var j,v,w,S=(x=Yb(x)).length,A,g=!1,C,E=new Array(S),O=new Array(S);for(o==null&&(m=c(C=u())),j=0;j<=S;++j){if(!(j<S&&i(A=x[j],j,x))===g)if(g=!g)v=j,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),w=j-1;w>=v;--w)m.point(E[w],O[w]);m.lineEnd(),m.areaEnd()}g&&(E[j]=+e(A,j,x),O[j]=+a(A,j,x),m.point(n?+n(A,j,x):E[j],r?+r(A,j,x):O[j]))}if(C)return m=null,C+""||null}function p(){return W3().defined(i).curve(c).context(o)}return h.x=function(x){return arguments.length?(e=typeof x=="function"?x:ut(+x),n=null,h):e},h.x0=function(x){return arguments.length?(e=typeof x=="function"?x:ut(+x),h):e},h.x1=function(x){return arguments.length?(n=x==null?null:typeof x=="function"?x:ut(+x),h):n},h.y=function(x){return arguments.length?(a=typeof x=="function"?x:ut(+x),r=null,h):a},h.y0=function(x){return arguments.length?(a=typeof x=="function"?x:ut(+x),h):a},h.y1=function(x){return arguments.length?(r=x==null?null:typeof x=="function"?x:ut(+x),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(a)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(a)},h.defined=function(x){return arguments.length?(i=typeof x=="function"?x:ut(!!x),h):i},h.curve=function(x){return arguments.length?(c=x,o!=null&&(m=c(o)),h):c},h.context=function(x){return arguments.length?(x==null?o=m=null:m=c(o=x),h):o},h}class Q3{constructor(a,r){this._context=a,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(a,r){switch(a=+a,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(a,r):this._context.moveTo(a,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+a)/2,this._y0,this._x0,r,a,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,a,this._y0,a,r);break}}this._x0=a,this._y0=r}}function Q_(e){return new Q3(e,!0)}function X_(e){return new Q3(e,!1)}const Kb={draw(e,a){const r=Pr(a/Fu);e.moveTo(r,0),e.arc(0,0,r,0,_m)}},Z_={draw(e,a){const r=Pr(a/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},X3=Pr(1/3),e8=X3*2,t8={draw(e,a){const r=Pr(a/e8),n=r*X3;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},a8={draw(e,a){const r=Pr(a),n=-r/2;e.rect(n,n,r,r)}},r8=.8908130915292852,Z3=Iu(Fu/10)/Iu(7*Fu/10),n8=Iu(_m/10)*Z3,s8=-V3(_m/10)*Z3,l8={draw(e,a){const r=Pr(a*r8),n=n8*r,i=s8*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const c=_m*o/5,m=V3(c),u=Iu(c);e.lineTo(u*r,-m*r),e.lineTo(m*n-u*i,u*n+m*i)}e.closePath()}},Kh=Pr(3),i8={draw(e,a){const r=-Pr(a/(Kh*3));e.moveTo(0,r*2),e.lineTo(-Kh*r,-r),e.lineTo(Kh*r,-r),e.closePath()}},cr=-.5,dr=Pr(3)/2,$g=1/Pr(12),o8=($g/2+1)*3,c8={draw(e,a){const r=Pr(a/o8),n=r/2,i=r*$g,o=n,c=r*$g+r,m=-o,u=c;e.moveTo(n,i),e.lineTo(o,c),e.lineTo(m,u),e.lineTo(cr*n-dr*i,dr*n+cr*i),e.lineTo(cr*o-dr*c,dr*o+cr*c),e.lineTo(cr*m-dr*u,dr*m+cr*u),e.lineTo(cr*n+dr*i,cr*i-dr*n),e.lineTo(cr*o+dr*c,cr*c-dr*o),e.lineTo(cr*m+dr*u,cr*u-dr*m),e.closePath()}};function d8(e,a){let r=null,n=Vb(i);e=typeof e=="function"?e:ut(e||Kb),a=typeof a=="function"?a:ut(a===void 0?64:+a);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+a.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ut(o),i):e},i.size=function(o){return arguments.length?(a=typeof o=="function"?o:ut(+o),i):a},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function Uu(){}function $u(e,a,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+a)/6,(e._y0+4*e._y1+r)/6)}function e4(e){this._context=e}e4.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:$u(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,a){switch(e=+e,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,a):this._context.moveTo(e,a);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:$u(this,e,a);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=a}};function u8(e){return new e4(e)}function t4(e){this._context=e}t4.prototype={areaStart:Uu,areaEnd:Uu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,a){switch(e=+e,a=+a,this._point){case 0:this._point=1,this._x2=e,this._y2=a;break;case 1:this._point=2,this._x3=e,this._y3=a;break;case 2:this._point=3,this._x4=e,this._y4=a,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+a)/6);break;default:$u(this,e,a);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=a}};function m8(e){return new t4(e)}function a4(e){this._context=e}a4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,a){switch(e=+e,a=+a,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+a)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:$u(this,e,a);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=a}};function f8(e){return new a4(e)}function r4(e){this._context=e}r4.prototype={areaStart:Uu,areaEnd:Uu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,a){e=+e,a=+a,this._point?this._context.lineTo(e,a):(this._point=1,this._context.moveTo(e,a))}};function p8(e){return new r4(e)}function xw(e){return e<0?-1:1}function gw(e,a,r){var n=e._x1-e._x0,i=a-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),c=(r-e._y1)/(i||n<0&&-0),m=(o*i+c*n)/(n+i);return(xw(o)+xw(c))*Math.min(Math.abs(o),Math.abs(c),.5*Math.abs(m))||0}function bw(e,a){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-a)/2:a}function Gh(e,a,r){var n=e._x0,i=e._y0,o=e._x1,c=e._y1,m=(o-n)/3;e._context.bezierCurveTo(n+m,i+m*a,o-m,c-m*r,o,c)}function qu(e){this._context=e}qu.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:Gh(this,this._t0,bw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,a){var r=NaN;if(e=+e,a=+a,!(e===this._x1&&a===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,a):this._context.moveTo(e,a);break;case 1:this._point=2;break;case 2:this._point=3,Gh(this,bw(this,r=gw(this,e,a)),r);break;default:Gh(this,this._t0,r=gw(this,e,a));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=a,this._t0=r}}};function n4(e){this._context=new s4(e)}(n4.prototype=Object.create(qu.prototype)).point=function(e,a){qu.prototype.point.call(this,a,e)};function s4(e){this._context=e}s4.prototype={moveTo:function(e,a){this._context.moveTo(a,e)},closePath:function(){this._context.closePath()},lineTo:function(e,a){this._context.lineTo(a,e)},bezierCurveTo:function(e,a,r,n,i,o){this._context.bezierCurveTo(a,e,n,r,o,i)}};function h8(e){return new qu(e)}function x8(e){return new n4(e)}function l4(e){this._context=e}l4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,a=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],a[0]):this._context.moveTo(e[0],a[0]),r===2)this._context.lineTo(e[1],a[1]);else for(var n=yw(e),i=yw(a),o=0,c=1;c<r;++o,++c)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[c],a[c]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,a){this._x.push(+e),this._y.push(+a)}};function yw(e){var a,r=e.length-1,n,i=new Array(r),o=new Array(r),c=new Array(r);for(i[0]=0,o[0]=2,c[0]=e[0]+2*e[1],a=1;a<r-1;++a)i[a]=1,o[a]=4,c[a]=4*e[a]+2*e[a+1];for(i[r-1]=2,o[r-1]=7,c[r-1]=8*e[r-1]+e[r],a=1;a<r;++a)n=i[a]/o[a-1],o[a]-=n,c[a]-=n*c[a-1];for(i[r-1]=c[r-1]/o[r-1],a=r-2;a>=0;--a)i[a]=(c[a]-i[a+1])/o[a];for(o[r-1]=(e[r]+i[r-1])/2,a=0;a<r-1;++a)o[a]=2*e[a+1]-i[a+1];return[i,o]}function g8(e){return new l4(e)}function Lm(e,a){this._context=e,this._t=a}Lm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,a){switch(e=+e,a=+a,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,a):this._context.moveTo(e,a);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,a),this._context.lineTo(e,a);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,a)}break}}this._x=e,this._y=a}};function b8(e){return new Lm(e,.5)}function y8(e){return new Lm(e,0)}function v8(e){return new Lm(e,1)}function ni(e,a){if((c=e.length)>1)for(var r=1,n,i,o=e[a[0]],c,m=o.length;r<c;++r)for(i=o,o=e[a[r]],n=0;n<m;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function qg(e){for(var a=e.length,r=new Array(a);--a>=0;)r[a]=a;return r}function j8(e,a){return e[a]}function N8(e){const a=[];return a.key=e,a}function w8(){var e=ut([]),a=qg,r=ni,n=j8;function i(o){var c=Array.from(e.apply(this,arguments),N8),m,u=c.length,h=-1,p;for(const x of o)for(m=0,++h;m<u;++m)(c[m][h]=[0,+n(x,c[m].key,h,o)]).data=x;for(m=0,p=Yb(a(c));m<u;++m)c[p[m]].index=m;return r(c,p),c}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ut(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:ut(+o),i):n},i.order=function(o){return arguments.length?(a=o==null?qg:typeof o=="function"?o:ut(Array.from(o)),i):a},i.offset=function(o){return arguments.length?(r=o??ni,i):r},i}function A8(e,a){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,c;i<o;++i){for(c=r=0;r<n;++r)c+=e[r][i][1]||0;if(c)for(r=0;r<n;++r)e[r][i][1]/=c}ni(e,a)}}function S8(e,a){if((i=e.length)>0){for(var r=0,n=e[a[0]],i,o=n.length;r<o;++r){for(var c=0,m=0;c<i;++c)m+=e[c][r][1]||0;n[r][1]+=n[r][0]=-m/2}ni(e,a)}}function C8(e,a){if(!(!((c=e.length)>0)||!((o=(i=e[a[0]]).length)>0))){for(var r=0,n=1,i,o,c;n<o;++n){for(var m=0,u=0,h=0;m<c;++m){for(var p=e[a[m]],x=p[n][1]||0,j=p[n-1][1]||0,v=(x-j)/2,w=0;w<m;++w){var S=e[a[w]],A=S[n][1]||0,g=S[n-1][1]||0;v+=A-g}u+=x,h+=v*x}i[n-1][1]+=i[n-1][0]=r,u&&(r-=h/u)}i[n-1][1]+=i[n-1][0]=r,ni(e,a)}}var Jh={},Wh={},vw;function E8(){return vw||(vw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r==="__proto__"}e.isUnsafeProperty=a})(Wh)),Wh}var Qh={},jw;function i4(){return jw||(jw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=a})(Qh)),Qh}var Xh={},Nw;function Gb(){return Nw||(Nw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=a})(Xh)),Xh}var Zh={},ex={},ww;function k8(){return ww||(ww=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(a).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=a})(ex)),ex}var Aw;function Jb(){return Aw||(Aw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=k8(),r=Gb();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=a.toString(i);const o=[],c=i.length;if(c===0)return o;let m=0,u="",h="",p=!1;for(i.charCodeAt(0)===46&&(o.push(""),m++);m<c;){const x=i[m];h?x==="\\"&&m+1<c?(m++,u+=i[m]):x===h?h="":u+=x:p?x==='"'||x==="'"?h=x:x==="]"?(p=!1,o.push(u),u=""):u+=x:x==="["?(p=!0,u&&(o.push(u),u="")):x==="."?u&&(o.push(u),u=""):u+=x,m++}return u&&o.push(u),o}e.toPath=n})(Zh)),Zh}var Sw;function Wb(){return Sw||(Sw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=E8(),r=i4(),n=Gb(),i=Jb();function o(m,u,h){if(m==null)return h;switch(typeof u){case"string":{if(a.isUnsafeProperty(u))return h;const p=m[u];return p===void 0?r.isDeepKey(u)?o(m,i.toPath(u),h):h:p}case"number":case"symbol":{typeof u=="number"&&(u=n.toKey(u));const p=m[u];return p===void 0?h:p}default:{if(Array.isArray(u))return c(m,u,h);if(Object.is(u?.valueOf(),-0)?u="-0":u=String(u),a.isUnsafeProperty(u))return h;const p=m[u];return p===void 0?h:p}}}function c(m,u,h){if(u.length===0)return h;let p=m;for(let x=0;x<u.length;x++){if(p==null||a.isUnsafeProperty(u[x]))return h;p=p[u[x]]}return p===void 0?h:p}e.get=o})(Jh)),Jh}var tx,Cw;function O8(){return Cw||(Cw=1,tx=Wb().get),tx}var D8=O8();const si=Or(D8);var Ra=e=>e===0?0:e>0?1:-1,xr=e=>typeof e=="number"&&e!=+e,Cn=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,De=e=>(typeof e=="number"||e instanceof Number)&&!xr(e),Hr=e=>De(e)||typeof e=="string",T8=0,Zo=e=>{var a=++T8;return"".concat(e||"").concat(a)},kr=function(a,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!De(a)&&typeof a!="string")return n;var o;if(Cn(a)){if(r==null)return n;var c=a.indexOf("%");o=r*parseFloat(a.slice(0,c))/100}else o=+a;return xr(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},o4=e=>{if(!Array.isArray(e))return!1;for(var a=e.length,r={},n=0;n<a;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function ga(e,a,r){return De(e)&&De(a)?e+r*(a-e):a}function R8(e,a,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof a=="function"?a(n):si(n,a))===r)}var Gt=e=>e===null||typeof e>"u",gc=e=>Gt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),P8=["type","size","sizeType"];function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hg.apply(null,arguments)}function Ew(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kw(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?Ew(Object(r),!0).forEach(function(n){M8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ew(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function M8(e,a,r){return(a=_8(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function _8(e){var a=z8(e,"string");return typeof a=="symbol"?a:a+""}function z8(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function L8(e,a){if(e==null)return{};var r,n,i=B8(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function B8(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var c4={symbolCircle:Kb,symbolCross:Z_,symbolDiamond:t8,symbolSquare:a8,symbolStar:l8,symbolTriangle:i8,symbolWye:c8},I8=Math.PI/180,F8=e=>{var a="symbol".concat(gc(e));return c4[a]||Kb},U8=(e,a,r)=>{if(a==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*I8;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},$8=(e,a)=>{c4["symbol".concat(gc(e))]=a},d4=e=>{var{type:a="circle",size:r=64,sizeType:n="area"}=e,i=L8(e,P8),o=kw(kw({},i),{},{type:a,size:r,sizeType:n}),c="circle";typeof a=="string"&&(c=a);var m=()=>{var j=F8(c),v=d8().type(j).size(U8(r,n,c)),w=v();if(w!==null)return w},{className:u,cx:h,cy:p}=o,x=hr(o);return h===+h&&p===+p&&r===+r?b.createElement("path",Hg({},x,{className:gt("recharts-symbols",u),transform:"translate(".concat(h,", ").concat(p,")"),d:m()})):null};d4.registerSymbol=$8;var q8=(e,a)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(b.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{qb(i)&&(n[i]=(o=>r[i](r,o)))}),n},H8=(e,a,r)=>n=>(e(a,r,n),null),Qb=(e,a,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];qb(i)&&typeof o=="function"&&(n||(n={}),n[i]=H8(o,a,r))}),n},ax={},rx={},Ow;function V8(){return Ow||(Ow=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r,n){const i=new Map;for(let o=0;o<r.length;o++){const c=r[o],m=n(c);i.has(m)||i.set(m,c)}return Array.from(i.values())}e.uniqBy=a})(rx)),rx}var nx={},Dw;function u4(){return Dw||(Dw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r}e.identity=a})(nx)),nx}var sx={},lx={},ix={},Tw;function Y8(){return Tw||(Tw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=a})(ix)),ix}var Rw;function Xb(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=Y8();function r(n){return n!=null&&typeof n!="function"&&a.isLength(n.length)}e.isArrayLike=r})(lx)),lx}var ox={},Pw;function K8(){return Pw||(Pw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return typeof r=="object"&&r!==null}e.isObjectLike=a})(ox)),ox}var Mw;function G8(){return Mw||(Mw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=Xb(),r=K8();function n(i){return r.isObjectLike(i)&&a.isArrayLike(i)}e.isArrayLikeObject=n})(sx)),sx}var cx={},dx={},_w;function J8(){return _w||(_w=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=Wb();function r(n){return function(i){return a.get(i,n)}}e.property=r})(dx)),dx}var ux={},mx={},fx={},px={},zw;function m4(){return zw||(zw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=a})(px)),px}var hx={},Lw;function f4(){return Lw||(Lw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=a})(hx)),hx}var xx={},Bw;function p4(){return Bw||(Bw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=a})(xx)),xx}var Iw;function W8(){return Iw||(Iw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=m4(),r=f4(),n=p4();function i(p,x,j){return typeof j!="function"?i(p,x,()=>{}):o(p,x,function v(w,S,A,g,C,E){const O=j(w,S,A,g,C,E);return O!==void 0?!!O:o(w,S,v,E)},new Map)}function o(p,x,j,v){if(x===p)return!0;switch(typeof x){case"object":return c(p,x,j,v);case"function":return Object.keys(x).length>0?o(p,{...x},j,v):n.eq(p,x);default:return a.isObject(p)?typeof x=="string"?x==="":!0:n.eq(p,x)}}function c(p,x,j,v){if(x==null)return!0;if(Array.isArray(x))return u(p,x,j,v);if(x instanceof Map)return m(p,x,j,v);if(x instanceof Set)return h(p,x,j,v);const w=Object.keys(x);if(p==null)return w.length===0;if(w.length===0)return!0;if(v?.has(x))return v.get(x)===p;v?.set(x,p);try{for(let S=0;S<w.length;S++){const A=w[S];if(!r.isPrimitive(p)&&!(A in p)||x[A]===void 0&&p[A]!==void 0||x[A]===null&&p[A]!==null||!j(p[A],x[A],A,p,x,v))return!1}return!0}finally{v?.delete(x)}}function m(p,x,j,v){if(x.size===0)return!0;if(!(p instanceof Map))return!1;for(const[w,S]of x.entries()){const A=p.get(w);if(j(A,S,w,p,x,v)===!1)return!1}return!0}function u(p,x,j,v){if(x.length===0)return!0;if(!Array.isArray(p))return!1;const w=new Set;for(let S=0;S<x.length;S++){const A=x[S];let g=!1;for(let C=0;C<p.length;C++){if(w.has(C))continue;const E=p[C];let O=!1;if(j(E,A,S,p,x,v)&&(O=!0),O){w.add(C),g=!0;break}}if(!g)return!1}return!0}function h(p,x,j,v){return x.size===0?!0:p instanceof Set?u([...p],[...x],j,v):!1}e.isMatchWith=i,e.isSetMatch=h})(fx)),fx}var Fw;function h4(){return Fw||(Fw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=W8();function r(n,i){return a.isMatchWith(n,i,()=>{})}e.isMatch=r})(mx)),mx}var gx={},bx={},yx={},Uw;function Q8(){return Uw||(Uw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=a})(yx)),yx}var vx={},$w;function x4(){return $w||($w=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=a})(vx)),vx}var jx={},qw;function g4(){return qw||(qw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",o="[object Arguments]",c="[object Symbol]",m="[object Date]",u="[object Map]",h="[object Set]",p="[object Array]",x="[object Function]",j="[object ArrayBuffer]",v="[object Object]",w="[object Error]",S="[object DataView]",A="[object Uint8Array]",g="[object Uint8ClampedArray]",C="[object Uint16Array]",E="[object Uint32Array]",O="[object BigUint64Array]",D="[object Int8Array]",B="[object Int16Array]",L="[object Int32Array]",T="[object BigInt64Array]",R="[object Float32Array]",z="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=j,e.arrayTag=p,e.bigInt64ArrayTag=T,e.bigUint64ArrayTag=O,e.booleanTag=i,e.dataViewTag=S,e.dateTag=m,e.errorTag=w,e.float32ArrayTag=R,e.float64ArrayTag=z,e.functionTag=x,e.int16ArrayTag=B,e.int32ArrayTag=L,e.int8ArrayTag=D,e.mapTag=u,e.numberTag=n,e.objectTag=v,e.regexpTag=a,e.setTag=h,e.stringTag=r,e.symbolTag=c,e.uint16ArrayTag=C,e.uint32ArrayTag=E,e.uint8ArrayTag=A,e.uint8ClampedArrayTag=g})(jx)),jx}var Nx={},Hw;function X8(){return Hw||(Hw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=a})(Nx)),Nx}var Vw;function b4(){return Vw||(Vw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=Q8(),r=x4(),n=g4(),i=f4(),o=X8();function c(p,x){return m(p,void 0,p,new Map,x)}function m(p,x,j,v=new Map,w=void 0){const S=w?.(p,x,j,v);if(S!==void 0)return S;if(i.isPrimitive(p))return p;if(v.has(p))return v.get(p);if(Array.isArray(p)){const A=new Array(p.length);v.set(p,A);for(let g=0;g<p.length;g++)A[g]=m(p[g],g,j,v,w);return Object.hasOwn(p,"index")&&(A.index=p.index),Object.hasOwn(p,"input")&&(A.input=p.input),A}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const A=new RegExp(p.source,p.flags);return A.lastIndex=p.lastIndex,A}if(p instanceof Map){const A=new Map;v.set(p,A);for(const[g,C]of p)A.set(g,m(C,g,j,v,w));return A}if(p instanceof Set){const A=new Set;v.set(p,A);for(const g of p)A.add(m(g,void 0,j,v,w));return A}if(typeof Buffer<"u"&&Buffer.isBuffer(p))return p.subarray();if(o.isTypedArray(p)){const A=new(Object.getPrototypeOf(p)).constructor(p.length);v.set(p,A);for(let g=0;g<p.length;g++)A[g]=m(p[g],g,j,v,w);return A}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const A=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return v.set(p,A),u(A,p,j,v,w),A}if(typeof File<"u"&&p instanceof File){const A=new File([p],p.name,{type:p.type});return v.set(p,A),u(A,p,j,v,w),A}if(typeof Blob<"u"&&p instanceof Blob){const A=new Blob([p],{type:p.type});return v.set(p,A),u(A,p,j,v,w),A}if(p instanceof Error){const A=new p.constructor;return v.set(p,A),A.message=p.message,A.name=p.name,A.stack=p.stack,A.cause=p.cause,u(A,p,j,v,w),A}if(p instanceof Boolean){const A=new Boolean(p.valueOf());return v.set(p,A),u(A,p,j,v,w),A}if(p instanceof Number){const A=new Number(p.valueOf());return v.set(p,A),u(A,p,j,v,w),A}if(p instanceof String){const A=new String(p.valueOf());return v.set(p,A),u(A,p,j,v,w),A}if(typeof p=="object"&&h(p)){const A=Object.create(Object.getPrototypeOf(p));return v.set(p,A),u(A,p,j,v,w),A}return p}function u(p,x,j=p,v,w){const S=[...Object.keys(x),...a.getSymbols(x)];for(let A=0;A<S.length;A++){const g=S[A],C=Object.getOwnPropertyDescriptor(p,g);(C==null||C.writable)&&(p[g]=m(x[g],g,j,v,w))}}function h(p){switch(r.getTag(p)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=c,e.cloneDeepWithImpl=m,e.copyProperties=u})(bx)),bx}var Yw;function Z8(){return Yw||(Yw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=b4();function r(n){return a.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(gx)),gx}var Kw;function ez(){return Kw||(Kw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=h4(),r=Z8();function n(i){return i=r.cloneDeep(i),o=>a.isMatch(o,i)}e.matches=n})(ux)),ux}var wx={},Ax={},Sx={},Gw;function tz(){return Gw||(Gw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=b4(),r=g4();function n(i,o){return a.cloneDeepWith(i,(c,m,u,h)=>{const p=o?.(c,m,u,h);if(p!==void 0)return p;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const x=new i.constructor(i?.valueOf());return a.copyProperties(x,i),x}case r.argumentsTag:{const x={};return a.copyProperties(x,i),x.length=i.length,x[Symbol.iterator]=i[Symbol.iterator],x}default:return}})}e.cloneDeepWith=n})(Sx)),Sx}var Jw;function az(){return Jw||(Jw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=tz();function r(n){return a.cloneDeepWith(n)}e.cloneDeep=r})(Ax)),Ax}var Cx={},Ex={},Ww;function y4(){return Ww||(Ww=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return a.test(n)}}e.isIndex=r})(Ex)),Ex}var kx={},Qw;function rz(){return Qw||(Qw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=x4();function r(n){return n!==null&&typeof n=="object"&&a.getTag(n)==="[object Arguments]"}e.isArguments=r})(kx)),kx}var Xw;function nz(){return Xw||(Xw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=i4(),r=y4(),n=rz(),i=Jb();function o(c,m){let u;if(Array.isArray(m)?u=m:typeof m=="string"&&a.isDeepKey(m)&&c?.[m]==null?u=i.toPath(m):u=[m],u.length===0)return!1;let h=c;for(let p=0;p<u.length;p++){const x=u[p];if((h==null||!Object.hasOwn(h,x))&&!((Array.isArray(h)||n.isArguments(h))&&r.isIndex(x)&&x<h.length))return!1;h=h[x]}return!0}e.has=o})(Cx)),Cx}var Zw;function sz(){return Zw||(Zw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=h4(),r=Gb(),n=az(),i=Wb(),o=nz();function c(m,u){switch(typeof m){case"object":{Object.is(m?.valueOf(),-0)&&(m="-0");break}case"number":{m=r.toKey(m);break}}return u=n.cloneDeep(u),function(h){const p=i.get(h,m);return p===void 0?o.has(h,m):u===void 0?p===void 0:a.isMatch(p,u)}}e.matchesProperty=c})(wx)),wx}var e1;function lz(){return e1||(e1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=u4(),r=J8(),n=ez(),i=sz();function o(c){if(c==null)return a.identity;switch(typeof c){case"function":return c;case"object":return Array.isArray(c)&&c.length===2?i.matchesProperty(c[0],c[1]):n.matches(c);case"string":case"symbol":case"number":return r.property(c)}}e.iteratee=o})(cx)),cx}var t1;function iz(){return t1||(t1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=V8(),r=u4(),n=G8(),i=lz();function o(c,m=r.identity){return n.isArrayLikeObject(c)?a.uniqBy(Array.from(c),i.iteratee(m)):[]}e.uniqBy=o})(ax)),ax}var Ox,a1;function oz(){return a1||(a1=1,Ox=iz().uniqBy),Ox}var cz=oz();const r1=Or(cz);function dz(e,a,r){return a===!0?r1(e,r):typeof a=="function"?r1(e,a):e}var Dx={exports:{}},Tx={},Rx={exports:{}},Px={};/**
 * @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 n1;function uz(){if(n1)return Px;n1=1;var e=hi();function a(x,j){return x===j&&(x!==0||1/x===1/j)||x!==x&&j!==j}var r=typeof Object.is=="function"?Object.is:a,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,c=e.useDebugValue;function m(x,j){var v=j(),w=n({inst:{value:v,getSnapshot:j}}),S=w[0].inst,A=w[1];return o(function(){S.value=v,S.getSnapshot=j,u(S)&&A({inst:S})},[x,v,j]),i(function(){return u(S)&&A({inst:S}),x(function(){u(S)&&A({inst:S})})},[x]),c(v),v}function u(x){var j=x.getSnapshot;x=x.value;try{var v=j();return!r(x,v)}catch{return!0}}function h(x,j){return j()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:m;return Px.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Px}var s1;function mz(){return s1||(s1=1,Rx.exports=uz()),Rx.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 l1;function fz(){if(l1)return Tx;l1=1;var e=hi(),a=mz();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=a.useSyncExternalStore,o=e.useRef,c=e.useEffect,m=e.useMemo,u=e.useDebugValue;return Tx.useSyncExternalStoreWithSelector=function(h,p,x,j,v){var w=o(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=m(function(){function g(B){if(!C){if(C=!0,E=B,B=j(B),v!==void 0&&S.hasValue){var L=S.value;if(v(L,B))return O=L}return O=B}if(L=O,n(E,B))return L;var T=j(B);return v!==void 0&&v(L,T)?(E=B,L):(E=B,O=T)}var C=!1,E,O,D=x===void 0?null:x;return[function(){return g(p())},D===null?void 0:function(){return g(D())}]},[p,x,j,v]);var A=i(h,w[0],w[1]);return c(function(){S.hasValue=!0,S.value=A},[A]),u(A),A},Tx}var i1;function pz(){return i1||(i1=1,Dx.exports=fz()),Dx.exports}var hz=pz(),Zb=b.createContext(null),xz=e=>e,zt=()=>{var e=b.useContext(Zb);return e?e.store.dispatch:xz},Au=()=>{},gz=()=>Au,bz=(e,a)=>e===a;function Te(e){var a=b.useContext(Zb);return hz.useSyncExternalStoreWithSelector(a?a.subscription.addNestedSub:gz,a?a.store.getState:Au,a?a.store.getState:Au,a?e:Au,bz)}var Mx={},_x={},zx={},o1;function yz(){return o1||(o1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,o)=>{if(n!==i){const c=a(n),m=a(i);if(c===m&&c===0){if(n<i)return o==="desc"?1:-1;if(n>i)return o==="desc"?-1:1}return o==="desc"?m-c:c-m}return 0};e.compareValues=r})(zx)),zx}var Lx={},Bx={},c1;function v4(){return c1||(c1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=a})(Bx)),Bx}var d1;function vz(){return d1||(d1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=v4(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,c){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||a.isSymbol(o)?!0:typeof o=="string"&&(n.test(o)||!r.test(o))||c!=null&&Object.hasOwn(c,o)}e.isKey=i})(Lx)),Lx}var u1;function jz(){return u1||(u1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=yz(),r=vz(),n=Jb();function i(o,c,m,u){if(o==null)return[];m=u?void 0:m,Array.isArray(o)||(o=Object.values(o)),Array.isArray(c)||(c=c==null?[null]:[c]),c.length===0&&(c=[null]),Array.isArray(m)||(m=m==null?[]:[m]),m=m.map(v=>String(v));const h=(v,w)=>{let S=v;for(let A=0;A<w.length&&S!=null;++A)S=S[w[A]];return S},p=(v,w)=>w==null||v==null?w:typeof v=="object"&&"key"in v?Object.hasOwn(w,v.key)?w[v.key]:h(w,v.path):typeof v=="function"?v(w):Array.isArray(v)?h(w,v):typeof w=="object"?w[v]:w,x=c.map(v=>(Array.isArray(v)&&v.length===1&&(v=v[0]),v==null||typeof v=="function"||Array.isArray(v)||r.isKey(v)?v:{key:v,path:n.toPath(v)}));return o.map(v=>({original:v,criteria:x.map(w=>p(w,v))})).slice().sort((v,w)=>{for(let S=0;S<x.length;S++){const A=a.compareValues(v.criteria[S],w.criteria[S],m[S]);if(A!==0)return A}return 0}).map(v=>v.original)}e.orderBy=i})(_x)),_x}var Ix={},m1;function Nz(){return m1||(m1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r,n=1){const i=[],o=Math.floor(n),c=(m,u)=>{for(let h=0;h<m.length;h++){const p=m[h];Array.isArray(p)&&u<o?c(p,u+1):i.push(p)}};return c(r,0),i}e.flatten=a})(Ix)),Ix}var Fx={},f1;function j4(){return f1||(f1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=y4(),r=Xb(),n=m4(),i=p4();function o(c,m,u){return n.isObject(u)&&(typeof m=="number"&&r.isArrayLike(u)&&a.isIndex(m)&&m<u.length||typeof m=="string"&&m in u)?i.eq(u[m],c):!1}e.isIterateeCall=o})(Fx)),Fx}var p1;function wz(){return p1||(p1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=jz(),r=Nz(),n=j4();function i(o,...c){const m=c.length;return m>1&&n.isIterateeCall(o,c[0],c[1])?c=[]:m>2&&n.isIterateeCall(c[0],c[1],c[2])&&(c=[c[0]]),a.orderBy(o,r.flatten(c),["asc"])}e.sortBy=i})(Mx)),Mx}var Ux,h1;function Az(){return h1||(h1=1,Ux=wz().sortBy),Ux}var Sz=Az();const Bm=Or(Sz);var N4=e=>e.legend.settings,Cz=e=>e.legend.size,Ez=e=>e.legend.payload;le([Ez,N4],(e,a)=>{var{itemSorter:r}=a,n=e.flat(1);return r?Bm(n,r):n});var tu=1;function kz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[a,r]=b.useState({height:0,left:0,top:0,width:0}),n=b.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),c={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(c.height-a.height)>tu||Math.abs(c.left-a.left)>tu||Math.abs(c.top-a.top)>tu||Math.abs(c.width-a.width)>tu)&&r({height:c.height,left:c.left,top:c.top,width:c.width})}},[a.width,a.height,a.top,a.left,...e]);return[a,n]}var Oz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},w4=za({name:"chartLayout",initialState:Oz,reducers:{setLayout(e,a){e.layoutType=a.payload},setChartSize(e,a){e.width=a.payload.width,e.height=a.payload.height},setMargin(e,a){var r,n,i,o;e.margin.top=(r=a.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=a.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=a.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=a.payload.left)!==null&&o!==void 0?o:0},setScale(e,a){e.scale=a.payload}}}),{setMargin:Dz,setLayout:Tz,setChartSize:Rz,setScale:Pz}=w4.actions,Mz=w4.reducer;function x1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function g1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?x1(Object(r),!0).forEach(function(n){_z(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _z(e,a,r){return(a=zz(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function zz(e){var a=Lz(e,"string");return typeof a=="symbol"?a:a+""}function Lz(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var Hu=Math.PI/180,Bz=e=>e*180/Math.PI,oa=(e,a,r,n)=>({x:e+Math.cos(-Hu*n)*r,y:a+Math.sin(-Hu*n)*r}),Iz=function(a,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(a-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},Fz=(e,a)=>{var{x:r,y:n}=e,{x:i,y:o}=a;return Math.sqrt((r-i)**2+(n-o)**2)},Uz=(e,a)=>{var{x:r,y:n}=e,{cx:i,cy:o}=a,c=Fz({x:r,y:n},{x:i,y:o});if(c<=0)return{radius:c,angle:0};var m=(r-i)/c,u=Math.acos(m);return n>o&&(u=2*Math.PI-u),{radius:c,angle:Bz(u),angleInRadian:u}},$z=e=>{var{startAngle:a,endAngle:r}=e,n=Math.floor(a/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:a-o*360,endAngle:r-o*360}},qz=(e,a)=>{var{startAngle:r,endAngle:n}=a,i=Math.floor(r/360),o=Math.floor(n/360),c=Math.min(i,o);return e+c*360},Hz=(e,a)=>{var{x:r,y:n}=e,{radius:i,angle:o}=Uz({x:r,y:n},a),{innerRadius:c,outerRadius:m}=a;if(i<c||i>m||i===0)return null;var{startAngle:u,endAngle:h}=$z(a),p=o,x;if(u<=h){for(;p>h;)p-=360;for(;p<u;)p+=360;x=p>=u&&p<=h}else{for(;p>u;)p-=360;for(;p<h;)p+=360;x=p>=h&&p<=u}return x?g1(g1({},a),{},{radius:i,angle:qz(p,a)}):null};function A4(e,a,r){return Array.isArray(e)&&e&&a+r!==0?e.slice(a,r+1):e}function b1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mr(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?b1(Object(r),!0).forEach(function(n){Vz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vz(e,a,r){return(a=Yz(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function Yz(e){var a=Kz(e,"string");return typeof a=="symbol"?a:a+""}function Kz(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Na(e,a,r){return Gt(e)||Gt(a)?r:Hr(a)?si(e,a,r):typeof a=="function"?a(e):r}var Gz=(e,a,r,n,i)=>{var o,c=-1,m=(o=a?.length)!==null&&o!==void 0?o:0;if(m<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var u=0;u<m;u++){var h=u>0?r[u-1].coordinate:r[m-1].coordinate,p=r[u].coordinate,x=u>=m-1?r[0].coordinate:r[u+1].coordinate,j=void 0;if(Ra(p-h)!==Ra(x-p)){var v=[];if(Ra(x-p)===Ra(i[1]-i[0])){j=x;var w=p+i[1]-i[0];v[0]=Math.min(w,(w+h)/2),v[1]=Math.max(w,(w+h)/2)}else{j=h;var S=x+i[1]-i[0];v[0]=Math.min(p,(S+p)/2),v[1]=Math.max(p,(S+p)/2)}var A=[Math.min(p,(j+p)/2),Math.max(p,(j+p)/2)];if(e>A[0]&&e<=A[1]||e>=v[0]&&e<=v[1]){({index:c}=r[u]);break}}else{var g=Math.min(h,x),C=Math.max(h,x);if(e>(g+p)/2&&e<=(C+p)/2){({index:c}=r[u]);break}}}else if(a){for(var E=0;E<m;E++)if(E===0&&e<=(a[E].coordinate+a[E+1].coordinate)/2||E>0&&E<m-1&&e>(a[E].coordinate+a[E-1].coordinate)/2&&e<=(a[E].coordinate+a[E+1].coordinate)/2||E===m-1&&e>(a[E].coordinate+a[E-1].coordinate)/2){({index:c}=a[E]);break}}return c},Jz=(e,a,r)=>{if(a&&r){var{width:n,height:i}=r,{align:o,verticalAlign:c,layout:m}=a;if((m==="vertical"||m==="horizontal"&&c==="middle")&&o!=="center"&&De(e[o]))return mr(mr({},e),{},{[o]:e[o]+(n||0)});if((m==="horizontal"||m==="vertical"&&o==="center")&&c!=="middle"&&De(e[c]))return mr(mr({},e),{},{[c]:e[c]+(i||0)})}return e},dl=(e,a)=>e==="horizontal"&&a==="xAxis"||e==="vertical"&&a==="yAxis"||e==="centric"&&a==="angleAxis"||e==="radial"&&a==="radiusAxis",S4=(e,a,r,n)=>{if(n)return e.map(m=>m.coordinate);var i,o,c=e.map(m=>(m.coordinate===a&&(i=!0),m.coordinate===r&&(o=!0),m.coordinate));return i||c.push(a),o||c.push(r),c},C4=(e,a,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:o,scale:c,realScaleType:m,isCategorical:u,categoricalDomain:h,tickCount:p,ticks:x,niceTicks:j,axisType:v}=e;if(!c)return null;var w=m==="scaleBand"&&c.bandwidth?c.bandwidth()/2:2,S=i==="category"&&c.bandwidth?c.bandwidth()/w:0;if(S=v==="angleAxis"&&o&&o.length>=2?Ra(o[0]-o[1])*2*S:S,x||j){var A=(x||j||[]).map((g,C)=>{var E=n?n.indexOf(g):g;return{coordinate:c(E)+S,value:g,offset:S,index:C}});return A.filter(g=>!xr(g.coordinate))}return u&&h?h.map((g,C)=>({coordinate:c(g)+S,value:g,index:C,offset:S})):c.ticks&&p!=null?c.ticks(p).map((g,C)=>({coordinate:c(g)+S,value:g,offset:S,index:C})):c.domain().map((g,C)=>({coordinate:c(g)+S,value:n?n[g]:g,index:C,offset:S}))},y1=1e-4,Wz=e=>{var a=e.domain();if(!(!a||a.length<=2)){var r=a.length,n=e.range(),i=Math.min(n[0],n[1])-y1,o=Math.max(n[0],n[1])+y1,c=e(a[0]),m=e(a[r-1]);(c<i||c>o||m<i||m>o)&&e.domain([a[0],a[r-1]])}},Qz=(e,a)=>{if(!a||a.length!==2||!De(a[0])||!De(a[1]))return e;var r=Math.min(a[0],a[1]),n=Math.max(a[0],a[1]),i=[e[0],e[1]];return(!De(e[0])||e[0]<r)&&(i[0]=r),(!De(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},Xz=e=>{var a=e.length;if(!(a<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0,c=0;c<a;++c){var m=xr(e[c][r][1])?e[c][r][0]:e[c][r][1];m>=0?(e[c][r][0]=i,e[c][r][1]=i+m,i=e[c][r][1]):(e[c][r][0]=o,e[c][r][1]=o+m,o=e[c][r][1])}},Zz=e=>{var a=e.length;if(!(a<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,o=0;o<a;++o){var c=xr(e[o][r][1])?e[o][r][0]:e[o][r][1];c>=0?(e[o][r][0]=i,e[o][r][1]=i+c,i=e[o][r][1]):(e[o][r][0]=0,e[o][r][1]=0)}},eL={sign:Xz,expand:A8,none:ni,silhouette:S8,wiggle:C8,positive:Zz},tL=(e,a,r)=>{var n=eL[r],i=w8().keys(a).value((o,c)=>+Na(o,c,0)).order(qg).offset(n);return i(e)};function aL(e){return e==null?void 0:String(e)}var v1=e=>{var{axis:a,ticks:r,offset:n,bandSize:i,entry:o,index:c}=e;if(a.type==="category")return r[c]?r[c].coordinate+n:null;var m=Na(o,a.dataKey,a.scale.domain()[c]);return Gt(m)?null:a.scale(m)-i/2+n},rL=e=>{var{numericAxis:a}=e,r=a.scale.domain();if(a.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},nL=e=>{var a=e.flat(2).filter(De);return[Math.min(...a),Math.max(...a)]},sL=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],lL=(e,a,r)=>{if(e!=null)return sL(Object.keys(e).reduce((n,i)=>{var o=e[i],{stackedData:c}=o,m=c.reduce((u,h)=>{var p=A4(h,a,r),x=nL(p);return[Math.min(u[0],x[0]),Math.max(u[1],x[1])]},[1/0,-1/0]);return[Math.min(m[0],n[0]),Math.max(m[1],n[1])]},[1/0,-1/0]))},j1=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,N1=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,e0=(e,a,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&a&&a.length>=2){for(var i=Bm(a,p=>p.coordinate),o=1/0,c=1,m=i.length;c<m;c++){var u=i[c],h=i[c-1];o=Math.min((u.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0};function w1(e){var{tooltipEntrySettings:a,dataKey:r,payload:n,value:i,name:o}=e;return mr(mr({},a),{},{dataKey:r,payload:n,value:i,name:o})}function E4(e,a){if(e)return String(e);if(typeof a=="string")return a}function iL(e,a,r,n,i){if(r==="horizontal"||r==="vertical"){var o=e>=i.left&&e<=i.left+i.width&&a>=i.top&&a<=i.top+i.height;return o?{x:e,y:a}:null}return n?Hz({x:e,y:a},n):null}var oL=(e,a,r,n)=>{var i=a.find(h=>h&&h.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.y};if(e==="vertical")return{x:n.x,y:i.coordinate};if(e==="centric"){var o=i.coordinate,{radius:c}=n;return mr(mr(mr({},n),oa(n.cx,n.cy,c,o)),{},{angle:o,radius:c})}var m=i.coordinate,{angle:u}=n;return mr(mr(mr({},n),oa(n.cx,n.cy,m,u)),{},{angle:u,radius:m})}return{x:0,y:0}},cL=(e,a)=>a==="horizontal"?e.x:a==="vertical"?e.y:a==="centric"?e.angle:e.radius,Pn=e=>e.layout.width,Mn=e=>e.layout.height,dL=e=>e.layout.scale,k4=e=>e.layout.margin,Im=le(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Fm=le(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),uL="data-recharts-item-index",mL="data-recharts-item-data-key",bc=60;function A1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function au(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?A1(Object(r),!0).forEach(function(n){fL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fL(e,a,r){return(a=pL(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function pL(e){var a=hL(e,"string");return typeof a=="symbol"?a:a+""}function hL(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var xL=e=>e.brush.height;function gL(e){var a=Fm(e);return a.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:bc;return r+i}return r},0)}function bL(e){var a=Fm(e);return a.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:bc;return r+i}return r},0)}function yL(e){var a=Im(e);return a.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function vL(e){var a=Im(e);return a.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Qt=le([Pn,Mn,k4,xL,gL,bL,yL,vL,N4,Cz],(e,a,r,n,i,o,c,m,u,h)=>{var p={left:(r.left||0)+i,right:(r.right||0)+o},x={top:(r.top||0)+c,bottom:(r.bottom||0)+m},j=au(au({},x),p),v=j.bottom;j.bottom+=n,j=Jz(j,u,h);var w=e-j.left-j.right,S=a-j.top-j.bottom;return au(au({brushBottom:v},j),{},{width:Math.max(w,0),height:Math.max(S,0)})}),jL=le(Qt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),t0=le(Pn,Mn,(e,a)=>({x:0,y:0,width:e,height:a})),NL=b.createContext(null),Wa=()=>b.useContext(NL)!=null,Um=e=>e.brush,$m=le([Um,Qt,k4],(e,a,r)=>({height:e.height,x:De(e.x)?e.x:a.left,y:De(e.y)?e.y:a.top+a.height+a.brushBottom-(r?.bottom||0),width:De(e.width)?e.width:a.width})),$x={},qx={},Hx={},S1;function wL(){return S1||(S1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r,n,{signal:i,edges:o}={}){let c,m=null;const u=o!=null&&o.includes("leading"),h=o==null||o.includes("trailing"),p=()=>{m!==null&&(r.apply(c,m),c=void 0,m=null)},x=()=>{h&&p(),S()};let j=null;const v=()=>{j!=null&&clearTimeout(j),j=setTimeout(()=>{j=null,x()},n)},w=()=>{j!==null&&(clearTimeout(j),j=null)},S=()=>{w(),c=void 0,m=null},A=()=>{p()},g=function(...C){if(i?.aborted)return;c=this,m=C;const E=j==null;v(),u&&E&&p()};return g.schedule=v,g.cancel=S,g.flush=A,i?.addEventListener("abort",S,{once:!0}),g}e.debounce=a})(Hx)),Hx}var C1;function AL(){return C1||(C1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=wL();function r(n,i=0,o={}){typeof o!="object"&&(o={});const{leading:c=!1,trailing:m=!0,maxWait:u}=o,h=Array(2);c&&(h[0]="leading"),m&&(h[1]="trailing");let p,x=null;const j=a.debounce(function(...S){p=n.apply(this,S),x=null},i,{edges:h}),v=function(...S){return u!=null&&(x===null&&(x=Date.now()),Date.now()-x>=u)?(p=n.apply(this,S),x=Date.now(),j.cancel(),j.schedule(),p):(j.apply(this,S),p)},w=()=>(j.flush(),p);return v.cancel=j.cancel,v.flush=w,v}e.debounce=r})(qx)),qx}var E1;function SL(){return E1||(E1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=AL();function r(n,i=0,o={}){const{leading:c=!0,trailing:m=!0}=o;return a.debounce(n,i,{leading:c,maxWait:i,trailing:m})}e.throttle=r})($x)),$x}var Vx,k1;function CL(){return k1||(k1=1,Vx=SL().throttle),Vx}var EL=CL();const kL=Or(EL);var Vu=function(a,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o]},O4=(e,a,r)=>{var{width:n="100%",height:i="100%",aspect:o,maxHeight:c}=r,m=Cn(n)?e:Number(n),u=Cn(i)?a:Number(i);return o&&o>0&&(m?u=m/o:u&&(m=u*o),c&&u>c&&(u=c)),{calculatedWidth:m,calculatedHeight:u}},OL={width:0,height:0,overflow:"visible"},DL={width:0,overflowX:"visible"},TL={height:0,overflowY:"visible"},RL={},PL=e=>{var{width:a,height:r}=e,n=Cn(a),i=Cn(r);return n&&i?OL:n?DL:i?TL:RL};function ML(e){var{width:a,height:r,aspect:n}=e,i=a,o=r;return i===void 0&&o===void 0?(i="100%",o="100%"):i===void 0?i=n&&n>0?void 0:"100%":o===void 0&&(o=n&&n>0?void 0:"100%"),{width:i,height:o}}function fa(e){return Number.isFinite(e)}function li(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Vg(){return Vg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vg.apply(null,arguments)}function O1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function D1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?O1(Object(r),!0).forEach(function(n){_L(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _L(e,a,r){return(a=zL(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function zL(e){var a=LL(e,"string");return typeof a=="symbol"?a:a+""}function LL(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var D4=b.createContext({width:-1,height:-1});function T4(e){var{children:a,width:r,height:n}=e,i=b.useMemo(()=>({width:r,height:n}),[r,n]);return r<=0||n<=0?null:b.createElement(D4.Provider,{value:i},a)}var a0=()=>b.useContext(D4),BL=b.forwardRef((e,a)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i,height:o,minWidth:c=0,minHeight:m,maxHeight:u,children:h,debounce:p=0,id:x,className:j,onResize:v,style:w={}}=e,S=b.useRef(null),A=b.useRef();A.current=v,b.useImperativeHandle(a,()=>S.current);var[g,C]=b.useState({containerWidth:n.width,containerHeight:n.height}),E=b.useCallback((T,R)=>{C(z=>{var U=Math.round(T),X=Math.round(R);return z.containerWidth===U&&z.containerHeight===X?z:{containerWidth:U,containerHeight:X}})},[]);b.useEffect(()=>{var T=X=>{var fe,{width:se,height:ie}=X[0].contentRect;E(se,ie),(fe=A.current)===null||fe===void 0||fe.call(A,se,ie)};p>0&&(T=kL(T,p,{trailing:!0,leading:!1}));var R=new ResizeObserver(T),{width:z,height:U}=S.current.getBoundingClientRect();return E(z,U),R.observe(S.current),()=>{R.disconnect()}},[E,p]);var{containerWidth:O,containerHeight:D}=g;Vu(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:B,calculatedHeight:L}=O4(O,D,{width:i,height:o,aspect:r,maxHeight:u});return Vu(B>0||L>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.`,B,L,i,o,c,m,r),b.createElement("div",{id:x?"".concat(x):void 0,className:gt("recharts-responsive-container",j),style:D1(D1({},w),{},{width:i,height:o,minWidth:c,minHeight:m,maxHeight:u}),ref:S},b.createElement("div",{style:PL({width:i,height:o})},b.createElement(T4,{width:B,height:L},h)))}),IL=b.forwardRef((e,a)=>{var r=a0();if(li(r.width)&&li(r.height))return e.children;var{width:n,height:i}=ML({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:c}=O4(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return De(o)&&De(c)?b.createElement(T4,{width:o,height:c},e.children):b.createElement(BL,Vg({},e,{width:n,height:i,ref:a}))}),qm=()=>{var e,a=Wa(),r=Te(jL),n=Te($m),i=(e=Te(Um))===null||e===void 0?void 0:e.padding;return!a||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},FL={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},R4=()=>{var e;return(e=Te(Qt))!==null&&e!==void 0?e:FL},P4=()=>Te(Pn),M4=()=>Te(Mn),at=e=>e.layout.layoutType,r0=()=>Te(at),Hm=e=>{var a=zt(),r=Wa(),{width:n,height:i}=e,o=a0(),c=n,m=i;return o&&(c=o.width>0?o.width:n,m=o.height>0?o.height:i),b.useEffect(()=>{!r&&li(c)&&li(m)&&a(Rz({width:c,height:m}))},[a,r,c,m]),null},UL={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},_4=za({name:"legend",initialState:UL,reducers:{setLegendSize(e,a){e.size.width=a.payload.width,e.size.height=a.payload.height},setLegendSettings(e,a){e.settings.align=a.payload.align,e.settings.layout=a.payload.layout,e.settings.verticalAlign=a.payload.verticalAlign,e.settings.itemSorter=a.payload.itemSorter},addLegendPayload:{reducer(e,a){e.payload.push(a.payload)},prepare:xa()},removeLegendPayload:{reducer(e,a){var r=yn(e).payload.indexOf(a.payload);r>-1&&e.payload.splice(r,1)},prepare:xa()}}}),{setLegendSize:YQ,setLegendSettings:KQ,addLegendPayload:$L,removeLegendPayload:qL}=_4.actions,HL=_4.reducer;function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yg.apply(null,arguments)}function T1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yx(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?T1(Object(r),!0).forEach(function(n){VL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VL(e,a,r){return(a=YL(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function YL(e){var a=KL(e,"string");return typeof a=="symbol"?a:a+""}function KL(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function GL(e){return Array.isArray(e)&&Hr(e[0])&&Hr(e[1])?e.join(" ~ "):e}var JL=e=>{var{separator:a=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:o,formatter:c,itemSorter:m,wrapperClassName:u,labelClassName:h,label:p,labelFormatter:x,accessibilityLayer:j=!1}=e,v=()=>{if(o&&o.length){var D={padding:0,margin:0},B=(m?Bm(o,m):o).map((L,T)=>{if(L.type==="none")return null;var R=L.formatter||c||GL,{value:z,name:U}=L,X=z,fe=U;if(R){var se=R(z,U,L,T,o);if(Array.isArray(se))[X,fe]=se;else if(se!=null)X=se;else return null}var ie=Yx({display:"block",paddingTop:4,paddingBottom:4,color:L.color||"#000"},n);return b.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(T),style:ie},Hr(fe)?b.createElement("span",{className:"recharts-tooltip-item-name"},fe):null,Hr(fe)?b.createElement("span",{className:"recharts-tooltip-item-separator"},a):null,b.createElement("span",{className:"recharts-tooltip-item-value"},X),b.createElement("span",{className:"recharts-tooltip-item-unit"},L.unit||""))});return b.createElement("ul",{className:"recharts-tooltip-item-list",style:D},B)}return null},w=Yx({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),S=Yx({margin:0},i),A=!Gt(p),g=A?p:"",C=gt("recharts-default-tooltip",u),E=gt("recharts-tooltip-label",h);A&&x&&o!==void 0&&o!==null&&(g=x(p,o));var O=j?{role:"status","aria-live":"assertive"}:{};return b.createElement("div",Yg({className:C,style:w},O),b.createElement("p",{className:E,style:S},b.isValidElement(g)?g:"".concat(g)),v())},Po="recharts-tooltip-wrapper",WL={visibility:"hidden"};function QL(e){var{coordinate:a,translateX:r,translateY:n}=e;return gt(Po,{["".concat(Po,"-right")]:De(r)&&a&&De(a.x)&&r>=a.x,["".concat(Po,"-left")]:De(r)&&a&&De(a.x)&&r<a.x,["".concat(Po,"-bottom")]:De(n)&&a&&De(a.y)&&n>=a.y,["".concat(Po,"-top")]:De(n)&&a&&De(a.y)&&n<a.y})}function R1(e){var{allowEscapeViewBox:a,coordinate:r,key:n,offsetTopLeft:i,position:o,reverseDirection:c,tooltipDimension:m,viewBox:u,viewBoxDimension:h}=e;if(o&&De(o[n]))return o[n];var p=r[n]-m-(i>0?i:0),x=r[n]+i;if(a[n])return c[n]?p:x;var j=u[n];if(j==null)return 0;if(c[n]){var v=p,w=j;return v<w?Math.max(x,j):Math.max(p,j)}if(h==null)return 0;var S=x+m,A=j+h;return S>A?Math.max(p,j):Math.max(x,j)}function XL(e){var{translateX:a,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(a,"px, ").concat(r,"px, 0)"):"translate(".concat(a,"px, ").concat(r,"px)")}}function ZL(e){var{allowEscapeViewBox:a,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:o,tooltipBox:c,useTranslate3d:m,viewBox:u}=e,h,p,x;return c.height>0&&c.width>0&&r?(p=R1({allowEscapeViewBox:a,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:c.width,viewBox:u,viewBoxDimension:u.width}),x=R1({allowEscapeViewBox:a,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:o,tooltipDimension:c.height,viewBox:u,viewBoxDimension:u.height}),h=XL({translateX:p,translateY:x,useTranslate3d:m})):h=WL,{cssProperties:h,cssClasses:QL({translateX:p,translateY:x,coordinate:r})}}function P1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ru(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?P1(Object(r),!0).forEach(function(n){Kg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kg(e,a,r){return(a=eB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function eB(e){var a=tB(e,"string");return typeof a=="symbol"?a:a+""}function tB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}class aB extends b.PureComponent{constructor(){super(...arguments),Kg(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Kg(this,"handleKeyDown",a=>{if(a.key==="Escape"){var r,n,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var a,r;this.state.dismissed&&(((a=this.props.coordinate)===null||a===void 0?void 0:a.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:a,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:o,coordinate:c,hasPayload:m,isAnimationActive:u,offset:h,position:p,reverseDirection:x,useTranslate3d:j,viewBox:v,wrapperStyle:w,lastBoundingBox:S,innerRef:A,hasPortalFromProps:g}=this.props,{cssClasses:C,cssProperties:E}=ZL({allowEscapeViewBox:r,coordinate:c,offsetTopLeft:h,position:p,reverseDirection:x,tooltipBox:{height:S.height,width:S.width},useTranslate3d:j,viewBox:v}),O=g?{}:ru(ru({transition:u&&a?"transform ".concat(n,"ms ").concat(i):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&m?"visible":"hidden",position:"absolute",top:0,left:0}),D=ru(ru({},O),{},{visibility:!this.state.dismissed&&a&&m?"visible":"hidden"},w);return b.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:C,style:D,ref:A},o)}}var rB=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),ji={devToolsEnabled:!1,isSsr:rB()},z4=()=>Te(e=>e.rootProps.accessibilityLayer);function Gg(){return Gg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gg.apply(null,arguments)}function M1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?M1(Object(r),!0).forEach(function(n){nB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nB(e,a,r){return(a=sB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function sB(e){var a=lB(e,"string");return typeof a=="symbol"?a:a+""}function lB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var z1={curveBasisClosed:m8,curveBasisOpen:f8,curveBasis:u8,curveBumpX:Q_,curveBumpY:X_,curveLinearClosed:p8,curveLinear:zm,curveMonotoneX:h8,curveMonotoneY:x8,curveNatural:g8,curveStep:b8,curveStepAfter:v8,curveStepBefore:y8},nu=e=>fa(e.x)&&fa(e.y),Mo=e=>e.x,_o=e=>e.y,iB=(e,a)=>{if(typeof e=="function")return e;var r="curve".concat(gc(e));return(r==="curveMonotone"||r==="curveBump")&&a?z1["".concat(r).concat(a==="vertical"?"Y":"X")]:z1[r]||zm},oB=e=>{var{type:a="linear",points:r=[],baseLine:n,layout:i,connectNulls:o=!1}=e,c=iB(a,i),m=o?r.filter(nu):r,u;if(Array.isArray(n)){var h=o?n.filter(x=>nu(x)):n,p=m.map((x,j)=>_1(_1({},x),{},{base:h[j]}));return i==="vertical"?u=eu().y(_o).x1(Mo).x0(x=>x.base.x):u=eu().x(Mo).y1(_o).y0(x=>x.base.y),u.defined(nu).curve(c),u(p)}return i==="vertical"&&De(n)?u=eu().y(_o).x1(Mo).x0(n):De(n)?u=eu().x(Mo).y1(_o).y0(n):u=W3().x(Mo).y(_o),u.defined(nu).curve(c),u(m)},cB=e=>{var{className:a,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var o=r&&r.length?oB(e):n;return b.createElement("path",Gg({},Sn(e),q8(e),{className:gt("recharts-curve",a),d:o===null?void 0:o,ref:i}))},dB=["x","y","top","left","width","height","className"];function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jg.apply(null,arguments)}function L1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uB(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?L1(Object(r),!0).forEach(function(n){mB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mB(e,a,r){return(a=fB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function fB(e){var a=pB(e,"string");return typeof a=="symbol"?a:a+""}function pB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function hB(e,a){if(e==null)return{};var r,n,i=xB(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xB(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var gB=(e,a,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(a,"h").concat(r),bB=e=>{var{x:a=0,y:r=0,top:n=0,left:i=0,width:o=0,height:c=0,className:m}=e,u=hB(e,dB),h=uB({x:a,y:r,top:n,left:i,width:o,height:c},u);return!De(a)||!De(r)||!De(o)||!De(c)||!De(n)||!De(i)?null:b.createElement("path",Jg({},hr(h),{className:gt("recharts-cross",m),d:gB(a,r,o,c,n,i)}))};function yB(e,a,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?a.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:a.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function B1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vB(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?B1(Object(r),!0).forEach(function(n){jB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):B1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jB(e,a,r){return(a=NB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function NB(e){var a=wB(e,"string");return typeof a=="symbol"?a:a+""}function wB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function vr(e,a){var r=vB({},e),n=a,i=Object.keys(a),o=i.reduce((c,m)=>(c[m]===void 0&&n[m]!==void 0&&(c[m]=n[m]),c),r);return o}function AB(){}function SB(e){return e!=null}function I1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?I1(Object(r),!0).forEach(function(n){CB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CB(e,a,r){return(a=EB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function EB(e){var a=kB(e,"string");return typeof a=="symbol"?a:a+""}function kB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var OB=e=>e.replace(/([A-Z])/g,a=>"-".concat(a.toLowerCase())),L4=(e,a,r)=>e.map(n=>"".concat(OB(n)," ").concat(a,"ms ").concat(r)).join(","),DB=(e,a)=>[Object.keys(e),Object.keys(a)].reduce((r,n)=>r.filter(i=>n.includes(i))),ec=(e,a)=>Object.keys(a).reduce((r,n)=>F1(F1({},r),{},{[n]:e(n,a[n])}),{});function U1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ia(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?U1(Object(r),!0).forEach(function(n){TB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TB(e,a,r){return(a=RB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function RB(e){var a=PB(e,"string");return typeof a=="symbol"?a:a+""}function PB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var Yu=(e,a,r)=>e+(a-e)*r,Wg=e=>{var{from:a,to:r}=e;return a!==r},B4=(e,a,r)=>{var n=ec((i,o)=>{if(Wg(o)){var[c,m]=e(o.from,o.to,o.velocity);return ia(ia({},o),{},{from:c,velocity:m})}return o},a);return r<1?ec((i,o)=>Wg(o)?ia(ia({},o),{},{velocity:Yu(o.velocity,n[i].velocity,r),from:Yu(o.from,n[i].from,r)}):o,a):B4(e,n,r-1)};function MB(e,a,r,n,i,o){var c,m=n.reduce((j,v)=>ia(ia({},j),{},{[v]:{from:e[v],velocity:0,to:a[v]}}),{}),u=()=>ec((j,v)=>v.from,m),h=()=>!Object.values(m).filter(Wg).length,p=null,x=j=>{c||(c=j);var v=j-c,w=v/r.dt;m=B4(r,m,w),i(ia(ia(ia({},e),a),u())),c=j,h()||(p=o.setTimeout(x))};return()=>(p=o.setTimeout(x),()=>{p()})}function _B(e,a,r,n,i,o,c){var m=null,u=i.reduce((x,j)=>ia(ia({},x),{},{[j]:[e[j],a[j]]}),{}),h,p=x=>{h||(h=x);var j=(x-h)/n,v=ec((S,A)=>Yu(...A,r(j)),u);if(o(ia(ia(ia({},e),a),v)),j<1)m=c.setTimeout(p);else{var w=ec((S,A)=>Yu(...A,r(1)),u);o(ia(ia(ia({},e),a),w))}};return()=>(m=c.setTimeout(p),()=>{m()})}const zB=(e,a,r,n,i,o)=>{var c=DB(e,a);return r.isStepper===!0?MB(e,a,r,c,i,o):_B(e,a,r,n,c,i,o)};var Ku=1e-4,I4=(e,a)=>[0,3*e,3*a-6*e,3*e-3*a+1],F4=(e,a)=>e.map((r,n)=>r*a**n).reduce((r,n)=>r+n),$1=(e,a)=>r=>{var n=I4(e,a);return F4(n,r)},LB=(e,a)=>r=>{var n=I4(e,a),i=[...n.map((o,c)=>o*c).slice(1),0];return F4(i,r)},q1=function(){for(var a,r,n,i,o=arguments.length,c=new Array(o),m=0;m<o;m++)c[m]=arguments[m];if(c.length===1)switch(c[0]){case"linear":[a,n,r,i]=[0,0,1,1];break;case"ease":[a,n,r,i]=[.25,.1,.25,1];break;case"ease-in":[a,n,r,i]=[.42,0,1,1];break;case"ease-out":[a,n,r,i]=[.42,0,.58,1];break;case"ease-in-out":[a,n,r,i]=[0,0,.58,1];break;default:{var u=c[0].split("(");u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4&&([a,n,r,i]=u[1].split(")")[0].split(",").map(w=>parseFloat(w)))}}else c.length===4&&([a,n,r,i]=c);var h=$1(a,r),p=$1(n,i),x=LB(a,r),j=w=>w>1?1:w<0?0:w,v=w=>{for(var S=w>1?1:w,A=S,g=0;g<8;++g){var C=h(A)-S,E=x(A);if(Math.abs(C-S)<Ku||E<Ku)return p(A);A=j(A-C/E)}return p(A)};return v.isStepper=!1,v},BB=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=a,o=(c,m,u)=>{var h=-(c-m)*r,p=u*n,x=u+(h-p)*i/1e3,j=u*i/1e3+c;return Math.abs(j-m)<Ku&&Math.abs(x)<Ku?[m,0]:[j,x]};return o.isStepper=!0,o.dt=i,o},IB=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return q1(e);case"spring":return BB();default:if(e.split("(")[0]==="cubic-bezier")return q1(e)}return typeof e=="function"?e:null};function FB(e){var a,r=()=>null,n=!1,i=null,o=c=>{if(!n){if(Array.isArray(c)){if(!c.length)return;var m=c,[u,...h]=m;if(typeof u=="number"){i=e.setTimeout(o.bind(null,h),u);return}o(u),i=e.setTimeout(o.bind(null,h));return}typeof c=="string"&&(a=c,r(a)),typeof c=="object"&&(a=c,r(a)),typeof c=="function"&&c()}};return{stop:()=>{n=!0},start:c=>{n=!1,i&&(i(),i=null),o(c)},subscribe:c=>(r=c,()=>{r=()=>null}),getTimeoutController:()=>e}}class UB{setTimeout(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=c=>{c-n>=r?a(c):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{cancelAnimationFrame(i)}}}function $B(){return FB(new UB)}var qB=b.createContext($B);function HB(e,a){var r=b.useContext(qB);return b.useMemo(()=>a??r(e),[e,a,r])}var VB={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},H1={t:0},Kx={t:1};function n0(e){var a=vr(e,VB),{isActive:r,canBegin:n,duration:i,easing:o,begin:c,onAnimationEnd:m,onAnimationStart:u,children:h}=a,p=HB(a.animationId,a.animationManager),[x,j]=b.useState(r?H1:Kx),v=b.useRef(null);return b.useEffect(()=>{r||j(Kx)},[r]),b.useEffect(()=>{if(!r||!n)return AB;var w=zB(H1,Kx,IB(o),i,j,p.getTimeoutController()),S=()=>{v.current=w()};return p.start([u,c,S,i,m]),()=>{p.stop(),v.current&&v.current(),m()}},[r,n,i,o,c,u,m,p]),h(x.t)}function s0(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=b.useRef(Zo(a)),n=b.useRef(e);return n.current!==e&&(r.current=Zo(a),n.current=e),r.current}var YB=["radius"],KB=["radius"];function V1(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Y1(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?V1(Object(r),!0).forEach(function(n){GB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GB(e,a,r){return(a=JB(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function JB(e){var a=WB(e,"string");return typeof a=="symbol"?a:a+""}function WB(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Gu(){return Gu=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gu.apply(null,arguments)}function K1(e,a){if(e==null)return{};var r,n,i=QB(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function QB(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var G1=(e,a,r,n,i)=>{var o=Math.min(Math.abs(r)/2,Math.abs(n)/2),c=n>=0?1:-1,m=r>=0?1:-1,u=n>=0&&r>=0||n<0&&r<0?1:0,h;if(o>0&&i instanceof Array){for(var p=[0,0,0,0],x=0,j=4;x<j;x++)p[x]=i[x]>o?o:i[x];h="M".concat(e,",").concat(a+c*p[0]),p[0]>0&&(h+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(u,",").concat(e+m*p[0],",").concat(a)),h+="L ".concat(e+r-m*p[1],",").concat(a),p[1]>0&&(h+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(u,`,
        `).concat(e+r,",").concat(a+c*p[1])),h+="L ".concat(e+r,",").concat(a+n-c*p[2]),p[2]>0&&(h+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(u,`,
        `).concat(e+r-m*p[2],",").concat(a+n)),h+="L ".concat(e+m*p[3],",").concat(a+n),p[3]>0&&(h+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(u,`,
        `).concat(e,",").concat(a+n-c*p[3])),h+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);h="M ".concat(e,",").concat(a+c*v,`
            A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(e+m*v,",").concat(a,`
            L `).concat(e+r-m*v,",").concat(a,`
            A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(e+r,",").concat(a+c*v,`
            L `).concat(e+r,",").concat(a+n-c*v,`
            A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(e+r-m*v,",").concat(a+n,`
            L `).concat(e+m*v,",").concat(a+n,`
            A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(e,",").concat(a+n-c*v," Z")}else h="M ".concat(e,",").concat(a," h ").concat(r," v ").concat(n," h ").concat(-r," Z");return h},XB={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},U4=e=>{var a=vr(e,XB),r=b.useRef(null),[n,i]=b.useState(-1);b.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&i(K)}catch{}},[]);var{x:o,y:c,width:m,height:u,radius:h,className:p}=a,{animationEasing:x,animationDuration:j,animationBegin:v,isAnimationActive:w,isUpdateAnimationActive:S}=a,A=b.useRef(m),g=b.useRef(u),C=b.useRef(o),E=b.useRef(c),O=b.useMemo(()=>({x:o,y:c,width:m,height:u,radius:h}),[o,c,m,u,h]),D=s0(O,"rectangle-");if(o!==+o||c!==+c||m!==+m||u!==+u||m===0||u===0)return null;var B=gt("recharts-rectangle",p);if(!S){var L=hr(a),{radius:T}=L,R=K1(L,YB);return b.createElement("path",Gu({},R,{radius:typeof h=="number"?h:void 0,className:B,d:G1(o,c,m,u,h)}))}var z=A.current,U=g.current,X=C.current,fe=E.current,se="0px ".concat(n===-1?1:n,"px"),ie="".concat(n,"px 0px"),V=L4(["strokeDasharray"],j,typeof x=="string"?x:void 0);return b.createElement(n0,{animationId:D,key:D,canBegin:n>0,duration:j,easing:x,isActive:S,begin:v},K=>{var ce=ga(z,m,K),$=ga(U,u,K),I=ga(X,o,K),P=ga(fe,c,K);r.current&&(A.current=ce,g.current=$,C.current=I,E.current=P);var H;w?K>0?H={transition:V,strokeDasharray:ie}:H={strokeDasharray:se}:H={strokeDasharray:ie};var ee=hr(a),{radius:pe}=ee,ve=K1(ee,KB);return b.createElement("path",Gu({},ve,{radius:typeof h=="number"?h:void 0,className:B,d:G1(I,P,ce,$,h),ref:r,style:Y1(Y1({},H),a.style)}))})};function $4(e){var{cx:a,cy:r,radius:n,startAngle:i,endAngle:o}=e,c=oa(a,r,n,i),m=oa(a,r,n,o);return{points:[c,m],cx:a,cy:r,radius:n,startAngle:i,endAngle:o}}function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Qg.apply(null,arguments)}var ZB=(e,a)=>{var r=Ra(a-e),n=Math.min(Math.abs(a-e),359.999);return r*n},su=e=>{var{cx:a,cy:r,radius:n,angle:i,sign:o,isExternal:c,cornerRadius:m,cornerIsExternal:u}=e,h=m*(c?1:-1)+n,p=Math.asin(m/h)/Hu,x=u?i:i+o*p,j=oa(a,r,h,x),v=oa(a,r,n,x),w=u?i-o*p:i,S=oa(a,r,h*Math.cos(p*Hu),w);return{center:j,circleTangency:v,lineTangency:S,theta:p}},q4=e=>{var{cx:a,cy:r,innerRadius:n,outerRadius:i,startAngle:o,endAngle:c}=e,m=ZB(o,c),u=o+m,h=oa(a,r,i,o),p=oa(a,r,i,u),x="M ".concat(h.x,",").concat(h.y,`
    A `).concat(i,",").concat(i,`,0,
    `).concat(+(Math.abs(m)>180),",").concat(+(o>u),`,
    `).concat(p.x,",").concat(p.y,`
  `);if(n>0){var j=oa(a,r,n,o),v=oa(a,r,n,u);x+="L ".concat(v.x,",").concat(v.y,`
            A `).concat(n,",").concat(n,`,0,
            `).concat(+(Math.abs(m)>180),",").concat(+(o<=u),`,
            `).concat(j.x,",").concat(j.y," Z")}else x+="L ".concat(a,",").concat(r," Z");return x},eI=e=>{var{cx:a,cy:r,innerRadius:n,outerRadius:i,cornerRadius:o,forceCornerRadius:c,cornerIsExternal:m,startAngle:u,endAngle:h}=e,p=Ra(h-u),{circleTangency:x,lineTangency:j,theta:v}=su({cx:a,cy:r,radius:i,angle:u,sign:p,cornerRadius:o,cornerIsExternal:m}),{circleTangency:w,lineTangency:S,theta:A}=su({cx:a,cy:r,radius:i,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:m}),g=m?Math.abs(u-h):Math.abs(u-h)-v-A;if(g<0)return c?"M ".concat(j.x,",").concat(j.y,`
        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
      `):q4({cx:a,cy:r,innerRadius:n,outerRadius:i,startAngle:u,endAngle:h});var C="M ".concat(j.x,",").concat(j.y,`
    A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(x.x,",").concat(x.y,`
    A`).concat(i,",").concat(i,",0,").concat(+(g>180),",").concat(+(p<0),",").concat(w.x,",").concat(w.y,`
    A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(S.x,",").concat(S.y,`
  `);if(n>0){var{circleTangency:E,lineTangency:O,theta:D}=su({cx:a,cy:r,radius:n,angle:u,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:m}),{circleTangency:B,lineTangency:L,theta:T}=su({cx:a,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:m}),R=m?Math.abs(u-h):Math.abs(u-h)-D-T;if(R<0&&o===0)return"".concat(C,"L").concat(a,",").concat(r,"Z");C+="L".concat(L.x,",").concat(L.y,`
      A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(B.x,",").concat(B.y,`
      A`).concat(n,",").concat(n,",0,").concat(+(R>180),",").concat(+(p>0),",").concat(E.x,",").concat(E.y,`
      A`).concat(o,",").concat(o,",0,0,").concat(+(p<0),",").concat(O.x,",").concat(O.y,"Z")}else C+="L".concat(a,",").concat(r,"Z");return C},tI={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},H4=e=>{var a=vr(e,tI),{cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:c,forceCornerRadius:m,cornerIsExternal:u,startAngle:h,endAngle:p,className:x}=a;if(o<i||h===p)return null;var j=gt("recharts-sector",x),v=o-i,w=kr(c,v,0,!0),S;return w>0&&Math.abs(h-p)<360?S=eI({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(w,v/2),forceCornerRadius:m,cornerIsExternal:u,startAngle:h,endAngle:p}):S=q4({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:p}),b.createElement("path",Qg({},hr(a),{className:j,d:S}))};function aI(e,a,r){var n,i,o,c;if(e==="horizontal")n=a.x,o=n,i=r.top,c=r.top+r.height;else if(e==="vertical")i=a.y,c=i,n=r.left,o=r.left+r.width;else if(a.cx!=null&&a.cy!=null)if(e==="centric"){var{cx:m,cy:u,innerRadius:h,outerRadius:p,angle:x}=a,j=oa(m,u,h,x),v=oa(m,u,p,x);n=j.x,i=j.y,o=v.x,c=v.y}else return $4(a);return[{x:n,y:i},{x:o,y:c}]}var Gx={},Jx={},Wx={},J1;function rI(){return J1||(J1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=v4();function r(n){return a.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Wx)),Wx}var W1;function nI(){return W1||(W1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=rI();function r(n){return n?(n=a.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(Jx)),Jx}var Q1;function sI(){return Q1||(Q1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=j4(),r=nI();function n(i,o,c){c&&typeof c!="number"&&a.isIterateeCall(i,o,c)&&(o=c=void 0),i=r.toFinite(i),o===void 0?(o=i,i=0):o=r.toFinite(o),c=c===void 0?i<o?1:-1:r.toFinite(c);const m=Math.max(Math.ceil((o-i)/(c||1)),0),u=new Array(m);for(let h=0;h<m;h++)u[h]=i,i+=c;return u}e.range=n})(Gx)),Gx}var Qx,X1;function lI(){return X1||(X1=1,Qx=sI().range),Qx}var iI=lI();const V4=Or(iI);function fs(e,a){return e==null||a==null?NaN:e<a?-1:e>a?1:e>=a?0:NaN}function oI(e,a){return e==null||a==null?NaN:a<e?-1:a>e?1:a>=e?0:NaN}function l0(e){let a,r,n;e.length!==2?(a=fs,r=(m,u)=>fs(e(m),u),n=(m,u)=>e(m)-u):(a=e===fs||e===oI?e:cI,r=e,n=e);function i(m,u,h=0,p=m.length){if(h<p){if(a(u,u)!==0)return p;do{const x=h+p>>>1;r(m[x],u)<0?h=x+1:p=x}while(h<p)}return h}function o(m,u,h=0,p=m.length){if(h<p){if(a(u,u)!==0)return p;do{const x=h+p>>>1;r(m[x],u)<=0?h=x+1:p=x}while(h<p)}return h}function c(m,u,h=0,p=m.length){const x=i(m,u,h,p-1);return x>h&&n(m[x-1],u)>-n(m[x],u)?x-1:x}return{left:i,center:c,right:o}}function cI(){return 0}function Y4(e){return e===null?NaN:+e}function*dI(e,a){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const uI=l0(fs),yc=uI.right;l0(Y4).center;class Z1 extends Map{constructor(a,r=pI){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),a!=null)for(const[n,i]of a)this.set(n,i)}get(a){return super.get(eA(this,a))}has(a){return super.has(eA(this,a))}set(a,r){return super.set(mI(this,a),r)}delete(a){return super.delete(fI(this,a))}}function eA({_intern:e,_key:a},r){const n=a(r);return e.has(n)?e.get(n):r}function mI({_intern:e,_key:a},r){const n=a(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function fI({_intern:e,_key:a},r){const n=a(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function pI(e){return e!==null&&typeof e=="object"?e.valueOf():e}function hI(e=fs){if(e===fs)return K4;if(typeof e!="function")throw new TypeError("compare is not a function");return(a,r)=>{const n=e(a,r);return n||n===0?n:(e(r,r)===0)-(e(a,a)===0)}}function K4(e,a){return(e==null||!(e>=e))-(a==null||!(a>=a))||(e<a?-1:e>a?1:0)}const xI=Math.sqrt(50),gI=Math.sqrt(10),bI=Math.sqrt(2);function Ju(e,a,r){const n=(a-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),c=o>=xI?10:o>=gI?5:o>=bI?2:1;let m,u,h;return i<0?(h=Math.pow(10,-i)/c,m=Math.round(e*h),u=Math.round(a*h),m/h<e&&++m,u/h>a&&--u,h=-h):(h=Math.pow(10,i)*c,m=Math.round(e/h),u=Math.round(a/h),m*h<e&&++m,u*h>a&&--u),u<m&&.5<=r&&r<2?Ju(e,a,r*2):[m,u,h]}function Xg(e,a,r){if(a=+a,e=+e,r=+r,!(r>0))return[];if(e===a)return[e];const n=a<e,[i,o,c]=n?Ju(a,e,r):Ju(e,a,r);if(!(o>=i))return[];const m=o-i+1,u=new Array(m);if(n)if(c<0)for(let h=0;h<m;++h)u[h]=(o-h)/-c;else for(let h=0;h<m;++h)u[h]=(o-h)*c;else if(c<0)for(let h=0;h<m;++h)u[h]=(i+h)/-c;else for(let h=0;h<m;++h)u[h]=(i+h)*c;return u}function Zg(e,a,r){return a=+a,e=+e,r=+r,Ju(e,a,r)[2]}function eb(e,a,r){a=+a,e=+e,r=+r;const n=a<e,i=n?Zg(a,e,r):Zg(e,a,r);return(n?-1:1)*(i<0?1/-i:i)}function tA(e,a){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function aA(e,a){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function G4(e,a,r=0,n=1/0,i){if(a=Math.floor(a),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=a&&a<=n))return e;for(i=i===void 0?K4:hI(i);n>r;){if(n-r>600){const u=n-r+1,h=a-r+1,p=Math.log(u),x=.5*Math.exp(2*p/3),j=.5*Math.sqrt(p*x*(u-x)/u)*(h-u/2<0?-1:1),v=Math.max(r,Math.floor(a-h*x/u+j)),w=Math.min(n,Math.floor(a+(u-h)*x/u+j));G4(e,a,v,w,i)}const o=e[a];let c=r,m=n;for(zo(e,r,a),i(e[n],o)>0&&zo(e,r,n);c<m;){for(zo(e,c,m),++c,--m;i(e[c],o)<0;)++c;for(;i(e[m],o)>0;)--m}i(e[r],o)===0?zo(e,r,m):(++m,zo(e,m,n)),m<=a&&(r=m+1),a<=m&&(n=m-1)}return e}function zo(e,a,r){const n=e[a];e[a]=e[r],e[r]=n}function yI(e,a,r){if(e=Float64Array.from(dI(e)),!(!(n=e.length)||isNaN(a=+a))){if(a<=0||n<2)return aA(e);if(a>=1)return tA(e);var n,i=(n-1)*a,o=Math.floor(i),c=tA(G4(e,o).subarray(0,o+1)),m=aA(e.subarray(o+1));return c+(m-c)*(i-o)}}function vI(e,a,r=Y4){if(!(!(n=e.length)||isNaN(a=+a))){if(a<=0||n<2)return+r(e[0],0,e);if(a>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*a,o=Math.floor(i),c=+r(e[o],o,e),m=+r(e[o+1],o+1,e);return c+(m-c)*(i-o)}}function jI(e,a,r){e=+e,a=+a,r=(i=arguments.length)<2?(a=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((a-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}function jr(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}function _n(e,a){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof a=="function"?this.interpolator(a):this.range(a);break}}return this}const tb=Symbol("implicit");function i0(){var e=new Z1,a=[],r=[],n=tb;function i(o){let c=e.get(o);if(c===void 0){if(n!==tb)return n;e.set(o,c=a.push(o)-1)}return r[c%r.length]}return i.domain=function(o){if(!arguments.length)return a.slice();a=[],e=new Z1;for(const c of o)e.has(c)||e.set(c,a.push(c)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return i0(a,r).unknown(n)},jr.apply(i,arguments),i}function o0(){var e=i0().unknown(void 0),a=e.domain,r=e.range,n=0,i=1,o,c,m=!1,u=0,h=0,p=.5;delete e.unknown;function x(){var j=a().length,v=i<n,w=v?i:n,S=v?n:i;o=(S-w)/Math.max(1,j-u+h*2),m&&(o=Math.floor(o)),w+=(S-w-o*(j-u))*p,c=o*(1-u),m&&(w=Math.round(w),c=Math.round(c));var A=jI(j).map(function(g){return w+o*g});return r(v?A.reverse():A)}return e.domain=function(j){return arguments.length?(a(j),x()):a()},e.range=function(j){return arguments.length?([n,i]=j,n=+n,i=+i,x()):[n,i]},e.rangeRound=function(j){return[n,i]=j,n=+n,i=+i,m=!0,x()},e.bandwidth=function(){return c},e.step=function(){return o},e.round=function(j){return arguments.length?(m=!!j,x()):m},e.padding=function(j){return arguments.length?(u=Math.min(1,h=+j),x()):u},e.paddingInner=function(j){return arguments.length?(u=Math.min(1,j),x()):u},e.paddingOuter=function(j){return arguments.length?(h=+j,x()):h},e.align=function(j){return arguments.length?(p=Math.max(0,Math.min(1,j)),x()):p},e.copy=function(){return o0(a(),[n,i]).round(m).paddingInner(u).paddingOuter(h).align(p)},jr.apply(x(),arguments)}function J4(e){var a=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return J4(a())},e}function NI(){return J4(o0.apply(null,arguments).paddingInner(1))}function c0(e,a,r){e.prototype=a.prototype=r,r.constructor=e}function W4(e,a){var r=Object.create(e.prototype);for(var n in a)r[n]=a[n];return r}function vc(){}var tc=.7,Wu=1/tc,ai="\\s*([+-]?\\d+)\\s*",ac="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wI=/^#([0-9a-f]{3,8})$/,AI=new RegExp(`^rgb\\(${ai},${ai},${ai}\\)$`),SI=new RegExp(`^rgb\\(${qr},${qr},${qr}\\)$`),CI=new RegExp(`^rgba\\(${ai},${ai},${ai},${ac}\\)$`),EI=new RegExp(`^rgba\\(${qr},${qr},${qr},${ac}\\)$`),kI=new RegExp(`^hsl\\(${ac},${qr},${qr}\\)$`),OI=new RegExp(`^hsla\\(${ac},${qr},${qr},${ac}\\)$`),rA={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};c0(vc,rc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nA,formatHex:nA,formatHex8:DI,formatHsl:TI,formatRgb:sA,toString:sA});function nA(){return this.rgb().formatHex()}function DI(){return this.rgb().formatHex8()}function TI(){return Q4(this).formatHsl()}function sA(){return this.rgb().formatRgb()}function rc(e){var a,r;return e=(e+"").trim().toLowerCase(),(a=wI.exec(e))?(r=a[1].length,a=parseInt(a[1],16),r===6?lA(a):r===3?new Pa(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):r===8?lu(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):r===4?lu(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=AI.exec(e))?new Pa(a[1],a[2],a[3],1):(a=SI.exec(e))?new Pa(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=CI.exec(e))?lu(a[1],a[2],a[3],a[4]):(a=EI.exec(e))?lu(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=kI.exec(e))?cA(a[1],a[2]/100,a[3]/100,1):(a=OI.exec(e))?cA(a[1],a[2]/100,a[3]/100,a[4]):rA.hasOwnProperty(e)?lA(rA[e]):e==="transparent"?new Pa(NaN,NaN,NaN,0):null}function lA(e){return new Pa(e>>16&255,e>>8&255,e&255,1)}function lu(e,a,r,n){return n<=0&&(e=a=r=NaN),new Pa(e,a,r,n)}function RI(e){return e instanceof vc||(e=rc(e)),e?(e=e.rgb(),new Pa(e.r,e.g,e.b,e.opacity)):new Pa}function ab(e,a,r,n){return arguments.length===1?RI(e):new Pa(e,a,r,n??1)}function Pa(e,a,r,n){this.r=+e,this.g=+a,this.b=+r,this.opacity=+n}c0(Pa,ab,W4(vc,{brighter(e){return e=e==null?Wu:Math.pow(Wu,e),new Pa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?tc:Math.pow(tc,e),new Pa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pa(tl(this.r),tl(this.g),tl(this.b),Qu(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:iA,formatHex:iA,formatHex8:PI,formatRgb:oA,toString:oA}));function iA(){return`#${Gs(this.r)}${Gs(this.g)}${Gs(this.b)}`}function PI(){return`#${Gs(this.r)}${Gs(this.g)}${Gs(this.b)}${Gs((isNaN(this.opacity)?1:this.opacity)*255)}`}function oA(){const e=Qu(this.opacity);return`${e===1?"rgb(":"rgba("}${tl(this.r)}, ${tl(this.g)}, ${tl(this.b)}${e===1?")":`, ${e})`}`}function Qu(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Gs(e){return e=tl(e),(e<16?"0":"")+e.toString(16)}function cA(e,a,r,n){return n<=0?e=a=r=NaN:r<=0||r>=1?e=a=NaN:a<=0&&(e=NaN),new Cr(e,a,r,n)}function Q4(e){if(e instanceof Cr)return new Cr(e.h,e.s,e.l,e.opacity);if(e instanceof vc||(e=rc(e)),!e)return new Cr;if(e instanceof Cr)return e;e=e.rgb();var a=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(a,r,n),o=Math.max(a,r,n),c=NaN,m=o-i,u=(o+i)/2;return m?(a===o?c=(r-n)/m+(r<n)*6:r===o?c=(n-a)/m+2:c=(a-r)/m+4,m/=u<.5?o+i:2-o-i,c*=60):m=u>0&&u<1?0:c,new Cr(c,m,u,e.opacity)}function MI(e,a,r,n){return arguments.length===1?Q4(e):new Cr(e,a,r,n??1)}function Cr(e,a,r,n){this.h=+e,this.s=+a,this.l=+r,this.opacity=+n}c0(Cr,MI,W4(vc,{brighter(e){return e=e==null?Wu:Math.pow(Wu,e),new Cr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?tc:Math.pow(tc,e),new Cr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,a=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*a,i=2*r-n;return new Pa(Xx(e>=240?e-240:e+120,i,n),Xx(e,i,n),Xx(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Cr(dA(this.h),iu(this.s),iu(this.l),Qu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Qu(this.opacity);return`${e===1?"hsl(":"hsla("}${dA(this.h)}, ${iu(this.s)*100}%, ${iu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dA(e){return e=(e||0)%360,e<0?e+360:e}function iu(e){return Math.max(0,Math.min(1,e||0))}function Xx(e,a,r){return(e<60?a+(r-a)*e/60:e<180?r:e<240?a+(r-a)*(240-e)/60:a)*255}const d0=e=>()=>e;function _I(e,a){return function(r){return e+r*a}}function zI(e,a,r){return e=Math.pow(e,r),a=Math.pow(a,r)-e,r=1/r,function(n){return Math.pow(e+n*a,r)}}function LI(e){return(e=+e)==1?X4:function(a,r){return r-a?zI(a,r,e):d0(isNaN(a)?r:a)}}function X4(e,a){var r=a-e;return r?_I(e,r):d0(isNaN(e)?a:e)}const uA=(function e(a){var r=LI(a);function n(i,o){var c=r((i=ab(i)).r,(o=ab(o)).r),m=r(i.g,o.g),u=r(i.b,o.b),h=X4(i.opacity,o.opacity);return function(p){return i.r=c(p),i.g=m(p),i.b=u(p),i.opacity=h(p),i+""}}return n.gamma=e,n})(1);function BI(e,a){a||(a=[]);var r=e?Math.min(a.length,e.length):0,n=a.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+a[i]*o;return n}}function II(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FI(e,a){var r=a?a.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),c;for(c=0;c<n;++c)i[c]=Ni(e[c],a[c]);for(;c<r;++c)o[c]=a[c];return function(m){for(c=0;c<n;++c)o[c]=i[c](m);return o}}function UI(e,a){var r=new Date;return e=+e,a=+a,function(n){return r.setTime(e*(1-n)+a*n),r}}function Xu(e,a){return e=+e,a=+a,function(r){return e*(1-r)+a*r}}function $I(e,a){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(a===null||typeof a!="object")&&(a={});for(i in a)i in e?r[i]=Ni(e[i],a[i]):n[i]=a[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var rb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zx=new RegExp(rb.source,"g");function qI(e){return function(){return e}}function HI(e){return function(a){return e(a)+""}}function VI(e,a){var r=rb.lastIndex=Zx.lastIndex=0,n,i,o,c=-1,m=[],u=[];for(e=e+"",a=a+"";(n=rb.exec(e))&&(i=Zx.exec(a));)(o=i.index)>r&&(o=a.slice(r,o),m[c]?m[c]+=o:m[++c]=o),(n=n[0])===(i=i[0])?m[c]?m[c]+=i:m[++c]=i:(m[++c]=null,u.push({i:c,x:Xu(n,i)})),r=Zx.lastIndex;return r<a.length&&(o=a.slice(r),m[c]?m[c]+=o:m[++c]=o),m.length<2?u[0]?HI(u[0].x):qI(a):(a=u.length,function(h){for(var p=0,x;p<a;++p)m[(x=u[p]).i]=x.x(h);return m.join("")})}function Ni(e,a){var r=typeof a,n;return a==null||r==="boolean"?d0(a):(r==="number"?Xu:r==="string"?(n=rc(a))?(a=n,uA):VI:a instanceof rc?uA:a instanceof Date?UI:II(a)?BI:Array.isArray(a)?FI:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?$I:Xu)(e,a)}function u0(e,a){return e=+e,a=+a,function(r){return Math.round(e*(1-r)+a*r)}}function YI(e,a){a===void 0&&(a=e,e=Ni);for(var r=0,n=a.length-1,i=a[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=a[++r]);return function(c){var m=Math.max(0,Math.min(n-1,Math.floor(c*=n)));return o[m](c-m)}}function KI(e){return function(){return e}}function Zu(e){return+e}var mA=[0,1];function va(e){return e}function nb(e,a){return(a-=e=+e)?function(r){return(r-e)/a}:KI(isNaN(a)?NaN:.5)}function GI(e,a){var r;return e>a&&(r=e,e=a,a=r),function(n){return Math.max(e,Math.min(a,n))}}function JI(e,a,r){var n=e[0],i=e[1],o=a[0],c=a[1];return i<n?(n=nb(i,n),o=r(c,o)):(n=nb(n,i),o=r(o,c)),function(m){return o(n(m))}}function WI(e,a,r){var n=Math.min(e.length,a.length)-1,i=new Array(n),o=new Array(n),c=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),a=a.slice().reverse());++c<n;)i[c]=nb(e[c],e[c+1]),o[c]=r(a[c],a[c+1]);return function(m){var u=yc(e,m,1,n)-1;return o[u](i[u](m))}}function jc(e,a){return a.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Vm(){var e=mA,a=mA,r=Ni,n,i,o,c=va,m,u,h;function p(){var j=Math.min(e.length,a.length);return c!==va&&(c=GI(e[0],e[j-1])),m=j>2?WI:JI,u=h=null,x}function x(j){return j==null||isNaN(j=+j)?o:(u||(u=m(e.map(n),a,r)))(n(c(j)))}return x.invert=function(j){return c(i((h||(h=m(a,e.map(n),Xu)))(j)))},x.domain=function(j){return arguments.length?(e=Array.from(j,Zu),p()):e.slice()},x.range=function(j){return arguments.length?(a=Array.from(j),p()):a.slice()},x.rangeRound=function(j){return a=Array.from(j),r=u0,p()},x.clamp=function(j){return arguments.length?(c=j?!0:va,p()):c!==va},x.interpolate=function(j){return arguments.length?(r=j,p()):r},x.unknown=function(j){return arguments.length?(o=j,x):o},function(j,v){return n=j,i=v,p()}}function m0(){return Vm()(va,va)}function QI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function em(e,a){if((r=(e=a?e.toExponential(a-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function ii(e){return e=em(Math.abs(e)),e?e[1]:NaN}function XI(e,a){return function(r,n){for(var i=r.length,o=[],c=0,m=e[0],u=0;i>0&&m>0&&(u+m+1>n&&(m=Math.max(1,n-u)),o.push(r.substring(i-=m,i+m)),!((u+=m+1)>n));)m=e[c=(c+1)%e.length];return o.reverse().join(a)}}function ZI(e){return function(a){return a.replace(/[0-9]/g,function(r){return e[+r]})}}var eF=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nc(e){if(!(a=eF.exec(e)))throw new Error("invalid format: "+e);var a;return new f0({fill:a[1],align:a[2],sign:a[3],symbol:a[4],zero:a[5],width:a[6],comma:a[7],precision:a[8]&&a[8].slice(1),trim:a[9],type:a[10]})}nc.prototype=f0.prototype;function f0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}f0.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 tF(e){e:for(var a=e.length,r=1,n=-1,i;r<a;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Z4;function aF(e,a){var r=em(e,a);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Z4=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,c=n.length;return o===c?n:o>c?n+new Array(o-c+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+em(e,Math.max(0,a+o-1))[0]}function fA(e,a){var r=em(e,a);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const pA={"%":(e,a)=>(e*100).toFixed(a),b:e=>Math.round(e).toString(2),c:e=>e+"",d:QI,e:(e,a)=>e.toExponential(a),f:(e,a)=>e.toFixed(a),g:(e,a)=>e.toPrecision(a),o:e=>Math.round(e).toString(8),p:(e,a)=>fA(e*100,a),r:fA,s:aF,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function hA(e){return e}var xA=Array.prototype.map,gA=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rF(e){var a=e.grouping===void 0||e.thousands===void 0?hA:XI(xA.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?hA:ZI(xA.call(e.numerals,String)),c=e.percent===void 0?"%":e.percent+"",m=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function h(x){x=nc(x);var j=x.fill,v=x.align,w=x.sign,S=x.symbol,A=x.zero,g=x.width,C=x.comma,E=x.precision,O=x.trim,D=x.type;D==="n"?(C=!0,D="g"):pA[D]||(E===void 0&&(E=12),O=!0,D="g"),(A||j==="0"&&v==="=")&&(A=!0,j="0",v="=");var B=S==="$"?r:S==="#"&&/[boxX]/.test(D)?"0"+D.toLowerCase():"",L=S==="$"?n:/[%p]/.test(D)?c:"",T=pA[D],R=/[defgprs%]/.test(D);E=E===void 0?6:/[gprs]/.test(D)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function z(U){var X=B,fe=L,se,ie,V;if(D==="c")fe=T(U)+fe,U="";else{U=+U;var K=U<0||1/U<0;if(U=isNaN(U)?u:T(Math.abs(U),E),O&&(U=tF(U)),K&&+U==0&&w!=="+"&&(K=!1),X=(K?w==="("?w:m:w==="-"||w==="("?"":w)+X,fe=(D==="s"?gA[8+Z4/3]:"")+fe+(K&&w==="("?")":""),R){for(se=-1,ie=U.length;++se<ie;)if(V=U.charCodeAt(se),48>V||V>57){fe=(V===46?i+U.slice(se+1):U.slice(se))+fe,U=U.slice(0,se);break}}}C&&!A&&(U=a(U,1/0));var ce=X.length+U.length+fe.length,$=ce<g?new Array(g-ce+1).join(j):"";switch(C&&A&&(U=a($+U,$.length?g-fe.length:1/0),$=""),v){case"<":U=X+U+fe+$;break;case"=":U=X+$+U+fe;break;case"^":U=$.slice(0,ce=$.length>>1)+X+U+fe+$.slice(ce);break;default:U=$+X+U+fe;break}return o(U)}return z.toString=function(){return x+""},z}function p(x,j){var v=h((x=nc(x),x.type="f",x)),w=Math.max(-8,Math.min(8,Math.floor(ii(j)/3)))*3,S=Math.pow(10,-w),A=gA[8+w/3];return function(g){return v(S*g)+A}}return{format:h,formatPrefix:p}}var ou,p0,eE;nF({thousands:",",grouping:[3],currency:["$",""]});function nF(e){return ou=rF(e),p0=ou.format,eE=ou.formatPrefix,ou}function sF(e){return Math.max(0,-ii(Math.abs(e)))}function lF(e,a){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ii(a)/3)))*3-ii(Math.abs(e)))}function iF(e,a){return e=Math.abs(e),a=Math.abs(a)-e,Math.max(0,ii(a)-ii(e))+1}function tE(e,a,r,n){var i=eb(e,a,r),o;switch(n=nc(n??",f"),n.type){case"s":{var c=Math.max(Math.abs(e),Math.abs(a));return n.precision==null&&!isNaN(o=lF(i,c))&&(n.precision=o),eE(n,c)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=iF(i,Math.max(Math.abs(e),Math.abs(a))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=sF(i))&&(n.precision=o-(n.type==="%")*2);break}}return p0(n)}function js(e){var a=e.domain;return e.ticks=function(r){var n=a();return Xg(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=a();return tE(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=a(),i=0,o=n.length-1,c=n[i],m=n[o],u,h,p=10;for(m<c&&(h=c,c=m,m=h,h=i,i=o,o=h);p-- >0;){if(h=Zg(c,m,r),h===u)return n[i]=c,n[o]=m,a(n);if(h>0)c=Math.floor(c/h)*h,m=Math.ceil(m/h)*h;else if(h<0)c=Math.ceil(c*h)/h,m=Math.floor(m*h)/h;else break;u=h}return e},e}function aE(){var e=m0();return e.copy=function(){return jc(e,aE())},jr.apply(e,arguments),js(e)}function rE(e){var a;function r(n){return n==null||isNaN(n=+n)?a:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Zu),r):e.slice()},r.unknown=function(n){return arguments.length?(a=n,r):a},r.copy=function(){return rE(e).unknown(a)},e=arguments.length?Array.from(e,Zu):[0,1],js(r)}function nE(e,a){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],c;return o<i&&(c=r,r=n,n=c,c=i,i=o,o=c),e[r]=a.floor(i),e[n]=a.ceil(o),e}function bA(e){return Math.log(e)}function yA(e){return Math.exp(e)}function oF(e){return-Math.log(-e)}function cF(e){return-Math.exp(-e)}function dF(e){return isFinite(e)?+("1e"+e):e<0?0:e}function uF(e){return e===10?dF:e===Math.E?Math.exp:a=>Math.pow(e,a)}function mF(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),a=>Math.log(a)/e)}function vA(e){return(a,r)=>-e(-a,r)}function h0(e){const a=e(bA,yA),r=a.domain;let n=10,i,o;function c(){return i=mF(n),o=uF(n),r()[0]<0?(i=vA(i),o=vA(o),e(oF,cF)):e(bA,yA),a}return a.base=function(m){return arguments.length?(n=+m,c()):n},a.domain=function(m){return arguments.length?(r(m),c()):r()},a.ticks=m=>{const u=r();let h=u[0],p=u[u.length-1];const x=p<h;x&&([h,p]=[p,h]);let j=i(h),v=i(p),w,S;const A=m==null?10:+m;let g=[];if(!(n%1)&&v-j<A){if(j=Math.floor(j),v=Math.ceil(v),h>0){for(;j<=v;++j)for(w=1;w<n;++w)if(S=j<0?w/o(-j):w*o(j),!(S<h)){if(S>p)break;g.push(S)}}else for(;j<=v;++j)for(w=n-1;w>=1;--w)if(S=j>0?w/o(-j):w*o(j),!(S<h)){if(S>p)break;g.push(S)}g.length*2<A&&(g=Xg(h,p,A))}else g=Xg(j,v,Math.min(v-j,A)).map(o);return x?g.reverse():g},a.tickFormat=(m,u)=>{if(m==null&&(m=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=nc(u)).precision==null&&(u.trim=!0),u=p0(u)),m===1/0)return u;const h=Math.max(1,n*m/a.ticks().length);return p=>{let x=p/o(Math.round(i(p)));return x*n<n-.5&&(x*=n),x<=h?u(p):""}},a.nice=()=>r(nE(r(),{floor:m=>o(Math.floor(i(m))),ceil:m=>o(Math.ceil(i(m)))})),a}function sE(){const e=h0(Vm()).domain([1,10]);return e.copy=()=>jc(e,sE()).base(e.base()),jr.apply(e,arguments),e}function jA(e){return function(a){return Math.sign(a)*Math.log1p(Math.abs(a/e))}}function NA(e){return function(a){return Math.sign(a)*Math.expm1(Math.abs(a))*e}}function x0(e){var a=1,r=e(jA(a),NA(a));return r.constant=function(n){return arguments.length?e(jA(a=+n),NA(a)):a},js(r)}function lE(){var e=x0(Vm());return e.copy=function(){return jc(e,lE()).constant(e.constant())},jr.apply(e,arguments)}function wA(e){return function(a){return a<0?-Math.pow(-a,e):Math.pow(a,e)}}function fF(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function pF(e){return e<0?-e*e:e*e}function g0(e){var a=e(va,va),r=1;function n(){return r===1?e(va,va):r===.5?e(fF,pF):e(wA(r),wA(1/r))}return a.exponent=function(i){return arguments.length?(r=+i,n()):r},js(a)}function b0(){var e=g0(Vm());return e.copy=function(){return jc(e,b0()).exponent(e.exponent())},jr.apply(e,arguments),e}function hF(){return b0.apply(null,arguments).exponent(.5)}function AA(e){return Math.sign(e)*e*e}function xF(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function iE(){var e=m0(),a=[0,1],r=!1,n;function i(o){var c=xF(e(o));return isNaN(c)?n:r?Math.round(c):c}return i.invert=function(o){return e.invert(AA(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((a=Array.from(o,Zu)).map(AA)),i):a.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return iE(e.domain(),a).round(r).clamp(e.clamp()).unknown(n)},jr.apply(i,arguments),js(i)}function oE(){var e=[],a=[],r=[],n;function i(){var c=0,m=Math.max(1,a.length);for(r=new Array(m-1);++c<m;)r[c-1]=vI(e,c/m);return o}function o(c){return c==null||isNaN(c=+c)?n:a[yc(r,c)]}return o.invertExtent=function(c){var m=a.indexOf(c);return m<0?[NaN,NaN]:[m>0?r[m-1]:e[0],m<r.length?r[m]:e[e.length-1]]},o.domain=function(c){if(!arguments.length)return e.slice();e=[];for(let m of c)m!=null&&!isNaN(m=+m)&&e.push(m);return e.sort(fs),i()},o.range=function(c){return arguments.length?(a=Array.from(c),i()):a.slice()},o.unknown=function(c){return arguments.length?(n=c,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return oE().domain(e).range(a).unknown(n)},jr.apply(o,arguments)}function cE(){var e=0,a=1,r=1,n=[.5],i=[0,1],o;function c(u){return u!=null&&u<=u?i[yc(n,u,0,r)]:o}function m(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*a-(u-r)*e)/(r+1);return c}return c.domain=function(u){return arguments.length?([e,a]=u,e=+e,a=+a,m()):[e,a]},c.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,m()):i.slice()},c.invertExtent=function(u){var h=i.indexOf(u);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],a]:[n[h-1],n[h]]},c.unknown=function(u){return arguments.length&&(o=u),c},c.thresholds=function(){return n.slice()},c.copy=function(){return cE().domain([e,a]).range(i).unknown(o)},jr.apply(js(c),arguments)}function dE(){var e=[.5],a=[0,1],r,n=1;function i(o){return o!=null&&o<=o?a[yc(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,a.length-1),i):e.slice()},i.range=function(o){return arguments.length?(a=Array.from(o),n=Math.min(e.length,a.length-1),i):a.slice()},i.invertExtent=function(o){var c=a.indexOf(o);return[e[c-1],e[c]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return dE().domain(e).range(a).unknown(r)},jr.apply(i,arguments)}const eg=new Date,tg=new Date;function Lt(e,a,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),a(o,1),e(o),o),i.round=o=>{const c=i(o),m=i.ceil(o);return o-c<m-o?c:m},i.offset=(o,c)=>(a(o=new Date(+o),c==null?1:Math.floor(c)),o),i.range=(o,c,m)=>{const u=[];if(o=i.ceil(o),m=m==null?1:Math.floor(m),!(o<c)||!(m>0))return u;let h;do u.push(h=new Date(+o)),a(o,m),e(o);while(h<o&&o<c);return u},i.filter=o=>Lt(c=>{if(c>=c)for(;e(c),!o(c);)c.setTime(c-1)},(c,m)=>{if(c>=c)if(m<0)for(;++m<=0;)for(;a(c,-1),!o(c););else for(;--m>=0;)for(;a(c,1),!o(c););}),r&&(i.count=(o,c)=>(eg.setTime(+o),tg.setTime(+c),e(eg),e(tg),Math.floor(r(eg,tg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?c=>n(c)%o===0:c=>i.count(0,c)%o===0):i)),i}const tm=Lt(()=>{},(e,a)=>{e.setTime(+e+a)},(e,a)=>a-e);tm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Lt(a=>{a.setTime(Math.floor(a/e)*e)},(a,r)=>{a.setTime(+a+r*e)},(a,r)=>(r-a)/e):tm);tm.range;const gn=1e3,fr=gn*60,bn=fr*60,En=bn*24,y0=En*7,SA=En*30,ag=En*365,Js=Lt(e=>{e.setTime(e-e.getMilliseconds())},(e,a)=>{e.setTime(+e+a*gn)},(e,a)=>(a-e)/gn,e=>e.getUTCSeconds());Js.range;const v0=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gn)},(e,a)=>{e.setTime(+e+a*fr)},(e,a)=>(a-e)/fr,e=>e.getMinutes());v0.range;const j0=Lt(e=>{e.setUTCSeconds(0,0)},(e,a)=>{e.setTime(+e+a*fr)},(e,a)=>(a-e)/fr,e=>e.getUTCMinutes());j0.range;const N0=Lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*gn-e.getMinutes()*fr)},(e,a)=>{e.setTime(+e+a*bn)},(e,a)=>(a-e)/bn,e=>e.getHours());N0.range;const w0=Lt(e=>{e.setUTCMinutes(0,0,0)},(e,a)=>{e.setTime(+e+a*bn)},(e,a)=>(a-e)/bn,e=>e.getUTCHours());w0.range;const Nc=Lt(e=>e.setHours(0,0,0,0),(e,a)=>e.setDate(e.getDate()+a),(e,a)=>(a-e-(a.getTimezoneOffset()-e.getTimezoneOffset())*fr)/En,e=>e.getDate()-1);Nc.range;const Ym=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,a)=>{e.setUTCDate(e.getUTCDate()+a)},(e,a)=>(a-e)/En,e=>e.getUTCDate()-1);Ym.range;const uE=Lt(e=>{e.setUTCHours(0,0,0,0)},(e,a)=>{e.setUTCDate(e.getUTCDate()+a)},(e,a)=>(a-e)/En,e=>Math.floor(e/En));uE.range;function ul(e){return Lt(a=>{a.setDate(a.getDate()-(a.getDay()+7-e)%7),a.setHours(0,0,0,0)},(a,r)=>{a.setDate(a.getDate()+r*7)},(a,r)=>(r-a-(r.getTimezoneOffset()-a.getTimezoneOffset())*fr)/y0)}const Km=ul(0),am=ul(1),gF=ul(2),bF=ul(3),oi=ul(4),yF=ul(5),vF=ul(6);Km.range;am.range;gF.range;bF.range;oi.range;yF.range;vF.range;function ml(e){return Lt(a=>{a.setUTCDate(a.getUTCDate()-(a.getUTCDay()+7-e)%7),a.setUTCHours(0,0,0,0)},(a,r)=>{a.setUTCDate(a.getUTCDate()+r*7)},(a,r)=>(r-a)/y0)}const Gm=ml(0),rm=ml(1),jF=ml(2),NF=ml(3),ci=ml(4),wF=ml(5),AF=ml(6);Gm.range;rm.range;jF.range;NF.range;ci.range;wF.range;AF.range;const A0=Lt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,a)=>{e.setMonth(e.getMonth()+a)},(e,a)=>a.getMonth()-e.getMonth()+(a.getFullYear()-e.getFullYear())*12,e=>e.getMonth());A0.range;const S0=Lt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,a)=>{e.setUTCMonth(e.getUTCMonth()+a)},(e,a)=>a.getUTCMonth()-e.getUTCMonth()+(a.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());S0.range;const kn=Lt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,a)=>{e.setFullYear(e.getFullYear()+a)},(e,a)=>a.getFullYear()-e.getFullYear(),e=>e.getFullYear());kn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(a=>{a.setFullYear(Math.floor(a.getFullYear()/e)*e),a.setMonth(0,1),a.setHours(0,0,0,0)},(a,r)=>{a.setFullYear(a.getFullYear()+r*e)});kn.range;const On=Lt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,a)=>{e.setUTCFullYear(e.getUTCFullYear()+a)},(e,a)=>a.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());On.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Lt(a=>{a.setUTCFullYear(Math.floor(a.getUTCFullYear()/e)*e),a.setUTCMonth(0,1),a.setUTCHours(0,0,0,0)},(a,r)=>{a.setUTCFullYear(a.getUTCFullYear()+r*e)});On.range;function mE(e,a,r,n,i,o){const c=[[Js,1,gn],[Js,5,5*gn],[Js,15,15*gn],[Js,30,30*gn],[o,1,fr],[o,5,5*fr],[o,15,15*fr],[o,30,30*fr],[i,1,bn],[i,3,3*bn],[i,6,6*bn],[i,12,12*bn],[n,1,En],[n,2,2*En],[r,1,y0],[a,1,SA],[a,3,3*SA],[e,1,ag]];function m(h,p,x){const j=p<h;j&&([h,p]=[p,h]);const v=x&&typeof x.range=="function"?x:u(h,p,x),w=v?v.range(h,+p+1):[];return j?w.reverse():w}function u(h,p,x){const j=Math.abs(p-h)/x,v=l0(([,,A])=>A).right(c,j);if(v===c.length)return e.every(eb(h/ag,p/ag,x));if(v===0)return tm.every(Math.max(eb(h,p,x),1));const[w,S]=c[j/c[v-1][2]<c[v][2]/j?v-1:v];return w.every(S)}return[m,u]}const[SF,CF]=mE(On,S0,Gm,uE,w0,j0),[EF,kF]=mE(kn,A0,Km,Nc,N0,v0);function rg(e){if(0<=e.y&&e.y<100){var a=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return a.setFullYear(e.y),a}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ng(e){if(0<=e.y&&e.y<100){var a=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return a.setUTCFullYear(e.y),a}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Lo(e,a,r){return{y:e,m:a,d:r,H:0,M:0,S:0,L:0}}function OF(e){var a=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,c=e.shortDays,m=e.months,u=e.shortMonths,h=Bo(i),p=Io(i),x=Bo(o),j=Io(o),v=Bo(c),w=Io(c),S=Bo(m),A=Io(m),g=Bo(u),C=Io(u),E={a:K,A:ce,b:$,B:I,c:null,d:TA,e:TA,f:XF,g:o9,G:d9,H:JF,I:WF,j:QF,L:fE,m:ZF,M:e9,p:P,q:H,Q:MA,s:_A,S:t9,u:a9,U:r9,V:n9,w:s9,W:l9,x:null,X:null,y:i9,Y:c9,Z:u9,"%":PA},O={a:ee,A:pe,b:ve,B:ue,c:null,d:RA,e:RA,f:h9,g:S9,G:E9,H:m9,I:f9,j:p9,L:hE,m:x9,M:g9,p:he,q:te,Q:MA,s:_A,S:b9,u:y9,U:v9,V:j9,w:N9,W:w9,x:null,X:null,y:A9,Y:C9,Z:k9,"%":PA},D={a:z,A:U,b:X,B:fe,c:se,d:OA,e:OA,f:VF,g:kA,G:EA,H:DA,I:DA,j:UF,L:HF,m:FF,M:$F,p:R,q:IF,Q:KF,s:GF,S:qF,u:MF,U:_F,V:zF,w:PF,W:LF,x:ie,X:V,y:kA,Y:EA,Z:BF,"%":YF};E.x=B(r,E),E.X=B(n,E),E.c=B(a,E),O.x=B(r,O),O.X=B(n,O),O.c=B(a,O);function B(G,xe){return function(Ne){var ne=[],Me=-1,je=0,ke=G.length,Ce,Ke,dt;for(Ne instanceof Date||(Ne=new Date(+Ne));++Me<ke;)G.charCodeAt(Me)===37&&(ne.push(G.slice(je,Me)),(Ke=CA[Ce=G.charAt(++Me)])!=null?Ce=G.charAt(++Me):Ke=Ce==="e"?" ":"0",(dt=xe[Ce])&&(Ce=dt(Ne,Ke)),ne.push(Ce),je=Me+1);return ne.push(G.slice(je,Me)),ne.join("")}}function L(G,xe){return function(Ne){var ne=Lo(1900,void 0,1),Me=T(ne,G,Ne+="",0),je,ke;if(Me!=Ne.length)return null;if("Q"in ne)return new Date(ne.Q);if("s"in ne)return new Date(ne.s*1e3+("L"in ne?ne.L:0));if(xe&&!("Z"in ne)&&(ne.Z=0),"p"in ne&&(ne.H=ne.H%12+ne.p*12),ne.m===void 0&&(ne.m="q"in ne?ne.q:0),"V"in ne){if(ne.V<1||ne.V>53)return null;"w"in ne||(ne.w=1),"Z"in ne?(je=ng(Lo(ne.y,0,1)),ke=je.getUTCDay(),je=ke>4||ke===0?rm.ceil(je):rm(je),je=Ym.offset(je,(ne.V-1)*7),ne.y=je.getUTCFullYear(),ne.m=je.getUTCMonth(),ne.d=je.getUTCDate()+(ne.w+6)%7):(je=rg(Lo(ne.y,0,1)),ke=je.getDay(),je=ke>4||ke===0?am.ceil(je):am(je),je=Nc.offset(je,(ne.V-1)*7),ne.y=je.getFullYear(),ne.m=je.getMonth(),ne.d=je.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),ke="Z"in ne?ng(Lo(ne.y,0,1)).getUTCDay():rg(Lo(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(ke+5)%7:ne.w+ne.U*7-(ke+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,ng(ne)):rg(ne)}}function T(G,xe,Ne,ne){for(var Me=0,je=xe.length,ke=Ne.length,Ce,Ke;Me<je;){if(ne>=ke)return-1;if(Ce=xe.charCodeAt(Me++),Ce===37){if(Ce=xe.charAt(Me++),Ke=D[Ce in CA?xe.charAt(Me++):Ce],!Ke||(ne=Ke(G,Ne,ne))<0)return-1}else if(Ce!=Ne.charCodeAt(ne++))return-1}return ne}function R(G,xe,Ne){var ne=h.exec(xe.slice(Ne));return ne?(G.p=p.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function z(G,xe,Ne){var ne=v.exec(xe.slice(Ne));return ne?(G.w=w.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function U(G,xe,Ne){var ne=x.exec(xe.slice(Ne));return ne?(G.w=j.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function X(G,xe,Ne){var ne=g.exec(xe.slice(Ne));return ne?(G.m=C.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function fe(G,xe,Ne){var ne=S.exec(xe.slice(Ne));return ne?(G.m=A.get(ne[0].toLowerCase()),Ne+ne[0].length):-1}function se(G,xe,Ne){return T(G,a,xe,Ne)}function ie(G,xe,Ne){return T(G,r,xe,Ne)}function V(G,xe,Ne){return T(G,n,xe,Ne)}function K(G){return c[G.getDay()]}function ce(G){return o[G.getDay()]}function $(G){return u[G.getMonth()]}function I(G){return m[G.getMonth()]}function P(G){return i[+(G.getHours()>=12)]}function H(G){return 1+~~(G.getMonth()/3)}function ee(G){return c[G.getUTCDay()]}function pe(G){return o[G.getUTCDay()]}function ve(G){return u[G.getUTCMonth()]}function ue(G){return m[G.getUTCMonth()]}function he(G){return i[+(G.getUTCHours()>=12)]}function te(G){return 1+~~(G.getUTCMonth()/3)}return{format:function(G){var xe=B(G+="",E);return xe.toString=function(){return G},xe},parse:function(G){var xe=L(G+="",!1);return xe.toString=function(){return G},xe},utcFormat:function(G){var xe=B(G+="",O);return xe.toString=function(){return G},xe},utcParse:function(G){var xe=L(G+="",!0);return xe.toString=function(){return G},xe}}}var CA={"-":"",_:" ",0:"0"},Xt=/^\s*\d+/,DF=/^%/,TF=/[\\^$*+?|[\]().{}]/g;function Qe(e,a,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(a)+i:i)}function RF(e){return e.replace(TF,"\\$&")}function Bo(e){return new RegExp("^(?:"+e.map(RF).join("|")+")","i")}function Io(e){return new Map(e.map((a,r)=>[a.toLowerCase(),r]))}function PF(e,a,r){var n=Xt.exec(a.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function MF(e,a,r){var n=Xt.exec(a.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function _F(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function zF(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function LF(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function EA(e,a,r){var n=Xt.exec(a.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function kA(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function BF(e,a,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(a.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function IF(e,a,r){var n=Xt.exec(a.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function FF(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function OA(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function UF(e,a,r){var n=Xt.exec(a.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function DA(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function $F(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function qF(e,a,r){var n=Xt.exec(a.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function HF(e,a,r){var n=Xt.exec(a.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function VF(e,a,r){var n=Xt.exec(a.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function YF(e,a,r){var n=DF.exec(a.slice(r,r+1));return n?r+n[0].length:-1}function KF(e,a,r){var n=Xt.exec(a.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function GF(e,a,r){var n=Xt.exec(a.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function TA(e,a){return Qe(e.getDate(),a,2)}function JF(e,a){return Qe(e.getHours(),a,2)}function WF(e,a){return Qe(e.getHours()%12||12,a,2)}function QF(e,a){return Qe(1+Nc.count(kn(e),e),a,3)}function fE(e,a){return Qe(e.getMilliseconds(),a,3)}function XF(e,a){return fE(e,a)+"000"}function ZF(e,a){return Qe(e.getMonth()+1,a,2)}function e9(e,a){return Qe(e.getMinutes(),a,2)}function t9(e,a){return Qe(e.getSeconds(),a,2)}function a9(e){var a=e.getDay();return a===0?7:a}function r9(e,a){return Qe(Km.count(kn(e)-1,e),a,2)}function pE(e){var a=e.getDay();return a>=4||a===0?oi(e):oi.ceil(e)}function n9(e,a){return e=pE(e),Qe(oi.count(kn(e),e)+(kn(e).getDay()===4),a,2)}function s9(e){return e.getDay()}function l9(e,a){return Qe(am.count(kn(e)-1,e),a,2)}function i9(e,a){return Qe(e.getFullYear()%100,a,2)}function o9(e,a){return e=pE(e),Qe(e.getFullYear()%100,a,2)}function c9(e,a){return Qe(e.getFullYear()%1e4,a,4)}function d9(e,a){var r=e.getDay();return e=r>=4||r===0?oi(e):oi.ceil(e),Qe(e.getFullYear()%1e4,a,4)}function u9(e){var a=e.getTimezoneOffset();return(a>0?"-":(a*=-1,"+"))+Qe(a/60|0,"0",2)+Qe(a%60,"0",2)}function RA(e,a){return Qe(e.getUTCDate(),a,2)}function m9(e,a){return Qe(e.getUTCHours(),a,2)}function f9(e,a){return Qe(e.getUTCHours()%12||12,a,2)}function p9(e,a){return Qe(1+Ym.count(On(e),e),a,3)}function hE(e,a){return Qe(e.getUTCMilliseconds(),a,3)}function h9(e,a){return hE(e,a)+"000"}function x9(e,a){return Qe(e.getUTCMonth()+1,a,2)}function g9(e,a){return Qe(e.getUTCMinutes(),a,2)}function b9(e,a){return Qe(e.getUTCSeconds(),a,2)}function y9(e){var a=e.getUTCDay();return a===0?7:a}function v9(e,a){return Qe(Gm.count(On(e)-1,e),a,2)}function xE(e){var a=e.getUTCDay();return a>=4||a===0?ci(e):ci.ceil(e)}function j9(e,a){return e=xE(e),Qe(ci.count(On(e),e)+(On(e).getUTCDay()===4),a,2)}function N9(e){return e.getUTCDay()}function w9(e,a){return Qe(rm.count(On(e)-1,e),a,2)}function A9(e,a){return Qe(e.getUTCFullYear()%100,a,2)}function S9(e,a){return e=xE(e),Qe(e.getUTCFullYear()%100,a,2)}function C9(e,a){return Qe(e.getUTCFullYear()%1e4,a,4)}function E9(e,a){var r=e.getUTCDay();return e=r>=4||r===0?ci(e):ci.ceil(e),Qe(e.getUTCFullYear()%1e4,a,4)}function k9(){return"+0000"}function PA(){return"%"}function MA(e){return+e}function _A(e){return Math.floor(+e/1e3)}var Xl,gE,bE;O9({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 O9(e){return Xl=OF(e),gE=Xl.format,Xl.parse,bE=Xl.utcFormat,Xl.utcParse,Xl}function D9(e){return new Date(e)}function T9(e){return e instanceof Date?+e:+new Date(+e)}function C0(e,a,r,n,i,o,c,m,u,h){var p=m0(),x=p.invert,j=p.domain,v=h(".%L"),w=h(":%S"),S=h("%I:%M"),A=h("%I %p"),g=h("%a %d"),C=h("%b %d"),E=h("%B"),O=h("%Y");function D(B){return(u(B)<B?v:m(B)<B?w:c(B)<B?S:o(B)<B?A:n(B)<B?i(B)<B?g:C:r(B)<B?E:O)(B)}return p.invert=function(B){return new Date(x(B))},p.domain=function(B){return arguments.length?j(Array.from(B,T9)):j().map(D9)},p.ticks=function(B){var L=j();return e(L[0],L[L.length-1],B??10)},p.tickFormat=function(B,L){return L==null?D:h(L)},p.nice=function(B){var L=j();return(!B||typeof B.range!="function")&&(B=a(L[0],L[L.length-1],B??10)),B?j(nE(L,B)):p},p.copy=function(){return jc(p,C0(e,a,r,n,i,o,c,m,u,h))},p}function R9(){return jr.apply(C0(EF,kF,kn,A0,Km,Nc,N0,v0,Js,gE).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function P9(){return jr.apply(C0(SF,CF,On,S0,Gm,Ym,w0,j0,Js,bE).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Jm(){var e=0,a=1,r,n,i,o,c=va,m=!1,u;function h(x){return x==null||isNaN(x=+x)?u:c(i===0?.5:(x=(o(x)-r)*i,m?Math.max(0,Math.min(1,x)):x))}h.domain=function(x){return arguments.length?([e,a]=x,r=o(e=+e),n=o(a=+a),i=r===n?0:1/(n-r),h):[e,a]},h.clamp=function(x){return arguments.length?(m=!!x,h):m},h.interpolator=function(x){return arguments.length?(c=x,h):c};function p(x){return function(j){var v,w;return arguments.length?([v,w]=j,c=x(v,w),h):[c(0),c(1)]}}return h.range=p(Ni),h.rangeRound=p(u0),h.unknown=function(x){return arguments.length?(u=x,h):u},function(x){return o=x,r=x(e),n=x(a),i=r===n?0:1/(n-r),h}}function Ns(e,a){return a.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function yE(){var e=js(Jm()(va));return e.copy=function(){return Ns(e,yE())},_n.apply(e,arguments)}function vE(){var e=h0(Jm()).domain([1,10]);return e.copy=function(){return Ns(e,vE()).base(e.base())},_n.apply(e,arguments)}function jE(){var e=x0(Jm());return e.copy=function(){return Ns(e,jE()).constant(e.constant())},_n.apply(e,arguments)}function E0(){var e=g0(Jm());return e.copy=function(){return Ns(e,E0()).exponent(e.exponent())},_n.apply(e,arguments)}function M9(){return E0.apply(null,arguments).exponent(.5)}function NE(){var e=[],a=va;function r(n){if(n!=null&&!isNaN(n=+n))return a((yc(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(fs),r},r.interpolator=function(n){return arguments.length?(a=n,r):a},r.range=function(){return e.map((n,i)=>a(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>yI(e,o/n))},r.copy=function(){return NE(a).domain(e)},_n.apply(r,arguments)}function Wm(){var e=0,a=.5,r=1,n=1,i,o,c,m,u,h=va,p,x=!1,j;function v(S){return isNaN(S=+S)?j:(S=.5+((S=+p(S))-o)*(n*S<n*o?m:u),h(x?Math.max(0,Math.min(1,S)):S))}v.domain=function(S){return arguments.length?([e,a,r]=S,i=p(e=+e),o=p(a=+a),c=p(r=+r),m=i===o?0:.5/(o-i),u=o===c?0:.5/(c-o),n=o<i?-1:1,v):[e,a,r]},v.clamp=function(S){return arguments.length?(x=!!S,v):x},v.interpolator=function(S){return arguments.length?(h=S,v):h};function w(S){return function(A){var g,C,E;return arguments.length?([g,C,E]=A,h=YI(S,[g,C,E]),v):[h(0),h(.5),h(1)]}}return v.range=w(Ni),v.rangeRound=w(u0),v.unknown=function(S){return arguments.length?(j=S,v):j},function(S){return p=S,i=S(e),o=S(a),c=S(r),m=i===o?0:.5/(o-i),u=o===c?0:.5/(c-o),n=o<i?-1:1,v}}function wE(){var e=js(Wm()(va));return e.copy=function(){return Ns(e,wE())},_n.apply(e,arguments)}function AE(){var e=h0(Wm()).domain([.1,1,10]);return e.copy=function(){return Ns(e,AE()).base(e.base())},_n.apply(e,arguments)}function SE(){var e=x0(Wm());return e.copy=function(){return Ns(e,SE()).constant(e.constant())},_n.apply(e,arguments)}function k0(){var e=g0(Wm());return e.copy=function(){return Ns(e,k0()).exponent(e.exponent())},_n.apply(e,arguments)}function _9(){return k0.apply(null,arguments).exponent(.5)}const $o=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:o0,scaleDiverging:wE,scaleDivergingLog:AE,scaleDivergingPow:k0,scaleDivergingSqrt:_9,scaleDivergingSymlog:SE,scaleIdentity:rE,scaleImplicit:tb,scaleLinear:aE,scaleLog:sE,scaleOrdinal:i0,scalePoint:NI,scalePow:b0,scaleQuantile:oE,scaleQuantize:cE,scaleRadial:iE,scaleSequential:yE,scaleSequentialLog:vE,scaleSequentialPow:E0,scaleSequentialQuantile:NE,scaleSequentialSqrt:M9,scaleSequentialSymlog:jE,scaleSqrt:hF,scaleSymlog:lE,scaleThreshold:dE,scaleTime:R9,scaleUtc:P9,tickFormat:tE},Symbol.toStringTag,{value:"Module"}));var ws=e=>e.chartData,z9=le([ws],e=>{var a=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:a,dataStartIndex:0}}),O0=(e,a,r,n)=>n?z9(e):ws(e);function ll(e){if(Array.isArray(e)&&e.length===2){var[a,r]=e;if(fa(a)&&fa(r))return!0}return!1}function zA(e,a,r){return r?e:[Math.min(e[0],a[0]),Math.max(e[1],a[1])]}function CE(e,a){if(a&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,o;if(fa(r))i=r;else if(typeof r=="function")return;if(fa(n))o=n;else if(typeof n=="function")return;var c=[i,o];if(ll(c))return c}}function L9(e,a,r){if(!(!r&&a==null)){if(typeof e=="function"&&a!=null)try{var n=e(a,r);if(ll(n))return zA(n,a,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,c,m;if(i==="auto")a!=null&&(c=Math.min(...a));else if(De(i))c=i;else if(typeof i=="function")try{a!=null&&(c=i(a?.[0]))}catch{}else if(typeof i=="string"&&j1.test(i)){var u=j1.exec(i);if(u==null||a==null)c=void 0;else{var h=+u[1];c=a[0]-h}}else c=a?.[0];if(o==="auto")a!=null&&(m=Math.max(...a));else if(De(o))m=o;else if(typeof o=="function")try{a!=null&&(m=o(a?.[1]))}catch{}else if(typeof o=="string"&&N1.test(o)){var p=N1.exec(o);if(p==null||a==null)m=void 0;else{var x=+p[1];m=a[1]+x}}else m=a?.[1];var j=[c,m];if(ll(j))return a==null?j:zA(j,a,r)}}}var wi=1e9,B9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},T0,yt=!0,gr="[DecimalError] ",al=gr+"Invalid argument: ",D0=gr+"Exponent out of range: ",Ai=Math.floor,Vs=Math.pow,I9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ka,Yt=1e7,ht=7,EE=9007199254740991,nm=Ai(EE/ht),Ae={};Ae.absoluteValue=Ae.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ae.comparedTo=Ae.cmp=function(e){var a,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,a=0,r=n<i?n:i;a<r;++a)if(o.d[a]!==e.d[a])return o.d[a]>e.d[a]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};Ae.decimalPlaces=Ae.dp=function(){var e=this,a=e.d.length-1,r=(a-e.e)*ht;if(a=e.d[a],a)for(;a%10==0;a/=10)r--;return r<0?0:r};Ae.dividedBy=Ae.div=function(e){return jn(this,new this.constructor(e))};Ae.dividedToIntegerBy=Ae.idiv=function(e){var a=this,r=a.constructor;return ct(jn(a,new r(e),0,1),r.precision)};Ae.equals=Ae.eq=function(e){return!this.cmp(e)};Ae.exponent=function(){return Pt(this)};Ae.greaterThan=Ae.gt=function(e){return this.cmp(e)>0};Ae.greaterThanOrEqualTo=Ae.gte=function(e){return this.cmp(e)>=0};Ae.isInteger=Ae.isint=function(){return this.e>this.d.length-2};Ae.isNegative=Ae.isneg=function(){return this.s<0};Ae.isPositive=Ae.ispos=function(){return this.s>0};Ae.isZero=function(){return this.s===0};Ae.lessThan=Ae.lt=function(e){return this.cmp(e)<0};Ae.lessThanOrEqualTo=Ae.lte=function(e){return this.cmp(e)<1};Ae.logarithm=Ae.log=function(e){var a,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Ka))throw Error(gr+"NaN");if(r.s<1)throw Error(gr+(r.s?"NaN":"-Infinity"));return r.eq(Ka)?new n(0):(yt=!1,a=jn(sc(r,o),sc(e,o),o),yt=!0,ct(a,i))};Ae.minus=Ae.sub=function(e){var a=this;return e=new a.constructor(e),a.s==e.s?DE(a,e):kE(a,(e.s=-e.s,e))};Ae.modulo=Ae.mod=function(e){var a,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(gr+"NaN");return r.s?(yt=!1,a=jn(r,e,0,1).times(e),yt=!0,r.minus(a)):ct(new n(r),i)};Ae.naturalExponential=Ae.exp=function(){return OE(this)};Ae.naturalLogarithm=Ae.ln=function(){return sc(this)};Ae.negated=Ae.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ae.plus=Ae.add=function(e){var a=this;return e=new a.constructor(e),a.s==e.s?kE(a,e):DE(a,(e.s=-e.s,e))};Ae.precision=Ae.sd=function(e){var a,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(al+e);if(a=Pt(i)+1,n=i.d.length-1,r=n*ht+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&a>r?a:r};Ae.squareRoot=Ae.sqrt=function(){var e,a,r,n,i,o,c,m=this,u=m.constructor;if(m.s<1){if(!m.s)return new u(0);throw Error(gr+"NaN")}for(e=Pt(m),yt=!1,i=Math.sqrt(+m),i==0||i==1/0?(a=$r(m.d),(a.length+e)%2==0&&(a+="0"),i=Math.sqrt(a),e=Ai((e+1)/2)-(e<0||e%2),i==1/0?a="5e"+e:(a=i.toExponential(),a=a.slice(0,a.indexOf("e")+1)+e),n=new u(a)):n=new u(i.toString()),r=u.precision,i=c=r+3;;)if(o=n,n=o.plus(jn(m,o,c+2)).times(.5),$r(o.d).slice(0,c)===(a=$r(n.d)).slice(0,c)){if(a=a.slice(c-3,c+1),i==c&&a=="4999"){if(ct(o,r+1,0),o.times(o).eq(m)){n=o;break}}else if(a!="9999")break;c+=4}return yt=!0,ct(n,r)};Ae.times=Ae.mul=function(e){var a,r,n,i,o,c,m,u,h,p=this,x=p.constructor,j=p.d,v=(e=new x(e)).d;if(!p.s||!e.s)return new x(0);for(e.s*=p.s,r=p.e+e.e,u=j.length,h=v.length,u<h&&(o=j,j=v,v=o,c=u,u=h,h=c),o=[],c=u+h,n=c;n--;)o.push(0);for(n=h;--n>=0;){for(a=0,i=u+n;i>n;)m=o[i]+v[n]*j[i-n-1]+a,o[i--]=m%Yt|0,a=m/Yt|0;o[i]=(o[i]+a)%Yt|0}for(;!o[--c];)o.pop();return a?++r:o.shift(),e.d=o,e.e=r,yt?ct(e,x.precision):e};Ae.toDecimalPlaces=Ae.todp=function(e,a){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Vr(e,0,wi),a===void 0?a=n.rounding:Vr(a,0,8),ct(r,e+Pt(r)+1,a))};Ae.toExponential=function(e,a){var r,n=this,i=n.constructor;return e===void 0?r=il(n,!0):(Vr(e,0,wi),a===void 0?a=i.rounding:Vr(a,0,8),n=ct(new i(n),e+1,a),r=il(n,!0,e+1)),r};Ae.toFixed=function(e,a){var r,n,i=this,o=i.constructor;return e===void 0?il(i):(Vr(e,0,wi),a===void 0?a=o.rounding:Vr(a,0,8),n=ct(new o(i),e+Pt(i)+1,a),r=il(n.abs(),!1,e+Pt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Ae.toInteger=Ae.toint=function(){var e=this,a=e.constructor;return ct(new a(e),Pt(e)+1,a.rounding)};Ae.toNumber=function(){return+this};Ae.toPower=Ae.pow=function(e){var a,r,n,i,o,c,m=this,u=m.constructor,h=12,p=+(e=new u(e));if(!e.s)return new u(Ka);if(m=new u(m),!m.s){if(e.s<1)throw Error(gr+"Infinity");return m}if(m.eq(Ka))return m;if(n=u.precision,e.eq(Ka))return ct(m,n);if(a=e.e,r=e.d.length-1,c=a>=r,o=m.s,c){if((r=p<0?-p:p)<=EE){for(i=new u(Ka),a=Math.ceil(n/ht+4),yt=!1;r%2&&(i=i.times(m),BA(i.d,a)),r=Ai(r/2),r!==0;)m=m.times(m),BA(m.d,a);return yt=!0,e.s<0?new u(Ka).div(i):ct(i,n)}}else if(o<0)throw Error(gr+"NaN");return o=o<0&&e.d[Math.max(a,r)]&1?-1:1,m.s=1,yt=!1,i=e.times(sc(m,n+h)),yt=!0,i=OE(i),i.s=o,i};Ae.toPrecision=function(e,a){var r,n,i=this,o=i.constructor;return e===void 0?(r=Pt(i),n=il(i,r<=o.toExpNeg||r>=o.toExpPos)):(Vr(e,1,wi),a===void 0?a=o.rounding:Vr(a,0,8),i=ct(new o(i),e,a),r=Pt(i),n=il(i,e<=r||r<=o.toExpNeg,e)),n};Ae.toSignificantDigits=Ae.tosd=function(e,a){var r=this,n=r.constructor;return e===void 0?(e=n.precision,a=n.rounding):(Vr(e,1,wi),a===void 0?a=n.rounding:Vr(a,0,8)),ct(new n(r),e,a)};Ae.toString=Ae.valueOf=Ae.val=Ae.toJSON=Ae[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,a=Pt(e),r=e.constructor;return il(e,a<=r.toExpNeg||a>=r.toExpPos)};function kE(e,a){var r,n,i,o,c,m,u,h,p=e.constructor,x=p.precision;if(!e.s||!a.s)return a.s||(a=new p(e)),yt?ct(a,x):a;if(u=e.d,h=a.d,c=e.e,i=a.e,u=u.slice(),o=c-i,o){for(o<0?(n=u,o=-o,m=h.length):(n=h,i=c,m=u.length),c=Math.ceil(x/ht),m=c>m?c+1:m+1,o>m&&(o=m,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(m=u.length,o=h.length,m-o<0&&(o=m,n=h,h=u,u=n),r=0;o;)r=(u[--o]=u[o]+h[o]+r)/Yt|0,u[o]%=Yt;for(r&&(u.unshift(r),++i),m=u.length;u[--m]==0;)u.pop();return a.d=u,a.e=i,yt?ct(a,x):a}function Vr(e,a,r){if(e!==~~e||e<a||e>r)throw Error(al+e)}function $r(e){var a,r,n,i=e.length-1,o="",c=e[0];if(i>0){for(o+=c,a=1;a<i;a++)n=e[a]+"",r=ht-n.length,r&&(o+=cs(r)),o+=n;c=e[a],n=c+"",r=ht-n.length,r&&(o+=cs(r))}else if(c===0)return"0";for(;c%10===0;)c/=10;return o+c}var jn=(function(){function e(n,i){var o,c=0,m=n.length;for(n=n.slice();m--;)o=n[m]*i+c,n[m]=o%Yt|0,c=o/Yt|0;return c&&n.unshift(c),n}function a(n,i,o,c){var m,u;if(o!=c)u=o>c?1:-1;else for(m=u=0;m<o;m++)if(n[m]!=i[m]){u=n[m]>i[m]?1:-1;break}return u}function r(n,i,o){for(var c=0;o--;)n[o]-=c,c=n[o]<i[o]?1:0,n[o]=c*Yt+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,c){var m,u,h,p,x,j,v,w,S,A,g,C,E,O,D,B,L,T,R=n.constructor,z=n.s==i.s?1:-1,U=n.d,X=i.d;if(!n.s)return new R(n);if(!i.s)throw Error(gr+"Division by zero");for(u=n.e-i.e,L=X.length,D=U.length,v=new R(z),w=v.d=[],h=0;X[h]==(U[h]||0);)++h;if(X[h]>(U[h]||0)&&--u,o==null?C=o=R.precision:c?C=o+(Pt(n)-Pt(i))+1:C=o,C<0)return new R(0);if(C=C/ht+2|0,h=0,L==1)for(p=0,X=X[0],C++;(h<D||p)&&C--;h++)E=p*Yt+(U[h]||0),w[h]=E/X|0,p=E%X|0;else{for(p=Yt/(X[0]+1)|0,p>1&&(X=e(X,p),U=e(U,p),L=X.length,D=U.length),O=L,S=U.slice(0,L),A=S.length;A<L;)S[A++]=0;T=X.slice(),T.unshift(0),B=X[0],X[1]>=Yt/2&&++B;do p=0,m=a(X,S,L,A),m<0?(g=S[0],L!=A&&(g=g*Yt+(S[1]||0)),p=g/B|0,p>1?(p>=Yt&&(p=Yt-1),x=e(X,p),j=x.length,A=S.length,m=a(x,S,j,A),m==1&&(p--,r(x,L<j?T:X,j))):(p==0&&(m=p=1),x=X.slice()),j=x.length,j<A&&x.unshift(0),r(S,x,A),m==-1&&(A=S.length,m=a(X,S,L,A),m<1&&(p++,r(S,L<A?T:X,A))),A=S.length):m===0&&(p++,S=[0]),w[h++]=p,m&&S[0]?S[A++]=U[O]||0:(S=[U[O]],A=1);while((O++<D||S[0]!==void 0)&&C--)}return w[0]||w.shift(),v.e=u,ct(v,c?o+Pt(v)+1:o)}})();function OE(e,a){var r,n,i,o,c,m,u=0,h=0,p=e.constructor,x=p.precision;if(Pt(e)>16)throw Error(D0+Pt(e));if(!e.s)return new p(Ka);for(yt=!1,m=x,c=new p(.03125);e.abs().gte(.1);)e=e.times(c),h+=5;for(n=Math.log(Vs(2,h))/Math.LN10*2+5|0,m+=n,r=i=o=new p(Ka),p.precision=m;;){if(i=ct(i.times(e),m),r=r.times(++u),c=o.plus(jn(i,r,m)),$r(c.d).slice(0,m)===$r(o.d).slice(0,m)){for(;h--;)o=ct(o.times(o),m);return p.precision=x,a==null?(yt=!0,ct(o,x)):o}o=c}}function Pt(e){for(var a=e.e*ht,r=e.d[0];r>=10;r/=10)a++;return a}function sg(e,a,r){if(a>e.LN10.sd())throw yt=!0,r&&(e.precision=r),Error(gr+"LN10 precision limit exceeded");return ct(new e(e.LN10),a)}function cs(e){for(var a="";e--;)a+="0";return a}function sc(e,a){var r,n,i,o,c,m,u,h,p,x=1,j=10,v=e,w=v.d,S=v.constructor,A=S.precision;if(v.s<1)throw Error(gr+(v.s?"NaN":"-Infinity"));if(v.eq(Ka))return new S(0);if(a==null?(yt=!1,h=A):h=a,v.eq(10))return a==null&&(yt=!0),sg(S,h);if(h+=j,S.precision=h,r=$r(w),n=r.charAt(0),o=Pt(v),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(e),r=$r(v.d),n=r.charAt(0),x++;o=Pt(v),n>1?(v=new S("0."+r),o++):v=new S(n+"."+r.slice(1))}else return u=sg(S,h+2,A).times(o+""),v=sc(new S(n+"."+r.slice(1)),h-j).plus(u),S.precision=A,a==null?(yt=!0,ct(v,A)):v;for(m=c=v=jn(v.minus(Ka),v.plus(Ka),h),p=ct(v.times(v),h),i=3;;){if(c=ct(c.times(p),h),u=m.plus(jn(c,new S(i),h)),$r(u.d).slice(0,h)===$r(m.d).slice(0,h))return m=m.times(2),o!==0&&(m=m.plus(sg(S,h+2,A).times(o+""))),m=jn(m,new S(x),h),S.precision=A,a==null?(yt=!0,ct(m,A)):m;m=u,i+=2}}function LA(e,a){var r,n,i;for((r=a.indexOf("."))>-1&&(a=a.replace(".","")),(n=a.search(/e/i))>0?(r<0&&(r=n),r+=+a.slice(n+1),a=a.substring(0,n)):r<0&&(r=a.length),n=0;a.charCodeAt(n)===48;)++n;for(i=a.length;a.charCodeAt(i-1)===48;)--i;if(a=a.slice(n,i),a){if(i-=n,r=r-n-1,e.e=Ai(r/ht),e.d=[],n=(r+1)%ht,r<0&&(n+=ht),n<i){for(n&&e.d.push(+a.slice(0,n)),i-=ht;n<i;)e.d.push(+a.slice(n,n+=ht));a=a.slice(n),n=ht-a.length}else n-=i;for(;n--;)a+="0";if(e.d.push(+a),yt&&(e.e>nm||e.e<-nm))throw Error(D0+r)}else e.s=0,e.e=0,e.d=[0];return e}function ct(e,a,r){var n,i,o,c,m,u,h,p,x=e.d;for(c=1,o=x[0];o>=10;o/=10)c++;if(n=a-c,n<0)n+=ht,i=a,h=x[p=0];else{if(p=Math.ceil((n+1)/ht),o=x.length,p>=o)return e;for(h=o=x[p],c=1;o>=10;o/=10)c++;n%=ht,i=n-ht+c}if(r!==void 0&&(o=Vs(10,c-i-1),m=h/o%10|0,u=a<0||x[p+1]!==void 0||h%o,u=r<4?(m||u)&&(r==0||r==(e.s<0?3:2)):m>5||m==5&&(r==4||u||r==6&&(n>0?i>0?h/Vs(10,c-i):0:x[p-1])%10&1||r==(e.s<0?8:7))),a<1||!x[0])return u?(o=Pt(e),x.length=1,a=a-o-1,x[0]=Vs(10,(ht-a%ht)%ht),e.e=Ai(-a/ht)||0):(x.length=1,x[0]=e.e=e.s=0),e;if(n==0?(x.length=p,o=1,p--):(x.length=p+1,o=Vs(10,ht-n),x[p]=i>0?(h/Vs(10,c-i)%Vs(10,i)|0)*o:0),u)for(;;)if(p==0){(x[0]+=o)==Yt&&(x[0]=1,++e.e);break}else{if(x[p]+=o,x[p]!=Yt)break;x[p--]=0,o=1}for(n=x.length;x[--n]===0;)x.pop();if(yt&&(e.e>nm||e.e<-nm))throw Error(D0+Pt(e));return e}function DE(e,a){var r,n,i,o,c,m,u,h,p,x,j=e.constructor,v=j.precision;if(!e.s||!a.s)return a.s?a.s=-a.s:a=new j(e),yt?ct(a,v):a;if(u=e.d,x=a.d,n=a.e,h=e.e,u=u.slice(),c=h-n,c){for(p=c<0,p?(r=u,c=-c,m=x.length):(r=x,n=h,m=u.length),i=Math.max(Math.ceil(v/ht),m)+2,c>i&&(c=i,r.length=1),r.reverse(),i=c;i--;)r.push(0);r.reverse()}else{for(i=u.length,m=x.length,p=i<m,p&&(m=i),i=0;i<m;i++)if(u[i]!=x[i]){p=u[i]<x[i];break}c=0}for(p&&(r=u,u=x,x=r,a.s=-a.s),m=u.length,i=x.length-m;i>0;--i)u[m++]=0;for(i=x.length;i>c;){if(u[--i]<x[i]){for(o=i;o&&u[--o]===0;)u[o]=Yt-1;--u[o],u[i]+=Yt}u[i]-=x[i]}for(;u[--m]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(a.d=u,a.e=n,yt?ct(a,v):a):new j(0)}function il(e,a,r){var n,i=Pt(e),o=$r(e.d),c=o.length;return a?(r&&(n=r-c)>0?o=o.charAt(0)+"."+o.slice(1)+cs(n):c>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+cs(-i-1)+o,r&&(n=r-c)>0&&(o+=cs(n))):i>=c?(o+=cs(i+1-c),r&&(n=r-i-1)>0&&(o=o+"."+cs(n))):((n=i+1)<c&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-c)>0&&(i+1===c&&(o+="."),o+=cs(n))),e.s<0?"-"+o:o}function BA(e,a){if(e.length>a)return e.length=a,!0}function TE(e){var a,r,n;function i(o){var c=this;if(!(c instanceof i))return new i(o);if(c.constructor=i,o instanceof i){c.s=o.s,c.e=o.e,c.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(al+o);if(o>0)c.s=1;else if(o<0)o=-o,c.s=-1;else{c.s=0,c.e=0,c.d=[0];return}if(o===~~o&&o<1e7){c.e=0,c.d=[o];return}return LA(c,o.toString())}else if(typeof o!="string")throw Error(al+o);if(o.charCodeAt(0)===45?(o=o.slice(1),c.s=-1):c.s=1,I9.test(o))LA(c,o);else throw Error(al+o)}if(i.prototype=Ae,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=TE,i.config=i.set=F9,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],a=0;a<n.length;)e.hasOwnProperty(r=n[a++])||(e[r]=this[r]);return i.config(e),i}function F9(e){if(!e||typeof e!="object")throw Error(gr+"Object expected");var a,r,n,i=["precision",1,wi,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(a=0;a<i.length;a+=3)if((n=e[r=i[a]])!==void 0)if(Ai(n)===n&&n>=i[a+1]&&n<=i[a+2])this[r]=n;else throw Error(al+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(al+r+": "+n);return this}var T0=TE(B9);Ka=new T0(1);const tt=T0;var U9=e=>e,RE={},PE=e=>e===RE,IA=e=>function a(){return arguments.length===0||arguments.length===1&&PE(arguments.length<=0?void 0:arguments[0])?a:e(...arguments)},ME=(e,a)=>e===1?a:IA(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var o=n.filter(c=>c!==RE).length;return o>=e?a(...n):ME(e-o,IA(function(){for(var c=arguments.length,m=new Array(c),u=0;u<c;u++)m[u]=arguments[u];var h=n.map(p=>PE(p)?m.shift():p);return a(...h,...m)}))}),Qm=e=>ME(e.length,e),sb=(e,a)=>{for(var r=[],n=e;n<a;++n)r[n-e]=n;return r},$9=Qm((e,a)=>Array.isArray(a)?a.map(e):Object.keys(a).map(r=>a[r]).map(e)),q9=function(){for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];if(!r.length)return U9;var i=r.reverse(),o=i[0],c=i.slice(1);return function(){return c.reduce((m,u)=>u(m),o(...arguments))}},lb=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),_E=e=>{var a=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return a&&i.every((c,m)=>{var u;return c===((u=a)===null||u===void 0?void 0:u[m])})||(a=i,r=e(...i)),r}};function zE(e){var a;return e===0?a=1:a=Math.floor(new tt(e).abs().log(10).toNumber())+1,a}function LE(e,a,r){for(var n=new tt(e),i=0,o=[];n.lt(a)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}Qm((e,a,r)=>{var n=+e,i=+a;return n+r*(i-n)});Qm((e,a,r)=>{var n=a-+e;return n=n||1/0,(r-e)/n});Qm((e,a,r)=>{var n=a-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});var BE=e=>{var[a,r]=e,[n,i]=[a,r];return a>r&&([n,i]=[r,a]),[n,i]},IE=(e,a,r)=>{if(e.lte(0))return new tt(0);var n=zE(e.toNumber()),i=new tt(10).pow(n),o=e.div(i),c=n!==1?.05:.1,m=new tt(Math.ceil(o.div(c).toNumber())).add(r).mul(c),u=m.mul(i);return a?new tt(u.toNumber()):new tt(Math.ceil(u.toNumber()))},H9=(e,a,r)=>{var n=new tt(1),i=new tt(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new tt(10).pow(zE(e)-1),i=new tt(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new tt(Math.floor(e)))}else e===0?i=new tt(Math.floor((a-1)/2)):r||(i=new tt(Math.floor(e)));var c=Math.floor((a-1)/2),m=q9($9(u=>i.add(new tt(u-c).mul(n)).toNumber()),sb);return m(0,a)},FE=function(a,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-a)/(n-1)))return{step:new tt(0),tickMin:new tt(0),tickMax:new tt(0)};var c=IE(new tt(r).sub(a).div(n-1),i,o),m;a<=0&&r>=0?m=new tt(0):(m=new tt(a).add(r).div(2),m=m.sub(new tt(m).mod(c)));var u=Math.ceil(m.sub(a).div(c).toNumber()),h=Math.ceil(new tt(r).sub(m).div(c).toNumber()),p=u+h+1;return p>n?FE(a,r,n,i,o+1):(p<n&&(h=r>0?h+(n-p):h,u=r>0?u:u+(n-p)),{step:c,tickMin:m.sub(new tt(u).mul(c)),tickMax:m.add(new tt(h).mul(c))})};function V9(e){var[a,r]=e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(n,2),[c,m]=BE([a,r]);if(c===-1/0||m===1/0){var u=m===1/0?[c,...sb(0,n-1).map(()=>1/0)]:[...sb(0,n-1).map(()=>-1/0),m];return a>r?lb(u):u}if(c===m)return H9(c,n,i);var{step:h,tickMin:p,tickMax:x}=FE(c,m,o,i,0),j=LE(p,x.add(new tt(.1).mul(h)),h);return a>r?lb(j):j}function Y9(e,a){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,c]=BE([r,n]);if(o===-1/0||c===1/0)return[r,n];if(o===c)return[o];var m=Math.max(a,2),u=IE(new tt(c).sub(o).div(m-1),i,0),h=[...LE(new tt(o),new tt(c),u),c];return i===!1&&(h=h.map(p=>Math.round(p))),r>n?lb(h):h}var K9=_E(V9),G9=_E(Y9),UE=e=>e.rootProps.maxBarSize,J9=e=>e.rootProps.barGap,$E=e=>e.rootProps.barCategoryGap,W9=e=>e.rootProps.barSize,Xm=e=>e.rootProps.stackOffset,R0=e=>e.options.chartName,P0=e=>e.rootProps.syncId,qE=e=>e.rootProps.syncMethod,M0=e=>e.options.eventEmitter,hn={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},Ya={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},Zm=(e,a)=>{if(!(!e||!a))return e!=null&&e.reversed?[a[1],a[0]]:a},Q9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:hn.reversed,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:hn.type,unit:void 0},X9={allowDataOverflow:Ya.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ya.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ya.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ya.scale,tick:Ya.tick,tickCount:Ya.tickCount,ticks:void 0,type:Ya.type,unit:void 0},Z9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:hn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},eU={allowDataOverflow:Ya.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Ya.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Ya.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Ya.scale,tick:Ya.tick,tickCount:Ya.tickCount,ticks:void 0,type:"category",unit:void 0},_0=(e,a)=>e.polarAxis.angleAxis[a]!=null?e.polarAxis.angleAxis[a]:e.layout.layoutType==="radial"?Z9:Q9,z0=(e,a)=>e.polarAxis.radiusAxis[a]!=null?e.polarAxis.radiusAxis[a]:e.layout.layoutType==="radial"?eU:X9,ef=e=>e.polarOptions,L0=le([Pn,Mn,Qt],Iz),HE=le([ef,L0],(e,a)=>{if(e!=null)return kr(e.innerRadius,a,0)}),VE=le([ef,L0],(e,a)=>{if(e!=null)return kr(e.outerRadius,a,a*.8)}),tU=e=>{if(e==null)return[0,0];var{startAngle:a,endAngle:r}=e;return[a,r]},YE=le([ef],tU);le([_0,YE],Zm);var KE=le([L0,HE,VE],(e,a,r)=>{if(!(e==null||a==null||r==null))return[a,r]});le([z0,KE],Zm);var GE=le([at,ef,HE,VE,Pn,Mn],(e,a,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||a==null||r==null||n==null)){var{cx:c,cy:m,startAngle:u,endAngle:h}=a;return{cx:kr(c,i,i/2),cy:kr(m,o,o/2),innerRadius:r,outerRadius:n,startAngle:u,endAngle:h,clockWise:!1}}}),Bt=(e,a)=>a,tf=(e,a,r)=>r;function B0(e){return e?.id}var It=e=>{var a=at(e);return a==="horizontal"?"xAxis":a==="vertical"?"yAxis":a==="centric"?"angleAxis":"radiusAxis"},Si=e=>e.tooltip.settings.axisId,Ft=e=>{var a=It(e),r=Si(e);return wc(e,a,r)},JE=le([Ft],e=>e?.dataKey);function WE(e,a,r){var{chartData:n=[]}=a,{allowDuplicatedCategory:i,dataKey:o}=r,c=new Map;return e.forEach(m=>{var u,h=(u=m.data)!==null&&u!==void 0?u:n;if(!(h==null||h.length===0)){var p=B0(m);h.forEach((x,j)=>{var v=o==null||i?j:String(Na(x,o,null)),w=Na(x,m.dataKey,0),S;c.has(v)?S=c.get(v):S={},Object.assign(S,{[p]:w}),c.set(v,S)})}}),Array.from(c.values())}function af(e){return e.stackId!=null&&e.dataKey!=null}var rf=(e,a)=>e===a?!0:e==null||a==null?!1:e[0]===a[0]&&e[1]===a[1];function nf(e,a){return Array.isArray(e)&&Array.isArray(a)&&e.length===0&&a.length===0?!0:e===a}function FA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function sm(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?FA(Object(r),!0).forEach(function(n){aU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aU(e,a,r){return(a=rU(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function rU(e){var a=nU(e,"string");return typeof a=="symbol"?a:a+""}function nU(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var ib=[0,"auto"],Ha={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},QE=(e,a)=>e.cartesianAxis.xAxis[a],zn=(e,a)=>{var r=QE(e,a);return r??Ha},Va={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:ib,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:bc},XE=(e,a)=>e.cartesianAxis.yAxis[a],Ln=(e,a)=>{var r=XE(e,a);return r??Va},sU={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:""},I0=(e,a)=>{var r=e.cartesianAxis.zAxis[a];return r??sU},wa=(e,a,r)=>{switch(a){case"xAxis":return zn(e,r);case"yAxis":return Ln(e,r);case"zAxis":return I0(e,r);case"angleAxis":return _0(e,r);case"radiusAxis":return z0(e,r);default:throw new Error("Unexpected axis type: ".concat(a))}},lU=(e,a,r)=>{switch(a){case"xAxis":return zn(e,r);case"yAxis":return Ln(e,r);default:throw new Error("Unexpected axis type: ".concat(a))}},wc=(e,a,r)=>{switch(a){case"xAxis":return zn(e,r);case"yAxis":return Ln(e,r);case"angleAxis":return _0(e,r);case"radiusAxis":return z0(e,r);default:throw new Error("Unexpected axis type: ".concat(a))}},ZE=e=>e.graphicalItems.cartesianItems.some(a=>a.type==="bar")||e.graphicalItems.polarItems.some(a=>a.type==="radialBar");function ek(e,a){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===a;case"yAxis":return"yAxisId"in r&&r.yAxisId===a;case"zAxis":return"zAxisId"in r&&r.zAxisId===a;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===a;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===a;default:return!1}}}var F0=e=>e.graphicalItems.cartesianItems,iU=le([Bt,tf],ek),tk=(e,a,r)=>e.filter(r).filter(n=>a?.includeHidden===!0?!0:!n.hide),Ac=le([F0,wa,iU],tk,{memoizeOptions:{resultEqualityCheck:nf}}),ak=le([Ac],e=>e.filter(a=>a.type==="area"||a.type==="bar").filter(af)),rk=e=>e.filter(a=>!("stackId"in a)||a.stackId===void 0),oU=le([Ac],rk),nk=e=>e.map(a=>a.data).filter(Boolean).flat(1),cU=le([Ac],nk,{memoizeOptions:{resultEqualityCheck:nf}}),sk=(e,a)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=a;return e.length>0?e:r.slice(n,i+1)},U0=le([cU,O0],sk),lk=(e,a,r)=>a?.dataKey!=null?e.map(n=>({value:Na(n,a.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Na(i,n)}))):e.map(n=>({value:n})),sf=le([U0,wa,Ac],lk);function ik(e,a){switch(e){case"xAxis":return a.direction==="x";case"yAxis":return a.direction==="y";default:return!1}}function Su(e){if(Hr(e)||e instanceof Date){var a=Number(e);if(fa(a))return a}}function UA(e){if(Array.isArray(e)){var a=[Su(e[0]),Su(e[1])];return ll(a)?a:void 0}var r=Su(e);if(r!=null)return[r,r]}function Ci(e){return e.map(Su).filter(SB)}function dU(e,a,r){return!r||typeof a!="number"||xr(a)?[]:r.length?Ci(r.flatMap(n=>{var i=Na(e,n.dataKey),o,c;if(Array.isArray(i)?[o,c]=i:o=c=i,!(!fa(o)||!fa(c)))return[a-o,a+c]})):[]}var uU=le([ak,O0,Ft],WE),ok=(e,a,r)=>{var n={},i=a.reduce((o,c)=>(c.stackId==null||(o[c.stackId]==null&&(o[c.stackId]=[]),o[c.stackId].push(c)),o),n);return Object.fromEntries(Object.entries(i).map(o=>{var[c,m]=o,u=m.map(B0);return[c,{stackedData:tL(e,u,r),graphicalItems:m}]}))},ob=le([uU,ak,Xm],ok),ck=(e,a,r,n)=>{var{dataStartIndex:i,dataEndIndex:o}=a;if(n==null&&r!=="zAxis"){var c=lL(e,i,o);if(!(c!=null&&c[0]===0&&c[1]===0))return c}},mU=le([wa],e=>e.allowDataOverflow),$0=e=>{var a;if(e==null||!("domain"in e))return ib;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=Ci(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(a=e?.domain)!==null&&a!==void 0?a:ib},dk=le([wa],$0),uk=le([dk,mU],CE),fU=le([ob,ws,Bt,uk],ck,{memoizeOptions:{resultEqualityCheck:rf}}),q0=e=>e.errorBars,pU=(e,a,r)=>e.flatMap(n=>a[n.id]).filter(Boolean).filter(n=>ik(r,n)),lm=function(){for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var o=i.flat(),c=Math.min(...o),m=Math.max(...o);return[c,m]}},mk=(e,a,r,n,i)=>{var o,c;if(r.length>0&&e.forEach(m=>{r.forEach(u=>{var h,p,x=(h=n[u.id])===null||h===void 0?void 0:h.filter(g=>ik(i,g)),j=Na(m,(p=a.dataKey)!==null&&p!==void 0?p:u.dataKey),v=dU(m,j,x);if(v.length>=2){var w=Math.min(...v),S=Math.max(...v);(o==null||w<o)&&(o=w),(c==null||S>c)&&(c=S)}var A=UA(j);A!=null&&(o=o==null?A[0]:Math.min(o,A[0]),c=c==null?A[1]:Math.max(c,A[1]))})}),a?.dataKey!=null&&e.forEach(m=>{var u=UA(Na(m,a.dataKey));u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),c=c==null?u[1]:Math.max(c,u[1]))}),fa(o)&&fa(c))return[o,c]},hU=le([U0,wa,oU,q0,Bt],mk,{memoizeOptions:{resultEqualityCheck:rf}});function xU(e){var{value:a}=e;if(Hr(a)||a instanceof Date)return a}var gU=(e,a,r)=>{var n=e.map(xU).filter(i=>i!=null);return r&&(a.dataKey==null||a.allowDuplicatedCategory&&o4(n))?V4(0,e.length):a.allowDuplicatedCategory?n:Array.from(new Set(n))},fk=e=>e.referenceElements.dots,Ei=(e,a,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>a==="xAxis"?n.xAxisId===r:n.yAxisId===r),bU=le([fk,Bt,tf],Ei),pk=e=>e.referenceElements.areas,yU=le([pk,Bt,tf],Ei),hk=e=>e.referenceElements.lines,vU=le([hk,Bt,tf],Ei),xk=(e,a)=>{var r=Ci(e.map(n=>a==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},jU=le(bU,Bt,xk),gk=(e,a)=>{var r=Ci(e.flatMap(n=>[a==="xAxis"?n.x1:n.y1,a==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},NU=le([yU,Bt],gk),bk=(e,a)=>{var r=Ci(e.map(n=>a==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},wU=le(vU,Bt,bk),AU=le(jU,wU,NU,(e,a,r)=>lm(e,r,a)),yk=(e,a,r,n,i,o,c,m)=>{if(r!=null)return r;var u=c==="vertical"&&m==="xAxis"||c==="horizontal"&&m==="yAxis",h=u?lm(n,o,i):lm(o,i);return L9(a,h,e.allowDataOverflow)},SU=le([wa,dk,uk,fU,hU,AU,at,Bt],yk,{memoizeOptions:{resultEqualityCheck:rf}}),CU=[0,1],vk=(e,a,r,n,i,o,c)=>{if(!((e==null||r==null||r.length===0)&&c===void 0)){var{dataKey:m,type:u}=e,h=dl(a,o);return h&&m==null?V4(0,r.length):u==="category"?gU(n,e,h):i==="expand"?CU:c}},H0=le([wa,at,U0,sf,Xm,Bt,SU],vk),jk=(e,a,r,n,i)=>{if(e!=null){var{scale:o,type:c}=e;if(o==="auto")return a==="radial"&&i==="radiusAxis"?"band":a==="radial"&&i==="angleAxis"?"linear":c==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":c==="category"?"band":"linear";if(typeof o=="string"){var m="scale".concat(gc(o));return m in $o?m:"point"}}},Sc=le([wa,at,ZE,R0,Bt],jk);function EU(e){if(e!=null){if(e in $o)return $o[e]();var a="scale".concat(gc(e));if(a in $o)return $o[a]()}}function V0(e,a,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=EU(a);if(i!=null){var o=i.domain(r).range(n);return Wz(o),o}}}var Nk=(e,a,r)=>{var n=$0(a);if(!(r!=="auto"&&r!=="linear")){if(a!=null&&a.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&ll(e))return K9(e,a.tickCount,a.allowDecimals);if(a!=null&&a.tickCount&&a.type==="number"&&ll(e))return G9(e,a.tickCount,a.allowDecimals)}},Y0=le([H0,wc,Sc],Nk),wk=(e,a,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&ll(a)&&Array.isArray(r)&&r.length>0){var i=a[0],o=r[0],c=a[1],m=r[r.length-1];return[Math.min(i,o),Math.max(c,m)]}return a},kU=le([wa,H0,Y0,Bt],wk),OU=le(sf,wa,(e,a)=>{if(!(!a||a.type!=="number")){var r=1/0,n=Array.from(Ci(e.map(m=>m.value))).sort((m,u)=>m-u);if(n.length<2)return 1/0;var i=n[n.length-1]-n[0];if(i===0)return 1/0;for(var o=0;o<n.length-1;o++){var c=n[o+1]-n[o];r=Math.min(r,c)}return r/i}}),Ak=le(OU,at,$E,Qt,(e,a,r,n)=>n,(e,a,r,n,i)=>{if(!fa(e))return 0;var o=a==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var c=kr(r,e*o),m=e*o/2;return m-c-(m-c)/o*c}return 0}),DU=(e,a)=>{var r=zn(e,a);return r==null||typeof r.padding!="string"?0:Ak(e,"xAxis",a,r.padding)},TU=(e,a)=>{var r=Ln(e,a);return r==null||typeof r.padding!="string"?0:Ak(e,"yAxis",a,r.padding)},RU=le(zn,DU,(e,a)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:a,right:a}:{left:((r=i.left)!==null&&r!==void 0?r:0)+a,right:((n=i.right)!==null&&n!==void 0?n:0)+a}}),PU=le(Ln,TU,(e,a)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:a,bottom:a}:{top:((r=i.top)!==null&&r!==void 0?r:0)+a,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+a}}),MU=le([Qt,RU,$m,Um,(e,a,r)=>r],(e,a,r,n,i)=>{var{padding:o}=n;return i?[o.left,r.width-o.right]:[e.left+a.left,e.left+e.width-a.right]}),_U=le([Qt,at,PU,$m,Um,(e,a,r)=>r],(e,a,r,n,i,o)=>{var{padding:c}=i;return o?[n.height-c.bottom,c.top]:a==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Cc=(e,a,r,n)=>{var i;switch(a){case"xAxis":return MU(e,r,n);case"yAxis":return _U(e,r,n);case"zAxis":return(i=I0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return YE(e);case"radiusAxis":return KE(e,r);default:return}},Sk=le([wa,Cc],Zm),ki=le([wa,Sc,kU,Sk],V0);le([Ac,q0,Bt],pU);function Ck(e,a){return e.id<a.id?-1:e.id>a.id?1:0}var lf=(e,a)=>a,of=(e,a,r)=>r,zU=le(Im,lf,of,(e,a,r)=>e.filter(n=>n.orientation===a).filter(n=>n.mirror===r).sort(Ck)),LU=le(Fm,lf,of,(e,a,r)=>e.filter(n=>n.orientation===a).filter(n=>n.mirror===r).sort(Ck)),Ek=(e,a)=>({width:e.width,height:a.height}),BU=(e,a)=>{var r=typeof a.width=="number"?a.width:bc;return{width:r,height:e.height}},kk=le(Qt,zn,Ek),IU=(e,a,r)=>{switch(a){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},FU=(e,a,r)=>{switch(a){case"left":return e.left;case"right":return r-e.right;default:return 0}},UU=le(Mn,Qt,zU,lf,of,(e,a,r,n,i)=>{var o={},c;return r.forEach(m=>{var u=Ek(a,m);c==null&&(c=IU(a,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[m.id]=c-Number(h)*u.height,c+=(h?-1:1)*u.height}),o}),$U=le(Pn,Qt,LU,lf,of,(e,a,r,n,i)=>{var o={},c;return r.forEach(m=>{var u=BU(a,m);c==null&&(c=FU(a,n,e));var h=n==="left"&&!i||n==="right"&&i;o[m.id]=c-Number(h)*u.width,c+=(h?-1:1)*u.width}),o}),qU=(e,a)=>{var r=zn(e,a);if(r!=null)return UU(e,r.orientation,r.mirror)},HU=le([Qt,zn,qU,(e,a)=>a],(e,a,r,n)=>{if(a!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),VU=(e,a)=>{var r=Ln(e,a);if(r!=null)return $U(e,r.orientation,r.mirror)},YU=le([Qt,Ln,VU,(e,a)=>a],(e,a,r,n)=>{if(a!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),Ok=le(Qt,Ln,(e,a)=>{var r=typeof a.width=="number"?a.width:bc;return{width:r,height:e.height}}),$A=(e,a,r)=>{switch(a){case"xAxis":return kk(e,r).width;case"yAxis":return Ok(e,r).height;default:return}},Dk=(e,a,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:o,dataKey:c}=r,m=dl(e,n),u=a.map(h=>h.value);if(c&&m&&o==="category"&&i&&o4(u))return u}},K0=le([at,sf,wa,Bt],Dk),Tk=(e,a,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:o}=r,c=dl(e,n);if(c&&(i==="number"||o!=="auto"))return a.map(m=>m.value)}},G0=le([at,sf,wc,Bt],Tk),qA=le([at,lU,Sc,ki,K0,G0,Cc,Y0,Bt],(e,a,r,n,i,o,c,m,u)=>{if(a==null)return null;var h=dl(e,u);return{angle:a.angle,interval:a.interval,minTickGap:a.minTickGap,orientation:a.orientation,tick:a.tick,tickCount:a.tickCount,tickFormatter:a.tickFormatter,ticks:a.ticks,type:a.type,unit:a.unit,axisType:u,categoricalDomain:o,duplicateDomain:i,isCategorical:h,niceTicks:m,range:c,realScaleType:r,scale:n}}),KU=(e,a,r,n,i,o,c,m,u)=>{if(!(a==null||n==null)){var h=dl(e,u),{type:p,ticks:x,tickCount:j}=a,v=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,w=p==="category"&&n.bandwidth?n.bandwidth()/v:0;w=u==="angleAxis"&&o!=null&&o.length>=2?Ra(o[0]-o[1])*2*w:w;var S=x||i;if(S){var A=S.map((g,C)=>{var E=c?c.indexOf(g):g;return{index:C,coordinate:n(E)+w,value:g,offset:w}});return A.filter(g=>!xr(g.coordinate))}return h&&m?m.map((g,C)=>({coordinate:n(g)+w,value:g,index:C,offset:w})):n.ticks?n.ticks(j).map(g=>({coordinate:n(g)+w,value:g,offset:w})):n.domain().map((g,C)=>({coordinate:n(g)+w,value:c?c[g]:g,index:C,offset:w}))}},Rk=le([at,wc,Sc,ki,Y0,Cc,K0,G0,Bt],KU),GU=(e,a,r,n,i,o,c)=>{if(!(a==null||r==null||n==null||n[0]===n[1])){var m=dl(e,c),{tickCount:u}=a,h=0;return h=c==="angleAxis"&&n?.length>=2?Ra(n[0]-n[1])*2*h:h,m&&o?o.map((p,x)=>({coordinate:r(p)+h,value:p,index:x,offset:h})):r.ticks?r.ticks(u).map(p=>({coordinate:r(p)+h,value:p,offset:h})):r.domain().map((p,x)=>({coordinate:r(p)+h,value:i?i[p]:p,index:x,offset:h}))}},di=le([at,wc,ki,Cc,K0,G0,Bt],GU),ui=le(wa,ki,(e,a)=>{if(!(e==null||a==null))return sm(sm({},e),{},{scale:a})}),JU=le([wa,Sc,H0,Sk],V0);le((e,a,r)=>I0(e,r),JU,(e,a)=>{if(!(e==null||a==null))return sm(sm({},e),{},{scale:a})});var WU=le([at,Im,Fm],(e,a,r)=>{switch(e){case"horizontal":return a.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),Pk=e=>e.options.defaultTooltipEventType,Mk=e=>e.options.validateTooltipEventTypes;function _k(e,a,r){if(e==null)return a;var n=e?"axis":"item";return r==null?a:r.includes(n)?n:a}function J0(e,a){var r=Pk(e),n=Mk(e);return _k(a,r,n)}function QU(e){return Te(a=>J0(a,e))}var zk=(e,a)=>{var r,n=Number(a);if(!(xr(n)||a==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},XU=e=>e.tooltip.settings,ms={active:!1,index:null,dataKey:void 0,coordinate:void 0},ZU={itemInteraction:{click:ms,hover:ms},axisInteraction:{click:ms,hover:ms},keyboardInteraction:ms,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Lk=za({name:"tooltip",initialState:ZU,reducers:{addTooltipEntrySettings:{reducer(e,a){e.tooltipItemPayloads.push(a.payload)},prepare:xa()},removeTooltipEntrySettings:{reducer(e,a){var r=yn(e).tooltipItemPayloads.indexOf(a.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:xa()},setTooltipSettingsState(e,a){e.settings=a.payload},setActiveMouseOverItemIndex(e,a){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=a.payload.activeIndex,e.itemInteraction.hover.dataKey=a.payload.activeDataKey,e.itemInteraction.hover.coordinate=a.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,a){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=a.payload.activeIndex,e.itemInteraction.click.dataKey=a.payload.activeDataKey,e.itemInteraction.click.coordinate=a.payload.activeCoordinate},setMouseOverAxisIndex(e,a){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=a.payload.activeIndex,e.axisInteraction.hover.dataKey=a.payload.activeDataKey,e.axisInteraction.hover.coordinate=a.payload.activeCoordinate},setMouseClickAxisIndex(e,a){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=a.payload.activeIndex,e.axisInteraction.click.dataKey=a.payload.activeDataKey,e.axisInteraction.click.coordinate=a.payload.activeCoordinate},setSyncInteraction(e,a){e.syncInteraction=a.payload},setKeyboardInteraction(e,a){e.keyboardInteraction.active=a.payload.active,e.keyboardInteraction.index=a.payload.activeIndex,e.keyboardInteraction.coordinate=a.payload.activeCoordinate,e.keyboardInteraction.dataKey=a.payload.activeDataKey}}}),{addTooltipEntrySettings:e$,removeTooltipEntrySettings:t$,setTooltipSettingsState:a$,setActiveMouseOverItemIndex:Bk,mouseLeaveItem:r$,mouseLeaveChart:Ik,setActiveClickItemIndex:n$,setMouseOverAxisIndex:Fk,setMouseClickAxisIndex:s$,setSyncInteraction:cb,setKeyboardInteraction:db}=Lk.actions,l$=Lk.reducer;function HA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cu(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?HA(Object(r),!0).forEach(function(n){i$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function i$(e,a,r){return(a=o$(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function o$(e){var a=c$(e,"string");return typeof a=="symbol"?a:a+""}function c$(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function d$(e,a,r){return a==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function u$(e){return e.index!=null}var Uk=(e,a,r,n)=>{if(a==null)return ms;var i=d$(e,a,r);if(i==null)return ms;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(u$(i)){if(o)return cu(cu({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return cu(cu({},ms),{},{coordinate:i.coordinate})},W0=(e,a)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!fa(n))return r;var i=0,o=1/0;return a.length>0&&(o=a.length-1),String(Math.max(i,Math.min(n,o)))},$k=(e,a,r,n,i,o,c,m)=>{if(!(o==null||m==null)){var u=c[0],h=u==null?void 0:m(u.positions,o);if(h!=null)return h;var p=i?.[Number(o)];if(p)switch(r){case"horizontal":return{x:p.coordinate,y:(n.top+a)/2};default:return{x:(n.left+e)/2,y:p.coordinate}}}},qk=(e,a,r,n)=>{if(a==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return r==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var c;return((c=o.settings)===null||c===void 0?void 0:c.dataKey)===i})},Ec=e=>e.options.tooltipPayloadSearcher,Oi=e=>e.tooltip;function VA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function YA(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?VA(Object(r),!0).forEach(function(n){m$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m$(e,a,r){return(a=f$(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function f$(e){var a=p$(e,"string");return typeof a=="symbol"?a:a+""}function p$(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function h$(e,a){return e??a}var Hk=(e,a,r,n,i,o,c)=>{if(!(a==null||o==null)){var{chartData:m,computedData:u,dataStartIndex:h,dataEndIndex:p}=r,x=[];return e.reduce((j,v)=>{var w,{dataDefinedOnItem:S,settings:A}=v,g=h$(S,m),C=Array.isArray(g)?A4(g,h,p):g,E=(w=A?.dataKey)!==null&&w!==void 0?w:n,O=A?.nameKey,D;if(n&&Array.isArray(C)&&!Array.isArray(C[0])&&c==="axis"?D=R8(C,n,i):D=o(C,a,u,O),Array.isArray(D))D.forEach(L=>{var T=YA(YA({},A),{},{name:L.name,unit:L.unit,color:void 0,fill:void 0});j.push(w1({tooltipEntrySettings:T,dataKey:L.dataKey,payload:L.payload,value:Na(L.payload,L.dataKey),name:L.name}))});else{var B;j.push(w1({tooltipEntrySettings:A,dataKey:E,payload:D,value:Na(D,E),name:(B=Na(D,O))!==null&&B!==void 0?B:A?.name}))}return j},x)}},Q0=le([Ft,at,ZE,R0,It],jk),x$=le([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,a)=>[...e,...a]),g$=le([It,Si],ek),kc=le([x$,Ft,g$],tk,{memoizeOptions:{resultEqualityCheck:nf}}),b$=le([kc],e=>e.filter(af)),y$=le([kc],nk,{memoizeOptions:{resultEqualityCheck:nf}}),Di=le([y$,ws],sk),v$=le([b$,ws,Ft],WE),X0=le([Di,Ft,kc],lk),Vk=le([Ft],$0),j$=le([Ft],e=>e.allowDataOverflow),Yk=le([Vk,j$],CE),N$=le([kc],e=>e.filter(af)),w$=le([v$,N$,Xm],ok),A$=le([w$,ws,It,Yk],ck),S$=le([kc],rk),C$=le([Di,Ft,S$,q0,It],mk,{memoizeOptions:{resultEqualityCheck:rf}}),E$=le([fk,It,Si],Ei),k$=le([E$,It],xk),O$=le([pk,It,Si],Ei),D$=le([O$,It],gk),T$=le([hk,It,Si],Ei),R$=le([T$,It],bk),P$=le([k$,R$,D$],lm),M$=le([Ft,Vk,Yk,A$,C$,P$,at,It],yk),Kk=le([Ft,at,Di,X0,Xm,It,M$],vk),_$=le([Kk,Ft,Q0],Nk),z$=le([Ft,Kk,_$,It],wk),Gk=e=>{var a=It(e),r=Si(e),n=!1;return Cc(e,a,r,n)},Jk=le([Ft,Gk],Zm),Wk=le([Ft,Q0,z$,Jk],V0),L$=le([at,X0,Ft,It],Dk),B$=le([at,X0,Ft,It],Tk),I$=(e,a,r,n,i,o,c,m)=>{if(a){var{type:u}=a,h=dl(e,m);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,x=u==="category"&&n.bandwidth?n.bandwidth()/p:0;return x=m==="angleAxis"&&i!=null&&i?.length>=2?Ra(i[0]-i[1])*2*x:x,h&&c?c.map((j,v)=>({coordinate:n(j)+x,value:j,index:v,offset:x})):n.domain().map((j,v)=>({coordinate:n(j)+x,value:o?o[j]:j,index:v,offset:x}))}}},Bn=le([at,Ft,Q0,Wk,Gk,L$,B$,It],I$),Z0=le([Pk,Mk,XU],(e,a,r)=>_k(r.shared,e,a)),Qk=e=>e.tooltip.settings.trigger,ey=e=>e.tooltip.settings.defaultIndex,cf=le([Oi,Z0,Qk,ey],Uk),mi=le([cf,Di],W0),Xk=le([Bn,mi],zk),Zk=le([cf],e=>{if(e)return e.dataKey}),eO=le([Oi,Z0,Qk,ey],qk),F$=le([Pn,Mn,at,Qt,Bn,ey,eO,Ec],$k),U$=le([cf,F$],(e,a)=>e!=null&&e.coordinate?e.coordinate:a),$$=le([cf],e=>e.active),q$=le([eO,mi,ws,JE,Xk,Ec,Z0],Hk);le([q$],e=>{if(e!=null){var a=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(a))}});function KA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function GA(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?KA(Object(r),!0).forEach(function(n){H$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function H$(e,a,r){return(a=V$(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function V$(e){var a=Y$(e,"string");return typeof a=="symbol"?a:a+""}function Y$(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var K$=()=>Te(Ft),G$=()=>{var e=K$(),a=Te(Bn),r=Te(Wk);return e0(GA(GA({},e),{},{scale:r}),a)},J$=()=>Te(R0),ty=(e,a)=>a,tO=(e,a,r)=>r,ay=(e,a,r,n)=>n,W$=le(Bn,e=>Bm(e,a=>a.coordinate)),ry=le([Oi,ty,tO,ay],Uk),aO=le([ry,Di],W0),Q$=(e,a,r)=>{if(a!=null){var n=Oi(e);return a==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},rO=le([Oi,ty,tO,ay],qk),im=le([Pn,Mn,at,Qt,Bn,ay,rO,Ec],$k),X$=le([ry,im],(e,a)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:a}),nO=le(Bn,aO,zk),Z$=le([rO,aO,ws,JE,nO,Ec,ty],Hk),eq=le([ry],e=>({isActive:e.active,activeIndex:e.index})),tq=(e,a,r,n,i,o,c,m)=>{if(!(!e||!a||!n||!i||!o)){var u=iL(e.chartX,e.chartY,a,r,m);if(u){var h=cL(u,a),p=Gz(h,c,o,n,i),x=oL(a,o,p,u);return{activeIndex:String(p),activeCoordinate:x}}}};function ub(){return ub=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ub.apply(null,arguments)}function JA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function du(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?JA(Object(r),!0).forEach(function(n){aq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aq(e,a,r){return(a=rq(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function rq(e){var a=nq(e,"string");return typeof a=="symbol"?a:a+""}function nq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function sq(e){var{coordinate:a,payload:r,index:n,offset:i,tooltipAxisBandSize:o,layout:c,cursor:m,tooltipEventType:u,chartName:h}=e,p=a,x=r,j=n;if(!m||!p||h!=="ScatterChart"&&u!=="axis")return null;var v,w;if(h==="ScatterChart")v=p,w=bB;else if(h==="BarChart")v=yB(c,p,i,o),w=U4;else if(c==="radial"){var{cx:S,cy:A,radius:g,startAngle:C,endAngle:E}=$4(p);v={cx:S,cy:A,startAngle:C,endAngle:E,innerRadius:g,outerRadius:g},w=H4}else v={points:aI(c,p,i)},w=cB;var O=typeof m=="object"&&"className"in m?m.className:void 0,D=du(du(du(du({stroke:"#ccc",pointerEvents:"none"},i),v),Hb(m)),{},{payload:x,payloadIndex:j,className:gt("recharts-tooltip-cursor",O)});return b.isValidElement(m)?b.cloneElement(m,D):b.createElement(w,D)}function lq(e){var a=G$(),r=R4(),n=r0(),i=J$();return b.createElement(sq,ub({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:a,chartName:i}))}var sO=b.createContext(null),iq=()=>b.useContext(sO),lg={exports:{}},WA;function oq(){return WA||(WA=1,(function(e){var a=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,h,p){this.fn=u,this.context=h,this.once=p||!1}function o(u,h,p,x,j){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,x||u,j),w=r?r+h:h;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],v]:u._events[w].push(v):(u._events[w]=v,u._eventsCount++),u}function c(u,h){--u._eventsCount===0?u._events=new n:delete u._events[h]}function m(){this._events=new n,this._eventsCount=0}m.prototype.eventNames=function(){var h=[],p,x;if(this._eventsCount===0)return h;for(x in p=this._events)a.call(p,x)&&h.push(r?x.slice(1):x);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},m.prototype.listeners=function(h){var p=r?r+h:h,x=this._events[p];if(!x)return[];if(x.fn)return[x.fn];for(var j=0,v=x.length,w=new Array(v);j<v;j++)w[j]=x[j].fn;return w},m.prototype.listenerCount=function(h){var p=r?r+h:h,x=this._events[p];return x?x.fn?1:x.length:0},m.prototype.emit=function(h,p,x,j,v,w){var S=r?r+h:h;if(!this._events[S])return!1;var A=this._events[S],g=arguments.length,C,E;if(A.fn){switch(A.once&&this.removeListener(h,A.fn,void 0,!0),g){case 1:return A.fn.call(A.context),!0;case 2:return A.fn.call(A.context,p),!0;case 3:return A.fn.call(A.context,p,x),!0;case 4:return A.fn.call(A.context,p,x,j),!0;case 5:return A.fn.call(A.context,p,x,j,v),!0;case 6:return A.fn.call(A.context,p,x,j,v,w),!0}for(E=1,C=new Array(g-1);E<g;E++)C[E-1]=arguments[E];A.fn.apply(A.context,C)}else{var O=A.length,D;for(E=0;E<O;E++)switch(A[E].once&&this.removeListener(h,A[E].fn,void 0,!0),g){case 1:A[E].fn.call(A[E].context);break;case 2:A[E].fn.call(A[E].context,p);break;case 3:A[E].fn.call(A[E].context,p,x);break;case 4:A[E].fn.call(A[E].context,p,x,j);break;default:if(!C)for(D=1,C=new Array(g-1);D<g;D++)C[D-1]=arguments[D];A[E].fn.apply(A[E].context,C)}}return!0},m.prototype.on=function(h,p,x){return o(this,h,p,x,!1)},m.prototype.once=function(h,p,x){return o(this,h,p,x,!0)},m.prototype.removeListener=function(h,p,x,j){var v=r?r+h:h;if(!this._events[v])return this;if(!p)return c(this,v),this;var w=this._events[v];if(w.fn)w.fn===p&&(!j||w.once)&&(!x||w.context===x)&&c(this,v);else{for(var S=0,A=[],g=w.length;S<g;S++)(w[S].fn!==p||j&&!w[S].once||x&&w[S].context!==x)&&A.push(w[S]);A.length?this._events[v]=A.length===1?A[0]:A:c(this,v)}return this},m.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&c(this,p)):(this._events=new n,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=r,m.EventEmitter=m,e.exports=m})(lg)),lg.exports}var cq=oq();const dq=Or(cq);var lc=new dq,mb="recharts.syncEvent.tooltip",QA="recharts.syncEvent.brush";function uq(e,a){if(a){var r=Number.parseInt(a,10);if(!xr(r))return e?.[r]}}var mq={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},lO=za({name:"options",initialState:mq,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),fq=lO.reducer,{createEventEmitter:pq}=lO.actions;function hq(e){return e.tooltip.syncInteraction}var xq={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},iO=za({name:"chartData",initialState:xq,reducers:{setChartData(e,a){if(e.chartData=a.payload,a.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}a.payload.length>0&&e.dataEndIndex!==a.payload.length-1&&(e.dataEndIndex=a.payload.length-1)},setComputedData(e,a){e.computedData=a.payload},setDataStartEndIndexes(e,a){var{startIndex:r,endIndex:n}=a.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:XA,setDataStartEndIndexes:gq,setComputedData:GQ}=iO.actions,bq=iO.reducer,yq=["x","y"];function ZA(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Zl(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?ZA(Object(r),!0).forEach(function(n){vq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vq(e,a,r){return(a=jq(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function jq(e){var a=Nq(e,"string");return typeof a=="symbol"?a:a+""}function Nq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function wq(e,a){if(e==null)return{};var r,n,i=Aq(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Aq(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var oO=()=>{};function Sq(){var e=Te(P0),a=Te(M0),r=zt(),n=Te(qE),i=Te(Bn),o=r0(),c=qm(),m=Te(u=>u.rootProps.className);b.useEffect(()=>{if(e==null)return oO;var u=(h,p,x)=>{if(a!==x&&e===h){if(n==="index"){var j;if(c&&p!==null&&p!==void 0&&(j=p.payload)!==null&&j!==void 0&&j.coordinate&&p.payload.sourceViewBox){var v=p.payload.coordinate,{x:w,y:S}=v,A=wq(v,yq),{x:g,y:C,width:E,height:O}=p.payload.sourceViewBox,D=Zl(Zl({},A),{},{x:c.x+(E?(w-g)/E:0)*c.width,y:c.y+(O?(S-C)/O:0)*c.height});r(Zl(Zl({},p),{},{payload:Zl(Zl({},p.payload),{},{coordinate:D})}))}else r(p);return}if(i!=null){var B;if(typeof n=="function"){var L={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},T=n(i,L);B=i[T]}else n==="value"&&(B=i.find(V=>String(V.value)===p.payload.label));var{coordinate:R}=p.payload;if(B==null||p.payload.active===!1||R==null||c==null){r(cb({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0}));return}var{x:z,y:U}=R,X=Math.min(z,c.x+c.width),fe=Math.min(U,c.y+c.height),se={x:o==="horizontal"?B.coordinate:X,y:o==="horizontal"?fe:B.coordinate},ie=cb({active:p.payload.active,coordinate:se,dataKey:p.payload.dataKey,index:String(B.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox});r(ie)}}};return lc.on(mb,u),()=>{lc.off(mb,u)}},[m,r,a,e,n,i,o,c])}function Cq(){var e=Te(P0),a=Te(M0),r=zt();b.useEffect(()=>{if(e==null)return oO;var n=(i,o,c)=>{a!==c&&e===i&&r(gq(o))};return lc.on(QA,n),()=>{lc.off(QA,n)}},[r,a,e])}function Eq(){var e=zt();b.useEffect(()=>{e(pq())},[e]),Sq(),Cq()}function kq(e,a,r,n,i,o){var c=Te(v=>Q$(v,e,a)),m=Te(M0),u=Te(P0),h=Te(qE),p=Te(hq),x=p?.active,j=qm();b.useEffect(()=>{if(!x&&u!=null&&m!=null){var v=cb({active:o,coordinate:r,dataKey:c,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:j});lc.emit(mb,u,v,m)}},[x,r,c,i,n,m,u,h,o,j])}function eS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tS(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?eS(Object(r),!0).forEach(function(n){Oq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oq(e,a,r){return(a=Dq(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function Dq(e){var a=Tq(e,"string");return typeof a=="symbol"?a:a+""}function Tq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Rq(e){return e.dataKey}function Pq(e,a){return b.isValidElement(e)?b.cloneElement(e,a):typeof e=="function"?b.createElement(e,a):b.createElement(JL,a)}var aS=[],Mq={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!ji.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function _q(e){var a=vr(e,Mq),{active:r,allowEscapeViewBox:n,animationDuration:i,animationEasing:o,content:c,filterNull:m,isAnimationActive:u,offset:h,payloadUniqBy:p,position:x,reverseDirection:j,useTranslate3d:v,wrapperStyle:w,cursor:S,shared:A,trigger:g,defaultIndex:C,portal:E,axisId:O}=a,D=zt(),B=typeof C=="number"?String(C):C;b.useEffect(()=>{D(a$({shared:A,trigger:g,axisId:O,active:r,defaultIndex:B}))},[D,A,g,O,r,B]);var L=qm(),T=z4(),R=QU(A),{activeIndex:z,isActive:U}=Te(ve=>eq(ve,R,g,B)),X=Te(ve=>Z$(ve,R,g,B)),fe=Te(ve=>nO(ve,R,g,B)),se=Te(ve=>X$(ve,R,g,B)),ie=X,V=iq(),K=r??U,[ce,$]=kz([ie,K]),I=R==="axis"?fe:void 0;kq(R,g,se,I,z,K);var P=E??V;if(P==null)return null;var H=ie??aS;K||(H=aS),m&&H.length&&(H=dz(ie.filter(ve=>ve.value!=null&&(ve.hide!==!0||a.includeHidden)),p,Rq));var ee=H.length>0,pe=b.createElement(aB,{allowEscapeViewBox:n,animationDuration:i,animationEasing:o,isAnimationActive:u,active:K,coordinate:se,hasPayload:ee,offset:h,position:x,reverseDirection:j,useTranslate3d:v,viewBox:L,wrapperStyle:w,lastBoundingBox:ce,innerRef:$,hasPortalFromProps:!!E},Pq(c,tS(tS({},a),{},{payload:H,label:I,active:K,coordinate:se,accessibilityLayer:T})));return b.createElement(b.Fragment,null,uM.createPortal(pe,P),K&&b.createElement(lq,{cursor:S,tooltipEventType:R,coordinate:se,payload:ie,index:z}))}var cO=e=>null;cO.displayName="Cell";function zq(e,a,r){return(a=Lq(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function Lq(e){var a=Bq(e,"string");return typeof a=="symbol"?a:a+""}function Bq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}class Iq{constructor(a){zq(this,"cache",new Map),this.maxSize=a}get(a){var r=this.cache.get(a);return r!==void 0&&(this.cache.delete(a),this.cache.set(a,r)),r}set(a,r){if(this.cache.has(a))this.cache.delete(a);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(a,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function rS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fq(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?rS(Object(r),!0).forEach(function(n){Uq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uq(e,a,r){return(a=$q(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function $q(e){var a=qq(e,"string");return typeof a=="symbol"?a:a+""}function qq(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var Hq={cacheSize:2e3,enableCache:!0},dO=Fq({},Hq),nS=new Iq(dO.cacheSize),Vq={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},sS="recharts_measurement_span";function Yq(e,a){var r=a.fontSize||"",n=a.fontFamily||"",i=a.fontWeight||"",o=a.fontStyle||"",c=a.letterSpacing||"",m=a.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(c,"|").concat(m)}var lS=(e,a)=>{try{var r=document.getElementById(sS);r||(r=document.createElement("span"),r.setAttribute("id",sS),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,Vq,a),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Go=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(a==null||ji.isSsr)return{width:0,height:0};if(!dO.enableCache)return lS(a,r);var n=Yq(a,r),i=nS.get(n);if(i)return i;var o=lS(a,r);return nS.set(n,o),o},iS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,oS=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Kq=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Gq=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,uO={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Jq=Object.keys(uO),ei="NaN";function Wq(e,a){return e*uO[a]}class Ta{static parse(a){var r,[,n,i]=(r=Gq.exec(a))!==null&&r!==void 0?r:[];return new Ta(parseFloat(n),i??"")}constructor(a,r){this.num=a,this.unit=r,this.num=a,this.unit=r,xr(a)&&(this.unit=""),r!==""&&!Kq.test(r)&&(this.num=NaN,this.unit=""),Jq.includes(r)&&(this.num=Wq(a,r),this.unit="px")}add(a){return this.unit!==a.unit?new Ta(NaN,""):new Ta(this.num+a.num,this.unit)}subtract(a){return this.unit!==a.unit?new Ta(NaN,""):new Ta(this.num-a.num,this.unit)}multiply(a){return this.unit!==""&&a.unit!==""&&this.unit!==a.unit?new Ta(NaN,""):new Ta(this.num*a.num,this.unit||a.unit)}divide(a){return this.unit!==""&&a.unit!==""&&this.unit!==a.unit?new Ta(NaN,""):new Ta(this.num/a.num,this.unit||a.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return xr(this.num)}}function mO(e){if(e.includes(ei))return ei;for(var a=e;a.includes("*")||a.includes("/");){var r,[,n,i,o]=(r=iS.exec(a))!==null&&r!==void 0?r:[],c=Ta.parse(n??""),m=Ta.parse(o??""),u=i==="*"?c.multiply(m):c.divide(m);if(u.isNaN())return ei;a=a.replace(iS,u.toString())}for(;a.includes("+")||/.-\d+(?:\.\d+)?/.test(a);){var h,[,p,x,j]=(h=oS.exec(a))!==null&&h!==void 0?h:[],v=Ta.parse(p??""),w=Ta.parse(j??""),S=x==="+"?v.add(w):v.subtract(w);if(S.isNaN())return ei;a=a.replace(oS,S.toString())}return a}var cS=/\(([^()]*)\)/;function Qq(e){for(var a=e,r;(r=cS.exec(a))!=null;){var[,n]=r;a=a.replace(cS,mO(n))}return a}function Xq(e){var a=e.replace(/\s+/g,"");return a=Qq(a),a=mO(a),a}function Zq(e){try{return Xq(e)}catch{return ei}}function ig(e){var a=Zq(e.slice(5,-1));return a===ei?"":a}var eH=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],tH=["dx","dy","angle","className","breakAll"];function fb(){return fb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fb.apply(null,arguments)}function dS(e,a){if(e==null)return{};var r,n,i=aH(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function aH(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var fO=/[ \f\n\r\t\v\u2028\u2029]+/,pO=e=>{var{children:a,breakAll:r,style:n}=e;try{var i=[];Gt(a)||(r?i=a.toString().split(""):i=a.toString().split(fO));var o=i.map(m=>({word:m,width:Go(m,n).width})),c=r?0:Go(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:c}}catch{return null}},rH=(e,a,r,n,i)=>{var{maxLines:o,children:c,style:m,breakAll:u}=e,h=De(o),p=c,x=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return U.reduce((X,fe)=>{var{word:se,width:ie}=fe,V=X[X.length-1];if(V&&(n==null||i||V.width+ie+r<Number(n)))V.words.push(se),V.width+=ie+r;else{var K={words:[se],width:ie};X.push(K)}return X},[])},j=x(a),v=z=>z.reduce((U,X)=>U.width>X.width?U:X);if(!h||i)return j;var w=j.length>o||v(j).width>Number(n);if(!w)return j;for(var S="…",A=z=>{var U=p.slice(0,z),X=pO({breakAll:u,style:m,children:U+S}).wordsWithComputedWidth,fe=x(X),se=fe.length>o||v(fe).width>Number(n);return[se,fe]},g=0,C=p.length-1,E=0,O;g<=C&&E<=p.length-1;){var D=Math.floor((g+C)/2),B=D-1,[L,T]=A(B),[R]=A(D);if(!L&&!R&&(g=D+1),L&&R&&(C=D-1),!L&&R){O=T;break}E++}return O||j},uS=e=>{var a=Gt(e)?[]:e.toString().split(fO);return[{words:a}]},nH=e=>{var{width:a,scaleToFit:r,children:n,style:i,breakAll:o,maxLines:c}=e;if((a||r)&&!ji.isSsr){var m,u,h=pO({breakAll:o,children:n,style:i});if(h){var{wordsWithComputedWidth:p,spaceWidth:x}=h;m=p,u=x}else return uS(n);return rH({breakAll:o,children:n,maxLines:c,style:i},m,u,a,r)}return uS(n)},mS="#808080",ny=b.forwardRef((e,a)=>{var{x:r=0,y:n=0,lineHeight:i="1em",capHeight:o="0.71em",scaleToFit:c=!1,textAnchor:m="start",verticalAnchor:u="end",fill:h=mS}=e,p=dS(e,eH),x=b.useMemo(()=>nH({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:c,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,c,p.style,p.width]),{dx:j,dy:v,angle:w,className:S,breakAll:A}=p,g=dS(p,tH);if(!Hr(r)||!Hr(n)||x.length===0)return null;var C=r+(De(j)?j:0),E=n+(De(v)?v:0),O;switch(u){case"start":O=ig("calc(".concat(o,")"));break;case"middle":O=ig("calc(".concat((x.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:O=ig("calc(".concat(x.length-1," * -").concat(i,")"));break}var D=[];if(c){var B=x[0].width,{width:L}=p;D.push("scale(".concat(De(L)?L/B:1,")"))}return w&&D.push("rotate(".concat(w,", ").concat(C,", ").concat(E,")")),D.length&&(g.transform=D.join(" ")),b.createElement("text",fb({},hr(g),{ref:a,x:C,y:E,className:gt("recharts-text",S),textAnchor:m,fill:h.includes("url")?mS:h}),x.map((T,R)=>{var z=T.words.join(A?"":" ");return b.createElement("tspan",{x:C,dy:R===0?O:i,key:"".concat(z,"-").concat(R)},z)}))});ny.displayName="Text";var sH=["labelRef"];function lH(e,a){if(e==null)return{};var r,n,i=iH(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function iH(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function fS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?fS(Object(r),!0).forEach(function(n){oH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oH(e,a,r){return(a=cH(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function cH(e){var a=dH(e,"string");return typeof a=="symbol"?a:a+""}function dH(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function xn(){return xn=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xn.apply(null,arguments)}var hO=b.createContext(null),uH=e=>{var{x:a,y:r,width:n,height:i,children:o}=e,c=b.useMemo(()=>({x:a,y:r,width:n,height:i}),[a,r,n,i]);return b.createElement(hO.Provider,{value:c},o)},xO=()=>{var e=b.useContext(hO),a=qm();return e||a},mH=b.createContext(null),fH=()=>{var e=b.useContext(mH),a=Te(GE);return e||a},pH=e=>{var{value:a,formatter:r}=e,n=Gt(e.children)?a:e.children;return typeof r=="function"?r(n):n},sy=e=>e!=null&&typeof e=="function",hH=(e,a)=>{var r=Ra(a-e),n=Math.min(Math.abs(a-e),360);return r*n},xH=(e,a,r,n,i)=>{var{offset:o,className:c}=e,{cx:m,cy:u,innerRadius:h,outerRadius:p,startAngle:x,endAngle:j,clockWise:v}=i,w=(h+p)/2,S=hH(x,j),A=S>=0?1:-1,g,C;switch(a){case"insideStart":g=x+A*o,C=v;break;case"insideEnd":g=j-A*o,C=!v;break;case"end":g=j+A*o,C=v;break;default:throw new Error("Unsupported position ".concat(a))}C=S<=0?C:!C;var E=oa(m,u,w,g),O=oa(m,u,w,g+(C?1:-1)*359),D="M".concat(E.x,",").concat(E.y,`
    A`).concat(w,",").concat(w,",0,1,").concat(C?0:1,`,
    `).concat(O.x,",").concat(O.y),B=Gt(e.id)?Zo("recharts-radial-line-"):e.id;return b.createElement("text",xn({},n,{dominantBaseline:"central",className:gt("recharts-radial-bar-label",c)}),b.createElement("defs",null,b.createElement("path",{id:B,d:D})),b.createElement("textPath",{xlinkHref:"#".concat(B)},r))},gH=(e,a,r)=>{var{cx:n,cy:i,innerRadius:o,outerRadius:c,startAngle:m,endAngle:u}=e,h=(m+u)/2;if(r==="outside"){var{x:p,y:x}=oa(n,i,c+a,h);return{x:p,y:x,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var j=(o+c)/2,{x:v,y:w}=oa(n,i,j,h);return{x:v,y:w,textAnchor:"middle",verticalAnchor:"middle"}},gO=e=>"cx"in e&&De(e.cx),bH=(e,a)=>{var{parentViewBox:r,offset:n,position:i}=e,o;r!=null&&!gO(r)&&(o=r);var{x:c,y:m,width:u,height:h}=a,p=h>=0?1:-1,x=p*n,j=p>0?"end":"start",v=p>0?"start":"end",w=u>=0?1:-1,S=w*n,A=w>0?"end":"start",g=w>0?"start":"end";if(i==="top"){var C={x:c+u/2,y:m-p*n,textAnchor:"middle",verticalAnchor:j};return kt(kt({},C),o?{height:Math.max(m-o.y,0),width:u}:{})}if(i==="bottom"){var E={x:c+u/2,y:m+h+x,textAnchor:"middle",verticalAnchor:v};return kt(kt({},E),o?{height:Math.max(o.y+o.height-(m+h),0),width:u}:{})}if(i==="left"){var O={x:c-S,y:m+h/2,textAnchor:A,verticalAnchor:"middle"};return kt(kt({},O),o?{width:Math.max(O.x-o.x,0),height:h}:{})}if(i==="right"){var D={x:c+u+S,y:m+h/2,textAnchor:g,verticalAnchor:"middle"};return kt(kt({},D),o?{width:Math.max(o.x+o.width-D.x,0),height:h}:{})}var B=o?{width:u,height:h}:{};return i==="insideLeft"?kt({x:c+S,y:m+h/2,textAnchor:g,verticalAnchor:"middle"},B):i==="insideRight"?kt({x:c+u-S,y:m+h/2,textAnchor:A,verticalAnchor:"middle"},B):i==="insideTop"?kt({x:c+u/2,y:m+x,textAnchor:"middle",verticalAnchor:v},B):i==="insideBottom"?kt({x:c+u/2,y:m+h-x,textAnchor:"middle",verticalAnchor:j},B):i==="insideTopLeft"?kt({x:c+S,y:m+x,textAnchor:g,verticalAnchor:v},B):i==="insideTopRight"?kt({x:c+u-S,y:m+x,textAnchor:A,verticalAnchor:v},B):i==="insideBottomLeft"?kt({x:c+S,y:m+h-x,textAnchor:g,verticalAnchor:j},B):i==="insideBottomRight"?kt({x:c+u-S,y:m+h-x,textAnchor:A,verticalAnchor:j},B):i&&typeof i=="object"&&(De(i.x)||Cn(i.x))&&(De(i.y)||Cn(i.y))?kt({x:c+kr(i.x,u),y:m+kr(i.y,h),textAnchor:"end",verticalAnchor:"end"},B):kt({x:c+u/2,y:m+h/2,textAnchor:"middle",verticalAnchor:"middle"},B)},yH={offset:5};function ds(e){var a=vr(e,yH),{viewBox:r,position:n,value:i,children:o,content:c,className:m="",textBreakAll:u,labelRef:h}=a,p=fH(),x=xO(),j=n==="center"?x:p??x,v=r||j;if(!v||Gt(i)&&Gt(o)&&!b.isValidElement(c)&&typeof c!="function")return null;var w=kt(kt({},a),{},{viewBox:v});if(b.isValidElement(c)){var{labelRef:S}=w,A=lH(w,sH);return b.cloneElement(c,A)}var g;if(typeof c=="function"){if(g=b.createElement(c,w),b.isValidElement(g))return g}else g=pH(a);var C=gO(v),E=hr(a);if(C&&(n==="insideStart"||n==="insideEnd"||n==="end"))return xH(a,n,g,E,v);var O=C?gH(v,a.offset,a.position):bH(a,v);return b.createElement(ny,xn({ref:h,className:gt("recharts-label",m)},E,O,{breakAll:u}),g)}ds.displayName="Label";var vH=(e,a,r)=>{if(!e)return null;var n={viewBox:a,labelRef:r};return e===!0?b.createElement(ds,xn({key:"label-implicit"},n)):Hr(e)?b.createElement(ds,xn({key:"label-implicit",value:e},n)):b.isValidElement(e)?e.type===ds?b.cloneElement(e,kt({key:"label-implicit"},n)):b.createElement(ds,xn({key:"label-implicit",content:e},n)):sy(e)?b.createElement(ds,xn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?b.createElement(ds,xn({},e,{key:"label-implicit"},n)):null};function jH(e){var{label:a,labelRef:r}=e,n=xO();return vH(a,n,r)||null}var og={},cg={},pS;function NH(){return pS||(pS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return r[r.length-1]}e.last=a})(cg)),cg}var dg={},hS;function wH(){return hS||(hS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=a})(dg)),dg}var xS;function AH(){return xS||(xS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const a=NH(),r=wH(),n=Xb();function i(o){if(n.isArrayLike(o))return a.last(r.toArray(o))}e.last=i})(og)),og}var ug,gS;function SH(){return gS||(gS=1,ug=AH().last),ug}var CH=SH();const EH=Or(CH);var kH=["valueAccessor"],OH=["dataKey","clockWise","id","textBreakAll"];function om(){return om=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},om.apply(null,arguments)}function bS(e,a){if(e==null)return{};var r,n,i=DH(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function DH(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var TH=e=>Array.isArray(e.value)?EH(e.value):e.value,bO=b.createContext(void 0),RH=bO.Provider,yO=b.createContext(void 0);yO.Provider;function PH(){return b.useContext(bO)}function MH(){return b.useContext(yO)}function Cu(e){var{valueAccessor:a=TH}=e,r=bS(e,kH),{dataKey:n,clockWise:i,id:o,textBreakAll:c}=r,m=bS(r,OH),u=PH(),h=MH(),p=u||h;return!p||!p.length?null:b.createElement(xs,{className:"recharts-label-list"},p.map((x,j)=>{var v,w=Gt(n)?a(x,j):Na(x&&x.payload,n),S=Gt(o)?{}:{id:"".concat(o,"-").concat(j)};return b.createElement(ds,om({key:"label-".concat(j)},hr(x),m,S,{fill:(v=r.fill)!==null&&v!==void 0?v:x.fill,parentViewBox:x.parentViewBox,value:w,textBreakAll:c,viewBox:x.viewBox,index:j}))}))}Cu.displayName="LabelList";function _H(e){var{label:a}=e;return a?a===!0?b.createElement(Cu,{key:"labelList-implicit"}):b.isValidElement(a)||sy(a)?b.createElement(Cu,{key:"labelList-implicit",content:a}):typeof a=="object"?b.createElement(Cu,om({key:"labelList-implicit"},a,{type:String(a.type)})):null:null}var zH={radiusAxis:{},angleAxis:{}},vO=za({name:"polarAxis",initialState:zH,reducers:{addRadiusAxis(e,a){e.radiusAxis[a.payload.id]=a.payload},removeRadiusAxis(e,a){delete e.radiusAxis[a.payload.id]},addAngleAxis(e,a){e.angleAxis[a.payload.id]=a.payload},removeAngleAxis(e,a){delete e.angleAxis[a.payload.id]}}}),{addRadiusAxis:JQ,removeRadiusAxis:WQ,addAngleAxis:QQ,removeAngleAxis:XQ}=vO.actions,LH=vO.reducer,mg={exports:{}},lt={};/**
 * @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 yS;function BH(){if(yS)return lt;yS=1;var e=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),j=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function w(S){if(typeof S=="object"&&S!==null){var A=S.$$typeof;switch(A){case e:switch(S=S.type,S){case r:case i:case n:case u:case h:case j:return S;default:switch(S=S&&S.$$typeof,S){case c:case m:case x:case p:return S;case o:return S;default:return A}}case a:return A}}}return lt.ContextConsumer=o,lt.ContextProvider=c,lt.Element=e,lt.ForwardRef=m,lt.Fragment=r,lt.Lazy=x,lt.Memo=p,lt.Portal=a,lt.Profiler=i,lt.StrictMode=n,lt.Suspense=u,lt.SuspenseList=h,lt.isContextConsumer=function(S){return w(S)===o},lt.isContextProvider=function(S){return w(S)===c},lt.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===e},lt.isForwardRef=function(S){return w(S)===m},lt.isFragment=function(S){return w(S)===r},lt.isLazy=function(S){return w(S)===x},lt.isMemo=function(S){return w(S)===p},lt.isPortal=function(S){return w(S)===a},lt.isProfiler=function(S){return w(S)===i},lt.isStrictMode=function(S){return w(S)===n},lt.isSuspense=function(S){return w(S)===u},lt.isSuspenseList=function(S){return w(S)===h},lt.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===i||S===n||S===u||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===x||S.$$typeof===p||S.$$typeof===c||S.$$typeof===o||S.$$typeof===m||S.$$typeof===v||S.getModuleId!==void 0)},lt.typeOf=w,lt}var vS;function IH(){return vS||(vS=1,mg.exports=BH()),mg.exports}var FH=IH(),jS=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",NS=null,fg=null,jO=e=>{if(e===NS&&Array.isArray(fg))return fg;var a=[];return b.Children.forEach(e,r=>{Gt(r)||(FH.isFragment(r)?a=a.concat(jO(r.props.children)):a.push(r))}),fg=a,NS=e,a};function UH(e,a){var r=[],n=[];return Array.isArray(a)?n=a.map(i=>jS(i)):n=[jS(a)],jO(e).forEach(i=>{var o=si(i,"type.displayName")||si(i,"type.name");n.indexOf(o)!==-1&&r.push(i)}),r}var pg={},wS;function $H(){return wS||(wS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function a(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 i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=a})(pg)),pg}var hg,AS;function qH(){return AS||(AS=1,hg=$H().isPlainObject),hg}var HH=qH();const VH=Or(HH);function SS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function CS(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?SS(Object(r),!0).forEach(function(n){YH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YH(e,a,r){return(a=KH(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function KH(e){var a=GH(e,"string");return typeof a=="symbol"?a:a+""}function GH(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cm.apply(null,arguments)}var ES=(e,a,r,n,i)=>{var o=r-n,c;return c="M ".concat(e,",").concat(a),c+="L ".concat(e+r,",").concat(a),c+="L ".concat(e+r-o/2,",").concat(a+i),c+="L ".concat(e+r-o/2-n,",").concat(a+i),c+="L ".concat(e,",").concat(a," Z"),c},JH={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},WH=e=>{var a=vr(e,JH),{x:r,y:n,upperWidth:i,lowerWidth:o,height:c,className:m}=a,{animationEasing:u,animationDuration:h,animationBegin:p,isUpdateAnimationActive:x}=a,j=b.useRef(null),[v,w]=b.useState(-1),S=b.useRef(i),A=b.useRef(o),g=b.useRef(c),C=b.useRef(r),E=b.useRef(n),O=s0(e,"trapezoid-");if(b.useEffect(()=>{if(j.current&&j.current.getTotalLength)try{var se=j.current.getTotalLength();se&&w(se)}catch{}},[]),r!==+r||n!==+n||i!==+i||o!==+o||c!==+c||i===0&&o===0||c===0)return null;var D=gt("recharts-trapezoid",m);if(!x)return b.createElement("g",null,b.createElement("path",cm({},hr(a),{className:D,d:ES(r,n,i,o,c)})));var B=S.current,L=A.current,T=g.current,R=C.current,z=E.current,U="0px ".concat(v===-1?1:v,"px"),X="".concat(v,"px 0px"),fe=L4(["strokeDasharray"],h,u);return b.createElement(n0,{animationId:O,key:O,canBegin:v>0,duration:h,easing:u,isActive:x,begin:p},se=>{var ie=ga(B,i,se),V=ga(L,o,se),K=ga(T,c,se),ce=ga(R,r,se),$=ga(z,n,se);j.current&&(S.current=ie,A.current=V,g.current=K,C.current=ce,E.current=$);var I=se>0?{transition:fe,strokeDasharray:X}:{strokeDasharray:U};return b.createElement("path",cm({},hr(a),{className:D,d:ES(ce,$,ie,V,K),ref:j,style:CS(CS({},I),a.style)}))})},QH=["option","shapeType","propTransformer","activeClassName","isActive"];function XH(e,a){if(e==null)return{};var r,n,i=ZH(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ZH(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function kS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dm(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?kS(Object(r),!0).forEach(function(n){eV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eV(e,a,r){return(a=tV(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function tV(e){var a=aV(e,"string");return typeof a=="symbol"?a:a+""}function aV(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function rV(e,a){return dm(dm({},a),e)}function nV(e,a){return e==="symbols"}function OS(e){var{shapeType:a,elementProps:r}=e;switch(a){case"rectangle":return b.createElement(U4,r);case"trapezoid":return b.createElement(WH,r);case"sector":return b.createElement(H4,r);case"symbols":if(nV(a))return b.createElement(d4,r);break;default:return null}}function sV(e){return b.isValidElement(e)?e.props:e}function lV(e){var{option:a,shapeType:r,propTransformer:n=rV,activeClassName:i="recharts-active-shape",isActive:o}=e,c=XH(e,QH),m;if(b.isValidElement(a))m=b.cloneElement(a,dm(dm({},c),sV(a)));else if(typeof a=="function")m=a(c);else if(VH(a)&&typeof a!="boolean"){var u=n(a,c);m=b.createElement(OS,{shapeType:r,elementProps:u})}else{var h=c;m=b.createElement(OS,{shapeType:r,elementProps:h})}return o?b.createElement(xs,{className:i},m):m}var NO=(e,a)=>{var r=zt();return(n,i)=>o=>{e?.(n,i,o),r(Bk({activeIndex:String(i),activeDataKey:a,activeCoordinate:n.tooltipPosition}))}},wO=e=>{var a=zt();return(r,n)=>i=>{e?.(r,n,i),a(r$())}},AO=(e,a)=>{var r=zt();return(n,i)=>o=>{e?.(n,i,o),r(n$({activeIndex:String(i),activeDataKey:a,activeCoordinate:n.tooltipPosition}))}};function iV(e){var{fn:a,args:r}=e,n=zt(),i=Wa();return b.useLayoutEffect(()=>{if(!i){var o=a(r);return n(e$(o)),()=>{n(t$(o))}}},[a,r,n,i]),null}var oV=()=>{};function cV(e){var{legendPayload:a}=e,r=zt(),n=Wa();return b.useLayoutEffect(()=>n?oV:(r($L(a)),()=>{r(qL(a))}),[r,n,a]),null}var xg,dV=()=>{var[e]=b.useState(()=>Zo("uid-"));return e},uV=(xg=A6.useId)!==null&&xg!==void 0?xg:dV;function mV(e,a){var r=uV();return a||(e?"".concat(e,"-").concat(r):r)}var fV=b.createContext(void 0),pV=e=>{var{id:a,type:r,children:n}=e,i=mV("recharts-".concat(r),a);return b.createElement(fV.Provider,{value:i},n(i))},hV={cartesianItems:[],polarItems:[]},SO=za({name:"graphicalItems",initialState:hV,reducers:{addCartesianGraphicalItem:{reducer(e,a){e.cartesianItems.push(a.payload)},prepare:xa()},replaceCartesianGraphicalItem:{reducer(e,a){var{prev:r,next:n}=a.payload,i=yn(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:xa()},removeCartesianGraphicalItem:{reducer(e,a){var r=yn(e).cartesianItems.indexOf(a.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:xa()},addPolarGraphicalItem:{reducer(e,a){e.polarItems.push(a.payload)},prepare:xa()},removePolarGraphicalItem:{reducer(e,a){var r=yn(e).polarItems.indexOf(a.payload);r>-1&&e.polarItems.splice(r,1)},prepare:xa()}}}),{addCartesianGraphicalItem:xV,replaceCartesianGraphicalItem:gV,removeCartesianGraphicalItem:bV,addPolarGraphicalItem:ZQ,removePolarGraphicalItem:eX}=SO.actions,yV=SO.reducer;function vV(e){var a=zt(),r=b.useRef(null);return b.useLayoutEffect(()=>{r.current===null?a(xV(e)):r.current!==e&&a(gV({prev:r.current,next:e})),r.current=e},[a,e]),b.useLayoutEffect(()=>()=>{r.current&&(a(bV(r.current)),r.current=null)},[a]),null}function DS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TS(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?DS(Object(r),!0).forEach(function(n){jV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jV(e,a,r){return(a=NV(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function NV(e){var a=wV(e,"string");return typeof a=="symbol"?a:a+""}function wV(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var AV={xAxis:{},yAxis:{},zAxis:{}},CO=za({name:"cartesianAxis",initialState:AV,reducers:{addXAxis:{reducer(e,a){e.xAxis[a.payload.id]=a.payload},prepare:xa()},removeXAxis:{reducer(e,a){delete e.xAxis[a.payload.id]},prepare:xa()},addYAxis:{reducer(e,a){e.yAxis[a.payload.id]=a.payload},prepare:xa()},removeYAxis:{reducer(e,a){delete e.yAxis[a.payload.id]},prepare:xa()},addZAxis:{reducer(e,a){e.zAxis[a.payload.id]=a.payload},prepare:xa()},removeZAxis:{reducer(e,a){delete e.zAxis[a.payload.id]},prepare:xa()},updateYAxisWidth(e,a){var{id:r,width:n}=a.payload,i=e.yAxis[r];if(i){var o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&n===o[1]&&n!==i.width&&Math.abs(n-o[0])<=1)return;var c=[...o,n].slice(-3);e.yAxis[r]=TS(TS({},e.yAxis[r]),{},{width:n,widthHistory:c})}}}}),{addXAxis:SV,removeXAxis:CV,addYAxis:EV,removeYAxis:kV,addZAxis:tX,removeZAxis:aX,updateYAxisWidth:OV}=CO.actions,DV=CO.reducer,TV=le([Qt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),RV=le([TV,Pn,Mn],(e,a,r)=>{if(!(!e||a==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,a-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),EO=()=>Te(RV),PV="Invariant failed";function MV(e,a){throw new Error(PV)}var _V=["x","y"];function pb(){return pb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pb.apply(null,arguments)}function RS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fo(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?RS(Object(r),!0).forEach(function(n){zV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zV(e,a,r){return(a=LV(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function LV(e){var a=BV(e,"string");return typeof a=="symbol"?a:a+""}function BV(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function IV(e,a){if(e==null)return{};var r,n,i=FV(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function FV(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function UV(e,a){var{x:r,y:n}=e,i=IV(e,_V),o="".concat(r),c=parseInt(o,10),m="".concat(n),u=parseInt(m,10),h="".concat(a.height||i.height),p=parseInt(h,10),x="".concat(a.width||i.width),j=parseInt(x,10);return Fo(Fo(Fo(Fo(Fo({},a),i),c?{x:c}:{}),u?{y:u}:{}),{},{height:p,width:j,name:a.name,radius:a.radius})}function ly(e){return b.createElement(lV,pb({shapeType:"rectangle",propTransformer:UV,activeClassName:"recharts-active-bar"},e))}var $V=function(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(De(a))return a;var o=De(n)||Gt(n);return o?a(n,i):(o||MV(),r)}},qV={},kO=za({name:"errorBars",initialState:qV,reducers:{addErrorBar:(e,a)=>{var{itemId:r,errorBar:n}=a.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,a)=>{var{itemId:r,prev:n,next:i}=a.payload;e[r]&&(e[r]=e[r].map(o=>o.dataKey===n.dataKey&&o.direction===n.direction?i:o))},removeErrorBar:(e,a)=>{var{itemId:r,errorBar:n}=a.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:rX,replaceErrorBar:nX,removeErrorBar:sX}=kO.actions,HV=kO.reducer,VV=["children"];function YV(e,a){if(e==null)return{};var r,n,i=KV(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function KV(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var GV={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},JV=b.createContext(GV);function WV(e){var{children:a}=e,r=YV(e,VV);return b.createElement(JV.Provider,{value:r},a)}function OO(e,a){var r,n,i=Te(h=>zn(h,e)),o=Te(h=>Ln(h,a)),c=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:Ha.allowDataOverflow,m=(n=o?.allowDataOverflow)!==null&&n!==void 0?n:Va.allowDataOverflow,u=c||m;return{needClip:u,needClipX:c,needClipY:m}}function QV(e){var{xAxisId:a,yAxisId:r,clipPathId:n}=e,i=EO(),{needClipX:o,needClipY:c,needClip:m}=OO(a,r);if(!m)return null;var{x:u,y:h,width:p,height:x}=i;return b.createElement("clipPath",{id:"clipPath-".concat(n)},b.createElement("rect",{x:o?u:u-p/2,y:c?h:h-x/2,width:o?p:p*2,height:c?x:x*2}))}var XV=["onMouseEnter","onMouseLeave","onClick"],ZV=["value","background","tooltipPosition"],eY=["id"],tY=["onMouseEnter","onClick","onMouseLeave"];function gs(){return gs=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gs.apply(null,arguments)}function PS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ba(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?PS(Object(r),!0).forEach(function(n){aY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aY(e,a,r){return(a=rY(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function rY(e){var a=nY(e,"string");return typeof a=="symbol"?a:a+""}function nY(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function um(e,a){if(e==null)return{};var r,n,i=sY(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function sY(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var lY=e=>{var{dataKey:a,name:r,fill:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:a,type:i,color:n,value:E4(r,a),payload:e}]};function iY(e){var{dataKey:a,stroke:r,strokeWidth:n,fill:i,name:o,hide:c,unit:m}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:a,nameKey:void 0,name:E4(o,a),hide:c,type:e.tooltipType,color:e.fill,unit:m}}}function oY(e){var a=Te(mi),{data:r,dataKey:n,background:i,allOtherBarProps:o}=e,{onMouseEnter:c,onMouseLeave:m,onClick:u}=o,h=um(o,XV),p=NO(c,n),x=wO(m),j=AO(u,n);if(!i||r==null)return null;var v=Hb(i);return b.createElement(b.Fragment,null,r.map((w,S)=>{var{value:A,background:g,tooltipPosition:C}=w,E=um(w,ZV);if(!g)return null;var O=p(w,S),D=x(w,S),B=j(w,S),L=ba(ba(ba(ba(ba({option:i,isActive:String(S)===a},E),{},{fill:"#eee"},g),v),Qb(h,w,S)),{},{onMouseEnter:O,onMouseLeave:D,onClick:B,dataKey:n,index:S,className:"recharts-bar-background-rectangle"});return b.createElement(ly,gs({key:"background-bar-".concat(S)},L))}))}function cY(e){var{showLabels:a,children:r,rects:n}=e,i=n?.map(o=>{var c={x:o.x,y:o.y,width:o.width,height:o.height};return ba(ba({},c),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:c,fill:o.fill})});return b.createElement(RH,{value:a?i:void 0},r)}function dY(e){var{shape:a,activeBar:r,baseProps:n,entry:i,index:o,dataKey:c}=e,m=Te(mi),u=Te(Zk),h=r&&String(o)===m&&(u==null||c===u),p=h?r:a;return b.createElement(ly,gs({},n,{name:String(n.name)},i,{isActive:h,option:p,index:o,dataKey:c}))}function uY(e){var{shape:a,baseProps:r,entry:n,index:i,dataKey:o}=e;return b.createElement(ly,gs({},r,{name:String(r.name)},n,{isActive:!1,option:a,index:i,dataKey:o}))}function mY(e){var{data:a,props:r}=e,n=Sn(r),{id:i}=n,o=um(n,eY),{shape:c,dataKey:m,activeBar:u}=r,{onMouseEnter:h,onClick:p,onMouseLeave:x}=r,j=um(r,tY),v=NO(h,m),w=wO(x),S=AO(p,m);return a?b.createElement(b.Fragment,null,a.map((A,g)=>b.createElement(xs,gs({key:"rectangle-".concat(A?.x,"-").concat(A?.y,"-").concat(A?.value,"-").concat(g),className:"recharts-bar-rectangle"},Qb(j,A,g),{onMouseEnter:v(A,g),onMouseLeave:w(A,g),onClick:S(A,g)}),u?b.createElement(dY,{shape:c,activeBar:u,baseProps:o,entry:A,index:g,dataKey:m}):b.createElement(uY,{shape:c,baseProps:o,entry:A,index:g,dataKey:m})))):null}function fY(e){var{props:a,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:o,animationBegin:c,animationDuration:m,animationEasing:u,onAnimationEnd:h,onAnimationStart:p}=a,x=r.current,j=s0(a,"recharts-bar-"),[v,w]=b.useState(!1),S=!v,A=b.useCallback(()=>{typeof h=="function"&&h(),w(!1)},[h]),g=b.useCallback(()=>{typeof p=="function"&&p(),w(!0)},[p]);return b.createElement(cY,{showLabels:S,rects:n},b.createElement(n0,{animationId:j,begin:c,duration:m,isActive:o,easing:u,onAnimationEnd:A,onAnimationStart:g,key:j},C=>{var E=C===1?n:n?.map((O,D)=>{var B=x&&x[D];if(B)return ba(ba({},O),{},{x:ga(B.x,O.x,C),y:ga(B.y,O.y,C),width:ga(B.width,O.width,C),height:ga(B.height,O.height,C)});if(i==="horizontal"){var L=ga(0,O.height,C);return ba(ba({},O),{},{y:O.y+O.height-L,height:L})}var T=ga(0,O.width,C);return ba(ba({},O),{},{width:T})});return C>0&&(r.current=E??null),E==null?null:b.createElement(xs,null,b.createElement(mY,{props:a,data:E}))}),b.createElement(_H,{label:a.label}),a.children)}function pY(e){var a=b.useRef(null);return b.createElement(fY,{previousRectanglesRef:a,props:e})}var DO=0,hY=(e,a)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Na(e,a)}};class xY extends b.PureComponent{render(){var{hide:a,data:r,dataKey:n,className:i,xAxisId:o,yAxisId:c,needClip:m,background:u,id:h}=this.props;if(a||r==null)return null;var p=gt("recharts-bar",i),x=h;return b.createElement(xs,{className:p,id:h},m&&b.createElement("defs",null,b.createElement(QV,{clipPathId:x,xAxisId:o,yAxisId:c})),b.createElement(xs,{className:"recharts-bar-rectangles",clipPath:m?"url(#clipPath-".concat(x,")"):void 0},b.createElement(oY,{data:r,dataKey:n,background:u,allOtherBarProps:this.props}),b.createElement(pY,this.props)))}}var gY={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!ji.isSsr,legendType:"rect",minPointSize:DO,xAxisId:0,yAxisId:0};function bY(e){var{xAxisId:a,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:c,animationBegin:m,animationDuration:u,animationEasing:h,isAnimationActive:p}=e,{needClip:x}=OO(a,r),j=r0(),v=Wa(),w=UH(e.children,cO),S=Te(C=>YY(C,a,r,v,e.id,w));if(j!=="vertical"&&j!=="horizontal")return null;var A,g=S?.[0];return g==null||g.height==null||g.width==null?A=0:A=j==="vertical"?g.height/2:g.width/2,b.createElement(WV,{xAxisId:a,yAxisId:r,data:S,dataPointFormatter:hY,errorBarOffset:A},b.createElement(xY,gs({},e,{layout:j,needClip:x,data:S,xAxisId:a,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:c,animationBegin:m,animationDuration:u,animationEasing:h,isAnimationActive:p})))}function yY(e){var{layout:a,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:o,xAxis:c,yAxis:m,xAxisTicks:u,yAxisTicks:h,stackedData:p,displayedData:x,offset:j,cells:v,parentViewBox:w}=e,S=a==="horizontal"?m:c,A=p?S.scale.domain():null,g=rL({numericAxis:S});return x.map((C,E)=>{var O,D,B,L,T,R;p?O=Qz(p[E],A):(O=Na(C,r),Array.isArray(O)||(O=[g,O]));var z=$V(n,DO)(O[1],E);if(a==="horizontal"){var U,[X,fe]=[m.scale(O[0]),m.scale(O[1])];D=v1({axis:c,ticks:u,bandSize:o,offset:i.offset,entry:C,index:E}),B=(U=fe??X)!==null&&U!==void 0?U:void 0,L=i.size;var se=X-fe;if(T=xr(se)?0:se,R={x:D,y:j.top,width:L,height:j.height},Math.abs(z)>0&&Math.abs(T)<Math.abs(z)){var ie=Ra(T||z)*(Math.abs(z)-Math.abs(T));B-=ie,T+=ie}}else{var[V,K]=[c.scale(O[0]),c.scale(O[1])];if(D=V,B=v1({axis:m,ticks:h,bandSize:o,offset:i.offset,entry:C,index:E}),L=K-V,T=i.size,R={x:j.left,y:B,width:j.width,height:T},Math.abs(z)>0&&Math.abs(L)<Math.abs(z)){var ce=Ra(L||z)*(Math.abs(z)-Math.abs(L));L+=ce}}if(D==null||B==null||L==null||T==null)return null;var $=ba(ba({},C),{},{x:D,y:B,width:L,height:T,value:p?O:O[1],payload:C,background:R,tooltipPosition:{x:D+L/2,y:B+T/2},parentViewBox:w},v&&v[E]&&v[E].props);return $}).filter(Boolean)}function vY(e){var a=vr(e,gY),r=Wa();return b.createElement(pV,{id:a.id,type:"bar"},n=>b.createElement(b.Fragment,null,b.createElement(cV,{legendPayload:lY(a)}),b.createElement(iV,{fn:iY,args:a}),b.createElement(vV,{type:"bar",id:n,data:void 0,xAxisId:a.xAxisId,yAxisId:a.yAxisId,zAxisId:0,dataKey:a.dataKey,stackId:aL(a.stackId),hide:a.hide,barSize:a.barSize,minPointSize:a.minPointSize,maxBarSize:a.maxBarSize,isPanorama:r}),b.createElement(bY,gs({},a,{id:n}))))}var TO=b.memo(vY);TO.displayName="Bar";function MS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uu(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?MS(Object(r),!0).forEach(function(n){jY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jY(e,a,r){return(a=NY(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function NY(e){var a=wY(e,"string");return typeof a=="symbol"?a:a+""}function wY(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var AY=(e,a)=>a,SY=(e,a,r)=>r,CY=(e,a,r,n)=>n,EY=(e,a,r,n,i)=>i,Oc=le([F0,EY],(e,a)=>e.filter(r=>r.type==="bar").find(r=>r.id===a)),kY=le([Oc],e=>e?.maxBarSize),OY=(e,a,r,n,i,o)=>o,_S=(e,a,r)=>{var n=r??e;if(!Gt(n))return kr(n,a,0)},DY=le([at,F0,AY,SY,CY],(e,a,r,n,i)=>a.filter(o=>e==="horizontal"?o.xAxisId===r:o.yAxisId===n).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),TY=(e,a,r,n)=>{var i=at(e);return i==="horizontal"?ob(e,"yAxis",r,n):ob(e,"xAxis",a,n)},RY=(e,a,r)=>{var n=at(e);return n==="horizontal"?$A(e,"xAxis",a):$A(e,"yAxis",r)},PY=(e,a,r)=>{var n={},i=e.filter(af),o=e.filter(h=>h.stackId==null),c=i.reduce((h,p)=>(h[p.stackId]||(h[p.stackId]=[]),h[p.stackId].push(p),h),n),m=Object.entries(c).map(h=>{var[p,x]=h,j=x.map(w=>w.dataKey),v=_S(a,r,x[0].barSize);return{stackId:p,dataKeys:j,barSize:v}}),u=o.map(h=>{var p=[h.dataKey].filter(j=>j!=null),x=_S(a,r,h.barSize);return{stackId:void 0,dataKeys:p,barSize:x}});return[...m,...u]},MY=le([DY,W9,RY],PY),_Y=(e,a,r,n,i)=>{var o,c,m=Oc(e,a,r,n,i);if(m!=null){var u=at(e),h=UE(e),{maxBarSize:p}=m,x=Gt(p)?h:p,j,v;return u==="horizontal"?(j=ui(e,"xAxis",a,n),v=di(e,"xAxis",a,n)):(j=ui(e,"yAxis",r,n),v=di(e,"yAxis",r,n)),(o=(c=e0(j,v,!0))!==null&&c!==void 0?c:x)!==null&&o!==void 0?o:0}},RO=(e,a,r,n)=>{var i=at(e),o,c;return i==="horizontal"?(o=ui(e,"xAxis",a,n),c=di(e,"xAxis",a,n)):(o=ui(e,"yAxis",r,n),c=di(e,"yAxis",r,n)),e0(o,c)};function zY(e,a,r,n,i){var o=n.length;if(!(o<1)){var c=kr(e,r,0,!0),m,u=[];if(fa(n[0].barSize)){var h=!1,p=r/o,x=n.reduce((g,C)=>g+(C.barSize||0),0);x+=(o-1)*c,x>=r&&(x-=(o-1)*c,c=0),x>=r&&p>0&&(h=!0,p*=.9,x=o*p);var j=(r-x)/2>>0,v={offset:j-c,size:0};m=n.reduce((g,C)=>{var E,O={stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:v.offset+v.size+c,size:h?p:(E=C.barSize)!==null&&E!==void 0?E:0}},D=[...g,O];return v=D[D.length-1].position,D},u)}else{var w=kr(a,r,0,!0);r-2*w-(o-1)*c<=0&&(c=0);var S=(r-2*w-(o-1)*c)/o;S>1&&(S>>=0);var A=fa(i)?Math.min(S,i):S;m=n.reduce((g,C,E)=>[...g,{stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:w+(S+c)*E+(S-A)/2,size:A}}],u)}return m}}var LY=(e,a,r,n,i,o,c)=>{var m=Gt(c)?a:c,u=zY(r,n,i!==o?i:o,e,m);return i!==o&&u!=null&&(u=u.map(h=>uu(uu({},h),{},{position:uu(uu({},h.position),{},{offset:h.position.offset-i/2})}))),u},BY=le([MY,UE,J9,$E,_Y,RO,kY],LY),IY=(e,a,r,n)=>ui(e,"xAxis",a,n),FY=(e,a,r,n)=>ui(e,"yAxis",r,n),UY=(e,a,r,n)=>di(e,"xAxis",a,n),$Y=(e,a,r,n)=>di(e,"yAxis",r,n),qY=le([BY,Oc],(e,a)=>{if(!(e==null||a==null)){var r=e.find(n=>n.stackId===a.stackId&&a.dataKey!=null&&n.dataKeys.includes(a.dataKey));if(r!=null)return r.position}}),HY=(e,a)=>{var r=B0(a);if(!(!e||r==null||a==null)){var{stackId:n}=a;if(n!=null){var i=e[n];if(i){var{stackedData:o}=i;if(o)return o.find(c=>c.key===r)}}}},VY=le([TY,Oc],HY),YY=le([Qt,t0,IY,FY,UY,$Y,qY,at,O0,RO,VY,Oc,OY],(e,a,r,n,i,o,c,m,u,h,p,x,j)=>{var{chartData:v,dataStartIndex:w,dataEndIndex:S}=u;if(!(x==null||c==null||a==null||m!=="horizontal"&&m!=="vertical"||r==null||n==null||i==null||o==null||h==null)){var{data:A}=x,g;if(A!=null&&A.length>0?g=A:g=v?.slice(w,S+1),g!=null)return yY({layout:m,barSettings:x,pos:c,parentViewBox:a,bandSize:h,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,stackedData:p,displayedData:g,offset:e,cells:j})}}),KY=e=>{var{chartData:a}=e,r=zt(),n=Wa();return b.useEffect(()=>n?()=>{}:(r(XA(a)),()=>{r(XA(void 0))}),[a,r,n]),null},zS={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},PO=za({name:"brush",initialState:zS,reducers:{setBrushSettings(e,a){return a.payload==null?zS:a.payload}}}),{setBrushSettings:lX}=PO.actions,GY=PO.reducer;function JY(e,a,r){return(a=WY(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function WY(e){var a=QY(e,"string");return typeof a=="symbol"?a:a+""}function QY(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}class iy{static create(a){return new iy(a)}constructor(a){this.scale=a}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(a){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(a!==void 0){if(n)switch(n){case"start":return this.scale(a);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(a)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(a)+o}default:return this.scale(a)}if(r){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(a)+c}return this.scale(a)}}isInRange(a){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?a>=n&&a<=i:a>=i&&a<=n}}JY(iy,"EPS",1e-4);function XY(e){return(e%180+180)%180}var ZY=function(a){var{width:r,height:n}=a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=XY(i),c=o*Math.PI/180,m=Math.atan(n/r),u=c>m&&c<Math.PI-m?n/Math.sin(c):r/Math.cos(c);return Math.abs(u)},eK={dots:[],areas:[],lines:[]},MO=za({name:"referenceElements",initialState:eK,reducers:{addDot:(e,a)=>{e.dots.push(a.payload)},removeDot:(e,a)=>{var r=yn(e).dots.findIndex(n=>n===a.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,a)=>{e.areas.push(a.payload)},removeArea:(e,a)=>{var r=yn(e).areas.findIndex(n=>n===a.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,a)=>{e.lines.push(a.payload)},removeLine:(e,a)=>{var r=yn(e).lines.findIndex(n=>n===a.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:iX,removeDot:oX,addArea:cX,removeArea:dX,addLine:uX,removeLine:mX}=MO.actions,tK=MO.reducer,aK=b.createContext(void 0),rK=e=>{var{children:a}=e,[r]=b.useState("".concat(Zo("recharts"),"-clip")),n=EO();if(n==null)return null;var{x:i,y:o,width:c,height:m}=n;return b.createElement(aK.Provider,{value:r},b.createElement("defs",null,b.createElement("clipPath",{id:r},b.createElement("rect",{x:i,y:o,height:m,width:c}))),a)};function fi(e,a){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(a,r)||e[r]!==a[r]))return!1;for(var n in a)if({}.hasOwnProperty.call(a,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function _O(e,a,r){if(a<1)return[];if(a===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=a)n.push(e[i]);return n}function nK(e,a,r){var n={width:e.width+a.width,height:e.height+a.height};return ZY(n,r)}function sK(e,a,r){var n=r==="width",{x:i,y:o,width:c,height:m}=e;return a===1?{start:n?i:o,end:n?i+c:o+m}:{start:n?i+c:o+m,end:n?i:o}}function mm(e,a,r,n,i){if(e*a<e*n||e*a>e*i)return!1;var o=r();return e*(a-e*o/2-n)>=0&&e*(a+e*o/2-i)<=0}function lK(e,a){return _O(e,a+1)}function iK(e,a,r,n,i){for(var o=(n||[]).slice(),{start:c,end:m}=a,u=0,h=1,p=c,x=function(){var w=n?.[u];if(w===void 0)return{v:_O(n,h)};var S=u,A,g=()=>(A===void 0&&(A=r(w,S)),A),C=w.coordinate,E=u===0||mm(e,C,g,p,m);E||(u=0,p=c,h+=1),E&&(p=C+e*(g()/2+i),u+=h)},j;h<=o.length;)if(j=x(),j)return j.v;return[]}function LS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function da(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?LS(Object(r),!0).forEach(function(n){oK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oK(e,a,r){return(a=cK(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function cK(e){var a=dK(e,"string");return typeof a=="symbol"?a:a+""}function dK(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function uK(e,a,r,n,i){for(var o=(n||[]).slice(),c=o.length,{start:m}=a,{end:u}=a,h=function(j){var v=o[j],w,S=()=>(w===void 0&&(w=r(v,j)),w);if(j===c-1){var A=e*(v.coordinate+e*S()/2-u);o[j]=v=da(da({},v),{},{tickCoord:A>0?v.coordinate-A*e:v.coordinate})}else o[j]=v=da(da({},v),{},{tickCoord:v.coordinate});var g=mm(e,v.tickCoord,S,m,u);g&&(u=v.tickCoord-e*(S()/2+i),o[j]=da(da({},v),{},{isShow:!0}))},p=c-1;p>=0;p--)h(p);return o}function mK(e,a,r,n,i,o){var c=(n||[]).slice(),m=c.length,{start:u,end:h}=a;if(o){var p=n[m-1],x=r(p,m-1),j=e*(p.coordinate+e*x/2-h);c[m-1]=p=da(da({},p),{},{tickCoord:j>0?p.coordinate-j*e:p.coordinate});var v=mm(e,p.tickCoord,()=>x,u,h);v&&(h=p.tickCoord-e*(x/2+i),c[m-1]=da(da({},p),{},{isShow:!0}))}for(var w=o?m-1:m,S=function(C){var E=c[C],O,D=()=>(O===void 0&&(O=r(E,C)),O);if(C===0){var B=e*(E.coordinate-e*D()/2-u);c[C]=E=da(da({},E),{},{tickCoord:B<0?E.coordinate-B*e:E.coordinate})}else c[C]=E=da(da({},E),{},{tickCoord:E.coordinate});var L=mm(e,E.tickCoord,D,u,h);L&&(u=E.tickCoord+e*(D()/2+i),c[C]=da(da({},E),{},{isShow:!0}))},A=0;A<w;A++)S(A);return c}function oy(e,a,r){var{tick:n,ticks:i,viewBox:o,minTickGap:c,orientation:m,interval:u,tickFormatter:h,unit:p,angle:x}=e;if(!i||!i.length||!n)return[];if(De(u)||ji.isSsr){var j;return(j=lK(i,De(u)?u:0))!==null&&j!==void 0?j:[]}var v=[],w=m==="top"||m==="bottom"?"width":"height",S=p&&w==="width"?Go(p,{fontSize:a,letterSpacing:r}):{width:0,height:0},A=(E,O)=>{var D=typeof h=="function"?h(E.value,O):E.value;return w==="width"?nK(Go(D,{fontSize:a,letterSpacing:r}),S,x):Go(D,{fontSize:a,letterSpacing:r})[w]},g=i.length>=2?Ra(i[1].coordinate-i[0].coordinate):1,C=sK(o,g,w);return u==="equidistantPreserveStart"?iK(g,C,A,i,c):(u==="preserveStart"||u==="preserveStartEnd"?v=mK(g,C,A,i,c,u==="preserveStartEnd"):v=uK(g,C,A,i,c),v.filter(E=>E.isShow))}var fK=e=>{var{ticks:a,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:o=0}=e,c=0;if(a){Array.from(a).forEach(p=>{if(p){var x=p.getBoundingClientRect();x.width>c&&(c=x.width)}});var m=r?r.getBoundingClientRect().width:0,u=i+o,h=c+u+m+(r?n:0);return Math.round(h)}return 0},pK=["axisLine","width","height","className","hide","ticks"],hK=["viewBox"],xK=["viewBox"];function hb(e,a){if(e==null)return{};var r,n,i=gK(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function gK(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ol(){return ol=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ol.apply(null,arguments)}function BS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _t(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?BS(Object(r),!0).forEach(function(n){bK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bK(e,a,r){return(a=yK(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function yK(e){var a=vK(e,"string");return typeof a=="symbol"?a:a+""}function vK(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}var cy={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};function jK(e){var{x:a,y:r,width:n,height:i,orientation:o,mirror:c,axisLine:m,otherSvgProps:u}=e;if(!m)return null;var h=_t(_t(_t({},u),Sn(m)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!c||o==="bottom"&&c);h=_t(_t({},h),{},{x1:a,y1:r+p*i,x2:a+n,y2:r+p*i})}else{var x=+(o==="left"&&!c||o==="right"&&c);h=_t(_t({},h),{},{x1:a+x*n,y1:r,x2:a+x*n,y2:r+i})}return b.createElement("line",ol({},h,{className:gt("recharts-cartesian-axis-line",si(m,"className"))}))}function NK(e,a,r,n,i,o,c,m,u){var h,p,x,j,v,w,S=m?-1:1,A=e.tickSize||c,g=De(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=p=e.coordinate,j=r+ +!m*i,x=j-S*A,w=x-S*u,v=g;break;case"left":x=j=e.coordinate,p=a+ +!m*n,h=p-S*A,v=h-S*u,w=g;break;case"right":x=j=e.coordinate,p=a+ +m*n,h=p+S*A,v=h+S*u,w=g;break;default:h=p=e.coordinate,j=r+ +m*i,x=j+S*A,w=x+S*u,v=g;break}return{line:{x1:h,y1:x,x2:p,y2:j},tick:{x:v,y:w}}}function wK(e,a){switch(e){case"left":return a?"start":"end";case"right":return a?"end":"start";default:return"middle"}}function AK(e,a){switch(e){case"left":case"right":return"middle";case"top":return a?"start":"end";default:return a?"end":"start"}}function SK(e){var{option:a,tickProps:r,value:n}=e,i,o=gt(r.className,"recharts-cartesian-axis-tick-value");if(b.isValidElement(a))i=b.cloneElement(a,_t(_t({},r),{},{className:o}));else if(typeof a=="function")i=a(_t(_t({},r),{},{className:o}));else{var c="recharts-cartesian-axis-tick-value";typeof a!="boolean"&&(c=gt(c,a?.className)),i=b.createElement(ny,ol({},r,{className:c}),n)}return i}function CK(e){var{ticks:a=[],tick:r,tickLine:n,stroke:i,tickFormatter:o,unit:c,padding:m,tickTextProps:u,orientation:h,mirror:p,x,y:j,width:v,height:w,tickSize:S,tickMargin:A,fontSize:g,letterSpacing:C,getTicksConfig:E,events:O}=e,D=oy(_t(_t({},E),{},{ticks:a}),g,C),B=wK(h,p),L=AK(h,p),T=Sn(E),R=Hb(r),z={};typeof n=="object"&&(z=n);var U=_t(_t({},T),{},{fill:"none"},z),X=D.map((fe,se)=>{var{line:ie,tick:V}=NK(fe,x,j,v,w,h,S,p,A),K=_t(_t(_t(_t({textAnchor:B,verticalAnchor:L},T),{},{stroke:"none",fill:i},R),V),{},{index:se,payload:fe,visibleTicksCount:D.length,tickFormatter:o,padding:m},u);return b.createElement(xs,ol({className:"recharts-cartesian-axis-tick",key:"tick-".concat(fe.value,"-").concat(fe.coordinate,"-").concat(fe.tickCoord)},Qb(O,fe,se)),n&&b.createElement("line",ol({},U,ie,{className:gt("recharts-cartesian-axis-tick-line",si(n,"className"))})),r&&b.createElement(SK,{option:r,tickProps:K,value:"".concat(typeof o=="function"?o(fe.value,se):fe.value).concat(c||"")}))});return X.length>0?b.createElement("g",{className:"recharts-cartesian-axis-ticks"},X):null}var EK=b.forwardRef((e,a)=>{var{axisLine:r,width:n,height:i,className:o,hide:c,ticks:m}=e,u=hb(e,pK),[h,p]=b.useState(""),[x,j]=b.useState(""),v=b.useRef(null);b.useImperativeHandle(a,()=>({getCalculatedWidth:()=>{var S;return fK({ticks:v.current,label:(S=e.labelRef)===null||S===void 0?void 0:S.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var w=b.useCallback(S=>{if(S){var A=S.getElementsByClassName("recharts-cartesian-axis-tick-value");v.current=A;var g=A[0];if(g){var C=window.getComputedStyle(g),E=C.fontSize,O=C.letterSpacing;(E!==h||O!==x)&&(p(E),j(O))}}},[h,x]);return c||n!=null&&n<=0||i!=null&&i<=0?null:b.createElement(xs,{className:gt("recharts-cartesian-axis",o),ref:w},b.createElement(jK,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Sn(e)}),b.createElement(CK,{ticks:m,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:h,letterSpacing:x,getTicksConfig:e,events:u}),b.createElement(uH,{x:e.x,y:e.y,width:e.width,height:e.height},b.createElement(jH,{label:e.label,labelRef:e.labelRef}),e.children))}),kK=b.memo(EK,(e,a)=>{var{viewBox:r}=e,n=hb(e,hK),{viewBox:i}=a,o=hb(a,xK);return fi(r,i)&&fi(n,o)}),dy=b.forwardRef((e,a)=>{var r=vr(e,cy);return b.createElement(kK,ol({},r,{ref:a}))});dy.displayName="CartesianAxis";var OK=["x1","y1","x2","y2","key"],DK=["offset"],TK=["xAxisId","yAxisId"],RK=["xAxisId","yAxisId"];function IS(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ua(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?IS(Object(r),!0).forEach(function(n){PK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PK(e,a,r){return(a=MK(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function MK(e){var a=_K(e,"string");return typeof a=="symbol"?a:a+""}function _K(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function Ws(){return Ws=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ws.apply(null,arguments)}function fm(e,a){if(e==null)return{};var r,n,i=zK(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zK(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var LK=e=>{var{fill:a}=e;if(!a||a==="none")return null;var{fillOpacity:r,x:n,y:i,width:o,height:c,ry:m}=e;return b.createElement("rect",{x:n,y:i,ry:m,width:o,height:c,stroke:"none",fill:a,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function zO(e,a){var r;if(b.isValidElement(e))r=b.cloneElement(e,a);else if(typeof e=="function")r=e(a);else{var{x1:n,y1:i,x2:o,y2:c,key:m}=a,u=fm(a,OK),h=Sn(u),{offset:p}=h,x=fm(h,DK);r=b.createElement("line",Ws({},x,{x1:n,y1:i,x2:o,y2:c,fill:"none",key:m}))}return r}function BK(e){var{x:a,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:o,yAxisId:c}=e,m=fm(e,TK),u=i.map((h,p)=>{var x=ua(ua({},m),{},{x1:a,y1:h,x2:a+r,y2:h,key:"line-".concat(p),index:p});return zO(n,x)});return b.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function IK(e){var{y:a,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:o,yAxisId:c}=e,m=fm(e,RK),u=i.map((h,p)=>{var x=ua(ua({},m),{},{x1:h,y1:a,x2:h,y2:a+r,key:"line-".concat(p),index:p});return zO(n,x)});return b.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function FK(e){var{horizontalFill:a,fillOpacity:r,x:n,y:i,width:o,height:c,horizontalPoints:m,horizontal:u=!0}=e;if(!u||!a||!a.length)return null;var h=m.map(x=>Math.round(x+i-i)).sort((x,j)=>x-j);i!==h[0]&&h.unshift(0);var p=h.map((x,j)=>{var v=!h[j+1],w=v?i+c-x:h[j+1]-x;if(w<=0)return null;var S=j%a.length;return b.createElement("rect",{key:"react-".concat(j),y:x,x:n,height:w,width:o,stroke:"none",fill:a[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return b.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function UK(e){var{vertical:a=!0,verticalFill:r,fillOpacity:n,x:i,y:o,width:c,height:m,verticalPoints:u}=e;if(!a||!r||!r.length)return null;var h=u.map(x=>Math.round(x+i-i)).sort((x,j)=>x-j);i!==h[0]&&h.unshift(0);var p=h.map((x,j)=>{var v=!h[j+1],w=v?i+c-x:h[j+1]-x;if(w<=0)return null;var S=j%r.length;return b.createElement("rect",{key:"react-".concat(j),x,y:o,width:w,height:m,stroke:"none",fill:r[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return b.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var $K=(e,a)=>{var{xAxis:r,width:n,height:i,offset:o}=e;return S4(oy(ua(ua(ua({},cy),r),{},{ticks:C4(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,a)},qK=(e,a)=>{var{yAxis:r,width:n,height:i,offset:o}=e;return S4(oy(ua(ua(ua({},cy),r),{},{ticks:C4(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,a)},HK={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function LO(e){var a=P4(),r=M4(),n=R4(),i=ua(ua({},vr(e,HK)),{},{x:De(e.x)?e.x:n.left,y:De(e.y)?e.y:n.top,width:De(e.width)?e.width:n.width,height:De(e.height)?e.height:n.height}),{xAxisId:o,yAxisId:c,x:m,y:u,width:h,height:p,syncWithTicks:x,horizontalValues:j,verticalValues:v}=i,w=Wa(),S=Te(R=>qA(R,"xAxis",o,w)),A=Te(R=>qA(R,"yAxis",c,w));if(!De(h)||h<=0||!De(p)||p<=0||!De(m)||m!==+m||!De(u)||u!==+u)return null;var g=i.verticalCoordinatesGenerator||$K,C=i.horizontalCoordinatesGenerator||qK,{horizontalPoints:E,verticalPoints:O}=i;if((!E||!E.length)&&typeof C=="function"){var D=j&&j.length,B=C({yAxis:A?ua(ua({},A),{},{ticks:D?j:A.ticks}):void 0,width:a,height:r,offset:n},D?!0:x);Vu(Array.isArray(B),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof B,"]")),Array.isArray(B)&&(E=B)}if((!O||!O.length)&&typeof g=="function"){var L=v&&v.length,T=g({xAxis:S?ua(ua({},S),{},{ticks:L?v:S.ticks}):void 0,width:a,height:r,offset:n},L?!0:x);Vu(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof T,"]")),Array.isArray(T)&&(O=T)}return b.createElement("g",{className:"recharts-cartesian-grid"},b.createElement(LK,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),b.createElement(FK,Ws({},i,{horizontalPoints:E})),b.createElement(UK,Ws({},i,{verticalPoints:O})),b.createElement(BK,Ws({},i,{offset:n,horizontalPoints:E,xAxis:S,yAxis:A})),b.createElement(IK,Ws({},i,{offset:n,verticalPoints:O,xAxis:S,yAxis:A})))}LO.displayName="CartesianGrid";var VK=["dangerouslySetInnerHTML","ticks"],YK=["id"],KK=["domain"],GK=["domain"];function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xb.apply(null,arguments)}function pm(e,a){if(e==null)return{};var r,n,i=JK(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function JK(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function WK(e){var a=zt();return b.useLayoutEffect(()=>(a(SV(e)),()=>{a(CV(e))}),[e,a]),null}var QK=e=>{var{xAxisId:a,className:r}=e,n=Te(t0),i=Wa(),o="xAxis",c=Te(A=>ki(A,o,a,i)),m=Te(A=>Rk(A,o,a,i)),u=Te(A=>kk(A,a)),h=Te(A=>HU(A,a)),p=Te(A=>QE(A,a));if(u==null||h==null||p==null)return null;var{dangerouslySetInnerHTML:x,ticks:j}=e,v=pm(e,VK),{id:w}=p,S=pm(p,YK);return b.createElement(dy,xb({},v,S,{scale:c,x:h.x,y:h.y,width:u.width,height:u.height,className:gt("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:m}))},XK={allowDataOverflow:Ha.allowDataOverflow,allowDecimals:Ha.allowDecimals,allowDuplicatedCategory:Ha.allowDuplicatedCategory,height:Ha.height,hide:!1,mirror:Ha.mirror,orientation:Ha.orientation,padding:Ha.padding,reversed:Ha.reversed,scale:Ha.scale,tickCount:Ha.tickCount,type:Ha.type,xAxisId:0},ZK=e=>{var a,r,n,i,o,c=vr(e,XK);return b.createElement(b.Fragment,null,b.createElement(WK,{interval:(a=c.interval)!==null&&a!==void 0?a:"preserveEnd",id:c.xAxisId,scale:c.scale,type:c.type,padding:c.padding,allowDataOverflow:c.allowDataOverflow,domain:c.domain,dataKey:c.dataKey,allowDuplicatedCategory:c.allowDuplicatedCategory,allowDecimals:c.allowDecimals,tickCount:c.tickCount,includeHidden:(r=c.includeHidden)!==null&&r!==void 0?r:!1,reversed:c.reversed,ticks:c.ticks,height:c.height,orientation:c.orientation,mirror:c.mirror,hide:c.hide,unit:c.unit,name:c.name,angle:(n=c.angle)!==null&&n!==void 0?n:0,minTickGap:(i=c.minTickGap)!==null&&i!==void 0?i:5,tick:(o=c.tick)!==null&&o!==void 0?o:!0,tickFormatter:c.tickFormatter}),b.createElement(QK,c))},eG=(e,a)=>{var{domain:r}=e,n=pm(e,KK),{domain:i}=a,o=pm(a,GK);return fi(n,o)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:fi({domain:r},{domain:i}):!1},BO=b.memo(ZK,eG);BO.displayName="XAxis";var tG=["dangerouslySetInnerHTML","ticks"],aG=["id"],rG=["domain"],nG=["domain"];function gb(){return gb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gb.apply(null,arguments)}function hm(e,a){if(e==null)return{};var r,n,i=sG(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function sG(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function lG(e){var a=zt();return b.useLayoutEffect(()=>(a(EV(e)),()=>{a(kV(e))}),[e,a]),null}var iG=e=>{var{yAxisId:a,className:r,width:n,label:i}=e,o=b.useRef(null),c=b.useRef(null),m=Te(t0),u=Wa(),h=zt(),p="yAxis",x=Te(D=>ki(D,p,a,u)),j=Te(D=>Ok(D,a)),v=Te(D=>YU(D,a)),w=Te(D=>Rk(D,p,a,u)),S=Te(D=>XE(D,a));if(b.useLayoutEffect(()=>{if(!(n!=="auto"||!j||sy(i)||b.isValidElement(i)||S==null)){var D=o.current;if(D){var B=D.getCalculatedWidth();Math.round(j.width)!==Math.round(B)&&h(OV({id:a,width:B}))}}},[w,j,h,i,a,n,S]),j==null||v==null||S==null)return null;var{dangerouslySetInnerHTML:A,ticks:g}=e,C=hm(e,tG),{id:E}=S,O=hm(S,aG);return b.createElement(dy,gb({},C,O,{ref:o,labelRef:c,scale:x,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:j.width,height:j.height,className:gt("recharts-".concat(p," ").concat(p),r),viewBox:m,ticks:w}))},oG={allowDataOverflow:Va.allowDataOverflow,allowDecimals:Va.allowDecimals,allowDuplicatedCategory:Va.allowDuplicatedCategory,hide:!1,mirror:Va.mirror,orientation:Va.orientation,padding:Va.padding,reversed:Va.reversed,scale:Va.scale,tickCount:Va.tickCount,type:Va.type,width:Va.width,yAxisId:0},cG=e=>{var a,r,n,i,o,c=vr(e,oG);return b.createElement(b.Fragment,null,b.createElement(lG,{interval:(a=c.interval)!==null&&a!==void 0?a:"preserveEnd",id:c.yAxisId,scale:c.scale,type:c.type,domain:c.domain,allowDataOverflow:c.allowDataOverflow,dataKey:c.dataKey,allowDuplicatedCategory:c.allowDuplicatedCategory,allowDecimals:c.allowDecimals,tickCount:c.tickCount,padding:c.padding,includeHidden:(r=c.includeHidden)!==null&&r!==void 0?r:!1,reversed:c.reversed,ticks:c.ticks,width:c.width,orientation:c.orientation,mirror:c.mirror,hide:c.hide,unit:c.unit,name:c.name,angle:(n=c.angle)!==null&&n!==void 0?n:0,minTickGap:(i=c.minTickGap)!==null&&i!==void 0?i:5,tick:(o=c.tick)!==null&&o!==void 0?o:!0,tickFormatter:c.tickFormatter}),b.createElement(iG,c))},dG=(e,a)=>{var{domain:r}=e,n=hm(e,rG),{domain:i}=a,o=hm(a,nG);return fi(n,o)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:fi({domain:r},{domain:i}):!1},IO=b.memo(cG,dG);IO.displayName="YAxis";var uG=(e,a)=>a,uy=le([uG,at,GE,It,Jk,Bn,W$,Qt],tq),my=e=>{var a=e.currentTarget.getBoundingClientRect(),r=a.width/e.currentTarget.offsetWidth,n=a.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-a.left)/r),chartY:Math.round((e.clientY-a.top)/n)}},FO=ja("mouseClick"),UO=cc();UO.startListening({actionCreator:FO,effect:(e,a)=>{var r=e.payload,n=uy(a.getState(),my(r));n?.activeIndex!=null&&a.dispatch(s$({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var bb=ja("mouseMove"),$O=cc();$O.startListening({actionCreator:bb,effect:(e,a)=>{var r=e.payload,n=a.getState(),i=J0(n,n.tooltip.settings.shared),o=uy(n,my(r));i==="axis"&&(o?.activeIndex!=null?a.dispatch(Fk({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):a.dispatch(Ik()))}});var FS={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},qO=za({name:"rootProps",initialState:FS,reducers:{updateOptions:(e,a)=>{var r;e.accessibilityLayer=a.payload.accessibilityLayer,e.barCategoryGap=a.payload.barCategoryGap,e.barGap=(r=a.payload.barGap)!==null&&r!==void 0?r:FS.barGap,e.barSize=a.payload.barSize,e.maxBarSize=a.payload.maxBarSize,e.stackOffset=a.payload.stackOffset,e.syncId=a.payload.syncId,e.syncMethod=a.payload.syncMethod,e.className=a.payload.className}}}),mG=qO.reducer,{updateOptions:fG}=qO.actions,HO=za({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,a)=>a.payload}}),{updatePolarOptions:fX}=HO.actions,pG=HO.reducer,VO=ja("keyDown"),YO=ja("focus"),fy=cc();fy.startListening({actionCreator:VO,effect:(e,a)=>{var r=a.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var c=Number(W0(i,Di(r))),m=Bn(r);if(o==="Enter"){var u=im(r,"axis","hover",String(i.index));a.dispatch(db({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:u}));return}var h=WU(r),p=h==="left-to-right"?1:-1,x=o==="ArrowRight"?1:-1,j=c+x*p;if(!(m==null||j>=m.length||j<0)){var v=im(r,"axis","hover",String(j));a.dispatch(db({active:!0,activeIndex:j.toString(),activeDataKey:void 0,activeCoordinate:v}))}}}}});fy.startListening({actionCreator:YO,effect:(e,a)=>{var r=a.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var o="0",c=im(r,"axis","hover",String(o));a.dispatch(db({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:c}))}}}});var ur=ja("externalEvent"),KO=cc();KO.startListening({actionCreator:ur,effect:(e,a)=>{if(e.payload.handler!=null){var r=a.getState(),n={activeCoordinate:U$(r),activeDataKey:Zk(r),activeIndex:mi(r),activeLabel:Xk(r),activeTooltipIndex:mi(r),isTooltipActive:$$(r)};e.payload.handler(n,e.payload.reactEvent)}}});var hG=le([Oi],e=>e.tooltipItemPayloads),xG=le([hG,Ec,(e,a,r)=>a,(e,a,r)=>r],(e,a,r,n)=>{var i=e.find(m=>m.settings.dataKey===n);if(i!=null){var{positions:o}=i;if(o!=null){var c=a(o,r);return c}}}),GO=ja("touchMove"),JO=cc();JO.startListening({actionCreator:GO,effect:(e,a)=>{var r=e.payload,n=a.getState(),i=J0(n,n.tooltip.settings.shared);if(i==="axis"){var o=uy(n,my({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));o?.activeIndex!=null&&a.dispatch(Fk({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var c,m=r.touches[0],u=document.elementFromPoint(m.clientX,m.clientY);if(!u||!u.getAttribute)return;var h=u.getAttribute(uL),p=(c=u.getAttribute(mL))!==null&&c!==void 0?c:void 0,x=xG(a.getState(),h,p);a.dispatch(Bk({activeDataKey:p,activeIndex:h,activeCoordinate:x}))}}});var gG=xC({brush:GY,cartesianAxis:DV,chartData:bq,errorBars:HV,graphicalItems:yV,layout:Mz,legend:HL,options:fq,polarAxis:LH,polarOptions:pG,referenceElements:tK,rootProps:mG,tooltip:l$}),bG=function(a){return DC({reducer:gG,preloadedState:a,middleware:r=>r({serializableCheck:!1}).concat([UO.middleware,$O.middleware,fy.middleware,KO.middleware,JO.middleware]),enhancers:r=>{var n=r;return typeof r=="function"&&(n=r()),n.concat(OC({type:"raf"}))},devTools:ji.devToolsEnabled})};function yG(e){var{preloadedState:a,children:r,reduxStoreName:n}=e,i=Wa(),o=b.useRef(null);if(i)return r;o.current==null&&(o.current=bG(a));var c=Zb;return b.createElement(mC,{context:c,store:o.current},r)}function vG(e){var{layout:a,margin:r}=e,n=zt(),i=Wa();return b.useEffect(()=>{i||(n(Tz(a)),n(Dz(r)))},[n,i,a,r]),null}function jG(e){var a=zt();return b.useEffect(()=>{a(fG(e))},[a,e]),null}var NG=["children"];function wG(e,a){if(e==null)return{};var r,n,i=AG(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function AG(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function xm(){return xm=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xm.apply(null,arguments)}var SG={width:"100%",height:"100%",display:"block"},CG=b.forwardRef((e,a)=>{var r=P4(),n=M4(),i=z4();if(!li(r)||!li(n))return null;var{children:o,otherAttributes:c,title:m,desc:u}=e,h,p;return typeof c.tabIndex=="number"?h=c.tabIndex:h=i?0:void 0,typeof c.role=="string"?p=c.role:p=i?"application":void 0,b.createElement(H3,xm({},c,{title:m,desc:u,role:p,tabIndex:h,width:r,height:n,style:SG,ref:a}),o)}),EG=e=>{var{children:a}=e,r=Te($m);if(!r)return null;var{width:n,height:i,y:o,x:c}=r;return b.createElement(H3,{width:n,height:i,x:c,y:o},a)},US=b.forwardRef((e,a)=>{var{children:r}=e,n=wG(e,NG),i=Wa();return i?b.createElement(EG,null,r):b.createElement(CG,xm({ref:a},n),r)});function kG(){var e=zt(),[a,r]=b.useState(null),n=Te(dL);return b.useEffect(()=>{if(a!=null){var i=a.getBoundingClientRect(),o=i.width/a.offsetWidth;fa(o)&&o!==n&&e(Pz(o))}},[a,e,n]),r}function $S(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OG(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?$S(Object(r),!0).forEach(function(n){DG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$S(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DG(e,a,r){return(a=TG(a))in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function TG(e){var a=RG(e,"string");return typeof a=="symbol"?a:a+""}function RG(e,a){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,a);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(e)}function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cl.apply(null,arguments)}var PG=()=>(Eq(),null);function gm(e){if(typeof e=="number")return e;if(typeof e=="string"){var a=parseFloat(e);if(!Number.isNaN(a))return a}return 0}var MG=b.forwardRef((e,a)=>{var r,n,i=b.useRef(null),[o,c]=b.useState({containerWidth:gm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:gm((n=e.style)===null||n===void 0?void 0:n.height)}),m=b.useCallback((h,p)=>{c(x=>{var j=Math.round(h),v=Math.round(p);return x.containerWidth===j&&x.containerHeight===v?x:{containerWidth:j,containerHeight:v}})},[]),u=b.useCallback(h=>{if(typeof a=="function"&&a(h),h!=null){var{width:p,height:x}=h.getBoundingClientRect();m(p,x);var j=w=>{var{width:S,height:A}=w[0].contentRect;m(S,A)},v=new ResizeObserver(j);v.observe(h),i.current=v}},[a,m]);return b.useEffect(()=>()=>{var h=i.current;h?.disconnect()},[m]),b.createElement(b.Fragment,null,b.createElement(Hm,{width:o.containerWidth,height:o.containerHeight}),b.createElement("div",cl({ref:u},e)))}),_G=b.forwardRef((e,a)=>{var{width:r,height:n}=e,[i,o]=b.useState({containerWidth:gm(r),containerHeight:gm(n)}),c=b.useCallback((u,h)=>{o(p=>{var x=Math.round(u),j=Math.round(h);return p.containerWidth===x&&p.containerHeight===j?p:{containerWidth:x,containerHeight:j}})},[]),m=b.useCallback(u=>{if(typeof a=="function"&&a(u),u!=null){var{width:h,height:p}=u.getBoundingClientRect();c(h,p)}},[a,c]);return b.createElement(b.Fragment,null,b.createElement(Hm,{width:i.containerWidth,height:i.containerHeight}),b.createElement("div",cl({ref:m},e)))}),zG=b.forwardRef((e,a)=>{var{width:r,height:n}=e;return b.createElement(b.Fragment,null,b.createElement(Hm,{width:r,height:n}),b.createElement("div",cl({ref:a},e)))}),LG=b.forwardRef((e,a)=>{var{width:r,height:n}=e;return Cn(r)||Cn(n)?b.createElement(_G,cl({},e,{ref:a})):b.createElement(zG,cl({},e,{ref:a}))});function BG(e){return e===!0?MG:LG}var IG=b.forwardRef((e,a)=>{var{children:r,className:n,height:i,onClick:o,onContextMenu:c,onDoubleClick:m,onMouseDown:u,onMouseEnter:h,onMouseLeave:p,onMouseMove:x,onMouseUp:j,onTouchEnd:v,onTouchMove:w,onTouchStart:S,style:A,width:g,responsive:C,dispatchTouchEvents:E=!0}=e,O=b.useRef(null),D=zt(),[B,L]=b.useState(null),[T,R]=b.useState(null),z=kG(),U=a0(),X=U?.width>0?U.width:g,fe=U?.height>0?U.height:i,se=b.useCallback(G=>{z(G),typeof a=="function"&&a(G),L(G),R(G),G!=null&&(O.current=G)},[z,a,L,R]),ie=b.useCallback(G=>{D(FO(G)),D(ur({handler:o,reactEvent:G}))},[D,o]),V=b.useCallback(G=>{D(bb(G)),D(ur({handler:h,reactEvent:G}))},[D,h]),K=b.useCallback(G=>{D(Ik()),D(ur({handler:p,reactEvent:G}))},[D,p]),ce=b.useCallback(G=>{D(bb(G)),D(ur({handler:x,reactEvent:G}))},[D,x]),$=b.useCallback(()=>{D(YO())},[D]),I=b.useCallback(G=>{D(VO(G.key))},[D]),P=b.useCallback(G=>{D(ur({handler:c,reactEvent:G}))},[D,c]),H=b.useCallback(G=>{D(ur({handler:m,reactEvent:G}))},[D,m]),ee=b.useCallback(G=>{D(ur({handler:u,reactEvent:G}))},[D,u]),pe=b.useCallback(G=>{D(ur({handler:j,reactEvent:G}))},[D,j]),ve=b.useCallback(G=>{D(ur({handler:S,reactEvent:G}))},[D,S]),ue=b.useCallback(G=>{E&&D(GO(G)),D(ur({handler:w,reactEvent:G}))},[D,E,w]),he=b.useCallback(G=>{D(ur({handler:v,reactEvent:G}))},[D,v]),te=BG(C);return b.createElement(sO.Provider,{value:B},b.createElement(K_.Provider,{value:T},b.createElement(te,{width:X??A?.width,height:fe??A?.height,className:gt("recharts-wrapper",n),style:OG({position:"relative",cursor:"default",width:X,height:fe},A),onClick:ie,onContextMenu:P,onDoubleClick:H,onFocus:$,onKeyDown:I,onMouseDown:ee,onMouseEnter:V,onMouseLeave:K,onMouseMove:ce,onMouseUp:pe,onTouchEnd:he,onTouchMove:ue,onTouchStart:ve,ref:se},b.createElement(PG,null),r)))}),FG=["width","height","responsive","children","className","style","compact","title","desc"];function UG(e,a){if(e==null)return{};var r,n,i=$G(e,a);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],a.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function $G(e,a){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(a.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var qG=b.forwardRef((e,a)=>{var{width:r,height:n,responsive:i,children:o,className:c,style:m,compact:u,title:h,desc:p}=e,x=UG(e,FG),j=Sn(x);return u?b.createElement(b.Fragment,null,b.createElement(Hm,{width:r,height:n}),b.createElement(US,{otherAttributes:j,title:h,desc:p},o)):b.createElement(IG,{className:c,style:m,width:r,height:n,responsive:i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},b.createElement(US,{otherAttributes:j,title:h,desc:p,ref:a},b.createElement(rK,null,o)))});function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yb.apply(null,arguments)}var HG={top:5,right:5,bottom:5,left:5},VG={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:HG,reverseStackOrder:!1,syncMethod:"index",responsive:!1},YG=b.forwardRef(function(a,r){var n,i=vr(a.categoricalChartProps,VG),{chartName:o,defaultTooltipEventType:c,validateTooltipEventTypes:m,tooltipPayloadSearcher:u,categoricalChartProps:h}=a,p={chartName:o,defaultTooltipEventType:c,validateTooltipEventTypes:m,tooltipPayloadSearcher:u,eventEmitter:void 0};return b.createElement(yG,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},b.createElement(KY,{chartData:h.data}),b.createElement(vG,{layout:i.layout,margin:i.margin}),b.createElement(jG,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),b.createElement(qG,yb({},i,{ref:r})))}),KG=["axis","item"],GG=b.forwardRef((e,a)=>b.createElement(YG,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:KG,tooltipPayloadSearcher:uq,categoricalChartProps:e,ref:a}));const JG=()=>{const[e,a]=b.useState("1Week"),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState(""),[j,v]=b.useState([]),{user:w}=br(te=>te.user),[S,A]=b.useState(null),[g,C]=b.useState({amount:"",remarks:""}),[E,O]=b.useState(null),[D,B]=b.useState({amount:"",remarks:""});b.useEffect(()=>{(async()=>{try{const G=localStorage.getItem("token"),xe=await F.get("/api/expenses/",{headers:{Authorization:`Bearer ${G}`}});xe.data?.expenses&&v(xe.data.expenses.map(Ne=>({id:Ne._id,date:Ne.date?Ne.date.split("T")[0]:"",expenseName:Ne.expenseName,amount:Ne.amount,remarks:Ne.remarks||"",createdBy:Ne.createdBy})))}catch(G){console.error("load expenses error",G.response?.data||G.message)}})()},[]);const[L,T]=b.useState(!1),[R,z]=b.useState("all"),[U,X]=b.useState(""),[fe,se]=b.useState(""),[ie,V]=b.useState(""),[K,ce]=b.useState(""),$=async()=>{if(!c||!r||!i){M.error("Please fill Date, Select, and Amount fields");return}const te=Number(String(i).replace(/,/g,""));if(Number.isNaN(te)){M.error("Please enter a valid number for amount");return}const xe={date:c,type:r,expenseName:{office:"Office Expense",bills:"Bills",salaries:"Salaries"}[r]||"Other Expense",amount:te,remarks:u};try{const Ne=localStorage.getItem("token"),Me=(await F.post("/api/expenses/",xe,{headers:{Authorization:`Bearer ${Ne}`}})).data?.expense;if(Me){const je={id:Me._id,date:Me.date?Me.date.split("T")[0]:c,expenseName:Me.expenseName,amount:Me.amount,remarks:Me.remarks||"",createdBy:Me.createdBy};v(ke=>[je,...ke])}else v(je=>[{id:Date.now(),date:c,expenseName:xe.expenseName,amount:xe.amount,remarks:xe.remarks},...je]);n(""),o(""),m(""),h(""),M.success("Expense added")}catch(Ne){console.error("create expense failed",Ne.response?.data||Ne.message),M.error("Failed to create expense")}},I=te=>te?new Date(te):null,P=b.useMemo(()=>{if(!j||j.length===0)return[];const te=new Date,G=(je,ke)=>{const Ce=new Date(je),Ke=new Date(ke);return Ke.setHours(23,59,59,999),j.reduce((dt,Zt)=>{const Qa=I(Zt.date);return Qa&&Qa>=Ce&&Qa<=Ke?dt+Number(Zt.amount||0):dt},0)},xe=je=>new Date(je).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Ne=je=>new Date(je).toLocaleDateString(void 0,{month:"short",year:"numeric"});if(e==="1Week"){const je=[];for(let ke=6;ke>=0;ke--){const Ce=new Date(te);Ce.setDate(te.getDate()-ke);const Ke=new Date(Ce.getFullYear(),Ce.getMonth(),Ce.getDate()),dt=new Date(Ce.getFullYear(),Ce.getMonth(),Ce.getDate()),Zt=G(Ke,dt);je.push({label:xe(Ce),value:Zt})}return je}if(e==="1Month"){const je=[];for(let ke=29;ke>=0;ke--){const Ce=new Date(te);Ce.setDate(te.getDate()-ke);const Ke=new Date(Ce.getFullYear(),Ce.getMonth(),Ce.getDate()),dt=new Date(Ce.getFullYear(),Ce.getMonth(),Ce.getDate()),Zt=G(Ke,dt);je.push({label:xe(Ce),value:Zt})}return je}if(e==="5Weeks"){const je=[];for(let ke=4;ke>=0;ke--){const Ce=new Date(te);Ce.setDate(te.getDate()-ke*7);const Ke=new Date(Ce);Ke.setDate(Ce.getDate()-6);const dt=G(Ke,Ce);je.push({label:`${xe(Ke)} - ${xe(Ce)}`,value:dt})}return je}if(e==="1Year"){const je=[];for(let ke=11;ke>=0;ke--){const Ce=new Date(te.getFullYear(),te.getMonth()-ke,1),Ke=new Date(Ce.getFullYear(),Ce.getMonth(),1),dt=new Date(Ce.getFullYear(),Ce.getMonth()+1,0),Zt=G(Ke,dt);je.push({label:Ne(Ce),value:Zt})}return je}const ne=new Map;return j.forEach(je=>{if(!je.date)return;const ke=I(je.date);if(!ke)return;const Ce=`${ke.getFullYear()}-${String(ke.getMonth()+1).padStart(2,"0")}`;ne.set(Ce,(ne.get(Ce)||0)+Number(je.amount||0))}),Array.from(ne.entries()).sort((je,ke)=>je[0].localeCompare(ke[0])).map(([je,ke])=>{const[Ce,Ke]=je.split("-"),dt=new Date(Number(Ce),Number(Ke)-1,1);return{label:Ne(dt),value:ke}})},[j,e]),H=j.filter(te=>{const G=p.toLowerCase();if(!(te.expenseName.toLowerCase().includes(G)||te.remarks.toLowerCase().includes(G)||te.amount.toString().toLowerCase().includes(G)||te.date.toLowerCase().includes(G)))return!1;if(R!=="all"){const dt={office:"Office Expense",bills:"Bills",salaries:"Salaries"}[R]||null;if(dt&&te.expenseName!==dt)return!1}const Ne=I(te.date),ne=I(U),Me=I(fe);if(ne&&Ne<ne||Me&&Ne>Me)return!1;const je=Number(te.amount.toString().replace(/,/g,"")),ke=ie?Number(ie):null,Ce=K?Number(K):null;return!(ke!==null&&je<ke||Ce!==null&&je>Ce)}),ee=()=>{z("all"),X(""),se(""),V(""),ce("")},[pe,ve]=b.useState(!1),ue=()=>{ve(!0),T(!1),M.success("Filters applied")},he=()=>{try{const te=H,G=`
        <html>
          <head>
            <title>Expenses Report</title>
            <style>
              table { width: 100%; border-collapse: collapse; }
              th, td { border: 1px solid #ddd; padding: 8px; }
              th { background: #f3f3f3; }
            </style>
          </head>
          <body>
            <h2>Expenses Report</h2>
            <p>Total: ${Number(j.reduce((Ne,ne)=>Ne+Number(ne.amount||0),0)).toLocaleString()}</p>
            <table>
              <thead><tr><th>Date</th><th>Expense Name</th><th>Amount</th><th>Remarks</th></tr></thead>
              <tbody>
                ${te.map(Ne=>`<tr><td>${Ne.date}</td><td>${Ne.expenseName}</td><td>${Number(Ne.amount).toLocaleString()}</td><td>${Ne.remarks||""}</td></tr>`).join("")}
              </tbody>
            </table>
          </body>
        </html>
      `,xe=window.open("","_blank");xe.document.write(G),xe.document.close(),xe.focus(),xe.print(),xe.close()}catch(te){console.error("print failed",te),M.error("Print failed")}};return t.jsxs("div",{className:"flex min-h-screen bg-gray-50",children:[t.jsx("div",{className:"hidden md:block w-[20%] bg-white",children:t.jsx(Rr,{})}),t.jsx("div",{className:"flex-1",children:t.jsxs("div",{className:"min-h-screen bg-gray-100 p-6",children:[t.jsxs("div",{className:"flex items-center justify-between mb-6",children:[t.jsx("div",{className:"flex-1 flex justify-center gap-3",children:[{key:"1Week",label:"1 Week"},{key:"1Month",label:"1 Month"},{key:"1Year",label:"1 Year"},{key:"5Weeks",label:"5 Weeks"},{key:"MAX",label:"MAX"}].map(te=>t.jsx("button",{onClick:()=>a(te.key),className:`px-3 py-1 rounded-md text-sm border transition-colors duration-200 ${e===te.key?"bg-blue-600 border-blue-700 text-white":"bg-blue-200 border-blue-400 text-blue-800 hover:bg-blue-200"}`,children:te.label},te.key))}),t.jsx("div",{className:"ml-6",children:t.jsxs("button",{className:"flex items-center gap-2 px-4 py-2 rounded-md bg-green-600 text-white hover:bg-green-700 transition-colors duration-200",children:[t.jsx(mt,{className:"text-white"}),t.jsx("span",{className:"text-sm font-medium",children:"Print"})]})})]}),t.jsxs("div",{className:"bg-orange-100 rounded-xl p-4 mb-5 shadow-lg",children:[t.jsx("div",{className:"flex items-center justify-center mb-3",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("div",{className:"w-3 h-3 rounded-full bg-yellow-400"}),t.jsx("div",{className:"text-2xl font-semibold text-gray-800",children:Number(j.reduce((te,G)=>te+Number(G.amount||0),0)).toLocaleString()}),t.jsx("div",{className:"text-sm text-gray-800 ml-2",children:"Total Expense"})]})}),t.jsx("div",{className:"w-full h-72 md:h-96",children:t.jsx(IL,{width:"100%",height:"100%",children:t.jsxs(GG,{data:P,margin:{top:20,right:30,left:20,bottom:5},barCategoryGap:"20%",barGap:0,children:[t.jsx(LO,{strokeDasharray:"3 3",vertical:!1}),t.jsx(BO,{dataKey:"label",tickLine:!1,axisLine:!1}),t.jsx(IO,{tickFormatter:te=>te>=1e3?`${te/1e3}k`:te}),t.jsx(_q,{formatter:te=>new Intl.NumberFormat().format(te)}),t.jsx(TO,{dataKey:"value",radius:0,fill:"#16a34a"})]})})})]}),t.jsx("div",{className:"bg-green-100 rounded-lg p-4 mb-4 shadow-sm border border-green-200",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-6 gap-3 items-end",children:[t.jsxs("div",{className:"md:col-span-1",children:[t.jsx("label",{className:"text-sm block mb-1",children:"Select"}),t.jsxs("select",{value:r,onChange:te=>n(te.target.value),className:"w-full bg-white px-3 py-2 rounded border border-gray-200",children:[t.jsx("option",{value:"",children:"Select"}),t.jsx("option",{value:"office",children:"Office Expense"}),t.jsx("option",{value:"bills",children:"Bills"}),t.jsx("option",{value:"salaries",children:"Salaries"})]})]}),t.jsxs("div",{className:"md:col-span-1",children:[t.jsx("label",{className:"text-sm block mb-1",children:"Amount"}),t.jsx("input",{value:i,onChange:te=>o(te.target.value),className:"w-full bg-white px-3 py-2 rounded border border-gray-200",placeholder:"25,000"})]}),t.jsxs("div",{className:"md:col-span-1",children:[t.jsx("label",{className:"text-sm block mb-1",children:"Date"}),t.jsx("input",{value:c,onChange:te=>m(te.target.value),type:"date",className:"w-full bg-white px-3 py-2 rounded border border-gray-200"})]}),t.jsxs("div",{className:"md:col-span-3",children:[t.jsx("label",{className:"text-sm block mb-1",children:"Remarks"}),t.jsx("input",{value:u,onChange:te=>h(te.target.value),className:"w-full bg-white px-3 py-2 rounded border border-gray-200",placeholder:"Lorem ipsum dolor sit amet consectetur. Ante egestas."})]}),t.jsx("div",{className:"md:col-span-6 flex justify-center mt-2",children:t.jsx("button",{onClick:$,className:"bg-green-600 text-white py-2 px-28 rounded-md font-semibold",children:"Add"})})]})}),t.jsxs("div",{className:"flex items-center gap-3 mb-3 relative",children:[t.jsxs("div",{className:"flex items-center bg-green-100 rounded-md px-3 py-2 flex-1",children:[t.jsx(pa,{className:"text-green-700 mr-2"}),t.jsx("input",{onChange:te=>x(te.target.value),value:p,placeholder:"e.g electric bills",className:"bg-transparent outline-none w-full text-sm"})]}),t.jsxs("button",{onClick:()=>T(!L),className:"flex items-center gap-2 bg-green-600 text-white px-3 py-2 rounded-md relative z-10",children:[t.jsx(L3,{}),"Filter"]}),t.jsxs("button",{className:"flex items-center gap-2 bg-green-600 text-white px-3 py-2 rounded-md",children:[t.jsx(mt,{}),t.jsx("span",{onClick:he,children:"Print"})]}),L&&t.jsxs("div",{className:"absolute top-full right-0 mt-12 w-80 bg-white rounded shadow-lg border border-gray-300 z-20 p-4",children:[t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Expense Name"}),t.jsxs("select",{className:"w-full border border-gray-300 rounded px-2 py-1",value:R,onChange:te=>z(te.target.value),children:[t.jsx("option",{value:"all",children:"All"}),t.jsx("option",{value:"office",children:"Office Expense"}),t.jsx("option",{value:"bills",children:"Bills"}),t.jsx("option",{value:"salaries",children:"Salaries"})]})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Date From"}),t.jsx("input",{type:"date",className:"w-full border border-gray-300 rounded px-2 py-1",value:U,onChange:te=>X(te.target.value)})]}),t.jsxs("div",{className:"mb-3",children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Date To"}),t.jsx("input",{type:"date",className:"w-full border border-gray-300 rounded px-2 py-1",value:fe,onChange:te=>se(te.target.value)})]}),t.jsxs("div",{className:"mb-3 grid grid-cols-2 gap-3",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Min Amount"}),t.jsx("input",{type:"number",className:"w-full border border-gray-300 rounded px-2 py-1",value:ie,onChange:te=>V(te.target.value),placeholder:"0",min:0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block font-semibold mb-1",children:"Max Amount"}),t.jsx("input",{type:"number",className:"w-full border border-gray-300 rounded px-2 py-1",value:K,onChange:te=>ce(te.target.value),placeholder:"0",min:0})]})]}),t.jsxs("div",{className:"flex justify-between mt-4",children:[t.jsx("button",{onClick:()=>{ee(),T(!1),M("Filters reset")},className:"px-4 py-2 bg-gray-300 rounded",children:"Reset"}),t.jsx("button",{onClick:ue,className:"px-4 py-2 bg-green-600 text-white rounded",children:"Apply"})]})]})]}),t.jsx("hr",{className:"border-t border-gray-200 mb-4"}),t.jsx("div",{className:"bg-white shadow-sm overflow-x-auto ",children:t.jsxs("table",{className:"min-w-full table-auto border border-black",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-50",children:[t.jsxs("th",{className:"px-4 py-3 border-b text-right text-sm font-medium",children:["Date"," ",t.jsx(Hh,{className:"inline-block ml-2 text-gray-400"})]}),t.jsxs("th",{className:"px-4 py-3 border-b text-right text-sm font-medium",children:["Expense Name"," ",t.jsx(Hh,{className:"inline-block ml-2 text-gray-400"})]}),t.jsxs("th",{className:"px-4 py-3 border-b text-right text-sm font-medium",children:["Amount"," ",t.jsx(Hh,{className:"inline-block ml-2 text-gray-400"})]}),t.jsx("th",{className:"px-4 py-3 border-b text-left text-sm font-medium",children:"Remarks"})]})}),t.jsxs("tbody",{className:"",children:[H.map(te=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-3 border-b text-right text-sm",children:te.date}),t.jsx("td",{className:"px-4 py-3 border-b text-right text-sm",children:te.expenseName}),t.jsx("td",{className:"px-4 py-3 border-b text-right text-sm",children:Number(te.amount).toLocaleString()}),t.jsxs("td",{className:"px-4 py-3 border-b text-sm flex items-center justify-between",children:[t.jsx("span",{children:te.remarks}),t.jsx("div",{className:"flex items-center gap-2",children:S===te.id?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{value:g.amount,onChange:G=>C(xe=>({...xe,amount:G.target.value})),className:"w-24 px-2 py-1 border rounded",placeholder:"Amount"}),t.jsx("input",{value:g.remarks,onChange:G=>C(xe=>({...xe,remarks:G.target.value})),className:"w-48 px-2 py-1 border rounded",placeholder:"Remarks"}),t.jsx("button",{onClick:async()=>{const G=Number(String(g.amount).replace(/,/g,""));if(Number.isNaN(G)){M.error("Invalid amount");return}try{const xe=localStorage.getItem("token");await F.put(`/api/expenses/${te.id}`,{amount:G,remarks:g.remarks},{headers:{Authorization:`Bearer ${xe}`}}),v(j.map(Ne=>Ne.id===te.id?{...Ne,amount:G,remarks:g.remarks}:Ne)),A(null),M.success("Expense updated")}catch(xe){console.error(xe),M.error("Update failed")}},className:"px-2 py-1 bg-blue-600 text-white rounded",children:"Save"}),t.jsx("button",{onClick:()=>{A(null),C({amount:"",remarks:""})},className:"px-2 py-1 bg-gray-300 rounded",children:"Cancel"})]}):E===te.id?t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("input",{value:D.amount,onChange:G=>B(xe=>({...xe,amount:G.target.value})),className:"w-24 px-2 py-1 border rounded",placeholder:"Amount"}),t.jsx("input",{value:D.remarks,onChange:G=>B(xe=>({...xe,remarks:G.target.value})),className:"w-48 px-2 py-1 border rounded",placeholder:"Remarks"}),t.jsx("button",{onClick:async()=>{const G=Number(String(D.amount).replace(/,/g,""));if(Number.isNaN(G)){M.error("Invalid amount");return}try{const xe=localStorage.getItem("token");await F.post(`/api/expenses/${te.id}/request`,{requestType:"edit",payload:{amount:G,remarks:D.remarks}},{headers:{Authorization:`Bearer ${xe}`}}),O(null),B({amount:"",remarks:""}),M.success("Edit request submitted to superadmin")}catch(xe){console.error(xe),M.error("Request failed")}},className:"px-2 py-1 bg-yellow-600 text-white rounded",children:"Submit"}),t.jsx("button",{onClick:()=>{O(null),B({amount:"",remarks:""})},className:"px-2 py-1 bg-gray-300 rounded",children:"Cancel"})]}):w?.role==="superadmin"?t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>{A(te.id),C({amount:te.amount,remarks:te.remarks})},className:"px-2 py-1 bg-blue-600 text-white rounded",children:"Edit"}),t.jsx("button",{onClick:async()=>{try{const G=localStorage.getItem("token");await F.delete(`/api/expenses/${te.id}`,{headers:{Authorization:`Bearer ${G}`}}),v(j.filter(xe=>xe.id!==te.id)),M.success("Expense deleted")}catch(G){console.error(G),M.error("Delete failed")}},className:"px-2 py-1 bg-red-600 text-white rounded",children:"Delete"})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>{O(te.id),B({amount:te.amount,remarks:te.remarks})},className:"px-2 py-1 bg-yellow-600 text-white rounded",children:"Request Edit"}),t.jsx("button",{onClick:async()=>{try{const G=localStorage.getItem("token");await F.post(`/api/expenses/${te.id}/request`,{requestType:"delete"},{headers:{Authorization:`Bearer ${G}`}}),M.success("Delete request submitted to superadmin")}catch(G){console.error(G),M.error("Request failed")}},className:"px-2 py-1 bg-yellow-600 text-white rounded",children:"Request Delete"})]})})]})]},te.id)),H.length===0&&t.jsx("tr",{children:t.jsx("td",{colSpan:4,className:"text-center py-4 text-gray-500",children:"No expenses found."})})]})]})})]})})]})};function WG(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 0 0 9.3-35.2l-.9-2.6a443.74 443.74 0 0 0-79.7-137.9l-1.8-2.1a32.12 32.12 0 0 0-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 0 0-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 0 0-25.8 25.7l-15.8 85.4a351.86 351.86 0 0 0-99 57.4l-81.9-29.1a32 32 0 0 0-35.1 9.5l-1.8 2.1a446.02 446.02 0 0 0-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 0 0-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0 0 35.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0 0 25.8 25.7l2.7.5a449.4 449.4 0 0 0 159 0l2.7-.5a32.05 32.05 0 0 0 25.8-25.7l15.7-85a350 350 0 0 0 99.7-57.6l81.3 28.9a32 32 0 0 0 35.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 0 1-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 0 1-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 0 1 512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 0 1 400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 0 1 624 502c0 29.9-11.7 58-32.8 79.2z"},child:[]}]})(e)}function QG(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M824.2 699.9a301.55 301.55 0 0 0-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 0 0-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 0 0 8 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 0 1 612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 0 0 8-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 0 1-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 0 1 612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 0 1-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 0 0 8 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"},child:[]}]})(e)}function XG(e){return Ye({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M858.5 763.6a374 374 0 0 0-80.6-119.5 375.63 375.63 0 0 0-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 0 0-80.6 119.5A371.7 371.7 0 0 0 136 901.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 0 0 8-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"},child:[]}]})(e)}function ZG(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"14",y:"3",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"14",y:"14",width:"7",height:"7"},child:[]},{tag:"rect",attr:{x:"3",y:"14",width:"7",height:"7"},child:[]}]})(e)}function eJ(e){return Ye({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"12 2 2 7 12 12 22 7 12 2"},child:[]},{tag:"polyline",attr:{points:"2 17 12 22 22 17"},child:[]},{tag:"polyline",attr:{points:"2 12 12 17 22 12"},child:[]}]})(e)}const qS=[{to:"/admin",label:"Admin Area",icon:ZG},{to:"/admin/configuration",label:"Configuration",icon:WG},{to:"/admin/accounting",label:"Accounting & Finance",icon:eJ},{to:"/admin/employer-management",label:"Employer Management",icon:QG},{to:"/admin/candidate-management",label:"Candidate Management",icon:XG}],HS=[{to:"/admin/dashboard",label:"Dashboard"},{to:"/admin/manage-users",label:"Manage Users"},{to:"/admin/manage-role",label:"Manage Role"},{to:"/admin/user-log-report",label:"User Log Report"}],VS=[{to:"/admin/accounting/chart-of-accounts",label:"Chart of Accounts"},{to:"/admin/accounting/opening-balance",label:"Opening Balance"},{to:"/admin/accounting/cash-receipt",label:"Cash Receipt"},{to:"/admin/accounting/cash-payment",label:"Cash Payment"},{to:"/admin/accounting/bank-receipt",label:"Bank Receipt"},{to:"/admin/accounting/bank-payment",label:"Bank Payment"},{to:"/admin/accounting/jv",label:"JV"},{to:"/admin/accounting/manage-payments",label:"Manage Payments"},{to:"/admin/accounting/job-payment",label:"Job Payment"},{to:"/admin/accounting/travel-agent-payment",label:"Travel Agent Payment"},{to:"/admin/accounting/candidate-receipt",label:"Candidate Receipt"},{to:"/admin/accounting/candidate-jv",label:"Candidate JV"},{to:"/admin/accounting/expenses-against-candidate",label:"Expenses Against Candidate"},{to:"/admin/accounting/report-manager",label:"Report Manager (AF)"},{to:"/admin/accounting/chart-of-accounts-balances",label:"Chart of Account with Balances"},{to:"/admin/accounting/cash-book",label:"Cash Book"},{to:"/admin/accounting/bank-book",label:"Bank Book"},{to:"/admin/accounting/general-ledger",label:"General Ledger"},{to:"/admin/accounting/trial-balance",label:"Trial Balance"},{to:"/admin/accounting/account-balances",label:"Account Balances"},{to:"/admin/accounting/income-statement",label:"Income Statement"},{to:"/admin/accounting/balance-sheet",label:"Balance Sheet"},{to:"/admin/accounting/cash-flow-statement",label:"Cash Flow Statement"},{to:"/admin/accounting/equity-report",label:"Equity Report"}],YS=[{to:"/admin/config/add-payment-agent",label:"Add Payment Agent"},{to:"/admin/config/add-recruitment-agent",label:"Add Recruitment Agent"},{to:"/admin/config/add-travel-agent",label:"Add Travel Agent"},{to:"/admin/config/manage-travel-agents",label:"Manage Travel Agents"},{to:"/admin/config/visa-categories",label:"Visa Categories"},{to:"/admin/config/education-categories",label:"Education Categories"},{to:"/admin/config/job-categories",label:"Job Categories"},{to:"/admin/config/sub-categories",label:"Sub Categories"},{to:"/admin/config/working-categories",label:"Working Categories"},{to:"/admin/config/visa-issuing-authorities",label:"Visa Issuing Authorities"},{to:"/admin/config/verifying-institutions",label:"Verifying Institutions"},{to:"/admin/config/add-test-center",label:"Add Test Center"},{to:"/admin/config/add-medical-centers",label:"Add Medical Centers"},{to:"/admin/config/test-types",label:"Add Test Types"},{to:"/admin/config/age-ranges",label:"Age Ranges"},{to:"/admin/config/salary-ranges",label:"Salary Ranges"},{to:"/admin/config/experience-ranges",label:"Experience Ranges"},{to:"/admin/config/airlines",label:"Airlines"},{to:"/admin/config/visa-professions",label:"Visa Profession"},{to:"/admin/skills",label:"Skills"},{to:"/admin/config/working-sectors",label:"Sectors / Industries"},{to:"/admin/config/cities",label:"Cities"},{to:"/admin/config/education-level",label:"Education Level"},{to:"/admin/config/career-level",label:"Carrer Level"}],KS=[{to:"/admin/employer-management/employer-setup",label:"Employer Setup"},{to:"/admin/employer-management/employer-plans",label:"Employer Plans"},{to:"/admin/employer-management/job-setup",label:"Job Setup"},{to:"/admin/employer-management/employer-ledger",label:"Employer Ledger"},{to:"/admin/employer-management/job-grouping-prints",label:"Job Grouping for Prints"},{to:"/admin/employer-management/status-jobs-report",label:"Status of Jobs Report"},{to:"/admin/employer-management/security-fee-refund-prints",label:"Security Fee Refund Prints"},{to:"/admin/employer-management/travel-agent-ledger",label:"Travel Agent Ledger"}],GS=[{to:"/admin/candidate-management/initial-registration",label:"Initial Registration"},{to:"/admin/candidate-management/candidate-final-registration",label:"Candidate Final Registration"},{to:"/admin/candidate-management/apply-job",label:"Apply Job"},{to:"/admin/candidate-management/shortlisting",label:"Shortlisting"},{to:"/admin/candidate-management/shortlisted-candidates",label:"Shortlisted Candidates"},{to:"/admin/candidate-management/online-applications",label:"Online Applications"},{to:"/admin/candidate-management/job-applications",label:"Job Applications"},{to:"/admin/candidate-management/freeze-applications",label:"Freeze Applications"},{to:"/admin/candidate-management/completed-applications",label:"Completed Applications"},{to:"/admin/candidate-management/interview-schedule",label:"Interview Schedule"},{to:"/admin/candidate-management/bulk-application-maker",label:"Bulk Application Maker"},{to:"/admin/candidate-management/bulk-offer-sender",label:"Bulk Offer Sender"},{to:"/admin/candidate-management/bulk-flight-cancel",label:"Bulk flight Cancel"},{to:"/admin/candidate-management/report-manager",label:"Report Manager (CM)"},{to:"/admin/candidate-management/candidate-ledger-expenses",label:"Candidate Ledger with Expenses"},{to:"/admin/candidate-management/candidate-ledger-summary",label:"Candidate Ledger Summary"},{to:"/admin/candidate-management/candidate-agent-ledger",label:"Candidate Agent Ledger"},{to:"/admin/candidate-management/protector-print-candidates",label:"Protector Print for Candidates"},{to:"/admin/candidate-management/candidate-filter-report",label:"Candidate Filter Report"},{to:"/admin/candidate-management/traveled-candidates-report",label:"Traveled Candidates Report"},{to:"/admin/candidate-management/candidate-application-status-report",label:"Candidate Application Status Report"}],we=()=>{const[e,a]=b.useState(null);return t.jsx("nav",{className:"bg-white rounded-lg shadow-sm mb-6 px-4 py-3",children:t.jsx("div",{className:"max-w-7xl mx-auto",children:t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("h4",{className:"text-lg font-semibold text-gray-800",children:"Admin"}),t.jsx("p",{className:"text-sm text-gray-500",children:"Management"})]}),t.jsx("div",{className:"hidden md:flex items-center space-x-3",children:qS.map(r=>{const n=r.icon;return r.to==="/admin"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin"&&t.jsx("div",{className:"absolute left-0 mt-2 w-56 bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("ul",{className:"py-2",children:HS.map(i=>t.jsx("li",{children:t.jsx(Vt,{to:i.to,className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:i.label})},i.to))})})]},r.to):r.to==="/admin/configuration"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin/configuration"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin/configuration"&&t.jsx("div",{className:"absolute left-0 mt-2 w-[760px] bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"grid grid-cols-3 gap-2",children:YS.map(i=>t.jsx(Vt,{to:i.to,className:"block px-3 py-2 text-sm text-gray-700 rounded hover:bg-gray-100",children:i.label},i.to))})})})]},r.to):r.to==="/admin/accounting"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin/accounting"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin/accounting"&&t.jsx("div",{className:"absolute left-0 mt-2 w-[800px] bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"grid grid-cols-3 gap-2",children:VS.map(i=>t.jsx(Vt,{to:i.to,className:"block px-3 py-2 text-sm text-gray-700 rounded hover:bg-gray-100",children:i.label},i.to))})})})]},r.to):r.to==="/admin/employer-management"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin/employer-management"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin/employer-management"&&t.jsx("div",{className:"absolute left-0 mt-2 w-64 bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("ul",{className:"py-2",children:KS.map(i=>t.jsx("li",{children:t.jsx(Vt,{to:i.to,className:"block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",children:i.label})},i.to))})})]},r.to):r.to==="/admin/candidate-management"?t.jsxs("div",{className:"relative",onMouseEnter:()=>a("/admin/candidate-management"),onMouseLeave:()=>a(null),children:[t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label}),t.jsx("svg",{className:"ml-1 w-3 h-3 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),e==="/admin/candidate-management"&&t.jsx("div",{className:"absolute right-0 mt-2 w-[800px] bg-white border rounded-md shadow-lg opacity-100 transform scale-100 transition-all duration-150 origin-top z-50",children:t.jsx("div",{className:"p-4",children:t.jsx("div",{className:"grid grid-cols-3 gap-2",children:GS.map(i=>t.jsx(Vt,{to:i.to,className:"block px-3 py-2 text-sm text-gray-700 rounded hover:bg-gray-100",children:i.label},i.to))})})})]},r.to):t.jsxs(Vt,{to:r.to,className:({isActive:i})=>`flex items-center gap-2 px-3 py-2 rounded-md transition-colors text-sm font-medium ${i?"bg-emerald-600 text-white shadow":"text-gray-700 hover:bg-gray-100"}`,children:[t.jsx(n,{className:"text-base"}),t.jsx("span",{children:r.label})]},r.to)})}),t.jsx("div",{className:"md:hidden",children:t.jsxs("details",{className:"relative",children:[t.jsx("summary",{className:"list-none cursor-pointer px-3 py-2 rounded-md bg-gray-100 text-gray-700",children:"Menu"}),t.jsx("div",{className:"absolute right-0 mt-2 w-64 bg-white border rounded shadow-md z-20",children:t.jsx("ul",{className:"divide-y",children:qS.map(r=>t.jsxs("li",{children:[t.jsxs(Vt,{to:r.to,className:"flex items-center gap-2 px-3 py-2 hover:bg-gray-50 text-sm text-gray-700",children:[t.jsx(r.icon,{}),t.jsx("span",{children:r.label})]}),r.to==="/admin"&&t.jsx("ul",{className:"pl-8 py-2",children:HS.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))}),r.to==="/admin/configuration"&&t.jsx("ul",{className:"pl-8 py-2",children:YS.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))}),r.to==="/admin/accounting"&&t.jsx("ul",{className:"pl-8 py-2",children:VS.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))}),r.to==="/admin/employer-management"&&t.jsx("ul",{className:"pl-8 py-2",children:KS.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))}),r.to==="/admin/candidate-management"&&t.jsx("ul",{className:"pl-8 py-2",children:GS.map(n=>t.jsx("li",{children:t.jsx(Vt,{to:n.to,className:"block px-3 py-2 text-sm text-gray-700 hover:bg-gray-50",children:n.label})},n.to))})]},r.to))})})]})})]})})})},tJ=()=>{const{user:e}=br(w=>w.user),[a,r]=b.useState([]),[n,i]=b.useState({username:"",email:"",password:""}),[o,c]=b.useState(null),[m,u]=b.useState([]);b.useEffect(()=>{if(e?.role!=="superadmin")return;(async()=>{try{const A=await Fh();r(A.data?.users||[])}catch(A){console.error("fetch users error",A)}})(),(async()=>{try{const A=localStorage.getItem("token"),g=await F.get("/api/expenses/requests",{headers:{Authorization:`Bearer ${A}`}});p(g.data?.requests||[])}catch(A){console.error("fetch requests failed",A)}})()},[e]);const[h,p]=b.useState([]),x=async w=>{w.preventDefault();try{const S=await IP(n.username,n.email,n.password);M.success(S.data.message||"Admin created"),i({username:"",email:"",password:""});try{const A=await Fh();r(A.data?.users||[])}catch(A){console.error("refresh after createAdmin failed",A)}}catch(S){console.error(S),M.error(S.response?.data?.message||"Error")}},j=async w=>{try{const S=await FP(w,m);M.success(S.data.message||"Permissions updated");try{const A=await Fh();r(A.data?.users||[])}catch(A){console.error("refresh after updatePermissions failed",A)}}catch(S){console.error(S),M.error(S.response?.data?.message||"Error updating permissions")}},v=async(w,S)=>{try{const A=localStorage.getItem("token"),g=await F.post(`/api/expenses/requests/${w}/handle`,{action:S},{headers:{Authorization:`Bearer ${A}`}});M.success(g.data.message||"Handled");const C=await F.get("/api/expenses/requests",{headers:{Authorization:`Bearer ${A}`}});p(C.data?.requests||[])}catch(A){console.error("handle request failed",A),M.error(A.response?.data?.message||"Failed")}};return e?.role!=="superadmin"?t.jsx("div",{className:"p-6",children:"Access denied."}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Super Admin Panel"}),t.jsxs("section",{className:"mb-6",children:[t.jsx("h3",{className:"font-semibold",children:"Create Admin"}),t.jsxs("form",{onSubmit:x,className:"space-y-2",children:[t.jsx("input",{value:n.username,onChange:w=>i({...n,username:w.target.value}),placeholder:"Username",className:"border p-2 w-full"}),t.jsx("input",{value:n.email,onChange:w=>i({...n,email:w.target.value}),placeholder:"Email",className:"border p-2 w-full"}),t.jsx("input",{value:n.password,onChange:w=>i({...n,password:w.target.value}),placeholder:"Password",type:"password",className:"border p-2 w-full"}),t.jsx("button",{type:"submit",className:"bg-green-600 text-white px-4 py-2 rounded",children:"Create Admin"})]})]}),t.jsxs("section",{children:[t.jsx("h3",{className:"font-semibold mb-2",children:"Manage Users & Permissions"}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx("div",{children:t.jsx("ul",{className:"border p-2 max-h-64 overflow-auto",children:a.map(w=>t.jsxs("li",{className:`p-2 cursor-pointer ${o===w._id?"bg-gray-200":""}`,onClick:()=>{c(w._id),u(w.permittedPages||[])},children:[t.jsxs("div",{className:"font-medium",children:[w.username," ",t.jsxs("span",{className:"text-xs text-gray-500",children:["(",w.role,")"]})]}),t.jsx("div",{className:"text-xs text-gray-600",children:w.email})]},w._id))})}),t.jsx("div",{children:o?t.jsxs("div",{className:"border p-2",children:[t.jsx("h4",{className:"font-medium mb-2",children:"Edit Permissions"}),t.jsxs("label",{className:"block mb-2",children:[t.jsx("input",{type:"checkbox",checked:m.includes("/dashboard"),onChange:w=>{const S=m.includes("/dashboard")?m.filter(A=>A!=="/dashboard"):[...m,"/dashboard"];u(S)}})," ","Dashboard"]}),t.jsxs("label",{className:"block mb-2",children:[t.jsx("input",{type:"checkbox",checked:m.includes("/expense"),onChange:w=>{const S=m.includes("/expense")?m.filter(A=>A!=="/expense"):[...m,"/expense"];u(S)}})," ","Expense"]}),t.jsxs("label",{className:"block mb-2",children:[t.jsx("input",{type:"checkbox",checked:m.includes("/candidates-cv"),onChange:w=>{const S=m.includes("/candidates-cv")?m.filter(A=>A!=="/candidates-cv"):[...m,"/candidates-cv"];u(S)}})," ","Candidates CV"]}),t.jsx("div",{className:"mt-2",children:t.jsx("button",{className:"bg-blue-600 text-white px-3 py-1 rounded",onClick:()=>j(o),children:"Save"})})]}):t.jsx("div",{className:"border p-2",children:"Select a user to edit permissions"})})]})]}),t.jsxs("section",{className:"mt-6",children:[t.jsx("h3",{className:"font-semibold mb-2",children:"Pending Expense Requests"}),t.jsx("div",{className:"border p-3 max-h-72 overflow-auto",children:h.length===0?t.jsx("div",{className:"text-sm text-gray-500",children:"No pending requests"}):t.jsx("ul",{className:"space-y-2",children:h.map(w=>t.jsxs("li",{className:"border p-2 rounded flex justify-between items-start",children:[t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium",children:w.requestType.toUpperCase()}),t.jsxs("div",{className:"text-xs text-gray-600",children:["By: ",w.requestedBy?.username||"Unknown"," (",w.requestedBy?.email||"",")"]}),t.jsxs("div",{className:"text-xs text-gray-700 mt-2",children:["Payload: ",JSON.stringify(w.payload||{})]}),t.jsxs("div",{className:"text-xs text-gray-500",children:["Status: ",w.status]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("button",{onClick:()=>v(w._id,"approve"),className:"px-2 py-1 bg-green-600 text-white rounded",children:"Approve"}),t.jsx("button",{onClick:()=>v(w._id,"reject"),className:"px-2 py-1 bg-red-600 text-white rounded",children:"Reject"})]})]},w._id))})})]})]})};var gg={exports:{}},bg,JS;function aJ(){if(JS)return bg;JS=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return bg=e,bg}var yg,WS;function rJ(){if(WS)return yg;WS=1;var e=aJ();function a(){}function r(){}return r.resetWarningCache=a,yg=function(){function n(c,m,u,h,p,x){if(x!==e){var j=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 j.name="Invariant Violation",j}}n.isRequired=n;function i(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:r,resetWarningCache:a};return o.PropTypes=o,o},yg}var QS;function nJ(){return QS||(QS=1,gg.exports=rJ()()),gg.exports}var sJ=nJ();const ot=Or(sJ);function fl(e,a,r,n){function i(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function m(p){try{h(n.next(p))}catch(x){c(x)}}function u(p){try{h(n.throw(p))}catch(x){c(x)}}function h(p){p.done?o(p.value):i(p.value).then(m,u)}h((n=n.apply(e,a||[])).next())})}const lJ=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function pi(e,a,r){const n=iJ(e),{webkitRelativePath:i}=e,o=typeof a=="string"?a:typeof i=="string"&&i.length>0?i:`./${e.name}`;return typeof n.path!="string"&&XS(n,"path",o),XS(n,"relativePath",o),n}function iJ(e){const{name:a}=e;if(a&&a.lastIndexOf(".")!==-1&&!e.type){const n=a.split(".").pop().toLowerCase(),i=lJ.get(n);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}function XS(e,a,r){Object.defineProperty(e,a,{value:r,writable:!1,configurable:!1,enumerable:!0})}const oJ=[".DS_Store","Thumbs.db"];function cJ(e){return fl(this,void 0,void 0,function*(){return bm(e)&&dJ(e.dataTransfer)?pJ(e.dataTransfer,e.type):uJ(e)?mJ(e):Array.isArray(e)&&e.every(a=>"getFile"in a&&typeof a.getFile=="function")?fJ(e):[]})}function dJ(e){return bm(e)}function uJ(e){return bm(e)&&bm(e.target)}function bm(e){return typeof e=="object"&&e!==null}function mJ(e){return vb(e.target.files).map(a=>pi(a))}function fJ(e){return fl(this,void 0,void 0,function*(){return(yield Promise.all(e.map(r=>r.getFile()))).map(r=>pi(r))})}function pJ(e,a){return fl(this,void 0,void 0,function*(){if(e.items){const r=vb(e.items).filter(i=>i.kind==="file");if(a!=="drop")return r;const n=yield Promise.all(r.map(hJ));return ZS(WO(n))}return ZS(vb(e.files).map(r=>pi(r)))})}function ZS(e){return e.filter(a=>oJ.indexOf(a.name)===-1)}function vb(e){if(e===null)return[];const a=[];for(let r=0;r<e.length;r++){const n=e[r];a.push(n)}return a}function hJ(e){if(typeof e.webkitGetAsEntry!="function")return eC(e);const a=e.webkitGetAsEntry();return a&&a.isDirectory?QO(a):eC(e,a)}function WO(e){return e.reduce((a,r)=>[...a,...Array.isArray(r)?WO(r):[r]],[])}function eC(e,a){return fl(this,void 0,void 0,function*(){var r;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const o=yield e.getAsFileSystemHandle();if(o===null)throw new Error(`${e} is not a File`);if(o!==void 0){const c=yield o.getFile();return c.handle=o,pi(c)}}const n=e.getAsFile();if(!n)throw new Error(`${e} is not a File`);return pi(n,(r=a?.fullPath)!==null&&r!==void 0?r:void 0)})}function xJ(e){return fl(this,void 0,void 0,function*(){return e.isDirectory?QO(e):gJ(e)})}function QO(e){const a=e.createReader();return new Promise((r,n)=>{const i=[];function o(){a.readEntries(c=>fl(this,void 0,void 0,function*(){if(c.length){const m=Promise.all(c.map(xJ));i.push(m),o()}else try{const m=yield Promise.all(i);r(m)}catch(m){n(m)}}),c=>{n(c)})}o()})}function gJ(e){return fl(this,void 0,void 0,function*(){return new Promise((a,r)=>{e.file(n=>{const i=pi(n,e.fullPath);a(i)},n=>{r(n)})})})}var mu={},tC;function bJ(){return tC||(tC=1,mu.__esModule=!0,mu.default=function(e,a){if(e&&a){var r=Array.isArray(a)?a:a.split(",");if(r.length===0)return!0;var n=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return r.some(function(c){var m=c.trim().toLowerCase();return m.charAt(0)==="."?n.toLowerCase().endsWith(m):m.endsWith("/*")?o===m.replace(/\/.*$/,""):i===m})}return!0}),mu}var yJ=bJ();const vg=Or(yJ);function aC(e){return NJ(e)||jJ(e)||ZO(e)||vJ()}function vJ(){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 jJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NJ(e){if(Array.isArray(e))return jb(e)}function rC(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nC(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?rC(Object(r),!0).forEach(function(n){XO(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XO(e,a,r){return a in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function ic(e,a){return SJ(e)||AJ(e,a)||ZO(e,a)||wJ()}function wJ(){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 ZO(e,a){if(e){if(typeof e=="string")return jb(e,a);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jb(e,a)}}function jb(e,a){(a==null||a>e.length)&&(a=e.length);for(var r=0,n=new Array(a);r<a;r++)n[r]=e[r];return n}function AJ(e,a){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,c,m;try{for(r=r.call(e);!(i=(c=r.next()).done)&&(n.push(c.value),!(a&&n.length===a));i=!0);}catch(u){o=!0,m=u}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw m}}return n}}function SJ(e){if(Array.isArray(e))return e}var CJ=typeof vg=="function"?vg:vg.default,EJ="file-invalid-type",kJ="file-too-large",OJ="file-too-small",DJ="too-many-files",TJ=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=a.split(","),n=r.length>1?"one of ".concat(r.join(", ")):r[0];return{code:EJ,message:"File type must be ".concat(n)}},sC=function(a){return{code:kJ,message:"File is larger than ".concat(a," ").concat(a===1?"byte":"bytes")}},lC=function(a){return{code:OJ,message:"File is smaller than ".concat(a," ").concat(a===1?"byte":"bytes")}},RJ={code:DJ,message:"Too many files"};function eD(e,a){var r=e.type==="application/x-moz-file"||CJ(e,a);return[r,r?null:TJ(a)]}function tD(e,a,r){if(Ys(e.size))if(Ys(a)&&Ys(r)){if(e.size>r)return[!1,sC(r)];if(e.size<a)return[!1,lC(a)]}else{if(Ys(a)&&e.size<a)return[!1,lC(a)];if(Ys(r)&&e.size>r)return[!1,sC(r)]}return[!0,null]}function Ys(e){return e!=null}function PJ(e){var a=e.files,r=e.accept,n=e.minSize,i=e.maxSize,o=e.multiple,c=e.maxFiles,m=e.validator;return!o&&a.length>1||o&&c>=1&&a.length>c?!1:a.every(function(u){var h=eD(u,r),p=ic(h,1),x=p[0],j=tD(u,n,i),v=ic(j,1),w=v[0],S=m?m(u):null;return x&&w&&!S})}function ym(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function fu(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(a){return a==="Files"||a==="application/x-moz-file"}):!!e.target&&!!e.target.files}function iC(e){e.preventDefault()}function MJ(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function _J(e){return e.indexOf("Edge/")!==-1}function zJ(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return MJ(e)||_J(e)}function Ir(){for(var e=arguments.length,a=new Array(e),r=0;r<e;r++)a[r]=arguments[r];return function(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),c=1;c<i;c++)o[c-1]=arguments[c];return a.some(function(m){return!ym(n)&&m&&m.apply(void 0,[n].concat(o)),ym(n)})}}function LJ(){return"showOpenFilePicker"in window}function BJ(e){if(Ys(e)){var a=Object.entries(e).filter(function(r){var n=ic(r,2),i=n[0],o=n[1],c=!0;return aD(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),c=!1),(!Array.isArray(o)||!o.every(rD))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(r,n){var i=ic(n,2),o=i[0],c=i[1];return nC(nC({},r),{},XO({},o,c))},{});return[{description:"Files",accept:a}]}return e}function IJ(e){if(Ys(e))return Object.entries(e).reduce(function(a,r){var n=ic(r,2),i=n[0],o=n[1];return[].concat(aC(a),[i],aC(o))},[]).filter(function(a){return aD(a)||rD(a)}).join(",")}function FJ(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function UJ(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function aD(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function rD(e){return/^.*\.[\w]+$/.test(e)}var $J=["children"],qJ=["open"],HJ=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],VJ=["refKey","onChange","onClick"];function YJ(e){return JJ(e)||GJ(e)||nD(e)||KJ()}function KJ(){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 GJ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function JJ(e){if(Array.isArray(e))return Nb(e)}function jg(e,a){return XJ(e)||QJ(e,a)||nD(e,a)||WJ()}function WJ(){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 nD(e,a){if(e){if(typeof e=="string")return Nb(e,a);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nb(e,a)}}function Nb(e,a){(a==null||a>e.length)&&(a=e.length);for(var r=0,n=new Array(a);r<a;r++)n[r]=e[r];return n}function QJ(e,a){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n=[],i=!0,o=!1,c,m;try{for(r=r.call(e);!(i=(c=r.next()).done)&&(n.push(c.value),!(a&&n.length===a));i=!0);}catch(u){o=!0,m=u}finally{try{!i&&r.return!=null&&r.return()}finally{if(o)throw m}}return n}}function XJ(e){if(Array.isArray(e))return e}function oC(e,a){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nt(e){for(var a=1;a<arguments.length;a++){var r=arguments[a]!=null?arguments[a]:{};a%2?oC(Object(r),!0).forEach(function(n){wb(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wb(e,a,r){return a in e?Object.defineProperty(e,a,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[a]=r,e}function vm(e,a){if(e==null)return{};var r=ZJ(e,a),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(a.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ZJ(e,a){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(a.indexOf(i)>=0)&&(r[i]=e[i]);return r}var py=b.forwardRef(function(e,a){var r=e.children,n=vm(e,$J),i=lD(n),o=i.open,c=vm(i,qJ);return b.useImperativeHandle(a,function(){return{open:o}},[o]),pr.createElement(b.Fragment,null,r(Nt(Nt({},c),{},{open:o})))});py.displayName="Dropzone";var sD={disabled:!1,getFilesFromEvent:cJ,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};py.defaultProps=sD;py.propTypes={children:ot.func,accept:ot.objectOf(ot.arrayOf(ot.string)),multiple:ot.bool,preventDropOnDocument:ot.bool,noClick:ot.bool,noKeyboard:ot.bool,noDrag:ot.bool,noDragEventsBubbling:ot.bool,minSize:ot.number,maxSize:ot.number,maxFiles:ot.number,disabled:ot.bool,getFilesFromEvent:ot.func,onFileDialogCancel:ot.func,onFileDialogOpen:ot.func,useFsAccessApi:ot.bool,autoFocus:ot.bool,onDragEnter:ot.func,onDragLeave:ot.func,onDragOver:ot.func,onDrop:ot.func,onDropAccepted:ot.func,onDropRejected:ot.func,onError:ot.func,validator:ot.func};var Ab={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function lD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=Nt(Nt({},sD),e),r=a.accept,n=a.disabled,i=a.getFilesFromEvent,o=a.maxSize,c=a.minSize,m=a.multiple,u=a.maxFiles,h=a.onDragEnter,p=a.onDragLeave,x=a.onDragOver,j=a.onDrop,v=a.onDropAccepted,w=a.onDropRejected,S=a.onFileDialogCancel,A=a.onFileDialogOpen,g=a.useFsAccessApi,C=a.autoFocus,E=a.preventDropOnDocument,O=a.noClick,D=a.noKeyboard,B=a.noDrag,L=a.noDragEventsBubbling,T=a.onError,R=a.validator,z=b.useMemo(function(){return IJ(r)},[r]),U=b.useMemo(function(){return BJ(r)},[r]),X=b.useMemo(function(){return typeof A=="function"?A:cC},[A]),fe=b.useMemo(function(){return typeof S=="function"?S:cC},[S]),se=b.useRef(null),ie=b.useRef(null),V=b.useReducer(eW,Ab),K=jg(V,2),ce=K[0],$=K[1],I=ce.isFocused,P=ce.isFileDialogActive,H=b.useRef(typeof window<"u"&&window.isSecureContext&&g&&LJ()),ee=function(){!H.current&&P&&setTimeout(function(){if(ie.current){var Pe=ie.current.files;Pe.length||($({type:"closeDialog"}),fe())}},300)};b.useEffect(function(){return window.addEventListener("focus",ee,!1),function(){window.removeEventListener("focus",ee,!1)}},[ie,P,fe,H]);var pe=b.useRef([]),ve=function(Pe){se.current&&se.current.contains(Pe.target)||(Pe.preventDefault(),pe.current=[])};b.useEffect(function(){return E&&(document.addEventListener("dragover",iC,!1),document.addEventListener("drop",ve,!1)),function(){E&&(document.removeEventListener("dragover",iC),document.removeEventListener("drop",ve))}},[se,E]),b.useEffect(function(){return!n&&C&&se.current&&se.current.focus(),function(){}},[se,C,n]);var ue=b.useCallback(function(ye){T?T(ye):console.error(ye)},[T]),he=b.useCallback(function(ye){ye.preventDefault(),ye.persist(),Qa(ye),pe.current=[].concat(YJ(pe.current),[ye.target]),fu(ye)&&Promise.resolve(i(ye)).then(function(Pe){if(!(ym(ye)&&!L)){var jt=Pe.length,St=jt>0&&PJ({files:Pe,accept:z,minSize:c,maxSize:o,multiple:m,maxFiles:u,validator:R}),Ut=jt>0&&!St;$({isDragAccept:St,isDragReject:Ut,isDragActive:!0,type:"setDraggedFiles"}),h&&h(ye)}}).catch(function(Pe){return ue(Pe)})},[i,h,ue,L,z,c,o,m,u,R]),te=b.useCallback(function(ye){ye.preventDefault(),ye.persist(),Qa(ye);var Pe=fu(ye);if(Pe&&ye.dataTransfer)try{ye.dataTransfer.dropEffect="copy"}catch{}return Pe&&x&&x(ye),!1},[x,L]),G=b.useCallback(function(ye){ye.preventDefault(),ye.persist(),Qa(ye);var Pe=pe.current.filter(function(St){return se.current&&se.current.contains(St)}),jt=Pe.indexOf(ye.target);jt!==-1&&Pe.splice(jt,1),pe.current=Pe,!(Pe.length>0)&&($({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),fu(ye)&&p&&p(ye))},[se,p,L]),xe=b.useCallback(function(ye,Pe){var jt=[],St=[];ye.forEach(function(Ut){var As=eD(Ut,z),Kr=jg(As,2),Ri=Kr[0],Pi=Kr[1],Gr=tD(Ut,c,o),$t=jg(Gr,2),Xa=$t[0],ea=$t[1],Mi=R?R(Ut):null;if(Ri&&Xa&&!Mi)jt.push(Ut);else{var _i=[Pi,ea];Mi&&(_i=_i.concat(Mi)),St.push({file:Ut,errors:_i.filter(function(mf){return mf})})}}),(!m&&jt.length>1||m&&u>=1&&jt.length>u)&&(jt.forEach(function(Ut){St.push({file:Ut,errors:[RJ]})}),jt.splice(0)),$({acceptedFiles:jt,fileRejections:St,isDragReject:St.length>0,type:"setFiles"}),j&&j(jt,St,Pe),St.length>0&&w&&w(St,Pe),jt.length>0&&v&&v(jt,Pe)},[$,m,z,c,o,u,j,v,w,R]),Ne=b.useCallback(function(ye){ye.preventDefault(),ye.persist(),Qa(ye),pe.current=[],fu(ye)&&Promise.resolve(i(ye)).then(function(Pe){ym(ye)&&!L||xe(Pe,ye)}).catch(function(Pe){return ue(Pe)}),$({type:"reset"})},[i,xe,ue,L]),ne=b.useCallback(function(){if(H.current){$({type:"openDialog"}),X();var ye={multiple:m,types:U};window.showOpenFilePicker(ye).then(function(Pe){return i(Pe)}).then(function(Pe){xe(Pe,null),$({type:"closeDialog"})}).catch(function(Pe){FJ(Pe)?(fe(Pe),$({type:"closeDialog"})):UJ(Pe)?(H.current=!1,ie.current?(ie.current.value=null,ie.current.click()):ue(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):ue(Pe)});return}ie.current&&($({type:"openDialog"}),X(),ie.current.value=null,ie.current.click())},[$,X,fe,g,xe,ue,U,m]),Me=b.useCallback(function(ye){!se.current||!se.current.isEqualNode(ye.target)||(ye.key===" "||ye.key==="Enter"||ye.keyCode===32||ye.keyCode===13)&&(ye.preventDefault(),ne())},[se,ne]),je=b.useCallback(function(){$({type:"focus"})},[]),ke=b.useCallback(function(){$({type:"blur"})},[]),Ce=b.useCallback(function(){O||(zJ()?setTimeout(ne,0):ne())},[O,ne]),Ke=function(Pe){return n?null:Pe},dt=function(Pe){return D?null:Ke(Pe)},Zt=function(Pe){return B?null:Ke(Pe)},Qa=function(Pe){L&&Pe.stopPropagation()},Ti=b.useMemo(function(){return function(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Pe=ye.refKey,jt=Pe===void 0?"ref":Pe,St=ye.role,Ut=ye.onKeyDown,As=ye.onFocus,Kr=ye.onBlur,Ri=ye.onClick,Pi=ye.onDragEnter,Gr=ye.onDragOver,$t=ye.onDragLeave,Xa=ye.onDrop,ea=vm(ye,HJ);return Nt(Nt(wb({onKeyDown:dt(Ir(Ut,Me)),onFocus:dt(Ir(As,je)),onBlur:dt(Ir(Kr,ke)),onClick:Ke(Ir(Ri,Ce)),onDragEnter:Zt(Ir(Pi,he)),onDragOver:Zt(Ir(Gr,te)),onDragLeave:Zt(Ir($t,G)),onDrop:Zt(Ir(Xa,Ne)),role:typeof St=="string"&&St!==""?St:"presentation"},jt,se),!n&&!D?{tabIndex:0}:{}),ea)}},[se,Me,je,ke,Ce,he,te,G,Ne,D,B,n]),df=b.useCallback(function(ye){ye.stopPropagation()},[]),uf=b.useMemo(function(){return function(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Pe=ye.refKey,jt=Pe===void 0?"ref":Pe,St=ye.onChange,Ut=ye.onClick,As=vm(ye,VJ),Kr=wb({accept:z,multiple:m,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Ke(Ir(St,Ne)),onClick:Ke(Ir(Ut,df)),tabIndex:-1},jt,ie);return Nt(Nt({},Kr),As)}},[ie,r,m,Ne,n]);return Nt(Nt({},ce),{},{isFocused:I&&!n,getRootProps:Ti,getInputProps:uf,rootRef:se,inputRef:ie,open:Ke(ne)})}function eW(e,a){switch(a.type){case"focus":return Nt(Nt({},e),{},{isFocused:!0});case"blur":return Nt(Nt({},e),{},{isFocused:!1});case"openDialog":return Nt(Nt({},Ab),{},{isFileDialogActive:!0});case"closeDialog":return Nt(Nt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Nt(Nt({},e),{},{isDragActive:a.isDragActive,isDragAccept:a.isDragAccept,isDragReject:a.isDragReject});case"setFiles":return Nt(Nt({},e),{},{acceptedFiles:a.acceptedFiles,fileRejections:a.fileRejections,isDragReject:a.isDragReject});case"reset":return Nt({},Ab);default:return e}}function cC(){}const tW=()=>{const[e,a]=b.useState({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),[r,n]=b.useState([]),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null);b.useEffect(()=>{(async()=>{try{const C=localStorage.getItem("token"),E=await F.get("/api/config/payment-agents",{headers:{Authorization:`Bearer ${C}`}});o(E.data.agents||[])}catch(C){console.error("Load agents error",C)}})()},[]);const p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})},{getRootProps:x,getInputProps:j}=lD({onDrop:g=>{n(g)}}),v=async g=>{g.preventDefault();try{const C=localStorage.getItem("token"),E=new FormData;Object.keys(e).forEach(D=>{E.append(D,e[D])}),r.forEach(D=>{E.append("files",D)}),u?(await F.put(`/api/config/payment-agents/${u._id}`,E,{headers:{Authorization:`Bearer ${C}`}}),M.success("Payment Agent updated successfully")):(await F.post("/api/config/payment-agents",E,{headers:{Authorization:`Bearer ${C}`}}),M.success("Payment Agent added successfully")),a({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),n([]),h(null);const O=await F.get("/api/config/payment-agents",{headers:{Authorization:`Bearer ${C}`}});o(O.data.agents||[])}catch(C){console.error("Submit error",C),M.error("Failed to save Payment Agent")}},w=g=>{h(g),a({code:g.code,name:g.name,location:g.location,cnic:g.cnic,passportNo:g.passportNo,primaryEmail:g.primaryEmail,secondaryEmail:g.secondaryEmail,primaryPhone:g.primaryPhone,secondaryPhone:g.secondaryPhone})},S=async g=>{if(window.confirm("Are you sure you want to delete this agent?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/payment-agents/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Payment Agent deleted successfully"),o(i.filter(E=>E._id!==g))}catch(C){console.error("Delete error",C),M.error("Failed to delete Payment Agent")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.code.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Payment Agents"}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:u?"Edit Detail":"Add Detail"}),t.jsxs("form",{onSubmit:v,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Code *"}),t.jsx("input",{type:"text",name:"code",value:e.code,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Location *"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CNIC *"}),t.jsx("input",{type:"text",name:"cnic",value:e.cnic,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport No *"}),t.jsx("input",{type:"text",name:"passportNo",value:e.passportNo,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Primary Email"}),t.jsx("input",{type:"email",name:"primaryEmail",value:e.primaryEmail,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Secondary Email"}),t.jsx("input",{type:"email",name:"secondaryEmail",value:e.secondaryEmail,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Primary Phone"}),t.jsx("input",{type:"tel",name:"primaryPhone",value:e.primaryPhone,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Secondary Phone"}),t.jsx("input",{type:"tel",name:"secondaryPhone",value:e.secondaryPhone,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsx("div",{className:"md:col-span-2",children:t.jsxs("div",{...x(),className:"border-2 border-dashed border-gray-300 rounded-md p-6 text-center cursor-pointer hover:border-blue-500 transition-colors",children:[t.jsx("input",{...j()}),t.jsx("p",{className:"text-gray-600",children:"Drag & drop files here or click to select files"}),r.length>0&&t.jsx("div",{className:"mt-2",children:t.jsxs("p",{className:"text-sm text-gray-500",children:[r.length," file(s) selected"]})})]})}),t.jsxs("div",{className:"md:col-span-2 flex gap-4",children:[t.jsxs("button",{type:"submit",className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:[u?"Update":"Add"," Payment Agent"]}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),n([])},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Payment Agent Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[A.length," records"]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Location"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"CNIC"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Primary Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Secondary Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Primary Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Secondary Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.code}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.location}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.cnic}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.primaryEmail}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.secondaryEmail}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.primaryPhone}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.secondaryPhone}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>w(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"9",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length>0?1:0," to"," ",A.length," of ",A.length," entries"]})]})]})]})},aW=()=>{const[e,a]=b.useState({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState([]),[u,h]=b.useState(""),[p,x]=b.useState(null),j=O=>{const{name:D,value:B}=O.target;a({...e,[D]:B})},v=O=>{n(Array.from(O.target.files))},w=O=>{n(r.filter((D,B)=>B!==O))};b.useEffect(()=>{S()},[]);const S=async()=>{try{const O=localStorage.getItem("token"),D=await F.get("/api/config/recruitment-agents/",{headers:{Authorization:`Bearer ${O}`}});m(D.data.agents||[])}catch(O){console.error("Error loading agents:",O),M.error("Failed to load recruitment agents")}},A=async O=>{O.preventDefault(),o(!0);try{const D=localStorage.getItem("token"),B=new FormData;Object.keys(e).forEach(L=>{B.append(L,e[L])}),r.forEach(L=>{B.append("files",L)}),p?(await F.put(`/api/config/recruitment-agents/${p._id}`,B,{headers:{Authorization:`Bearer ${D}`,"Content-Type":"multipart/form-data"}}),M.success("Recruitment Agent updated successfully!")):(await F.post("/api/config/recruitment-agents/",B,{headers:{Authorization:`Bearer ${D}`,"Content-Type":"multipart/form-data"}}),M.success("Recruitment Agent added successfully!")),a({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),n([]),x(null),S()}catch(D){console.error("Error saving recruitment agent:",D),M.error(D.response?.data?.message||"Failed to save recruitment agent")}finally{o(!1)}},g=O=>{x(O),a({code:O.code,name:O.name,location:O.location,cnic:O.cnic,passportNo:O.passportNo,primaryEmail:O.primaryEmail||"",secondaryEmail:O.secondaryEmail||"",primaryPhone:O.primaryPhone||"",secondaryPhone:O.secondaryPhone||""}),n([])},C=async O=>{if(window.confirm("Are you sure you want to delete this recruitment agent?"))try{const D=localStorage.getItem("token");await F.delete(`/api/config/recruitment-agents/${O}`,{headers:{Authorization:`Bearer ${D}`}}),M.success("Recruitment Agent deleted successfully!"),S()}catch(D){console.error("Error deleting agent:",D),M.error("Failed to delete recruitment agent")}},E=c.filter(O=>O.name.toLowerCase().includes(u.toLowerCase())||O.code.toLowerCase().includes(u.toLowerCase())||O.location.toLowerCase().includes(u.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:p?"Edit Recruitment Agent":"Add Recruitment Agent"}),t.jsxs("form",{onSubmit:A,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Agent Code *"}),t.jsx("input",{type:"text",name:"code",value:e.code,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Agent Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Location *"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"CNIC *"}),t.jsx("input",{type:"text",name:"cnic",value:e.cnic,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Passport No *"}),t.jsx("input",{type:"text",name:"passportNo",value:e.passportNo,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Email"}),t.jsx("input",{type:"email",name:"primaryEmail",value:e.primaryEmail,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Email"}),t.jsx("input",{type:"email",name:"secondaryEmail",value:e.secondaryEmail,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Phone"}),t.jsx("input",{type:"tel",name:"primaryPhone",value:e.primaryPhone,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Phone"}),t.jsx("input",{type:"tel",name:"secondaryPhone",value:e.secondaryPhone,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Upload Files"}),t.jsx("input",{type:"file",multiple:!0,onChange:v,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",accept:".pdf,.doc,.docx,.jpg,.jpeg,.png"}),r.length>0&&t.jsx("div",{className:"mt-2 space-y-1",children:r.map((O,D)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-100 px-3 py-2 rounded",children:[t.jsx("span",{className:"text-sm text-gray-700",children:O.name}),t.jsx("button",{type:"button",onClick:()=>w(D),className:"text-red-500 hover:text-red-700",children:t.jsx(ze,{})})]},D))})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:i,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:i?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",p?"Update":"Add"," Recruitment Agent"]})}),p&&t.jsx("button",{type:"button",onClick:()=>{x(null),a({code:"",name:"",location:"",cnic:"",passportNo:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:""}),n([])},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Recruitment Agents"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search agents...",value:u,onChange:O=>h(O.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Location"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"CNIC"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Primary Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Secondary Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Primary Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Secondary Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:E.length>0?E.map(O=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.code}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.location}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.cnic}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.primaryEmail||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.secondaryEmail||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.primaryPhone||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.secondaryPhone||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>g(O),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>C(O._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},O._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"9",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No recruitment agents found."})})})]})}),E.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",E.length," of ",c.length," entries"]})]})]})]})},rW=()=>{const[e,a]=b.useState({code:"",name:"",location:"",airlinesDealsWith:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:"",address:""}),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState([]),[u,h]=b.useState(""),[p,x]=b.useState(null),j=O=>{const{name:D,value:B}=O.target;a({...e,[D]:B})},v=O=>{n(Array.from(O.target.files))},w=O=>{n(r.filter((D,B)=>B!==O))};b.useEffect(()=>{S()},[]);const S=async()=>{try{const O=localStorage.getItem("token"),D=await F.get("/api/config/travel-agents/",{headers:{Authorization:`Bearer ${O}`}});m(D.data.agents||[])}catch(O){console.error("Error loading agents:",O),M.error("Failed to load travel agents")}},A=async O=>{O.preventDefault(),o(!0);try{const D=localStorage.getItem("token"),B=new FormData;Object.keys(e).forEach(L=>{B.append(L,e[L])}),r.forEach(L=>{B.append("files",L)}),p?(await F.put(`/api/config/travel-agents/${p._id}`,B,{headers:{Authorization:`Bearer ${D}`,"Content-Type":"multipart/form-data"}}),M.success("Travel Agent updated successfully!")):(await F.post("/api/config/travel-agents/",B,{headers:{Authorization:`Bearer ${D}`,"Content-Type":"multipart/form-data"}}),M.success("Travel Agent added successfully!")),a({code:"",name:"",location:"",airlinesDealsWith:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:"",address:""}),n([]),x(null),S()}catch(D){console.error("Error saving travel agent:",D),M.error(D.response?.data?.message||"Failed to save travel agent")}finally{o(!1)}},g=O=>{x(O),a({code:O.code,name:O.name,location:O.location,airlinesDealsWith:O.airlinesDealsWith,primaryEmail:O.primaryEmail||"",secondaryEmail:O.secondaryEmail||"",primaryPhone:O.primaryPhone||"",secondaryPhone:O.secondaryPhone||"",address:O.address||""}),n([])},C=async O=>{if(window.confirm("Are you sure you want to delete this travel agent?"))try{const D=localStorage.getItem("token");await F.delete(`/api/config/travel-agents/${O}`,{headers:{Authorization:`Bearer ${D}`}}),M.success("Travel Agent deleted successfully!"),S()}catch(D){console.error("Error deleting agent:",D),M.error("Failed to delete travel agent")}},E=c.filter(O=>O.name.toLowerCase().includes(u.toLowerCase())||O.code.toLowerCase().includes(u.toLowerCase())||O.location.toLowerCase().includes(u.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:p?"Edit Travel Agent":"Add Travel Agent"}),t.jsxs("form",{onSubmit:A,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Agent Code *"}),t.jsx("input",{type:"text",name:"code",value:e.code,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Agent Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Location *"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Airlines Deals With *"}),t.jsx("input",{type:"text",name:"airlinesDealsWith",value:e.airlinesDealsWith,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Email"}),t.jsx("input",{type:"email",name:"primaryEmail",value:e.primaryEmail,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Email"}),t.jsx("input",{type:"email",name:"secondaryEmail",value:e.secondaryEmail,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Primary Phone"}),t.jsx("input",{type:"tel",name:"primaryPhone",value:e.primaryPhone,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Secondary Phone"}),t.jsx("input",{type:"tel",name:"secondaryPhone",value:e.secondaryPhone,onChange:j,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Address"}),t.jsx("textarea",{name:"address",value:e.address,onChange:j,rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Enter address..."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Upload Files"}),t.jsxs("div",{className:"border-2 border-dashed border-gray-300 rounded-md p-6 text-center hover:border-gray-400 transition-colors",children:[t.jsx("input",{type:"file",multiple:!0,onChange:v,className:"hidden",id:"file-upload",accept:".pdf,.doc,.docx,.jpg,.jpeg,.png"}),t.jsx("label",{htmlFor:"file-upload",className:"cursor-pointer",children:t.jsxs("div",{className:"text-gray-500",children:[t.jsx(Ve,{className:"mx-auto mb-2 text-2xl"}),t.jsx("p",{children:"Drag & drop files here or click to browse"})]})})]}),r.length>0&&t.jsx("div",{className:"mt-2 space-y-1",children:r.map((O,D)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-100 px-3 py-2 rounded",children:[t.jsx("span",{className:"text-sm text-gray-700",children:O.name}),t.jsx("button",{type:"button",onClick:()=>w(D),className:"text-red-500 hover:text-red-700",children:t.jsx(ze,{})})]},D))})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:i,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:i?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",p?"Update":"Add"," Travel Agent"]})}),p&&t.jsx("button",{type:"button",onClick:()=>{x(null),a({code:"",name:"",location:"",airlinesDealsWith:"",primaryEmail:"",secondaryEmail:"",primaryPhone:"",secondaryPhone:"",address:""}),n([])},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Travel Agents"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search agents...",value:u,onChange:O=>h(O.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Location"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Airlines Deals With"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:E.length>0?E.map(O=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.code}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.location}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.primaryPhone||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:O.airlinesDealsWith}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>g(O),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>C(O._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},O._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No travel agents found."})})})]})}),E.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",E.length," of ",c.length," entries"]})]})]})]})},nW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/visa-categories/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.categories||[])}catch(g){console.error("Error loading visa categories:",g),M.error("Failed to load visa categories")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/visa-categories/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Visa Category updated successfully!")):(await F.post("/api/config/visa-categories/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Visa Category added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving visa category:",C),M.error(C.response?.data?.message||"Failed to save visa category")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this visa category?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/visa-categories/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Visa Category deleted successfully!"),x()}catch(C){console.error("Error deleting category:",C),M.error("Failed to delete visa category")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/visa-categories/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Visa Category ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Visa Category":"Add Visa Category"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Visa Category *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Category"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Visa Categories"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search categories...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No visa categories found."})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," entries"]})]})]})]})},sW=()=>{const[e,a]=b.useState({name:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/visa-issuing-authorities/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.authorities||[])}catch(g){console.error("Error loading visa issuing authorities:",g),M.error("Failed to load visa issuing authorities")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/visa-issuing-authorities/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Visa Issuing Authority updated successfully!")):(await F.post("/api/config/visa-issuing-authorities/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Visa Issuing Authority added successfully!")),a({name:""}),h(null),x()}catch(C){console.error("Error saving visa issuing authority:",C),M.error(C.response?.data?.message||"Failed to save visa issuing authority")}finally{n(!1)}},v=g=>{h(g),a({name:g.name})},w=async g=>{if(window.confirm("Are you sure you want to delete this visa issuing authority?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/visa-issuing-authorities/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Visa Issuing Authority deleted successfully!"),x()}catch(C){console.error("Error deleting authority:",C),M.error("Failed to delete visa issuing authority")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/visa-issuing-authorities/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Visa Issuing Authority ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Visa Issuing Authority":"Add Visa Issuing Authority"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Visa Issuing Authority *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Authority"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Visa Issuing Authorities"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search authorities...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No visa issuing authorities found."})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," ","entries"]})]})]})]})},lW=()=>{const[e,a]=b.useState({name:"",type:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/verifying-institutions/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.institutions||[])}catch(g){console.error("Error loading verifying institutions:",g),M.error("Failed to load verifying institutions")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/verifying-institutions/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Verifying Institution updated successfully!")):(await F.post("/api/config/verifying-institutions/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Verifying Institution added successfully!")),a({name:"",type:""}),h(null),x()}catch(C){console.error("Error saving verifying institution:",C),M.error(C.response?.data?.message||"Failed to save verifying institution")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,type:g.type})},w=async g=>{if(window.confirm("Are you sure you want to delete this verifying institution?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/verifying-institutions/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Verifying Institution deleted successfully!"),x()}catch(C){console.error("Error deleting institution:",C),M.error("Failed to delete verifying institution")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/verifying-institutions/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Verifying Institution ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.type.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Verifying Institution":"Add Verifying Institution"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Institution Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Type *"}),t.jsxs("select",{name:"type",value:e.type,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Type"}),t.jsx("option",{value:"Degree",children:"Degree"}),t.jsx("option",{value:"Diploma",children:"Diploma"})]})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," ","Institution"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",type:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Verifying Institutions"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search institutions...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.type}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No verifying institutions found."})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," ","entries"]})]})]})]})},iW=()=>{const[e,a]=b.useState({name:"",email:"",contactPerson:"",phone:"",location:"",address:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/test-centers/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.testCenters||[])}catch(g){console.error("Error loading test centers:",g),M.error("Failed to load test centers")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/test-centers/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Test Center updated successfully!")):(await F.post("/api/config/test-centers/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Test Center added successfully!")),a({name:"",email:"",contactPerson:"",phone:"",location:"",address:""}),h(null),x()}catch(C){console.error("Error saving test center:",C),M.error(C.response?.data?.message||"Failed to save test center")}finally{n(!1)}},v=g=>{a({name:g.name,email:g.email,contactPerson:g.contactPerson,phone:g.phone,location:g.location,address:g.address}),h(g)},w=async g=>{if(window.confirm("Are you sure you want to delete this test center?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/test-centers/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Test Center deleted successfully!"),x()}catch(C){console.error("Error deleting test center:",C),M.error("Failed to delete test center")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/test-centers/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Test Center ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling test center status:",E),M.error("Failed to update test center status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Test Center"}),t.jsxs("div",{className:"mb-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),t.jsx("input",{type:"email",name:"email",value:e.email,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Contact Person"}),t.jsx("input",{type:"text",name:"contactPerson",value:e.contactPerson,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Phone"}),t.jsx("input",{type:"text",name:"phone",value:e.phone,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Location"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Address *"}),t.jsx("textarea",{name:"address",value:e.address,onChange:p,rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("button",{type:"submit",disabled:r,className:"bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50",children:r?"Saving...":u?"Update":"Add"}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",email:"",contactPerson:"",phone:"",location:"",address:""})},className:"ml-4 bg-gray-600 text-white px-6 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:"Cancel"})]})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Test Centre Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[A.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:g=>m(g.target.value),className:"px-3 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search by name..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Location"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Address"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-center",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.email}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.contactPerson}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.phone}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.location}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.address}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 text-center",children:t.jsxs("div",{className:"flex justify-center space-x-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," ","entries"]})]})]})})]})},oW=()=>{const[e,a]=b.useState({city:"",name:"",phoneNo:"",contactPerson:"",fax:"",email:"",location:"",address:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/medical-centers/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.medicalCenters||[])}catch(g){console.error("Error loading medical centers:",g),M.error("Failed to load medical centers")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/medical-centers/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Medical Center updated successfully!")):(await F.post("/api/config/medical-centers/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Medical Center added successfully!")),a({city:"",name:"",phoneNo:"",contactPerson:"",fax:"",email:"",location:"",address:""}),h(null),x()}catch(C){console.error("Error saving medical center:",C),M.error(C.response?.data?.message||"Failed to save medical center")}finally{n(!1)}},v=g=>{a({city:g.city,name:g.name,phoneNo:g.phoneNo,contactPerson:g.contactPerson,fax:g.fax,email:g.email,location:g.location,address:g.address}),h(g)},w=async g=>{if(window.confirm("Are you sure you want to delete this medical center?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/medical-centers/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Medical Center deleted successfully!"),x()}catch(C){console.error("Error deleting medical center:",C),M.error("Failed to delete medical center")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/medical-centers/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Medical Center ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling medical center status:",E),M.error("Failed to update medical center status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Medical Center"}),t.jsxs("div",{className:"mb-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"City *"}),t.jsx("input",{type:"text",name:"city",value:e.city,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Phone No *"}),t.jsx("input",{type:"text",name:"phoneNo",value:e.phoneNo,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Contact Person"}),t.jsx("input",{type:"text",name:"contactPerson",value:e.contactPerson,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Fax"}),t.jsx("input",{type:"text",name:"fax",value:e.fax,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),t.jsx("input",{type:"email",name:"email",value:e.email,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Location"}),t.jsx("input",{type:"text",name:"location",value:e.location,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Address"}),t.jsx("textarea",{name:"address",value:e.address,onChange:p,rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("button",{type:"submit",disabled:r,className:"bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50",children:r?"Saving...":u?"Update":"Add"}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({city:"",name:"",phoneNo:"",contactPerson:"",fax:"",email:"",location:"",address:""})},className:"ml-4 bg-gray-600 text-white px-6 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:"Cancel"})]})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Medical Center Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[A.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:g=>m(g.target.value),className:"px-3 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search by name..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Fax"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Phone"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-center",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.fax}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.email}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.phoneNo}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 text-center",children:t.jsxs("div",{className:"flex justify-center space-x-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of"," ",i.length," entries"]})]})]})})]})},cW=()=>{const[e,a]=b.useState({testType:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/test-types/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.testTypes||[])}catch(g){console.error("Error loading test types:",g),M.error("Failed to load test types")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/test-types/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Test Type updated successfully!")):(await F.post("/api/config/test-types/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Test Type added successfully!")),a({testType:""}),h(null),x()}catch(C){console.error("Error saving test type:",C),M.error(C.response?.data?.message||"Failed to save test type")}finally{n(!1)}},v=g=>{a({testType:g.testType}),h(g)},w=async g=>{if(window.confirm("Are you sure you want to delete this test type?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/test-types/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Test Type deleted successfully!"),x()}catch(C){console.error("Error deleting test type:",C),M.error("Failed to delete test type")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/test-types/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Test Type ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling test type status:",E),M.error("Failed to update test type status")}},A=i.filter(g=>g.testType.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Test Types"}),t.jsxs("div",{className:"mb-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Test Type *"}),t.jsx("input",{type:"text",name:"testType",value:e.testType,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("button",{type:"submit",disabled:r,className:"bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50",children:r?"Saving...":u?"Update":"Add"}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({testType:""})},className:"ml-4 bg-gray-600 text-white px-6 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:"Cancel"})]})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Test Types Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[A.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:g=>m(g.target.value),className:"px-3 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search by test type..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Test Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-center",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.testType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 text-center",children:t.jsxs("div",{className:"flex justify-center space-x-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," entries"]})]})]})})]})},dW=()=>{const[e,a]=b.useState({ageRange:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/age-ranges/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.ageRanges||[])}catch(g){console.error("Error loading age ranges:",g),M.error("Failed to load age ranges")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/age-ranges/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Age Range updated successfully!")):(await F.post("/api/config/age-ranges/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Age Range added successfully!")),a({ageRange:""}),h(null),x()}catch(C){console.error("Error saving age range:",C),M.error(C.response?.data?.message||"Failed to save age range")}finally{n(!1)}},v=g=>{a({ageRange:g.ageRange}),h(g)},w=async g=>{if(window.confirm("Are you sure you want to delete this age range?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/age-ranges/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Age Range deleted successfully!"),x()}catch(C){console.error("Error deleting age range:",C),M.error("Failed to delete age range")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/age-ranges/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Age Range ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling age range status:",E),M.error("Failed to update age range status")}},A=i.filter(g=>g.ageRange.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto py-6 px-4",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Manage Age Ranges"}),t.jsxs("div",{className:"mb-8",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Age Range *"}),t.jsx("input",{type:"text",name:"ageRange",value:e.ageRange,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("button",{type:"submit",disabled:r,className:"bg-blue-600 text-white px-6 py-2 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 disabled:opacity-50",children:r?"Saving...":u?"Update":"Add"}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({ageRange:""})},className:"ml-4 bg-gray-600 text-white px-6 py-2 rounded-md hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-gray-500",children:"Cancel"})]})]})]}),t.jsxs("div",{children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Age Ranges Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[A.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:g=>m(g.target.value),className:"px-3 py-1 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Search by age range..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Age Range"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-center",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.ageRange}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 text-center",children:t.jsxs("div",{className:"flex justify-center space-x-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," entries"]})]})]})})]})},uW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(""),[c,m]=b.useState(!1),[u,h]=b.useState(null),[p,x]=b.useState({salaryRange:""}),[j,v]=b.useState(!1),w="http://213.199.41.219:3001/api/config/salary-ranges",S=async()=>{try{const D=localStorage.getItem("token"),B=await F.get(w,{headers:{Authorization:`Bearer ${D}`}});a(B.data.salaryRanges),n(B.data.salaryRanges)}catch{M.error("Failed to fetch salary ranges")}};b.useEffect(()=>{S()},[]),b.useEffect(()=>{const D=e.filter(B=>B.salaryRange.toLowerCase().includes(i.toLowerCase()));n(D)},[i,e]);const A=async D=>{D.preventDefault(),v(!0);try{const B=localStorage.getItem("token");u?(await F.put(`${w}/${u._id}`,p,{headers:{Authorization:`Bearer ${B}`}}),M.success("Salary Range updated successfully")):(await F.post(w,p,{headers:{Authorization:`Bearer ${B}`}}),M.success("Salary Range created successfully")),x({salaryRange:""}),m(!1),h(null),S()}catch(B){M.error(B.response?.data?.message||"Failed to save salary range")}finally{v(!1)}},g=D=>{h(D),x({salaryRange:D.salaryRange}),m(!0)},C=async D=>{if(window.confirm("Are you sure you want to delete this salary range?"))try{const B=localStorage.getItem("token");await F.delete(`${w}/${D}`,{headers:{Authorization:`Bearer ${B}`}}),M.success("Salary Range deleted successfully"),S()}catch{M.error("Failed to delete salary range")}},E=async D=>{try{const B=localStorage.getItem("token");await F.patch(`${w}/${D}/toggle-status`,{},{headers:{Authorization:`Bearer ${B}`}}),M.success("Status updated successfully"),S()}catch{M.error("Failed to update status")}},O=()=>{x({salaryRange:""}),h(null),m(!1)};return t.jsx("div",{className:"p-6 bg-gray-50 min-h-screen",children:t.jsx("div",{className:"max-w-7xl mx-auto",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Salary Ranges"}),t.jsxs("button",{onClick:()=>m(!0),className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700 flex items-center gap-2",children:[t.jsx(F3,{className:"text-lg"}),"Add Salary Range"]})]}),c&&t.jsxs("div",{className:"mb-6 p-4 border rounded-lg bg-gray-50",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:u?"Edit Salary Range":"Add Salary Range"}),t.jsxs("form",{onSubmit:A,className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Salary Range *"}),t.jsx("input",{type:"text",value:p.salaryRange,onChange:D=>x({...p,salaryRange:D.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"submit",disabled:j,className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700 disabled:opacity-50",children:j?"Saving...":u?"Update":"Create"}),t.jsx("button",{type:"button",onClick:O,className:"bg-gray-500 text-white px-4 py-2 rounded-md hover:bg-gray-600",children:"Cancel"})]})]})]}),t.jsx("div",{className:"mb-4 flex items-center gap-4",children:t.jsxs("div",{className:"relative flex-1 max-w-md",children:[t.jsx(I3,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 text-lg"}),t.jsx("input",{type:"text",placeholder:"Search salary ranges...",value:i,onChange:D=>o(D.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500"})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-200 rounded-lg",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Salary Range"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created By"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created At"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"px-6 py-4 text-center text-gray-500",children:"No salary ranges found"})}):r.map(D=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:D.salaryRange}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${D.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:D.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:D.createdBy?.username||"N/A"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:new Date(D.createdAt).toLocaleDateString()}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{onClick:()=>g(D),className:"text-blue-600 hover:text-blue-900",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>E(D._id),className:`${D.isActive?"text-green-600":"text-gray-600"} hover:text-gray-900`,title:D.isActive?"Deactivate":"Activate",children:D.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>C(D._id),className:"text-red-600 hover:text-red-900",title:"Delete",children:t.jsx(ze,{})})]})})]},D._id))})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-500",children:["Showing ",r.length," of ",e.length," ","entries"]})]})})})},mW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(""),[c,m]=b.useState(!1),[u,h]=b.useState(null),[p,x]=b.useState({experienceRange:""}),[j,v]=b.useState(!1),w="http://213.199.41.219:3001/api/config/experience-ranges",S=async()=>{try{const D=localStorage.getItem("token"),B=await F.get(w,{headers:{Authorization:`Bearer ${D}`}});a(B.data.experienceRanges),n(B.data.experienceRanges)}catch{M.error("Failed to fetch experience ranges")}};b.useEffect(()=>{S()},[]),b.useEffect(()=>{const D=e.filter(B=>B.experienceRange.toLowerCase().includes(i.toLowerCase()));n(D)},[i,e]);const A=async D=>{D.preventDefault(),v(!0);try{const B=localStorage.getItem("token");u?(await F.put(`${w}/${u._id}`,p,{headers:{Authorization:`Bearer ${B}`}}),M.success("Experience Range updated successfully")):(await F.post(w,p,{headers:{Authorization:`Bearer ${B}`}}),M.success("Experience Range created successfully")),x({experienceRange:""}),m(!1),h(null),S()}catch(B){M.error(B.response?.data?.message||"Failed to save experience range")}finally{v(!1)}},g=D=>{h(D),x({experienceRange:D.experienceRange}),m(!0)},C=async D=>{if(window.confirm("Are you sure you want to delete this experience range?"))try{const B=localStorage.getItem("token");await F.delete(`${w}/${D}`,{headers:{Authorization:`Bearer ${B}`}}),M.success("Experience Range deleted successfully"),S()}catch{M.error("Failed to delete experience range")}},E=async D=>{try{const B=localStorage.getItem("token");await F.patch(`${w}/${D}/toggle-status`,{},{headers:{Authorization:`Bearer ${B}`}}),M.success("Status updated successfully"),S()}catch{M.error("Failed to update status")}},O=()=>{x({experienceRange:""}),h(null),m(!1)};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Experience Ranges"}),t.jsxs("button",{onClick:()=>m(!0),className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700 flex items-center gap-2",children:[t.jsx(F3,{className:"text-lg"}),"Add Experience Range"]})]}),c&&t.jsxs("div",{className:"mb-6 p-4 border rounded-lg bg-gray-50",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:u?"Edit Experience Range":"Add Experience Range"}),t.jsxs("form",{onSubmit:A,className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Experience Range *"}),t.jsx("input",{type:"text",value:p.experienceRange,onChange:D=>x({...p,experienceRange:D.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{type:"submit",disabled:j,className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700 disabled:opacity-50",children:j?"Saving...":u?"Update":"Create"}),t.jsx("button",{type:"button",onClick:O,className:"bg-gray-500 text-white px-4 py-2 rounded-md hover:bg-gray-600",children:"Cancel"})]})]})]}),t.jsx("div",{className:"mb-4 flex items-center gap-4",children:t.jsxs("div",{className:"relative flex-1 max-w-md",children:[t.jsx(I3,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 text-lg"}),t.jsx("input",{type:"text",placeholder:"Search experience ranges...",value:i,onChange:D=>o(D.target.value),className:"w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500"})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-200 rounded-lg",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Experience Range"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created By"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created At"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"px-6 py-4 text-center text-gray-500",children:"No experience ranges found"})}):r.map(D=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:D.experienceRange}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${D.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:D.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:D.createdBy?.username||"N/A"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:new Date(D.createdAt).toLocaleDateString()}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("button",{onClick:()=>g(D),className:"text-blue-600 hover:text-blue-900",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>E(D._id),className:`${D.isActive?"text-green-600":"text-gray-600"} hover:text-gray-900`,title:D.isActive?"Deactivate":"Activate",children:D.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>C(D._id),className:"text-red-600 hover:text-red-900",title:"Delete",children:t.jsx(ze,{})})]})})]},D._id))})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-500",children:["Showing ",r.length," of"," ",e.length," entries"]})]})})]})},fW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/airlines/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.airlines||[])}catch(g){console.error("Error loading airlines:",g),M.error("Failed to load airlines")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/airlines/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Airline updated successfully!")):(await F.post("/api/config/airlines/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Airline added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving airline:",C),M.error(C.response?.data?.message||"Failed to save airline")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this airline?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/airlines/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Airline deleted successfully!"),x()}catch(C){console.error("Error deleting airline:",C),M.error("Failed to delete airline")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/airlines/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Airline ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Airline":"Add Airline"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Airline Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Airline"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Airlines"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search airlines...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No airlines found."})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," entries"]})]})]})]})},pW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/visa-professions/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.professions||[])}catch(g){console.error("Error loading visa professions:",g),M.error("Failed to load visa professions")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/visa-professions/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Visa Profession updated successfully!")):(await F.post("/api/config/visa-professions/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Visa Profession added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving visa profession:",C),M.error(C.response?.data?.message||"Failed to save visa profession")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this visa profession?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/visa-professions/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Visa Profession deleted successfully!"),x()}catch(C){console.error("Error deleting profession:",C),M.error("Failed to delete visa profession")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/visa-professions/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Visa Profession ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Visa Profession":"Add Visa Profession"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Profession"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Visa Profession Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search professions...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," ","entries"]})]})]})]})},hW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(""),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({name:"",description:""}),[p,x]=b.useState(!1),j="http://213.199.41.219:3001/api/config/working-sectors";b.useEffect(()=>{v()},[]);const v=async()=>{try{const E=localStorage.getItem("token"),O=await F.get(j,{headers:{Authorization:`Bearer ${E}`}});a(O.data.sectors)}catch(E){console.error("Error fetching sectors:",E),We.error("Failed to fetch working sectors")}},w=async E=>{E.preventDefault(),x(!0);try{const D={headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}};c?(await F.put(`${j}/${c._id}`,u,D),We.success("Working Sector updated successfully")):(await F.post(j,u,D),We.success("Working Sector created successfully")),v(),o(!1),m(null),h({name:"",description:""})}catch(O){console.error("Error saving sector:",O),We.error(O.response?.data?.message||"Failed to save working sector")}finally{x(!1)}},S=E=>{m(E),h({name:E.name,description:E.description||""}),o(!0)},A=async E=>{if(window.confirm("Are you sure you want to delete this working sector?"))try{const O=localStorage.getItem("token");await F.delete(`${j}/${E}`,{headers:{Authorization:`Bearer ${O}`}}),We.success("Working Sector deleted successfully"),v()}catch(O){console.error("Error deleting sector:",O),We.error("Failed to delete working sector")}},g=async E=>{try{const O=localStorage.getItem("token");await F.patch(`${j}/${E}/toggle-status`,{},{headers:{Authorization:`Bearer ${O}`}}),We.success("Status updated successfully"),v()}catch(O){console.error("Error toggling status:",O),We.error("Failed to update status")}},C=e.filter(E=>E.name.toLowerCase().includes(r.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Working Sectors"}),t.jsx("button",{onClick:()=>{m(null),h({name:"",description:""}),o(!0)},className:"bg-emerald-600 text-white px-4 py-2 rounded-lg hover:bg-emerald-700 transition-colors",children:"Add Working Sector"})]}),t.jsx("div",{className:"mb-4",children:t.jsx("input",{type:"text",placeholder:"Search working sectors...",value:r,onChange:E=>n(E.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-emerald-500 focus:border-transparent"})}),t.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Description"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:C.map(E=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:E.name}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:E.description||"-"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${E.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:E.isActive?"Active":"Inactive"})}),t.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2",children:[t.jsx("button",{onClick:()=>S(E),className:"text-blue-600 hover:text-blue-900",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>g(E._id),className:`${E.isActive?"text-green-600 hover:text-green-900":"text-gray-600 hover:text-gray-900"}`,children:E.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>A(E._id),className:"text-red-600 hover:text-red-900",children:t.jsx(ze,{})})]})]},E._id))})]})})}),i&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Working Sector":"Add Working Sector"}),t.jsxs("form",{onSubmit:w,children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Working Sector Name *"}),t.jsx("input",{type:"text",value:u.name,onChange:E=>h({...u,name:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("textarea",{value:u.description,onChange:E=>h({...u,description:E.target.value}),rows:3,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500"})]}),t.jsxs("div",{className:"flex justify-end space-x-3",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"px-4 py-2 text-gray-600 border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),t.jsx("button",{type:"submit",disabled:p,className:"px-4 py-2 bg-emerald-600 text-white rounded-md hover:bg-emerald-700 disabled:opacity-50",children:p?"Saving...":c?"Update":"Create"})]})]})]})})]})]})},xW=()=>{const[e,a]=b.useState({name:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/cities/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.cities||[])}catch(g){console.error("Error loading cities:",g),M.error("Failed to load cities")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/cities/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("City updated successfully!")):(await F.post("/api/config/cities/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("City added successfully!")),a({name:""}),h(null),x()}catch(C){console.error("Error saving city:",C),M.error(C.response?.data?.message||"Failed to save city")}finally{n(!1)}},v=g=>{h(g),a({name:g.name})},w=async g=>{if(window.confirm("Are you sure you want to delete this city?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/cities/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("City deleted successfully!"),x()}catch(C){console.error("Error deleting city:",C),M.error("Failed to delete city")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/cities/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`City ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit City":"Add City"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"City Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," City"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Cities Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search cities...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"City Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No cities found."})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," entries"]})]})]})]})},gW=()=>{const[e,a]=b.useState({name:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/education-levels/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.educationLevels||[])}catch(g){console.error("Error loading education levels:",g),M.error("Failed to load education levels")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/education-levels/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Education Level updated successfully!")):(await F.post("/api/config/education-levels/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Education Level added successfully!")),a({name:""}),h(null),x()}catch(C){console.error("Error saving education level:",C),M.error(C.response?.data?.message||"Failed to save education level")}finally{n(!1)}},v=g=>{h(g),a({name:g.name})},w=async g=>{if(window.confirm("Are you sure you want to delete this education level?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/education-levels/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Education Level deleted successfully!"),x()}catch(C){console.error("Error deleting education level:",C),M.error("Failed to delete education level")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/education-levels/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Education Level ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Education Level":"Add Education Level"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Education Level Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," ","Education Level"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Education Levels Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search education levels...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Education Level Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No education levels found."})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of"," ",i.length," entries"]})]})]})]})},bW=()=>{const[e,a]=b.useState({name:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/career-levels/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.careerLevels||[])}catch(g){console.error("Error loading career levels:",g),M.error("Failed to load career levels")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/career-levels/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Career Level updated successfully!")):(await F.post("/api/config/career-levels/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Career Level added successfully!")),a({name:""}),h(null),x()}catch(C){console.error("Error saving career level:",C),M.error(C.response?.data?.message||"Failed to save career level")}finally{n(!1)}},v=g=>{h(g),a({name:g.name})},w=async g=>{if(window.confirm("Are you sure you want to delete this career level?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/career-levels/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Career Level deleted successfully!"),x()}catch(C){console.error("Error deleting career level:",C),M.error("Failed to delete career level")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/career-levels/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Career Level ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Career Level":"Add Career Level"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Career Level Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Career Level"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Career Levels Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search career levels...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Career Level Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No career levels found."})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," ","entries"]})]})]})]})},yW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(""),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({name:""}),[p,x]=b.useState(!1),j="http://213.199.41.219:3001/api/skills";b.useEffect(()=>{v()},[]);const v=async()=>{try{const E=localStorage.getItem("token"),O=await F.get(j,{headers:{Authorization:`Bearer ${E}`}});a(O.data.skills)}catch(E){console.error("Error fetching skills:",E),We.error("Failed to fetch skills")}},w=async E=>{E.preventDefault(),x(!0);try{const D={headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}};c?(await F.put(`${j}/${c._id}`,u,D),We.success("Skill updated successfully")):(await F.post(j,u,D),We.success("Skill created successfully")),v(),o(!1),m(null),h({name:""})}catch(O){console.error("Error saving skill:",O),We.error(O.response?.data?.message||"Failed to save skill")}finally{x(!1)}},S=E=>{m(E),h({name:E.name}),o(!0)},A=async E=>{if(window.confirm("Are you sure you want to delete this skill?"))try{const O=localStorage.getItem("token");await F.delete(`${j}/${E}`,{headers:{Authorization:`Bearer ${O}`}}),We.success("Skill deleted successfully"),v()}catch(O){console.error("Error deleting skill:",O),We.error("Failed to delete skill")}},g=async E=>{try{const O=localStorage.getItem("token");await F.patch(`${j}/${E}/toggle-status`,{},{headers:{Authorization:`Bearer ${O}`}}),We.success("Status updated successfully"),v()}catch(O){console.error("Error toggling status:",O),We.error("Failed to update status")}},C=e.filter(E=>E.name.toLowerCase().includes(r.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Skills"}),t.jsx("button",{onClick:()=>{m(null),h({name:""}),o(!0)},className:"bg-emerald-600 text-white px-4 py-2 rounded-lg hover:bg-emerald-700 transition-colors",children:"Add Skill"})]}),t.jsx("div",{className:"mb-4",children:t.jsx("input",{type:"text",placeholder:"Search skills...",value:r,onChange:E=>n(E.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-emerald-500 focus:border-transparent"})}),t.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:C.map(E=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:E.name}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:t.jsx("span",{className:`inline-flex px-2 py-1 text-xs font-semibold rounded-full ${E.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:E.isActive?"Active":"Inactive"})}),t.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium space-x-2",children:[t.jsx("button",{onClick:()=>S(E),className:"text-blue-600 hover:text-blue-900",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>g(E._id),className:`${E.isActive?"text-green-600 hover:text-green-900":"text-gray-600 hover:text-gray-900"}`,children:E.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>A(E._id),className:"text-red-600 hover:text-red-900",children:t.jsx(ze,{})})]})]},E._id))})]})})}),i&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Skill":"Add Skill"}),t.jsxs("form",{onSubmit:w,children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Skill Name *"}),t.jsx("input",{type:"text",value:u.name,onChange:E=>h({...u,name:E.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{className:"flex justify-end space-x-3",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"px-4 py-2 text-gray-600 border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),t.jsx("button",{type:"submit",disabled:p,className:"px-4 py-2 bg-emerald-600 text-white rounded-md hover:bg-emerald-700 disabled:opacity-50",children:p?"Saving...":c?"Update":"Create"})]})]})]})})]})]})},pu={actions:{editTestInterview:!1,editMedicalTest:!1,editENumber:!1,editSubmission:!1,editVisaStamped:!1,editNadra:!1,editProtector:!1,editFlight:!1,editDeparted:!1,goBack:!1,editJobPrices:!1},configuration:{configuration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addOptions:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},ageRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},salaryRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},experienceRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},airlines:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaProfession:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},sectorsIndustries:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},skills:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cities:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},educationLevel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},careerLevel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addPaymentAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addRecruitmentAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTravelAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},educationCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},subCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},workingCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaIssuingAuthorities:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},verifyingInstitutions:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTestCenter:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addMedicalCenters:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTestTypes:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},candidateManagement:{candidateManagement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},initialRegistration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateFinalRegistration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},applyJob:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},shortlisting:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},shortlistedCandidates:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},onlineApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerCm:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateLedgerExpenses:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateLedgerSummary:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateAgentLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},protectorPrintCandidates:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateFilterReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},traveledCandidatesReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateApplicationStatusReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},freezeApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},completedApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},interviewSchedule:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkApplicationMaker:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkOfferSender:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkFlightCancel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},accountingFinance:{accountingFinance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},chartOfAccounts:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},managePayments:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},travelAgentPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateJv:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},expensesAgainstCandidate:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},openingBalance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerAf:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},chartOfAccountBalances:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashBook:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankBook:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},generalLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},trialBalance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},accountBalances:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},incomeStatement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},balanceSheet:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashFlowStatement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},equityReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jv:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},adminArea:{adminArea:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},dashboard:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},manageUsers:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},manageRole:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerAn:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},userLogReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},applicationProcess:{applicationProcess:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},viewDetails:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},employerManagement:{employerManagement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerSetup:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerPlans:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobSetup:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerEm:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobGroupingPrints:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},statusJobsReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},securityFeeRefundPrints:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},travelAgentLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}}},vW=({users:e,onEdit:a,onDelete:r,onToggleStatus:n})=>t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border","aria-label":"Users table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Username"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"First Name"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Last Name"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Email"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(i=>t.jsxs("tr",{"aria-label":`User ${i.username}`,children:[t.jsx("td",{className:"py-2 px-4 border",children:i.username}),t.jsx("td",{className:"py-2 px-4 border",children:i.firstName||"-"}),t.jsx("td",{className:"py-2 px-4 border",children:i.lastName||"-"}),t.jsx("td",{className:"py-2 px-4 border",children:i.email}),t.jsxs("td",{className:"py-2 px-4 border",children:[t.jsx("button",{onClick:()=>a(i),className:"bg-blue-500 text-white px-2 py-1 rounded mr-2","aria-label":`Edit user ${i.username}`,children:"Edit"}),t.jsx("button",{onClick:()=>r(i._id),className:"bg-red-500 text-white px-2 py-1 rounded mr-2","aria-label":`Delete user ${i.username}`,children:"Delete"}),t.jsx("button",{onClick:()=>n(i._id,i.isActive),className:`px-2 py-1 rounded ${i.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,"aria-label":`${i.isActive?"Deactivate":"Activate"} user ${i.username}`,children:i.isActive?"Active":"Inactive"})]})]},i._id))})]})}),jW=({form:e,setForm:a,editing:r,onSubmit:n,onCancel:i,permissions:o,setPermissions:c})=>{const m={actions:{editTestInterview:"User can edit Test Interview",editMedicalTest:"User can edit Medical Test",editENumber:"User can edit E Number",editSubmission:"User can edit Submission",editVisaStamped:"User can edit Visa Stamped",editNadra:"User can edit Nadra",editProtector:"User can edit Protector",editFlight:"User can edit Flight",editDeparted:"User can edit Departed",goBack:"User can go back",editJobPrices:"User can edit Job prices"},configuration:{configuration:"Configuration",addOptions:"Add Options",ageRanges:"Age Ranges",salaryRanges:"Salary Ranges",experienceRanges:"Experience Ranges",airlines:"Airlines",visaProfession:"Visa Profession",sectorsIndustries:"Sectors / Industries",skills:"Skills",cities:"Cities",educationLevel:"Education Level",careerLevel:"Career Level",addPaymentAgent:"Add Payment Agent",addRecruitmentAgent:"Add Recruitment Agent",addTravelAgent:"Add Travel Agent",visaCategories:"Visa Categories",educationCategories:"Education Categories",jobCategories:"Job Categories",subCategories:"Sub Categories",workingCategories:"Working Categories",visaIssuingAuthorities:"Visa Issuing Authorities",verifyingInstitutions:"Verifying Institutions",addTestCenter:"Add Test Center",addMedicalCenters:"Add Medical Centers",addTestTypes:"Add Test Types"},candidateManagement:{candidateManagement:"Candidate Management",initialRegistration:"Initial Registration",candidateFinalRegistration:"Candidate Final Registration",applyJob:"Apply Job",shortlisting:"Shortlisting",shortlistedCandidates:"Shortlisted Candidates",onlineApplications:"Online Applications",jobApplications:"Job Applications",reportManagerCm:"Report Manager (CM)",candidateLedgerExpenses:"Candidate Ledger with Expenses",candidateLedgerSummary:"Candidate Ledger Summary",candidateAgentLedger:"Candidate Agent Ledger",protectorPrintCandidates:"Protector Print for Candidates",candidateFilterReport:"Candidate Filter Report",traveledCandidatesReport:"Traveled Candidates Report",candidateApplicationStatusReport:"Candidate Application Status Report",freezeApplications:"Freeze Applications",completedApplications:"Completed Applications",interviewSchedule:"Interview Schedule",bulkApplicationMaker:"Bulk Application Maker",bulkOfferSender:"Bulk Offer Sender",bulkFlightCancel:"Bulk flight Cancel"},accountingFinance:{accountingFinance:"Accounting & Finance",chartOfAccounts:"Chart of Accounts",managePayments:"Manage Payments",jobPayment:"Job Payment",travelAgentPayment:"Travel Agent Payment",candidateReceipt:"Candidate Receipt",candidateJv:"Candidate JV",expensesAgainstCandidate:"Expenses Against Candidate",openingBalance:"Opening Balance",cashReceipt:"Cash Receipt",cashPayment:"Cash Payment",reportManagerAf:"Report Manager (AF)",chartOfAccountBalances:"Chart of Account with Balances",cashBook:"Cash Book",bankBook:"Bank Book",generalLedger:"General Ledger",trialBalance:"Trial Balance",accountBalances:"Account Balances",incomeStatement:"Income Statement",balanceSheet:"Balance Sheet",cashFlowStatement:"Cash Flow Statement",equityReport:"Equity Report",bankReceipt:"Bank Receipt",bankPayment:"Bank Payment",jv:"JV"},adminArea:{adminArea:"Admin Area",dashboard:"Dashboard",manageUsers:"Manage Users",manageRole:"Manage Role",reportManagerAn:"Report Manager (AN)",userLogReport:"User Log Report"},applicationProcess:{applicationProcess:"Application Process",viewDetails:"View Details"},employerManagement:{employerManagement:"Employer Management",employerSetup:"Employer Setup",employerPlans:"Employer Plans",jobSetup:"Job Setup",reportManagerEm:"Report Manager (EM)",employerLedger:"Employer Ledger",jobGroupingPrints:"Job Grouping for Prints",statusJobsReport:"Status of Jobs Report",securityFeeRefundPrints:"Security Fee Refund Prints",travelAgentLedger:"Travel Agent Ledger"}};return t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium mb-2",children:r?"Edit User":"Add User"}),t.jsxs("form",{onSubmit:n,className:"space-y-4",children:[t.jsxs("label",{htmlFor:"username",className:"block mb-1",children:["Username",t.jsx("input",{id:"username",type:"text",placeholder:"Username",value:e.username,onChange:u=>a({...e,username:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),t.jsxs("label",{htmlFor:"email",className:"block mb-1",children:["Email",t.jsx("input",{id:"email",type:"email",placeholder:"Email",value:e.email,onChange:u=>a({...e,email:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),!r&&t.jsxs("label",{htmlFor:"password",className:"block mb-1",children:["Password",t.jsx("input",{id:"password",type:"password",placeholder:"Password",value:e.password,onChange:u=>a({...e,password:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),t.jsxs("label",{htmlFor:"userType",className:"block mb-1",children:["User Type",t.jsxs("select",{id:"userType",value:e.userType,onChange:u=>a({...e,userType:u.target.value}),className:"w-full p-2 border rounded",children:[t.jsx("option",{value:"admin",children:"Admin"}),t.jsx("option",{value:"hr",children:"HR"}),t.jsx("option",{value:"accountant",children:"Accountant"}),t.jsx("option",{value:"superadmin",children:"Super Admin"})]})]}),t.jsxs("label",{htmlFor:"role",className:"block mb-1",children:["Role *",t.jsx("input",{id:"role",type:"text",placeholder:"Role",value:e.role,onChange:u=>a({...e,role:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),t.jsxs("label",{htmlFor:"firstName",className:"block mb-1",children:["First Name",t.jsx("input",{id:"firstName",type:"text",placeholder:"First Name",value:e.firstName,onChange:u=>a({...e,firstName:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"lastName",className:"block mb-1",children:["Last Name",t.jsx("input",{id:"lastName",type:"text",placeholder:"Last Name",value:e.lastName,onChange:u=>a({...e,lastName:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"fatherName",className:"block mb-1",children:["Father Name",t.jsx("input",{id:"fatherName",type:"text",placeholder:"Father Name",value:e.fatherName,onChange:u=>a({...e,fatherName:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"contactNo",className:"block mb-1",children:["Contact No",t.jsx("input",{id:"contactNo",type:"text",placeholder:"Contact No.",value:e.contactNo,onChange:u=>a({...e,contactNo:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"cnic",className:"block mb-1",children:["CNIC",t.jsx("input",{id:"cnic",type:"text",placeholder:"CNIC",value:e.cnic,onChange:u=>a({...e,cnic:u.target.value}),className:"w-full p-2 border rounded"})]}),t.jsxs("label",{htmlFor:"isActive",className:"block mb-1",children:[t.jsx("input",{id:"isActive",type:"checkbox",checked:e.isActive,onChange:u=>a({...e,isActive:u.target.checked}),className:"mr-2"}),"Admin Active"]}),r&&t.jsxs("div",{className:"border p-4 rounded",children:[t.jsx("h4",{className:"font-medium mb-2",children:"Permissions"}),t.jsxs("div",{className:"mb-4",children:[t.jsx("h5",{className:"font-semibold",children:"Actions"}),Object.keys(o.actions).map(u=>t.jsxs("label",{className:"block",children:[t.jsx("input",{type:"checkbox",checked:o.actions[u],onChange:h=>c({...o,actions:{...o.actions,[u]:h.target.checked}})})," ",m.actions[u]]},u))]}),Object.keys(o).filter(u=>u!=="actions").map(u=>t.jsxs("div",{className:"mb-4",children:[t.jsx("h5",{className:"font-semibold",children:m[u][u]||u}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full border",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:"border px-2 py-1",children:"Title"}),t.jsx("th",{className:"border px-2 py-1",children:"View"}),t.jsx("th",{className:"border px-2 py-1",children:"Add"}),t.jsx("th",{className:"border px-2 py-1",children:"Edit"}),t.jsx("th",{className:"border px-2 py-1",children:"Delete"}),t.jsx("th",{className:"border px-2 py-1",children:"Authorize"})]})}),t.jsx("tbody",{children:Object.keys(o[u]).map(h=>t.jsxs("tr",{children:[t.jsx("td",{className:"border px-2 py-1",children:m[u][h]}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].view,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],view:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].add,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],add:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].edit,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],edit:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].delete,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],delete:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].authorize,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],authorize:p.target.checked}}})})})]},h))})]})})]},u)),t.jsx("button",{type:"button",onClick:()=>handlePermissions(r,o),className:"mt-4 bg-purple-500 text-white px-4 py-2 rounded",children:"Update Permissions"})]}),t.jsx("button",{type:"submit",className:"w-full bg-green-500 text-white py-2 rounded","aria-label":r?"Update user":"Add user",children:r?"Update User":"Add User"}),t.jsx("button",{type:"button",onClick:i,className:"w-full bg-gray-500 text-white py-2 rounded mt-2","aria-label":"Cancel",children:"Cancel"})]})]})},NW=()=>{const{user:e}=br(ie=>ie.user),[a,r]=b.useState([]),[n,i]=b.useState({username:"",userType:"admin",role:"",password:"",firstName:"",lastName:"",fatherName:"",contactNo:"",email:"",cnic:"",isActive:!1}),[o,c]=b.useState(pu),[m,u]=b.useState(null),[h,p]=b.useState(!1),[x,j]=b.useState(!1),[v,w]=b.useState(null),[S,A]=b.useState(""),[g,C]=b.useState(1),E=10;b.useEffect(()=>{e?.role==="superadmin"&&O()},[e]),b.useEffect(()=>{C(1)},[S]);const O=async()=>{try{const ie=localStorage.getItem("token"),V=await F.get("/api/users",{headers:{Authorization:`Bearer ${ie}`}});r(V.data?.users||[])}catch(ie){console.error("fetch users error",ie),M.error(ie.response?.status===401?"Unauthorized: Please log in again":"Failed to fetch users")}},D=()=>n.username?!n.email||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.email)?"Valid email is required":!m&&!n.password?"Password is required":null:"Username is required",B=async ie=>{ie.preventDefault();const V=D();if(V){M.error(V);return}try{const K=localStorage.getItem("token"),ce={...n},$=m?await F.put(`/api/users/${m._id}`,ce,{headers:{Authorization:`Bearer ${K}`}}):await F.post("/api/users/create-admin",ce,{headers:{Authorization:`Bearer ${K}`}});M.success(m?"User updated":"User created"),U(),O()}catch(K){console.error(K),M.error(K.response?.status===401?"Unauthorized: Please log in again":K.response?.data?.message||"Error")}},L=ie=>{i({username:ie.username,email:ie.email,password:"",userType:ie.userType||"admin",role:ie.role||"",firstName:ie.firstName||"",lastName:ie.lastName||"",fatherName:ie.fatherName||"",contactNo:ie.contactNo||"",cnic:ie.cnic||"",isActive:ie.isActive||!1}),c(ie.permissions||pu),u(ie),p(!0)},T=async()=>{try{const ie=localStorage.getItem("token");await F.delete(`/api/users/${v}`,{headers:{Authorization:`Bearer ${ie}`}}),M.success("User deleted"),O(),j(!1),w(null)}catch(ie){console.error(ie),M.error("Failed to delete")}},R=async(ie,V)=>{try{const K=localStorage.getItem("token");await F.patch(`/api/users/${ie}/status`,{isActive:!V},{headers:{Authorization:`Bearer ${K}`}}),M.success("Status updated"),O()}catch(K){console.error(K),M.error("Failed to update status")}},z=()=>{p(!0),u(null),i({username:"",email:"",password:"",userType:"admin",role:"",firstName:"",lastName:"",fatherName:"",contactNo:"",cnic:"",isActive:!1}),c(pu)},U=()=>{i({username:"",email:"",password:"",userType:"admin",role:"",firstName:"",lastName:"",fatherName:"",contactNo:"",cnic:"",isActive:!1}),u(null),p(!1),c(pu)},X=b.useMemo(()=>{const ie=S.toLowerCase();return a.filter(V=>V.username.toLowerCase().includes(ie)||V.firstName&&V.firstName.toLowerCase().includes(ie)||V.lastName&&V.lastName.toLowerCase().includes(ie)||V.email.toLowerCase().includes(ie))},[a,S]),fe=Math.ceil(X.length/E),se=X.slice((g-1)*E,g*E);return e?.role!=="superadmin"?t.jsx("div",{className:"p-6",children:"Access denied."}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Manage Users"}),t.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h3",{className:"text-lg font-medium",children:"User List"}),t.jsx("button",{onClick:z,className:"bg-green-500 text-white px-4 py-2 rounded","aria-label":"Add new user",children:"Add User"})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{htmlFor:"search",className:"sr-only",children:"Search users"}),t.jsx("input",{id:"search",type:"text",placeholder:"Search by username, first name, last name, or email",value:S,onChange:ie=>A(ie.target.value),className:"w-full p-2 border rounded"})]}),t.jsx(vW,{users:se,onEdit:L,onDelete:ie=>{w(ie),j(!0)},onToggleStatus:R}),t.jsxs("div",{className:"flex justify-between mt-4",children:[t.jsx("button",{disabled:g===1,onClick:()=>C(g-1),className:"bg-blue-500 text-white px-4 py-2 rounded disabled:bg-gray-300","aria-label":"Previous page",children:"Previous"}),t.jsxs("span",{children:["Page ",g," of ",fe]}),t.jsx("button",{disabled:g===fe,onClick:()=>C(g+1),className:"bg-blue-500 text-white px-4 py-2 rounded disabled:bg-gray-300","aria-label":"Next page",children:"Next"})]})]}),h&&t.jsx(jW,{form:n,setForm:i,editing:m,onSubmit:B,onCancel:U,permissions:o,setPermissions:c})]}),x&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center",children:t.jsxs("div",{className:"bg-white p-6 rounded",children:[t.jsx("h3",{className:"text-lg mb-4",children:"Are you sure you want to delete this user?"}),t.jsx("button",{onClick:T,className:"bg-red-500 text-white px-4 py-2 rounded mr-2","aria-label":"Confirm delete",children:"Yes"}),t.jsx("button",{onClick:()=>j(!1),className:"bg-gray-500 text-white px-4 py-2 rounded","aria-label":"Cancel delete",children:"No"})]})})]})},hu={actions:{editTestInterview:!1,editMedicalTest:!1,editENumber:!1,editSubmission:!1,editVisaStamped:!1,editNadra:!1,editProtector:!1,editFlight:!1,editDeparted:!1,goBack:!1,editJobPrices:!1},configuration:{configuration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addOptions:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},ageRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},salaryRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},experienceRanges:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},airlines:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaProfession:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},sectorsIndustries:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},skills:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cities:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},educationLevel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},careerLevel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addPaymentAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addRecruitmentAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTravelAgent:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},educationCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},subCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},workingCategories:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},visaIssuingAuthorities:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},verifyingInstitutions:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTestCenter:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addMedicalCenters:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},addTestTypes:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},candidateManagement:{candidateManagement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},initialRegistration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateFinalRegistration:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},applyJob:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},shortlisting:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},shortlistedCandidates:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},onlineApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerCm:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateLedgerExpenses:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateLedgerSummary:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateAgentLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},protectorPrintCandidates:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateFilterReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},traveledCandidatesReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateApplicationStatusReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},freezeApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},completedApplications:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},interviewSchedule:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkApplicationMaker:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkOfferSender:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bulkFlightCancel:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},accountingFinance:{accountingFinance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},chartOfAccounts:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},managePayments:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},travelAgentPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},candidateJv:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},expensesAgainstCandidate:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},openingBalance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerAf:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},chartOfAccountBalances:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashBook:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankBook:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},generalLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},trialBalance:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},accountBalances:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},incomeStatement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},balanceSheet:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},cashFlowStatement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},equityReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankReceipt:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},bankPayment:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jv:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},adminArea:{adminArea:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},dashboard:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},manageUsers:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},manageRole:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerAn:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},userLogReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},applicationProcess:{applicationProcess:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},viewDetails:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}},employerManagement:{employerManagement:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerSetup:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerPlans:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobSetup:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},reportManagerEm:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},employerLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},jobGroupingPrints:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},statusJobsReport:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},securityFeeRefundPrints:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1},travelAgentLedger:{view:!1,add:!1,edit:!1,delete:!1,authorize:!1}}},wW=({roles:e,onEdit:a,onDelete:r})=>t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border","aria-label":"Roles table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Role Name"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Created At"}),t.jsx("th",{className:"py-2 px-4 border",scope:"col",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(n=>t.jsxs("tr",{"aria-label":`Role ${n.name}`,children:[t.jsx("td",{className:"py-2 px-4 border",children:n.name}),t.jsx("td",{className:"py-2 px-4 border",children:new Date(n.createdAt).toLocaleDateString()}),t.jsxs("td",{className:"py-2 px-4 border",children:[t.jsx("button",{onClick:()=>a(n),className:"bg-blue-500 text-white px-2 py-1 rounded mr-2","aria-label":`Edit role ${n.name}`,children:"Edit"}),t.jsx("button",{onClick:()=>r(n._id),className:"bg-red-500 text-white px-2 py-1 rounded mr-2","aria-label":`Delete role ${n.name}`,children:"Delete"})]})]},n._id))})]})}),AW=({form:e,setForm:a,editing:r,onSubmit:n,onCancel:i,permissions:o,setPermissions:c})=>{const m={actions:{editTestInterview:"User can edit Test Interview",editMedicalTest:"User can edit Medical Test",editENumber:"User can edit E Number",editSubmission:"User can edit Submission",editVisaStamped:"User can edit Visa Stamped",editNadra:"User can edit Nadra",editProtector:"User can edit Protector",editFlight:"User can edit Flight",editDeparted:"User can edit Departed",goBack:"User can go back",editJobPrices:"User can edit Job prices"},configuration:{configuration:"Configuration",addOptions:"Add Options",ageRanges:"Age Ranges",salaryRanges:"Salary Ranges",experienceRanges:"Experience Ranges",airlines:"Airlines",visaProfession:"Visa Profession",sectorsIndustries:"Sectors / Industries",skills:"Skills",cities:"Cities",educationLevel:"Education Level",careerLevel:"Career Level",addPaymentAgent:"Add Payment Agent",addRecruitmentAgent:"Add Recruitment Agent",addTravelAgent:"Add Travel Agent",visaCategories:"Visa Categories",educationCategories:"Education Categories",jobCategories:"Job Categories",subCategories:"Sub Categories",workingCategories:"Working Categories",visaIssuingAuthorities:"Visa Issuing Authorities",verifyingInstitutions:"Verifying Institutions",addTestCenter:"Add Test Center",addMedicalCenters:"Add Medical Centers",addTestTypes:"Add Test Types"},candidateManagement:{candidateManagement:"Candidate Management",initialRegistration:"Initial Registration",candidateFinalRegistration:"Candidate Final Registration",applyJob:"Apply Job",shortlisting:"Shortlisting",shortlistedCandidates:"Shortlisted Candidates",onlineApplications:"Online Applications",jobApplications:"Job Applications",reportManagerCm:"Report Manager (CM)",candidateLedgerExpenses:"Candidate Ledger with Expenses",candidateLedgerSummary:"Candidate Ledger Summary",candidateAgentLedger:"Candidate Agent Ledger",protectorPrintCandidates:"Protector Print for Candidates",candidateFilterReport:"Candidate Filter Report",traveledCandidatesReport:"Traveled Candidates Report",candidateApplicationStatusReport:"Candidate Application Status Report",freezeApplications:"Freeze Applications",completedApplications:"Completed Applications",interviewSchedule:"Interview Schedule",bulkApplicationMaker:"Bulk Application Maker",bulkOfferSender:"Bulk Offer Sender",bulkFlightCancel:"Bulk flight Cancel"},accountingFinance:{accountingFinance:"Accounting & Finance",chartOfAccounts:"Chart of Accounts",managePayments:"Manage Payments",jobPayment:"Job Payment",travelAgentPayment:"Travel Agent Payment",candidateReceipt:"Candidate Receipt",candidateJv:"Candidate JV",expensesAgainstCandidate:"Expenses Against Candidate",openingBalance:"Opening Balance",cashReceipt:"Cash Receipt",cashPayment:"Cash Payment",reportManagerAf:"Report Manager (AF)",chartOfAccountBalances:"Chart of Account with Balances",cashBook:"Cash Book",bankBook:"Bank Book",generalLedger:"General Ledger",trialBalance:"Trial Balance",accountBalances:"Account Balances",incomeStatement:"Income Statement",balanceSheet:"Balance Sheet",cashFlowStatement:"Cash Flow Statement",equityReport:"Equity Report",bankReceipt:"Bank Receipt",bankPayment:"Bank Payment",jv:"JV"},adminArea:{adminArea:"Admin Area",dashboard:"Dashboard",manageUsers:"Manage Users",manageRole:"Manage Role",reportManagerAn:"Report Manager (AN)",userLogReport:"User Log Report"},applicationProcess:{applicationProcess:"Application Process",viewDetails:"View Details"},employerManagement:{employerManagement:"Employer Management",employerSetup:"Employer Setup",employerPlans:"Employer Plans",jobSetup:"Job Setup",reportManagerEm:"Report Manager (EM)",employerLedger:"Employer Ledger",jobGroupingPrints:"Job Grouping for Prints",statusJobsReport:"Status of Jobs Report",securityFeeRefundPrints:"Security Fee Refund Prints",travelAgentLedger:"Travel Agent Ledger"}};return t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-medium mb-2",children:r?"Edit Role":"Add Role"}),t.jsxs("form",{onSubmit:n,className:"space-y-4",children:[t.jsxs("label",{htmlFor:"name",className:"block mb-1",children:["Role Name",t.jsx("input",{id:"name",type:"text",placeholder:"Role Name",value:e.name,onChange:u=>a({...e,name:u.target.value}),className:"w-full p-2 border rounded",required:!0})]}),t.jsxs("div",{className:"border p-4 rounded",children:[t.jsx("h4",{className:"font-medium mb-2",children:"Permissions"}),t.jsxs("div",{className:"mb-4",children:[t.jsx("h5",{className:"font-semibold",children:"Actions"}),Object.keys(o.actions).map(u=>t.jsxs("label",{className:"block",children:[t.jsx("input",{type:"checkbox",checked:o.actions[u],onChange:h=>c({...o,actions:{...o.actions,[u]:h.target.checked}})})," ",m.actions[u]]},u))]}),Object.keys(o).filter(u=>u!=="actions").map(u=>t.jsxs("div",{className:"mb-4",children:[t.jsx("h5",{className:"font-semibold",children:m[u][u]||u}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full border",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{className:"border px-2 py-1",children:"Title"}),t.jsx("th",{className:"border px-2 py-1",children:"View"}),t.jsx("th",{className:"border px-2 py-1",children:"Add"}),t.jsx("th",{className:"border px-2 py-1",children:"Edit"}),t.jsx("th",{className:"border px-2 py-1",children:"Delete"}),t.jsx("th",{className:"border px-2 py-1",children:"Authorize"})]})}),t.jsx("tbody",{children:Object.keys(o[u]).map(h=>t.jsxs("tr",{children:[t.jsx("td",{className:"border px-2 py-1",children:m[u][h]}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].view,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],view:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].add,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],add:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].edit,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],edit:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].delete,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],delete:p.target.checked}}})})}),t.jsx("td",{className:"border px-2 py-1 text-center",children:t.jsx("input",{type:"checkbox",checked:o[u][h].authorize,onChange:p=>c({...o,[u]:{...o[u],[h]:{...o[u][h],authorize:p.target.checked}}})})})]},h))})]})})]},u))]}),t.jsx("button",{type:"submit",className:"w-full bg-green-500 text-white py-2 rounded","aria-label":r?"Update role":"Add role",children:r?"Update Role":"Add Role"}),t.jsx("button",{type:"button",onClick:i,className:"w-full bg-gray-500 text-white py-2 rounded mt-2","aria-label":"Cancel",children:"Cancel"})]})]})},SW=()=>{const{user:e}=br(se=>se.user),[a,r]=b.useState([]),[n,i]=b.useState({name:""}),[o,c]=b.useState(hu),[m,u]=b.useState(null),[h,p]=b.useState(!1),[x,j]=b.useState(!1),[v,w]=b.useState(null),[S,A]=b.useState(""),[g,C]=b.useState(1),E=10;b.useEffect(()=>{e?.role==="superadmin"&&O()},[e]),b.useEffect(()=>{C(1)},[S]);const O=async()=>{try{const se=localStorage.getItem("token"),ie=await F.get("/api/roles",{headers:{Authorization:`Bearer ${se}`}});r(ie.data)}catch(se){console.error("fetch roles error",se),M.error(se.response?.status===401?"Unauthorized: Please log in again":"Failed to fetch roles")}},D=()=>n.name?null:"Role name is required",B=async se=>{se.preventDefault();const ie=D();if(ie){M.error(ie);return}try{const V=localStorage.getItem("token"),K={...n,permissions:o},ce=m?await F.put(`/api/roles/${m._id}`,K,{headers:{Authorization:`Bearer ${V}`}}):await F.post("/api/roles",K,{headers:{Authorization:`Bearer ${V}`}});M.success(m?"Role updated":"Role created"),z(),O()}catch(V){console.error(V),M.error(V.response?.status===401?"Unauthorized: Please log in again":V.response?.data?.message||"Error")}},L=se=>{i({name:se.name}),c(se.permissions||hu),u(se),p(!0)},T=async()=>{try{const se=localStorage.getItem("token");await F.delete(`/api/roles/${v}`,{headers:{Authorization:`Bearer ${se}`}}),M.success("Role deleted"),O(),j(!1),w(null)}catch(se){console.error(se),M.error("Failed to delete")}},R=()=>{p(!0),u(null),i({name:""}),c(hu)},z=()=>{i({name:""}),u(null),p(!1),c(hu)},U=b.useMemo(()=>{const se=S.toLowerCase();return a.filter(ie=>ie.name.toLowerCase().includes(se))},[a,S]),X=Math.ceil(U.length/E),fe=U.slice((g-1)*E,g*E);return e?.role!=="superadmin"?t.jsx("div",{className:"p-6",children:"Access denied."}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Manage Roles"}),t.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Role List"}),t.jsx("button",{onClick:R,className:"bg-green-500 text-white px-4 py-2 rounded","aria-label":"Add new role",children:"New"})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{htmlFor:"search",className:"sr-only",children:"Search roles"}),t.jsx("input",{id:"search",type:"text",placeholder:"Search by role name",value:S,onChange:se=>A(se.target.value),className:"w-full p-2 border rounded"})]}),t.jsx(wW,{roles:fe,onEdit:L,onDelete:se=>{w(se),j(!0)}}),t.jsxs("div",{className:"flex justify-between mt-4",children:[t.jsx("button",{disabled:g===1,onClick:()=>C(g-1),className:"bg-blue-500 text-white px-4 py-2 rounded disabled:bg-gray-300","aria-label":"Previous page",children:"Previous"}),t.jsxs("span",{children:["Page ",g," of ",X]}),t.jsx("button",{disabled:g===X,onClick:()=>C(g+1),className:"bg-blue-500 text-white px-4 py-2 rounded disabled:bg-gray-300","aria-label":"Next page",children:"Next"})]})]}),h&&t.jsx(AW,{form:n,setForm:i,editing:m,onSubmit:B,onCancel:z,permissions:o,setPermissions:c})]}),x&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center",children:t.jsxs("div",{className:"bg-white p-6 rounded",children:[t.jsx("h3",{className:"text-lg mb-4",children:"Are you sure you want to delete this role?"}),t.jsx("button",{onClick:T,className:"bg-red-500 text-white px-4 py-2 rounded mr-2","aria-label":"Confirm delete",children:"Yes"}),t.jsx("button",{onClick:()=>j(!1),className:"bg-gray-500 text-white px-4 py-2 rounded","aria-label":"Cancel delete",children:"No"})]})})]})},CW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState([]),[c,m]=b.useState(!1),u=async()=>{if(!e||!r){alert("Please select both From Date and To Date");return}m(!0);try{const p=await F.get(`undefined/api/users/logs?from=${e}&to=${r}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});o(p.data)}catch(p){console.error("Error fetching user log report:",p),alert("Failed to fetch report data")}finally{m(!1)}},h=()=>{window.print()};return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto p-6",children:[t.jsx("h1",{className:"text-3xl font-bold text-gray-800 mb-6",children:"User Log Report"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Report Parameters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"From Date"}),t.jsx("input",{type:"date",value:e,onChange:p=>a(p.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"To Date"}),t.jsx("input",{type:"date",value:r,onChange:p=>n(p.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsx("div",{className:"flex items-end",children:t.jsx("button",{onClick:u,className:"w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 transition-colors",disabled:c,children:c?"Generating...":"Generate Report"})})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:"Report Data"}),t.jsxs("button",{onClick:h,className:"flex items-center gap-2 bg-green-600 text-white py-2 px-4 rounded-md hover:bg-green-700 transition-colors",children:[t.jsx(mt,{}),"Print"]})]}),c?t.jsx("div",{className:"text-center py-8",children:"Loading report data..."}):i.length===0?t.jsx("div",{className:"text-center py-8 text-gray-500",children:"No data available. Please generate the report."}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-100",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Username"}),t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Email"}),t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Role"}),t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Created At"}),t.jsx("th",{className:"px-4 py-2 text-left text-sm font-medium text-gray-700",children:"Last Updated"})]})}),t.jsx("tbody",{children:i.map((p,x)=>t.jsxs("tr",{className:"border-t border-gray-200",children:[t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:p.username}),t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:p.email}),t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:p.role}),t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:new Date(p.createdAt).toLocaleDateString()}),t.jsx("td",{className:"px-4 py-2 text-sm text-gray-900",children:new Date(p.updatedAt).toLocaleDateString()})]},x))})]})})]})]})]})},EW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/education-categories/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.categories||[])}catch(g){console.error("Error loading education categories:",g),M.error("Failed to load education categories")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/education-categories/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Education Category updated successfully!")):(await F.post("/api/config/education-categories/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Education Category added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving education category:",C),M.error(C.response?.data?.message||"Failed to save education category")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this education category?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/education-categories/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Education Category deleted successfully!"),x()}catch(C){console.error("Error deleting category:",C),M.error("Failed to delete education category")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/education-categories/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Education Category ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Education Category":"Add Education Category"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Category"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Education Categories"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search categories...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:g.isActive?"Active":"Inactive"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No education categories found."})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," entries"]})]})]})]})},kW=()=>{const[e,a]=b.useState({name:"",description:""}),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(null),p=g=>{const{name:C,value:E}=g.target;a({...e,[C]:E})};b.useEffect(()=>{x()},[]);const x=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${g}`}});o(C.data.categories||[])}catch(g){console.error("Error loading job categories:",g),M.error("Failed to load job categories")}},j=async g=>{g.preventDefault(),n(!0);try{const C=localStorage.getItem("token");u?(await F.put(`/api/config/job-categories/${u._id}`,e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Job Category updated successfully!")):(await F.post("/api/config/job-categories/",e,{headers:{Authorization:`Bearer ${C}`,"Content-Type":"application/json"}}),M.success("Job Category added successfully!")),a({name:"",description:""}),h(null),x()}catch(C){console.error("Error saving job category:",C),M.error(C.response?.data?.message||"Failed to save job category")}finally{n(!1)}},v=g=>{h(g),a({name:g.name,description:g.description||""})},w=async g=>{if(window.confirm("Are you sure you want to delete this job category?"))try{const C=localStorage.getItem("token");await F.delete(`/api/config/job-categories/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Job Category deleted successfully!"),x()}catch(C){console.error("Error deleting category:",C),M.error("Failed to delete job category")}},S=async(g,C)=>{try{const E=localStorage.getItem("token");await F.patch(`/api/config/job-categories/${g}/toggle-status`,{},{headers:{Authorization:`Bearer ${E}`}}),M.success(`Job Category ${C?"deactivated":"activated"} successfully!`),x()}catch(E){console.error("Error toggling status:",E),M.error("Failed to update status")}},A=i.filter(g=>g.name.toLowerCase().includes(c.toLowerCase())||g.description&&g.description.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800 mb-6",children:u?"Edit Job Category":"Add Job Category"}),t.jsxs("form",{onSubmit:j,className:"space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Category Name *"}),t.jsx("input",{type:"text",name:"name",value:e.name,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),t.jsx("input",{type:"text",name:"description",value:e.description,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Optional description"})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",disabled:r,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:r?"Saving...":t.jsxs(t.Fragment,{children:[t.jsx(Ve,{})," ",u?"Update":"Add"," Category"]})}),u&&t.jsx("button",{type:"button",onClick:()=>{h(null),a({name:"",description:""})},className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel Edit"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"Categories Listing"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search categories...",value:c,onChange:g=>m(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:A.length>0?A.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:g.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>v(g),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",title:"Edit",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>S(g._id,g.isActive),className:`px-2 py-1 rounded hover:opacity-80 ${g.isActive?"bg-green-500 text-white":"bg-gray-500 text-white"}`,title:g.isActive?"Deactivate":"Activate",children:g.isActive?t.jsx(Wt,{}):t.jsx(Jt,{})}),t.jsx("button",{onClick:()=>w(g._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",title:"Delete",children:t.jsx(ze,{})})]})})]},g._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),A.length>0&&t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",A.length," of ",i.length," entries"]})]})]})]})},OW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(""),[c,m]=b.useState(!1),[u,h]=b.useState(null),[p,x]=b.useState({mainCategory:"",name:"",description:""});b.useEffect(()=>{j(),v()},[]);const j=async()=>{try{const E=localStorage.getItem("token"),O=await F.get("/api/config/sub-categories/",{headers:{Authorization:`Bearer ${E}`}});a(O.data.subCategories||[])}catch(E){console.error("load sub categories error",E)}},v=async()=>{try{const E=localStorage.getItem("token"),O=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${E}`}});n(O.data.categories||[])}catch(E){console.error("load job categories error",E)}},w=async E=>{E.preventDefault();try{const O=localStorage.getItem("token");u?(await F.put(`/api/config/sub-categories/${u._id}`,p,{headers:{Authorization:`Bearer ${O}`}}),M.success("Sub Category updated successfully")):(await F.post("/api/config/sub-categories/",p,{headers:{Authorization:`Bearer ${O}`}}),M.success("Sub Category created successfully")),m(!1),h(null),x({mainCategory:"",name:"",description:""}),j()}catch(O){console.error("submit error",O),M.error("Operation failed")}},S=E=>{h(E),x({mainCategory:E.mainCategory._id,name:E.name,description:E.description||""}),m(!0)},A=async E=>{if(window.confirm("Are you sure you want to delete this sub category?"))try{const O=localStorage.getItem("token");await F.delete(`/api/config/sub-categories/${E}`,{headers:{Authorization:`Bearer ${O}`}}),M.success("Sub Category deleted successfully"),j()}catch(O){console.error("delete error",O),M.error("Delete failed")}},g=async(E,O)=>{try{const D=localStorage.getItem("token");await F.patch(`/api/config/sub-categories/${E}/toggle`,{isActive:!O},{headers:{Authorization:`Bearer ${D}`}}),M.success("Status updated"),j()}catch(D){console.error("toggle error",D),M.error("Status update failed")}},C=e.filter(E=>E.name.toLowerCase().includes(i.toLowerCase())||E.mainCategory.name.toLowerCase().includes(i.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Manage Sub Categories"}),t.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Add/Edit Detail"}),t.jsx("button",{onClick:()=>{m(!c),h(null),x({mainCategory:"",name:"",description:""})},className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:c?"Cancel":"Add New"})]}),c&&t.jsxs("form",{onSubmit:w,className:"mb-6 space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Main Category *"}),t.jsxs("select",{value:p.mainCategory,onChange:E=>x({...p,mainCategory:E.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",required:!0,children:[t.jsx("option",{value:"",children:"Select Main Category"}),r.map(E=>t.jsx("option",{value:E._id,children:E.name},E._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Sub Category Name *"}),t.jsx("input",{type:"text",value:p.name,onChange:E=>x({...p,name:E.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description"}),t.jsx("textarea",{value:p.description,onChange:E=>x({...p,description:E.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",rows:"3"})]}),t.jsx("button",{type:"submit",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:u?"Update":"Create"})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Sub Categories Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[C.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Search:"}),t.jsx("input",{type:"text",value:i,onChange:E=>o(E.target.value),className:"border border-gray-300 rounded px-2 py-1 text-sm",placeholder:"Search..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-50",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Main Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sub Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:C.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})}):C.map(E=>t.jsxs("tr",{children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:E.mainCategory.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:E.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:E.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>g(E._id,E.isActive),className:`px-2 py-1 rounded text-xs ${E.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:E.isActive?"Active":"Inactive"})}),t.jsxs("td",{className:"border border-gray-300 px-4 py-2",children:[t.jsx("button",{onClick:()=>S(E),className:"bg-blue-600 text-white px-2 py-1 rounded text-xs mr-2 hover:bg-blue-700",children:"Edit"}),t.jsx("button",{onClick:()=>A(E._id),className:"bg-red-600 text-white px-2 py-1 rounded text-xs hover:bg-red-700",children:"Delete"})]})]},E._id))})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",C.length," to"," ",C.length," of ",C.length," ","entries"]})]})]})]})]})},DW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState([]),[c,m]=b.useState(""),[u,h]=b.useState(!1),[p,x]=b.useState(null),[j,v]=b.useState({mainCategory:"",subCategory:"",name:"",description:""});b.useEffect(()=>{w(),S(),A()},[]);const w=async()=>{try{const L=localStorage.getItem("token"),T=await F.get("/api/config/working-categories/",{headers:{Authorization:`Bearer ${L}`}});a(T.data.workingCategories||[])}catch(L){console.error("load working categories error",L)}},S=async()=>{try{const L=localStorage.getItem("token"),T=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${L}`}});n(T.data.categories||[])}catch(L){console.error("load job categories error",L)}},A=async()=>{try{const L=localStorage.getItem("token"),T=await F.get("/api/config/sub-categories/",{headers:{Authorization:`Bearer ${L}`}});o(T.data.subCategories||[])}catch(L){console.error("load sub categories error",L)}},g=async L=>{L.preventDefault();try{const T=localStorage.getItem("token");p?(await F.put(`/api/config/working-categories/${p._id}`,j,{headers:{Authorization:`Bearer ${T}`}}),M.success("Working Category updated successfully")):(await F.post("/api/config/working-categories/",j,{headers:{Authorization:`Bearer ${T}`}}),M.success("Working Category created successfully")),h(!1),x(null),v({mainCategory:"",subCategory:"",name:"",description:""}),w()}catch(T){console.error("submit error",T),M.error("Operation failed")}},C=L=>{x(L),v({mainCategory:L.mainCategory._id,subCategory:L.subCategory._id,name:L.name,description:L.description||""}),h(!0)},E=async L=>{if(window.confirm("Are you sure you want to delete this working category?"))try{const T=localStorage.getItem("token");await F.delete(`/api/config/working-categories/${L}`,{headers:{Authorization:`Bearer ${T}`}}),M.success("Working Category deleted successfully"),w()}catch(T){console.error("delete error",T),M.error("Delete failed")}},O=async(L,T)=>{try{const R=localStorage.getItem("token");await F.patch(`/api/config/working-categories/${L}/toggle-status`,{isActive:!T},{headers:{Authorization:`Bearer ${R}`}}),M.success("Status updated"),w()}catch(R){console.error("toggle error",R),M.error("Status update failed")}},D=e.filter(L=>L.name.toLowerCase().includes(c.toLowerCase())||L.mainCategory.name.toLowerCase().includes(c.toLowerCase())||L.subCategory.name.toLowerCase().includes(c.toLowerCase())),B=i.filter(L=>L.mainCategory._id===j.mainCategory);return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[t.jsx("h1",{className:"text-2xl font-bold mb-6",children:"Manage Working Categories"}),t.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:"text-xl font-semibold",children:"Add/Edit Detail"}),t.jsx("button",{onClick:()=>{h(!u),x(null),v({mainCategory:"",subCategory:"",name:"",description:""})},className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:u?"Cancel":"Add New"})]}),u&&t.jsxs("form",{onSubmit:g,className:"mb-6 space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Main Category *"}),t.jsxs("select",{value:j.mainCategory,onChange:L=>{v({...j,mainCategory:L.target.value,subCategory:""})},className:"w-full border border-gray-300 rounded px-3 py-2",required:!0,children:[t.jsx("option",{value:"",children:"Select Main Category"}),r.map(L=>t.jsx("option",{value:L._id,children:L.name},L._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Sub Category *"}),t.jsxs("select",{value:j.subCategory,onChange:L=>v({...j,subCategory:L.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",required:!0,disabled:!j.mainCategory,children:[t.jsx("option",{value:"",children:"Select Sub Category"}),B.map(L=>t.jsx("option",{value:L._id,children:L.name},L._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Working Category Name *"}),t.jsx("input",{type:"text",value:j.name,onChange:L=>v({...j,name:L.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description"}),t.jsx("textarea",{value:j.description,onChange:L=>v({...j,description:L.target.value}),className:"w-full border border-gray-300 rounded px-3 py-2",rows:"3"})]}),t.jsx("button",{type:"submit",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:p?"Update":"Create"})]}),t.jsxs("div",{className:"border-t pt-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Working Categories Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[D.length," records"]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("span",{className:"mr-2",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:L=>m(L.target.value),className:"border border-gray-300 rounded px-2 py-1 text-sm",placeholder:"Search..."})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full border-collapse border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-50",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Main Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sub Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Working Category"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:D.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})}):D.map(L=>t.jsxs("tr",{children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:L.mainCategory.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:L.subCategory.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:L.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:L.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>O(L._id,L.isActive),className:`px-2 py-1 rounded text-xs ${L.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800"}`,children:L.isActive?"Active":"Inactive"})}),t.jsxs("td",{className:"border border-gray-300 px-4 py-2",children:[t.jsx("button",{onClick:()=>C(L),className:"bg-blue-600 text-white px-2 py-1 rounded text-xs mr-2 hover:bg-blue-700",children:"Edit"}),t.jsx("button",{onClick:()=>E(L._id),className:"bg-red-600 text-white px-2 py-1 rounded text-xs hover:bg-red-700",children:"Delete"})]})]},L._id))})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",D.length," to"," ",D.length," of"," ",D.length," entries"]})]})]})]})]})},TW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState(null),[c,m]=b.useState(""),[u,h]=b.useState({accountCode:"",accountName:"",accountType:"",subType:"",parentAccount:"",description:""});b.useEffect(()=>{p()},[]);const p=async()=>{try{const S=localStorage.getItem("token"),A=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${S}`}});a(A.data.accounts||[])}catch(S){console.error("Load accounts error",S),M.error("Failed to load accounts")}},x=async S=>{S.preventDefault();try{const A=localStorage.getItem("token");i?(await F.put(`/api/accounting/accounts/${i._id}`,u,{headers:{Authorization:`Bearer ${A}`}}),M.success("Account updated successfully")):(await F.post("/api/accounting/accounts/",u,{headers:{Authorization:`Bearer ${A}`}}),M.success("Account created successfully")),n(!1),o(null),h({accountCode:"",accountName:"",accountType:"",subType:"",parentAccount:"",description:""}),p()}catch(A){console.error("Submit error",A),M.error("Failed to save account")}},j=S=>{o(S),h({accountCode:S.accountCode,accountName:S.accountName,accountType:S.accountType,subType:S.subType||"",parentAccount:S.parentAccount?._id||"",description:S.description||""}),n(!0)},v=async S=>{if(window.confirm("Are you sure you want to delete this account?"))try{const A=localStorage.getItem("token");await F.delete(`/api/accounting/accounts/${S}`,{headers:{Authorization:`Bearer ${A}`}}),M.success("Account deleted successfully"),p()}catch(A){console.error("Delete error",A),M.error("Failed to delete account")}},w=e.filter(S=>S.accountName.toLowerCase().includes(c.toLowerCase())||S.accountCode.toLowerCase().includes(c.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Chart of Accounts"}),t.jsxs("button",{onClick:()=>n(!0),className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," Add Account"]})]}),t.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search accounts...",value:c,onChange:S=>m(S.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 flex-1"})]}),r&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:i?"Edit Account":"Add Account"}),t.jsxs("form",{onSubmit:x,className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Code *"}),t.jsx("input",{type:"text",value:u.accountCode,onChange:S=>h({...u,accountCode:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Name *"}),t.jsx("input",{type:"text",value:u.accountName,onChange:S=>h({...u,accountName:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Type *"}),t.jsxs("select",{value:u.accountType,onChange:S=>h({...u,accountType:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Type"}),t.jsx("option",{value:"Asset",children:"Asset"}),t.jsx("option",{value:"Liability",children:"Liability"}),t.jsx("option",{value:"Equity",children:"Equity"}),t.jsx("option",{value:"Revenue",children:"Revenue"}),t.jsx("option",{value:"Expense",children:"Expense"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Sub Type"}),t.jsx("input",{type:"text",value:u.subType,onChange:S=>h({...u,subType:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),t.jsx("textarea",{value:u.description,onChange:S=>h({...u,description:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:"3"})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:i?"Update":"Create"}),t.jsx("button",{type:"button",onClick:()=>{n(!1),o(null),h({accountCode:"",accountName:"",accountType:"",subType:"",parentAccount:"",description:""})},className:"flex-1 px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel"})]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sub Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:w.length>0?w.map(S=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:S.accountCode}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:S.accountName}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:S.accountType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:S.subType||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>j(S),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>v(S._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",children:t.jsx(ze,{})})]})})]},S._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No accounts found."})})})]})})]})]})},RW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState({fromDate:"",toDate:""});b.useEffect(()=>{c()},[]);const c=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.fromDate&&(x.fromDate=i.fromDate),i.toDate&&(x.toDate=i.toDate);const j=await F.get("/api/accounting/reports/chart-of-accounts-balances",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.balances||[])}catch(p){console.error("Load balances error",p),M.error("Failed to load balances")}finally{n(!1)}},m=p=>{o({...i,[p.target.name]:p.target.value})},u=()=>{c()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Chart of Accounts with Balances"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"fromDate",value:i.fromDate,onChange:m,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"toDate",value:i.toDate,onChange:m,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Balances Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading balances..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Net Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((p,x)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.accountCode}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.accountName}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.accountType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.debitBalance?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.creditBalance?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.netBalance?.toFixed(2)||"0.00"})]},x)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No balances found. Please adjust filters and view report."})})})]})]})]})]})},PW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState({startDate:"",endDate:"",accountId:""});b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${v}`}});o(w.data.accounts||[])}catch(v){console.error("Load accounts error",v),M.error("Failed to load accounts")}},h=async()=>{n(!0);try{const v=localStorage.getItem("token"),w={};c.startDate&&(w.startDate=c.startDate),c.endDate&&(w.endDate=c.endDate),c.accountId&&(w.accountId=c.accountId);const S=await F.get("/api/accounting/reports/cash-book",{headers:{Authorization:`Bearer ${v}`},params:w});a(S.data.cashBook||[])}catch(v){console.error("Load cash book error",v),M.error("Failed to load cash book")}finally{n(!1)}},p=v=>{m({...c,[v.target.name]:v.target.value})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Cash Book"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"startDate",value:c.startDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"endDate",value:c.endDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account/Party"}),t.jsxs("select",{name:"accountId",value:c.accountId,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading cash book..."})}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher#"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.date}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherNumber}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.description}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debit?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.credit?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.balance?.toFixed(2)||"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No cash book data found. Please adjust filters and view report."})})})]})})]})]})]})},MW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState([]),[c,m]=b.useState({startDate:"",endDate:"",accountId:""});b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${v}`}});o(w.data.accounts||[])}catch(v){console.error("Load accounts error",v),M.error("Failed to load accounts")}},h=async()=>{n(!0);try{const v=localStorage.getItem("token"),w={};c.startDate&&(w.startDate=c.startDate),c.endDate&&(w.endDate=c.endDate),c.accountId&&(w.accountId=c.accountId);const S=await F.get("/api/accounting/reports/bank-book",{headers:{Authorization:`Bearer ${v}`},params:w});a(S.data.bankBook||[])}catch(v){console.error("Load bank book error",v),M.error("Failed to load bank book")}finally{n(!1)}},p=v=>{m({...c,[v.target.name]:v.target.value})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Bank Book"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"startDate",value:c.startDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"endDate",value:c.endDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account/Party"}),t.jsxs("select",{name:"accountId",value:c.accountId,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading bank book..."})}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher#"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.date}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherNumber}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.description}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debit?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.credit?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.balance?.toFixed(2)||"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No bank book data found. Please adjust filters and view report."})})})]})})]})]})]})},_W=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState(null),[p,x]=b.useState(""),[j,v]=b.useState({account:"",date:"",debit:"",credit:"",description:""}),[w,S]=b.useState({debit:"",credit:""});b.useEffect(()=>{A(),g()},[]);const A=async()=>{try{const R=localStorage.getItem("token"),z=await F.get("/api/accounting/opening-balances/",{headers:{Authorization:`Bearer ${R}`}});a(z.data.openingBalances||[])}catch(R){console.error("Load balances error",R),M.error("Failed to load opening balances")}},g=async()=>{try{const R=localStorage.getItem("token"),z=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${R}`}});n(z.data.accounts||[])}catch(R){console.error("Load accounts error",R)}},C=async R=>{R.preventDefault();try{const z=localStorage.getItem("token");c?(await F.put(`/api/accounting/opening-balances/${c._id}`,j,{headers:{Authorization:`Bearer ${z}`}}),M.success("Opening balance updated successfully")):(await F.post("/api/accounting/opening-balances/",j,{headers:{Authorization:`Bearer ${z}`}}),M.success("Opening balance created successfully")),o(!1),m(null),v({account:"",date:"",debit:"",credit:"",description:""}),A()}catch(z){console.error("Submit error",z),M.error("Failed to save opening balance")}},E=R=>{m(R),v({account:R.account._id,date:R.date?R.date.split("T")[0]:"",debit:R.debit,credit:R.credit,description:R.description||""}),o(!0)},O=async R=>{if(window.confirm("Are you sure you want to delete this opening balance?"))try{const z=localStorage.getItem("token");await F.delete(`/api/accounting/opening-balances/${R}`,{headers:{Authorization:`Bearer ${z}`}}),M.success("Opening balance deleted successfully"),A()}catch(z){console.error("Delete error",z),M.error("Failed to delete opening balance")}},D=R=>{h(R._id),S({debit:R.debit,credit:R.credit})},B=async R=>{try{const z=localStorage.getItem("token");await F.put(`/api/accounting/opening-balances/${R}`,{debit:Number(w.debit)||0,credit:Number(w.credit)||0},{headers:{Authorization:`Bearer ${z}`}}),M.success("Opening balance updated successfully"),h(null),A()}catch(z){console.error("Inline save error",z),M.error("Failed to update opening balance")}},L=()=>{h(null),S({debit:"",credit:""})},T=e.filter(R=>R.account.accountName.toLowerCase().includes(p.toLowerCase())||R.account.accountCode.toLowerCase().includes(p.toLowerCase()));return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Opening Balance"}),t.jsxs("button",{onClick:()=>o(!0),className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," Add Opening Balance"]})]}),t.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[t.jsx(pa,{className:"text-gray-400"}),t.jsx("input",{type:"text",placeholder:"Search accounts...",value:p,onChange:R=>x(R.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 flex-1"})]}),i&&t.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:t.jsxs("div",{className:"bg-white rounded-lg p-6 w-full max-w-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:c?"Edit Opening Balance":"Add Opening Balance"}),t.jsxs("form",{onSubmit:C,className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account *"}),t.jsxs("select",{value:j.account,onChange:R=>v({...j,account:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Account"}),r.map(R=>t.jsxs("option",{value:R._id,children:[R.accountCode," - ",R.accountName]},R._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:j.date,onChange:R=>v({...j,date:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Debit"}),t.jsx("input",{type:"number",step:"0.01",value:j.debit,onChange:R=>v({...j,debit:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Credit"}),t.jsx("input",{type:"number",step:"0.01",value:j.credit,onChange:R=>v({...j,credit:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),t.jsx("textarea",{value:j.description,onChange:R=>v({...j,description:R.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:"3"})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{type:"submit",className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:c?"Update":"Create"}),t.jsx("button",{type:"button",onClick:()=>{o(!1),m(null),v({account:"",date:"",debit:"",credit:"",description:""})},className:"flex-1 px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel"})]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:T.length>0?T.map(R=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsxs("td",{className:"border border-gray-300 px-4 py-2",children:[R.account.accountCode," -"," ",R.account.accountName]}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:new Date(R.date).toLocaleDateString()}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:u===R._id?t.jsx("input",{type:"number",step:"0.01",value:w.debit,onChange:z=>S({...w,debit:z.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}):R.debit.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:u===R._id?t.jsx("input",{type:"number",step:"0.01",value:w.credit,onChange:z=>S({...w,credit:z.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}):R.credit.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:R.description||"-"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("div",{className:"flex gap-2",children:u===R._id?t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>B(R._id),className:"px-2 py-1 bg-green-500 text-white rounded hover:bg-green-600",children:"Save"}),t.jsx("button",{onClick:L,className:"px-2 py-1 bg-gray-500 text-white rounded hover:bg-gray-600",children:"Cancel"})]}):t.jsxs(t.Fragment,{children:[t.jsx("button",{onClick:()=>D(R),className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>E(R),className:"px-2 py-1 bg-yellow-500 text-white rounded hover:bg-yellow-600",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>O(R._id),className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600",children:t.jsx(ze,{})})]})})})]},R._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No opening balances found."})})})]})})]})]})},zW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState([]),[u,h]=b.useState([{code:"",name:"",description:"",receipt:""}]),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[u]);const j=async()=>{try{const T=localStorage.getItem("token"),R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});m(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),M.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),U=String(T.getDate()).padStart(2,"0"),X=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${U}${X}`)},w=()=>{const T=u.reduce((R,z)=>R+(parseFloat(z.receipt)||0),0);x(T)},S=(T,R)=>{const z=c.find(U=>U._id===R);if(z){const U=[...u];U[T]={...U[T],code:z.accountCode,name:z.accountName},h(U)}},A=(T,R,z)=>{const U=[...u];U[T][R]=z,h(U)},g=()=>{h([...u,{code:"",name:"",description:"",receipt:""}])},C=T=>{if(u.length>1){const R=u.filter((z,U)=>U!==T);h(R)}},E=async()=>{if(!e||!r||!i){M.error("Please fill in all required fields");return}if(u.some(T=>!T.code||!T.receipt)){M.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token"),R=u.map(z=>{const U=c.find(X=>X.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Cash Receipt",date:r,reference:e,description:z.description,amount:parseFloat(z.receipt),account:i,contraAccount:U._id},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),M.success("Cash receipt voucher saved successfully"),O()}catch(T){console.error("Save error",T),M.error("Failed to save cash receipt voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),o(""),h([{code:"",name:"",description:"",receipt:""}]),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),M.success("Voucher cleared"))},L=()=>{M.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Cash Receipt Voucher"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:E,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Close"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Cash A/c Code *"}),t.jsxs("select",{value:i,onChange:T=>o(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Cash Account"}),c.filter(T=>T.accountName.toLowerCase().includes("cash")).map(T=>t.jsxs("option",{value:T._id,children:[T.accountCode," - ",T.accountName]},T._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Receipt"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[u.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>S(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),c.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>A(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.receipt,onChange:z=>A(R,"receipt",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:u.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},LW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState([]),[u,h]=b.useState([{code:"",name:"",description:"",payment:""}]),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[u]);const j=async()=>{try{const T=localStorage.getItem("token"),R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});m(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),M.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),U=String(T.getDate()).padStart(2,"0"),X=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${U}${X}`)},w=()=>{const T=u.reduce((R,z)=>R+(parseFloat(z.payment)||0),0);x(T)},S=(T,R)=>{const z=c.find(U=>U._id===R);if(z){const U=[...u];U[T]={...U[T],code:z.accountCode,name:z.accountName},h(U)}},A=(T,R,z)=>{const U=[...u];U[T][R]=z,h(U)},g=()=>{h([...u,{code:"",name:"",description:"",payment:""}])},C=T=>{if(u.length>1){const R=u.filter((z,U)=>U!==T);h(R)}},E=async()=>{if(!e||!r||!i){M.error("Please fill in all required fields");return}if(u.some(T=>!T.code||!T.payment)){M.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token"),R=u.map(z=>{const U=c.find(X=>X.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Cash Payment",date:r,reference:e,description:z.description,amount:parseFloat(z.payment),account:U._id,contraAccount:i},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),M.success("Cash payment voucher saved successfully"),O()}catch(T){console.error("Save error",T),M.error("Failed to save cash payment voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),o(""),h([{code:"",name:"",description:"",payment:""}]),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),M.success("Voucher cleared"))},L=()=>{M.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Cash Payment Voucher"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:E,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Cancel"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Cash A/c Code *"}),t.jsxs("select",{value:i,onChange:T=>o(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Cash Account"}),c.filter(T=>T.accountName.toLowerCase().includes("cash")).map(T=>t.jsxs("option",{value:T._id,children:[T.accountCode," - ",T.accountName]},T._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Payment"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[u.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>S(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),c.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>A(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.payment,onChange:z=>A(R,"payment",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:u.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},BW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState([]),[c,m]=b.useState([{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}]),[u,h]=b.useState(0),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[c]);const j=async()=>{try{const T=localStorage.getItem("token"),R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});o(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),M.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),U=String(T.getDate()).padStart(2,"0"),X=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${U}${X}`)},w=()=>{const T=c.reduce((z,U)=>z+(parseFloat(U.debit)||0),0),R=c.reduce((z,U)=>z+(parseFloat(U.credit)||0),0);h(T),x(R)},S=(T,R)=>{const z=i.find(U=>U._id===R);if(z){const U=[...c];U[T]={...U[T],code:z.accountCode,name:z.accountName},m(U)}},A=(T,R,z)=>{const U=[...c];U[T][R]=z,m(U)},g=()=>{m([...c,{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}])},C=T=>{if(c.length>1){const R=c.filter((z,U)=>U!==T);m(R)}},E=async()=>{if(!e||!r){M.error("Please fill in all required fields");return}if(c.some(T=>!T.code||!T.debit&&!T.credit)){M.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token"),R=c.map(z=>{const U=i.find(X=>X.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Bank Receipt",date:r,reference:e,description:z.description,amount:parseFloat(z.debit)||parseFloat(z.credit),account:U._id,contraAccount:null,chequeNumber:z.chequeNumber,chequeDate:z.dated},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),M.success("Bank receipt voucher saved successfully"),O()}catch(T){console.error("Save error",T),M.error("Failed to save bank receipt voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),m([{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}]),h(0),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),M.success("Voucher cleared"))},L=()=>{M.info("Cancel functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Bank Receipt Voucher"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Add/Edit Bank Receipt Voucher"})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:E,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Cancel"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Voucher Number *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Cheque Number"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Dated"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[c.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>S(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>A(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.chequeNumber,onChange:z=>A(R,"chequeNumber",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Cheque Number"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"date",value:T.dated,onChange:z=>A(R,"dated",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.debit,onChange:z=>A(R,"debit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.credit,onChange:z=>A(R,"credit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:c.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:u.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},IW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState([]),[c,m]=b.useState([{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}]),[u,h]=b.useState(0),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[c]);const j=async()=>{try{const T=localStorage.getItem("token"),R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});o(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),M.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),U=String(T.getDate()).padStart(2,"0"),X=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${U}${X}`)},w=()=>{const T=c.reduce((z,U)=>z+(parseFloat(U.debit)||0),0),R=c.reduce((z,U)=>z+(parseFloat(U.credit)||0),0);h(T),x(R)},S=(T,R)=>{const z=i.find(U=>U._id===R);if(z){const U=[...c];U[T]={...U[T],code:z.accountCode,name:z.accountName},m(U)}},A=(T,R,z)=>{const U=[...c];U[T][R]=z,m(U)},g=()=>{m([...c,{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}])},C=T=>{if(c.length>1){const R=c.filter((z,U)=>U!==T);m(R)}},E=async()=>{if(!e||!r){M.error("Please fill in all required fields");return}if(c.some(T=>!T.code||!T.debit&&!T.credit)){M.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token"),R=c.map(z=>{const U=i.find(X=>X.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Bank Payment",date:r,reference:e,description:z.description,amount:parseFloat(z.debit)||parseFloat(z.credit),account:U._id,contraAccount:null,chequeNumber:z.chequeNumber,chequeDate:z.dated},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),M.success("Bank payment voucher saved successfully"),O()}catch(T){console.error("Save error",T),M.error("Failed to save bank payment voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),m([{code:"",name:"",description:"",chequeNumber:"",dated:"",debit:"",credit:""}]),h(0),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),M.success("Voucher cleared"))},L=()=>{M.info("Cancel functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Bank Payment Voucher"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Add/Edit Bank Payment Voucher"})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:E,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Cancel"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Voucher Number *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Cheque Number"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Dated"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[c.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>S(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>A(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.chequeNumber,onChange:z=>A(R,"chequeNumber",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Cheque Number"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"date",value:T.dated,onChange:z=>A(R,"dated",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.debit,onChange:z=>A(R,"debit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.credit,onChange:z=>A(R,"credit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:c.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:u.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},FW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState([]),[c,m]=b.useState([{code:"",name:"",description:"",debit:"",credit:""}]),[u,h]=b.useState(0),[p,x]=b.useState(0);b.useEffect(()=>{j(),v()},[]),b.useEffect(()=>{w()},[c]);const j=async()=>{try{const T=localStorage.getItem("token")||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4ZWY0NGNhNzQ3YWJmYjA5OGZlYjRjZSIsImVtYWlsIjoiYWhhZHF1cmVzaGkxNjc1NkBnbWFpbC5jb20iLCJ1c2VybmFtZSI6ImFoYWQiLCJyb2xlIjoic3VwZXJhZG1pbiIsImlhdCI6MTc2MTY1MDc3MCwiZXhwIjoxNzYyOTQ2NzcwfQ.pvJJRM4tl11bR6Qw6arXiu-tLlYYrwWJuPjzb_7h33E",R=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${T}`}});o(R.data.accounts||[])}catch(T){console.error("Load accounts error",T),M.error("Failed to load accounts")}},v=()=>{const T=new Date,R=T.getFullYear(),z=String(T.getMonth()+1).padStart(2,"0"),U=String(T.getDate()).padStart(2,"0"),X=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${R}${z}${U}${X}`)},w=()=>{const T=c.reduce((z,U)=>z+(parseFloat(U.debit)||0),0),R=c.reduce((z,U)=>z+(parseFloat(U.credit)||0),0);h(T),x(R)},S=(T,R)=>{const z=i.find(U=>U._id===R);if(z){const U=[...c];U[T]={...U[T],code:z.accountCode,name:z.accountName},m(U)}},A=(T,R,z)=>{const U=[...c];U[T][R]=z,m(U)},g=()=>{m([...c,{code:"",name:"",description:"",debit:"",credit:""}])},C=T=>{if(c.length>1){const R=c.filter((z,U)=>U!==T);m(R)}},E=async()=>{if(!e||!r){M.error("Please fill in all required fields");return}if(c.some(T=>!T.code||!T.debit&&!T.credit)){M.error("Please fill in all entry details");return}try{const T=localStorage.getItem("token")||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4ZWY0NGNhNzQ3YWJmYjA5OGZlYjRjZSIsImVtYWlsIjoiYWhhZHF1cmVzaGkxNjc1NkBnbWFpbC5jb20iLCJ1c2VybmFtZSI6ImFoYWQiLCJyb2xlIjoic3VwZXJhZG1pbiIsImlhdCI6MTc2MTY1MDc3MCwiZXhwIjoxNzYyOTQ2NzcwfQ.pvJJRM4tl11bR6Qw6arXiu-tLlYYrwWJuPjzb_7h33E",R=c.map(z=>{const U=i.find(X=>X.accountCode===z.code);return F.post("/api/accounting/transactions/",{transactionType:"Journal Voucher",date:r,reference:e,description:z.description,amount:parseFloat(z.debit)||parseFloat(z.credit),account:U._id,contraAccount:null},{headers:{Authorization:`Bearer ${T}`}})});await Promise.all(R),M.success("Journal voucher saved successfully"),O()}catch(T){console.error("Save error",T),M.error("Failed to save journal voucher")}},O=()=>{v(),n(new Date().toISOString().split("T")[0]),m([{code:"",name:"",description:"",debit:"",credit:""}]),h(0),x(0)},D=()=>{window.print()},B=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(O(),M.success("Voucher cleared"))},L=()=>{M.info("Cancel functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsxs("div",{children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Journal Voucher"}),t.jsx("p",{className:"text-sm text-gray-600",children:"Add/Edit Journal Voucher"})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:O,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:E,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:D,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:B,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:L,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Cancel"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Voucher Number *"}),t.jsx("input",{type:"text",value:e,onChange:T=>a(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:T=>n(T.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[c.map((T,R)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:T.code,onChange:z=>S(R,z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),i.map(z=>t.jsx("option",{value:z._id,children:z.accountCode},z._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:T.description,onChange:z=>A(R,"description",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.debit,onChange:z=>A(R,"debit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:T.credit,onChange:z=>A(R,"credit",z.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>C(R),disabled:c.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},R)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"3",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:u.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:p.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:g,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},UW=()=>{bs();const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(""),[c,m]=b.useState(1),u=10;b.useEffect(()=>{h()},[]);const h=async()=>{try{const w=localStorage.getItem("token"),A=await(await fetch("http://localhost:3001/api/accounting/job-payments/",{headers:{Authorization:`Bearer ${w}`}})).json();a(A)}catch{M.error("Failed to fetch job payments")}finally{n(!1)}},p=e.filter(w=>w.employer?.name?.toLowerCase().includes(i.toLowerCase())||w.job?.title?.toLowerCase().includes(i.toLowerCase())),x=Math.ceil(p.length/u),j=(c-1)*u,v=p.slice(j,j+u);return t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsx("div",{className:"max-w-7xl mx-auto px-4 py-6",children:t.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Manage Job Payments"}),t.jsx("button",{className:"bg-emerald-600 text-white px-4 py-2 rounded-md hover:bg-emerald-700",children:"Add New Payment"})]}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-gray-600",children:"Job Payment Listing"}),t.jsx("span",{className:"text-sm text-gray-500",children:"Employer"})]}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsxs("div",{className:"text-sm text-gray-600",children:[u," records"]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:"text-sm text-gray-600",children:"Search:"}),t.jsx("input",{type:"text",value:i,onChange:w=>o(w.target.value),className:"border border-gray-300 rounded px-2 py-1 text-sm",placeholder:"umer.aziz"})]})]})]}),r?t.jsx("div",{className:"text-center py-8",children:"Loading..."}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Id"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Name"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Email"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Phone"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Title"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"UnSkilled"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Semi Skilled"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Skilled"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Highly Skilled"}),t.jsx("th",{className:"px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Highly Qualified"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:v.length>0?v.map((w,S)=>t.jsxs("tr",{children:[t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:j+S+1}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.employer?.name||"N/A"}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.employer?.email||"N/A"}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.employer?.phone||"N/A"}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.job?.title||"N/A"}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.unSkilled||0}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.semiSkilled||0}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.skilled||0}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.highlySkilled||0}),t.jsx("td",{className:"px-4 py-2 whitespace-nowrap text-sm text-gray-900",children:w.highlyQualified||0})]},w._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"10",className:"px-4 py-8 text-center text-sm text-gray-500",children:"No data available in table"})})})]})}),t.jsxs("div",{className:"flex justify-between items-center mt-4",children:[t.jsxs("div",{className:"text-sm text-gray-700",children:["Showing ",j+1," to"," ",Math.min(j+u,p.length)," of"," ",p.length," entries"]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>m(w=>Math.max(w-1,1)),disabled:c===1,className:"px-3 py-1 border border-gray-300 rounded text-sm disabled:opacity-50",children:"Previous"}),t.jsxs("span",{className:"px-3 py-1 text-sm",children:["Page ",c," of ",x]}),t.jsx("button",{onClick:()=>m(w=>Math.min(w+1,x)),disabled:c===x,className:"px-3 py-1 border border-gray-300 rounded text-sm disabled:opacity-50",children:"Next"})]})]})]})})]})},$W=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!0),[c,m]=b.useState(!1),[u,h]=b.useState(null),[p,x]=b.useState("1"),[j,v]=b.useState({vouNumber:"",date:new Date().toISOString().split("T")[0],accountCode:"",payments:[{name:"",job:"",agent:"",description:"",amount:0}]});b.useEffect(()=>{w(),S(),A()},[]);const w=async()=>{try{const R=await F.get("/api/accounting/travel-agent-payments/",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});a(R.data)}catch{We.error("Failed to fetch travel agent payments")}finally{o(!1)}},S=async()=>{try{const R=await F.get("/api/config/travel-agents/",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});n(R.data)}catch{We.error("Failed to fetch travel agents")}},A=async()=>{try{const R=await F.get("/api/accounting/travel-agent-payments/next-vou-number",{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}});x(R.data.nextVouNumber),v(z=>({...z,vouNumber:R.data.nextVouNumber}))}catch{console.error("Failed to fetch next voucher number")}},g=async R=>{R.preventDefault();try{const z={...j,payments:j.payments.filter(U=>U.name&&U.job&&U.agent&&U.description&&U.amount>0)};u?(await F.put(`/api/accounting/travel-agent-payments/${u._id}`,z,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),We.success("Travel agent payment updated successfully")):(await F.post("/api/accounting/travel-agent-payments/",z,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),We.success("Travel agent payment created successfully")),w(),A(),O()}catch(z){We.error(z.response?.data?.message||"Failed to save payment")}},C=async R=>{if(window.confirm("Are you sure you want to delete this payment?"))try{await F.delete(`/api/accounting/travel-agent-payments/${R}`,{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`}}),We.success("Payment deleted successfully"),w()}catch{We.error("Failed to delete payment")}},E=R=>{h(R),v({vouNumber:R.vouNumber,date:new Date(R.date).toISOString().split("T")[0],accountCode:R.accountCode,payments:R.payments}),m(!0)},O=()=>{v({vouNumber:p,date:new Date().toISOString().split("T")[0],accountCode:"",payments:[{name:"",job:"",agent:"",description:"",amount:0}]}),h(null),m(!1)},D=()=>{v(R=>({...R,payments:[...R.payments,{name:"",job:"",agent:"",description:"",amount:0}]}))},B=R=>{v(z=>({...z,payments:z.payments.filter((U,X)=>X!==R)}))},L=(R,z,U)=>{v(X=>({...X,payments:X.payments.map((fe,se)=>se===R?{...fe,[z]:U}:fe)}))},T=()=>j.payments.reduce((R,z)=>R+(parseFloat(z.amount)||0),0);return i?t.jsx("div",{className:"flex justify-center items-center h-64",children:t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-emerald-600"})}):t.jsxs("div",{className:"min-h-screen bg-gray-50",children:[t.jsx(we,{}),t.jsxs("div",{className:"p-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Travel Agent Payment"}),t.jsxs("button",{onClick:()=>m(!c),className:"bg-emerald-600 text-white px-4 py-2 rounded-lg hover:bg-emerald-700 flex items-center gap-2",children:[t.jsx(Ve,{}),c?"Cancel":"Add Payment"]})]}),c&&t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:u?"Edit Travel Agent Payment":"Add Travel Agent Payment"}),t.jsxs("form",{onSubmit:g,children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:j.vouNumber,onChange:R=>v(z=>({...z,vouNumber:R.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:j.date,onChange:R=>v(z=>({...z,date:R.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Code *"}),t.jsx("input",{type:"text",value:j.accountCode,onChange:R=>v(z=>({...z,accountCode:R.target.value})),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-emerald-500",required:!0})]})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-50",children:[t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Job"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Agent"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Description"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Amount"}),t.jsx("th",{className:"px-4 py-2 border border-gray-300 text-left text-sm font-medium text-gray-700",children:"Actions"})]})}),t.jsx("tbody",{children:j.payments.map((R,z)=>t.jsxs("tr",{children:[t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsx("input",{type:"text",value:R.name,onChange:U=>L(z,"name",U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsx("input",{type:"text",value:R.job,onChange:U=>L(z,"job",U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsxs("select",{value:R.agent,onChange:U=>L(z,"agent",U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Agent"}),r.map(U=>t.jsxs("option",{value:U._id,children:[U.name," (",U.code,")"]},U._id))]})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsx("input",{type:"text",value:R.description,onChange:U=>L(z,"description",U.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:t.jsx("input",{type:"number",step:"0.01",value:R.amount,onChange:U=>L(z,"amount",parseFloat(U.target.value)||0),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-emerald-500",required:!0})}),t.jsx("td",{className:"px-4 py-2 border border-gray-300",children:j.payments.length>1&&t.jsx("button",{type:"button",onClick:()=>B(z),className:"text-red-600 hover:text-red-800",children:t.jsx(ze,{})})})]},z))})]})}),t.jsxs("div",{className:"flex justify-between items-center mt-4",children:[t.jsxs("button",{type:"button",onClick:D,className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 flex items-center gap-2",children:[t.jsx(Ve,{}),"Add Row"]}),t.jsxs("div",{className:"text-lg font-semibold",children:["Total: $",T().toFixed(2)]})]})]}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{type:"submit",className:"bg-emerald-600 text-white px-6 py-2 rounded-lg hover:bg-emerald-700 flex items-center gap-2",children:[t.jsx(Tn,{}),u?"Update":"Save"]}),t.jsxs("button",{type:"button",onClick:O,className:"bg-gray-600 text-white px-6 py-2 rounded-lg hover:bg-gray-700 flex items-center gap-2",children:[t.jsx(Rn,{}),"Cancel"]})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:t.jsx("h2",{className:"text-lg font-semibold text-gray-800",children:"Travel Agent Payments"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Vou #"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Date"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Account Code"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Total"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Created By"}),t.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),t.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"px-6 py-4 text-center text-gray-500",children:"No travel agent payments found"})}):e.map(R=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:R.vouNumber}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:new Date(R.date).toLocaleDateString()}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:R.accountCode}),t.jsxs("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:["$",R.total.toFixed(2)]}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:R.createdBy?.name||"Unknown"}),t.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium",children:t.jsxs("div",{className:"flex gap-2",children:[t.jsx("button",{onClick:()=>E(R),className:"text-blue-600 hover:text-blue-900",children:t.jsx(xt,{})}),t.jsx("button",{onClick:()=>C(R._id),className:"text-red-600 hover:text-red-900",children:t.jsx(ze,{})})]})})]},R._id))})]})})]})]})]})},qW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState([]),[j,v]=b.useState([]),[w,S]=b.useState([]),[A,g]=b.useState([]),[C,E]=b.useState([{name:"",job:"",agent:"",description:"",amount:""}]),[O,D]=b.useState(0);b.useEffect(()=>{B(),L(),T(),R(),z()},[]),b.useEffect(()=>{U()},[C]);const B=async()=>{try{const P=localStorage.getItem("token"),H=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${P}`}});x(H.data.accounts||[])}catch(P){console.error("Load accounts error",P),M.error("Failed to load accounts")}},L=async()=>{try{const P=localStorage.getItem("token"),H=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${P}`}});v(H.data||[])}catch(P){console.error("Load candidates error",P),M.error("Failed to load candidates")}},T=async()=>{try{const P=localStorage.getItem("token"),H=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${P}`}});S(H.data.categories||[])}catch(P){console.error("Load jobs error",P),M.error("Failed to load jobs")}},R=async()=>{try{const P=localStorage.getItem("token"),H=await F.get("/api/recruitment-agents/",{headers:{Authorization:`Bearer ${P}`}});g(H.data.agents||[])}catch(P){console.error("Load recruitment agents error",P),M.error("Failed to load recruitment agents")}},z=()=>{const P=new Date,H=P.getFullYear(),ee=String(P.getMonth()+1).padStart(2,"0"),pe=String(P.getDate()).padStart(2,"0"),ve=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${H}${ee}${pe}${ve}`)},U=()=>{const P=C.reduce((H,ee)=>H+(parseFloat(ee.amount)||0),0);D(P)},X=(P,H,ee)=>{const pe=[...C];pe[P][H]=ee,E(pe)},fe=()=>{E([...C,{name:"",job:"",agent:"",description:"",amount:""}])},se=P=>{if(C.length>1){const H=C.filter((ee,pe)=>pe!==P);E(H)}},ie=async()=>{if(!e||!r||!i||!c||!u){M.error("Please fill in all required fields");return}if(C.some(P=>!P.name||!P.amount)){M.error("Please fill in all entry details");return}try{const P=localStorage.getItem("token"),H=C.map(ee=>{const pe=j.find(ve=>ve.name===ee.name);return F.post("/api/accounting/transactions/",{transactionType:"Candidate Receipt",date:r,reference:e,description:ee.description,amount:parseFloat(ee.amount),account:i,contraAccount:i,candidate:pe?._id,job:c},{headers:{Authorization:`Bearer ${P}`}})});await Promise.all(H),M.success("Candidate receipt voucher saved successfully"),V()}catch(P){console.error("Save error",P),M.error("Failed to save candidate receipt voucher")}},V=()=>{z(),n(new Date().toISOString().split("T")[0]),o(""),m(""),h(""),E([{name:"",job:"",agent:"",description:"",amount:""}]),D(0)},K=()=>{window.print()},ce=()=>{M.info("Client print functionality - opens client receipt")},$=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(V(),M.success("Voucher cleared"))},I=()=>{M.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Candidate Receipts"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:V,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:ie,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:K,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:ce,className:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors flex items-center gap-2",children:[t.jsx(B3,{})," Client Print"]}),t.jsxs("button",{onClick:$,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:I,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Close"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:P=>a(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:P=>n(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Account Code *"}),t.jsxs("select",{value:i,onChange:P=>o(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Account"}),p.map(P=>t.jsxs("option",{value:P._id,children:[P.accountCode," - ",P.accountName]},P._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job *"}),t.jsxs("select",{value:c,onChange:P=>m(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Job"}),w.map(P=>t.jsx("option",{value:P._id,children:P.name},P._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsxs("select",{value:u,onChange:P=>h(P.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Candidate"}),j.map(P=>t.jsx("option",{value:P._id,children:P.name},P._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Job"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Agent"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[C.map((P,H)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:P.name,onChange:ee=>X(H,"name",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Candidate"}),j.map(ee=>t.jsx("option",{value:ee.name,children:ee.name},ee._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:P.job,onChange:ee=>X(H,"job",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Job"}),w.map(ee=>t.jsx("option",{value:ee.name,children:ee.name},ee._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:P.agent,onChange:ee=>X(H,"agent",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Agent"}),A.map(ee=>t.jsx("option",{value:ee.name,children:ee.name},ee._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:P.description,onChange:ee=>X(H,"description",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:P.amount,onChange:ee=>X(H,"amount",ee.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>se(H),disabled:C.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},H)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:O.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:fe,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},HW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState([]),[p,x]=b.useState([]),[j,v]=b.useState([]),[w,S]=b.useState([{code:"",name:"",ct:"",description:"",debit:"",credit:""}]),[A,g]=b.useState(0),[C,E]=b.useState(0);b.useEffect(()=>{O(),D(),B(),L()},[]),b.useEffect(()=>{T()},[w]);const O=async()=>{try{const K=localStorage.getItem("token"),ce=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${K}`}});h(ce.data.accounts||[])}catch(K){console.error("Load accounts error",K),M.error("Failed to load accounts")}},D=async()=>{try{const K=localStorage.getItem("token"),ce=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${K}`}});x(ce.data||[])}catch(K){console.error("Load candidates error",K),M.error("Failed to load candidates")}},B=async()=>{try{const K=localStorage.getItem("token"),ce=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${K}`}});v(ce.data.categories||[])}catch(K){console.error("Load jobs error",K),M.error("Failed to load jobs")}},L=()=>{const K=new Date,ce=K.getFullYear(),$=String(K.getMonth()+1).padStart(2,"0"),I=String(K.getDate()).padStart(2,"0"),P=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${ce}${$}${I}${P}`)},T=()=>{const K=w.reduce(($,I)=>$+(parseFloat(I.debit)||0),0),ce=w.reduce(($,I)=>$+(parseFloat(I.credit)||0),0);g(K),E(ce)},R=(K,ce)=>{const $=u.find(I=>I._id===ce);if($){const I=[...w];I[K]={...I[K],code:$.accountCode,name:$.accountName},S(I)}},z=(K,ce,$)=>{const I=[...w];I[K][ce]=$,S(I)},U=()=>{S([...w,{code:"",name:"",ct:"",description:"",debit:"",credit:""}])},X=K=>{if(w.length>1){const ce=w.filter(($,I)=>I!==K);S(ce)}},fe=async()=>{if(!e||!r||!i||!c){M.error("Please fill in all required fields");return}if(w.some(K=>!K.code||!K.debit&&!K.credit)){M.error("Please fill in all entry details");return}if(A!==C){M.error("Debit and Credit totals must be equal");return}try{const K=localStorage.getItem("token"),ce=w.map($=>{const I=u.find(H=>H.accountCode===$.code),P=p.find(H=>H.name===c);if(parseFloat($.debit)>0)return F.post("/api/accounting/transactions/",{transactionType:"Candidate JV",date:r,reference:e,description:$.description,amount:parseFloat($.debit),account:I._id,contraAccount:I._id,candidate:P?._id,job:i},{headers:{Authorization:`Bearer ${K}`}});if(parseFloat($.credit)>0)return F.post("/api/accounting/transactions/",{transactionType:"Candidate JV",date:r,reference:e,description:$.description,amount:-parseFloat($.credit),account:I._id,contraAccount:I._id,candidate:P?._id,job:i},{headers:{Authorization:`Bearer ${K}`}})}).filter(Boolean);await Promise.all(ce),M.success("Candidate JV saved successfully"),se()}catch(K){console.error("Save error",K),M.error("Failed to save candidate JV")}},se=()=>{L(),n(new Date().toISOString().split("T")[0]),o(""),m(""),S([{code:"",name:"",ct:"",description:"",debit:"",credit:""}]),g(0),E(0)},ie=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(se(),M.success("Voucher cleared"))},V=()=>{M.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Candidate JV"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:se,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:fe,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:ie,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:V,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Close"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:K=>a(K.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:K=>n(K.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job *"}),t.jsxs("select",{value:i,onChange:K=>o(K.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Job"}),j.map(K=>t.jsx("option",{value:K._id,children:K.name},K._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsxs("select",{value:c,onChange:K=>m(K.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Candidate"}),p.map(K=>t.jsx("option",{value:K.name,children:K.name},K._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"CT"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[w.map((K,ce)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:K.code,onChange:$=>R(ce,$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),u.map($=>t.jsx("option",{value:$._id,children:$.accountCode},$._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:K.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:K.ct,onChange:$=>z(ce,"ct",$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"CT"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:K.description,onChange:$=>z(ce,"description",$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:K.debit,onChange:$=>z(ce,"debit",$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:K.credit,onChange:$=>z(ce,"credit",$.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>X(ce),disabled:w.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},ce)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:A.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:C.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:U,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},VW=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(new Date().toISOString().split("T")[0]),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState([]),[j,v]=b.useState([]),[w,S]=b.useState([]),[A,g]=b.useState([{candidate:"",code:"",name:"",description:"",amount:""}]),[C,E]=b.useState(0);b.useEffect(()=>{O(),D(),B(),L()},[]),b.useEffect(()=>{T()},[A]);const O=async()=>{try{const $=localStorage.getItem("token"),I=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${$}`}});x(I.data.accounts||[])}catch($){console.error("Load accounts error",$),M.error("Failed to load accounts")}},D=async()=>{try{const $=localStorage.getItem("token"),I=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${$}`}});v(I.data||[])}catch($){console.error("Load candidates error",$),M.error("Failed to load candidates")}},B=async()=>{try{const $=localStorage.getItem("token"),I=await F.get("/api/config/job-categories/",{headers:{Authorization:`Bearer ${$}`}});S(I.data.categories||[])}catch($){console.error("Load jobs error",$),M.error("Failed to load jobs")}},L=()=>{const $=new Date,I=$.getFullYear(),P=String($.getMonth()+1).padStart(2,"0"),H=String($.getDate()).padStart(2,"0"),ee=Math.floor(Math.random()*1e3).toString().padStart(3,"0");a(`${I}${P}${H}${ee}`)},T=()=>{const $=A.reduce((I,P)=>I+(parseFloat(P.amount)||0),0);E($)},R=($,I)=>{const P=p.find(H=>H._id===I);if(P){const H=[...A];H[$]={...H[$],code:P.accountCode,name:P.accountName},g(H)}},z=($,I,P)=>{const H=[...A];H[$][I]=P,g(H)},U=()=>{g([...A,{candidate:"",code:"",name:"",description:"",amount:""}])},X=$=>{if(A.length>1){const I=A.filter((P,H)=>H!==$);g(I)}},fe=async()=>{if(!e||!r||!i||!c||!u){M.error("Please fill in all required fields");return}if(A.some($=>!$.candidate||!$.code||!$.amount)){M.error("Please fill in all entry details");return}try{const $=localStorage.getItem("token"),I=A.map(P=>{const H=p.find(pe=>pe.accountCode===P.code),ee=j.find(pe=>pe.name===P.candidate);return F.post("/api/accounting/transactions/",{transactionType:"Expenses Against Candidate",date:r,reference:e,description:P.description,amount:parseFloat(P.amount),account:H._id,contraAccount:i,candidate:ee?._id,job:c},{headers:{Authorization:`Bearer ${$}`}})});await Promise.all(I),M.success("Expenses against candidate saved successfully"),se()}catch($){console.error("Save error",$),M.error("Failed to save expenses against candidate")}},se=()=>{L(),n(new Date().toISOString().split("T")[0]),o(""),m(""),h(""),g([{candidate:"",code:"",name:"",description:"",amount:""}]),E(0)},ie=()=>{window.print()},V=()=>{M.info("Client print functionality - opens client receipt")},K=()=>{window.confirm("Are you sure you want to delete this voucher?")&&(se(),M.success("Voucher cleared"))},ce=()=>{M.info("Close functionality - navigate back to previous page")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-6xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Candidate Payments"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsxs("button",{onClick:se,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Ve,{})," New"]}),t.jsxs("button",{onClick:fe,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(Tn,{})," Save"]}),t.jsxs("button",{onClick:ie,className:"px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]}),t.jsxs("button",{onClick:V,className:"px-4 py-2 bg-indigo-600 text-white rounded-md hover:bg-indigo-700 transition-colors flex items-center gap-2",children:[t.jsx(B3,{})," Client Print"]}),t.jsxs("button",{onClick:K,className:"px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors flex items-center gap-2",children:[t.jsx(ze,{})," Delete"]}),t.jsxs("button",{onClick:ce,className:"px-4 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors flex items-center gap-2",children:[t.jsx(Rn,{})," Close"]})]})]}),t.jsx("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Vou # *"}),t.jsx("input",{type:"text",value:e,onChange:$=>a($.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date *"}),t.jsx("input",{type:"date",value:r,onChange:$=>n($.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account Code *"}),t.jsxs("select",{value:i,onChange:$=>o($.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Account"}),p.map($=>t.jsxs("option",{value:$._id,children:[$.accountCode," - ",$.accountName]},$._id))]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job *"}),t.jsxs("select",{value:c,onChange:$=>m($.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Job"}),w.map($=>t.jsx("option",{value:$._id,children:$.name},$._id))]})]}),t.jsxs("div",{className:"md:col-span-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsxs("select",{value:u,onChange:$=>h($.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0,children:[t.jsx("option",{value:"",children:"Select Candidate"}),j.map($=>t.jsx("option",{value:$.name,children:$.name},$._id))]})]})]})}),t.jsx("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsxs("tbody",{children:[A.map(($,I)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:$.candidate,onChange:P=>z(I,"candidate",P.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Candidate"}),j.map(P=>t.jsx("option",{value:P.name,children:P.name},P._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsxs("select",{value:$.code,onChange:P=>R(I,P.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account"}),p.map(P=>t.jsx("option",{value:P._id,children:P.accountCode},P._id))]})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:$.name,readOnly:!0,className:"w-full px-2 py-1 border border-gray-300 rounded bg-gray-50",placeholder:"Auto-filled"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"text",value:$.description,onChange:P=>z(I,"description",P.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Description"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"number",step:"0.01",value:$.amount,onChange:P=>z(I,"amount",P.target.value),className:"w-full px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"0.00"})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>X(I),disabled:A.length===1,className:"px-2 py-1 bg-red-500 text-white rounded hover:bg-red-600 disabled:bg-gray-300",children:t.jsx(ze,{})})})]},I)),t.jsxs("tr",{children:[t.jsx("td",{colSpan:"4",className:"border border-gray-300 px-4 py-2 text-right font-semibold",children:"Total"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:C.toFixed(2)}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:U,className:"px-2 py-1 bg-blue-500 text-white rounded hover:bg-blue-600",children:t.jsx(Ve,{})})})]})]})]})})]})]})},dC=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState({fromDate:"",toDate:"",filterZeroBalance:!1}),c=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.fromDate&&(x.fromDate=i.fromDate),i.toDate&&(x.toDate=i.toDate),x.filterZeroBalance=i.filterZeroBalance;const j=await F.get("/api/accounting/reports/trial-balance",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.trialBalance||[])}catch(p){console.error("Load trial balance error",p),M.error("Failed to load trial balance")}finally{n(!1)}},m=p=>{const{name:x,value:j,type:v,checked:w}=p.target;o({...i,[x]:v==="checkbox"?w:j})},u=()=>{c()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Trial Balance"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{}),"Show Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"fromDate",value:i.fromDate,onChange:m,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"toDate",value:i.toDate,onChange:m,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("input",{type:"checkbox",name:"filterZeroBalance",checked:i.filterZeroBalance,onChange:m,className:"mr-2"}),t.jsx("label",{className:"text-sm font-medium text-gray-700",children:"Filter Zero Balance"})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Data"}),r?t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading trial balance..."})]}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Opening Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((p,x)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.code}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.accountName}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.openingBalance}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.debit}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.credit}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.balance})]},x)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No trial balance data found. Please adjust filters and view report."})})})]})})]})]})]})},YW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState({fromDate:"",toDate:"",account:""});b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts",{headers:{Authorization:`Bearer ${v}`}});n(w.data.accounts||[])}catch(v){console.error("Load accounts error",v),M.error("Failed to load accounts")}},h=async()=>{o(!0);try{const v=localStorage.getItem("token"),w={};c.fromDate&&(w.fromDate=c.fromDate),c.toDate&&(w.toDate=c.toDate),c.account&&(w.accountId=c.account);const S=await F.get("/api/accounting/reports/account-balances",{headers:{Authorization:`Bearer ${v}`},params:w});a(S.data.balances||[])}catch(v){console.error("Load balances error",v),M.error("Failed to load balances")}finally{o(!1)}},p=v=>{m({...c,[v.target.name]:v.target.value})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Account Balances"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"fromDate",value:c.fromDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"toDate",value:c.toDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account"}),t.jsxs("select",{name:"account",value:c.account,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"All Accounts"}),r.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Balances Data"})}),i?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading balances..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Code"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Account Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit Balance"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Net Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.accountCode}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.accountName}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.accountType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debitBalance?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.creditBalance?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.netBalance?.toFixed(2)||"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No balances found. Please adjust filters and view report."})})})]})]})]})]})},KW=()=>{const[e,a]=b.useState({}),[r,n]=b.useState(!1),[i,o]=b.useState({startDate:"",endDate:""}),c=p=>{o({...i,[p.target.name]:p.target.value})},m=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.startDate&&(x.startDate=i.startDate),i.endDate&&(x.endDate=i.endDate);const j=await F.get("/api/accounting/reports/income-statement",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.incomeStatement||{})}catch(p){console.error("Load income statement error",p),M.error("Failed to load income statement")}finally{n(!1)}},u=()=>{m()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Income Statement Report"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"startDate",value:i.startDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"endDate",value:i.endDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading income statement..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sr. No."}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Particulars"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Most Inner Column"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Inner Column"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Outer Column"})]})}),t.jsx("tbody",{children:e.revenue!==void 0?t.jsxs(t.Fragment,{children:[t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"1"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Revenue"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.revenue?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Expenses"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.expenses?.toFixed(2)||"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"})]}),t.jsxs("tr",{className:"hover:bg-gray-50 font-semibold",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"3"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Net Income"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.netIncome?.toFixed(2)||"0.00"})]})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data found. Please adjust filters and view report."})})})]})]})]})]})},GW=()=>{const[e,a]=b.useState({}),[r,n]=b.useState(!1),[i,o]=b.useState({startDate:"",endDate:""}),c=p=>{o({...i,[p.target.name]:p.target.value})},m=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.startDate&&(x.startDate=i.startDate),i.endDate&&(x.endDate=i.endDate);const j=await F.get("/api/accounting/reports/balance-sheet",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.balanceSheet||{})}catch(p){console.error("Load balance sheet error",p),M.error("Failed to load balance sheet")}finally{n(!1)}},u=()=>{m()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Balance Sheet Report"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"startDate",value:i.startDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"endDate",value:i.endDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Balance Sheet"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading balance sheet..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Particulars"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"})]})}),t.jsx("tbody",{children:e.assets!==void 0?t.jsxs(t.Fragment,{children:[t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Assets"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.assets?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Liabilities"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.liabilities?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Equity"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.equity?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50 font-bold",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Total Liabilities and Equity"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.totalLiabilitiesAndEquity?.toFixed(2)||"0.00"})]})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data found. Please adjust filters and view report."})})})]})]})]})]})},JW=()=>{const[e,a]=b.useState({}),[r,n]=b.useState(!1),[i,o]=b.useState({startDate:"",endDate:""}),c=p=>{o({...i,[p.target.name]:p.target.value})},m=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.startDate&&(x.startDate=i.startDate),i.endDate&&(x.endDate=i.endDate);const j=await F.get("/api/accounting/reports/cash-flow-statement",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.cashFlowStatement||{})}catch(p){console.error("Load cash flow statement error",p),M.error("Failed to load cash flow statement")}finally{n(!1)}},u=()=>{m()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Cash Flow Statement"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"startDate",value:i.startDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"endDate",value:i.endDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading cash flow statement..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Particulars"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"})]})}),t.jsx("tbody",{children:e.operatingCashFlow!==void 0?t.jsxs(t.Fragment,{children:[t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Operating Cash Flow"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.operatingCashFlow?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Investing Cash Flow"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.investingCashFlow?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Financing Cash Flow"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.financingCashFlow?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50 font-bold",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Net Cash Flow"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.netCashFlow?.toFixed(2)||"0.00"})]})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data found. Please adjust filters and view report."})})})]})]})]})]})},WW=()=>{const[e,a]=b.useState({}),[r,n]=b.useState(!1),[i,o]=b.useState({startDate:"",endDate:""}),c=p=>{o({...i,[p.target.name]:p.target.value})},m=async()=>{n(!0);try{const p=localStorage.getItem("token"),x={};i.startDate&&(x.startDate=i.startDate),i.endDate&&(x.endDate=i.endDate);const j=await F.get("/api/accounting/reports/statement-of-owners-equity",{headers:{Authorization:`Bearer ${p}`},params:x});a(j.data.statementOfOwnersEquity||{})}catch(p){console.error("Load statement of owners equity error",p),M.error("Failed to load statement of owners equity")}finally{n(!1)}},u=()=>{m()},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Statement of Owners Equity Report"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{})," View Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{})," Print"]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date *"}),t.jsx("input",{type:"date",name:"startDate",value:i.startDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date *"}),t.jsx("input",{type:"date",name:"endDate",value:i.endDate,onChange:c,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[t.jsx("div",{className:"p-4 border-b",children:t.jsx("h2",{className:"text-lg font-semibold",children:"Report Data"})}),r?t.jsx("div",{className:"p-8 text-center",children:t.jsx("div",{className:"text-gray-500",children:"Loading statement of owners equity..."})}):t.jsxs("table",{className:"w-full table-auto border-collapse",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Particulars"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Amount"})]})}),t.jsx("tbody",{children:e.openingEquity!==void 0?t.jsxs(t.Fragment,{children:[t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Opening Equity"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.openingEquity?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Net Income"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.netIncome?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2 font-semibold",children:"Equity Changes"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.equityChanges?.toFixed(2)||"0.00"})]}),t.jsxs("tr",{className:"hover:bg-gray-50 font-bold",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:"Closing Equity"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:e.closingEquity?.toFixed(2)||"0.00"})]})]}):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data found. Please adjust filters and view report."})})})]})]})]})]})},QW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({code:"",username:"",companyName:"",city:"",state:"",country:"",password:"",ownership:"",sector:"",salesTurnover:"",numberOfEmployees:"",numberOfOffices:"",companyInfo:"",companyAddress:"",zip:"",street:"",fax:"",website:"",plan:"",phone:"",type:"",email:"",contactPersonName:"",contactPersonPhone:"",files:[]});b.useEffect(()=>{p()},[]);const p=async()=>{try{const C=localStorage.getItem("token"),E=await F.get("/api/employers/",{headers:{Authorization:`Bearer ${C}`}});a(E.data.employers)}catch(C){M.error("Failed to fetch employers"),console.error(C)}finally{n(!1)}},x=C=>{const{name:E,value:O}=C.target;h({...u,[E]:O})},j=C=>{h({...u,files:Array.from(C.target.files)})},v=async C=>{C.preventDefault();try{const E=localStorage.getItem("token"),O=new FormData;Object.keys(u).forEach(D=>{D==="files"?u.files.forEach(B=>O.append("files",B)):O.append(D,u[D])}),c?(await F.put(`/api/employers/${c._id}`,O,{headers:{Authorization:`Bearer ${E}`}}),M.success("Employer updated successfully")):(await F.post("/api/employers/",O,{headers:{Authorization:`Bearer ${E}`}}),M.success("Employer created successfully")),o(!1),m(null),A(),p()}catch(E){M.error(E.response?.data?.message||"Failed to save employer"),console.error(E)}},w=C=>{m(C),h({code:C.code,username:C.username,companyName:C.companyName,city:C.city,state:C.state,country:C.country,password:"",ownership:C.ownership||"",sector:C.sector||"",salesTurnover:C.salesTurnover||"",numberOfEmployees:C.numberOfEmployees||"",numberOfOffices:C.numberOfOffices||"",companyInfo:C.companyInfo||"",companyAddress:C.companyAddress||"",zip:C.zip||"",street:C.street||"",fax:C.fax||"",website:C.website||"",plan:C.plan||"",phone:C.phone||"",type:C.type||"",email:C.email,contactPersonName:C.contactPersonName||"",contactPersonPhone:C.contactPersonPhone||"",files:[]}),o(!0)},S=async C=>{if(window.confirm("Are you sure you want to delete this employer?"))try{const E=localStorage.getItem("token");await F.delete(`/api/employers/${C}`,{headers:{Authorization:`Bearer ${E}`}}),M.success("Employer deleted successfully"),p()}catch(E){M.error("Failed to delete employer"),console.error(E)}},A=()=>{h({code:"",username:"",companyName:"",city:"",state:"",country:"",password:"",ownership:"",sector:"",salesTurnover:"",numberOfEmployees:"",numberOfOffices:"",companyInfo:"",companyAddress:"",zip:"",street:"",fax:"",website:"",plan:"",phone:"",type:"",email:"",contactPersonName:"",contactPersonPhone:"",files:[]})},g=()=>{m(null),A(),o(!0)};return r?t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("div",{className:"text-center",children:"Loading..."})]}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Employers"}),i?t.jsxs("div",{className:"bg-white p-6 rounded shadow-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Employer":"Add/Edit Detail"}),t.jsxs("form",{onSubmit:v,className:"space-y-4",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Username *"}),t.jsx("input",{type:"text",name:"username",value:u.username,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Password *"}),t.jsx("input",{type:"password",name:"password",value:u.password,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!c})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Code *"}),t.jsx("input",{type:"text",name:"code",value:u.code,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Company Name *"}),t.jsx("input",{type:"text",name:"companyName",value:u.companyName,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Ownership"}),t.jsx("input",{type:"text",name:"ownership",value:u.ownership,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Sector / Industry"}),t.jsx("input",{type:"text",name:"sector",value:u.sector,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Sales Turnover"}),t.jsx("input",{type:"text",name:"salesTurnover",value:u.salesTurnover,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Number Of Employees"}),t.jsx("input",{type:"text",name:"numberOfEmployees",value:u.numberOfEmployees,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Number Of Offices"}),t.jsx("input",{type:"text",name:"numberOfOffices",value:u.numberOfOffices,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Company Info"}),t.jsx("textarea",{name:"companyInfo",value:u.companyInfo,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Company Address"}),t.jsx("input",{type:"text",name:"companyAddress",value:u.companyAddress,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Country"}),t.jsx("input",{type:"text",name:"country",value:u.country,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"State"}),t.jsx("input",{type:"text",name:"state",value:u.state,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"City *"}),t.jsx("input",{type:"text",name:"city",value:u.city,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Zip"}),t.jsx("input",{type:"text",name:"zip",value:u.zip,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Street *"}),t.jsx("input",{type:"text",name:"street",value:u.street,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Fax"}),t.jsx("input",{type:"text",name:"fax",value:u.fax,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Website URL"}),t.jsx("input",{type:"text",name:"website",value:u.website,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Plan"}),t.jsx("input",{type:"text",name:"plan",value:u.plan,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Phone Number"}),t.jsx("input",{type:"text",name:"phone",value:u.phone,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Type"}),t.jsx("input",{type:"text",name:"type",value:u.type,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Email *"}),t.jsx("input",{type:"email",name:"email",value:u.email,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("h3",{className:"text-lg font-medium mb-2",children:"Contact Person"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Name *"}),t.jsx("input",{type:"text",name:"contactPersonName",value:u.contactPersonName,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Phone *"}),t.jsx("input",{type:"text",name:"contactPersonPhone",value:u.contactPersonPhone,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]})]})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Files"}),t.jsx("input",{type:"file",multiple:!0,onChange:j,className:"w-full border border-gray-300 p-2 rounded"})]})]}),t.jsxs("div",{className:"flex justify-end space-x-2",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600",children:"Cancel"}),t.jsx("button",{type:"submit",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:"Save"}),!c&&t.jsx("button",{type:"submit",className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"Save & Close"})]})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-4",children:t.jsx("button",{onClick:g,className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"New"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border",children:"Code"}),t.jsx("th",{className:"px-4 py-2 border",children:"Username"}),t.jsx("th",{className:"px-4 py-2 border",children:"Company Name"}),t.jsx("th",{className:"px-4 py-2 border",children:"City"}),t.jsx("th",{className:"px-4 py-2 border",children:"State"}),t.jsx("th",{className:"px-4 py-2 border",children:"Country"}),t.jsx("th",{className:"px-4 py-2 border",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(C=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border",children:C.code}),t.jsx("td",{className:"px-4 py-2 border",children:C.username}),t.jsx("td",{className:"px-4 py-2 border",children:C.companyName}),t.jsx("td",{className:"px-4 py-2 border",children:C.city}),t.jsx("td",{className:"px-4 py-2 border",children:C.state}),t.jsx("td",{className:"px-4 py-2 border",children:C.country}),t.jsxs("td",{className:"px-4 py-2 border",children:[t.jsx("button",{onClick:()=>w(C),className:"bg-yellow-500 text-white px-2 py-1 rounded mr-2 hover:bg-yellow-600",children:"Edit"}),t.jsx("button",{onClick:()=>S(C._id),className:"bg-red-500 text-white px-2 py-1 rounded hover:bg-red-600",children:"Delete"})]})]},C._id))})]})})]})]})},XW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({name:"",amount:"",validForDays:"",maxJobsAllowed:"",supportsFeaturedJobs:!0,allowedNumberOfFeaturedJobs:"",featuredJobAmount:"",featuredEmployerAmount:""});b.useEffect(()=>{p()},[]);const p=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/employer-plans/",{headers:{Authorization:`Bearer ${g}`}});a(C.data.plans)}catch(g){M.error("Failed to fetch employer plans"),console.error(g)}finally{n(!1)}},x=g=>{const{name:C,value:E,type:O,checked:D}=g.target;h({...u,[C]:O==="checkbox"?D:E})},j=async g=>{g.preventDefault();const C=g.nativeEvent.submitter.value;try{const E=localStorage.getItem("token"),O={...u,amount:parseFloat(u.amount),validForDays:parseInt(u.validForDays),maxJobsAllowed:parseInt(u.maxJobsAllowed),allowedNumberOfFeaturedJobs:parseInt(u.allowedNumberOfFeaturedJobs),featuredJobAmount:parseFloat(u.featuredJobAmount),featuredEmployerAmount:parseFloat(u.featuredEmployerAmount)};c?(await F.put(`/api/employer-plans/${c._id}`,O,{headers:{Authorization:`Bearer ${E}`}}),M.success("Employer plan updated successfully")):(await F.post("/api/employer-plans/",O,{headers:{Authorization:`Bearer ${E}`}}),M.success("Employer plan created successfully")),p(),C==="saveAndClose"?(o(!1),m(null),S()):c||S()}catch(E){M.error(E.response?.data?.message||"Failed to save employer plan"),console.error(E)}},v=g=>{m(g),h({name:g.name,amount:g.amount.toString(),validForDays:g.validForDays.toString(),maxJobsAllowed:g.maxJobsAllowed.toString(),supportsFeaturedJobs:g.supportsFeaturedJobs,allowedNumberOfFeaturedJobs:g.allowedNumberOfFeaturedJobs.toString(),featuredJobAmount:g.featuredJobAmount.toString(),featuredEmployerAmount:g.featuredEmployerAmount.toString()}),o(!0)},w=async g=>{if(window.confirm("Are you sure you want to delete this employer plan?"))try{const C=localStorage.getItem("token");await F.delete(`/api/employer-plans/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Employer plan deleted successfully"),p()}catch(C){M.error("Failed to delete employer plan"),console.error(C)}},S=()=>{h({name:"",amount:"",validForDays:"",maxJobsAllowed:"",supportsFeaturedJobs:!0,allowedNumberOfFeaturedJobs:"",featuredJobAmount:"",featuredEmployerAmount:""})},A=()=>{m(null),S(),o(!0)};return r?t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("div",{className:"text-center",children:"Loading..."})]}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Employer Plans"}),i?t.jsxs("div",{className:"bg-white p-6 rounded shadow-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Employer Plan":"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"space-y-4",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Plan Name : *"}),t.jsx("input",{type:"text",name:"name",value:u.name,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Plan Amount :"}),t.jsx("input",{type:"number",step:"0.01",name:"amount",value:u.amount,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Valid For (In days) :"}),t.jsx("input",{type:"number",name:"validForDays",value:u.validForDays,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Maximum Jobs Allowed :"}),t.jsx("input",{type:"number",name:"maxJobsAllowed",value:u.maxJobsAllowed,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0}),t.jsx("small",{className:"text-gray-500",children:"[Maximum No of jobs, employer can post.-1 for unlimited]"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsxs("label",{className:"block text-sm font-medium",children:[t.jsx("input",{type:"checkbox",name:"supportsFeaturedJobs",checked:!u.supportsFeaturedJobs,onChange:g=>h({...u,supportsFeaturedJobs:!g.target.checked}),className:"mr-2"}),"This Plan Doesn't Support to mark a job/employer as a feature job/employer"]}),t.jsx("small",{className:"text-gray-500 block",children:"(If Checked, User will not be able to mark their job as featured job/feature employer)"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Allowed Number Of Featured Job :"}),t.jsx("input",{type:"number",name:"allowedNumberOfFeaturedJobs",value:u.allowedNumberOfFeaturedJobs,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0}),t.jsx("small",{className:"text-gray-500",children:"[Employer will be able to mark his/her job as featured job under this limitation.-1 for unlimited]"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Featured Job Amount :"}),t.jsx("input",{type:"number",step:"0.01",name:"featuredJobAmount",value:u.featuredJobAmount,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0}),t.jsx("small",{className:"text-gray-500",children:"(If employer exceed his/her limit of featured job request this amount will be charge to the employer account.)"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Featured Employer Amount :"}),t.jsx("input",{type:"number",step:"0.01",name:"featuredEmployerAmount",value:u.featuredEmployerAmount,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0}),t.jsx("small",{className:"text-gray-500",children:"(This Amount will be charge if employer wants to mark him as a featured employer)"})]})]}),t.jsxs("div",{className:"flex justify-end space-x-2",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600",children:"Cancel"}),t.jsx("button",{type:"submit",value:"save",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:"Save"}),t.jsx("button",{type:"submit",value:"saveAndClose",className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"Save & Close"})]})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-4",children:t.jsx("button",{onClick:A,className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"New"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border",children:"Amount"}),t.jsx("th",{className:"px-4 py-2 border",children:"Max Jobs Allowed"}),t.jsx("th",{className:"px-4 py-2 border",children:"Allowed Number Of Featured Job"}),t.jsx("th",{className:"px-4 py-2 border",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border",children:g.name}),t.jsx("td",{className:"px-4 py-2 border",children:g.amount.toFixed(2)}),t.jsx("td",{className:"px-4 py-2 border",children:g.maxJobsAllowed===-1?"Unlimited":g.maxJobsAllowed}),t.jsx("td",{className:"px-4 py-2 border",children:g.allowedNumberOfFeaturedJobs===-1?"Unlimited":g.allowedNumberOfFeaturedJobs}),t.jsxs("td",{className:"px-4 py-2 border",children:[t.jsx("button",{onClick:()=>v(g),className:"bg-yellow-500 text-white px-2 py-1 rounded mr-2 hover:bg-yellow-600",children:"Edit"}),t.jsx("button",{onClick:()=>w(g._id),className:"bg-red-500 text-white px-2 py-1 rounded hover:bg-red-600",children:"Delete"})]})]},g._id))})]})})]})]})},ZW=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!0),[i,o]=b.useState(!1),[c,m]=b.useState(null),[u,h]=b.useState({employer:"",jobTitle:"",jobNo:"",processTypes:"",receiptDate:"",letterNo:"",visaNo:"",numberOfVisa:"",visaDate:"",currency:"",permissionNo:"",permissionDate:"",issuanceDate:"",deadlineDate:"",salaryAmount:"",deploymentArea:"",city:"",state:"",country:"",categories:"",jobTitleForDisplay:"",type:"",noOfPerson:"",educationalCategory:"",educationLevel:"",experienceRange:"",ageRange:"",salaryRange:"",careerLevel:"",salary:"",contractDuration:"",skills:"",additionalExperience:"",jobDetails:"",specialInstructions:"",jobDescription:"",jobType:"Full Time",applyMode:"With Resume Online",jobStatus:"Open",showOnWeb:!1});b.useEffect(()=>{p()},[]);const p=async()=>{try{const g=localStorage.getItem("token"),C=await F.get("/api/jobs/",{headers:{Authorization:`Bearer ${g}`}});a(C.data.jobs)}catch(g){M.error("Failed to fetch jobs"),console.error(g)}finally{n(!1)}},x=g=>{const{name:C,value:E,type:O,checked:D}=g.target;h({...u,[C]:O==="checkbox"?D:E})},j=async g=>{g.preventDefault();const C=g.nativeEvent.submitter.value;try{const E=localStorage.getItem("token"),O={...u,numberOfVisa:parseInt(u.numberOfVisa)||0,salaryAmount:parseFloat(u.salaryAmount)||0,noOfPerson:parseInt(u.noOfPerson)||0,salary:parseFloat(u.salary)||0,contractDuration:parseInt(u.contractDuration)||0};c?(await F.put(`/api/jobs/${c._id}`,O,{headers:{Authorization:`Bearer ${E}`}}),M.success("Job updated successfully")):(await F.post("/api/jobs/",O,{headers:{Authorization:`Bearer ${E}`}}),M.success("Job created successfully")),p(),C==="saveAndClose"?(o(!1),m(null),S()):c||S()}catch(E){M.error(E.response?.data?.message||"Failed to save job"),console.error(E)}},v=g=>{m(g),h({employer:g.employer||"",jobTitle:g.jobTitle||"",jobNo:g.jobNo||"",processTypes:g.processTypes||"",receiptDate:g.receiptDate||"",letterNo:g.letterNo||"",visaNo:g.visaNo||"",numberOfVisa:g.numberOfVisa||"",visaDate:g.visaDate||"",currency:g.currency||"",permissionNo:g.permissionNo||"",permissionDate:g.permissionDate||"",issuanceDate:g.issuanceDate||"",deadlineDate:g.deadlineDate||"",salaryAmount:g.salaryAmount||"",deploymentArea:g.deploymentArea||"",city:g.city||"",state:g.state||"",country:g.country||"",categories:g.categories||"",jobTitleForDisplay:g.jobTitleForDisplay||"",type:g.type||"",noOfPerson:g.noOfPerson||"",educationalCategory:g.educationalCategory||"",educationLevel:g.educationLevel||"",experienceRange:g.experienceRange||"",ageRange:g.ageRange||"",salaryRange:g.salaryRange||"",careerLevel:g.careerLevel||"",salary:g.salary||"",contractDuration:g.contractDuration||"",skills:g.skills||"",additionalExperience:g.additionalExperience||"",jobDetails:g.jobDetails||"",specialInstructions:g.specialInstructions||"",jobDescription:g.jobDescription||"",jobType:g.jobType||"Full Time",applyMode:g.applyMode||"With Resume Online",jobStatus:g.jobStatus||"Open",showOnWeb:g.showOnWeb||!1}),o(!0)},w=async g=>{if(window.confirm("Are you sure you want to delete this job?"))try{const C=localStorage.getItem("token");await F.delete(`/api/jobs/${g}`,{headers:{Authorization:`Bearer ${C}`}}),M.success("Job deleted successfully"),p()}catch(C){M.error("Failed to delete job"),console.error(C)}},S=()=>{h({employer:"",jobTitle:"",jobNo:"",processTypes:"",receiptDate:"",letterNo:"",visaNo:"",numberOfVisa:"",visaDate:"",currency:"",permissionNo:"",permissionDate:"",issuanceDate:"",deadlineDate:"",salaryAmount:"",deploymentArea:"",city:"",state:"",country:"",categories:"",jobTitleForDisplay:"",type:"",noOfPerson:"",educationalCategory:"",educationLevel:"",experienceRange:"",ageRange:"",salaryRange:"",careerLevel:"",salary:"",contractDuration:"",skills:"",additionalExperience:"",jobDetails:"",specialInstructions:"",jobDescription:"",jobType:"Full Time",applyMode:"With Resume Online",jobStatus:"Open",showOnWeb:!1})},A=()=>{m(null),S(),o(!0)};return r?t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("div",{className:"text-center",children:"Loading..."})]}):t.jsxs("div",{className:"p-6",children:[t.jsx(we,{}),t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Jobs"}),i?t.jsxs("div",{className:"bg-white p-6 rounded shadow-md",children:[t.jsx("h2",{className:"text-xl font-bold mb-4",children:c?"Edit Job":"Add/Edit Detail"}),t.jsxs("form",{onSubmit:j,className:"space-y-4",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Employer *"}),t.jsx("input",{type:"text",name:"employer",value:u.employer,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Title *"}),t.jsx("input",{type:"text",name:"jobTitle",value:u.jobTitle,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job No. *"}),t.jsx("input",{type:"text",name:"jobNo",value:u.jobNo,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Process Types *"}),t.jsx("input",{type:"text",name:"processTypes",value:u.processTypes,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Receipt Date"}),t.jsx("input",{type:"date",name:"receiptDate",value:u.receiptDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Letter No"}),t.jsx("input",{type:"text",name:"letterNo",value:u.letterNo,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Visa No"}),t.jsx("input",{type:"text",name:"visaNo",value:u.visaNo,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Number of Visa"}),t.jsx("input",{type:"number",name:"numberOfVisa",value:u.numberOfVisa,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Visa Date"}),t.jsx("input",{type:"date",name:"visaDate",value:u.visaDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Currency"}),t.jsx("input",{type:"text",name:"currency",value:u.currency,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Permission No. *"}),t.jsx("input",{type:"text",name:"permissionNo",value:u.permissionNo,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Permission Date *"}),t.jsx("input",{type:"date",name:"permissionDate",value:u.permissionDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Issuance Date"}),t.jsx("input",{type:"date",name:"issuanceDate",value:u.issuanceDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Deadline Date"}),t.jsx("input",{type:"date",name:"deadlineDate",value:u.deadlineDate,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Salary Amount"}),t.jsx("input",{type:"number",step:"0.01",name:"salaryAmount",value:u.salaryAmount,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Deployment Area"}),t.jsx("input",{type:"text",name:"deploymentArea",value:u.deploymentArea,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"City"}),t.jsx("input",{type:"text",name:"city",value:u.city,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"State"}),t.jsx("input",{type:"text",name:"state",value:u.state,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Country"}),t.jsx("input",{type:"text",name:"country",value:u.country,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Categories *"}),t.jsx("input",{type:"text",name:"categories",value:u.categories,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Title for Display *"}),t.jsx("input",{type:"text",name:"jobTitleForDisplay",value:u.jobTitleForDisplay,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Type *"}),t.jsx("input",{type:"text",name:"type",value:u.type,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"No of Person *"}),t.jsx("input",{type:"number",name:"noOfPerson",value:u.noOfPerson,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Educational Category"}),t.jsx("input",{type:"text",name:"educationalCategory",value:u.educationalCategory,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Education Level"}),t.jsx("input",{type:"text",name:"educationLevel",value:u.educationLevel,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Experience Range"}),t.jsx("input",{type:"text",name:"experienceRange",value:u.experienceRange,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Age Range"}),t.jsx("input",{type:"text",name:"ageRange",value:u.ageRange,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Salary Range"}),t.jsx("input",{type:"text",name:"salaryRange",value:u.salaryRange,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Career Level"}),t.jsx("input",{type:"text",name:"careerLevel",value:u.careerLevel,onChange:x,className:"w-full border border-gray-300 p-2 rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Salary *"}),t.jsx("input",{type:"number",step:"0.01",name:"salary",value:u.salary,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Contract Duration *"}),t.jsx("input",{type:"number",name:"contractDuration",value:u.contractDuration,onChange:x,className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Skills"}),t.jsx("textarea",{name:"skills",value:u.skills,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Additional Experience"}),t.jsx("textarea",{name:"additionalExperience",value:u.additionalExperience,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Details"}),t.jsx("textarea",{name:"jobDetails",value:u.jobDetails,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Special Instructions"}),t.jsx("textarea",{name:"specialInstructions",value:u.specialInstructions,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Description"}),t.jsx("textarea",{name:"jobDescription",value:u.jobDescription,onChange:x,className:"w-full border border-gray-300 p-2 rounded",rows:"3"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Type"}),t.jsxs("select",{name:"jobType",value:u.jobType,onChange:x,className:"w-full border border-gray-300 p-2 rounded",children:[t.jsx("option",{value:"Full Time",children:"Full Time"}),t.jsx("option",{value:"Part Time",children:"Part Time"}),t.jsx("option",{value:"Contract",children:"Contract"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Apply Mode"}),t.jsxs("select",{name:"applyMode",value:u.applyMode,onChange:x,className:"w-full border border-gray-300 p-2 rounded",children:[t.jsx("option",{value:"With Resume Online",children:"With Resume Online"}),t.jsx("option",{value:"Via Email",children:"Via Email"}),t.jsx("option",{value:"Via Post",children:"Via Post"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium",children:"Job Status"}),t.jsxs("select",{name:"jobStatus",value:u.jobStatus,onChange:x,className:"w-full border border-gray-300 p-2 rounded",children:[t.jsx("option",{value:"Open",children:"Open"}),t.jsx("option",{value:"Closed",children:"Closed"}),t.jsx("option",{value:"In Progress",children:"In Progress"})]})]}),t.jsx("div",{className:"md:col-span-2",children:t.jsxs("label",{className:"block text-sm font-medium",children:[t.jsx("input",{type:"checkbox",name:"showOnWeb",checked:u.showOnWeb,onChange:x,className:"mr-2"}),"Show On Web"]})})]}),t.jsxs("div",{className:"flex justify-end space-x-2",children:[t.jsx("button",{type:"button",onClick:()=>o(!1),className:"bg-gray-500 text-white px-4 py-2 rounded hover:bg-gray-600",children:"Cancel"}),t.jsx("button",{type:"submit",value:"save",className:"bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700",children:"Save"}),t.jsx("button",{type:"submit",value:"saveAndClose",className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"Save & Close"})]})]})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"mb-4",children:t.jsx("button",{onClick:A,className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700",children:"New"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border",children:"Employer"}),t.jsx("th",{className:"px-4 py-2 border",children:"Job No"}),t.jsx("th",{className:"px-4 py-2 border",children:"Status"}),t.jsx("th",{className:"px-4 py-2 border",children:"Actions"})]})}),t.jsx("tbody",{children:e.map(g=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border",children:g.jobTitle}),t.jsx("td",{className:"px-4 py-2 border",children:g.employer}),t.jsx("td",{className:"px-4 py-2 border",children:g.jobNo}),t.jsx("td",{className:"px-4 py-2 border",children:g.jobStatus}),t.jsxs("td",{className:"px-4 py-2 border",children:[t.jsx("button",{onClick:()=>v(g),className:"bg-yellow-500 text-white px-2 py-1 rounded mr-2 hover:bg-yellow-600",children:"Edit"}),t.jsx("button",{onClick:()=>w(g._id),className:"bg-red-500 text-white px-2 py-1 rounded hover:bg-red-600",children:"Delete"})]})]},g._id))})]})})]})]})},eQ=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState({fromDate:"",toDate:"",accountId:""}),[c,m]=b.useState([]);b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${v}`}});m(w.data.accounts||[])}catch(v){M.error("Failed to fetch accounts"),console.error(v)}},h=async()=>{if(!i.accountId){M.error("Please select an account/party");return}n(!0);try{const v=localStorage.getItem("token"),w={accountId:i.accountId};i.fromDate&&(w.startDate=i.fromDate),i.toDate&&(w.endDate=i.toDate);const S=await F.get("/api/accounting/reports/general-ledger",{headers:{Authorization:`Bearer ${v}`},params:w});a(S.data.generalLedger||[])}catch(v){console.error("Load employer ledger error",v),M.error("Failed to load employer ledger")}finally{n(!1)}},p=v=>{const{name:w,value:S}=v.target;o({...i,[w]:S})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Employer Ledger"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{}),"Show Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"fromDate",value:i.fromDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"toDate",value:i.toDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account/Party"}),t.jsxs("select",{name:"accountId",value:i.accountId,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account/Party"}),c.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Data"}),r?t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading employer ledger..."})]}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher#"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.date}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherNumber}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.description}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debit?v.debit.toFixed(2):"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.credit?v.credit.toFixed(2):"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.balance?v.balance.toFixed(2):"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No ledger data found. Please adjust filters and view report."})})})]})})]})]})]})},tQ=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState("");b.useEffect(()=>{u()},[]);const u=async()=>{o(!0);try{const x=localStorage.getItem("token"),j=await F.get("/api/jobs/candidates",{headers:{Authorization:`Bearer ${x}`}});a(j.data.candidates||[])}catch(x){M.error("Failed to fetch job candidates"),console.error(x)}finally{o(!1)}},h=x=>{r.find(j=>j._id===x._id)?n(r.filter(j=>j._id!==x._id)):n([...r,x])},p=()=>{if(!c){M.error("Please select a print type");return}if(r.length===0){M.error("Please select candidates to print");return}window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Job Grouping"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("select",{value:c,onChange:x=>m(x.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Print Type *"}),t.jsx("option",{value:"application",children:"Application Form"}),t.jsx("option",{value:"contract",children:"Contract Letter"}),t.jsx("option",{value:"visa",children:"Visa Form"})]}),t.jsxs("button",{onClick:p,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Job Candidates Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("p",{className:"text-sm text-gray-600",children:[e.length," records"]}),t.jsx("input",{type:"text",placeholder:"Search:",className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:t.jsx("input",{type:"checkbox"})}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Salary"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Company Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Application Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"})]})}),t.jsx("tbody",{children:e.length>0?e.map((x,j)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"checkbox",checked:r.some(v=>v._id===x._id),onChange:()=>h(x)})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.salary||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.companyName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.contactPerson||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.candidateName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.mobile||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.applicationDate||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.status||""})]},j)):t.jsx("tr",{children:t.jsx("td",{colSpan:"9",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No candidates found."})})})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing 1 to ",e.length," of ",e.length," ","entries"]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Selected Candidates Listing"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Job Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Salary"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Company Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Application Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"})]})}),t.jsx("tbody",{children:r.length>0?r.map((x,j)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.salary||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.companyName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.contactPerson||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.candidateName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.mobile||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.applicationDate||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.status||""})]},j)):t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No selected candidates."})})})]})})]})]})]})},aQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState([]),[c,m]=b.useState(!1),u=async()=>{if(!e||!r){M.error("Please select both From Date and To Date");return}m(!0);try{const p=localStorage.getItem("token"),x=await F.get("/api/employer-management/status-jobs-report",{headers:{Authorization:`Bearer ${p}`},params:{fromDate:e,toDate:r}});o(x.data.report||[])}catch(p){M.error("Failed to fetch report data"),console.error(p)}finally{m(!1)}},h=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Status of Jobs Report"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:u,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{}),"Show Report"]}),t.jsxs("button",{onClick:h,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-2",children:"From Date *"}),t.jsx("input",{type:"date",value:e,onChange:p=>a(p.target.value),className:"w-full border border-gray-300 p-2 rounded",required:!0})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium mb-2",children:"To Date *"}),t.jsx("input",{type:"date",value:r,onChange:p=>n(p.target.value),className:"w-full border border-gray-300 p-2 rounded",required:!0})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Data"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Sr. No"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Employer"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Job Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Categories"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Vacancies"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Jobs in Process"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Filled"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:c?t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"Loading..."})}):i.length>0?i.map((p,x)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x+1}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.employer||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.categories||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.vacancies||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.jobsInProcess||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.filled||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:p.balance||0})]},x)):t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:'No data available. Please select dates and click "Show Report".'})})})]})})]})]})]})},rQ=()=>{const[e,a]=b.useState([]),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState("");b.useEffect(()=>{u()},[]);const u=async()=>{o(!0);try{const x=localStorage.getItem("token"),j=await F.get("/api/employer-management/security-fee-refund-candidates",{headers:{Authorization:`Bearer ${x}`}});a(j.data.candidates||[])}catch(x){M.error("Failed to fetch job candidates"),console.error(x)}finally{o(!1)}},h=x=>{r.find(j=>j._id===x._id)?n(r.filter(j=>j._id!==x._id)):n([...r,x])},p=()=>{if(!c){M.error("Please select a print type");return}if(r.length===0){M.error("Please select candidates to print");return}window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Manage Security Fee Refund"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("select",{value:c,onChange:x=>m(x.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Print Type *"}),t.jsx("option",{value:"refund-form",children:"Refund Form"}),t.jsx("option",{value:"receipt",children:"Receipt"}),t.jsx("option",{value:"confirmation",children:"Confirmation Letter"})]}),t.jsxs("button",{onClick:p,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Job Candidates Listing"}),t.jsxs("div",{className:"mb-4 flex justify-between items-center",children:[t.jsxs("p",{className:"text-sm text-gray-600",children:[e.length," records"]}),t.jsx("input",{type:"text",placeholder:"Search:",className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:t.jsx("input",{type:"checkbox"})}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Salary"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Company Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Application Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"})]})}),t.jsx("tbody",{children:e.length>0?e.map((x,j)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("input",{type:"checkbox",checked:r.some(v=>v._id===x._id),onChange:()=>h(x)})}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.salary||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.companyName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.contactPerson||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.candidateName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.mobile||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.applicationDate||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.status||""})]},j)):t.jsx("tr",{children:t.jsx("td",{colSpan:"9",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Selected Candidates Listing"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Job Title"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Salary"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Company Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Contact Person"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Application Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Status"})]})}),t.jsx("tbody",{children:r.length>0?r.map((x,j)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.jobTitle||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.salary||0}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.companyName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.contactPerson||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.candidateName||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.mobile||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.applicationDate||""}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:x.status||""})]},j)):t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No selected candidates."})})})]})})]})]})]})},nQ=()=>{const[e,a]=b.useState([]),[r,n]=b.useState(!1),[i,o]=b.useState({fromDate:"",toDate:"",accountId:""}),[c,m]=b.useState([]);b.useEffect(()=>{u()},[]);const u=async()=>{try{const v=localStorage.getItem("token"),w=await F.get("/api/accounting/accounts/",{headers:{Authorization:`Bearer ${v}`}});m(w.data.accounts||[])}catch(v){M.error("Failed to fetch accounts"),console.error(v)}},h=async()=>{if(!i.accountId){M.error("Please select an account/party");return}n(!0);try{const v=localStorage.getItem("token"),w={accountId:i.accountId};i.fromDate&&(w.startDate=i.fromDate),i.toDate&&(w.endDate=i.toDate);const S=await F.get("/api/accounting/reports/general-ledger",{headers:{Authorization:`Bearer ${v}`},params:w});a(S.data.generalLedger||[])}catch(v){console.error("Load travel agent ledger error",v),M.error("Failed to load travel agent ledger")}finally{n(!1)}},p=v=>{const{name:w,value:S}=v.target;o({...i,[w]:S})},x=()=>{h()},j=()=>{window.print()};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsxs("div",{className:"flex justify-between items-center mb-6",children:[t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Travel Agent Ledger"}),t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors flex items-center gap-2",children:[t.jsx(Kt,{}),"Show Report"]}),t.jsxs("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 transition-colors flex items-center gap-2",children:[t.jsx(mt,{}),"Print"]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mb-6",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",name:"fromDate",value:i.fromDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",name:"toDate",value:i.toDate,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Account/Party"}),t.jsxs("select",{name:"accountId",value:i.accountId,onChange:p,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[t.jsx("option",{value:"",children:"Select Account/Party"}),c.map(v=>t.jsxs("option",{value:v._id,children:[v.accountCode," - ",v.accountName]},v._id))]})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Report Data"}),r?t.jsxs("div",{className:"text-center py-8",children:[t.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),t.jsx("p",{className:"mt-4 text-gray-600",children:"Loading travel agent ledger..."})]}):t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Date"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher Type"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Voucher#"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Description"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Debit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Credit"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Balance"})]})}),t.jsx("tbody",{children:e.length>0?e.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.date}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherType}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.voucherNumber}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.description}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.debit?v.debit.toFixed(2):"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.credit?v.credit.toFixed(2):"0.00"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:v.balance?v.balance.toFixed(2):"0.00"})]},w)):t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No ledger data found. Please adjust filters and view report."})})})]})})]})]})]})},sQ=()=>{const[e,a]=b.useState({firstName:"",lastName:"",email:"",mobile:"",profession:"",address:"",experience:""}),[r,n]=b.useState([]),[i,o]=b.useState(!1),[c,m]=b.useState(""),[u,h]=b.useState(null);b.useEffect(()=>{p()},[]);const p=async()=>{try{const A=localStorage.getItem("token"),g=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${A}`}});n(g.data?.candidates||g.data||[])}catch(A){M.error("Failed to fetch candidates"),console.error(A)}},x=A=>{const{name:g,value:C}=A.target;a({...e,[g]:C})},j=async()=>{if(!e.firstName||!e.lastName||!e.email||!e.mobile){M.error("Please fill in all required fields");return}o(!0);try{const A=localStorage.getItem("token"),g={name:`${e.firstName} ${e.lastName}`,email:e.email,contact:e.mobile,profession:e.profession,address:e.address,experience:e.experience,status:"Initial Registration"};u?(await F.put(`/api/candidates/${u._id}`,g,{headers:{Authorization:`Bearer ${A}`}}),M.success("Candidate updated successfully")):(await F.post("/api/candidates/",g,{headers:{Authorization:`Bearer ${A}`}}),M.success("Candidate registered successfully")),a({firstName:"",lastName:"",email:"",mobile:"",profession:"",address:"",experience:""}),h(null),p()}catch(A){M.error(u?"Failed to update candidate":"Failed to register candidate"),console.error(A)}finally{o(!1)}},v=()=>{a({firstName:"",lastName:"",email:"",mobile:"",profession:"",address:"",experience:""}),h(null)},w=A=>{const g=A.name.split(" ");a({firstName:g[0]||"",lastName:g.slice(1).join(" ")||"",email:A.email||"",mobile:A.contact||"",profession:A.profession||"",address:A.address||"",experience:A.experience||""}),h(A)},S=r.filter(A=>{const g=(A?.name||"").toString(),C=(A?.email||"").toString(),E=(c||"").toLowerCase();return g.toLowerCase().includes(E)||C.toLowerCase().includes(E)});return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("div",{className:"flex justify-between items-center mb-6",children:t.jsx("h1",{className:"text-2xl font-bold text-gray-800",children:"Candidate Initial Registration"})}),t.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:u?"Edit Candidate":"Add/Edit Candidate"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"First Name *"}),t.jsx("input",{type:"text",name:"firstName",value:e.firstName,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"First Name"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Last Name *"}),t.jsx("input",{type:"text",name:"lastName",value:e.lastName,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Last Name"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email *"}),t.jsx("input",{type:"email",name:"email",value:e.email,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Email"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile *"}),t.jsx("input",{type:"tel",name:"mobile",value:e.mobile,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Mobile"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Profession"}),t.jsx("input",{type:"text",name:"profession",value:e.profession,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Profession"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Address"}),t.jsx("textarea",{name:"address",value:e.address,onChange:x,rows:"3",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Address"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Experience"}),t.jsx("input",{type:"text",name:"experience",value:e.experience,onChange:x,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Experience"})]}),t.jsxs("div",{className:"flex gap-4 pt-4",children:[t.jsx("button",{onClick:j,disabled:i,className:"px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50",children:i?"Saving...":"Save"}),t.jsx("button",{onClick:v,className:"px-6 py-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Cancel"})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Record Listing"}),t.jsx("div",{className:"mb-4",children:t.jsx("input",{type:"text",placeholder:"Search by name or email...",value:c,onChange:A=>m(A.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Candidate No"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Email"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Experience"}),t.jsx("th",{className:"border border-gray-300 px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:S.length>0?S.map((A,g)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:String(g+1).padStart(2,"0")}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:A.name}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:A.email}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:A.contact}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:A.experience||"N/A"}),t.jsx("td",{className:"border border-gray-300 px-4 py-2",children:t.jsx("button",{onClick:()=>w(A),className:"px-3 py-1 bg-yellow-500 text-white rounded-md hover:bg-yellow-600 transition-colors text-sm",children:"Edit"})})]},A._id)):t.jsx("tr",{children:t.jsx("td",{colSpan:"6",className:"border border-gray-300 px-4 py-8 text-center text-gray-500",children:"No data available in table"})})})]})}),t.jsxs("div",{className:"mt-4 text-sm text-gray-600",children:["Showing ",S.length," entries"]})]})]})]})]})},lQ=()=>{const[e,a]=b.useState("addEdit"),[r,n]=b.useState(!1),[i,o]=b.useState({username:"",candidateType:"",title:"",firstName:"",lastName:"",cnic:"",fatherName:"",gender:"",dateOfBirth:"",age:"",placeOfBirth:"",nationality:"",password:"",religion:"",wages:"",maritalStatus:"",education:"",profession:"",experience:"",jobType:"",jobAppliedFor:"",plan:"",passportNumber:"",passportIssueDate:"",passportExpiryDate:"",passportIssuePlace:"",country:"",state:"",province:"",zip:"",district:"",city:"",street:"",phone:"",mobile:"",email:"",fax:"",website:"",contactAddress:"",returnAddress:"",emergencyContact:"",emergencyContactRelation:"",skills:[],educations:[],currentStatus:"",statusDate:"",convicted:"",politicalAffiliation:"",presentEmployment:"",achievements:"",dependents:[],resumes:[]}),[c,m]=b.useState([]),[u,h]=b.useState(!1),[p,x]=b.useState(""),[j,v]=b.useState(null),[w,S]=b.useState({from:"",to:"",degree:"",institute:"",duration:""}),[A,g]=b.useState({dependent:"",gender:"",age:""}),[C,E]=b.useState({from:"",to:"",degree:"",institute:"",duration:""}),[O,D]=b.useState(""),B=[{id:"addEdit",label:"Add/Edit Detail"},{id:"basic",label:"Basic Info"},{id:"passport",label:"Passport Info"},{id:"residence",label:"Residence Info"},{id:"contact",label:"Contact Details"},{id:"education",label:"Education"},{id:"skills",label:"Skills"},{id:"status",label:"Present Status"},{id:"dependents",label:"Candidate Dependents"},{id:"resumes",label:"Resumes"}];b.useEffect(()=>{L()},[]);const L=async()=>{try{const I=localStorage.getItem("token"),P=await F.get("/api/candidates/",{headers:{Authorization:`Bearer ${I}`}});m(P.data||[])}catch(I){M.error("Failed to fetch candidates"),console.error(I)}},T=I=>{const{name:P,value:H}=I.target;o({...i,[P]:H})},R=I=>{const H=Array.from(I.target.files).map(ee=>({file:ee,name:ee.name}));o({...i,resumes:[...i.resumes,...H]})},z=()=>{w.degree&&w.institute&&(o({...i,skills:[...i.skills,{...w}]}),S({from:"",to:"",degree:"",institute:"",duration:""}))},U=I=>{o({...i,skills:i.skills.filter((P,H)=>H!==I)})},X=()=>{A.dependent&&A.gender&&(o({...i,dependents:[...i.dependents,{...A}]}),g({dependent:"",gender:"",age:""}))},fe=I=>{o({...i,dependents:i.dependents.filter((P,H)=>H!==I)})},se=()=>{C.degree&&C.institute&&(o({...i,educations:[...i.educations,{...C}]}),E({from:"",to:"",degree:"",institute:"",duration:""}))},ie=I=>{o({...i,educations:i.educations.filter((P,H)=>H!==I)})},V=async(I=!1)=>{if(!i.firstName||!i.lastName||!i.cnic||!i.fatherName||!i.dateOfBirth||!i.nationality){M.error("Please fill in all required fields");return}h(!0);try{const P=localStorage.getItem("token"),H={...i,name:`${i.firstName} ${i.lastName}`,status:"Final Registration"};j?(await F.put(`/api/candidates/${j._id}`,H,{headers:{Authorization:`Bearer ${P}`}}),M.success("Candidate updated successfully")):(await F.post("/api/candidates/",H,{headers:{Authorization:`Bearer ${P}`}}),M.success("Candidate registered successfully")),I?K():(o({username:"",candidateType:"",title:"",firstName:"",lastName:"",cnic:"",fatherName:"",gender:"",dateOfBirth:"",age:"",placeOfBirth:"",nationality:"",password:"",religion:"",wages:"",maritalStatus:"",education:"",profession:"",experience:"",jobType:"",jobAppliedFor:"",plan:"",passportNumber:"",passportIssueDate:"",passportExpiryDate:"",passportIssuePlace:"",country:"",state:"",province:"",zip:"",district:"",city:"",street:"",phone:"",mobile:"",email:"",fax:"",website:"",contactAddress:"",returnAddress:"",emergencyContact:"",emergencyContactRelation:"",skills:[],educations:[],currentStatus:"",statusDate:"",convicted:"",politicalAffiliation:"",presentEmployment:"",achievements:"",dependents:[],resumes:[]}),v(null),L())}catch(P){M.error(j?"Failed to update candidate":"Failed to register candidate"),console.error(P)}finally{h(!1)}},K=()=>{o({username:"",candidateType:"",title:"",firstName:"",lastName:"",cnic:"",fatherName:"",gender:"",dateOfBirth:"",age:"",placeOfBirth:"",nationality:"",password:"",religion:"",wages:"",maritalStatus:"",education:"",profession:"",experience:"",jobType:"",jobAppliedFor:"",plan:"",passportNumber:"",passportIssueDate:"",passportExpiryDate:"",passportIssuePlace:"",country:"",state:"",province:"",zip:"",district:"",city:"",street:"",phone:"",mobile:"",email:"",fax:"",website:"",contactAddress:"",returnAddress:"",emergencyContact:"",emergencyContactRelation:"",skills:[],educations:[],currentStatus:"",statusDate:"",convicted:"",politicalAffiliation:"",presentEmployment:"",achievements:"",dependents:[],resumes:[]}),v(null),n(!1)},ce=I=>{const P=(I.name||"").split(" ");o({username:I.username||"",candidateType:I.candidateType||"",title:I.title||"",firstName:P[0]||"",lastName:P.slice(1).join(" ")||"",cnic:I.cnic||"",fatherName:I.fatherName||"",gender:I.gender||"",dateOfBirth:I.dateOfBirth||"",age:I.age||"",placeOfBirth:I.placeOfBirth||"",nationality:I.nationality||"",password:"",religion:I.religion||"",wages:I.wages||"",maritalStatus:I.maritalStatus||"",education:I.education||"",profession:I.profession||"",experience:I.experience||"",jobType:I.jobType||"",jobAppliedFor:I.jobAppliedFor||"",plan:I.plan||"",passportNumber:I.passportNumber||"",passportIssueDate:I.passportIssueDate||"",passportExpiryDate:I.passportExpiryDate||"",passportIssuePlace:I.passportIssuePlace||"",country:I.country||"",state:I.state||"",province:I.province||"",zip:I.zip||"",district:I.district||"",city:I.city||"",street:I.street||"",phone:I.phone||"",mobile:I.mobile||I.contact||"",email:I.email||"",fax:I.fax||"",website:I.website||"",contactAddress:I.contactAddress||"",returnAddress:I.returnAddress||"",emergencyContact:I.emergencyContact||"",emergencyContactRelation:I.emergencyContactRelation||"",skills:I.skills||[],currentStatus:I.currentStatus||"",statusDate:I.statusDate||"",convicted:I.convicted||"",politicalAffiliation:I.politicalAffiliation||"",presentEmployment:I.presentEmployment||"",achievements:I.achievements||"",dependents:I.dependents||[],resumes:I.resumes||[]}),v(I),n(!0)},$=(c||[]).filter(I=>{const P=(I?.name||"").toString(),H=(I?.email||"").toString(),ee=(p||"").toLowerCase();return P.toLowerCase().includes(ee)||H.toLowerCase().includes(ee)});return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Candidate Final Registration"}),r&&t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("div",{className:"flex space-x-2 mb-6 border-b",children:B.map(I=>t.jsx("button",{onClick:()=>a(I.id),className:`px-4 py-2 text-sm font-medium rounded-t-md ${e===I.id?"bg-blue-600 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:I.label},I.id))}),e==="addEdit"&&t.jsxs("div",{className:"flex gap-4",children:[t.jsx("button",{onClick:()=>V(!0),className:"px-4 py-2 bg-blue-600 text-white rounded",children:"Save"}),t.jsx("button",{onClick:K,className:"px-4 py-2 bg-gray-600 text-white rounded",children:"Cancel"})]}),e==="basic"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Username"}),t.jsx("input",{type:"text",name:"username",value:i.username,onChange:T,placeholder:"Username",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate Type"}),t.jsxs("select",{name:"candidateType",value:i.candidateType,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Candidate Type"}),t.jsx("option",{value:"unskilled",children:"Unskilled"}),t.jsx("option",{value:"semiskilled",children:"Semi-skilled"}),t.jsx("option",{value:"skilled",children:"Skilled"}),t.jsx("option",{value:"highlyskilled",children:"Highly Skilled"}),t.jsx("option",{value:"highly qualified",children:"Highly Qualified"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Title"}),t.jsx("input",{type:"text",name:"title",value:i.title,onChange:T,placeholder:"Title",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"First Name *"}),t.jsx("input",{type:"text",name:"firstName",value:i.firstName,onChange:T,placeholder:"First Name",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Last Name *"}),t.jsx("input",{type:"text",name:"lastName",value:i.lastName,onChange:T,placeholder:"Last Name",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CNIC *"}),t.jsx("input",{type:"text",name:"cnic",value:i.cnic,onChange:T,placeholder:"CNIC",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Father Name *"}),t.jsx("input",{type:"text",name:"fatherName",value:i.fatherName,onChange:T,placeholder:"Father Name",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Gender"}),t.jsxs("select",{name:"gender",value:i.gender,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Gender"}),t.jsx("option",{value:"Male",children:"Male"}),t.jsx("option",{value:"Female",children:"Female"}),t.jsx("option",{value:"Other",children:"Other"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Date of Birth *"}),t.jsx("input",{type:"date",name:"dateOfBirth",value:i.dateOfBirth,onChange:T,placeholder:"Date of Birth",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Age"}),t.jsx("input",{type:"number",name:"age",value:i.age,onChange:T,placeholder:"Age",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Place Of Birth"}),t.jsx("input",{type:"text",name:"placeOfBirth",value:i.placeOfBirth,onChange:T,placeholder:"Place Of Birth",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Nationality *"}),t.jsx("input",{type:"text",name:"nationality",value:i.nationality,onChange:T,placeholder:"Nationality",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Password"}),t.jsx("input",{type:"password",name:"password",value:i.password,onChange:T,placeholder:"Password",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Religion"}),t.jsx("input",{type:"text",name:"religion",value:i.religion,onChange:T,placeholder:"Religion",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Wages/Salary"}),t.jsx("input",{type:"number",name:"wages",value:i.wages,onChange:T,placeholder:"Wages",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Marital Status"}),t.jsxs("select",{name:"maritalStatus",value:i.maritalStatus,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Marital Status"}),t.jsx("option",{value:"single",children:"Single"}),t.jsx("option",{value:"married",children:"Married"}),t.jsx("option",{value:"divorced",children:"Divorced"}),t.jsx("option",{value:"widow",children:"Widow"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Education"}),t.jsxs("select",{name:"education",value:i.education,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Education"}),t.jsx("option",{value:"computerscience",children:"Computer Science"}),t.jsx("option",{value:"engineering",children:"Engineering"}),t.jsx("option",{value:"arts",children:"Arts"}),t.jsx("option",{value:"designing",children:"Designing"}),t.jsx("option",{value:"mba finance",children:"MBA Finance"}),t.jsx("option",{value:"mba hr",children:"MBA HR"}),t.jsx("option",{value:"mba global chain supply",children:"MBA Global Chain Supply"}),t.jsx("option",{value:"B.A",children:"B.A"}),t.jsx("option",{value:"science",children:"Science"}),t.jsx("option",{value:"under matric",children:"Under Matric"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Profession"}),t.jsx("input",{type:"text",name:"profession",value:i.profession,onChange:T,placeholder:"Profession",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Experience"}),t.jsx("input",{type:"text",name:"experience",value:i.experience,onChange:T,placeholder:"Experience",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Type"}),t.jsx("input",{type:"text",name:"jobType",value:i.jobType,onChange:T,placeholder:"Job Type",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Applied For"}),t.jsx("input",{type:"text",name:"jobAppliedFor",value:i.jobAppliedFor,onChange:T,placeholder:"Job Applied For",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Plan"}),t.jsx("input",{type:"text",name:"plan",value:i.plan,onChange:T,placeholder:"Plan",className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{className:"col-span-2",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Upload Files"}),t.jsx("input",{type:"file",multiple:!0,onChange:R,className:"w-full px-3 py-2 border rounded"}),t.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Drag & drop files here …"})]})]}),e==="passport"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport Number"}),t.jsx("input",{type:"text",name:"passportNumber",value:i.passportNumber,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport Issue Date"}),t.jsx("input",{type:"date",name:"passportIssueDate",value:i.passportIssueDate,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport Expiry Date"}),t.jsx("input",{type:"date",name:"passportExpiryDate",value:i.passportExpiryDate,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passport Issue Place"}),t.jsx("input",{type:"text",name:"passportIssuePlace",value:i.passportIssuePlace,onChange:T,className:"w-full px-3 py-2 border rounded"})]})]}),e==="residence"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Country"}),t.jsx("input",{type:"text",name:"country",value:i.country,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"State"}),t.jsx("input",{type:"text",name:"state",value:i.state,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Province"}),t.jsx("input",{type:"text",name:"province",value:i.province,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Zip"}),t.jsx("input",{type:"text",name:"zip",value:i.zip,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"District"}),t.jsx("input",{type:"text",name:"district",value:i.district,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"City"}),t.jsx("input",{type:"text",name:"city",value:i.city,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Street"}),t.jsx("input",{type:"text",name:"street",value:i.street,onChange:T,className:"w-full px-3 py-2 border rounded"})]})]}),e==="contact"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Phone"}),t.jsx("input",{type:"text",name:"phone",value:i.phone,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile"}),t.jsx("input",{type:"text",name:"mobile",value:i.mobile,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),t.jsx("input",{type:"email",name:"email",value:i.email,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Fax"}),t.jsx("input",{type:"text",name:"fax",value:i.fax,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Website"}),t.jsx("input",{type:"text",name:"website",value:i.website,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Contact Address"}),t.jsx("input",{type:"text",name:"contactAddress",value:i.contactAddress,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Return Address"}),t.jsx("input",{type:"text",name:"returnAddress",value:i.returnAddress,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Emergency Contact"}),t.jsx("input",{type:"text",name:"emergencyContact",value:i.emergencyContact,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Emergency Contact Relation"}),t.jsx("input",{type:"text",name:"emergencyContactRelation",value:i.emergencyContactRelation,onChange:T,className:"w-full px-3 py-2 border rounded"})]})]}),e==="skills"&&t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Add Skill"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-2",children:[t.jsx("input",{type:"date",placeholder:"From",value:w.from,onChange:I=>S({...w,from:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"date",placeholder:"To",value:w.to,onChange:I=>S({...w,to:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Degree",value:w.degree,onChange:I=>S({...w,degree:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Institute",value:w.institute,onChange:I=>S({...w,institute:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Duration",value:w.duration,onChange:I=>S({...w,duration:I.target.value}),className:"px-3 py-2 border rounded"})]}),t.jsx("button",{onClick:z,className:"mt-2 px-4 py-2 bg-blue-600 text-white rounded",children:"Add Skill"})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Skills"}),t.jsx("div",{className:"space-y-2",children:i.skills.map((I,P)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-50 p-2 rounded",children:[t.jsxs("span",{children:[I.degree," - ",I.institute," - From:"," ",I.from," - To: ",I.to," - Duration:"," ",I.duration]}),t.jsx("button",{onClick:()=>U(P),className:"text-red-500 hover:text-red-700",children:"Remove"})]},P))})]})]}),e==="status"&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Have you ever convicted in police case in the court of law"}),t.jsxs("select",{name:"convicted",value:i.convicted,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select"}),t.jsx("option",{value:"Yes",children:"Yes"}),t.jsx("option",{value:"No",children:"No"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Do you have affiliation/membership with any political/religious party"}),t.jsxs("select",{name:"politicalAffiliation",value:i.politicalAffiliation,onChange:T,className:"w-full px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select"}),t.jsx("option",{value:"Yes",children:"Yes"}),t.jsx("option",{value:"No",children:"No"})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Present Employment"}),t.jsx("input",{type:"text",name:"presentEmployment",value:i.presentEmployment,onChange:T,className:"w-full px-3 py-2 border rounded"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Achievements"}),t.jsx("textarea",{name:"achievements",value:i.achievements,onChange:T,rows:"4",className:"w-full px-3 py-2 border rounded"})]})]}),e==="dependents"&&t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Add Dependent"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[t.jsxs("select",{value:A.dependent,onChange:I=>g({...A,dependent:I.target.value}),className:"px-3 py-2 border rounded",children:[t.jsx("option",{value:"",children:"Select Dependent"}),t.jsx("option",{value:"mother",children:"Mother"}),t.jsx("option",{value:"father",children:"Father"}),t.jsx("option",{value:"wife",children:"Wife"}),t.jsx("option",{value:"brother",children:"Brother"}),t.jsx("option",{value:"children",children:"Children"}),t.jsx("option",{value:"sisters",children:"Sisters"})]}),t.jsx("input",{type:"text",placeholder:"Gender",value:A.gender,onChange:I=>g({...A,gender:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"number",placeholder:"Age",value:A.age,onChange:I=>g({...A,age:I.target.value}),className:"px-3 py-2 border rounded"})]}),t.jsx("button",{onClick:X,className:"mt-2 px-4 py-2 bg-blue-600 text-white rounded",children:"Add Dependent"})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Dependents"}),t.jsx("div",{className:"space-y-2",children:i.dependents.map((I,P)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-50 p-2 rounded",children:[t.jsxs("span",{children:[I.dependent," - ",I.gender," - Age:"," ",I.age]}),t.jsx("button",{onClick:()=>fe(P),className:"text-red-500 hover:text-red-700",children:"Remove"})]},P))})]})]}),e==="education"&&t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Add Education"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-2",children:[t.jsx("input",{type:"date",placeholder:"From",value:C.from,onChange:I=>E({...C,from:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"date",placeholder:"To",value:C.to,onChange:I=>E({...C,to:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Degree",value:C.degree,onChange:I=>E({...C,degree:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Institute",value:C.institute,onChange:I=>E({...C,institute:I.target.value}),className:"px-3 py-2 border rounded"}),t.jsx("input",{type:"text",placeholder:"Duration",value:C.duration,onChange:I=>E({...C,duration:I.target.value}),className:"px-3 py-2 border rounded"})]}),t.jsx("button",{onClick:se,className:"mt-2 px-4 py-2 bg-blue-600 text-white rounded",children:"Add Education"})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Education"}),t.jsx("div",{className:"space-y-2",children:i.educations.map((I,P)=>t.jsxs("div",{className:"flex items-center justify-between bg-gray-50 p-2 rounded",children:[t.jsxs("span",{children:[I.degree," - ",I.institute," - From: ",I.from," - To: ",I.to," - Duration: ",I.duration]}),t.jsx("button",{onClick:()=>ie(P),className:"text-red-500 hover:text-red-700",children:"Remove"})]},P))})]})]}),e==="resumes"&&t.jsxs("div",{children:[t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Resume Name"}),t.jsx("input",{type:"text",value:O,onChange:I=>D(I.target.value),placeholder:"Enter resume name",className:"w-full px-3 py-2 border rounded"})]}),t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Upload Resumes"}),t.jsx("input",{type:"file",multiple:!0,onChange:R,className:"w-full px-3 py-2 border rounded"}),t.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Drag & drop files here …"}),t.jsxs("div",{className:"mt-4",children:[t.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-2",children:"Resumes"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Action"})]})}),t.jsx("tbody",{children:i.resumes.length>0?i.resumes.map((I,P)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border px-4 py-2",children:I.name}),t.jsx("td",{className:"border px-4 py-2",children:t.jsx("button",{onClick:()=>{o({...i,resumes:i.resumes.filter((H,ee)=>ee!==P)})},className:"text-red-500 hover:text-red-700",children:"×"})})]},P)):t.jsx("tr",{children:t.jsx("td",{colSpan:"2",className:"border px-4 py-8 text-center text-gray-500",children:"No resumes uploaded"})})})]})})]})]})]}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md mt-6",children:[t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("h2",{className:"text-lg font-semibold",children:"Candidates"}),t.jsx("button",{onClick:()=>{n(!0),a("addEdit"),v(null),o({username:"",candidateType:"",title:"",firstName:"",lastName:"",cnic:"",fatherName:"",gender:"",dateOfBirth:"",age:"",placeOfBirth:"",nationality:"",password:"",religion:"",wages:"",maritalStatus:"",education:"",profession:"",experience:"",jobType:"",jobAppliedFor:"",plan:"",passportNumber:"",passportIssueDate:"",passportExpiryDate:"",passportIssuePlace:"",address:"",city:"",state:"",country:"",postalCode:"",mobile:"",email:"",emergencyContact:"",emergencyContactRelation:"",skills:[],currentStatus:"",statusDate:"",dependents:[],resumes:[]})},className:"px-4 py-2 bg-green-600 text-white rounded",children:"New"})]}),t.jsx("input",{type:"text",placeholder:"Search by name or email...",value:p,onChange:I=>x(I.target.value),className:"w-full px-3 py-2 border rounded mb-4"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full table-auto",children:[t.jsx("thead",{className:"bg-gray-50",children:t.jsxs("tr",{children:[t.jsx("th",{className:"border px-4 py-2 text-left",children:"#"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Name"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Email"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Mobile"}),t.jsx("th",{className:"border px-4 py-2 text-left",children:"Actions"})]})}),t.jsx("tbody",{children:$.length>0?$.map((I,P)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"border px-4 py-2",children:P+1}),t.jsx("td",{className:"border px-4 py-2",children:I.name}),t.jsx("td",{className:"border px-4 py-2",children:I.email}),t.jsx("td",{className:"border px-4 py-2",children:I.contact}),t.jsx("td",{className:"border px-4 py-2",children:t.jsx("button",{onClick:()=>ce(I),className:"px-2 py-1 bg-yellow-500 text-white rounded",children:"Edit"})})]},I._id||P)):t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"border px-4 py-8 text-center text-gray-500",children:"No data available"})})})]})})]})]})]})},iQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState({name:"",cnic:"",qualification:"",mobile:""}),[j,v]=b.useState(""),w=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Apply Job"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Add/Edit Detail"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employers *"}),t.jsx("select",{value:e,onChange:S=>a(S.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Title *"}),t.jsx("select",{value:r,onChange:S=>n(S.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Title"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Categories *"}),t.jsx("select",{value:i,onChange:S=>o(S.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Category"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"All Candidates"}),t.jsx("select",{value:c,onChange:S=>m(S.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsx("select",{value:u,onChange:S=>h(S.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Candidate Info"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),t.jsx("input",{type:"text",value:p.name,onChange:S=>x({...p,name:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CNIC"}),t.jsx("input",{type:"text",value:p.cnic,onChange:S=>x({...p,cnic:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Qualification"}),t.jsx("input",{type:"text",value:p.qualification,onChange:S=>x({...p,qualification:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile"}),t.jsx("input",{type:"text",value:p.mobile,onChange:S=>x({...p,mobile:S.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Applied Job Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:j,onChange:S=>v(S.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"umer.aziz"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Principle Company"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"})]})}),t.jsx("tbody",{children:w.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):w.map((S,A)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:S.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:S.principleCompany}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:S.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:S.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:S.name}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:S.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:S.applicationDate})]},A))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})]})},oQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(!1),[u,h]=b.useState("Dear {Name} congratulations upon shortlisting of your job application for the post of {JobPosition}."),p=[],x=()=>{console.log("Sending email...")},j=()=>{console.log("Sending SMS...")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Short Listing"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Short List Candidate by Job"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employers *"}),t.jsx("select",{value:e,onChange:v=>a(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Title *"}),t.jsx("select",{value:r,onChange:v=>n(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Title"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Categories *"}),t.jsx("select",{value:i,onChange:v=>o(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Category"})})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Short Listed Candidate"}),t.jsxs("div",{className:"flex items-center mb-4",children:[t.jsx("input",{type:"checkbox",id:"showPlaceholders",checked:c,onChange:v=>m(v.target.checked),className:"mr-2"}),t.jsx("label",{htmlFor:"showPlaceholders",className:"text-sm font-medium text-gray-700",children:"Show/Hide Place Holders"})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Message:"}),t.jsx("textarea",{value:u,onChange:v=>h(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",rows:"3"})]}),t.jsxs("div",{className:"flex gap-4 mb-6",children:[t.jsx("button",{onClick:x,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Send Email"}),t.jsx("button",{onClick:j,className:"px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-green-500",children:"Send SMS"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:"flex justify-between items-center mb-4",children:t.jsx("div",{className:"text-sm text-gray-600",children:"All"})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Qualification"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"City"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Email"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Address"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Experience"})]})}),t.jsx("tbody",{children:p.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):p.map((v,w)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.name}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.qualification}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.city}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.email}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.address}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:v.experience})]},w))})]})})]})]})]})]})},cQ=()=>{const[e,a]=b.useState(""),r=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Short Listed Candidates"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Short Listed Candidates Details"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:e,onChange:n=>a(n.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"umer.aziz"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile #"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Address"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Employer"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"})]})}),t.jsx("tbody",{children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):r.map((n,i)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.address}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.employer}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.jobTitle})]},i))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})},dQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),u=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Online Applications"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Manage Online Applications"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer:"}),t.jsx("select",{value:e,onChange:h=>a(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job:"}),t.jsx("select",{value:r,onChange:h=>n(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate:"}),t.jsx("select",{value:i,onChange:h=>o(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]})]}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:c,onChange:h=>m(h.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:""})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Principle Company"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"})]})}),t.jsx("tbody",{children:u.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):u.map((h,p)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.principleCompany}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.name}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.applicationDate})]},p))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})},uQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),[u,h]=b.useState(""),[p,x]=b.useState(""),[j,v]=b.useState({name:"",cnic:"",qualification:"",mobile:""}),[w,S]=b.useState(""),A=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Job Applications"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Add/Edit Detail"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employers *"}),t.jsx("select",{value:e,onChange:g=>a(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Title *"}),t.jsx("select",{value:r,onChange:g=>n(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Title"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job Categories *"}),t.jsx("select",{value:i,onChange:g=>o(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job Category"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"All Candidates"}),t.jsx("select",{value:c,onChange:g=>m(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Candidate *"}),t.jsx("select",{value:u,onChange:g=>h(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Candidate"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Agent *"}),t.jsx("select",{value:p,onChange:g=>x(g.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Agent"})})]})]}),t.jsxs("div",{className:"mb-6",children:[t.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Candidate Info"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),t.jsx("input",{type:"text",value:j.name,onChange:g=>v({...j,name:g.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"CNIC"}),t.jsx("input",{type:"text",value:j.cnic,onChange:g=>v({...j,cnic:g.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Qualification"}),t.jsx("input",{type:"text",value:j.qualification,onChange:g=>v({...j,qualification:g.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Mobile"}),t.jsx("input",{type:"text",value:j.mobile,onChange:g=>v({...j,mobile:g.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]})]}),t.jsxs("div",{children:[t.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Job Candidates Listing"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:w,onChange:g=>S(g.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"umer.aziz"})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Salary"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Company Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Status"})]})}),t.jsx("tbody",{children:A.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):A.map((g,C)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.salary}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.companyName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.applicationDate}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:g.status})]},C))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})]})},mQ=()=>{const[e,a]=b.useState(""),r=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Freez Applications"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Freez Applications Details"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:e,onChange:n=>a(n.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:""})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Salary"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Company Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Status"})]})}),t.jsx("tbody",{children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):r.map((n,i)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.salary}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.companyName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.applicationDate}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.status})]},i))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})},fQ=()=>{const[e,a]=b.useState(""),r=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Completed Applications"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Completed Applications Details"}),t.jsxs("div",{className:"flex justify-between items-center mb-4",children:[t.jsx("div",{className:"text-sm text-gray-600",children:"10 records"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("label",{className:"mr-2 text-sm font-medium text-gray-700",children:"Search:"}),t.jsx("input",{type:"text",value:e,onChange:n=>a(n.target.value),className:"px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:""})]})]}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Salary"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Company Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Contact Person"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Application Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Status"})]})}),t.jsx("tbody",{children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"8",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):r.map((n,i)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.jobTitle}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.salary}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.companyName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.contactPerson}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.applicationDate}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:n.status})]},i))})]})}),t.jsx("div",{className:"mt-4 text-sm text-gray-600",children:"Showing 0 to 0 of 0 entries"})]})]})]})},pQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState(""),u=()=>{alert("Show Applicants clicked")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Interview Schedules"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer: *"}),t.jsx("select",{value:e,onChange:h=>a(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job: *"}),t.jsx("select",{value:r,onChange:h=>n(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Category: *"}),t.jsx("select",{value:i,onChange:h=>o(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Category"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Filter Type: *"}),t.jsx("select",{value:c,onChange:h=>m(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Filter Type"})})]})]}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Interview Schedules"}),t.jsx("button",{onClick:u,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Show Applicants"})]})]})]})},hQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),c=()=>{alert("Load Data clicked")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Bulk Application Maker"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer: *"}),t.jsx("select",{value:e,onChange:m=>a(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job: *"}),t.jsx("select",{value:r,onChange:m=>n(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Category: *"}),t.jsx("select",{value:i,onChange:m=>o(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Category"})})]})]}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Bulk Application Maker"}),t.jsx("button",{onClick:c,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Load Data"})]})]})]})},xQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),c=()=>{alert("Show Applicants clicked")};return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Bulk Offer Sender"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer: *"}),t.jsx("select",{value:e,onChange:m=>a(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job: *"}),t.jsx("select",{value:r,onChange:m=>n(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Category: *"}),t.jsx("select",{value:i,onChange:m=>o(m.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Category"})})]})]}),t.jsx("button",{onClick:c,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Show Applicants"})]})]})]})},gQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),i=()=>{alert("Load Flights clicked")},o=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Manage Flight Cancellation"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Employer:"}),t.jsx("select",{value:e,onChange:c=>a(c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Employer"})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Job:"}),t.jsx("select",{value:r,onChange:c=>n(c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Job"})})]})]}),t.jsx("button",{onClick:i,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 mb-6",children:"Load Flights"}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Short Listed Candidates"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Candidate Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Mobile"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Address"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Employer"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Job Title"})]})}),t.jsx("tbody",{children:o.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"5",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):o.map((c,m)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.candidateName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.mobile}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.address}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.employer}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.jobTitle})]},m))})]})})]})]})]})},bQ=()=>{const[e,a]=b.useState(""),r=[],n=[{particulars:"Ledger",amount:0},{particulars:"Expenses",amount:0}],i=n.reduce((o,c)=>o+c.amount,0);return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Passenger Ledger"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"mb-6",children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passenger"}),t.jsx("select",{value:e,onChange:o=>a(o.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Passenger"})})]}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Data"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Passenger:"}),t.jsx("input",{type:"text",value:e,readOnly:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md bg-gray-100"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Agent:"}),t.jsx("input",{type:"text",value:"",readOnly:!0,className:"w-full px-3 py-2 border border-gray-300 rounded-md bg-gray-100"})]})]}),t.jsx("div",{className:"overflow-x-auto mb-6",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Vou. Type"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Vou#"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Particulars"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Debit"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Credit"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Balance"})]})}),t.jsx("tbody",{children:r.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"7",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):r.map((o,c)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.date}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.vouType}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.vouNumber}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.particulars}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.debit}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.credit}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.balance})]},c))})]})}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Particulars"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Amount"})]})}),t.jsxs("tbody",{children:[n.map((o,c)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.particulars}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:o.amount})]},c)),t.jsxs("tr",{className:"bg-gray-100 font-semibold",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:"Total Profit:"}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:i})]})]})]})})]})]})]})},yQ=()=>{const[e,a]=b.useState("2025-07-01"),[r,n]=b.useState("2025-11-03"),i=()=>{alert("Print clicked")},o=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"File Passenger Summary"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",value:e,onChange:c=>a(c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",value:r,onChange:c=>n(c.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]})]}),t.jsx("button",{onClick:i,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 mb-6",children:"Print"}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Data"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"File"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Passenger Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Father Name"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Passport"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Agent"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Receivable"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Received"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Ledger Balance"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Last Ledger Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Expenses"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Last Expenses"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Gross Income"})]})}),t.jsx("tbody",{children:o.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"12",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):o.map((c,m)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.file}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.passengerName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.fatherName}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.passport}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.agent}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.receivable}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.received}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.ledgerBalance}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.lastLedgerDate}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.expenses}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.lastExpenses}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:c.grossIncome})]},m))})]})})]})]})]})},vQ=()=>{const[e,a]=b.useState("2025-07-01"),[r,n]=b.useState("2025-11-03"),[i,o]=b.useState(""),c=()=>{alert("Print clicked")},m=()=>{alert("Show Reports clicked")},u=[];return t.jsxs("div",{className:"p-6 bg-gray-50 min-h-screen",children:[t.jsx(we,{}),t.jsxs("div",{className:"max-w-7xl mx-auto",children:[t.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Recruitment Agent Ledger"}),t.jsxs("div",{className:"bg-white p-6 rounded-lg shadow-md",children:[t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Filters"}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-6",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From Date"}),t.jsx("input",{type:"date",value:e,onChange:h=>a(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To Date"}),t.jsx("input",{type:"date",value:r,onChange:h=>n(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Agent"}),t.jsx("select",{value:i,onChange:h=>o(h.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:t.jsx("option",{value:"",children:"Select Agent"})})]})]}),t.jsxs("div",{className:"flex gap-4 mb-6",children:[t.jsx("button",{onClick:c,className:"px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500",children:"Print"}),t.jsx("button",{onClick:m,className:"px-4 py-2 bg-green-500 text-white rounded-md hover:bg-green-600 focus:outline-none focus:ring-2 focus:ring-green-500",children:"Show Reports"})]}),t.jsx("h2",{className:"text-xl font-semibold mb-4",children:"Report Data"}),t.jsx("div",{className:"overflow-x-auto",children:t.jsxs("table",{className:"min-w-full bg-white border border-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"bg-gray-100",children:[t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Date"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Vou.Type"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Vou#"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Passport/Chq"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Passenger"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Trade"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Status"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Debit"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Credit"}),t.jsx("th",{className:"px-4 py-2 border-b text-left text-sm font-medium text-gray-700",children:"Balance"})]})}),t.jsx("tbody",{children:u.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:"10",className:"px-4 py-2 text-center text-gray-500",children:"No data available in table"})}):u.map((h,p)=>t.jsxs("tr",{className:"hover:bg-gray-50",children:[t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.date}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.vouType}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.vouNumber}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.passportChq}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.passenger}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.trade}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.status}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.debit}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.credit}),t.jsx("td",{className:"px-4 py-2 border-b text-sm",children:h.balance})]},p))})]})})]})]})]})},Dc="/assets/logo-CsRe-4-6.png",jQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState({}),c=bs(),m=Dn(),{loading:u,error:h,success:p,user:x}=br(w=>w.user),j=()=>{const w={};return e?/\S+@\S+\.\S+/.test(e)||(w.email="Invalid email format"):w.email="Email is required",r?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(r)||(w.password="Password must be at least 8 characters, including uppercase, lowercase, number, and special character"):w.password="Password is required",o(w),Object.keys(w).length===0},v=async w=>{if(w.preventDefault(),!j())return;c(hs());const S=await c(qo({email:e,password:r}));if(qo.fulfilled.match(S)){a(""),n("");try{const C=(((await c(el()).unwrap()).user||S.payload?.user||x)?.permittedPages||[]).map(D=>(D||"").toLowerCase()),O=["/expense","/candidates-cv","/candidate","/deposit-slip","/contract-letter","/undertaking-letter","/nbpchallan","/visa-form","/allied-form","/dashboard"].find(D=>C.includes(D))||"/dashboard";m(O)}catch{m("/dashboard")}}};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:Dc,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Login"}),h&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:h}),p&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:p}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:w=>a(w.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your email",disabled:u}),i.email&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:i.email})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Password"}),t.jsx("input",{type:"password",value:r,onChange:w=>n(w.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your password",disabled:u}),i.password&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:i.password})]}),t.jsx("button",{onClick:v,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:u,children:u?"Logging in...":"Login"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Don't have an account?"," ",t.jsx("button",{type:"button",onClick:()=>m("/signup"),className:"text-green-600 hover:underline font-medium",disabled:u,children:"Sign Up"})]}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Forgot password?"," ",t.jsx("button",{type:"button",onClick:()=>m("/forgot-password"),className:"text-green-600 hover:underline font-medium",disabled:u,children:"Reset Password"})]})]})]})})},NQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState({}),u=bs(),h=Dn(),{loading:p,error:x,success:j}=br(S=>S.user),v=()=>{const S={};return e||(S.name="Full name is required"),r?/\S+@\S+\.\S+/.test(r)||(S.email="Invalid email format"):S.email="Email is required",i?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(i)||(S.password="Password must be at least 8 characters, including uppercase, lowercase, number, and special character"):S.password="Password is required",m(S),Object.keys(S).length===0},w=async S=>{if(S.preventDefault(),!v())return;u(hs());const A=await u(Ho({username:e,email:r,password:i}));Ho.fulfilled.match(A)&&(a(""),n(""),o(""),h("/verify-otp"))};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:Dc,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Sign Up"}),x&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:x}),j&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:j}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Full Name"}),t.jsx("input",{type:"text",value:e,onChange:S=>a(S.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your full name",disabled:p}),c.name&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.name})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),t.jsx("input",{type:"email",value:r,onChange:S=>n(S.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your email",disabled:p}),c.email&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.email})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Password"}),t.jsx("input",{type:"password",value:i,onChange:S=>o(S.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your password",disabled:p}),c.password&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.password})]}),t.jsx("button",{onClick:w,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:p,children:p?"Signing up...":"Sign Up"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Already have an account?"," ",t.jsx("button",{type:"button",onClick:()=>h("/login"),className:"text-green-600 hover:underline font-medium",disabled:p,children:"Login"})]})]})]})})},wQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState({}),i=bs(),o=Dn(),{loading:c,error:m,success:u}=br(j=>j.user),h=()=>{const j={};return e||(j.otp="OTP is required"),n(j),Object.keys(j).length===0},p=async j=>{if(j.preventDefault(),!h())return;i(hs());const v=await i(Vo(e));Vo.fulfilled.match(v)&&(a(""),o("/dashboard"))},x=async()=>{i(hs()),await i(yu())};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:Dc,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Verify OTP"}),m&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:m}),u&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"OTP"}),t.jsx("input",{type:"text",value:e,onChange:j=>a(j.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter OTP",disabled:c}),r.otp&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:r.otp})]}),t.jsx("button",{onClick:p,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:c,children:c?"Verifying...":"Verify OTP"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Didn't receive OTP?"," ",t.jsx("button",{type:"button",onClick:x,className:"text-green-600 hover:underline font-medium",disabled:c,children:"Resend OTP"})]}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Back to"," ",t.jsx("button",{type:"button",onClick:()=>o("/login"),className:"text-green-600 hover:underline font-medium",disabled:c,children:"Login"})]})]})]})})},AQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState({}),i=bs(),o=Dn(),{loading:c,error:m,success:u}=br(x=>x.user),h=()=>{const x={};return e?/\S+@\S+\.\S+/.test(e)||(x.email="Invalid email format"):x.email="Email is required",n(x),Object.keys(x).length===0},p=async x=>{if(x.preventDefault(),!h())return;i(hs());const j=await i(Yo(e));Yo.fulfilled.match(j)&&(a(""),o("/reset-password"))};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:Dc,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Forgot Password"}),m&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:m}),u&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:x=>a(x.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your email",disabled:c}),r.email&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:r.email})]}),t.jsx("button",{onClick:p,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:c,children:c?"Sending OTP...":"Send OTP"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Back to"," ",t.jsx("button",{type:"button",onClick:()=>o("/login"),className:"text-green-600 hover:underline font-medium",disabled:c,children:"Login"})]})]})]})})},SQ=()=>{const[e,a]=b.useState(""),[r,n]=b.useState(""),[i,o]=b.useState(""),[c,m]=b.useState({}),u=bs(),h=Dn(),{loading:p,error:x,success:j}=br(S=>S.user),v=()=>{const S={};return e?/\S+@\S+\.\S+/.test(e)||(S.email="Invalid email format"):S.email="Email is required",r||(S.otp="OTP is required"),i?/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/.test(i)||(S.newPassword="New password must be at least 8 characters, including uppercase, lowercase, number, and special character"):S.newPassword="New password is required",m(S),Object.keys(S).length===0},w=async S=>{if(S.preventDefault(),!v())return;u(hs());const A=await u(Ko({email:e,otp:r,newPassword:i}));Ko.fulfilled.match(A)&&(a(""),n(""),o(""),h("/login"))};return t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-r from-gray-100 to-green-600",children:t.jsxs("div",{className:"bg-white p-8 rounded-xl shadow-lg w-full max-w-md",children:[t.jsx("div",{className:"flex justify-center mb-6",children:t.jsx("img",{src:Dc,alt:"Logo",className:"w-16 h-16"})}),t.jsx("h2",{className:"text-3xl font-bold text-gray-800 text-center mb-6",children:"Reset Password"}),x&&t.jsx("div",{className:"mb-4 text-red-600 bg-red-100 p-3 rounded-md text-center",children:x}),j&&t.jsx("div",{className:"mb-4 text-green-600 bg-green-100 p-3 rounded-md text-center",children:j}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Email"}),t.jsx("input",{type:"email",value:e,onChange:S=>a(S.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter your email",disabled:p}),c.email&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.email})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"OTP"}),t.jsx("input",{type:"text",value:r,onChange:S=>n(S.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter OTP",disabled:p}),c.otp&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.otp})]}),t.jsxs("div",{children:[t.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"New Password"}),t.jsx("input",{type:"password",value:i,onChange:S=>o(S.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-green-500",placeholder:"Enter new password",disabled:p}),c.newPassword&&t.jsx("p",{className:"text-red-500 text-sm mt-1",children:c.newPassword})]}),t.jsx("button",{onClick:w,className:"w-full bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition duration-200 disabled:opacity-50",disabled:p,children:p?"Resetting...":"Reset Password"}),t.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Back to"," ",t.jsx("button",{type:"button",onClick:()=>h("/login"),className:"text-green-600 hover:underline font-medium",disabled:p,children:"Login"})]})]})]})})},be=({children:e})=>{const a=yr(),r=["/login","/signup","/verify-otp","/forgot-password","/reset-password"];return t.jsxs(t.Fragment,{children:[!r.includes(a.pathname)&&t.jsx(u_,{}),e]})};function CQ(){const e=bs(),{isAuthenticated:a,loading:r,error:n}=br(m=>m.user),[i,o]=b.useState(!1);b.useEffect(()=>{(async()=>{let u=localStorage.getItem("token");console.log("Checking auth, token:",u?"present":"missing"),u||(u="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY4ZWY0NGNhNzQ3YWJmYjA5OGZlYjRjZSIsImVtYWlsIjoiYWhhZHF1cmVzaGkxNjc1NkBnbWFpbC5jb20iLCJ1c2VybmFtZSI6ImFoYWQiLCJyb2xlIjoic3VwZXJhZG1pbiIsImlhdCI6MTc2MTg5NjQ0NywiZXhwIjoxNzYzMTkyNDQ3fQ.dZcyWdxwSSk7Ndgn_x4HxB4FNXClPBL_uCyrGEiHNkk",localStorage.setItem("token",u),console.log("Set fallback token"));try{await e(el()).unwrap(),console.log("getAuthUser successful, isAuthenticated:",a)}catch(h){console.error("getAuthUser failed:",h)}o(!0)})()},[e]);const c=({children:m})=>{if(!i)return console.log("Auth not checked yet, waiting..."),t.jsx("div",{children:"Loading..."});console.log("ProtectedRoute check, isAuthenticated:",a);const u=localStorage.getItem("token");return a||u?m:t.jsx($h,{to:"/login"})};return t.jsx(aM,{children:i?t.jsxs(t.Fragment,{children:[n&&t.jsx("div",{className:"fixed top-0 w-full bg-red-600 text-white text-center p-2",children:n}),t.jsx(ZM,{position:"top-right"}),t.jsxs(P7,{children:[t.jsx(ge,{path:"/login",element:t.jsx(be,{children:t.jsx(jQ,{})})}),t.jsx(ge,{path:"/signup",element:t.jsx(be,{children:t.jsx(NQ,{})})}),t.jsx(ge,{path:"/verify-otp",element:t.jsx(be,{children:t.jsx(wQ,{})})}),t.jsx(ge,{path:"/forgot-password",element:t.jsx(be,{children:t.jsx(AQ,{})})}),t.jsx(ge,{path:"/reset-password",element:t.jsx(be,{children:t.jsx(SQ,{})})}),t.jsx(ge,{path:"/dashboard",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(C_,{})})})}),t.jsx(ge,{path:"/sidebar",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(Rr,{})})})}),t.jsx(ge,{path:"/candidate",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(E_,{})})})}),t.jsx(ge,{path:"/deposit-slip",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(k_,{})})})}),t.jsx(ge,{path:"/candidates-cv",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(T_,{})})})}),t.jsx(ge,{path:"/contract-letter",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(R_,{})})})}),t.jsx(ge,{path:"/undertaking-letter",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(P_,{})})})}),t.jsx(ge,{path:"/nbpchallan",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(M_,{})})})}),t.jsx(ge,{path:"/visa-form",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(z_,{})})})}),t.jsx(ge,{path:"/allied-form",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(B_,{})})})}),t.jsx(ge,{path:"/expense",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(JG,{})})})}),t.jsx(ge,{path:"/super-admin",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(tJ,{})})})}),t.jsx(ge,{path:"/admin/config/add-payment-agent",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(tW,{})})})}),t.jsx(ge,{path:"/admin/config/add-recruitment-agent",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(aW,{})})})}),t.jsx(ge,{path:"/admin/config/add-travel-agent",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(rW,{})})})}),t.jsx(ge,{path:"/admin/config/visa-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(nW,{})})})}),t.jsx(ge,{path:"/admin/config/visa-issuing-authorities",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(sW,{})})})}),t.jsx(ge,{path:"/admin/config/verifying-institutions",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(lW,{})})})}),t.jsx(ge,{path:"/admin/config/add-test-center",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(iW,{})})})}),t.jsx(ge,{path:"/admin/config/add-medical-centers",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(oW,{})})})}),t.jsx(ge,{path:"/admin/config/test-types",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(cW,{})})})}),t.jsx(ge,{path:"/admin/config/age-ranges",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(dW,{})})})}),t.jsx(ge,{path:"/admin/config/salary-ranges",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(uW,{})})})}),t.jsx(ge,{path:"/admin/config/experience-ranges",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(mW,{})})})}),t.jsx(ge,{path:"/admin/config/airlines",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(fW,{})})})}),t.jsx(ge,{path:"/admin/config/visa-professions",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(pW,{})})})}),t.jsx(ge,{path:"/admin/config/working-sectors",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(hW,{})})})}),t.jsx(ge,{path:"/admin/config/cities",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(xW,{})})})}),t.jsx(ge,{path:"/admin/config/education-level",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(gW,{})})})}),t.jsx(ge,{path:"/admin/config/career-level",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(bW,{})})})}),t.jsx(ge,{path:"/admin/skills",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(yW,{})})})}),t.jsx(ge,{path:"/admin/manage-users",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(NW,{})})})}),t.jsx(ge,{path:"/admin/manage-role",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(SW,{})})})}),t.jsx(ge,{path:"/admin/user-log-report",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(CW,{})})})}),t.jsx(ge,{path:"/admin/config/education-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(EW,{})})})}),t.jsx(ge,{path:"/admin/config/job-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(kW,{})})})}),t.jsx(ge,{path:"/admin/config/sub-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(OW,{})})})}),t.jsx(ge,{path:"/admin/config/working-categories",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(DW,{})})})}),t.jsx(ge,{path:"/admin/accounting/chart-of-accounts",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(TW,{})})})}),t.jsx(ge,{path:"/admin/accounting/chart-of-accounts-balances",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(RW,{})})})}),t.jsx(ge,{path:"/admin/accounting/cash-book",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(PW,{})})})}),t.jsx(ge,{path:"/admin/accounting/bank-book",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(MW,{})})})}),t.jsx(ge,{path:"/admin/accounting/opening-balance",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(_W,{})})})}),t.jsx(ge,{path:"/admin/accounting/cash-receipt",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(zW,{})})})}),t.jsx(ge,{path:"/admin/accounting/cash-payment",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(LW,{})})})}),t.jsx(ge,{path:"/admin/accounting/bank-receipt",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(BW,{})})})}),t.jsx(ge,{path:"/admin/accounting/bank-payment",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(IW,{})})})}),t.jsx(ge,{path:"/admin/accounting/jv",element:t.jsx(be,{children:t.jsx(FW,{})})}),t.jsx(ge,{path:"/admin/accounting/job-payment",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(UW,{})})})}),t.jsx(ge,{path:"/admin/accounting/travel-agent-payment",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx($W,{})})})}),t.jsx(ge,{path:"/admin/accounting/candidate-receipt",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(qW,{})})})}),t.jsx(ge,{path:"/admin/accounting/candidate-jv",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(HW,{})})})}),t.jsx(ge,{path:"/admin/accounting/expenses-against-candidate",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(VW,{})})})}),t.jsx(ge,{path:"/admin/accounting/general-ledger",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(dC,{})})})}),t.jsx(ge,{path:"/admin/accounting/trial-balance",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(dC,{})})})}),t.jsx(ge,{path:"/admin/accounting/account-balances",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(YW,{})})})}),t.jsx(ge,{path:"/admin/accounting/income-statement",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(KW,{})})})}),t.jsx(ge,{path:"/admin/accounting/balance-sheet",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(GW,{})})})}),t.jsx(ge,{path:"/admin/accounting/cash-flow-statement",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(JW,{})})})}),t.jsx(ge,{path:"/admin/accounting/equity-report",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(WW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/employer-setup",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(QW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/employer-plans",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(XW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/job-setup",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(ZW,{})})})}),t.jsx(ge,{path:"/admin/employer-management/employer-ledger",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(eQ,{})})})}),t.jsx(ge,{path:"/admin/employer-management/job-grouping-prints",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(tQ,{})})})}),t.jsx(ge,{path:"/admin/employer-management/status-jobs-report",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(aQ,{})})})}),t.jsx(ge,{path:"/admin/employer-management/security-fee-refund-prints",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(rQ,{})})})}),t.jsx(ge,{path:"/admin/employer-management/travel-agent-ledger",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(nQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/initial-registration",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(sQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/apply-job",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(iQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/shortlisting",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(oQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/shortlisted-candidates",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(cQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/online-applications",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(dQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/job-applications",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(uQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/freeze-applications",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(mQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/completed-applications",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(fQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/interview-schedule",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(pQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/bulk-application-maker",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(hQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/bulk-offer-sender",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(xQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/bulk-flight-cancel",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(gQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/candidate-ledger-expenses",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(bQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/candidate-ledger-summary",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(yQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/candidate-agent-ledger",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(vQ,{})})})}),t.jsx(ge,{path:"/admin/candidate-management/candidate-final-registration",element:t.jsx(be,{children:t.jsx(c,{children:t.jsx(lQ,{})})})}),t.jsx(ge,{path:"/",element:t.jsx($h,{to:"/login"})}),t.jsx(ge,{path:"*",element:t.jsx($h,{to:"/login"})})]})]}):t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:t.jsx("div",{className:"text-xl font-semibold text-gray-700",children:"Loading..."})})})}const EQ=D6.createRoot(document.getElementById("root"));EQ.render(t.jsx(pr.StrictMode,{children:t.jsx(mC,{store:qP,children:t.jsx(CQ,{})})}));