var fj=e=>{throw TypeError(e)};var hy=(e,t,n)=>t.has(e)||fj("Cannot "+n);var q=(e,t,n)=>(hy(e,t,"read from private field"),n?n.call(e):t.get(e)),Oe=(e,t,n)=>t.has(e)?fj("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(hy(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ut=(e,t,n)=>(hy(e,t,"access private method"),n);var Bf=(e,t,n,r)=>({set _(a){he(e,t,a,n)},get _(){return q(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Uf=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var GA={exports:{}},Ip={};/**
 * @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 j$=Symbol.for("react.transitional.element"),S$=Symbol.for("react.fragment");function KA(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:j$,type:e,key:r,ref:t!==void 0?t:null,props:n}}Ip.Fragment=S$;Ip.jsx=KA;Ip.jsxs=KA;GA.exports=Ip;var s=GA.exports,VA={exports:{}},me={};/**
 * @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 M0=Symbol.for("react.transitional.element"),w$=Symbol.for("react.portal"),N$=Symbol.for("react.fragment"),O$=Symbol.for("react.strict_mode"),A$=Symbol.for("react.profiler"),C$=Symbol.for("react.consumer"),E$=Symbol.for("react.context"),_$=Symbol.for("react.forward_ref"),T$=Symbol.for("react.suspense"),k$=Symbol.for("react.memo"),YA=Symbol.for("react.lazy"),M$=Symbol.for("react.activity"),dj=Symbol.iterator;function P$(e){return e===null||typeof e!="object"?null:(e=dj&&e[dj]||e["@@iterator"],typeof e=="function"?e:null)}var WA={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},QA=Object.assign,XA={};function Do(e,t,n){this.props=e,this.context=t,this.refs=XA,this.updater=n||WA}Do.prototype.isReactComponent={};Do.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Do.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ZA(){}ZA.prototype=Do.prototype;function P0(e,t,n){this.props=e,this.context=t,this.refs=XA,this.updater=n||WA}var $0=P0.prototype=new ZA;$0.constructor=P0;QA($0,Do.prototype);$0.isPureReactComponent=!0;var hj=Array.isArray;function Uv(){}var tt={H:null,A:null,T:null,S:null},JA=Object.prototype.hasOwnProperty;function R0(e,t,n){var r=n.ref;return{$$typeof:M0,type:e,key:t,ref:r!==void 0?r:null,props:n}}function $$(e,t){return R0(e.type,t,e.props)}function D0(e){return typeof e=="object"&&e!==null&&e.$$typeof===M0}function R$(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pj=/\/+/g;function py(e,t){return typeof e=="object"&&e!==null&&e.key!=null?R$(""+e.key):t.toString(36)}function D$(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Uv,Uv):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function rl(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case M0:case w$:l=!0;break;case YA:return l=e._init,rl(l(e._payload),t,n,r,a)}}if(l)return a=a(e),l=r===""?"."+py(e,0):r,hj(a)?(n="",l!=null&&(n=l.replace(pj,"$&/")+"/"),rl(a,t,n,"",function(u){return u})):a!=null&&(D0(a)&&(a=$$(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(pj,"$&/")+"/")+l)),t.push(a)),1;l=0;var o=r===""?".":r+":";if(hj(e))for(var c=0;c<e.length;c++)r=e[c],i=o+py(r,c),l+=rl(r,t,n,i,a);else if(c=P$(e),typeof c=="function")for(e=c.call(e),c=0;!(r=e.next()).done;)r=r.value,i=o+py(r,c++),l+=rl(r,t,n,i,a);else if(i==="object"){if(typeof e.then=="function")return rl(D$(e),t,n,r,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function qf(e,t,n){if(e==null)return e;var r=[],a=0;return rl(e,r,"","",function(i){return t.call(n,i,a++)}),r}function L$(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var mj=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},z$={map:qf,forEach:function(e,t,n){qf(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return qf(e,function(){t++}),t},toArray:function(e){return qf(e,function(t){return t})||[]},only:function(e){if(!D0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Activity=M$;me.Children=z$;me.Component=Do;me.Fragment=N$;me.Profiler=A$;me.PureComponent=P0;me.StrictMode=O$;me.Suspense=T$;me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=tt;me.__COMPILER_RUNTIME={__proto__:null,c:function(e){return tt.H.useMemoCache(e)}};me.cache=function(e){return function(){return e.apply(null,arguments)}};me.cacheSignal=function(){return null};me.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=QA({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!JA.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var l=Array(i),o=0;o<i;o++)l[o]=arguments[o+2];r.children=l}return R0(e.type,a,r)};me.createContext=function(e){return e={$$typeof:E$,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:C$,_context:e},e};me.createElement=function(e,t,n){var r,a={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)JA.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(a[r]=t[r]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var o=Array(l),c=0;c<l;c++)o[c]=arguments[c+2];a.children=o}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)a[r]===void 0&&(a[r]=l[r]);return R0(e,i,a)};me.createRef=function(){return{current:null}};me.forwardRef=function(e){return{$$typeof:_$,render:e}};me.isValidElement=D0;me.lazy=function(e){return{$$typeof:YA,_payload:{_status:-1,_result:e},_init:L$}};me.memo=function(e,t){return{$$typeof:k$,type:e,compare:t===void 0?null:t}};me.startTransition=function(e){var t=tt.T,n={};tt.T=n;try{var r=e(),a=tt.S;a!==null&&a(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Uv,mj)}catch(i){mj(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),tt.T=t}};me.unstable_useCacheRefresh=function(){return tt.H.useCacheRefresh()};me.use=function(e){return tt.H.use(e)};me.useActionState=function(e,t,n){return tt.H.useActionState(e,t,n)};me.useCallback=function(e,t){return tt.H.useCallback(e,t)};me.useContext=function(e){return tt.H.useContext(e)};me.useDebugValue=function(){};me.useDeferredValue=function(e,t){return tt.H.useDeferredValue(e,t)};me.useEffect=function(e,t){return tt.H.useEffect(e,t)};me.useEffectEvent=function(e){return tt.H.useEffectEvent(e)};me.useId=function(){return tt.H.useId()};me.useImperativeHandle=function(e,t,n){return tt.H.useImperativeHandle(e,t,n)};me.useInsertionEffect=function(e,t){return tt.H.useInsertionEffect(e,t)};me.useLayoutEffect=function(e,t){return tt.H.useLayoutEffect(e,t)};me.useMemo=function(e,t){return tt.H.useMemo(e,t)};me.useOptimistic=function(e,t){return tt.H.useOptimistic(e,t)};me.useReducer=function(e,t,n){return tt.H.useReducer(e,t,n)};me.useRef=function(e){return tt.H.useRef(e)};me.useState=function(e){return tt.H.useState(e)};me.useSyncExternalStore=function(e,t,n){return tt.H.useSyncExternalStore(e,t,n)};me.useTransition=function(){return tt.H.useTransition()};me.version="19.2.7";VA.exports=me;var S=VA.exports;const T=$e(S);var eC={exports:{}},Bp={},tC={exports:{}},nC={};/**
 * @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.
 */(function(e){function t(P,z){var B=P.length;P.push(z);e:for(;0<B;){var K=B-1>>>1,Y=P[K];if(0<a(Y,z))P[K]=z,P[B]=Y,B=K;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var z=P[0],B=P.pop();if(B!==z){P[0]=B;e:for(var K=0,Y=P.length,Q=Y>>>1;K<Q;){var Z=2*(K+1)-1,ne=P[Z],ie=Z+1,je=P[ie];if(0>a(ne,B))ie<Y&&0>a(je,ne)?(P[K]=je,P[ie]=B,K=ie):(P[K]=ne,P[Z]=B,K=Z);else if(ie<Y&&0>a(je,B))P[K]=je,P[ie]=B,K=ie;else break e}}return z}function a(P,z){var B=P.sortIndex-z.sortIndex;return B!==0?B:P.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var c=[],u=[],f=1,d=null,h=3,m=!1,j=!1,v=!1,p=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function x(P){for(var z=n(u);z!==null;){if(z.callback===null)r(u);else if(z.startTime<=P)r(u),z.sortIndex=z.expirationTime,t(c,z);else break;z=n(u)}}function N(P){if(v=!1,x(P),!j)if(n(c)!==null)j=!0,w||(w=!0,k());else{var z=n(u);z!==null&&C(N,z.startTime-P)}}var w=!1,O=-1,A=5,E=-1;function M(){return p?!0:!(e.unstable_now()-E<A)}function $(){if(p=!1,w){var P=e.unstable_now();E=P;var z=!0;try{e:{j=!1,v&&(v=!1,g(O),O=-1),m=!0;var B=h;try{t:{for(x(P),d=n(c);d!==null&&!(d.expirationTime>P&&M());){var K=d.callback;if(typeof K=="function"){d.callback=null,h=d.priorityLevel;var Y=K(d.expirationTime<=P);if(P=e.unstable_now(),typeof Y=="function"){d.callback=Y,x(P),z=!0;break t}d===n(c)&&r(c),x(P)}else r(c);d=n(c)}if(d!==null)z=!0;else{var Q=n(u);Q!==null&&C(N,Q.startTime-P),z=!1}}break e}finally{d=null,h=B,m=!1}z=void 0}}finally{z?k():w=!1}}}var k;if(typeof b=="function")k=function(){b($)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,_=I.port2;I.port1.onmessage=$,k=function(){_.postMessage(null)}}else k=function(){y($,0)};function C(P,z){O=y(function(){P(e.unstable_now())},z)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(P){switch(h){case 1:case 2:case 3:var z=3;break;default:z=h}var B=h;h=z;try{return P()}finally{h=B}},e.unstable_requestPaint=function(){p=!0},e.unstable_runWithPriority=function(P,z){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var B=h;h=P;try{return z()}finally{h=B}},e.unstable_scheduleCallback=function(P,z,B){var K=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?K+B:K):B=K,P){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=B+Y,P={id:f++,callback:z,priorityLevel:P,startTime:B,expirationTime:Y,sortIndex:-1},B>K?(P.sortIndex=B,t(u,P),n(c)===null&&P===n(u)&&(v?(g(O),O=-1):v=!0,C(N,B-K))):(P.sortIndex=Y,t(c,P),j||m||(j=!0,w||(w=!0,k()))),P},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(P){var z=h;return function(){var B=h;h=z;try{return P.apply(this,arguments)}finally{h=B}}}})(nC);tC.exports=nC;var I$=tC.exports,rC={exports:{}},un={};/**
 * @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 B$=S;function aC(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Ha(){}var rn={d:{f:Ha,r:function(){throw Error(aC(522))},D:Ha,C:Ha,L:Ha,m:Ha,X:Ha,S:Ha,M:Ha},p:0,findDOMNode:null},U$=Symbol.for("react.portal");function q$(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:U$,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var Rc=B$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Up(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}un.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=rn;un.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(aC(299));return q$(e,t,null,n)};un.flushSync=function(e){var t=Rc.T,n=rn.p;try{if(Rc.T=null,rn.p=2,e)return e()}finally{Rc.T=t,rn.p=n,rn.d.f()}};un.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,rn.d.C(e,t))};un.prefetchDNS=function(e){typeof e=="string"&&rn.d.D(e)};un.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Up(n,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?rn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:i}):n==="script"&&rn.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};un.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Up(t.as,t.crossOrigin);rn.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&rn.d.M(e)};un.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Up(n,t.crossOrigin);rn.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};un.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Up(t.as,t.crossOrigin);rn.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else rn.d.m(e)};un.requestFormReset=function(e){rn.d.r(e)};un.unstable_batchedUpdates=function(e,t){return e(t)};un.useFormState=function(e,t,n){return Rc.H.useFormState(e,t,n)};un.useFormStatus=function(){return Rc.H.useHostTransitionStatus()};un.version="19.2.7";function iC(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(iC)}catch(e){console.error(e)}}iC(),rC.exports=un;var H$=rC.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 Mt=I$,sC=S,F$=H$;function F(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function lC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function lf(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function oC(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function cC(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function yj(e){if(lf(e)!==e)throw Error(F(188))}function G$(e){var t=e.alternate;if(!t){if(t=lf(e),t===null)throw Error(F(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return yj(a),e;if(i===r)return yj(a),t;i=i.sibling}throw Error(F(188))}if(n.return!==r.return)n=a,r=i;else{for(var l=!1,o=a.child;o;){if(o===n){l=!0,n=a,r=i;break}if(o===r){l=!0,r=a,n=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===n){l=!0,n=i,r=a;break}if(o===r){l=!0,r=i,n=a;break}o=o.sibling}if(!l)throw Error(F(189))}}if(n.alternate!==r)throw Error(F(190))}if(n.tag!==3)throw Error(F(188));return n.stateNode.current===n?e:t}function uC(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=uC(e),t!==null)return t;e=e.sibling}return null}var nt=Object.assign,K$=Symbol.for("react.element"),Hf=Symbol.for("react.transitional.element"),_c=Symbol.for("react.portal"),sl=Symbol.for("react.fragment"),fC=Symbol.for("react.strict_mode"),qv=Symbol.for("react.profiler"),dC=Symbol.for("react.consumer"),pa=Symbol.for("react.context"),L0=Symbol.for("react.forward_ref"),Hv=Symbol.for("react.suspense"),Fv=Symbol.for("react.suspense_list"),z0=Symbol.for("react.memo"),Ka=Symbol.for("react.lazy"),Gv=Symbol.for("react.activity"),V$=Symbol.for("react.memo_cache_sentinel"),vj=Symbol.iterator;function uc(e){return e===null||typeof e!="object"?null:(e=vj&&e[vj]||e["@@iterator"],typeof e=="function"?e:null)}var Y$=Symbol.for("react.client.reference");function Kv(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Y$?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sl:return"Fragment";case qv:return"Profiler";case fC:return"StrictMode";case Hv:return"Suspense";case Fv:return"SuspenseList";case Gv:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _c:return"Portal";case pa:return e.displayName||"Context";case dC:return(e._context.displayName||"Context")+".Consumer";case L0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z0:return t=e.displayName||null,t!==null?t:Kv(e.type)||"Memo";case Ka:t=e._payload,e=e._init;try{return Kv(e(t))}catch{}}return null}var Tc=Array.isArray,de=sC.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Me=F$.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ps={pending:!1,data:null,method:null,action:null},Vv=[],ll=-1;function Qr(e){return{current:e}}function It(e){0>ll||(e.current=Vv[ll],Vv[ll]=null,ll--)}function Ve(e,t){ll++,Vv[ll]=e.current,e.current=t}var Gr=Qr(null),au=Qr(null),pi=Qr(null),Jd=Qr(null);function eh(e,t){switch(Ve(pi,t),Ve(au,e),Ve(Gr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?wS(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=wS(t),e=M_(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}It(Gr),Ve(Gr,e)}function Gl(){It(Gr),It(au),It(pi)}function Yv(e){e.memoizedState!==null&&Ve(Jd,e);var t=Gr.current,n=M_(t,e.type);t!==n&&(Ve(au,e),Ve(Gr,n))}function th(e){au.current===e&&(It(Gr),It(au)),Jd.current===e&&(It(Jd),mu._currentValue=ps)}var my,gj;function Yi(e){if(my===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);my=t&&t[1]||"",gj=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+my+e+gj}var yy=!1;function vy(e,t){if(!e||yy)return"";yy=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(m){var h=m}Reflect.construct(e,[],d)}else{try{d.call()}catch(m){h=m}e.call(d.prototype)}}else{try{throw Error()}catch(m){h=m}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(m){if(m&&h&&typeof m.stack=="string")return[m.stack,h.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),l=i[0],o=i[1];if(l&&o){var c=l.split(`
`),u=o.split(`
`);for(a=r=0;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;for(;a<u.length&&!u[a].includes("DetermineComponentFrameRoot");)a++;if(r===c.length||a===u.length)for(r=c.length-1,a=u.length-1;1<=r&&0<=a&&c[r]!==u[a];)a--;for(;1<=r&&0<=a;r--,a--)if(c[r]!==u[a]){if(r!==1||a!==1)do if(r--,a--,0>a||c[r]!==u[a]){var f=`
`+c[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=a);break}}}finally{yy=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yi(n):""}function W$(e,t){switch(e.tag){case 26:case 27:case 5:return Yi(e.type);case 16:return Yi("Lazy");case 13:return e.child!==t&&t!==null?Yi("Suspense Fallback"):Yi("Suspense");case 19:return Yi("SuspenseList");case 0:case 15:return vy(e.type,!1);case 11:return vy(e.type.render,!1);case 1:return vy(e.type,!0);case 31:return Yi("Activity");default:return""}}function xj(e){try{var t="",n=null;do t+=W$(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
Error generating stack: `+r.message+`
`+r.stack}}var Wv=Object.prototype.hasOwnProperty,I0=Mt.unstable_scheduleCallback,gy=Mt.unstable_cancelCallback,Q$=Mt.unstable_shouldYield,X$=Mt.unstable_requestPaint,kn=Mt.unstable_now,Z$=Mt.unstable_getCurrentPriorityLevel,hC=Mt.unstable_ImmediatePriority,pC=Mt.unstable_UserBlockingPriority,nh=Mt.unstable_NormalPriority,J$=Mt.unstable_LowPriority,mC=Mt.unstable_IdlePriority,e4=Mt.log,t4=Mt.unstable_setDisableYieldValue,of=null,Mn=null;function si(e){if(typeof e4=="function"&&t4(e),Mn&&typeof Mn.setStrictMode=="function")try{Mn.setStrictMode(of,e)}catch{}}var Pn=Math.clz32?Math.clz32:a4,n4=Math.log,r4=Math.LN2;function a4(e){return e>>>=0,e===0?32:31-(n4(e)/r4|0)|0}var Ff=256,Gf=262144,Kf=4194304;function Wi(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function qp(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=Wi(r):(l&=o,l!==0?a=Wi(l):n||(n=o&~e,n!==0&&(a=Wi(n))))):(o=r&~i,o!==0?a=Wi(o):l!==0?a=Wi(l):n||(n=r&~e,n!==0&&(a=Wi(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function cf(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function i4(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 yC(){var e=Kf;return Kf<<=1,!(Kf&62914560)&&(Kf=4194304),e}function xy(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function uf(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function s4(e,t,n,r,a,i){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var f=31-Pn(n),d=1<<f;o[f]=0,c[f]=-1;var h=u[f];if(h!==null)for(u[f]=null,f=0;f<h.length;f++){var m=h[f];m!==null&&(m.lane&=-536870913)}n&=~d}r!==0&&vC(e,r,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(l&~t))}function vC(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Pn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function gC(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pn(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function xC(e,t){var n=t&-t;return n=n&42?1:B0(n),n&(e.suspendedLanes|t)?0:n}function B0(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function U0(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function bC(){var e=Me.p;return e!==0?e:(e=window.event,e===void 0?32:H_(e.type))}function bj(e,t){var n=Me.p;try{return Me.p=e,t()}finally{Me.p=n}}var Pi=Math.random().toString(36).slice(2),Ft="__reactFiber$"+Pi,xn="__reactProps$"+Pi,Lo="__reactContainer$"+Pi,Qv="__reactEvents$"+Pi,l4="__reactListeners$"+Pi,o4="__reactHandles$"+Pi,jj="__reactResources$"+Pi,ff="__reactMarker$"+Pi;function q0(e){delete e[Ft],delete e[xn],delete e[Qv],delete e[l4],delete e[o4]}function ol(e){var t=e[Ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Lo]||n[Ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ES(e);e!==null;){if(n=e[Ft])return n;e=ES(e)}return t}e=n,n=e.parentNode}return null}function zo(e){if(e=e[Ft]||e[Lo]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function kc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(F(33))}function Ol(e){var t=e[jj];return t||(t=e[jj]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Lt(e){e[ff]=!0}var jC=new Set,SC={};function Ls(e,t){Kl(e,t),Kl(e+"Capture",t)}function Kl(e,t){for(SC[e]=t,e=0;e<t.length;e++)jC.add(t[e])}var c4=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]*$"),Sj={},wj={};function u4(e){return Wv.call(wj,e)?!0:Wv.call(Sj,e)?!1:c4.test(e)?wj[e]=!0:(Sj[e]=!0,!1)}function Td(e,t,n){if(u4(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Vf(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function na(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function Yn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function f4(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){n=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xv(e){if(!e._valueTracker){var t=wC(e)?"checked":"value";e._valueTracker=f4(e,t,""+e[t])}}function NC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function rh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var d4=/[\n"\\]/g;function Xn(e){return e.replace(d4,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zv(e,t,n,r,a,i,l,o){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Yn(t)):e.value!==""+Yn(t)&&(e.value=""+Yn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Jv(e,l,Yn(t)):n!=null?Jv(e,l,Yn(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Yn(o):e.removeAttribute("name")}function OC(e,t,n,r,a,i,l,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Xv(e);return}n=n!=null?""+Yn(n):"",t=t!=null?""+Yn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Xv(e)}function Jv(e,t,n){t==="number"&&rh(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Al(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Yn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function AC(e,t,n){if(t!=null&&(t=""+Yn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Yn(n):""}function CC(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(F(92));if(Tc(r)){if(1<r.length)throw Error(F(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Yn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Xv(e)}function Vl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var h4=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 Nj(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||h4.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function EC(e,t,n){if(t!=null&&typeof t!="object")throw Error(F(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Nj(e,a,r)}else for(var i in t)t.hasOwnProperty(i)&&Nj(e,i,t[i])}function H0(e){if(e.indexOf("-")===-1)return!1;switch(e){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 p4=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"]]),m4=/^[\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 kd(e){return m4.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ma(){}var eg=null;function F0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var cl=null,Cl=null;function Oj(e){var t=zo(e);if(t&&(e=t.stateNode)){var n=e[xn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zv(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Xn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[xn]||null;if(!a)throw Error(F(90));Zv(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&NC(r)}break e;case"textarea":AC(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Al(e,!!n.multiple,t,!1)}}}var by=!1;function _C(e,t,n){if(by)return e(t,n);by=!0;try{var r=e(t);return r}finally{if(by=!1,(cl!==null||Cl!==null)&&(em(),cl&&(t=cl,e=Cl,Cl=cl=null,Oj(t),e)))for(t=0;t<e.length;t++)Oj(e[t])}}function iu(e,t){var n=e.stateNode;if(n===null)return null;var r=n[xn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(F(231,t,typeof n));return n}var Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tg=!1;if(Oa)try{var fc={};Object.defineProperty(fc,"passive",{get:function(){tg=!0}}),window.addEventListener("test",fc,fc),window.removeEventListener("test",fc,fc)}catch{tg=!1}var li=null,G0=null,Md=null;function TC(){if(Md)return Md;var e,t=G0,n=t.length,r,a="value"in li?li.value:li.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===a[i-r];r++);return Md=a.slice(e,1<r?1-r:void 0)}function Pd(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Yf(){return!0}function Aj(){return!1}function bn(e){function t(n,r,a,i,l){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Yf:Aj,this.isPropagationStopped=Aj,this}return nt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Yf)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Yf)},persist:function(){},isPersistent:Yf}),t}var zs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hp=bn(zs),df=nt({},zs,{view:0,detail:0}),y4=bn(df),jy,Sy,dc,Fp=nt({},df,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:K0,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dc&&(dc&&e.type==="mousemove"?(jy=e.screenX-dc.screenX,Sy=e.screenY-dc.screenY):Sy=jy=0,dc=e),jy)},movementY:function(e){return"movementY"in e?e.movementY:Sy}}),Cj=bn(Fp),v4=nt({},Fp,{dataTransfer:0}),g4=bn(v4),x4=nt({},df,{relatedTarget:0}),wy=bn(x4),b4=nt({},zs,{animationName:0,elapsedTime:0,pseudoElement:0}),j4=bn(b4),S4=nt({},zs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),w4=bn(S4),N4=nt({},zs,{data:0}),Ej=bn(N4),O4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A4={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"},C4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function E4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=C4[e])?!!t[e]:!1}function K0(){return E4}var _4=nt({},df,{key:function(e){if(e.key){var t=O4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?A4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:K0,charCode:function(e){return e.type==="keypress"?Pd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),T4=bn(_4),k4=nt({},Fp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_j=bn(k4),M4=nt({},df,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:K0}),P4=bn(M4),$4=nt({},zs,{propertyName:0,elapsedTime:0,pseudoElement:0}),R4=bn($4),D4=nt({},Fp,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),L4=bn(D4),z4=nt({},zs,{newState:0,oldState:0}),I4=bn(z4),B4=[9,13,27,32],V0=Oa&&"CompositionEvent"in window,Dc=null;Oa&&"documentMode"in document&&(Dc=document.documentMode);var U4=Oa&&"TextEvent"in window&&!Dc,kC=Oa&&(!V0||Dc&&8<Dc&&11>=Dc),Tj=" ",kj=!1;function MC(e,t){switch(e){case"keyup":return B4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function PC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ul=!1;function q4(e,t){switch(e){case"compositionend":return PC(t);case"keypress":return t.which!==32?null:(kj=!0,Tj);case"textInput":return e=t.data,e===Tj&&kj?null:e;default:return null}}function H4(e,t){if(ul)return e==="compositionend"||!V0&&MC(e,t)?(e=TC(),Md=G0=li=null,ul=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return kC&&t.locale!=="ko"?null:t.data;default:return null}}var F4={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 Mj(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!F4[e.type]:t==="textarea"}function $C(e,t,n,r){cl?Cl?Cl.push(r):Cl=[r]:cl=r,t=jh(t,"onChange"),0<t.length&&(n=new Hp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Lc=null,su=null;function G4(e){__(e,0)}function Gp(e){var t=kc(e);if(NC(t))return e}function Pj(e,t){if(e==="change")return t}var RC=!1;if(Oa){var Ny;if(Oa){var Oy="oninput"in document;if(!Oy){var $j=document.createElement("div");$j.setAttribute("oninput","return;"),Oy=typeof $j.oninput=="function"}Ny=Oy}else Ny=!1;RC=Ny&&(!document.documentMode||9<document.documentMode)}function Rj(){Lc&&(Lc.detachEvent("onpropertychange",DC),su=Lc=null)}function DC(e){if(e.propertyName==="value"&&Gp(su)){var t=[];$C(t,su,e,F0(e)),_C(G4,t)}}function K4(e,t,n){e==="focusin"?(Rj(),Lc=t,su=n,Lc.attachEvent("onpropertychange",DC)):e==="focusout"&&Rj()}function V4(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gp(su)}function Y4(e,t){if(e==="click")return Gp(t)}function W4(e,t){if(e==="input"||e==="change")return Gp(t)}function Q4(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dn=typeof Object.is=="function"?Object.is:Q4;function lu(e,t){if(Dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!Wv.call(t,a)||!Dn(e[a],t[a]))return!1}return!0}function Dj(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lj(e,t){var n=Dj(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Dj(n)}}function LC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?LC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zC(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=rh(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=rh(e.document)}return t}function Y0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var X4=Oa&&"documentMode"in document&&11>=document.documentMode,fl=null,ng=null,zc=null,rg=!1;function zj(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rg||fl==null||fl!==rh(r)||(r=fl,"selectionStart"in r&&Y0(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zc&&lu(zc,r)||(zc=r,r=jh(ng,"onSelect"),0<r.length&&(t=new Hp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fl)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var dl={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},Ay={},IC={};Oa&&(IC=document.createElement("div").style,"AnimationEvent"in window||(delete dl.animationend.animation,delete dl.animationiteration.animation,delete dl.animationstart.animation),"TransitionEvent"in window||delete dl.transitionend.transition);function Is(e){if(Ay[e])return Ay[e];if(!dl[e])return e;var t=dl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in IC)return Ay[e]=t[n];return e}var BC=Is("animationend"),UC=Is("animationiteration"),qC=Is("animationstart"),Z4=Is("transitionrun"),J4=Is("transitionstart"),eR=Is("transitioncancel"),HC=Is("transitionend"),FC=new Map,ag="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(" ");ag.push("scrollEnd");function _r(e,t){FC.set(e,t),Ls(t,[e])}var ah=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Vn=[],hl=0,W0=0;function Kp(){for(var e=hl,t=W0=hl=0;t<e;){var n=Vn[t];Vn[t++]=null;var r=Vn[t];Vn[t++]=null;var a=Vn[t];Vn[t++]=null;var i=Vn[t];if(Vn[t++]=null,r!==null&&a!==null){var l=r.pending;l===null?a.next=a:(a.next=l.next,l.next=a),r.pending=a}i!==0&&GC(n,a,i)}}function Vp(e,t,n,r){Vn[hl++]=e,Vn[hl++]=t,Vn[hl++]=n,Vn[hl++]=r,W0|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Q0(e,t,n,r){return Vp(e,t,n,r),ih(e)}function Bs(e,t){return Vp(e,null,null,t),ih(e)}function GC(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-Pn(n),e=i.hiddenUpdates,r=e[a],r===null?e[a]=[t]:r.push(t),t.lane=n|536870912),i):null}function ih(e){if(50<Vc)throw Vc=0,Og=null,Error(F(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var pl={};function tR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(e,t,n,r){return new tR(e,t,n,r)}function X0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ba(e,t){var n=e.alternate;return n===null?(n=En(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function KC(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function $d(e,t,n,r,a,i){var l=0;if(r=e,typeof e=="function")X0(e)&&(l=1);else if(typeof e=="string")l=sD(e,n,Gr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Gv:return e=En(31,n,t,a),e.elementType=Gv,e.lanes=i,e;case sl:return ms(n.children,a,i,t);case fC:l=8,a|=24;break;case qv:return e=En(12,n,t,a|2),e.elementType=qv,e.lanes=i,e;case Hv:return e=En(13,n,t,a),e.elementType=Hv,e.lanes=i,e;case Fv:return e=En(19,n,t,a),e.elementType=Fv,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pa:l=10;break e;case dC:l=9;break e;case L0:l=11;break e;case z0:l=14;break e;case Ka:l=16,r=null;break e}l=29,n=Error(F(130,e===null?"null":typeof e,"")),r=null}return t=En(l,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function ms(e,t,n,r){return e=En(7,e,r,t),e.lanes=n,e}function Cy(e,t,n){return e=En(6,e,null,t),e.lanes=n,e}function VC(e){var t=En(18,null,null,0);return t.stateNode=e,t}function Ey(e,t,n){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ij=new WeakMap;function Zn(e,t){if(typeof e=="object"&&e!==null){var n=Ij.get(e);return n!==void 0?n:(t={value:e,source:t,stack:xj(t)},Ij.set(e,t),t)}return{value:e,source:t,stack:xj(t)}}var ml=[],yl=0,sh=null,ou=0,Wn=[],Qn=0,Oi=null,Br=1,Ur="";function ua(e,t){ml[yl++]=ou,ml[yl++]=sh,sh=e,ou=t}function YC(e,t,n){Wn[Qn++]=Br,Wn[Qn++]=Ur,Wn[Qn++]=Oi,Oi=e;var r=Br;e=Ur;var a=32-Pn(r)-1;r&=~(1<<a),n+=1;var i=32-Pn(t)+a;if(30<i){var l=a-a%5;i=(r&(1<<l)-1).toString(32),r>>=l,a-=l,Br=1<<32-Pn(t)+a|n<<a|r,Ur=i+e}else Br=1<<i|n<<a|r,Ur=e}function Z0(e){e.return!==null&&(ua(e,1),YC(e,1,0))}function J0(e){for(;e===sh;)sh=ml[--yl],ml[yl]=null,ou=ml[--yl],ml[yl]=null;for(;e===Oi;)Oi=Wn[--Qn],Wn[Qn]=null,Ur=Wn[--Qn],Wn[Qn]=null,Br=Wn[--Qn],Wn[Qn]=null}function WC(e,t){Wn[Qn++]=Br,Wn[Qn++]=Ur,Wn[Qn++]=Oi,Br=t.id,Ur=t.overflow,Oi=e}var Gt=null,Je=null,Ce=!1,mi=null,Jn=!1,ig=Error(F(519));function Ai(e){var t=Error(F(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cu(Zn(t,e)),ig}function Bj(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ft]=e,t[xn]=r,n){case"dialog":Se("cancel",t),Se("close",t);break;case"iframe":case"object":case"embed":Se("load",t);break;case"video":case"audio":for(n=0;n<hu.length;n++)Se(hu[n],t);break;case"source":Se("error",t);break;case"img":case"image":case"link":Se("error",t),Se("load",t);break;case"details":Se("toggle",t);break;case"input":Se("invalid",t),OC(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Se("invalid",t);break;case"textarea":Se("invalid",t),CC(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||k_(t.textContent,n)?(r.popover!=null&&(Se("beforetoggle",t),Se("toggle",t)),r.onScroll!=null&&Se("scroll",t),r.onScrollEnd!=null&&Se("scrollend",t),r.onClick!=null&&(t.onclick=ma),t=!0):t=!1,t||Ai(e,!0)}function Uj(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Jn=!1;return;case 27:case 3:Jn=!0;return;default:Gt=Gt.return}}function Ws(e){if(e!==Gt)return!1;if(!Ce)return Uj(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Tg(e.type,e.memoizedProps)),n=!n),n&&Je&&Ai(e),Uj(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));Je=CS(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));Je=CS(e)}else t===27?(t=Je,$i(e.type)?(e=$g,$g=null,Je=e):Je=t):Je=Gt?ar(e.stateNode.nextSibling):null;return!0}function Ns(){Je=Gt=null,Ce=!1}function _y(){var e=mi;return e!==null&&(mn===null?mn=e:mn.push.apply(mn,e),mi=null),e}function cu(e){mi===null?mi=[e]:mi.push(e)}var sg=Qr(null),Us=null,ya=null;function Wa(e,t,n){Ve(sg,t._currentValue),t._currentValue=n}function ja(e){e._currentValue=sg.current,It(sg)}function lg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function og(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var l=a.child;i=i.firstContext;e:for(;i!==null;){var o=i;i=a;for(var c=0;c<t.length;c++)if(o.context===t[c]){i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),lg(i.return,n,e),r||(l=null);break e}i=o.next}}else if(a.tag===18){if(l=a.return,l===null)throw Error(F(341));l.lanes|=n,i=l.alternate,i!==null&&(i.lanes|=n),lg(l,n,e),l=null}else l=a.child;if(l!==null)l.return=a;else for(l=a;l!==null;){if(l===e){l=null;break}if(a=l.sibling,a!==null){a.return=l.return,l=a;break}l=l.return}a=l}}function Io(e,t,n,r){e=null;for(var a=t,i=!1;a!==null;){if(!i){if(a.flags&524288)i=!0;else if(a.flags&262144)break}if(a.tag===10){var l=a.alternate;if(l===null)throw Error(F(387));if(l=l.memoizedProps,l!==null){var o=a.type;Dn(a.pendingProps.value,l.value)||(e!==null?e.push(o):e=[o])}}else if(a===Jd.current){if(l=a.alternate,l===null)throw Error(F(387));l.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(mu):e=[mu])}a=a.return}e!==null&&og(t,e,n,r),t.flags|=262144}function lh(e){for(e=e.firstContext;e!==null;){if(!Dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Os(e){Us=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Vt(e){return QC(Us,e)}function Wf(e,t){return Us===null&&Os(e),QC(e,t)}function QC(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ya===null){if(e===null)throw Error(F(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return n}var nR=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},rR=Mt.unstable_scheduleCallback,aR=Mt.unstable_NormalPriority,Ot={$$typeof:pa,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function eb(){return{controller:new nR,data:new Map,refCount:0}}function hf(e){e.refCount--,e.refCount===0&&rR(aR,function(){e.controller.abort()})}var Ic=null,cg=0,Yl=0,El=null;function iR(e,t){if(Ic===null){var n=Ic=[];cg=0,Yl=Ob(),El={status:"pending",value:void 0,then:function(r){n.push(r)}}}return cg++,t.then(qj,qj),t}function qj(){if(--cg===0&&Ic!==null){El!==null&&(El.status="fulfilled");var e=Ic;Ic=null,Yl=0,El=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function sR(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(r.status="rejected",r.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),r}var Hj=de.S;de.S=function(e,t){u_=kn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&iR(e,t),Hj!==null&&Hj(e,t)};var ys=Qr(null);function tb(){var e=ys.current;return e!==null?e:He.pooledCache}function Rd(e,t){t===null?Ve(ys,ys.current):Ve(ys,t.pool)}function XC(){var e=tb();return e===null?null:{parent:Ot._currentValue,pool:e}}var Bo=Error(F(460)),nb=Error(F(474)),Yp=Error(F(542)),oh={then:function(){}};function Fj(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ZC(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ma,ma),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kj(e),e;default:if(typeof t.status=="string")t.then(ma,ma);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(F(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=r}},function(r){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kj(e),e}throw vs=t,Bo}}function Qi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(vs=n,Bo):n}}var vs=null;function Gj(){if(vs===null)throw Error(F(459));var e=vs;return vs=null,e}function Kj(e){if(e===Bo||e===Yp)throw Error(F(483))}var _l=null,uu=0;function Qf(e){var t=uu;return uu+=1,_l===null&&(_l=[]),ZC(_l,e,t)}function hc(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Xf(e,t){throw t.$$typeof===K$?Error(F(525)):(e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function JC(e){function t(y,g){if(e){var b=y.deletions;b===null?(y.deletions=[g],y.flags|=16):b.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y){for(var g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function a(y,g){return y=ba(y,g),y.index=0,y.sibling=null,y}function i(y,g,b){return y.index=b,e?(b=y.alternate,b!==null?(b=b.index,b<g?(y.flags|=67108866,g):b):(y.flags|=67108866,g)):(y.flags|=1048576,g)}function l(y){return e&&y.alternate===null&&(y.flags|=67108866),y}function o(y,g,b,x){return g===null||g.tag!==6?(g=Cy(b,y.mode,x),g.return=y,g):(g=a(g,b),g.return=y,g)}function c(y,g,b,x){var N=b.type;return N===sl?f(y,g,b.props.children,x,b.key):g!==null&&(g.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Ka&&Qi(N)===g.type)?(g=a(g,b.props),hc(g,b),g.return=y,g):(g=$d(b.type,b.key,b.props,null,y.mode,x),hc(g,b),g.return=y,g)}function u(y,g,b,x){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=Ey(b,y.mode,x),g.return=y,g):(g=a(g,b.children||[]),g.return=y,g)}function f(y,g,b,x,N){return g===null||g.tag!==7?(g=ms(b,y.mode,x,N),g.return=y,g):(g=a(g,b),g.return=y,g)}function d(y,g,b){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Cy(""+g,y.mode,b),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Hf:return b=$d(g.type,g.key,g.props,null,y.mode,b),hc(b,g),b.return=y,b;case _c:return g=Ey(g,y.mode,b),g.return=y,g;case Ka:return g=Qi(g),d(y,g,b)}if(Tc(g)||uc(g))return g=ms(g,y.mode,b,null),g.return=y,g;if(typeof g.then=="function")return d(y,Qf(g),b);if(g.$$typeof===pa)return d(y,Wf(y,g),b);Xf(y,g)}return null}function h(y,g,b,x){var N=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return N!==null?null:o(y,g,""+b,x);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Hf:return b.key===N?c(y,g,b,x):null;case _c:return b.key===N?u(y,g,b,x):null;case Ka:return b=Qi(b),h(y,g,b,x)}if(Tc(b)||uc(b))return N!==null?null:f(y,g,b,x,null);if(typeof b.then=="function")return h(y,g,Qf(b),x);if(b.$$typeof===pa)return h(y,g,Wf(y,b),x);Xf(y,b)}return null}function m(y,g,b,x,N){if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return y=y.get(b)||null,o(g,y,""+x,N);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Hf:return y=y.get(x.key===null?b:x.key)||null,c(g,y,x,N);case _c:return y=y.get(x.key===null?b:x.key)||null,u(g,y,x,N);case Ka:return x=Qi(x),m(y,g,b,x,N)}if(Tc(x)||uc(x))return y=y.get(b)||null,f(g,y,x,N,null);if(typeof x.then=="function")return m(y,g,b,Qf(x),N);if(x.$$typeof===pa)return m(y,g,b,Wf(g,x),N);Xf(g,x)}return null}function j(y,g,b,x){for(var N=null,w=null,O=g,A=g=0,E=null;O!==null&&A<b.length;A++){O.index>A?(E=O,O=null):E=O.sibling;var M=h(y,O,b[A],x);if(M===null){O===null&&(O=E);break}e&&O&&M.alternate===null&&t(y,O),g=i(M,g,A),w===null?N=M:w.sibling=M,w=M,O=E}if(A===b.length)return n(y,O),Ce&&ua(y,A),N;if(O===null){for(;A<b.length;A++)O=d(y,b[A],x),O!==null&&(g=i(O,g,A),w===null?N=O:w.sibling=O,w=O);return Ce&&ua(y,A),N}for(O=r(O);A<b.length;A++)E=m(O,y,A,b[A],x),E!==null&&(e&&E.alternate!==null&&O.delete(E.key===null?A:E.key),g=i(E,g,A),w===null?N=E:w.sibling=E,w=E);return e&&O.forEach(function($){return t(y,$)}),Ce&&ua(y,A),N}function v(y,g,b,x){if(b==null)throw Error(F(151));for(var N=null,w=null,O=g,A=g=0,E=null,M=b.next();O!==null&&!M.done;A++,M=b.next()){O.index>A?(E=O,O=null):E=O.sibling;var $=h(y,O,M.value,x);if($===null){O===null&&(O=E);break}e&&O&&$.alternate===null&&t(y,O),g=i($,g,A),w===null?N=$:w.sibling=$,w=$,O=E}if(M.done)return n(y,O),Ce&&ua(y,A),N;if(O===null){for(;!M.done;A++,M=b.next())M=d(y,M.value,x),M!==null&&(g=i(M,g,A),w===null?N=M:w.sibling=M,w=M);return Ce&&ua(y,A),N}for(O=r(O);!M.done;A++,M=b.next())M=m(O,y,A,M.value,x),M!==null&&(e&&M.alternate!==null&&O.delete(M.key===null?A:M.key),g=i(M,g,A),w===null?N=M:w.sibling=M,w=M);return e&&O.forEach(function(k){return t(y,k)}),Ce&&ua(y,A),N}function p(y,g,b,x){if(typeof b=="object"&&b!==null&&b.type===sl&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Hf:e:{for(var N=b.key;g!==null;){if(g.key===N){if(N=b.type,N===sl){if(g.tag===7){n(y,g.sibling),x=a(g,b.props.children),x.return=y,y=x;break e}}else if(g.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Ka&&Qi(N)===g.type){n(y,g.sibling),x=a(g,b.props),hc(x,b),x.return=y,y=x;break e}n(y,g);break}else t(y,g);g=g.sibling}b.type===sl?(x=ms(b.props.children,y.mode,x,b.key),x.return=y,y=x):(x=$d(b.type,b.key,b.props,null,y.mode,x),hc(x,b),x.return=y,y=x)}return l(y);case _c:e:{for(N=b.key;g!==null;){if(g.key===N)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(y,g.sibling),x=a(g,b.children||[]),x.return=y,y=x;break e}else{n(y,g);break}else t(y,g);g=g.sibling}x=Ey(b,y.mode,x),x.return=y,y=x}return l(y);case Ka:return b=Qi(b),p(y,g,b,x)}if(Tc(b))return j(y,g,b,x);if(uc(b)){if(N=uc(b),typeof N!="function")throw Error(F(150));return b=N.call(b),v(y,g,b,x)}if(typeof b.then=="function")return p(y,g,Qf(b),x);if(b.$$typeof===pa)return p(y,g,Wf(y,b),x);Xf(y,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,g!==null&&g.tag===6?(n(y,g.sibling),x=a(g,b),x.return=y,y=x):(n(y,g),x=Cy(b,y.mode,x),x.return=y,y=x),l(y)):n(y,g)}return function(y,g,b,x){try{uu=0;var N=p(y,g,b,x);return _l=null,N}catch(O){if(O===Bo||O===Yp)throw O;var w=En(29,O,null,y.mode);return w.lanes=x,w.return=y,w}finally{}}}var As=JC(!0),eE=JC(!1),Va=!1;function rb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ug(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ke&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=ih(e),GC(e,null,n),t}return Vp(e,r,t,n),ih(e)}function Bc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gC(e,n)}}function Ty(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var fg=!1;function Uc(){if(fg){var e=El;if(e!==null)throw e}}function qc(e,t,n,r){fg=!1;var a=e.updateQueue;Va=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,u=c.next;c.next=null,l===null?i=u:l.next=u,l=c;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==l&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=c))}if(i!==null){var d=a.baseState;l=0,f=u=c=null,o=i;do{var h=o.lane&-536870913,m=h!==o.lane;if(m?(Ae&h)===h:(r&h)===h){h!==0&&h===Yl&&(fg=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var j=e,v=o;h=t;var p=n;switch(v.tag){case 1:if(j=v.payload,typeof j=="function"){d=j.call(p,d,h);break e}d=j;break e;case 3:j.flags=j.flags&-65537|128;case 0:if(j=v.payload,h=typeof j=="function"?j.call(p,d,h):j,h==null)break e;d=nt({},d,h);break e;case 2:Va=!0}}h=o.callback,h!==null&&(e.flags|=64,m&&(e.flags|=8192),m=a.callbacks,m===null?a.callbacks=[h]:m.push(h))}else m={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=m,c=d):f=f.next=m,l|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;m=o,o=m.next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}while(!0);f===null&&(c=d),a.baseState=c,a.firstBaseUpdate=u,a.lastBaseUpdate=f,i===null&&(a.shared.lanes=0),Ei|=l,e.lanes=l,e.memoizedState=d}}function tE(e,t){if(typeof e!="function")throw Error(F(191,e));e.call(t)}function nE(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)tE(n[e],t)}var Wl=Qr(null),ch=Qr(0);function Vj(e,t){e=_a,Ve(ch,e),Ve(Wl,t),_a=e|t.baseLanes}function dg(){Ve(ch,_a),Ve(Wl,Wl.current)}function ab(){_a=ch.current,It(Wl),It(ch)}var Ln=Qr(null),rr=null;function Qa(e){var t=e.alternate;Ve(gt,gt.current&1),Ve(Ln,e),rr===null&&(t===null||Wl.current!==null||t.memoizedState!==null)&&(rr=e)}function hg(e){Ve(gt,gt.current),Ve(Ln,e),rr===null&&(rr=e)}function rE(e){e.tag===22?(Ve(gt,gt.current),Ve(Ln,e),rr===null&&(rr=e)):Xa()}function Xa(){Ve(gt,gt.current),Ve(Ln,Ln.current)}function Cn(e){It(Ln),rr===e&&(rr=null),It(gt)}var gt=Qr(0);function uh(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Mg(n)||Pg(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Aa=0,ve=null,Ue=null,wt=null,fh=!1,Tl=!1,Cs=!1,dh=0,fu=0,kl=null,lR=0;function ht(){throw Error(F(321))}function ib(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dn(e[n],t[n]))return!1;return!0}function sb(e,t,n,r,a,i){return Aa=i,ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,de.H=e===null||e.memoizedState===null?$E:vb,Cs=!1,i=n(r,a),Cs=!1,Tl&&(i=iE(t,n,r,a)),aE(e),i}function aE(e){de.H=du;var t=Ue!==null&&Ue.next!==null;if(Aa=0,wt=Ue=ve=null,fh=!1,fu=0,kl=null,t)throw Error(F(300));e===null||At||(e=e.dependencies,e!==null&&lh(e)&&(At=!0))}function iE(e,t,n,r){ve=e;var a=0;do{if(Tl&&(kl=null),fu=0,Tl=!1,25<=a)throw Error(F(301));if(a+=1,wt=Ue=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}de.H=RE,i=t(n,r)}while(Tl);return i}function oR(){var e=de.H,t=e.useState()[0];return t=typeof t.then=="function"?pf(t):t,e=e.useState()[0],(Ue!==null?Ue.memoizedState:null)!==e&&(ve.flags|=1024),t}function lb(){var e=dh!==0;return dh=0,e}function ob(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function cb(e){if(fh){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}fh=!1}Aa=0,wt=Ue=ve=null,Tl=!1,fu=dh=0,kl=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?ve.memoizedState=wt=e:wt=wt.next=e,wt}function xt(){if(Ue===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=wt===null?ve.memoizedState:wt.next;if(t!==null)wt=t,Ue=e;else{if(e===null)throw ve.alternate===null?Error(F(467)):Error(F(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},wt===null?ve.memoizedState=wt=e:wt=wt.next=e}return wt}function Wp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pf(e){var t=fu;return fu+=1,kl===null&&(kl=[]),e=ZC(kl,e,t),t=ve,(wt===null?t.memoizedState:wt.next)===null&&(t=t.alternate,de.H=t===null||t.memoizedState===null?$E:vb),e}function Qp(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return pf(e);if(e.$$typeof===pa)return Vt(e)}throw Error(F(438,String(e)))}function ub(e){var t=null,n=ve.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ve.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Wp(),ve.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=V$;return t.index++,n}function Ca(e,t){return typeof t=="function"?t(e):t}function Dd(e){var t=xt();return fb(t,Ue,e)}function fb(e,t,n){var r=e.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=n;var a=e.baseQueue,i=r.pending;if(i!==null){if(a!==null){var l=a.next;a.next=i.next,i.next=l}t.baseQueue=a=i,r.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var o=l=null,c=null,u=t,f=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(Ae&d)===d:(Aa&d)===d){var h=u.revertLane;if(h===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===Yl&&(f=!0);else if((Aa&h)===h){u=u.next,h===Yl&&(f=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=d,l=i):c=c.next=d,ve.lanes|=h,Ei|=h;d=u.action,Cs&&n(i,d),i=u.hasEagerState?u.eagerState:n(i,d)}else h={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=h,l=i):c=c.next=h,ve.lanes|=d,Ei|=d;u=u.next}while(u!==null&&u!==t);if(c===null?l=i:c.next=o,!Dn(i,e.memoizedState)&&(At=!0,f&&(n=El,n!==null)))throw n;e.memoizedState=i,e.baseState=l,e.baseQueue=c,r.lastRenderedState=i}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ky(e){var t=xt(),n=t.queue;if(n===null)throw Error(F(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var l=a=a.next;do i=e(i,l.action),l=l.next;while(l!==a);Dn(i,t.memoizedState)||(At=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function sE(e,t,n){var r=ve,a=xt(),i=Ce;if(i){if(n===void 0)throw Error(F(407));n=n()}else n=t();var l=!Dn((Ue||a).memoizedState,n);if(l&&(a.memoizedState=n,At=!0),a=a.queue,db(cE.bind(null,r,a,e),[e]),a.getSnapshot!==t||l||wt!==null&&wt.memoizedState.tag&1){if(r.flags|=2048,Ql(9,{destroy:void 0},oE.bind(null,r,a,n,t),null),He===null)throw Error(F(349));i||Aa&127||lE(r,t,n)}return n}function lE(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ve.updateQueue,t===null?(t=Wp(),ve.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function oE(e,t,n,r){t.value=n,t.getSnapshot=r,uE(t)&&fE(e)}function cE(e,t,n){return n(function(){uE(t)&&fE(e)})}function uE(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Dn(e,n)}catch{return!0}}function fE(e){var t=Bs(e,2);t!==null&&vn(t,e,2)}function pg(e){var t=en();if(typeof e=="function"){var n=e;if(e=n(),Cs){si(!0);try{n()}finally{si(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},t}function dE(e,t,n,r){return e.baseState=n,fb(e,Ue,typeof r=="function"?r:Ca)}function cR(e,t,n,r,a){if(Zp(e))throw Error(F(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){i.listeners.push(l)}};de.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,hE(t,i)):(i.next=n.next,t.pending=n.next=i)}}function hE(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var i=de.T,l={};de.T=l;try{var o=n(a,r),c=de.S;c!==null&&c(l,o),Yj(e,t,o)}catch(u){mg(e,t,u)}finally{i!==null&&l.types!==null&&(i.types=l.types),de.T=i}}else try{i=n(a,r),Yj(e,t,i)}catch(u){mg(e,t,u)}}function Yj(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){Wj(e,t,r)},function(r){return mg(e,t,r)}):Wj(e,t,n)}function Wj(e,t,n){t.status="fulfilled",t.value=n,pE(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,hE(e,n)))}function mg(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,pE(t),t=t.next;while(t!==r)}e.action=null}function pE(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function mE(e,t){return t}function Qj(e,t){if(Ce){var n=He.formState;if(n!==null){e:{var r=ve;if(Ce){if(Je){t:{for(var a=Je,i=Jn;a.nodeType!==8;){if(!i){a=null;break t}if(a=ar(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){Je=ar(a.nextSibling),r=a.data==="F!";break e}}Ai(r)}r=!1}r&&(t=n[0])}}return n=en(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mE,lastRenderedState:t},n.queue=r,n=kE.bind(null,ve,r),r.dispatch=n,r=pg(!1),i=yb.bind(null,ve,!1,r.queue),r=en(),a={state:t,dispatch:null,action:e,pending:null},r.queue=a,n=cR.bind(null,ve,a,i,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function Xj(e){var t=xt();return yE(t,Ue,e)}function yE(e,t,n){if(t=fb(e,t,mE)[0],e=Dd(Ca)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=pf(t)}catch(l){throw l===Bo?Yp:l}else r=t;t=xt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(ve.flags|=2048,Ql(9,{destroy:void 0},uR.bind(null,a,n),null)),[r,i,e]}function uR(e,t){e.action=t}function Zj(e){var t=xt(),n=Ue;if(n!==null)return yE(t,n,e);xt(),t=t.memoizedState,n=xt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ql(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ve.updateQueue,t===null&&(t=Wp(),ve.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function vE(){return xt().memoizedState}function Ld(e,t,n,r){var a=en();ve.flags|=e,a.memoizedState=Ql(1|t,{destroy:void 0},n,r===void 0?null:r)}function Xp(e,t,n,r){var a=xt();r=r===void 0?null:r;var i=a.memoizedState.inst;Ue!==null&&r!==null&&ib(r,Ue.memoizedState.deps)?a.memoizedState=Ql(t,i,n,r):(ve.flags|=e,a.memoizedState=Ql(1|t,i,n,r))}function Jj(e,t){Ld(8390656,8,e,t)}function db(e,t){Xp(2048,8,e,t)}function fR(e){ve.flags|=4;var t=ve.updateQueue;if(t===null)t=Wp(),ve.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gE(e){var t=xt().memoizedState;return fR({ref:t,nextImpl:e}),function(){if(ke&2)throw Error(F(440));return t.impl.apply(void 0,arguments)}}function xE(e,t){return Xp(4,2,e,t)}function bE(e,t){return Xp(4,4,e,t)}function jE(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function SE(e,t,n){n=n!=null?n.concat([e]):null,Xp(4,4,jE.bind(null,t,e),n)}function hb(){}function wE(e,t){var n=xt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ib(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function NE(e,t){var n=xt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ib(t,r[1]))return r[0];if(r=e(),Cs){si(!0);try{e()}finally{si(!1)}}return n.memoizedState=[r,t],r}function pb(e,t,n){return n===void 0||Aa&1073741824&&!(Ae&261930)?e.memoizedState=t:(e.memoizedState=n,e=d_(),ve.lanes|=e,Ei|=e,n)}function OE(e,t,n,r){return Dn(n,t)?n:Wl.current!==null?(e=pb(e,n,r),Dn(e,t)||(At=!0),e):!(Aa&42)||Aa&1073741824&&!(Ae&261930)?(At=!0,e.memoizedState=n):(e=d_(),ve.lanes|=e,Ei|=e,t)}function AE(e,t,n,r,a){var i=Me.p;Me.p=i!==0&&8>i?i:8;var l=de.T,o={};de.T=o,yb(e,!1,t,n);try{var c=a(),u=de.S;if(u!==null&&u(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=sR(c,r);Hc(e,t,f,$n(e))}else Hc(e,t,r,$n(e))}catch(d){Hc(e,t,{then:function(){},status:"rejected",reason:d},$n())}finally{Me.p=i,l!==null&&o.types!==null&&(l.types=o.types),de.T=l}}function dR(){}function yg(e,t,n,r){if(e.tag!==5)throw Error(F(476));var a=CE(e).queue;AE(e,a,t,ps,n===null?dR:function(){return EE(e),n(r)})}function CE(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ps,baseState:ps,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:ps},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function EE(e){var t=CE(e);t.next===null&&(t=e.alternate.memoizedState),Hc(e,t.next.queue,{},$n())}function mb(){return Vt(mu)}function _E(){return xt().memoizedState}function TE(){return xt().memoizedState}function hR(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=$n();e=yi(n);var r=vi(t,e,n);r!==null&&(vn(r,t,n),Bc(r,t,n)),t={cache:eb()},e.payload=t;return}t=t.return}}function pR(e,t,n){var r=$n();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zp(e)?ME(t,n):(n=Q0(e,t,n,r),n!==null&&(vn(n,e,r),PE(n,t,r)))}function kE(e,t,n){var r=$n();Hc(e,t,n,r)}function Hc(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zp(e))ME(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,n);if(a.hasEagerState=!0,a.eagerState=o,Dn(o,l))return Vp(e,t,a,0),He===null&&Kp(),!1}catch{}finally{}if(n=Q0(e,t,a,r),n!==null)return vn(n,e,r),PE(n,t,r),!0}return!1}function yb(e,t,n,r){if(r={lane:2,revertLane:Ob(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Zp(e)){if(t)throw Error(F(479))}else t=Q0(e,n,r,2),t!==null&&vn(t,e,2)}function Zp(e){var t=e.alternate;return e===ve||t!==null&&t===ve}function ME(e,t){Tl=fh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function PE(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,gC(e,n)}}var du={readContext:Vt,use:Qp,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useLayoutEffect:ht,useInsertionEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useSyncExternalStore:ht,useId:ht,useHostTransitionStatus:ht,useFormState:ht,useActionState:ht,useOptimistic:ht,useMemoCache:ht,useCacheRefresh:ht};du.useEffectEvent=ht;var $E={readContext:Vt,use:Qp,useCallback:function(e,t){return en().memoizedState=[e,t===void 0?null:t],e},useContext:Vt,useEffect:Jj,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ld(4194308,4,jE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ld(4194308,4,e,t)},useInsertionEffect:function(e,t){Ld(4,2,e,t)},useMemo:function(e,t){var n=en();t=t===void 0?null:t;var r=e();if(Cs){si(!0);try{e()}finally{si(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=en();if(n!==void 0){var a=n(t);if(Cs){si(!0);try{n(t)}finally{si(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=pR.bind(null,ve,e),[r.memoizedState,e]},useRef:function(e){var t=en();return e={current:e},t.memoizedState=e},useState:function(e){e=pg(e);var t=e.queue,n=kE.bind(null,ve,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hb,useDeferredValue:function(e,t){var n=en();return pb(n,e,t)},useTransition:function(){var e=pg(!1);return e=AE.bind(null,ve,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ve,a=en();if(Ce){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),He===null)throw Error(F(349));Ae&127||lE(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Jj(cE.bind(null,r,i,e),[e]),r.flags|=2048,Ql(9,{destroy:void 0},oE.bind(null,r,i,n,t),null),n},useId:function(){var e=en(),t=He.identifierPrefix;if(Ce){var n=Ur,r=Br;n=(r&~(1<<32-Pn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=dh++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=lR++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:mb,useFormState:Qj,useActionState:Qj,useOptimistic:function(e){var t=en();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=yb.bind(null,ve,!0,n),n.dispatch=t,[e,t]},useMemoCache:ub,useCacheRefresh:function(){return en().memoizedState=hR.bind(null,ve)},useEffectEvent:function(e){var t=en(),n={impl:e};return t.memoizedState=n,function(){if(ke&2)throw Error(F(440));return n.impl.apply(void 0,arguments)}}},vb={readContext:Vt,use:Qp,useCallback:wE,useContext:Vt,useEffect:db,useImperativeHandle:SE,useInsertionEffect:xE,useLayoutEffect:bE,useMemo:NE,useReducer:Dd,useRef:vE,useState:function(){return Dd(Ca)},useDebugValue:hb,useDeferredValue:function(e,t){var n=xt();return OE(n,Ue.memoizedState,e,t)},useTransition:function(){var e=Dd(Ca)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:pf(e),t]},useSyncExternalStore:sE,useId:_E,useHostTransitionStatus:mb,useFormState:Xj,useActionState:Xj,useOptimistic:function(e,t){var n=xt();return dE(n,Ue,e,t)},useMemoCache:ub,useCacheRefresh:TE};vb.useEffectEvent=gE;var RE={readContext:Vt,use:Qp,useCallback:wE,useContext:Vt,useEffect:db,useImperativeHandle:SE,useInsertionEffect:xE,useLayoutEffect:bE,useMemo:NE,useReducer:ky,useRef:vE,useState:function(){return ky(Ca)},useDebugValue:hb,useDeferredValue:function(e,t){var n=xt();return Ue===null?pb(n,e,t):OE(n,Ue.memoizedState,e,t)},useTransition:function(){var e=ky(Ca)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:pf(e),t]},useSyncExternalStore:sE,useId:_E,useHostTransitionStatus:mb,useFormState:Zj,useActionState:Zj,useOptimistic:function(e,t){var n=xt();return Ue!==null?dE(n,Ue,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:ub,useCacheRefresh:TE};RE.useEffectEvent=gE;function My(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:nt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vg={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=$n(),a=yi(r);a.payload=t,n!=null&&(a.callback=n),t=vi(e,a,r),t!==null&&(vn(t,e,r),Bc(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=$n(),a=yi(r);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=vi(e,a,r),t!==null&&(vn(t,e,r),Bc(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=$n(),r=yi(n);r.tag=2,t!=null&&(r.callback=t),t=vi(e,r,n),t!==null&&(vn(t,e,n),Bc(t,e,n))}};function eS(e,t,n,r,a,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!lu(n,r)||!lu(a,i):!0}function tS(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&vg.enqueueReplaceState(t,t.state,null)}function Es(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=nt({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function DE(e){ah(e)}function LE(e){console.error(e)}function zE(e){ah(e)}function hh(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function nS(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function gg(e,t,n){return n=yi(n),n.tag=3,n.payload={element:null},n.callback=function(){hh(e,t)},n}function IE(e){return e=yi(e),e.tag=3,e}function BE(e,t,n,r){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=r.value;e.payload=function(){return a(i)},e.callback=function(){nS(t,n,r)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){nS(t,n,r),typeof a!="function"&&(gi===null?gi=new Set([this]):gi.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function mR(e,t,n,r,a){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Io(t,n,a,!0),n=Ln.current,n!==null){switch(n.tag){case 31:case 13:return rr===null?gh():n.alternate===null&&yt===0&&(yt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===oh?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Hy(e,r,a)),!1;case 22:return n.flags|=65536,r===oh?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Hy(e,r,a)),!1}throw Error(F(435,n.tag))}return Hy(e,r,a),gh(),!1}if(Ce)return t=Ln.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ig&&(e=Error(F(422),{cause:r}),cu(Zn(e,n)))):(r!==ig&&(t=Error(F(423),{cause:r}),cu(Zn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Zn(r,n),a=gg(e.stateNode,r,a),Ty(e,a),yt!==4&&(yt=2)),!1;var i=Error(F(520),{cause:r});if(i=Zn(i,n),Kc===null?Kc=[i]:Kc.push(i),yt!==4&&(yt=2),t===null)return!0;r=Zn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=gg(n.stateNode,r,e),Ty(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(gi===null||!gi.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=IE(a),BE(a,e,n,r),Ty(n,a),!1}n=n.return}while(n!==null);return!1}var gb=Error(F(461)),At=!1;function Ht(e,t,n,r){t.child=e===null?eE(t,null,n,r):As(t,e.child,n,r)}function rS(e,t,n,r,a){n=n.render;var i=t.ref;if("ref"in r){var l={};for(var o in r)o!=="ref"&&(l[o]=r[o])}else l=r;return Os(t),r=sb(e,t,n,l,i,a),o=lb(),e!==null&&!At?(ob(e,t,a),Ea(e,t,a)):(Ce&&o&&Z0(t),t.flags|=1,Ht(e,t,r,a),t.child)}function aS(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!X0(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,UE(e,t,i,r,a)):(e=$d(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!xb(e,a)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:lu,n(l,r)&&e.ref===t.ref)return Ea(e,t,a)}return t.flags|=1,e=ba(i,r),e.ref=t.ref,e.return=t,t.child=e}function UE(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(lu(i,r)&&e.ref===t.ref)if(At=!1,t.pendingProps=r=i,xb(e,a))e.flags&131072&&(At=!0);else return t.lanes=e.lanes,Ea(e,t,a)}return xg(e,t,n,r,a)}function qE(e,t,n,r){var a=r.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,a=0;r!==null;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~i}else r=0,t.child=null;return iS(e,t,i,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Rd(t,i!==null?i.cachePool:null),i!==null?Vj(t,i):dg(),rE(t);else return r=t.lanes=536870912,iS(e,t,i!==null?i.baseLanes|n:n,n,r)}else i!==null?(Rd(t,i.cachePool),Vj(t,i),Xa(),t.memoizedState=null):(e!==null&&Rd(t,null),dg(),Xa());return Ht(e,t,a,n),t.child}function Mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function iS(e,t,n,r,a){var i=tb();return i=i===null?null:{parent:Ot._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Rd(t,null),dg(),rE(t),e!==null&&Io(e,t,r,!0),t.childLanes=a,null}function zd(e,t){return t=ph({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sS(e,t,n){return As(t,e.child,null,n),e=zd(t,t.pendingProps),e.flags|=2,Cn(t),t.memoizedState=null,e}function yR(e,t,n){var r=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(r.mode==="hidden")return e=zd(t,r),t.lanes=536870912,Mc(null,e);if(hg(t),(e=Je)?(e=$_(e,Jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi!==null?{id:Br,overflow:Ur}:null,retryLane:536870912,hydrationErrors:null},n=VC(e),n.return=t,t.child=n,Gt=t,Je=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return zd(t,r)}var i=e.memoizedState;if(i!==null){var l=i.dehydrated;if(hg(t),a)if(t.flags&256)t.flags&=-257,t=sS(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(F(558));else if(At||Io(e,t,n,!1),a=(n&e.childLanes)!==0,At||a){if(r=He,r!==null&&(l=xC(r,n),l!==0&&l!==i.retryLane))throw i.retryLane=l,Bs(e,l),vn(r,e,l),gb;gh(),t=sS(e,t,n)}else e=i.treeContext,Je=ar(l.nextSibling),Gt=t,Ce=!0,mi=null,Jn=!1,e!==null&&WC(t,e),t=zd(t,r),t.flags|=4096;return t}return e=ba(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Id(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(F(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function xg(e,t,n,r,a){return Os(t),n=sb(e,t,n,r,void 0,a),r=lb(),e!==null&&!At?(ob(e,t,a),Ea(e,t,a)):(Ce&&r&&Z0(t),t.flags|=1,Ht(e,t,n,a),t.child)}function lS(e,t,n,r,a,i){return Os(t),t.updateQueue=null,n=iE(t,r,n,a),aE(e),r=lb(),e!==null&&!At?(ob(e,t,i),Ea(e,t,i)):(Ce&&r&&Z0(t),t.flags|=1,Ht(e,t,n,i),t.child)}function oS(e,t,n,r,a){if(Os(t),t.stateNode===null){var i=pl,l=n.contextType;typeof l=="object"&&l!==null&&(i=Vt(l)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=vg,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},rb(t),l=n.contextType,i.context=typeof l=="object"&&l!==null?Vt(l):pl,i.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(My(t,n,l,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(l=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),l!==i.state&&vg.enqueueReplaceState(i,i.state,null),qc(t,r,i,a),Uc(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var o=t.memoizedProps,c=Es(n,o);i.props=c;var u=i.context,f=n.contextType;l=pl,typeof f=="object"&&f!==null&&(l=Vt(f));var d=n.getDerivedStateFromProps;f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o||u!==l)&&tS(t,i,r,l),Va=!1;var h=t.memoizedState;i.state=h,qc(t,r,i,a),Uc(),u=t.memoizedState,o||h!==u||Va?(typeof d=="function"&&(My(t,n,d,r),u=t.memoizedState),(c=Va||eS(t,n,c,r,h,u,l))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=l,r=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,ug(e,t),l=t.memoizedProps,f=Es(n,l),i.props=f,d=t.pendingProps,h=i.context,u=n.contextType,c=pl,typeof u=="object"&&u!==null&&(c=Vt(u)),o=n.getDerivedStateFromProps,(u=typeof o=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==d||h!==c)&&tS(t,i,r,c),Va=!1,h=t.memoizedState,i.state=h,qc(t,r,i,a),Uc();var m=t.memoizedState;l!==d||h!==m||Va||e!==null&&e.dependencies!==null&&lh(e.dependencies)?(typeof o=="function"&&(My(t,n,o,r),m=t.memoizedState),(f=Va||eS(t,n,f,r,h,m,c)||e!==null&&e.dependencies!==null&&lh(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,m,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,m,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=c,r=f):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Id(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=As(t,e.child,null,a),t.child=As(t,null,n,a)):Ht(e,t,n,a),t.memoizedState=i.state,e=t.child):e=Ea(e,t,a),e}function cS(e,t,n,r){return Ns(),t.flags|=256,Ht(e,t,n,r),t.child}var Py={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function $y(e){return{baseLanes:e,cachePool:XC()}}function Ry(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Tn),e}function HE(e,t,n){var r=t.pendingProps,a=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),l&&(a=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(a?Qa(t):Xa(),(e=Je)?(e=$_(e,Jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi!==null?{id:Br,overflow:Ur}:null,retryLane:536870912,hydrationErrors:null},n=VC(e),n.return=t,t.child=n,Gt=t,Je=null)):e=null,e===null)throw Ai(t);return Pg(e)?t.lanes=32:t.lanes=536870912,null}var o=r.children;return r=r.fallback,a?(Xa(),a=t.mode,o=ph({mode:"hidden",children:o},a),r=ms(r,a,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,r=t.child,r.memoizedState=$y(n),r.childLanes=Ry(e,l,n),t.memoizedState=Py,Mc(null,r)):(Qa(t),bg(t,o))}var c=e.memoizedState;if(c!==null&&(o=c.dehydrated,o!==null)){if(i)t.flags&256?(Qa(t),t.flags&=-257,t=Dy(e,t,n)):t.memoizedState!==null?(Xa(),t.child=e.child,t.flags|=128,t=null):(Xa(),o=r.fallback,a=t.mode,r=ph({mode:"visible",children:r.children},a),o=ms(o,a,n,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,As(t,e.child,null,n),r=t.child,r.memoizedState=$y(n),r.childLanes=Ry(e,l,n),t.memoizedState=Py,t=Mc(null,r));else if(Qa(t),Pg(o)){if(l=o.nextSibling&&o.nextSibling.dataset,l)var u=l.dgst;l=u,r=Error(F(419)),r.stack="",r.digest=l,cu({value:r,source:null,stack:null}),t=Dy(e,t,n)}else if(At||Io(e,t,n,!1),l=(n&e.childLanes)!==0,At||l){if(l=He,l!==null&&(r=xC(l,n),r!==0&&r!==c.retryLane))throw c.retryLane=r,Bs(e,r),vn(l,e,r),gb;Mg(o)||gh(),t=Dy(e,t,n)}else Mg(o)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Je=ar(o.nextSibling),Gt=t,Ce=!0,mi=null,Jn=!1,e!==null&&WC(t,e),t=bg(t,r.children),t.flags|=4096);return t}return a?(Xa(),o=r.fallback,a=t.mode,c=e.child,u=c.sibling,r=ba(c,{mode:"hidden",children:r.children}),r.subtreeFlags=c.subtreeFlags&65011712,u!==null?o=ba(u,o):(o=ms(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,Mc(null,r),r=t.child,o=e.child.memoizedState,o===null?o=$y(n):(a=o.cachePool,a!==null?(c=Ot._currentValue,a=a.parent!==c?{parent:c,pool:c}:a):a=XC(),o={baseLanes:o.baseLanes|n,cachePool:a}),r.memoizedState=o,r.childLanes=Ry(e,l,n),t.memoizedState=Py,Mc(e.child,r)):(Qa(t),n=e.child,e=n.sibling,n=ba(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function bg(e,t){return t=ph({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ph(e,t){return e=En(22,e,null,t),e.lanes=0,e}function Dy(e,t,n){return As(t,e.child,null,n),e=bg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uS(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),lg(e.return,t,n)}function Ly(e,t,n,r,a,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=a,l.treeForkCount=i)}function FE(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;r=r.children;var l=gt.current,o=(l&2)!==0;if(o?(l=l&1|2,t.flags|=128):l&=1,Ve(gt,l),Ht(e,t,r,n),r=Ce?ou:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uS(e,n,t);else if(e.tag===19)uS(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&uh(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Ly(t,!1,a,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&uh(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Ly(t,!0,n,null,i,r);break;case"together":Ly(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Ea(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ei|=t.lanes,!(n&t.childLanes))if(e!==null){if(Io(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,n=ba(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ba(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xb(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&lh(e)))}function vR(e,t,n){switch(t.tag){case 3:eh(t,t.stateNode.containerInfo),Wa(t,Ot,e.memoizedState.cache),Ns();break;case 27:case 5:Yv(t);break;case 4:eh(t,t.stateNode.containerInfo);break;case 10:Wa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,hg(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Qa(t),t.flags|=128,null):n&t.child.childLanes?HE(e,t,n):(Qa(t),e=Ea(e,t,n),e!==null?e.sibling:null);Qa(t);break;case 19:var a=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Io(e,t,n,!1),r=(n&t.childLanes)!==0),a){if(r)return FE(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ve(gt,gt.current),r)break;return null;case 22:return t.lanes=0,qE(e,t,n,t.pendingProps);case 24:Wa(t,Ot,e.memoizedState.cache)}return Ea(e,t,n)}function GE(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!xb(e,n)&&!(t.flags&128))return At=!1,vR(e,t,n);At=!!(e.flags&131072)}else At=!1,Ce&&t.flags&1048576&&YC(t,ou,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Qi(t.elementType),t.type=e,typeof e=="function")X0(e)?(r=Es(e,r),t.tag=1,t=oS(null,t,e,r,n)):(t.tag=0,t=xg(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===L0){t.tag=11,t=rS(null,t,e,r,n);break e}else if(a===z0){t.tag=14,t=aS(null,t,e,r,n);break e}}throw t=Kv(e)||e,Error(F(306,t,""))}}return t;case 0:return xg(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Es(r,t.pendingProps),oS(e,t,r,a,n);case 3:e:{if(eh(t,t.stateNode.containerInfo),e===null)throw Error(F(387));r=t.pendingProps;var i=t.memoizedState;a=i.element,ug(e,t),qc(t,r,null,n);var l=t.memoizedState;if(r=l.cache,Wa(t,Ot,r),r!==i.cache&&og(t,[Ot],n,!0),Uc(),r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cS(e,t,r,n);break e}else if(r!==a){a=Zn(Error(F(424)),t),cu(a),t=cS(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Je=ar(e.firstChild),Gt=t,Ce=!0,mi=null,Jn=!0,n=eE(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ns(),r===a){t=Ea(e,t,n);break e}Ht(e,t,r,n)}t=t.child}return t;case 26:return Id(e,t),e===null?(n=TS(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,r=Sh(pi.current).createElement(n),r[Ft]=t,r[xn]=e,Yt(r,n,e),Lt(r),t.stateNode=r):t.memoizedState=TS(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Yv(t),e===null&&Ce&&(r=t.stateNode=R_(t.type,t.pendingProps,pi.current),Gt=t,Jn=!0,a=Je,$i(t.type)?($g=a,Je=ar(r.firstChild)):Je=a),Ht(e,t,t.pendingProps.children,n),Id(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((a=r=Je)&&(r=VR(r,t.type,t.pendingProps,Jn),r!==null?(t.stateNode=r,Gt=t,Je=ar(r.firstChild),Jn=!1,a=!0):a=!1),a||Ai(t)),Yv(t),a=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,r=i.children,Tg(a,i)?r=null:l!==null&&Tg(a,l)&&(t.flags|=32),t.memoizedState!==null&&(a=sb(e,t,oR,null,null,n),mu._currentValue=a),Id(e,t),Ht(e,t,r,n),t.child;case 6:return e===null&&Ce&&((e=n=Je)&&(n=YR(n,t.pendingProps,Jn),n!==null?(t.stateNode=n,Gt=t,Je=null,e=!0):e=!1),e||Ai(t)),null;case 13:return HE(e,t,n);case 4:return eh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=As(t,null,r,n):Ht(e,t,r,n),t.child;case 11:return rS(e,t,t.type,t.pendingProps,n);case 7:return Ht(e,t,t.pendingProps,n),t.child;case 8:return Ht(e,t,t.pendingProps.children,n),t.child;case 12:return Ht(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Wa(t,t.type,r.value),Ht(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Os(t),a=Vt(a),r=r(a),t.flags|=1,Ht(e,t,r,n),t.child;case 14:return aS(e,t,t.type,t.pendingProps,n);case 15:return UE(e,t,t.type,t.pendingProps,n);case 19:return FE(e,t,n);case 31:return yR(e,t,n);case 22:return qE(e,t,n,t.pendingProps);case 24:return Os(t),r=Vt(Ot),e===null?(a=tb(),a===null&&(a=He,i=eb(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:r,cache:a},rb(t),Wa(t,Ot,a)):(e.lanes&n&&(ug(e,t),qc(t,null,null,n),Uc()),a=e.memoizedState,i=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Wa(t,Ot,r)):(r=i.cache,Wa(t,Ot,r),r!==a.cache&&og(t,[Ot],n,!0))),Ht(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(F(156,t.tag))}function ra(e){e.flags|=4}function zy(e,t,n,r,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(m_())e.flags|=8192;else throw vs=oh,nb}else e.flags&=-16777217}function fS(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!z_(t))if(m_())e.flags|=8192;else throw vs=oh,nb}function Zf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yC():536870912,e.lanes|=t,Xl|=t)}function pc(e,t){if(!Ce)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&65011712,r|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gR(e,t,n){var r=t.pendingProps;switch(J0(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(t),null;case 1:return Qe(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ja(Ot),Gl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ws(t)?ra(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_y())),Qe(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(ra(t),i!==null?(Qe(t),fS(t,i)):(Qe(t),zy(t,a,null,r,n))):i?i!==e.memoizedState?(ra(t),Qe(t),fS(t,i)):(Qe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&ra(t),Qe(t),zy(t,a,e,r,n)),null;case 27:if(th(t),n=pi.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ra(t);else{if(!r){if(t.stateNode===null)throw Error(F(166));return Qe(t),null}e=Gr.current,Ws(t)?Bj(t):(e=R_(a,r,n),t.stateNode=e,ra(t))}return Qe(t),null;case 5:if(th(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ra(t);else{if(!r){if(t.stateNode===null)throw Error(F(166));return Qe(t),null}if(i=Gr.current,Ws(t))Bj(t);else{var l=Sh(pi.current);switch(i){case 1:i=l.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=l.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=l.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?l.createElement(a,{is:r.is}):l.createElement(a)}}i[Ft]=t,i[xn]=r;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=i;e:switch(Yt(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ra(t)}}return Qe(t),zy(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ra(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(F(166));if(e=pi.current,Ws(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Gt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ft]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||k_(e.nodeValue,n)),e||Ai(t,!0)}else e=Sh(e).createTextNode(r),e[Ft]=t,t.stateNode=e}return Qe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ws(t),n!==null){if(e===null){if(!r)throw Error(F(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(557));e[Ft]=t}else Ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qe(t),e=!1}else n=_y(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Cn(t),t):(Cn(t),null);if(t.flags&128)throw Error(F(558))}return Qe(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ws(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(F(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(F(317));a[Ft]=t}else Ns(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Qe(t),a=!1}else a=_y(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Cn(t),t):(Cn(t),null)}return Cn(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Zf(t,t.updateQueue),Qe(t),null);case 4:return Gl(),e===null&&Ab(t.stateNode.containerInfo),Qe(t),null;case 10:return ja(t.type),Qe(t),null;case 19:if(It(gt),r=t.memoizedState,r===null)return Qe(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)pc(r,!1);else{if(yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=uh(e),i!==null){for(t.flags|=128,pc(r,!1),e=i.updateQueue,t.updateQueue=e,Zf(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)KC(n,e),n=n.sibling;return Ve(gt,gt.current&1|2),Ce&&ua(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&kn()>yh&&(t.flags|=128,a=!0,pc(r,!1),t.lanes=4194304)}else{if(!a)if(e=uh(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Zf(t,e),pc(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ce)return Qe(t),null}else 2*kn()-r.renderingStartTime>yh&&n!==536870912&&(t.flags|=128,a=!0,pc(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=kn(),e.sibling=null,n=gt.current,Ve(gt,a?n&1|2:n&1),Ce&&ua(t,r.treeForkCount),e):(Qe(t),null);case 22:case 23:return Cn(t),ab(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Qe(t),t.subtreeFlags&6&&(t.flags|=8192)):Qe(t),n=t.updateQueue,n!==null&&Zf(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&It(ys),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ja(Ot),Qe(t),null;case 25:return null;case 30:return null}throw Error(F(156,t.tag))}function xR(e,t){switch(J0(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ja(Ot),Gl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return th(t),null;case 31:if(t.memoizedState!==null){if(Cn(t),t.alternate===null)throw Error(F(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Cn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));Ns()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return It(gt),null;case 4:return Gl(),null;case 10:return ja(t.type),null;case 22:case 23:return Cn(t),ab(),e!==null&&It(ys),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ja(Ot),null;case 25:return null;default:return null}}function KE(e,t){switch(J0(t),t.tag){case 3:ja(Ot),Gl();break;case 26:case 27:case 5:th(t);break;case 4:Gl();break;case 31:t.memoizedState!==null&&Cn(t);break;case 13:Cn(t);break;case 19:It(gt);break;case 10:ja(t.type);break;case 22:case 23:Cn(t),ab(),e!==null&&It(ys);break;case 24:ja(Ot)}}function mf(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,l=n.inst;r=i(),l.destroy=r}n=n.next}while(n!==a)}}catch(o){Le(t,t.return,o)}}function Ci(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var l=r.inst,o=l.destroy;if(o!==void 0){l.destroy=void 0,a=t;var c=n,u=o;try{u()}catch(f){Le(a,c,f)}}}r=r.next}while(r!==i)}}catch(f){Le(t,t.return,f)}}function VE(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{nE(t,n)}catch(r){Le(e,e.return,r)}}}function YE(e,t,n){n.props=Es(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Le(e,t,r)}}function Fc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){Le(e,t,a)}}function qr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){Le(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Le(e,t,a)}else n.current=null}function WE(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Le(e,e.return,a)}}function Iy(e,t,n){try{var r=e.stateNode;UR(r,e.type,n,t),r[xn]=t}catch(a){Le(e,e.return,a)}}function QE(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$i(e.type)||e.tag===4}function By(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||QE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$i(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function jg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ma));else if(r!==4&&(r===27&&$i(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(jg(e,t,n),e=e.sibling;e!==null;)jg(e,t,n),e=e.sibling}function mh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&$i(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(mh(e,t,n),e=e.sibling;e!==null;)mh(e,t,n),e=e.sibling}function XE(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Yt(t,r,n),t[Ft]=e,t[xn]=n}catch(i){Le(e,e.return,i)}}var ha=!1,Nt=!1,Uy=!1,dS=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function bR(e,t){if(e=e.containerInfo,Eg=Ah,e=zC(e),Y0(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,o=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var m;d!==n||a!==0&&d.nodeType!==3||(o=l+a),d!==i||r!==0&&d.nodeType!==3||(c=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(m=d.firstChild)!==null;)h=d,d=m;for(;;){if(d===e)break t;if(h===n&&++u===a&&(o=l),h===i&&++f===r&&(c=l),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_g={focusedElem:e,selectionRange:n},Ah=!1,Dt=t;Dt!==null;)if(t=Dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Dt=e;else for(;Dt!==null;){switch(t=Dt,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var j=Es(n.type,a);e=r.getSnapshotBeforeUpdate(j,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){Le(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)kg(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":kg(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(F(163))}if(e=t.sibling,e!==null){e.return=t.return,Dt=e;break}Dt=t.return}}function ZE(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ia(e,n),r&4&&mf(5,n);break;case 1:if(ia(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Le(n,n.return,l)}else{var a=Es(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Le(n,n.return,l)}}r&64&&VE(n),r&512&&Fc(n,n.return);break;case 3:if(ia(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{nE(e,t)}catch(l){Le(n,n.return,l)}}break;case 27:t===null&&r&4&&XE(n);case 26:case 5:ia(e,n),t===null&&r&4&&WE(n),r&512&&Fc(n,n.return);break;case 12:ia(e,n);break;case 31:ia(e,n),r&4&&t_(e,n);break;case 13:ia(e,n),r&4&&n_(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_R.bind(null,n),WR(e,n))));break;case 22:if(r=n.memoizedState!==null||ha,!r){t=t!==null&&t.memoizedState!==null||Nt,a=ha;var i=Nt;ha=r,(Nt=t)&&!i?la(e,n,(n.subtreeFlags&8772)!==0):ia(e,n),ha=a,Nt=i}break;case 30:break;default:ia(e,n)}}function JE(e){var t=e.alternate;t!==null&&(e.alternate=null,JE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&q0(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var rt=null,pn=!1;function aa(e,t,n){for(n=n.child;n!==null;)e_(e,t,n),n=n.sibling}function e_(e,t,n){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(of,n)}catch{}switch(n.tag){case 26:Nt||qr(n,t),aa(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Nt||qr(n,t);var r=rt,a=pn;$i(n.type)&&(rt=n.stateNode,pn=!1),aa(e,t,n),Yc(n.stateNode),rt=r,pn=a;break;case 5:Nt||qr(n,t);case 6:if(r=rt,a=pn,rt=null,aa(e,t,n),rt=r,pn=a,rt!==null)if(pn)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(n.stateNode)}catch(i){Le(n,t,i)}else try{rt.removeChild(n.stateNode)}catch(i){Le(n,t,i)}break;case 18:rt!==null&&(pn?(e=rt,OS(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),to(e)):OS(rt,n.stateNode));break;case 4:r=rt,a=pn,rt=n.stateNode.containerInfo,pn=!0,aa(e,t,n),rt=r,pn=a;break;case 0:case 11:case 14:case 15:Ci(2,n,t),Nt||Ci(4,n,t),aa(e,t,n);break;case 1:Nt||(qr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&YE(n,t,r)),aa(e,t,n);break;case 21:aa(e,t,n);break;case 22:Nt=(r=Nt)||n.memoizedState!==null,aa(e,t,n),Nt=r;break;default:aa(e,t,n)}}function t_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{to(e)}catch(n){Le(t,t.return,n)}}}function n_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{to(e)}catch(n){Le(t,t.return,n)}}function jR(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new dS),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new dS),t;default:throw Error(F(435,e.tag))}}function Jf(e,t){var n=jR(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var a=TR.bind(null,e,r);r.then(a,a)}})}function fn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 27:if($i(o.type)){rt=o.stateNode,pn=!1;break e}break;case 5:rt=o.stateNode,pn=!1;break e;case 3:case 4:rt=o.stateNode.containerInfo,pn=!0;break e}o=o.return}if(rt===null)throw Error(F(160));e_(i,l,a),rt=null,pn=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)r_(t,e),t=t.sibling}var gr=null;function r_(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fn(t,e),dn(e),r&4&&(Ci(3,e,e.return),mf(3,e),Ci(5,e,e.return));break;case 1:fn(t,e),dn(e),r&512&&(Nt||n===null||qr(n,n.return)),r&64&&ha&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=gr;if(fn(t,e),dn(e),r&512&&(Nt||n===null||qr(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ff]||i[Ft]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(r),a.head.insertBefore(i,a.querySelector("head > title"))),Yt(i,r,n),i[Ft]=e,Lt(i),r=i;break e;case"link":var l=MS("link","href",a).get(r+(n.href||""));if(l){for(var o=0;o<l.length;o++)if(i=l[o],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(o,1);break t}}i=a.createElement(r),Yt(i,r,n),a.head.appendChild(i);break;case"meta":if(l=MS("meta","content",a).get(r+(n.content||""))){for(o=0;o<l.length;o++)if(i=l[o],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(o,1);break t}}i=a.createElement(r),Yt(i,r,n),a.head.appendChild(i);break;default:throw Error(F(468,r))}i[Ft]=e,Lt(i),r=i}e.stateNode=r}else PS(a,e.type,e.stateNode);else e.stateNode=kS(a,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?PS(a,e.type,e.stateNode):kS(a,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Iy(e,e.memoizedProps,n.memoizedProps)}break;case 27:fn(t,e),dn(e),r&512&&(Nt||n===null||qr(n,n.return)),n!==null&&r&4&&Iy(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fn(t,e),dn(e),r&512&&(Nt||n===null||qr(n,n.return)),e.flags&32){a=e.stateNode;try{Vl(a,"")}catch(j){Le(e,e.return,j)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Iy(e,a,n!==null?n.memoizedProps:a)),r&1024&&(Uy=!0);break;case 6:if(fn(t,e),dn(e),r&4){if(e.stateNode===null)throw Error(F(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(j){Le(e,e.return,j)}}break;case 3:if(qd=null,a=gr,gr=wh(t.containerInfo),fn(t,e),gr=a,dn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{to(t.containerInfo)}catch(j){Le(e,e.return,j)}Uy&&(Uy=!1,a_(e));break;case 4:r=gr,gr=wh(e.stateNode.containerInfo),fn(t,e),dn(e),gr=r;break;case 12:fn(t,e),dn(e);break;case 31:fn(t,e),dn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Jf(e,r)));break;case 13:fn(t,e),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Jp=kn()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Jf(e,r)));break;case 22:a=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=ha,f=Nt;if(ha=u||a,Nt=f||c,fn(t,e),Nt=f,ha=u,dn(e),r&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||c||ha||Nt||Xi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(i=c.stateNode,a)l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{o=c.stateNode;var d=c.memoizedProps.style,h=d!=null&&d.hasOwnProperty("display")?d.display:null;o.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(j){Le(c,c.return,j)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(j){Le(c,c.return,j)}}}else if(t.tag===18){if(n===null){c=t;try{var m=c.stateNode;a?AS(m,!0):AS(c.stateNode,!1)}catch(j){Le(c,c.return,j)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Jf(e,n))));break;case 19:fn(t,e),dn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Jf(e,r)));break;case 30:break;case 21:break;default:fn(t,e),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(QE(r)){n=r;break}r=r.return}if(n==null)throw Error(F(160));switch(n.tag){case 27:var a=n.stateNode,i=By(e);mh(e,i,a);break;case 5:var l=n.stateNode;n.flags&32&&(Vl(l,""),n.flags&=-33);var o=By(e);mh(e,o,l);break;case 3:case 4:var c=n.stateNode.containerInfo,u=By(e);jg(e,u,c);break;default:throw Error(F(161))}}catch(f){Le(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function a_(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;a_(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ZE(e,t.alternate,t),t=t.sibling}function Xi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ci(4,t,t.return),Xi(t);break;case 1:qr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&YE(t,t.return,n),Xi(t);break;case 27:Yc(t.stateNode);case 26:case 5:qr(t,t.return),Xi(t);break;case 22:t.memoizedState===null&&Xi(t);break;case 30:Xi(t);break;default:Xi(t)}e=e.sibling}}function la(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,a=e,i=t,l=i.flags;switch(i.tag){case 0:case 11:case 15:la(a,i,n),mf(4,i);break;case 1:if(la(a,i,n),r=i,a=r.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(u){Le(r,r.return,u)}if(r=i,a=r.updateQueue,a!==null){var o=r.stateNode;try{var c=a.shared.hiddenCallbacks;if(c!==null)for(a.shared.hiddenCallbacks=null,a=0;a<c.length;a++)tE(c[a],o)}catch(u){Le(r,r.return,u)}}n&&l&64&&VE(i),Fc(i,i.return);break;case 27:XE(i);case 26:case 5:la(a,i,n),n&&r===null&&l&4&&WE(i),Fc(i,i.return);break;case 12:la(a,i,n);break;case 31:la(a,i,n),n&&l&4&&t_(a,i);break;case 13:la(a,i,n),n&&l&4&&n_(a,i);break;case 22:i.memoizedState===null&&la(a,i,n),Fc(i,i.return);break;case 30:break;default:la(a,i,n)}t=t.sibling}}function bb(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&hf(n))}function jb(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hf(e))}function pr(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)i_(e,t,n,r),t=t.sibling}function i_(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:pr(e,t,n,r),a&2048&&mf(9,t);break;case 1:pr(e,t,n,r);break;case 3:pr(e,t,n,r),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hf(e)));break;case 12:if(a&2048){pr(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,l=i.id,o=i.onPostCommit;typeof o=="function"&&o(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){Le(t,t.return,c)}}else pr(e,t,n,r);break;case 31:pr(e,t,n,r);break;case 13:pr(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,l=t.alternate,t.memoizedState!==null?i._visibility&2?pr(e,t,n,r):Gc(e,t):i._visibility&2?pr(e,t,n,r):(i._visibility|=2,al(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),a&2048&&bb(l,t);break;case 24:pr(e,t,n,r),a&2048&&jb(t.alternate,t);break;default:pr(e,t,n,r)}}function al(e,t,n,r,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,l=t,o=n,c=r,u=l.flags;switch(l.tag){case 0:case 11:case 15:al(i,l,o,c,a),mf(8,l);break;case 23:break;case 22:var f=l.stateNode;l.memoizedState!==null?f._visibility&2?al(i,l,o,c,a):Gc(i,l):(f._visibility|=2,al(i,l,o,c,a)),a&&u&2048&&bb(l.alternate,l);break;case 24:al(i,l,o,c,a),a&&u&2048&&jb(l.alternate,l);break;default:al(i,l,o,c,a)}t=t.sibling}}function Gc(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:Gc(n,r),a&2048&&bb(r.alternate,r);break;case 24:Gc(n,r),a&2048&&jb(r.alternate,r);break;default:Gc(n,r)}t=t.sibling}}var Pc=8192;function Qs(e,t,n){if(e.subtreeFlags&Pc)for(e=e.child;e!==null;)s_(e,t,n),e=e.sibling}function s_(e,t,n){switch(e.tag){case 26:Qs(e,t,n),e.flags&Pc&&e.memoizedState!==null&&lD(n,gr,e.memoizedState,e.memoizedProps);break;case 5:Qs(e,t,n);break;case 3:case 4:var r=gr;gr=wh(e.stateNode.containerInfo),Qs(e,t,n),gr=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Pc,Pc=16777216,Qs(e,t,n),Pc=r):Qs(e,t,n));break;default:Qs(e,t,n)}}function l_(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function mc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Dt=r,c_(r,e)}l_(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)o_(e),e=e.sibling}function o_(e){switch(e.tag){case 0:case 11:case 15:mc(e),e.flags&2048&&Ci(9,e,e.return);break;case 3:mc(e);break;case 12:mc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bd(e)):mc(e);break;default:mc(e)}}function Bd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Dt=r,c_(r,e)}l_(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ci(8,t,t.return),Bd(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bd(t));break;default:Bd(t)}e=e.sibling}}function c_(e,t){for(;Dt!==null;){var n=Dt;switch(n.tag){case 0:case 11:case 15:Ci(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:hf(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Dt=r;else e:for(n=e;Dt!==null;){r=Dt;var a=r.sibling,i=r.return;if(JE(r),r===n){Dt=null;break e}if(a!==null){a.return=i,Dt=a;break e}Dt=i}}}var SR={getCacheForType:function(e){var t=Vt(Ot),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Vt(Ot).controller.signal}},wR=typeof WeakMap=="function"?WeakMap:Map,ke=0,He=null,we=null,Ae=0,De=0,Nn=null,oi=!1,Uo=!1,Sb=!1,_a=0,yt=0,Ei=0,gs=0,wb=0,Tn=0,Xl=0,Kc=null,mn=null,Sg=!1,Jp=0,u_=0,yh=1/0,vh=null,gi=null,Tt=0,xi=null,Zl=null,Sa=0,wg=0,Ng=null,f_=null,Vc=0,Og=null;function $n(){return ke&2&&Ae!==0?Ae&-Ae:de.T!==null?Ob():bC()}function d_(){if(Tn===0)if(!(Ae&536870912)||Ce){var e=Gf;Gf<<=1,!(Gf&3932160)&&(Gf=262144),Tn=e}else Tn=536870912;return e=Ln.current,e!==null&&(e.flags|=32),Tn}function vn(e,t,n){(e===He&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(Jl(e,0),ci(e,Ae,Tn,!1)),uf(e,n),(!(ke&2)||e!==He)&&(e===He&&(!(ke&2)&&(gs|=n),yt===4&&ci(e,Ae,Tn,!1)),Xr(e))}function h_(e,t,n){if(ke&6)throw Error(F(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||cf(e,t),a=r?AR(e,t):qy(e,t,!0),i=r;do{if(a===0){Uo&&!r&&ci(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!NR(n)){a=qy(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var o=e;a=Kc;var c=o.current.memoizedState.isDehydrated;if(c&&(Jl(o,l).flags|=256),l=qy(o,l,!1),l!==2){if(Sb&&!c){o.errorRecoveryDisabledLanes|=i,gs|=i,a=4;break e}i=mn,mn=a,i!==null&&(mn===null?mn=i:mn.push.apply(mn,i))}a=l}if(i=!1,a!==2)continue}}if(a===1){Jl(e,0),ci(e,t,0,!0);break}e:{switch(r=e,i=a,i){case 0:case 1:throw Error(F(345));case 4:if((t&4194048)!==t)break;case 6:ci(r,t,Tn,!oi);break e;case 2:mn=null;break;case 3:case 5:break;default:throw Error(F(329))}if((t&62914560)===t&&(a=Jp+300-kn(),10<a)){if(ci(r,t,Tn,!oi),qp(r,0,!0)!==0)break e;Sa=t,r.timeoutHandle=P_(hS.bind(null,r,n,mn,vh,Sg,t,Tn,gs,Xl,oi,i,"Throttled",-0,0),a);break e}hS(r,n,mn,vh,Sg,t,Tn,gs,Xl,oi,i,null,-0,0)}}break}while(!0);Xr(e)}function hS(e,t,n,r,a,i,l,o,c,u,f,d,h,m){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ma},s_(t,i,d);var j=(i&62914560)===i?Jp-kn():(i&4194048)===i?u_-kn():0;if(j=oD(d,j),j!==null){Sa=i,e.cancelPendingCommit=j(mS.bind(null,e,t,i,n,r,a,l,o,c,f,d,null,h,m)),ci(e,i,l,!u);return}}mS(e,t,i,n,r,a,l,o,c)}function NR(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!Dn(i(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ci(e,t,n,r){t&=~wb,t&=~gs,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var i=31-Pn(a),l=1<<i;r[i]=-1,a&=~l}n!==0&&vC(e,n,t)}function em(){return ke&6?!0:(yf(0),!1)}function Nb(){if(we!==null){if(De===0)var e=we.return;else e=we,ya=Us=null,cb(e),_l=null,uu=0,e=we;for(;e!==null;)KE(e.alternate,e),e=e.return;we=null}}function Jl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,FR(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sa=0,Nb(),He=e,we=n=ba(e.current,null),Ae=t,De=0,Nn=null,oi=!1,Uo=cf(e,t),Sb=!1,Xl=Tn=wb=gs=Ei=yt=0,mn=Kc=null,Sg=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var a=31-Pn(r),i=1<<a;t|=e[a],r&=~i}return _a=t,Kp(),n}function p_(e,t){ve=null,de.H=du,t===Bo||t===Yp?(t=Gj(),De=3):t===nb?(t=Gj(),De=4):De=t===gb?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nn=t,we===null&&(yt=1,hh(e,Zn(t,e.current)))}function m_(){var e=Ln.current;return e===null?!0:(Ae&4194048)===Ae?rr===null:(Ae&62914560)===Ae||Ae&536870912?e===rr:!1}function y_(){var e=de.H;return de.H=du,e===null?du:e}function v_(){var e=de.A;return de.A=SR,e}function gh(){yt=4,oi||(Ae&4194048)!==Ae&&Ln.current!==null||(Uo=!0),!(Ei&134217727)&&!(gs&134217727)||He===null||ci(He,Ae,Tn,!1)}function qy(e,t,n){var r=ke;ke|=2;var a=y_(),i=v_();(He!==e||Ae!==t)&&(vh=null,Jl(e,t)),t=!1;var l=yt;e:do try{if(De!==0&&we!==null){var o=we,c=Nn;switch(De){case 8:Nb(),l=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(t=!0);var u=De;if(De=0,Nn=null,vl(e,o,c,u),n&&Uo){l=0;break e}break;default:u=De,De=0,Nn=null,vl(e,o,c,u)}}OR(),l=yt;break}catch(f){p_(e,f)}while(!0);return t&&e.shellSuspendCounter++,ya=Us=null,ke=r,de.H=a,de.A=i,we===null&&(He=null,Ae=0,Kp()),l}function OR(){for(;we!==null;)g_(we)}function AR(e,t){var n=ke;ke|=2;var r=y_(),a=v_();He!==e||Ae!==t?(vh=null,yh=kn()+500,Jl(e,t)):Uo=cf(e,t);e:do try{if(De!==0&&we!==null){t=we;var i=Nn;t:switch(De){case 1:De=0,Nn=null,vl(e,t,i,1);break;case 2:case 9:if(Fj(i)){De=0,Nn=null,pS(t);break}t=function(){De!==2&&De!==9||He!==e||(De=7),Xr(e)},i.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:Fj(i)?(De=0,Nn=null,pS(t)):(De=0,Nn=null,vl(e,t,i,7));break;case 5:var l=null;switch(we.tag){case 26:l=we.memoizedState;case 5:case 27:var o=we;if(l?z_(l):o.stateNode.complete){De=0,Nn=null;var c=o.sibling;if(c!==null)we=c;else{var u=o.return;u!==null?(we=u,tm(u)):we=null}break t}}De=0,Nn=null,vl(e,t,i,5);break;case 6:De=0,Nn=null,vl(e,t,i,6);break;case 8:Nb(),yt=6;break e;default:throw Error(F(462))}}CR();break}catch(f){p_(e,f)}while(!0);return ya=Us=null,de.H=r,de.A=a,ke=n,we!==null?0:(He=null,Ae=0,Kp(),yt)}function CR(){for(;we!==null&&!Q$();)g_(we)}function g_(e){var t=GE(e.alternate,e,_a);e.memoizedProps=e.pendingProps,t===null?tm(e):we=t}function pS(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=lS(n,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=lS(n,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:cb(t);default:KE(n,t),t=we=KC(t,_a),t=GE(n,t,_a)}e.memoizedProps=e.pendingProps,t===null?tm(e):we=t}function vl(e,t,n,r){ya=Us=null,cb(t),_l=null,uu=0;var a=t.return;try{if(mR(e,a,t,n,Ae)){yt=1,hh(e,Zn(n,e.current)),we=null;return}}catch(i){if(a!==null)throw we=a,i;yt=1,hh(e,Zn(n,e.current)),we=null;return}t.flags&32768?(Ce||r===1?e=!0:Uo||Ae&536870912?e=!1:(oi=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ln.current,r!==null&&r.tag===13&&(r.flags|=16384))),x_(t,e)):tm(t)}function tm(e){var t=e;do{if(t.flags&32768){x_(t,oi);return}e=t.return;var n=gR(t.alternate,t,_a);if(n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);yt===0&&(yt=5)}function x_(e,t){do{var n=xR(e.alternate,e);if(n!==null){n.flags&=32767,we=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=n}while(e!==null);yt=6,we=null}function mS(e,t,n,r,a,i,l,o,c){e.cancelPendingCommit=null;do nm();while(Tt!==0);if(ke&6)throw Error(F(327));if(t!==null){if(t===e.current)throw Error(F(177));if(i=t.lanes|t.childLanes,i|=W0,s4(e,n,i,l,o,c),e===He&&(we=He=null,Ae=0),Zl=t,xi=e,Sa=n,wg=i,Ng=a,f_=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,kR(nh,function(){return N_(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=de.T,de.T=null,a=Me.p,Me.p=2,l=ke,ke|=4;try{bR(e,t,n)}finally{ke=l,Me.p=a,de.T=r}}Tt=1,b_(),j_(),S_()}}function b_(){if(Tt===1){Tt=0;var e=xi,t=Zl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=de.T,de.T=null;var r=Me.p;Me.p=2;var a=ke;ke|=4;try{r_(t,e);var i=_g,l=zC(e.containerInfo),o=i.focusedElem,c=i.selectionRange;if(l!==o&&o&&o.ownerDocument&&LC(o.ownerDocument.documentElement,o)){if(c!==null&&Y0(o)){var u=c.start,f=c.end;if(f===void 0&&(f=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(f,o.value.length);else{var d=o.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var m=h.getSelection(),j=o.textContent.length,v=Math.min(c.start,j),p=c.end===void 0?v:Math.min(c.end,j);!m.extend&&v>p&&(l=p,p=v,v=l);var y=Lj(o,v),g=Lj(o,p);if(y&&g&&(m.rangeCount!==1||m.anchorNode!==y.node||m.anchorOffset!==y.offset||m.focusNode!==g.node||m.focusOffset!==g.offset)){var b=d.createRange();b.setStart(y.node,y.offset),m.removeAllRanges(),v>p?(m.addRange(b),m.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),m.addRange(b))}}}}for(d=[],m=o;m=m.parentNode;)m.nodeType===1&&d.push({element:m,left:m.scrollLeft,top:m.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<d.length;o++){var x=d[o];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}Ah=!!Eg,_g=Eg=null}finally{ke=a,Me.p=r,de.T=n}}e.current=t,Tt=2}}function j_(){if(Tt===2){Tt=0;var e=xi,t=Zl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=de.T,de.T=null;var r=Me.p;Me.p=2;var a=ke;ke|=4;try{ZE(e,t.alternate,t)}finally{ke=a,Me.p=r,de.T=n}}Tt=3}}function S_(){if(Tt===4||Tt===3){Tt=0,X$();var e=xi,t=Zl,n=Sa,r=f_;t.subtreeFlags&10256||t.flags&10256?Tt=5:(Tt=0,Zl=xi=null,w_(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(gi=null),U0(n),t=t.stateNode,Mn&&typeof Mn.onCommitFiberRoot=="function")try{Mn.onCommitFiberRoot(of,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=de.T,a=Me.p,Me.p=2,de.T=null;try{for(var i=e.onRecoverableError,l=0;l<r.length;l++){var o=r[l];i(o.value,{componentStack:o.stack})}}finally{de.T=t,Me.p=a}}Sa&3&&nm(),Xr(e),a=e.pendingLanes,n&261930&&a&42?e===Og?Vc++:(Vc=0,Og=e):Vc=0,yf(0)}}function w_(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hf(t)))}function nm(){return b_(),j_(),S_(),N_()}function N_(){if(Tt!==5)return!1;var e=xi,t=wg;wg=0;var n=U0(Sa),r=de.T,a=Me.p;try{Me.p=32>n?32:n,de.T=null,n=Ng,Ng=null;var i=xi,l=Sa;if(Tt=0,Zl=xi=null,Sa=0,ke&6)throw Error(F(331));var o=ke;if(ke|=4,o_(i.current),i_(i,i.current,l,n),ke=o,yf(0,!1),Mn&&typeof Mn.onPostCommitFiberRoot=="function")try{Mn.onPostCommitFiberRoot(of,i)}catch{}return!0}finally{Me.p=a,de.T=r,w_(e,t)}}function yS(e,t,n){t=Zn(n,t),t=gg(e.stateNode,t,2),e=vi(e,t,2),e!==null&&(uf(e,2),Xr(e))}function Le(e,t,n){if(e.tag===3)yS(e,e,n);else for(;t!==null;){if(t.tag===3){yS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(gi===null||!gi.has(r))){e=Zn(n,e),n=IE(2),r=vi(t,n,2),r!==null&&(BE(n,r,t,e),uf(r,2),Xr(r));break}}t=t.return}}function Hy(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wR;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(Sb=!0,a.add(n),e=ER.bind(null,e,t,n),t.then(e,e))}function ER(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,He===e&&(Ae&n)===n&&(yt===4||yt===3&&(Ae&62914560)===Ae&&300>kn()-Jp?!(ke&2)&&Jl(e,0):wb|=n,Xl===Ae&&(Xl=0)),Xr(e)}function O_(e,t){t===0&&(t=yC()),e=Bs(e,t),e!==null&&(uf(e,t),Xr(e))}function _R(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),O_(e,n)}function TR(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(F(314))}r!==null&&r.delete(t),O_(e,n)}function kR(e,t){return I0(e,t)}var xh=null,il=null,Ag=!1,bh=!1,Fy=!1,ui=0;function Xr(e){e!==il&&e.next===null&&(il===null?xh=il=e:il=il.next=e),bh=!0,Ag||(Ag=!0,PR())}function yf(e,t){if(!Fy&&bh){Fy=!0;do for(var n=!1,r=xh;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var l=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-Pn(42|e)+1)-1,i&=a&~(l&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,vS(r,i))}else i=Ae,i=qp(r,r===He?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||cf(r,i)||(n=!0,vS(r,i));r=r.next}while(n);Fy=!1}}function MR(){A_()}function A_(){bh=Ag=!1;var e=0;ui!==0&&HR()&&(e=ui);for(var t=kn(),n=null,r=xh;r!==null;){var a=r.next,i=C_(r,t);i===0?(r.next=null,n===null?xh=a:n.next=a,a===null&&(il=n)):(n=r,(e!==0||i&3)&&(bh=!0)),r=a}Tt!==0&&Tt!==5||yf(e),ui!==0&&(ui=0)}function C_(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var l=31-Pn(i),o=1<<l,c=a[l];c===-1?(!(o&n)||o&r)&&(a[l]=i4(o,t)):c<=t&&(e.expiredLanes|=o),i&=~o}if(t=He,n=Ae,n=qp(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&gy(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||cf(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&gy(r),U0(n)){case 2:case 8:n=pC;break;case 32:n=nh;break;case 268435456:n=mC;break;default:n=nh}return r=E_.bind(null,e),n=I0(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&gy(r),e.callbackPriority=2,e.callbackNode=null,2}function E_(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(nm()&&e.callbackNode!==n)return null;var r=Ae;return r=qp(e,e===He?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(h_(e,r,t),C_(e,kn()),e.callbackNode!=null&&e.callbackNode===n?E_.bind(null,e):null)}function vS(e,t){if(nm())return null;h_(e,t,!0)}function PR(){GR(function(){ke&6?I0(hC,MR):A_()})}function Ob(){if(ui===0){var e=Yl;e===0&&(e=Ff,Ff<<=1,!(Ff&261888)&&(Ff=256)),ui=e}return ui}function gS(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:kd(""+e)}function xS(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function $R(e,t,n,r,a){if(t==="submit"&&n&&n.stateNode===a){var i=gS((a[xn]||null).action),l=r.submitter;l&&(t=(t=l[xn]||null)?gS(t.formAction):l.getAttribute("formAction"),t!==null&&(i=t,l=null));var o=new Hp("action","action",null,r,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ui!==0){var c=l?xS(a,l):new FormData(a);yg(n,{pending:!0,data:c,method:a.method,action:i},null,c)}}else typeof i=="function"&&(o.preventDefault(),c=l?xS(a,l):new FormData(a),yg(n,{pending:!0,data:c,method:a.method,action:i},i,c))},currentTarget:a}]})}}for(var Gy=0;Gy<ag.length;Gy++){var Ky=ag[Gy],RR=Ky.toLowerCase(),DR=Ky[0].toUpperCase()+Ky.slice(1);_r(RR,"on"+DR)}_r(BC,"onAnimationEnd");_r(UC,"onAnimationIteration");_r(qC,"onAnimationStart");_r("dblclick","onDoubleClick");_r("focusin","onFocus");_r("focusout","onBlur");_r(Z4,"onTransitionRun");_r(J4,"onTransitionStart");_r(eR,"onTransitionCancel");_r(HC,"onTransitionEnd");Kl("onMouseEnter",["mouseout","mouseover"]);Kl("onMouseLeave",["mouseout","mouseover"]);Kl("onPointerEnter",["pointerout","pointerover"]);Kl("onPointerLeave",["pointerout","pointerover"]);Ls("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ls("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ls("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ls("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ls("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ls("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hu="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(" "),LR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hu));function __(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=u;try{i(a)}catch(f){ah(f)}a.currentTarget=null,i=c}else for(l=0;l<r.length;l++){if(o=r[l],c=o.instance,u=o.currentTarget,o=o.listener,c!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=u;try{i(a)}catch(f){ah(f)}a.currentTarget=null,i=c}}}}function Se(e,t){var n=t[Qv];n===void 0&&(n=t[Qv]=new Set);var r=e+"__bubble";n.has(r)||(T_(t,e,2,!1),n.add(r))}function Vy(e,t,n){var r=0;t&&(r|=4),T_(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function Ab(e){if(!e[ed]){e[ed]=!0,jC.forEach(function(n){n!=="selectionchange"&&(LR.has(n)||Vy(n,!1,e),Vy(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ed]||(t[ed]=!0,Vy("selectionchange",!1,t))}}function T_(e,t,n,r){switch(H_(t)){case 2:var a=fD;break;case 8:a=dD;break;default:a=Tb}n=a.bind(null,t,n,e),a=void 0,!tg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Yy(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===a)break;if(l===4)for(l=r.return;l!==null;){var c=l.tag;if((c===3||c===4)&&l.stateNode.containerInfo===a)return;l=l.return}for(;o!==null;){if(l=ol(o),l===null)return;if(c=l.tag,c===5||c===6||c===26||c===27){r=i=l;continue e}o=o.parentNode}}r=r.return}_C(function(){var u=i,f=F0(n),d=[];e:{var h=FC.get(e);if(h!==void 0){var m=Hp,j=e;switch(e){case"keypress":if(Pd(n)===0)break e;case"keydown":case"keyup":m=T4;break;case"focusin":j="focus",m=wy;break;case"focusout":j="blur",m=wy;break;case"beforeblur":case"afterblur":m=wy;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=Cj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=g4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=P4;break;case BC:case UC:case qC:m=j4;break;case HC:m=R4;break;case"scroll":case"scrollend":m=y4;break;case"wheel":m=L4;break;case"copy":case"cut":case"paste":m=w4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=_j;break;case"toggle":case"beforetoggle":m=I4}var v=(t&4)!==0,p=!v&&(e==="scroll"||e==="scrollend"),y=v?h!==null?h+"Capture":null:h;v=[];for(var g=u,b;g!==null;){var x=g;if(b=x.stateNode,x=x.tag,x!==5&&x!==26&&x!==27||b===null||y===null||(x=iu(g,y),x!=null&&v.push(pu(g,x,b))),p)break;g=g.return}0<v.length&&(h=new m(h,j,null,n,f),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==eg&&(j=n.relatedTarget||n.fromElement)&&(ol(j)||j[Lo]))break e;if((m||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,m?(j=n.relatedTarget||n.toElement,m=u,j=j?ol(j):null,j!==null&&(p=lf(j),v=j.tag,j!==p||v!==5&&v!==27&&v!==6)&&(j=null)):(m=null,j=u),m!==j)){if(v=Cj,x="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=_j,x="onPointerLeave",y="onPointerEnter",g="pointer"),p=m==null?h:kc(m),b=j==null?h:kc(j),h=new v(x,g+"leave",m,n,f),h.target=p,h.relatedTarget=b,x=null,ol(f)===u&&(v=new v(y,g+"enter",j,n,f),v.target=b,v.relatedTarget=p,x=v),p=x,m&&j)t:{for(v=zR,y=m,g=j,b=0,x=y;x;x=v(x))b++;x=0;for(var N=g;N;N=v(N))x++;for(;0<b-x;)y=v(y),b--;for(;0<x-b;)g=v(g),x--;for(;b--;){if(y===g||g!==null&&y===g.alternate){v=y;break t}y=v(y),g=v(g)}v=null}else v=null;m!==null&&bS(d,h,m,v,!1),j!==null&&p!==null&&bS(d,p,j,v,!0)}}e:{if(h=u?kc(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var w=Pj;else if(Mj(h))if(RC)w=W4;else{w=V4;var O=K4}else m=h.nodeName,!m||m.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&H0(u.elementType)&&(w=Pj):w=Y4;if(w&&(w=w(e,u))){$C(d,w,n,f);break e}O&&O(e,h,u),e==="focusout"&&u&&h.type==="number"&&u.memoizedProps.value!=null&&Jv(h,"number",h.value)}switch(O=u?kc(u):window,e){case"focusin":(Mj(O)||O.contentEditable==="true")&&(fl=O,ng=u,zc=null);break;case"focusout":zc=ng=fl=null;break;case"mousedown":rg=!0;break;case"contextmenu":case"mouseup":case"dragend":rg=!1,zj(d,n,f);break;case"selectionchange":if(X4)break;case"keydown":case"keyup":zj(d,n,f)}var A;if(V0)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else ul?MC(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(kC&&n.locale!=="ko"&&(ul||E!=="onCompositionStart"?E==="onCompositionEnd"&&ul&&(A=TC()):(li=f,G0="value"in li?li.value:li.textContent,ul=!0)),O=jh(u,E),0<O.length&&(E=new Ej(E,e,null,n,f),d.push({event:E,listeners:O}),A?E.data=A:(A=PC(n),A!==null&&(E.data=A)))),(A=U4?q4(e,n):H4(e,n))&&(E=jh(u,"onBeforeInput"),0<E.length&&(O=new Ej("onBeforeInput","beforeinput",null,n,f),d.push({event:O,listeners:E}),O.data=A)),$R(d,e,u,n,f)}__(d,t)})}function pu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jh(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=iu(e,n),a!=null&&r.unshift(pu(e,a,i)),a=iu(e,t),a!=null&&r.push(pu(e,a,i))),e.tag===3)return r;e=e.return}return[]}function zR(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bS(e,t,n,r,a){for(var i=t._reactName,l=[];n!==null&&n!==r;){var o=n,c=o.alternate,u=o.stateNode;if(o=o.tag,c!==null&&c===r)break;o!==5&&o!==26&&o!==27||u===null||(c=u,a?(u=iu(n,i),u!=null&&l.unshift(pu(n,u,c))):a||(u=iu(n,i),u!=null&&l.push(pu(n,u,c)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var IR=/\r\n?/g,BR=/\u0000|\uFFFD/g;function jS(e){return(typeof e=="string"?e:""+e).replace(IR,`
`).replace(BR,"")}function k_(e,t){return t=jS(t),jS(e)===t}function Ie(e,t,n,r,a,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Vl(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Vl(e,""+r);break;case"className":Vf(e,"class",r);break;case"tabIndex":Vf(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Vf(e,n,r);break;case"style":EC(e,r,i);break;case"data":if(t!=="object"){Vf(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=kd(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"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 i=="function"&&(n==="formAction"?(t!=="input"&&Ie(e,t,"name",a.name,a,null),Ie(e,t,"formEncType",a.formEncType,a,null),Ie(e,t,"formMethod",a.formMethod,a,null),Ie(e,t,"formTarget",a.formTarget,a,null)):(Ie(e,t,"encType",a.encType,a,null),Ie(e,t,"method",a.method,a,null),Ie(e,t,"target",a.target,a,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=kd(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=ma);break;case"onScroll":r!=null&&Se("scroll",e);break;case"onScrollEnd":r!=null&&Se("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(F(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(F(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=kd(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Se("beforetoggle",e),Se("toggle",e),Td(e,"popover",r);break;case"xlinkActuate":na(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":na(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":na(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":na(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":na(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":na(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":na(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":na(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":na(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Td(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=p4.get(n)||n,Td(e,n,r))}}function Cg(e,t,n,r,a,i){switch(n){case"style":EC(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(F(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(F(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Vl(e,r):(typeof r=="number"||typeof r=="bigint")&&Vl(e,""+r);break;case"onScroll":r!=null&&Se("scroll",e);break;case"onScrollEnd":r!=null&&Se("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!SC.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[xn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):Td(e,n,r)}}}function Yt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",e),Se("load",e);var r=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var l=n[i];if(l!=null)switch(i){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(F(137,t));default:Ie(e,t,i,l,n,null)}}a&&Ie(e,t,"srcSet",n.srcSet,n,null),r&&Ie(e,t,"src",n.src,n,null);return;case"input":Se("invalid",e);var o=i=l=a=null,c=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":a=f;break;case"type":l=f;break;case"checked":c=f;break;case"defaultChecked":u=f;break;case"value":i=f;break;case"defaultValue":o=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(F(137,t));break;default:Ie(e,t,r,f,n,null)}}OC(e,i,o,c,u,l,a,!1);return;case"select":Se("invalid",e),r=l=i=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":l=o;break;case"multiple":r=o;default:Ie(e,t,a,o,n,null)}t=i,n=l,e.multiple=!!r,t!=null?Al(e,!!r,t,!1):n!=null&&Al(e,!!r,n,!0);return;case"textarea":Se("invalid",e),i=a=r=null;for(l in n)if(n.hasOwnProperty(l)&&(o=n[l],o!=null))switch(l){case"value":r=o;break;case"defaultValue":a=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(F(91));break;default:Ie(e,t,l,o,n,null)}CC(e,r,a,i);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Ie(e,t,c,r,n,null)}return;case"dialog":Se("beforetoggle",e),Se("toggle",e),Se("cancel",e),Se("close",e);break;case"iframe":case"object":Se("load",e);break;case"video":case"audio":for(r=0;r<hu.length;r++)Se(hu[r],e);break;case"image":Se("error",e),Se("load",e);break;case"details":Se("toggle",e);break;case"embed":case"source":case"link":Se("error",e),Se("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(F(137,t));default:Ie(e,t,u,r,n,null)}return;default:if(H0(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&Cg(e,t,f,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&Ie(e,t,o,r,n,null))}function UR(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,l=null,o=null,c=null,u=null,f=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&d!=null)switch(m){case"checked":break;case"value":break;case"defaultValue":c=d;default:r.hasOwnProperty(m)||Ie(e,t,m,null,r,d)}}for(var h in r){var m=r[h];if(d=n[h],r.hasOwnProperty(h)&&(m!=null||d!=null))switch(h){case"type":i=m;break;case"name":a=m;break;case"checked":u=m;break;case"defaultChecked":f=m;break;case"value":l=m;break;case"defaultValue":o=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(F(137,t));break;default:m!==d&&Ie(e,t,h,m,r,d)}}Zv(e,l,o,c,u,f,i,a);return;case"select":m=l=o=h=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":m=c;default:r.hasOwnProperty(i)||Ie(e,t,i,null,r,c)}for(a in r)if(i=r[a],c=n[a],r.hasOwnProperty(a)&&(i!=null||c!=null))switch(a){case"value":h=i;break;case"defaultValue":o=i;break;case"multiple":l=i;default:i!==c&&Ie(e,t,a,i,r,c)}t=o,n=l,r=m,h!=null?Al(e,!!n,h,!1):!!r!=!!n&&(t!=null?Al(e,!!n,t,!0):Al(e,!!n,n?[]:"",!1));return;case"textarea":m=h=null;for(o in n)if(a=n[o],n.hasOwnProperty(o)&&a!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Ie(e,t,o,null,r,a)}for(l in r)if(a=r[l],i=n[l],r.hasOwnProperty(l)&&(a!=null||i!=null))switch(l){case"value":h=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(F(91));break;default:a!==i&&Ie(e,t,l,a,r,i)}AC(e,h,m);return;case"option":for(var j in n)if(h=n[j],n.hasOwnProperty(j)&&h!=null&&!r.hasOwnProperty(j))switch(j){case"selected":e.selected=!1;break;default:Ie(e,t,j,null,r,h)}for(c in r)if(h=r[c],m=n[c],r.hasOwnProperty(c)&&h!==m&&(h!=null||m!=null))switch(c){case"selected":e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Ie(e,t,c,h,r,m)}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 v in n)h=n[v],n.hasOwnProperty(v)&&h!=null&&!r.hasOwnProperty(v)&&Ie(e,t,v,null,r,h);for(u in r)if(h=r[u],m=n[u],r.hasOwnProperty(u)&&h!==m&&(h!=null||m!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(F(137,t));break;default:Ie(e,t,u,h,r,m)}return;default:if(H0(t)){for(var p in n)h=n[p],n.hasOwnProperty(p)&&h!==void 0&&!r.hasOwnProperty(p)&&Cg(e,t,p,void 0,r,h);for(f in r)h=r[f],m=n[f],!r.hasOwnProperty(f)||h===m||h===void 0&&m===void 0||Cg(e,t,f,h,r,m);return}}for(var y in n)h=n[y],n.hasOwnProperty(y)&&h!=null&&!r.hasOwnProperty(y)&&Ie(e,t,y,null,r,h);for(d in r)h=r[d],m=n[d],!r.hasOwnProperty(d)||h===m||h==null&&m==null||Ie(e,t,d,h,r,m)}function SS(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qR(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],i=a.transferSize,l=a.initiatorType,o=a.duration;if(i&&o&&SS(l)){for(l=0,o=a.responseEnd,r+=1;r<n.length;r++){var c=n[r],u=c.startTime;if(u>o)break;var f=c.transferSize,d=c.initiatorType;f&&SS(d)&&(c=c.responseEnd,l+=f*(c<o?1:(o-u)/(c-u)))}if(--r,t+=8*(i+l)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Eg=null,_g=null;function Sh(e){return e.nodeType===9?e:e.ownerDocument}function wS(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function M_(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Tg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wy=null;function HR(){var e=window.event;return e&&e.type==="popstate"?e===Wy?!1:(Wy=e,!0):(Wy=null,!1)}var P_=typeof setTimeout=="function"?setTimeout:void 0,FR=typeof clearTimeout=="function"?clearTimeout:void 0,NS=typeof Promise=="function"?Promise:void 0,GR=typeof queueMicrotask=="function"?queueMicrotask:typeof NS<"u"?function(e){return NS.resolve(null).then(e).catch(KR)}:P_;function KR(e){setTimeout(function(){throw e})}function $i(e){return e==="head"}function OS(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(a),to(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")Yc(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Yc(n);for(var i=n.firstChild;i;){var l=i.nextSibling,o=i.nodeName;i[ff]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=l}}else n==="body"&&Yc(e.ownerDocument.body);n=a}while(n);to(t)}function AS(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function kg(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":kg(n),q0(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function VR(e,t,n,r){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[ff])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=ar(e.nextSibling),e===null)break}return null}function YR(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ar(e.nextSibling),e===null))return null;return e}function $_(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ar(e.nextSibling),e===null))return null;return e}function Mg(e){return e.data==="$?"||e.data==="$~"}function Pg(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function WR(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function ar(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var $g=null;function CS(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return ar(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function ES(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function R_(e,t,n){switch(t=Sh(n),e){case"html":if(e=t.documentElement,!e)throw Error(F(452));return e;case"head":if(e=t.head,!e)throw Error(F(453));return e;case"body":if(e=t.body,!e)throw Error(F(454));return e;default:throw Error(F(451))}}function Yc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);q0(e)}var ir=new Map,_S=new Set;function wh(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var $a=Me.d;Me.d={f:QR,r:XR,D:ZR,C:JR,L:eD,m:tD,X:rD,S:nD,M:aD};function QR(){var e=$a.f(),t=em();return e||t}function XR(e){var t=zo(e);t!==null&&t.tag===5&&t.type==="form"?EE(t):$a.r(e)}var qo=typeof document>"u"?null:document;function D_(e,t,n){var r=qo;if(r&&typeof t=="string"&&t){var a=Xn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),_S.has(a)||(_S.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),Yt(t,"link",e),Lt(t),r.head.appendChild(t)))}}function ZR(e){$a.D(e),D_("dns-prefetch",e,null)}function JR(e,t){$a.C(e,t),D_("preconnect",e,t)}function eD(e,t,n){$a.L(e,t,n);var r=qo;if(r&&e&&t){var a='link[rel="preload"][as="'+Xn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Xn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Xn(n.imageSizes)+'"]')):a+='[href="'+Xn(e)+'"]';var i=a;switch(t){case"style":i=eo(e);break;case"script":i=Ho(e)}ir.has(i)||(e=nt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ir.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(vf(i))||t==="script"&&r.querySelector(gf(i))||(t=r.createElement("link"),Yt(t,"link",e),Lt(t),r.head.appendChild(t)))}}function tD(e,t){$a.m(e,t);var n=qo;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Xn(r)+'"][href="'+Xn(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ho(e)}if(!ir.has(i)&&(e=nt({rel:"modulepreload",href:e},t),ir.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(gf(i)))return}r=n.createElement("link"),Yt(r,"link",e),Lt(r),n.head.appendChild(r)}}}function nD(e,t,n){$a.S(e,t,n);var r=qo;if(r&&e){var a=Ol(r).hoistableStyles,i=eo(e);t=t||"default";var l=a.get(i);if(!l){var o={loading:0,preload:null};if(l=r.querySelector(vf(i)))o.loading=5;else{e=nt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ir.get(i))&&Cb(e,n);var c=l=r.createElement("link");Lt(c),Yt(c,"link",e),c._p=new Promise(function(u,f){c.onload=u,c.onerror=f}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Ud(l,t,r)}l={type:"stylesheet",instance:l,count:1,state:o},a.set(i,l)}}}function rD(e,t){$a.X(e,t);var n=qo;if(n&&e){var r=Ol(n).hoistableScripts,a=Ho(e),i=r.get(a);i||(i=n.querySelector(gf(a)),i||(e=nt({src:e,async:!0},t),(t=ir.get(a))&&Eb(e,t),i=n.createElement("script"),Lt(i),Yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function aD(e,t){$a.M(e,t);var n=qo;if(n&&e){var r=Ol(n).hoistableScripts,a=Ho(e),i=r.get(a);i||(i=n.querySelector(gf(a)),i||(e=nt({src:e,async:!0,type:"module"},t),(t=ir.get(a))&&Eb(e,t),i=n.createElement("script"),Lt(i),Yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function TS(e,t,n,r){var a=(a=pi.current)?wh(a):null;if(!a)throw Error(F(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=eo(n.href),n=Ol(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=eo(n.href);var i=Ol(a).hoistableStyles,l=i.get(e);if(l||(a=a.ownerDocument||a,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,l),(i=a.querySelector(vf(e)))&&!i._p&&(l.instance=i,l.state.loading=5),ir.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ir.set(e,n),i||iD(a,e,n,l.state))),t&&r===null)throw Error(F(528,""));return l}if(t&&r!==null)throw Error(F(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ho(n),n=Ol(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(F(444,e))}}function eo(e){return'href="'+Xn(e)+'"'}function vf(e){return'link[rel="stylesheet"]['+e+"]"}function L_(e){return nt({},e,{"data-precedence":e.precedence,precedence:null})}function iD(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Yt(t,"link",n),Lt(t),e.head.appendChild(t))}function Ho(e){return'[src="'+Xn(e)+'"]'}function gf(e){return"script[async]"+e}function kS(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Xn(n.href)+'"]');if(r)return t.instance=r,Lt(r),r;var a=nt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Lt(r),Yt(r,"style",a),Ud(r,n.precedence,e),t.instance=r;case"stylesheet":a=eo(n.href);var i=e.querySelector(vf(a));if(i)return t.state.loading|=4,t.instance=i,Lt(i),i;r=L_(n),(a=ir.get(a))&&Cb(r,a),i=(e.ownerDocument||e).createElement("link"),Lt(i);var l=i;return l._p=new Promise(function(o,c){l.onload=o,l.onerror=c}),Yt(i,"link",r),t.state.loading|=4,Ud(i,n.precedence,e),t.instance=i;case"script":return i=Ho(n.src),(a=e.querySelector(gf(i)))?(t.instance=a,Lt(a),a):(r=n,(a=ir.get(i))&&(r=nt({},n),Eb(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),Lt(a),Yt(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(F(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Ud(r,n.precedence,e));return t.instance}function Ud(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,l=0;l<r.length;l++){var o=r[l];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Cb(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Eb(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var qd=null;function MS(e,t,n){if(qd===null){var r=new Map,a=qd=new Map;a.set(n,r)}else a=qd,r=a.get(n),r||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[ff]||i[Ft]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var l=i.getAttribute(t)||"";l=e+l;var o=r.get(l);o?o.push(i):r.set(l,[i])}}return r}function PS(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function sD(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function z_(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function lD(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=eo(r.href),i=t.querySelector(vf(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Lt(i);return}i=t.ownerDocument||t,r=L_(r),(a=ir.get(a))&&Cb(r,a),i=i.createElement("link"),Lt(i);var l=i;l._p=new Promise(function(o,c){l.onload=o,l.onerror=c}),Yt(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Nh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Qy=0;function oD(e,t){return e.stylesheets&&e.count===0&&Hd(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Hd(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Qy===0&&(Qy=62500*qR());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Hd(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Qy?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function Nh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Oh=null;function Hd(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Oh=new Map,t.forEach(cD,e),Oh=null,Nh.call(e))}function cD(e,t){if(!(t.state.loading&4)){var n=Oh.get(e);if(n)var r=n.get(null);else{n=new Map,Oh.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var l=a[i];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),r=l)}r&&n.set(null,r)}a=t.instance,l=a.getAttribute("data-precedence"),i=n.get(l)||r,i===r&&n.set(null,a),n.set(l,a),this.count++,r=Nh.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var mu={$$typeof:pa,Provider:null,Consumer:null,_currentValue:ps,_currentValue2:ps,_threadCount:0};function uD(e,t,n,r,a,i,l,o,c){this.tag=1,this.containerInfo=e,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=xy(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xy(0),this.hiddenUpdates=xy(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function I_(e,t,n,r,a,i,l,o,c,u,f,d){return e=new uD(e,t,n,l,c,u,f,d,o),t=1,i===!0&&(t|=24),i=En(3,null,null,t),e.current=i,i.stateNode=e,t=eb(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},rb(i),e}function B_(e){return e?(e=pl,e):pl}function U_(e,t,n,r,a,i){a=B_(a),r.context===null?r.context=a:r.pendingContext=a,r=yi(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=vi(e,r,t),n!==null&&(vn(n,e,t),Bc(n,e,t))}function $S(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _b(e,t){$S(e,t),(e=e.alternate)&&$S(e,t)}function q_(e){if(e.tag===13||e.tag===31){var t=Bs(e,67108864);t!==null&&vn(t,e,67108864),_b(e,67108864)}}function RS(e){if(e.tag===13||e.tag===31){var t=$n();t=B0(t);var n=Bs(e,t);n!==null&&vn(n,e,t),_b(e,t)}}var Ah=!0;function fD(e,t,n,r){var a=de.T;de.T=null;var i=Me.p;try{Me.p=2,Tb(e,t,n,r)}finally{Me.p=i,de.T=a}}function dD(e,t,n,r){var a=de.T;de.T=null;var i=Me.p;try{Me.p=8,Tb(e,t,n,r)}finally{Me.p=i,de.T=a}}function Tb(e,t,n,r){if(Ah){var a=Rg(r);if(a===null)Yy(e,t,r,Ch,n),DS(e,r);else if(pD(a,e,t,n,r))r.stopPropagation();else if(DS(e,r),t&4&&-1<hD.indexOf(e)){for(;a!==null;){var i=zo(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var l=Wi(i.pendingLanes);if(l!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;l;){var c=1<<31-Pn(l);o.entanglements[1]|=c,l&=~c}Xr(i),!(ke&6)&&(yh=kn()+500,yf(0))}}break;case 31:case 13:o=Bs(i,2),o!==null&&vn(o,i,2),em(),_b(i,2)}if(i=Rg(r),i===null&&Yy(e,t,r,Ch,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else Yy(e,t,r,null,n)}}function Rg(e){return e=F0(e),kb(e)}var Ch=null;function kb(e){if(Ch=null,e=ol(e),e!==null){var t=lf(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=oC(t),e!==null)return e;e=null}else if(n===31){if(e=cC(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ch=e,null}function H_(e){switch(e){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(Z$()){case hC:return 2;case pC:return 8;case nh:case J$:return 32;case mC:return 268435456;default:return 32}default:return 32}}var Dg=!1,bi=null,ji=null,Si=null,yu=new Map,vu=new Map,Za=[],hD="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 DS(e,t){switch(e){case"focusin":case"focusout":bi=null;break;case"dragenter":case"dragleave":ji=null;break;case"mouseover":case"mouseout":Si=null;break;case"pointerover":case"pointerout":yu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vu.delete(t.pointerId)}}function yc(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=zo(t),t!==null&&q_(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function pD(e,t,n,r,a){switch(t){case"focusin":return bi=yc(bi,e,t,n,r,a),!0;case"dragenter":return ji=yc(ji,e,t,n,r,a),!0;case"mouseover":return Si=yc(Si,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return yu.set(i,yc(yu.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,vu.set(i,yc(vu.get(i)||null,e,t,n,r,a)),!0}return!1}function F_(e){var t=ol(e.target);if(t!==null){var n=lf(t);if(n!==null){if(t=n.tag,t===13){if(t=oC(n),t!==null){e.blockedOn=t,bj(e.priority,function(){RS(n)});return}}else if(t===31){if(t=cC(n),t!==null){e.blockedOn=t,bj(e.priority,function(){RS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Rg(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);eg=r,n.target.dispatchEvent(r),eg=null}else return t=zo(n),t!==null&&q_(t),e.blockedOn=n,!1;t.shift()}return!0}function LS(e,t,n){Fd(e)&&n.delete(t)}function mD(){Dg=!1,bi!==null&&Fd(bi)&&(bi=null),ji!==null&&Fd(ji)&&(ji=null),Si!==null&&Fd(Si)&&(Si=null),yu.forEach(LS),vu.forEach(LS)}function td(e,t){e.blockedOn===t&&(e.blockedOn=null,Dg||(Dg=!0,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,mD)))}var nd=null;function zS(e){nd!==e&&(nd=e,Mt.unstable_scheduleCallback(Mt.unstable_NormalPriority,function(){nd===e&&(nd=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if(typeof r!="function"){if(kb(r||n)===null)continue;break}var i=zo(n);i!==null&&(e.splice(t,3),t-=3,yg(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function to(e){function t(c){return td(c,e)}bi!==null&&td(bi,e),ji!==null&&td(ji,e),Si!==null&&td(Si,e),yu.forEach(t),vu.forEach(t);for(var n=0;n<Za.length;n++){var r=Za[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Za.length&&(n=Za[0],n.blockedOn===null);)F_(n),n.blockedOn===null&&Za.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],l=a[xn]||null;if(typeof i=="function")l||zS(n);else if(l){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,l=i[xn]||null)o=l.formAction;else if(kb(a)!==null)continue}else o=l.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),zS(n)}}}function G_(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(l){return a=l})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Mb(e){this._internalRoot=e}rm.prototype.render=Mb.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));var n=t.current,r=$n();U_(n,r,e,t,null,null)};rm.prototype.unmount=Mb.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;U_(e.current,2,null,e,null,null),em(),t[Lo]=null}};function rm(e){this._internalRoot=e}rm.prototype.unstable_scheduleHydration=function(e){if(e){var t=bC();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Za.length&&t!==0&&t<Za[n].priority;n++);Za.splice(n,0,e),n===0&&F_(e)}};var IS=sC.version;if(IS!=="19.2.7")throw Error(F(527,IS,"19.2.7"));Me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=G$(t),e=e!==null?uC(e):null,e=e===null?null:e.stateNode,e};var yD={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:de,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{of=rd.inject(yD),Mn=rd}catch{}}Bp.createRoot=function(e,t){if(!lC(e))throw Error(F(299));var n=!1,r="",a=DE,i=LE,l=zE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=I_(e,1,!1,null,null,n,r,null,a,i,l,G_),e[Lo]=t.current,Ab(e),new Mb(t)};Bp.hydrateRoot=function(e,t,n){if(!lC(e))throw Error(F(299));var r=!1,a="",i=DE,l=LE,o=zE,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=I_(e,1,!0,t,n??null,r,a,c,i,l,o,G_),t.context=B_(null),n=t.current,r=$n(),r=B0(r),a=yi(r),a.callback=null,vi(n,a,r),n=r,t.current.lanes=n,uf(t,n),Xr(t),e[Lo]=t.current,Ab(e),new rm(t)};Bp.version="19.2.7";function K_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(K_)}catch(e){console.error(e)}}K_(),eC.exports=Bp;var vD=eC.exports;const gD=$e(vD);/**
 * react-router v7.17.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var BS="popstate";function US(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function xD(e={}){function t(r,a){var u;let i=(u=a.state)==null?void 0:u.masked,{pathname:l,search:o,hash:c}=i||r.location;return Lg("",{pathname:l,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:gu(a)}return jD(t,n,null,e)}function it(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Er(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bD(){return Math.random().toString(36).substring(2,10)}function qS(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Lg(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fo(t):t,state:n,key:t&&t.key||r||bD(),mask:a}}function gu({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Fo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function jD(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,l=a.history,o="POP",c=null,u=f();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function f(){return(l.state||{idx:null}).idx}function d(){o="POP";let p=f(),y=p==null?null:p-u;u=p,c&&c({action:o,location:v.location,delta:y})}function h(p,y){o="PUSH";let g=US(p)?p:Lg(v.location,p,y);u=f()+1;let b=qS(g,u),x=v.createHref(g.mask||g);try{l.pushState(b,"",x)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;a.location.assign(x)}i&&c&&c({action:o,location:v.location,delta:1})}function m(p,y){o="REPLACE";let g=US(p)?p:Lg(v.location,p,y);u=f();let b=qS(g,u),x=v.createHref(g.mask||g);l.replaceState(b,"",x),i&&c&&c({action:o,location:v.location,delta:0})}function j(p){return SD(a,p)}let v={get action(){return o},get location(){return e(a,l)},listen(p){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(BS,d),c=p,()=>{a.removeEventListener(BS,d),c=null}},createHref(p){return t(a,p)},createURL:j,encodeLocation(p){let y=j(p);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:m,go(p){return l.go(p)}};return v}function SD(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),it(r,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:gu(t);return a=a.replace(/ $/,"%20"),!n&&a.startsWith("//")&&(a=r+a),new URL(a,r)}function V_(e,t,n="/"){return wD(e,t,n,!1)}function wD(e,t,n,r,a){let i=typeof t=="string"?Fo(t):t,l=Ta(i.pathname||"/",n);if(l==null)return null;let o=ND(e),c=null,u=DD(l);for(let f=0;c==null&&f<o.length;++f)c=$D(o[f],u,r);return c}function ND(e){let t=Y_(e);return OD(t),t}function Y_(e,t=[],n=[],r="",a=!1){let i=(l,o,c=a,u)=>{let f={relativePath:u===void 0?l.path||"":u,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(r)&&c)return;it(f.relativePath.startsWith(r),`Absolute route path "${f.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(r.length)}let d=wr([r,f.relativePath]),h=n.concat(f);l.children&&l.children.length>0&&(it(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Y_(l.children,t,h,d,c)),!(l.path==null&&!l.index)&&t.push({path:d,score:MD(d,l.index),routesMeta:h})};return e.forEach((l,o)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))i(l,o);else for(let u of W_(l.path))i(l,o,!0,u)}),t}function W_(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let l=W_(r.join("/")),o=[];return o.push(...l.map(c=>c===""?i:[i,c].join("/"))),a&&o.push(...l),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function OD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:PD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var AD=/^:[\w-]+$/,CD=3,ED=2,_D=1,TD=10,kD=-2,HS=e=>e==="*";function MD(e,t){let n=e.split("/"),r=n.length;return n.some(HS)&&(r+=kD),t&&(r+=ED),n.filter(a=>!HS(a)).reduce((a,i)=>a+(AD.test(i)?CD:i===""?_D:TD),r)}function PD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function $D(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",l=[];for(let o=0;o<r.length;++o){let c=r[o],u=o===r.length-1,f=i==="/"?t:t.slice(i.length)||"/",d=Eh({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),h=c.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=Eh({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;Object.assign(a,d.params),l.push({params:a,pathname:wr([i,d.pathname]),pathnameBase:BD(wr([i,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(i=wr([i,d.pathnameBase]))}return l}function Eh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=RD(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((u,{paramName:f,isOptional:d},h)=>{if(f==="*"){let j=o[h]||"";l=i.slice(0,i.length-j.length).replace(/(.)\/+$/,"$1")}const m=o[h];return d&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:l,pattern:e}}function RD(e,t=!1,n=!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 r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,c,u,f)=>{if(r.push({paramName:o,isOptional:c!=null}),c){let d=f.charAt(u+l.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function DD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){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 (${t}).`),e}}function Ta(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var LD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function zD(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Fo(e):e,i;return n?(n=Q_(n),n.startsWith("/")?i=FS(n.substring(1),"/"):i=FS(n,t)):i=t,{pathname:i,search:UD(r),hash:qD(a)}}function FS(e,t){let n=_h(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Xy(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ID(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Pb(e){let t=ID(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function am(e,t,n,r=!1){let a;typeof e=="string"?a=Fo(e):(a={...e},it(!a.pathname||!a.pathname.includes("?"),Xy("?","pathname","search",a)),it(!a.pathname||!a.pathname.includes("#"),Xy("#","pathname","hash",a)),it(!a.search||!a.search.includes("#"),Xy("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=n;else{let d=t.length-1;if(!r&&l.startsWith("..")){let h=l.split("/");for(;h[0]==="..";)h.shift(),d-=1;a.pathname=h.join("/")}o=d>=0?t[d]:"/"}let c=zD(a,o),u=l&&l!=="/"&&l.endsWith("/"),f=(i||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}var Q_=e=>e.replace(/\/\/+/g,"/"),wr=e=>Q_(e.join("/")),_h=e=>e.replace(/\/+$/,""),BD=e=>_h(e).replace(/^\/*/,"/"),UD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,HD=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function FD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function GD(e){let t=e.map(n=>n.route.path).filter(Boolean);return wr(t)||"/"}var X_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Z_(e,t){let n=e;if(typeof n!="string"||!LD.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(X_)try{let i=new URL(window.location.href),l=n.startsWith("//")?new URL(i.protocol+n):new URL(n),o=Ta(l.pathname,t);l.origin===i.origin&&o!=null?n=o+l.search+l.hash:a=!0}catch{Er(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var J_=["POST","PUT","PATCH","DELETE"];new Set(J_);var KD=["GET",...J_];new Set(KD);var Go=S.createContext(null);Go.displayName="DataRouter";var im=S.createContext(null);im.displayName="DataRouterState";var eT=S.createContext(!1);function VD(){return S.useContext(eT)}var tT=S.createContext({isTransitioning:!1});tT.displayName="ViewTransition";var YD=S.createContext(new Map);YD.displayName="Fetchers";var WD=S.createContext(null);WD.displayName="Await";var In=S.createContext(null);In.displayName="Navigation";var xf=S.createContext(null);xf.displayName="Location";var Tr=S.createContext({outlet:null,matches:[],isDataRoute:!1});Tr.displayName="Route";var $b=S.createContext(null);$b.displayName="RouteError";var nT="REACT_ROUTER_ERROR",QD="REDIRECT",XD="ROUTE_ERROR_RESPONSE";function ZD(e){if(e.startsWith(`${nT}:${QD}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function JD(e){if(e.startsWith(`${nT}:${XD}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new HD(t.status,t.statusText,t.data)}catch{}}function e5(e,{relative:t}={}){it(Ko(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(In),{hash:a,pathname:i,search:l}=bf(e,{relative:t}),o=i;return n!=="/"&&(o=i==="/"?n:wr([n,i])),r.createHref({pathname:o,search:l,hash:a})}function Ko(){return S.useContext(xf)!=null}function Zr(){return it(Ko(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(xf).location}var rT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function aT(e){S.useContext(In).static||S.useLayoutEffect(e)}function sm(){let{isDataRoute:e}=S.useContext(Tr);return e?m5():t5()}function t5(){it(Ko(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(Go),{basename:t,navigator:n}=S.useContext(In),{matches:r}=S.useContext(Tr),{pathname:a}=Zr(),i=JSON.stringify(Pb(r)),l=S.useRef(!1);return aT(()=>{l.current=!0}),S.useCallback((c,u={})=>{if(Er(l.current,rT),!l.current)return;if(typeof c=="number"){n.go(c);return}let f=am(c,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:wr([t,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[t,n,i,a,e])}var n5=S.createContext(null);function r5(e){let t=S.useContext(Tr).outlet;return S.useMemo(()=>t&&S.createElement(n5.Provider,{value:e},t),[t,e])}function bf(e,{relative:t}={}){let{matches:n}=S.useContext(Tr),{pathname:r}=Zr(),a=JSON.stringify(Pb(n));return S.useMemo(()=>am(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function a5(e,t){return iT(e,t)}function iT(e,t,n){var p;it(Ko(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=S.useContext(In),{matches:a}=S.useContext(Tr),i=a[a.length-1],l=i?i.params:{},o=i?i.pathname:"/",c=i?i.pathnameBase:"/",u=i&&i.route;{let y=u&&u.path||"";lT(o,!u||y.endsWith("*")||y.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${o}" (under <Route path="${y}">) 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="${y}"> to <Route path="${y==="/"?"*":`${y}/*`}">.`)}let f=Zr(),d;if(t){let y=typeof t=="string"?Fo(t):t;it(c==="/"||((p=y.pathname)==null?void 0:p.startsWith(c)),`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 "${c}" but pathname "${y.pathname}" was given in the \`location\` prop.`),d=y}else d=f;let h=d.pathname||"/",m=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let j=n&&n.state.matches.length?n.state.matches.map(y=>Object.assign(y,{route:n.manifest[y.route.id]||y.route})):V_(e,{pathname:m});Er(u||j!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Er(j==null||j[j.length-1].route.element!==void 0||j[j.length-1].route.Component!==void 0||j[j.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=c5(j&&j.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:wr([c,r.encodeLocation?r.encodeLocation(y.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:wr([c,r.encodeLocation?r.encodeLocation(y.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:y.pathnameBase])})),a,n);return t&&v?S.createElement(xf.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},v):v}function i5(){let e=p5(),t=FD(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:i},"ErrorBoundary")," or"," ",S.createElement("code",{style:i},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:a},n):null,l)}var s5=S.createElement(i5,null),sT=class extends S.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,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=JD(e.digest);n&&(e=n)}let t=e!==void 0?S.createElement(Tr.Provider,{value:this.props.routeContext},S.createElement($b.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(l5,{error:e},t):t}};sT.contextType=eT;var Zy=new WeakMap;function l5({children:e,error:t}){let{basename:n}=S.useContext(In);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=ZD(t.digest);if(r){let a=Zy.get(t);if(a)throw a;let i=Z_(r.location,n);if(X_&&!Zy.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw Zy.set(t,l),l}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function o5({routeContext:e,match:t,children:n}){let r=S.useContext(Go);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Tr.Provider,{value:e},n)}function c5(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let f=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);it(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,f+1))}let l=!1,o=-1;if(n&&r){l=r.renderFallback;for(let f=0;f<a.length;f++){let d=a[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(o=f),d.route.id){let{loaderData:h,errors:m}=r,j=d.route.loader&&!h.hasOwnProperty(d.route.id)&&(!m||m[d.route.id]===void 0);if(d.route.lazy||j){n.isStatic&&(l=!0),o>=0?a=a.slice(0,o+1):a=[a[0]];break}}}}let c=n==null?void 0:n.onError,u=r&&c?(f,d)=>{var h,m;c(f,{location:r.location,params:((m=(h=r.matches)==null?void 0:h[0])==null?void 0:m.params)??{},pattern:GD(r.matches),errorInfo:d})}:void 0;return a.reduceRight((f,d,h)=>{let m,j=!1,v=null,p=null;r&&(m=i&&d.route.id?i[d.route.id]:void 0,v=d.route.errorElement||s5,l&&(o<0&&h===0?(lT("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,p=null):o===h&&(j=!0,p=d.route.hydrateFallbackElement||null)));let y=t.concat(a.slice(0,h+1)),g=()=>{let b;return m?b=v:j?b=p:d.route.Component?b=S.createElement(d.route.Component,null):d.route.element?b=d.route.element:b=f,S.createElement(o5,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:r!=null},children:b})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?S.createElement(sT,{location:r.location,revalidation:r.revalidation,component:v,error:m,children:g(),routeContext:{outlet:null,matches:y,isDataRoute:!0},onError:u}):g()},null)}function Rb(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function u5(e){let t=S.useContext(Go);return it(t,Rb(e)),t}function f5(e){let t=S.useContext(im);return it(t,Rb(e)),t}function d5(e){let t=S.useContext(Tr);return it(t,Rb(e)),t}function Db(e){let t=d5(e),n=t.matches[t.matches.length-1];return it(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function h5(){return Db("useRouteId")}function p5(){var r;let e=S.useContext($b),t=f5("useRouteError"),n=Db("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function m5(){let{router:e}=u5("useNavigate"),t=Db("useNavigate"),n=S.useRef(!1);return aT(()=>{n.current=!0}),S.useCallback(async(a,i={})=>{Er(n.current,rT),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var GS={};function lT(e,t,n){!t&&!GS[e]&&(GS[e]=!0,Er(!1,n))}S.memo(y5);function y5({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:i}){return iT(e,void 0,{manifest:t,state:r,isStatic:a,onError:i})}function oT({to:e,replace:t,state:n,relative:r}){it(Ko(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=S.useContext(In);Er(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=S.useContext(Tr),{pathname:l}=Zr(),o=sm(),c=am(e,Pb(i),l,r==="path"),u=JSON.stringify(c);return S.useEffect(()=>{o(JSON.parse(u),{replace:t,state:n,relative:r})},[o,u,r,t,n]),null}function v5(e){return r5(e.context)}function fe(e){it(!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 g5({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,useTransitions:l}){it(!Ko(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),c=S.useMemo(()=>({basename:o,navigator:a,static:i,useTransitions:l,future:{}}),[o,a,i,l]);typeof n=="string"&&(n=Fo(n));let{pathname:u="/",search:f="",hash:d="",state:h=null,key:m="default",mask:j}=n,v=S.useMemo(()=>{let p=Ta(u,o);return p==null?null:{location:{pathname:p,search:f,hash:d,state:h,key:m,mask:j},navigationType:r}},[o,u,f,d,h,m,r,j]);return Er(v!=null,`<Router basename="${o}"> is not able to match the URL "${u}${f}${d}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:S.createElement(In.Provider,{value:c},S.createElement(xf.Provider,{children:t,value:v}))}function x5({children:e,location:t}){return a5(zg(e),t)}function zg(e,t=[]){let n=[];return S.Children.forEach(e,(r,a)=>{if(!S.isValidElement(r))return;let i=[...t,a];if(r.type===S.Fragment){n.push.apply(n,zg(r.props.children,i));return}it(r.type===fe,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),it(!r.props.index||!r.props.children,"An index route cannot have child routes.");let l={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(l.children=zg(r.props.children,i)),n.push(l)}),n}var Gd="get",Kd="application/x-www-form-urlencoded";function lm(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function b5(e){return lm(e)&&e.tagName.toLowerCase()==="button"}function j5(e){return lm(e)&&e.tagName.toLowerCase()==="form"}function S5(e){return lm(e)&&e.tagName.toLowerCase()==="input"}function w5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function N5(e,t){return e.button===0&&(!t||t==="_self")&&!w5(e)}var ad=null;function O5(){if(ad===null)try{new FormData(document.createElement("form"),0),ad=!1}catch{ad=!0}return ad}var A5=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jy(e){return e!=null&&!A5.has(e)?(Er(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kd}"`),null):e}function C5(e,t){let n,r,a,i,l;if(j5(e)){let o=e.getAttribute("action");r=o?Ta(o,t):null,n=e.getAttribute("method")||Gd,a=Jy(e.getAttribute("enctype"))||Kd,i=new FormData(e)}else if(b5(e)||S5(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||o.getAttribute("action");if(r=c?Ta(c,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||Gd,a=Jy(e.getAttribute("formenctype"))||Jy(o.getAttribute("enctype"))||Kd,i=new FormData(o,e),!O5()){let{name:u,type:f,value:d}=e;if(f==="image"){let h=u?`${u}.`:"";i.append(`${h}x`,"0"),i.append(`${h}y`,"0")}else u&&i.append(u,d)}}else{if(lm(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Gd,r=null,a=Kd,l=e}return i&&a==="text/plain"&&(l=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Lb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cT(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Ta(a.pathname,t)==="/"?a.pathname=`${_h(t)}/_root.${r}`:a.pathname=`${_h(a.pathname)}.${r}`,a}async function E5(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _5(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 T5(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let l=await E5(i,n);return l.links?l.links():[]}return[]}));return $5(r.flat(1).filter(_5).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function KS(e,t,n,r,a,i){let l=(c,u)=>n[u]?c.route.id!==n[u].route.id:!0,o=(c,u)=>{var f;return n[u].pathname!==c.pathname||((f=n[u].route.path)==null?void 0:f.endsWith("*"))&&n[u].params["*"]!==c.params["*"]};return i==="assets"?t.filter((c,u)=>l(c,u)||o(c,u)):i==="data"?t.filter((c,u)=>{var d;let f=r.routes[c.route.id];if(!f||!f.hasLoader)return!1;if(l(c,u)||o(c,u))return!0;if(c.route.shouldRevalidate){let h=c.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function k5(e,t,{includeHydrateFallback:n}={}){return M5(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function M5(e){return[...new Set(e)]}function P5(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function $5(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(P5(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function zb(){let e=S.useContext(Go);return Lb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function R5(){let e=S.useContext(im);return Lb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ib=S.createContext(void 0);Ib.displayName="FrameworkContext";function Bb(){let e=S.useContext(Ib);return Lb(e,"You must render this element inside a <HydratedRouter> element"),e}function D5(e,t){let n=S.useContext(Ib),[r,a]=S.useState(!1),[i,l]=S.useState(!1),{onFocus:o,onBlur:c,onMouseEnter:u,onMouseLeave:f,onTouchStart:d}=t,h=S.useRef(null);S.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=y=>{y.forEach(g=>{l(g.isIntersecting)})},p=new IntersectionObserver(v,{threshold:.5});return h.current&&p.observe(h.current),()=>{p.disconnect()}}},[e]),S.useEffect(()=>{if(r){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[r]);let m=()=>{a(!0)},j=()=>{a(!1),l(!1)};return n?e!=="intent"?[i,h,{}]:[i,h,{onFocus:vc(o,m),onBlur:vc(c,j),onMouseEnter:vc(u,m),onMouseLeave:vc(f,j),onTouchStart:vc(d,m)}]:[!1,h,{}]}function vc(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function L5({page:e,...t}){let n=VD(),{router:r}=zb(),a=S.useMemo(()=>V_(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?n?S.createElement(I5,{page:e,matches:a,...t}):S.createElement(B5,{page:e,matches:a,...t}):null}function z5(e){let{manifest:t,routeModules:n}=Bb(),[r,a]=S.useState([]);return S.useEffect(()=>{let i=!1;return T5(e,t,n).then(l=>{i||a(l)}),()=>{i=!0}},[e,t,n]),r}function I5({page:e,matches:t,...n}){let r=Zr(),{future:a}=Bb(),{basename:i}=zb(),l=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let o=cT(e,i,a.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,u=[];for(let f of t)typeof f.route.shouldRevalidate=="function"?c=!0:u.push(f.route.id);return c&&u.length>0&&o.searchParams.set("_routes",u.join(",")),[o.pathname+o.search]},[i,a.v8_trailingSlashAwareDataRequests,e,r,t]);return S.createElement(S.Fragment,null,l.map(o=>S.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...n})))}function B5({page:e,matches:t,...n}){let r=Zr(),{future:a,manifest:i,routeModules:l}=Bb(),{basename:o}=zb(),{loaderData:c,matches:u}=R5(),f=S.useMemo(()=>KS(e,t,u,i,r,"data"),[e,t,u,i,r]),d=S.useMemo(()=>KS(e,t,u,i,r,"assets"),[e,t,u,i,r]),h=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,p=!1;if(t.forEach(g=>{var x;let b=i.routes[g.route.id];!b||!b.hasLoader||(!f.some(N=>N.route.id===g.route.id)&&g.route.id in c&&((x=l[g.route.id])!=null&&x.shouldRevalidate)||b.hasClientLoader?p=!0:v.add(g.route.id))}),v.size===0)return[];let y=cT(e,o,a.v8_trailingSlashAwareDataRequests,"data");return p&&v.size>0&&y.searchParams.set("_routes",t.filter(g=>v.has(g.route.id)).map(g=>g.route.id).join(",")),[y.pathname+y.search]},[o,a.v8_trailingSlashAwareDataRequests,c,r,i,f,t,e,l]),m=S.useMemo(()=>k5(d,i),[d,i]),j=z5(d);return S.createElement(S.Fragment,null,h.map(v=>S.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),m.map(v=>S.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),j.map(({key:v,link:p})=>S.createElement("link",{key:v,nonce:n.nonce,...p,crossOrigin:p.crossOrigin??n.crossOrigin})))}function U5(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var q5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{q5&&(window.__reactRouterVersion="7.17.0")}catch{}function H5({basename:e,children:t,useTransitions:n,window:r}){let a=S.useRef();a.current==null&&(a.current=xD({window:r,v5Compat:!0}));let i=a.current,[l,o]=S.useState({action:i.action,location:i.location}),c=S.useCallback(u=>{n===!1?o(u):S.startTransition(()=>o(u))},[n]);return S.useLayoutEffect(()=>i.listen(c),[i,c]),S.createElement(g5,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}var uT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jf=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:l,mask:o,state:c,target:u,to:f,preventScrollReset:d,viewTransition:h,defaultShouldRevalidate:m,...j},v){let{basename:p,navigator:y,useTransitions:g}=S.useContext(In),b=typeof f=="string"&&uT.test(f),x=Z_(f,p);f=x.to;let N=e5(f,{relative:a}),w=Zr(),O=null;if(o){let C=am(o,[],w.mask?w.mask.pathname:"/",!0);p!=="/"&&(C.pathname=C.pathname==="/"?p:wr([p,C.pathname])),O=y.createHref(C)}let[A,E,M]=D5(r,j),$=K5(f,{replace:l,mask:o,state:c,target:u,preventScrollReset:d,relative:a,viewTransition:h,defaultShouldRevalidate:m,useTransitions:g});function k(C){t&&t(C),C.defaultPrevented||$(C)}let I=!(x.isExternal||i),_=S.createElement("a",{...j,...M,href:(I?O:void 0)||x.absoluteURL||N,onClick:I?k:t,ref:U5(v,E),target:u,"data-discover":!b&&n==="render"?"true":void 0});return A&&!b?S.createElement(S.Fragment,null,_,S.createElement(L5,{page:N})):_});jf.displayName="Link";var fT=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:l,viewTransition:o,children:c,...u},f){let d=bf(l,{relative:u.relative}),h=Zr(),m=S.useContext(im),{navigator:j,basename:v}=S.useContext(In),p=m!=null&&X5(d)&&o===!0,y=j.encodeLocation?j.encodeLocation(d).pathname:d.pathname,g=h.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(g=g.toLowerCase(),b=b?b.toLowerCase():null,y=y.toLowerCase()),b&&v&&(b=Ta(b,v)||b);const x=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let N=g===y||!a&&g.startsWith(y)&&g.charAt(x)==="/",w=b!=null&&(b===y||!a&&b.startsWith(y)&&b.charAt(y.length)==="/"),O={isActive:N,isPending:w,isTransitioning:p},A=N?t:void 0,E;typeof r=="function"?E=r(O):E=[r,N?"active":null,w?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let M=typeof i=="function"?i(O):i;return S.createElement(jf,{...u,"aria-current":A,className:E,ref:f,style:M,to:l,viewTransition:o},typeof c=="function"?c(O):c)});fT.displayName="NavLink";var F5=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:l=Gd,action:o,onSubmit:c,relative:u,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h,...m},j)=>{let{useTransitions:v}=S.useContext(In),p=W5(),y=Q5(o,{relative:u}),g=l.toLowerCase()==="get"?"get":"post",b=typeof o=="string"&&uT.test(o),x=N=>{if(c&&c(N),N.defaultPrevented)return;N.preventDefault();let w=N.nativeEvent.submitter,O=(w==null?void 0:w.getAttribute("formmethod"))||l,A=()=>p(w||N.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:a,state:i,relative:u,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:h});v&&n!==!1?S.startTransition(()=>A()):A()};return S.createElement("form",{ref:j,method:g,action:y,onSubmit:r?c:x,...m,"data-discover":!b&&e==="render"?"true":void 0})});F5.displayName="Form";function G5(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function dT(e){let t=S.useContext(Go);return it(t,G5(e)),t}function K5(e,{target:t,replace:n,mask:r,state:a,preventScrollReset:i,relative:l,viewTransition:o,defaultShouldRevalidate:c,useTransitions:u}={}){let f=sm(),d=Zr(),h=bf(e,{relative:l});return S.useCallback(m=>{if(N5(m,t)){m.preventDefault();let j=n!==void 0?n:gu(d)===gu(h),v=()=>f(e,{replace:j,mask:r,state:a,preventScrollReset:i,relative:l,viewTransition:o,defaultShouldRevalidate:c});u?S.startTransition(()=>v()):v()}},[d,f,h,n,r,a,t,e,i,l,o,c,u])}var V5=0,Y5=()=>`__${String(++V5)}__`;function W5(){let{router:e}=dT("useSubmit"),{basename:t}=S.useContext(In),n=h5(),r=e.fetch,a=e.navigate;return S.useCallback(async(i,l={})=>{let{action:o,method:c,encType:u,formData:f,body:d}=C5(i,t);if(l.navigate===!1){let h=l.fetcherKey||Y5();await r(h,n,l.action||o,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:d,formMethod:l.method||c,formEncType:l.encType||u,flushSync:l.flushSync})}else await a(l.action||o,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:f,body:d,formMethod:l.method||c,formEncType:l.encType||u,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[r,a,t,n])}function Q5(e,{relative:t}={}){let{basename:n}=S.useContext(In),r=S.useContext(Tr);it(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...bf(e||".",{relative:t})},l=Zr();if(e==null){i.search=l.search;let o=new URLSearchParams(i.search),c=o.getAll("index");if(c.some(f=>f==="")){o.delete("index"),c.filter(d=>d).forEach(d=>o.append("index",d));let f=o.toString();i.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:wr([n,i.pathname])),gu(i)}function X5(e,{relative:t}={}){let n=S.useContext(tT);it(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=dT("useViewTransitionState"),a=bf(e,{relative:t});if(!n.isTransitioning)return!1;let i=Ta(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=Ta(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Eh(a.pathname,l)!=null||Eh(a.pathname,i)!=null}var om=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},os,ei,Dl,DA,Z5=(DA=class extends om{constructor(){super();Oe(this,os);Oe(this,ei);Oe(this,Dl);he(this,Dl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){q(this,ei)||this.setEventListener(q(this,Dl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,ei))==null||t.call(this),he(this,ei,void 0))}setEventListener(t){var n;he(this,Dl,t),(n=q(this,ei))==null||n.call(this),he(this,ei,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){q(this,os)!==t&&(he(this,os,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof q(this,os)=="boolean"?q(this,os):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},os=new WeakMap,ei=new WeakMap,Dl=new WeakMap,DA),hT=new Z5,J5={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ti,k0,LA,e6=(LA=class{constructor(){Oe(this,ti,J5);Oe(this,k0,!1)}setTimeoutProvider(e){he(this,ti,e)}setTimeout(e,t){return q(this,ti).setTimeout(e,t)}clearTimeout(e){q(this,ti).clearTimeout(e)}setInterval(e,t){return q(this,ti).setInterval(e,t)}clearInterval(e){q(this,ti).clearInterval(e)}},ti=new WeakMap,k0=new WeakMap,LA),Ig=new e6;function t6(e){setTimeout(e,0)}var n6=typeof window>"u"||"Deno"in globalThis;function yr(){}function r6(e,t){return typeof e=="function"?e(t):e}function a6(e){return typeof e=="number"&&e>=0&&e!==1/0}function i6(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Bg(e,t){return typeof e=="function"?e(t):e}function s6(e,t){return typeof e=="function"?e(t):e}function VS(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:o}=e;if(l){if(r){if(t.queryHash!==Ub(l,t.options))return!1}else if(!bu(t.queryKey,l))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function YS(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(xu(t.options.mutationKey)!==xu(i))return!1}else if(!bu(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function Ub(e,t){return((t==null?void 0:t.queryKeyHashFn)||xu)(e)}function xu(e){return JSON.stringify(e,(t,n)=>Ug(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function bu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>bu(e[n],t[n])):!1}var l6=Object.prototype.hasOwnProperty;function pT(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=WS(e)&&WS(t);if(!r&&!(Ug(e)&&Ug(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),o=l.length,c=r?new Array(o):{};let u=0;for(let f=0;f<o;f++){const d=r?f:l[f],h=e[d],m=t[d];if(h===m){c[d]=h,(r?f<i:l6.call(e,d))&&u++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){c[d]=m;continue}const j=pT(h,m,n+1);c[d]=j,j===h&&u++}return i===o&&u===i?e:c}function WS(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ug(e){if(!QS(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!QS(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function QS(e){return Object.prototype.toString.call(e)==="[object Object]"}function o6(e){return new Promise(t=>{Ig.setTimeout(t,e)})}function c6(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?pT(e,t):t}function u6(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function f6(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var qb=Symbol();function mT(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===qb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function d6(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var yT=(()=>{let e=()=>n6;return{isServer(){return e()},setIsServer(t){e=t}}})();function h6(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var p6=t6;function m6(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=p6;const i=o=>{t?e.push(o):a(()=>{n(o)})},l=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||l()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var nn=m6(),Ll,ni,zl,zA,y6=(zA=class extends om{constructor(){super();Oe(this,Ll,!0);Oe(this,ni);Oe(this,zl);he(this,zl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){q(this,ni)||this.setEventListener(q(this,zl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,ni))==null||t.call(this),he(this,ni,void 0))}setEventListener(t){var n;he(this,zl,t),(n=q(this,ni))==null||n.call(this),he(this,ni,t(this.setOnline.bind(this)))}setOnline(t){q(this,Ll)!==t&&(he(this,Ll,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return q(this,Ll)}},Ll=new WeakMap,ni=new WeakMap,zl=new WeakMap,zA),Th=new y6;function v6(e){return Math.min(1e3*2**e,3e4)}function vT(e){return(e??"online")==="online"?Th.isOnline():!0}var qg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function gT(e){let t=!1,n=0,r;const a=h6(),i=()=>a.status!=="pending",l=v=>{var p;if(!i()){const y=new qg(v);h(y),(p=e.onCancel)==null||p.call(e,y)}},o=()=>{t=!0},c=()=>{t=!1},u=()=>hT.isFocused()&&(e.networkMode==="always"||Th.isOnline())&&e.canRun(),f=()=>vT(e.networkMode)&&e.canRun(),d=v=>{i()||(r==null||r(),a.resolve(v))},h=v=>{i()||(r==null||r(),a.reject(v))},m=()=>new Promise(v=>{var p;r=y=>{(i()||u())&&v(y)},(p=e.onPause)==null||p.call(e)}).then(()=>{var v;r=void 0,i()||(v=e.onContinue)==null||v.call(e)}),j=()=>{if(i())return;let v;const p=n===0?e.initialPromise:void 0;try{v=p??e.fn()}catch(y){v=Promise.reject(y)}Promise.resolve(v).then(d).catch(y=>{var w;if(i())return;const g=e.retry??(yT.isServer()?0:3),b=e.retryDelay??v6,x=typeof b=="function"?b(n,y):b,N=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,y);if(t||!N){h(y);return}n++,(w=e.onFail)==null||w.call(e,n,y),o6(x).then(()=>u()?void 0:m()).then(()=>{t?h(y):j()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:c,canStart:f,start:()=>(f()?j():m().then(j),a)}}var cs,IA,xT=(IA=class{constructor(){Oe(this,cs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),a6(this.gcTime)&&he(this,cs,Ig.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yT.isServer()?1/0:5*60*1e3))}clearGcTimeout(){q(this,cs)!==void 0&&(Ig.clearTimeout(q(this,cs)),he(this,cs,void 0))}},cs=new WeakMap,IA);function g6(e){return{onFetch:(t,n)=>{var f,d,h,m,j;const r=t.options,a=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,i=((m=t.state.data)==null?void 0:m.pages)||[],l=((j=t.state.data)==null?void 0:j.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const p=b=>{d6(b,()=>t.signal,()=>v=!0)},y=mT(t.options,t.fetchOptions),g=async(b,x,N)=>{if(v)return Promise.reject(t.signal.reason);if(x==null&&b.pages.length)return Promise.resolve(b);const O=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:x,direction:N?"backward":"forward",meta:t.options.meta};return p($),$})(),A=await y(O),{maxPages:E}=t.options,M=N?f6:u6;return{pages:M(b.pages,A,E),pageParams:M(b.pageParams,x,E)}};if(a&&i.length){const b=a==="backward",x=b?x6:XS,N={pages:i,pageParams:l},w=x(r,N);o=await g(N,w,b)}else{const b=e??i.length;do{const x=c===0?l[0]??r.initialPageParam:XS(r,o);if(c>0&&x==null)break;o=await g(o,x),c++}while(c<b)}return o};t.options.persister?t.fetchFn=()=>{var v,p;return(p=(v=t.options).persister)==null?void 0:p.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function XS(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function x6(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Il,us,Bl,Kn,fs,$t,rf,ds,An,bT,oa,BA,b6=(BA=class extends xT{constructor(t){super();Oe(this,An);Oe(this,Il);Oe(this,us);Oe(this,Bl);Oe(this,Kn);Oe(this,fs);Oe(this,$t);Oe(this,rf);Oe(this,ds);he(this,ds,!1),he(this,rf,t.defaultOptions),this.setOptions(t.options),this.observers=[],he(this,fs,t.client),he(this,Kn,q(this,fs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,he(this,us,JS(this.options)),this.state=t.state??q(this,us),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return q(this,Il)}get promise(){var t;return(t=q(this,$t))==null?void 0:t.promise}setOptions(t){if(this.options={...q(this,rf),...t},t!=null&&t._type&&he(this,Il,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=JS(this.options);n.data!==void 0&&(this.setState(ZS(n.data,n.dataUpdatedAt)),he(this,us,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,Kn).remove(this)}setData(t,n){const r=c6(this.state.data,t,this.options);return Ut(this,An,oa).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Ut(this,An,oa).call(this,{type:"setState",state:t})}cancel(t){var r,a;const n=(r=q(this,$t))==null?void 0:r.promise;return(a=q(this,$t))==null||a.cancel(t),n?n.then(yr).catch(yr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return q(this,us)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>s6(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Bg(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!i6(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=q(this,$t))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=q(this,$t))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),q(this,Kn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(q(this,$t)&&(q(this,ds)||Ut(this,An,bT).call(this)?q(this,$t).cancel({revert:!0}):q(this,$t).cancelRetry()),this.scheduleGc()),q(this,Kn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ut(this,An,oa).call(this,{type:"invalidate"})}async fetch(t,n){var u,f,d,h,m,j,v,p,y,g,b;if(this.state.fetchStatus!=="idle"&&((u=q(this,$t))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(q(this,$t))return q(this,$t).continueRetry(),q(this,$t).promise}if(t&&this.setOptions(t),!this.options.queryFn){const x=this.observers.find(N=>N.options.queryFn);x&&this.setOptions(x.options)}const r=new AbortController,a=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(he(this,ds,!0),r.signal)})},i=()=>{const x=mT(this.options,n),w=(()=>{const O={client:q(this,fs),queryKey:this.queryKey,meta:this.meta};return a(O),O})();return he(this,ds,!1),this.options.persister?this.options.persister(x,w,this):x(w)},o=(()=>{const x={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:q(this,fs),state:this.state,fetchFn:i};return a(x),x})(),c=q(this,Il)==="infinite"?g6(this.options.pages):this.options.behavior;c==null||c.onFetch(o,this),he(this,Bl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Ut(this,An,oa).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta}),he(this,$t,gT({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:x=>{x instanceof qg&&x.revert&&this.setState({...q(this,Bl),fetchStatus:"idle"}),r.abort()},onFail:(x,N)=>{Ut(this,An,oa).call(this,{type:"failed",failureCount:x,error:N})},onPause:()=>{Ut(this,An,oa).call(this,{type:"pause"})},onContinue:()=>{Ut(this,An,oa).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const x=await q(this,$t).start();if(x===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(x),(m=(h=q(this,Kn).config).onSuccess)==null||m.call(h,x,this),(v=(j=q(this,Kn).config).onSettled)==null||v.call(j,x,this.state.error,this),x}catch(x){if(x instanceof qg){if(x.silent)return q(this,$t).promise;if(x.revert){if(this.state.data===void 0)throw x;return this.state.data}}throw Ut(this,An,oa).call(this,{type:"error",error:x}),(y=(p=q(this,Kn).config).onError)==null||y.call(p,x,this),(b=(g=q(this,Kn).config).onSettled)==null||b.call(g,this.state.data,x,this),x}finally{this.scheduleGc()}}},Il=new WeakMap,us=new WeakMap,Bl=new WeakMap,Kn=new WeakMap,fs=new WeakMap,$t=new WeakMap,rf=new WeakMap,ds=new WeakMap,An=new WeakSet,bT=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},oa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...j6(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...ZS(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return he(this,Bl,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),nn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),q(this,Kn).notify({query:this,type:"updated",action:t})})},BA);function j6(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:vT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ZS(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function JS(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var af,Dr,Wt,hs,Lr,Fa,UA,S6=(UA=class extends xT{constructor(t){super();Oe(this,Lr);Oe(this,af);Oe(this,Dr);Oe(this,Wt);Oe(this,hs);he(this,af,t.client),this.mutationId=t.mutationId,he(this,Wt,t.mutationCache),he(this,Dr,[]),this.state=t.state||w6(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){q(this,Dr).includes(t)||(q(this,Dr).push(t),this.clearGcTimeout(),q(this,Wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){he(this,Dr,q(this,Dr).filter(n=>n!==t)),this.scheduleGc(),q(this,Wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){q(this,Dr).length||(this.state.status==="pending"?this.scheduleGc():q(this,Wt).remove(this))}continue(){var t;return((t=q(this,hs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,o,c,u,f,d,h,m,j,v,p,y,g,b,x,N,w,O;const n=()=>{Ut(this,Lr,Fa).call(this,{type:"continue"})},r={client:q(this,af),meta:this.options.meta,mutationKey:this.options.mutationKey};he(this,hs,gT({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,E)=>{Ut(this,Lr,Fa).call(this,{type:"failed",failureCount:A,error:E})},onPause:()=>{Ut(this,Lr,Fa).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,Wt).canRun(this)}));const a=this.state.status==="pending",i=!q(this,hs).canStart();try{if(a)n();else{Ut(this,Lr,Fa).call(this,{type:"pending",variables:t,isPaused:i}),q(this,Wt).config.onMutate&&await q(this,Wt).config.onMutate(t,this,r);const E=await((o=(l=this.options).onMutate)==null?void 0:o.call(l,t,r));E!==this.state.context&&Ut(this,Lr,Fa).call(this,{type:"pending",context:E,variables:t,isPaused:i})}const A=await q(this,hs).start();return await((u=(c=q(this,Wt).config).onSuccess)==null?void 0:u.call(c,A,t,this.state.context,this,r)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,A,t,this.state.context,r)),await((m=(h=q(this,Wt).config).onSettled)==null?void 0:m.call(h,A,null,this.state.variables,this.state.context,this,r)),await((v=(j=this.options).onSettled)==null?void 0:v.call(j,A,null,t,this.state.context,r)),Ut(this,Lr,Fa).call(this,{type:"success",data:A}),A}catch(A){try{await((y=(p=q(this,Wt).config).onError)==null?void 0:y.call(p,A,t,this.state.context,this,r))}catch(E){Promise.reject(E)}try{await((b=(g=this.options).onError)==null?void 0:b.call(g,A,t,this.state.context,r))}catch(E){Promise.reject(E)}try{await((N=(x=q(this,Wt).config).onSettled)==null?void 0:N.call(x,void 0,A,this.state.variables,this.state.context,this,r))}catch(E){Promise.reject(E)}try{await((O=(w=this.options).onSettled)==null?void 0:O.call(w,void 0,A,t,this.state.context,r))}catch(E){Promise.reject(E)}throw Ut(this,Lr,Fa).call(this,{type:"error",error:A}),A}finally{q(this,Wt).runNext(this)}}},af=new WeakMap,Dr=new WeakMap,Wt=new WeakMap,hs=new WeakMap,Lr=new WeakSet,Fa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),nn.batch(()=>{q(this,Dr).forEach(r=>{r.onMutationUpdate(t)}),q(this,Wt).notify({mutation:this,type:"updated",action:t})})},UA);function w6(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var da,vr,sf,qA,N6=(qA=class extends om{constructor(t={}){super();Oe(this,da);Oe(this,vr);Oe(this,sf);this.config=t,he(this,da,new Set),he(this,vr,new Map),he(this,sf,0)}build(t,n,r){const a=new S6({client:t,mutationCache:this,mutationId:++Bf(this,sf)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){q(this,da).add(t);const n=id(t);if(typeof n=="string"){const r=q(this,vr).get(n);r?r.push(t):q(this,vr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(q(this,da).delete(t)){const n=id(t);if(typeof n=="string"){const r=q(this,vr).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&q(this,vr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=id(t);if(typeof n=="string"){const r=q(this,vr).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=id(t);if(typeof n=="string"){const a=(r=q(this,vr).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nn.batch(()=>{q(this,da).forEach(t=>{this.notify({type:"removed",mutation:t})}),q(this,da).clear(),q(this,vr).clear()})}getAll(){return Array.from(q(this,da))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>YS(n,r))}findAll(t={}){return this.getAll().filter(n=>YS(t,n))}notify(t){nn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return nn.batch(()=>Promise.all(t.map(n=>n.continue().catch(yr))))}},da=new WeakMap,vr=new WeakMap,sf=new WeakMap,qA);function id(e){var t;return(t=e.options.scope)==null?void 0:t.id}var zr,HA,O6=(HA=class extends om{constructor(t={}){super();Oe(this,zr);this.config=t,he(this,zr,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??Ub(a,n);let l=this.get(i);return l||(l=new b6({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){q(this,zr).has(t.queryHash)||(q(this,zr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=q(this,zr).get(t.queryHash);n&&(t.destroy(),n===t&&q(this,zr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){nn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return q(this,zr).get(t)}getAll(){return[...q(this,zr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>VS(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>VS(t,r)):n}notify(t){nn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){nn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){nn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},zr=new WeakMap,HA),pt,ri,ai,Ul,ql,ii,Hl,Fl,FA,A6=(FA=class{constructor(e={}){Oe(this,pt);Oe(this,ri);Oe(this,ai);Oe(this,Ul);Oe(this,ql);Oe(this,ii);Oe(this,Hl);Oe(this,Fl);he(this,pt,e.queryCache||new O6),he(this,ri,e.mutationCache||new N6),he(this,ai,e.defaultOptions||{}),he(this,Ul,new Map),he(this,ql,new Map),he(this,ii,0)}mount(){Bf(this,ii)._++,q(this,ii)===1&&(he(this,Hl,hT.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,pt).onFocus())})),he(this,Fl,Th.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,pt).onOnline())})))}unmount(){var e,t;Bf(this,ii)._--,q(this,ii)===0&&((e=q(this,Hl))==null||e.call(this),he(this,Hl,void 0),(t=q(this,Fl))==null||t.call(this),he(this,Fl,void 0))}isFetching(e){return q(this,pt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return q(this,ri).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=q(this,pt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=q(this,pt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Bg(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return q(this,pt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=q(this,pt).get(r.queryHash),i=a==null?void 0:a.state.data,l=r6(t,i);if(l!==void 0)return q(this,pt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return nn.batch(()=>q(this,pt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=q(this,pt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=q(this,pt);nn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=q(this,pt);return nn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=nn.batch(()=>q(this,pt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(yr).catch(yr)}invalidateQueries(e,t={}){return nn.batch(()=>(q(this,pt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=nn.batch(()=>q(this,pt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(yr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(yr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=q(this,pt).build(this,t);return n.isStaleByTime(Bg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yr).catch(yr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yr).catch(yr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Th.isOnline()?q(this,ri).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,pt)}getMutationCache(){return q(this,ri)}getDefaultOptions(){return q(this,ai)}setDefaultOptions(e){he(this,ai,e)}setQueryDefaults(e,t){q(this,Ul).set(xu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...q(this,Ul).values()],n={};return t.forEach(r=>{bu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){q(this,ql).set(xu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...q(this,ql).values()],n={};return t.forEach(r=>{bu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...q(this,ai).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ub(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===qb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...q(this,ai).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){q(this,pt).clear(),q(this,ri).clear()}},pt=new WeakMap,ri=new WeakMap,ai=new WeakMap,Ul=new WeakMap,ql=new WeakMap,ii=new WeakMap,Hl=new WeakMap,Fl=new WeakMap,FA),C6=S.createContext(void 0),E6=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(C6.Provider,{value:e,children:t}));/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jT=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var T6={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const k6=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:l,...o},c)=>S.createElement("svg",{ref:c,...T6,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:jT("lucide",a),...o},[...l.map(([u,f])=>S.createElement(u,f)),...Array.isArray(i)?i:[i]]));/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ee=(e,t)=>{const n=S.forwardRef(({className:r,...a},i)=>S.createElement(k6,{ref:i,iconNode:t,className:jT(`lucide-${_6(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gl=ee("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const M6=ee("AlarmClock",[["circle",{cx:"12",cy:"13",r:"8",key:"3y4lt7"}],["path",{d:"M12 9v4l2 2",key:"1c63tq"}],["path",{d:"M5 3 2 6",key:"18tl5t"}],["path",{d:"m22 6-3-3",key:"1opdir"}],["path",{d:"M6.38 18.7 4 21",key:"17xu3x"}],["path",{d:"M17.64 18.67 20 21",key:"kv2oe2"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const P6=ee("ArrowLeftRight",[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $6=ee("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ST=ee("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wT=ee("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const NT=ee("Barcode",[["path",{d:"M3 5v14",key:"1nt18q"}],["path",{d:"M8 5v14",key:"1ybrkv"}],["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"M17 5v14",key:"ycjyhj"}],["path",{d:"M21 5v14",key:"nzette"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sf=ee("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const OT=ee("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const R6=ee("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D6=ee("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const AT=ee("CalendarRange",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CT=ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ET=ee("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wf=ee("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const L6=ee("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kh=ee("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _T=ee("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const no=ee("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const z6=ee("ClipboardPen",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",key:"1oijnt"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-5.5",key:"cereej"}],["path",{d:"M4 13.5V6a2 2 0 0 1 2-2h2",key:"5ua5vh"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ew=ee("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hb=ee("Columns3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const I6=ee("Contact",[["path",{d:"M17 18a2 2 0 0 0-2-2H9a2 2 0 0 0-2 2",key:"1mghuy"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["circle",{cx:"12",cy:"10",r:"2",key:"1yojzk"}],["line",{x1:"8",x2:"8",y1:"2",y2:"4",key:"1ff9gb"}],["line",{x1:"16",x2:"16",y1:"2",y2:"4",key:"1ufoma"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B6=ee("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yr=ee("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const U6=ee("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q6=ee("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const H6=ee("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TT=ee("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xs=ee("Factory",[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kT=ee("FileBadge",[["path",{d:"M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"12ixgl"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M5 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",key:"u0c8gj"}],["path",{d:"M7 16.5 8 22l-3-1-3 1 1-5.5",key:"5gm2nr"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tw=ee("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ro=ee("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const MT=ee("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const F6=ee("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fb=ee("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const G6=ee("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gb=ee("LineChart",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PT=ee("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const K6=ee("ListTodo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $T=ee("ListTree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const V6=ee("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Y6=ee("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const W6=ee("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nw=ee("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q6=ee("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const X6=ee("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RT=ee("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Z6=ee("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rw=ee("PackageCheck",[["path",{d:"m16 16 2 2 4-4",key:"gfu2re"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aw=ee("PackageOpen",[["path",{d:"M12 22v-9",key:"x3hkom"}],["path",{d:"M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",key:"2ntwy6"}],["path",{d:"M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",key:"1pmm1c"}],["path",{d:"M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",key:"12ttoo"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const DT=ee("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LT=ee("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zT=ee("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J6=ee("PieChart",[["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}],["path",{d:"M22 12A10 10 0 0 0 12 2v10z",key:"1rfc4y"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hg=ee("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const eL=ee("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ot=ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IT=ee("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tL=ee("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nL=ee("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kb=ee("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BT=ee("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const UT=ee("Ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cm=ee("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bs=ee("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qT=ee("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vo=ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iw=ee("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HT=ee("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rL=ee("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yo=ee("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aL=ee("ShieldHalf",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 22V2",key:"zs6s6o"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fg=ee("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zn=ee("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iL=ee("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FT=ee("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GT=ee("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sr=ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ao=ee("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lr=ee("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const um=ee("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sL=ee("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lL=ee("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KT=ee("Warehouse",[["path",{d:"M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z",key:"gksnxg"}],["path",{d:"M6 18h12",key:"9pbo8z"}],["path",{d:"M6 14h12",key:"4cwo0f"}],["rect",{width:"12",height:"12",x:"6",y:"10",key:"apd30q"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nf=ee("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
 * @license lucide-react v0.400.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const VT=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sw={SUPERADMIN:4,MANAGER:3,WORKER:2,VIEWER:1},lw=["SUPERADMIN","MANAGER","WORKER","VIEWER"];function _i(){return(localStorage.getItem("mes_role")||"VIEWER").toUpperCase()}function _s(e,t=_i()){return(sw[t]||0)>=(sw[e.toUpperCase()]||99)}const Zt=(e=_i())=>_s("WORKER",e),fr=(e=_i())=>_s("MANAGER",e),oL=(e=_i())=>_s("SUPERADMIN",e),YT=S.createContext({theme:"dark",toggle:()=>{},setTheme:()=>{}}),ow="mes_theme";function cL(e){document.documentElement.setAttribute("data-theme",e)}function uL({children:e}){const[t,n]=S.useState(()=>localStorage.getItem(ow)==="light"?"light":"dark");S.useEffect(()=>{cL(t),localStorage.setItem(ow,t)},[t]);const r=i=>n(i),a=()=>n(i=>i==="dark"?"light":"dark");return s.jsx(YT.Provider,{value:{theme:t,toggle:a,setTheme:r},children:e})}function fL(){return S.useContext(YT)}function dL(){const{theme:e,toggle:t}=fL();return s.jsxs("button",{onClick:t,title:"테마 전환",style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",background:"none",border:"1px solid var(--uiws-border, #2d3448)",borderRadius:8,color:"var(--uiws-text-muted, #8892b0)",cursor:"pointer",fontSize:13,width:"100%"},children:[e==="dark"?s.jsx(iL,{size:16}):s.jsx(X6,{size:16}),e==="dark"?"라이트 모드":"다크 모드"]})}const hL=[{to:"/dashboard",label:"대시보드",icon:G6}],pL=[{to:"/jobs",label:"작업관리 ★",icon:Nf},{to:"/progress",label:"진행관리 ★",icon:gl},{to:"/workorders",label:"작업지시",icon:no},{to:"/production",label:"생산실적",icon:xs},{to:"/process-board",label:"공정진행",icon:Hb},{to:"/oee",label:"설비 / OEE",icon:ro},{to:"/tracking",label:"LOT 추적",icon:RT},{to:"/plans",label:"생산계획",icon:AT}],mL=[{to:"/receiving",label:"입고",icon:DT},{to:"/shipping",label:"출하관리 ★",icon:um},{to:"/inventory",label:"재고",icon:Sf},{to:"/stocktake",label:"재고실사",icon:_T},{to:"/lotserial",label:"LOT / 시리얼",icon:NT}],yL=[{to:"/inspection",label:"검사",icon:bs},{to:"/spec",label:"검사기준",icon:UT},{to:"/ncr",label:"부적합 NCR",icon:lr},{to:"/capa",label:"시정조치 CAPA",icon:PT},{to:"/spc",label:"SPC 관리도",icon:Gb},{to:"/certificate",label:"성적서",icon:kT}],vL=[{to:"/items",label:"품목",icon:LT},{to:"/bom",label:"BOM",icon:$T},{to:"/routing",label:"라우팅",icon:BT},{to:"/partners",label:"거래처",icon:OT,min:"MANAGER"},{to:"/warehouses",label:"창고/로케이션",icon:KT}],gL=[{to:"/analytics",label:"분석 / KPI",icon:wT},{to:"/ai-tools",label:"WISE AI",icon:zn},{to:"/ai-techniques",label:"AI 기법 설정",icon:Yr,min:"MANAGER"}],xL=[{to:"/uiws/worklog",label:"업무일지",icon:Z6},{to:"/uiws/schedule",label:"일정",icon:D6},{to:"/uiws/message",label:"쪽지",icon:W6},{to:"/uiws/stats",label:"업무통계",icon:J6}],bL=[{to:"/uiws/system/roles",label:"권한 관리",icon:Fb,min:"SUPERADMIN"},{to:"/uiws/system/role-menus",label:"역할-메뉴 권한",icon:aL,min:"SUPERADMIN"},{to:"/uiws/system/codes",label:"공통코드",icon:K6,min:"SUPERADMIN"},{to:"/uiws/system/menus",label:"메뉴 관리",icon:Q6,min:"SUPERADMIN"},{to:"/uiws/system/depts",label:"부서 관리",icon:lL,min:"SUPERADMIN"},{to:"/uiws/system/companies",label:"거래처 관리",icon:I6,min:"SUPERADMIN"}],jL=[{to:"/admin/users",label:"사용자/권한",icon:Yo,min:"SUPERADMIN"},{to:"/admin/ai-platform",label:"AI 플랫폼 설정",icon:Yr,min:"SUPERADMIN"},{to:"/admin/audit",label:"감사 로그",icon:qT,min:"MANAGER"},{to:"/admin/settings",label:"시스템 설정",icon:HT,min:"MANAGER"}],SL=[{to:"/admin/mobile-app",label:"모바일 앱 설치",icon:Fg}],wL=({isActive:e})=>`flex items-center gap-3 px-5 py-1.5 text-sm transition-colors ${e?"bg-card text-brand border-r-2 border-brand":"text-slate-300 hover:bg-card/60"}`;function $r({title:e,links:t,role:n}){const r=t.filter(a=>_s(a.min||"VIEWER",n));return r.length?s.jsxs(s.Fragment,{children:[e&&s.jsx("div",{className:"px-5 pt-3 pb-1 text-[10px] font-semibold tracking-wider text-slate-500 uppercase",children:e}),r.map(({to:a,label:i,icon:l})=>s.jsxs(fT,{to:a,className:wL,children:[s.jsx(l,{size:16}),i]},a))]}):null}function NL(){const[e,t]=S.useState(_i);S.useEffect(()=>{const a=()=>{const l=_i();t(o=>o===l?o:l)},i=window.setInterval(a,800);return window.addEventListener("storage",a),()=>{window.clearInterval(i),window.removeEventListener("storage",a)}},[]);const n=bL.filter(a=>_s(a.min||"VIEWER",e)),r=jL.filter(a=>_s(a.min||"VIEWER",e));return s.jsxs("aside",{className:"w-60 bg-panel border-r border-edge flex flex-col",children:[s.jsxs("div",{className:"h-16 flex items-center gap-2 px-5 border-b border-edge",children:[s.jsx(Yr,{className:"text-brand",size:24}),s.jsxs("div",{children:[s.jsx("div",{className:"font-bold text-base leading-tight",children:"GUARDiA MES"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"AI 제조실행시스템"})]})]}),s.jsxs("nav",{className:"flex-1 py-2 overflow-auto",children:[s.jsx($r,{links:hL,role:e}),s.jsx($r,{title:"MES 제조실행",links:pL,role:e}),s.jsx($r,{title:"WMS 창고관리",links:mL,role:e}),s.jsx($r,{title:"QMS 품질관리",links:yL,role:e}),s.jsx($r,{title:"기준정보",links:vL,role:e}),s.jsx($r,{title:"공통",links:gL,role:e}),s.jsx($r,{title:"업무 (UIWS)",links:xL,role:e}),s.jsx("div",{className:"border-t border-edge mt-3",children:s.jsx($r,{title:"모바일",links:SL,role:e})}),n.length>0&&s.jsx("div",{className:"border-t border-edge mt-3",children:s.jsx($r,{title:"시스템관리(권한)",links:n,role:e})}),r.length>0&&s.jsx("div",{className:"border-t border-edge mt-3",children:s.jsx($r,{title:"관리자",links:r,role:e})})]}),s.jsx("div",{className:"p-3 border-t border-edge",children:s.jsx(dL,{})}),s.jsx("div",{className:"px-4 pb-4 text-[11px] text-slate-500",children:"Ollama 온프레미스 · WMS·MES·QMS 통합"})]})}function WT(e,t){return function(){return e.apply(t,arguments)}}const{toString:OL}=Object.prototype,{getPrototypeOf:fm}=Object,{iterator:dm,toStringTag:QT}=Symbol,hm=(e=>t=>{const n=OL.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kr=e=>(e=e.toLowerCase(),t=>hm(t)===e),pm=e=>t=>typeof t===e,{isArray:Ts}=Array,io=pm("undefined");function Wo(e){return e!==null&&!io(e)&&e.constructor!==null&&!io(e.constructor)&&gn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const XT=kr("ArrayBuffer");function AL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&XT(e.buffer),t}const CL=pm("string"),gn=pm("function"),ZT=pm("number"),Of=e=>e!==null&&typeof e=="object",EL=e=>e===!0||e===!1,Vd=e=>{if(hm(e)!=="object")return!1;const t=fm(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(QT in e)&&!(dm in e)},_L=e=>{if(!Of(e)||Wo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},TL=kr("Date"),kL=kr("File"),ML=e=>!!(e&&typeof e.uri<"u"),PL=e=>e&&typeof e.getParts<"u",$L=kr("Blob"),RL=kr("FileList"),DL=e=>Of(e)&&gn(e.pipe);function LL(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const cw=LL(),uw=typeof cw.FormData<"u"?cw.FormData:void 0,zL=e=>{if(!e)return!1;if(uw&&e instanceof uw)return!0;const t=fm(e);if(!t||t===Object.prototype||!gn(e.append))return!1;const n=hm(e);return n==="formdata"||n==="object"&&gn(e.toString)&&e.toString()==="[object FormData]"},IL=kr("URLSearchParams"),[BL,UL,qL,HL]=["ReadableStream","Request","Response","Headers"].map(kr),FL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Af(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Ts(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Wo(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),l=i.length;let o;for(r=0;r<l;r++)o=i[r],t.call(null,e[o],o,e)}}function JT(e,t){if(Wo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const ns=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ek=e=>!io(e)&&e!==ns;function Gg(...e){const{caseless:t,skipUndefined:n}=ek(this)&&this||{},r={},a=(i,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;const o=t&&typeof l=="string"&&JT(r,l)||l,c=Kg(r,o)?r[o]:void 0;Vd(c)&&Vd(i)?r[o]=Gg(c,i):Vd(i)?r[o]=Gg({},i):Ts(i)?r[o]=i.slice():(!n||!io(i))&&(r[o]=i)};for(let i=0,l=e.length;i<l;i++){const o=e[i];if(!o||Wo(o)||(Af(o,a),typeof o!="object"||Ts(o)))continue;const c=Object.getOwnPropertySymbols(o);for(let u=0;u<c.length;u++){const f=c[u];nz.call(o,f)&&a(o[f],f)}}return r}const GL=(e,t,n,{allOwnKeys:r}={})=>(Af(t,(a,i)=>{n&&gn(a)?Object.defineProperty(e,i,{__proto__:null,value:WT(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),KL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),VL=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},YL=(e,t,n,r)=>{let a,i,l;const o={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)l=a[i],(!r||r(l,e,t))&&!o[l]&&(t[l]=e[l],o[l]=!0);e=n!==!1&&fm(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},WL=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},QL=e=>{if(!e)return null;if(Ts(e))return e;let t=e.length;if(!ZT(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},XL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&fm(Uint8Array)),ZL=(e,t)=>{const r=(e&&e[dm]).call(e);let a;for(;(a=r.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},JL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ez=kr("HTMLFormElement"),tz=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),Kg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),{propertyIsEnumerable:nz}=Object.prototype,rz=kr("RegExp"),tk=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Af(n,(a,i)=>{let l;(l=t(a,i,e))!==!1&&(r[i]=l||a)}),Object.defineProperties(e,r)},az=e=>{tk(e,(t,n)=>{if(gn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(gn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},iz=(e,t)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return Ts(e)?r(e):r(String(e).split(t)),n},sz=()=>{},lz=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function oz(e){return!!(e&&gn(e.append)&&e[QT]==="FormData"&&e[dm])}const cz=e=>{const t=new WeakSet,n=r=>{if(Of(r)){if(t.has(r))return;if(Wo(r))return r;if(!("toJSON"in r)){t.add(r);const a=Ts(r)?[]:{};return Af(r,(i,l)=>{const o=n(i);!io(o)&&(a[l]=o)}),t.delete(r),a}}return r};return n(e)},uz=kr("AsyncFunction"),fz=e=>e&&(Of(e)||gn(e))&&gn(e.then)&&gn(e.catch),nk=((e,t)=>e?setImmediate:t?((n,r)=>(ns.addEventListener("message",({source:a,data:i})=>{a===ns&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),ns.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",gn(ns.postMessage)),dz=typeof queueMicrotask<"u"?queueMicrotask.bind(ns):typeof process<"u"&&process.nextTick||nk,hz=e=>e!=null&&gn(e[dm]),D={isArray:Ts,isArrayBuffer:XT,isBuffer:Wo,isFormData:zL,isArrayBufferView:AL,isString:CL,isNumber:ZT,isBoolean:EL,isObject:Of,isPlainObject:Vd,isEmptyObject:_L,isReadableStream:BL,isRequest:UL,isResponse:qL,isHeaders:HL,isUndefined:io,isDate:TL,isFile:kL,isReactNativeBlob:ML,isReactNative:PL,isBlob:$L,isRegExp:rz,isFunction:gn,isStream:DL,isURLSearchParams:IL,isTypedArray:XL,isFileList:RL,forEach:Af,merge:Gg,extend:GL,trim:FL,stripBOM:KL,inherits:VL,toFlatObject:YL,kindOf:hm,kindOfTest:kr,endsWith:WL,toArray:QL,forEachEntry:ZL,matchAll:JL,isHTMLForm:ez,hasOwnProperty:Kg,hasOwnProp:Kg,reduceDescriptors:tk,freezeMethods:az,toObjectSet:iz,toCamelCase:tz,noop:sz,toFiniteNumber:lz,findKey:JT,global:ns,isContextDefined:ek,isSpecCompliantForm:oz,toJSONObject:cz,isAsyncFn:uz,isThenable:fz,setImmediate:nk,asap:dz,isIterable:hz},pz=D.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"]),mz=e=>{const t={};let n,r,a;return e&&e.split(`
`).forEach(function(l){a=l.indexOf(":"),n=l.substring(0,a).trim().toLowerCase(),r=l.substring(a+1).trim(),!(!n||t[n]&&pz[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function yz(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const vz=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),gz=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Vb(e,t){return D.isArray(e)?e.map(n=>Vb(n,t)):yz(String(e).replace(t,""))}const xz=e=>Vb(e,vz),bz=e=>Vb(e,gz);function rk(e){const t=Object.create(null);return D.forEach(e.toJSON(),(n,r)=>{t[r]=bz(n)}),t}const fw=Symbol("internals");function gc(e){return e&&String(e).trim().toLowerCase()}function Yd(e){return e===!1||e==null?e:D.isArray(e)?e.map(Yd):xz(String(e))}function jz(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Sz=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ev(e,t,n,r,a){if(D.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!D.isString(t)){if(D.isString(r))return t.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(t)}}function wz(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Nz(e,t){const n=D.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(a,i,l){return this[r].call(this,t,a,i,l)},configurable:!0})})}let on=class{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function i(o,c,u){const f=gc(c);if(!f)return;const d=D.findKey(a,f);(!d||a[d]===void 0||u===!0||u===void 0&&a[d]!==!1)&&(a[d||c]=Yd(o))}const l=(o,c)=>D.forEach(o,(u,f)=>i(u,f,c));if(D.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(D.isString(t)&&(t=t.trim())&&!Sz(t))l(mz(t),n);else if(D.isObject(t)&&D.isIterable(t)){let o={},c,u;for(const f of t){if(!D.isArray(f))throw new TypeError("Object iterator must return a key-value pair");o[u=f[0]]=(c=o[u])?D.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}l(o,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=gc(t),t){const r=D.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return jz(a);if(D.isFunction(n))return n.call(this,a,r);if(D.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=gc(t),t){const r=D.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ev(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function i(l){if(l=gc(l),l){const o=D.findKey(r,l);o&&(!n||ev(r,r[o],o,n))&&(delete r[o],a=!0)}}return D.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!t||ev(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,r={};return D.forEach(this,(a,i)=>{const l=D.findKey(r,i);if(l){n[l]=Yd(a),delete n[i];return}const o=t?wz(i):String(i).trim();o!==i&&delete n[i],n[o]=Yd(a),r[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return D.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&D.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[fw]=this[fw]={accessors:{}}).accessors,a=this.prototype;function i(l){const o=gc(l);r[o]||(Nz(a,l),r[o]=!0)}return D.isArray(t)?t.forEach(i):i(t),this}};on.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(on.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});D.freezeMethods(on);const Oz="[REDACTED ****]";function Az(e){if(D.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(D.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Cz(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],a=i=>{if(i===null||typeof i!="object"||D.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof on&&(i=i.toJSON()),r.push(i);let l;if(D.isArray(i))l=[],i.forEach((o,c)=>{const u=a(o);D.isUndefined(u)||(l[c]=u)});else{if(!D.isPlainObject(i)&&Az(i))return r.pop(),i;l=Object.create(null);for(const[o,c]of Object.entries(i)){const u=n.has(o.toLowerCase())?Oz:a(c);D.isUndefined(u)||(l[o]=u)}}return r.pop(),l};return a(e)}let re=class ak extends Error{static from(t,n,r,a,i,l){const o=new ak(t.message,n||t.code,r,a,i);return o.cause=t,o.name=t.name,t.status!=null&&o.status==null&&(o.status=t.status),l&&Object.assign(o,l),o}constructor(t,n,r,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&D.hasOwnProp(t,"redact")?t.redact:void 0,r=D.isArray(n)&&n.length>0?Cz(t,n):D.toJSONObject(t);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:r,code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";re.ERR_BAD_OPTION="ERR_BAD_OPTION";re.ECONNABORTED="ECONNABORTED";re.ETIMEDOUT="ETIMEDOUT";re.ECONNREFUSED="ECONNREFUSED";re.ERR_NETWORK="ERR_NETWORK";re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";re.ERR_DEPRECATED="ERR_DEPRECATED";re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";re.ERR_BAD_REQUEST="ERR_BAD_REQUEST";re.ERR_CANCELED="ERR_CANCELED";re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";re.ERR_INVALID_URL="ERR_INVALID_URL";re.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Ez=null;function Vg(e){return D.isPlainObject(e)||D.isArray(e)}function ik(e){return D.endsWith(e,"[]")?e.slice(0,-2):e}function tv(e,t,n){return e?e.concat(t).map(function(a,i){return a=ik(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function _z(e){return D.isArray(e)&&!e.some(Vg)}const Tz=D.toFlatObject(D,{},null,function(t){return/^is[A-Z]/.test(t)});function mm(e,t,n){if(!D.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,y){return!D.isUndefined(y[p])});const r=n.metaTokens,a=n.visitor||d,i=n.dots,l=n.indexes,o=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,u=o&&D.isSpecCompliantForm(t);if(!D.isFunction(a))throw new TypeError("visitor must be a function");function f(v){if(v===null)return"";if(D.isDate(v))return v.toISOString();if(D.isBoolean(v))return v.toString();if(!u&&D.isBlob(v))throw new re("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(v)||D.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function d(v,p,y){let g=v;if(D.isReactNative(t)&&D.isReactNativeBlob(v))return t.append(tv(y,p,i),f(v)),!1;if(v&&!y&&typeof v=="object"){if(D.endsWith(p,"{}"))p=r?p:p.slice(0,-2),v=JSON.stringify(v);else if(D.isArray(v)&&_z(v)||(D.isFileList(v)||D.endsWith(p,"[]"))&&(g=D.toArray(v)))return p=ik(p),g.forEach(function(x,N){!(D.isUndefined(x)||x===null)&&t.append(l===!0?tv([p],N,i):l===null?p:p+"[]",f(x))}),!1}return Vg(v)?!0:(t.append(tv(y,p,i),f(v)),!1)}const h=[],m=Object.assign(Tz,{defaultVisitor:d,convertValue:f,isVisitable:Vg});function j(v,p,y=0){if(!D.isUndefined(v)){if(y>c)throw new re("Object is too deeply nested ("+y+" levels). Max depth: "+c,re.ERR_FORM_DATA_DEPTH_EXCEEDED);if(h.indexOf(v)!==-1)throw new Error("Circular reference detected in "+p.join("."));h.push(v),D.forEach(v,function(b,x){(!(D.isUndefined(b)||b===null)&&a.call(t,b,D.isString(x)?x.trim():x,p,m))===!0&&j(b,p?p.concat(x):[x],y+1)}),h.pop()}}if(!D.isObject(e))throw new TypeError("data must be an object");return j(e),t}function dw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Yb(e,t){this._pairs=[],e&&mm(e,this,t)}const sk=Yb.prototype;sk.append=function(t,n){this._pairs.push([t,n])};sk.toString=function(t){const n=t?function(r){return t.call(this,r,dw)}:dw;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function kz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function lk(e,t,n){if(!t)return e;const r=n&&n.encode||kz,a=D.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let l;if(i?l=i(t,a):l=D.isURLSearchParams(t)?t.toString():new Yb(t,a).toString(r),l){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class hw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){D.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Wb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1},Mz=typeof URLSearchParams<"u"?URLSearchParams:Yb,Pz=typeof FormData<"u"?FormData:null,$z=typeof Blob<"u"?Blob:null,Rz={isBrowser:!0,classes:{URLSearchParams:Mz,FormData:Pz,Blob:$z},protocols:["http","https","file","blob","url","data"]},Qb=typeof window<"u"&&typeof document<"u",Yg=typeof navigator=="object"&&navigator||void 0,Dz=Qb&&(!Yg||["ReactNative","NativeScript","NS"].indexOf(Yg.product)<0),Lz=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",zz=Qb&&window.location.href||"http://localhost",Iz=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Qb,hasStandardBrowserEnv:Dz,hasStandardBrowserWebWorkerEnv:Lz,navigator:Yg,origin:zz},Symbol.toStringTag,{value:"Module"})),Kt={...Iz,...Rz};function Bz(e,t){return mm(e,new Kt.classes.URLSearchParams,{visitor:function(n,r,a,i){return Kt.isNode&&D.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function Uz(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function qz(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r<a;r++)i=n[r],t[i]=e[i];return t}function ok(e){function t(n,r,a,i){let l=n[i++];if(l==="__proto__")return!0;const o=Number.isFinite(+l),c=i>=n.length;return l=!l&&D.isArray(a)?a.length:l,c?(D.hasOwnProp(a,l)?a[l]=D.isArray(a[l])?a[l].concat(r):[a[l],r]:a[l]=r,!o):((!D.hasOwnProp(a,l)||!D.isObject(a[l]))&&(a[l]=[]),t(n,r,a[l],i)&&D.isArray(a[l])&&(a[l]=qz(a[l])),!o)}if(D.isFormData(e)&&D.isFunction(e.entries)){const n={};return D.forEachEntry(e,(r,a)=>{t(Uz(r),a,n,0)}),n}return null}const Xs=(e,t)=>e!=null&&D.hasOwnProp(e,t)?e[t]:void 0;function Hz(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Cf={transitional:Wb,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=D.isObject(t);if(i&&D.isHTMLForm(t)&&(t=new FormData(t)),D.isFormData(t))return a?JSON.stringify(ok(t)):t;if(D.isArrayBuffer(t)||D.isBuffer(t)||D.isStream(t)||D.isFile(t)||D.isBlob(t)||D.isReadableStream(t))return t;if(D.isArrayBufferView(t))return t.buffer;if(D.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){const c=Xs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Bz(t,c).toString();if((o=D.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=Xs(this,"env"),f=u&&u.FormData;return mm(o?{"files[]":t}:t,f&&new f,c)}}return i||a?(n.setContentType("application/json",!1),Hz(t)):t}],transformResponse:[function(t){const n=Xs(this,"transitional")||Cf.transitional,r=n&&n.forcedJSONParsing,a=Xs(this,"responseType"),i=a==="json";if(D.isResponse(t)||D.isReadableStream(t))return t;if(t&&D.isString(t)&&(r&&!a||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Xs(this,"parseReviver"))}catch(c){if(o)throw c.name==="SyntaxError"?re.from(c,re.ERR_BAD_RESPONSE,this,null,Xs(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kt.classes.FormData,Blob:Kt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch","query"],e=>{Cf.headers[e]={}});function nv(e,t){const n=this||Cf,r=t||n,a=on.from(r.headers);let i=r.data;return D.forEach(e,function(o){i=o.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function ck(e){return!!(e&&e.__CANCEL__)}let Ef=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function uk(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,n.status>=400&&n.status<500?re.ERR_BAD_REQUEST:re.ERR_BAD_RESPONSE,n.config,n.request,n))}function Fz(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function Gz(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,i=0,l;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[i];l||(l=u),n[a]=c,r[a]=u;let d=i,h=0;for(;d!==a;)h+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-l<t)return;const m=f&&u-f;return m?Math.round(h*1e3/m):void 0}}function Kz(e,t){let n=0,r=1e3/t,a,i;const l=(u,f=Date.now())=>{n=f,a=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const f=Date.now(),d=f-n;d>=r?l(u,f):(a=u,i||(i=setTimeout(()=>{i=null,l(a)},r-d)))},()=>a&&l(a)]}const Mh=(e,t,n=3)=>{let r=0;const a=Gz(50,250);return Kz(i=>{if(!i||typeof i.loaded!="number")return;const l=i.loaded,o=i.lengthComputable?i.total:void 0,c=o!=null?Math.min(l,o):l,u=Math.max(0,c-r),f=a(u);r=Math.max(r,c);const d={loaded:c,total:o,progress:o?c/o:void 0,bytes:u,rate:f||void 0,estimated:f&&o?(o-c)/f:void 0,event:i,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(d)},n)},pw=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},mw=e=>(...t)=>D.asap(()=>e(...t)),Vz=Kt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Kt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Kt.origin),Kt.navigator&&/(msie|trident)/i.test(Kt.navigator.userAgent)):()=>!0,Yz=Kt.hasStandardBrowserEnv?{write(e,t,n,r,a,i,l){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];D.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),D.isString(r)&&o.push(`path=${r}`),D.isString(a)&&o.push(`domain=${a}`),i===!0&&o.push("secure"),D.isString(l)&&o.push(`SameSite=${l}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),a=r.indexOf("=");if(a!==-1&&r.slice(0,a)===e)return decodeURIComponent(r.slice(a+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Wz(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Qz(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function fk(e,t,n){let r=!Wz(t);return e&&(r||n===!1)?Qz(e,t):t}const yw=e=>e instanceof on?{...e}:e;function ks(e,t){t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(u,f,d,h){return D.isPlainObject(u)&&D.isPlainObject(f)?D.merge.call({caseless:h},u,f):D.isPlainObject(f)?D.merge({},f):D.isArray(f)?f.slice():f}function a(u,f,d,h){if(D.isUndefined(f)){if(!D.isUndefined(u))return r(void 0,u,d,h)}else return r(u,f,d,h)}function i(u,f){if(!D.isUndefined(f))return r(void 0,f)}function l(u,f){if(D.isUndefined(f)){if(!D.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function o(u,f,d){if(D.hasOwnProp(t,d))return r(u,f);if(D.hasOwnProp(e,d))return r(void 0,u)}const c={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,allowedSocketPaths:l,responseEncoding:l,validateStatus:o,headers:(u,f,d)=>a(yw(u),yw(f),d,!0)};return D.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=D.hasOwnProp(c,f)?c[f]:a,h=D.hasOwnProp(e,f)?e[f]:void 0,m=D.hasOwnProp(t,f)?t[f]:void 0,j=d(h,m,f);D.isUndefined(j)&&d!==o||(n[f]=j)}),n}const Xz=["content-type","content-length"];function Zz(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t).forEach(([r,a])=>{Xz.includes(r.toLowerCase())&&e.set(r,a)})}const Jz=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function dk(e){const t=ks({},e),n=h=>D.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),l=n("xsrfCookieName");let o=n("headers");const c=n("auth"),u=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=o=on.from(o),t.url=lk(fk(u,d,f),n("params"),n("paramsSerializer")),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?Jz(c.password):""))),D.isFormData(r)&&(Kt.hasStandardBrowserEnv||Kt.hasStandardBrowserWebWorkerEnv||D.isReactNative(r)?o.setContentType(void 0):D.isFunction(r.getHeaders)&&Zz(o,r.getHeaders(),n("formDataHeaderPolicy"))),Kt.hasStandardBrowserEnv&&(D.isFunction(a)&&(a=a(t)),a===!0||a==null&&Vz(t.url))){const m=i&&l&&Yz.read(l);m&&o.set(i,m)}return t}const eI=typeof XMLHttpRequest<"u",tI=eI&&function(e){return new Promise(function(n,r){const a=dk(e);let i=a.data;const l=on.from(a.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:u}=a,f,d,h,m,j;function v(){m&&m(),j&&j(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let p=new XMLHttpRequest;p.open(a.method.toUpperCase(),a.url,!0),p.timeout=a.timeout;function y(){if(!p)return;const b=on.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),N={data:!o||o==="text"||o==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:b,config:e,request:p};uk(function(O){n(O),v()},function(O){r(O),v()},N),p=null}"onloadend"in p?p.onloadend=y:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.startsWith("file:"))||setTimeout(y)},p.onabort=function(){p&&(r(new re("Request aborted",re.ECONNABORTED,e,p)),v(),p=null)},p.onerror=function(x){const N=x&&x.message?x.message:"Network Error",w=new re(N,re.ERR_NETWORK,e,p);w.event=x||null,r(w),v(),p=null},p.ontimeout=function(){let x=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const N=a.transitional||Wb;a.timeoutErrorMessage&&(x=a.timeoutErrorMessage),r(new re(x,N.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,p)),v(),p=null},i===void 0&&l.setContentType(null),"setRequestHeader"in p&&D.forEach(rk(l),function(x,N){p.setRequestHeader(N,x)}),D.isUndefined(a.withCredentials)||(p.withCredentials=!!a.withCredentials),o&&o!=="json"&&(p.responseType=a.responseType),u&&([h,j]=Mh(u,!0),p.addEventListener("progress",h)),c&&p.upload&&([d,m]=Mh(c),p.upload.addEventListener("progress",d),p.upload.addEventListener("loadend",m)),(a.cancelToken||a.signal)&&(f=b=>{p&&(r(!b||b.type?new Ef(null,e,p):b),p.abort(),v(),p=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const g=Fz(a.url);if(g&&!Kt.protocols.includes(g)){r(new re("Unsupported protocol "+g+":",re.ERR_BAD_REQUEST,e));return}p.send(i||null)})},nI=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const a=function(c){if(!r){r=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof re?u:new Ef(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:o}=n;return o.unsubscribe=()=>D.asap(l),o},rI=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},aI=async function*(e,t){for await(const n of iI(e))yield*rI(n,t)},iI=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},vw=(e,t,n,r)=>{const a=aI(e,t);let i=0,l,o=c=>{l||(l=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await a.next();if(u){o(),c.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}c.enqueue(new Uint8Array(f))}catch(u){throw o(u),u}},cancel(c){return o(c),a.return()}},{highWaterMark:2})};function sI(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let l=r.length;const o=r.length;for(let m=0;m<o;m++)if(r.charCodeAt(m)===37&&m+2<o){const j=r.charCodeAt(m+1),v=r.charCodeAt(m+2);(j>=48&&j<=57||j>=65&&j<=70||j>=97&&j<=102)&&(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102)&&(l-=2,m+=2)}let c=0,u=o-1;const f=m=>m>=2&&r.charCodeAt(m-2)===37&&r.charCodeAt(m-1)===51&&(r.charCodeAt(m)===68||r.charCodeAt(m)===100);u>=0&&(r.charCodeAt(u)===61?(c++,u--):f(u)&&(c++,u-=3)),c===1&&u>=0&&(r.charCodeAt(u)===61||f(u))&&c++;const h=Math.floor(l/4)*3-(c||0);return h>0?h:0}if(typeof Buffer<"u"&&typeof Buffer.byteLength=="function")return Buffer.byteLength(r,"utf8");let i=0;for(let l=0,o=r.length;l<o;l++){const c=r.charCodeAt(l);if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&l+1<o){const u=r.charCodeAt(l+1);u>=56320&&u<=57343?(i+=4,l++):i+=3}else i+=3}return i}const Xb="1.17.0",gw=64*1024,{isFunction:sd}=D,lI=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),xw=e=>{if(!D.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},bw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},oI=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},cI=e=>{const t=D.global!==void 0&&D.global!==null?D.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=D.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:l}=e,o=a?sd(a):typeof fetch=="function",c=sd(i),u=sd(l);if(!o)return!1;const f=o&&sd(n),d=o&&(typeof r=="function"?(y=>g=>y.encode(g))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=c&&f&&bw(()=>{let y=!1;const g=new i(Kt.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),b=g.headers.has("Content-Type");return g.body!=null&&g.body.cancel(),y&&!b}),m=u&&f&&bw(()=>D.isReadableStream(new l("").body)),j={stream:m&&(y=>y.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!j[y]&&(j[y]=(g,b)=>{let x=g&&g[y];if(x)return x.call(g);throw new re(`Response type '${y}' is not supported`,re.ERR_NOT_SUPPORT,b)})});const v=async y=>{if(y==null)return 0;if(D.isBlob(y))return y.size;if(D.isSpecCompliantForm(y))return(await new i(Kt.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(D.isArrayBufferView(y)||D.isArrayBuffer(y))return y.byteLength;if(D.isURLSearchParams(y)&&(y=y+""),D.isString(y))return(await d(y)).byteLength},p=async(y,g)=>{const b=D.toFiniteNumber(y.getContentLength());return b??v(g)};return async y=>{let{url:g,method:b,data:x,signal:N,cancelToken:w,timeout:O,onDownloadProgress:A,onUploadProgress:E,responseType:M,headers:$,withCredentials:k="same-origin",fetchOptions:I,maxContentLength:_,maxBodyLength:C}=dk(y);const P=D.isNumber(_)&&_>-1,z=D.isNumber(C)&&C>-1,B=ie=>D.hasOwnProp(y,ie)?y[ie]:void 0;let K=a||fetch;M=M?(M+"").toLowerCase():"text";let Y=nI([N,w&&w.toAbortSignal()],O),Q=null;const Z=Y&&Y.unsubscribe&&(()=>{Y.unsubscribe()});let ne;try{let ie;const je=B("auth");if(je){const W=je.username||"",G=je.password||"";ie={username:W,password:G}}if(oI(g)){const W=new URL(g,Kt.origin);if(!ie&&(W.username||W.password)){const G=xw(W.username),Re=xw(W.password);ie={username:G,password:Re}}(W.username||W.password)&&(W.username="",W.password="",g=W.href)}if(ie&&($.delete("authorization"),$.set("Authorization","Basic "+btoa(lI((ie.username||"")+":"+(ie.password||""))))),P&&typeof g=="string"&&g.startsWith("data:")&&sI(g)>_)throw new re("maxContentLength size of "+_+" exceeded",re.ERR_BAD_RESPONSE,y,Q);if(z&&b!=="get"&&b!=="head"){const W=await p($,x);if(typeof W=="number"&&isFinite(W)&&W>C)throw new re("Request body larger than maxBodyLength limit",re.ERR_BAD_REQUEST,y,Q)}if(E&&h&&b!=="get"&&b!=="head"&&(ne=await p($,x))!==0){let W=new i(g,{method:"POST",body:x,duplex:"half"}),G;if(D.isFormData(x)&&(G=W.headers.get("content-type"))&&$.setContentType(G),W.body){const[Re,be]=pw(ne,Mh(mw(E)));x=vw(W.body,gw,Re,be)}}D.isString(k)||(k=k?"include":"omit");const ye=c&&"credentials"in i.prototype;if(D.isFormData(x)){const W=$.getContentType();W&&/^multipart\/form-data/i.test(W)&&!/boundary=/i.test(W)&&$.delete("content-type")}$.set("User-Agent","axios/"+Xb,!1);const ft={...I,signal:Y,method:b.toUpperCase(),headers:rk($.normalize()),body:x,duplex:"half",credentials:ye?k:void 0};Q=c&&new i(g,ft);let _e=await(c?K(Q,I):K(g,ft));if(P){const W=D.toFiniteNumber(_e.headers.get("content-length"));if(W!=null&&W>_)throw new re("maxContentLength size of "+_+" exceeded",re.ERR_BAD_RESPONSE,y,Q)}const J=m&&(M==="stream"||M==="response");if(m&&_e.body&&(A||P||J&&Z)){const W={};["status","statusText","headers"].forEach(jt=>{W[jt]=_e[jt]});const G=D.toFiniteNumber(_e.headers.get("content-length")),[Re,be]=A&&pw(G,Mh(mw(A),!0))||[];let dt=0;const vt=jt=>{if(P&&(dt=jt,dt>_))throw new re("maxContentLength size of "+_+" exceeded",re.ERR_BAD_RESPONSE,y,Q);Re&&Re(jt)};_e=new l(vw(_e.body,gw,vt,()=>{be&&be(),Z&&Z()}),W)}M=M||"text";let se=await j[D.findKey(j,M)||"text"](_e,y);if(P&&!m&&!J){let W;if(se!=null&&(typeof se.byteLength=="number"?W=se.byteLength:typeof se.size=="number"?W=se.size:typeof se=="string"&&(W=typeof r=="function"?new r().encode(se).byteLength:se.length)),typeof W=="number"&&W>_)throw new re("maxContentLength size of "+_+" exceeded",re.ERR_BAD_RESPONSE,y,Q)}return!J&&Z&&Z(),await new Promise((W,G)=>{uk(W,G,{data:se,headers:on.from(_e.headers),status:_e.status,statusText:_e.statusText,config:y,request:Q})})}catch(ie){if(Z&&Z(),Y&&Y.aborted&&Y.reason instanceof re){const je=Y.reason;throw je.config=y,Q&&(je.request=Q),ie!==je&&(je.cause=ie),je}throw ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,y,Q,ie&&ie.response),{cause:ie.cause||ie}):re.from(ie,ie&&ie.code,y,Q,ie&&ie.response)}}},uI=new Map,hk=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let l=i.length,o=l,c,u,f=uI;for(;o--;)c=i[o],u=f.get(c),u===void 0&&f.set(c,u=o?new Map:cI(t)),f=u;return u};hk();const Zb={http:Ez,xhr:tI,fetch:{get:hk}};D.forEach(Zb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const jw=e=>`- ${e}`,fI=e=>D.isFunction(e)||e===null||e===!1;function dI(e,t){e=D.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let l=0;l<n;l++){r=e[l];let o;if(a=r,!fI(r)&&(a=Zb[(o=String(r)).toLowerCase()],a===void 0))throw new re(`Unknown adapter '${o}'`);if(a&&(D.isFunction(a)||(a=a.get(t))))break;i[o||"#"+l]=a}if(!a){const l=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=n?l.length>1?`since :
`+l.map(jw).join(`
`):" "+jw(l[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a}const pk={getAdapter:dI,adapters:Zb};function rv(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ef(null,e)}function Sw(e){return rv(e),e.headers=on.from(e.headers),e.data=nv.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pk.getAdapter(e.adapter||Cf.adapter,e)(e).then(function(r){rv(e),e.response=r;try{r.data=nv.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=on.from(r.headers),r},function(r){if(!ck(r)&&(rv(e),r&&r.response)){e.response=r.response;try{r.response.data=nv.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=on.from(r.response.headers)}return Promise.reject(r)})}const ym={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ym[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ww={};ym.transitional=function(t,n,r){function a(i,l){return"[Axios v"+Xb+"] Transitional option '"+i+"'"+l+(r?". "+r:"")}return(i,l,o)=>{if(t===!1)throw new re(a(l," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!ww[l]&&(ww[l]=!0,console.warn(a(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,l,o):!0}};ym.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function hI(e,t,n){if(typeof e!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],l=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(l){const o=e[i],c=o===void 0||l(o,i,e);if(c!==!0)throw new re("option "+i+" must be "+c,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+i,re.ERR_BAD_OPTION)}}const Wd={assertOptions:hI,validators:ym},hn=Wd.validators;let js=class{constructor(t){this.defaults=t||{},this.interceptors={request:new hw,response:new hw}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const l=a.stack.indexOf(`
`);return l===-1?"":a.stack.slice(l+1)})();try{if(!r.stack)r.stack=i;else if(i){const l=i.indexOf(`
`),o=l===-1?-1:i.indexOf(`
`,l+1),c=o===-1?"":i.slice(o+1);String(r.stack).endsWith(c)||(r.stack+=`
`+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ks(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&Wd.assertOptions(r,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean),legacyInterceptorReqResOrdering:hn.transitional(hn.boolean),advertiseZstdAcceptEncoding:hn.transitional(hn.boolean)},!1),a!=null&&(D.isFunction(a)?n.paramsSerializer={serialize:a}:Wd.assertOptions(a,{encode:hn.function,serialize:hn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wd.assertOptions(n,{baseUrl:hn.spelling("baseURL"),withXsrfToken:hn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=i&&D.merge(i.common,i[n.method]);i&&D.forEach(["delete","get","head","post","put","patch","query","common"],j=>{delete i[j]}),n.headers=on.concat(l,i);const o=[];let c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;c=c&&v.synchronous;const p=n.transitional||Wb;p&&p.legacyInterceptorReqResOrdering?o.unshift(v.fulfilled,v.rejected):o.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let f,d=0,h;if(!c){const j=[Sw.bind(this),void 0];for(j.unshift(...o),j.push(...u),h=j.length,f=Promise.resolve(n);d<h;)f=f.then(j[d++],j[d++]);return f}h=o.length;let m=n;for(;d<h;){const j=o[d++],v=o[d++];try{m=j(m)}catch(p){v.call(this,p);break}}try{f=Sw.call(this,m)}catch(j){return Promise.reject(j)}for(d=0,h=u.length;d<h;)f=f.then(u[d++],u[d++]);return f}getUri(t){t=ks(this.defaults,t);const n=fk(t.baseURL,t.url,t.allowAbsoluteUrls);return lk(n,t.params,t.paramsSerializer)}};D.forEach(["delete","get","head","options"],function(t){js.prototype[t]=function(n,r){return this.request(ks(r||{},{method:t,url:n,data:(r||{}).data}))}});D.forEach(["post","put","patch","query"],function(t){function n(r){return function(i,l,o){return this.request(ks(o||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}js.prototype[t]=n(),t!=="query"&&(js.prototype[t+"Form"]=n(!0))});let pI=class mk{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(a=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(o=>{r.subscribe(o),i=o}).then(a);return l.cancel=function(){r.unsubscribe(i)},l},t(function(i,l,o){r.reason||(r.reason=new Ef(i,l,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new mk(function(a){t=a}),cancel:t}}};function mI(e){return function(n){return e.apply(null,n)}}function yI(e){return D.isObject(e)&&e.isAxiosError===!0}const Wg={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(Wg).forEach(([e,t])=>{Wg[t]=e});function yk(e){const t=new js(e),n=WT(js.prototype.request,t);return D.extend(n,js.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return yk(ks(e,a))},n}const bt=yk(Cf);bt.Axios=js;bt.CanceledError=Ef;bt.CancelToken=pI;bt.isCancel=ck;bt.VERSION=Xb;bt.toFormData=mm;bt.AxiosError=re;bt.Cancel=bt.CanceledError;bt.all=function(t){return Promise.all(t)};bt.spread=mI;bt.isAxiosError=yI;bt.mergeConfig=ks;bt.AxiosHeaders=on;bt.formToJSON=e=>ok(D.isHTMLForm(e)?new FormData(e):e);bt.getAdapter=pk.getAdapter;bt.HttpStatusCode=Wg;bt.default=bt;const{Axios:Pve,AxiosError:$ve,CanceledError:Rve,isCancel:Dve,CancelToken:Lve,VERSION:zve,all:Ive,Cancel:Bve,isAxiosError:Uve,spread:qve,toFormData:Hve,AxiosHeaders:Fve,HttpStatusCode:Gve,formToJSON:Kve,getAdapter:Vve,mergeConfig:Yve,create:Wve}=bt,R=bt.create({baseURL:"http://localhost:8013"});R.interceptors.request.use(e=>{const t=localStorage.getItem("mes_token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});R.interceptors.response.use(e=>e,e=>{var t;return((t=e.response)==null?void 0:t.status)===401&&(localStorage.removeItem("mes_token"),location.pathname!=="/login"&&(location.href="/login")),Promise.reject(e)});const U=e=>e.then(t=>{var n;return(n=t.data)==null?void 0:n.data}),ct=e=>{const t=new URLSearchParams;Object.entries(e).forEach(([r,a])=>{a!=null&&a!==""&&t.set(r,String(a))});const n=t.toString();return n?`?${n}`:""},vI=(e,t)=>R.post("/api/mes/auth/login",{username:e,password:t}),Jb=()=>R.get("/api/mes/auth/me"),gI=()=>R.post("/api/mes/auth/otp/setup"),xI=e=>R.post("/api/mes/auth/otp/confirm",{code:e}),bI=()=>R.post("/api/mes/auth/otp/disable"),jI=(e,t)=>R.post("/api/mes/auth/change-password",{currentPassword:e,newPassword:t}),SI=()=>U(R.get("/api/mes/dashboard/summary")),wI=()=>U(R.get("/api/mes/dashboard/workorder-status")),NI=()=>U(R.get("/api/mes/dashboard/shipping-status")),OI=()=>U(R.get("/api/mes/dashboard/equipment-status")),AI=(e={})=>U(R.get(`/api/mes/jobs${ct(e)}`)),CI=()=>U(R.get("/api/mes/jobs/board")),EI=()=>U(R.get("/api/mes/jobs/workload")),_I=e=>U(R.post("/api/mes/jobs",e)),TI=(e,t)=>U(R.put(`/api/mes/jobs/${e}`,t)),kI=(e,t)=>U(R.post(`/api/mes/jobs/${e}/assign`,t)),MI=(e,t)=>U(R.post(`/api/mes/jobs/${e}/transition`,{action:t})),PI=(e,t)=>U(R.post(`/api/mes/jobs/${e}/report`,{qty:t})),$I=e=>R.delete(`/api/mes/jobs/${e}`),vk=()=>U(R.get("/api/mes/progress/summary")),RI=(e="")=>U(R.get(`/api/mes/progress/workorders${e?`?status=${e}`:""}`)),DI=()=>U(R.get("/api/mes/progress/live")),LI=(e=30)=>U(R.get(`/api/mes/progress/plan-vs-actual?days=${e}`)),zI=()=>U(R.get("/api/mes/progress/delays")),II=(e={})=>U(R.get(`/api/mes/shipping${ct(e)}`)),BI=()=>U(R.get("/api/mes/shipping/board")),UI=e=>U(R.get(`/api/mes/shipping/${e}`)),qI=e=>U(R.post("/api/mes/shipping",e)),HI=(e,t)=>U(R.put(`/api/mes/shipping/${e}`,t)),FI=(e,t)=>U(R.post(`/api/mes/shipping/${e}/pick`,{qty:t})),GI=(e,t)=>U(R.post(`/api/mes/shipping/${e}/pack`,{qty:t})),KI=(e,t)=>U(R.post(`/api/mes/shipping/${e}/inspect`,{result:t})),VI=e=>U(R.post(`/api/mes/shipping/${e}/ship`)),YI=e=>U(R.post(`/api/mes/shipping/${e}/cancel`)),vm=(e={})=>U(R.get(`/api/mes/workorders${ct(e)}`)),WI=()=>U(R.get("/api/mes/workorders/kanban")),QI=e=>U(R.post("/api/mes/workorders",e)),XI=(e,t)=>U(R.put(`/api/mes/workorders/${e}`,t)),ZI=(e,t)=>U(R.post(`/api/mes/workorders/${e}/transition`,{action:t})),JI=e=>R.delete(`/api/mes/workorders/${e}`),e8=(e={})=>U(R.get(`/api/mes/production${ct(e)}`)),t8=(e=14)=>U(R.get(`/api/mes/production/daily-output?days=${e}`)),n8=(e=30)=>U(R.get(`/api/mes/production/defect-pareto?days=${e}`)),r8=e=>U(R.post("/api/mes/production/report",e)),a8=e=>U(R.get(`/api/mes/process/workorder/${e}`)),i8=()=>U(R.get("/api/mes/process/running")),s8=(e,t)=>U(R.put(`/api/mes/process/${e}/status`,{status:t})),l8=(e={})=>U(R.get(`/api/mes/oee${ct(e)}`)),o8=e=>U(R.post("/api/mes/oee",e)),c8=(e=30)=>U(R.get(`/api/mes/oee/downtime-pareto?days=${e}`)),u8=e=>U(R.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/history`)),f8=e=>U(R.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/forward`)),d8=e=>U(R.get(`/api/mes/tracking/lot/${encodeURIComponent(e)}/backward`)),h8=(e={})=>U(R.get(`/api/mes/plans${ct(e)}`)),p8=e=>U(R.post("/api/mes/plans",e)),m8=(e,t)=>U(R.put(`/api/mes/plans/${e}`,t)),y8=(e,t)=>U(R.post(`/api/mes/plans/${e}/transition`,{action:t})),v8=e=>R.delete(`/api/mes/plans/${e}`),g8=(e={})=>U(R.get(`/api/mes/receiving${ct(e)}`)),x8=e=>U(R.post("/api/mes/receiving",e)),b8=(e,t)=>U(R.post(`/api/mes/receiving/${e}/accept`,{inspectionResult:t})),j8=(e,t)=>U(R.post(`/api/mes/receiving/${e}/reject`,{reason:t})),S8=(e={})=>U(R.get(`/api/mes/inventory${ct(e)}`)),w8=()=>U(R.get("/api/mes/inventory/below-safety")),N8=(e={})=>U(R.get(`/api/mes/inventory/txns${ct(e)}`)),O8=e=>U(R.post("/api/mes/inventory/transfer",e)),A8=(e={})=>U(R.get(`/api/mes/stocktake${ct(e)}`)),C8=e=>U(R.post("/api/mes/stocktake/count",e)),E8=e=>U(R.post(`/api/mes/stocktake/${e}/adjust`)),_8=(e={})=>U(R.get(`/api/mes/lotserial${ct(e)}`)),T8=(e=30)=>U(R.get(`/api/mes/lotserial/expiring?days=${e}`)),k8=e=>U(R.post("/api/mes/lotserial",e)),M8=(e,t)=>U(R.put(`/api/mes/lotserial/${e}/status`,{status:t})),P8=(e={})=>U(R.get(`/api/mes/inspections${ct(e)}`)),$8=(e=30)=>U(R.get(`/api/mes/inspections/pass-rate?days=${e}`)),R8=e=>U(R.post("/api/mes/inspections",e)),D8=(e,t)=>U(R.post(`/api/mes/inspections/${e}/judge`,t)),L8=(e,t)=>U(R.post(`/api/mes/inspections/${e}/result`,t)),z8=(e={})=>U(R.get(`/api/mes/specs${ct(e)}`)),I8=e=>U(R.post("/api/mes/specs",e)),B8=(e,t)=>U(R.put(`/api/mes/specs/${e}`,t)),U8=e=>R.delete(`/api/mes/specs/${e}`),q8=(e={})=>U(R.get(`/api/mes/ncr${ct(e)}`)),H8=()=>U(R.get("/api/mes/ncr/board")),F8=e=>U(R.post("/api/mes/ncr",e)),G8=(e,t)=>U(R.post(`/api/mes/ncr/${e}/disposition`,{disposition:t})),K8=(e,t)=>U(R.post(`/api/mes/ncr/${e}/transition`,{status:t})),V8=(e={})=>U(R.get(`/api/mes/capa${ct(e)}`)),Y8=e=>U(R.post("/api/mes/capa",e)),W8=(e,t)=>U(R.put(`/api/mes/capa/${e}`,t)),Q8=(e,t)=>U(R.post(`/api/mes/capa/${e}/transition`,t)),X8=()=>U(R.get("/api/mes/spc/charts")),Z8=(e={})=>U(R.get(`/api/mes/spc/samples${ct(e)}`)),J8=e=>U(R.get(`/api/mes/spc/chart${ct(e)}`)),eB=e=>U(R.post("/api/mes/spc/samples",e)),tB=(e={})=>U(R.get(`/api/mes/certificates${ct(e)}`)),nB=e=>U(R.get(`/api/mes/certificates/${e}`)),rB=e=>U(R.post("/api/mes/certificates",e)),Jt=(e={})=>U(R.get(`/api/mes/items${ct(e)}`)),aB=e=>U(R.post("/api/mes/items",e)),iB=(e,t)=>U(R.put(`/api/mes/items/${e}`,t)),sB=e=>R.delete(`/api/mes/items/${e}`),lB=(e={})=>U(R.get(`/api/mes/bom${ct(e)}`)),oB=()=>U(R.get("/api/mes/bom/all")),cB=e=>U(R.post("/api/mes/bom",e)),uB=(e,t)=>U(R.put(`/api/mes/bom/${e}`,t)),fB=e=>R.delete(`/api/mes/bom/${e}`),dB=(e="")=>U(R.get(`/api/mes/routings${e?`?itemCode=${encodeURIComponent(e)}`:""}`)),hB=e=>U(R.post("/api/mes/routings",e)),pB=(e,t)=>U(R.put(`/api/mes/routings/${e}`,t)),mB=e=>R.delete(`/api/mes/routings/${e}`),e1=(e={})=>U(R.get(`/api/mes/equipment${ct(e)}`)),yB=(e,t)=>U(R.put(`/api/mes/equipment/${e}/run-status`,{runStatus:t})),t1=(e={})=>U(R.get(`/api/mes/partners${ct(e)}`)),vB=e=>U(R.post("/api/mes/partners",e)),gB=(e,t)=>U(R.put(`/api/mes/partners/${e}`,t)),xB=e=>R.delete(`/api/mes/partners/${e}`),_f=()=>U(R.get("/api/mes/warehouses")),bB=e=>U(R.post("/api/mes/warehouses",e)),jB=(e,t)=>U(R.put(`/api/mes/warehouses/${e}`,t)),SB=e=>R.delete(`/api/mes/warehouses/${e}`),wB=e=>U(R.get(`/api/mes/warehouses/${encodeURIComponent(e)}/locations`)),NB=e=>U(R.post("/api/mes/warehouses/locations",e)),OB=e=>R.delete(`/api/mes/warehouses/locations/${e}`),gk=()=>U(R.get("/api/mes/members/workers")),AB=(e=30)=>U(R.get(`/api/mes/analytics/production-kpi?days=${e}`)),CB=(e=30)=>U(R.get(`/api/mes/analytics/quality-kpi?days=${e}`)),EB=()=>U(R.get("/api/mes/analytics/inventory-kpi")),xk=(e=14)=>U(R.get(`/api/mes/analytics/daily-production?days=${e}`)),_B=(e=30,t=10)=>U(R.get(`/api/mes/analytics/top-items?days=${e}&limit=${t}`)),bk=()=>U(R.get("/api/mes/ai/status")),TB=e=>U(R.post("/api/mes/ai/defect-root-cause",e)),kB=e=>U(R.post("/api/mes/ai/forecast",e)),MB=e=>U(R.post("/api/mes/ai/predictive-maintenance",e)),PB=e=>U(R.post("/api/mes/ai/spc-anomaly",e)),$B=e=>U(R.post("/api/mes/ai/parse-query",e)),RB=e=>U(R.post("/api/mes/ai/safety-stock",e)),DB=e=>U(R.post("/api/mes/ai/schedule-optimize",e)),LB=e=>U(R.post("/api/mes/rag/defect-analysis",e)),zB=e=>U(R.post("/api/mes/rag/predict-analysis",e)),IB=e=>U(R.post("/api/mes/rag/feedback",e)),BB=()=>U(R.get("/api/mes/rag/toggles")),UB=(e,t)=>U(R.put(`/api/mes/rag/toggles/${e}`,{value:t})),qB=e=>U(R.post("/api/ai/feedback",e)),HB=()=>R.get("/api/admin/users"),FB=e=>R.post("/api/admin/users",e),GB=(e,t)=>R.put(`/api/admin/users/${e}/role`,{role:t}),KB=(e,t)=>R.put(`/api/admin/users/${e}/active`,{active:t}),VB=(e,t)=>R.put(`/api/admin/users/${e}/password`,{password:t}),YB=e=>R.delete(`/api/admin/users/${e}`),WB=e=>R.post(`/api/admin/users/${e}/otp-reset`),QB=(e="",t="",n=200)=>R.get(`/api/admin/audit${ct({action:e,actor:t,limit:n})}`),XB=()=>R.get("/api/admin/settings"),ZB=(e,t)=>R.put(`/api/admin/settings/${encodeURIComponent(e)}`,{value:t});function JB(){const e=sm(),t=localStorage.getItem("mes_user")||"admin",n=localStorage.getItem("mes_role")||"",[r,a]=S.useState(null);S.useEffect(()=>{bk().then(l=>a(!!((l==null?void 0:l.ollamaAvailable)??(l==null?void 0:l.available)))).catch(()=>a(!1))},[]);const i=()=>{localStorage.removeItem("mes_token"),localStorage.removeItem("mes_role"),localStorage.removeItem("mes_user"),e("/login")};return s.jsxs("header",{className:"h-16 bg-panel border-b border-edge flex items-center justify-between px-6",children:[s.jsx("div",{className:"text-sm text-slate-400",children:"AI 제조실행시스템 · WMS · MES · QMS · Ollama 온프레미스"}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded-md border ${r?"text-accent border-accent/30 bg-accent/10":"text-slate-400 border-edge bg-card"}`,children:[s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${r?"bg-accent":"bg-slate-500"}`}),"AI ",r===null?"확인 중":r?"온라인":"폴백"]}),s.jsxs(jf,{to:"/mypage",className:"flex items-center gap-1.5 text-sm text-slate-300 hover:text-brand",title:"마이페이지",children:[s.jsx(L6,{size:18})," ",t,n&&s.jsxs("span",{className:"text-[11px] text-slate-500",children:["(",n,")"]})]}),s.jsxs("button",{onClick:i,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[s.jsx(Y6,{size:16})," 로그아웃"]})]})]})}function eU(){const e=localStorage.getItem("mes_token");return S.useEffect(()=>{e&&Jb().then(t=>{var r;const n=((r=t.data)==null?void 0:r.data)||{};n.role&&localStorage.setItem("mes_role",n.role),n.username&&localStorage.setItem("mes_user",n.username)}).catch(()=>{})},[e]),e?s.jsxs("div",{className:"flex h-screen bg-ink",children:[s.jsx(NL,{}),s.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[s.jsx(JB,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6",children:s.jsx(v5,{})})]})]}):s.jsx(oT,{to:"/login",replace:!0})}function Bn({min:e,children:t}){const[n,r]=S.useState(_i());return S.useEffect(()=>{const a=window.setInterval(()=>{const i=_i();r(l=>l===i?l:i)},500);return()=>window.clearInterval(a)},[]),_s(e,n)?s.jsx(s.Fragment,{children:t}):s.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[s.jsx(rL,{size:48,className:"text-rose-400 mb-4"}),s.jsx("h2",{className:"text-lg font-bold mb-1",children:"접근 권한이 없습니다"}),s.jsxs("p",{className:"text-sm text-slate-400",children:["이 화면은 ",s.jsx("b",{className:"text-brand",children:e})," 이상 권한이 필요합니다. (현재: ",n,")"]})]})}const tU=(e,t)=>R.post("/api/mes/auth/verify",{verifyToken:e,code:t}),nU=(e,t)=>R.post("/api/mes/auth/verify-otp",{verifyToken:e,code:t}),rU=e=>R.post("/api/mes/auth/signup",e),aU=e=>R.post("/api/mes/auth/find-id",e),iU=e=>R.post("/api/mes/auth/reset-password",e),sU=e=>R.post("/api/messages",e),lU=e=>R.get("/api/messages/sent",{params:e}),oU=e=>R.get(`/api/messages/sent/${e}`),cU=e=>R.get("/api/messages/received",{params:e}),uU=e=>R.get(`/api/messages/received/${e}`),fU=e=>R.get("/api/schedules",{params:e}),dU=e=>R.post("/api/schedules",e),hU=e=>R.get(`/api/schedules/${e}`),pU=e=>R.delete(`/api/schedules/${e}`),mU=e=>R.get("/api/worklogs",{params:e}),yU=e=>R.get("/api/worklogs/dashboard/progress",{params:e}),vU=e=>R.post("/api/worklogs",e),gU=e=>R.get(`/api/worklogs/${e}`),xU=e=>R.delete(`/api/worklogs/${e}`),bU=(e,t)=>R.post(`/api/worklogs/${e}/comments`,{cmtContent:t}),jU=e=>R.get("/api/stats/personal-work",{params:e}),SU=e=>R.get("/api/stats/company-work",{params:e}),wU=(e,t=0,n=100)=>R.get("/api/system/roles",{params:{...e?{keyword:e}:{},page:t,size:n}}),NU=e=>R.post("/api/system/roles",e),OU=(e,t)=>R.put(`/api/system/roles/${encodeURIComponent(e)}`,t),AU=e=>R.delete("/api/system/roles",{data:{ids:e}}),CU=(e=0,t=100)=>R.get("/api/system/role-menus",{params:{page:e,size:t}}),EU=e=>R.get(`/api/system/roles/${encodeURIComponent(e)}/menus`),_U=(e,t)=>R.put(`/api/system/roles/${encodeURIComponent(e)}/menus`,{menus:t}),TU=(e,t=0,n=100)=>R.get("/api/system/codes",{params:{...e?{keyword:e}:{},page:t,size:n}}),kU=e=>R.get(`/api/system/codes/${encodeURIComponent(e)}`),MU=e=>R.post("/api/system/codes",e),PU=(e,t)=>R.put(`/api/system/codes/${encodeURIComponent(e)}`,t),$U=e=>R.delete(`/api/system/codes/${encodeURIComponent(e)}`),RU=(e=0,t=200)=>R.get("/api/system/menus",{params:{page:e,size:t}}),DU=e=>R.get("/api/system/menus/search",{params:e?{keyword:e}:{}}),LU=e=>R.post("/api/system/menus",e),zU=(e,t)=>R.put(`/api/system/menus/${encodeURIComponent(e)}`,t),IU=e=>R.delete("/api/system/menus",{data:{ids:e}}),BU=(e,t=0,n=200)=>R.get("/api/system/depts",{params:{...e?{keyword:e}:{},page:t,size:n}}),UU=e=>R.post("/api/system/depts",e),qU=(e,t)=>R.put(`/api/system/depts/${encodeURIComponent(e)}`,t),HU=e=>R.delete(`/api/system/depts/${encodeURIComponent(e)}`),FU=(e,t=0,n=200)=>R.get("/api/system/companies",{params:{...e?{keyword:e}:{},page:t,size:n}}),GU=e=>R.post("/api/system/companies",e),KU=(e,t)=>R.put(`/api/system/companies/${encodeURIComponent(e)}`,t),VU=e=>R.delete("/api/system/companies",{data:{ids:e}});function YU(){const[e,t]=S.useState("admin"),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(!1),[c,u]=S.useState("login"),[f,d]=S.useState(""),[h,m]=S.useState("EMAIL"),[j,v]=S.useState(""),[p,y]=S.useState(""),[g,b]=S.useState(""),[x,N]=S.useState(""),w=sm(),O=h==="OTP"||h==="OTP_SETUP",A=h==="OTP_SETUP",[E,M]=S.useState(null),[$,k]=S.useState({username:"",password:"",displayName:"",email:""}),[I,_]=S.useState(!1),[C,P]=S.useState(""),[z,B]=S.useState(!1),K=ye=>{M(ye),k({username:"",password:"",displayName:"",email:""}),P(""),B(!1)},Y=()=>{M(null),P(""),B(!1)},Q=async ye=>{var ft,_e,J;ye.preventDefault(),_(!0),P(""),B(!1);try{let se;if(E==="signup"){se=await rU({username:$.username.trim(),password:$.password,displayName:$.displayName.trim()||void 0,email:$.email.trim()});const W=(ft=se.data)==null?void 0:ft.data;B(!(W!=null&&W.success)),P((W==null?void 0:W.message)||"처리되었습니다.")}else if(E==="find-id"){se=await aU({displayName:$.displayName.trim(),email:$.email.trim()});const W=(_e=se.data)==null?void 0:_e.data;W!=null&&W.found?(B(!1),P(`회원님의 아이디는 [${W.maskedUsername}] 입니다.`)):(B(!0),P("일치하는 계정을 찾을 수 없습니다. 이름과 이메일을 확인하세요."))}else if(E==="reset-password"){se=await iU({username:$.username.trim(),email:$.email.trim()});const W=(J=se.data)==null?void 0:J.data;B(!(W!=null&&W.success)),P((W==null?void 0:W.message)||"요청이 처리되었습니다.")}}catch{B(!0),P("요청 처리 중 오류가 발생했습니다. 잠시 후 다시 시도하세요.")}finally{_(!1)}},Z=E==="signup"?"회원가입(승인 대기)":E==="find-id"?"아이디 찾기":"비밀번호 초기화",ne=async ye=>{var ft;if(!ye)throw new Error("no token");localStorage.setItem("mes_token",ye);try{const J=((ft=(await Jb()).data)==null?void 0:ft.data)||{};J.role&&localStorage.setItem("mes_role",J.role),J.username&&localStorage.setItem("mes_user",J.username)}catch{}w("/dashboard")},ie=async ye=>{var ft;ye.preventDefault(),i(""),o(!0);try{const J=((ft=(await vI(e,n)).data)==null?void 0:ft.data)||{};if(J.twofa==="true"){d(J.verifyToken),m(J.verifyMethod||"EMAIL"),v(J.maskedEmail||""),y(J.qrImage||""),b(J.secret||""),N(""),u("verify");return}await ne(J.token)}catch{i("로그인 실패 — 아이디/비밀번호를 확인하세요.")}finally{o(!1)}},je=async ye=>{var ft,_e;ye.preventDefault(),i(""),o(!0);try{const J=O?await nU(f,x.trim()):await tU(f,x.trim());await ne((_e=(ft=J.data)==null?void 0:ft.data)==null?void 0:_e.token)}catch{i("인증 코드가 올바르지 않거나 만료되었습니다.")}finally{o(!1)}};return s.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-ink",children:[s.jsxs("form",{onSubmit:c==="login"?ie:je,className:"w-[360px] bg-panel border border-edge rounded-2xl p-8",children:[s.jsxs("div",{className:"flex items-center gap-2 justify-center mb-6",children:[s.jsx(Yr,{className:"text-brand",size:32}),s.jsx("span",{className:"text-xl font-bold",children:"GUARDiA MES"})]}),s.jsx("p",{className:"text-center text-sm text-slate-400 mb-6",children:"AI 제조실행시스템 · WMS · MES · QMS"}),c==="login"?s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"아이디"}),s.jsx("input",{value:e,onChange:ye=>t(ye.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"비밀번호"}),s.jsx("input",{type:"password",value:n,onChange:ye=>r(ye.target.value),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 justify-center mb-3",children:[s.jsx(Yo,{size:18,className:"text-brand"}),s.jsx("span",{className:"text-sm font-semibold",children:"2차 인증"})]}),O?A?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-center text-xs text-slate-400 mb-3",children:"최초 로그인입니다. 아래 QR을 Authenticator 앱(Google·Microsoft)으로 스캔해 등록한 뒤 6자리 코드를 입력하세요."}),p&&s.jsx("div",{className:"flex justify-center mb-3",children:s.jsx("img",{src:p,alt:"OTP QR",width:180,height:180,style:{background:"#fff",padding:8,borderRadius:8}})}),g&&s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"QR 스캔이 안 되면 수동 입력 키"}),s.jsx("code",{className:"block text-xs text-accent bg-ink border border-edge rounded-md px-2 py-1.5 break-all select-all",children:g})]})]}):s.jsx("p",{className:"text-center text-xs text-slate-400 mb-4",children:"Authenticator 앱에 표시된 6자리 코드를 입력하세요."}):s.jsxs("p",{className:"text-center text-xs text-slate-400 mb-4",children:["이메일로 발송된 6자리 인증 코드를 입력하세요",j?` (${j})`:"","."]}),s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"인증 코드"}),s.jsx("input",{value:x,onChange:ye=>N(ye.target.value.replace(/\D/g,"").slice(0,6)),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,autoFocus:!0,placeholder:"000000",className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none tracking-[0.4em] text-center"})]}),a&&s.jsx("p",{className:"text-rose-400 text-xs mb-3",children:a}),s.jsx("button",{disabled:l||c==="verify"&&x.length!==6,className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90 disabled:opacity-60",children:l?"처리 중…":c==="login"?"로그인":A?"등록하고 로그인":"인증 확인"}),c==="verify"&&s.jsx("button",{type:"button",onClick:()=>{u("login"),N(""),i(""),y(""),b("")},className:"w-full mt-2 py-2 rounded-lg text-xs text-slate-400 hover:text-slate-200",children:"← 처음으로"}),c==="login"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 text-[11px] text-slate-400 mt-4",children:[s.jsx("button",{type:"button",onClick:()=>K("signup"),className:"hover:text-brand",children:"회원가입"}),s.jsx("span",{className:"text-slate-600",children:"|"}),s.jsx("button",{type:"button",onClick:()=>K("find-id"),className:"hover:text-brand",children:"아이디 찾기"}),s.jsx("span",{className:"text-slate-600",children:"|"}),s.jsx("button",{type:"button",onClick:()=>K("reset-password"),className:"hover:text-brand",children:"비밀번호 초기화"})]}),s.jsx("p",{className:"text-center text-[11px] text-slate-500 mt-3",children:"admin / manager / worker · admin123"})]})]}),E&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:Y,children:s.jsxs("form",{onClick:ye=>ye.stopPropagation(),onSubmit:Q,className:"w-[360px] bg-panel border border-edge rounded-2xl p-7",children:[s.jsxs("div",{className:"flex items-center justify-between mb-5",children:[s.jsx("span",{className:"text-base font-bold",children:Z}),s.jsx("button",{type:"button",onClick:Y,className:"text-slate-400 hover:text-slate-200 text-lg leading-none",children:"×"})]}),(E==="signup"||E==="reset-password")&&s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"아이디"}),s.jsx("input",{value:$.username,onChange:ye=>k({...$,username:ye.target.value}),className:"w-full mb-3 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"})]}),E==="signup"&&s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"비밀번호 (4자 이상)"}),s.jsx("input",{type:"password",value:$.password,onChange:ye=>k({...$,password:ye.target.value}),className:"w-full mb-3 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"})]}),(E==="signup"||E==="find-id")&&s.jsxs(s.Fragment,{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"이름"}),s.jsx("input",{value:$.displayName,onChange:ye=>k({...$,displayName:ye.target.value}),className:"w-full mb-3 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"})]}),s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"이메일"}),s.jsx("input",{type:"email",value:$.email,onChange:ye=>k({...$,email:ye.target.value}),className:"w-full mb-4 px-3 py-2 rounded-lg bg-card border border-edge text-sm focus:border-brand outline-none"}),C&&s.jsx("p",{className:`text-xs mb-3 ${z?"text-rose-400":"text-emerald-400"}`,children:C}),s.jsx("button",{disabled:I,className:"w-full py-2.5 rounded-lg bg-brand text-ink font-semibold hover:bg-brand/90 disabled:opacity-60",children:I?"처리 중…":E==="signup"?"가입 신청":E==="find-id"?"아이디 찾기":"초기화 요청"}),E==="signup"&&s.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"가입 후 관리자 승인이 완료되어야 로그인할 수 있습니다."})]})})]})}const av=8;function ld(e,t){var n,r,a;return((n=e==null?void 0:e.response)==null?void 0:n.status)===403?"권한이 없습니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||t}function WU(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState("idle"),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(!1),[j,v]=S.useState(null),[p,y]=S.useState(""),[g,b]=S.useState(""),[x,N]=S.useState(""),[w,O]=S.useState(!1),[A,E]=S.useState(!1),[M,$]=S.useState(null),k=()=>Jb().then(Q=>{var ne;const Z=((ne=Q.data)==null?void 0:ne.data)||{};t(Z.username||localStorage.getItem("mes_user")||""),typeof Z.otpEnabled=="boolean"?r(Z.otpEnabled):typeof Z.verifyMethod=="string"&&r(Z.verifyMethod==="OTP")}).catch(()=>{});S.useEffect(()=>{k()},[]);const I=async()=>{var Q;v(null),m(!0);try{const ne=((Q=(await gI()).data)==null?void 0:Q.data)||{};o(ne.qrImage||""),u(ne.secret||""),d(""),i("setup")}catch(Z){v({ok:!1,text:ld(Z,"OTP 등록을 시작하지 못했습니다.")})}finally{m(!1)}},_=async()=>{v(null),m(!0);try{await xI(f),u(""),o(""),d(""),i("done"),r(!0),v({ok:!0,text:"2차 인증이 활성화되었습니다."})}catch(Q){v({ok:!1,text:ld(Q,"코드가 일치하지 않거나 만료되었습니다.")})}finally{m(!1)}},C=()=>{i("idle"),u(""),o(""),d(""),v(null)},P=async()=>{if(window.confirm("Authenticator 2차 인증을 해제하시겠습니까?")){v(null),m(!0);try{await bI(),i("idle"),u(""),o(""),r(!1),v({ok:!0,text:"2차 인증이 해제되었습니다."})}catch(Q){v({ok:!1,text:ld(Q,"OTP 해제에 실패했습니다.")})}finally{m(!1)}}},z=async()=>{if($(null),!p){$({ok:!1,text:"현재 비밀번호를 입력하세요."});return}if(g.length<av){$({ok:!1,text:`새 비밀번호는 최소 ${av}자 이상이어야 합니다.`});return}if(g!==x){$({ok:!1,text:"새 비밀번호가 일치하지 않습니다."});return}if(g===p){$({ok:!1,text:"새 비밀번호는 현재 비밀번호와 달라야 합니다."});return}E(!0);try{await jI(p,g),y(""),b(""),N(""),$({ok:!0,text:"비밀번호가 변경되었습니다."})}catch(Q){$({ok:!1,text:ld(Q,"비밀번호 변경에 실패했습니다.")})}finally{E(!1)}},B="w-full px-3 py-2 rounded-lg bg-ink border border-edge text-sm focus:border-brand outline-none",K=B+" tracking-[0.4em] text-center text-lg",Y=({m:Q})=>Q?s.jsxs("div",{className:`flex items-center gap-2 text-sm rounded-lg px-3 py-2 mb-3 border ${Q.ok?"bg-accent/10 border-accent/40 text-accent":"bg-rose-500/10 border-rose-500/40 text-rose-300"}`,children:[Q.ok?s.jsx(wf,{size:16}):s.jsx(lr,{size:16}),Q.text]}):null;return s.jsxs("div",{className:"max-w-2xl",children:[s.jsx("h1",{className:"text-xl font-bold mb-1",children:"마이페이지"}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:e&&s.jsxs(s.Fragment,{children:["계정: ",s.jsx("span",{className:"text-slate-200",children:e})]})}),s.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5 mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(Yo,{size:18,className:"text-brand"}),s.jsx("h2",{className:"font-semibold",children:"2차 인증 — Authenticator(OTP)"})]}),s.jsxs("p",{className:"text-xs text-slate-400 mb-4",children:["Google·Microsoft Authenticator 앱으로 6자리 코드를 사용하는 2차 인증을 설정합니다.",n!==null&&s.jsxs("span",{className:"ml-2",children:["현재 상태:"," ",s.jsx("span",{className:n?"text-accent":"text-slate-300",children:n?"OTP 사용 중":"미설정"})]})]}),s.jsx(Y,{m:j}),a==="idle"&&s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("button",{onClick:I,disabled:h,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:[s.jsx(tL,{size:16})," ",h?"발급 중…":n?"OTP 재설정 시작":"OTP 등록 시작"]}),n&&s.jsx("button",{onClick:P,disabled:h,className:"px-3 py-2 rounded-lg border border-rose-500/50 text-rose-300 text-sm hover:bg-rose-500/10 disabled:opacity-60",children:"Authenticator 해제"})]}),a==="setup"&&s.jsxs("div",{children:[s.jsxs("ol",{className:"list-decimal list-inside text-sm text-slate-300 leading-7 mb-3",children:[s.jsx("li",{children:"Authenticator 앱에서 아래 QR을 스캔하세요."}),s.jsx("li",{children:"스캔이 안 되면 수동 키를 직접 입력하세요."}),s.jsx("li",{children:"앱에 표시된 6자리 코드를 입력해 확인하세요."})]}),l&&s.jsx("div",{className:"flex justify-center mb-3",children:s.jsx("img",{src:l,alt:"OTP QR",width:200,height:200,style:{background:"#fff",padding:8,borderRadius:8}})}),c&&s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"수동 입력 키"}),s.jsx("code",{className:"block text-xs text-accent bg-ink border border-edge rounded-md px-2 py-1.5 break-all select-all",children:c})]}),s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"앱에 표시된 6자리 코드"}),s.jsx("input",{value:f,onChange:Q=>d(Q.target.value.replace(/\D/g,"").slice(0,6)),inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,placeholder:"000000",className:K+" mb-3"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:_,disabled:h||f.length!==6,className:"px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:h?"확인 중…":"코드 확인 · 활성화"}),s.jsx("button",{onClick:C,disabled:h,className:"px-4 py-2 rounded-lg border border-edge text-sm text-slate-300 hover:bg-card/60",children:"취소"})]})]}),a==="done"&&s.jsx("div",{className:"flex flex-wrap gap-2",children:s.jsx("button",{onClick:P,disabled:h,className:"px-3 py-2 rounded-lg border border-rose-500/50 text-rose-300 text-sm hover:bg-rose-500/10 disabled:opacity-60",children:"Authenticator 해제"})})]}),s.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx(V6,{size:18,className:"text-brand"}),s.jsx("h2",{className:"font-semibold",children:"비밀번호 변경"})]}),s.jsx(Y,{m:M}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"현재 비밀번호"}),s.jsx("input",{type:w?"text":"password",value:p,autoComplete:"current-password",onChange:Q=>y(Q.target.value),className:B})]}),s.jsxs("div",{children:[s.jsxs("label",{className:"block text-xs text-slate-400 mb-1",children:["새 비밀번호 (최소 ",av,"자)"]}),s.jsx("input",{type:w?"text":"password",value:g,autoComplete:"new-password",onChange:Q=>b(Q.target.value),className:B})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:"새 비밀번호 확인"}),s.jsx("input",{type:w?"text":"password",value:x,autoComplete:"new-password",onChange:Q=>N(Q.target.value),className:B})]}),s.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-slate-400 cursor-pointer select-none",children:[s.jsx("button",{type:"button",onClick:()=>O(!w),className:"text-slate-400 hover:text-brand",children:w?s.jsx(H6,{size:15}):s.jsx(TT,{size:15})}),"비밀번호 표시"]}),s.jsx("button",{onClick:z,disabled:A,className:"px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-60",children:A?"변경 중…":"비밀번호 변경"})]})]})]})}function jk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=jk(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pe(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=jk(e))&&(r&&(r+=" "),r+=t);return r}var QU=Array.isArray,jn=QU,XU=typeof Uf=="object"&&Uf&&Uf.Object===Object&&Uf,Sk=XU,ZU=Sk,JU=typeof self=="object"&&self&&self.Object===Object&&self,e7=ZU||JU||Function("return this")(),Jr=e7,t7=Jr,n7=t7.Symbol,Tf=n7,Nw=Tf,wk=Object.prototype,r7=wk.hasOwnProperty,a7=wk.toString,xc=Nw?Nw.toStringTag:void 0;function i7(e){var t=r7.call(e,xc),n=e[xc];try{e[xc]=void 0;var r=!0}catch{}var a=a7.call(e);return r&&(t?e[xc]=n:delete e[xc]),a}var s7=i7,l7=Object.prototype,o7=l7.toString;function c7(e){return o7.call(e)}var u7=c7,Ow=Tf,f7=s7,d7=u7,h7="[object Null]",p7="[object Undefined]",Aw=Ow?Ow.toStringTag:void 0;function m7(e){return e==null?e===void 0?p7:h7:Aw&&Aw in Object(e)?f7(e):d7(e)}var Ra=m7;function y7(e){return e!=null&&typeof e=="object"}var Da=y7,v7=Ra,g7=Da,x7="[object Symbol]";function b7(e){return typeof e=="symbol"||g7(e)&&v7(e)==x7}var Qo=b7,j7=jn,S7=Qo,w7=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,N7=/^\w*$/;function O7(e,t){if(j7(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||S7(e)?!0:N7.test(e)||!w7.test(e)||t!=null&&e in Object(t)}var n1=O7;function A7(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ri=A7;const Xo=$e(Ri);var C7=Ra,E7=Ri,_7="[object AsyncFunction]",T7="[object Function]",k7="[object GeneratorFunction]",M7="[object Proxy]";function P7(e){if(!E7(e))return!1;var t=C7(e);return t==T7||t==k7||t==_7||t==M7}var r1=P7;const ce=$e(r1);var $7=Jr,R7=$7["__core-js_shared__"],D7=R7,iv=D7,Cw=function(){var e=/[^.]+$/.exec(iv&&iv.keys&&iv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function L7(e){return!!Cw&&Cw in e}var z7=L7,I7=Function.prototype,B7=I7.toString;function U7(e){if(e!=null){try{return B7.call(e)}catch{}try{return e+""}catch{}}return""}var Nk=U7,q7=r1,H7=z7,F7=Ri,G7=Nk,K7=/[\\^$.*+?()[\]{}|]/g,V7=/^\[object .+?Constructor\]$/,Y7=Function.prototype,W7=Object.prototype,Q7=Y7.toString,X7=W7.hasOwnProperty,Z7=RegExp("^"+Q7.call(X7).replace(K7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function J7(e){if(!F7(e)||H7(e))return!1;var t=q7(e)?Z7:V7;return t.test(G7(e))}var e9=J7;function t9(e,t){return e==null?void 0:e[t]}var n9=t9,r9=e9,a9=n9;function i9(e,t){var n=a9(e,t);return r9(n)?n:void 0}var qs=i9,s9=qs,l9=s9(Object,"create"),gm=l9,Ew=gm;function o9(){this.__data__=Ew?Ew(null):{},this.size=0}var c9=o9;function u9(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var f9=u9,d9=gm,h9="__lodash_hash_undefined__",p9=Object.prototype,m9=p9.hasOwnProperty;function y9(e){var t=this.__data__;if(d9){var n=t[e];return n===h9?void 0:n}return m9.call(t,e)?t[e]:void 0}var v9=y9,g9=gm,x9=Object.prototype,b9=x9.hasOwnProperty;function j9(e){var t=this.__data__;return g9?t[e]!==void 0:b9.call(t,e)}var S9=j9,w9=gm,N9="__lodash_hash_undefined__";function O9(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=w9&&t===void 0?N9:t,this}var A9=O9,C9=c9,E9=f9,_9=v9,T9=S9,k9=A9;function Zo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zo.prototype.clear=C9;Zo.prototype.delete=E9;Zo.prototype.get=_9;Zo.prototype.has=T9;Zo.prototype.set=k9;var M9=Zo;function P9(){this.__data__=[],this.size=0}var $9=P9;function R9(e,t){return e===t||e!==e&&t!==t}var a1=R9,D9=a1;function L9(e,t){for(var n=e.length;n--;)if(D9(e[n][0],t))return n;return-1}var xm=L9,z9=xm,I9=Array.prototype,B9=I9.splice;function U9(e){var t=this.__data__,n=z9(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():B9.call(t,n,1),--this.size,!0}var q9=U9,H9=xm;function F9(e){var t=this.__data__,n=H9(t,e);return n<0?void 0:t[n][1]}var G9=F9,K9=xm;function V9(e){return K9(this.__data__,e)>-1}var Y9=V9,W9=xm;function Q9(e,t){var n=this.__data__,r=W9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var X9=Q9,Z9=$9,J9=q9,eq=G9,tq=Y9,nq=X9;function Jo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jo.prototype.clear=Z9;Jo.prototype.delete=J9;Jo.prototype.get=eq;Jo.prototype.has=tq;Jo.prototype.set=nq;var bm=Jo,rq=qs,aq=Jr,iq=rq(aq,"Map"),i1=iq,_w=M9,sq=bm,lq=i1;function oq(){this.size=0,this.__data__={hash:new _w,map:new(lq||sq),string:new _w}}var cq=oq;function uq(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var fq=uq,dq=fq;function hq(e,t){var n=e.__data__;return dq(t)?n[typeof t=="string"?"string":"hash"]:n.map}var jm=hq,pq=jm;function mq(e){var t=pq(this,e).delete(e);return this.size-=t?1:0,t}var yq=mq,vq=jm;function gq(e){return vq(this,e).get(e)}var xq=gq,bq=jm;function jq(e){return bq(this,e).has(e)}var Sq=jq,wq=jm;function Nq(e,t){var n=wq(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Oq=Nq,Aq=cq,Cq=yq,Eq=xq,_q=Sq,Tq=Oq;function ec(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ec.prototype.clear=Aq;ec.prototype.delete=Cq;ec.prototype.get=Eq;ec.prototype.has=_q;ec.prototype.set=Tq;var s1=ec,Ok=s1,kq="Expected a function";function l1(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(kq);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var l=e.apply(this,r);return n.cache=i.set(a,l)||i,l};return n.cache=new(l1.Cache||Ok),n}l1.Cache=Ok;var Ak=l1;const Mq=$e(Ak);var Pq=Ak,$q=500;function Rq(e){var t=Pq(e,function(r){return n.size===$q&&n.clear(),r}),n=t.cache;return t}var Dq=Rq,Lq=Dq,zq=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Iq=/\\(\\)?/g,Bq=Lq(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zq,function(n,r,a,i){t.push(a?i.replace(Iq,"$1"):r||n)}),t}),Uq=Bq;function qq(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}var o1=qq,Tw=Tf,Hq=o1,Fq=jn,Gq=Qo,kw=Tw?Tw.prototype:void 0,Mw=kw?kw.toString:void 0;function Ck(e){if(typeof e=="string")return e;if(Fq(e))return Hq(e,Ck)+"";if(Gq(e))return Mw?Mw.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Kq=Ck,Vq=Kq;function Yq(e){return e==null?"":Vq(e)}var Ek=Yq,Wq=jn,Qq=n1,Xq=Uq,Zq=Ek;function Jq(e,t){return Wq(e)?e:Qq(e,t)?[e]:Xq(Zq(e))}var _k=Jq,eH=Qo;function tH(e){if(typeof e=="string"||eH(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Sm=tH,nH=_k,rH=Sm;function aH(e,t){t=nH(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[rH(t[n++])];return n&&n==r?e:void 0}var c1=aH,iH=c1;function sH(e,t,n){var r=e==null?void 0:iH(e,t);return r===void 0?n:r}var Tk=sH;const Rn=$e(Tk);function lH(e){return e==null}var oH=lH;const oe=$e(oH);var cH=Ra,uH=jn,fH=Da,dH="[object String]";function hH(e){return typeof e=="string"||!uH(e)&&fH(e)&&cH(e)==dH}var pH=hH;const Ms=$e(pH);var kk={exports:{}},ze={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var u1=Symbol.for("react.element"),f1=Symbol.for("react.portal"),wm=Symbol.for("react.fragment"),Nm=Symbol.for("react.strict_mode"),Om=Symbol.for("react.profiler"),Am=Symbol.for("react.provider"),Cm=Symbol.for("react.context"),mH=Symbol.for("react.server_context"),Em=Symbol.for("react.forward_ref"),_m=Symbol.for("react.suspense"),Tm=Symbol.for("react.suspense_list"),km=Symbol.for("react.memo"),Mm=Symbol.for("react.lazy"),yH=Symbol.for("react.offscreen"),Mk;Mk=Symbol.for("react.module.reference");function dr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case u1:switch(e=e.type,e){case wm:case Om:case Nm:case _m:case Tm:return e;default:switch(e=e&&e.$$typeof,e){case mH:case Cm:case Em:case Mm:case km:case Am:return e;default:return t}}case f1:return t}}}ze.ContextConsumer=Cm;ze.ContextProvider=Am;ze.Element=u1;ze.ForwardRef=Em;ze.Fragment=wm;ze.Lazy=Mm;ze.Memo=km;ze.Portal=f1;ze.Profiler=Om;ze.StrictMode=Nm;ze.Suspense=_m;ze.SuspenseList=Tm;ze.isAsyncMode=function(){return!1};ze.isConcurrentMode=function(){return!1};ze.isContextConsumer=function(e){return dr(e)===Cm};ze.isContextProvider=function(e){return dr(e)===Am};ze.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===u1};ze.isForwardRef=function(e){return dr(e)===Em};ze.isFragment=function(e){return dr(e)===wm};ze.isLazy=function(e){return dr(e)===Mm};ze.isMemo=function(e){return dr(e)===km};ze.isPortal=function(e){return dr(e)===f1};ze.isProfiler=function(e){return dr(e)===Om};ze.isStrictMode=function(e){return dr(e)===Nm};ze.isSuspense=function(e){return dr(e)===_m};ze.isSuspenseList=function(e){return dr(e)===Tm};ze.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===wm||e===Om||e===Nm||e===_m||e===Tm||e===yH||typeof e=="object"&&e!==null&&(e.$$typeof===Mm||e.$$typeof===km||e.$$typeof===Am||e.$$typeof===Cm||e.$$typeof===Em||e.$$typeof===Mk||e.getModuleId!==void 0)};ze.typeOf=dr;kk.exports=ze;var vH=kk.exports,gH=Ra,xH=Da,bH="[object Number]";function jH(e){return typeof e=="number"||xH(e)&&gH(e)==bH}var Pk=jH;const SH=$e(Pk);var wH=Pk;function NH(e){return wH(e)&&e!=+e}var OH=NH;const tc=$e(OH);var an=function(t){return t===0?0:t>0?1:-1},rs=function(t){return Ms(t)&&t.indexOf("%")===t.length-1},X=function(t){return SH(t)&&!tc(t)},AH=function(t){return oe(t)},kt=function(t){return X(t)||Ms(t)},CH=0,Di=function(t){var n=++CH;return"".concat(t||"").concat(n)},sn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!X(t)&&!Ms(t))return r;var i;if(rs(t)){var l=t.indexOf("%");i=n*parseFloat(t.slice(0,l))/100}else i=+t;return tc(i)&&(i=r),a&&i>n&&(i=n),i},Ja=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},EH=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},st=function(t,n){return X(t)&&X(n)?function(r){return t+r*(n-t)}:function(){return n}};function Ph(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Rn(r,t))===n})}var _H=function(t){if(!t||!t.length)return null;for(var n=t.length,r=0,a=0,i=0,l=0,o=1/0,c=-1/0,u=0,f=0,d=0;d<n;d++)u=t[d].cx||0,f=t[d].cy||0,r+=u,a+=f,i+=u*f,l+=u*u,o=Math.min(o,u),c=Math.max(c,u);var h=n*l!==r*r?(n*i-r*a)/(n*l-r*r):0;return{xmin:o,xmax:c,a:h,b:(a-h*r)/n}},TH=function(t,n){return X(t)&&X(n)?t-n:Ms(t)&&Ms(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Ml(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Qg(e){"@babel/helpers - typeof";return Qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qg(e)}var kH=["viewBox","children"],MH=["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"],Pw=["points","pathLength"],sv={svg:kH,polygon:Pw,polyline:Pw},d1=["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"],$h=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(S.isValidElement(t)&&(r=t.props),!Xo(r))return null;var a={};return Object.keys(r).forEach(function(i){d1.includes(i)&&(a[i]=n||function(l){return r[i](r,l)})}),a},PH=function(t,n,r){return function(a){return t(n,r,a),null}},Ti=function(t,n,r){if(!Xo(t)||Qg(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var l=t[i];d1.includes(i)&&typeof l=="function"&&(a||(a={}),a[i]=PH(l,n,r))}),a},$H=["children"],RH=["children"];function $w(e,t){if(e==null)return{};var n=DH(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DH(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Xg(e){"@babel/helpers - typeof";return Xg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xg(e)}var Rw={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},wa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},Dw=null,lv=null,h1=function e(t){if(t===Dw&&Array.isArray(lv))return lv;var n=[];return S.Children.forEach(t,function(r){oe(r)||(vH.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),lv=n,Dw=t,n};function cn(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return wa(a)}):r=[wa(t)],h1(e).forEach(function(a){var i=Rn(a,"type.displayName")||Rn(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function On(e,t){var n=cn(e,t);return n&&n[0]}var Lw=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!X(r)||r<=0||!X(a)||a<=0)},LH=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],zH=function(t){return t&&t.type&&Ms(t.type)&&LH.indexOf(t.type)>=0},$k=function(t){return t&&Xg(t)==="object"&&"clipDot"in t},IH=function(t,n,r,a){var i,l=(i=sv==null?void 0:sv[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!ce(t)&&(a&&l.includes(n)||MH.includes(n))||r&&d1.includes(n)},ae=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(S.isValidElement(t)&&(a=t.props),!Xo(a))return null;var i={};return Object.keys(a).forEach(function(l){var o;IH((o=a)===null||o===void 0?void 0:o[l],l,n,r)&&(i[l]=a[l])}),i},Zg=function e(t,n){if(t===n)return!0;var r=S.Children.count(t);if(r!==S.Children.count(n))return!1;if(r===0)return!0;if(r===1)return zw(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],l=n[a];if(Array.isArray(i)||Array.isArray(l)){if(!e(i,l))return!1}else if(!zw(i,l))return!1}return!0},zw=function(t,n){if(oe(t)&&oe(n))return!0;if(!oe(t)&&!oe(n)){var r=t.props||{},a=r.children,i=$w(r,$H),l=n.props||{},o=l.children,c=$w(l,RH);return a&&o?Ml(i,c)&&Zg(a,o):!a&&!o?Ml(i,c):!1}return!1},Iw=function(t,n){var r=[],a={};return h1(t).forEach(function(i,l){if(zH(i))r.push(i);else if(i){var o=wa(i.type),c=n[o]||{},u=c.handler,f=c.once;if(u&&(!f||!a[o])){var d=u(i,o,l);r.push(d),a[o]=!0}}}),r},BH=function(t){var n=t&&t.type;return n&&Rw[n]?Rw[n]:null},UH=function(t,n){return h1(n).indexOf(t)},qH=["children","width","height","viewBox","className","style","title","desc"];function Jg(){return Jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jg.apply(this,arguments)}function HH(e,t){if(e==null)return{};var n=FH(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FH(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ex(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,l=e.style,o=e.title,c=e.desc,u=HH(e,qH),f=a||{width:n,height:r,x:0,y:0},d=pe("recharts-surface",i);return T.createElement("svg",Jg({},ae(u,!0,"svg"),{className:d,width:n,height:r,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),T.createElement("title",null,o),T.createElement("desc",null,c),t)}var GH=["children","className"];function tx(){return tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tx.apply(this,arguments)}function KH(e,t){if(e==null)return{};var n=VH(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VH(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ge=T.forwardRef(function(e,t){var n=e.children,r=e.className,a=KH(e,GH),i=pe("recharts-layer",r);return T.createElement("g",tx({className:i},ae(a,!0),{ref:t}),n)}),Nr=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i]};function YH(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i}var WH=YH,QH=WH;function XH(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:QH(e,t,n)}var ZH=XH,JH="\\ud800-\\udfff",eF="\\u0300-\\u036f",tF="\\ufe20-\\ufe2f",nF="\\u20d0-\\u20ff",rF=eF+tF+nF,aF="\\ufe0e\\ufe0f",iF="\\u200d",sF=RegExp("["+iF+JH+rF+aF+"]");function lF(e){return sF.test(e)}var Rk=lF;function oF(e){return e.split("")}var cF=oF,Dk="\\ud800-\\udfff",uF="\\u0300-\\u036f",fF="\\ufe20-\\ufe2f",dF="\\u20d0-\\u20ff",hF=uF+fF+dF,pF="\\ufe0e\\ufe0f",mF="["+Dk+"]",nx="["+hF+"]",rx="\\ud83c[\\udffb-\\udfff]",yF="(?:"+nx+"|"+rx+")",Lk="[^"+Dk+"]",zk="(?:\\ud83c[\\udde6-\\uddff]){2}",Ik="[\\ud800-\\udbff][\\udc00-\\udfff]",vF="\\u200d",Bk=yF+"?",Uk="["+pF+"]?",gF="(?:"+vF+"(?:"+[Lk,zk,Ik].join("|")+")"+Uk+Bk+")*",xF=Uk+Bk+gF,bF="(?:"+[Lk+nx+"?",nx,zk,Ik,mF].join("|")+")",jF=RegExp(rx+"(?="+rx+")|"+bF+xF,"g");function SF(e){return e.match(jF)||[]}var wF=SF,NF=cF,OF=Rk,AF=wF;function CF(e){return OF(e)?AF(e):NF(e)}var EF=CF,_F=ZH,TF=Rk,kF=EF,MF=Ek;function PF(e){return function(t){t=MF(t);var n=TF(t)?kF(t):void 0,r=n?n[0]:t.charAt(0),a=n?_F(n,1).join(""):t.slice(1);return r[e]()+a}}var $F=PF,RF=$F,DF=RF("toUpperCase"),LF=DF;const Pm=$e(LF);function Ke(e){return function(){return e}}const qk=Math.cos,Rh=Math.sin,Mr=Math.sqrt,Dh=Math.PI,$m=2*Dh,ax=Math.PI,ix=2*ax,Zi=1e-6,zF=ix-Zi;function Hk(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function IF(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Hk;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class BF{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Hk:IF(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,l){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+l}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let l=this._x1,o=this._y1,c=r-t,u=a-n,f=l-t,d=o-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Zi)if(!(Math.abs(d*c-u*f)>Zi)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-l,j=a-o,v=c*c+u*u,p=m*m+j*j,y=Math.sqrt(v),g=Math.sqrt(h),b=i*Math.tan((ax-Math.acos((v+h-p)/(2*y*g)))/2),x=b/g,N=b/y;Math.abs(x-1)>Zi&&this._append`L${t+x*f},${n+x*d}`,this._append`A${i},${i},0,0,${+(d*m>f*j)},${this._x1=t+N*c},${this._y1=n+N*u}`}}arc(t,n,r,a,i,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(a),c=r*Math.sin(a),u=t+o,f=n+c,d=1^l,h=l?a-i:i-a;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Zi||Math.abs(this._y1-f)>Zi)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%ix+ix),h>zF?this._append`A${r},${r},0,1,${d},${t-o},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>Zi&&this._append`A${r},${r},0,${+(h>=ax)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function p1(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new BF(t)}function m1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Fk(e){this._context=e}Fk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Rm(e){return new Fk(e)}function Gk(e){return e[0]}function Kk(e){return e[1]}function Vk(e,t){var n=Ke(!0),r=null,a=Rm,i=null,l=p1(o);e=typeof e=="function"?e:e===void 0?Gk:Ke(e),t=typeof t=="function"?t:t===void 0?Kk:Ke(t);function o(c){var u,f=(c=m1(c)).length,d,h=!1,m;for(r==null&&(i=a(m=l())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(d,u,c),+t(d,u,c));if(m)return i=null,m+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ke(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ke(+c),o):t},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ke(!!c),o):n},o.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),o):a},o.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),o):r},o}function od(e,t,n){var r=null,a=Ke(!0),i=null,l=Rm,o=null,c=p1(u);e=typeof e=="function"?e:e===void 0?Gk:Ke(+e),t=typeof t=="function"?t:Ke(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Kk:Ke(+n);function u(d){var h,m,j,v=(d=m1(d)).length,p,y=!1,g,b=new Array(v),x=new Array(v);for(i==null&&(o=l(g=c())),h=0;h<=v;++h){if(!(h<v&&a(p=d[h],h,d))===y)if(y=!y)m=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),j=h-1;j>=m;--j)o.point(b[j],x[j]);o.lineEnd(),o.areaEnd()}y&&(b[h]=+e(p,h,d),x[h]=+t(p,h,d),o.point(r?+r(p,h,d):b[h],n?+n(p,h,d):x[h]))}if(g)return o=null,g+""||null}function f(){return Vk().defined(a).curve(l).context(i)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ke(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ke(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Ke(!!d),u):a},u.curve=function(d){return arguments.length?(l=d,i!=null&&(o=l(i)),u):l},u.context=function(d){return arguments.length?(d==null?i=o=null:o=l(i=d),u):i},u}class Yk{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function UF(e){return new Yk(e,!0)}function qF(e){return new Yk(e,!1)}const y1={draw(e,t){const n=Mr(t/Dh);e.moveTo(n,0),e.arc(0,0,n,0,$m)}},HF={draw(e,t){const n=Mr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Wk=Mr(1/3),FF=Wk*2,GF={draw(e,t){const n=Mr(t/FF),r=n*Wk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},KF={draw(e,t){const n=Mr(t),r=-n/2;e.rect(r,r,n,n)}},VF=.8908130915292852,Qk=Rh(Dh/10)/Rh(7*Dh/10),YF=Rh($m/10)*Qk,WF=-qk($m/10)*Qk,QF={draw(e,t){const n=Mr(t*VF),r=YF*n,a=WF*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const l=$m*i/5,o=qk(l),c=Rh(l);e.lineTo(c*n,-o*n),e.lineTo(o*r-c*a,c*r+o*a)}e.closePath()}},ov=Mr(3),XF={draw(e,t){const n=-Mr(t/(ov*3));e.moveTo(0,n*2),e.lineTo(-ov*n,-n),e.lineTo(ov*n,-n),e.closePath()}},Un=-.5,qn=Mr(3)/2,sx=1/Mr(12),ZF=(sx/2+1)*3,JF={draw(e,t){const n=Mr(t/ZF),r=n/2,a=n*sx,i=r,l=n*sx+n,o=-i,c=l;e.moveTo(r,a),e.lineTo(i,l),e.lineTo(o,c),e.lineTo(Un*r-qn*a,qn*r+Un*a),e.lineTo(Un*i-qn*l,qn*i+Un*l),e.lineTo(Un*o-qn*c,qn*o+Un*c),e.lineTo(Un*r+qn*a,Un*a-qn*r),e.lineTo(Un*i+qn*l,Un*l-qn*i),e.lineTo(Un*o+qn*c,Un*c-qn*o),e.closePath()}};function eG(e,t){let n=null,r=p1(a);e=typeof e=="function"?e:Ke(e||y1),t=typeof t=="function"?t:Ke(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Ke(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ke(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function Lh(){}function zh(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Xk(e){this._context=e}Xk.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:zh(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function tG(e){return new Xk(e)}function Zk(e){this._context=e}Zk.prototype={areaStart:Lh,areaEnd:Lh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nG(e){return new Zk(e)}function Jk(e){this._context=e}Jk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function rG(e){return new Jk(e)}function e3(e){this._context=e}e3.prototype={areaStart:Lh,areaEnd:Lh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function aG(e){return new e3(e)}function Bw(e){return e<0?-1:1}function Uw(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),l=(n-e._y1)/(a||r<0&&-0),o=(i*a+l*r)/(r+a);return(Bw(i)+Bw(l))*Math.min(Math.abs(i),Math.abs(l),.5*Math.abs(o))||0}function qw(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function cv(e,t,n){var r=e._x0,a=e._y0,i=e._x1,l=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,l-o*n,i,l)}function Ih(e){this._context=e}Ih.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:cv(this,this._t0,qw(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,cv(this,qw(this,n=Uw(this,e,t)),n);break;default:cv(this,this._t0,n=Uw(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function t3(e){this._context=new n3(e)}(t3.prototype=Object.create(Ih.prototype)).point=function(e,t){Ih.prototype.point.call(this,t,e)};function n3(e){this._context=e}n3.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function iG(e){return new Ih(e)}function sG(e){return new t3(e)}function r3(e){this._context=e}r3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Hw(e),a=Hw(t),i=0,l=1;l<n;++i,++l)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[l],t[l]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Hw(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),l=new Array(n);for(a[0]=0,i[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,l[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,l[t]-=r*l[t-1];for(a[n-1]=l[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(l[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function lG(e){return new r3(e)}function Dm(e,t){this._context=e,this._t=t}Dm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function oG(e){return new Dm(e,.5)}function cG(e){return new Dm(e,0)}function uG(e){return new Dm(e,1)}function so(e,t){if((l=e.length)>1)for(var n=1,r,a,i=e[t[0]],l,o=i.length;n<l;++n)for(a=i,i=e[t[n]],r=0;r<o;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function lx(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function fG(e,t){return e[t]}function dG(e){const t=[];return t.key=e,t}function hG(){var e=Ke([]),t=lx,n=so,r=fG;function a(i){var l=Array.from(e.apply(this,arguments),dG),o,c=l.length,u=-1,f;for(const d of i)for(o=0,++u;o<c;++o)(l[o][u]=[0,+r(d,l[o].key,u,i)]).data=d;for(o=0,f=m1(t(l));o<c;++o)l[f[o]].index=o;return n(l,f),l}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Ke(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Ke(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?lx:typeof i=="function"?i:Ke(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??so,a):n},a}function pG(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,l;a<i;++a){for(l=n=0;n<r;++n)l+=e[n][a][1]||0;if(l)for(n=0;n<r;++n)e[n][a][1]/=l}so(e,t)}}function mG(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var l=0,o=0;l<a;++l)o+=e[l][n][1]||0;r[n][1]+=r[n][0]=-o/2}so(e,t)}}function yG(e,t){if(!(!((l=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,l;r<i;++r){for(var o=0,c=0,u=0;o<l;++o){for(var f=e[t[o]],d=f[r][1]||0,h=f[r-1][1]||0,m=(d-h)/2,j=0;j<o;++j){var v=e[t[j]],p=v[r][1]||0,y=v[r-1][1]||0;m+=p-y}c+=d,u+=m*d}a[r-1][1]+=a[r-1][0]=n,c&&(n-=u/c)}a[r-1][1]+=a[r-1][0]=n,so(e,t)}}function ju(e){"@babel/helpers - typeof";return ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(e)}var vG=["type","size","sizeType"];function ox(){return ox=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ox.apply(this,arguments)}function Fw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fw(Object(n),!0).forEach(function(r){gG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gG(e,t,n){return t=xG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xG(e){var t=bG(e,"string");return ju(t)=="symbol"?t:t+""}function bG(e,t){if(ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jG(e,t){if(e==null)return{};var n=SG(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SG(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var a3={symbolCircle:y1,symbolCross:HF,symbolDiamond:GF,symbolSquare:KF,symbolStar:QF,symbolTriangle:XF,symbolWye:JF},wG=Math.PI/180,NG=function(t){var n="symbol".concat(Pm(t));return a3[n]||y1},OG=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*wG;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},AG=function(t,n){a3["symbol".concat(Pm(t))]=n},Lm=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,l=t.sizeType,o=l===void 0?"area":l,c=jG(t,vG),u=Gw(Gw({},c),{},{type:r,size:i,sizeType:o}),f=function(){var p=NG(r),y=eG().type(p).size(OG(i,o,r));return y()},d=u.className,h=u.cx,m=u.cy,j=ae(u,!0);return h===+h&&m===+m&&i===+i?T.createElement("path",ox({},j,{className:pe("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(m,")"),d:f()})):null};Lm.registerSymbol=AG;function lo(e){"@babel/helpers - typeof";return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lo(e)}function cx(){return cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cx.apply(this,arguments)}function Kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function CG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Kw(Object(n),!0).forEach(function(r){Su(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _G(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s3(r.key),r)}}function TG(e,t,n){return t&&_G(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kG(e,t,n){return t=Bh(t),MG(e,i3()?Reflect.construct(t,n||[],Bh(e).constructor):t.apply(e,n))}function MG(e,t){if(t&&(lo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PG(e)}function PG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i3=function(){return!!e})()}function Bh(e){return Bh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bh(e)}function $G(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ux(e,t)}function ux(e,t){return ux=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},ux(e,t)}function Su(e,t,n){return t=s3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s3(e){var t=RG(e,"string");return lo(t)=="symbol"?t:t+""}function RG(e,t){if(lo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Hn=32,v1=function(e){function t(){return EG(this,t),kG(this,t,arguments)}return $G(t,e),TG(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,i=Hn/2,l=Hn/6,o=Hn/3,c=r.inactive?a:r.color;if(r.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:Hn,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(o,`
            A`).concat(l,",").concat(l,",0,1,1,").concat(2*o,",").concat(i,`
            H`).concat(Hn,"M").concat(2*o,",").concat(i,`
            A`).concat(l,",").concat(l,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return T.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Hn/8,"h").concat(Hn,"v").concat(Hn*3/4,"h").concat(-Hn,"z"),className:"recharts-legend-icon"});if(T.isValidElement(r.legendIcon)){var u=CG({},r);return delete u.legendIcon,T.cloneElement(r.legendIcon,u)}return T.createElement(Lm,{fill:c,cx:i,cy:i,size:Hn,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,i=a.payload,l=a.iconSize,o=a.layout,c=a.formatter,u=a.inactiveColor,f={x:0,y:0,width:Hn,height:Hn},d={display:o==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(m,j){var v=m.formatter||c,p=pe(Su(Su({"recharts-legend-item":!0},"legend-item-".concat(j),!0),"inactive",m.inactive));if(m.type==="none")return null;var y=ce(m.value)?null:m.value;Nr(!ce(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var g=m.inactive?u:m.color;return T.createElement("li",cx({className:p,style:d,key:"legend-item-".concat(j)},Ti(r.props,m,j)),T.createElement(ex,{width:l,height:l,viewBox:f,style:h},r.renderIcon(m)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:g}},v?v(y,m,j):y))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,l=r.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?l:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(S.PureComponent);Su(v1,"displayName","Legend");Su(v1,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var DG=bm;function LG(){this.__data__=new DG,this.size=0}var zG=LG;function IG(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var BG=IG;function UG(e){return this.__data__.get(e)}var qG=UG;function HG(e){return this.__data__.has(e)}var FG=HG,GG=bm,KG=i1,VG=s1,YG=200;function WG(e,t){var n=this.__data__;if(n instanceof GG){var r=n.__data__;if(!KG||r.length<YG-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new VG(r)}return n.set(e,t),this.size=n.size,this}var QG=WG,XG=bm,ZG=zG,JG=BG,eK=qG,tK=FG,nK=QG;function nc(e){var t=this.__data__=new XG(e);this.size=t.size}nc.prototype.clear=ZG;nc.prototype.delete=JG;nc.prototype.get=eK;nc.prototype.has=tK;nc.prototype.set=nK;var l3=nc,rK="__lodash_hash_undefined__";function aK(e){return this.__data__.set(e,rK),this}var iK=aK;function sK(e){return this.__data__.has(e)}var lK=sK,oK=s1,cK=iK,uK=lK;function Uh(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new oK;++t<n;)this.add(e[t])}Uh.prototype.add=Uh.prototype.push=cK;Uh.prototype.has=uK;var o3=Uh;function fK(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var c3=fK;function dK(e,t){return e.has(t)}var u3=dK,hK=o3,pK=c3,mK=u3,yK=1,vK=2;function gK(e,t,n,r,a,i){var l=n&yK,o=e.length,c=t.length;if(o!=c&&!(l&&c>o))return!1;var u=i.get(e),f=i.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,m=n&vK?new hK:void 0;for(i.set(e,t),i.set(t,e);++d<o;){var j=e[d],v=t[d];if(r)var p=l?r(v,j,d,t,e,i):r(j,v,d,e,t,i);if(p!==void 0){if(p)continue;h=!1;break}if(m){if(!pK(t,function(y,g){if(!mK(m,g)&&(j===y||a(j,y,n,r,i)))return m.push(g)})){h=!1;break}}else if(!(j===v||a(j,v,n,r,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var f3=gK,xK=Jr,bK=xK.Uint8Array,jK=bK;function SK(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n}var wK=SK;function NK(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var g1=NK,Vw=Tf,Yw=jK,OK=a1,AK=f3,CK=wK,EK=g1,_K=1,TK=2,kK="[object Boolean]",MK="[object Date]",PK="[object Error]",$K="[object Map]",RK="[object Number]",DK="[object RegExp]",LK="[object Set]",zK="[object String]",IK="[object Symbol]",BK="[object ArrayBuffer]",UK="[object DataView]",Ww=Vw?Vw.prototype:void 0,uv=Ww?Ww.valueOf:void 0;function qK(e,t,n,r,a,i,l){switch(n){case UK:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case BK:return!(e.byteLength!=t.byteLength||!i(new Yw(e),new Yw(t)));case kK:case MK:case RK:return OK(+e,+t);case PK:return e.name==t.name&&e.message==t.message;case DK:case zK:return e==t+"";case $K:var o=CK;case LK:var c=r&_K;if(o||(o=EK),e.size!=t.size&&!c)return!1;var u=l.get(e);if(u)return u==t;r|=TK,l.set(e,t);var f=AK(o(e),o(t),r,a,i,l);return l.delete(e),f;case IK:if(uv)return uv.call(e)==uv.call(t)}return!1}var HK=qK;function FK(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}var d3=FK,GK=d3,KK=jn;function VK(e,t,n){var r=t(e);return KK(e)?r:GK(r,n(e))}var YK=VK;function WK(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var l=e[n];t(l,n,e)&&(i[a++]=l)}return i}var QK=WK;function XK(){return[]}var ZK=XK,JK=QK,eV=ZK,tV=Object.prototype,nV=tV.propertyIsEnumerable,Qw=Object.getOwnPropertySymbols,rV=Qw?function(e){return e==null?[]:(e=Object(e),JK(Qw(e),function(t){return nV.call(e,t)}))}:eV,aV=rV;function iV(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var sV=iV,lV=Ra,oV=Da,cV="[object Arguments]";function uV(e){return oV(e)&&lV(e)==cV}var fV=uV,Xw=fV,dV=Da,h3=Object.prototype,hV=h3.hasOwnProperty,pV=h3.propertyIsEnumerable,mV=Xw(function(){return arguments}())?Xw:function(e){return dV(e)&&hV.call(e,"callee")&&!pV.call(e,"callee")},x1=mV,qh={exports:{}};function yV(){return!1}var vV=yV;qh.exports;(function(e,t){var n=Jr,r=vV,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,l=i&&i.exports===a,o=l?n.Buffer:void 0,c=o?o.isBuffer:void 0,u=c||r;e.exports=u})(qh,qh.exports);var p3=qh.exports,gV=9007199254740991,xV=/^(?:0|[1-9]\d*)$/;function bV(e,t){var n=typeof e;return t=t??gV,!!t&&(n=="number"||n!="symbol"&&xV.test(e))&&e>-1&&e%1==0&&e<t}var b1=bV,jV=9007199254740991;function SV(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=jV}var j1=SV,wV=Ra,NV=j1,OV=Da,AV="[object Arguments]",CV="[object Array]",EV="[object Boolean]",_V="[object Date]",TV="[object Error]",kV="[object Function]",MV="[object Map]",PV="[object Number]",$V="[object Object]",RV="[object RegExp]",DV="[object Set]",LV="[object String]",zV="[object WeakMap]",IV="[object ArrayBuffer]",BV="[object DataView]",UV="[object Float32Array]",qV="[object Float64Array]",HV="[object Int8Array]",FV="[object Int16Array]",GV="[object Int32Array]",KV="[object Uint8Array]",VV="[object Uint8ClampedArray]",YV="[object Uint16Array]",WV="[object Uint32Array]",Xe={};Xe[UV]=Xe[qV]=Xe[HV]=Xe[FV]=Xe[GV]=Xe[KV]=Xe[VV]=Xe[YV]=Xe[WV]=!0;Xe[AV]=Xe[CV]=Xe[IV]=Xe[EV]=Xe[BV]=Xe[_V]=Xe[TV]=Xe[kV]=Xe[MV]=Xe[PV]=Xe[$V]=Xe[RV]=Xe[DV]=Xe[LV]=Xe[zV]=!1;function QV(e){return OV(e)&&NV(e.length)&&!!Xe[wV(e)]}var XV=QV;function ZV(e){return function(t){return e(t)}}var m3=ZV,Hh={exports:{}};Hh.exports;(function(e,t){var n=Sk,r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,l=i&&n.process,o=function(){try{var c=a&&a.require&&a.require("util").types;return c||l&&l.binding&&l.binding("util")}catch{}}();e.exports=o})(Hh,Hh.exports);var JV=Hh.exports,eY=XV,tY=m3,Zw=JV,Jw=Zw&&Zw.isTypedArray,nY=Jw?tY(Jw):eY,y3=nY,rY=sV,aY=x1,iY=jn,sY=p3,lY=b1,oY=y3,cY=Object.prototype,uY=cY.hasOwnProperty;function fY(e,t){var n=iY(e),r=!n&&aY(e),a=!n&&!r&&sY(e),i=!n&&!r&&!a&&oY(e),l=n||r||a||i,o=l?rY(e.length,String):[],c=o.length;for(var u in e)(t||uY.call(e,u))&&!(l&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||lY(u,c)))&&o.push(u);return o}var dY=fY,hY=Object.prototype;function pY(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||hY;return e===n}var mY=pY;function yY(e,t){return function(n){return e(t(n))}}var v3=yY,vY=v3,gY=vY(Object.keys,Object),xY=gY,bY=mY,jY=xY,SY=Object.prototype,wY=SY.hasOwnProperty;function NY(e){if(!bY(e))return jY(e);var t=[];for(var n in Object(e))wY.call(e,n)&&n!="constructor"&&t.push(n);return t}var OY=NY,AY=r1,CY=j1;function EY(e){return e!=null&&CY(e.length)&&!AY(e)}var kf=EY,_Y=dY,TY=OY,kY=kf;function MY(e){return kY(e)?_Y(e):TY(e)}var zm=MY,PY=YK,$Y=aV,RY=zm;function DY(e){return PY(e,RY,$Y)}var LY=DY,e2=LY,zY=1,IY=Object.prototype,BY=IY.hasOwnProperty;function UY(e,t,n,r,a,i){var l=n&zY,o=e2(e),c=o.length,u=e2(t),f=u.length;if(c!=f&&!l)return!1;for(var d=c;d--;){var h=o[d];if(!(l?h in t:BY.call(t,h)))return!1}var m=i.get(e),j=i.get(t);if(m&&j)return m==t&&j==e;var v=!0;i.set(e,t),i.set(t,e);for(var p=l;++d<c;){h=o[d];var y=e[h],g=t[h];if(r)var b=l?r(g,y,h,t,e,i):r(y,g,h,e,t,i);if(!(b===void 0?y===g||a(y,g,n,r,i):b)){v=!1;break}p||(p=h=="constructor")}if(v&&!p){var x=e.constructor,N=t.constructor;x!=N&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof N=="function"&&N instanceof N)&&(v=!1)}return i.delete(e),i.delete(t),v}var qY=UY,HY=qs,FY=Jr,GY=HY(FY,"DataView"),KY=GY,VY=qs,YY=Jr,WY=VY(YY,"Promise"),QY=WY,XY=qs,ZY=Jr,JY=XY(ZY,"Set"),g3=JY,eW=qs,tW=Jr,nW=eW(tW,"WeakMap"),rW=nW,fx=KY,dx=i1,hx=QY,px=g3,mx=rW,x3=Ra,rc=Nk,t2="[object Map]",aW="[object Object]",n2="[object Promise]",r2="[object Set]",a2="[object WeakMap]",i2="[object DataView]",iW=rc(fx),sW=rc(dx),lW=rc(hx),oW=rc(px),cW=rc(mx),Ji=x3;(fx&&Ji(new fx(new ArrayBuffer(1)))!=i2||dx&&Ji(new dx)!=t2||hx&&Ji(hx.resolve())!=n2||px&&Ji(new px)!=r2||mx&&Ji(new mx)!=a2)&&(Ji=function(e){var t=x3(e),n=t==aW?e.constructor:void 0,r=n?rc(n):"";if(r)switch(r){case iW:return i2;case sW:return t2;case lW:return n2;case oW:return r2;case cW:return a2}return t});var uW=Ji,fv=l3,fW=f3,dW=HK,hW=qY,s2=uW,l2=jn,o2=p3,pW=y3,mW=1,c2="[object Arguments]",u2="[object Array]",cd="[object Object]",yW=Object.prototype,f2=yW.hasOwnProperty;function vW(e,t,n,r,a,i){var l=l2(e),o=l2(t),c=l?u2:s2(e),u=o?u2:s2(t);c=c==c2?cd:c,u=u==c2?cd:u;var f=c==cd,d=u==cd,h=c==u;if(h&&o2(e)){if(!o2(t))return!1;l=!0,f=!1}if(h&&!f)return i||(i=new fv),l||pW(e)?fW(e,t,n,r,a,i):dW(e,t,c,n,r,a,i);if(!(n&mW)){var m=f&&f2.call(e,"__wrapped__"),j=d&&f2.call(t,"__wrapped__");if(m||j){var v=m?e.value():e,p=j?t.value():t;return i||(i=new fv),a(v,p,n,r,i)}}return h?(i||(i=new fv),hW(e,t,n,r,a,i)):!1}var gW=vW,xW=gW,d2=Da;function b3(e,t,n,r,a){return e===t?!0:e==null||t==null||!d2(e)&&!d2(t)?e!==e&&t!==t:xW(e,t,n,r,b3,a)}var S1=b3,bW=l3,jW=S1,SW=1,wW=2;function NW(e,t,n,r){var a=n.length,i=a,l=!r;if(e==null)return!i;for(e=Object(e);a--;){var o=n[a];if(l&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){o=n[a];var c=o[0],u=e[c],f=o[1];if(l&&o[2]){if(u===void 0&&!(c in e))return!1}else{var d=new bW;if(r)var h=r(u,f,c,e,t,d);if(!(h===void 0?jW(f,u,SW|wW,r,d):h))return!1}}return!0}var OW=NW,AW=Ri;function CW(e){return e===e&&!AW(e)}var j3=CW,EW=j3,_W=zm;function TW(e){for(var t=_W(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,EW(a)]}return t}var kW=TW;function MW(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var S3=MW,PW=OW,$W=kW,RW=S3;function DW(e){var t=$W(e);return t.length==1&&t[0][2]?RW(t[0][0],t[0][1]):function(n){return n===e||PW(n,e,t)}}var LW=DW;function zW(e,t){return e!=null&&t in Object(e)}var IW=zW,BW=_k,UW=x1,qW=jn,HW=b1,FW=j1,GW=Sm;function KW(e,t,n){t=BW(t,e);for(var r=-1,a=t.length,i=!1;++r<a;){var l=GW(t[r]);if(!(i=e!=null&&n(e,l)))break;e=e[l]}return i||++r!=a?i:(a=e==null?0:e.length,!!a&&FW(a)&&HW(l,a)&&(qW(e)||UW(e)))}var VW=KW,YW=IW,WW=VW;function QW(e,t){return e!=null&&WW(e,t,YW)}var XW=QW,ZW=S1,JW=Tk,eQ=XW,tQ=n1,nQ=j3,rQ=S3,aQ=Sm,iQ=1,sQ=2;function lQ(e,t){return tQ(e)&&nQ(t)?rQ(aQ(e),t):function(n){var r=JW(n,e);return r===void 0&&r===t?eQ(n,e):ZW(t,r,iQ|sQ)}}var oQ=lQ;function cQ(e){return e}var ac=cQ;function uQ(e){return function(t){return t==null?void 0:t[e]}}var fQ=uQ,dQ=c1;function hQ(e){return function(t){return dQ(t,e)}}var pQ=hQ,mQ=fQ,yQ=pQ,vQ=n1,gQ=Sm;function xQ(e){return vQ(e)?mQ(gQ(e)):yQ(e)}var bQ=xQ,jQ=LW,SQ=oQ,wQ=ac,NQ=jn,OQ=bQ;function AQ(e){return typeof e=="function"?e:e==null?wQ:typeof e=="object"?NQ(e)?SQ(e[0],e[1]):jQ(e):OQ(e)}var ea=AQ;function CQ(e,t,n,r){for(var a=e.length,i=n+(r?1:-1);r?i--:++i<a;)if(t(e[i],i,e))return i;return-1}var w3=CQ;function EQ(e){return e!==e}var _Q=EQ;function TQ(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}var kQ=TQ,MQ=w3,PQ=_Q,$Q=kQ;function RQ(e,t,n){return t===t?$Q(e,t,n):MQ(e,PQ,n)}var DQ=RQ,LQ=DQ;function zQ(e,t){var n=e==null?0:e.length;return!!n&&LQ(e,t,0)>-1}var IQ=zQ;function BQ(e,t,n){for(var r=-1,a=e==null?0:e.length;++r<a;)if(n(t,e[r]))return!0;return!1}var UQ=BQ;function qQ(){}var HQ=qQ,dv=g3,FQ=HQ,GQ=g1,KQ=1/0,VQ=dv&&1/GQ(new dv([,-0]))[1]==KQ?function(e){return new dv(e)}:FQ,YQ=VQ,WQ=o3,QQ=IQ,XQ=UQ,ZQ=u3,JQ=YQ,eX=g1,tX=200;function nX(e,t,n){var r=-1,a=QQ,i=e.length,l=!0,o=[],c=o;if(n)l=!1,a=XQ;else if(i>=tX){var u=t?null:JQ(e);if(u)return eX(u);l=!1,a=ZQ,c=new WQ}else c=t?[]:o;e:for(;++r<i;){var f=e[r],d=t?t(f):f;if(f=n||f!==0?f:0,l&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),o.push(f)}else a(c,d,n)||(c!==o&&c.push(d),o.push(f))}return o}var rX=nX,aX=ea,iX=rX;function sX(e,t){return e&&e.length?iX(e,aX(t)):[]}var lX=sX;const h2=$e(lX);function N3(e,t,n){return t===!0?h2(e,n):ce(t)?h2(e,t):e}function oo(e){"@babel/helpers - typeof";return oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oo(e)}var oX=["ref"];function p2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p2(Object(n),!0).forEach(function(r){Im(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cX(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,A3(r.key),r)}}function uX(e,t,n){return t&&m2(e.prototype,t),n&&m2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fX(e,t,n){return t=Fh(t),dX(e,O3()?Reflect.construct(t,n||[],Fh(e).constructor):t.apply(e,n))}function dX(e,t){if(t&&(oo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hX(e)}function hX(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(O3=function(){return!!e})()}function Fh(e){return Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fh(e)}function pX(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yx(e,t)}function yx(e,t){return yx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},yx(e,t)}function Im(e,t,n){return t=A3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A3(e){var t=mX(e,"string");return oo(t)=="symbol"?t:t+""}function mX(e,t){if(oo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function yX(e,t){if(e==null)return{};var n=vX(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vX(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gX(e){return e.value}function xX(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var n=yX(t,oX);return T.createElement(v1,n)}var y2=1,tr=function(e){function t(){var n;cX(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=fX(this,t,[].concat(a)),Im(n,"lastBoundingBox",{width:-1,height:-1}),n}return pX(t,e),uX(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>y2||Math.abs(a.height-this.lastBoundingBox.height)>y2)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?sa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,l=a.align,o=a.verticalAlign,c=a.margin,u=a.chartWidth,f=a.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&i==="vertical"){var m=this.getBBoxSnapshot();d={left:((u||0)-m.width)/2}}else d=l==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var j=this.getBBoxSnapshot();h={top:((f||0)-j.height)/2}}else h=o==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return sa(sa({},d),h)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,l=a.width,o=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,f=a.payload,d=sa(sa({position:"absolute",width:l||"auto",height:o||"auto"},this.getDefaultPosition(c)),c);return T.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},xX(i,sa(sa({},this.props),{},{payload:N3(f,u,gX)})))}}],[{key:"getWithHeight",value:function(r,a){var i=sa(sa({},this.defaultProps),r.props),l=i.layout;return l==="vertical"&&X(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||a}:null}}])}(S.PureComponent);Im(tr,"displayName","Legend");Im(tr,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var v2=Tf,bX=x1,jX=jn,g2=v2?v2.isConcatSpreadable:void 0;function SX(e){return jX(e)||bX(e)||!!(g2&&e&&e[g2])}var wX=SX,NX=d3,OX=wX;function C3(e,t,n,r,a){var i=-1,l=e.length;for(n||(n=OX),a||(a=[]);++i<l;){var o=e[i];t>0&&n(o)?t>1?C3(o,t-1,n,r,a):NX(a,o):r||(a[a.length]=o)}return a}var E3=C3;function AX(e){return function(t,n,r){for(var a=-1,i=Object(t),l=r(t),o=l.length;o--;){var c=l[e?o:++a];if(n(i[c],c,i)===!1)break}return t}}var CX=AX,EX=CX,_X=EX(),TX=_X,kX=TX,MX=zm;function PX(e,t){return e&&kX(e,t,MX)}var _3=PX,$X=kf;function RX(e,t){return function(n,r){if(n==null)return n;if(!$X(n))return e(n,r);for(var a=n.length,i=t?a:-1,l=Object(n);(t?i--:++i<a)&&r(l[i],i,l)!==!1;);return n}}var DX=RX,LX=_3,zX=DX,IX=zX(LX),w1=IX,BX=w1,UX=kf;function qX(e,t){var n=-1,r=UX(e)?Array(e.length):[];return BX(e,function(a,i,l){r[++n]=t(a,i,l)}),r}var T3=qX;function HX(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var FX=HX,x2=Qo;function GX(e,t){if(e!==t){var n=e!==void 0,r=e===null,a=e===e,i=x2(e),l=t!==void 0,o=t===null,c=t===t,u=x2(t);if(!o&&!u&&!i&&e>t||i&&l&&c&&!o&&!u||r&&l&&c||!n&&c||!a)return 1;if(!r&&!i&&!u&&e<t||u&&n&&a&&!r&&!i||o&&n&&a||!l&&a||!c)return-1}return 0}var KX=GX,VX=KX;function YX(e,t,n){for(var r=-1,a=e.criteria,i=t.criteria,l=a.length,o=n.length;++r<l;){var c=VX(a[r],i[r]);if(c){if(r>=o)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var WX=YX,hv=o1,QX=c1,XX=ea,ZX=T3,JX=FX,eZ=m3,tZ=WX,nZ=ac,rZ=jn;function aZ(e,t,n){t.length?t=hv(t,function(i){return rZ(i)?function(l){return QX(l,i.length===1?i[0]:i)}:i}):t=[nZ];var r=-1;t=hv(t,eZ(XX));var a=ZX(e,function(i,l,o){var c=hv(t,function(u){return u(i)});return{criteria:c,index:++r,value:i}});return JX(a,function(i,l){return tZ(i,l,n)})}var iZ=aZ;function sZ(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var lZ=sZ,oZ=lZ,b2=Math.max;function cZ(e,t,n){return t=b2(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=b2(r.length-t,0),l=Array(i);++a<i;)l[a]=r[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=r[a];return o[t]=n(l),oZ(e,this,o)}}var uZ=cZ;function fZ(e){return function(){return e}}var dZ=fZ,hZ=qs,pZ=function(){try{var e=hZ(Object,"defineProperty");return e({},"",{}),e}catch{}}(),k3=pZ,mZ=dZ,j2=k3,yZ=ac,vZ=j2?function(e,t){return j2(e,"toString",{configurable:!0,enumerable:!1,value:mZ(t),writable:!0})}:yZ,gZ=vZ,xZ=800,bZ=16,jZ=Date.now;function SZ(e){var t=0,n=0;return function(){var r=jZ(),a=bZ-(r-n);if(n=r,a>0){if(++t>=xZ)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var wZ=SZ,NZ=gZ,OZ=wZ,AZ=OZ(NZ),CZ=AZ,EZ=ac,_Z=uZ,TZ=CZ;function kZ(e,t){return TZ(_Z(e,t,EZ),e+"")}var MZ=kZ,PZ=a1,$Z=kf,RZ=b1,DZ=Ri;function LZ(e,t,n){if(!DZ(n))return!1;var r=typeof t;return(r=="number"?$Z(n)&&RZ(t,n.length):r=="string"&&t in n)?PZ(n[t],e):!1}var Bm=LZ,zZ=E3,IZ=iZ,BZ=MZ,S2=Bm,UZ=BZ(function(e,t){if(e==null)return[];var n=t.length;return n>1&&S2(e,t[0],t[1])?t=[]:n>2&&S2(t[0],t[1],t[2])&&(t=[t[0]]),IZ(e,zZ(t,1),[])}),qZ=UZ;const N1=$e(qZ);function wu(e){"@babel/helpers - typeof";return wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wu(e)}function vx(){return vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vx.apply(this,arguments)}function HZ(e,t){return VZ(e)||KZ(e,t)||GZ(e,t)||FZ()}function FZ(){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 GZ(e,t){if(e){if(typeof e=="string")return w2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w2(e,t)}}function w2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function VZ(e){if(Array.isArray(e))return e}function N2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N2(Object(n),!0).forEach(function(r){YZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YZ(e,t,n){return t=WZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WZ(e){var t=QZ(e,"string");return wu(t)=="symbol"?t:t+""}function QZ(e,t){if(wu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XZ(e){return Array.isArray(e)&&kt(e[0])&&kt(e[1])?e.join(" ~ "):e}var ZZ=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,l=t.itemStyle,o=l===void 0?{}:l,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,h=t.itemSorter,m=t.wrapperClassName,j=t.labelClassName,v=t.label,p=t.labelFormatter,y=t.accessibilityLayer,g=y===void 0?!1:y,b=function(){if(f&&f.length){var k={padding:0,margin:0},I=(h?N1(f,h):f).map(function(_,C){if(_.type==="none")return null;var P=pv({display:"block",paddingTop:4,paddingBottom:4,color:_.color||"#000"},o),z=_.formatter||d||XZ,B=_.value,K=_.name,Y=B,Q=K;if(z&&Y!=null&&Q!=null){var Z=z(B,K,_,C,f);if(Array.isArray(Z)){var ne=HZ(Z,2);Y=ne[0],Q=ne[1]}else Y=Z}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(C),style:P},kt(Q)?T.createElement("span",{className:"recharts-tooltip-item-name"},Q):null,kt(Q)?T.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,T.createElement("span",{className:"recharts-tooltip-item-value"},Y),T.createElement("span",{className:"recharts-tooltip-item-unit"},_.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:k},I)}return null},x=pv({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),N=pv({margin:0},u),w=!oe(v),O=w?v:"",A=pe("recharts-default-tooltip",m),E=pe("recharts-tooltip-label",j);w&&p&&f!==void 0&&f!==null&&(O=p(v,f));var M=g?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",vx({className:A,style:x},M),T.createElement("p",{className:E,style:N},T.isValidElement(O)?O:"".concat(O)),b())};function Nu(e){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function ud(e,t,n){return t=JZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JZ(e){var t=eJ(e,"string");return Nu(t)=="symbol"?t:t+""}function eJ(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bc="recharts-tooltip-wrapper",tJ={visibility:"hidden"};function nJ(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return pe(bc,ud(ud(ud(ud({},"".concat(bc,"-right"),X(n)&&t&&X(t.x)&&n>=t.x),"".concat(bc,"-left"),X(n)&&t&&X(t.x)&&n<t.x),"".concat(bc,"-bottom"),X(r)&&t&&X(t.y)&&r>=t.y),"".concat(bc,"-top"),X(r)&&t&&X(t.y)&&r<t.y))}function O2(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,i=e.position,l=e.reverseDirection,o=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&X(i[r]))return i[r];var f=n[r]-o-a,d=n[r]+a;if(t[r])return l[r]?f:d;if(l[r]){var h=f,m=c[r];return h<m?Math.max(d,c[r]):Math.max(f,c[r])}var j=d+o,v=c[r]+u;return j>v?Math.max(f,c[r]):Math.max(d,c[r])}function rJ(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function aJ(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,l=e.tooltipBox,o=e.useTranslate3d,c=e.viewBox,u,f,d;return l.height>0&&l.width>0&&n?(f=O2({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.width,viewBox:c,viewBoxDimension:c.width}),d=O2({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:l.height,viewBox:c,viewBoxDimension:c.height}),u=rJ({translateX:f,translateY:d,useTranslate3d:o})):u=tJ,{cssProperties:u,cssClasses:nJ({translateX:f,translateY:d,coordinate:n})}}function co(e){"@babel/helpers - typeof";return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},co(e)}function A2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function C2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A2(Object(n),!0).forEach(function(r){xx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P3(r.key),r)}}function lJ(e,t,n){return t&&sJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oJ(e,t,n){return t=Gh(t),cJ(e,M3()?Reflect.construct(t,n||[],Gh(e).constructor):t.apply(e,n))}function cJ(e,t){if(t&&(co(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uJ(e)}function uJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M3=function(){return!!e})()}function Gh(e){return Gh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gh(e)}function fJ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gx(e,t)}function gx(e,t){return gx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},gx(e,t)}function xx(e,t,n){return t=P3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P3(e){var t=dJ(e,"string");return co(t)=="symbol"?t:t+""}function dJ(e,t){if(co(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(co(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var E2=1,hJ=function(e){function t(){var n;iJ(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=oJ(this,t,[].concat(a)),xx(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),xx(n,"handleKeyDown",function(l){if(l.key==="Escape"){var o,c,u,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&o!==void 0?o:0,y:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),n}return fJ(t,e),lJ(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>E2||Math.abs(r.height-this.state.lastBoundingBox.height)>E2)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,l=a.allowEscapeViewBox,o=a.animationDuration,c=a.animationEasing,u=a.children,f=a.coordinate,d=a.hasPayload,h=a.isAnimationActive,m=a.offset,j=a.position,v=a.reverseDirection,p=a.useTranslate3d,y=a.viewBox,g=a.wrapperStyle,b=aJ({allowEscapeViewBox:l,coordinate:f,offsetTopLeft:m,position:j,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:y}),x=b.cssClasses,N=b.cssProperties,w=C2(C2({transition:h&&i?"transform ".concat(o,"ms ").concat(c):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},g);return T.createElement("div",{tabIndex:-1,className:x,style:w,ref:function(A){r.wrapperNode=A}},u)}}])}(S.PureComponent),pJ=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},La={isSsr:pJ()};function uo(e){"@babel/helpers - typeof";return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uo(e)}function _2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function T2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_2(Object(n),!0).forEach(function(r){O1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R3(r.key),r)}}function vJ(e,t,n){return t&&yJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gJ(e,t,n){return t=Kh(t),xJ(e,$3()?Reflect.construct(t,n||[],Kh(e).constructor):t.apply(e,n))}function xJ(e,t){if(t&&(uo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bJ(e)}function bJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $3(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($3=function(){return!!e})()}function Kh(e){return Kh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kh(e)}function jJ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bx(e,t)}function bx(e,t){return bx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},bx(e,t)}function O1(e,t,n){return t=R3(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R3(e){var t=SJ(e,"string");return uo(t)=="symbol"?t:t+""}function SJ(e,t){if(uo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function wJ(e){return e.dataKey}function NJ(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(ZZ,t)}var tn=function(e){function t(){return mJ(this,t),gJ(this,t,arguments)}return jJ(t,e),vJ(t,[{key:"render",value:function(){var r=this,a=this.props,i=a.active,l=a.allowEscapeViewBox,o=a.animationDuration,c=a.animationEasing,u=a.content,f=a.coordinate,d=a.filterNull,h=a.isAnimationActive,m=a.offset,j=a.payload,v=a.payloadUniqBy,p=a.position,y=a.reverseDirection,g=a.useTranslate3d,b=a.viewBox,x=a.wrapperStyle,N=j??[];d&&N.length&&(N=N3(j.filter(function(O){return O.value!=null&&(O.hide!==!0||r.props.includeHidden)}),v,wJ));var w=N.length>0;return T.createElement(hJ,{allowEscapeViewBox:l,animationDuration:o,animationEasing:c,isAnimationActive:h,active:i,coordinate:f,hasPayload:w,offset:m,position:p,reverseDirection:y,useTranslate3d:g,viewBox:b,wrapperStyle:x},NJ(u,T2(T2({},this.props),{},{payload:N})))}}])}(S.PureComponent);O1(tn,"displayName","Tooltip");O1(tn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!La.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var OJ=Jr,AJ=function(){return OJ.Date.now()},CJ=AJ,EJ=/\s/;function _J(e){for(var t=e.length;t--&&EJ.test(e.charAt(t)););return t}var TJ=_J,kJ=TJ,MJ=/^\s+/;function PJ(e){return e&&e.slice(0,kJ(e)+1).replace(MJ,"")}var $J=PJ,RJ=$J,k2=Ri,DJ=Qo,M2=NaN,LJ=/^[-+]0x[0-9a-f]+$/i,zJ=/^0b[01]+$/i,IJ=/^0o[0-7]+$/i,BJ=parseInt;function UJ(e){if(typeof e=="number")return e;if(DJ(e))return M2;if(k2(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=k2(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=RJ(e);var n=zJ.test(e);return n||IJ.test(e)?BJ(e.slice(2),n?2:8):LJ.test(e)?M2:+e}var D3=UJ,qJ=Ri,mv=CJ,P2=D3,HJ="Expected a function",FJ=Math.max,GJ=Math.min;function KJ(e,t,n){var r,a,i,l,o,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(HJ);t=P2(t)||0,qJ(n)&&(f=!!n.leading,d="maxWait"in n,i=d?FJ(P2(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function m(w){var O=r,A=a;return r=a=void 0,u=w,l=e.apply(A,O),l}function j(w){return u=w,o=setTimeout(y,t),f?m(w):l}function v(w){var O=w-c,A=w-u,E=t-O;return d?GJ(E,i-A):E}function p(w){var O=w-c,A=w-u;return c===void 0||O>=t||O<0||d&&A>=i}function y(){var w=mv();if(p(w))return g(w);o=setTimeout(y,v(w))}function g(w){return o=void 0,h&&r?m(w):(r=a=void 0,l)}function b(){o!==void 0&&clearTimeout(o),u=0,r=c=a=o=void 0}function x(){return o===void 0?l:g(mv())}function N(){var w=mv(),O=p(w);if(r=arguments,a=this,c=w,O){if(o===void 0)return j(c);if(d)return clearTimeout(o),o=setTimeout(y,t),m(c)}return o===void 0&&(o=setTimeout(y,t)),l}return N.cancel=b,N.flush=x,N}var VJ=KJ,YJ=VJ,WJ=Ri,QJ="Expected a function";function XJ(e,t,n){var r=!0,a=!0;if(typeof e!="function")throw new TypeError(QJ);return WJ(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),YJ(e,t,{leading:r,maxWait:t,trailing:a})}var ZJ=XJ;const L3=$e(ZJ);function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function fd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){JJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JJ(e,t,n){return t=eee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eee(e){var t=tee(e,"string");return Ou(t)=="symbol"?t:t+""}function tee(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nee(e,t){return see(e)||iee(e,t)||aee(e,t)||ree()}function ree(){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 aee(e,t){if(e){if(typeof e=="string")return R2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R2(e,t)}}function R2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function see(e){if(Array.isArray(e))return e}var xl=S.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,i=e.width,l=i===void 0?"100%":i,o=e.height,c=o===void 0?"100%":o,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,h=e.maxHeight,m=e.children,j=e.debounce,v=j===void 0?0:j,p=e.id,y=e.className,g=e.onResize,b=e.style,x=b===void 0?{}:b,N=S.useRef(null),w=S.useRef();w.current=g,S.useImperativeHandle(t,function(){return Object.defineProperty(N.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),N.current},configurable:!0})});var O=S.useState({containerWidth:a.width,containerHeight:a.height}),A=nee(O,2),E=A[0],M=A[1],$=S.useCallback(function(I,_){M(function(C){var P=Math.round(I),z=Math.round(_);return C.containerWidth===P&&C.containerHeight===z?C:{containerWidth:P,containerHeight:z}})},[]);S.useEffect(function(){var I=function(K){var Y,Q=K[0].contentRect,Z=Q.width,ne=Q.height;$(Z,ne),(Y=w.current)===null||Y===void 0||Y.call(w,Z,ne)};v>0&&(I=L3(I,v,{trailing:!0,leading:!1}));var _=new ResizeObserver(I),C=N.current.getBoundingClientRect(),P=C.width,z=C.height;return $(P,z),_.observe(N.current),function(){_.disconnect()}},[$,v]);var k=S.useMemo(function(){var I=E.containerWidth,_=E.containerHeight;if(I<0||_<0)return null;Nr(rs(l)||rs(c),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,l,c),Nr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var C=rs(l)?I:l,P=rs(c)?_:c;n&&n>0&&(C?P=C/n:P&&(C=P*n),h&&P>h&&(P=h)),Nr(C>0||P>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.`,C,P,l,c,f,d,n);var z=!Array.isArray(m)&&wa(m.type).endsWith("Chart");return T.Children.map(m,function(B){return T.isValidElement(B)?S.cloneElement(B,fd({width:C,height:P},z?{style:fd({height:"100%",width:"100%",maxHeight:P,maxWidth:C},B.props.style)}:{})):B})},[n,m,c,h,d,f,E,l]);return T.createElement("div",{id:p?"".concat(p):void 0,className:pe("recharts-responsive-container",y),style:fd(fd({},x),{},{width:l,height:c,minWidth:f,minHeight:d,maxHeight:h}),ref:N},k)}),Mf=function(t){return null};Mf.displayName="Cell";function Au(e){"@babel/helpers - typeof";return Au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Au(e)}function D2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function jx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D2(Object(n),!0).forEach(function(r){lee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lee(e,t,n){return t=oee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oee(e){var t=cee(e,"string");return Au(t)=="symbol"?t:t+""}function cee(e,t){if(Au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zs={widthCache:{},cacheCount:0},uee=2e3,fee={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},L2="recharts_measurement_span";function dee(e){var t=jx({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Wc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||La.isSsr)return{width:0,height:0};var r=dee(n),a=JSON.stringify({text:t,copyStyle:r});if(Zs.widthCache[a])return Zs.widthCache[a];try{var i=document.getElementById(L2);i||(i=document.createElement("span"),i.setAttribute("id",L2),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var l=jx(jx({},fee),r);Object.assign(i.style,l),i.textContent="".concat(t);var o=i.getBoundingClientRect(),c={width:o.width,height:o.height};return Zs.widthCache[a]=c,++Zs.cacheCount>uee&&(Zs.cacheCount=0,Zs.widthCache={}),c}catch{return{width:0,height:0}}},hee=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Cu(e){"@babel/helpers - typeof";return Cu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cu(e)}function Vh(e,t){return vee(e)||yee(e,t)||mee(e,t)||pee()}function pee(){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 mee(e,t){if(e){if(typeof e=="string")return z2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z2(e,t)}}function z2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function vee(e){if(Array.isArray(e))return e}function gee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bee(r.key),r)}}function xee(e,t,n){return t&&I2(e.prototype,t),n&&I2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bee(e){var t=jee(e,"string");return Cu(t)=="symbol"?t:t+""}function jee(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var B2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,U2=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,See=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,wee=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,z3={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Nee=Object.keys(z3),bl="NaN";function Oee(e,t){return e*z3[t]}var dd=function(){function e(t,n){gee(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!See.test(n)&&(this.num=NaN,this.unit=""),Nee.includes(n)&&(this.num=Oee(t,n),this.unit="px")}return xee(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,a=(r=wee.exec(n))!==null&&r!==void 0?r:[],i=Vh(a,3),l=i[1],o=i[2];return new e(parseFloat(l),o??"")}}])}();function I3(e){if(e.includes(bl))return bl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=B2.exec(t))!==null&&n!==void 0?n:[],a=Vh(r,4),i=a[1],l=a[2],o=a[3],c=dd.parse(i??""),u=dd.parse(o??""),f=l==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return bl;t=t.replace(B2,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=U2.exec(t))!==null&&d!==void 0?d:[],m=Vh(h,4),j=m[1],v=m[2],p=m[3],y=dd.parse(j??""),g=dd.parse(p??""),b=v==="+"?y.add(g):y.subtract(g);if(b.isNaN())return bl;t=t.replace(U2,b.toString())}return t}var q2=/\(([^()]*)\)/;function Aee(e){for(var t=e;t.includes("(");){var n=q2.exec(t),r=Vh(n,2),a=r[1];t=t.replace(q2,I3(a))}return t}function Cee(e){var t=e.replace(/\s+/g,"");return t=Aee(t),t=I3(t),t}function Eee(e){try{return Cee(e)}catch{return bl}}function yv(e){var t=Eee(e.slice(5,-1));return t===bl?"":t}var _ee=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Tee=["dx","dy","angle","className","breakAll"];function Sx(){return Sx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sx.apply(this,arguments)}function H2(e,t){if(e==null)return{};var n=kee(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kee(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function F2(e,t){return Ree(e)||$ee(e,t)||Pee(e,t)||Mee()}function Mee(){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 Pee(e,t){if(e){if(typeof e=="string")return G2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G2(e,t)}}function G2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $ee(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function Ree(e){if(Array.isArray(e))return e}var B3=/[ \f\n\r\t\v\u2028\u2029]+/,U3=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var i=[];oe(n)||(r?i=n.toString().split(""):i=n.toString().split(B3));var l=i.map(function(c){return{word:c,width:Wc(c,a).width}}),o=r?0:Wc(" ",a).width;return{wordsWithComputedWidth:l,spaceWidth:o}}catch{return null}},Dee=function(t,n,r,a,i){var l=t.maxLines,o=t.children,c=t.style,u=t.breakAll,f=X(l),d=o,h=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return C.reduce(function(P,z){var B=z.word,K=z.width,Y=P[P.length-1];if(Y&&(a==null||i||Y.width+K+r<Number(a)))Y.words.push(B),Y.width+=K+r;else{var Q={words:[B],width:K};P.push(Q)}return P},[])},m=h(n),j=function(C){return C.reduce(function(P,z){return P.width>z.width?P:z})};if(!f)return m;for(var v="…",p=function(C){var P=d.slice(0,C),z=U3({breakAll:u,style:c,children:P+v}).wordsWithComputedWidth,B=h(z),K=B.length>l||j(B).width>Number(a);return[K,B]},y=0,g=d.length-1,b=0,x;y<=g&&b<=d.length-1;){var N=Math.floor((y+g)/2),w=N-1,O=p(w),A=F2(O,2),E=A[0],M=A[1],$=p(N),k=F2($,1),I=k[0];if(!E&&!I&&(y=N+1),E&&I&&(g=N-1),!E&&I){x=M;break}b++}return x||m},K2=function(t){var n=oe(t)?[]:t.toString().split(B3);return[{words:n}]},Lee=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,l=t.breakAll,o=t.maxLines;if((n||r)&&!La.isSsr){var c,u,f=U3({breakAll:l,children:a,style:i});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;c=d,u=h}else return K2(a);return Dee({breakAll:l,children:a,maxLines:o,style:i},c,u,n,r)}return K2(a)},V2="#808080",Ps=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.lineHeight,o=l===void 0?"1em":l,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,m=h===void 0?"start":h,j=t.verticalAnchor,v=j===void 0?"end":j,p=t.fill,y=p===void 0?V2:p,g=H2(t,_ee),b=S.useMemo(function(){return Lee({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:d,style:g.style,width:g.width})},[g.breakAll,g.children,g.maxLines,d,g.style,g.width]),x=g.dx,N=g.dy,w=g.angle,O=g.className,A=g.breakAll,E=H2(g,Tee);if(!kt(r)||!kt(i))return null;var M=r+(X(x)?x:0),$=i+(X(N)?N:0),k;switch(v){case"start":k=yv("calc(".concat(u,")"));break;case"middle":k=yv("calc(".concat((b.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:k=yv("calc(".concat(b.length-1," * -").concat(o,")"));break}var I=[];if(d){var _=b[0].width,C=g.width;I.push("scale(".concat((X(C)?C/_:1)/_,")"))}return w&&I.push("rotate(".concat(w,", ").concat(M,", ").concat($,")")),I.length&&(E.transform=I.join(" ")),T.createElement("text",Sx({},ae(E,!0),{x:M,y:$,className:pe("recharts-text",O),textAnchor:m,fill:y.includes("url")?V2:y}),b.map(function(P,z){var B=P.words.join(A?"":" ");return T.createElement("tspan",{x:M,dy:z===0?k:o,key:"".concat(B,"-").concat(z)},B)}))};function wi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function zee(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function A1(e){let t,n,r;e.length!==2?(t=wi,n=(o,c)=>wi(e(o),c),r=(o,c)=>e(o)-c):(t=e===wi||e===zee?e:Iee,n=e,r=e);function a(o,c,u=0,f=o.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(o[d],c)<0?u=d+1:f=d}while(u<f)}return u}function i(o,c,u=0,f=o.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(o[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function l(o,c,u=0,f=o.length){const d=a(o,c,u,f-1);return d>u&&r(o[d-1],c)>-r(o[d],c)?d-1:d}return{left:a,center:l,right:i}}function Iee(){return 0}function q3(e){return e===null?NaN:+e}function*Bee(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Uee=A1(wi),Pf=Uee.right;A1(q3).center;class Y2 extends Map{constructor(t,n=Fee){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(W2(this,t))}has(t){return super.has(W2(this,t))}set(t,n){return super.set(qee(this,t),n)}delete(t){return super.delete(Hee(this,t))}}function W2({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function qee({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Hee({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Fee(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Gee(e=wi){if(e===wi)return H3;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function H3(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Kee=Math.sqrt(50),Vee=Math.sqrt(10),Yee=Math.sqrt(2);function Yh(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),l=i>=Kee?10:i>=Vee?5:i>=Yee?2:1;let o,c,u;return a<0?(u=Math.pow(10,-a)/l,o=Math.round(e*u),c=Math.round(t*u),o/u<e&&++o,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*l,o=Math.round(e/u),c=Math.round(t/u),o*u<e&&++o,c*u>t&&--c),c<o&&.5<=n&&n<2?Yh(e,t,n*2):[o,c,u]}function wx(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,l]=r?Yh(t,e,n):Yh(e,t,n);if(!(i>=a))return[];const o=i-a+1,c=new Array(o);if(r)if(l<0)for(let u=0;u<o;++u)c[u]=(i-u)/-l;else for(let u=0;u<o;++u)c[u]=(i-u)*l;else if(l<0)for(let u=0;u<o;++u)c[u]=(a+u)/-l;else for(let u=0;u<o;++u)c[u]=(a+u)*l;return c}function Nx(e,t,n){return t=+t,e=+e,n=+n,Yh(e,t,n)[2]}function Ox(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?Nx(t,e,n):Nx(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function Q2(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function X2(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function F3(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?H3:Gee(a);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,f=Math.log(c),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/c+h)),j=Math.min(r,Math.floor(t+(c-u)*d/c+h));F3(e,t,m,j,a)}const i=e[t];let l=n,o=r;for(jc(e,n,t),a(e[r],i)>0&&jc(e,n,r);l<o;){for(jc(e,l,o),++l,--o;a(e[l],i)<0;)++l;for(;a(e[o],i)>0;)--o}a(e[n],i)===0?jc(e,n,o):(++o,jc(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function jc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Wee(e,t,n){if(e=Float64Array.from(Bee(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return X2(e);if(t>=1)return Q2(e);var r,a=(r-1)*t,i=Math.floor(a),l=Q2(F3(e,i).subarray(0,i+1)),o=X2(e.subarray(i+1));return l+(o-l)*(a-i)}}function Qee(e,t,n=q3){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),l=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return l+(o-l)*(a-i)}}function Xee(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function hr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function za(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Ax=Symbol("implicit");function C1(){var e=new Y2,t=[],n=[],r=Ax;function a(i){let l=e.get(i);if(l===void 0){if(r!==Ax)return r;e.set(i,l=t.push(i)-1)}return n[l%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Y2;for(const l of i)e.has(l)||e.set(l,t.push(l)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return C1(t,n).unknown(r)},hr.apply(a,arguments),a}function Eu(){var e=C1().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,l,o=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var h=t().length,m=a<r,j=m?a:r,v=m?r:a;i=(v-j)/Math.max(1,h-c+u*2),o&&(i=Math.floor(i)),j+=(v-j-i*(h-c))*f,l=i*(1-c),o&&(j=Math.round(j),l=Math.round(l));var p=Xee(h).map(function(y){return j+i*y});return n(m?p.reverse():p)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,d()):[r,a]},e.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,o=!0,d()},e.bandwidth=function(){return l},e.step=function(){return i},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return Eu(t(),[r,a]).round(o).paddingInner(c).paddingOuter(u).align(f)},hr.apply(d(),arguments)}function G3(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return G3(t())},e}function Qc(){return G3(Eu.apply(null,arguments).paddingInner(1))}function E1(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function K3(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function $f(){}var _u=.7,Wh=1/_u,Pl="\\s*([+-]?\\d+)\\s*",Tu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zee=/^#([0-9a-f]{3,8})$/,Jee=new RegExp(`^rgb\\(${Pl},${Pl},${Pl}\\)$`),ete=new RegExp(`^rgb\\(${Kr},${Kr},${Kr}\\)$`),tte=new RegExp(`^rgba\\(${Pl},${Pl},${Pl},${Tu}\\)$`),nte=new RegExp(`^rgba\\(${Kr},${Kr},${Kr},${Tu}\\)$`),rte=new RegExp(`^hsl\\(${Tu},${Kr},${Kr}\\)$`),ate=new RegExp(`^hsla\\(${Tu},${Kr},${Kr},${Tu}\\)$`),Z2={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};E1($f,ku,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:J2,formatHex:J2,formatHex8:ite,formatHsl:ste,formatRgb:eN,toString:eN});function J2(){return this.rgb().formatHex()}function ite(){return this.rgb().formatHex8()}function ste(){return V3(this).formatHsl()}function eN(){return this.rgb().formatRgb()}function ku(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Zee.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tN(t):n===3?new yn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Jee.exec(e))?new yn(t[1],t[2],t[3],1):(t=ete.exec(e))?new yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tte.exec(e))?hd(t[1],t[2],t[3],t[4]):(t=nte.exec(e))?hd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=rte.exec(e))?aN(t[1],t[2]/100,t[3]/100,1):(t=ate.exec(e))?aN(t[1],t[2]/100,t[3]/100,t[4]):Z2.hasOwnProperty(e)?tN(Z2[e]):e==="transparent"?new yn(NaN,NaN,NaN,0):null}function tN(e){return new yn(e>>16&255,e>>8&255,e&255,1)}function hd(e,t,n,r){return r<=0&&(e=t=n=NaN),new yn(e,t,n,r)}function lte(e){return e instanceof $f||(e=ku(e)),e?(e=e.rgb(),new yn(e.r,e.g,e.b,e.opacity)):new yn}function Cx(e,t,n,r){return arguments.length===1?lte(e):new yn(e,t,n,r??1)}function yn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}E1(yn,Cx,K3($f,{brighter(e){return e=e==null?Wh:Math.pow(Wh,e),new yn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?_u:Math.pow(_u,e),new yn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yn(Ss(this.r),Ss(this.g),Ss(this.b),Qh(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:nN,formatHex:nN,formatHex8:ote,formatRgb:rN,toString:rN}));function nN(){return`#${as(this.r)}${as(this.g)}${as(this.b)}`}function ote(){return`#${as(this.r)}${as(this.g)}${as(this.b)}${as((isNaN(this.opacity)?1:this.opacity)*255)}`}function rN(){const e=Qh(this.opacity);return`${e===1?"rgb(":"rgba("}${Ss(this.r)}, ${Ss(this.g)}, ${Ss(this.b)}${e===1?")":`, ${e})`}`}function Qh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ss(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function as(e){return e=Ss(e),(e<16?"0":"")+e.toString(16)}function aN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jr(e,t,n,r)}function V3(e){if(e instanceof jr)return new jr(e.h,e.s,e.l,e.opacity);if(e instanceof $f||(e=ku(e)),!e)return new jr;if(e instanceof jr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),l=NaN,o=i-a,c=(i+a)/2;return o?(t===i?l=(n-r)/o+(n<r)*6:n===i?l=(r-t)/o+2:l=(t-n)/o+4,o/=c<.5?i+a:2-i-a,l*=60):o=c>0&&c<1?0:l,new jr(l,o,c,e.opacity)}function cte(e,t,n,r){return arguments.length===1?V3(e):new jr(e,t,n,r??1)}function jr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}E1(jr,cte,K3($f,{brighter(e){return e=e==null?Wh:Math.pow(Wh,e),new jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?_u:Math.pow(_u,e),new jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new yn(vv(e>=240?e-240:e+120,a,r),vv(e,a,r),vv(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new jr(iN(this.h),pd(this.s),pd(this.l),Qh(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=Qh(this.opacity);return`${e===1?"hsl(":"hsla("}${iN(this.h)}, ${pd(this.s)*100}%, ${pd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function iN(e){return e=(e||0)%360,e<0?e+360:e}function pd(e){return Math.max(0,Math.min(1,e||0))}function vv(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const _1=e=>()=>e;function ute(e,t){return function(n){return e+n*t}}function fte(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function dte(e){return(e=+e)==1?Y3:function(t,n){return n-t?fte(t,n,e):_1(isNaN(t)?n:t)}}function Y3(e,t){var n=t-e;return n?ute(e,n):_1(isNaN(e)?t:e)}const sN=function e(t){var n=dte(t);function r(a,i){var l=n((a=Cx(a)).r,(i=Cx(i)).r),o=n(a.g,i.g),c=n(a.b,i.b),u=Y3(a.opacity,i.opacity);return function(f){return a.r=l(f),a.g=o(f),a.b=c(f),a.opacity=u(f),a+""}}return r.gamma=e,r}(1);function hte(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function pte(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function mte(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),l;for(l=0;l<r;++l)a[l]=ic(e[l],t[l]);for(;l<n;++l)i[l]=t[l];return function(o){for(l=0;l<r;++l)i[l]=a[l](o);return i}}function yte(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Xh(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function vte(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=ic(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var Ex=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gv=new RegExp(Ex.source,"g");function gte(e){return function(){return e}}function xte(e){return function(t){return e(t)+""}}function bte(e,t){var n=Ex.lastIndex=gv.lastIndex=0,r,a,i,l=-1,o=[],c=[];for(e=e+"",t=t+"";(r=Ex.exec(e))&&(a=gv.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),o[l]?o[l]+=i:o[++l]=i),(r=r[0])===(a=a[0])?o[l]?o[l]+=a:o[++l]=a:(o[++l]=null,c.push({i:l,x:Xh(r,a)})),n=gv.lastIndex;return n<t.length&&(i=t.slice(n),o[l]?o[l]+=i:o[++l]=i),o.length<2?c[0]?xte(c[0].x):gte(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)o[(d=c[f]).i]=d.x(u);return o.join("")})}function ic(e,t){var n=typeof t,r;return t==null||n==="boolean"?_1(t):(n==="number"?Xh:n==="string"?(r=ku(t))?(t=r,sN):bte:t instanceof ku?sN:t instanceof Date?yte:pte(t)?hte:Array.isArray(t)?mte:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?vte:Xh)(e,t)}function T1(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function jte(e,t){t===void 0&&(t=e,e=ic);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(l){var o=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return i[o](l-o)}}function Ste(e){return function(){return e}}function Zh(e){return+e}var lN=[0,1];function ln(e){return e}function _x(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Ste(isNaN(t)?NaN:.5)}function wte(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Nte(e,t,n){var r=e[0],a=e[1],i=t[0],l=t[1];return a<r?(r=_x(a,r),i=n(l,i)):(r=_x(r,a),i=n(i,l)),function(o){return i(r(o))}}function Ote(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)a[l]=_x(e[l],e[l+1]),i[l]=n(t[l],t[l+1]);return function(o){var c=Pf(e,o,1,r)-1;return i[c](a[c](o))}}function Rf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Um(){var e=lN,t=lN,n=ic,r,a,i,l=ln,o,c,u;function f(){var h=Math.min(e.length,t.length);return l!==ln&&(l=wte(e[0],e[h-1])),o=h>2?Ote:Nte,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?i:(c||(c=o(e.map(r),t,n)))(r(l(h)))}return d.invert=function(h){return l(a((u||(u=o(t,e.map(r),Xh)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Zh),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=T1,f()},d.clamp=function(h){return arguments.length?(l=h?!0:ln,f()):l!==ln},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(i=h,d):i},function(h,m){return r=h,a=m,f()}}function k1(){return Um()(ln,ln)}function Ate(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Jh(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function fo(e){return e=Jh(Math.abs(e)),e?e[1]:NaN}function Cte(e,t){return function(n,r){for(var a=n.length,i=[],l=0,o=e[0],c=0;a>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),i.push(n.substring(a-=o,a+o)),!((c+=o+1)>r));)o=e[l=(l+1)%e.length];return i.reverse().join(t)}}function Ete(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var _te=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mu(e){if(!(t=_te.exec(e)))throw new Error("invalid format: "+e);var t;return new M1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Mu.prototype=M1.prototype;function M1(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+""}M1.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 Tte(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var ep;function kte(e,t){var n=Jh(e,t);if(!n)return ep=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(ep=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,l=r.length;return i===l?r:i>l?r+new Array(i-l+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Jh(e,Math.max(0,t+i-1))[0]}function oN(e,t){var n=Jh(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const cN={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Ate,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>oN(e*100,t),r:oN,s:kte,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function uN(e){return e}var fN=Array.prototype.map,dN=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Mte(e){var t=e.grouping===void 0||e.thousands===void 0?uN:Cte(fN.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?uN:Ete(fN.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d,h){d=Mu(d);var m=d.fill,j=d.align,v=d.sign,p=d.symbol,y=d.zero,g=d.width,b=d.comma,x=d.precision,N=d.trim,w=d.type;w==="n"?(b=!0,w="g"):cN[w]||(x===void 0&&(x=12),N=!0,w="g"),(y||m==="0"&&j==="=")&&(y=!0,m="0",j="=");var O=(h&&h.prefix!==void 0?h.prefix:"")+(p==="$"?n:p==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),A=(p==="$"?r:/[%p]/.test(w)?l:"")+(h&&h.suffix!==void 0?h.suffix:""),E=cN[w],M=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function $(k){var I=O,_=A,C,P,z;if(w==="c")_=E(k)+_,k="";else{k=+k;var B=k<0||1/k<0;if(k=isNaN(k)?c:E(Math.abs(k),x),N&&(k=Tte(k)),B&&+k==0&&v!=="+"&&(B=!1),I=(B?v==="("?v:o:v==="-"||v==="("?"":v)+I,_=(w==="s"&&!isNaN(k)&&ep!==void 0?dN[8+ep/3]:"")+_+(B&&v==="("?")":""),M){for(C=-1,P=k.length;++C<P;)if(z=k.charCodeAt(C),48>z||z>57){_=(z===46?a+k.slice(C+1):k.slice(C))+_,k=k.slice(0,C);break}}}b&&!y&&(k=t(k,1/0));var K=I.length+k.length+_.length,Y=K<g?new Array(g-K+1).join(m):"";switch(b&&y&&(k=t(Y+k,Y.length?g-_.length:1/0),Y=""),j){case"<":k=I+k+_+Y;break;case"=":k=I+Y+k+_;break;case"^":k=Y.slice(0,K=Y.length>>1)+I+k+_+Y.slice(K);break;default:k=Y+I+k+_;break}return i(k)}return $.toString=function(){return d+""},$}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(fo(h)/3)))*3,j=Math.pow(10,-m),v=u((d=Mu(d),d.type="f",d),{suffix:dN[8+m/3]});return function(p){return v(j*p)}}return{format:u,formatPrefix:f}}var md,P1,W3;Pte({thousands:",",grouping:[3],currency:["$",""]});function Pte(e){return md=Mte(e),P1=md.format,W3=md.formatPrefix,md}function $te(e){return Math.max(0,-fo(Math.abs(e)))}function Rte(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(fo(t)/3)))*3-fo(Math.abs(e)))}function Dte(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,fo(t)-fo(e))+1}function Q3(e,t,n,r){var a=Ox(e,t,n),i;switch(r=Mu(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=Rte(a,l))&&(r.precision=i),W3(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Dte(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=$te(a))&&(r.precision=i-(r.type==="%")*2);break}}return P1(r)}function Li(e){var t=e.domain;return e.ticks=function(n){var r=t();return wx(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return Q3(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,l=r[a],o=r[i],c,u,f=10;for(o<l&&(u=l,l=o,o=u,u=a,a=i,i=u);f-- >0;){if(u=Nx(l,o,n),u===c)return r[a]=l,r[i]=o,t(r);if(u>0)l=Math.floor(l/u)*u,o=Math.ceil(o/u)*u;else if(u<0)l=Math.ceil(l*u)/u,o=Math.floor(o*u)/u;else break;c=u}return e},e}function tp(){var e=k1();return e.copy=function(){return Rf(e,tp())},hr.apply(e,arguments),Li(e)}function X3(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Zh),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return X3(e).unknown(t)},e=arguments.length?Array.from(e,Zh):[0,1],Li(n)}function Z3(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],l;return i<a&&(l=n,n=r,r=l,l=a,a=i,i=l),e[n]=t.floor(a),e[r]=t.ceil(i),e}function hN(e){return Math.log(e)}function pN(e){return Math.exp(e)}function Lte(e){return-Math.log(-e)}function zte(e){return-Math.exp(-e)}function Ite(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Bte(e){return e===10?Ite:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Ute(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function mN(e){return(t,n)=>-e(-t,n)}function $1(e){const t=e(hN,pN),n=t.domain;let r=10,a,i;function l(){return a=Ute(r),i=Bte(r),n()[0]<0?(a=mN(a),i=mN(i),e(Lte,zte)):e(hN,pN),t}return t.base=function(o){return arguments.length?(r=+o,l()):r},t.domain=function(o){return arguments.length?(n(o),l()):n()},t.ticks=o=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=a(u),m=a(f),j,v;const p=o==null?10:+o;let y=[];if(!(r%1)&&m-h<p){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(j=1;j<r;++j)if(v=h<0?j/i(-h):j*i(h),!(v<u)){if(v>f)break;y.push(v)}}else for(;h<=m;++h)for(j=r-1;j>=1;--j)if(v=h>0?j/i(-h):j*i(h),!(v<u)){if(v>f)break;y.push(v)}y.length*2<p&&(y=wx(u,f,p))}else y=wx(h,m,Math.min(m-h,p)).map(i);return d?y.reverse():y},t.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Mu(c)).precision==null&&(c.trim=!0),c=P1(c)),o===1/0)return c;const u=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/i(Math.round(a(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},t.nice=()=>n(Z3(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function J3(){const e=$1(Um()).domain([1,10]);return e.copy=()=>Rf(e,J3()).base(e.base()),hr.apply(e,arguments),e}function yN(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function vN(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function R1(e){var t=1,n=e(yN(t),vN(t));return n.constant=function(r){return arguments.length?e(yN(t=+r),vN(t)):t},Li(n)}function eM(){var e=R1(Um());return e.copy=function(){return Rf(e,eM()).constant(e.constant())},hr.apply(e,arguments)}function gN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qte(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Hte(e){return e<0?-e*e:e*e}function D1(e){var t=e(ln,ln),n=1;function r(){return n===1?e(ln,ln):n===.5?e(qte,Hte):e(gN(n),gN(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Li(t)}function L1(){var e=D1(Um());return e.copy=function(){return Rf(e,L1()).exponent(e.exponent())},hr.apply(e,arguments),e}function Fte(){return L1.apply(null,arguments).exponent(.5)}function xN(e){return Math.sign(e)*e*e}function Gte(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function tM(){var e=k1(),t=[0,1],n=!1,r;function a(i){var l=Gte(e(i));return isNaN(l)?r:n?Math.round(l):l}return a.invert=function(i){return e.invert(xN(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Zh)).map(xN)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return tM(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},hr.apply(a,arguments),Li(a)}function nM(){var e=[],t=[],n=[],r;function a(){var l=0,o=Math.max(1,t.length);for(n=new Array(o-1);++l<o;)n[l-1]=Qee(e,l/o);return i}function i(l){return l==null||isNaN(l=+l)?r:t[Pf(n,l)]}return i.invertExtent=function(l){var o=t.indexOf(l);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},i.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let o of l)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(wi),a()},i.range=function(l){return arguments.length?(t=Array.from(l),a()):t.slice()},i.unknown=function(l){return arguments.length?(r=l,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return nM().domain(e).range(t).unknown(r)},hr.apply(i,arguments)}function rM(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function l(c){return c!=null&&c<=c?a[Pf(r,c,0,n)]:i}function o(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return l}return l.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,o()):[e,t]},l.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,o()):a.slice()},l.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},l.unknown=function(c){return arguments.length&&(i=c),l},l.thresholds=function(){return r.slice()},l.copy=function(){return rM().domain([e,t]).range(a).unknown(i)},hr.apply(Li(l),arguments)}function aM(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Pf(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var l=t.indexOf(i);return[e[l-1],e[l]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return aM().domain(e).range(t).unknown(n)},hr.apply(a,arguments)}const xv=new Date,bv=new Date;function Pt(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const l=a(i),o=a.ceil(i);return i-l<o-i?l:o},a.offset=(i,l)=>(t(i=new Date(+i),l==null?1:Math.floor(l)),i),a.range=(i,l,o)=>{const c=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<l)||!(o>0))return c;let u;do c.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<l);return c},a.filter=i=>Pt(l=>{if(l>=l)for(;e(l),!i(l);)l.setTime(l-1)},(l,o)=>{if(l>=l)if(o<0)for(;++o<=0;)for(;t(l,-1),!i(l););else for(;--o>=0;)for(;t(l,1),!i(l););}),n&&(a.count=(i,l)=>(xv.setTime(+i),bv.setTime(+l),e(xv),e(bv),Math.floor(n(xv,bv))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?l=>r(l)%i===0:l=>a.count(0,l)%i===0):a)),a}const np=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);np.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):np);np.range;const va=1e3,nr=va*60,ga=nr*60,ka=ga*24,z1=ka*7,bN=ka*30,jv=ka*365,is=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*va)},(e,t)=>(t-e)/va,e=>e.getUTCSeconds());is.range;const I1=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*va)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getMinutes());I1.range;const B1=Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*nr)},(e,t)=>(t-e)/nr,e=>e.getUTCMinutes());B1.range;const U1=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*va-e.getMinutes()*nr)},(e,t)=>{e.setTime(+e+t*ga)},(e,t)=>(t-e)/ga,e=>e.getHours());U1.range;const q1=Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ga)},(e,t)=>(t-e)/ga,e=>e.getUTCHours());q1.range;const Df=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*nr)/ka,e=>e.getDate()-1);Df.range;const qm=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ka,e=>e.getUTCDate()-1);qm.range;const iM=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ka,e=>Math.floor(e/ka));iM.range;function Hs(e){return Pt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*nr)/z1)}const Hm=Hs(0),rp=Hs(1),Kte=Hs(2),Vte=Hs(3),ho=Hs(4),Yte=Hs(5),Wte=Hs(6);Hm.range;rp.range;Kte.range;Vte.range;ho.range;Yte.range;Wte.range;function Fs(e){return Pt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/z1)}const Fm=Fs(0),ap=Fs(1),Qte=Fs(2),Xte=Fs(3),po=Fs(4),Zte=Fs(5),Jte=Fs(6);Fm.range;ap.range;Qte.range;Xte.range;po.range;Zte.range;Jte.range;const H1=Pt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());H1.range;const F1=Pt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());F1.range;const Ma=Pt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ma.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ma.range;const Pa=Pt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Pa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Pa.range;function sM(e,t,n,r,a,i){const l=[[is,1,va],[is,5,5*va],[is,15,15*va],[is,30,30*va],[i,1,nr],[i,5,5*nr],[i,15,15*nr],[i,30,30*nr],[a,1,ga],[a,3,3*ga],[a,6,6*ga],[a,12,12*ga],[r,1,ka],[r,2,2*ka],[n,1,z1],[t,1,bN],[t,3,3*bN],[e,1,jv]];function o(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),j=m?m.range(u,+f+1):[];return h?j.reverse():j}function c(u,f,d){const h=Math.abs(f-u)/d,m=A1(([,,p])=>p).right(l,h);if(m===l.length)return e.every(Ox(u/jv,f/jv,d));if(m===0)return np.every(Math.max(Ox(u,f,d),1));const[j,v]=l[h/l[m-1][2]<l[m][2]/h?m-1:m];return j.every(v)}return[o,c]}const[ene,tne]=sM(Pa,F1,Fm,iM,q1,B1),[nne,rne]=sM(Ma,H1,Hm,Df,U1,I1);function Sv(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function wv(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Sc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ane(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,l=e.shortDays,o=e.months,c=e.shortMonths,u=wc(a),f=Nc(a),d=wc(i),h=Nc(i),m=wc(l),j=Nc(l),v=wc(o),p=Nc(o),y=wc(c),g=Nc(c),b={a:z,A:B,b:K,B:Y,c:null,d:AN,e:AN,f:Cne,g:Lne,G:Ine,H:Nne,I:One,j:Ane,L:lM,m:Ene,M:_ne,p:Q,q:Z,Q:_N,s:TN,S:Tne,u:kne,U:Mne,V:Pne,w:$ne,W:Rne,x:null,X:null,y:Dne,Y:zne,Z:Bne,"%":EN},x={a:ne,A:ie,b:je,B:ye,c:null,d:CN,e:CN,f:Fne,g:ere,G:nre,H:Une,I:qne,j:Hne,L:cM,m:Gne,M:Kne,p:ft,q:_e,Q:_N,s:TN,S:Vne,u:Yne,U:Wne,V:Qne,w:Xne,W:Zne,x:null,X:null,y:Jne,Y:tre,Z:rre,"%":EN},N={a:M,A:$,b:k,B:I,c:_,d:NN,e:NN,f:bne,g:wN,G:SN,H:ON,I:ON,j:yne,L:xne,m:mne,M:vne,p:E,q:pne,Q:Sne,s:wne,S:gne,u:cne,U:une,V:fne,w:one,W:dne,x:C,X:P,y:wN,Y:SN,Z:hne,"%":jne};b.x=w(n,b),b.X=w(r,b),b.c=w(t,b),x.x=w(n,x),x.X=w(r,x),x.c=w(t,x);function w(J,se){return function(W){var G=[],Re=-1,be=0,dt=J.length,vt,jt,qa;for(W instanceof Date||(W=new Date(+W));++Re<dt;)J.charCodeAt(Re)===37&&(G.push(J.slice(be,Re)),(jt=jN[vt=J.charAt(++Re)])!=null?vt=J.charAt(++Re):jt=vt==="e"?" ":"0",(qa=se[vt])&&(vt=qa(W,jt)),G.push(vt),be=Re+1);return G.push(J.slice(be,Re)),G.join("")}}function O(J,se){return function(W){var G=Sc(1900,void 0,1),Re=A(G,J,W+="",0),be,dt;if(Re!=W.length)return null;if("Q"in G)return new Date(G.Q);if("s"in G)return new Date(G.s*1e3+("L"in G?G.L:0));if(se&&!("Z"in G)&&(G.Z=0),"p"in G&&(G.H=G.H%12+G.p*12),G.m===void 0&&(G.m="q"in G?G.q:0),"V"in G){if(G.V<1||G.V>53)return null;"w"in G||(G.w=1),"Z"in G?(be=wv(Sc(G.y,0,1)),dt=be.getUTCDay(),be=dt>4||dt===0?ap.ceil(be):ap(be),be=qm.offset(be,(G.V-1)*7),G.y=be.getUTCFullYear(),G.m=be.getUTCMonth(),G.d=be.getUTCDate()+(G.w+6)%7):(be=Sv(Sc(G.y,0,1)),dt=be.getDay(),be=dt>4||dt===0?rp.ceil(be):rp(be),be=Df.offset(be,(G.V-1)*7),G.y=be.getFullYear(),G.m=be.getMonth(),G.d=be.getDate()+(G.w+6)%7)}else("W"in G||"U"in G)&&("w"in G||(G.w="u"in G?G.u%7:"W"in G?1:0),dt="Z"in G?wv(Sc(G.y,0,1)).getUTCDay():Sv(Sc(G.y,0,1)).getDay(),G.m=0,G.d="W"in G?(G.w+6)%7+G.W*7-(dt+5)%7:G.w+G.U*7-(dt+6)%7);return"Z"in G?(G.H+=G.Z/100|0,G.M+=G.Z%100,wv(G)):Sv(G)}}function A(J,se,W,G){for(var Re=0,be=se.length,dt=W.length,vt,jt;Re<be;){if(G>=dt)return-1;if(vt=se.charCodeAt(Re++),vt===37){if(vt=se.charAt(Re++),jt=N[vt in jN?se.charAt(Re++):vt],!jt||(G=jt(J,W,G))<0)return-1}else if(vt!=W.charCodeAt(G++))return-1}return G}function E(J,se,W){var G=u.exec(se.slice(W));return G?(J.p=f.get(G[0].toLowerCase()),W+G[0].length):-1}function M(J,se,W){var G=m.exec(se.slice(W));return G?(J.w=j.get(G[0].toLowerCase()),W+G[0].length):-1}function $(J,se,W){var G=d.exec(se.slice(W));return G?(J.w=h.get(G[0].toLowerCase()),W+G[0].length):-1}function k(J,se,W){var G=y.exec(se.slice(W));return G?(J.m=g.get(G[0].toLowerCase()),W+G[0].length):-1}function I(J,se,W){var G=v.exec(se.slice(W));return G?(J.m=p.get(G[0].toLowerCase()),W+G[0].length):-1}function _(J,se,W){return A(J,t,se,W)}function C(J,se,W){return A(J,n,se,W)}function P(J,se,W){return A(J,r,se,W)}function z(J){return l[J.getDay()]}function B(J){return i[J.getDay()]}function K(J){return c[J.getMonth()]}function Y(J){return o[J.getMonth()]}function Q(J){return a[+(J.getHours()>=12)]}function Z(J){return 1+~~(J.getMonth()/3)}function ne(J){return l[J.getUTCDay()]}function ie(J){return i[J.getUTCDay()]}function je(J){return c[J.getUTCMonth()]}function ye(J){return o[J.getUTCMonth()]}function ft(J){return a[+(J.getUTCHours()>=12)]}function _e(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var se=w(J+="",b);return se.toString=function(){return J},se},parse:function(J){var se=O(J+="",!1);return se.toString=function(){return J},se},utcFormat:function(J){var se=w(J+="",x);return se.toString=function(){return J},se},utcParse:function(J){var se=O(J+="",!0);return se.toString=function(){return J},se}}}var jN={"-":"",_:" ",0:"0"},Bt=/^\s*\d+/,ine=/^%/,sne=/[\\^$*+?|[\]().{}]/g;function Te(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function lne(e){return e.replace(sne,"\\$&")}function wc(e){return new RegExp("^(?:"+e.map(lne).join("|")+")","i")}function Nc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function one(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function cne(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function une(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function fne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function dne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function SN(e,t,n){var r=Bt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function wN(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function hne(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function pne(e,t,n){var r=Bt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function mne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function NN(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yne(e,t,n){var r=Bt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ON(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function vne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function gne(e,t,n){var r=Bt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function xne(e,t,n){var r=Bt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function bne(e,t,n){var r=Bt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function jne(e,t,n){var r=ine.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Sne(e,t,n){var r=Bt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function wne(e,t,n){var r=Bt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function AN(e,t){return Te(e.getDate(),t,2)}function Nne(e,t){return Te(e.getHours(),t,2)}function One(e,t){return Te(e.getHours()%12||12,t,2)}function Ane(e,t){return Te(1+Df.count(Ma(e),e),t,3)}function lM(e,t){return Te(e.getMilliseconds(),t,3)}function Cne(e,t){return lM(e,t)+"000"}function Ene(e,t){return Te(e.getMonth()+1,t,2)}function _ne(e,t){return Te(e.getMinutes(),t,2)}function Tne(e,t){return Te(e.getSeconds(),t,2)}function kne(e){var t=e.getDay();return t===0?7:t}function Mne(e,t){return Te(Hm.count(Ma(e)-1,e),t,2)}function oM(e){var t=e.getDay();return t>=4||t===0?ho(e):ho.ceil(e)}function Pne(e,t){return e=oM(e),Te(ho.count(Ma(e),e)+(Ma(e).getDay()===4),t,2)}function $ne(e){return e.getDay()}function Rne(e,t){return Te(rp.count(Ma(e)-1,e),t,2)}function Dne(e,t){return Te(e.getFullYear()%100,t,2)}function Lne(e,t){return e=oM(e),Te(e.getFullYear()%100,t,2)}function zne(e,t){return Te(e.getFullYear()%1e4,t,4)}function Ine(e,t){var n=e.getDay();return e=n>=4||n===0?ho(e):ho.ceil(e),Te(e.getFullYear()%1e4,t,4)}function Bne(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Te(t/60|0,"0",2)+Te(t%60,"0",2)}function CN(e,t){return Te(e.getUTCDate(),t,2)}function Une(e,t){return Te(e.getUTCHours(),t,2)}function qne(e,t){return Te(e.getUTCHours()%12||12,t,2)}function Hne(e,t){return Te(1+qm.count(Pa(e),e),t,3)}function cM(e,t){return Te(e.getUTCMilliseconds(),t,3)}function Fne(e,t){return cM(e,t)+"000"}function Gne(e,t){return Te(e.getUTCMonth()+1,t,2)}function Kne(e,t){return Te(e.getUTCMinutes(),t,2)}function Vne(e,t){return Te(e.getUTCSeconds(),t,2)}function Yne(e){var t=e.getUTCDay();return t===0?7:t}function Wne(e,t){return Te(Fm.count(Pa(e)-1,e),t,2)}function uM(e){var t=e.getUTCDay();return t>=4||t===0?po(e):po.ceil(e)}function Qne(e,t){return e=uM(e),Te(po.count(Pa(e),e)+(Pa(e).getUTCDay()===4),t,2)}function Xne(e){return e.getUTCDay()}function Zne(e,t){return Te(ap.count(Pa(e)-1,e),t,2)}function Jne(e,t){return Te(e.getUTCFullYear()%100,t,2)}function ere(e,t){return e=uM(e),Te(e.getUTCFullYear()%100,t,2)}function tre(e,t){return Te(e.getUTCFullYear()%1e4,t,4)}function nre(e,t){var n=e.getUTCDay();return e=n>=4||n===0?po(e):po.ceil(e),Te(e.getUTCFullYear()%1e4,t,4)}function rre(){return"+0000"}function EN(){return"%"}function _N(e){return+e}function TN(e){return Math.floor(+e/1e3)}var Js,fM,dM;are({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 are(e){return Js=ane(e),fM=Js.format,Js.parse,dM=Js.utcFormat,Js.utcParse,Js}function ire(e){return new Date(e)}function sre(e){return e instanceof Date?+e:+new Date(+e)}function G1(e,t,n,r,a,i,l,o,c,u){var f=k1(),d=f.invert,h=f.domain,m=u(".%L"),j=u(":%S"),v=u("%I:%M"),p=u("%I %p"),y=u("%a %d"),g=u("%b %d"),b=u("%B"),x=u("%Y");function N(w){return(c(w)<w?m:o(w)<w?j:l(w)<w?v:i(w)<w?p:r(w)<w?a(w)<w?y:g:n(w)<w?b:x)(w)}return f.invert=function(w){return new Date(d(w))},f.domain=function(w){return arguments.length?h(Array.from(w,sre)):h().map(ire)},f.ticks=function(w){var O=h();return e(O[0],O[O.length-1],w??10)},f.tickFormat=function(w,O){return O==null?N:u(O)},f.nice=function(w){var O=h();return(!w||typeof w.range!="function")&&(w=t(O[0],O[O.length-1],w??10)),w?h(Z3(O,w)):f},f.copy=function(){return Rf(f,G1(e,t,n,r,a,i,l,o,c,u))},f}function lre(){return hr.apply(G1(nne,rne,Ma,H1,Hm,Df,U1,I1,is,fM).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ore(){return hr.apply(G1(ene,tne,Pa,F1,Fm,qm,q1,B1,is,dM).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Gm(){var e=0,t=1,n,r,a,i,l=ln,o=!1,c;function u(d){return d==null||isNaN(d=+d)?c:l(a===0?.5:(d=(i(d)-n)*a,o?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(o=!!d,u):o},u.interpolator=function(d){return arguments.length?(l=d,u):l};function f(d){return function(h){var m,j;return arguments.length?([m,j]=h,l=d(m,j),u):[l(0),l(1)]}}return u.range=f(ic),u.rangeRound=f(T1),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return i=d,n=d(e),r=d(t),a=n===r?0:1/(r-n),u}}function zi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function hM(){var e=Li(Gm()(ln));return e.copy=function(){return zi(e,hM())},za.apply(e,arguments)}function pM(){var e=$1(Gm()).domain([1,10]);return e.copy=function(){return zi(e,pM()).base(e.base())},za.apply(e,arguments)}function mM(){var e=R1(Gm());return e.copy=function(){return zi(e,mM()).constant(e.constant())},za.apply(e,arguments)}function K1(){var e=D1(Gm());return e.copy=function(){return zi(e,K1()).exponent(e.exponent())},za.apply(e,arguments)}function cre(){return K1.apply(null,arguments).exponent(.5)}function yM(){var e=[],t=ln;function n(r){if(r!=null&&!isNaN(r=+r))return t((Pf(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(wi),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Wee(e,i/r))},n.copy=function(){return yM(t).domain(e)},za.apply(n,arguments)}function Km(){var e=0,t=.5,n=1,r=1,a,i,l,o,c,u=ln,f,d=!1,h;function m(v){return isNaN(v=+v)?h:(v=.5+((v=+f(v))-i)*(r*v<r*i?o:c),u(d?Math.max(0,Math.min(1,v)):v))}m.domain=function(v){return arguments.length?([e,t,n]=v,a=f(e=+e),i=f(t=+t),l=f(n=+n),o=a===i?0:.5/(i-a),c=i===l?0:.5/(l-i),r=i<a?-1:1,m):[e,t,n]},m.clamp=function(v){return arguments.length?(d=!!v,m):d},m.interpolator=function(v){return arguments.length?(u=v,m):u};function j(v){return function(p){var y,g,b;return arguments.length?([y,g,b]=p,u=jte(v,[y,g,b]),m):[u(0),u(.5),u(1)]}}return m.range=j(ic),m.rangeRound=j(T1),m.unknown=function(v){return arguments.length?(h=v,m):h},function(v){return f=v,a=v(e),i=v(t),l=v(n),o=a===i?0:.5/(i-a),c=i===l?0:.5/(l-i),r=i<a?-1:1,m}}function vM(){var e=Li(Km()(ln));return e.copy=function(){return zi(e,vM())},za.apply(e,arguments)}function gM(){var e=$1(Km()).domain([.1,1,10]);return e.copy=function(){return zi(e,gM()).base(e.base())},za.apply(e,arguments)}function xM(){var e=R1(Km());return e.copy=function(){return zi(e,xM()).constant(e.constant())},za.apply(e,arguments)}function V1(){var e=D1(Km());return e.copy=function(){return zi(e,V1()).exponent(e.exponent())},za.apply(e,arguments)}function ure(){return V1.apply(null,arguments).exponent(.5)}const kN=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Eu,scaleDiverging:vM,scaleDivergingLog:gM,scaleDivergingPow:V1,scaleDivergingSqrt:ure,scaleDivergingSymlog:xM,scaleIdentity:X3,scaleImplicit:Ax,scaleLinear:tp,scaleLog:J3,scaleOrdinal:C1,scalePoint:Qc,scalePow:L1,scaleQuantile:nM,scaleQuantize:rM,scaleRadial:tM,scaleSequential:hM,scaleSequentialLog:pM,scaleSequentialPow:K1,scaleSequentialQuantile:yM,scaleSequentialSqrt:cre,scaleSequentialSymlog:mM,scaleSqrt:Fte,scaleSymlog:eM,scaleThreshold:aM,scaleTime:lre,scaleUtc:ore,tickFormat:Q3},Symbol.toStringTag,{value:"Module"}));var fre=Qo;function dre(e,t,n){for(var r=-1,a=e.length;++r<a;){var i=e[r],l=t(i);if(l!=null&&(o===void 0?l===l&&!fre(l):n(l,o)))var o=l,c=i}return c}var Vm=dre;function hre(e,t){return e>t}var bM=hre,pre=Vm,mre=bM,yre=ac;function vre(e){return e&&e.length?pre(e,yre,mre):void 0}var gre=vre;const fi=$e(gre);function xre(e,t){return e<t}var jM=xre,bre=Vm,jre=jM,Sre=ac;function wre(e){return e&&e.length?bre(e,Sre,jre):void 0}var Nre=wre;const Ym=$e(Nre);var Ore=o1,Are=ea,Cre=T3,Ere=jn;function _re(e,t){var n=Ere(e)?Ore:Cre;return n(e,Are(t))}var Tre=_re,kre=E3,Mre=Tre;function Pre(e,t){return kre(Mre(e,t),1)}var $re=Pre;const Rre=$e($re);var Dre=S1;function Lre(e,t){return Dre(e,t)}var zre=Lre;const ki=$e(zre);var sc=1e9,Ire={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},W1,at=!0,or="[DecimalError] ",ws=or+"Invalid argument: ",Y1=or+"Exponent out of range: ",lc=Math.floor,es=Math.pow,Bre=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,_n,Rt=1e7,Ze=7,SM=9007199254740991,ip=lc(SM/Ze),te={};te.absoluteValue=te.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};te.comparedTo=te.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};te.decimalPlaces=te.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Ze;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};te.dividedBy=te.div=function(e){return Na(this,new this.constructor(e))};te.dividedToIntegerBy=te.idiv=function(e){var t=this,n=t.constructor;return qe(Na(t,new n(e),0,1),n.precision)};te.equals=te.eq=function(e){return!this.cmp(e)};te.exponent=function(){return Ct(this)};te.greaterThan=te.gt=function(e){return this.cmp(e)>0};te.greaterThanOrEqualTo=te.gte=function(e){return this.cmp(e)>=0};te.isInteger=te.isint=function(){return this.e>this.d.length-2};te.isNegative=te.isneg=function(){return this.s<0};te.isPositive=te.ispos=function(){return this.s>0};te.isZero=function(){return this.s===0};te.lessThan=te.lt=function(e){return this.cmp(e)<0};te.lessThanOrEqualTo=te.lte=function(e){return this.cmp(e)<1};te.logarithm=te.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(_n))throw Error(or+"NaN");if(n.s<1)throw Error(or+(n.s?"NaN":"-Infinity"));return n.eq(_n)?new r(0):(at=!1,t=Na(Pu(n,i),Pu(e,i),i),at=!0,qe(t,a))};te.minus=te.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?OM(t,e):wM(t,(e.s=-e.s,e))};te.modulo=te.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(or+"NaN");return n.s?(at=!1,t=Na(n,e,0,1).times(e),at=!0,n.minus(t)):qe(new r(n),a)};te.naturalExponential=te.exp=function(){return NM(this)};te.naturalLogarithm=te.ln=function(){return Pu(this)};te.negated=te.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};te.plus=te.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?wM(t,e):OM(t,(e.s=-e.s,e))};te.precision=te.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ws+e);if(t=Ct(a)+1,r=a.d.length-1,n=r*Ze+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};te.squareRoot=te.sqrt=function(){var e,t,n,r,a,i,l,o=this,c=o.constructor;if(o.s<1){if(!o.s)return new c(0);throw Error(or+"NaN")}for(e=Ct(o),at=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=Hr(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=lc((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=l=n+3;;)if(i=r,r=i.plus(Na(o,i,l+2)).times(.5),Hr(i.d).slice(0,l)===(t=Hr(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),a==l&&t=="4999"){if(qe(i,n+1,0),i.times(i).eq(o)){r=i;break}}else if(t!="9999")break;l+=4}return at=!0,qe(r,n)};te.times=te.mul=function(e){var t,n,r,a,i,l,o,c,u,f=this,d=f.constructor,h=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,c=h.length,u=m.length,c<u&&(i=h,h=m,m=i,l=c,c=u,u=l),i=[],l=c+u,r=l;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=c+r;a>r;)o=i[a]+m[r]*h[a-r-1]+t,i[a--]=o%Rt|0,t=o/Rt|0;i[a]=(i[a]+t)%Rt|0}for(;!i[--l];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,at?qe(e,d.precision):e};te.toDecimalPlaces=te.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Wr(e,0,sc),t===void 0?t=r.rounding:Wr(t,0,8),qe(n,e+Ct(n)+1,t))};te.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=$s(r,!0):(Wr(e,0,sc),t===void 0?t=a.rounding:Wr(t,0,8),r=qe(new a(r),e+1,t),n=$s(r,!0,e+1)),n};te.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?$s(a):(Wr(e,0,sc),t===void 0?t=i.rounding:Wr(t,0,8),r=qe(new i(a),e+Ct(a)+1,t),n=$s(r.abs(),!1,e+Ct(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};te.toInteger=te.toint=function(){var e=this,t=e.constructor;return qe(new t(e),Ct(e)+1,t.rounding)};te.toNumber=function(){return+this};te.toPower=te.pow=function(e){var t,n,r,a,i,l,o=this,c=o.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(_n);if(o=new c(o),!o.s){if(e.s<1)throw Error(or+"Infinity");return o}if(o.eq(_n))return o;if(r=c.precision,e.eq(_n))return qe(o,r);if(t=e.e,n=e.d.length-1,l=t>=n,i=o.s,l){if((n=f<0?-f:f)<=SM){for(a=new c(_n),t=Math.ceil(r/Ze+4),at=!1;n%2&&(a=a.times(o),PN(a.d,t)),n=lc(n/2),n!==0;)o=o.times(o),PN(o.d,t);return at=!0,e.s<0?new c(_n).div(a):qe(a,r)}}else if(i<0)throw Error(or+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,at=!1,a=e.times(Pu(o,r+u)),at=!0,a=NM(a),a.s=i,a};te.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=Ct(a),r=$s(a,n<=i.toExpNeg||n>=i.toExpPos)):(Wr(e,1,sc),t===void 0?t=i.rounding:Wr(t,0,8),a=qe(new i(a),e,t),n=Ct(a),r=$s(a,e<=n||n<=i.toExpNeg,e)),r};te.toSignificantDigits=te.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Wr(e,1,sc),t===void 0?t=r.rounding:Wr(t,0,8)),qe(new r(n),e,t)};te.toString=te.valueOf=te.val=te.toJSON=te[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ct(e),n=e.constructor;return $s(e,t<=n.toExpNeg||t>=n.toExpPos)};function wM(e,t){var n,r,a,i,l,o,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),at?qe(t,d):t;if(c=e.d,u=t.d,l=e.e,a=t.e,c=c.slice(),i=l-a,i){for(i<0?(r=c,i=-i,o=u.length):(r=u,a=l,o=c.length),l=Math.ceil(d/Ze),o=l>o?l+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=c.length,i=u.length,o-i<0&&(i=o,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/Rt|0,c[i]%=Rt;for(n&&(c.unshift(n),++a),o=c.length;c[--o]==0;)c.pop();return t.d=c,t.e=a,at?qe(t,d):t}function Wr(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ws+e)}function Hr(e){var t,n,r,a=e.length-1,i="",l=e[0];if(a>0){for(i+=l,t=1;t<a;t++)r=e[t]+"",n=Ze-r.length,n&&(i+=Ya(n)),i+=r;l=e[t],r=l+"",n=Ze-r.length,n&&(i+=Ya(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return i+l}var Na=function(){function e(r,a){var i,l=0,o=r.length;for(r=r.slice();o--;)i=r[o]*a+l,r[o]=i%Rt|0,l=i/Rt|0;return l&&r.unshift(l),r}function t(r,a,i,l){var o,c;if(i!=l)c=i>l?1:-1;else for(o=c=0;o<i;o++)if(r[o]!=a[o]){c=r[o]>a[o]?1:-1;break}return c}function n(r,a,i){for(var l=0;i--;)r[i]-=l,l=r[i]<a[i]?1:0,r[i]=l*Rt+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,l){var o,c,u,f,d,h,m,j,v,p,y,g,b,x,N,w,O,A,E=r.constructor,M=r.s==a.s?1:-1,$=r.d,k=a.d;if(!r.s)return new E(r);if(!a.s)throw Error(or+"Division by zero");for(c=r.e-a.e,O=k.length,N=$.length,m=new E(M),j=m.d=[],u=0;k[u]==($[u]||0);)++u;if(k[u]>($[u]||0)&&--c,i==null?g=i=E.precision:l?g=i+(Ct(r)-Ct(a))+1:g=i,g<0)return new E(0);if(g=g/Ze+2|0,u=0,O==1)for(f=0,k=k[0],g++;(u<N||f)&&g--;u++)b=f*Rt+($[u]||0),j[u]=b/k|0,f=b%k|0;else{for(f=Rt/(k[0]+1)|0,f>1&&(k=e(k,f),$=e($,f),O=k.length,N=$.length),x=O,v=$.slice(0,O),p=v.length;p<O;)v[p++]=0;A=k.slice(),A.unshift(0),w=k[0],k[1]>=Rt/2&&++w;do f=0,o=t(k,v,O,p),o<0?(y=v[0],O!=p&&(y=y*Rt+(v[1]||0)),f=y/w|0,f>1?(f>=Rt&&(f=Rt-1),d=e(k,f),h=d.length,p=v.length,o=t(d,v,h,p),o==1&&(f--,n(d,O<h?A:k,h))):(f==0&&(o=f=1),d=k.slice()),h=d.length,h<p&&d.unshift(0),n(v,d,p),o==-1&&(p=v.length,o=t(k,v,O,p),o<1&&(f++,n(v,O<p?A:k,p))),p=v.length):o===0&&(f++,v=[0]),j[u++]=f,o&&v[0]?v[p++]=$[x]||0:(v=[$[x]],p=1);while((x++<N||v[0]!==void 0)&&g--)}return j[0]||j.shift(),m.e=c,qe(m,l?i+Ct(m)+1:i)}}();function NM(e,t){var n,r,a,i,l,o,c=0,u=0,f=e.constructor,d=f.precision;if(Ct(e)>16)throw Error(Y1+Ct(e));if(!e.s)return new f(_n);for(at=!1,o=d,l=new f(.03125);e.abs().gte(.1);)e=e.times(l),u+=5;for(r=Math.log(es(2,u))/Math.LN10*2+5|0,o+=r,n=a=i=new f(_n),f.precision=o;;){if(a=qe(a.times(e),o),n=n.times(++c),l=i.plus(Na(a,n,o)),Hr(l.d).slice(0,o)===Hr(i.d).slice(0,o)){for(;u--;)i=qe(i.times(i),o);return f.precision=d,t==null?(at=!0,qe(i,d)):i}i=l}}function Ct(e){for(var t=e.e*Ze,n=e.d[0];n>=10;n/=10)t++;return t}function Nv(e,t,n){if(t>e.LN10.sd())throw at=!0,n&&(e.precision=n),Error(or+"LN10 precision limit exceeded");return qe(new e(e.LN10),t)}function Ya(e){for(var t="";e--;)t+="0";return t}function Pu(e,t){var n,r,a,i,l,o,c,u,f,d=1,h=10,m=e,j=m.d,v=m.constructor,p=v.precision;if(m.s<1)throw Error(or+(m.s?"NaN":"-Infinity"));if(m.eq(_n))return new v(0);if(t==null?(at=!1,u=p):u=t,m.eq(10))return t==null&&(at=!0),Nv(v,u);if(u+=h,v.precision=u,n=Hr(j),r=n.charAt(0),i=Ct(m),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Hr(m.d),r=n.charAt(0),d++;i=Ct(m),r>1?(m=new v("0."+n),i++):m=new v(r+"."+n.slice(1))}else return c=Nv(v,u+2,p).times(i+""),m=Pu(new v(r+"."+n.slice(1)),u-h).plus(c),v.precision=p,t==null?(at=!0,qe(m,p)):m;for(o=l=m=Na(m.minus(_n),m.plus(_n),u),f=qe(m.times(m),u),a=3;;){if(l=qe(l.times(f),u),c=o.plus(Na(l,new v(a),u)),Hr(c.d).slice(0,u)===Hr(o.d).slice(0,u))return o=o.times(2),i!==0&&(o=o.plus(Nv(v,u+2,p).times(i+""))),o=Na(o,new v(d),u),v.precision=p,t==null?(at=!0,qe(o,p)):o;o=c,a+=2}}function MN(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=lc(n/Ze),e.d=[],r=(n+1)%Ze,n<0&&(r+=Ze),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=Ze;r<a;)e.d.push(+t.slice(r,r+=Ze));t=t.slice(r),r=Ze-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),at&&(e.e>ip||e.e<-ip))throw Error(Y1+n)}else e.s=0,e.e=0,e.d=[0];return e}function qe(e,t,n){var r,a,i,l,o,c,u,f,d=e.d;for(l=1,i=d[0];i>=10;i/=10)l++;if(r=t-l,r<0)r+=Ze,a=t,u=d[f=0];else{if(f=Math.ceil((r+1)/Ze),i=d.length,f>=i)return e;for(u=i=d[f],l=1;i>=10;i/=10)l++;r%=Ze,a=r-Ze+l}if(n!==void 0&&(i=es(10,l-a-1),o=u/i%10|0,c=t<0||d[f+1]!==void 0||u%i,c=n<4?(o||c)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||c||n==6&&(r>0?a>0?u/es(10,l-a):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return c?(i=Ct(e),d.length=1,t=t-i-1,d[0]=es(10,(Ze-t%Ze)%Ze),e.e=lc(-t/Ze)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,i=1,f--):(d.length=f+1,i=es(10,Ze-r),d[f]=a>0?(u/es(10,l-a)%es(10,a)|0)*i:0),c)for(;;)if(f==0){(d[0]+=i)==Rt&&(d[0]=1,++e.e);break}else{if(d[f]+=i,d[f]!=Rt)break;d[f--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(at&&(e.e>ip||e.e<-ip))throw Error(Y1+Ct(e));return e}function OM(e,t){var n,r,a,i,l,o,c,u,f,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),at?qe(t,m):t;if(c=e.d,d=t.d,r=t.e,u=e.e,c=c.slice(),l=u-r,l){for(f=l<0,f?(n=c,l=-l,o=d.length):(n=d,r=u,o=c.length),a=Math.max(Math.ceil(m/Ze),o)+2,l>a&&(l=a,n.length=1),n.reverse(),a=l;a--;)n.push(0);n.reverse()}else{for(a=c.length,o=d.length,f=a<o,f&&(o=a),a=0;a<o;a++)if(c[a]!=d[a]){f=c[a]<d[a];break}l=0}for(f&&(n=c,c=d,d=n,t.s=-t.s),o=c.length,a=d.length-o;a>0;--a)c[o++]=0;for(a=d.length;a>l;){if(c[--a]<d[a]){for(i=a;i&&c[--i]===0;)c[i]=Rt-1;--c[i],c[a]+=Rt}c[a]-=d[a]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,at?qe(t,m):t):new h(0)}function $s(e,t,n){var r,a=Ct(e),i=Hr(e.d),l=i.length;return t?(n&&(r=n-l)>0?i=i.charAt(0)+"."+i.slice(1)+Ya(r):l>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Ya(-a-1)+i,n&&(r=n-l)>0&&(i+=Ya(r))):a>=l?(i+=Ya(a+1-l),n&&(r=n-a-1)>0&&(i=i+"."+Ya(r))):((r=a+1)<l&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-l)>0&&(a+1===l&&(i+="."),i+=Ya(r))),e.s<0?"-"+i:i}function PN(e,t){if(e.length>t)return e.length=t,!0}function AM(e){var t,n,r;function a(i){var l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,i instanceof a){l.s=i.s,l.e=i.e,l.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(ws+i);if(i>0)l.s=1;else if(i<0)i=-i,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(i===~~i&&i<1e7){l.e=0,l.d=[i];return}return MN(l,i.toString())}else if(typeof i!="string")throw Error(ws+i);if(i.charCodeAt(0)===45?(i=i.slice(1),l.s=-1):l.s=1,Bre.test(i))MN(l,i);else throw Error(ws+i)}if(a.prototype=te,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=AM,a.config=a.set=Ure,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function Ure(e){if(!e||typeof e!="object")throw Error(or+"Object expected");var t,n,r,a=["precision",1,sc,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(lc(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(ws+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ws+n+": "+r);return this}var W1=AM(Ire);_n=new W1(1);const Be=W1;function qre(e){return Kre(e)||Gre(e)||Fre(e)||Hre()}function Hre(){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 Fre(e,t){if(e){if(typeof e=="string")return Tx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tx(e,t)}}function Gre(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Kre(e){if(Array.isArray(e))return Tx(e)}function Tx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Vre=function(t){return t},CM={},EM=function(t){return t===CM},$N=function(t){return function n(){return arguments.length===0||arguments.length===1&&EM(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},Yre=function e(t,n){return t===1?n:$N(function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var l=a.filter(function(o){return o!==CM}).length;return l>=t?n.apply(void 0,a):e(t-l,$N(function(){for(var o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];var f=a.map(function(d){return EM(d)?c.shift():d});return n.apply(void 0,qre(f).concat(c))}))})},Wm=function(t){return Yre(t.length,t)},kx=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},Wre=Wm(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Qre=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return Vre;var a=n.reverse(),i=a[0],l=a.slice(1);return function(){return l.reduce(function(o,c){return c(o)},i.apply(void 0,arguments))}},Mx=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},_M=function(t){var n=null,r=null;return function(){for(var a=arguments.length,i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];return n&&i.every(function(o,c){return o===n[c]})||(n=i,r=t.apply(void 0,i)),r}};function Xre(e){var t;return e===0?t=1:t=Math.floor(new Be(e).abs().log(10).toNumber())+1,t}function Zre(e,t,n){for(var r=new Be(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var Jre=Wm(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),eae=Wm(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),tae=Wm(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Qm={rangeStep:Zre,getDigitCount:Xre,interpolateNumber:Jre,uninterpolateNumber:eae,uninterpolateTruncation:tae};function Px(e){return aae(e)||rae(e)||TM(e)||nae()}function nae(){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 rae(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function aae(e){if(Array.isArray(e))return $x(e)}function $u(e,t){return lae(e)||sae(e,t)||TM(e,t)||iae()}function iae(){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 TM(e,t){if(e){if(typeof e=="string")return $x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $x(e,t)}}function $x(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sae(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var l=e[Symbol.iterator](),o;!(r=(o=l.next()).done)&&(n.push(o.value),!(t&&n.length===t));r=!0);}catch(c){a=!0,i=c}finally{try{!r&&l.return!=null&&l.return()}finally{if(a)throw i}}return n}}function lae(e){if(Array.isArray(e))return e}function kM(e){var t=$u(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function MM(e,t,n){if(e.lte(0))return new Be(0);var r=Qm.getDigitCount(e.toNumber()),a=new Be(10).pow(r),i=e.div(a),l=r!==1?.05:.1,o=new Be(Math.ceil(i.div(l).toNumber())).add(n).mul(l),c=o.mul(a);return t?c:new Be(Math.ceil(c))}function oae(e,t,n){var r=1,a=new Be(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new Be(10).pow(Qm.getDigitCount(e)-1),a=new Be(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new Be(Math.floor(e)))}else e===0?a=new Be(Math.floor((t-1)/2)):n||(a=new Be(Math.floor(e)));var l=Math.floor((t-1)/2),o=Qre(Wre(function(c){return a.add(new Be(c-l).mul(r)).toNumber()}),kx);return o(0,t)}function PM(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Be(0),tickMin:new Be(0),tickMax:new Be(0)};var i=MM(new Be(t).sub(e).div(n-1),r,a),l;e<=0&&t>=0?l=new Be(0):(l=new Be(e).add(t).div(2),l=l.sub(new Be(l).mod(i)));var o=Math.ceil(l.sub(e).div(i).toNumber()),c=Math.ceil(new Be(t).sub(l).div(i).toNumber()),u=o+c+1;return u>n?PM(e,t,n,r,a+1):(u<n&&(c=t>0?c+(n-u):c,o=t>0?o:o+(n-u)),{step:i,tickMin:l.sub(new Be(o).mul(i)),tickMax:l.add(new Be(c).mul(i))})}function cae(e){var t=$u(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(a,2),o=kM([n,r]),c=$u(o,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(Px(kx(0,a-1).map(function(){return 1/0}))):[].concat(Px(kx(0,a-1).map(function(){return-1/0})),[f]);return n>r?Mx(d):d}if(u===f)return oae(u,a,i);var h=PM(u,f,l,i),m=h.step,j=h.tickMin,v=h.tickMax,p=Qm.rangeStep(j,v.add(new Be(.1).mul(m)),m);return n>r?Mx(p):p}function uae(e,t){var n=$u(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=kM([r,a]),o=$u(l,2),c=o[0],u=o[1];if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var f=Math.max(t,2),d=MM(new Be(u).sub(c).div(f-1),i,0),h=[].concat(Px(Qm.rangeStep(new Be(c),new Be(u).sub(new Be(.99).mul(d)),d)),[u]);return r>a?Mx(h):h}var fae=_M(cae),dae=_M(uae),hae="Invariant failed";function Rs(e,t){throw new Error(hae)}var pae=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function mo(e){"@babel/helpers - typeof";return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(e)}function sp(){return sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sp.apply(this,arguments)}function mae(e,t){return xae(e)||gae(e,t)||vae(e,t)||yae()}function yae(){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 vae(e,t){if(e){if(typeof e=="string")return RN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return RN(e,t)}}function RN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function xae(e){if(Array.isArray(e))return e}function bae(e,t){if(e==null)return{};var n=jae(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jae(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Sae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,DM(r.key),r)}}function Nae(e,t,n){return t&&wae(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oae(e,t,n){return t=lp(t),Aae(e,$M()?Reflect.construct(t,n||[],lp(e).constructor):t.apply(e,n))}function Aae(e,t){if(t&&(mo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cae(e)}function Cae(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($M=function(){return!!e})()}function lp(e){return lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},lp(e)}function Eae(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rx(e,t)}function Rx(e,t){return Rx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Rx(e,t)}function RM(e,t,n){return t=DM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DM(e){var t=_ae(e,"string");return mo(t)=="symbol"?t:t+""}function _ae(e,t){if(mo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oc=function(e){function t(){return Sae(this,t),Oae(this,t,arguments)}return Eae(t,e),Nae(t,[{key:"render",value:function(){var r=this.props,a=r.offset,i=r.layout,l=r.width,o=r.dataKey,c=r.data,u=r.dataPointFormatter,f=r.xAxis,d=r.yAxis,h=bae(r,pae),m=ae(h,!1);this.props.direction==="x"&&f.type!=="number"&&Rs();var j=c.map(function(v){var p=u(v,o),y=p.x,g=p.y,b=p.value,x=p.errorVal;if(!x)return null;var N=[],w,O;if(Array.isArray(x)){var A=mae(x,2);w=A[0],O=A[1]}else w=O=x;if(i==="vertical"){var E=f.scale,M=g+a,$=M+l,k=M-l,I=E(b-w),_=E(b+O);N.push({x1:_,y1:$,x2:_,y2:k}),N.push({x1:I,y1:M,x2:_,y2:M}),N.push({x1:I,y1:$,x2:I,y2:k})}else if(i==="horizontal"){var C=d.scale,P=y+a,z=P-l,B=P+l,K=C(b-w),Y=C(b+O);N.push({x1:z,y1:Y,x2:B,y2:Y}),N.push({x1:P,y1:K,x2:P,y2:Y}),N.push({x1:z,y1:K,x2:B,y2:K})}return T.createElement(ge,sp({className:"recharts-errorBar",key:"bar-".concat(N.map(function(Q){return"".concat(Q.x1,"-").concat(Q.x2,"-").concat(Q.y1,"-").concat(Q.y2)}))},m),N.map(function(Q){return T.createElement("line",sp({},Q,{key:"line-".concat(Q.x1,"-").concat(Q.x2,"-").concat(Q.y1,"-").concat(Q.y2)}))}))});return T.createElement(ge,{className:"recharts-errorBars"},j)}}])}(T.Component);RM(oc,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});RM(oc,"displayName","ErrorBar");function Ru(e){"@babel/helpers - typeof";return Ru=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ru(e)}function DN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DN(Object(n),!0).forEach(function(r){Tae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tae(e,t,n){return t=kae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kae(e){var t=Mae(e,"string");return Ru(t)=="symbol"?t:t+""}function Mae(e,t){if(Ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LM=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,l=On(n,tr);if(!l)return null;var o=tr.defaultProps,c=o!==void 0?Gi(Gi({},o),l.props):{},u;return l.props&&l.props.payload?u=l.props&&l.props.payload:i==="children"?u=(r||[]).reduce(function(f,d){var h=d.item,m=d.props,j=m.sectors||m.data||[];return f.concat(j.map(function(v){return{type:l.props.iconType||h.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(r||[]).map(function(f){var d=f.item,h=d.type.defaultProps,m=h!==void 0?Gi(Gi({},h),d.props):{},j=m.dataKey,v=m.name,p=m.legendType,y=m.hide;return{inactive:y,dataKey:j,type:c.iconType||p||"square",color:Q1(d),value:v||j,payload:m}}),Gi(Gi(Gi({},c),tr.getWithHeight(l,a)),{},{payload:u,item:l})};function Du(e){"@babel/helpers - typeof";return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(e)}function LN(e){return Dae(e)||Rae(e)||$ae(e)||Pae()}function Pae(){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 $ae(e,t){if(e){if(typeof e=="string")return Dx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dx(e,t)}}function Rae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dae(e){if(Array.isArray(e))return Dx(e)}function Dx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zN(Object(n),!0).forEach(function(r){$l(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $l(e,t,n){return t=Lae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lae(e){var t=zae(e,"string");return Du(t)=="symbol"?t:t+""}function zae(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function et(e,t,n){return oe(e)||oe(t)?n:kt(t)?Rn(e,t,n):ce(t)?t(e):n}function Xc(e,t,n,r){var a=Rre(e,function(o){return et(o,t)});if(n==="number"){var i=a.filter(function(o){return X(o)||parseFloat(o)});return i.length?[Ym(i),fi(i)]:[1/0,-1/0]}var l=r?a.filter(function(o){return!oe(o)}):a;return l.map(function(o){return kt(o)||o instanceof Date?o:""})}var Iae=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,l=-1,o=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(o<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<o;u++){var f=u>0?a[u-1].coordinate:a[o-1].coordinate,d=a[u].coordinate,h=u>=o-1?a[0].coordinate:a[u+1].coordinate,m=void 0;if(an(d-f)!==an(h-d)){var j=[];if(an(h-d)===an(c[1]-c[0])){m=h;var v=d+c[1]-c[0];j[0]=Math.min(v,(v+f)/2),j[1]=Math.max(v,(v+f)/2)}else{m=f;var p=h+c[1]-c[0];j[0]=Math.min(d,(p+d)/2),j[1]=Math.max(d,(p+d)/2)}var y=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>y[0]&&t<=y[1]||t>=j[0]&&t<=j[1]){l=a[u].index;break}}else{var g=Math.min(f,h),b=Math.max(f,h);if(t>(g+d)/2&&t<=(b+d)/2){l=a[u].index;break}}}else for(var x=0;x<o;x++)if(x===0&&t<=(r[x].coordinate+r[x+1].coordinate)/2||x>0&&x<o-1&&t>(r[x].coordinate+r[x-1].coordinate)/2&&t<=(r[x].coordinate+r[x+1].coordinate)/2||x===o-1&&t>(r[x].coordinate+r[x-1].coordinate)/2){l=r[x].index;break}return l},Q1=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?mt(mt({},t.type.defaultProps),t.props):t.props,l=i.stroke,o=i.fill,c;switch(a){case"Line":c=l;break;case"Area":case"Radar":c=l&&l!=="none"?l:o;break;default:c=o;break}return c},Bae=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var l={},o=Object.keys(i),c=0,u=o.length;c<u;c++)for(var f=i[o[c]].stackGroups,d=Object.keys(f),h=0,m=d.length;h<m;h++){var j=f[d[h]],v=j.items,p=j.cateAxisId,y=v.filter(function(O){return wa(O.type).indexOf("Bar")>=0});if(y&&y.length){var g=y[0].type.defaultProps,b=g!==void 0?mt(mt({},g),y[0].props):y[0].props,x=b.barSize,N=b[p];l[N]||(l[N]=[]);var w=oe(x)?n:x;l[N].push({item:y[0],stackList:y.slice(1),barSize:oe(w)?void 0:sn(w,r,0)})}}return l},Uae=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,l=i===void 0?[]:i,o=t.maxBarSize,c=l.length;if(c<1)return null;var u=sn(n,a,0,!0),f,d=[];if(l[0].barSize===+l[0].barSize){var h=!1,m=a/c,j=l.reduce(function(x,N){return x+N.barSize||0},0);j+=(c-1)*u,j>=a&&(j-=(c-1)*u,u=0),j>=a&&m>0&&(h=!0,m*=.9,j=c*m);var v=(a-j)/2>>0,p={offset:v-u,size:0};f=l.reduce(function(x,N){var w={item:N.item,position:{offset:p.offset+p.size+u,size:h?m:N.barSize}},O=[].concat(LN(x),[w]);return p=O[O.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(A){O.push({item:A,position:p})}),O},d)}else{var y=sn(r,a,0,!0);a-2*y-(c-1)*u<=0&&(u=0);var g=(a-2*y-(c-1)*u)/c;g>1&&(g>>=0);var b=o===+o?Math.min(g,o):g;f=l.reduce(function(x,N,w){var O=[].concat(LN(x),[{item:N.item,position:{offset:y+(g+u)*w+(g-b)/2,size:b}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(A){O.push({item:A,position:O[O.length-1].position})}),O},d)}return f},qae=function(t,n,r,a){var i=r.children,l=r.width,o=r.margin,c=l-(o.left||0)-(o.right||0),u=LM({children:i,legendWidth:c});if(u){var f=a||{},d=f.width,h=f.height,m=u.align,j=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&j==="middle")&&m!=="center"&&X(t[m]))return mt(mt({},t),{},$l({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&j!=="middle"&&X(t[j]))return mt(mt({},t),{},$l({},j,t[j]+(h||0)))}return t},Hae=function(t,n,r){return oe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},zM=function(t,n,r,a,i){var l=n.props.children,o=cn(l,oc).filter(function(u){return Hae(a,i,u.props.direction)});if(o&&o.length){var c=o.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=et(f,r);if(oe(d))return u;var h=Array.isArray(d)?[Ym(d),fi(d)]:[d,d],m=c.reduce(function(j,v){var p=et(f,v,0),y=h[0]-Math.abs(Array.isArray(p)?p[0]:p),g=h[1]+Math.abs(Array.isArray(p)?p[1]:p);return[Math.min(y,j[0]),Math.max(g,j[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},Fae=function(t,n,r,a,i){var l=n.map(function(o){return zM(t,o,r,i,a)}).filter(function(o){return!oe(o)});return l&&l.length?l.reduce(function(o,c){return[Math.min(o[0],c[0]),Math.max(o[1],c[1])]},[1/0,-1/0]):null},IM=function(t,n,r,a,i){var l=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&zM(t,c,u,a)||Xc(t,u,r,i)});if(r==="number")return l.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var o={};return l.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)o[u[f]]||(o[u[f]]=!0,c.push(u[f]));return c},[])},BM=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},UM=function(t,n,r,a){if(a)return t.map(function(c){return c.coordinate});var i,l,o=t.map(function(c){return c.coordinate===n&&(i=!0),c.coordinate===r&&(l=!0),c.coordinate});return i||o.push(n),l||o.push(r),o},xa=function(t,n,r){if(!t)return null;var a=t.scale,i=t.duplicateDomain,l=t.type,o=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(n||r)&&l==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?an(o[0]-o[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=i?i.indexOf(d):d;return{coordinate:a(h)+u,value:d,offset:u}});return f.filter(function(d){return!tc(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:a(d)+u,value:d,index:h,offset:u}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(d){return{coordinate:a(d)+u,value:d,offset:u}}):a.domain().map(function(d,h){return{coordinate:a(d)+u,value:i?i[d]:d,index:h,offset:u}})},Ov=new WeakMap,yd=function(t,n){if(typeof n!="function")return t;Ov.has(t)||Ov.set(t,new WeakMap);var r=Ov.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},qM=function(t,n,r){var a=t.scale,i=t.type,l=t.layout,o=t.axisType;if(a==="auto")return l==="radial"&&o==="radiusAxis"?{scale:Eu(),realScaleType:"band"}:l==="radial"&&o==="angleAxis"?{scale:tp(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Qc(),realScaleType:"point"}:i==="category"?{scale:Eu(),realScaleType:"band"}:{scale:tp(),realScaleType:"linear"};if(Ms(a)){var c="scale".concat(Pm(a));return{scale:(kN[c]||Qc)(),realScaleType:kN[c]?c:"point"}}return ce(a)?{scale:a}:{scale:Qc(),realScaleType:"point"}},IN=1e-4,HM=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),i=Math.min(a[0],a[1])-IN,l=Math.max(a[0],a[1])+IN,o=t(n[0]),c=t(n[r-1]);(o<i||o>l||c<i||c>l)&&t.domain([n[0],n[r-1]])}},Gae=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},Kae=function(t,n){if(!n||n.length!==2||!X(n[0])||!X(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!X(t[0])||t[0]<r)&&(i[0]=r),(!X(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<r&&(i[1]=r),i},Vae=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,l=0,o=0;o<n;++o){var c=tc(t[o][r][1])?t[o][r][0]:t[o][r][1];c>=0?(t[o][r][0]=i,t[o][r][1]=i+c,i=t[o][r][1]):(t[o][r][0]=l,t[o][r][1]=l+c,l=t[o][r][1])}},Yae=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,l=0;l<n;++l){var o=tc(t[l][r][1])?t[l][r][0]:t[l][r][1];o>=0?(t[l][r][0]=i,t[l][r][1]=i+o,i=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},Wae={sign:Vae,expand:pG,none:so,silhouette:mG,wiggle:yG,positive:Yae},Qae=function(t,n,r){var a=n.map(function(o){return o.props.dataKey}),i=Wae[r],l=hG().keys(a).value(function(o,c){return+et(o,c,0)}).order(lx).offset(i);return l(t)},Xae=function(t,n,r,a,i,l){if(!t)return null;var o=l?n.reverse():n,c={},u=o.reduce(function(d,h){var m,j=(m=h.type)!==null&&m!==void 0&&m.defaultProps?mt(mt({},h.type.defaultProps),h.props):h.props,v=j.stackId,p=j.hide;if(p)return d;var y=j[r],g=d[y]||{hasStack:!1,stackGroups:{}};if(kt(v)){var b=g.stackGroups[v]||{numericAxisId:r,cateAxisId:a,items:[]};b.items.push(h),g.hasStack=!0,g.stackGroups[v]=b}else g.stackGroups[Di("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[h]};return mt(mt({},d),{},$l({},y,g))},c),f={};return Object.keys(u).reduce(function(d,h){var m=u[h];if(m.hasStack){var j={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,p){var y=m.stackGroups[p];return mt(mt({},v),{},$l({},p,{numericAxisId:r,cateAxisId:a,items:y.items,stackedData:Qae(t,y.items,i)}))},j)}return mt(mt({},d),{},$l({},h,m))},f)},FM=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,l=n.originalDomain,o=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=fae(u,i,o);return t.domain([Ym(f),fi(f)]),{niceTicks:f}}if(i&&a==="number"){var d=t.domain(),h=dae(d,i,o);return{niceTicks:h}}return null};function yo(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!oe(a[t.dataKey])){var o=Ph(n,"value",a[t.dataKey]);if(o)return o.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=et(a,oe(l)?t.dataKey:l);return oe(c)?null:t.scale(c)}var BN=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,l=t.entry,o=t.index;if(n.type==="category")return r[o]?r[o].coordinate+a:null;var c=et(l,n.dataKey,n.domain[o]);return oe(c)?null:n.scale(c)-i/2+a},Zae=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return a<=0&&i>=0?0:i<0?i:a}return r[0]},Jae=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?mt(mt({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(kt(i)){var l=n[i];if(l){var o=l.items.indexOf(t);return o>=0?l.stackedData[o]:null}}return null},eie=function(t){return t.reduce(function(n,r){return[Ym(r.concat([n[0]]).filter(X)),fi(r.concat([n[1]]).filter(X))]},[1/0,-1/0])},GM=function(t,n,r){return Object.keys(t).reduce(function(a,i){var l=t[i],o=l.stackedData,c=o.reduce(function(u,f){var d=eie(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},UN=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,qN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Lx=function(t,n,r){if(ce(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(X(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(UN.test(t[0])){var i=+UN.exec(t[0])[1];a[0]=n[0]-i}else ce(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(X(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(qN.test(t[1])){var l=+qN.exec(t[1])[1];a[1]=n[1]+l}else ce(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},op=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var i=N1(n,function(d){return d.coordinate}),l=1/0,o=1,c=i.length;o<c;o++){var u=i[o],f=i[o-1];l=Math.min((u.coordinate||0)-(f.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},HN=function(t,n,r){return!t||!t.length||ki(t,Rn(r,"type.defaultProps.domain"))?n:t},KM=function(t,n){var r=t.type.defaultProps?mt(mt({},t.type.defaultProps),t.props):t.props,a=r.dataKey,i=r.name,l=r.unit,o=r.formatter,c=r.tooltipType,u=r.chartType,f=r.hide;return mt(mt({},ae(t,!1)),{},{dataKey:a,unit:l,formatter:o,name:i||a,color:Q1(t),value:et(n,a),type:c,payload:n,chartType:u,hide:f})};function Lu(e){"@babel/helpers - typeof";return Lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(e)}function FN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ca(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FN(Object(n),!0).forEach(function(r){VM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VM(e,t,n){return t=tie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tie(e){var t=nie(e,"string");return Lu(t)=="symbol"?t:t+""}function nie(e,t){if(Lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rie(e,t){return lie(e)||sie(e,t)||iie(e,t)||aie()}function aie(){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 iie(e,t){if(e){if(typeof e=="string")return GN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GN(e,t)}}function GN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function sie(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function lie(e){if(Array.isArray(e))return e}var cp=Math.PI/180,oie=function(t){return t*180/Math.PI},Ye=function(t,n,r,a){return{x:t+Math.cos(-cp*a)*r,y:n+Math.sin(-cp*a)*r}},YM=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},cie=function(t,n,r,a,i){var l=t.width,o=t.height,c=t.startAngle,u=t.endAngle,f=sn(t.cx,l,l/2),d=sn(t.cy,o,o/2),h=YM(l,o,r),m=sn(t.innerRadius,h,0),j=sn(t.outerRadius,h,h*.8),v=Object.keys(n);return v.reduce(function(p,y){var g=n[y],b=g.domain,x=g.reversed,N;if(oe(g.range))a==="angleAxis"?N=[c,u]:a==="radiusAxis"&&(N=[m,j]),x&&(N=[N[1],N[0]]);else{N=g.range;var w=N,O=rie(w,2);c=O[0],u=O[1]}var A=qM(g,i),E=A.realScaleType,M=A.scale;M.domain(b).range(N),HM(M);var $=FM(M,ca(ca({},g),{},{realScaleType:E})),k=ca(ca(ca({},g),$),{},{range:N,radius:j,realScaleType:E,scale:M,cx:f,cy:d,innerRadius:m,outerRadius:j,startAngle:c,endAngle:u});return ca(ca({},p),{},VM({},y,k))},{})},uie=function(t,n){var r=t.x,a=t.y,i=n.x,l=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(a-l,2))},fie=function(t,n){var r=t.x,a=t.y,i=n.cx,l=n.cy,o=uie({x:r,y:a},{x:i,y:l});if(o<=0)return{radius:o};var c=(r-i)/o,u=Math.acos(c);return a>l&&(u=2*Math.PI-u),{radius:o,angle:oie(u),angleInRadian:u}},die=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),l=Math.min(a,i);return{startAngle:n-l*360,endAngle:r-l*360}},hie=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),l=Math.floor(a/360),o=Math.min(i,l);return t+o*360},KN=function(t,n){var r=t.x,a=t.y,i=fie({x:r,y:a},n),l=i.radius,o=i.angle,c=n.innerRadius,u=n.outerRadius;if(l<c||l>u)return!1;if(l===0)return!0;var f=die(n),d=f.startAngle,h=f.endAngle,m=o,j;if(d<=h){for(;m>h;)m-=360;for(;m<d;)m+=360;j=m>=d&&m<=h}else{for(;m>d;)m-=360;for(;m<h;)m+=360;j=m>=h&&m<=d}return j?ca(ca({},n),{},{radius:l,angle:hie(m,n)}):null},WM=function(t){return!S.isValidElement(t)&&!ce(t)&&typeof t!="boolean"?t.className:""};function zu(e){"@babel/helpers - typeof";return zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zu(e)}var pie=["offset"];function mie(e){return xie(e)||gie(e)||vie(e)||yie()}function yie(){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 vie(e,t){if(e){if(typeof e=="string")return zx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zx(e,t)}}function gie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xie(e){if(Array.isArray(e))return zx(e)}function zx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bie(e,t){if(e==null)return{};var n=jie(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function VN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VN(Object(n),!0).forEach(function(r){Sie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sie(e,t,n){return t=wie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wie(e){var t=Nie(e,"string");return zu(t)=="symbol"?t:t+""}function Nie(e,t){if(zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Iu(){return Iu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iu.apply(this,arguments)}var Oie=function(t){var n=t.value,r=t.formatter,a=oe(t.children)?n:t.children;return ce(r)?r(a):a},Aie=function(t,n){var r=an(n-t),a=Math.min(Math.abs(n-t),360);return r*a},Cie=function(t,n,r){var a=t.position,i=t.viewBox,l=t.offset,o=t.className,c=i,u=c.cx,f=c.cy,d=c.innerRadius,h=c.outerRadius,m=c.startAngle,j=c.endAngle,v=c.clockWise,p=(d+h)/2,y=Aie(m,j),g=y>=0?1:-1,b,x;a==="insideStart"?(b=m+g*l,x=v):a==="insideEnd"?(b=j-g*l,x=!v):a==="end"&&(b=j+g*l,x=v),x=y<=0?x:!x;var N=Ye(u,f,p,b),w=Ye(u,f,p,b+(x?1:-1)*359),O="M".concat(N.x,",").concat(N.y,`
    A`).concat(p,",").concat(p,",0,1,").concat(x?0:1,`,
    `).concat(w.x,",").concat(w.y),A=oe(t.id)?Di("recharts-radial-line-"):t.id;return T.createElement("text",Iu({},r,{dominantBaseline:"central",className:pe("recharts-radial-bar-label",o)}),T.createElement("defs",null,T.createElement("path",{id:A,d:O})),T.createElement("textPath",{xlinkHref:"#".concat(A)},n))},Eie=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,l=i.cx,o=i.cy,c=i.innerRadius,u=i.outerRadius,f=i.startAngle,d=i.endAngle,h=(f+d)/2;if(a==="outside"){var m=Ye(l,o,u+r,h),j=m.x,v=m.y;return{x:j,y:v,textAnchor:j>=l?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:l,y:o,textAnchor:"middle",verticalAnchor:"end"};var p=(c+u)/2,y=Ye(l,o,p,h),g=y.x,b=y.y;return{x:g,y:b,textAnchor:"middle",verticalAnchor:"middle"}},_ie=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,l=n,o=l.x,c=l.y,u=l.width,f=l.height,d=f>=0?1:-1,h=d*a,m=d>0?"end":"start",j=d>0?"start":"end",v=u>=0?1:-1,p=v*a,y=v>0?"end":"start",g=v>0?"start":"end";if(i==="top"){var b={x:o+u/2,y:c-d*a,textAnchor:"middle",verticalAnchor:m};return _t(_t({},b),r?{height:Math.max(c-r.y,0),width:u}:{})}if(i==="bottom"){var x={x:o+u/2,y:c+f+h,textAnchor:"middle",verticalAnchor:j};return _t(_t({},x),r?{height:Math.max(r.y+r.height-(c+f),0),width:u}:{})}if(i==="left"){var N={x:o-p,y:c+f/2,textAnchor:y,verticalAnchor:"middle"};return _t(_t({},N),r?{width:Math.max(N.x-r.x,0),height:f}:{})}if(i==="right"){var w={x:o+u+p,y:c+f/2,textAnchor:g,verticalAnchor:"middle"};return _t(_t({},w),r?{width:Math.max(r.x+r.width-w.x,0),height:f}:{})}var O=r?{width:u,height:f}:{};return i==="insideLeft"?_t({x:o+p,y:c+f/2,textAnchor:g,verticalAnchor:"middle"},O):i==="insideRight"?_t({x:o+u-p,y:c+f/2,textAnchor:y,verticalAnchor:"middle"},O):i==="insideTop"?_t({x:o+u/2,y:c+h,textAnchor:"middle",verticalAnchor:j},O):i==="insideBottom"?_t({x:o+u/2,y:c+f-h,textAnchor:"middle",verticalAnchor:m},O):i==="insideTopLeft"?_t({x:o+p,y:c+h,textAnchor:g,verticalAnchor:j},O):i==="insideTopRight"?_t({x:o+u-p,y:c+h,textAnchor:y,verticalAnchor:j},O):i==="insideBottomLeft"?_t({x:o+p,y:c+f-h,textAnchor:g,verticalAnchor:m},O):i==="insideBottomRight"?_t({x:o+u-p,y:c+f-h,textAnchor:y,verticalAnchor:m},O):Xo(i)&&(X(i.x)||rs(i.x))&&(X(i.y)||rs(i.y))?_t({x:o+sn(i.x,u),y:c+sn(i.y,f),textAnchor:"end",verticalAnchor:"end"},O):_t({x:o+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},O)},Tie=function(t){return"cx"in t&&X(t.cx)};function zt(e){var t=e.offset,n=t===void 0?5:t,r=bie(e,pie),a=_t({offset:n},r),i=a.viewBox,l=a.position,o=a.value,c=a.children,u=a.content,f=a.className,d=f===void 0?"":f,h=a.textBreakAll;if(!i||oe(o)&&oe(c)&&!S.isValidElement(u)&&!ce(u))return null;if(S.isValidElement(u))return S.cloneElement(u,a);var m;if(ce(u)){if(m=S.createElement(u,a),S.isValidElement(m))return m}else m=Oie(a);var j=Tie(i),v=ae(a,!0);if(j&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Cie(a,m,v);var p=j?Eie(a):_ie(a);return T.createElement(Ps,Iu({className:pe("recharts-label",d)},v,p,{breakAll:h}),m)}zt.displayName="Label";var QM=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,l=t.endAngle,o=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,m=t.top,j=t.left,v=t.width,p=t.height,y=t.clockWise,g=t.labelViewBox;if(g)return g;if(X(v)&&X(p)){if(X(d)&&X(h))return{x:d,y:h,width:v,height:p};if(X(m)&&X(j))return{x:m,y:j,width:v,height:p}}return X(d)&&X(h)?{x:d,y:h,width:0,height:0}:X(n)&&X(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:l||a||0,innerRadius:u||0,outerRadius:f||c||o||0,clockWise:y}:t.viewBox?t.viewBox:{}},kie=function(t,n){return t?t===!0?T.createElement(zt,{key:"label-implicit",viewBox:n}):kt(t)?T.createElement(zt,{key:"label-implicit",viewBox:n,value:t}):S.isValidElement(t)?t.type===zt?S.cloneElement(t,{key:"label-implicit",viewBox:n}):T.createElement(zt,{key:"label-implicit",content:t,viewBox:n}):ce(t)?T.createElement(zt,{key:"label-implicit",content:t,viewBox:n}):Xo(t)?T.createElement(zt,Iu({viewBox:n},t,{key:"label-implicit"})):null:null},Mie=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var a=t.children,i=QM(t),l=cn(a,zt).map(function(c,u){return S.cloneElement(c,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return l;var o=kie(t.label,n||i);return[o].concat(mie(l))};zt.parseViewBox=QM;zt.renderCallByParent=Mie;function Pie(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var $ie=Pie;const Rie=$e($ie);function Bu(e){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bu(e)}var Die=["valueAccessor"],Lie=["data","dataKey","clockWise","id","textBreakAll"];function zie(e){return qie(e)||Uie(e)||Bie(e)||Iie()}function Iie(){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 Bie(e,t){if(e){if(typeof e=="string")return Ix(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ix(e,t)}}function Uie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qie(e){if(Array.isArray(e))return Ix(e)}function Ix(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function up(){return up=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},up.apply(this,arguments)}function YN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function WN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YN(Object(n),!0).forEach(function(r){Hie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hie(e,t,n){return t=Fie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fie(e){var t=Gie(e,"string");return Bu(t)=="symbol"?t:t+""}function Gie(e,t){if(Bu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QN(e,t){if(e==null)return{};var n=Kie(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Vie=function(t){return Array.isArray(t.value)?Rie(t.value):t.value};function Or(e){var t=e.valueAccessor,n=t===void 0?Vie:t,r=QN(e,Die),a=r.data,i=r.dataKey,l=r.clockWise,o=r.id,c=r.textBreakAll,u=QN(r,Lie);return!a||!a.length?null:T.createElement(ge,{className:"recharts-label-list"},a.map(function(f,d){var h=oe(i)?n(f,d):et(f&&f.payload,i),m=oe(o)?{}:{id:"".concat(o,"-").concat(d)};return T.createElement(zt,up({},ae(f,!0),u,m,{parentViewBox:f.parentViewBox,value:h,textBreakAll:c,viewBox:zt.parseViewBox(oe(l)?f:WN(WN({},f),{},{clockWise:l})),key:"label-".concat(d),index:d}))}))}Or.displayName="LabelList";function Yie(e,t){return e?e===!0?T.createElement(Or,{key:"labelList-implicit",data:t}):T.isValidElement(e)||ce(e)?T.createElement(Or,{key:"labelList-implicit",data:t,content:e}):Xo(e)?T.createElement(Or,up({data:t},e,{key:"labelList-implicit"})):null:null}function Wie(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,a=cn(r,Or).map(function(l,o){return S.cloneElement(l,{data:t,key:"labelList-".concat(o)})});if(!n)return a;var i=Yie(e.label,t);return[i].concat(zie(a))}Or.renderCallByParent=Wie;function Uu(e){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(e)}function Bx(){return Bx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bx.apply(this,arguments)}function XN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ZN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XN(Object(n),!0).forEach(function(r){Qie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qie(e,t,n){return t=Xie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xie(e){var t=Zie(e,"string");return Uu(t)=="symbol"?t:t+""}function Zie(e,t){if(Uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Jie=function(t,n){var r=an(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},vd=function(t){var n=t.cx,r=t.cy,a=t.radius,i=t.angle,l=t.sign,o=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(o?1:-1)+a,d=Math.asin(c/f)/cp,h=u?i:i+l*d,m=Ye(n,r,f,h),j=Ye(n,r,a,h),v=u?i-l*d:i,p=Ye(n,r,f*Math.cos(d*cp),v);return{center:m,circleTangency:j,lineTangency:p,theta:d}},XM=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.startAngle,o=t.endAngle,c=Jie(l,o),u=l+c,f=Ye(n,r,i,l),d=Ye(n,r,i,u),h="M ".concat(f.x,",").concat(f.y,`
    A `).concat(i,",").concat(i,`,0,
    `).concat(+(Math.abs(c)>180),",").concat(+(l>u),`,
    `).concat(d.x,",").concat(d.y,`
  `);if(a>0){var m=Ye(n,r,a,l),j=Ye(n,r,a,u);h+="L ".concat(j.x,",").concat(j.y,`
            A `).concat(a,",").concat(a,`,0,
            `).concat(+(Math.abs(c)>180),",").concat(+(l<=u),`,
            `).concat(m.x,",").concat(m.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},ese=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,l=t.cornerRadius,o=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=an(f-u),h=vd({cx:n,cy:r,radius:i,angle:u,sign:d,cornerRadius:l,cornerIsExternal:c}),m=h.circleTangency,j=h.lineTangency,v=h.theta,p=vd({cx:n,cy:r,radius:i,angle:f,sign:-d,cornerRadius:l,cornerIsExternal:c}),y=p.circleTangency,g=p.lineTangency,b=p.theta,x=c?Math.abs(u-f):Math.abs(u-f)-v-b;if(x<0)return o?"M ".concat(j.x,",").concat(j.y,`
        a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
        a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
      `):XM({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:f});var N="M ".concat(j.x,",").concat(j.y,`
    A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,`
    A`).concat(i,",").concat(i,",0,").concat(+(x>180),",").concat(+(d<0),",").concat(y.x,",").concat(y.y,`
    A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(g.x,",").concat(g.y,`
  `);if(a>0){var w=vd({cx:n,cy:r,radius:a,angle:u,sign:d,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),O=w.circleTangency,A=w.lineTangency,E=w.theta,M=vd({cx:n,cy:r,radius:a,angle:f,sign:-d,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),$=M.circleTangency,k=M.lineTangency,I=M.theta,_=c?Math.abs(u-f):Math.abs(u-f)-E-I;if(_<0&&l===0)return"".concat(N,"L").concat(n,",").concat(r,"Z");N+="L".concat(k.x,",").concat(k.y,`
      A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat($.x,",").concat($.y,`
      A`).concat(a,",").concat(a,",0,").concat(+(_>180),",").concat(+(d>0),",").concat(O.x,",").concat(O.y,`
      A`).concat(l,",").concat(l,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,"Z")}else N+="L".concat(n,",").concat(r,"Z");return N},tse={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},ZM=function(t){var n=ZN(ZN({},tse),t),r=n.cx,a=n.cy,i=n.innerRadius,l=n.outerRadius,o=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,h=n.className;if(l<i||f===d)return null;var m=pe("recharts-sector",h),j=l-i,v=sn(o,j,0,!0),p;return v>0&&Math.abs(f-d)<360?p=ese({cx:r,cy:a,innerRadius:i,outerRadius:l,cornerRadius:Math.min(v,j/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):p=XM({cx:r,cy:a,innerRadius:i,outerRadius:l,startAngle:f,endAngle:d}),T.createElement("path",Bx({},ae(n,!0),{className:m,d:p,role:"img"}))};function qu(e){"@babel/helpers - typeof";return qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qu(e)}function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ux.apply(this,arguments)}function JN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function eO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JN(Object(n),!0).forEach(function(r){nse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nse(e,t,n){return t=rse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rse(e){var t=ase(e,"string");return qu(t)=="symbol"?t:t+""}function ase(e,t){if(qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tO={curveBasisClosed:nG,curveBasisOpen:rG,curveBasis:tG,curveBumpX:UF,curveBumpY:qF,curveLinearClosed:aG,curveLinear:Rm,curveMonotoneX:iG,curveMonotoneY:sG,curveNatural:lG,curveStep:oG,curveStepAfter:uG,curveStepBefore:cG},gd=function(t){return t.x===+t.x&&t.y===+t.y},Oc=function(t){return t.x},Ac=function(t){return t.y},ise=function(t,n){if(ce(t))return t;var r="curve".concat(Pm(t));return(r==="curveMonotone"||r==="curveBump")&&n?tO["".concat(r).concat(n==="vertical"?"Y":"X")]:tO[r]||Rm},sse=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,l=t.baseLine,o=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=ise(r,o),d=u?i.filter(function(v){return gd(v)}):i,h;if(Array.isArray(l)){var m=u?l.filter(function(v){return gd(v)}):l,j=d.map(function(v,p){return eO(eO({},v),{},{base:m[p]})});return o==="vertical"?h=od().y(Ac).x1(Oc).x0(function(v){return v.base.x}):h=od().x(Oc).y1(Ac).y0(function(v){return v.base.y}),h.defined(gd).curve(f),h(j)}return o==="vertical"&&X(l)?h=od().y(Ac).x1(Oc).x0(l):X(l)?h=od().x(Oc).y1(Ac).y0(l):h=Vk().x(Oc).y(Ac),h.defined(gd).curve(f),h(d)},Ni=function(t){var n=t.className,r=t.points,a=t.path,i=t.pathRef;if((!r||!r.length)&&!a)return null;var l=r&&r.length?sse(t):a;return S.createElement("path",Ux({},ae(t,!1),$h(t),{className:pe("recharts-curve",n),d:l,ref:i}))},JM={exports:{}},lse="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ose=lse,cse=ose;function eP(){}function tP(){}tP.resetWarningCache=eP;var use=function(){function e(r,a,i,l,o,c){if(c!==cse){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:tP,resetWarningCache:eP};return n.PropTypes=n,n};JM.exports=use();var fse=JM.exports;const Pe=$e(fse),{getOwnPropertyNames:dse,getOwnPropertySymbols:hse}=Object,{hasOwnProperty:pse}=Object.prototype;function Av(e,t){return function(r,a,i){return e(r,a,i)&&t(r,a,i)}}function xd(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);const{cache:i}=a,l=i.get(n),o=i.get(r);if(l&&o)return l===r&&o===n;i.set(n,r),i.set(r,n);const c=e(n,r,a);return i.delete(n),i.delete(r),c}}function mse(e){return e!=null?e[Symbol.toStringTag]:void 0}function nO(e){return dse(e).concat(hse(e))}const yse=Object.hasOwn||((e,t)=>pse.call(e,t));function Gs(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const vse="__v",gse="__o",xse="_owner",{getOwnPropertyDescriptor:rO,keys:aO}=Object;function bse(e,t){return e.byteLength===t.byteLength&&fp(new Uint8Array(e),new Uint8Array(t))}function jse(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Sse(e,t){return e.byteLength===t.byteLength&&fp(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function wse(e,t){return Gs(e.getTime(),t.getTime())}function Nse(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Ose(e,t){return e===t}function iO(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.entries();let l,o,c=0;for(;(l=i.next())&&!l.done;){const u=t.entries();let f=!1,d=0;for(;(o=u.next())&&!o.done;){if(a[d]){d++;continue}const h=l.value,m=o.value;if(n.equals(h[0],m[0],c,d,e,t,n)&&n.equals(h[1],m[1],h[0],m[0],e,t,n)){f=a[d]=!0;break}d++}if(!f)return!1;c++}return!0}const Ase=Gs;function Cse(e,t,n){const r=aO(e);let a=r.length;if(aO(t).length!==a)return!1;for(;a-- >0;)if(!nP(e,t,n,r[a]))return!1;return!0}function Cc(e,t,n){const r=nO(e);let a=r.length;if(nO(t).length!==a)return!1;let i,l,o;for(;a-- >0;)if(i=r[a],!nP(e,t,n,i)||(l=rO(e,i),o=rO(t,i),(l||o)&&(!l||!o||l.configurable!==o.configurable||l.enumerable!==o.enumerable||l.writable!==o.writable)))return!1;return!0}function Ese(e,t){return Gs(e.valueOf(),t.valueOf())}function _se(e,t){return e.source===t.source&&e.flags===t.flags}function sO(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const a=new Array(r),i=e.values();let l,o;for(;(l=i.next())&&!l.done;){const c=t.values();let u=!1,f=0;for(;(o=c.next())&&!o.done;){if(!a[f]&&n.equals(l.value,o.value,l.value,o.value,e,t,n)){u=a[f]=!0;break}f++}if(!u)return!1}return!0}function fp(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Tse(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function nP(e,t,n,r){return(r===xse||r===gse||r===vse)&&(e.$$typeof||t.$$typeof)?!0:yse(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const kse="[object ArrayBuffer]",Mse="[object Arguments]",Pse="[object Boolean]",$se="[object DataView]",Rse="[object Date]",Dse="[object Error]",Lse="[object Map]",zse="[object Number]",Ise="[object Object]",Bse="[object RegExp]",Use="[object Set]",qse="[object String]",Hse={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Fse="[object URL]",Gse=Object.prototype.toString;function Kse({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:l,areNumbersEqual:o,areObjectsEqual:c,arePrimitiveWrappersEqual:u,areRegExpsEqual:f,areSetsEqual:d,areTypedArraysEqual:h,areUrlsEqual:m,unknownTagComparators:j}){return function(p,y,g){if(p===y)return!0;if(p==null||y==null)return!1;const b=typeof p;if(b!==typeof y)return!1;if(b!=="object")return b==="number"?o(p,y,g):b==="function"?i(p,y,g):!1;const x=p.constructor;if(x!==y.constructor)return!1;if(x===Object)return c(p,y,g);if(Array.isArray(p))return t(p,y,g);if(x===Date)return r(p,y,g);if(x===RegExp)return f(p,y,g);if(x===Map)return l(p,y,g);if(x===Set)return d(p,y,g);const N=Gse.call(p);if(N===Rse)return r(p,y,g);if(N===Bse)return f(p,y,g);if(N===Lse)return l(p,y,g);if(N===Use)return d(p,y,g);if(N===Ise)return typeof p.then!="function"&&typeof y.then!="function"&&c(p,y,g);if(N===Fse)return m(p,y,g);if(N===Dse)return a(p,y,g);if(N===Mse)return c(p,y,g);if(Hse[N])return h(p,y,g);if(N===kse)return e(p,y,g);if(N===$se)return n(p,y,g);if(N===Pse||N===zse||N===qse)return u(p,y,g);if(j){let w=j[N];if(!w){const O=mse(p);O&&(w=j[O])}if(w)return w(p,y,g)}return!1}}function Vse({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:bse,areArraysEqual:n?Cc:jse,areDataViewsEqual:Sse,areDatesEqual:wse,areErrorsEqual:Nse,areFunctionsEqual:Ose,areMapsEqual:n?Av(iO,Cc):iO,areNumbersEqual:Ase,areObjectsEqual:n?Cc:Cse,arePrimitiveWrappersEqual:Ese,areRegExpsEqual:_se,areSetsEqual:n?Av(sO,Cc):sO,areTypedArraysEqual:n?Av(fp,Cc):fp,areUrlsEqual:Tse,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const a=xd(r.areArraysEqual),i=xd(r.areMapsEqual),l=xd(r.areObjectsEqual),o=xd(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:l,areSetsEqual:o})}return r}function Yse(e){return function(t,n,r,a,i,l,o){return e(t,n,o)}}function Wse({circular:e,comparator:t,createState:n,equals:r,strict:a}){if(n)return function(o,c){const{cache:u=e?new WeakMap:void 0,meta:f}=n();return t(o,c,{cache:u,equals:r,meta:f,strict:a})};if(e)return function(o,c){return t(o,c,{cache:new WeakMap,equals:r,meta:void 0,strict:a})};const i={cache:void 0,equals:r,meta:void 0,strict:a};return function(o,c){return t(o,c,i)}}const Qse=Ii();Ii({strict:!0});Ii({circular:!0});Ii({circular:!0,strict:!0});Ii({createInternalComparator:()=>Gs});Ii({strict:!0,createInternalComparator:()=>Gs});Ii({circular:!0,createInternalComparator:()=>Gs});Ii({circular:!0,createInternalComparator:()=>Gs,strict:!0});function Ii(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:a=!1}=e,i=Vse(e),l=Kse(i),o=n?n(l):Yse(l);return Wse({circular:t,comparator:l,createState:r,equals:o,strict:a})}function Xse(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function lO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):Xse(a)};requestAnimationFrame(r)}function qx(e){"@babel/helpers - typeof";return qx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qx(e)}function Zse(e){return nle(e)||tle(e)||ele(e)||Jse()}function Jse(){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 ele(e,t){if(e){if(typeof e=="string")return oO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oO(e,t)}}function oO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nle(e){if(Array.isArray(e))return e}function rle(){var e={},t=function(){return null},n=!1,r=function a(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var l=i,o=Zse(l),c=o[0],u=o.slice(1);if(typeof c=="number"){lO(a.bind(null,u),c);return}a(c),lO(a.bind(null,u));return}qx(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Hu(e){"@babel/helpers - typeof";return Hu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hu(e)}function cO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function uO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cO(Object(n),!0).forEach(function(r){rP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rP(e,t,n){return t=ale(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ale(e){var t=ile(e,"string");return Hu(t)==="symbol"?t:String(t)}function ile(e,t){if(Hu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sle=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(i){return a.includes(i)})})},lle=function(t){return t},ole=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Zc=function(t,n){return Object.keys(n).reduce(function(r,a){return uO(uO({},r),{},rP({},a,t(a,n[a])))},{})},fO=function(t,n,r){return t.map(function(a){return"".concat(ole(a)," ").concat(n,"ms ").concat(r)}).join(",")};function cle(e,t){return dle(e)||fle(e,t)||aP(e,t)||ule()}function ule(){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 fle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function dle(e){if(Array.isArray(e))return e}function hle(e){return yle(e)||mle(e)||aP(e)||ple()}function ple(){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 aP(e,t){if(e){if(typeof e=="string")return Hx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hx(e,t)}}function mle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yle(e){if(Array.isArray(e))return Hx(e)}function Hx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dp=1e-4,iP=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},sP=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},dO=function(t,n){return function(r){var a=iP(t,n);return sP(a,r)}},vle=function(t,n){return function(r){var a=iP(t,n),i=[].concat(hle(a.map(function(l,o){return l*o}).slice(1)),[0]);return sP(i,r)}},hO=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],i=n[1],l=n[2],o=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,l=1,o=1;break;case"ease":a=.25,i=.1,l=.25,o=1;break;case"ease-in":a=.42,i=0,l=1,o=1;break;case"ease-out":a=.42,i=0,l=.58,o=1;break;case"ease-in-out":a=0,i=0,l=.58,o=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(p){return parseFloat(p)}),f=cle(u,4);a=f[0],i=f[1],l=f[2],o=f[3]}}}var d=dO(a,l),h=dO(i,o),m=vle(a,l),j=function(y){return y>1?1:y<0?0:y},v=function(y){for(var g=y>1?1:y,b=g,x=0;x<8;++x){var N=d(b)-g,w=m(b);if(Math.abs(N-g)<dp||w<dp)return h(b);b=j(b-N/w)}return h(b)};return v.isStepper=!1,v},gle=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,l=t.dt,o=l===void 0?17:l,c=function(f,d,h){var m=-(f-d)*r,j=h*i,v=h+(m-j)*o/1e3,p=h*o/1e3+f;return Math.abs(p-d)<dp&&Math.abs(v)<dp?[d,0]:[p,v]};return c.isStepper=!0,c.dt=o,c},xle=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return hO(a);case"spring":return gle();default:if(a.split("(")[0]==="cubic-bezier")return hO(a)}return typeof a=="function"?a:null};function Fu(e){"@babel/helpers - typeof";return Fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fu(e)}function pO(e){return Sle(e)||jle(e)||lP(e)||ble()}function ble(){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 jle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sle(e){if(Array.isArray(e))return Gx(e)}function mO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mO(Object(n),!0).forEach(function(r){Fx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fx(e,t,n){return t=wle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wle(e){var t=Nle(e,"string");return Fu(t)==="symbol"?t:String(t)}function Nle(e,t){if(Fu(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fu(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ole(e,t){return Ele(e)||Cle(e,t)||lP(e,t)||Ale()}function Ale(){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 lP(e,t){if(e){if(typeof e=="string")return Gx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gx(e,t)}}function Gx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function Ele(e){if(Array.isArray(e))return e}var hp=function(t,n,r){return t+(n-t)*r},Kx=function(t){var n=t.from,r=t.to;return n!==r},_le=function e(t,n,r){var a=Zc(function(i,l){if(Kx(l)){var o=t(l.from,l.to,l.velocity),c=Ole(o,2),u=c[0],f=c[1];return qt(qt({},l),{},{from:u,velocity:f})}return l},n);return r<1?Zc(function(i,l){return Kx(l)?qt(qt({},l),{},{velocity:hp(l.velocity,a[i].velocity,r),from:hp(l.from,a[i].from,r)}):l},n):e(t,a,r-1)};const Tle=function(e,t,n,r,a){var i=sle(e,t),l=i.reduce(function(p,y){return qt(qt({},p),{},Fx({},y,[e[y],t[y]]))},{}),o=i.reduce(function(p,y){return qt(qt({},p),{},Fx({},y,{from:e[y],velocity:0,to:t[y]}))},{}),c=-1,u,f,d=function(){return null},h=function(){return Zc(function(y,g){return g.from},o)},m=function(){return!Object.values(o).filter(Kx).length},j=function(y){u||(u=y);var g=y-u,b=g/n.dt;o=_le(n,o,b),a(qt(qt(qt({},e),t),h())),u=y,m()||(c=requestAnimationFrame(d))},v=function(y){f||(f=y);var g=(y-f)/r,b=Zc(function(N,w){return hp.apply(void 0,pO(w).concat([n(g)]))},l);if(a(qt(qt(qt({},e),t),b)),g<1)c=requestAnimationFrame(d);else{var x=Zc(function(N,w){return hp.apply(void 0,pO(w).concat([n(1)]))},l);a(qt(qt(qt({},e),t),x))}};return d=n.isStepper?j:v,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};function vo(e){"@babel/helpers - typeof";return vo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vo(e)}var kle=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Mle(e,t){if(e==null)return{};var n=Ple(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ple(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Cv(e){return Lle(e)||Dle(e)||Rle(e)||$le()}function $le(){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 Rle(e,t){if(e){if(typeof e=="string")return Vx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vx(e,t)}}function Dle(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lle(e){if(Array.isArray(e))return Vx(e)}function Vx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yO(Object(n),!0).forEach(function(r){$c(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $c(e,t,n){return t=oP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ile(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oP(r.key),r)}}function Ble(e,t,n){return t&&Ile(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oP(e){var t=Ule(e,"string");return vo(t)==="symbol"?t:String(t)}function Ule(e,t){if(vo(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vo(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yx(e,t)}function Yx(e,t){return Yx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},Yx(e,t)}function Hle(e){var t=Fle();return function(){var r=pp(e),a;if(t){var i=pp(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return Wx(this,a)}}function Wx(e,t){if(t&&(vo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qx(e)}function Qx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fle(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function pp(e){return pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pp(e)}var cr=function(e){qle(n,e);var t=Hle(n);function n(r,a){var i;zle(this,n),i=t.call(this,r,a);var l=i.props,o=l.isActive,c=l.attributeName,u=l.from,f=l.to,d=l.steps,h=l.children,m=l.duration;if(i.handleStyleChange=i.handleStyleChange.bind(Qx(i)),i.changeStyle=i.changeStyle.bind(Qx(i)),!o||m<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:f}),Wx(i);if(d&&d.length)i.state={style:d[0].style};else if(u){if(typeof h=="function")return i.state={style:u},Wx(i);i.state={style:c?$c({},c,u):u}}else i.state={style:{}};return i}return Ble(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,l=a.canBegin;this.mounted=!0,!(!i||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,l=i.isActive,o=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,f=i.to,d=i.from,h=this.state.style;if(o){if(!l){var m={style:c?$c({},c,f):f};this.state&&h&&(c&&h[c]!==f||!c&&h!==f)&&this.setState(m);return}if(!(Qse(a.to,f)&&a.canBegin&&a.isActive)){var j=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=j||u?d:a.to;if(this.state&&h){var p={style:c?$c({},c,v):v};(c&&h[c]!==v||!c&&h!==v)&&this.setState(p)}this.runAnimation(mr(mr({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,l=a.from,o=a.to,c=a.duration,u=a.easing,f=a.begin,d=a.onAnimationEnd,h=a.onAnimationStart,m=Tle(l,o,xle(u),c,this.changeStyle),j=function(){i.stopJSAnimation=m()};this.manager.start([h,f,j,c,d])}},{key:"runStepAnimation",value:function(a){var i=this,l=a.steps,o=a.begin,c=a.onAnimationStart,u=l[0],f=u.style,d=u.duration,h=d===void 0?0:d,m=function(v,p,y){if(y===0)return v;var g=p.duration,b=p.easing,x=b===void 0?"ease":b,N=p.style,w=p.properties,O=p.onAnimationEnd,A=y>0?l[y-1]:p,E=w||Object.keys(N);if(typeof x=="function"||x==="spring")return[].concat(Cv(v),[i.runJSAnimation.bind(i,{from:A.style,to:N,duration:g,easing:x}),g]);var M=fO(E,g,x),$=mr(mr(mr({},A.style),N),{},{transition:M});return[].concat(Cv(v),[$,g,O]).filter(lle)};return this.manager.start([c].concat(Cv(l.reduce(m,[f,Math.max(h,o)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=rle());var i=a.begin,l=a.duration,o=a.attributeName,c=a.to,u=a.easing,f=a.onAnimationStart,d=a.onAnimationEnd,h=a.steps,m=a.children,j=this.manager;if(this.unSubscribe=j.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var v=o?$c({},o,c):c,p=fO(Object.keys(v),l,u);j.start([f,i,mr(mr({},v),{},{transition:p}),l,d])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var l=a.duration;a.attributeName,a.easing;var o=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=Mle(a,kle),u=S.Children.count(i),f=this.state.style;if(typeof i=="function")return i(f);if(!o||u===0||l<=0)return i;var d=function(m){var j=m.props,v=j.style,p=v===void 0?{}:v,y=j.className,g=S.cloneElement(m,mr(mr({},c),{},{style:mr(mr({},p),f),className:y}));return g};return u===1?d(S.Children.only(i)):T.createElement("div",null,S.Children.map(i,function(h){return d(h)}))}}]),n}(S.PureComponent);cr.displayName="Animate";cr.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};cr.propTypes={from:Pe.oneOfType([Pe.object,Pe.string]),to:Pe.oneOfType([Pe.object,Pe.string]),attributeName:Pe.string,duration:Pe.number,begin:Pe.number,easing:Pe.oneOfType([Pe.string,Pe.func]),steps:Pe.arrayOf(Pe.shape({duration:Pe.number.isRequired,style:Pe.object.isRequired,easing:Pe.oneOfType([Pe.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Pe.func]),properties:Pe.arrayOf("string"),onAnimationEnd:Pe.func})),children:Pe.oneOfType([Pe.node,Pe.func]),isActive:Pe.bool,canBegin:Pe.bool,onAnimationEnd:Pe.func,shouldReAnimate:Pe.bool,onAnimationStart:Pe.func,onAnimationReStart:Pe.func};function Gu(e){"@babel/helpers - typeof";return Gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gu(e)}function mp(){return mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mp.apply(this,arguments)}function Gle(e,t){return Wle(e)||Yle(e,t)||Vle(e,t)||Kle()}function Kle(){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 Vle(e,t){if(e){if(typeof e=="string")return vO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vO(e,t)}}function vO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yle(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function Wle(e){if(Array.isArray(e))return e}function gO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gO(Object(n),!0).forEach(function(r){Qle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qle(e,t,n){return t=Xle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xle(e){var t=Zle(e,"string");return Gu(t)=="symbol"?t:t+""}function Zle(e,t){if(Gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var bO=function(t,n,r,a,i){var l=Math.min(Math.abs(r)/2,Math.abs(a)/2),o=a>=0?1:-1,c=r>=0?1:-1,u=a>=0&&r>=0||a<0&&r<0?1:0,f;if(l>0&&i instanceof Array){for(var d=[0,0,0,0],h=0,m=4;h<m;h++)d[h]=i[h]>l?l:i[h];f="M".concat(t,",").concat(n+o*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(n)),f+="L ".concat(t+r-c*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
        `).concat(t+r,",").concat(n+o*d[1])),f+="L ".concat(t+r,",").concat(n+a-o*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
        `).concat(t+r-c*d[2],",").concat(n+a)),f+="L ".concat(t+c*d[3],",").concat(n+a),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
        `).concat(t,",").concat(n+a-o*d[3])),f+="Z"}else if(l>0&&i===+i&&i>0){var j=Math.min(l,i);f="M ".concat(t,",").concat(n+o*j,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+c*j,",").concat(n,`
            L `).concat(t+r-c*j,",").concat(n,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+r,",").concat(n+o*j,`
            L `).concat(t+r,",").concat(n+a-o*j,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t+r-c*j,",").concat(n+a,`
            L `).concat(t+c*j,",").concat(n+a,`
            A `).concat(j,",").concat(j,",0,0,").concat(u,",").concat(t,",").concat(n+a-o*j," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return f},Jle=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,l=n.y,o=n.width,c=n.height;if(Math.abs(o)>0&&Math.abs(c)>0){var u=Math.min(i,i+o),f=Math.max(i,i+o),d=Math.min(l,l+c),h=Math.max(l,l+c);return r>=u&&r<=f&&a>=d&&a<=h}return!1},eoe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},X1=function(t){var n=xO(xO({},eoe),t),r=S.useRef(),a=S.useState(-1),i=Gle(a,2),l=i[0],o=i[1];S.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var x=r.current.getTotalLength();x&&o(x)}catch{}},[]);var c=n.x,u=n.y,f=n.width,d=n.height,h=n.radius,m=n.className,j=n.animationEasing,v=n.animationDuration,p=n.animationBegin,y=n.isAnimationActive,g=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var b=pe("recharts-rectangle",m);return g?T.createElement(cr,{canBegin:l>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:v,animationEasing:j,isActive:g},function(x){var N=x.width,w=x.height,O=x.x,A=x.y;return T.createElement(cr,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,isActive:y,easing:j},T.createElement("path",mp({},ae(n,!0),{className:b,d:bO(O,A,N,w,h),ref:r})))}):T.createElement("path",mp({},ae(n,!0),{className:b,d:bO(c,u,f,d,h)}))},toe=["points","className","baseLinePoints","connectNulls"];function jl(){return jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jl.apply(this,arguments)}function noe(e,t){if(e==null)return{};var n=roe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function roe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jO(e){return loe(e)||soe(e)||ioe(e)||aoe()}function aoe(){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 ioe(e,t){if(e){if(typeof e=="string")return Xx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xx(e,t)}}function soe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function loe(e){if(Array.isArray(e))return Xx(e)}function Xx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var SO=function(t){return t&&t.x===+t.x&&t.y===+t.y},ooe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){SO(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),SO(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Jc=function(t,n){var r=ooe(t);n&&(r=[r.reduce(function(i,l){return[].concat(jO(i),jO(l))},[])]);var a=r.map(function(i){return i.reduce(function(l,o,c){return"".concat(l).concat(c===0?"M":"L").concat(o.x,",").concat(o.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},coe=function(t,n,r){var a=Jc(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(Jc(n.reverse(),r).slice(1))},uoe=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,i=t.connectNulls,l=noe(t,toe);if(!n||!n.length)return null;var o=pe("recharts-polygon",r);if(a&&a.length){var c=l.stroke&&l.stroke!=="none",u=coe(n,a,i);return T.createElement("g",{className:o},T.createElement("path",jl({},ae(l,!0),{fill:u.slice(-1)==="Z"?l.fill:"none",stroke:"none",d:u})),c?T.createElement("path",jl({},ae(l,!0),{fill:"none",d:Jc(n,i)})):null,c?T.createElement("path",jl({},ae(l,!0),{fill:"none",d:Jc(a,i)})):null)}var f=Jc(n,i);return T.createElement("path",jl({},ae(l,!0),{fill:f.slice(-1)==="Z"?l.fill:"none",className:o,d:f}))};function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zx.apply(this,arguments)}var Lf=function(t){var n=t.cx,r=t.cy,a=t.r,i=t.className,l=pe("recharts-dot",i);return n===+n&&r===+r&&a===+a?S.createElement("circle",Zx({},ae(t,!1),$h(t),{className:l,cx:n,cy:r,r:a})):null};function Ku(e){"@babel/helpers - typeof";return Ku=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ku(e)}var foe=["x","y","top","left","width","height","className"];function Jx(){return Jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jx.apply(this,arguments)}function wO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function doe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wO(Object(n),!0).forEach(function(r){hoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hoe(e,t,n){return t=poe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function poe(e){var t=moe(e,"string");return Ku(t)=="symbol"?t:t+""}function moe(e,t){if(Ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yoe(e,t){if(e==null)return{};var n=voe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function voe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var goe=function(t,n,r,a,i,l){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(l,",").concat(n,"h").concat(r)},xoe=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,l=t.top,o=l===void 0?0:l,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,h=t.height,m=h===void 0?0:h,j=t.className,v=yoe(t,foe),p=doe({x:r,y:i,top:o,left:u,width:d,height:m},v);return!X(r)||!X(i)||!X(d)||!X(m)||!X(o)||!X(u)?null:T.createElement("path",Jx({},ae(p,!0),{className:pe("recharts-cross",j),d:goe(r,i,d,m,o,u)}))},boe=Vm,joe=bM,Soe=ea;function woe(e,t){return e&&e.length?boe(e,Soe(t),joe):void 0}var Noe=woe;const Ooe=$e(Noe);var Aoe=Vm,Coe=ea,Eoe=jM;function _oe(e,t){return e&&e.length?Aoe(e,Coe(t),Eoe):void 0}var Toe=_oe;const koe=$e(Toe);var Moe=["cx","cy","angle","ticks","axisLine"],Poe=["ticks","tick","angle","tickFormatter","stroke"];function go(e){"@babel/helpers - typeof";return go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},go(e)}function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eu.apply(this,arguments)}function NO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ki(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NO(Object(n),!0).forEach(function(r){Xm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OO(e,t){if(e==null)return{};var n=$oe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $oe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Roe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,uP(r.key),r)}}function Doe(e,t,n){return t&&AO(e.prototype,t),n&&AO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Loe(e,t,n){return t=yp(t),zoe(e,cP()?Reflect.construct(t,n||[],yp(e).constructor):t.apply(e,n))}function zoe(e,t){if(t&&(go(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ioe(e)}function Ioe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cP=function(){return!!e})()}function yp(e){return yp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yp(e)}function Boe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&e0(e,t)}function e0(e,t){return e0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},e0(e,t)}function Xm(e,t,n){return t=uP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uP(e){var t=Uoe(e,"string");return go(t)=="symbol"?t:t+""}function Uoe(e,t){if(go(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(go(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zm=function(e){function t(){return Roe(this,t),Loe(this,t,arguments)}return Boe(t,e),Doe(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,i=this.props,l=i.angle,o=i.cx,c=i.cy;return Ye(o,c,a,l)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,a;switch(r){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.angle,o=r.ticks,c=Ooe(o,function(f){return f.coordinate||0}),u=koe(o,function(f){return f.coordinate||0});return{cx:a,cy:i,startAngle:l,endAngle:l,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.angle,o=r.ticks,c=r.axisLine,u=OO(r,Moe),f=o.reduce(function(j,v){return[Math.min(j[0],v.coordinate),Math.max(j[1],v.coordinate)]},[1/0,-1/0]),d=Ye(a,i,f[0],l),h=Ye(a,i,f[1],l),m=Ki(Ki(Ki({},ae(u,!1)),{},{fill:"none"},ae(c,!1)),{},{x1:d.x,y1:d.y,x2:h.x,y2:h.y});return T.createElement("line",eu({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,l=a.tick,o=a.angle,c=a.tickFormatter,u=a.stroke,f=OO(a,Poe),d=this.getTickTextAnchor(),h=ae(f,!1),m=ae(l,!1),j=i.map(function(v,p){var y=r.getTickValueCoord(v),g=Ki(Ki(Ki(Ki({textAnchor:d,transform:"rotate(".concat(90-o,", ").concat(y.x,", ").concat(y.y,")")},h),{},{stroke:"none",fill:u},m),{},{index:p},y),{},{payload:v});return T.createElement(ge,eu({className:pe("recharts-polar-radius-axis-tick",WM(l)),key:"tick-".concat(v.coordinate)},Ti(r.props,v,p)),t.renderTickItem(l,g,c?c(v.value,p):v.value))});return T.createElement(ge,{className:"recharts-polar-radius-axis-ticks"},j)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.axisLine,l=r.tick;return!a||!a.length?null:T.createElement(ge,{className:pe("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),l&&this.renderTicks(),zt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,i){var l;return T.isValidElement(r)?l=T.cloneElement(r,a):ce(r)?l=r(a):l=T.createElement(Ps,eu({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),l}}])}(S.PureComponent);Xm(Zm,"displayName","PolarRadiusAxis");Xm(Zm,"axisType","radiusAxis");Xm(Zm,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function xo(e){"@babel/helpers - typeof";return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(e)}function ts(){return ts=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ts.apply(this,arguments)}function CO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Vi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CO(Object(n),!0).forEach(function(r){Jm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dP(r.key),r)}}function Hoe(e,t,n){return t&&EO(e.prototype,t),n&&EO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Foe(e,t,n){return t=vp(t),Goe(e,fP()?Reflect.construct(t,n||[],vp(e).constructor):t.apply(e,n))}function Goe(e,t){if(t&&(xo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Koe(e)}function Koe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fP=function(){return!!e})()}function vp(e){return vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vp(e)}function Voe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&t0(e,t)}function t0(e,t){return t0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},t0(e,t)}function Jm(e,t,n){return t=dP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dP(e){var t=Yoe(e,"string");return xo(t)=="symbol"?t:t+""}function Yoe(e,t){if(xo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Woe=Math.PI/180,_O=1e-5,ey=function(e){function t(){return qoe(this,t),Foe(this,t,arguments)}return Voe(t,e),Hoe(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.cx,l=a.cy,o=a.radius,c=a.orientation,u=a.tickSize,f=u||8,d=Ye(i,l,o,r.coordinate),h=Ye(i,l,o+(c==="inner"?-1:1)*f,r.coordinate);return{x1:d.x,y1:d.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(r){var a=this.props.orientation,i=Math.cos(-r.coordinate*Woe),l;return i>_O?l=a==="outer"?"start":"end":i<-_O?l=a==="outer"?"end":"start":l="middle",l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,l=r.radius,o=r.axisLine,c=r.axisLineType,u=Vi(Vi({},ae(this.props,!1)),{},{fill:"none"},ae(o,!1));if(c==="circle")return T.createElement(Lf,ts({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:l}));var f=this.props.ticks,d=f.map(function(h){return Ye(a,i,l,h.coordinate)});return T.createElement(uoe,ts({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,l=a.tick,o=a.tickLine,c=a.tickFormatter,u=a.stroke,f=ae(this.props,!1),d=ae(l,!1),h=Vi(Vi({},f),{},{fill:"none"},ae(o,!1)),m=i.map(function(j,v){var p=r.getTickLineCoord(j),y=r.getTickTextAnchor(j),g=Vi(Vi(Vi({textAnchor:y},f),{},{stroke:"none",fill:u},d),{},{index:v,payload:j,x:p.x2,y:p.y2});return T.createElement(ge,ts({className:pe("recharts-polar-angle-axis-tick",WM(l)),key:"tick-".concat(j.coordinate)},Ti(r.props,j,v)),o&&T.createElement("line",ts({className:"recharts-polar-angle-axis-tick-line"},h,p)),l&&t.renderTickItem(l,g,c?c(j.value,v):j.value))});return T.createElement(ge,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.radius,l=r.axisLine;return i<=0||!a||!a.length?null:T.createElement(ge,{className:pe("recharts-polar-angle-axis",this.props.className)},l&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,i){var l;return T.isValidElement(r)?l=T.cloneElement(r,a):ce(r)?l=r(a):l=T.createElement(Ps,ts({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),l}}])}(S.PureComponent);Jm(ey,"displayName","PolarAngleAxis");Jm(ey,"axisType","angleAxis");Jm(ey,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Qoe=v3,Xoe=Qoe(Object.getPrototypeOf,Object),Zoe=Xoe,Joe=Ra,ece=Zoe,tce=Da,nce="[object Object]",rce=Function.prototype,ace=Object.prototype,hP=rce.toString,ice=ace.hasOwnProperty,sce=hP.call(Object);function lce(e){if(!tce(e)||Joe(e)!=nce)return!1;var t=ece(e);if(t===null)return!0;var n=ice.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&hP.call(n)==sce}var oce=lce;const cce=$e(oce);var uce=Ra,fce=Da,dce="[object Boolean]";function hce(e){return e===!0||e===!1||fce(e)&&uce(e)==dce}var pce=hce;const mce=$e(pce);function Vu(e){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(e)}function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gp.apply(this,arguments)}function yce(e,t){return bce(e)||xce(e,t)||gce(e,t)||vce()}function vce(){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 gce(e,t){if(e){if(typeof e=="string")return TO(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TO(e,t)}}function TO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xce(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function bce(e){if(Array.isArray(e))return e}function kO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function MO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kO(Object(n),!0).forEach(function(r){jce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jce(e,t,n){return t=Sce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sce(e){var t=wce(e,"string");return Vu(t)=="symbol"?t:t+""}function wce(e,t){if(Vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var PO=function(t,n,r,a,i){var l=r-a,o;return o="M ".concat(t,",").concat(n),o+="L ".concat(t+r,",").concat(n),o+="L ".concat(t+r-l/2,",").concat(n+i),o+="L ".concat(t+r-l/2-a,",").concat(n+i),o+="L ".concat(t,",").concat(n," Z"),o},Nce={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Oce=function(t){var n=MO(MO({},Nce),t),r=S.useRef(),a=S.useState(-1),i=yce(a,2),l=i[0],o=i[1];S.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var b=r.current.getTotalLength();b&&o(b)}catch{}},[]);var c=n.x,u=n.y,f=n.upperWidth,d=n.lowerWidth,h=n.height,m=n.className,j=n.animationEasing,v=n.animationDuration,p=n.animationBegin,y=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var g=pe("recharts-trapezoid",m);return y?T.createElement(cr,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:c,y:u},duration:v,animationEasing:j,isActive:y},function(b){var x=b.upperWidth,N=b.lowerWidth,w=b.height,O=b.x,A=b.y;return T.createElement(cr,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:p,duration:v,easing:j},T.createElement("path",gp({},ae(n,!0),{className:g,d:PO(O,A,x,N,w),ref:r})))}):T.createElement("g",null,T.createElement("path",gp({},ae(n,!0),{className:g,d:PO(c,u,f,d,h)})))},Ace=["option","shapeType","propTransformer","activeClassName","isActive"];function Yu(e){"@babel/helpers - typeof";return Yu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yu(e)}function Cce(e,t){if(e==null)return{};var n=Ece(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ece(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$O(Object(n),!0).forEach(function(r){_ce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$O(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ce(e,t,n){return t=Tce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tce(e){var t=kce(e,"string");return Yu(t)=="symbol"?t:t+""}function kce(e,t){if(Yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mce(e,t){return xp(xp({},t),e)}function Pce(e,t){return e==="symbols"}function RO(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return T.createElement(X1,n);case"trapezoid":return T.createElement(Oce,n);case"sector":return T.createElement(ZM,n);case"symbols":if(Pce(t))return T.createElement(Lm,n);break;default:return null}}function $ce(e){return S.isValidElement(e)?e.props:e}function bp(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?Mce:r,i=e.activeClassName,l=i===void 0?"recharts-active-shape":i,o=e.isActive,c=Cce(e,Ace),u;if(S.isValidElement(t))u=S.cloneElement(t,xp(xp({},c),$ce(t)));else if(ce(t))u=t(c);else if(cce(t)&&!mce(t)){var f=a(t,c);u=T.createElement(RO,{shapeType:n,elementProps:f})}else{var d=c;u=T.createElement(RO,{shapeType:n,elementProps:d})}return o?T.createElement(ge,{className:l},u):u}function ty(e,t){return t!=null&&"trapezoids"in e.props}function ny(e,t){return t!=null&&"sectors"in e.props}function Wu(e,t){return t!=null&&"points"in e.props}function Rce(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&i}function Dce(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Lce(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function zce(e,t){var n;return ty(e,t)?n=Rce:ny(e,t)?n=Dce:Wu(e,t)&&(n=Lce),n}function Ice(e,t){var n;return ty(e,t)?n="trapezoids":ny(e,t)?n="sectors":Wu(e,t)&&(n="points"),n}function Bce(e,t){if(ty(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(ny(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Wu(e,t)?t.payload:{}}function Uce(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=Ice(n,t),i=Bce(n,t),l=r.filter(function(c,u){var f=ki(i,c),d=n.props[a].filter(function(j){var v=zce(n,t);return v(j,t)}),h=n.props[a].indexOf(d[d.length-1]),m=u===h;return f&&m}),o=r.indexOf(l[l.length-1]);return o}var Qd;function bo(e){"@babel/helpers - typeof";return bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bo(e)}function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sl.apply(this,arguments)}function DO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DO(Object(n),!0).forEach(function(r){er(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mP(r.key),r)}}function Hce(e,t,n){return t&&LO(e.prototype,t),n&&LO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fce(e,t,n){return t=jp(t),Gce(e,pP()?Reflect.construct(t,n||[],jp(e).constructor):t.apply(e,n))}function Gce(e,t){if(t&&(bo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kce(e)}function Kce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pP=function(){return!!e})()}function jp(e){return jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jp(e)}function Vce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&n0(e,t)}function n0(e,t){return n0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},n0(e,t)}function er(e,t,n){return t=mP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mP(e){var t=Yce(e,"string");return bo(t)=="symbol"?t:t+""}function Yce(e,t){if(bo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ia=function(e){function t(n){var r;return qce(this,t),r=Fce(this,t,[n]),er(r,"pieRef",null),er(r,"sectorRefs",[]),er(r,"id",Di("recharts-pie-")),er(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ce(a)&&a()}),er(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ce(a)&&a()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return Vce(t,e),Hce(t,[{key:"isActiveIndex",value:function(r){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(r)!==-1:r===a}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.label,o=i.labelLine,c=i.dataKey,u=i.valueKey,f=ae(this.props,!1),d=ae(l,!1),h=ae(o,!1),m=l&&l.offsetRadius||20,j=r.map(function(v,p){var y=(v.startAngle+v.endAngle)/2,g=Ye(v.cx,v.cy,v.outerRadius+m,y),b=Ge(Ge(Ge(Ge({},f),v),{},{stroke:"none"},d),{},{index:p,textAnchor:t.getTextAnchor(g.x,v.cx)},g),x=Ge(Ge(Ge(Ge({},f),v),{},{fill:"none",stroke:v.fill},h),{},{index:p,points:[Ye(v.cx,v.cy,v.outerRadius,y),g]}),N=c;return oe(c)&&oe(u)?N="value":oe(c)&&(N=u),T.createElement(ge,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(p)},o&&t.renderLabelLineItem(o,x,"line"),t.renderLabelItem(l,b,et(v,N)))});return T.createElement(ge,{className:"recharts-pie-labels"},j)}},{key:"renderSectorsStatically",value:function(r){var a=this,i=this.props,l=i.activeShape,o=i.blendStroke,c=i.inactiveShape;return r.map(function(u,f){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var d=a.isActiveIndex(f),h=c&&a.hasActiveIndex()?c:null,m=d?l:h,j=Ge(Ge({},u),{},{stroke:o?u.fill:u.stroke,tabIndex:-1});return T.createElement(ge,Sl({ref:function(p){p&&!a.sectorRefs.includes(p)&&a.sectorRefs.push(p)},tabIndex:-1,className:"recharts-pie-sector"},Ti(a.props,u,f),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(f)}),T.createElement(bp,Sl({option:m,isActive:d,shapeType:"sector"},j)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,i=a.sectors,l=a.isAnimationActive,o=a.animationBegin,c=a.animationDuration,u=a.animationEasing,f=a.animationId,d=this.state,h=d.prevSectors,m=d.prevIsAnimationActive;return T.createElement(cr,{begin:o,duration:c,isActive:l,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(j){var v=j.t,p=[],y=i&&i[0],g=y.startAngle;return i.forEach(function(b,x){var N=h&&h[x],w=x>0?Rn(b,"paddingAngle",0):0;if(N){var O=st(N.endAngle-N.startAngle,b.endAngle-b.startAngle),A=Ge(Ge({},b),{},{startAngle:g+w,endAngle:g+O(v)+w});p.push(A),g=A.endAngle}else{var E=b.endAngle,M=b.startAngle,$=st(0,E-M),k=$(v),I=Ge(Ge({},b),{},{startAngle:g+w,endAngle:g+k+w});p.push(I),g=I.endAngle}}),T.createElement(ge,null,r.renderSectorsStatically(p))})}},{key:"attachKeyboardHandlers",value:function(r){var a=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var l=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"ArrowRight":{var o=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[o].focus(),a.setState({sectorToFocus:o});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,a=r.sectors,i=r.isAnimationActive,l=this.state.prevSectors;return i&&a&&a.length&&(!l||!ki(l,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,a=this.props,i=a.hide,l=a.sectors,o=a.className,c=a.label,u=a.cx,f=a.cy,d=a.innerRadius,h=a.outerRadius,m=a.isAnimationActive,j=this.state.isAnimationFinished;if(i||!l||!l.length||!X(u)||!X(f)||!X(d)||!X(h))return null;var v=pe("recharts-pie",o);return T.createElement(ge,{tabIndex:this.props.rootTabIndex,className:v,ref:function(y){r.pieRef=y}},this.renderSectors(),c&&this.renderLabels(l),zt.renderCallByParent(this.props,null,!1),(!m||j)&&Or.renderCallByParent(this.props,l,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return a.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:r.sectors!==a.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,a){return r>a?"start":r<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,a,i){if(T.isValidElement(r))return T.cloneElement(r,a);if(ce(r))return r(a);var l=pe("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return T.createElement(Ni,Sl({},a,{key:i,type:"linear",className:l}))}},{key:"renderLabelItem",value:function(r,a,i){if(T.isValidElement(r))return T.cloneElement(r,a);var l=i;if(ce(r)&&(l=r(a),T.isValidElement(l)))return l;var o=pe("recharts-pie-label-text",typeof r!="boolean"&&!ce(r)?r.className:"");return T.createElement(Ps,Sl({},a,{alignmentBaseline:"middle",className:o}),l)}}])}(S.PureComponent);Qd=Ia;er(Ia,"displayName","Pie");er(Ia,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!La.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});er(Ia,"parseDeltaAngle",function(e,t){var n=an(t-e),r=Math.min(Math.abs(t-e),360);return n*r});er(Ia,"getRealPieData",function(e){var t=e.data,n=e.children,r=ae(e,!1),a=cn(n,Mf);return t&&t.length?t.map(function(i,l){return Ge(Ge(Ge({payload:i},r),i),a&&a[l]&&a[l].props)}):a&&a.length?a.map(function(i){return Ge(Ge({},r),i.props)}):[]});er(Ia,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,l=YM(a,i),o=r+sn(e.cx,a,a/2),c=n+sn(e.cy,i,i/2),u=sn(e.innerRadius,l,0),f=sn(e.outerRadius,l,l*.8),d=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:o,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}});er(Ia,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Ge(Ge({},t.type.defaultProps),t.props):t.props,a=Qd.getRealPieData(r);if(!a||!a.length)return null;var i=r.cornerRadius,l=r.startAngle,o=r.endAngle,c=r.paddingAngle,u=r.dataKey,f=r.nameKey,d=r.valueKey,h=r.tooltipType,m=Math.abs(r.minAngle),j=Qd.parseCoordinateOfPie(r,n),v=Qd.parseDeltaAngle(l,o),p=Math.abs(v),y=u;oe(u)&&oe(d)?(Nr(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),y="value"):oe(u)&&(Nr(!1,`Use "dataKey" to specify the value of pie,
      the props "valueKey" will be deprecated in 1.1.0`),y=d);var g=a.filter(function(A){return et(A,y,0)!==0}).length,b=(p>=360?g:g-1)*c,x=p-g*m-b,N=a.reduce(function(A,E){var M=et(E,y,0);return A+(X(M)?M:0)},0),w;if(N>0){var O;w=a.map(function(A,E){var M=et(A,y,0),$=et(A,f,E),k=(X(M)?M:0)/N,I;E?I=O.endAngle+an(v)*c*(M!==0?1:0):I=l;var _=I+an(v)*((M!==0?m:0)+k*x),C=(I+_)/2,P=(j.innerRadius+j.outerRadius)/2,z=[{name:$,value:M,payload:A,dataKey:y,type:h}],B=Ye(j.cx,j.cy,P,C);return O=Ge(Ge(Ge({percent:k,cornerRadius:i,name:$,tooltipPayload:z,midAngle:C,middleRadius:P,tooltipPosition:B},A),j),{},{value:et(A,y),startAngle:I,endAngle:_,payload:A,paddingAngle:an(v)*c}),O})}return Ge(Ge({},j),{},{sectors:w,data:a})});var Wce=Math.ceil,Qce=Math.max;function Xce(e,t,n,r){for(var a=-1,i=Qce(Wce((t-e)/(n||1)),0),l=Array(i);i--;)l[r?i:++a]=e,e+=n;return l}var Zce=Xce,Jce=D3,zO=1/0,eue=17976931348623157e292;function tue(e){if(!e)return e===0?e:0;if(e=Jce(e),e===zO||e===-zO){var t=e<0?-1:1;return t*eue}return e===e?e:0}var yP=tue,nue=Zce,rue=Bm,Ev=yP;function aue(e){return function(t,n,r){return r&&typeof r!="number"&&rue(t,n,r)&&(n=r=void 0),t=Ev(t),n===void 0?(n=t,t=0):n=Ev(n),r=r===void 0?t<n?1:-1:Ev(r),nue(t,n,r,e)}}var iue=aue,sue=iue,lue=sue(),oue=lue;const Sp=$e(oue);function Qu(e){"@babel/helpers - typeof";return Qu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(e)}function IO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function BO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IO(Object(n),!0).forEach(function(r){vP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vP(e,t,n){return t=cue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cue(e){var t=uue(e,"string");return Qu(t)=="symbol"?t:t+""}function uue(e,t){if(Qu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fue=["Webkit","Moz","O","ms"],due=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=fue.reduce(function(i,l){return BO(BO({},i),{},vP({},l+r,n))},{});return a[t]=n,a};function jo(e){"@babel/helpers - typeof";return jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jo(e)}function wp(){return wp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wp.apply(this,arguments)}function UO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _v(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UO(Object(n),!0).forEach(function(r){wn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xP(r.key),r)}}function pue(e,t,n){return t&&qO(e.prototype,t),n&&qO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mue(e,t,n){return t=Np(t),yue(e,gP()?Reflect.construct(t,n||[],Np(e).constructor):t.apply(e,n))}function yue(e,t){if(t&&(jo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vue(e)}function vue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gP=function(){return!!e})()}function Np(e){return Np=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Np(e)}function gue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r0(e,t)}function r0(e,t){return r0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},r0(e,t)}function wn(e,t,n){return t=xP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xP(e){var t=xue(e,"string");return jo(t)=="symbol"?t:t+""}function xue(e,t){if(jo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bue=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,i=t.x,l=t.width,o=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Qc().domain(Sp(0,c)).range([i,i+l-o]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(a),scale:u,scaleValues:f}},HO=function(t){return t.changedTouches&&!!t.changedTouches.length},So=function(e){function t(n){var r;return hue(this,t),r=mue(this,t,[n]),wn(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),wn(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),wn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,l=a.onDragEnd,o=a.startIndex;l==null||l({endIndex:i,startIndex:o})}),r.detachDragEndListener()}),wn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),wn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),wn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),wn(r,"handleSlideDragStart",function(a){var i=HO(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return gue(t,e),pue(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,i=r.endX,l=this.state.scaleValues,o=this.props,c=o.gap,u=o.data,f=u.length-1,d=Math.min(a,i),h=Math.max(a,i),m=t.getIndexInRange(l,d),j=t.getIndexInRange(l,h);return{startIndex:m-m%c,endIndex:j===f?f:j-j%c}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,l=a.tickFormatter,o=a.dataKey,c=et(i[r],o,r);return ce(l)?l(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var a=this.state,i=a.slideMoveStartX,l=a.startX,o=a.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,h=c.startIndex,m=c.endIndex,j=c.onChange,v=r.pageX-i;v>0?v=Math.min(v,u+f-d-o,u+f-d-l):v<0&&(v=Math.max(v,u-l,u-o));var p=this.getIndex({startX:l+v,endX:o+v});(p.startIndex!==h||p.endIndex!==m)&&j&&j(p),this.setState({startX:l+v,endX:o+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=HO(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,i=a.brushMoveStartX,l=a.movingTravellerId,o=a.endX,c=a.startX,u=this.state[l],f=this.props,d=f.x,h=f.width,m=f.travellerWidth,j=f.onChange,v=f.gap,p=f.data,y={startX:this.state.startX,endX:this.state.endX},g=r.pageX-i;g>0?g=Math.min(g,d+h-m-u):g<0&&(g=Math.max(g,d-u)),y[l]=u+g;var b=this.getIndex(y),x=b.startIndex,N=b.endIndex,w=function(){var A=p.length-1;return l==="startX"&&(o>c?x%v===0:N%v===0)||o<c&&N===A||l==="endX"&&(o>c?N%v===0:x%v===0)||o>c&&N===A};this.setState(wn(wn({},l,u+g),"brushMoveStartX",r.pageX),function(){j&&w()&&j(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,l=this.state,o=l.scaleValues,c=l.startX,u=l.endX,f=this.state[a],d=o.indexOf(f);if(d!==-1){var h=d+r;if(!(h===-1||h>=o.length)){var m=o[h];a==="startX"&&m>=u||a==="endX"&&m<=c||this.setState(wn({},a,m),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,c=r.fill,u=r.stroke;return T.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:l,height:o})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,c=r.data,u=r.children,f=r.padding,d=S.Children.only(u);return d?T.cloneElement(d,{x:a,y:i,width:l,height:o,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,l,o=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,h=c.traveller,m=c.ariaLabel,j=c.data,v=c.startIndex,p=c.endIndex,y=Math.max(r,this.props.x),g=_v(_v({},ae(this.props,!1)),{},{x:y,y:u,width:f,height:d}),b=m||"Min value: ".concat((i=j[v])===null||i===void 0?void 0:i.name,", Max value: ").concat((l=j[p])===null||l===void 0?void 0:l.name);return T.createElement(ge,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(N){["ArrowLeft","ArrowRight"].includes(N.key)&&(N.preventDefault(),N.stopPropagation(),o.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,a))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,g))}},{key:"renderSlide",value:function(r,a){var i=this.props,l=i.y,o=i.height,c=i.stroke,u=i.travellerWidth,f=Math.min(r,a)+u,d=Math.max(Math.abs(a-r)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:l,width:d,height:o})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,l=r.y,o=r.height,c=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,h=f.endX,m=5,j={pointerEvents:"none",fill:u};return T.createElement(ge,{className:"recharts-brush-texts"},T.createElement(Ps,wp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-m,y:l+o/2},j),this.getTextOfTick(a)),T.createElement(Ps,wp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+c+m,y:l+o/2},j),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,l=r.children,o=r.x,c=r.y,u=r.width,f=r.height,d=r.alwaysShowText,h=this.state,m=h.startX,j=h.endX,v=h.isTextActive,p=h.isSlideMoving,y=h.isTravellerMoving,g=h.isTravellerFocused;if(!a||!a.length||!X(o)||!X(c)||!X(u)||!X(f)||u<=0||f<=0)return null;var b=pe("recharts-brush",i),x=T.Children.count(l)===1,N=due("userSelect","none");return T.createElement(ge,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),x&&this.renderPanorama(),this.renderSlide(m,j),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(j,"endX"),(v||p||y||g||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,l=r.width,o=r.height,c=r.stroke,u=Math.floor(i+o/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:a,y:i,width:l,height:o,fill:c,stroke:"none"}),T.createElement("line",{x1:a+1,y1:u,x2:a+l-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:a+1,y1:u+2,x2:a+l-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return T.isValidElement(r)?i=T.cloneElement(r,a):ce(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,l=r.width,o=r.x,c=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return _v({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:l},i&&i.length?bue({data:i,width:l,x:o,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(a.scale&&(l!==a.prevWidth||o!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([o,o+l-c]);var h=a.scale.domain().map(function(m){return a.scale(m)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:l,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,l=0,o=i-1;o-l>1;){var c=Math.floor((l+o)/2);r[c]>a?o=c:l=c}return a>=r[o]?o:l}}])}(S.PureComponent);wn(So,"displayName","Brush");wn(So,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var jue=w1;function Sue(e,t){var n;return jue(e,function(r,a,i){return n=t(r,a,i),!n}),!!n}var wue=Sue,Nue=c3,Oue=ea,Aue=wue,Cue=jn,Eue=Bm;function _ue(e,t,n){var r=Cue(e)?Nue:Aue;return n&&Eue(e,t,n)&&(t=void 0),r(e,Oue(t))}var Tue=_ue;const kue=$e(Tue);var Vr=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},FO=k3;function Mue(e,t,n){t=="__proto__"&&FO?FO(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Pue=Mue,$ue=Pue,Rue=_3,Due=ea;function Lue(e,t){var n={};return t=Due(t),Rue(e,function(r,a,i){$ue(n,a,t(r,a,i))}),n}var zue=Lue;const Iue=$e(zue);function Bue(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var Uue=Bue,que=w1;function Hue(e,t){var n=!0;return que(e,function(r,a,i){return n=!!t(r,a,i),n}),n}var Fue=Hue,Gue=Uue,Kue=Fue,Vue=ea,Yue=jn,Wue=Bm;function Que(e,t,n){var r=Yue(e)?Gue:Kue;return n&&Wue(e,t,n)&&(t=void 0),r(e,Vue(t))}var Xue=Que;const bP=$e(Xue);var Zue=["x","y"];function Xu(e){"@babel/helpers - typeof";return Xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xu(e)}function a0(){return a0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a0.apply(this,arguments)}function GO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ec(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GO(Object(n),!0).forEach(function(r){Jue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jue(e,t,n){return t=efe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function efe(e){var t=tfe(e,"string");return Xu(t)=="symbol"?t:t+""}function tfe(e,t){if(Xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nfe(e,t){if(e==null)return{};var n=rfe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function afe(e,t){var n=e.x,r=e.y,a=nfe(e,Zue),i="".concat(n),l=parseInt(i,10),o="".concat(r),c=parseInt(o,10),u="".concat(t.height||a.height),f=parseInt(u,10),d="".concat(t.width||a.width),h=parseInt(d,10);return Ec(Ec(Ec(Ec(Ec({},t),a),l?{x:l}:{}),c?{y:c}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function KO(e){return T.createElement(bp,a0({shapeType:"rectangle",propTransformer:afe,activeClassName:"recharts-active-bar"},e))}var ife=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var i=X(r)||AH(r);return i?t(r,a):(i||Rs(),n)}},sfe=["value","background"],jP;function wo(e){"@babel/helpers - typeof";return wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(e)}function lfe(e,t){if(e==null)return{};var n=ofe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ofe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Op.apply(this,arguments)}function VO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function St(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VO(Object(n),!0).forEach(function(r){di(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wP(r.key),r)}}function ufe(e,t,n){return t&&YO(e.prototype,t),n&&YO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ffe(e,t,n){return t=Ap(t),dfe(e,SP()?Reflect.construct(t,n||[],Ap(e).constructor):t.apply(e,n))}function dfe(e,t){if(t&&(wo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hfe(e)}function hfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SP=function(){return!!e})()}function Ap(e){return Ap=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ap(e)}function pfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i0(e,t)}function i0(e,t){return i0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},i0(e,t)}function di(e,t,n){return t=wP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wP(e){var t=mfe(e,"string");return wo(t)=="symbol"?t:t+""}function mfe(e,t){if(wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Bi=function(e){function t(){var n;cfe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=ffe(this,t,[].concat(a)),di(n,"state",{isAnimationFinished:!1}),di(n,"id",Di("recharts-bar-")),di(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),di(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return pfe(t,e),ufe(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,i=this.props,l=i.shape,o=i.dataKey,c=i.activeIndex,u=i.activeBar,f=ae(this.props,!1);return r&&r.map(function(d,h){var m=h===c,j=m?u:l,v=St(St(St({},f),d),{},{isActive:m,option:j,index:h,dataKey:o,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return T.createElement(ge,Op({className:"recharts-bar-rectangle"},Ti(a.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(h)}),T.createElement(KO,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,i=a.data,l=a.layout,o=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,f=a.animationEasing,d=a.animationId,h=this.state.prevData;return T.createElement(cr,{begin:c,duration:u,isActive:o,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var j=m.t,v=i.map(function(p,y){var g=h&&h[y];if(g){var b=st(g.x,p.x),x=st(g.y,p.y),N=st(g.width,p.width),w=st(g.height,p.height);return St(St({},p),{},{x:b(j),y:x(j),width:N(j),height:w(j)})}if(l==="horizontal"){var O=st(0,p.height),A=O(j);return St(St({},p),{},{y:p.y+p.height-A,height:A})}var E=st(0,p.width),M=E(j);return St(St({},p),{},{width:M})});return T.createElement(ge,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,i=r.isAnimationActive,l=this.state.prevData;return i&&a&&a.length&&(!l||!ki(l,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,i=a.data,l=a.dataKey,o=a.activeIndex,c=ae(this.props.background,!1);return i.map(function(u,f){u.value;var d=u.background,h=lfe(u,sfe);if(!d)return null;var m=St(St(St(St(St({},h),{},{fill:"#eee"},d),c),Ti(r.props,u,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:f,className:"recharts-bar-background-rectangle"});return T.createElement(KO,Op({key:"background-bar-".concat(f),option:r.props.background,isActive:f===o},m))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.data,o=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=cn(f,oc);if(!d)return null;var h=u==="vertical"?l[0].height/2:l[0].width/2,m=function(p,y){var g=Array.isArray(p.value)?p.value[1]:p.value;return{x:p.x,y:p.y,value:g,errorVal:et(p,y)}},j={clipPath:r?"url(#clipPath-".concat(a,")"):null};return T.createElement(ge,j,d.map(function(v){return T.cloneElement(v,{key:"error-bar-".concat(a,"-").concat(v.props.dataKey),data:l,xAxis:o,yAxis:c,layout:u,offset:h,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.data,l=r.className,o=r.xAxis,c=r.yAxis,u=r.left,f=r.top,d=r.width,h=r.height,m=r.isAnimationActive,j=r.background,v=r.id;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,y=pe("recharts-bar",l),g=o&&o.allowDataOverflow,b=c&&c.allowDataOverflow,x=g||b,N=oe(v)?this.id:v;return T.createElement(ge,{className:y},g||b?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(N)},T.createElement("rect",{x:g?u:u-d/2,y:b?f:f-h/2,width:g?d:d*2,height:b?h:h*2}))):null,T.createElement(ge,{className:"recharts-bar-rectangles",clipPath:x?"url(#clipPath-".concat(N,")"):null},j?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(x,N),(!m||p)&&Or.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])}(S.PureComponent);jP=Bi;di(Bi,"displayName","Bar");di(Bi,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!La.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});di(Bi,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,l=e.yAxis,o=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,m=Gae(r,n);if(!m)return null;var j=t.layout,v=n.type.defaultProps,p=v!==void 0?St(St({},v),n.props):n.props,y=p.dataKey,g=p.children,b=p.minPointSize,x=j==="horizontal"?l:i,N=u?x.scale.domain():null,w=Zae({numericAxis:x}),O=cn(g,Mf),A=d.map(function(E,M){var $,k,I,_,C,P;u?$=Kae(u[f+M],N):($=et(E,y),Array.isArray($)||($=[w,$]));var z=ife(b,jP.defaultProps.minPointSize)($[1],M);if(j==="horizontal"){var B,K=[l.scale($[0]),l.scale($[1])],Y=K[0],Q=K[1];k=BN({axis:i,ticks:o,bandSize:a,offset:m.offset,entry:E,index:M}),I=(B=Q??Y)!==null&&B!==void 0?B:void 0,_=m.size;var Z=Y-Q;if(C=Number.isNaN(Z)?0:Z,P={x:k,y:l.y,width:_,height:l.height},Math.abs(z)>0&&Math.abs(C)<Math.abs(z)){var ne=an(C||z)*(Math.abs(z)-Math.abs(C));I-=ne,C+=ne}}else{var ie=[i.scale($[0]),i.scale($[1])],je=ie[0],ye=ie[1];if(k=je,I=BN({axis:l,ticks:c,bandSize:a,offset:m.offset,entry:E,index:M}),_=ye-je,C=m.size,P={x:i.x,y:I,width:i.width,height:C},Math.abs(z)>0&&Math.abs(_)<Math.abs(z)){var ft=an(_||z)*(Math.abs(z)-Math.abs(_));_+=ft}}return St(St(St({},E),{},{x:k,y:I,width:_,height:C,value:u?$:$[1],payload:E,background:P},O&&O[M]&&O[M].props),{},{tooltipPayload:[KM(n,E)],tooltipPosition:{x:k+_/2,y:I+C/2}})});return St({data:A,layout:j},h)});function Zu(e){"@babel/helpers - typeof";return Zu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zu(e)}function yfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NP(r.key),r)}}function vfe(e,t,n){return t&&WO(e.prototype,t),n&&WO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function QO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QO(Object(n),!0).forEach(function(r){ry(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ry(e,t,n){return t=NP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NP(e){var t=gfe(e,"string");return Zu(t)=="symbol"?t:t+""}function gfe(e,t){if(Zu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ay=function(t,n,r,a,i){var l=t.width,o=t.height,c=t.layout,u=t.children,f=Object.keys(n),d={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:o-r.bottom,bottomMirror:o-r.bottom},h=!!On(u,Bi);return f.reduce(function(m,j){var v=n[j],p=v.orientation,y=v.domain,g=v.padding,b=g===void 0?{}:g,x=v.mirror,N=v.reversed,w="".concat(p).concat(x?"Mirror":""),O,A,E,M,$;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var k=y[1]-y[0],I=1/0,_=v.categoricalDomain.sort(TH);if(_.forEach(function(ie,je){je>0&&(I=Math.min((ie||0)-(_[je-1]||0),I))}),Number.isFinite(I)){var C=I/k,P=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(O=C*P/2),v.padding==="no-gap"){var z=sn(t.barCategoryGap,C*P),B=C*P/2;O=B-z-(B-z)/P*z}}}a==="xAxis"?A=[r.left+(b.left||0)+(O||0),r.left+r.width-(b.right||0)-(O||0)]:a==="yAxis"?A=c==="horizontal"?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(O||0),r.top+r.height-(b.bottom||0)-(O||0)]:A=v.range,N&&(A=[A[1],A[0]]);var K=qM(v,i,h),Y=K.scale,Q=K.realScaleType;Y.domain(y).range(A),HM(Y);var Z=FM(Y,xr(xr({},v),{},{realScaleType:Q}));a==="xAxis"?($=p==="top"&&!x||p==="bottom"&&x,E=r.left,M=d[w]-$*v.height):a==="yAxis"&&($=p==="left"&&!x||p==="right"&&x,E=d[w]-$*v.width,M=r.top);var ne=xr(xr(xr({},v),Z),{},{realScaleType:Q,x:E,y:M,scale:Y,width:a==="xAxis"?r.width:v.width,height:a==="yAxis"?r.height:v.height});return ne.bandSize=op(ne,Z),!v.hide&&a==="xAxis"?d[w]+=($?-1:1)*ne.height:v.hide||(d[w]+=($?-1:1)*ne.width),xr(xr({},m),{},ry({},j,ne))},{})},OP=function(t,n){var r=t.x,a=t.y,i=n.x,l=n.y;return{x:Math.min(r,i),y:Math.min(a,l),width:Math.abs(i-r),height:Math.abs(l-a)}},xfe=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return OP({x:n,y:r},{x:a,y:i})},AP=function(){function e(t){yfe(this,e),this.scale=t}return vfe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(n)+o}default:return this.scale(n)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),a=r[0],i=r[r.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])}();ry(AP,"EPS",1e-4);var Z1=function(t){var n=Object.keys(t).reduce(function(r,a){return xr(xr({},r),{},ry({},a,AP.create(t[a])))},{});return xr(xr({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=i.bandAware,o=i.position;return Iue(a,function(c,u){return n[u].apply(c,{bandAware:l,position:o})})},isInRange:function(a){return bP(a,function(i,l){return n[l].isInRange(i)})}})};function bfe(e){return(e%180+180)%180}var jfe=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=bfe(a),l=i*Math.PI/180,o=Math.atan(r/n),c=l>o&&l<Math.PI-o?r/Math.sin(l):n/Math.cos(l);return Math.abs(c)},Sfe=ea,wfe=kf,Nfe=zm;function Ofe(e){return function(t,n,r){var a=Object(t);if(!wfe(t)){var i=Sfe(n);t=Nfe(t),n=function(o){return i(a[o],o,a)}}var l=e(t,n,r);return l>-1?a[i?t[l]:l]:void 0}}var Afe=Ofe,Cfe=yP;function Efe(e){var t=Cfe(e),n=t%1;return t===t?n?t-n:t:0}var _fe=Efe,Tfe=w3,kfe=ea,Mfe=_fe,Pfe=Math.max;function $fe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var a=n==null?0:Mfe(n);return a<0&&(a=Pfe(r+a,0)),Tfe(e,kfe(t),a)}var Rfe=$fe,Dfe=Afe,Lfe=Rfe,zfe=Dfe(Lfe),Ife=zfe;const Bfe=$e(Ife);var Ufe=Mq(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),J1=S.createContext(void 0),ej=S.createContext(void 0),CP=S.createContext(void 0),EP=S.createContext({}),_P=S.createContext(void 0),TP=S.createContext(0),kP=S.createContext(0),XO=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,l=t.clipPathId,o=t.children,c=t.width,u=t.height,f=Ufe(i);return T.createElement(J1.Provider,{value:r},T.createElement(ej.Provider,{value:a},T.createElement(EP.Provider,{value:i},T.createElement(CP.Provider,{value:f},T.createElement(_P.Provider,{value:l},T.createElement(TP.Provider,{value:u},T.createElement(kP.Provider,{value:c},o)))))))},qfe=function(){return S.useContext(_P)},MP=function(t){var n=S.useContext(J1);n==null&&Rs();var r=n[t];return r==null&&Rs(),r},Hfe=function(){var t=S.useContext(J1);return Ja(t)},Ffe=function(){var t=S.useContext(ej),n=Bfe(t,function(r){return bP(r.domain,Number.isFinite)});return n||Ja(t)},PP=function(t){var n=S.useContext(ej);n==null&&Rs();var r=n[t];return r==null&&Rs(),r},Gfe=function(){var t=S.useContext(CP);return t},Kfe=function(){return S.useContext(EP)},tj=function(){return S.useContext(kP)},nj=function(){return S.useContext(TP)};function No(e){"@babel/helpers - typeof";return No=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(e)}function Vfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yfe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RP(r.key),r)}}function Wfe(e,t,n){return t&&Yfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qfe(e,t,n){return t=Cp(t),Xfe(e,$P()?Reflect.construct(t,n||[],Cp(e).constructor):t.apply(e,n))}function Xfe(e,t){if(t&&(No(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zfe(e)}function Zfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($P=function(){return!!e})()}function Cp(e){return Cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cp(e)}function Jfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s0(e,t)}function s0(e,t){return s0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},s0(e,t)}function ZO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function JO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZO(Object(n),!0).forEach(function(r){rj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rj(e,t,n){return t=RP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RP(e){var t=ede(e,"string");return No(t)=="symbol"?t:t+""}function ede(e,t){if(No(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(No(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function tde(e,t){return ide(e)||ade(e,t)||rde(e,t)||nde()}function nde(){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 rde(e,t){if(e){if(typeof e=="string")return eA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eA(e,t)}}function eA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ade(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function ide(e){if(Array.isArray(e))return e}function l0(){return l0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l0.apply(this,arguments)}var sde=function(t,n){var r;return T.isValidElement(t)?r=T.cloneElement(t,n):ce(t)?r=t(n):r=T.createElement("line",l0({},n,{className:"recharts-reference-line-line"})),r},lde=function(t,n,r,a,i,l,o,c,u){var f=i.x,d=i.y,h=i.width,m=i.height;if(r){var j=u.y,v=t.y.apply(j,{position:l});if(Vr(u,"discard")&&!t.y.isInRange(v))return null;var p=[{x:f+h,y:v},{x:f,y:v}];return c==="left"?p.reverse():p}if(n){var y=u.x,g=t.x.apply(y,{position:l});if(Vr(u,"discard")&&!t.x.isInRange(g))return null;var b=[{x:g,y:d+m},{x:g,y:d}];return o==="top"?b.reverse():b}if(a){var x=u.segment,N=x.map(function(w){return t.apply(w,{position:l})});return Vr(u,"discard")&&kue(N,function(w){return!t.isInRange(w)})?null:N}return null};function ode(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,i=e.yAxisId,l=e.shape,o=e.className,c=e.alwaysShow,u=qfe(),f=MP(a),d=PP(i),h=Gfe();if(!u||!h)return null;Nr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=Z1({x:f.scale,y:d.scale}),j=kt(t),v=kt(n),p=r&&r.length===2,y=lde(m,j,v,p,h,e.position,f.orientation,d.orientation,e);if(!y)return null;var g=tde(y,2),b=g[0],x=b.x,N=b.y,w=g[1],O=w.x,A=w.y,E=Vr(e,"hidden")?"url(#".concat(u,")"):void 0,M=JO(JO({clipPath:E},ae(e,!0)),{},{x1:x,y1:N,x2:O,y2:A});return T.createElement(ge,{className:pe("recharts-reference-line",o)},sde(l,M),zt.renderCallByParent(e,xfe({x1:x,y1:N,x2:O,y2:A})))}var fa=function(e){function t(){return Vfe(this,t),Qfe(this,t,arguments)}return Jfe(t,e),Wfe(t,[{key:"render",value:function(){return T.createElement(ode,this.props)}}])}(T.Component);rj(fa,"displayName","ReferenceLine");rj(fa,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function o0(){return o0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o0.apply(this,arguments)}function Oo(e){"@babel/helpers - typeof";return Oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(e)}function tA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function nA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tA(Object(n),!0).forEach(function(r){iy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ude(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LP(r.key),r)}}function fde(e,t,n){return t&&ude(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dde(e,t,n){return t=Ep(t),hde(e,DP()?Reflect.construct(t,n||[],Ep(e).constructor):t.apply(e,n))}function hde(e,t){if(t&&(Oo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pde(e)}function pde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DP=function(){return!!e})()}function Ep(e){return Ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ep(e)}function mde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c0(e,t)}function c0(e,t){return c0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},c0(e,t)}function iy(e,t,n){return t=LP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LP(e){var t=yde(e,"string");return Oo(t)=="symbol"?t:t+""}function yde(e,t){if(Oo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vde=function(t){var n=t.x,r=t.y,a=t.xAxis,i=t.yAxis,l=Z1({x:a.scale,y:i.scale}),o=l.apply({x:n,y:r},{bandAware:!0});return Vr(t,"discard")&&!l.isInRange(o)?null:o},sy=function(e){function t(){return cde(this,t),dde(this,t,arguments)}return mde(t,e),fde(t,[{key:"render",value:function(){var r=this.props,a=r.x,i=r.y,l=r.r,o=r.alwaysShow,c=r.clipPathId,u=kt(a),f=kt(i);if(Nr(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=vde(this.props);if(!d)return null;var h=d.x,m=d.y,j=this.props,v=j.shape,p=j.className,y=Vr(this.props,"hidden")?"url(#".concat(c,")"):void 0,g=nA(nA({clipPath:y},ae(this.props,!0)),{},{cx:h,cy:m});return T.createElement(ge,{className:pe("recharts-reference-dot",p)},t.renderDot(v,g),zt.renderCallByParent(this.props,{x:h-l,y:m-l,width:2*l,height:2*l}))}}])}(T.Component);iy(sy,"displayName","ReferenceDot");iy(sy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});iy(sy,"renderDot",function(e,t){var n;return T.isValidElement(e)?n=T.cloneElement(e,t):ce(e)?n=e(t):n=T.createElement(Lf,o0({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function u0(){return u0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u0.apply(this,arguments)}function Ao(e){"@babel/helpers - typeof";return Ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ao(e)}function rA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aA(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rA(Object(n),!0).forEach(function(r){ly(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xde(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IP(r.key),r)}}function bde(e,t,n){return t&&xde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jde(e,t,n){return t=_p(t),Sde(e,zP()?Reflect.construct(t,n||[],_p(e).constructor):t.apply(e,n))}function Sde(e,t){if(t&&(Ao(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wde(e)}function wde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zP=function(){return!!e})()}function _p(e){return _p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_p(e)}function Nde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f0(e,t)}function f0(e,t){return f0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},f0(e,t)}function ly(e,t,n){return t=IP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IP(e){var t=Ode(e,"string");return Ao(t)=="symbol"?t:t+""}function Ode(e,t){if(Ao(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ao(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ade=function(t,n,r,a,i){var l=i.x1,o=i.x2,c=i.y1,u=i.y2,f=i.xAxis,d=i.yAxis;if(!f||!d)return null;var h=Z1({x:f.scale,y:d.scale}),m={x:t?h.x.apply(l,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(c,{position:"start"}):h.y.rangeMin},j={x:n?h.x.apply(o,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Vr(i,"discard")&&(!h.isInRange(m)||!h.isInRange(j))?null:OP(m,j)},oy=function(e){function t(){return gde(this,t),jde(this,t,arguments)}return Nde(t,e),bde(t,[{key:"render",value:function(){var r=this.props,a=r.x1,i=r.x2,l=r.y1,o=r.y2,c=r.className,u=r.alwaysShow,f=r.clipPathId;Nr(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=kt(a),h=kt(i),m=kt(l),j=kt(o),v=this.props.shape;if(!d&&!h&&!m&&!j&&!v)return null;var p=Ade(d,h,m,j,this.props);if(!p&&!v)return null;var y=Vr(this.props,"hidden")?"url(#".concat(f,")"):void 0;return T.createElement(ge,{className:pe("recharts-reference-area",c)},t.renderRect(v,aA(aA({clipPath:y},ae(this.props,!0)),p)),zt.renderCallByParent(this.props,p))}}])}(T.Component);ly(oy,"displayName","ReferenceArea");ly(oy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ly(oy,"renderRect",function(e,t){var n;return T.isValidElement(e)?n=T.cloneElement(e,t):ce(e)?n=e(t):n=T.createElement(X1,u0({},t,{className:"recharts-reference-area-rect"})),n});function BP(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function Cde(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return jfe(r,n)}function Ede(e,t,n){var r=n==="width",a=e.x,i=e.y,l=e.width,o=e.height;return t===1?{start:r?a:i,end:r?a+l:i+o}:{start:r?a+l:i+o,end:r?a:i}}function Tp(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function _de(e,t){return BP(e,t+1)}function Tde(e,t,n,r,a){for(var i=(r||[]).slice(),l=t.start,o=t.end,c=0,u=1,f=l,d=function(){var j=r==null?void 0:r[c];if(j===void 0)return{v:BP(r,u)};var v=c,p,y=function(){return p===void 0&&(p=n(j,v)),p},g=j.coordinate,b=c===0||Tp(e,g,y,f,o);b||(c=0,f=l,u+=1),b&&(f=g+e*(y()/2+a),c+=u)},h;u<=i.length;)if(h=d(),h)return h.v;return[]}function Ju(e){"@babel/helpers - typeof";return Ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ju(e)}function iA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(n),!0).forEach(function(r){kde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kde(e,t,n){return t=Mde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mde(e){var t=Pde(e,"string");return Ju(t)=="symbol"?t:t+""}function Pde(e,t){if(Ju(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ju(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $de(e,t,n,r,a){for(var i=(r||[]).slice(),l=i.length,o=t.start,c=t.end,u=function(h){var m=i[h],j,v=function(){return j===void 0&&(j=n(m,h)),j};if(h===l-1){var p=e*(m.coordinate+e*v()/2-c);i[h]=m=Qt(Qt({},m),{},{tickCoord:p>0?m.coordinate-p*e:m.coordinate})}else i[h]=m=Qt(Qt({},m),{},{tickCoord:m.coordinate});var y=Tp(e,m.tickCoord,v,o,c);y&&(c=m.tickCoord-e*(v()/2+a),i[h]=Qt(Qt({},m),{},{isShow:!0}))},f=l-1;f>=0;f--)u(f);return i}function Rde(e,t,n,r,a,i){var l=(r||[]).slice(),o=l.length,c=t.start,u=t.end;if(i){var f=r[o-1],d=n(f,o-1),h=e*(f.coordinate+e*d/2-u);l[o-1]=f=Qt(Qt({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var m=Tp(e,f.tickCoord,function(){return d},c,u);m&&(u=f.tickCoord-e*(d/2+a),l[o-1]=Qt(Qt({},f),{},{isShow:!0}))}for(var j=i?o-1:o,v=function(g){var b=l[g],x,N=function(){return x===void 0&&(x=n(b,g)),x};if(g===0){var w=e*(b.coordinate-e*N()/2-c);l[g]=b=Qt(Qt({},b),{},{tickCoord:w<0?b.coordinate-w*e:b.coordinate})}else l[g]=b=Qt(Qt({},b),{},{tickCoord:b.coordinate});var O=Tp(e,b.tickCoord,N,c,u);O&&(c=b.tickCoord+e*(N()/2+a),l[g]=Qt(Qt({},b),{},{isShow:!0}))},p=0;p<j;p++)v(p);return l}function aj(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,l=e.minTickGap,o=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!a||!a.length||!r)return[];if(X(c)||La.isSsr)return _de(a,typeof c=="number"&&X(c)?c:0);var h=[],m=o==="top"||o==="bottom"?"width":"height",j=f&&m==="width"?Wc(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=function(b,x){var N=ce(u)?u(b.value,x):b.value;return m==="width"?Cde(Wc(N,{fontSize:t,letterSpacing:n}),j,d):Wc(N,{fontSize:t,letterSpacing:n})[m]},p=a.length>=2?an(a[1].coordinate-a[0].coordinate):1,y=Ede(i,p,m);return c==="equidistantPreserveStart"?Tde(p,y,v,a,l):(c==="preserveStart"||c==="preserveStartEnd"?h=Rde(p,y,v,a,l,c==="preserveStartEnd"):h=$de(p,y,v,a,l),h.filter(function(g){return g.isShow}))}var Dde=["viewBox"],Lde=["viewBox"],zde=["ticks"];function Co(e){"@babel/helpers - typeof";return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Co(e)}function wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wl.apply(this,arguments)}function sA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sA(Object(n),!0).forEach(function(r){ij(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tv(e,t){if(e==null)return{};var n=Ide(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ide(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Bde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qP(r.key),r)}}function Ude(e,t,n){return t&&lA(e.prototype,t),n&&lA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qde(e,t,n){return t=kp(t),Hde(e,UP()?Reflect.construct(t,n||[],kp(e).constructor):t.apply(e,n))}function Hde(e,t){if(t&&(Co(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fde(e)}function Fde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(UP=function(){return!!e})()}function kp(e){return kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kp(e)}function Gde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d0(e,t)}function d0(e,t){return d0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},d0(e,t)}function ij(e,t,n){return t=qP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qP(e){var t=Kde(e,"string");return Co(t)=="symbol"?t:t+""}function Kde(e,t){if(Co(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Co(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var cc=function(e){function t(n){var r;return Bde(this,t),r=qde(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return Gde(t,e),Ude(t,[{key:"shouldComponentUpdate",value:function(r,a){var i=r.viewBox,l=Tv(r,Dde),o=this.props,c=o.viewBox,u=Tv(o,Lde);return!Ml(i,c)||!Ml(l,u)||!Ml(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.x,l=a.y,o=a.width,c=a.height,u=a.orientation,f=a.tickSize,d=a.mirror,h=a.tickMargin,m,j,v,p,y,g,b=d?-1:1,x=r.tickSize||f,N=X(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":m=j=r.coordinate,p=l+ +!d*c,v=p-b*x,g=v-b*h,y=N;break;case"left":v=p=r.coordinate,j=i+ +!d*o,m=j-b*x,y=m-b*h,g=N;break;case"right":v=p=r.coordinate,j=i+ +d*o,m=j+b*x,y=m+b*h,g=N;break;default:m=j=r.coordinate,p=l+ +d*c,v=p+b*x,g=v+b*h,y=N;break}return{line:{x1:m,y1:v,x2:j,y2:p},tick:{x:y,y:g}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,l;switch(a){case"left":l=i?"start":"end";break;case"right":l=i?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,l="end";switch(a){case"left":case"right":l="middle";break;case"top":l=i?"start":"end";break;default:l=i?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,i=r.y,l=r.width,o=r.height,c=r.orientation,u=r.mirror,f=r.axisLine,d=Et(Et(Et({},ae(this.props,!1)),ae(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);d=Et(Et({},d),{},{x1:a,y1:i+h*o,x2:a+l,y2:i+h*o})}else{var m=+(c==="left"&&!u||c==="right"&&u);d=Et(Et({},d),{},{x1:a+m*l,y1:i,x2:a+m*l,y2:i+o})}return T.createElement("line",wl({},d,{className:pe("recharts-cartesian-axis-line",Rn(f,"className"))}))}},{key:"renderTicks",value:function(r,a,i){var l=this,o=this.props,c=o.tickLine,u=o.stroke,f=o.tick,d=o.tickFormatter,h=o.unit,m=aj(Et(Et({},this.props),{},{ticks:r}),a,i),j=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),p=ae(this.props,!1),y=ae(f,!1),g=Et(Et({},p),{},{fill:"none"},ae(c,!1)),b=m.map(function(x,N){var w=l.getTickLineCoord(x),O=w.line,A=w.tick,E=Et(Et(Et(Et({textAnchor:j,verticalAnchor:v},p),{},{stroke:"none",fill:u},y),A),{},{index:N,payload:x,visibleTicksCount:m.length,tickFormatter:d});return T.createElement(ge,wl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(x.value,"-").concat(x.coordinate,"-").concat(x.tickCoord)},Ti(l.props,x,N)),c&&T.createElement("line",wl({},g,O,{className:pe("recharts-cartesian-axis-tick-line",Rn(c,"className"))})),f&&t.renderTickItem(f,E,"".concat(ce(d)?d(x.value,N):x.value).concat(h||"")))});return T.createElement("g",{className:"recharts-cartesian-axis-ticks"},b)}},{key:"render",value:function(){var r=this,a=this.props,i=a.axisLine,l=a.width,o=a.height,c=a.ticksGenerator,u=a.className,f=a.hide;if(f)return null;var d=this.props,h=d.ticks,m=Tv(d,zde),j=h;return ce(c)&&(j=h&&h.length>0?c(this.props):c(m)),l<=0||o<=0||!j||!j.length?null:T.createElement(ge,{className:pe("recharts-cartesian-axis",u),ref:function(p){r.layerReference=p}},i&&this.renderAxisLine(),this.renderTicks(j,this.state.fontSize,this.state.letterSpacing),zt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var l,o=pe(a.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(r)?l=T.cloneElement(r,Et(Et({},a),{},{className:o})):ce(r)?l=r(Et(Et({},a),{},{className:o})):l=T.createElement(Ps,wl({},a,{className:"recharts-cartesian-axis-tick-value"}),i),l}}])}(S.Component);ij(cc,"displayName","CartesianAxis");ij(cc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Vde=["x1","y1","x2","y2","key"],Yde=["offset"];function Ds(e){"@babel/helpers - typeof";return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ds(e)}function oA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oA(Object(n),!0).forEach(function(r){Wde(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wde(e,t,n){return t=Qde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qde(e){var t=Xde(e,"string");return Ds(t)=="symbol"?t:t+""}function Xde(e,t){if(Ds(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ds(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ss.apply(this,arguments)}function cA(e,t){if(e==null)return{};var n=Zde(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Jde=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,i=t.y,l=t.width,o=t.height,c=t.ry;return T.createElement("rect",{x:a,y:i,ry:c,width:l,height:o,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function HP(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(ce(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,l=t.y2,o=t.key,c=cA(t,Vde),u=ae(c,!1);u.offset;var f=cA(u,Yde);n=T.createElement("line",ss({},f,{x1:r,y1:a,x2:i,y2:l,fill:"none",key:o}))}return n}function ehe(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var l=i.map(function(o,c){var u=Xt(Xt({},e),{},{x1:t,y1:o,x2:t+n,y2:o,key:"line-".concat(c),index:c});return HP(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function the(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,i=e.verticalPoints;if(!a||!i||!i.length)return null;var l=i.map(function(o,c){var u=Xt(Xt({},e),{},{x1:o,y1:t,x2:o,y2:t+n,key:"line-".concat(c),index:c});return HP(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function nhe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,l=e.height,o=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=o.map(function(h){return Math.round(h+a-a)}).sort(function(h,m){return h-m});a!==f[0]&&f.unshift(0);var d=f.map(function(h,m){var j=!f[m+1],v=j?a+l-h:f[m+1]-h;if(v<=0)return null;var p=m%t.length;return T.createElement("rect",{key:"react-".concat(m),y:h,x:r,height:v,width:i,stroke:"none",fill:t[p],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function rhe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,l=e.y,o=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==f[0]&&f.unshift(0);var d=f.map(function(h,m){var j=!f[m+1],v=j?i+o-h:f[m+1]-h;if(v<=0)return null;var p=m%r.length;return T.createElement("rect",{key:"react-".concat(m),x:h,y:l,width:v,height:c,stroke:"none",fill:r[p],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var ahe=function(t,n){var r=t.xAxis,a=t.width,i=t.height,l=t.offset;return UM(aj(Xt(Xt(Xt({},cc.defaultProps),r),{},{ticks:xa(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.left,l.left+l.width,n)},ihe=function(t,n){var r=t.yAxis,a=t.width,i=t.height,l=t.offset;return UM(aj(Xt(Xt(Xt({},cc.defaultProps),r),{},{ticks:xa(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),l.top,l.top+l.height,n)},el={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Rl(e){var t,n,r,a,i,l,o=tj(),c=nj(),u=Kfe(),f=Xt(Xt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:el.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:el.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:el.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:el.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:el.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:el.verticalFill,x:X(e.x)?e.x:u.left,y:X(e.y)?e.y:u.top,width:X(e.width)?e.width:u.width,height:X(e.height)?e.height:u.height}),d=f.x,h=f.y,m=f.width,j=f.height,v=f.syncWithTicks,p=f.horizontalValues,y=f.verticalValues,g=Hfe(),b=Ffe();if(!X(m)||m<=0||!X(j)||j<=0||!X(d)||d!==+d||!X(h)||h!==+h)return null;var x=f.verticalCoordinatesGenerator||ahe,N=f.horizontalCoordinatesGenerator||ihe,w=f.horizontalPoints,O=f.verticalPoints;if((!w||!w.length)&&ce(N)){var A=p&&p.length,E=N({yAxis:b?Xt(Xt({},b),{},{ticks:A?p:b.ticks}):void 0,width:o,height:c,offset:u},A?!0:v);Nr(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ds(E),"]")),Array.isArray(E)&&(w=E)}if((!O||!O.length)&&ce(x)){var M=y&&y.length,$=x({xAxis:g?Xt(Xt({},g),{},{ticks:M?y:g.ticks}):void 0,width:o,height:c,offset:u},M?!0:v);Nr(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ds($),"]")),Array.isArray($)&&(O=$)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(Jde,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),T.createElement(ehe,ss({},f,{offset:u,horizontalPoints:w,xAxis:g,yAxis:b})),T.createElement(the,ss({},f,{offset:u,verticalPoints:O,xAxis:g,yAxis:b})),T.createElement(nhe,ss({},f,{horizontalPoints:w})),T.createElement(rhe,ss({},f,{verticalPoints:O})))}Rl.displayName="CartesianGrid";var she=["type","layout","connectNulls","ref"],lhe=["key"];function Eo(e){"@babel/helpers - typeof";return Eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eo(e)}function uA(e,t){if(e==null)return{};var n=ohe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ohe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function tu(){return tu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tu.apply(this,arguments)}function fA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fA(Object(n),!0).forEach(function(r){br(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tl(e){return dhe(e)||fhe(e)||uhe(e)||che()}function che(){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 uhe(e,t){if(e){if(typeof e=="string")return h0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h0(e,t)}}function fhe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dhe(e){if(Array.isArray(e))return h0(e)}function h0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,GP(r.key),r)}}function phe(e,t,n){return t&&dA(e.prototype,t),n&&dA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mhe(e,t,n){return t=Mp(t),yhe(e,FP()?Reflect.construct(t,n||[],Mp(e).constructor):t.apply(e,n))}function yhe(e,t){if(t&&(Eo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vhe(e)}function vhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FP=function(){return!!e})()}function Mp(e){return Mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mp(e)}function ghe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p0(e,t)}function p0(e,t){return p0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},p0(e,t)}function br(e,t,n){return t=GP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GP(e){var t=xhe(e,"string");return Eo(t)=="symbol"?t:t+""}function xhe(e,t){if(Eo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Mi=function(e){function t(){var n;hhe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=mhe(this,t,[].concat(a)),br(n,"state",{isAnimationFinished:!0,totalLength:0}),br(n,"generateSimpleStrokeDasharray",function(l,o){return"".concat(o,"px ").concat(l-o,"px")}),br(n,"getStrokeDasharray",function(l,o,c){var u=c.reduce(function(y,g){return y+g});if(!u)return n.generateSimpleStrokeDasharray(o,l);for(var f=Math.floor(l/u),d=l%u,h=o-l,m=[],j=0,v=0;j<c.length;v+=c[j],++j)if(v+c[j]>d){m=[].concat(tl(c.slice(0,j)),[d-v]);break}var p=m.length%2===0?[0,h]:[h];return[].concat(tl(t.repeat(c,f)),tl(m),p).map(function(y){return"".concat(y,"px")}).join(", ")}),br(n,"id",Di("recharts-line-")),br(n,"pathRef",function(l){n.mainCurve=l}),br(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),br(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return ghe(t,e),phe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.points,o=i.xAxis,c=i.yAxis,u=i.layout,f=i.children,d=cn(f,oc);if(!d)return null;var h=function(v,p){return{x:v.x,y:v.y,value:v.value,errorVal:et(v.payload,p)}},m={clipPath:r?"url(#clipPath-".concat(a,")"):null};return T.createElement(ge,m,d.map(function(j){return T.cloneElement(j,{key:"bar-".concat(j.props.dataKey),data:l,xAxis:o,yAxis:c,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,a,i){var l=this.props.isAnimationActive;if(l&&!this.state.isAnimationFinished)return null;var o=this.props,c=o.dot,u=o.points,f=o.dataKey,d=ae(this.props,!1),h=ae(c,!0),m=u.map(function(v,p){var y=Sn(Sn(Sn({key:"dot-".concat(p),r:3},d),h),{},{index:p,cx:v.x,cy:v.y,value:v.value,dataKey:f,payload:v.payload,points:u});return t.renderDotItem(c,y)}),j={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(ge,tu({className:"recharts-line-dots",key:"dots"},j),m)}},{key:"renderCurveStatically",value:function(r,a,i,l){var o=this.props,c=o.type,u=o.layout,f=o.connectNulls;o.ref;var d=uA(o,she),h=Sn(Sn(Sn({},ae(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:r},l),{},{type:c,layout:u,connectNulls:f});return T.createElement(Ni,tu({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,a){var i=this,l=this.props,o=l.points,c=l.strokeDasharray,u=l.isAnimationActive,f=l.animationBegin,d=l.animationDuration,h=l.animationEasing,m=l.animationId,j=l.animateNewValues,v=l.width,p=l.height,y=this.state,g=y.prevPoints,b=y.totalLength;return T.createElement(cr,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(x){var N=x.t;if(g){var w=g.length/o.length,O=o.map(function(k,I){var _=Math.floor(I*w);if(g[_]){var C=g[_],P=st(C.x,k.x),z=st(C.y,k.y);return Sn(Sn({},k),{},{x:P(N),y:z(N)})}if(j){var B=st(v*2,k.x),K=st(p/2,k.y);return Sn(Sn({},k),{},{x:B(N),y:K(N)})}return Sn(Sn({},k),{},{x:k.x,y:k.y})});return i.renderCurveStatically(O,r,a)}var A=st(0,b),E=A(N),M;if(c){var $="".concat(c).split(/[,\s]+/gim).map(function(k){return parseFloat(k)});M=i.getStrokeDasharray(E,b,$)}else M=i.generateSimpleStrokeDasharray(b,E);return i.renderCurveStatically(o,r,a,{strokeDasharray:M})})}},{key:"renderCurve",value:function(r,a){var i=this.props,l=i.points,o=i.isAnimationActive,c=this.state,u=c.prevPoints,f=c.totalLength;return o&&l&&l.length&&(!u&&f>0||!ki(u,l))?this.renderCurveWithAnimation(r,a):this.renderCurveStatically(l,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,l=a.dot,o=a.points,c=a.className,u=a.xAxis,f=a.yAxis,d=a.top,h=a.left,m=a.width,j=a.height,v=a.isAnimationActive,p=a.id;if(i||!o||!o.length)return null;var y=this.state.isAnimationFinished,g=o.length===1,b=pe("recharts-line",c),x=u&&u.allowDataOverflow,N=f&&f.allowDataOverflow,w=x||N,O=oe(p)?this.id:p,A=(r=ae(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},E=A.r,M=E===void 0?3:E,$=A.strokeWidth,k=$===void 0?2:$,I=$k(l)?l:{},_=I.clipDot,C=_===void 0?!0:_,P=M*2+k;return T.createElement(ge,{className:b},x||N?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(O)},T.createElement("rect",{x:x?h:h-m/2,y:N?d:d-j/2,width:x?m:m*2,height:N?j:j*2})),!C&&T.createElement("clipPath",{id:"clipPath-dots-".concat(O)},T.createElement("rect",{x:h-P/2,y:d-P/2,width:m+P,height:j+P}))):null,!g&&this.renderCurve(w,O),this.renderErrorBar(w,O),(g||l)&&this.renderDots(w,C,O),(!v||y)&&Or.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,a){for(var i=r.length%2!==0?[].concat(tl(r),[0]):r,l=[],o=0;o<a;++o)l=[].concat(tl(l),tl(i));return l}},{key:"renderDotItem",value:function(r,a){var i;if(T.isValidElement(r))i=T.cloneElement(r,a);else if(ce(r))i=r(a);else{var l=a.key,o=uA(a,lhe),c=pe("recharts-line-dot",typeof r!="boolean"?r.className:"");i=T.createElement(Lf,tu({key:l},o,{className:c}))}return i}}])}(S.PureComponent);br(Mi,"displayName","Line");br(Mi,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!La.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});br(Mi,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,l=e.dataKey,o=e.bandSize,c=e.displayedData,u=e.offset,f=t.layout,d=c.map(function(h,m){var j=et(h,l);return f==="horizontal"?{x:yo({axis:n,ticks:a,bandSize:o,entry:h,index:m}),y:oe(j)?null:r.scale(j),value:j,payload:h}:{x:oe(j)?null:n.scale(j),y:yo({axis:r,ticks:i,bandSize:o,entry:h,index:m}),value:j,payload:h}});return Sn({points:d,layout:f},u)});var bhe=["layout","type","stroke","connectNulls","isRange","ref"],jhe=["key"],KP;function _o(e){"@babel/helpers - typeof";return _o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_o(e)}function VP(e,t){if(e==null)return{};var n=She(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function She(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ls(){return ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ls.apply(this,arguments)}function hA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hA(Object(n),!0).forEach(function(r){Fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function whe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,WP(r.key),r)}}function Nhe(e,t,n){return t&&pA(e.prototype,t),n&&pA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ohe(e,t,n){return t=Pp(t),Ahe(e,YP()?Reflect.construct(t,n||[],Pp(e).constructor):t.apply(e,n))}function Ahe(e,t){if(t&&(_o(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Che(e)}function Che(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YP=function(){return!!e})()}function Pp(e){return Pp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pp(e)}function Ehe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m0(e,t)}function m0(e,t){return m0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},m0(e,t)}function Fr(e,t,n){return t=WP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WP(e){var t=_he(e,"string");return _o(t)=="symbol"?t:t+""}function _he(e,t){if(_o(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_o(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ba=function(e){function t(){var n;whe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=Ohe(this,t,[].concat(a)),Fr(n,"state",{isAnimationFinished:!0}),Fr(n,"id",Di("recharts-area-")),Fr(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),ce(l)&&l()}),Fr(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),ce(l)&&l()}),n}return Ehe(t,e),Nhe(t,[{key:"renderDots",value:function(r,a,i){var l=this.props.isAnimationActive,o=this.state.isAnimationFinished;if(l&&!o)return null;var c=this.props,u=c.dot,f=c.points,d=c.dataKey,h=ae(this.props,!1),m=ae(u,!0),j=f.map(function(p,y){var g=Ga(Ga(Ga({key:"dot-".concat(y),r:3},h),m),{},{index:y,cx:p.x,cy:p.y,dataKey:d,value:p.value,payload:p.payload,points:f});return t.renderDotItem(u,g)}),v={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(ge,ls({className:"recharts-area-dots"},v),j)}},{key:"renderHorizontalRect",value:function(r){var a=this.props,i=a.baseLine,l=a.points,o=a.strokeWidth,c=l[0].x,u=l[l.length-1].x,f=r*Math.abs(c-u),d=fi(l.map(function(h){return h.y||0}));return X(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(fi(i.map(function(h){return h.y||0})),d)),X(d)?T.createElement("rect",{x:c<u?c:c-f,y:0,width:f,height:Math.floor(d+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var a=this.props,i=a.baseLine,l=a.points,o=a.strokeWidth,c=l[0].y,u=l[l.length-1].y,f=r*Math.abs(c-u),d=fi(l.map(function(h){return h.x||0}));return X(i)&&typeof i=="number"?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(fi(i.map(function(h){return h.x||0})),d)),X(d)?T.createElement("rect",{x:0,y:c<u?c:c-f,width:d+(o?parseInt("".concat(o),10):1),height:Math.floor(f)}):null}},{key:"renderClipRect",value:function(r){var a=this.props.layout;return a==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,a,i,l){var o=this.props,c=o.layout,u=o.type,f=o.stroke,d=o.connectNulls,h=o.isRange;o.ref;var m=VP(o,bhe);return T.createElement(ge,{clipPath:i?"url(#clipPath-".concat(l,")"):null},T.createElement(Ni,ls({},ae(m,!0),{points:r,connectNulls:d,type:u,baseLine:a,layout:c,stroke:"none",className:"recharts-area-area"})),f!=="none"&&T.createElement(Ni,ls({},ae(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:r})),f!=="none"&&h&&T.createElement(Ni,ls({},ae(this.props,!1),{className:"recharts-area-curve",layout:c,type:u,connectNulls:d,fill:"none",points:a})))}},{key:"renderAreaWithAnimation",value:function(r,a){var i=this,l=this.props,o=l.points,c=l.baseLine,u=l.isAnimationActive,f=l.animationBegin,d=l.animationDuration,h=l.animationEasing,m=l.animationId,j=this.state,v=j.prevPoints,p=j.prevBaseLine;return T.createElement(cr,{begin:f,duration:d,isActive:u,easing:h,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var g=y.t;if(v){var b=v.length/o.length,x=o.map(function(A,E){var M=Math.floor(E*b);if(v[M]){var $=v[M],k=st($.x,A.x),I=st($.y,A.y);return Ga(Ga({},A),{},{x:k(g),y:I(g)})}return A}),N;if(X(c)&&typeof c=="number"){var w=st(p,c);N=w(g)}else if(oe(c)||tc(c)){var O=st(p,0);N=O(g)}else N=c.map(function(A,E){var M=Math.floor(E*b);if(p[M]){var $=p[M],k=st($.x,A.x),I=st($.y,A.y);return Ga(Ga({},A),{},{x:k(g),y:I(g)})}return A});return i.renderAreaStatically(x,N,r,a)}return T.createElement(ge,null,T.createElement("defs",null,T.createElement("clipPath",{id:"animationClipPath-".concat(a)},i.renderClipRect(g))),T.createElement(ge,{clipPath:"url(#animationClipPath-".concat(a,")")},i.renderAreaStatically(o,c,r,a)))})}},{key:"renderArea",value:function(r,a){var i=this.props,l=i.points,o=i.baseLine,c=i.isAnimationActive,u=this.state,f=u.prevPoints,d=u.prevBaseLine,h=u.totalLength;return c&&l&&l.length&&(!f&&h>0||!ki(f,l)||!ki(d,o))?this.renderAreaWithAnimation(r,a):this.renderAreaStatically(l,o,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,l=a.dot,o=a.points,c=a.className,u=a.top,f=a.left,d=a.xAxis,h=a.yAxis,m=a.width,j=a.height,v=a.isAnimationActive,p=a.id;if(i||!o||!o.length)return null;var y=this.state.isAnimationFinished,g=o.length===1,b=pe("recharts-area",c),x=d&&d.allowDataOverflow,N=h&&h.allowDataOverflow,w=x||N,O=oe(p)?this.id:p,A=(r=ae(l,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},E=A.r,M=E===void 0?3:E,$=A.strokeWidth,k=$===void 0?2:$,I=$k(l)?l:{},_=I.clipDot,C=_===void 0?!0:_,P=M*2+k;return T.createElement(ge,{className:b},x||N?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(O)},T.createElement("rect",{x:x?f:f-m/2,y:N?u:u-j/2,width:x?m:m*2,height:N?j:j*2})),!C&&T.createElement("clipPath",{id:"clipPath-dots-".concat(O)},T.createElement("rect",{x:f-P/2,y:u-P/2,width:m+P,height:j+P}))):null,g?null:this.renderArea(w,O),(l||g)&&this.renderDots(w,C,O),(!v||y)&&Or.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:a.curPoints,prevBaseLine:a.curBaseLine}:r.points!==a.curPoints||r.baseLine!==a.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(S.PureComponent);KP=Ba;Fr(Ba,"displayName","Area");Fr(Ba,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!La.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Fr(Ba,"getBaseValue",function(e,t,n,r){var a=e.layout,i=e.baseValue,l=t.props.baseValue,o=l??i;if(X(o)&&typeof o=="number")return o;var c=a==="horizontal"?r:n,u=c.scale.domain();if(c.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return o==="dataMin"?d:o==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return o==="dataMin"?u[0]:o==="dataMax"?u[1]:u[0]});Fr(Ba,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,a=e.yAxis,i=e.xAxisTicks,l=e.yAxisTicks,o=e.bandSize,c=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,m=t.layout,j=u&&u.length,v=KP.getBaseValue(t,n,r,a),p=m==="horizontal",y=!1,g=d.map(function(x,N){var w;j?w=u[f+N]:(w=et(x,c),Array.isArray(w)?y=!0:w=[v,w]);var O=w[1]==null||j&&et(x,c)==null;return p?{x:yo({axis:r,ticks:i,bandSize:o,entry:x,index:N}),y:O?null:a.scale(w[1]),value:w,payload:x}:{x:O?null:r.scale(w[1]),y:yo({axis:a,ticks:l,bandSize:o,entry:x,index:N}),value:w,payload:x}}),b;return j||y?b=g.map(function(x){var N=Array.isArray(x.value)?x.value[0]:null;return p?{x:x.x,y:N!=null&&x.y!=null?a.scale(N):null}:{x:N!=null?r.scale(N):null,y:x.y}}):b=p?a.scale(v):r.scale(v),Ga({points:g,baseLine:b,layout:m,isRange:y},h)});Fr(Ba,"renderDotItem",function(e,t){var n;if(T.isValidElement(e))n=T.cloneElement(e,t);else if(ce(e))n=e(t);else{var r=pe("recharts-area-dot",typeof e!="boolean"?e.className:""),a=t.key,i=VP(t,jhe);n=T.createElement(Lf,ls({},i,{key:a,className:r}))}return n});function To(e){"@babel/helpers - typeof";return To=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},To(e)}function The(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function khe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZP(r.key),r)}}function Mhe(e,t,n){return t&&khe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Phe(e,t,n){return t=$p(t),$he(e,QP()?Reflect.construct(t,n||[],$p(e).constructor):t.apply(e,n))}function $he(e,t){if(t&&(To(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rhe(e)}function Rhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QP=function(){return!!e})()}function $p(e){return $p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$p(e)}function Dhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y0(e,t)}function y0(e,t){return y0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},y0(e,t)}function XP(e,t,n){return t=ZP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZP(e){var t=Lhe(e,"string");return To(t)=="symbol"?t:t+""}function Lhe(e,t){if(To(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(To(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cy=function(e){function t(){return The(this,t),Phe(this,t,arguments)}return Dhe(t,e),Mhe(t,[{key:"render",value:function(){return null}}])}(S.Component);XP(cy,"displayName","ZAxis");XP(cy,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var zhe=["option","isActive"];function nu(){return nu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nu.apply(this,arguments)}function Ihe(e,t){if(e==null)return{};var n=Bhe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Bhe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Uhe(e){var t=e.option,n=e.isActive,r=Ihe(e,zhe);return typeof t=="string"?S.createElement(bp,nu({option:S.createElement(Lm,nu({type:t},r)),isActive:n,shapeType:"symbols"},r)):S.createElement(bp,nu({option:t,isActive:n,shapeType:"symbols"},r))}function ko(e){"@babel/helpers - typeof";return ko=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ko(e)}function ru(){return ru=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ru.apply(this,arguments)}function mA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mA(Object(n),!0).forEach(function(r){hi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,e$(r.key),r)}}function Hhe(e,t,n){return t&&yA(e.prototype,t),n&&yA(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fhe(e,t,n){return t=Rp(t),Ghe(e,JP()?Reflect.construct(t,n||[],Rp(e).constructor):t.apply(e,n))}function Ghe(e,t){if(t&&(ko(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Khe(e)}function Khe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JP=function(){return!!e})()}function Rp(e){return Rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rp(e)}function Vhe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v0(e,t)}function v0(e,t){return v0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},v0(e,t)}function hi(e,t,n){return t=e$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e$(e){var t=Yhe(e,"string");return ko(t)=="symbol"?t:t+""}function Yhe(e,t){if(ko(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ko(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uy=function(e){function t(){var n;qhe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=Fhe(this,t,[].concat(a)),hi(n,"state",{isAnimationFinished:!1}),hi(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0})}),hi(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1})}),hi(n,"id",Di("recharts-scatter-")),n}return Vhe(t,e),Hhe(t,[{key:"renderSymbolsStatically",value:function(r){var a=this,i=this.props,l=i.shape,o=i.activeShape,c=i.activeIndex,u=ae(this.props,!1);return r.map(function(f,d){var h=c===d,m=h?o:l,j=Gn(Gn({},u),f);return T.createElement(ge,ru({className:"recharts-scatter-symbol",key:"symbol-".concat(f==null?void 0:f.cx,"-").concat(f==null?void 0:f.cy,"-").concat(f==null?void 0:f.size,"-").concat(d)},Ti(a.props,f,d),{role:"img"}),T.createElement(Uhe,ru({option:m,isActive:h,key:"symbol-".concat(d)},j)))})}},{key:"renderSymbolsWithAnimation",value:function(){var r=this,a=this.props,i=a.points,l=a.isAnimationActive,o=a.animationBegin,c=a.animationDuration,u=a.animationEasing,f=a.animationId,d=this.state.prevPoints;return T.createElement(cr,{begin:o,duration:c,isActive:l,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(h){var m=h.t,j=i.map(function(v,p){var y=d&&d[p];if(y){var g=st(y.cx,v.cx),b=st(y.cy,v.cy),x=st(y.size,v.size);return Gn(Gn({},v),{},{cx:g(m),cy:b(m),size:x(m)})}var N=st(0,v.size);return Gn(Gn({},v),{},{size:N(m)})});return T.createElement(ge,null,r.renderSymbolsStatically(j))})}},{key:"renderSymbols",value:function(){var r=this.props,a=r.points,i=r.isAnimationActive,l=this.state.prevPoints;return i&&a&&a.length&&(!l||!ki(l,a))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(a)}},{key:"renderErrorBar",value:function(){var r=this.props.isAnimationActive;if(r&&!this.state.isAnimationFinished)return null;var a=this.props,i=a.points,l=a.xAxis,o=a.yAxis,c=a.children,u=cn(c,oc);return u?u.map(function(f,d){var h=f.props,m=h.direction,j=h.dataKey;return T.cloneElement(f,{key:"".concat(m,"-").concat(j,"-").concat(i[d]),data:i,xAxis:l,yAxis:o,layout:m==="x"?"vertical":"horizontal",dataPointFormatter:function(p,y){return{x:p.cx,y:p.cy,value:m==="x"?+p.node.x:+p.node.y,errorVal:et(p,y)}}})}):null}},{key:"renderLine",value:function(){var r=this.props,a=r.points,i=r.line,l=r.lineType,o=r.lineJointType,c=ae(this.props,!1),u=ae(i,!1),f,d;if(l==="joint")f=a.map(function(b){return{x:b.cx,y:b.cy}});else if(l==="fitting"){var h=_H(a),m=h.xmin,j=h.xmax,v=h.a,p=h.b,y=function(x){return v*x+p};f=[{x:m,y:y(m)},{x:j,y:y(j)}]}var g=Gn(Gn(Gn({},c),{},{fill:"none",stroke:c&&c.fill},u),{},{points:f});return T.isValidElement(i)?d=T.cloneElement(i,g):ce(i)?d=i(g):d=T.createElement(Ni,ru({},g,{type:o})),T.createElement(ge,{className:"recharts-scatter-line",key:"recharts-scatter-line"},d)}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.points,l=r.line,o=r.className,c=r.xAxis,u=r.yAxis,f=r.left,d=r.top,h=r.width,m=r.height,j=r.id,v=r.isAnimationActive;if(a||!i||!i.length)return null;var p=this.state.isAnimationFinished,y=pe("recharts-scatter",o),g=c&&c.allowDataOverflow,b=u&&u.allowDataOverflow,x=g||b,N=oe(j)?this.id:j;return T.createElement(ge,{className:y,clipPath:x?"url(#clipPath-".concat(N,")"):null},g||b?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(N)},T.createElement("rect",{x:g?f:f-h/2,y:b?d:d-m/2,width:g?h:h*2,height:b?m:m*2}))):null,l&&this.renderLine(),this.renderErrorBar(),T.createElement(ge,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!v||p)&&Or.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}}])}(S.PureComponent);hi(uy,"displayName","Scatter");hi(uy,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!La.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});hi(uy,"getComposedData",function(e){var t=e.xAxis,n=e.yAxis,r=e.zAxis,a=e.item,i=e.displayedData,l=e.xAxisTicks,o=e.yAxisTicks,c=e.offset,u=a.props.tooltipType,f=cn(a.props.children,Mf),d=oe(t.dataKey)?a.props.dataKey:t.dataKey,h=oe(n.dataKey)?a.props.dataKey:n.dataKey,m=r&&r.dataKey,j=r?r.range:cy.defaultProps.range,v=j&&j[0],p=t.scale.bandwidth?t.scale.bandwidth():0,y=n.scale.bandwidth?n.scale.bandwidth():0,g=i.map(function(b,x){var N=et(b,d),w=et(b,h),O=!oe(m)&&et(b,m)||"-",A=[{name:oe(t.dataKey)?a.props.name:t.name||t.dataKey,unit:t.unit||"",value:N,payload:b,dataKey:d,type:u},{name:oe(n.dataKey)?a.props.name:n.name||n.dataKey,unit:n.unit||"",value:w,payload:b,dataKey:h,type:u}];O!=="-"&&A.push({name:r.name||r.dataKey,unit:r.unit||"",value:O,payload:b,dataKey:m,type:u});var E=yo({axis:t,ticks:l,bandSize:p,entry:b,index:x,dataKey:d}),M=yo({axis:n,ticks:o,bandSize:y,entry:b,index:x,dataKey:h}),$=O!=="-"?r.scale(O):v,k=Math.sqrt(Math.max($,0)/Math.PI);return Gn(Gn({},b),{},{cx:E,cy:M,x:E-k,y:M-k,xAxis:t,yAxis:n,zAxis:r,width:2*k,height:2*k,size:$,node:{x:N,y:w,z:O},tooltipPayload:A,tooltipPosition:{x:E,y:M},payload:b},f&&f[x]&&f[x].props)});return Gn({points:g},c)});function Mo(e){"@babel/helpers - typeof";return Mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(e)}function Whe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qhe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r$(r.key),r)}}function Xhe(e,t,n){return t&&Qhe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zhe(e,t,n){return t=Dp(t),Jhe(e,t$()?Reflect.construct(t,n||[],Dp(e).constructor):t.apply(e,n))}function Jhe(e,t){if(t&&(Mo(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return epe(e)}function epe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t$=function(){return!!e})()}function Dp(e){return Dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Dp(e)}function tpe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g0(e,t)}function g0(e,t){return g0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},g0(e,t)}function n$(e,t,n){return t=r$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r$(e){var t=npe(e,"string");return Mo(t)=="symbol"?t:t+""}function npe(e,t){if(Mo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function x0(){return x0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x0.apply(this,arguments)}function rpe(e){var t=e.xAxisId,n=tj(),r=nj(),a=MP(t);return a==null?null:S.createElement(cc,x0({},a,{className:pe("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return xa(l,!0)}}))}var Ar=function(e){function t(){return Whe(this,t),Zhe(this,t,arguments)}return tpe(t,e),Xhe(t,[{key:"render",value:function(){return S.createElement(rpe,this.props)}}])}(S.Component);n$(Ar,"displayName","XAxis");n$(Ar,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Po(e){"@babel/helpers - typeof";return Po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Po(e)}function ape(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ipe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s$(r.key),r)}}function spe(e,t,n){return t&&ipe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lpe(e,t,n){return t=Lp(t),ope(e,a$()?Reflect.construct(t,n||[],Lp(e).constructor):t.apply(e,n))}function ope(e,t){if(t&&(Po(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cpe(e)}function cpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a$=function(){return!!e})()}function Lp(e){return Lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lp(e)}function upe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b0(e,t)}function b0(e,t){return b0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},b0(e,t)}function i$(e,t,n){return t=s$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s$(e){var t=fpe(e,"string");return Po(t)=="symbol"?t:t+""}function fpe(e,t){if(Po(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Po(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j0.apply(this,arguments)}var dpe=function(t){var n=t.yAxisId,r=tj(),a=nj(),i=PP(n);return i==null?null:S.createElement(cc,j0({},i,{className:pe("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(o){return xa(o,!0)}}))},Cr=function(e){function t(){return ape(this,t),lpe(this,t,arguments)}return upe(t,e),spe(t,[{key:"render",value:function(){return S.createElement(dpe,this.props)}}])}(S.Component);i$(Cr,"displayName","YAxis");i$(Cr,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function vA(e){return ype(e)||mpe(e)||ppe(e)||hpe()}function hpe(){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 ppe(e,t){if(e){if(typeof e=="string")return S0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S0(e,t)}}function mpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ype(e){if(Array.isArray(e))return S0(e)}function S0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var w0=function(t,n,r,a,i){var l=cn(t,fa),o=cn(t,sy),c=[].concat(vA(l),vA(o)),u=cn(t,oy),f="".concat(a,"Id"),d=a[0],h=n;if(c.length&&(h=c.reduce(function(v,p){if(p.props[f]===r&&Vr(p.props,"extendDomain")&&X(p.props[d])){var y=p.props[d];return[Math.min(v[0],y),Math.max(v[1],y)]}return v},h)),u.length){var m="".concat(d,"1"),j="".concat(d,"2");h=u.reduce(function(v,p){if(p.props[f]===r&&Vr(p.props,"extendDomain")&&X(p.props[m])&&X(p.props[j])){var y=p.props[m],g=p.props[j];return[Math.min(v[0],y,g),Math.max(v[1],y,g)]}return v},h)}return i&&i.length&&(h=i.reduce(function(v,p){return X(p)?[Math.min(v[0],p),Math.max(v[1],p)]:v},h)),h},l$={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function i(c,u,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var m=new a(f,d||c,h),j=n?n+u:u;return c._events[j]?c._events[j].fn?c._events[j]=[c._events[j],m]:c._events[j].push(m):(c._events[j]=m,c._eventsCount++),c}function l(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},o.prototype.listeners=function(u){var f=n?n+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,m=d.length,j=new Array(m);h<m;h++)j[h]=d[h].fn;return j},o.prototype.listenerCount=function(u){var f=n?n+u:u,d=this._events[f];return d?d.fn?1:d.length:0},o.prototype.emit=function(u,f,d,h,m,j){var v=n?n+u:u;if(!this._events[v])return!1;var p=this._events[v],y=arguments.length,g,b;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),y){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,f),!0;case 3:return p.fn.call(p.context,f,d),!0;case 4:return p.fn.call(p.context,f,d,h),!0;case 5:return p.fn.call(p.context,f,d,h,m),!0;case 6:return p.fn.call(p.context,f,d,h,m,j),!0}for(b=1,g=new Array(y-1);b<y;b++)g[b-1]=arguments[b];p.fn.apply(p.context,g)}else{var x=p.length,N;for(b=0;b<x;b++)switch(p[b].once&&this.removeListener(u,p[b].fn,void 0,!0),y){case 1:p[b].fn.call(p[b].context);break;case 2:p[b].fn.call(p[b].context,f);break;case 3:p[b].fn.call(p[b].context,f,d);break;case 4:p[b].fn.call(p[b].context,f,d,h);break;default:if(!g)for(N=1,g=new Array(y-1);N<y;N++)g[N-1]=arguments[N];p[b].fn.apply(p[b].context,g)}}return!0},o.prototype.on=function(u,f,d){return i(this,u,f,d,!1)},o.prototype.once=function(u,f,d){return i(this,u,f,d,!0)},o.prototype.removeListener=function(u,f,d,h){var m=n?n+u:u;if(!this._events[m])return this;if(!f)return l(this,m),this;var j=this._events[m];if(j.fn)j.fn===f&&(!h||j.once)&&(!d||j.context===d)&&l(this,m);else{for(var v=0,p=[],y=j.length;v<y;v++)(j[v].fn!==f||h&&!j[v].once||d&&j[v].context!==d)&&p.push(j[v]);p.length?this._events[m]=p.length===1?p[0]:p:l(this,m)}return this},o.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&l(this,f)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o})(l$);var vpe=l$.exports;const gpe=$e(vpe);var kv=new gpe,Mv="recharts.syncMouseEvents";function ef(e){"@babel/helpers - typeof";return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(e)}function xpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bpe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o$(r.key),r)}}function jpe(e,t,n){return t&&bpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pv(e,t,n){return t=o$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o$(e){var t=Spe(e,"string");return ef(t)=="symbol"?t:t+""}function Spe(e,t){if(ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wpe=function(){function e(){xpe(this,e),Pv(this,"activeIndex",0),Pv(this,"coordinateList",[]),Pv(this,"layout","horizontal")}return jpe(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,i=a===void 0?null:a,l=n.container,o=l===void 0?null:l,c=n.layout,u=c===void 0?null:c,f=n.offset,d=f===void 0?null:f,h=n.mouseHandlerCallback,m=h===void 0?null:h;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=o??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,l=a.y,o=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=i+c+u,h=l+this.offset.top+o/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function Npe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&X(r)&&X(a))return!0}return!1}function Ope(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function c$(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,i=e.endAngle,l=Ye(t,n,r,a),o=Ye(t,n,r,i);return{points:[l,o],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function Ape(e,t,n){var r,a,i,l;if(e==="horizontal")r=t.x,i=r,a=n.top,l=n.top+n.height;else if(e==="vertical")a=t.y,l=a,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,h=Ye(o,c,u,d),m=Ye(o,c,f,d);r=h.x,a=h.y,i=m.x,l=m.y}else return c$(t);return[{x:r,y:a},{x:i,y:l}]}function tf(e){"@babel/helpers - typeof";return tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tf(e)}function gA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gA(Object(n),!0).forEach(function(r){Cpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cpe(e,t,n){return t=Epe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Epe(e){var t=_pe(e,"string");return tf(t)=="symbol"?t:t+""}function _pe(e,t){if(tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tpe(e){var t,n,r=e.element,a=e.tooltipEventType,i=e.isActive,l=e.activeCoordinate,o=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,h=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!i||!l||h!=="ScatterChart"&&a!=="axis")return null;var j,v=Ni;if(h==="ScatterChart")j=l,v=xoe;else if(h==="BarChart")j=Ope(d,l,c,f),v=X1;else if(d==="radial"){var p=c$(l),y=p.cx,g=p.cy,b=p.radius,x=p.startAngle,N=p.endAngle;j={cx:y,cy:g,startAngle:x,endAngle:N,innerRadius:b,outerRadius:b},v=ZM}else j={points:Ape(d,l,c)},v=Ni;var w=bd(bd(bd(bd({stroke:"#ccc",pointerEvents:"none"},c),j),ae(m,!1)),{},{payload:o,payloadIndex:u,className:pe("recharts-tooltip-cursor",m.className)});return S.isValidElement(m)?S.cloneElement(m,w):S.createElement(v,w)}var kpe=["item"],Mpe=["children","className","width","height","style","compact","title","desc"];function $o(e){"@babel/helpers - typeof";return $o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$o(e)}function Nl(){return Nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nl.apply(this,arguments)}function xA(e,t){return Rpe(e)||$pe(e,t)||f$(e,t)||Ppe()}function Ppe(){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 $pe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,l,o=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,a=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw a}}return o}}function Rpe(e){if(Array.isArray(e))return e}function bA(e,t){if(e==null)return{};var n=Dpe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dpe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zpe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d$(r.key),r)}}function Ipe(e,t,n){return t&&zpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bpe(e,t,n){return t=zp(t),Upe(e,u$()?Reflect.construct(t,n||[],zp(e).constructor):t.apply(e,n))}function Upe(e,t){if(t&&($o(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qpe(e)}function qpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(u$=function(){return!!e})()}function zp(e){return zp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zp(e)}function Hpe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N0(e,t)}function N0(e,t){return N0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},N0(e,t)}function Ro(e){return Kpe(e)||Gpe(e)||f$(e)||Fpe()}function Fpe(){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 f$(e,t){if(e){if(typeof e=="string")return O0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O0(e,t)}}function Gpe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kpe(e){if(Array.isArray(e))return O0(e)}function O0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jA(Object(n),!0).forEach(function(r){ue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jA(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ue(e,t,n){return t=d$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d$(e){var t=Vpe(e,"string");return $o(t)=="symbol"?t:t+""}function Vpe(e,t){if($o(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($o(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ype={xAxis:["bottom","top"],yAxis:["left","right"]},Wpe={width:"100%",height:"100%"},h$={x:0,y:0};function jd(e){return e}var Qpe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Xpe=function(t,n,r,a){var i=n.find(function(f){return f&&f.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var l=i.coordinate,o=a.radius;return H(H(H({},a),Ye(a.cx,a.cy,o,l)),{},{angle:l,radius:o})}var c=i.coordinate,u=a.angle;return H(H(H({},a),Ye(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return h$},fy=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,l=(r??[]).reduce(function(o,c){var u=c.props.data;return u&&u.length?[].concat(Ro(o),Ro(u)):o},[]);return l.length>0?l:t&&t.length&&X(a)&&X(i)?t.slice(a,i+1):[]};function p$(e){return e==="number"?[0,"auto"]:void 0}var A0=function(t,n,r,a){var i=t.graphicalItems,l=t.tooltipAxis,o=fy(n,t);return r<0||!i||!i.length||r>=o.length?null:i.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(l.dataKey&&!l.allowDuplicatedCategory){var m=d===void 0?o:d;h=Ph(m,l.dataKey,a)}else h=d&&d[r]||o[r];return h?[].concat(Ro(c),[KM(u,h)]):c},[])},SA=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},l=Qpe(i,r),o=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=Iae(l,o,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,h=A0(t,n,f,d),m=Xpe(r,o,f,i);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:m}}return null},Zpe=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,l=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,m=BM(f,i);return r.reduce(function(j,v){var p,y=v.type.defaultProps!==void 0?H(H({},v.type.defaultProps),v.props):v.props,g=y.type,b=y.dataKey,x=y.allowDataOverflow,N=y.allowDuplicatedCategory,w=y.scale,O=y.ticks,A=y.includeHidden,E=y[l];if(j[E])return j;var M=fy(t.data,{graphicalItems:a.filter(function(Z){var ne,ie=l in Z.props?Z.props[l]:(ne=Z.type.defaultProps)===null||ne===void 0?void 0:ne[l];return ie===E}),dataStartIndex:c,dataEndIndex:u}),$=M.length,k,I,_;Npe(y.domain,x,g)&&(k=Lx(y.domain,null,x),m&&(g==="number"||w!=="auto")&&(_=Xc(M,b,"category")));var C=p$(g);if(!k||k.length===0){var P,z=(P=y.domain)!==null&&P!==void 0?P:C;if(b){if(k=Xc(M,b,g),g==="category"&&m){var B=EH(k);N&&B?(I=k,k=Sp(0,$)):N||(k=HN(z,k,v).reduce(function(Z,ne){return Z.indexOf(ne)>=0?Z:[].concat(Ro(Z),[ne])},[]))}else if(g==="category")N?k=k.filter(function(Z){return Z!==""&&!oe(Z)}):k=HN(z,k,v).reduce(function(Z,ne){return Z.indexOf(ne)>=0||ne===""||oe(ne)?Z:[].concat(Ro(Z),[ne])},[]);else if(g==="number"){var K=Fae(M,a.filter(function(Z){var ne,ie,je=l in Z.props?Z.props[l]:(ne=Z.type.defaultProps)===null||ne===void 0?void 0:ne[l],ye="hide"in Z.props?Z.props.hide:(ie=Z.type.defaultProps)===null||ie===void 0?void 0:ie.hide;return je===E&&(A||!ye)}),b,i,f);K&&(k=K)}m&&(g==="number"||w!=="auto")&&(_=Xc(M,b,"category"))}else m?k=Sp(0,$):o&&o[E]&&o[E].hasStack&&g==="number"?k=h==="expand"?[0,1]:GM(o[E].stackGroups,c,u):k=IM(M,a.filter(function(Z){var ne=l in Z.props?Z.props[l]:Z.type.defaultProps[l],ie="hide"in Z.props?Z.props.hide:Z.type.defaultProps.hide;return ne===E&&(A||!ie)}),g,f,!0);if(g==="number")k=w0(d,k,E,i,O),z&&(k=Lx(z,k,x));else if(g==="category"&&z){var Y=z,Q=k.every(function(Z){return Y.indexOf(Z)>=0});Q&&(k=Y)}}return H(H({},j),{},ue({},E,H(H({},y),{},{axisType:i,domain:k,categoricalDomain:_,duplicateDomain:I,originalDomain:(p=y.domain)!==null&&p!==void 0?p:C,isCategorical:m,layout:f})))},{})},Jpe=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,l=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=fy(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),m=h.length,j=BM(f,i),v=-1;return r.reduce(function(p,y){var g=y.type.defaultProps!==void 0?H(H({},y.type.defaultProps),y.props):y.props,b=g[l],x=p$("number");if(!p[b]){v++;var N;return j?N=Sp(0,m):o&&o[b]&&o[b].hasStack?(N=GM(o[b].stackGroups,c,u),N=w0(d,N,b,i)):(N=Lx(x,IM(h,r.filter(function(w){var O,A,E=l in w.props?w.props[l]:(O=w.type.defaultProps)===null||O===void 0?void 0:O[l],M="hide"in w.props?w.props.hide:(A=w.type.defaultProps)===null||A===void 0?void 0:A.hide;return E===b&&!M}),"number",f),a.defaultProps.allowDataOverflow),N=w0(d,N,b,i)),H(H({},p),{},ue({},b,H(H({axisType:i},a.defaultProps),{},{hide:!0,orientation:Rn(Ype,"".concat(i,".").concat(v%2),null),domain:N,originalDomain:x,isCategorical:j,layout:f})))}return p},{})},eme=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,l=n.graphicalItems,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(a,"Id"),h=cn(f,i),m={};return h&&h.length?m=Zpe(t,{axes:h,graphicalItems:l,axisType:a,axisIdKey:d,stackGroups:o,dataStartIndex:c,dataEndIndex:u}):l&&l.length&&(m=Jpe(t,{Axis:i,graphicalItems:l,axisType:a,axisIdKey:d,stackGroups:o,dataStartIndex:c,dataEndIndex:u})),m},tme=function(t){var n=Ja(t),r=xa(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:N1(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:op(n,r)}},wA=function(t){var n=t.children,r=t.defaultShowTooltip,a=On(n,So),i=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(l=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},nme=function(t){return!t||!t.length?!1:t.some(function(n){var r=wa(n&&n.type);return r&&r.indexOf("Bar")>=0})},NA=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},rme=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,l=i===void 0?{}:i,o=t.yAxisMap,c=o===void 0?{}:o,u=r.width,f=r.height,d=r.children,h=r.margin||{},m=On(d,So),j=On(d,tr),v=Object.keys(c).reduce(function(N,w){var O=c[w],A=O.orientation;return!O.mirror&&!O.hide?H(H({},N),{},ue({},A,N[A]+O.width)):N},{left:h.left||0,right:h.right||0}),p=Object.keys(l).reduce(function(N,w){var O=l[w],A=O.orientation;return!O.mirror&&!O.hide?H(H({},N),{},ue({},A,Rn(N,"".concat(A))+O.height)):N},{top:h.top||0,bottom:h.bottom||0}),y=H(H({},p),v),g=y.bottom;m&&(y.bottom+=m.props.height||So.defaultProps.height),j&&n&&(y=qae(y,a,r,n));var b=u-y.left-y.right,x=f-y.top-y.bottom;return H(H({brushBottom:g},y),{},{width:Math.max(b,0),height:Math.max(x,0)})},ame=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},zf=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,l=t.validateTooltipEventTypes,o=l===void 0?["axis"]:l,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(y,g){var b=g.graphicalItems,x=g.stackGroups,N=g.offset,w=g.updateId,O=g.dataStartIndex,A=g.dataEndIndex,E=y.barSize,M=y.layout,$=y.barGap,k=y.barCategoryGap,I=y.maxBarSize,_=NA(M),C=_.numericAxisName,P=_.cateAxisName,z=nme(b),B=[];return b.forEach(function(K,Y){var Q=fy(y.data,{graphicalItems:[K],dataStartIndex:O,dataEndIndex:A}),Z=K.type.defaultProps!==void 0?H(H({},K.type.defaultProps),K.props):K.props,ne=Z.dataKey,ie=Z.maxBarSize,je=Z["".concat(C,"Id")],ye=Z["".concat(P,"Id")],ft={},_e=c.reduce(function(qi,Hi){var dy=g["".concat(Hi.axisType,"Map")],cj=Z["".concat(Hi.axisType,"Id")];dy&&dy[cj]||Hi.axisType==="zAxis"||Rs();var uj=dy[cj];return H(H({},qi),{},ue(ue({},Hi.axisType,uj),"".concat(Hi.axisType,"Ticks"),xa(uj)))},ft),J=_e[P],se=_e["".concat(P,"Ticks")],W=x&&x[je]&&x[je].hasStack&&Jae(K,x[je].stackGroups),G=wa(K.type).indexOf("Bar")>=0,Re=op(J,se),be=[],dt=z&&Bae({barSize:E,stackGroups:x,totalSize:ame(_e,P)});if(G){var vt,jt,qa=oe(ie)?I:ie,Ys=(vt=(jt=op(J,se,!0))!==null&&jt!==void 0?jt:qa)!==null&&vt!==void 0?vt:0;be=Uae({barGap:$,barCategoryGap:k,bandSize:Ys!==Re?Ys:Re,sizeList:dt[ye],maxBarSize:qa}),Ys!==Re&&(be=be.map(function(qi){return H(H({},qi),{},{position:H(H({},qi.position),{},{offset:qi.position.offset-Ys/2})})}))}var If=K&&K.type&&K.type.getComposedData;If&&B.push({props:H(H({},If(H(H({},_e),{},{displayedData:Q,props:y,dataKey:ne,item:K,bandSize:Re,barPosition:be,offset:N,stackedData:W,layout:M,dataStartIndex:O,dataEndIndex:A}))),{},ue(ue(ue({key:K.key||"item-".concat(Y)},C,_e[C]),P,_e[P]),"animationId",w)),childIndex:UH(K,y.children),item:K})}),B},m=function(y,g){var b=y.props,x=y.dataStartIndex,N=y.dataEndIndex,w=y.updateId;if(!Lw({props:b}))return null;var O=b.children,A=b.layout,E=b.stackOffset,M=b.data,$=b.reverseStackOrder,k=NA(A),I=k.numericAxisName,_=k.cateAxisName,C=cn(O,r),P=Xae(M,C,"".concat(I,"Id"),"".concat(_,"Id"),E,$),z=c.reduce(function(Z,ne){var ie="".concat(ne.axisType,"Map");return H(H({},Z),{},ue({},ie,eme(b,H(H({},ne),{},{graphicalItems:C,stackGroups:ne.axisType===I&&P,dataStartIndex:x,dataEndIndex:N}))))},{}),B=rme(H(H({},z),{},{props:b,graphicalItems:C}),g==null?void 0:g.legendBBox);Object.keys(z).forEach(function(Z){z[Z]=f(b,z[Z],B,Z.replace("Map",""),n)});var K=z["".concat(_,"Map")],Y=tme(K),Q=h(b,H(H({},z),{},{dataStartIndex:x,dataEndIndex:N,updateId:w,graphicalItems:C,stackGroups:P,offset:B}));return H(H({formattedGraphicalItems:Q,graphicalItems:C,offset:B,stackGroups:P},Y),z)},j=function(p){function y(g){var b,x,N;return Lpe(this,y),N=Bpe(this,y,[g]),ue(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ue(N,"accessibilityManager",new wpe),ue(N,"handleLegendBBoxUpdate",function(w){if(w){var O=N.state,A=O.dataStartIndex,E=O.dataEndIndex,M=O.updateId;N.setState(H({legendBBox:w},m({props:N.props,dataStartIndex:A,dataEndIndex:E,updateId:M},H(H({},N.state),{},{legendBBox:w}))))}}),ue(N,"handleReceiveSyncEvent",function(w,O,A){if(N.props.syncId===w){if(A===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(O)}}),ue(N,"handleBrushChange",function(w){var O=w.startIndex,A=w.endIndex;if(O!==N.state.dataStartIndex||A!==N.state.dataEndIndex){var E=N.state.updateId;N.setState(function(){return H({dataStartIndex:O,dataEndIndex:A},m({props:N.props,dataStartIndex:O,dataEndIndex:A,updateId:E},N.state))}),N.triggerSyncEvent({dataStartIndex:O,dataEndIndex:A})}}),ue(N,"handleMouseEnter",function(w){var O=N.getMouseInfo(w);if(O){var A=H(H({},O),{},{isTooltipActive:!0});N.setState(A),N.triggerSyncEvent(A);var E=N.props.onMouseEnter;ce(E)&&E(A,w)}}),ue(N,"triggeredAfterMouseMove",function(w){var O=N.getMouseInfo(w),A=O?H(H({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(A),N.triggerSyncEvent(A);var E=N.props.onMouseMove;ce(E)&&E(A,w)}),ue(N,"handleItemMouseEnter",function(w){N.setState(function(){return{isTooltipActive:!0,activeItem:w,activePayload:w.tooltipPayload,activeCoordinate:w.tooltipPosition||{x:w.cx,y:w.cy}}})}),ue(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),ue(N,"handleMouseMove",function(w){w.persist(),N.throttleTriggeredAfterMouseMove(w)}),ue(N,"handleMouseLeave",function(w){N.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};N.setState(O),N.triggerSyncEvent(O);var A=N.props.onMouseLeave;ce(A)&&A(O,w)}),ue(N,"handleOuterEvent",function(w){var O=BH(w),A=Rn(N.props,"".concat(O));if(O&&ce(A)){var E,M;/.*touch.*/i.test(O)?M=N.getMouseInfo(w.changedTouches[0]):M=N.getMouseInfo(w),A((E=M)!==null&&E!==void 0?E:{},w)}}),ue(N,"handleClick",function(w){var O=N.getMouseInfo(w);if(O){var A=H(H({},O),{},{isTooltipActive:!0});N.setState(A),N.triggerSyncEvent(A);var E=N.props.onClick;ce(E)&&E(A,w)}}),ue(N,"handleMouseDown",function(w){var O=N.props.onMouseDown;if(ce(O)){var A=N.getMouseInfo(w);O(A,w)}}),ue(N,"handleMouseUp",function(w){var O=N.props.onMouseUp;if(ce(O)){var A=N.getMouseInfo(w);O(A,w)}}),ue(N,"handleTouchMove",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(w.changedTouches[0])}),ue(N,"handleTouchStart",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&N.handleMouseDown(w.changedTouches[0])}),ue(N,"handleTouchEnd",function(w){w.changedTouches!=null&&w.changedTouches.length>0&&N.handleMouseUp(w.changedTouches[0])}),ue(N,"handleDoubleClick",function(w){var O=N.props.onDoubleClick;if(ce(O)){var A=N.getMouseInfo(w);O(A,w)}}),ue(N,"handleContextMenu",function(w){var O=N.props.onContextMenu;if(ce(O)){var A=N.getMouseInfo(w);O(A,w)}}),ue(N,"triggerSyncEvent",function(w){N.props.syncId!==void 0&&kv.emit(Mv,N.props.syncId,w,N.eventEmitterSymbol)}),ue(N,"applySyncEvent",function(w){var O=N.props,A=O.layout,E=O.syncMethod,M=N.state.updateId,$=w.dataStartIndex,k=w.dataEndIndex;if(w.dataStartIndex!==void 0||w.dataEndIndex!==void 0)N.setState(H({dataStartIndex:$,dataEndIndex:k},m({props:N.props,dataStartIndex:$,dataEndIndex:k,updateId:M},N.state)));else if(w.activeTooltipIndex!==void 0){var I=w.chartX,_=w.chartY,C=w.activeTooltipIndex,P=N.state,z=P.offset,B=P.tooltipTicks;if(!z)return;if(typeof E=="function")C=E(B,w);else if(E==="value"){C=-1;for(var K=0;K<B.length;K++)if(B[K].value===w.activeLabel){C=K;break}}var Y=H(H({},z),{},{x:z.left,y:z.top}),Q=Math.min(I,Y.x+Y.width),Z=Math.min(_,Y.y+Y.height),ne=B[C]&&B[C].value,ie=A0(N.state,N.props.data,C),je=B[C]?{x:A==="horizontal"?B[C].coordinate:Q,y:A==="horizontal"?Z:B[C].coordinate}:h$;N.setState(H(H({},w),{},{activeLabel:ne,activeCoordinate:je,activePayload:ie,activeTooltipIndex:C}))}else N.setState(w)}),ue(N,"renderCursor",function(w){var O,A=N.state,E=A.isTooltipActive,M=A.activeCoordinate,$=A.activePayload,k=A.offset,I=A.activeTooltipIndex,_=A.tooltipAxisBandSize,C=N.getTooltipEventType(),P=(O=w.props.active)!==null&&O!==void 0?O:E,z=N.props.layout,B=w.key||"_recharts-cursor";return T.createElement(Tpe,{key:B,activeCoordinate:M,activePayload:$,activeTooltipIndex:I,chartName:n,element:w,isActive:P,layout:z,offset:k,tooltipAxisBandSize:_,tooltipEventType:C})}),ue(N,"renderPolarAxis",function(w,O,A){var E=Rn(w,"type.axisType"),M=Rn(N.state,"".concat(E,"Map")),$=w.type.defaultProps,k=$!==void 0?H(H({},$),w.props):w.props,I=M&&M[k["".concat(E,"Id")]];return S.cloneElement(w,H(H({},I),{},{className:pe(E,I.className),key:w.key||"".concat(O,"-").concat(A),ticks:xa(I,!0)}))}),ue(N,"renderPolarGrid",function(w){var O=w.props,A=O.radialLines,E=O.polarAngles,M=O.polarRadius,$=N.state,k=$.radiusAxisMap,I=$.angleAxisMap,_=Ja(k),C=Ja(I),P=C.cx,z=C.cy,B=C.innerRadius,K=C.outerRadius;return S.cloneElement(w,{polarAngles:Array.isArray(E)?E:xa(C,!0).map(function(Y){return Y.coordinate}),polarRadius:Array.isArray(M)?M:xa(_,!0).map(function(Y){return Y.coordinate}),cx:P,cy:z,innerRadius:B,outerRadius:K,key:w.key||"polar-grid",radialLines:A})}),ue(N,"renderLegend",function(){var w=N.state.formattedGraphicalItems,O=N.props,A=O.children,E=O.width,M=O.height,$=N.props.margin||{},k=E-($.left||0)-($.right||0),I=LM({children:A,formattedGraphicalItems:w,legendWidth:k,legendContent:u});if(!I)return null;var _=I.item,C=bA(I,kpe);return S.cloneElement(_,H(H({},C),{},{chartWidth:E,chartHeight:M,margin:$,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),ue(N,"renderTooltip",function(){var w,O=N.props,A=O.children,E=O.accessibilityLayer,M=On(A,tn);if(!M)return null;var $=N.state,k=$.isTooltipActive,I=$.activeCoordinate,_=$.activePayload,C=$.activeLabel,P=$.offset,z=(w=M.props.active)!==null&&w!==void 0?w:k;return S.cloneElement(M,{viewBox:H(H({},P),{},{x:P.left,y:P.top}),active:z,label:C,payload:z?_:[],coordinate:I,accessibilityLayer:E})}),ue(N,"renderBrush",function(w){var O=N.props,A=O.margin,E=O.data,M=N.state,$=M.offset,k=M.dataStartIndex,I=M.dataEndIndex,_=M.updateId;return S.cloneElement(w,{key:w.key||"_recharts-brush",onChange:yd(N.handleBrushChange,w.props.onChange),data:E,x:X(w.props.x)?w.props.x:$.left,y:X(w.props.y)?w.props.y:$.top+$.height+$.brushBottom-(A.bottom||0),width:X(w.props.width)?w.props.width:$.width,startIndex:k,endIndex:I,updateId:"brush-".concat(_)})}),ue(N,"renderReferenceElement",function(w,O,A){if(!w)return null;var E=N,M=E.clipPathId,$=N.state,k=$.xAxisMap,I=$.yAxisMap,_=$.offset,C=w.type.defaultProps||{},P=w.props,z=P.xAxisId,B=z===void 0?C.xAxisId:z,K=P.yAxisId,Y=K===void 0?C.yAxisId:K;return S.cloneElement(w,{key:w.key||"".concat(O,"-").concat(A),xAxis:k[B],yAxis:I[Y],viewBox:{x:_.left,y:_.top,width:_.width,height:_.height},clipPathId:M})}),ue(N,"renderActivePoints",function(w){var O=w.item,A=w.activePoint,E=w.basePoint,M=w.childIndex,$=w.isRange,k=[],I=O.props.key,_=O.item.type.defaultProps!==void 0?H(H({},O.item.type.defaultProps),O.item.props):O.item.props,C=_.activeDot,P=_.dataKey,z=H(H({index:M,dataKey:P,cx:A.x,cy:A.y,r:4,fill:Q1(O.item),strokeWidth:2,stroke:"#fff",payload:A.payload,value:A.value},ae(C,!1)),$h(C));return k.push(y.renderActiveDot(C,z,"".concat(I,"-activePoint-").concat(M))),E?k.push(y.renderActiveDot(C,H(H({},z),{},{cx:E.x,cy:E.y}),"".concat(I,"-basePoint-").concat(M))):$&&k.push(null),k}),ue(N,"renderGraphicChild",function(w,O,A){var E=N.filterFormatItem(w,O,A);if(!E)return null;var M=N.getTooltipEventType(),$=N.state,k=$.isTooltipActive,I=$.tooltipAxis,_=$.activeTooltipIndex,C=$.activeLabel,P=N.props.children,z=On(P,tn),B=E.props,K=B.points,Y=B.isRange,Q=B.baseLine,Z=E.item.type.defaultProps!==void 0?H(H({},E.item.type.defaultProps),E.item.props):E.item.props,ne=Z.activeDot,ie=Z.hide,je=Z.activeBar,ye=Z.activeShape,ft=!!(!ie&&k&&z&&(ne||je||ye)),_e={};M!=="axis"&&z&&z.props.trigger==="click"?_e={onClick:yd(N.handleItemMouseEnter,w.props.onClick)}:M!=="axis"&&(_e={onMouseLeave:yd(N.handleItemMouseLeave,w.props.onMouseLeave),onMouseEnter:yd(N.handleItemMouseEnter,w.props.onMouseEnter)});var J=S.cloneElement(w,H(H({},E.props),_e));function se(Hi){return typeof I.dataKey=="function"?I.dataKey(Hi.payload):null}if(ft)if(_>=0){var W,G;if(I.dataKey&&!I.allowDuplicatedCategory){var Re=typeof I.dataKey=="function"?se:"payload.".concat(I.dataKey.toString());W=Ph(K,Re,C),G=Y&&Q&&Ph(Q,Re,C)}else W=K==null?void 0:K[_],G=Y&&Q&&Q[_];if(ye||je){var be=w.props.activeIndex!==void 0?w.props.activeIndex:_;return[S.cloneElement(w,H(H(H({},E.props),_e),{},{activeIndex:be})),null,null]}if(!oe(W))return[J].concat(Ro(N.renderActivePoints({item:E,activePoint:W,basePoint:G,childIndex:_,isRange:Y})))}else{var dt,vt=(dt=N.getItemByXY(N.state.activeCoordinate))!==null&&dt!==void 0?dt:{graphicalItem:J},jt=vt.graphicalItem,qa=jt.item,Ys=qa===void 0?w:qa,If=jt.childIndex,qi=H(H(H({},E.props),_e),{},{activeIndex:If});return[S.cloneElement(Ys,qi),null,null]}return Y?[J,null,null]:[J,null]}),ue(N,"renderCustomized",function(w,O,A){return S.cloneElement(w,H(H({key:"recharts-customized-".concat(A)},N.props),N.state))}),ue(N,"renderMap",{CartesianGrid:{handler:jd,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:jd},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:jd},YAxis:{handler:jd},Brush:{handler:N.renderBrush,once:!0},Bar:{handler:N.renderGraphicChild},Line:{handler:N.renderGraphicChild},Area:{handler:N.renderGraphicChild},Radar:{handler:N.renderGraphicChild},RadialBar:{handler:N.renderGraphicChild},Scatter:{handler:N.renderGraphicChild},Pie:{handler:N.renderGraphicChild},Funnel:{handler:N.renderGraphicChild},Tooltip:{handler:N.renderCursor,once:!0},PolarGrid:{handler:N.renderPolarGrid,once:!0},PolarAngleAxis:{handler:N.renderPolarAxis},PolarRadiusAxis:{handler:N.renderPolarAxis},Customized:{handler:N.renderCustomized}}),N.clipPathId="".concat((b=g.id)!==null&&b!==void 0?b:Di("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=L3(N.triggeredAfterMouseMove,(x=g.throttleDelay)!==null&&x!==void 0?x:1e3/60),N.state={},N}return Hpe(y,p),Ipe(y,[{key:"componentDidMount",value:function(){var b,x;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(x=this.props.margin.top)!==null&&x!==void 0?x:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,x=b.children,N=b.data,w=b.height,O=b.layout,A=On(x,tn);if(A){var E=A.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,$=A0(this.state,N,E,M),k=this.state.tooltipTicks[E].coordinate,I=(this.state.offset.top+w)/2,_=O==="horizontal",C=_?{x:k,y:I}:{y:k,x:I},P=this.state.formattedGraphicalItems.find(function(B){var K=B.item;return K.type.name==="Scatter"});P&&(C=H(H({},C),P.props.points[E].tooltipPosition),$=P.props.points[E].tooltipPayload);var z={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:M,activePayload:$,activeCoordinate:C};this.setState(z),this.renderCursor(A),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,x){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==x.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var N,w;this.accessibilityManager.setDetails({offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0}})}return null}},{key:"componentDidUpdate",value:function(b){Zg([On(b.children,tn)],[On(this.props.children,tn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=On(this.props.children,tn);if(b&&typeof b.props.shared=="boolean"){var x=b.props.shared?"axis":"item";return o.indexOf(x)>=0?x:i}return i}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var x=this.container,N=x.getBoundingClientRect(),w=hee(N),O={chartX:Math.round(b.pageX-w.left),chartY:Math.round(b.pageY-w.top)},A=N.width/x.offsetWidth||1,E=this.inRange(O.chartX,O.chartY,A);if(!E)return null;var M=this.state,$=M.xAxisMap,k=M.yAxisMap,I=this.getTooltipEventType(),_=SA(this.state,this.props.data,this.props.layout,E);if(I!=="axis"&&$&&k){var C=Ja($).scale,P=Ja(k).scale,z=C&&C.invert?C.invert(O.chartX):null,B=P&&P.invert?P.invert(O.chartY):null;return H(H({},O),{},{xValue:z,yValue:B},_)}return _?H(H({},O),_):null}},{key:"inRange",value:function(b,x){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,w=this.props.layout,O=b/N,A=x/N;if(w==="horizontal"||w==="vertical"){var E=this.state.offset,M=O>=E.left&&O<=E.left+E.width&&A>=E.top&&A<=E.top+E.height;return M?{x:O,y:A}:null}var $=this.state,k=$.angleAxisMap,I=$.radiusAxisMap;if(k&&I){var _=Ja(k);return KN({x:O,y:A},_)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,x=this.getTooltipEventType(),N=On(b,tn),w={};N&&x==="axis"&&(N.props.trigger==="click"?w={onClick:this.handleClick}:w={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var O=$h(this.props,this.handleOuterEvent);return H(H({},O),w)}},{key:"addListener",value:function(){kv.on(Mv,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){kv.removeListener(Mv,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,x,N){for(var w=this.state.formattedGraphicalItems,O=0,A=w.length;O<A;O++){var E=w[O];if(E.item===b||E.props.key===b.key||x===wa(E.item.type)&&N===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var b=this.clipPathId,x=this.state.offset,N=x.left,w=x.top,O=x.height,A=x.width;return T.createElement("defs",null,T.createElement("clipPath",{id:b},T.createElement("rect",{x:N,y:w,height:O,width:A})))}},{key:"getXScales",value:function(){var b=this.state.xAxisMap;return b?Object.entries(b).reduce(function(x,N){var w=xA(N,2),O=w[0],A=w[1];return H(H({},x),{},ue({},O,A.scale))},{}):null}},{key:"getYScales",value:function(){var b=this.state.yAxisMap;return b?Object.entries(b).reduce(function(x,N){var w=xA(N,2),O=w[0],A=w[1];return H(H({},x),{},ue({},O,A.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(b){var x;return(x=this.state.xAxisMap)===null||x===void 0||(x=x[b])===null||x===void 0?void 0:x.scale}},{key:"getYScaleByAxisId",value:function(b){var x;return(x=this.state.yAxisMap)===null||x===void 0||(x=x[b])===null||x===void 0?void 0:x.scale}},{key:"getItemByXY",value:function(b){var x=this.state,N=x.formattedGraphicalItems,w=x.activeItem;if(N&&N.length)for(var O=0,A=N.length;O<A;O++){var E=N[O],M=E.props,$=E.item,k=$.type.defaultProps!==void 0?H(H({},$.type.defaultProps),$.props):$.props,I=wa($.type);if(I==="Bar"){var _=(M.data||[]).find(function(B){return Jle(b,B)});if(_)return{graphicalItem:E,payload:_}}else if(I==="RadialBar"){var C=(M.data||[]).find(function(B){return KN(b,B)});if(C)return{graphicalItem:E,payload:C}}else if(ty(E,w)||ny(E,w)||Wu(E,w)){var P=Uce({graphicalItem:E,activeTooltipItem:w,itemData:k.data}),z=k.activeIndex===void 0?P:k.activeIndex;return{graphicalItem:H(H({},E),{},{childIndex:z}),payload:Wu(E,w)?k.data[P]:E.props.data[P]}}}return null}},{key:"render",value:function(){var b=this;if(!Lw(this))return null;var x=this.props,N=x.children,w=x.className,O=x.width,A=x.height,E=x.style,M=x.compact,$=x.title,k=x.desc,I=bA(x,Mpe),_=ae(I,!1);if(M)return T.createElement(XO,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(ex,Nl({},_,{width:O,height:A,title:$,desc:k}),this.renderClipPath(),Iw(N,this.renderMap)));if(this.props.accessibilityLayer){var C,P;_.tabIndex=(C=this.props.tabIndex)!==null&&C!==void 0?C:0,_.role=(P=this.props.role)!==null&&P!==void 0?P:"application",_.onKeyDown=function(B){b.accessibilityManager.keyboardEvent(B)},_.onFocus=function(){b.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return T.createElement(XO,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",Nl({className:pe("recharts-wrapper",w),style:H({position:"relative",cursor:"default",width:O,height:A},E)},z,{ref:function(K){b.container=K}}),T.createElement(ex,Nl({},_,{width:O,height:A,title:$,desc:k,style:Wpe}),this.renderClipPath(),Iw(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(S.Component);ue(j,"displayName",n),ue(j,"defaultProps",H({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),ue(j,"getDerivedStateFromProps",function(p,y){var g=p.dataKey,b=p.data,x=p.children,N=p.width,w=p.height,O=p.layout,A=p.stackOffset,E=p.margin,M=y.dataStartIndex,$=y.dataEndIndex;if(y.updateId===void 0){var k=wA(p);return H(H(H({},k),{},{updateId:0},m(H(H({props:p},k),{},{updateId:0}),y)),{},{prevDataKey:g,prevData:b,prevWidth:N,prevHeight:w,prevLayout:O,prevStackOffset:A,prevMargin:E,prevChildren:x})}if(g!==y.prevDataKey||b!==y.prevData||N!==y.prevWidth||w!==y.prevHeight||O!==y.prevLayout||A!==y.prevStackOffset||!Ml(E,y.prevMargin)){var I=wA(p),_={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},C=H(H({},SA(y,b,O)),{},{updateId:y.updateId+1}),P=H(H(H({},I),_),C);return H(H(H({},P),m(H({props:p},P),y)),{},{prevDataKey:g,prevData:b,prevWidth:N,prevHeight:w,prevLayout:O,prevStackOffset:A,prevMargin:E,prevChildren:x})}if(!Zg(x,y.prevChildren)){var z,B,K,Y,Q=On(x,So),Z=Q&&(z=(B=Q.props)===null||B===void 0?void 0:B.startIndex)!==null&&z!==void 0?z:M,ne=Q&&(K=(Y=Q.props)===null||Y===void 0?void 0:Y.endIndex)!==null&&K!==void 0?K:$,ie=Z!==M||ne!==$,je=!oe(b),ye=je&&!ie?y.updateId:y.updateId+1;return H(H({updateId:ye},m(H(H({props:p},y),{},{updateId:ye,dataStartIndex:Z,dataEndIndex:ne}),y)),{},{prevChildren:x,dataStartIndex:Z,dataEndIndex:ne})}return null}),ue(j,"renderActiveDot",function(p,y,g){var b;return S.isValidElement(p)?b=S.cloneElement(p,y):ce(p)?b=p(y):b=T.createElement(Lf,y),T.createElement(ge,{className:"recharts-active-dot",key:g},b)});var v=S.forwardRef(function(y,g){return T.createElement(j,Nl({},y,{ref:g}))});return v.displayName=j.displayName,v},ime=zf({chartName:"LineChart",GraphicalChild:Mi,axisComponents:[{axisType:"xAxis",AxisComp:Ar},{axisType:"yAxis",AxisComp:Cr}],formatAxisMap:ay}),sme=zf({chartName:"BarChart",GraphicalChild:Bi,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Ar},{axisType:"yAxis",AxisComp:Cr}],formatAxisMap:ay}),lme=zf({chartName:"PieChart",GraphicalChild:Ia,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:ey},{axisType:"radiusAxis",AxisComp:Zm}],formatAxisMap:cie,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),ome=zf({chartName:"AreaChart",GraphicalChild:Ba,axisComponents:[{axisType:"xAxis",AxisComp:Ar},{axisType:"yAxis",AxisComp:Cr}],formatAxisMap:ay}),OA=zf({chartName:"ComposedChart",GraphicalChild:[Mi,Ba,Bi,uy],axisComponents:[{axisType:"xAxis",AxisComp:Ar},{axisType:"yAxis",AxisComp:Cr},{axisType:"zAxis",AxisComp:cy}],formatAxisMap:ay});const Rr=["#00a0c8","#3ddc97","#f59e0b","#ef4444","#8b5cf6","#06b6d4","#ec4899"],nl={fontSize:11,fill:"#94a3b8"},Sd={background:"#0f172a",border:"1px solid #26304a",borderRadius:8,fontSize:12,color:"#e2e8f0"};function cme(e){const t=e.labels||[],n=e.series||[];return t.map((r,a)=>{const i={name:r};return n.forEach(l=>{var o;i[l.name]=((o=l.data)==null?void 0:o[a])??0}),i})}function Sr({type:e="BAR",data:t,height:n=240}){const r=t||{},a=r.series||[],i=cme(r);if(!i.length)return s.jsx("div",{className:"flex items-center justify-center text-slate-500 text-sm",style:{height:n},children:"데이터 없음"});const l=(e||"BAR").toUpperCase();if(l==="PIE"){const o=a[0],c=(r.labels||[]).map((u,f)=>{var d;return{name:u,value:((d=o==null?void 0:o.data)==null?void 0:d[f])??0}});return s.jsx(xl,{width:"100%",height:n,children:s.jsxs(lme,{children:[s.jsx(Ia,{data:c,dataKey:"value",nameKey:"name",outerRadius:n/2.8,innerRadius:n/5,children:c.map((u,f)=>s.jsx(Mf,{fill:Rr[f%Rr.length]},f))}),s.jsx(tn,{contentStyle:Sd}),s.jsx(tr,{wrapperStyle:{fontSize:11}})]})})}return l==="LINE"?s.jsx(xl,{width:"100%",height:n,children:s.jsxs(ime,{data:i,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Ar,{dataKey:"name",tick:nl}),s.jsx(Cr,{tick:nl}),s.jsx(tn,{contentStyle:Sd}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),a.map((o,c)=>s.jsx(Mi,{type:"monotone",dataKey:o.name,stroke:Rr[c%Rr.length],strokeWidth:2,dot:!1},o.name))]})}):l==="AREA"?s.jsx(xl,{width:"100%",height:n,children:s.jsxs(ome,{data:i,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Ar,{dataKey:"name",tick:nl}),s.jsx(Cr,{tick:nl}),s.jsx(tn,{contentStyle:Sd}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),a.map((o,c)=>s.jsx(Ba,{type:"monotone",dataKey:o.name,stroke:Rr[c%Rr.length],fill:Rr[c%Rr.length],fillOpacity:.18,strokeWidth:2},o.name))]})}):s.jsx(xl,{width:"100%",height:n,children:s.jsxs(sme,{data:i,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Ar,{dataKey:"name",tick:nl}),s.jsx(Cr,{tick:nl}),s.jsx(tn,{contentStyle:Sd,cursor:{fill:"#26304a55"}}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),a.map((o,c)=>s.jsx(Bi,{dataKey:o.name,fill:Rr[c%Rr.length],radius:[3,3,0,0]},o.name))]})})}function ut({title:e,subtitle:t,actions:n}){return s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold",children:e}),t&&s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:t})]}),n&&s.jsx("div",{className:"flex items-center gap-2",children:n})]})}function L({label:e,children:t,hint:n}){return s.jsxs("div",{children:[s.jsx("label",{className:"block text-xs text-slate-400 mb-1",children:e}),t,n&&s.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:n})]})}function We({title:e,onClose:t,children:n,wide:r}){return s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:t,children:s.jsxs("div",{className:`bg-panel border border-edge rounded-2xl p-6 ${r?"w-[760px]":"w-[480px]"} max-h-[90vh] overflow-auto`,onClick:a=>a.stopPropagation(),children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-bold",children:e}),s.jsx("button",{onClick:t,className:"text-slate-400 hover:text-slate-200",children:s.jsx(VT,{size:18})})]}),n]})})}function V({children:e,onClick:t,variant:n="primary",size:r="md",disabled:a,title:i,type:l}){const o="inline-flex items-center gap-1.5 rounded-lg font-semibold transition-colors disabled:opacity-50",c=r==="sm"?"px-2.5 py-1 text-xs":"px-3 py-2 text-sm",u=n==="primary"?"bg-brand text-ink hover:bg-brand/90":n==="danger"?"bg-rose-500/90 text-white hover:bg-rose-500":"bg-card border border-edge text-slate-300 hover:border-brand";return s.jsx("button",{type:l||"button",onClick:t,disabled:a,title:i,className:`${o} ${c} ${u}`,children:e})}function Fe({msg:e="데이터가 없습니다.",colSpan:t}){return t?s.jsx("tr",{children:s.jsx("td",{colSpan:t,className:"py-6 text-center text-slate-500 text-sm",children:e})}):s.jsx("div",{className:"py-8 text-center text-slate-500 text-sm bg-card border border-edge rounded-xl",children:e})}function xe({title:e,icon:t,children:n,className:r=""}){return s.jsxs("div",{className:`bg-card border border-edge rounded-xl p-4 ${r}`,children:[e&&s.jsxs("h3",{className:"text-sm font-semibold mb-3 flex items-center gap-1.5",children:[t,e]}),n]})}function Ir({label:e,value:t,icon:n,color:r="text-brand",unit:a}){return s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[n," ",e]}),s.jsxs("div",{className:`text-2xl font-bold mt-2 ${r}`,children:[typeof t=="number"?t.toLocaleString():t,a&&s.jsx("span",{className:"text-sm font-normal text-slate-500 ml-1",children:a})]})]})}function sj(e,t=[]){if(e==null)return t;if(typeof e=="object")return e;try{return JSON.parse(e)}catch{return t}}function lj(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return""}}function AA(e){if(!e)return"-";if(e.includes("@")){const[t,n]=e.split("@");return`${t.slice(0,2)}***@${n}`}return e.length>4?e.slice(0,3)+"****"+e.slice(-2):"***"}const CA={CREATED:"bg-slate-500/15 text-slate-400 border-slate-500/30",RELEASED:"bg-sky-500/15 text-sky-400 border-sky-500/30",INPROGRESS:"bg-amber-500/15 text-amber-400 border-amber-500/30",DONE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CLOSED:"bg-slate-600/15 text-slate-500 border-slate-600/30",CANCELLED:"bg-rose-500/15 text-rose-400 border-rose-500/30",ASSIGNED:"bg-slate-500/15 text-slate-400 border-slate-500/30",STARTED:"bg-amber-500/15 text-amber-400 border-amber-500/30",PAUSED:"bg-orange-500/15 text-orange-400 border-orange-500/30",ORDERED:"bg-slate-500/15 text-slate-400 border-slate-500/30",PICKING:"bg-sky-500/15 text-sky-400 border-sky-500/30",PACKING:"bg-violet-500/15 text-violet-400 border-violet-500/30",INSPECTED:"bg-cyan-500/15 text-cyan-400 border-cyan-500/30",SHIPPED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",WAIT:"bg-slate-500/15 text-slate-400 border-slate-500/30",RUNNING:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",RUN:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",IDLE:"bg-amber-500/15 text-amber-400 border-amber-500/30",DOWN:"bg-rose-500/15 text-rose-400 border-rose-500/30",MAINT:"bg-orange-500/15 text-orange-400 border-orange-500/30",REQUESTED:"bg-slate-500/15 text-slate-400 border-slate-500/30",INSPECTING:"bg-amber-500/15 text-amber-400 border-amber-500/30",ACCEPTED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",REJECTED:"bg-rose-500/15 text-rose-400 border-rose-500/30",COUNTED:"bg-sky-500/15 text-sky-400 border-sky-500/30",ADJUSTED:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",CONSUMED:"bg-slate-600/15 text-slate-500 border-slate-600/30",EXPIRED:"bg-rose-500/15 text-rose-400 border-rose-500/30",PASS:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",FAIL:"bg-rose-500/15 text-rose-400 border-rose-500/30",OPEN:"bg-rose-500/15 text-rose-400 border-rose-500/30",REVIEW:"bg-amber-500/15 text-amber-400 border-amber-500/30",DISPOSITIONED:"bg-sky-500/15 text-sky-400 border-sky-500/30",VERIFY:"bg-cyan-500/15 text-cyan-400 border-cyan-500/30",CRITICAL:"bg-rose-500/15 text-rose-400 border-rose-500/30",MAJOR:"bg-orange-500/15 text-orange-400 border-orange-500/30",MINOR:"bg-amber-500/15 text-amber-400 border-amber-500/30",ACTIVE:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",INACTIVE:"bg-slate-500/15 text-slate-400 border-slate-500/30",DELAYED:"bg-rose-500/15 text-rose-400 border-rose-500/30",ON_TIME:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30"};function lt({status:e}){const t=(e||"").toUpperCase(),n=CA[t]||CA.CREATED;return s.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs font-medium border ${n}`,children:e||"-"})}const ume=[{key:"activeWorkorders",alt:["inprogressWorkorders","activeWo"],label:"진행 작업지시",icon:no,color:"text-brand"},{key:"todayOutput",alt:["todayProduction","dailyOutput"],label:"금일 생산량",icon:xs,color:"text-emerald-400"},{key:"oeePercent",alt:["oee","avgOee"],label:"평균 OEE",icon:ro,color:"text-accent",pct:!0},{key:"openNcr",alt:["ncrOpen","defectCount"],label:"미처리 부적합",icon:lr,color:"text-rose-400"},{key:"belowSafety",alt:["lowStock","safetyAlert"],label:"안전재고 미달",icon:Sf,color:"text-amber-400"},{key:"pendingShipping",alt:["openShipping","shippingCount"],label:"출하 대기",icon:um,color:"text-sky-400"},{key:"runningProcesses",alt:["running","activeProcesses"],label:"가동 공정",icon:gl,color:"text-violet-400"},{key:"equipmentDown",alt:["downEquipment","downCount"],label:"설비 비가동",icon:ro,color:"text-orange-400"}];function wd(e,t,n=[]){if(!e)return 0;for(const r of[t,...n])if(e[r]!=null)return Number(e[r])||0;return 0}function Nd(e,t){if(!e)return;if(e.labels&&e.series)return e;const n=Object.entries(e).filter(([,r])=>typeof r=="number");if(n.length)return{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}}function fme(){const[e,t]=S.useState({}),[n,r]=S.useState(null),[a,i]=S.useState(null),[l,o]=S.useState(null),[c,u]=S.useState(null),[f,d]=S.useState({}),h=()=>{SI().then(v=>t(v||{})).catch(()=>{}),vk().then(v=>d(v||{})).catch(()=>{}),wI().then(r).catch(()=>{}),NI().then(i).catch(()=>{}),OI().then(o).catch(()=>{}),xk(14).then(u).catch(()=>{})};S.useEffect(()=>{h();const v=window.setInterval(h,15e3);return()=>window.clearInterval(v)},[]);const m={...f,...e},j=wd(f,"avg_progress_rate",["avgProgressRate","avgRate"]);return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold",children:"제조 실시간 대시보드"}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"생산 · OEE · 재고 · 품질 통합 모니터링 (15초 자동 갱신)"})]}),s.jsxs(jf,{to:"/ai-tools",className:"flex items-center gap-1.5 text-sm text-brand hover:underline",children:[s.jsx(zn,{size:16})," AI 도구 ",s.jsx(ST,{size:14})]})]}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:ume.map(({key:v,alt:p,label:y,icon:g,color:b,pct:x})=>{const N=wd(m,v,p);return s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-slate-400",children:[s.jsx(g,{size:13})," ",y]}),s.jsxs("div",{className:`text-2xl font-bold mt-2 ${b}`,children:[N.toLocaleString(),x?"%":""]})]},v)})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-6",children:[s.jsx(xe,{title:"일별 생산량 (14일)",icon:s.jsx(xs,{size:15}),className:"lg:col-span-2",children:s.jsx(Sr,{type:"AREA",data:Nd(c,"생산량")})}),s.jsx(xe,{title:"평균 진척률",icon:s.jsx(wf,{size:15}),children:s.jsxs("div",{className:"flex flex-col items-center justify-center h-[240px]",children:[s.jsxs("div",{className:"text-5xl font-bold text-accent",children:[j.toFixed(1),"%"]}),s.jsxs("div",{className:"text-sm text-slate-400 mt-3",children:["진행 ",wd(f,"inprogress_workorders",["inprogressWorkorders"])," · 지연 ",s.jsx("span",{className:"text-rose-400",children:wd(f,"delayed_workorders",["delayedWorkorders"])})]})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[s.jsx(xe,{title:"작업지시 상태",icon:s.jsx(no,{size:15}),children:s.jsx(Sr,{type:"PIE",data:Nd(n,"작업지시"),height:200})}),s.jsx(xe,{title:"출하 상태",icon:s.jsx(um,{size:15}),children:s.jsx(Sr,{type:"BAR",data:Nd(a,"출하"),height:200})}),s.jsx(xe,{title:"설비 가동 현황",icon:s.jsx(ro,{size:15}),children:Array.isArray(l)?s.jsxs("div",{className:"space-y-1.5 max-h-[200px] overflow-auto",children:[l.slice(0,8).map((v,p)=>s.jsxs("div",{className:"flex items-center justify-between text-sm border-b border-edge/40 pb-1",children:[s.jsx("span",{className:"text-slate-300",children:v.equipmentName||v.equipmentCode||`설비 ${p+1}`}),s.jsx(lt,{status:v.runStatus||v.status})]},p)),l.length===0&&s.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"설비 데이터 없음"})]}):s.jsx(Sr,{type:"PIE",data:Nd(l,"설비"),height:200})})]})]})}const dme=["","ASSIGNED","STARTED","PAUSED","DONE","CANCELLED"],hme={workorderId:"",opSeq:1,processCode:"",workerId:"",equipmentCode:"",assignedQty:0,plannedStart:"",plannedEnd:"",remark:""};function pme(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState([]),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(null),[h,m]=S.useState(null),[j,v]=S.useState([]),[p,y]=S.useState([]),[g,b]=S.useState([]),x=Zt(),N=fr(),w=()=>{AI({status:l,woNo:c}).then(C=>t(C||[])).catch(()=>t([])),CI().then(r).catch(()=>{}),EI().then(C=>i(Array.isArray(C)?C:[])).catch(()=>{})};S.useEffect(()=>{w()},[l]),S.useEffect(()=>{gk().then(C=>v(C||[])).catch(()=>{}),e1().then(C=>y(C||[])).catch(()=>{}),vm().then(C=>b(C||[])).catch(()=>{})},[]);const O=()=>d({...hme,_new:!0}),A=async()=>{const{_new:C,id:P,...z}=f;C?await _I(z):await TI(P,z),d(null),w()},E=async C=>{window.confirm("삭제하시겠습니까?")&&(await $I(C),w())},M=async(C,P)=>{await MI(C,P),w()},$=async C=>{const P=window.prompt(`'${C.jobNo}' 완료 수량 (현재 ${C.doneQty}/${C.assignedQty})`,String(C.assignedQty-C.doneQty));P!=null&&(await PI(C.id,Number(P)),w())},k=async()=>{await kI(h.id,{workerId:h.workerId||void 0,equipmentCode:h.equipmentCode||void 0}),m(null),w()},I=[{key:"ASSIGNED",label:"배정"},{key:"STARTED",label:"진행"},{key:"PAUSED",label:"일시정지"},{key:"DONE",label:"완료"}],_=C=>(n==null?void 0:n[C])??(n==null?void 0:n[C.toLowerCase()])??0;return s.jsxs("div",{children:[s.jsx(ut,{title:"작업관리 ★",subtitle:"작업/작업자/설비 배정 · 작업 할당 · 진행 상태 전이 · 작업 이력",actions:x&&s.jsxs(V,{onClick:O,children:[s.jsx(ot,{size:16})," 작업 생성"]})}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5",children:I.map(C=>s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[s.jsx("div",{className:"text-xs text-slate-400",children:C.label}),s.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:_(C.key).toLocaleString()})]},C.key))}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-5 mb-5",children:[s.jsxs("div",{className:"lg:col-span-3",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:[s.jsx("select",{className:"inp w-36",value:l,onChange:C=>o(C.target.value),children:dme.map(C=>s.jsx("option",{value:C,children:C||"전체 상태"},C))}),s.jsx("input",{value:c,onChange:C=>u(C.target.value),onKeyDown:C=>C.key==="Enter"&&w(),placeholder:"작업지시번호",className:"inp w-44"}),s.jsx(V,{variant:"ghost",onClick:w,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"작업번호"}),s.jsx("th",{className:"text-left",children:"작업지시"}),s.jsx("th",{className:"text-left",children:"공정"}),s.jsx("th",{className:"text-left",children:"작업자"}),s.jsx("th",{className:"text-left",children:"설비"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(C=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(Nf,{size:14,className:"text-brand"}),C.jobNo]}),s.jsxs("td",{className:"text-slate-400 text-xs",children:[C.woNo,s.jsx("div",{className:"text-slate-500",children:C.itemName||C.itemCode})]}),s.jsx("td",{className:"text-slate-300 text-xs",children:C.processName||C.processCode}),s.jsx("td",{className:"text-slate-400 text-xs",children:C.workerId||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:C.equipmentCode||"-"}),s.jsxs("td",{className:"text-right text-slate-300",children:[C.doneQty,"/",C.assignedQty]}),s.jsx("td",{children:s.jsx(lt,{status:C.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[x&&C.status==="ASSIGNED"&&s.jsx("button",{onClick:()=>M(C.id,"START"),title:"시작",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(Hg,{size:15})}),x&&C.status==="STARTED"&&s.jsx("button",{onClick:()=>M(C.id,"PAUSE"),title:"일시정지",className:"text-amber-400 hover:text-amber-300",children:s.jsx(zT,{size:15})}),x&&C.status==="PAUSED"&&s.jsx("button",{onClick:()=>M(C.id,"RESUME"),title:"재개",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(Hg,{size:15})}),x&&(C.status==="STARTED"||C.status==="PAUSED")&&s.jsx("button",{onClick:()=>$(C),title:"실적 보고",className:"text-sky-400 hover:text-sky-300",children:s.jsx(z6,{size:15})}),x&&(C.status==="STARTED"||C.status==="PAUSED")&&s.jsx("button",{onClick:()=>M(C.id,"DONE"),title:"완료",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(wf,{size:15})}),x&&C.status!=="DONE"&&C.status!=="CANCELLED"&&s.jsx("button",{onClick:()=>m({id:C.id,workerId:C.workerId||"",equipmentCode:C.equipmentCode||""}),title:"배정",className:"text-slate-400 hover:text-brand",children:s.jsx(sL,{size:15})}),x&&C.status!=="DONE"&&C.status!=="CANCELLED"&&s.jsx("button",{onClick:()=>M(C.id,"CANCEL"),title:"취소",className:"text-rose-400 hover:text-rose-300",children:s.jsx(kh,{size:15})}),N&&(C.status==="ASSIGNED"||C.status==="CANCELLED")&&s.jsx("button",{onClick:()=>E(C.id),title:"삭제",className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:15})})]})})]},C.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"작업이 없습니다."})]})]})})]}),s.jsx(xe,{title:"작업자별 부하",children:s.jsxs("div",{className:"space-y-2 max-h-[420px] overflow-auto",children:[a.map((C,P)=>s.jsxs("div",{className:"bg-panel border border-edge rounded p-2.5",children:[s.jsx("div",{className:"text-sm font-medium",children:C.workerName||C.displayName||C.workerId}),s.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:["진행 ",C.activeJobs??C.inprogressJobs??0,"건 · 잔여 ",Number(C.remainingQty??C.remaining??0).toLocaleString()]})]},P)),a.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"부하 데이터 없음"})]})})]}),f&&s.jsxs(We,{title:f._new?"작업 생성":"작업 수정",onClose:()=>d(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"작업지시",children:s.jsxs("select",{className:"inp",value:f.workorderId,onChange:C=>d({...f,workorderId:C.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),g.map(C=>s.jsxs("option",{value:C.id,children:[C.woNo," · ",C.itemName||C.itemCode]},C.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"공정순서 (opSeq)",children:s.jsx("input",{type:"number",className:"inp",value:f.opSeq,onChange:C=>d({...f,opSeq:Number(C.target.value)})})}),s.jsx(L,{label:"공정코드",children:s.jsx("input",{className:"inp",value:f.processCode,onChange:C=>d({...f,processCode:C.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"작업자",children:s.jsxs("select",{className:"inp",value:f.workerId,onChange:C=>d({...f,workerId:C.target.value}),children:[s.jsx("option",{value:"",children:"미배정"}),j.map(C=>s.jsx("option",{value:C.id,children:C.displayName||C.username},C.id))]})}),s.jsx(L,{label:"설비",children:s.jsxs("select",{className:"inp",value:f.equipmentCode,onChange:C=>d({...f,equipmentCode:C.target.value}),children:[s.jsx("option",{value:"",children:"미배정"}),p.map(C=>s.jsx("option",{value:C.equipmentCode,children:C.equipmentName||C.equipmentCode},C.id))]})})]}),s.jsx(L,{label:"배정 수량",children:s.jsx("input",{type:"number",className:"inp",value:f.assignedQty,onChange:C=>d({...f,assignedQty:Number(C.target.value)})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"계획 시작",children:s.jsx("input",{type:"datetime-local",className:"inp",value:f.plannedStart,onChange:C=>d({...f,plannedStart:C.target.value})})}),s.jsx(L,{label:"계획 종료",children:s.jsx("input",{type:"datetime-local",className:"inp",value:f.plannedEnd,onChange:C=>d({...f,plannedEnd:C.target.value})})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:f.remark,onChange:C=>d({...f,remark:C.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>d(null),children:"취소"}),s.jsx(V,{onClick:A,children:"저장"})]})]}),h&&s.jsxs(We,{title:"작업자/설비 배정",onClose:()=>m(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"작업자",children:s.jsxs("select",{className:"inp",value:h.workerId,onChange:C=>m({...h,workerId:C.target.value}),children:[s.jsx("option",{value:"",children:"미배정"}),j.map(C=>s.jsx("option",{value:C.id,children:C.displayName||C.username},C.id))]})}),s.jsx(L,{label:"설비",children:s.jsxs("select",{className:"inp",value:h.equipmentCode,onChange:C=>m({...h,equipmentCode:C.target.value}),children:[s.jsx("option",{value:"",children:"미배정"}),p.map(C=>s.jsx("option",{value:C.equipmentCode,children:C.equipmentName||C.equipmentCode},C.id))]})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>m(null),children:"취소"}),s.jsx(V,{onClick:k,children:"배정"})]})]})]})}function mme(e){return Math.max(0,Math.min(100,Number(e)||0))}function yme({rate:e,delayed:t}){const n=t?"bg-rose-500":e>=100?"bg-emerald-500":"bg-brand";return s.jsx("div",{className:"w-full bg-ink rounded-full h-2 overflow-hidden",children:s.jsx("div",{className:`h-full ${n} transition-all`,style:{width:`${mme(e)}%`}})})}function vme(){const[e,t]=S.useState({}),[n,r]=S.useState([]),[a,i]=S.useState([]),[l,o]=S.useState(null),[c,u]=S.useState({workorders:[],jobs:[]}),[f,d]=S.useState(""),h=()=>{vk().then(v=>t(v||{})).catch(()=>{}),RI(f).then(v=>r(Array.isArray(v)?v:[])).catch(()=>r([])),DI().then(v=>i(Array.isArray(v)?v:[])).catch(()=>i([])),LI(30).then(o).catch(()=>{}),zI().then(v=>u(v||{workorders:[],jobs:[]})).catch(()=>{})};S.useEffect(()=>{h()},[f]),S.useEffect(()=>{const v=window.setInterval(h,15e3);return()=>window.clearInterval(v)},[f]);const m=(v,...p)=>{for(const y of[v,...p])if((e==null?void 0:e[y])!=null)return Number(e[y])||0;return 0},j=(()=>{if(l){if(l.labels&&l.series)return l;if(Array.isArray(l))return{labels:l.map(v=>v.itemName||v.itemCode),series:[{name:"계획",data:l.map(v=>Number(v.planQty??v.plannedQty??0))},{name:"실적",data:l.map(v=>Number(v.actualQty??v.producedQty??0))}]}}})();return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(gl,{className:"text-brand",size:20})," 진행관리 ★"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"진척률 · 계획대비실적 · 실시간 생산현황 · 지연 알림 (15초 자동 갱신)"})]}),s.jsxs("button",{onClick:h,className:"flex items-center gap-1.5 text-sm text-slate-400 hover:text-brand",children:[s.jsx(Kb,{size:15})," 새로고침"]})]}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-6 gap-3 mb-6",children:[s.jsx(Ir,{label:"진행 작업지시",value:m("active_workorders","activeWorkorders"),icon:s.jsx(no,{size:13})}),s.jsx(Ir,{label:"가공 중",value:m("inprogress_workorders","inprogressWorkorders"),icon:s.jsx(gl,{size:13}),color:"text-amber-400"}),s.jsx(Ir,{label:"지연",value:m("delayed_workorders","delayedWorkorders"),icon:s.jsx(lr,{size:13}),color:"text-rose-400"}),s.jsx(Ir,{label:"가동 공정",value:m("running_processes","runningProcesses"),icon:s.jsx(ro,{size:13}),color:"text-emerald-400"}),s.jsx(Ir,{label:"활성 작업",value:m("active_jobs","activeJobs"),icon:s.jsx(ao,{size:13}),color:"text-sky-400"}),s.jsx(Ir,{label:"평균 진척률",value:m("avg_progress_rate","avgProgressRate").toFixed(1),unit:"%",icon:s.jsx(gl,{size:13}),color:"text-accent"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-6",children:[s.jsxs(xe,{title:"작업지시별 진척률",icon:s.jsx(no,{size:15}),className:"lg:col-span-2",children:[s.jsx("div",{className:"flex items-center gap-2 mb-3",children:s.jsx("select",{className:"inp w-40",value:f,onChange:v=>d(v.target.value),children:["","RELEASED","INPROGRESS","DONE"].map(v=>s.jsx("option",{value:v,children:v||"전체 상태"},v))})}),s.jsxs("div",{className:"space-y-2.5 max-h-[360px] overflow-auto",children:[n.map((v,p)=>{const y=Number(v.progressRate??v.progress_rate??0),g=!!(v.delayed??v.isDelayed);return s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsxs("span",{className:"text-sm font-medium",children:[v.woNo," ",s.jsx("span",{className:"text-slate-400 text-xs ml-1",children:v.itemName||v.itemCode})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[g&&s.jsx(lt,{status:"DELAYED"}),s.jsxs("span",{className:`text-sm font-bold ${g?"text-rose-400":y>=100?"text-emerald-400":"text-brand"}`,children:[y.toFixed(0),"%"]})]})]}),s.jsx(yme,{rate:y,delayed:g}),s.jsxs("div",{className:"text-[11px] text-slate-500 mt-1",children:["실적 ",Number(v.producedQty??v.actualQty??0).toLocaleString()," / 계획 ",Number(v.planQty??v.plannedQty??0).toLocaleString()]})]},v.id??p)}),n.length===0&&s.jsx(Fe,{msg:"진행 중 작업지시가 없습니다."})]})]}),s.jsx(xe,{title:"실시간 가동 공정",icon:s.jsx(gl,{size:15}),children:s.jsxs("div",{className:"space-y-2 max-h-[400px] overflow-auto",children:[a.map((v,p)=>s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium",children:v.processName||v.processCode}),s.jsxs("span",{className:"flex items-center gap-1 text-[11px] text-emerald-400",children:[s.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 animate-pulse"}),"RUNNING"]})]}),s.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[v.woNo," · ",v.equipmentCode||"설비 미지정"]})]},v.id??p)),a.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-6 text-center",children:"가동 중 공정 없음"})]})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[s.jsx(xe,{title:"품목별 계획 대비 실적 (30일)",icon:s.jsx(ao,{size:15}),children:s.jsx(Sr,{type:"BAR",data:j})}),s.jsx(xe,{title:"지연 알림",icon:s.jsx(ew,{size:15}),children:s.jsxs("div",{className:"space-y-1.5 max-h-[280px] overflow-auto",children:[(c.workorders||[]).map((v,p)=>s.jsxs("div",{className:"flex items-center justify-between bg-rose-500/5 border border-rose-500/20 rounded p-2 text-sm",children:[s.jsxs("span",{children:[s.jsx(lr,{size:13,className:"inline text-rose-400 mr-1.5"}),v.woNo," · ",v.itemName||v.itemCode]}),s.jsx("span",{className:"text-rose-400 text-xs",children:"작업지시 지연"})]},`wo${p}`)),(c.jobs||[]).map((v,p)=>s.jsxs("div",{className:"flex items-center justify-between bg-amber-500/5 border border-amber-500/20 rounded p-2 text-sm",children:[s.jsxs("span",{children:[s.jsx(ew,{size:13,className:"inline text-amber-400 mr-1.5"}),v.jobNo," · ",v.processName||v.processCode]}),s.jsx("span",{className:"text-amber-400 text-xs",children:"작업 지연"})]},`job${p}`)),(c.workorders||[]).length===0&&(c.jobs||[]).length===0&&s.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"지연 항목이 없습니다."})]})})]})]})}const gme=["","CREATED","RELEASED","INPROGRESS","DONE","CLOSED","CANCELLED"],xme=["CREATED","RELEASED","INPROGRESS","DONE","CLOSED"],bme={itemCode:"",planQty:0,dueDate:"",priority:"NORMAL",remark:""},EA={CREATED:[{action:"RELEASE",label:"확정",manager:!0},{action:"CANCEL",label:"취소",manager:!0}],RELEASED:[{action:"START",label:"착수"},{action:"CANCEL",label:"취소",manager:!0}],INPROGRESS:[{action:"COMPLETE",label:"완료"}],DONE:[{action:"CLOSE",label:"마감",manager:!0}]};function jme(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState("table"),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(null),[h,m]=S.useState([]),j=Zt(),v=fr(),p=()=>{vm({status:l,keyword:c}).then(w=>t(w||[])).catch(()=>t([])),WI().then(r).catch(()=>{})};S.useEffect(()=>{p()},[l]),S.useEffect(()=>{Jt({itemType:"PRODUCT"}).then(w=>m(w||[])).catch(()=>{})},[]);const y=()=>d({...bme,_new:!0}),g=async()=>{const{_new:w,id:O,...A}=f;w?await QI(A):await XI(O,A),d(null),p()},b=async w=>{window.confirm("삭제하시겠습니까?")&&(await JI(w),p())},x=async(w,O)=>{await ZI(w,O),p()},N=w=>n?n[w]||n[w.toLowerCase()]||[]:e.filter(O=>O.status===w);return s.jsxs("div",{children:[s.jsx(ut,{title:"작업지시",subtitle:"생산 작업지시 발행 · 상태 전이 · 칸반",actions:s.jsxs(s.Fragment,{children:[s.jsxs(V,{variant:"ghost",onClick:()=>i(a==="table"?"kanban":"table"),children:[s.jsx(Hb,{size:15})," ",a==="table"?"칸반":"테이블"]}),j&&s.jsxs(V,{onClick:y,children:[s.jsx(ot,{size:16})," 작업지시"]})]})}),a==="table"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:l,onChange:w=>o(w.target.value),children:gme.map(w=>s.jsx("option",{value:w,children:w||"전체 상태"},w))}),s.jsx("input",{value:c,onChange:w=>u(w.target.value),onKeyDown:w=>w.key==="Enter"&&p(),placeholder:"품목 검색",className:"inp w-52"}),s.jsx(V,{variant:"ghost",onClick:p,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"작업지시"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-right",children:"계획수량"}),s.jsx("th",{className:"text-left",children:"납기"}),s.jsx("th",{className:"text-left",children:"우선순위"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(w=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(no,{size:14,className:"text-brand"}),w.woNo]}),s.jsx("td",{className:"text-slate-300 text-xs",children:w.itemName||w.itemCode}),s.jsx("td",{className:"text-right text-slate-300",children:Number(w.planQty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 text-xs",children:w.dueDate||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:w.priority||"NORMAL"}),s.jsx("td",{children:s.jsx(lt,{status:w.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[j&&(EA[w.status]||[]).filter(O=>!O.manager||v).map(O=>s.jsx("button",{onClick:()=>x(w.id,O.action),className:"text-xs text-brand hover:underline",children:O.label},O.action)),j&&w.status==="CREATED"&&s.jsx("button",{onClick:()=>d({...w,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),v&&s.jsx("button",{onClick:()=>b(w.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},w.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"작업지시가 없습니다."})]})]})})]}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 xl:grid-cols-5 gap-3",children:xme.map(w=>s.jsxs("div",{className:"bg-panel border border-edge rounded-xl p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[s.jsx(lt,{status:w}),s.jsx("span",{className:"text-xs text-slate-500",children:N(w).length})]}),s.jsxs("div",{className:"space-y-2 max-h-[600px] overflow-auto",children:[N(w).map(O=>s.jsxs("div",{className:"bg-card border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-1",children:[s.jsx(ET,{size:12,className:"text-brand"}),O.woNo]}),s.jsx("div",{className:"text-[11px] text-slate-400 mt-0.5",children:O.itemName||O.itemCode}),s.jsxs("div",{className:"text-[11px] text-slate-500 mt-0.5",children:["계획 ",Number(O.planQty||0).toLocaleString()," · 납기 ",O.dueDate||"-"]}),j&&s.jsx("div",{className:"flex gap-1.5 mt-2",children:(EA[O.status]||[]).filter(A=>!A.manager||v).map(A=>s.jsx("button",{onClick:()=>x(O.id,A.action),className:"text-[11px] px-1.5 py-0.5 rounded bg-brand/15 text-brand border border-brand/30",children:A.label},A.action))})]},O.id)),N(w).length===0&&s.jsx("p",{className:"text-slate-600 text-xs text-center py-3",children:"-"})]})]},w))}),f&&s.jsxs(We,{title:f._new?"작업지시 발행":"작업지시 편집",onClose:()=>d(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목(제품)",children:s.jsxs("select",{className:"inp",value:f.itemCode,onChange:w=>d({...f,itemCode:w.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(w=>s.jsxs("option",{value:w.itemCode,children:[w.itemName," (",w.itemCode,")"]},w.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"계획 수량",children:s.jsx("input",{type:"number",className:"inp",value:f.planQty,onChange:w=>d({...f,planQty:Number(w.target.value)})})}),s.jsx(L,{label:"납기",children:s.jsx("input",{type:"date",className:"inp",value:f.dueDate||"",onChange:w=>d({...f,dueDate:w.target.value})})})]}),s.jsx(L,{label:"우선순위",children:s.jsx("select",{className:"inp",value:f.priority,onChange:w=>d({...f,priority:w.target.value}),children:["LOW","NORMAL","HIGH","URGENT"].map(w=>s.jsx("option",{children:w},w))})}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:f.remark||"",onChange:w=>d({...f,remark:w.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>d(null),children:"취소"}),s.jsx(V,{onClick:g,children:"저장"})]})]})]})}const Sme={woNo:"",itemCode:"",goodQty:0,defectQty:0,lotNo:"",workerId:"",remark:""};function _A(e,t){if(!e)return;if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(r=>r.label||r.name||r.defectCode||r.date),series:[{name:t,data:e.map(r=>Number(r.value??r.count??r.qty??0))}]};const n=Object.entries(e).filter(([,r])=>typeof r=="number");return n.length?{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}:void 0}function wme(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState(null),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState([]),[h,m]=S.useState([]),[j,v]=S.useState([]),p=Zt(),y=()=>{e8({woNo:l,limit:100}).then(x=>t(x||[])).catch(()=>t([])),t8(14).then(r).catch(()=>{}),n8(30).then(i).catch(()=>{})};S.useEffect(()=>{y()},[]),S.useEffect(()=>{vm({status:"INPROGRESS"}).then(x=>d(x||[])).catch(()=>{}),Jt().then(x=>m(x||[])).catch(()=>{}),gk().then(x=>v(x||[])).catch(()=>{})},[]);const g=()=>u({...Sme}),b=async()=>{await r8(c),u(null),y()};return s.jsxs("div",{children:[s.jsx(ut,{title:"생산실적",subtitle:"생산실적 보고 · LOT 생성 · 자재 투입 / 산출 입고",actions:p&&s.jsxs(V,{onClick:g,children:[s.jsx(ot,{size:16})," 실적 보고"]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6",children:[s.jsx(xe,{title:"일별 생산량 (14일)",icon:s.jsx(xs,{size:15}),children:s.jsx(Sr,{type:"AREA",data:_A(n,"생산량")})}),s.jsx(xe,{title:"불량 파레토 (30일)",children:s.jsx(Sr,{type:"BAR",data:_A(a,"불량수")})})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("input",{value:l,onChange:x=>o(x.target.value),onKeyDown:x=>x.key==="Enter"&&y(),placeholder:"작업지시번호",className:"inp w-44"}),s.jsx(V,{variant:"ghost",onClick:y,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"작업지시"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-right",children:"양품"}),s.jsx("th",{className:"text-right",children:"불량"}),s.jsx("th",{className:"text-left",children:"작업자"}),s.jsx("th",{className:"text-left",children:"일시"})]})}),s.jsxs("tbody",{children:[e.map(x=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 font-medium",children:x.woNo}),s.jsx("td",{className:"text-slate-300 text-xs",children:x.itemName||x.itemCode}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:x.lotNo||"-"}),s.jsx("td",{className:"text-right text-emerald-400",children:Number(x.goodQty||0).toLocaleString()}),s.jsx("td",{className:"text-right text-rose-400",children:Number(x.defectQty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 text-xs",children:x.workerId||"-"}),s.jsx("td",{className:"text-slate-500 text-xs",children:x.createdAt?new Date(x.createdAt).toLocaleString("ko-KR"):"-"})]},x.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"생산실적이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"생산실적 보고",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"작업지시",children:s.jsxs("select",{className:"inp",value:c.woNo,onChange:x=>{const N=f.find(w=>w.woNo===x.target.value);u({...c,woNo:x.target.value,itemCode:(N==null?void 0:N.itemCode)||c.itemCode})},children:[s.jsx("option",{value:"",children:"선택"}),f.map(x=>s.jsxs("option",{value:x.woNo,children:[x.woNo," · ",x.itemName||x.itemCode]},x.id))]})}),s.jsx(L,{label:"품목코드",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:x=>u({...c,itemCode:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(x=>s.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"양품 수량",children:s.jsx("input",{type:"number",className:"inp",value:c.goodQty,onChange:x=>u({...c,goodQty:Number(x.target.value)})})}),s.jsx(L,{label:"불량 수량",children:s.jsx("input",{type:"number",className:"inp",value:c.defectQty,onChange:x=>u({...c,defectQty:Number(x.target.value)})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT (미입력 시 자동)",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:x=>u({...c,lotNo:x.target.value})})}),s.jsx(L,{label:"작업자",children:s.jsxs("select",{className:"inp",value:c.workerId,onChange:x=>u({...c,workerId:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(x=>s.jsx("option",{value:x.id,children:x.displayName||x.username},x.id))]})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:c.remark,onChange:x=>u({...c,remark:x.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:b,children:"보고"})]})]})]})}const Nme=[{key:"WAIT",label:"대기"},{key:"RUNNING",label:"가동"},{key:"DONE",label:"완료"}];function Ome(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState([]),l=Zt(),o=()=>i8().then(d=>t(Array.isArray(d)?d:[])).catch(()=>t([])),c=()=>{n?a8(Number(n)).then(d=>t(Array.isArray(d)?d:[])).catch(()=>t([])):o()};S.useEffect(()=>{o()},[]),S.useEffect(()=>{vm().then(h=>i(h||[])).catch(()=>{});const d=window.setInterval(()=>{n||o()},15e3);return()=>window.clearInterval(d)},[n]);const u=async(d,h)=>{await s8(d,h),c()},f=d=>e.filter(h=>(h.status||"WAIT").toUpperCase()===d);return s.jsxs("div",{children:[s.jsx(ut,{title:"공정진행 칸반",subtitle:"공정 실시간 진행 상태 (작업지시 미선택 시 전체 가동 공정 · 15초 갱신)",actions:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{className:"inp w-56",value:n,onChange:d=>r(d.target.value),children:[s.jsx("option",{value:"",children:"전체 가동 공정"}),a.map(d=>s.jsxs("option",{value:d.id,children:[d.woNo," · ",d.itemName||d.itemCode]},d.id))]}),s.jsxs(V,{variant:"ghost",onClick:c,children:[s.jsx(Vo,{size:15})," 조회"]})]})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:Nme.map(d=>s.jsxs("div",{className:"bg-panel border border-edge rounded-xl p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2 px-1",children:[s.jsx(lt,{status:d.key}),s.jsx("span",{className:"text-xs text-slate-500",children:f(d.key).length})]}),s.jsxs("div",{className:"space-y-2 max-h-[600px] overflow-auto",children:[f(d.key).map(h=>s.jsxs("div",{className:"bg-card border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-1.5",children:[s.jsx(Hb,{size:13,className:"text-brand"}),h.processName||h.processCode]}),s.jsxs("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[h.woNo||""," · 순서 ",h.opSeq??"-"," · ",h.equipmentCode||"설비 미지정"]}),l&&s.jsxs("div",{className:"flex gap-1.5 mt-2",children:[d.key==="WAIT"&&s.jsxs("button",{onClick:()=>u(h.id,"RUNNING"),className:"text-[11px] px-1.5 py-0.5 rounded bg-emerald-500/15 text-emerald-400 border border-emerald-500/30 flex items-center gap-1",children:[s.jsx(Hg,{size:10})," 가동"]}),d.key==="RUNNING"&&s.jsxs(s.Fragment,{children:[s.jsxs("button",{onClick:()=>u(h.id,"WAIT"),className:"text-[11px] px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-400 border border-amber-500/30 flex items-center gap-1",children:[s.jsx(zT,{size:10})," 대기"]}),s.jsxs("button",{onClick:()=>u(h.id,"DONE"),className:"text-[11px] px-1.5 py-0.5 rounded bg-brand/15 text-brand border border-brand/30 flex items-center gap-1",children:[s.jsx(wf,{size:10})," 완료"]})]})]})]},h.id)),f(d.key).length===0&&s.jsx("p",{className:"text-slate-600 text-xs text-center py-3",children:"-"})]})]},d.key))}),e.length===0&&s.jsx("div",{className:"mt-4",children:s.jsx(Fe,{msg:"가동 중 공정이 없습니다. 작업지시를 선택해 공정을 조회하세요."})})]})}const Ame={equipmentCode:"",plannedTime:480,runTime:0,idealCycleTime:1,totalCount:0,goodCount:0,recordDate:""},Cme=["RUN","IDLE","DOWN","MAINT"];function Eme(e,t){if(e){if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(n=>n.label||n.code||n.downtimeCode||n.name),series:[{name:t,data:e.map(n=>Number(n.value??n.minutes??n.count??0))}]}}}function _me(e){const t=e.oeePercent??(e.oee!=null?e.oee*100:null);return t!=null?Number(t).toFixed(1):"-"}function Tme(){const[e,t]=S.useState([]),[n,r]=S.useState([]),[a,i]=S.useState(null),[l,o]=S.useState(""),[c,u]=S.useState(null),f=Zt(),d=fr(),h=()=>{l8({equipmentCode:l,limit:50}).then(p=>t(p||[])).catch(()=>t([])),e1().then(p=>r(p||[])).catch(()=>{}),c8(30).then(i).catch(()=>{})};S.useEffect(()=>{h()},[]);const m=()=>u({...Ame}),j=async()=>{await o8(c),u(null),h()},v=async(p,y)=>{await yB(p,y),h()};return s.jsxs("div",{children:[s.jsx(ut,{title:"설비 / OEE",subtitle:"가동률 × 성능 × 품질 = OEE · 비가동 코드 분석",actions:f&&s.jsxs(V,{onClick:m,children:[s.jsx(ot,{size:16})," OEE 기록"]})}),s.jsx(xe,{title:"설비 가동 현황",icon:s.jsx(Nf,{size:15}),className:"mb-5",children:s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[n.map(p=>s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("span",{className:"text-sm font-medium",children:p.equipmentName||p.equipmentCode}),s.jsx(lt,{status:p.runStatus||p.status})]}),d&&s.jsx("select",{className:"inp text-xs",value:p.runStatus||"IDLE",onChange:y=>v(p.id,y.target.value),children:Cme.map(y=>s.jsx("option",{value:y,children:y},y))})]},p.id)),n.length===0&&s.jsx("p",{className:"text-slate-500 text-sm col-span-4 text-center py-4",children:"설비가 없습니다."})]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-6",children:[s.jsx(xe,{title:"비가동 파레토 (30일)",icon:s.jsx(IT,{size:15}),children:s.jsx(Sr,{type:"BAR",data:Eme(a,"비가동(분)")})}),s.jsx(xe,{title:"OEE 추이",icon:s.jsx(ro,{size:15}),children:s.jsx(Sr,{type:"LINE",data:{labels:e.slice(0,12).reverse().map(p=>p.recordDate||p.equipmentCode),series:[{name:"OEE%",data:e.slice(0,12).reverse().map(p=>Number(p.oeePercent??(p.oee!=null?p.oee*100:0)))}]}})})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsxs("select",{className:"inp w-52",value:l,onChange:p=>o(p.target.value),children:[s.jsx("option",{value:"",children:"전체 설비"}),n.map(p=>s.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]}),s.jsx(V,{variant:"ghost",onClick:h,children:"조회"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"설비"}),s.jsx("th",{className:"text-left",children:"일자"}),s.jsx("th",{className:"text-right",children:"가동률"}),s.jsx("th",{className:"text-right",children:"성능"}),s.jsx("th",{className:"text-right",children:"품질"}),s.jsx("th",{className:"text-right px-4",children:"OEE"})]})}),s.jsxs("tbody",{children:[e.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 font-medium",children:p.equipmentCode}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.recordDate||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:p.availability!=null?(p.availability*100).toFixed(0)+"%":"-"}),s.jsx("td",{className:"text-right text-slate-300",children:p.performance!=null?(p.performance*100).toFixed(0)+"%":"-"}),s.jsx("td",{className:"text-right text-slate-300",children:p.quality!=null?(p.quality*100).toFixed(0)+"%":"-"}),s.jsxs("td",{className:"text-right px-4 font-bold text-accent",children:[_me(p),"%"]})]},p.id)),e.length===0&&s.jsx(Fe,{colSpan:6,msg:"OEE 기록이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"OEE 기록",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"설비",children:s.jsxs("select",{className:"inp",value:c.equipmentCode,onChange:p=>u({...c,equipmentCode:p.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),n.map(p=>s.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]})}),s.jsx(L,{label:"기록 일자",children:s.jsx("input",{type:"date",className:"inp",value:c.recordDate,onChange:p=>u({...c,recordDate:p.target.value})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"계획 가동시간(분)",children:s.jsx("input",{type:"number",className:"inp",value:c.plannedTime,onChange:p=>u({...c,plannedTime:Number(p.target.value)})})}),s.jsx(L,{label:"실제 가동시간(분)",children:s.jsx("input",{type:"number",className:"inp",value:c.runTime,onChange:p=>u({...c,runTime:Number(p.target.value)})})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"이상 사이클(분)",children:s.jsx("input",{type:"number",step:"0.01",className:"inp",value:c.idealCycleTime,onChange:p=>u({...c,idealCycleTime:Number(p.target.value)})})}),s.jsx(L,{label:"총 생산수",children:s.jsx("input",{type:"number",className:"inp",value:c.totalCount,onChange:p=>u({...c,totalCount:Number(p.target.value)})})}),s.jsx(L,{label:"양품수",children:s.jsx("input",{type:"number",className:"inp",value:c.goodCount,onChange:p=>u({...c,goodCount:Number(p.target.value)})})})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:j,children:"저장"})]})]})]})}function kme(){const[e,t]=S.useState(""),[n,r]=S.useState([]),[a,i]=S.useState([]),[l,o]=S.useState([]),[c,u]=S.useState(!1),f=async()=>{e.trim()&&(u(!0),u8(e).then(h=>r(d(h))).catch(()=>r([])),f8(e).then(h=>i(d(h))).catch(()=>i([])),d8(e).then(h=>o(d(h))).catch(()=>o([])))},d=h=>Array.isArray(h)?h:(h==null?void 0:h.nodes)||(h==null?void 0:h.items)||(h?[h]:[]);return s.jsxs("div",{children:[s.jsx(ut,{title:"LOT 추적",subtitle:"LOT/시리얼 정·역추적 (Genealogy) — 이력 · 정추적(소비처) · 역추적(투입원)"}),s.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[s.jsx("input",{value:e,onChange:h=>t(h.target.value),onKeyDown:h=>h.key==="Enter"&&f(),placeholder:"LOT 번호 입력 (예: LOT-20260614-001)",className:"inp w-80"}),s.jsxs(V,{onClick:f,children:[s.jsx(Vo,{size:15})," 추적"]})]}),c?s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[s.jsx(xe,{title:"이력 (History)",icon:s.jsx(MT,{size:15}),children:s.jsx($v,{rows:n,kind:"history"})}),s.jsx(xe,{title:"정추적 → 소비 작업지시",icon:s.jsx(ST,{size:15,className:"text-emerald-400"}),children:s.jsx($v,{rows:a,kind:"forward"})}),s.jsx(xe,{title:"역추적 ← 투입 LOT",icon:s.jsx($6,{size:15,className:"text-sky-400"}),children:s.jsx($v,{rows:l,kind:"backward"})})]}):s.jsx(Fe,{msg:"LOT 번호를 입력하고 추적을 실행하세요."})]})}function $v({rows:e,kind:t}){return e.length?s.jsx("div",{className:"space-y-2 max-h-[460px] overflow-auto",children:e.map((n,r)=>s.jsxs("div",{className:"relative pl-4 border-l-2 border-edge",children:[s.jsx("span",{className:"absolute -left-[5px] top-1.5 w-2 h-2 rounded-full bg-brand"}),s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-1.5",children:[s.jsx(RT,{size:12,className:"text-brand"}),n.lotNo||n.woNo||n.itemName||n.itemCode||n.event||`노드 ${r+1}`]}),s.jsx("div",{className:"text-[11px] text-slate-400 mt-0.5",children:[n.itemName||n.itemCode,n.woNo,n.eventType||n.txnType||n.refType,n.qty!=null?`${n.qty}`:null].filter(Boolean).join(" · ")||(t==="history"?"이력":"관계")}),n.createdAt&&s.jsx("div",{className:"text-[10px] text-slate-500 mt-0.5",children:new Date(n.createdAt).toLocaleString("ko-KR")})]})]},r))}):s.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"데이터 없음"})}const Mme=["","DRAFT","CONFIRMED","INPROGRESS","DONE","CANCELLED"],Pme={itemCode:"",planQty:0,startDate:"",endDate:"",remark:""},$me={DRAFT:[{action:"CONFIRM",label:"확정"},{action:"CANCEL",label:"취소"}],CONFIRMED:[{action:"START",label:"착수"},{action:"CANCEL",label:"취소"}],INPROGRESS:[{action:"COMPLETE",label:"완료"}]};function Rme(e,t,n){const r=e.startDate?new Date(e.startDate).getTime():t,a=e.endDate?new Date(e.endDate).getTime():n,i=Math.max(1,n-t),l=(r-t)/i*100,o=Math.max(2,(a-r)/i*100);return{left:`${Math.max(0,l)}%`,width:`${Math.min(100,o)}%`}}function Dme(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),c=Zt(),u=fr(),f=()=>h8({status:n}).then(g=>t(g||[])).catch(()=>t([]));S.useEffect(()=>{f()},[n]),S.useEffect(()=>{Jt({itemType:"PRODUCT"}).then(g=>o(g||[])).catch(()=>{})},[]);const d=()=>i({...Pme,_new:!0}),h=async()=>{const{_new:g,id:b,...x}=a;g?await p8(x):await m8(b,x),i(null),f()},m=async g=>{window.confirm("삭제하시겠습니까?")&&(await v8(g),f())},j=async(g,b)=>{await y8(g,b),f()},v=e.flatMap(g=>[g.startDate,g.endDate]).filter(Boolean).map(g=>new Date(g).getTime()),p=v.length?Math.min(...v):Date.now(),y=v.length?Math.max(...v):Date.now()+864e5;return s.jsxs("div",{children:[s.jsx(ut,{title:"생산계획",subtitle:"생산 일정 계획 · 간트 타임라인",actions:c&&s.jsxs(V,{onClick:d,children:[s.jsx(ot,{size:16})," 생산계획"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-36",value:n,onChange:g=>r(g.target.value),children:Mme.map(g=>s.jsx("option",{value:g,children:g||"전체 상태"},g))})}),s.jsx(xe,{title:"생산 일정 (간트)",icon:s.jsx(AT,{size:15}),className:"mb-5",children:s.jsxs("div",{className:"space-y-2",children:[e.map(g=>{const b=Rme(g,p,y);return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-40 text-xs text-slate-300 truncate",children:g.itemName||g.itemCode}),s.jsx("div",{className:"flex-1 relative h-5 bg-ink rounded",children:s.jsx("div",{className:"absolute h-5 rounded bg-brand/60 border border-brand text-[10px] text-white flex items-center px-1 overflow-hidden",style:b,children:Number(g.planQty||0).toLocaleString()})}),s.jsx(lt,{status:g.status})]},g.id)}),e.length===0&&s.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"생산계획이 없습니다."})]})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"품목"}),s.jsx("th",{className:"text-right",children:"계획수량"}),s.jsx("th",{className:"text-left",children:"시작"}),s.jsx("th",{className:"text-left",children:"종료"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(g=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 font-medium",children:g.itemName||g.itemCode}),s.jsx("td",{className:"text-right text-slate-300",children:Number(g.planQty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 text-xs",children:g.startDate||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:g.endDate||"-"}),s.jsx("td",{children:s.jsx(lt,{status:g.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c&&($me[g.status]||[]).map(b=>s.jsx("button",{onClick:()=>j(g.id,b.action),className:"text-xs text-brand hover:underline",children:b.label},b.action)),c&&g.status==="DRAFT"&&s.jsx("button",{onClick:()=>i({...g,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),u&&s.jsx("button",{onClick:()=>m(g.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},g.id)),e.length===0&&s.jsx(Fe,{colSpan:6,msg:"생산계획이 없습니다."})]})]})}),a&&s.jsxs(We,{title:a._new?"생산계획 작성":"생산계획 편집",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목(제품)",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:g=>i({...a,itemCode:g.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(g=>s.jsxs("option",{value:g.itemCode,children:[g.itemName," (",g.itemCode,")"]},g.id))]})}),s.jsx(L,{label:"계획 수량",children:s.jsx("input",{type:"number",className:"inp",value:a.planQty,onChange:g=>i({...a,planQty:Number(g.target.value)})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"시작일",children:s.jsx("input",{type:"date",className:"inp",value:a.startDate||"",onChange:g=>i({...a,startDate:g.target.value})})}),s.jsx(L,{label:"종료일",children:s.jsx("input",{type:"date",className:"inp",value:a.endDate||"",onChange:g=>i({...a,endDate:g.target.value})})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:a.remark||"",onChange:g=>i({...a,remark:g.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(V,{onClick:h,children:"저장"})]})]})]})}const Lme=["","REQUESTED","INSPECTING","ACCEPTED","REJECTED"],zme={partnerCode:"",itemCode:"",qty:0,lotNo:"",warehouseCode:"",locationCode:"",inspectionRequired:!1,remark:""};function Ime(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),[c,u]=S.useState([]),[f,d]=S.useState([]),h=Zt(),m=()=>g8({status:n}).then(g=>t(g||[])).catch(()=>t([]));S.useEffect(()=>{m()},[n]),S.useEffect(()=>{Jt().then(g=>o(g||[])).catch(()=>{}),t1({partnerType:"SUPPLIER"}).then(g=>u(g||[])).catch(()=>{}),_f().then(g=>d(g||[])).catch(()=>{})},[]);const j=()=>i({...zme,_new:!0}),v=async()=>{const{_new:g,...b}=a;await x8(b),i(null),m()},p=async g=>{await b8(g.id,g.inspectionRequired?"PASS":void 0),m()},y=async g=>{const b=window.prompt("반려 사유");b!=null&&(await j8(g.id,b),m())};return s.jsxs("div",{children:[s.jsx(ut,{title:"입고",subtitle:"입고 요청 · 검수 · 입고 LOT · 재고 증가",actions:h&&s.jsxs(V,{onClick:j,children:[s.jsx(ot,{size:16})," 입고 요청"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-36",value:n,onChange:g=>r(g.target.value),children:Lme.map(g=>s.jsx("option",{value:g,children:g||"전체 상태"},g))})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"입고번호"}),s.jsx("th",{className:"text-left",children:"공급사"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-left",children:"창고"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(g=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(DT,{size:14,className:"text-brand"}),g.receivingNo||g.id]}),s.jsx("td",{className:"text-slate-400 text-xs",children:g.partnerCode}),s.jsx("td",{className:"text-slate-300 text-xs",children:g.itemName||g.itemCode}),s.jsx("td",{className:"text-right text-slate-300",children:Number(g.qty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:g.lotNo||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:g.warehouseCode||"-"}),s.jsx("td",{children:s.jsx(lt,{status:g.status})}),s.jsx("td",{className:"px-4",children:s.jsx("div",{className:"flex items-center justify-end gap-2",children:h&&(g.status==="REQUESTED"||g.status==="INSPECTING")&&s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>p(g),title:"입고 승인",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(CT,{size:16})}),s.jsx("button",{onClick:()=>y(g),title:"반려",className:"text-rose-400 hover:text-rose-300",children:s.jsx(VT,{size:16})})]})})})]},g.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"입고 건이 없습니다."})]})]})}),a&&s.jsxs(We,{title:"입고 요청",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"공급사",children:s.jsxs("select",{className:"inp",value:a.partnerCode,onChange:g=>i({...a,partnerCode:g.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),c.map(g=>s.jsx("option",{value:g.partnerCode,children:g.partnerName||g.partnerCode},g.id))]})}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:g=>i({...a,itemCode:g.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(g=>s.jsxs("option",{value:g.itemCode,children:[g.itemName," (",g.itemCode,")"]},g.id))]})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"수량",children:s.jsx("input",{type:"number",className:"inp",value:a.qty,onChange:g=>i({...a,qty:Number(g.target.value)})})}),s.jsx(L,{label:"LOT (미입력 시 자동)",children:s.jsx("input",{className:"inp",value:a.lotNo,onChange:g=>i({...a,lotNo:g.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"창고",children:s.jsxs("select",{className:"inp",value:a.warehouseCode,onChange:g=>i({...a,warehouseCode:g.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),f.map(g=>s.jsx("option",{value:g.warehouseCode,children:g.warehouseName||g.warehouseCode},g.id))]})}),s.jsx(L,{label:"로케이션",children:s.jsx("input",{className:"inp",value:a.locationCode,onChange:g=>i({...a,locationCode:g.target.value})})})]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-300",children:[s.jsx("input",{type:"checkbox",checked:a.inspectionRequired,onChange:g=>i({...a,inspectionRequired:g.target.checked})})," 수입검사(IQC) 필요"]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:a.remark,onChange:g=>i({...a,remark:g.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(V,{onClick:v,children:"저장"})]})]})]})}const Bme=["","ORDERED","PICKING","PACKING","INSPECTED","SHIPPED","CANCELLED"],Ume={partnerCode:"",orderRef:"",itemCode:"",lotNo:"",planQty:0,warehouseCode:"",locationCode:"",inspectionRequired:!1,remark:""};function qme(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState(null),[h,m]=S.useState([]),[j,v]=S.useState([]),[p,y]=S.useState([]),g=Zt(),b=()=>{II({status:a,keyword:l}).then(_=>t(_||[])).catch(()=>t([])),BI().then(r).catch(()=>{})};S.useEffect(()=>{b()},[a]),S.useEffect(()=>{t1({partnerType:"CUSTOMER"}).then(_=>m(_||[])).catch(()=>{}),Jt().then(_=>v(_||[])).catch(()=>{}),_f().then(_=>y(_||[])).catch(()=>{})},[]);const x=()=>u({...Ume,_new:!0}),N=async _=>{d(await UI(_))},w=async()=>{const{_new:_,id:C,...P}=c;_?await qI(P):await HI(C,P),u(null),b()},O=async _=>{const C=window.prompt(`피킹 수량 (계획 ${_.planQty})`,String(_.planQty-(_.pickedQty||0)));C!=null&&(await FI(_.id,Number(C)),b(),(f==null?void 0:f.id)===_.id&&N(_.id))},A=async _=>{const C=window.prompt(`패킹 수량 (피킹 ${_.pickedQty})`,String((_.pickedQty||0)-(_.packedQty||0)));C!=null&&(await GI(_.id,Number(C)),b(),(f==null?void 0:f.id)===_.id&&N(_.id))},E=async(_,C)=>{await KI(_.id,C),b(),(f==null?void 0:f.id)===_.id&&N(_.id)},M=async _=>{var C,P;if(window.confirm("출하 확정 시 재고가 차감되고 납품서·거래명세서가 발번됩니다. 진행할까요?"))try{await VI(_.id),b(),d(null)}catch(z){window.alert(((P=(C=z==null?void 0:z.response)==null?void 0:C.data)==null?void 0:P.message)===void 0?"출하 확정 실패":"출하 확정 실패 — 검사 합격 필요 여부를 확인하세요.")}},$=async _=>{window.confirm("취소하시겠습니까?")&&(await YI(_.id),b(),d(null))},k=[{key:"ORDERED",label:"출하지시"},{key:"PICKING",label:"피킹"},{key:"PACKING",label:"패킹"},{key:"INSPECTED",label:"검사완료"},{key:"SHIPPED",label:"출하완료"}],I=_=>(n==null?void 0:n[_])??(n==null?void 0:n[_.toLowerCase()])??0;return s.jsxs("div",{children:[s.jsx(ut,{title:"출하관리 ★",subtitle:"출하지시 · 피킹/패킹 · 출하검사(OQC) · 출하확정(재고감소·납품서·거래명세서)",actions:g&&s.jsxs(V,{onClick:x,children:[s.jsx(ot,{size:16})," 출하지시"]})}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 mb-5",children:k.map(_=>s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[s.jsx("div",{className:"text-xs text-slate-400",children:_.label}),s.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:I(_.key).toLocaleString()})]},_.key))}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:a,onChange:_=>i(_.target.value),children:Bme.map(_=>s.jsx("option",{value:_,children:_||"전체 상태"},_))}),s.jsx("input",{value:l,onChange:_=>o(_.target.value),onKeyDown:_=>_.key==="Enter"&&b(),placeholder:"품목/거래처 검색",className:"inp w-52"}),s.jsx(V,{variant:"ghost",onClick:b,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"출하번호"}),s.jsx("th",{className:"text-left",children:"거래처"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-right",children:"계획/피킹/패킹"}),s.jsx("th",{className:"text-left",children:"검사"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(_=>s.jsxs("tr",{className:"border-t border-edge/50 cursor-pointer hover:bg-panel/40",onClick:()=>N(_.id),children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(um,{size:14,className:"text-brand"}),_.shippingNo]}),s.jsx("td",{className:"text-slate-400 text-xs",children:_.partnerCode}),s.jsx("td",{className:"text-slate-300 text-xs",children:_.itemName||_.itemCode}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:_.lotNo||"-"}),s.jsxs("td",{className:"text-right text-slate-300 text-xs",children:[_.planQty,"/",_.pickedQty||0,"/",_.packedQty||0]}),s.jsx("td",{children:_.inspectionRequired?s.jsx(lt,{status:_.inspectionResult||"WAIT"}):s.jsx("span",{className:"text-slate-500 text-xs",children:"불필요"})}),s.jsx("td",{children:s.jsx(lt,{status:_.status})}),s.jsx("td",{className:"px-4",onClick:C=>C.stopPropagation(),children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[g&&_.status==="ORDERED"&&s.jsx("button",{onClick:()=>O(_),title:"피킹",className:"text-sky-400 hover:text-sky-300",children:s.jsx(aw,{size:15})}),g&&_.status==="PICKING"&&s.jsx("button",{onClick:()=>A(_),title:"패킹",className:"text-violet-400 hover:text-violet-300",children:s.jsx(rw,{size:15})}),g&&_.status==="PACKING"&&_.inspectionRequired&&s.jsx("button",{onClick:()=>E(_,"PASS"),title:"출하검사",className:"text-cyan-400 hover:text-cyan-300",children:s.jsx(bs,{size:15})}),g&&(_.status==="PACKING"||_.status==="INSPECTED")&&s.jsx("button",{onClick:()=>M(_),title:"출하확정",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(iw,{size:15})}),g&&_.status!=="SHIPPED"&&_.status!=="CANCELLED"&&s.jsx("button",{onClick:()=>$(_),title:"취소",className:"text-rose-400 hover:text-rose-300",children:s.jsx(kh,{size:15})})]})})]},_.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"출하 건이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"출하지시 생성",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"거래처(고객)",children:s.jsxs("select",{className:"inp",value:c.partnerCode,onChange:_=>u({...c,partnerCode:_.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(_=>s.jsx("option",{value:_.partnerCode,children:_.partnerName||_.partnerCode},_.id))]})}),s.jsx(L,{label:"주문참조",children:s.jsx("input",{className:"inp",value:c.orderRef,onChange:_=>u({...c,orderRef:_.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:_=>u({...c,itemCode:_.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(_=>s.jsxs("option",{value:_.itemCode,children:[_.itemName," (",_.itemCode,")"]},_.id))]})}),s.jsx(L,{label:"LOT 번호",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:_=>u({...c,lotNo:_.target.value})})})]}),s.jsx(L,{label:"계획 수량",children:s.jsx("input",{type:"number",className:"inp",value:c.planQty,onChange:_=>u({...c,planQty:Number(_.target.value)})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"창고",children:s.jsxs("select",{className:"inp",value:c.warehouseCode,onChange:_=>u({...c,warehouseCode:_.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),p.map(_=>s.jsx("option",{value:_.warehouseCode,children:_.warehouseName||_.warehouseCode},_.id))]})}),s.jsx(L,{label:"로케이션",children:s.jsx("input",{className:"inp",value:c.locationCode,onChange:_=>u({...c,locationCode:_.target.value})})})]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm text-slate-300",children:[s.jsx("input",{type:"checkbox",checked:c.inspectionRequired,onChange:_=>u({...c,inspectionRequired:_.target.checked})}),"출하검사(OQC) 필수"]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:c.remark,onChange:_=>u({...c,remark:_.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:w,children:"저장"})]})]}),f&&s.jsxs(We,{title:`출하 상세 — ${f.shippingNo}`,onClose:()=>d(null),wide:!0,children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[s.jsx(Fn,{label:"거래처",value:f.partnerCode}),s.jsx(Fn,{label:"상태",value:s.jsx(lt,{status:f.status})}),s.jsx(Fn,{label:"품목",value:`${f.itemName||""} (${f.itemCode})`}),s.jsx(Fn,{label:"LOT",value:f.lotNo||"-"}),s.jsx(Fn,{label:"계획 수량",value:f.planQty}),s.jsx(Fn,{label:"피킹/패킹/출하",value:`${f.pickedQty||0} / ${f.packedQty||0} / ${f.shippedQty||0}`}),s.jsx(Fn,{label:"검사 필수",value:f.inspectionRequired?`예 (${f.inspectionResult||"대기"})`:"아니오"}),s.jsx(Fn,{label:"창고/로케이션",value:`${f.warehouseCode||"-"} / ${f.locationCode||"-"}`}),s.jsx(Fn,{label:"납품서",value:f.deliveryNo||"-",icon:s.jsx(tw,{size:13})}),s.jsx(Fn,{label:"거래명세서",value:f.statementNo||"-",icon:s.jsx(tw,{size:13})}),s.jsx(Fn,{label:"출하일",value:f.shipDate||"-"}),s.jsx(Fn,{label:"비고",value:f.remark||"-"})]}),g&&f.status!=="SHIPPED"&&f.status!=="CANCELLED"&&s.jsxs("div",{className:"flex flex-wrap gap-2 mt-5 justify-end",children:[f.status==="ORDERED"&&s.jsxs(V,{variant:"ghost",onClick:()=>O(f),children:[s.jsx(aw,{size:14})," 피킹"]}),f.status==="PICKING"&&s.jsxs(V,{variant:"ghost",onClick:()=>A(f),children:[s.jsx(rw,{size:14})," 패킹"]}),f.status==="PACKING"&&f.inspectionRequired&&s.jsxs(s.Fragment,{children:[s.jsxs(V,{variant:"ghost",onClick:()=>E(f,"PASS"),children:[s.jsx(bs,{size:14})," 검사 합격"]}),s.jsxs(V,{variant:"danger",onClick:()=>E(f,"FAIL"),children:[s.jsx(bs,{size:14})," 검사 불합격"]})]}),(f.status==="PACKING"||f.status==="INSPECTED")&&s.jsxs(V,{onClick:()=>M(f),children:[s.jsx(iw,{size:14})," 출하확정"]}),s.jsxs(V,{variant:"danger",onClick:()=>$(f),children:[s.jsx(kh,{size:14})," 취소"]})]})]})]})}function Fn({label:e,value:t,icon:n}){return s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[s.jsxs("div",{className:"text-[11px] text-slate-500 mb-0.5 flex items-center gap-1",children:[n,e]}),s.jsx("div",{className:"text-slate-200",children:t})]})}function Hme(){const[e,t]=S.useState([]),[n,r]=S.useState([]),[a,i]=S.useState([]),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(null),[h,m]=S.useState([]),[j,v]=S.useState([]),p=Zt(),y=()=>{S8({keyword:l,warehouseCode:c}).then(x=>t(x||[])).catch(()=>t([])),w8().then(x=>r(Array.isArray(x)?x:[])).catch(()=>r([])),N8({limit:30}).then(x=>i(Array.isArray(x)?x:[])).catch(()=>i([]))};S.useEffect(()=>{y()},[c]),S.useEffect(()=>{Jt().then(x=>m(x||[])).catch(()=>{}),_f().then(x=>v(x||[])).catch(()=>{})},[]);const g=()=>d({itemCode:"",fromWarehouse:"",toWarehouse:"",fromLocation:"",toLocation:"",qty:0}),b=async()=>{await O8(f),d(null),y()};return s.jsxs("div",{children:[s.jsx(ut,{title:"재고",subtitle:"로케이션별 재고 · 안전재고 · 재고 이동(transfer) · 수불 원장",actions:p&&s.jsxs(V,{onClick:g,children:[s.jsx(P6,{size:15})," 재고 이동"]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4 mb-5",children:[s.jsx(xe,{title:"안전재고 미달",icon:s.jsx(lr,{size:15,className:"text-amber-400"}),children:s.jsxs("div",{className:"space-y-1.5 max-h-44 overflow-auto",children:[n.map((x,N)=>s.jsxs("div",{className:"flex items-center justify-between bg-amber-500/5 border border-amber-500/20 rounded p-2 text-sm",children:[s.jsx("span",{children:x.itemName||x.itemCode}),s.jsxs("span",{className:"text-amber-400 text-xs",children:[Number(x.qty??x.availableQty??0)," / 안전 ",Number(x.safetyStock??0)]})]},N)),n.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"미달 항목 없음"})]})}),s.jsx(xe,{title:"최근 수불 이력",icon:s.jsx(MT,{size:15}),className:"lg:col-span-2",children:s.jsxs("div",{className:"space-y-1 max-h-44 overflow-auto",children:[a.map((x,N)=>s.jsxs("div",{className:"flex items-center justify-between text-xs border-b border-edge/40 py-1",children:[s.jsx("span",{className:"text-slate-300",children:x.itemName||x.itemCode}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(lt,{status:x.txnType||x.refType}),s.jsxs("span",{className:Number(x.qty)<0?"text-rose-400":"text-emerald-400",children:[Number(x.qty||0)>0?"+":"",Number(x.qty||0).toLocaleString()]}),s.jsx("span",{className:"text-slate-500",children:x.createdAt?new Date(x.createdAt).toLocaleDateString("ko-KR"):""})]})]},N)),a.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"수불 이력 없음"})]})})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsxs("select",{className:"inp w-44",value:c,onChange:x=>u(x.target.value),children:[s.jsx("option",{value:"",children:"전체 창고"}),j.map(x=>s.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]}),s.jsx("input",{value:l,onChange:x=>o(x.target.value),onKeyDown:x=>x.key==="Enter"&&y(),placeholder:"품목 검색",className:"inp w-52"}),s.jsx(V,{variant:"ghost",onClick:y,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"품목"}),s.jsx("th",{className:"text-left",children:"창고"}),s.jsx("th",{className:"text-left",children:"로케이션"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-right",children:"재고수량"}),s.jsx("th",{className:"text-right px-4",children:"안전재고"})]})}),s.jsxs("tbody",{children:[e.map((x,N)=>{const w=Number(x.qty??x.availableQty??0),O=Number(x.safetyStock??0);return s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(Sf,{size:14,className:"text-brand"}),x.itemName||x.itemCode]}),s.jsx("td",{className:"text-slate-400 text-xs",children:x.warehouseCode||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:x.locationCode||"-"}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:x.lotNo||"-"}),s.jsx("td",{className:`text-right font-medium ${O>0&&w<O?"text-amber-400":"text-slate-200"}`,children:w.toLocaleString()}),s.jsx("td",{className:"text-right px-4 text-slate-500",children:O.toLocaleString()})]},x.id??N)}),e.length===0&&s.jsx(Fe,{colSpan:6,msg:"재고가 없습니다."})]})]})}),f&&s.jsxs(We,{title:"재고 이동",onClose:()=>d(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:f.itemCode,onChange:x=>d({...f,itemCode:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(x=>s.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"출발 창고",children:s.jsxs("select",{className:"inp",value:f.fromWarehouse,onChange:x=>d({...f,fromWarehouse:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(x=>s.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]})}),s.jsx(L,{label:"도착 창고",children:s.jsxs("select",{className:"inp",value:f.toWarehouse,onChange:x=>d({...f,toWarehouse:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(x=>s.jsx("option",{value:x.warehouseCode,children:x.warehouseName||x.warehouseCode},x.id))]})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"출발 로케이션",children:s.jsx("input",{className:"inp",value:f.fromLocation,onChange:x=>d({...f,fromLocation:x.target.value})})}),s.jsx(L,{label:"도착 로케이션",children:s.jsx("input",{className:"inp",value:f.toLocation,onChange:x=>d({...f,toLocation:x.target.value})})})]}),s.jsx(L,{label:"이동 수량",children:s.jsx("input",{type:"number",className:"inp",value:f.qty,onChange:x=>d({...f,qty:Number(x.target.value)})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>d(null),children:"취소"}),s.jsx(V,{onClick:b,children:"이동"})]})]})]})}const Fme=["","COUNTED","ADJUSTED"],Gme={itemCode:"",warehouseCode:"",locationCode:"",lotNo:"",countedQty:0,remark:""};function Kme(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),[c,u]=S.useState([]),f=Zt(),d=fr(),h=()=>A8({status:n}).then(p=>t(p||[])).catch(()=>t([]));S.useEffect(()=>{h()},[n]),S.useEffect(()=>{Jt().then(p=>o(p||[])).catch(()=>{}),_f().then(p=>u(p||[])).catch(()=>{})},[]);const m=()=>i({...Gme}),j=async()=>{await C8(a),i(null),h()},v=async p=>{window.confirm("재고를 실사 수량으로 보정하시겠습니까?")&&(await E8(p),h())};return s.jsxs("div",{children:[s.jsx(ut,{title:"재고실사",subtitle:"실사 카운트 · 시스템 재고 대비 차이 계산 · 재고 보정(ADJUST)",actions:f&&s.jsxs(V,{onClick:m,children:[s.jsx(ot,{size:16})," 실사 카운트"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:Fme.map(p=>s.jsx("option",{value:p,children:p||"전체 상태"},p))})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"실사번호"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"창고/로케이션"}),s.jsx("th",{className:"text-right",children:"시스템"}),s.jsx("th",{className:"text-right",children:"실사"}),s.jsx("th",{className:"text-right",children:"차이"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(p=>{const y=Number(p.diffQty??(p.countedQty||0)-(p.systemQty||0));return s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(_T,{size:14,className:"text-brand"}),p.stocktakeNo||p.id]}),s.jsx("td",{className:"text-slate-300 text-xs",children:p.itemName||p.itemCode}),s.jsxs("td",{className:"text-slate-400 text-xs",children:[p.warehouseCode||"-"," / ",p.locationCode||"-"]}),s.jsx("td",{className:"text-right text-slate-300",children:Number(p.systemQty||0).toLocaleString()}),s.jsx("td",{className:"text-right text-slate-300",children:Number(p.countedQty||0).toLocaleString()}),s.jsxs("td",{className:`text-right font-medium ${y===0?"text-slate-400":y>0?"text-emerald-400":"text-rose-400"}`,children:[y>0?"+":"",y.toLocaleString()]}),s.jsx("td",{children:s.jsx(lt,{status:p.status})}),s.jsx("td",{className:"px-4 text-right",children:d&&p.status==="COUNTED"&&s.jsxs("button",{onClick:()=>v(p.id),className:"inline-flex items-center gap-1 text-xs text-brand hover:underline",children:[s.jsx(Nf,{size:12})," 보정"]})})]},p.id)}),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"실사 기록이 없습니다."})]})]})}),a&&s.jsxs(We,{title:"실사 카운트",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:p=>i({...a,itemCode:p.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(p=>s.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"창고",children:s.jsxs("select",{className:"inp",value:a.warehouseCode,onChange:p=>i({...a,warehouseCode:p.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),c.map(p=>s.jsx("option",{value:p.warehouseCode,children:p.warehouseName||p.warehouseCode},p.id))]})}),s.jsx(L,{label:"로케이션",children:s.jsx("input",{className:"inp",value:a.locationCode,onChange:p=>i({...a,locationCode:p.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT",children:s.jsx("input",{className:"inp",value:a.lotNo,onChange:p=>i({...a,lotNo:p.target.value})})}),s.jsx(L,{label:"실사 수량",children:s.jsx("input",{type:"number",className:"inp",value:a.countedQty,onChange:p=>i({...a,countedQty:Number(p.target.value)})})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:a.remark,onChange:p=>i({...a,remark:p.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(V,{onClick:j,children:"카운트"})]})]})]})}const Vme=["","ACTIVE","CONSUMED","SHIPPED","EXPIRED"],Yme=["ACTIVE","CONSUMED","SHIPPED","EXPIRED"],Wme={itemCode:"",lotNo:"",serialNo:"",qty:0,mfgDate:"",expiryDate:"",status:"ACTIVE"};function Qme(){const[e,t]=S.useState([]),[n,r]=S.useState([]),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState([]),h=Zt(),m=()=>{_8({status:a,keyword:l}).then(y=>t(y||[])).catch(()=>t([])),T8(30).then(y=>r(Array.isArray(y)?y:[])).catch(()=>r([]))};S.useEffect(()=>{m()},[a]),S.useEffect(()=>{Jt().then(y=>d(y||[])).catch(()=>{})},[]);const j=()=>u({...Wme}),v=async()=>{await k8(c),u(null),m()},p=async(y,g)=>{await M8(y,g),m()};return s.jsxs("div",{children:[s.jsx(ut,{title:"LOT / 시리얼",subtitle:"LOT·시리얼 추적 · 유효기간 관리",actions:h&&s.jsxs(V,{onClick:j,children:[s.jsx(ot,{size:16})," LOT 등록"]})}),s.jsx(xe,{title:"유효기간 임박 (30일)",icon:s.jsx(M6,{size:15,className:"text-amber-400"}),className:"mb-5",children:s.jsxs("div",{className:"flex flex-wrap gap-2",children:[n.map((y,g)=>s.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/20 rounded-lg px-3 py-2 text-sm",children:[s.jsx("span",{className:"font-mono text-xs text-amber-300",children:y.lotNo}),s.jsxs("span",{className:"text-slate-400 text-xs ml-2",children:[y.itemName||y.itemCode," · ~",y.expiryDate]})]},g)),n.length===0&&s.jsx("p",{className:"text-slate-500 text-sm py-2",children:"임박 LOT 없음"})]})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:a,onChange:y=>i(y.target.value),children:Vme.map(y=>s.jsx("option",{value:y,children:y||"전체 상태"},y))}),s.jsx("input",{value:l,onChange:y=>o(y.target.value),onKeyDown:y=>y.key==="Enter"&&m(),placeholder:"LOT/품목 검색",className:"inp w-52"}),s.jsx(V,{variant:"ghost",onClick:m,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"LOT"}),s.jsx("th",{className:"text-left",children:"시리얼"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"제조"}),s.jsx("th",{className:"text-left",children:"유효"}),s.jsx("th",{className:"text-left px-4",children:"상태"})]})}),s.jsxs("tbody",{children:[e.map(y=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(NT,{size:14,className:"text-brand"}),y.lotNo]}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:y.serialNo||"-"}),s.jsx("td",{className:"text-slate-300 text-xs",children:y.itemName||y.itemCode}),s.jsx("td",{className:"text-right text-slate-300",children:Number(y.qty||0).toLocaleString()}),s.jsx("td",{className:"text-slate-400 text-xs",children:y.mfgDate||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:y.expiryDate||"-"}),s.jsx("td",{className:"px-4",children:h?s.jsx("select",{value:y.status,onChange:g=>p(y.id,g.target.value),className:"px-2 py-1 rounded-md bg-ink border border-edge text-xs focus:border-brand outline-none",children:Yme.map(g=>s.jsx("option",{value:g,children:g},g))}):s.jsx(lt,{status:y.status})})]},y.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"LOT/시리얼이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"LOT / 시리얼 등록",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:y=>u({...c,itemCode:y.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),f.map(y=>s.jsxs("option",{value:y.itemCode,children:[y.itemName," (",y.itemCode,")"]},y.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT 번호",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:y=>u({...c,lotNo:y.target.value})})}),s.jsx(L,{label:"시리얼",children:s.jsx("input",{className:"inp",value:c.serialNo,onChange:y=>u({...c,serialNo:y.target.value})})})]}),s.jsx(L,{label:"수량",children:s.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:y=>u({...c,qty:Number(y.target.value)})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"제조일",children:s.jsx("input",{type:"date",className:"inp",value:c.mfgDate,onChange:y=>u({...c,mfgDate:y.target.value})})}),s.jsx(L,{label:"유효기간",children:s.jsx("input",{type:"date",className:"inp",value:c.expiryDate,onChange:y=>u({...c,expiryDate:y.target.value})})})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:v,children:"저장"})]})]})]})}const Xme=["","IQC","IPQC","OQC"],Zme=["","PASS","FAIL","WAIT"],Jme={inspectionType:"IQC",itemCode:"",lotNo:"",qty:0,remark:""};function eye(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState(null),[h,m]=S.useState([]),j=Zt(),v=()=>{P8({inspectionType:a,result:l}).then(w=>t(w||[])).catch(()=>t([])),$8(30).then(r).catch(()=>{})};S.useEffect(()=>{v()},[a,l]),S.useEffect(()=>{Jt().then(w=>m(w||[])).catch(()=>{})},[]);const p=()=>u({...Jme}),y=async()=>{await R8(c),u(null),v()},g=w=>d({id:w.id,measured:0,lsl:"",usl:"",target:"",defectQty:0,defectCode:""}),b=async()=>{const{id:w,...O}=f;await D8(w,{measured:Number(O.measured),lsl:O.lsl===""?void 0:Number(O.lsl),usl:O.usl===""?void 0:Number(O.usl),target:O.target===""?void 0:Number(O.target),defectQty:Number(O.defectQty),defectCode:O.defectCode||void 0}),d(null),v()},x=async(w,O)=>{let A=0,E="";O==="FAIL"&&(A=Number(window.prompt("불량 수량","1")||0),E=window.prompt("불량 코드","")||""),await L8(w.id,{result:O,defectQty:A,defectCode:E}),v()},N=(n==null?void 0:n.passRate)??(n==null?void 0:n.rate);return s.jsxs("div",{children:[s.jsx(ut,{title:"검사 (IQC / IPQC / OQC)",subtitle:"수입·공정·출하 검사 · 합/불 판정 · FAIL 시 NCR 자동생성",actions:j&&s.jsxs(V,{onClick:p,children:[s.jsx(ot,{size:16})," 검사 등록"]})}),N!=null&&s.jsx(xe,{title:"합격률 (30일)",className:"mb-5",children:s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"text-4xl font-bold text-accent",children:[Number(N).toFixed(1),"%"]}),s.jsxs("div",{className:"text-sm text-slate-400",children:["합격 ",(n==null?void 0:n.passCount)??0," / 전체 ",(n==null?void 0:n.totalCount)??(n==null?void 0:n.total)??0]})]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-32",value:a,onChange:w=>i(w.target.value),children:Xme.map(w=>s.jsx("option",{value:w,children:w||"전체 유형"},w))}),s.jsx("select",{className:"inp w-32",value:l,onChange:w=>o(w.target.value),children:Zme.map(w=>s.jsx("option",{value:w,children:w||"전체 결과"},w))})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"검사번호"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"결과"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(w=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(bs,{size:14,className:"text-brand"}),w.inspectionNo||w.id]}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:w.inspectionType})}),s.jsx("td",{className:"text-slate-300 text-xs",children:w.itemName||w.itemCode}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:w.lotNo||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:Number(w.qty||0).toLocaleString()}),s.jsx("td",{children:s.jsx(lt,{status:w.result||"WAIT"})}),s.jsx("td",{className:"px-4",children:j&&(!w.result||w.result==="WAIT")&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>g(w),title:"AI 판정 보조",className:"text-accent hover:text-accent/80",children:s.jsx(zn,{size:15})}),s.jsx("button",{onClick:()=>x(w,"PASS"),title:"합격",className:"text-emerald-400 hover:text-emerald-300",children:s.jsx(wf,{size:15})}),s.jsx("button",{onClick:()=>x(w,"FAIL"),title:"불합격",className:"text-rose-400 hover:text-rose-300",children:s.jsx(kh,{size:15})})]})})]},w.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"검사 기록이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"검사 등록",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"검사 유형",children:s.jsx("select",{className:"inp",value:c.inspectionType,onChange:w=>u({...c,inspectionType:w.target.value}),children:["IQC","IPQC","OQC"].map(w=>s.jsx("option",{children:w},w))})}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:w=>u({...c,itemCode:w.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),h.map(w=>s.jsxs("option",{value:w.itemCode,children:[w.itemName," (",w.itemCode,")"]},w.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:w=>u({...c,lotNo:w.target.value})})}),s.jsx(L,{label:"검사 수량",children:s.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:w=>u({...c,qty:Number(w.target.value)})})})]}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:c.remark,onChange:w=>u({...c,remark:w.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:y,children:"저장"})]})]}),f&&s.jsxs(We,{title:"검사 판정 (AI 보조)",onClose:()=>d(null),children:[s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:"측정값과 규격(LSL/USL/Target)을 입력하면 PASS/FAIL을 자동 판정합니다. FAIL 시 NCR이 자동 생성됩니다."}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"측정값",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:f.measured,onChange:w=>d({...f,measured:w.target.value})})}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"LSL",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:f.lsl,onChange:w=>d({...f,lsl:w.target.value})})}),s.jsx(L,{label:"Target",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:f.target,onChange:w=>d({...f,target:w.target.value})})}),s.jsx(L,{label:"USL",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:f.usl,onChange:w=>d({...f,usl:w.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"불량 수량",children:s.jsx("input",{type:"number",className:"inp",value:f.defectQty,onChange:w=>d({...f,defectQty:w.target.value})})}),s.jsx(L,{label:"불량 코드",children:s.jsx("input",{className:"inp",value:f.defectCode,onChange:w=>d({...f,defectCode:w.target.value})})})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>d(null),children:"취소"}),s.jsxs(V,{onClick:b,children:[s.jsx(zn,{size:14})," 판정"]})]})]})]})}const tye=["","IQC","IPQC","OQC"],nye={specCode:"",itemCode:"",inspectionType:"IQC",characteristic:"",lsl:"",usl:"",target:"",unit:"",aql:"",items:[]};function rye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),c=fr(),u=()=>z8({inspectionType:n}).then(y=>t(y||[])).catch(()=>t([]));S.useEffect(()=>{u()},[n]),S.useEffect(()=>{Jt().then(y=>o(y||[])).catch(()=>{})},[]);const f=()=>i({...nye,_new:!0}),d=y=>i({...y,items:sj(y.items,[]),_new:!1}),h=async()=>{const{_new:y,id:g,items:b,...x}=a,N={...x,items:lj(b)};y?await I8(N):await B8(g,N),i(null),u()},m=async y=>{window.confirm("삭제하시겠습니까?")&&(await U8(y),u())},j=()=>i(y=>({...y,items:[...y.items,{name:"",lsl:"",usl:"",unit:""}]})),v=(y,g,b)=>i(x=>{const N=[...x.items];return N[y]={...N[y],[g]:b},{...x,items:N}}),p=y=>i(g=>({...g,items:g.items.filter((b,x)=>x!==y)}));return s.jsxs("div",{children:[s.jsx(ut,{title:"검사기준 (Spec)",subtitle:"규격 · LSL/USL/Target · AQL · 동적 검사항목(JSON)",actions:c&&s.jsxs(V,{onClick:f,children:[s.jsx(ot,{size:16})," 검사기준"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-32",value:n,onChange:y=>r(y.target.value),children:tye.map(y=>s.jsx("option",{value:y,children:y||"전체 유형"},y))})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"기준코드"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"특성"}),s.jsx("th",{className:"text-right",children:"LSL"}),s.jsx("th",{className:"text-right",children:"Target"}),s.jsx("th",{className:"text-right",children:"USL"}),s.jsx("th",{className:"text-left",children:"AQL"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(y=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(UT,{size:14,className:"text-brand"}),y.specCode]}),s.jsx("td",{className:"text-slate-300 text-xs",children:y.itemCode}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:y.inspectionType})}),s.jsx("td",{className:"text-slate-400 text-xs",children:y.characteristic||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:y.lsl??"-"}),s.jsx("td",{className:"text-right text-slate-300",children:y.target??"-"}),s.jsx("td",{className:"text-right text-slate-300",children:y.usl??"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:y.aql??"-"}),s.jsx("td",{className:"px-4",children:c&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>d(y),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>m(y.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},y.id)),e.length===0&&s.jsx(Fe,{colSpan:9,msg:"검사기준이 없습니다."})]})]})}),a&&s.jsxs(We,{title:a._new?"검사기준 등록":"검사기준 편집",onClose:()=>i(null),wide:!0,children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"기준코드",children:s.jsx("input",{className:"inp",value:a.specCode,onChange:y=>i({...a,specCode:y.target.value})})}),s.jsx(L,{label:"검사유형",children:s.jsx("select",{className:"inp",value:a.inspectionType,onChange:y=>i({...a,inspectionType:y.target.value}),children:["IQC","IPQC","OQC"].map(y=>s.jsx("option",{children:y},y))})})]}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:y=>i({...a,itemCode:y.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(y=>s.jsxs("option",{value:y.itemCode,children:[y.itemName," (",y.itemCode,")"]},y.id))]})}),s.jsx(L,{label:"특성",children:s.jsx("input",{className:"inp",value:a.characteristic,onChange:y=>i({...a,characteristic:y.target.value})})}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"LSL",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:a.lsl,onChange:y=>i({...a,lsl:y.target.value})})}),s.jsx(L,{label:"Target",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:a.target,onChange:y=>i({...a,target:y.target.value})})}),s.jsx(L,{label:"USL",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:a.usl,onChange:y=>i({...a,usl:y.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"단위",children:s.jsx("input",{className:"inp",value:a.unit,onChange:y=>i({...a,unit:y.target.value})})}),s.jsx(L,{label:"AQL",children:s.jsx("input",{className:"inp",value:a.aql,onChange:y=>i({...a,aql:y.target.value})})})]})]}),s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-semibold",children:"동적 검사항목"}),s.jsxs(V,{size:"sm",variant:"ghost",onClick:j,children:[s.jsx(ot,{size:13})," 항목"]})]}),a.items.length===0&&s.jsx("p",{className:"text-center text-slate-500 text-xs py-6 border border-dashed border-edge rounded",children:"검사항목을 추가하세요."}),s.jsx("div",{className:"space-y-2 max-h-72 overflow-auto",children:a.items.map((y,g)=>s.jsxs("div",{className:"bg-panel border border-edge rounded p-2",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsxs("span",{className:"text-[11px] text-brand",children:["항목 #",g+1]}),s.jsx("button",{onClick:()=>p(g),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:12})})]}),s.jsx("input",{placeholder:"항목명",className:"inp text-xs mb-1.5",value:y.name||"",onChange:b=>v(g,"name",b.target.value)}),s.jsxs("div",{className:"grid grid-cols-3 gap-1.5",children:[s.jsx("input",{placeholder:"LSL",className:"inp text-xs",value:y.lsl||"",onChange:b=>v(g,"lsl",b.target.value)}),s.jsx("input",{placeholder:"USL",className:"inp text-xs",value:y.usl||"",onChange:b=>v(g,"usl",b.target.value)}),s.jsx("input",{placeholder:"단위",className:"inp text-xs",value:y.unit||"",onChange:b=>v(g,"unit",b.target.value)})]})]},g))})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(V,{onClick:h,children:"저장"})]})]})]})}const aye=["","OPEN","REVIEW","DISPOSITIONED","CLOSED"],iye=["","MINOR","MAJOR","CRITICAL"],sye=["USE_AS_IS","REWORK","SCRAP","RETURN"],lye={itemCode:"",lotNo:"",defectCode:"",severity:"MINOR",qty:0,description:""},Rv={OPEN:"REVIEW",REVIEW:"DISPOSITIONED",DISPOSITIONED:"CLOSED"};function oye(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),[f,d]=S.useState([]),h=Zt(),m=()=>{q8({status:a,severity:l}).then(x=>t(x||[])).catch(()=>t([])),H8().then(r).catch(()=>{})};S.useEffect(()=>{m()},[a,l]),S.useEffect(()=>{Jt().then(x=>d(x||[])).catch(()=>{})},[]);const j=()=>u({...lye}),v=async()=>{await F8(c),u(null),m()},p=async x=>{const N=window.prompt(`처리 방식 (${sye.join("/")})`,"REWORK");N&&(await G8(x.id,N),m())},y=async x=>{const N=Rv[x.status];N&&(await K8(x.id,N),m())},g=["OPEN","REVIEW","DISPOSITIONED","CLOSED"],b=x=>(n==null?void 0:n[x])??(n==null?void 0:n[x.toLowerCase()])??0;return s.jsxs("div",{children:[s.jsx(ut,{title:"부적합 NCR",subtitle:"부적합 보고 · 처리(USE_AS_IS/REWORK/SCRAP/RETURN) · CAPA 연계",actions:h&&s.jsxs(V,{onClick:j,children:[s.jsx(ot,{size:16})," NCR 등록"]})}),s.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-5",children:g.map(x=>s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4 text-center",children:[s.jsx("div",{className:"text-xs text-slate-400",children:x}),s.jsx("div",{className:"text-2xl font-bold mt-1 text-brand",children:b(x).toLocaleString()})]},x))}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:a,onChange:x=>i(x.target.value),children:aye.map(x=>s.jsx("option",{value:x,children:x||"전체 상태"},x))}),s.jsx("select",{className:"inp w-32",value:l,onChange:x=>o(x.target.value),children:iye.map(x=>s.jsx("option",{value:x,children:x||"전체 심각도"},x))})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"NCR"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"불량코드"}),s.jsx("th",{className:"text-left",children:"심각도"}),s.jsx("th",{className:"text-right",children:"수량"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(x=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(lr,{size:14,className:"text-rose-400"}),x.ncrNo||x.id]}),s.jsx("td",{className:"text-slate-300 text-xs",children:x.itemName||x.itemCode}),s.jsx("td",{className:"text-slate-400 text-xs",children:x.defectCode||"-"}),s.jsx("td",{children:s.jsx(lt,{status:x.severity})}),s.jsx("td",{className:"text-right text-slate-300",children:Number(x.qty||0).toLocaleString()}),s.jsx("td",{children:s.jsx(lt,{status:x.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[h&&x.status==="REVIEW"&&s.jsx("button",{onClick:()=>p(x),className:"text-xs text-brand hover:underline",children:"처리방식"}),h&&Rv[x.status]&&s.jsxs("button",{onClick:()=>y(x),className:"text-xs text-brand hover:underline",children:["→ ",Rv[x.status]]})]})})]},x.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"부적합이 없습니다."})]})]})}),c&&s.jsxs(We,{title:"부적합 NCR 등록",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:c.itemCode,onChange:x=>u({...c,itemCode:x.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),f.map(x=>s.jsxs("option",{value:x.itemCode,children:[x.itemName," (",x.itemCode,")"]},x.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT",children:s.jsx("input",{className:"inp",value:c.lotNo,onChange:x=>u({...c,lotNo:x.target.value})})}),s.jsx(L,{label:"불량코드",children:s.jsx("input",{className:"inp",value:c.defectCode,onChange:x=>u({...c,defectCode:x.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"심각도",children:s.jsx("select",{className:"inp",value:c.severity,onChange:x=>u({...c,severity:x.target.value}),children:["MINOR","MAJOR","CRITICAL"].map(x=>s.jsx("option",{children:x},x))})}),s.jsx(L,{label:"수량",children:s.jsx("input",{type:"number",className:"inp",value:c.qty,onChange:x=>u({...c,qty:Number(x.target.value)})})})]}),s.jsx(L,{label:"설명",children:s.jsx("textarea",{className:"inp",value:c.description,onChange:x=>u({...c,description:x.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:v,children:"저장"})]})]})]})}const cye=["","OPEN","INPROGRESS","VERIFY","CLOSED"],uye=["","CORRECTIVE","PREVENTIVE"],Dv={OPEN:"INPROGRESS",INPROGRESS:"VERIFY",VERIFY:"CLOSED"},fye={ncrNo:"",title:"",capaType:"CORRECTIVE",rootCause:"",actionPlan:"",owner:"",dueDate:""};function dye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(null),c=Zt(),u=()=>V8({status:n,capaType:a}).then(m=>t(m||[])).catch(()=>t([]));S.useEffect(()=>{u()},[n,a]);const f=()=>o({...fye,_new:!0}),d=async()=>{const{_new:m,id:j,...v}=l;m?await Y8(v):await W8(j,v),o(null),u()},h=async m=>{const j=Dv[m.status];if(!j)return;let v;j==="CLOSED"&&(v=window.prompt("효과성 평가 (예: EFFECTIVE/INEFFECTIVE)","EFFECTIVE")||void 0),await Q8(m.id,{status:j,effectiveness:v}),u()};return s.jsxs("div",{children:[s.jsx(ut,{title:"시정조치 CAPA",subtitle:"시정·예방조치(8D) · 근본원인 · 조치계획 · 효과성 검증",actions:c&&s.jsxs(V,{onClick:f,children:[s.jsx(ot,{size:16})," CAPA 등록"]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:n,onChange:m=>r(m.target.value),children:cye.map(m=>s.jsx("option",{value:m,children:m||"전체 상태"},m))}),s.jsx("select",{className:"inp w-40",value:a,onChange:m=>i(m.target.value),children:uye.map(m=>s.jsx("option",{value:m,children:m||"전체 유형"},m))})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"CAPA"}),s.jsx("th",{className:"text-left",children:"제목"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"NCR"}),s.jsx("th",{className:"text-left",children:"담당"}),s.jsx("th",{className:"text-left",children:"기한"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(m=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(PT,{size:14,className:"text-brand"}),m.capaNo||m.id]}),s.jsx("td",{className:"text-slate-300 text-xs max-w-[220px] truncate",children:m.title}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:m.capaType})}),s.jsx("td",{className:"text-slate-400 text-xs",children:m.ncrNo||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:m.owner||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:m.dueDate||"-"}),s.jsx("td",{children:s.jsx(lt,{status:m.status})}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c&&s.jsx("button",{onClick:()=>o({...m,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),c&&Dv[m.status]&&s.jsxs("button",{onClick:()=>h(m),className:"text-xs text-brand hover:underline",children:["→ ",Dv[m.status]]})]})})]},m.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"CAPA가 없습니다."})]})]})}),l&&s.jsxs(We,{title:l._new?"CAPA 등록":"CAPA 편집",onClose:()=>o(null),wide:!0,children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"제목",children:s.jsx("input",{className:"inp",value:l.title,onChange:m=>o({...l,title:m.target.value})})}),s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:l.capaType,onChange:m=>o({...l,capaType:m.target.value}),children:["CORRECTIVE","PREVENTIVE"].map(m=>s.jsx("option",{children:m},m))})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"연계 NCR",children:s.jsx("input",{className:"inp",value:l.ncrNo,onChange:m=>o({...l,ncrNo:m.target.value})})}),s.jsx(L,{label:"담당자",children:s.jsx("input",{className:"inp",value:l.owner,onChange:m=>o({...l,owner:m.target.value})})}),s.jsx(L,{label:"기한",children:s.jsx("input",{type:"date",className:"inp",value:l.dueDate||"",onChange:m=>o({...l,dueDate:m.target.value})})})]}),s.jsx(L,{label:"근본 원인 (Root Cause)",children:s.jsx("textarea",{className:"inp",value:l.rootCause,onChange:m=>o({...l,rootCause:m.target.value})})}),s.jsx(L,{label:"조치 계획 (Action Plan)",children:s.jsx("textarea",{className:"inp",value:l.actionPlan,onChange:m=>o({...l,actionPlan:m.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>o(null),children:"취소"}),s.jsx(V,{onClick:d,children:"저장"})]})]})]})}const Od={fontSize:11,fill:"#94a3b8"},TA={background:"#0f172a",border:"1px solid #26304a",borderRadius:8,fontSize:12,color:"#e2e8f0"},hye={chartCode:"",itemCode:"",characteristic:"",subgroupNo:1,values:""};function pye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState([]),[l,o]=S.useState(null),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(null),[j,v]=S.useState([]),p=Zt(),y=()=>X8().then(A=>{const E=A||[];t(E),!n&&E.length&&r(E[0].chartCode)}).catch(()=>t([]));S.useEffect(()=>{y(),Jt().then(A=>v(A||[])).catch(()=>{})},[]);const g=()=>{n&&(Z8({chartCode:n,limit:50}).then(A=>i(Array.isArray(A)?A:[])).catch(()=>i([])),J8({chartCode:n,lsl:c===""?void 0:Number(c),usl:f===""?void 0:Number(f)}).then(o).catch(()=>o(null)))};S.useEffect(()=>{g()},[n]);const b=()=>m({...hye,chartCode:n}),x=async()=>{const A=h.values.split(/[,\s]+/).map(E=>Number(E)).filter(E=>!isNaN(E));await eB({chartCode:h.chartCode,itemCode:h.itemCode,characteristic:h.characteristic,subgroupNo:Number(h.subgroupNo),values:A}),m(null),g()},N=a.map((A,E)=>({name:A.subgroupNo??E+1,xbar:Number(A.mean??A.xbar??A.average??0),range:Number(A.range??A.r??0)})),w=l||{},O=Array.isArray(w.violations)?w.violations:[];return s.jsxs("div",{children:[s.jsx(ut,{title:"SPC 관리도",subtitle:"Xbar-R 관리한계 · Cp/Cpk 공정능력 · Western Electric 이상감지",actions:p&&n&&s.jsxs(V,{onClick:b,children:[s.jsx(ot,{size:16})," 샘플 추가"]})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-5",children:[s.jsxs("select",{className:"inp w-56",value:n,onChange:A=>r(A.target.value),children:[s.jsx("option",{value:"",children:"관리도 선택"}),e.map(A=>s.jsxs("option",{value:A.chartCode,children:[A.chartCode," · ",A.characteristic||A.itemCode]},A.chartCode||A.id))]}),s.jsx("input",{className:"inp w-24",placeholder:"LSL",value:c,onChange:A=>u(A.target.value)}),s.jsx("input",{className:"inp w-24",placeholder:"USL",value:f,onChange:A=>d(A.target.value)}),s.jsx(V,{variant:"ghost",onClick:g,children:"분석"})]}),n?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 mb-5",children:[s.jsx(Ad,{label:"X̄ (전체평균)",value:Cd(w.xbar)}),s.jsx(Ad,{label:"R̄ (평균범위)",value:Cd(w.rbar)}),s.jsx(Ad,{label:"Cp",value:Cd(w.cp),color:"text-sky-400"}),s.jsx(Ad,{label:"Cpk",value:Cd(w.cpk),color:"text-accent"}),s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsx("div",{className:"text-xs text-slate-400",children:"공정능력 등급"}),s.jsx("div",{className:"mt-2",children:s.jsx(lt,{status:w.capabilityGrade||"-"})})]})]}),w.anomaly&&s.jsxs("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4 flex items-center gap-2",children:[s.jsx(lr,{size:16})," 이상 패턴 감지됨 (Western Electric Rules)",O.length?` — 위반 ${O.length}건`:""]}),s.jsx(xe,{title:"X̄ 관리도 (Xbar Chart)",icon:s.jsx(Gb,{size:15}),className:"mb-4",children:N.length===0?s.jsx(Fe,{msg:"샘플이 없습니다."}):s.jsx(xl,{width:"100%",height:280,children:s.jsxs(OA,{data:N,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Ar,{dataKey:"name",tick:Od}),s.jsx(Cr,{tick:Od,domain:["auto","auto"]}),s.jsx(tn,{contentStyle:TA}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),w.xbarUcl!=null&&s.jsx(fa,{y:Number(w.xbarUcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"UCL",fontSize:10,fill:"#ef4444",position:"right"}}),w.xbar!=null&&s.jsx(fa,{y:Number(w.xbar),stroke:"#3ddc97",label:{value:"CL",fontSize:10,fill:"#3ddc97",position:"right"}}),w.xbarLcl!=null&&s.jsx(fa,{y:Number(w.xbarLcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"LCL",fontSize:10,fill:"#ef4444",position:"right"}}),s.jsx(Mi,{type:"monotone",dataKey:"xbar",name:"X̄",stroke:"#00a0c8",strokeWidth:2,dot:{r:3}})]})})}),s.jsx(xe,{title:"R 관리도 (Range Chart)",children:N.length===0?s.jsx(Fe,{msg:"샘플이 없습니다."}):s.jsx(xl,{width:"100%",height:240,children:s.jsxs(OA,{data:N,children:[s.jsx(Rl,{strokeDasharray:"3 3",stroke:"#26304a"}),s.jsx(Ar,{dataKey:"name",tick:Od}),s.jsx(Cr,{tick:Od,domain:["auto","auto"]}),s.jsx(tn,{contentStyle:TA}),s.jsx(tr,{wrapperStyle:{fontSize:11}}),w.rUcl!=null&&s.jsx(fa,{y:Number(w.rUcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"UCL",fontSize:10,fill:"#ef4444",position:"right"}}),w.rbar!=null&&s.jsx(fa,{y:Number(w.rbar),stroke:"#3ddc97",label:{value:"R̄",fontSize:10,fill:"#3ddc97",position:"right"}}),w.rLcl!=null&&s.jsx(fa,{y:Number(w.rLcl),stroke:"#ef4444",strokeDasharray:"4 4",label:{value:"LCL",fontSize:10,fill:"#ef4444",position:"right"}}),s.jsx(Mi,{type:"monotone",dataKey:"range",name:"R",stroke:"#f59e0b",strokeWidth:2,dot:{r:3}})]})})})]}):s.jsx(Fe,{msg:"관리도를 선택하세요."}),h&&s.jsxs(We,{title:"SPC 샘플 추가",onClose:()=>m(null),children:[s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:"서브그룹 측정값을 입력하면 평균/범위가 자동 계산됩니다."}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"관리도 코드",children:s.jsx("input",{className:"inp",value:h.chartCode,onChange:A=>m({...h,chartCode:A.target.value})})}),s.jsx(L,{label:"서브그룹 번호",children:s.jsx("input",{type:"number",className:"inp",value:h.subgroupNo,onChange:A=>m({...h,subgroupNo:A.target.value})})})]}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:h.itemCode,onChange:A=>m({...h,itemCode:A.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),j.map(A=>s.jsxs("option",{value:A.itemCode,children:[A.itemName," (",A.itemCode,")"]},A.id))]})}),s.jsx(L,{label:"특성",children:s.jsx("input",{className:"inp",value:h.characteristic,onChange:A=>m({...h,characteristic:A.target.value})})}),s.jsx(L,{label:"측정값 (콤마/공백 구분)",hint:"예: 10.1, 10.0, 9.9, 10.2, 10.0",children:s.jsx("input",{className:"inp",value:h.values,onChange:A=>m({...h,values:A.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>m(null),children:"취소"}),s.jsxs(V,{onClick:x,children:[s.jsx(zn,{size:14})," 추가"]})]})]})]})}function Ad({label:e,value:t,color:n="text-slate-200"}){return s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-4",children:[s.jsx("div",{className:"text-xs text-slate-400",children:e}),s.jsx("div",{className:`text-2xl font-bold mt-1 ${n}`,children:t})]})}function Cd(e){return e==null?"-":Number(e).toFixed(3)}const mye=["","COA","MSDS","TEST_REPORT"],yye={certType:"COA",itemCode:"",lotNo:"",partnerCode:"",content:""};function vye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState(null),[c,u]=S.useState([]),f=Zt(),d=()=>tB({certType:n}).then(v=>t(v||[])).catch(()=>t([]));S.useEffect(()=>{d()},[n]),S.useEffect(()=>{Jt().then(v=>u(v||[])).catch(()=>{})},[]);const h=()=>i({...yye}),m=async()=>{await rB(a),i(null),d()},j=async v=>o(await nB(v));return s.jsxs("div",{children:[s.jsx(ut,{title:"성적서 (Certificate)",subtitle:"COA · MSDS · 시험성적서 (content JSON)",actions:f&&s.jsxs(V,{onClick:h,children:[s.jsx(ot,{size:16})," 성적서 발행"]})}),s.jsx("div",{className:"flex items-center gap-2 mb-4",children:s.jsx("select",{className:"inp w-40",value:n,onChange:v=>r(v.target.value),children:mye.map(v=>s.jsx("option",{value:v,children:v||"전체 유형"},v))})}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"성적서번호"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"LOT"}),s.jsx("th",{className:"text-left",children:"거래처"}),s.jsx("th",{className:"text-left",children:"발행일"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(v=>s.jsxs("tr",{className:"border-t border-edge/50 cursor-pointer hover:bg-panel/40",onClick:()=>j(v.id),children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(kT,{size:14,className:"text-brand"}),v.certNo||v.id]}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:v.certType})}),s.jsx("td",{className:"text-slate-300 text-xs",children:v.itemName||v.itemCode}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:v.lotNo||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:v.partnerCode||"-"}),s.jsx("td",{className:"text-slate-500 text-xs",children:v.createdAt?new Date(v.createdAt).toLocaleDateString("ko-KR"):"-"}),s.jsx("td",{className:"px-4 text-right",onClick:p=>p.stopPropagation(),children:s.jsx("button",{onClick:()=>j(v.id),className:"text-slate-400 hover:text-brand",children:s.jsx(TT,{size:15})})})]},v.id)),e.length===0&&s.jsx(Fe,{colSpan:7,msg:"성적서가 없습니다."})]})]})}),a&&s.jsxs(We,{title:"성적서 발행",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:a.certType,onChange:v=>i({...a,certType:v.target.value}),children:["COA","MSDS","TEST_REPORT"].map(v=>s.jsx("option",{children:v},v))})}),s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:v=>i({...a,itemCode:v.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),c.map(v=>s.jsxs("option",{value:v.itemCode,children:[v.itemName," (",v.itemCode,")"]},v.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"LOT",children:s.jsx("input",{className:"inp",value:a.lotNo,onChange:v=>i({...a,lotNo:v.target.value})})}),s.jsx(L,{label:"거래처",children:s.jsx("input",{className:"inp",value:a.partnerCode,onChange:v=>i({...a,partnerCode:v.target.value})})})]}),s.jsx(L,{label:"내용 (JSON)",hint:'예: {"검사항목":"인장강도","결과":"450MPa","판정":"합격"}',children:s.jsx("textarea",{className:"inp font-mono text-xs",rows:5,value:a.content,onChange:v=>i({...a,content:v.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(V,{onClick:m,children:"발행"})]})]}),l&&s.jsxs(We,{title:`성적서 — ${l.certNo||l.id}`,onClose:()=>o(null),wide:!0,children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm mb-4",children:[s.jsx(Ed,{label:"유형",value:l.certType}),s.jsx(Ed,{label:"품목",value:`${l.itemName||""} (${l.itemCode})`}),s.jsx(Ed,{label:"LOT",value:l.lotNo||"-"}),s.jsx(Ed,{label:"거래처",value:l.partnerCode||"-"})]}),s.jsxs("div",{className:"bg-ink border border-edge rounded p-3",children:[s.jsx("div",{className:"text-[11px] text-slate-500 mb-1",children:"내용"}),s.jsx("pre",{className:"text-xs text-slate-300 whitespace-pre-wrap",children:lj(sj(l.content,l.content))||"-"})]})]})]})}function Ed({label:e,value:t}){return s.jsxs("div",{className:"bg-panel border border-edge rounded-lg p-2.5",children:[s.jsx("div",{className:"text-[11px] text-slate-500 mb-0.5",children:e}),s.jsx("div",{className:"text-slate-200",children:t})]})}const gye=["","RAW","SEMI","PRODUCT","SUBSIDIARY"],xye=["","ACTIVE","INACTIVE"],bye={itemCode:"",itemName:"",itemType:"PRODUCT",unit:"EA",barcode:"",spec:"",safetyStock:0,warehouseCode:"",attributes:"",status:"ACTIVE"};function jye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),f=fr(),d=()=>Jt({itemType:n,status:a,keyword:l}).then(p=>t(p||[])).catch(()=>t([]));S.useEffect(()=>{d()},[n,a]);const h=()=>u({...bye,_new:!0}),m=p=>u({...p,attributes:lj(sj(p.attributes,{})),_new:!1}),j=async()=>{const{_new:p,id:y,...g}=c;p?await aB(g):await iB(y,g),u(null),d()},v=async p=>{window.confirm("삭제하시겠습니까?")&&(await sB(p),d())};return s.jsxs("div",{children:[s.jsx(ut,{title:"품목",subtitle:"자재 · 반제품 · 제품 · 부자재 · 바코드 · 안전재고 · 속성(JSON)",actions:f&&s.jsxs(V,{onClick:h,children:[s.jsx(ot,{size:16})," 품목"]})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:gye.map(p=>s.jsx("option",{value:p,children:p||"전체 유형"},p))}),s.jsx("select",{className:"inp w-32",value:a,onChange:p=>i(p.target.value),children:xye.map(p=>s.jsx("option",{value:p,children:p||"전체 상태"},p))}),s.jsx("input",{value:l,onChange:p=>o(p.target.value),onKeyDown:p=>p.key==="Enter"&&d(),placeholder:"품목 검색",className:"inp w-52"}),s.jsx(V,{variant:"ghost",onClick:d,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),s.jsx("th",{className:"text-left",children:"품목명"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"단위"}),s.jsx("th",{className:"text-left",children:"바코드"}),s.jsx("th",{className:"text-right",children:"안전재고"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(LT,{size:14,className:"text-brand"}),p.itemCode]}),s.jsx("td",{className:"text-slate-300",children:p.itemName}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:p.itemType})}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.unit}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.barcode||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:Number(p.safetyStock||0).toLocaleString()}),s.jsx("td",{children:s.jsx(lt,{status:p.status})}),s.jsx("td",{className:"px-4",children:f&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>m(p),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>v(p.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},p.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"품목이 없습니다."})]})]})}),c&&s.jsxs(We,{title:c._new?"품목 등록":"품목 편집",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"품목코드",children:s.jsx("input",{className:"inp",value:c.itemCode,onChange:p=>u({...c,itemCode:p.target.value}),disabled:!c._new})}),s.jsx(L,{label:"품목명",children:s.jsx("input",{className:"inp",value:c.itemName,onChange:p=>u({...c,itemName:p.target.value})})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:c.itemType,onChange:p=>u({...c,itemType:p.target.value}),children:["RAW","SEMI","PRODUCT","SUBSIDIARY"].map(p=>s.jsx("option",{children:p},p))})}),s.jsx(L,{label:"단위",children:s.jsx("input",{className:"inp",value:c.unit,onChange:p=>u({...c,unit:p.target.value})})}),s.jsx(L,{label:"안전재고",children:s.jsx("input",{type:"number",className:"inp",value:c.safetyStock,onChange:p=>u({...c,safetyStock:Number(p.target.value)})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"바코드",children:s.jsx("input",{className:"inp",value:c.barcode,onChange:p=>u({...c,barcode:p.target.value})})}),s.jsx(L,{label:"기본 창고",children:s.jsx("input",{className:"inp",value:c.warehouseCode,onChange:p=>u({...c,warehouseCode:p.target.value})})})]}),s.jsx(L,{label:"규격(spec)",children:s.jsx("input",{className:"inp",value:c.spec,onChange:p=>u({...c,spec:p.target.value})})}),s.jsx(L,{label:"속성 (JSON)",hint:'예: {"color":"red","grade":"A"}',children:s.jsx("textarea",{className:"inp font-mono text-xs",rows:3,value:c.attributes,onChange:p=>u({...c,attributes:p.target.value})})}),!c._new&&s.jsx(L,{label:"상태",children:s.jsx("select",{className:"inp",value:c.status,onChange:p=>u({...c,status:p.target.value}),children:["ACTIVE","INACTIVE"].map(p=>s.jsx("option",{children:p},p))})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:j,children:"저장"})]})]})]})}const Sye={parentItemCode:"",childItemCode:"",qtyPer:1,seq:1,lossRate:0,bomVersion:"v1"};function wye(e,t){const n={};e.forEach(a=>{(n[a.parentItemCode]=n[a.parentItemCode]||[]).push(a)});const r=(a,i,l)=>l.has(a)||i>8?[]:(l.add(a),(n[a]||[]).flatMap(o=>[{...o,depth:i},...r(o.childItemCode,i+1,new Set(l))]));return r(t,0,new Set)}function Nye(){const[e,t]=S.useState(""),[n,r]=S.useState(""),[a,i]=S.useState([]),[l,o]=S.useState([]),[c,u]=S.useState(null),[f,d]=S.useState([]),h=fr(),m=()=>oB().then(b=>o(Array.isArray(b)?b:[])).catch(()=>o([])),j=()=>{if(!e){i([]);return}lB({parentItemCode:e,bomVersion:n}).then(b=>{const x=Array.isArray(b)?b:(b==null?void 0:b.rows)||(b==null?void 0:b.nodes)||[];i(x.some(N=>N.depth!=null)?x:wye(x,e))}).catch(()=>i([]))};S.useEffect(()=>{m(),Jt().then(b=>d(b||[])).catch(()=>{})},[]),S.useEffect(()=>{j()},[e,n]);const v=()=>u({...Sye,parentItemCode:e,_new:!0}),p=async()=>{const{_new:b,id:x,...N}=c;b?await cB(N):await uB(x,N),u(null),m(),j()},y=async b=>{window.confirm("삭제하시겠습니까?")&&(await fB(b),m(),j())},g=f.filter(b=>["PRODUCT","SEMI"].includes(b.itemType));return s.jsxs("div",{children:[s.jsx(ut,{title:"BOM",subtitle:"자재 구성(Bill of Materials) · 소요량 · 버전 · 트리 전개",actions:h&&s.jsxs(V,{onClick:v,children:[s.jsx(ot,{size:16})," BOM 행"]})}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-5",children:[s.jsxs("select",{className:"inp w-56",value:e,onChange:b=>t(b.target.value),children:[s.jsx("option",{value:"",children:"상위 품목 선택"}),g.map(b=>s.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]}),s.jsx("input",{className:"inp w-28",placeholder:"버전",value:n,onChange:b=>r(b.target.value)}),s.jsxs(V,{variant:"ghost",onClick:j,children:[s.jsx(Vo,{size:15})," 전개"]})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden mb-6",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"구성 (트리)"}),s.jsx("th",{className:"text-left",children:"하위 품목"}),s.jsx("th",{className:"text-right",children:"소요량"}),s.jsx("th",{className:"text-right",children:"손실률"}),s.jsx("th",{className:"text-left",children:"버전"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[a.map((b,x)=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-2.5 px-4",style:{paddingLeft:16+(b.depth||0)*20},children:s.jsxs("span",{className:"flex items-center gap-1 text-slate-300",children:[s.jsx(ET,{size:12,className:"text-brand"}),b.childItemName||b.childItemCode]})}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:b.childItemCode}),s.jsx("td",{className:"text-right text-slate-300",children:b.qtyPer}),s.jsx("td",{className:"text-right text-slate-400 text-xs",children:b.lossRate!=null?`${b.lossRate}%`:"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:b.bomVersion||"-"}),s.jsx("td",{className:"px-4",children:h&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>u({...b,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>y(b.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},b.id??x)),a.length===0&&s.jsx(Fe,{colSpan:6,msg:e?"구성이 없습니다.":"상위 품목을 선택하면 BOM 트리가 전개됩니다."})]})]})}),s.jsxs("h3",{className:"text-sm font-semibold mb-2 flex items-center gap-1.5",children:[s.jsx($T,{size:15,className:"text-brand"})," 전체 BOM"]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"상위"}),s.jsx("th",{className:"text-left",children:"하위"}),s.jsx("th",{className:"text-right",children:"소요량"}),s.jsx("th",{className:"text-left",children:"버전"})]})}),s.jsxs("tbody",{children:[l.slice(0,100).map(b=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-2.5 px-4 text-slate-300",children:b.parentItemCode}),s.jsx("td",{className:"text-slate-400",children:b.childItemCode}),s.jsx("td",{className:"text-right text-slate-300",children:b.qtyPer}),s.jsx("td",{className:"text-slate-400 text-xs",children:b.bomVersion||"-"})]},b.id)),l.length===0&&s.jsx(Fe,{colSpan:4,msg:"BOM이 없습니다."})]})]})}),c&&s.jsxs(We,{title:c._new?"BOM 행 추가":"BOM 행 편집",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"상위 품목",children:s.jsxs("select",{className:"inp",value:c.parentItemCode,onChange:b=>u({...c,parentItemCode:b.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),g.map(b=>s.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]})}),s.jsx(L,{label:"하위 품목",children:s.jsxs("select",{className:"inp",value:c.childItemCode,onChange:b=>u({...c,childItemCode:b.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),f.map(b=>s.jsxs("option",{value:b.itemCode,children:[b.itemName," (",b.itemCode,")"]},b.id))]})}),s.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[s.jsx(L,{label:"소요량",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:c.qtyPer,onChange:b=>u({...c,qtyPer:Number(b.target.value)})})}),s.jsx(L,{label:"순서",children:s.jsx("input",{type:"number",className:"inp",value:c.seq,onChange:b=>u({...c,seq:Number(b.target.value)})})}),s.jsx(L,{label:"손실률(%)",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:c.lossRate,onChange:b=>u({...c,lossRate:Number(b.target.value)})})})]}),s.jsx(L,{label:"버전",children:s.jsx("input",{className:"inp",value:c.bomVersion,onChange:b=>u({...c,bomVersion:b.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:p,children:"저장"})]})]})]})}const Oye={itemCode:"",opSeq:1,processCode:"",processName:"",equipmentCode:"",stdTimeMin:0};function Aye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState([]),[c,u]=S.useState([]),f=fr(),d=()=>dB(n).then(p=>t(p||[])).catch(()=>t([]));S.useEffect(()=>{d()},[n]),S.useEffect(()=>{Jt({itemType:"PRODUCT"}).then(p=>o(p||[])).catch(()=>{}),e1().then(p=>u(p||[])).catch(()=>{})},[]);const h=()=>i({...Oye,itemCode:n,_new:!0}),m=async()=>{const{_new:p,id:y,...g}=a;p?await hB(g):await pB(y,g),i(null),d()},j=async p=>{window.confirm("삭제하시겠습니까?")&&(await mB(p),d())},v=[...e].sort((p,y)=>(p.opSeq||0)-(y.opSeq||0));return s.jsxs("div",{children:[s.jsx(ut,{title:"라우팅",subtitle:"공정 순서 · 표준시간 · 설비 매핑",actions:f&&s.jsxs(V,{onClick:h,children:[s.jsx(ot,{size:16})," 공정"]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsxs("select",{className:"inp w-56",value:n,onChange:p=>r(p.target.value),children:[s.jsx("option",{value:"",children:"전체 / 품목 선택"}),l.map(p=>s.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]}),s.jsxs(V,{variant:"ghost",onClick:d,children:[s.jsx(Vo,{size:15})," 조회"]})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"순서"}),s.jsx("th",{className:"text-left",children:"품목"}),s.jsx("th",{className:"text-left",children:"공정코드"}),s.jsx("th",{className:"text-left",children:"공정명"}),s.jsx("th",{className:"text-left",children:"설비"}),s.jsx("th",{className:"text-right",children:"표준시간(분)"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[v.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(BT,{size:14,className:"text-brand"}),p.opSeq]}),s.jsx("td",{className:"text-slate-300 text-xs",children:p.itemCode}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.processCode}),s.jsx("td",{className:"text-slate-300 text-xs",children:p.processName||"-"}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.equipmentCode||"-"}),s.jsx("td",{className:"text-right text-slate-300",children:p.stdTimeMin??"-"}),s.jsx("td",{className:"px-4",children:f&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>i({...p,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>j(p.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},p.id)),v.length===0&&s.jsx(Fe,{colSpan:7,msg:"라우팅이 없습니다."})]})]})}),a&&s.jsxs(We,{title:a._new?"공정 추가":"공정 편집",onClose:()=>i(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"품목",children:s.jsxs("select",{className:"inp",value:a.itemCode,onChange:p=>i({...a,itemCode:p.target.value}),children:[s.jsx("option",{value:"",children:"선택"}),l.map(p=>s.jsxs("option",{value:p.itemCode,children:[p.itemName," (",p.itemCode,")"]},p.id))]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"공정순서",children:s.jsx("input",{type:"number",className:"inp",value:a.opSeq,onChange:p=>i({...a,opSeq:Number(p.target.value)})})}),s.jsx(L,{label:"표준시간(분)",children:s.jsx("input",{type:"number",step:"any",className:"inp",value:a.stdTimeMin,onChange:p=>i({...a,stdTimeMin:Number(p.target.value)})})})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"공정코드",children:s.jsx("input",{className:"inp",value:a.processCode,onChange:p=>i({...a,processCode:p.target.value})})}),s.jsx(L,{label:"공정명",children:s.jsx("input",{className:"inp",value:a.processName,onChange:p=>i({...a,processName:p.target.value})})})]}),s.jsx(L,{label:"설비",children:s.jsxs("select",{className:"inp",value:a.equipmentCode,onChange:p=>i({...a,equipmentCode:p.target.value}),children:[s.jsx("option",{value:"",children:"미지정"}),c.map(p=>s.jsx("option",{value:p.equipmentCode,children:p.equipmentName||p.equipmentCode},p.id))]})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>i(null),children:"취소"}),s.jsx(V,{onClick:m,children:"저장"})]})]})]})}const Cye=["","SUPPLIER","CUSTOMER","BOTH"],Eye=["","ACTIVE","INACTIVE"],_ye={partnerCode:"",partnerName:"",partnerType:"SUPPLIER",contactName:"",contactPhone:"",contactEmail:"",address:"",status:"ACTIVE"};function Tye(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(null),f=fr(),d=()=>t1({partnerType:n,status:a,keyword:l}).then(p=>t(p||[])).catch(()=>t([]));S.useEffect(()=>{d()},[n,a]);const h=()=>u({..._ye,_new:!0}),m=p=>u({...p,contactPhone:"",contactEmail:"",_new:!1}),j=async()=>{const{_new:p,id:y,...g}=c;p?await vB(g):await gB(y,g),u(null),d()},v=async p=>{window.confirm("삭제하시겠습니까?")&&(await xB(p),d())};return s.jsxs("div",{children:[s.jsx(ut,{title:"거래처",subtitle:"공급사 · 고객 · 연락처 AES 암호화 저장 · 응답 마스킹 (MANAGER+)",actions:f&&s.jsxs(V,{onClick:h,children:[s.jsx(ot,{size:16})," 거래처"]})}),s.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/20 text-amber-300/80 text-xs rounded-lg px-3 py-2 mb-4 flex items-center gap-2",children:[s.jsx(Yo,{size:14})," 거래처 연락처(전화·이메일)는 PII로 마스킹되어 표시됩니다. 원문은 저장 시 AES-256-GCM으로 암호화됩니다."]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[s.jsx("select",{className:"inp w-36",value:n,onChange:p=>r(p.target.value),children:Cye.map(p=>s.jsx("option",{value:p,children:p||"전체 유형"},p))}),s.jsx("select",{className:"inp w-32",value:a,onChange:p=>i(p.target.value),children:Eye.map(p=>s.jsx("option",{value:p,children:p||"전체 상태"},p))}),s.jsx("input",{value:l,onChange:p=>o(p.target.value),onKeyDown:p=>p.key==="Enter"&&d(),placeholder:"거래처 검색",className:"inp w-52"}),s.jsx(V,{variant:"ghost",onClick:d,children:"검색"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),s.jsx("th",{className:"text-left",children:"거래처명"}),s.jsx("th",{className:"text-left",children:"유형"}),s.jsx("th",{className:"text-left",children:"담당"}),s.jsx("th",{className:"text-left",children:"전화"}),s.jsx("th",{className:"text-left",children:"이메일"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(OT,{size:14,className:"text-brand"}),p.partnerCode]}),s.jsx("td",{className:"text-slate-300",children:p.partnerName}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:p.partnerType})}),s.jsx("td",{className:"text-slate-400 text-xs",children:p.contactName||"-"}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.contactPhone?AA(p.contactPhone):"-"}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:p.contactEmail?AA(p.contactEmail):"-"}),s.jsx("td",{children:s.jsx(lt,{status:p.status})}),s.jsx("td",{className:"px-4",children:f&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>m(p),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>v(p.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},p.id)),e.length===0&&s.jsx(Fe,{colSpan:8,msg:"거래처가 없습니다."})]})]})}),c&&s.jsxs(We,{title:c._new?"거래처 등록":"거래처 편집",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"코드",children:s.jsx("input",{className:"inp",value:c.partnerCode,onChange:p=>u({...c,partnerCode:p.target.value}),disabled:!c._new})}),s.jsx(L,{label:"거래처명",children:s.jsx("input",{className:"inp",value:c.partnerName,onChange:p=>u({...c,partnerName:p.target.value})})})]}),s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:c.partnerType,onChange:p=>u({...c,partnerType:p.target.value}),children:["SUPPLIER","CUSTOMER","BOTH"].map(p=>s.jsx("option",{children:p},p))})}),s.jsx(L,{label:"담당자",children:s.jsx("input",{className:"inp",value:c.contactName,onChange:p=>u({...c,contactName:p.target.value})})}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"전화 (암호화 저장)",hint:c._new?"":"변경 시에만 입력",children:s.jsx("input",{className:"inp",value:c.contactPhone,onChange:p=>u({...c,contactPhone:p.target.value})})}),s.jsx(L,{label:"이메일 (암호화 저장)",hint:c._new?"":"변경 시에만 입력",children:s.jsx("input",{className:"inp",value:c.contactEmail,onChange:p=>u({...c,contactEmail:p.target.value})})})]}),s.jsx(L,{label:"주소",children:s.jsx("input",{className:"inp",value:c.address,onChange:p=>u({...c,address:p.target.value})})}),!c._new&&s.jsx(L,{label:"상태",children:s.jsx("select",{className:"inp",value:c.status,onChange:p=>u({...c,status:p.target.value}),children:["ACTIVE","INACTIVE"].map(p=>s.jsx("option",{children:p},p))})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:j,children:"저장"})]})]})]})}const kye={warehouseCode:"",warehouseName:"",address:"",remark:""};function Mye(){const[e,t]=S.useState([]),[n,r]=S.useState(null),[a,i]=S.useState([]),[l,o]=S.useState(null),[c,u]=S.useState(null),f=fr(),d=()=>_f().then(b=>t(b||[])).catch(()=>t([]));S.useEffect(()=>{d()},[]);const h=async b=>{r(b),i(await wB(b.warehouseCode).catch(()=>[])||[])},m=()=>o({...kye,_new:!0}),j=async()=>{const{_new:b,id:x,...N}=l;b?await bB(N):await jB(x,N),o(null),d()},v=async b=>{window.confirm("삭제하시겠습니까?")&&(await SB(b),d(),(n==null?void 0:n.id)===b&&(r(null),i([])))},p=()=>u({warehouseCode:n.warehouseCode,locationCode:"",locationName:"",binType:"SHELF"}),y=async()=>{await NB(c),u(null),h(n)},g=async b=>{window.confirm("로케이션 삭제?")&&(await OB(b),h(n))};return s.jsxs("div",{children:[s.jsx(ut,{title:"창고 / 로케이션",subtitle:"창고 · 로케이션(bin) 관리",actions:f&&s.jsxs(V,{onClick:m,children:[s.jsx(ot,{size:16})," 창고"]})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"코드"}),s.jsx("th",{className:"text-left",children:"창고명"}),s.jsx("th",{className:"text-left",children:"주소"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(b=>s.jsxs("tr",{className:`border-t border-edge/50 cursor-pointer ${(n==null?void 0:n.id)===b.id?"bg-panel/60":"hover:bg-panel/30"}`,onClick:()=>h(b),children:[s.jsxs("td",{className:"py-3 px-4 font-medium flex items-center gap-1.5",children:[s.jsx(KT,{size:14,className:"text-brand"}),b.warehouseCode]}),s.jsx("td",{className:"text-slate-300",children:b.warehouseName}),s.jsx("td",{className:"text-slate-400 text-xs truncate max-w-[160px]",children:b.address||"-"}),s.jsx("td",{className:"px-4",onClick:x=>x.stopPropagation(),children:f&&s.jsxs("div",{className:"flex items-center justify-end gap-2",children:[s.jsx("button",{onClick:()=>o({...b,_new:!1}),className:"text-xs text-slate-400 hover:text-brand",children:"편집"}),s.jsx("button",{onClick:()=>v(b.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:14})})]})})]},b.id)),e.length===0&&s.jsx(Fe,{colSpan:4,msg:"창고가 없습니다."})]})]})}),s.jsx(xe,{title:n?`로케이션 — ${n.warehouseName}`:"로케이션 (창고 선택)",icon:s.jsx(nw,{size:15}),children:n?s.jsxs(s.Fragment,{children:[f&&s.jsx("div",{className:"mb-3",children:s.jsxs(V,{size:"sm",variant:"ghost",onClick:p,children:[s.jsx(ot,{size:13})," 로케이션 추가"]})}),s.jsxs("div",{className:"space-y-1.5 max-h-[420px] overflow-auto",children:[a.map(b=>s.jsxs("div",{className:"flex items-center justify-between bg-panel border border-edge rounded p-2 text-sm",children:[s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx(nw,{size:12,className:"text-brand"}),s.jsx("span",{className:"font-mono text-xs",children:b.locationCode})," ",s.jsx("span",{className:"text-slate-400",children:b.locationName||""})]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-[11px] text-slate-500",children:b.binType||""}),f&&s.jsx("button",{onClick:()=>g(b.id),className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:12})})]})]},b.id)),a.length===0&&s.jsx("p",{className:"text-slate-500 text-xs py-4 text-center",children:"로케이션이 없습니다."})]})]}):s.jsx("p",{className:"text-slate-500 text-sm py-6 text-center",children:"왼쪽에서 창고를 선택하세요."})})]}),l&&s.jsxs(We,{title:l._new?"창고 등록":"창고 편집",onClose:()=>o(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"코드",children:s.jsx("input",{className:"inp",value:l.warehouseCode,onChange:b=>o({...l,warehouseCode:b.target.value}),disabled:!l._new})}),s.jsx(L,{label:"창고명",children:s.jsx("input",{className:"inp",value:l.warehouseName,onChange:b=>o({...l,warehouseName:b.target.value})})})]}),s.jsx(L,{label:"주소",children:s.jsx("input",{className:"inp",value:l.address,onChange:b=>o({...l,address:b.target.value})})}),s.jsx(L,{label:"비고",children:s.jsx("input",{className:"inp",value:l.remark,onChange:b=>o({...l,remark:b.target.value})})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>o(null),children:"취소"}),s.jsx(V,{onClick:j,children:"저장"})]})]}),c&&s.jsxs(We,{title:"로케이션 추가",onClose:()=>u(null),children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx(L,{label:"로케이션 코드",children:s.jsx("input",{className:"inp",value:c.locationCode,onChange:b=>u({...c,locationCode:b.target.value})})}),s.jsx(L,{label:"로케이션명",children:s.jsx("input",{className:"inp",value:c.locationName,onChange:b=>u({...c,locationName:b.target.value})})}),s.jsx(L,{label:"유형",children:s.jsx("select",{className:"inp",value:c.binType,onChange:b=>u({...c,binType:b.target.value}),children:["SHELF","RACK","FLOOR","PALLET","BIN"].map(b=>s.jsx("option",{children:b},b))})})]}),s.jsxs("div",{className:"flex justify-end gap-2 mt-5",children:[s.jsx(V,{variant:"ghost",onClick:()=>u(null),children:"취소"}),s.jsx(V,{onClick:y,children:"추가"})]})]})]})}function kA(e,t){if(!e)return;if(e.labels&&e.series)return e;if(Array.isArray(e))return{labels:e.map(r=>r.label||r.name||r.itemName||r.itemCode||r.date),series:[{name:t,data:e.map(r=>Number(r.value??r.qty??r.count??0))}]};const n=Object.entries(e).filter(([,r])=>typeof r=="number");return n.length?{labels:n.map(r=>r[0]),series:[{name:t,data:n.map(r=>r[1])}]}:void 0}function _d(e,...t){for(const n of t)if((e==null?void 0:e[n])!=null)return Number(e[n])||0;return 0}function Pye(){const[e,t]=S.useState({}),[n,r]=S.useState({}),[a,i]=S.useState({}),[l,o]=S.useState(null),[c,u]=S.useState(null);return S.useEffect(()=>{AB(30).then(f=>t(f||{})).catch(()=>{}),CB(30).then(f=>r(f||{})).catch(()=>{}),EB().then(f=>i(f||{})).catch(()=>{}),xk(14).then(o).catch(()=>{}),_B(30,10).then(u).catch(()=>{})},[]),s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(wT,{className:"text-brand",size:20})," 분석 / KPI"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"생산 · 품질 · 재고 KPI (BI 피드 연동, 30일)"})]})}),s.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 mb-6",children:[s.jsx(Ir,{label:"총 생산량",value:_d(e,"totalOutput","totalQty","output"),icon:s.jsx(xs,{size:13}),color:"text-brand"}),s.jsx(Ir,{label:"검사 합격률",value:_d(n,"passRate","rate").toFixed(1),unit:"%",icon:s.jsx(bs,{size:13}),color:"text-accent"}),s.jsx(Ir,{label:"불량률",value:_d(n,"defectRate").toFixed(2),unit:"%",icon:s.jsx(ao,{size:13}),color:"text-rose-400"}),s.jsx(Ir,{label:"재고 품목수",value:_d(a,"itemCount","totalItems","count"),icon:s.jsx(Sf,{size:13}),color:"text-sky-400"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 mb-4",children:[s.jsx(xe,{title:"일별 생산량 (14일)",icon:s.jsx(xs,{size:15}),children:s.jsx(Sr,{type:"AREA",data:kA(l,"생산량")})}),s.jsx(xe,{title:"품목별 생산 TOP (30일)",icon:s.jsx(ao,{size:15}),children:s.jsx(Sr,{type:"BAR",data:kA(c,"생산량")})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[s.jsx(xe,{title:"생산 KPI",icon:s.jsx(xs,{size:15}),children:s.jsx(MA,{o:e})}),s.jsx(xe,{title:"품질 KPI",icon:s.jsx(bs,{size:15}),children:s.jsx(MA,{o:n})})]})]})}function MA({o:e}){const t=Object.entries(e||{}).filter(([,n])=>typeof n=="number"||typeof n=="string");return t.length?s.jsx("div",{className:"space-y-1.5",children:t.map(([n,r])=>s.jsxs("div",{className:"flex items-center justify-between text-sm border-b border-edge/40 py-1.5",children:[s.jsx("span",{className:"text-slate-400 text-xs",children:n}),s.jsx("span",{className:"text-slate-200 font-medium",children:typeof r=="number"?r.toLocaleString():String(r)})]},n))}):s.jsx("p",{className:"text-slate-500 text-sm py-4 text-center",children:"데이터 없음"})}function m$({data:e}){const t=e==null?void 0:e.applied;if(!t)return null;const n=[`mode:${t.retrievalMode}`,`기법:${t.technique}`];return t.rerank&&n.push("rerank"),t.graphrag&&n.push("graphrag"),t.hybrid&&n.push("hybrid"),t.toolUse&&n.push(`agent(${t.maxSteps})`),t.structured&&n.push("structured"),t.stream&&n.push("stream"),e!=null&&e.degraded&&n.push("⚠ degraded(폴백)"),s.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:n.map((r,a)=>s.jsx("span",{className:`text-[10px] px-1.5 py-0.5 rounded border ${r.startsWith("⚠")?"bg-amber-500/15 text-amber-300 border-amber-500/30":"bg-brand/10 text-brand border-brand/30"}`,children:r},a))})}function y$({answerId:e,query:t}){const[n,r]=S.useState("");if(!e)return null;const a=async i=>{try{await IB({answerId:e,query:t,verdict:i}),r(i==="up"?"👍 반영됨":"👎 반영됨")}catch{r("전송 실패")}};return s.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-slate-400",children:[s.jsx("span",{children:"이 답변이 도움이 됐나요?"}),s.jsx("button",{onClick:()=>a("up"),className:"p-1 rounded hover:bg-brand/10 hover:text-brand",children:s.jsx(GT,{size:13})}),s.jsx("button",{onClick:()=>a("down"),className:"p-1 rounded hover:bg-rose-500/10 hover:text-rose-300",children:s.jsx(FT,{size:13})}),n&&s.jsx("span",{className:"text-brand",children:n})]})}function v$({feature:e,question:t,answer:n}){const[r,a]=S.useState("");if(n==null)return null;const i=typeof n=="string"?n:JSON.stringify(n),l=async o=>{try{await qB({feature:e,question:t,answer:i,verdict:o}),a(o==="up"?"👍 반영됨":"👎 반영됨")}catch{a("전송 실패")}};return s.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-slate-400",children:[s.jsx("span",{children:"이 결과가 도움이 됐나요?"}),s.jsx("button",{onClick:()=>l("up"),className:"p-1 rounded hover:bg-brand/10 hover:text-brand",children:s.jsx(GT,{size:13})}),s.jsx("button",{onClick:()=>l("down"),className:"p-1 rounded hover:bg-rose-500/10 hover:text-rose-300",children:s.jsx(FT,{size:13})}),r&&s.jsx("span",{className:"text-brand",children:r})]})}function $ye(e){if(e==null)return"문서";if(typeof e=="string")return e;const t=e.source||e.document||e.doc||e.title||e.chunk_id||e.id||"문서",n=e.page!=null?` p.${e.page}`:e.location?` ${e.location}`:"",r=e.support!=null?` · ${Math.round(Number(e.support)*100)}%`:"";return`${t}${n}${r}`}function g$({node:e}){if(e==null)return null;const t=Array.isArray(e.citations)?e.citations:[],n=Array.isArray(e.sources)?e.sources:[],r=t.length?t:n,a=e.abstained===!0;return!a&&r.length===0?null:s.jsxs("div",{className:"mt-3",children:[a&&s.jsxs("div",{className:"mb-2 flex items-center gap-1.5 text-[11px] px-2.5 py-1.5 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-300",children:[s.jsx(lr,{size:13})," 근거가 부족해 답변을 보류했습니다 (오류 아님 · 안내)"]}),r.length>0?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-[11px] text-slate-400 mb-1.5 flex items-center gap-1",children:[s.jsx(nL,{size:12})," 근거 인용 (",r.length,")"]}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.map((i,l)=>s.jsx("span",{className:"text-[10px] px-2 py-1 rounded-md bg-card border border-edge text-slate-300",children:$ye(i)},l))})]}):s.jsx("div",{className:"text-[11px] text-slate-500",children:"근거 문서 없음"})]})}function Ua({data:e}){return e==null?null:typeof e=="string"?s.jsx("pre",{className:"mt-3 text-xs text-slate-300 bg-ink border border-edge rounded p-3 whitespace-pre-wrap max-h-56 overflow-auto",children:e}):s.jsx("pre",{className:"mt-3 text-xs text-slate-300 bg-ink border border-edge rounded p-3 whitespace-pre-wrap max-h-56 overflow-auto",children:JSON.stringify(e,null,2)})}function Rye(){const[e,t]=S.useState(null);return S.useEffect(()=>{bk().then(n=>t(!!((n==null?void 0:n.ollamaAvailable)??(n==null?void 0:n.available)))).catch(()=>t(!1))},[]),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(zn,{className:"text-accent",size:20})," WISE AI"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"Enterprise AI for Trusted Knowledge · 근거·인용·환각차단(중앙 guardia-rag) + 불량분석·생산예측·예지보전·SPC이상 (Ollama 온프레미스 + Java 폴백)"})]}),s.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border ${e?"text-accent border-accent/30 bg-accent/10":"text-slate-400 border-edge bg-card"}`,children:[s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e?"bg-accent":"bg-slate-500"}`}),"Ollama ",e===null?"확인 중":e?"온라인":"오프라인 (Java 폴백)"]})]}),s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("h2",{className:"text-sm font-semibold flex items-center gap-2 text-brand",children:[s.jsx(Yr,{size:15})," WISE AI · 근거 기반 분석 (RAG · 에이전틱 · 구조화)"]}),s.jsx(jf,{to:"/ai-techniques",className:"text-xs text-slate-400 hover:text-brand underline",children:"기법 토글 설정 →"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5 mb-8",children:[s.jsx(Dye,{}),s.jsx(Lye,{})]}),s.jsx("h2",{className:"text-sm font-semibold text-slate-300 mb-3",children:"기본 AI 도구"}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[s.jsx(zye,{}),s.jsx(Iye,{}),s.jsx(Bye,{}),s.jsx(Uye,{}),s.jsx(qye,{}),s.jsx(Hye,{}),s.jsx(Fye,{})]})]})}function Dye(){var y;const[e,t]=S.useState(""),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(null),[j,v]=S.useState(!1),p=async()=>{v(!0);try{const g=a.split(",").map(x=>x.trim()).filter(Boolean).map(Number),b={defectCode:e,context:n?[{note:n}]:[]};g.length&&(b.values=g,b.ucl=Number(l)||0,b.lcl=Number(c)||0,b.cl=Number(f)||0),m(await LB(b))}finally{v(!1)}};return s.jsxs(xe,{title:"불량 원인분석 + SPC 이상감지 (RAG)",icon:s.jsx(lr,{size:15}),children:[s.jsx(L,{label:"불량 코드",children:s.jsx("input",{className:"inp",value:e,onChange:g=>t(g.target.value),placeholder:"예: D-DIM-01"})}),s.jsx(L,{label:"컨텍스트(공정/설비/자재)",children:s.jsx("textarea",{className:"inp",value:n,onChange:g=>r(g.target.value)})}),s.jsx(L,{label:"SPC 표본값(쉼표구분, 선택)",children:s.jsx("input",{className:"inp",value:a,onChange:g=>i(g.target.value),placeholder:"예: 10.1, 10.3, 9.8, 10.5"})}),s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsx(L,{label:"UCL",children:s.jsx("input",{className:"inp",value:l,onChange:g=>o(g.target.value)})}),s.jsx(L,{label:"LCL",children:s.jsx("input",{className:"inp",value:c,onChange:g=>u(g.target.value)})}),s.jsx(L,{label:"CL",children:s.jsx("input",{className:"inp",value:f,onChange:g=>d(g.target.value)})})]}),s.jsxs(V,{onClick:p,disabled:j,size:"sm",children:[s.jsx(Yr,{size:13})," ",j?"분석 중…":"RCA + SPC 분석"]}),s.jsx(m$,{data:h}),s.jsx(Ua,{data:h}),s.jsx(g$,{node:h==null?void 0:h.defect}),s.jsx(y$,{answerId:(y=h==null?void 0:h.defect)==null?void 0:y.answerId,query:e})]})}function Lye(){var b;const[e,t]=S.useState("forecast"),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(7),[j,v]=S.useState(null),[p,y]=S.useState(!1),g=async()=>{y(!0);try{const x={kind:e};e==="pdm"?(x.equipmentCode=n,x.availability=Number(a)||0,x.downtimeCount=Number(l)||0,x.mtbfHours=Number(c)||0):(x.series=f.split(",").map(N=>N.trim()).filter(Boolean).map(Number),x.horizon=h),v(await zB(x))}finally{y(!1)}};return s.jsxs(xe,{title:"예지보전 / 수요·생산 예측 (RAG)",icon:s.jsx(ao,{size:15}),children:[s.jsx("div",{className:"flex gap-2 mb-2",children:["forecast","pdm"].map(x=>s.jsx("button",{onClick:()=>t(x),className:`px-3 py-1.5 text-xs rounded-lg border ${e===x?"bg-brand text-ink border-brand":"bg-card border-edge text-slate-300"}`,children:x==="forecast"?"수요/생산 예측":"설비 예지보전"},x))}),e==="pdm"?s.jsxs(s.Fragment,{children:[s.jsx(L,{label:"설비 코드",children:s.jsx("input",{className:"inp",value:n,onChange:x=>r(x.target.value),placeholder:"예: EQ-CNC-01"})}),s.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[s.jsx(L,{label:"가동률(0~1)",children:s.jsx("input",{className:"inp",value:a,onChange:x=>i(x.target.value)})}),s.jsx(L,{label:"비가동 횟수",children:s.jsx("input",{className:"inp",value:l,onChange:x=>o(x.target.value)})}),s.jsx(L,{label:"MTBF(시간)",children:s.jsx("input",{className:"inp",value:c,onChange:x=>u(x.target.value)})})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(L,{label:"시계열(쉼표구분)",children:s.jsx("input",{className:"inp",value:f,onChange:x=>d(x.target.value),placeholder:"예: 100, 120, 95, 130"})}),s.jsx(L,{label:"예측 기간(일)",children:s.jsx("input",{type:"number",className:"inp",value:h,onChange:x=>m(Number(x.target.value))})})]}),s.jsxs(V,{onClick:g,disabled:p,size:"sm",children:[s.jsx(Yr,{size:13})," ",p?"분석 중…":"예측 + 해석"]}),s.jsx(m$,{data:j}),s.jsx(Ua,{data:j}),s.jsx(g$,{node:j==null?void 0:j.interpretation}),s.jsx(y$,{answerId:(b=j==null?void 0:j.interpretation)==null?void 0:b.answerId,query:e})]})}function zye(){const[e,t]=S.useState(""),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState(!1),c=async()=>{o(!0);try{i(await TB({defectCode:e,context:n}))}finally{o(!1)}};return s.jsxs(xe,{title:"불량 원인 분석",icon:s.jsx(lr,{size:15}),children:[s.jsx(L,{label:"불량 코드",children:s.jsx("input",{className:"inp",value:e,onChange:u=>t(u.target.value),placeholder:"예: D-CRACK-01"})}),s.jsx(L,{label:"컨텍스트(공정/설비/자재)",children:s.jsx("textarea",{className:"inp",value:n,onChange:u=>r(u.target.value)})}),s.jsxs(V,{onClick:c,disabled:l,size:"sm",children:[s.jsx(zn,{size:13})," ",l?"분석 중…":"원인 분석"]}),s.jsx(Ua,{data:a}),s.jsx(v$,{feature:"defect-root-cause",question:e,answer:a})]})}function Iye(){const[e,t]=S.useState(""),[n,r]=S.useState(30),[a,i]=S.useState(null),[l,o]=S.useState(!1),c=async()=>{o(!0);try{i(await kB({itemCode:e,days:n}))}finally{o(!1)}};return s.jsxs(xe,{title:"수요·생산량 예측",icon:s.jsx(ao,{size:15}),children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsx(L,{label:"품목코드",children:s.jsx("input",{className:"inp",value:e,onChange:u=>t(u.target.value)})}),s.jsx(L,{label:"예측 기간(일)",children:s.jsx("input",{type:"number",className:"inp",value:n,onChange:u=>r(Number(u.target.value))})})]}),s.jsxs(V,{onClick:c,disabled:l,size:"sm",children:[s.jsx(zn,{size:13})," ",l?"예측 중…":"예측"]}),s.jsx(Ua,{data:a})]})}function Bye(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=async()=>{i(!0);try{r(await MB({equipmentCode:e}))}finally{i(!1)}};return s.jsxs(xe,{title:"설비 예지보전",icon:s.jsx(Nf,{size:15}),children:[s.jsx(L,{label:"설비 코드",children:s.jsx("input",{className:"inp",value:e,onChange:o=>t(o.target.value),placeholder:"예: EQ-CNC-01"})}),s.jsxs(V,{onClick:l,disabled:a,size:"sm",children:[s.jsx(zn,{size:13})," ",a?"분석 중…":"정비 권고"]}),s.jsx(Ua,{data:n})]})}function Uye(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=async()=>{i(!0);try{r(await PB({chartCode:e}))}finally{i(!1)}};return s.jsxs(xe,{title:"SPC 이상 감지",icon:s.jsx(Gb,{size:15}),children:[s.jsx(L,{label:"관리도 코드",children:s.jsx("input",{className:"inp",value:e,onChange:o=>t(o.target.value)})}),s.jsxs(V,{onClick:l,disabled:a,size:"sm",children:[s.jsx(zn,{size:13})," ",a?"감지 중…":"이상 감지"]}),s.jsx(Ua,{data:n})]})}function qye(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=async()=>{i(!0);try{r(await $B({query:e}))}finally{i(!1)}};return s.jsxs(xe,{title:"작업지시·재고 자연어 조회",icon:s.jsx(Vo,{size:15}),children:[s.jsx(L,{label:"자연어 질의",children:s.jsx("input",{className:"inp",value:e,onChange:o=>t(o.target.value),placeholder:"예: 지난주 지연된 작업지시",onKeyDown:o=>o.key==="Enter"&&l()})}),s.jsxs(V,{onClick:l,disabled:a,size:"sm",children:[s.jsx(zn,{size:13})," ",a?"해석 중…":"질의 해석"]}),s.jsx(Ua,{data:n}),s.jsx(v$,{feature:"parse-query",question:e,answer:n})]})}function Hye(){const[e,t]=S.useState(""),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=async()=>{i(!0);try{r(await RB({itemCode:e}))}finally{i(!1)}};return s.jsxs(xe,{title:"재고 최적화·안전재고 추천",icon:s.jsx(Sf,{size:15}),children:[s.jsx(L,{label:"품목코드",children:s.jsx("input",{className:"inp",value:e,onChange:o=>t(o.target.value)})}),s.jsxs(V,{onClick:l,disabled:a,size:"sm",children:[s.jsx(zn,{size:13})," ",a?"분석 중…":"추천"]}),s.jsx(Ua,{data:n})]})}function Fye(){const[e,t]=S.useState(null),[n,r]=S.useState(!1),a=async()=>{r(!0);try{t(await DB({}))}finally{r(!1)}};return s.jsxs(xe,{title:"생산 일정 최적화",icon:s.jsx(R6,{size:15}),children:[s.jsx("p",{className:"text-xs text-slate-400 mb-2",children:"현재 작업지시·설비 부하 기반으로 일정 최적화를 제안합니다."}),s.jsxs(V,{onClick:a,disabled:n,size:"sm",children:[s.jsx(zn,{size:13})," ",n?"최적화 중…":"일정 최적화 제안"]}),s.jsx(Ua,{data:e})]})}const Gye=new Set(["rag.graphrag","rag.rerank","rag.tool_use","rag.stream"]);function Kye(){const[e,t]=S.useState(null),[n,r]=S.useState(""),[a,i]=S.useState(""),l=fr(),o=()=>BB().then(f=>{t(f),i("")}).catch(()=>i("RAG 토글을 불러오지 못했습니다."));S.useEffect(()=>{o()},[]);const c=async(f,d)=>{var h;r(""),i("");try{const m=await UB(f,d);t(m),r(`'${f}' 저장됨`)}catch(m){i(((h=m==null?void 0:m.response)==null?void 0:h.status)===403?"변경은 Manager+ 권한이 필요합니다.":"저장 실패")}};if(!e)return s.jsx("div",{className:"text-slate-400 text-sm",children:a||"불러오는 중…"});const u=({k:f,label:d,desc:h,on:m})=>s.jsxs("div",{className:"flex items-start justify-between gap-3 py-2.5 border-b border-edge last:border-0",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:[d,Gye.has(f)&&s.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-500/15 text-amber-300 border border-amber-500/30",children:"무거움"})]}),s.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:h})]}),s.jsx("button",{disabled:!l,onClick:()=>c(f,!m),className:`shrink-0 w-11 h-6 rounded-full transition-colors relative disabled:opacity-40 ${m?"bg-brand":"bg-slate-600"}`,title:m?"ON":"OFF",children:s.jsx("span",{className:`absolute top-0.5 w-5 h-5 rounded-full bg-white transition-all ${m?"left-5":"left-0.5"}`})})]});return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(Yr,{className:"text-brand",size:20})," AI 기법 설정"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-0.5",children:"중앙 guardia-rag 최신 기법 적용(검색 모드·리랭크·GraphRAG·에이전틱·구조화·스트리밍). 솔루션별 격리 저장."})]}),s.jsxs("span",{className:`flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-lg border ${e.ragAvailable?"text-brand border-brand/30 bg-brand/10":"text-slate-400 border-edge bg-card"}`,children:[s.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${e.ragAvailable?"bg-brand":"bg-slate-500"}`}),"중앙 RAG ",e.ragAvailable?"연결됨":"미가용 (로컬 폴백)"]})]}),n&&s.jsx("div",{className:"bg-brand/10 border border-brand/30 text-brand text-sm rounded-lg px-4 py-2.5 mb-4",children:n}),a&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:a}),!l&&s.jsx("div",{className:"bg-amber-500/10 border border-amber-500/30 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:"조회 전용입니다. 기법 변경은 Manager+ 권한이 필요합니다."}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[s.jsxs(xe,{title:"마스터 / 검색 모드",icon:s.jsx(Yo,{size:15}),children:[s.jsx(u,{k:"rag.enabled",label:"중앙 RAG 경유",desc:"off 시 MES 결정론 로컬 폴백으로 즉시 회귀(기존 동작).",on:e.ragEnabled}),s.jsxs("div",{className:"py-2.5 border-b border-edge",children:[s.jsx("div",{className:"text-sm font-medium mb-1.5",children:"검색 모드 (retrieval_mode)"}),s.jsx("div",{className:"flex gap-2",children:["vector","hybrid","graph"].map(f=>s.jsx("button",{disabled:!l,onClick:()=>c("rag.retrieval_mode",f),className:`px-3 py-1.5 text-xs rounded-lg border disabled:opacity-40 ${e.retrievalMode===f?"bg-brand text-ink border-brand":"bg-card border-edge text-slate-300 hover:border-brand"}`,children:f},f))}),s.jsx("div",{className:"text-xs text-slate-400 mt-1.5",children:"graphrag/hybrid 토글이 켜지면 그 모드가 우선 적용됩니다."})]}),s.jsx(u,{k:"rag.hybrid",label:"하이브리드 검색",desc:"BM25 키워드 + 벡터 앙상블. 검색 정확도↑(중간 비용).",on:e.hybrid}),s.jsx(u,{k:"rag.rerank",label:"리랭킹 (rerank)",desc:"cross-encoder/LLM 재정렬. 상위 정밀도↑(추가 추론 비용).",on:e.rerank}),s.jsx(u,{k:"rag.graphrag",label:"GraphRAG",desc:"지식그래프 기반 검색. 다중 홉 질의에 유리(고비용).",on:e.graphrag})]}),s.jsxs(xe,{title:"에이전틱 / 출력",icon:s.jsx(F6,{size:15}),children:[s.jsx(u,{k:"rag.tool_use",label:"에이전틱 tool-use (/agent)",desc:"조회 매퍼를 도구로 멀티스텝 추론. 불량 RCA·예측 해석에 활용(고비용).",on:e.toolUse}),s.jsx(u,{k:"rag.structured",label:"구조화 출력 (/structured)",desc:"JSON 스키마 강제 — 결정론적 결과 객체(경량, 기본 ON 권장).",on:e.structured}),s.jsx(u,{k:"rag.stream",label:"토큰 스트리밍 (SSE)",desc:"긴 답변 점진 표시. 동시성 위협 시 off 유지(고비용).",on:e.stream}),s.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-3",children:[s.jsx(Lv,{label:"top_k (1~20)",value:e.topK,min:1,max:20,disabled:!l,onSave:f=>c("rag.top_k",f)}),s.jsx(Lv,{label:"max_steps (1~8)",value:e.maxSteps,min:1,max:8,disabled:!l,onSave:f=>c("rag.max_steps",f)}),s.jsx(Lv,{label:"temperature (0~1)",value:e.temperature,min:0,max:1,step:.1,disabled:!l,onSave:f=>c("rag.temperature",f)}),s.jsx(Vye,{label:"생성 모델",value:e.generationModel,disabled:!l,onSave:f=>c("rag.generation_model",f)})]})]})]}),s.jsx("div",{className:"mt-4 text-xs text-slate-500",children:"보안 불변: 외부 API 0 (중앙·로컬 모두 Ollama 온프레미스). 무거운 기법은 서버 RAM 제약상 기본 off — 미가용 시 결정론 폴백(degraded:true)."})]})}function Lv({label:e,value:t,min:n,max:r,step:a=1,disabled:i,onSave:l}){const[o,c]=S.useState(String(t));return S.useEffect(()=>{c(String(t))},[t]),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-400",children:e}),s.jsxs("div",{className:"flex gap-1.5 mt-1",children:[s.jsx("input",{type:"number",min:n,max:r,step:a,value:o,disabled:i,onChange:u=>c(u.target.value),className:"w-full bg-ink border border-edge rounded px-2 py-1 text-sm disabled:opacity-50"}),s.jsx(V,{size:"sm",disabled:i,onClick:()=>l(Number(o)),children:s.jsx(cm,{size:12})})]})]})}function Vye({label:e,value:t,disabled:n,onSave:r}){const[a,i]=S.useState(t);return S.useEffect(()=>{i(t)},[t]),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs text-slate-400",children:e}),s.jsxs("div",{className:"flex gap-1.5 mt-1",children:[s.jsx("input",{value:a,disabled:n,onChange:l=>i(l.target.value),className:"w-full bg-ink border border-edge rounded px-2 py-1 text-sm disabled:opacity-50"}),s.jsx(V,{size:"sm",disabled:n,onClick:()=>r(a),children:s.jsx(cm,{size:12})})]})]})}const Yye=()=>R.get("/api/admin/ai-config").then(e=>{var t;return(t=e.data)==null?void 0:t.data}),Wye=e=>R.put("/api/admin/ai-config",e).then(t=>{var n;return(n=t.data)==null?void 0:n.data}),Qye=()=>R.post("/api/admin/ai-config/test",{}).then(e=>{var t;return(t=e.data)==null?void 0:t.data}),Xye=[{id:"ollama",label:"Ollama (기본)",hint:"온프레미스 · llama3.2:1b"},{id:"qwen3",label:"Qwen3",hint:"온프레미스 · qwen3:1.7b"},{id:"deepseek",label:"DeepSeek",hint:"온프레미스 · deepseek-r1:1.5b"},{id:"glm",label:"GLM",hint:"온프레미스 · glm4:9b",ram:!0},{id:"claude",label:"Claude (외부)",hint:"api.anthropic.com · 키 필요"}],x$=["claude-sonnet-4-6","claude-haiku-4-5","claude-opus-4-8"],Xd="claude-sonnet-4-6",zv=e=>x$.includes(e)?e:Xd;function Iv(e){var n,r,a;const t=((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"";return((a=e==null?void 0:e.response)==null?void 0:a.status)===403?"권한이 없습니다 (AI 설정은 관리자 전용).":t.includes("ERR-AI-400")?t.replace(/^ERR-AI-400:\s*/,""):"AI 설정을 처리하지 못했습니다."}function Zye(){const[e,t]=S.useState("ollama"),[n,r]=S.useState(Xd),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState(!0),[f,d]=S.useState(!1),[h,m]=S.useState(!1),[j,v]=S.useState(!1),[p,y]=S.useState(""),[g,b]=S.useState(!1),[x,N]=S.useState(null),w=()=>{d(!0),Yye().then(C=>{t(C.provider),r(zv(C.claudeModel??Xd)),i(!!C.claudeKeySet),o(C.ollamaTextModel??""),u(!!C.aiEnabled),y("")}).catch(C=>y(Iv(C))).finally(()=>d(!1))};S.useEffect(()=>{w()},[]);const O=()=>{v(!1),N(null)},A=async()=>{m(!0),v(!1);try{const C=await Wye({provider:e,claudeModel:n});t(C.provider),r(zv(C.claudeModel??Xd)),i(!!C.claudeKeySet),o(C.ollamaTextModel??""),u(!!C.aiEnabled),v(!0),y("")}catch(C){y(Iv(C))}finally{m(!1)}},E=async()=>{b(!0),N(null);try{N(await Qye())}catch(C){N({ok:!1,degraded:!1,message:Iv(C)})}finally{b(!1)}},M=e==="claude",$=e==="glm",k=M&&!a,I=!M&&!c,_=x?x.degraded?"text-amber-300":x.ok?"text-emerald-300":"text-rose-300":"";return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(Yr,{size:20,className:"text-brand"})," AI 플랫폼 설정"]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"불량 원인분석·자연어 조회 등 텍스트 생성에 사용할 LLM 제공자와 모델을 선택합니다."})]}),s.jsx("button",{onClick:w,disabled:f,className:"px-3 py-1.5 rounded-lg bg-card border border-edge text-sm disabled:opacity-40",children:"새로고침"})]}),p&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:p}),(k||I)&&s.jsx("div",{className:"bg-amber-500/10 border border-amber-500/40 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:k?"Claude API 키가 설정되지 않아 Ollama(온프레미스)로 폴백 동작합니다. 서버 환경변수 ANTHROPIC_API_KEY 설정 후 사용하세요.":"AI 기능이 비활성 상태입니다. 모든 AI 결과는 규칙 기반(degraded)으로 동작합니다."}),$&&s.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/40 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4 flex items-start gap-2",children:[s.jsx(lr,{size:16,className:"mt-0.5 shrink-0"}),s.jsx("span",{children:"GLM(glm4:9b)은 약 5.5GB 로드가 필요해 현재 서버 RAM(≈2.1GB)에서는 콜드로드가 실패할 수 있습니다. 선택은 허용되지만 실패 시 자동으로 폴백(degraded)됩니다. RAM 증설 후 사용을 권장합니다."})]}),s.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[s.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[s.jsxs("h2",{className:"text-sm font-semibold mb-4 flex items-center gap-2",children:[s.jsx(Yr,{size:16,className:"text-brand"})," 제공자 & 모델"]}),s.jsx("div",{className:"grid grid-cols-2 gap-2 mb-4",children:Xye.map(C=>s.jsxs("button",{onClick:()=>{t(C.id),O()},className:`text-left px-3 py-2.5 rounded-lg border text-sm transition-colors ${e===C.id?"bg-brand/15 border-brand text-brand":"bg-ink border-edge text-slate-300 hover:border-brand/50"}`,children:[s.jsxs("div",{className:"font-semibold flex items-center gap-1.5",children:[C.label,C.ram&&s.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded bg-amber-500/15 text-amber-300 border border-amber-500/30",children:"RAM"})]}),s.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:C.hint})]},C.id))}),!M&&s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Ollama 텍스트 모델"}),s.jsx("div",{className:"px-3 py-2 rounded-lg bg-ink border border-edge text-sm font-mono",children:l||"llama3.2:1b"}),s.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"온프레미스 모델 — provider 별 고정. 외부 호출 없음."})]}),M&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-4",children:[s.jsx("label",{className:"block text-xs text-slate-500 mb-1",children:"Claude 모델"}),s.jsx("select",{value:n,onChange:C=>{r(zv(C.target.value)),O()},className:"w-full px-3 py-2 rounded-lg bg-ink border border-edge text-sm focus:border-brand outline-none",children:x$.map(C=>s.jsx("option",{value:C,children:C},C))})]}),s.jsxs("div",{className:"mb-4",children:[s.jsxs("label",{className:"block text-xs text-slate-500 mb-1 flex items-center gap-1",children:[s.jsx(Fb,{size:13})," API 키"]}),s.jsx("span",{className:`inline-block px-3 py-1 rounded-lg text-xs font-semibold ${a?"bg-emerald-500/15 text-emerald-300 border border-emerald-500/40":"bg-rose-500/15 text-rose-300 border border-rose-500/40"}`,children:a?"설정됨":"미설정"}),s.jsx("p",{className:"text-[11px] text-slate-500 mt-1.5",children:"키는 서버 환경변수(ANTHROPIC_API_KEY)로만 주입되며 화면·응답·로그에 노출되지 않습니다."})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("button",{onClick:A,disabled:h||f,className:"flex items-center gap-1.5 px-4 py-2 rounded-lg bg-brand text-ink text-sm font-semibold disabled:opacity-40",children:[s.jsx(cm,{size:15})," ",h?"저장 중…":"저장"]}),j&&s.jsx("span",{className:"text-emerald-300 text-xs",children:"저장됨"})]})]}),s.jsxs("section",{className:"bg-card border border-edge rounded-xl p-5",children:[s.jsxs("h2",{className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[s.jsx(eL,{size:16,className:"text-brand"})," 연결 테스트"]}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"저장된 설정 기준으로 선택한 제공자에 짧은 ping 을 보내 연결을 확인합니다(요약 결과만)."}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("button",{onClick:E,disabled:g,className:"px-4 py-2 rounded-lg bg-card border border-edge text-sm disabled:opacity-40 hover:border-brand/50",children:g?"테스트 중…":"테스트 실행"}),x&&s.jsx("span",{className:`text-sm ${_}`,role:"status","aria-live":"polite",children:x.message})]}),s.jsx("p",{className:"text-[11px] text-slate-500 mt-3",children:"먼저 변경 사항을 저장한 뒤 테스트하세요. Claude 실패 시 Ollama 로 자동 폴백합니다."})]})]})]})}function PA(e){var n,r,a;const t=((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"";return((a=e==null?void 0:e.response)==null?void 0:a.status)===403?"권한이 없습니다 (SuperAdmin 전용).":/409|exist|이미/i.test(t)?"이미 존재하는 사용자명입니다.":/last|마지막|423/i.test(t)?"마지막 SuperAdmin은 강등/삭제/비활성화할 수 없습니다.":/404|not found/i.test(t)?"대상 사용자를 찾을 수 없습니다.":"요청을 처리하지 못했습니다. 잠시 후 다시 시도하세요."}function Jye(){const[e,t]=S.useState([]),[n,r]=S.useState({username:"",password:"",displayName:"",role:"WORKER"}),[a,i]=S.useState(!1),[l,o]=S.useState(""),c=()=>HB().then(p=>{var y;t(((y=p.data)==null?void 0:y.data)||[]),o("")}).catch(p=>o(PA(p)));S.useEffect(()=>{c()},[]);const u=async p=>{try{await p(),o(""),await c()}catch(y){o(PA(y))}},f=async()=>{if(!n.username||!n.password){o("사용자명과 비밀번호를 입력하세요.");return}await u(async()=>{await FB(n),r({username:"",password:"",displayName:"",role:"WORKER"}),i(!1)})},d=(p,y)=>u(()=>GB(p.id,y)),h=p=>u(()=>KB(p.id,!p.active)),m=p=>{const y=window.prompt(`'${p.username}' 의 새 비밀번호`);y&&u(()=>VB(p.id,y))},j=p=>{window.confirm(`'${p.username}' 삭제?`)&&u(()=>YB(p.id))},v=p=>{window.confirm(`'${p.username}' 사용자의 OTP를 초기화하시겠습니까?
초기화하면 다음 로그인 시 재등록해야 합니다.`)&&u(()=>WB(p.id))};return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(Yo,{className:"text-brand",size:20})," 사용자 / 권한"]}),s.jsxs("button",{onClick:()=>i(!a),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold",children:[s.jsx(ot,{size:16})," 새 사용자"]})]}),l&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),a&&s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-5 mb-6 grid grid-cols-5 gap-3",children:[s.jsx("input",{placeholder:"사용자명",value:n.username,onChange:p=>r({...n,username:p.target.value}),className:"inp"}),s.jsx("input",{placeholder:"표시 이름",value:n.displayName,onChange:p=>r({...n,displayName:p.target.value}),className:"inp"}),s.jsx("input",{placeholder:"비밀번호",type:"password",value:n.password,onChange:p=>r({...n,password:p.target.value}),className:"inp"}),s.jsx("select",{value:n.role,onChange:p=>r({...n,role:p.target.value}),className:"inp",children:lw.map(p=>s.jsx("option",{value:p,children:p},p))}),s.jsx("button",{onClick:f,className:"px-4 rounded-lg bg-brand text-ink text-sm font-semibold",children:"저장"})]}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"ID"}),s.jsx("th",{className:"text-left",children:"사용자명"}),s.jsx("th",{className:"text-left",children:"표시 이름"}),s.jsx("th",{className:"text-left",children:"역할"}),s.jsx("th",{className:"text-left",children:"상태"}),s.jsx("th",{className:"text-left",children:"생성일"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(p=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 text-slate-500",children:p.id}),s.jsx("td",{className:"font-medium",children:p.username}),s.jsx("td",{className:"text-slate-400",children:p.displayName||"-"}),s.jsx("td",{children:s.jsx("select",{value:p.role,onChange:y=>d(p,y.target.value),className:"px-2 py-1 rounded-md bg-ink border border-edge text-xs focus:border-brand outline-none",children:lw.map(y=>s.jsx("option",{value:y,children:y},y))})}),s.jsx("td",{children:s.jsx("span",{className:`inline-block px-2 py-0.5 rounded-md text-xs font-medium ${p.active?"bg-accent/15 text-accent":"bg-slate-500/15 text-slate-400"}`,children:p.active?"활성":"비활성"})}),s.jsx("td",{className:"text-slate-500 text-xs",children:p.createdAt?new Date(p.createdAt).toLocaleString("ko-KR"):"-"}),s.jsx("td",{className:"px-4",children:s.jsxs("div",{className:"flex items-center justify-end gap-3",children:[s.jsx("button",{onClick:()=>h(p),title:p.active?"비활성화":"활성화",className:"text-slate-400 hover:text-brand",children:s.jsx(IT,{size:16})}),s.jsx("button",{onClick:()=>m(p),title:"비밀번호 재설정",className:"text-slate-400 hover:text-brand",children:s.jsx(Fb,{size:16})}),s.jsx("button",{onClick:()=>v(p),title:"OTP 초기화",className:"text-slate-400 hover:text-brand",children:s.jsx(Kb,{size:16})}),s.jsx("button",{onClick:()=>j(p),title:"삭제",className:"text-rose-400 hover:text-rose-300",children:s.jsx(sr,{size:16})})]})})]},p.id)),e.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"py-6 text-center text-slate-500",children:"사용자가 없습니다."})})]})]})})]})}function eve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),c=()=>QB(n,a,200).then(u=>{var f;t(((f=u.data)==null?void 0:f.data)||[]),o("")}).catch(u=>{var f;return o(((f=u==null?void 0:u.response)==null?void 0:f.status)===403?"권한이 없습니다 (Manager+).":"감사 로그를 불러오지 못했습니다.")});return S.useEffect(()=>{c()},[]),s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(qT,{className:"text-brand",size:20})," 감사 로그"]})}),s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[s.jsx("input",{placeholder:"action 필터",value:n,onChange:u=>r(u.target.value),onKeyDown:u=>u.key==="Enter"&&c(),className:"inp w-44"}),s.jsx("input",{placeholder:"actor 필터",value:a,onChange:u=>i(u.target.value),onKeyDown:u=>u.key==="Enter"&&c(),className:"inp w-44"}),s.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm hover:border-brand",children:[s.jsx(Vo,{size:15})," 검색"]})]}),l&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"시각"}),s.jsx("th",{className:"text-left",children:"행위자"}),s.jsx("th",{className:"text-left",children:"액션"}),s.jsx("th",{className:"text-left",children:"대상"}),s.jsx("th",{className:"text-left",children:"상세"})]})}),s.jsxs("tbody",{children:[e.map(u=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsx("td",{className:"py-3 px-4 text-slate-500 text-xs whitespace-nowrap",children:u.createdAt?new Date(u.createdAt).toLocaleString("ko-KR"):"-"}),s.jsx("td",{className:"text-slate-300",children:u.actor}),s.jsx("td",{children:s.jsx("span",{className:"px-2 py-0.5 rounded bg-brand/15 text-brand text-xs border border-brand/30",children:u.action})}),s.jsx("td",{className:"text-slate-400 font-mono text-xs",children:u.target||"-"}),s.jsx("td",{className:"text-slate-400 text-xs truncate max-w-[360px]",children:u.detail||"-"})]},u.id)),e.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"py-6 text-center text-slate-500",children:"감사 로그가 없습니다."})})]})]})})]})}function tve(){const[e,t]=S.useState([]),[n,r]=S.useState({}),[a,i]=S.useState(""),[l,o]=S.useState(""),c=oL(),u=()=>XB().then(d=>{var j;const h=((j=d.data)==null?void 0:j.data)||[],m=Array.isArray(h)?h:Object.entries(h).map(([v,p])=>({key:v,value:String(p)}));t(m),o("")}).catch(d=>{var h;return o(((h=d==null?void 0:d.response)==null?void 0:h.status)===403?"권한이 없습니다 (Manager+).":"시스템 설정을 불러오지 못했습니다.")});S.useEffect(()=>{u()},[]);const f=async d=>{var h;i(""),o("");try{await ZB(d,n[d]??""),i(`'${d}' 저장됨`),u()}catch(m){o(((h=m==null?void 0:m.response)==null?void 0:h.status)===403?"SuperAdmin 권한이 필요합니다.":"저장 실패")}};return s.jsxs("div",{children:[s.jsx("div",{className:"flex items-center justify-between mb-6",children:s.jsxs("h1",{className:"text-xl font-bold flex items-center gap-2",children:[s.jsx(HT,{className:"text-brand",size:20})," 시스템 설정"]})}),a&&s.jsx("div",{className:"bg-brand/10 border border-brand/30 text-brand text-sm rounded-lg px-4 py-2.5 mb-4",children:a}),l&&s.jsx("div",{className:"bg-rose-500/10 border border-rose-500/40 text-rose-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:l}),!c&&s.jsx("div",{className:"bg-amber-500/10 border border-amber-500/30 text-amber-300 text-sm rounded-lg px-4 py-2.5 mb-4",children:"조회 전용입니다. 설정 변경은 SuperAdmin 권한이 필요합니다."}),s.jsx("div",{className:"bg-card border border-edge rounded-xl overflow-hidden",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"text-slate-500 text-xs bg-panel",children:s.jsxs("tr",{children:[s.jsx("th",{className:"text-left py-3 px-4",children:"키"}),s.jsx("th",{className:"text-left",children:"값"}),s.jsx("th",{className:"text-right px-4",children:"작업"})]})}),s.jsxs("tbody",{children:[e.map(d=>s.jsxs("tr",{className:"border-t border-edge/50",children:[s.jsxs("td",{className:"py-3 px-4 font-mono text-xs text-brand align-top",children:[d.key,d.description&&s.jsx("div",{className:"text-[11px] text-slate-500 font-sans mt-0.5",children:d.description})]}),s.jsx("td",{className:"py-3",children:s.jsx("input",{className:"inp",defaultValue:d.value,disabled:!c,onChange:h=>r({...n,[d.key]:h.target.value})})}),s.jsx("td",{className:"px-4 text-right align-top",children:c&&s.jsxs("button",{onClick:()=>f(d.key),className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-brand text-ink text-xs font-semibold",children:[s.jsx(cm,{size:13})," 저장"]})})]},d.key)),e.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:3,className:"py-6 text-center text-slate-500",children:"설정 항목이 없습니다."})})]})]})})]})}const nve="https://itsm.zioinfo.co.kr";function rve(){const[e,t]=S.useState(null),[n,r]=S.useState(!0),[a,i]=S.useState(""),[l,o]=S.useState(!1),c=()=>{r(!0),i(""),fetch(`${nve}/api/app/public-latest`).then(f=>f.json()).then(f=>t(f)).catch(()=>i("버전 정보를 불러올 수 없습니다. (중앙 앱 저장소 연결 실패)")).finally(()=>r(!1))};S.useEffect(()=>{c()},[]);const u=async()=>{if(e!=null&&e.landing_url)try{await navigator.clipboard.writeText(e.landing_url),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Fg,{className:"text-brand",size:22}),s.jsx("h1",{className:"text-xl font-bold",children:"GUARDiA 통합 메신저 앱 설치"})]}),s.jsxs("button",{onClick:c,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[s.jsx(Kb,{size:15})," 새로고침"]})]}),s.jsxs("p",{className:"text-sm text-slate-400 mb-6",children:["QR 코드를 스캔하면 ",s.jsx("span",{className:"text-brand font-semibold",children:"GUARDiA Messenger"})," 앱 설치 페이지로 이동합니다. 앱스토어 설치가 필요 없으며, 앱 업로드·버전 관리는 GUARDiA Manager에서 일원화되어 있습니다."]}),n&&s.jsx("div",{className:"text-slate-400 text-sm",children:"불러오는 중…"}),a&&s.jsx("div",{className:"bg-card border border-edge rounded-xl p-6 text-rose-400 text-sm",children:a}),!n&&!a&&e&&!e.has_version&&s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-8 text-center text-slate-400",children:[s.jsx(Fg,{size:36,className:"mx-auto mb-3 text-slate-600"}),"아직 등록된 앱 버전이 없습니다.",s.jsx("br",{}),s.jsx("span",{className:"text-xs",children:"GUARDiA Manager에서 APK를 업로드하면 여기에 QR이 표시됩니다."})]}),!n&&!a&&(e==null?void 0:e.has_version)&&s.jsxs("div",{className:"bg-card border border-edge rounded-xl p-6 grid md:grid-cols-[200px_1fr] gap-6 items-start",children:[s.jsx("div",{className:"bg-white rounded-xl p-3 flex items-center justify-center",children:s.jsx("img",{src:e.qr_url,alt:"앱 설치 QR",className:"w-44 h-44"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-lg font-bold",children:e.app_name||"GUARDiA Messenger"}),s.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-brand2 text-white text-xs font-semibold",children:["v",e.version]})]}),s.jsxs("div",{className:"text-xs text-slate-400 mb-4",children:[e.platform," · ",e.file_size_mb?`${e.file_size_mb}MB`:"",e.download_count!=null&&` · 다운로드 ${e.download_count}회`]}),e.release_notes&&s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"text-[11px] font-semibold text-slate-500 uppercase tracking-wider mb-1",children:"변경점"}),s.jsx("div",{className:"text-sm text-slate-300 whitespace-pre-line bg-ink border border-edge rounded-lg p-3 max-h-32 overflow-auto",children:e.release_notes})]}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("a",{href:e.landing_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-brand text-ink text-sm font-semibold",children:[s.jsx(q6,{size:15})," 설치 페이지 열기"]}),s.jsxs("a",{href:e.download_url,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[s.jsx(U6,{size:15})," APK 직접 다운로드"]}),s.jsxs("button",{onClick:u,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg bg-card border border-edge text-sm text-slate-300 hover:text-brand",children:[l?s.jsx(CT,{size:15,className:"text-accent"}):s.jsx(B6,{size:15}),l?"복사됨":"다운로드 링크 복사"]})]}),s.jsx("div",{className:"mt-4 text-[12px] text-slate-500 leading-relaxed",children:'📱 Android: APK 다운로드 후 설정 → 보안 → "알 수 없는 소스" 허용 → 설치. 앱스토어 등록이 필요 없습니다.'})]})]})]})}const oj={background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,boxShadow:"var(--uiws-shadow)"};function ta({title:e,subtitle:t,actions:n}){return s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-end",marginBottom:20},children:[s.jsxs("div",{children:[s.jsx("h1",{style:{fontSize:22,fontWeight:700,color:"var(--uiws-text)"},children:e}),t&&s.jsx("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginTop:4},children:t})]}),s.jsx("div",{style:{display:"flex",gap:8},children:n})]})}function nf({children:e,style:t}){return s.jsx("div",{style:{...oj,padding:18,...t},children:e})}function le({children:e,onClick:t,variant:n="primary",type:r="button",disabled:a}){const i={primary:{background:"var(--uiws-primary)",color:"var(--uiws-primary-contrast)",border:"none"},ghost:{background:"transparent",color:"var(--uiws-text-muted)",border:"1px solid var(--uiws-border)"},danger:{background:"var(--uiws-danger)",color:"#fff",border:"none"}};return s.jsx("button",{type:r,onClick:t,disabled:a,style:{padding:"9px 16px",borderRadius:8,fontSize:13,fontWeight:600,cursor:a?"not-allowed":"pointer",opacity:a?.5:1,...i[n]},children:e})}function Ne({value:e,onChange:t,placeholder:n,type:r="text",style:a}){return s.jsx("input",{type:r,value:e,placeholder:n,onChange:i=>t(i.target.value),style:{padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)",...a}})}function Ee({label:e,children:t}){return s.jsxs("label",{style:{display:"block",marginBottom:12},children:[s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:e}),t]})}function Ui({children:e}){return s.jsx(nf,{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:16},children:e})}function Ks({columns:e,rows:t,rowKey:n,onRowClick:r,empty:a="데이터가 없습니다."}){return s.jsx("div",{style:{...oj,overflow:"hidden"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[s.jsx("thead",{children:s.jsx("tr",{style:{background:"var(--uiws-surface-2)"},children:e.map(i=>s.jsx("th",{style:{textAlign:i.align??"left",padding:"11px 14px",color:"var(--uiws-text-muted)",fontWeight:600,fontSize:12,borderBottom:"1px solid var(--uiws-border)",width:i.width},children:i.header},i.key))})}),s.jsx("tbody",{children:t.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:e.length,style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:a})}):t.map(i=>s.jsx("tr",{onClick:()=>r==null?void 0:r(i),style:{cursor:r?"pointer":"default",borderBottom:"1px solid var(--uiws-border)"},onMouseEnter:l=>l.currentTarget.style.background="var(--uiws-row-hover)",onMouseLeave:l=>l.currentTarget.style.background="transparent",children:e.map(l=>s.jsx("td",{style:{padding:"11px 14px",textAlign:l.align??"left"},children:l.render?l.render(i):String(i[l.key]??"")},l.key))},n(i)))})]})})}function b$({page:e,totalPages:t,onChange:n}){return t<=1?null:s.jsxs("div",{style:{display:"flex",gap:6,justifyContent:"center",marginTop:16},children:[s.jsx(le,{variant:"ghost",disabled:e<=0,onClick:()=>n(e-1),children:"이전"}),s.jsxs("span",{style:{alignSelf:"center",fontSize:13,color:"var(--uiws-text-muted)"},children:[e+1," / ",t]}),s.jsx(le,{variant:"ghost",disabled:e>=t-1,onClick:()=>n(e+1),children:"다음"})]})}function Vs({yn:e,yes:t="읽음",no:n="안읽음"}){const r=e==="Y";return s.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"2px 9px",borderRadius:999,color:r?"var(--uiws-success)":"var(--uiws-text-muted)",background:r?"rgba(46,204,113,0.12)":"var(--uiws-surface-2)",border:"1px solid var(--uiws-border)"},children:r?t:n})}function Pr({title:e,onClose:t,children:n,footer:r}){return s.jsx("div",{onClick:t,style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:1e3},children:s.jsxs("div",{onClick:a=>a.stopPropagation(),style:{...oj,width:"min(560px, 92vw)",maxHeight:"88vh",overflow:"auto",padding:22},children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[s.jsx("h2",{style:{fontSize:17,fontWeight:700,color:"var(--uiws-text)"},children:e}),s.jsx("button",{onClick:t,style:{background:"none",border:"none",color:"var(--uiws-text-muted)",fontSize:20,cursor:"pointer"},children:"×"})]}),s.jsx("div",{children:n}),r&&s.jsx("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:18},children:r})]})})}function ur({label:e="불러오는 중..."}){return s.jsx("div",{style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)",fontSize:13},children:e})}const $A={ONGOING:"진행중",DONE:"종료"};function ave(){const[e,t]=S.useState([]),[n,r]=S.useState(0),[a,i]=S.useState(0),[l,o]=S.useState([]),[c,u]=S.useState(""),[f,d]=S.useState(""),[h,m]=S.useState(!1),[j,v]=S.useState(!1),[p,y]=S.useState(null),g=async()=>{m(!0);try{const w=(await mU({page:n,size:20,progressCd:c||void 0})).data.data;t(w.content??[]),i(w.totalPages??0);const O=await yU({});o(O.data.data??[])}finally{m(!1)}};S.useEffect(()=>{g()},[n,c]);const b=[{key:"workDate",header:"근무일자",width:120},{key:"title",header:"제목"},{key:"writerNm",header:"작성자",width:120},{key:"progressCd",header:"진행",width:90,render:N=>$A[N.progressCd]??N.progressCd},{key:"commentCount",header:"댓글",width:70,align:"center"}],x=async N=>{const w=await gU(N.worklogId);y(w.data.data)};return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"업무일지",subtitle:"UIWS 이식 · 업무일지 작성/조회/진행관리",actions:s.jsx(le,{onClick:()=>v(!0),children:"+ 업무일지 작성"})}),s.jsx("div",{style:{display:"flex",gap:10,marginBottom:16,flexWrap:"wrap"},children:l.map(N=>s.jsxs("div",{onClick:()=>{u(c===N.progressCd?"":N.progressCd),r(0)},style:{cursor:"pointer",padding:"12px 18px",borderRadius:10,minWidth:130,background:"var(--uiws-surface)",border:`1px solid ${c===N.progressCd?"var(--uiws-primary)":"var(--uiws-border)"}`},children:[s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)"},children:N.progressNm}),s.jsx("div",{style:{fontSize:24,fontWeight:700,color:"var(--uiws-primary)"},children:N.count})]},N.progressCd))}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:f,onChange:d,placeholder:"제목 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>{r(0),g()},children:"검색"}),c&&s.jsxs(le,{variant:"ghost",onClick:()=>u(""),children:["필터 해제: ",$A[c]??c]})]}),h?s.jsx(ur,{}):s.jsxs(s.Fragment,{children:[s.jsx(Ks,{columns:b,rows:e,rowKey:N=>N.worklogId,onRowClick:x,empty:"업무일지가 없습니다."}),s.jsx(b$,{page:n,totalPages:a,onChange:r})]}),j&&s.jsx(ive,{onClose:()=>v(!1),onSaved:()=>{v(!1),g()}}),p&&s.jsx(sve,{detail:p,onClose:()=>y(null),onChanged:()=>{y(null),g()}})]})}function ive({onClose:e,onSaved:t}){const[n,r]=S.useState(""),[a,i]=S.useState(localStorage.getItem("mes_user")||"admin"),[l,o]=S.useState(new Date().toISOString().slice(0,10)),[c,u]=S.useState("NORMAL"),[f,d]=S.useState(""),h=async()=>{var m,j;d("");try{await vU({title:n,writerId:a,workDate:l,workStatusCd:c,progressCd:"ONGOING",details:[]}),t()}catch(v){d(((j=(m=v==null?void 0:v.response)==null?void 0:m.data)==null?void 0:j.message)||"저장 실패")}};return s.jsxs(Pr,{title:"업무일지 작성",onClose:e,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:e,children:"취소"}),s.jsx(le,{onClick:h,children:"저장"})]}),children:[s.jsx(Ee,{label:"제목",children:s.jsx(Ne,{value:n,onChange:r,style:{width:"100%"}})}),s.jsx(Ee,{label:"작성자 ID",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%"}})}),s.jsx(Ee,{label:"근무일자",children:s.jsx(Ne,{type:"date",value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"근무상태 코드",children:s.jsx(Ne,{value:c,onChange:u,style:{width:"100%"}})}),f&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:f})]})}function sve({detail:e,onClose:t,onChanged:n}){var u;const[r,a]=S.useState(""),[i,l]=S.useState(""),o=async()=>{await xU(e.worklogId),n()},c=async()=>{var f,d;l("");try{await bU(e.worklogId,r),a(""),n()}catch(h){l(((d=(f=h==null?void 0:h.response)==null?void 0:f.data)==null?void 0:d.message)||"댓글 등록 실패")}};return s.jsxs(Pr,{title:e.title,onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"danger",onClick:o,children:"삭제"}),s.jsx(le,{variant:"ghost",onClick:t,children:"닫기"})]}),children:[s.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:12},children:[e.writerNm," · ",e.workDate," · ",e.progressCd]}),s.jsxs("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:["시간대별 상세 ",((u=e.details)==null?void 0:u.length)??0,"건"]}),s.jsxs("div",{style:{marginTop:14},children:[s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:8},children:"댓글"}),(e.comments??[]).map(f=>s.jsxs("div",{style:{padding:"8px 10px",borderRadius:8,background:"var(--uiws-surface-2)",marginBottom:6,fontSize:13},children:[s.jsx("b",{children:f.writerNm})," · ",s.jsx("span",{style:{color:"var(--uiws-text-muted)"},children:f.createdAt}),s.jsx("br",{}),f.cmtContent]},f.cmtId)),s.jsxs("div",{style:{display:"flex",gap:8,marginTop:8},children:[s.jsx(Ne,{value:r,onChange:a,placeholder:"댓글 입력(관리자/매니저)",style:{flex:1}}),s.jsx(le,{onClick:c,children:"등록"})]}),i&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:12,marginTop:6},children:i})]})]})}const lve=["일","월","화","수","목","금","토"];function ove(){const[e,t]=S.useState(new Date),[n,r]=S.useState("PERSONAL"),[a,i]=S.useState([]),[l,o]=S.useState(!1),[c,u]=S.useState(null),[f,d]=S.useState(null),h=`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}`,m=async()=>{o(!0);try{const x=await fU({type:n,view:"month",baseDate:`${h}-01`});i(x.data.data??[])}finally{o(!1)}};S.useEffect(()=>{m()},[h,n]);const v=new Date(e.getFullYear(),e.getMonth(),1).getDay(),p=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),y=[...Array(v).fill(null),...Array.from({length:p},(x,N)=>N+1)],g=x=>{const N=`${h}-${String(x).padStart(2,"0")}`;return a.filter(w=>(w.startDt??"").slice(0,10)<=N&&N<=(w.endDt??"").slice(0,10))},b=x=>t(new Date(e.getFullYear(),e.getMonth()+x,1));return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"일정",subtitle:"UIWS 이식 · 개인/부서 일정 달력",actions:s.jsx(le,{onClick:()=>u(`${h}-01`),children:"+ 일정 등록"})}),s.jsxs(nf,{style:{display:"flex",gap:10,alignItems:"center",marginBottom:16},children:[s.jsx(le,{variant:"ghost",onClick:()=>b(-1),children:"‹ 이전"}),s.jsx("div",{style:{fontWeight:700,minWidth:130,textAlign:"center",color:"var(--uiws-text)"},children:h}),s.jsx(le,{variant:"ghost",onClick:()=>b(1),children:"다음 ›"}),s.jsx("div",{style:{flex:1}}),s.jsx(le,{variant:n==="PERSONAL"?"primary":"ghost",onClick:()=>r("PERSONAL"),children:"개인"}),s.jsx(le,{variant:n==="DEPT"?"primary":"ghost",onClick:()=>r("DEPT"),children:"부서"})]}),l?s.jsx(ur,{}):s.jsx("div",{style:{background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,overflow:"hidden"},children:s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(7,1fr)"},children:[lve.map((x,N)=>s.jsx("div",{style:{padding:"10px 0",textAlign:"center",fontSize:12,fontWeight:600,color:N===0?"var(--uiws-danger)":"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:x},x)),y.map((x,N)=>s.jsxs("div",{onClick:()=>x&&u(`${h}-${String(x).padStart(2,"0")}`),style:{minHeight:96,padding:6,borderRight:"1px solid var(--uiws-border)",borderBottom:"1px solid var(--uiws-border)",cursor:x?"pointer":"default"},children:[x&&s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:4},children:x}),x&&g(x).slice(0,3).map(w=>s.jsx("div",{onClick:O=>{O.stopPropagation(),hU(w.scheduleId).then(A=>d(A.data.data))},style:{fontSize:11,padding:"2px 6px",borderRadius:6,marginBottom:3,background:"var(--uiws-primary-soft)",color:"var(--uiws-primary)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:w.title},w.scheduleId))]},N))]})}),c&&s.jsx(cve,{date:c,type:n,onClose:()=>u(null),onSaved:()=>{u(null),m()}}),f&&s.jsx(uve,{detail:f,onClose:()=>d(null),onDeleted:()=>{d(null),m()}})]})}function RA(e){return e&&(e.length===16?`${e}:00`:e)}function cve({date:e,type:t,onClose:n,onSaved:r}){const[a,i]=S.useState(""),[l,o]=S.useState(`${e}T09:00`),[c,u]=S.useState(`${e}T18:00`),[f,d]=S.useState(""),[h,m]=S.useState(""),j=async()=>{var v,p;m("");try{await dU({scheType:t,title:a,startDt:RA(l),endDt:RA(c),content:f,attachmentIds:[]}),r()}catch(y){m(((p=(v=y==null?void 0:y.response)==null?void 0:v.data)==null?void 0:p.message)||"저장 실패")}};return s.jsxs(Pr,{title:"일정 등록",onClose:n,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:n,children:"취소"}),s.jsx(le,{onClick:j,children:"저장"})]}),children:[s.jsx(Ee,{label:"제목",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%"}})}),s.jsx(Ee,{label:"시작",children:s.jsx(Ne,{type:"datetime-local",value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"종료",children:s.jsx(Ne,{type:"datetime-local",value:c,onChange:u,style:{width:"100%"}})}),s.jsx(Ee,{label:"내용",children:s.jsx(Ne,{value:f,onChange:d,style:{width:"100%"}})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}function uve({detail:e,onClose:t,onDeleted:n}){const r=async()=>{await pU(e.scheduleId),n()};return s.jsxs(Pr,{title:e.title,onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"danger",onClick:r,children:"삭제"}),s.jsx(le,{variant:"ghost",onClick:t,children:"닫기"})]}),children:[s.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:8},children:[e.scheType," · ",e.startDt," ~ ",e.endDt]}),s.jsx("div",{style:{fontSize:14,color:"var(--uiws-text)"},children:e.content||"내용 없음"})]})}function fve(){const[e,t]=S.useState("received"),[n,r]=S.useState([]),[a,i]=S.useState(0),[l,o]=S.useState(0),[c,u]=S.useState(""),[f,d]=S.useState(!1),[h,m]=S.useState(!1),[j,v]=S.useState(null),p=async()=>{d(!0);try{const w=(await(e==="received"?cU:lU)({page:a,size:20,titleKeyword:c||void 0})).data.data;r(w.content??[]),o(w.totalPages??0)}finally{d(!1)}};S.useEffect(()=>{p()},[e,a]);const y=[{key:"title",header:"제목"},{key:"senderNm",header:"보낸사람",width:130},{key:"sentAt",header:"받은시각",width:170},{key:"readYn",header:"상태",width:90,render:x=>s.jsx(Vs,{yn:x.readYn})}],g=[{key:"title",header:"제목"},{key:"receiverSummary",header:"받는사람",width:160},{key:"open",header:"개봉",width:100,align:"center",render:x=>`${x.openCount}/${x.totalCount}`},{key:"sentAt",header:"보낸시각",width:170}],b=async x=>{const N=e==="received"?await uU(x.messageId):await oU(x.messageId);v({...N.data.data,_tab:e}),e==="received"&&p()};return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"쪽지",subtitle:"UIWS 이식 · 사내 쪽지 송수신",actions:s.jsx(le,{onClick:()=>m(!0),children:"+ 쪽지 보내기"})}),s.jsxs(Ui,{children:[s.jsx(le,{variant:e==="received"?"primary":"ghost",onClick:()=>{t("received"),i(0)},children:"받은쪽지함"}),s.jsx(le,{variant:e==="sent"?"primary":"ghost",onClick:()=>{t("sent"),i(0)},children:"보낸쪽지함"}),s.jsx("div",{style:{flex:1}}),s.jsx(Ne,{value:c,onChange:u,placeholder:"제목 검색",style:{minWidth:200}}),s.jsx(le,{variant:"ghost",onClick:()=>{i(0),p()},children:"검색"})]}),f?s.jsx(ur,{}):s.jsxs(s.Fragment,{children:[s.jsx(Ks,{columns:e==="received"?y:g,rows:n,rowKey:x=>x.messageId,onRowClick:b,empty:"쪽지가 없습니다."}),s.jsx(b$,{page:a,totalPages:l,onChange:i})]}),h&&s.jsx(dve,{onClose:()=>m(!1),onSent:()=>{m(!1),p()}}),j&&s.jsx(hve,{detail:j,onClose:()=>v(null)})]})}function dve({onClose:e,onSent:t}){const[n,r]=S.useState(""),[a,i]=S.useState(""),[l,o]=S.useState(""),[c,u]=S.useState(""),f=async()=>{var d,h;u("");try{await sU({title:a,content:l,receivers:[{receiverId:n,rcvType:"RECV"}]}),t()}catch(m){u(((h=(d=m==null?void 0:m.response)==null?void 0:d.data)==null?void 0:h.message)||"전송 실패")}};return s.jsxs(Pr,{title:"쪽지 보내기",onClose:e,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:e,children:"취소"}),s.jsx(le,{onClick:f,children:"보내기"})]}),children:[s.jsx(Ee,{label:"받는사람 ID",children:s.jsx(Ne,{value:n,onChange:r,style:{width:"100%"}})}),s.jsx(Ee,{label:"제목",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%"}})}),s.jsx(Ee,{label:"내용",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),c&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:c})]})}function hve({detail:e,onClose:t}){return s.jsxs(Pr,{title:e.title,onClose:t,footer:s.jsx(le,{variant:"ghost",onClick:t,children:"닫기"}),children:[s.jsxs("div",{style:{fontSize:13,color:"var(--uiws-text-muted)",marginBottom:10},children:[e._tab==="received"?`보낸사람: ${e.senderNm}`:`개봉 ${e.openCount}/${e.totalCount}`," · ",e.sentAt]}),s.jsx("div",{style:{fontSize:14,color:"var(--uiws-text)",whiteSpace:"pre-wrap"},children:e.content}),e._tab==="sent"&&e.receivers&&s.jsxs("div",{style:{marginTop:14},children:[s.jsx("div",{style:{fontSize:12,color:"var(--uiws-text-muted)",marginBottom:6},children:"수신자 개봉현황"}),e.receivers.map((n,r)=>s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:13,padding:"4px 0"},children:[s.jsxs("span",{children:[n.receiverNm," (",n.rcvType,")"]}),s.jsx(Vs,{yn:n.readYn})]},r))]})]})}function pve(){const[e,t]=S.useState("personal"),[n,r]=S.useState(null),[a,i]=S.useState(!1),l=new Date().toISOString().slice(0,10),o=new Date(Date.now()-6*864e5).toISOString().slice(0,10),[c,u]=S.useState(o),[f,d]=S.useState(l),h=async()=>{i(!0);try{const v=await(e==="personal"?jU:SU)({fromDate:c,toDate:f});r(v.data.data)}finally{i(!1)}};S.useEffect(()=>{h()},[e]);const m=n?[...n.fixedColumns,...n.dynamicColumns]:[];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"업무통계",subtitle:"UIWS 이식 · 근무현황 동적 피벗"}),s.jsxs(Ui,{children:[s.jsx(le,{variant:e==="personal"?"primary":"ghost",onClick:()=>t("personal"),children:"개인별 근무현황"}),s.jsx(le,{variant:e==="company"?"primary":"ghost",onClick:()=>t("company"),children:"업체별 근무현황"}),s.jsx("div",{style:{flex:1}}),s.jsx(Ne,{type:"date",value:c,onChange:u}),s.jsx("span",{style:{color:"var(--uiws-text-muted)"},children:"~"}),s.jsx(Ne,{type:"date",value:f,onChange:d}),s.jsx(le,{variant:"ghost",onClick:h,children:"조회"})]}),a?s.jsx(ur,{}):!n||n.rows.length===0?s.jsx("div",{style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:"집계 데이터가 없습니다."}):s.jsx("div",{style:{background:"var(--uiws-surface)",border:"1px solid var(--uiws-border)",borderRadius:12,overflow:"auto"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[s.jsx("thead",{children:s.jsx("tr",{style:{background:"var(--uiws-surface-2)"},children:m.map(j=>s.jsx("th",{style:{padding:"11px 14px",textAlign:"left",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)",whiteSpace:"nowrap"},children:j.label},j.key))})}),s.jsx("tbody",{children:n.rows.map((j,v)=>s.jsx("tr",{style:{borderBottom:"1px solid var(--uiws-border)"},children:m.map(p=>s.jsx("td",{style:{padding:"10px 14px"},children:String(j[p.key]??"")},p.key))},v))})]})})]})}function C0(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 권한ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다. 잠시 후 다시 시도하세요."}function mve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState(new Set),[f,d]=S.useState(null),[h,m]=S.useState(!1),j=async(g=n)=>{var b;i(!0),o("");try{const x=await wU(g||void 0);t(((b=x.data.data)==null?void 0:b.content)??[]),u(new Set)}catch(x){o(C0(x))}finally{i(!1)}};S.useEffect(()=>{j("")},[]);const v=g=>u(b=>{const x=new Set(b);return x.has(g)?x.delete(g):x.add(g),x}),p=async()=>{if(c.size!==0&&window.confirm(`선택한 권한 ${c.size}건을 삭제하시겠습니까?`))try{await AU([...c]),await j()}catch(g){o(C0(g))}},y=[{key:"sel",header:"",width:44,align:"center",render:g=>s.jsx("input",{type:"checkbox",checked:c.has(g.roleId),onClick:b=>b.stopPropagation(),onChange:()=>v(g.roleId)})},{key:"roleId",header:"권한ID",width:180},{key:"roleNm",header:"권한명"},{key:"roleDesc",header:"설명"},{key:"useYn",header:"사용",width:80,align:"center",render:g=>s.jsx(Vs,{yn:g.useYn,yes:"사용",no:"미사용"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"권한 관리",subtitle:"시스템관리(권한) · 역할(Role) 등록/수정/삭제 — RBAC",actions:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"danger",onClick:p,disabled:c.size===0,children:"선택 삭제"}),s.jsx(le,{onClick:()=>{d(null),m(!0)},children:"+ 권한 등록"})]})}),l&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:l}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:n,onChange:r,placeholder:"권한ID/권한명 검색",style:{minWidth:240}}),s.jsx(le,{variant:"ghost",onClick:()=>j(),children:"검색"})]}),a?s.jsx(ur,{}):s.jsx(Ks,{columns:y,rows:e,rowKey:g=>g.roleId,onRowClick:g=>{d(g),m(!0)},empty:"등록된 권한이 없습니다."}),h&&s.jsx(yve,{role:f,onClose:()=>m(!1),onSaved:()=>{m(!1),j()}})]})}function yve({role:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=S.useState((e==null?void 0:e.roleId)??""),[l,o]=S.useState((e==null?void 0:e.roleNm)??""),[c,u]=S.useState((e==null?void 0:e.roleDesc)??""),[f,d]=S.useState((e==null?void 0:e.useYn)??"Y"),[h,m]=S.useState(""),j=async()=>{if(m(""),!l.trim()){m("권한명은 필수입니다.");return}if(!r&&!a.trim()){m("권한ID는 필수입니다.");return}try{const v={roleId:a,roleNm:l,roleDesc:c,useYn:f};r?await OU(a,v):await NU(v),n()}catch(v){m(C0(v))}};return s.jsxs(Pr,{title:r?"권한 수정":"권한 등록",onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:t,children:"취소"}),s.jsx(le,{onClick:j,children:"저장"})]}),children:[s.jsx(Ee,{label:"권한ID",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),s.jsx(Ee,{label:"권한명",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"설명",children:s.jsx(Ne,{value:c,onChange:u,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsxs("select",{value:f,onChange:v=>d(v.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}function Bv(e){var t,n,r;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((r=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:r.message)||"요청을 처리하지 못했습니다."}function vve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState([]),[l,o]=S.useState(!1),[c,u]=S.useState(!1),[f,d]=S.useState(!1),[h,m]=S.useState(""),[j,v]=S.useState("");S.useEffect(()=>{o(!0),CU().then(b=>{var N;const x=((N=b.data.data)==null?void 0:N.content)??[];t(x),x.length>0&&r(x[0].roleId)}).catch(b=>v(Bv(b))).finally(()=>o(!1))},[]),S.useEffect(()=>{n&&(u(!0),m(""),v(""),EU(n).then(b=>i(b.data.data??[])).catch(b=>v(Bv(b))).finally(()=>u(!1)))},[n]);const p=(b,x)=>i(N=>N.map(w=>{if(w.menuId!==b)return w;const O=w[x]==="Y"?"N":"Y";return x==="writeYn"&&O==="Y"?{...w,writeYn:"Y",readYn:"Y"}:x==="readYn"&&O==="N"?{...w,readYn:"N",writeYn:"N"}:{...w,[x]:O}})),y=(b,x)=>i(N=>N.map(w=>x&&b==="writeYn"?{...w,writeYn:"Y",readYn:"Y"}:!x&&b==="readYn"?{...w,readYn:"N",writeYn:"N"}:{...w,[b]:x?"Y":"N"})),g=async()=>{d(!0),m(""),v("");try{await _U(n,a),m("메뉴 권한 매핑이 저장되었습니다.")}catch(b){v(Bv(b))}finally{d(!1)}};return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"역할-메뉴 권한",subtitle:"시스템관리(권한) · 역할별 메뉴 접근(읽기/쓰기) 매핑 — RBAC 핵심",actions:s.jsx(le,{onClick:g,disabled:f||!n,children:f?"저장 중...":"매핑 저장"})}),j&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:j}),h&&s.jsx("div",{style:{color:"var(--uiws-success)",fontSize:13,marginBottom:12},children:h}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr",gap:16,alignItems:"start"},children:[s.jsxs(nf,{style:{padding:0},children:[s.jsx("div",{style:{padding:"12px 16px",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:"역할 목록"}),l?s.jsx(ur,{}):s.jsxs("div",{children:[e.length===0&&s.jsx("div",{style:{padding:20,fontSize:13,color:"var(--uiws-text-faint)"},children:"역할이 없습니다."}),e.map(b=>s.jsxs("div",{onClick:()=>r(b.roleId),style:{padding:"11px 16px",cursor:"pointer",fontSize:13,borderLeft:`3px solid ${n===b.roleId?"var(--uiws-primary)":"transparent"}`,background:n===b.roleId?"var(--uiws-primary-soft)":"transparent",color:n===b.roleId?"var(--uiws-primary)":"var(--uiws-text)"},children:[s.jsx("div",{style:{fontWeight:600},children:b.roleNm}),s.jsx("div",{style:{fontSize:11,color:"var(--uiws-text-muted)"},children:b.roleId})]},b.roleId))]})]}),s.jsx(nf,{style:{padding:0,overflow:"hidden"},children:c?s.jsx(ur,{}):s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13,color:"var(--uiws-text)"},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{background:"var(--uiws-surface-2)"},children:[s.jsx("th",{style:{textAlign:"left",padding:"11px 14px",color:"var(--uiws-text-muted)",fontWeight:600,fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:"메뉴"}),s.jsxs("th",{style:{width:120,padding:"8px 14px",color:"var(--uiws-text-muted)",fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:["읽기",s.jsx("br",{}),s.jsxs("label",{style:{fontWeight:400,fontSize:11},children:[s.jsx("input",{type:"checkbox",onChange:b=>y("readYn",b.target.checked)})," 전체"]})]}),s.jsxs("th",{style:{width:120,padding:"8px 14px",color:"var(--uiws-text-muted)",fontSize:12,borderBottom:"1px solid var(--uiws-border)"},children:["쓰기",s.jsx("br",{}),s.jsxs("label",{style:{fontWeight:400,fontSize:11},children:[s.jsx("input",{type:"checkbox",onChange:b=>y("writeYn",b.target.checked)})," 전체"]})]})]})}),s.jsx("tbody",{children:a.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:3,style:{padding:28,textAlign:"center",color:"var(--uiws-text-faint)"},children:"매핑 가능한 메뉴가 없습니다."})}):a.map(b=>s.jsxs("tr",{style:{borderBottom:"1px solid var(--uiws-border)"},children:[s.jsxs("td",{style:{padding:"11px 14px"},children:[b.menuNm," ",s.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",b.menuId,")"]})]}),s.jsx("td",{style:{padding:"11px 14px",textAlign:"center"},children:s.jsx("input",{type:"checkbox",checked:b.readYn==="Y",onChange:()=>p(b.menuId,"readYn")})}),s.jsx("td",{style:{padding:"11px 14px",textAlign:"center"},children:s.jsx("input",{type:"checkbox",checked:b.writeYn==="Y",onChange:()=>p(b.menuId,"writeYn")})})]},b.menuId))})]})})]})]})}function Zd(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 코드입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function gve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(null),[l,o]=S.useState(""),[c,u]=S.useState(!1),[f,d]=S.useState(!1),[h,m]=S.useState(""),[j,v]=S.useState({open:!1,edit:null}),p=async(x="")=>{var N;u(!0),m("");try{const O=((N=(await TU(x||void 0)).data.data)==null?void 0:N.content)??[];t(O),!n&&O.length>0&&r(O[0].grpCd)}catch(w){m(Zd(w))}finally{u(!1)}};S.useEffect(()=>{p("")},[]);const y=async(x=n)=>{if(!x){i(null);return}d(!0);try{const w=(await kU(x)).data.data;i(w?{...w,values:w.values??[]}:null)}catch(N){m(Zd(N))}finally{d(!1)}};S.useEffect(()=>{y()},[n]);const g=async x=>{if(window.confirm(`코드그룹 '${x}' 와 하위 코드를 삭제하시겠습니까?`))try{await $U(x),n===x&&(r(""),i(null)),await p(l)}catch(N){m(Zd(N))}},b=[{key:"codeVal",header:"코드값",width:170},{key:"codeNm",header:"코드명"},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:x=>s.jsx(Vs,{yn:x.useYn,yes:"사용",no:"미사용"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"공통코드 관리",subtitle:"시스템관리(권한) · 코드그룹/코드값 일괄 CRUD",actions:s.jsx(le,{onClick:()=>v({open:!0,edit:null}),children:"+ 코드그룹 등록"})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:h}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:l,onChange:o,placeholder:"코드그룹 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>p(l),children:"검색"})]}),s.jsxs("div",{style:{display:"grid",gridTemplateColumns:"300px 1fr",gap:16,alignItems:"start"},children:[s.jsxs(nf,{style:{padding:0},children:[s.jsx("div",{style:{padding:"12px 16px",fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)",borderBottom:"1px solid var(--uiws-border)"},children:"코드그룹"}),c?s.jsx(ur,{}):s.jsxs("div",{children:[e.length===0&&s.jsx("div",{style:{padding:20,fontSize:13,color:"var(--uiws-text-faint)"},children:"코드그룹이 없습니다."}),e.map(x=>s.jsxs("div",{onClick:()=>r(x.grpCd),style:{padding:"11px 16px",cursor:"pointer",fontSize:13,display:"flex",justifyContent:"space-between",alignItems:"center",borderLeft:`3px solid ${n===x.grpCd?"var(--uiws-primary)":"transparent"}`,background:n===x.grpCd?"var(--uiws-primary-soft)":"transparent"},children:[s.jsxs("div",{children:[s.jsx("div",{style:{fontWeight:600,color:n===x.grpCd?"var(--uiws-primary)":"var(--uiws-text)"},children:x.grpNm}),s.jsx("div",{style:{fontSize:11,color:"var(--uiws-text-muted)"},children:x.grpCd})]}),s.jsx("div",{style:{display:"flex",gap:6},onClick:N=>N.stopPropagation(),children:s.jsx(le,{variant:"ghost",onClick:()=>g(x.grpCd),children:"삭제"})})]},x.grpCd))]})]}),s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[s.jsxs("div",{style:{fontSize:14,fontWeight:600,color:"var(--uiws-text)"},children:["코드값 ",n&&s.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontWeight:400},children:["(",n,")"]})]}),s.jsx(le,{onClick:()=>a&&v({open:!0,edit:a}),disabled:!a,children:"그룹·코드값 편집"})]}),f?s.jsx(ur,{}):s.jsx(Ks,{columns:b,rows:(a==null?void 0:a.values)??[],rowKey:x=>`${n}:${x.codeVal}`,empty:n?"코드값이 없습니다.":"코드그룹을 선택하세요."})]})]}),j.open&&s.jsx(bve,{grp:j.edit,onClose:()=>v({open:!1,edit:null}),onSaved:async x=>{v({open:!1,edit:null}),await p(l),x?(r(x),await y(x)):await y()}})]})}function xve({value:e,onChange:t}){return s.jsxs("select",{value:e,onChange:n=>t(n.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}function bve({grp:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=S.useState((e==null?void 0:e.grpCd)??""),[l,o]=S.useState((e==null?void 0:e.grpNm)??""),[c,u]=S.useState((e==null?void 0:e.useYn)??"Y"),[f,d]=S.useState(e!=null&&e.values?e.values.map(b=>({...b})):[]),[h,m]=S.useState(""),j=()=>d(b=>[...b,{codeVal:"",codeNm:"",sortOrd:b.length+1,useYn:"Y"}]),v=(b,x,N)=>d(w=>w.map((O,A)=>A===b?{...O,[x]:N}:O)),p=b=>d(x=>x.filter((N,w)=>w!==b)),y=async()=>{if(m(""),!r&&!a.trim()){m("그룹코드는 필수입니다.");return}if(!l.trim()){m("그룹명은 필수입니다.");return}for(const b of f)if(!b.codeVal.trim()||!b.codeNm.trim()){m("코드값과 코드명은 필수입니다.");return}try{const b={grpCd:a,grpNm:l,useYn:c,values:f.map(x=>({grpCd:a,codeVal:x.codeVal,codeNm:x.codeNm,sortOrd:Number(x.sortOrd)||0,useYn:x.useYn}))};r?await PU(a,b):await MU(b),n(a)}catch(b){m(Zd(b))}},g={width:"100%",padding:"6px 8px",borderRadius:6,fontSize:12,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"};return s.jsxs(Pr,{title:r?"코드그룹·코드값 편집":"코드그룹 등록",onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:t,children:"취소"}),s.jsx(le,{onClick:y,children:"저장"})]}),children:[s.jsx(Ee,{label:"그룹코드",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),s.jsx(Ee,{label:"그룹명",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsx(xve,{value:c,onChange:u})}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8,marginBottom:8},children:[s.jsxs("div",{style:{fontSize:12,fontWeight:600,color:"var(--uiws-text-muted)"},children:["코드값 (",f.length,")"]}),s.jsx(le,{variant:"ghost",onClick:j,children:"+ 코드값 추가"})]}),s.jsx("div",{style:{border:"1px solid var(--uiws-border)",borderRadius:8,overflow:"hidden"},children:s.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:12,color:"var(--uiws-text)"},children:[s.jsx("thead",{children:s.jsxs("tr",{style:{background:"var(--uiws-surface-2)"},children:[s.jsx("th",{style:{padding:"7px 8px",textAlign:"left",color:"var(--uiws-text-muted)",fontWeight:600},children:"코드값"}),s.jsx("th",{style:{padding:"7px 8px",textAlign:"left",color:"var(--uiws-text-muted)",fontWeight:600},children:"코드명"}),s.jsx("th",{style:{padding:"7px 8px",width:64,color:"var(--uiws-text-muted)",fontWeight:600},children:"정렬"}),s.jsx("th",{style:{padding:"7px 8px",width:76,color:"var(--uiws-text-muted)",fontWeight:600},children:"사용"}),s.jsx("th",{style:{padding:"7px 8px",width:44}})]})}),s.jsx("tbody",{children:f.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:5,style:{padding:16,textAlign:"center",color:"var(--uiws-text-faint)"},children:"코드값이 없습니다."})}):f.map((b,x)=>s.jsxs("tr",{style:{borderTop:"1px solid var(--uiws-border)"},children:[s.jsx("td",{style:{padding:"5px 8px"},children:s.jsx("input",{value:b.codeVal,onChange:N=>v(x,"codeVal",N.target.value),style:g})}),s.jsx("td",{style:{padding:"5px 8px"},children:s.jsx("input",{value:b.codeNm,onChange:N=>v(x,"codeNm",N.target.value),style:g})}),s.jsx("td",{style:{padding:"5px 8px"},children:s.jsx("input",{type:"number",value:String(b.sortOrd),onChange:N=>v(x,"sortOrd",Number(N.target.value)||0),style:g})}),s.jsx("td",{style:{padding:"5px 8px"},children:s.jsxs("select",{value:b.useYn,onChange:N=>v(x,"useYn",N.target.value),style:g,children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),s.jsx("td",{style:{padding:"5px 8px",textAlign:"center"},children:s.jsx("button",{onClick:()=>p(x),style:{background:"none",border:"none",color:"var(--uiws-danger)",cursor:"pointer",fontSize:16},children:"×"})})]},x))})]})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginTop:10},children:h})]})}function E0(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 메뉴ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function jve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState({open:!1,edit:null}),f=async(j="")=>{var v;i(!0),o("");try{if(j){const p=await DU(j);t(p.data.data??[])}else{const p=await RU();t(((v=p.data.data)==null?void 0:v.content)??[])}}catch(p){o(E0(p))}finally{i(!1)}};S.useEffect(()=>{f("")},[]);const d=S.useMemo(()=>{const j=e.filter(y=>!y.parentMenuId).sort((y,g)=>(y.sortOrd??0)-(g.sortOrd??0)),v=[];for(const y of j)v.push({menu:y,depth:0}),e.filter(g=>g.parentMenuId===y.menuId).sort((g,b)=>(g.sortOrd??0)-(b.sortOrd??0)).forEach(g=>v.push({menu:g,depth:1}));const p=new Set(v.map(y=>y.menu.menuId));return e.filter(y=>!p.has(y.menuId)).forEach(y=>v.push({menu:y,depth:0})),v.map(y=>({...y.menu,_depth:y.depth}))},[e]),h=async j=>{if(window.confirm(`메뉴 '${j.menuNm}' 를 삭제하시겠습니까?`))try{await IU([j.menuId]),await f(n)}catch(v){o(E0(v))}},m=[{key:"menuNm",header:"메뉴명",render:j=>s.jsxs("span",{style:{paddingLeft:j._depth*22},children:[j._depth>0&&s.jsx("span",{style:{color:"var(--uiws-text-faint)"},children:"└ "}),j.menuNm," ",s.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",j.menuId,")"]})]})},{key:"menuUrl",header:"URL",width:220,render:j=>j.menuUrl??"-"},{key:"programId",header:"프로그램",width:140,render:j=>j.programId??"-"},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:j=>s.jsx(Vs,{yn:j.useYn,yes:"사용",no:"미사용"})},{key:"act",header:"",width:60,align:"center",render:j=>s.jsx(le,{variant:"ghost",onClick:()=>h(j),children:"삭제"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"메뉴 관리",subtitle:"시스템관리(권한) · 메뉴 트리(2-depth) 등록/수정/삭제",actions:s.jsx(le,{onClick:()=>u({open:!0,edit:null}),children:"+ 메뉴 등록"})}),l&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:l}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:n,onChange:r,placeholder:"메뉴명 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>f(n),children:"검색"})]}),a?s.jsx(ur,{}):s.jsx(Ks,{columns:m,rows:d,rowKey:j=>j.menuId,onRowClick:j=>u({open:!0,edit:j}),empty:"등록된 메뉴가 없습니다."}),c.open&&s.jsx(Sve,{menu:c.edit,parents:e.filter(j=>!j.parentMenuId),onClose:()=>u({open:!1,edit:null}),onSaved:()=>{u({open:!1,edit:null}),f(n)}})]})}function Sve({menu:e,parents:t,onClose:n,onSaved:r}){const a=!!e,[i,l]=S.useState((e==null?void 0:e.menuId)??""),[o,c]=S.useState((e==null?void 0:e.menuNm)??""),[u,f]=S.useState((e==null?void 0:e.parentMenuId)??""),[d,h]=S.useState((e==null?void 0:e.programId)??""),[m,j]=S.useState((e==null?void 0:e.menuUrl)??""),[v,p]=S.useState(String((e==null?void 0:e.sortOrd)??0)),[y,g]=S.useState((e==null?void 0:e.useYn)??"Y"),[b,x]=S.useState(""),N=async()=>{if(x(""),!a&&!i.trim()){x("메뉴ID는 필수입니다.");return}if(!o.trim()){x("메뉴명은 필수입니다.");return}try{const O={menuId:i,menuNm:o,parentMenuId:u||null,programId:d||null,menuUrl:m||null,sortOrd:Number(v)||0,useYn:y};a?await zU(i,O):await LU(O),r()}catch(O){x(E0(O))}},w={width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"};return s.jsxs(Pr,{title:a?"메뉴 수정":"메뉴 등록",onClose:n,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:n,children:"취소"}),s.jsx(le,{onClick:N,children:"저장"})]}),children:[s.jsx(Ee,{label:"메뉴ID",children:s.jsx(Ne,{value:i,onChange:l,style:{width:"100%",opacity:a?.6:1}})}),s.jsx(Ee,{label:"메뉴명",children:s.jsx(Ne,{value:o,onChange:c,style:{width:"100%"}})}),s.jsx(Ee,{label:"상위 메뉴",children:s.jsxs("select",{value:u??"",onChange:O=>f(O.target.value),style:w,children:[s.jsx("option",{value:"",children:"(최상위)"}),t.filter(O=>O.menuId!==i).map(O=>s.jsxs("option",{value:O.menuId,children:[O.menuNm," (",O.menuId,")"]},O.menuId))]})}),s.jsx(Ee,{label:"프로그램ID",children:s.jsx(Ne,{value:d??"",onChange:h,style:{width:"100%"}})}),s.jsx(Ee,{label:"메뉴 URL",children:s.jsx(Ne,{value:m??"",onChange:j,style:{width:"100%"}})}),s.jsx(Ee,{label:"정렬순서",children:s.jsx(Ne,{type:"number",value:v,onChange:p,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsxs("select",{value:y,onChange:O=>g(O.target.value),style:w,children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),b&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:b})]})}function _0(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 부서ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function wve(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState({open:!1,edit:null}),f=async(j="")=>{var v;i(!0),o("");try{const p=await BU(j||void 0);t(((v=p.data.data)==null?void 0:v.content)??[])}catch(p){o(_0(p))}finally{i(!1)}};S.useEffect(()=>{f("")},[]);const d=S.useMemo(()=>{const j=e.filter(y=>!y.parentDeptId).sort((y,g)=>(y.sortOrd??0)-(g.sortOrd??0)),v=[];for(const y of j)v.push({...y,_depth:0}),e.filter(g=>g.parentDeptId===y.deptId).sort((g,b)=>(g.sortOrd??0)-(b.sortOrd??0)).forEach(g=>v.push({...g,_depth:1}));const p=new Set(v.map(y=>y.deptId));return e.filter(y=>!p.has(y.deptId)).forEach(y=>v.push({...y,_depth:0})),v},[e]),h=async j=>{if(window.confirm(`부서 '${j.deptNm}' 를 삭제하시겠습니까?`))try{await HU(j.deptId),await f(n)}catch(v){o(_0(v))}},m=[{key:"deptNm",header:"부서명",render:j=>s.jsxs("span",{style:{paddingLeft:j._depth*22},children:[j._depth>0&&s.jsx("span",{style:{color:"var(--uiws-text-faint)"},children:"└ "}),j.deptNm," ",s.jsxs("span",{style:{color:"var(--uiws-text-muted)",fontSize:12},children:["(",j.deptId,")"]})]})},{key:"sortOrd",header:"정렬",width:70,align:"center"},{key:"useYn",header:"사용",width:80,align:"center",render:j=>s.jsx(Vs,{yn:j.useYn,yes:"사용",no:"미사용"})},{key:"act",header:"",width:60,align:"center",render:j=>s.jsx(le,{variant:"ghost",onClick:()=>h(j),children:"삭제"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"부서 관리",subtitle:"시스템관리(권한) · 부서 트리(2-depth) 등록/수정/삭제",actions:s.jsx(le,{onClick:()=>u({open:!0,edit:null}),children:"+ 부서 등록"})}),l&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:l}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:n,onChange:r,placeholder:"부서명 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>f(n),children:"검색"})]}),a?s.jsx(ur,{}):s.jsx(Ks,{columns:m,rows:d,rowKey:j=>j.deptId,onRowClick:j=>u({open:!0,edit:j}),empty:"등록된 부서가 없습니다."}),c.open&&s.jsx(Nve,{dept:c.edit,parents:e.filter(j=>!j.parentDeptId),onClose:()=>u({open:!1,edit:null}),onSaved:()=>{u({open:!1,edit:null}),f(n)}})]})}function Nve({dept:e,parents:t,onClose:n,onSaved:r}){const a=!!e,[i,l]=S.useState((e==null?void 0:e.deptId)??""),[o,c]=S.useState((e==null?void 0:e.deptNm)??""),[u,f]=S.useState((e==null?void 0:e.parentDeptId)??""),[d,h]=S.useState(String((e==null?void 0:e.sortOrd)??0)),[m,j]=S.useState((e==null?void 0:e.useYn)??"Y"),[v,p]=S.useState(""),y={width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},g=async()=>{if(p(""),!a&&!i.trim()){p("부서ID는 필수입니다.");return}if(!o.trim()){p("부서명은 필수입니다.");return}try{const b={deptId:i,deptNm:o,parentDeptId:u||null,sortOrd:Number(d)||0,useYn:m};a?await qU(i,b):await UU(b),r()}catch(b){p(_0(b))}};return s.jsxs(Pr,{title:a?"부서 수정":"부서 등록",onClose:n,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:n,children:"취소"}),s.jsx(le,{onClick:g,children:"저장"})]}),children:[s.jsx(Ee,{label:"부서ID",children:s.jsx(Ne,{value:i,onChange:l,style:{width:"100%",opacity:a?.6:1}})}),s.jsx(Ee,{label:"부서명",children:s.jsx(Ne,{value:o,onChange:c,style:{width:"100%"}})}),s.jsx(Ee,{label:"상위 부서",children:s.jsxs("select",{value:u??"",onChange:b=>f(b.target.value),style:y,children:[s.jsx("option",{value:"",children:"(최상위)"}),t.filter(b=>b.deptId!==i).map(b=>s.jsxs("option",{value:b.deptId,children:[b.deptNm," (",b.deptId,")"]},b.deptId))]})}),s.jsx(Ee,{label:"정렬순서",children:s.jsx(Ne,{type:"number",value:d,onChange:h,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsxs("select",{value:m,onChange:b=>j(b.target.value),style:y,children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),v&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:v})]})}function T0(e){var t,n,r,a;return((t=e==null?void 0:e.response)==null?void 0:t.status)===403?"권한이 없습니다 (SUPERADMIN 전용).":((n=e==null?void 0:e.response)==null?void 0:n.status)===409?"이미 존재하는 거래처ID입니다.":((a=(r=e==null?void 0:e.response)==null?void 0:r.data)==null?void 0:a.message)||"요청을 처리하지 못했습니다."}function Ove(){const[e,t]=S.useState([]),[n,r]=S.useState(""),[a,i]=S.useState(!1),[l,o]=S.useState(""),[c,u]=S.useState({open:!1,edit:null}),f=async(m="")=>{var j;i(!0),o("");try{const v=await FU(m||void 0);t(((j=v.data.data)==null?void 0:j.content)??[])}catch(v){o(T0(v))}finally{i(!1)}};S.useEffect(()=>{f("")},[]);const d=async m=>{if(window.confirm(`거래처 '${m.companyNm}' 를 삭제하시겠습니까?`))try{await VU([m.companyId]),await f(n)}catch(j){o(T0(j))}},h=[{key:"companyId",header:"거래처ID",width:180},{key:"companyNm",header:"거래처명"},{key:"bizNo",header:"사업자번호",width:180,render:m=>m.bizNo??"-"},{key:"useYn",header:"사용",width:80,align:"center",render:m=>s.jsx(Vs,{yn:m.useYn,yes:"사용",no:"미사용"})},{key:"act",header:"",width:60,align:"center",render:m=>s.jsx(le,{variant:"ghost",onClick:()=>d(m),children:"삭제"})}];return s.jsxs("div",{className:"uiws-scope",children:[s.jsx(ta,{title:"거래처 관리",subtitle:"시스템관리(권한) · 거래처(근무처) 등록/수정/삭제",actions:s.jsx(le,{onClick:()=>u({open:!0,edit:null}),children:"+ 거래처 등록"})}),l&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13,marginBottom:12},children:l}),s.jsxs(Ui,{children:[s.jsx(Ne,{value:n,onChange:r,placeholder:"거래처명 검색",style:{minWidth:220}}),s.jsx(le,{variant:"ghost",onClick:()=>f(n),children:"검색"})]}),a?s.jsx(ur,{}):s.jsx(Ks,{columns:h,rows:e,rowKey:m=>m.companyId,onRowClick:m=>u({open:!0,edit:m}),empty:"등록된 거래처가 없습니다."}),c.open&&s.jsx(Ave,{company:c.edit,onClose:()=>u({open:!1,edit:null}),onSaved:()=>{u({open:!1,edit:null}),f(n)}})]})}function Ave({company:e,onClose:t,onSaved:n}){const r=!!e,[a,i]=S.useState((e==null?void 0:e.companyId)??""),[l,o]=S.useState((e==null?void 0:e.companyNm)??""),[c,u]=S.useState((e==null?void 0:e.bizNo)??""),[f,d]=S.useState((e==null?void 0:e.useYn)??"Y"),[h,m]=S.useState(""),j=async()=>{if(m(""),!r&&!a.trim()){m("거래처ID는 필수입니다.");return}if(!l.trim()){m("거래처명은 필수입니다.");return}try{const v={companyId:a,companyNm:l,bizNo:c||null,useYn:f};r?await KU(a,v):await GU(v),n()}catch(v){m(T0(v))}};return s.jsxs(Pr,{title:r?"거래처 수정":"거래처 등록",onClose:t,footer:s.jsxs(s.Fragment,{children:[s.jsx(le,{variant:"ghost",onClick:t,children:"취소"}),s.jsx(le,{onClick:j,children:"저장"})]}),children:[s.jsx(Ee,{label:"거래처ID",children:s.jsx(Ne,{value:a,onChange:i,style:{width:"100%",opacity:r?.6:1}})}),s.jsx(Ee,{label:"거래처명",children:s.jsx(Ne,{value:l,onChange:o,style:{width:"100%"}})}),s.jsx(Ee,{label:"사업자번호",children:s.jsx(Ne,{value:c??"",onChange:u,style:{width:"100%"}})}),s.jsx(Ee,{label:"사용 여부",children:s.jsxs("select",{value:f,onChange:v=>d(v.target.value),style:{width:"100%",padding:"9px 12px",borderRadius:8,fontSize:13,background:"var(--uiws-input-bg)",border:"1px solid var(--uiws-border)",color:"var(--uiws-text)"},children:[s.jsx("option",{value:"Y",children:"사용"}),s.jsx("option",{value:"N",children:"미사용"})]})}),h&&s.jsx("div",{style:{color:"var(--uiws-danger)",fontSize:13},children:h})]})}const Cve=new A6;function Eve(){return s.jsx(E6,{client:Cve,children:s.jsx(H5,{children:s.jsxs(x5,{children:[s.jsx(fe,{path:"/login",element:s.jsx(YU,{})}),s.jsxs(fe,{element:s.jsx(eU,{}),children:[s.jsx(fe,{path:"/dashboard",element:s.jsx(fme,{})}),s.jsx(fe,{path:"/mypage",element:s.jsx(WU,{})}),s.jsx(fe,{path:"/jobs",element:s.jsx(pme,{})}),s.jsx(fe,{path:"/progress",element:s.jsx(vme,{})}),s.jsx(fe,{path:"/workorders",element:s.jsx(jme,{})}),s.jsx(fe,{path:"/production",element:s.jsx(wme,{})}),s.jsx(fe,{path:"/process-board",element:s.jsx(Ome,{})}),s.jsx(fe,{path:"/oee",element:s.jsx(Tme,{})}),s.jsx(fe,{path:"/tracking",element:s.jsx(kme,{})}),s.jsx(fe,{path:"/plans",element:s.jsx(Dme,{})}),s.jsx(fe,{path:"/receiving",element:s.jsx(Ime,{})}),s.jsx(fe,{path:"/shipping",element:s.jsx(qme,{})}),s.jsx(fe,{path:"/inventory",element:s.jsx(Hme,{})}),s.jsx(fe,{path:"/stocktake",element:s.jsx(Kme,{})}),s.jsx(fe,{path:"/lotserial",element:s.jsx(Qme,{})}),s.jsx(fe,{path:"/inspection",element:s.jsx(eye,{})}),s.jsx(fe,{path:"/spec",element:s.jsx(rye,{})}),s.jsx(fe,{path:"/ncr",element:s.jsx(oye,{})}),s.jsx(fe,{path:"/capa",element:s.jsx(dye,{})}),s.jsx(fe,{path:"/spc",element:s.jsx(pye,{})}),s.jsx(fe,{path:"/certificate",element:s.jsx(vye,{})}),s.jsx(fe,{path:"/items",element:s.jsx(jye,{})}),s.jsx(fe,{path:"/bom",element:s.jsx(Nye,{})}),s.jsx(fe,{path:"/routing",element:s.jsx(Aye,{})}),s.jsx(fe,{path:"/partners",element:s.jsx(Bn,{min:"MANAGER",children:s.jsx(Tye,{})})}),s.jsx(fe,{path:"/warehouses",element:s.jsx(Mye,{})}),s.jsx(fe,{path:"/analytics",element:s.jsx(Pye,{})}),s.jsx(fe,{path:"/ai-tools",element:s.jsx(Rye,{})}),s.jsx(fe,{path:"/ai-techniques",element:s.jsx(Bn,{min:"MANAGER",children:s.jsx(Kye,{})})}),s.jsx(fe,{path:"/admin/ai-platform",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(Zye,{})})}),s.jsx(fe,{path:"/uiws/worklog",element:s.jsx(ave,{})}),s.jsx(fe,{path:"/uiws/schedule",element:s.jsx(ove,{})}),s.jsx(fe,{path:"/uiws/message",element:s.jsx(fve,{})}),s.jsx(fe,{path:"/uiws/stats",element:s.jsx(pve,{})}),s.jsx(fe,{path:"/uiws/system/roles",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(mve,{})})}),s.jsx(fe,{path:"/uiws/system/role-menus",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(vve,{})})}),s.jsx(fe,{path:"/uiws/system/codes",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(gve,{})})}),s.jsx(fe,{path:"/uiws/system/menus",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(jve,{})})}),s.jsx(fe,{path:"/uiws/system/depts",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(wve,{})})}),s.jsx(fe,{path:"/uiws/system/companies",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(Ove,{})})}),s.jsx(fe,{path:"/admin/users",element:s.jsx(Bn,{min:"SUPERADMIN",children:s.jsx(Jye,{})})}),s.jsx(fe,{path:"/admin/audit",element:s.jsx(Bn,{min:"MANAGER",children:s.jsx(eve,{})})}),s.jsx(fe,{path:"/admin/settings",element:s.jsx(Bn,{min:"MANAGER",children:s.jsx(tve,{})})}),s.jsx(fe,{path:"/admin/mobile-app",element:s.jsx(rve,{})})]}),s.jsx(fe,{path:"*",element:s.jsx(oT,{to:"/dashboard",replace:!0})})]})})})}gD.createRoot(document.getElementById("root")).render(s.jsx(T.StrictMode,{children:s.jsx(uL,{children:s.jsx(Eve,{})})}));
