@samanhappy/mcphub 0.0.27 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/README.zh.md +40 -2
- package/dist/config/index.js +0 -7
- package/dist/config/index.js.map +1 -1
- package/dist/controllers/logController.js +51 -0
- package/dist/controllers/logController.js.map +1 -0
- package/dist/controllers/serverController.js +22 -6
- package/dist/controllers/serverController.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/middlewares/auth.js +4 -2
- package/dist/middlewares/auth.js.map +1 -1
- package/dist/routes/index.js +5 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/server.js +3 -3
- package/dist/server.js.map +1 -1
- package/dist/services/logService.js +169 -0
- package/dist/services/logService.js.map +1 -0
- package/dist/services/marketService.js +0 -7
- package/dist/services/marketService.js.map +1 -1
- package/dist/services/mcpService.js +19 -4
- package/dist/services/mcpService.js.map +1 -1
- package/dist/utils/path.js +4 -1
- package/dist/utils/path.js.map +1 -1
- package/frontend/dist/assets/index-CoJHnafW.js +141 -0
- package/frontend/dist/assets/index-MHN1hB7-.css +1 -0
- package/frontend/dist/index.html +2 -2
- package/package.json +15 -16
- package/dist/utils/migration.js +0 -47
- package/dist/utils/migration.js.map +0 -1
- package/frontend/dist/assets/index-BYmTZOyw.css +0 -1
- package/frontend/dist/assets/index-D7dQ4HtK.js +0 -120
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))n(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function a(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(l){if(l.ep)return;l.ep=!0;const s=a(l);fetch(l.href,s)}})();function ld(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sd={exports:{}},Cr={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Jg=Symbol.for("react.transitional.element"),Fg=Symbol.for("react.fragment");function rd(e,t,a){var n=null;if(a!==void 0&&(n=""+a),t.key!==void 0&&(n=""+t.key),"key"in t){a={};for(var l in t)l!=="key"&&(a[l]=t[l])}else a=t;return t=a.ref,{$$typeof:Jg,type:e,key:n,ref:t!==void 0?t:null,props:a}}Cr.Fragment=Fg;Cr.jsx=rd;Cr.jsxs=rd;sd.exports=Cr;var u=sd.exports,id={exports:{}},Y={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Vo=Symbol.for("react.transitional.element"),Pg=Symbol.for("react.portal"),Wg=Symbol.for("react.fragment"),Ig=Symbol.for("react.strict_mode"),ep=Symbol.for("react.profiler"),tp=Symbol.for("react.consumer"),ap=Symbol.for("react.context"),np=Symbol.for("react.forward_ref"),lp=Symbol.for("react.suspense"),sp=Symbol.for("react.memo"),od=Symbol.for("react.lazy"),ec=Symbol.iterator;function rp(e){return e===null||typeof e!="object"?null:(e=ec&&e[ec]||e["@@iterator"],typeof e=="function"?e:null)}var ud={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cd=Object.assign,fd={};function Un(e,t,a){this.props=e,this.context=t,this.refs=fd,this.updater=a||ud}Un.prototype.isReactComponent={};Un.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")};Un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dd(){}dd.prototype=Un.prototype;function qo(e,t,a){this.props=e,this.context=t,this.refs=fd,this.updater=a||ud}var Yo=qo.prototype=new dd;Yo.constructor=qo;cd(Yo,Un.prototype);Yo.isPureReactComponent=!0;var tc=Array.isArray,fe={H:null,A:null,T:null,S:null,V:null},hd=Object.prototype.hasOwnProperty;function $o(e,t,a,n,l,s){return a=s.ref,{$$typeof:Vo,type:e,key:t,ref:a!==void 0?a:null,props:s}}function ip(e,t){return $o(e.type,t,void 0,void 0,void 0,e.props)}function Xo(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vo}function op(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(a){return t[a]})}var ac=/\/+/g;function Jr(e,t){return typeof e=="object"&&e!==null&&e.key!=null?op(""+e.key):t.toString(36)}function nc(){}function up(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(nc,nc):(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 en(e,t,a,n,l){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var r=!1;if(e===null)r=!0;else switch(s){case"bigint":case"string":case"number":r=!0;break;case"object":switch(e.$$typeof){case Vo:case Pg:r=!0;break;case od:return r=e._init,en(r(e._payload),t,a,n,l)}}if(r)return l=l(e),r=n===""?"."+Jr(e,0):n,tc(l)?(a="",r!=null&&(a=r.replace(ac,"$&/")+"/"),en(l,t,a,"",function(c){return c})):l!=null&&(Xo(l)&&(l=ip(l,a+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(ac,"$&/")+"/")+r)),t.push(l)),1;r=0;var i=n===""?".":n+":";if(tc(e))for(var o=0;o<e.length;o++)n=e[o],s=i+Jr(n,o),r+=en(n,t,a,s,l);else if(o=rp(e),typeof o=="function")for(e=o.call(e),o=0;!(n=e.next()).done;)n=n.value,s=i+Jr(n,o++),r+=en(n,t,a,s,l);else if(s==="object"){if(typeof e.then=="function")return en(up(e),t,a,n,l);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 r}function fs(e,t,a){if(e==null)return e;var n=[],l=0;return en(e,n,"","",function(s){return t.call(a,s,l++)}),n}function cp(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(a){(e._status===0||e._status===-1)&&(e._status=1,e._result=a)},function(a){(e._status===0||e._status===-1)&&(e._status=2,e._result=a)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var lc=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)};function fp(){}Y.Children={map:fs,forEach:function(e,t,a){fs(e,function(){t.apply(this,arguments)},a)},count:function(e){var t=0;return fs(e,function(){t++}),t},toArray:function(e){return fs(e,function(t){return t})||[]},only:function(e){if(!Xo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Y.Component=Un;Y.Fragment=Wg;Y.Profiler=ep;Y.PureComponent=qo;Y.StrictMode=Ig;Y.Suspense=lp;Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=fe;Y.__COMPILER_RUNTIME={__proto__:null,c:function(e){return fe.H.useMemoCache(e)}};Y.cache=function(e){return function(){return e.apply(null,arguments)}};Y.cloneElement=function(e,t,a){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=cd({},e.props),l=e.key,s=void 0;if(t!=null)for(r in t.ref!==void 0&&(s=void 0),t.key!==void 0&&(l=""+t.key),t)!hd.call(t,r)||r==="key"||r==="__self"||r==="__source"||r==="ref"&&t.ref===void 0||(n[r]=t[r]);var r=arguments.length-2;if(r===1)n.children=a;else if(1<r){for(var i=Array(r),o=0;o<r;o++)i[o]=arguments[o+2];n.children=i}return $o(e.type,l,void 0,void 0,s,n)};Y.createContext=function(e){return e={$$typeof:ap,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:tp,_context:e},e};Y.createElement=function(e,t,a){var n,l={},s=null;if(t!=null)for(n in t.key!==void 0&&(s=""+t.key),t)hd.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(l[n]=t[n]);var r=arguments.length-2;if(r===1)l.children=a;else if(1<r){for(var i=Array(r),o=0;o<r;o++)i[o]=arguments[o+2];l.children=i}if(e&&e.defaultProps)for(n in r=e.defaultProps,r)l[n]===void 0&&(l[n]=r[n]);return $o(e,s,void 0,void 0,null,l)};Y.createRef=function(){return{current:null}};Y.forwardRef=function(e){return{$$typeof:np,render:e}};Y.isValidElement=Xo;Y.lazy=function(e){return{$$typeof:od,_payload:{_status:-1,_result:e},_init:cp}};Y.memo=function(e,t){return{$$typeof:sp,type:e,compare:t===void 0?null:t}};Y.startTransition=function(e){var t=fe.T,a={};fe.T=a;try{var n=e(),l=fe.S;l!==null&&l(a,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(fp,lc)}catch(s){lc(s)}finally{fe.T=t}};Y.unstable_useCacheRefresh=function(){return fe.H.useCacheRefresh()};Y.use=function(e){return fe.H.use(e)};Y.useActionState=function(e,t,a){return fe.H.useActionState(e,t,a)};Y.useCallback=function(e,t){return fe.H.useCallback(e,t)};Y.useContext=function(e){return fe.H.useContext(e)};Y.useDebugValue=function(){};Y.useDeferredValue=function(e,t){return fe.H.useDeferredValue(e,t)};Y.useEffect=function(e,t,a){var n=fe.H;if(typeof a=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return n.useEffect(e,t)};Y.useId=function(){return fe.H.useId()};Y.useImperativeHandle=function(e,t,a){return fe.H.useImperativeHandle(e,t,a)};Y.useInsertionEffect=function(e,t){return fe.H.useInsertionEffect(e,t)};Y.useLayoutEffect=function(e,t){return fe.H.useLayoutEffect(e,t)};Y.useMemo=function(e,t){return fe.H.useMemo(e,t)};Y.useOptimistic=function(e,t){return fe.H.useOptimistic(e,t)};Y.useReducer=function(e,t,a){return fe.H.useReducer(e,t,a)};Y.useRef=function(e){return fe.H.useRef(e)};Y.useState=function(e){return fe.H.useState(e)};Y.useSyncExternalStore=function(e,t,a){return fe.H.useSyncExternalStore(e,t,a)};Y.useTransition=function(){return fe.H.useTransition()};Y.version="19.1.0";id.exports=Y;var x=id.exports;const md=ld(x);var gd={exports:{}},Tr={},pd={exports:{}},yd={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(A,_){var z=A.length;A.push(_);e:for(;0<z;){var U=z-1>>>1,J=A[U];if(0<l(J,_))A[U]=_,A[z]=J,z=U;else break e}}function a(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var _=A[0],z=A.pop();if(z!==_){A[0]=z;e:for(var U=0,J=A.length,Oe=J>>>1;U<Oe;){var Me=2*(U+1)-1,F=A[Me],pe=Me+1,mt=A[pe];if(0>l(F,z))pe<J&&0>l(mt,F)?(A[U]=mt,A[pe]=z,U=pe):(A[U]=F,A[Me]=z,U=Me);else if(pe<J&&0>l(mt,z))A[U]=mt,A[pe]=z,U=pe;else break e}}return _}function l(A,_){var z=A.sortIndex-_.sortIndex;return z!==0?z:A.id-_.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var r=Date,i=r.now();e.unstable_now=function(){return r.now()-i}}var o=[],c=[],f=1,g=null,d=3,y=!1,S=!1,b=!1,w=!1,h=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;function v(A){for(var _=a(c);_!==null;){if(_.callback===null)n(c);else if(_.startTime<=A)n(c),_.sortIndex=_.expirationTime,t(o,_);else break;_=a(c)}}function N(A){if(b=!1,v(A),!S)if(a(o)!==null)S=!0,E||(E=!0,te());else{var _=a(c);_!==null&&oe(N,_.startTime-A)}}var E=!1,j=-1,C=5,k=-1;function R(){return w?!0:!(e.unstable_now()-k<C)}function B(){if(w=!1,E){var A=e.unstable_now();k=A;var _=!0;try{e:{S=!1,b&&(b=!1,m(j),j=-1),y=!0;var z=d;try{t:{for(v(A),g=a(o);g!==null&&!(g.expirationTime>A&&R());){var U=g.callback;if(typeof U=="function"){g.callback=null,d=g.priorityLevel;var J=U(g.expirationTime<=A);if(A=e.unstable_now(),typeof J=="function"){g.callback=J,v(A),_=!0;break t}g===a(o)&&n(o),v(A)}else n(o);g=a(o)}if(g!==null)_=!0;else{var Oe=a(c);Oe!==null&&oe(N,Oe.startTime-A),_=!1}}break e}finally{g=null,d=z,y=!1}_=void 0}}finally{_?te():E=!1}}}var te;if(typeof p=="function")te=function(){p(B)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,Z=me.port2;me.port1.onmessage=B,te=function(){Z.postMessage(null)}}else te=function(){h(B,0)};function oe(A,_){j=h(function(){A(e.unstable_now())},_)}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(A){A.callback=null},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(A){switch(d){case 1:case 2:case 3:var _=3;break;default:_=d}var z=d;d=_;try{return A()}finally{d=z}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(A,_){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var z=d;d=A;try{return _()}finally{d=z}},e.unstable_scheduleCallback=function(A,_,z){var U=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?U+z:U):z=U,A){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=z+J,A={id:f++,callback:_,priorityLevel:A,startTime:z,expirationTime:J,sortIndex:-1},z>U?(A.sortIndex=z,t(c,A),a(o)===null&&A===a(c)&&(b?(m(j),j=-1):b=!0,oe(N,z-U))):(A.sortIndex=J,t(o,A),S||y||(S=!0,E||(E=!0,te()))),A},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(A){var _=d;return function(){var z=d;d=_;try{return A.apply(this,arguments)}finally{d=z}}}})(yd);pd.exports=yd;var dp=pd.exports,xd={exports:{}},Ve={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var hp=x;function vd(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 Ft(){}var Ge={d:{f:Ft,r:function(){throw Error(vd(522))},D:Ft,C:Ft,L:Ft,m:Ft,X:Ft,S:Ft,M:Ft},p:0,findDOMNode:null},mp=Symbol.for("react.portal");function gp(e,t,a){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:mp,key:n==null?null:""+n,children:e,containerInfo:t,implementation:a}}var fl=hp.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Ar(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ve.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ge;Ve.createPortal=function(e,t){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(vd(299));return gp(e,t,null,a)};Ve.flushSync=function(e){var t=fl.T,a=Ge.p;try{if(fl.T=null,Ge.p=2,e)return e()}finally{fl.T=t,Ge.p=a,Ge.d.f()}};Ve.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ge.d.C(e,t))};Ve.prefetchDNS=function(e){typeof e=="string"&&Ge.d.D(e)};Ve.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var a=t.as,n=Ar(a,t.crossOrigin),l=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;a==="style"?Ge.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:n,integrity:l,fetchPriority:s}):a==="script"&&Ge.d.X(e,{crossOrigin:n,integrity:l,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ve.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var a=Ar(t.as,t.crossOrigin);Ge.d.M(e,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Ge.d.M(e)};Ve.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var a=t.as,n=Ar(a,t.crossOrigin);Ge.d.L(e,a,{crossOrigin:n,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})}};Ve.preloadModule=function(e,t){if(typeof e=="string")if(t){var a=Ar(t.as,t.crossOrigin);Ge.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Ge.d.m(e)};Ve.requestFormReset=function(e){Ge.d.r(e)};Ve.unstable_batchedUpdates=function(e,t){return e(t)};Ve.useFormState=function(e,t,a){return fl.H.useFormState(e,t,a)};Ve.useFormStatus=function(){return fl.H.useHostTransitionStatus()};Ve.version="19.1.0";function bd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(bd)}catch(e){console.error(e)}}bd(),xd.exports=Ve;var pp=xd.exports;/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Ee=dp,Sd=x,yp=pp;function T(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 wd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Yl(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function Nd(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 sc(e){if(Yl(e)!==e)throw Error(T(188))}function xp(e){var t=e.alternate;if(!t){if(t=Yl(e),t===null)throw Error(T(188));return t!==e?null:e}for(var a=e,n=t;;){var l=a.return;if(l===null)break;var s=l.alternate;if(s===null){if(n=l.return,n!==null){a=n;continue}break}if(l.child===s.child){for(s=l.child;s;){if(s===a)return sc(l),e;if(s===n)return sc(l),t;s=s.sibling}throw Error(T(188))}if(a.return!==n.return)a=l,n=s;else{for(var r=!1,i=l.child;i;){if(i===a){r=!0,a=l,n=s;break}if(i===n){r=!0,n=l,a=s;break}i=i.sibling}if(!r){for(i=s.child;i;){if(i===a){r=!0,a=s,n=l;break}if(i===n){r=!0,n=s,a=l;break}i=i.sibling}if(!r)throw Error(T(189))}}if(a.alternate!==n)throw Error(T(190))}if(a.tag!==3)throw Error(T(188));return a.stateNode.current===a?e:t}function jd(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=jd(e),t!==null)return t;e=e.sibling}return null}var ue=Object.assign,vp=Symbol.for("react.element"),ds=Symbol.for("react.transitional.element"),il=Symbol.for("react.portal"),ln=Symbol.for("react.fragment"),Ed=Symbol.for("react.strict_mode"),Di=Symbol.for("react.profiler"),bp=Symbol.for("react.provider"),Cd=Symbol.for("react.consumer"),Lt=Symbol.for("react.context"),Qo=Symbol.for("react.forward_ref"),Li=Symbol.for("react.suspense"),Ui=Symbol.for("react.suspense_list"),Ko=Symbol.for("react.memo"),ta=Symbol.for("react.lazy"),_i=Symbol.for("react.activity"),Sp=Symbol.for("react.memo_cache_sentinel"),rc=Symbol.iterator;function Fn(e){return e===null||typeof e!="object"?null:(e=rc&&e[rc]||e["@@iterator"],typeof e=="function"?e:null)}var wp=Symbol.for("react.client.reference");function Hi(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===wp?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ln:return"Fragment";case Di:return"Profiler";case Ed:return"StrictMode";case Li:return"Suspense";case Ui:return"SuspenseList";case _i:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case il:return"Portal";case Lt:return(e.displayName||"Context")+".Provider";case Cd:return(e._context.displayName||"Context")+".Consumer";case Qo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ko:return t=e.displayName||null,t!==null?t:Hi(e.type)||"Memo";case ta:t=e._payload,e=e._init;try{return Hi(e(t))}catch{}}return null}var ol=Array.isArray,H=Sd.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=yp.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ra={pending:!1,data:null,method:null,action:null},Bi=[],sn=-1;function At(e){return{current:e}}function Re(e){0>sn||(e.current=Bi[sn],Bi[sn]=null,sn--)}function de(e,t){sn++,Bi[sn]=e.current,e.current=t}var Et=At(null),Tl=At(null),fa=At(null),Xs=At(null);function Qs(e,t){switch(de(fa,t),de(Tl,e),de(Et,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?df(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=df(t),e=Ym(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Re(Et),de(Et,e)}function En(){Re(Et),Re(Tl),Re(fa)}function Gi(e){e.memoizedState!==null&&de(Xs,e);var t=Et.current,a=Ym(t,e.type);t!==a&&(de(Tl,e),de(Et,a))}function Ks(e){Tl.current===e&&(Re(Et),Re(Tl)),Xs.current===e&&(Re(Xs),_l._currentValue=Ra)}var Vi=Object.prototype.hasOwnProperty,Zo=Ee.unstable_scheduleCallback,Fr=Ee.unstable_cancelCallback,Np=Ee.unstable_shouldYield,jp=Ee.unstable_requestPaint,Ct=Ee.unstable_now,Ep=Ee.unstable_getCurrentPriorityLevel,Td=Ee.unstable_ImmediatePriority,Ad=Ee.unstable_UserBlockingPriority,Zs=Ee.unstable_NormalPriority,Cp=Ee.unstable_LowPriority,kd=Ee.unstable_IdlePriority,Tp=Ee.log,Ap=Ee.unstable_setDisableYieldValue,$l=null,We=null;function ia(e){if(typeof Tp=="function"&&Ap(e),We&&typeof We.setStrictMode=="function")try{We.setStrictMode($l,e)}catch{}}var Ie=Math.clz32?Math.clz32:Op,kp=Math.log,Rp=Math.LN2;function Op(e){return e>>>=0,e===0?32:31-(kp(e)/Rp|0)|0}var hs=256,ms=4194304;function Ta(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 kr(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var l=0,s=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var i=n&134217727;return i!==0?(n=i&~s,n!==0?l=Ta(n):(r&=i,r!==0?l=Ta(r):a||(a=i&~e,a!==0&&(l=Ta(a))))):(i=n&~s,i!==0?l=Ta(i):r!==0?l=Ta(r):a||(a=n&~e,a!==0&&(l=Ta(a)))),l===0?0:t!==0&&t!==l&&!(t&s)&&(s=l&-l,a=t&-t,s>=a||s===32&&(a&4194048)!==0)?t:l}function Xl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Mp(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 Rd(){var e=hs;return hs<<=1,!(hs&4194048)&&(hs=256),e}function Od(){var e=ms;return ms<<=1,!(ms&62914560)&&(ms=4194304),e}function Pr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ql(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function zp(e,t,a,n,l,s){var r=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var i=e.entanglements,o=e.expirationTimes,c=e.hiddenUpdates;for(a=r&~a;0<a;){var f=31-Ie(a),g=1<<f;i[f]=0,o[f]=-1;var d=c[f];if(d!==null)for(c[f]=null,f=0;f<d.length;f++){var y=d[f];y!==null&&(y.lane&=-536870913)}a&=~g}n!==0&&Md(e,n,0),s!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=s&~(r&~t))}function Md(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Ie(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function zd(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Ie(a),l=1<<n;l&t|e[n]&t&&(e[n]|=t),a&=~l}}function Jo(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 Fo(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Dd(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:Im(e.type))}function Dp(e,t){var a=I.p;try{return I.p=e,t()}finally{I.p=a}}var Na=Math.random().toString(36).slice(2),Ue="__reactFiber$"+Na,Xe="__reactProps$"+Na,_n="__reactContainer$"+Na,qi="__reactEvents$"+Na,Lp="__reactListeners$"+Na,Up="__reactHandles$"+Na,ic="__reactResources$"+Na,Kl="__reactMarker$"+Na;function Po(e){delete e[Ue],delete e[Xe],delete e[qi],delete e[Lp],delete e[Up]}function rn(e){var t=e[Ue];if(t)return t;for(var a=e.parentNode;a;){if(t=a[_n]||a[Ue]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=gf(e);e!==null;){if(a=e[Ue])return a;e=gf(e)}return t}e=a,a=e.parentNode}return null}function Hn(e){if(e=e[Ue]||e[_n]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function ul(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(T(33))}function yn(e){var t=e[ic];return t||(t=e[ic]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ae(e){e[Kl]=!0}var Ld=new Set,Ud={};function qa(e,t){Cn(e,t),Cn(e+"Capture",t)}function Cn(e,t){for(Ud[e]=t,e=0;e<t.length;e++)Ld.add(t[e])}var _p=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]*$"),oc={},uc={};function Hp(e){return Vi.call(uc,e)?!0:Vi.call(oc,e)?!1:_p.test(e)?uc[e]=!0:(oc[e]=!0,!1)}function Rs(e,t,a){if(Hp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function gs(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Ot(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}var Wr,cc;function tn(e){if(Wr===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Wr=t&&t[1]||"",cc=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Wr+e+cc}var Ir=!1;function ei(e,t){if(!e||Ir)return"";Ir=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(y){var d=y}Reflect.construct(e,[],g)}else{try{g.call()}catch(y){d=y}e.call(g.prototype)}}else{try{throw Error()}catch(y){d=y}(g=e())&&typeof g.catch=="function"&&g.catch(function(){})}}catch(y){if(y&&d&&typeof y.stack=="string")return[y.stack,d.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=n.DetermineComponentFrameRoot(),r=s[0],i=s[1];if(r&&i){var o=r.split(`
|
|
44
|
+
`),c=i.split(`
|
|
45
|
+
`);for(l=n=0;n<o.length&&!o[n].includes("DetermineComponentFrameRoot");)n++;for(;l<c.length&&!c[l].includes("DetermineComponentFrameRoot");)l++;if(n===o.length||l===c.length)for(n=o.length-1,l=c.length-1;1<=n&&0<=l&&o[n]!==c[l];)l--;for(;1<=n&&0<=l;n--,l--)if(o[n]!==c[l]){if(n!==1||l!==1)do if(n--,l--,0>l||o[n]!==c[l]){var f=`
|
|
46
|
+
`+o[n].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=n&&0<=l);break}}}finally{Ir=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?tn(a):""}function Bp(e){switch(e.tag){case 26:case 27:case 5:return tn(e.type);case 16:return tn("Lazy");case 13:return tn("Suspense");case 19:return tn("SuspenseList");case 0:case 15:return ei(e.type,!1);case 11:return ei(e.type.render,!1);case 1:return ei(e.type,!0);case 31:return tn("Activity");default:return""}}function fc(e){try{var t="";do t+=Bp(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}function st(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function _d(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gp(e){var t=_d(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(r){n=""+r,s.call(this,r)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Js(e){e._valueTracker||(e._valueTracker=Gp(e))}function Hd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=_d(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Fs(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 Vp=/[\n"\\]/g;function ot(e){return e.replace(Vp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Yi(e,t,a,n,l,s,r,i){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+st(t)):e.value!==""+st(t)&&(e.value=""+st(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?$i(e,r,st(t)):a!=null?$i(e,r,st(a)):n!=null&&e.removeAttribute("value"),l==null&&s!=null&&(e.defaultChecked=!!s),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.name=""+st(i):e.removeAttribute("name")}function Bd(e,t,a,n,l,s,r,i){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||a!=null){if(!(s!=="submit"&&s!=="reset"||t!=null))return;a=a!=null?""+st(a):"",t=t!=null?""+st(t):a,i||t===e.value||(e.value=t),e.defaultValue=t}n=n??l,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=i?e.checked:!!n,e.defaultChecked=!!n,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r)}function $i(e,t,a){t==="number"&&Fs(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function xn(e,t,a,n){if(e=e.options,t){t={};for(var l=0;l<a.length;l++)t["$"+a[l]]=!0;for(a=0;a<e.length;a++)l=t.hasOwnProperty("$"+e[a].value),e[a].selected!==l&&(e[a].selected=l),l&&n&&(e[a].defaultSelected=!0)}else{for(a=""+st(a),t=null,l=0;l<e.length;l++){if(e[l].value===a){e[l].selected=!0,n&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Gd(e,t,a){if(t!=null&&(t=""+st(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+st(a):""}function Vd(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(T(92));if(ol(n)){if(1<n.length)throw Error(T(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=st(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function Tn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var qp=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 dc(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||qp.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function qd(e,t,a){if(t!=null&&typeof t!="object")throw Error(T(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var l in t)n=t[l],t.hasOwnProperty(l)&&a[l]!==n&&dc(e,l,n)}else for(var s in t)t.hasOwnProperty(s)&&dc(e,s,t[s])}function Wo(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 Yp=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"]]),$p=/^[\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 Os(e){return $p.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Xi=null;function Io(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,vn=null;function hc(e){var t=Hn(e);if(t&&(e=t.stateNode)){var a=e[Xe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Yi(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+ot(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var l=n[Xe]||null;if(!l)throw Error(T(90));Yi(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&Hd(n)}break e;case"textarea":Gd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&xn(e,!!a.multiple,t,!1)}}}var ti=!1;function Yd(e,t,a){if(ti)return e(t,a);ti=!0;try{var n=e(t);return n}finally{if(ti=!1,(on!==null||vn!==null)&&(Br(),on&&(t=on,e=vn,vn=on=null,hc(t),e)))for(t=0;t<e.length;t++)hc(e[t])}}function Al(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Xe]||null;if(n===null)return null;a=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(T(231,t,typeof a));return a}var Yt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Qi=!1;if(Yt)try{var Pn={};Object.defineProperty(Pn,"passive",{get:function(){Qi=!0}}),window.addEventListener("test",Pn,Pn),window.removeEventListener("test",Pn,Pn)}catch{Qi=!1}var oa=null,eu=null,Ms=null;function $d(){if(Ms)return Ms;var e,t=eu,a=t.length,n,l="value"in oa?oa.value:oa.textContent,s=l.length;for(e=0;e<a&&t[e]===l[e];e++);var r=a-e;for(n=1;n<=r&&t[a-n]===l[s-n];n++);return Ms=l.slice(e,1<n?1-n:void 0)}function zs(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 ps(){return!0}function mc(){return!1}function Qe(e){function t(a,n,l,s,r){this._reactName=a,this._targetInst=l,this.type=n,this.nativeEvent=s,this.target=r,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(a=e[i],this[i]=a?a(s):s[i]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ps:mc,this.isPropagationStopped=mc,this}return ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ps)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ps)},persist:function(){},isPersistent:ps}),t}var Ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rr=Qe(Ya),Zl=ue({},Ya,{view:0,detail:0}),Xp=Qe(Zl),ai,ni,Wn,Or=ue({},Zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tu,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!==Wn&&(Wn&&e.type==="mousemove"?(ai=e.screenX-Wn.screenX,ni=e.screenY-Wn.screenY):ni=ai=0,Wn=e),ai)},movementY:function(e){return"movementY"in e?e.movementY:ni}}),gc=Qe(Or),Qp=ue({},Or,{dataTransfer:0}),Kp=Qe(Qp),Zp=ue({},Zl,{relatedTarget:0}),li=Qe(Zp),Jp=ue({},Ya,{animationName:0,elapsedTime:0,pseudoElement:0}),Fp=Qe(Jp),Pp=ue({},Ya,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Wp=Qe(Pp),Ip=ue({},Ya,{data:0}),pc=Qe(Ip),e0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},t0={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"},a0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=a0[e])?!!t[e]:!1}function tu(){return n0}var l0=ue({},Zl,{key:function(e){if(e.key){var t=e0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=zs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?t0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tu,charCode:function(e){return e.type==="keypress"?zs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?zs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),s0=Qe(l0),r0=ue({},Or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yc=Qe(r0),i0=ue({},Zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tu}),o0=Qe(i0),u0=ue({},Ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),c0=Qe(u0),f0=ue({},Or,{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}),d0=Qe(f0),h0=ue({},Ya,{newState:0,oldState:0}),m0=Qe(h0),g0=[9,13,27,32],au=Yt&&"CompositionEvent"in window,dl=null;Yt&&"documentMode"in document&&(dl=document.documentMode);var p0=Yt&&"TextEvent"in window&&!dl,Xd=Yt&&(!au||dl&&8<dl&&11>=dl),xc=" ",vc=!1;function Qd(e,t){switch(e){case"keyup":return g0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var un=!1;function y0(e,t){switch(e){case"compositionend":return Kd(t);case"keypress":return t.which!==32?null:(vc=!0,xc);case"textInput":return e=t.data,e===xc&&vc?null:e;default:return null}}function x0(e,t){if(un)return e==="compositionend"||!au&&Qd(e,t)?(e=$d(),Ms=eu=oa=null,un=!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 Xd&&t.locale!=="ko"?null:t.data;default:return null}}var v0={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 bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!v0[e.type]:t==="textarea"}function Zd(e,t,a,n){on?vn?vn.push(n):vn=[n]:on=n,t=mr(t,"onChange"),0<t.length&&(a=new Rr("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var hl=null,kl=null;function b0(e){Gm(e,0)}function Mr(e){var t=ul(e);if(Hd(t))return e}function Sc(e,t){if(e==="change")return t}var Jd=!1;if(Yt){var si;if(Yt){var ri="oninput"in document;if(!ri){var wc=document.createElement("div");wc.setAttribute("oninput","return;"),ri=typeof wc.oninput=="function"}si=ri}else si=!1;Jd=si&&(!document.documentMode||9<document.documentMode)}function Nc(){hl&&(hl.detachEvent("onpropertychange",Fd),kl=hl=null)}function Fd(e){if(e.propertyName==="value"&&Mr(kl)){var t=[];Zd(t,kl,e,Io(e)),Yd(b0,t)}}function S0(e,t,a){e==="focusin"?(Nc(),hl=t,kl=a,hl.attachEvent("onpropertychange",Fd)):e==="focusout"&&Nc()}function w0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mr(kl)}function N0(e,t){if(e==="click")return Mr(t)}function j0(e,t){if(e==="input"||e==="change")return Mr(t)}function E0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var at=typeof Object.is=="function"?Object.is:E0;function Rl(e,t){if(at(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var l=a[n];if(!Vi.call(t,l)||!at(e[l],t[l]))return!1}return!0}function jc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ec(e,t){var a=jc(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=jc(a)}}function Pd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Fs(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Fs(e.document)}return t}function nu(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 C0=Yt&&"documentMode"in document&&11>=document.documentMode,cn=null,Ki=null,ml=null,Zi=!1;function Cc(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Zi||cn==null||cn!==Fs(n)||(n=cn,"selectionStart"in n&&nu(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ml&&Rl(ml,n)||(ml=n,n=mr(Ki,"onSelect"),0<n.length&&(t=new Rr("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=cn)))}function Ea(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var fn={animationend:Ea("Animation","AnimationEnd"),animationiteration:Ea("Animation","AnimationIteration"),animationstart:Ea("Animation","AnimationStart"),transitionrun:Ea("Transition","TransitionRun"),transitionstart:Ea("Transition","TransitionStart"),transitioncancel:Ea("Transition","TransitionCancel"),transitionend:Ea("Transition","TransitionEnd")},ii={},Id={};Yt&&(Id=document.createElement("div").style,"AnimationEvent"in window||(delete fn.animationend.animation,delete fn.animationiteration.animation,delete fn.animationstart.animation),"TransitionEvent"in window||delete fn.transitionend.transition);function $a(e){if(ii[e])return ii[e];if(!fn[e])return e;var t=fn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Id)return ii[e]=t[a];return e}var eh=$a("animationend"),th=$a("animationiteration"),ah=$a("animationstart"),T0=$a("transitionrun"),A0=$a("transitionstart"),k0=$a("transitioncancel"),nh=$a("transitionend"),lh=new Map,Ji="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(" ");Ji.push("scrollEnd");function xt(e,t){lh.set(e,t),qa(t,[e])}var Tc=new WeakMap;function ut(e,t){if(typeof e=="object"&&e!==null){var a=Tc.get(e);return a!==void 0?a:(t={value:e,source:t,stack:fc(t)},Tc.set(e,t),t)}return{value:e,source:t,stack:fc(t)}}var lt=[],dn=0,lu=0;function zr(){for(var e=dn,t=lu=dn=0;t<e;){var a=lt[t];lt[t++]=null;var n=lt[t];lt[t++]=null;var l=lt[t];lt[t++]=null;var s=lt[t];if(lt[t++]=null,n!==null&&l!==null){var r=n.pending;r===null?l.next=l:(l.next=r.next,r.next=l),n.pending=l}s!==0&&sh(a,l,s)}}function Dr(e,t,a,n){lt[dn++]=e,lt[dn++]=t,lt[dn++]=a,lt[dn++]=n,lu|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function su(e,t,a,n){return Dr(e,t,a,n),Ps(e)}function Bn(e,t){return Dr(e,null,null,t),Ps(e)}function sh(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var l=!1,s=e.return;s!==null;)s.childLanes|=a,n=s.alternate,n!==null&&(n.childLanes|=a),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(l=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,l&&t!==null&&(l=31-Ie(a),e=s.hiddenUpdates,n=e[l],n===null?e[l]=[t]:n.push(t),t.lane=a|536870912),s):null}function Ps(e){if(50<jl)throw jl=0,yo=null,Error(T(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hn={};function R0(e,t,a,n){this.tag=e,this.key=a,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pe(e,t,a,n){return new R0(e,t,a,n)}function ru(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gt(e,t){var a=e.alternate;return a===null?(a=Pe(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function rh(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ds(e,t,a,n,l,s){var r=0;if(n=e,typeof e=="function")ru(e)&&(r=1);else if(typeof e=="string")r=My(e,a,Et.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case _i:return e=Pe(31,a,t,l),e.elementType=_i,e.lanes=s,e;case ln:return Oa(a.children,l,s,t);case Ed:r=8,l|=24;break;case Di:return e=Pe(12,a,t,l|2),e.elementType=Di,e.lanes=s,e;case Li:return e=Pe(13,a,t,l),e.elementType=Li,e.lanes=s,e;case Ui:return e=Pe(19,a,t,l),e.elementType=Ui,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case bp:case Lt:r=10;break e;case Cd:r=9;break e;case Qo:r=11;break e;case Ko:r=14;break e;case ta:r=16,n=null;break e}r=29,a=Error(T(130,e===null?"null":typeof e,"")),n=null}return t=Pe(r,a,t,l),t.elementType=e,t.type=n,t.lanes=s,t}function Oa(e,t,a,n){return e=Pe(7,e,n,t),e.lanes=a,e}function oi(e,t,a){return e=Pe(6,e,null,t),e.lanes=a,e}function ui(e,t,a){return t=Pe(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mn=[],gn=0,Ws=null,Is=0,rt=[],it=0,Ma=null,Ut=1,_t="";function Aa(e,t){mn[gn++]=Is,mn[gn++]=Ws,Ws=e,Is=t}function ih(e,t,a){rt[it++]=Ut,rt[it++]=_t,rt[it++]=Ma,Ma=e;var n=Ut;e=_t;var l=32-Ie(n)-1;n&=~(1<<l),a+=1;var s=32-Ie(t)+l;if(30<s){var r=l-l%5;s=(n&(1<<r)-1).toString(32),n>>=r,l-=r,Ut=1<<32-Ie(t)+l|a<<l|n,_t=s+e}else Ut=1<<s|a<<l|n,_t=e}function iu(e){e.return!==null&&(Aa(e,1),ih(e,1,0))}function ou(e){for(;e===Ws;)Ws=mn[--gn],mn[gn]=null,Is=mn[--gn],mn[gn]=null;for(;e===Ma;)Ma=rt[--it],rt[it]=null,_t=rt[--it],rt[it]=null,Ut=rt[--it],rt[it]=null}var Be=null,ye=null,W=!1,za=null,wt=!1,Fi=Error(T(519));function Ha(e){var t=Error(T(418,""));throw Ol(ut(t,e)),Fi}function Ac(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Ue]=e,t[Xe]=n,a){case"dialog":X("cancel",t),X("close",t);break;case"iframe":case"object":case"embed":X("load",t);break;case"video":case"audio":for(a=0;a<Dl.length;a++)X(Dl[a],t);break;case"source":X("error",t);break;case"img":case"image":case"link":X("error",t),X("load",t);break;case"details":X("toggle",t);break;case"input":X("invalid",t),Bd(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Js(t);break;case"select":X("invalid",t);break;case"textarea":X("invalid",t),Vd(t,n.value,n.defaultValue,n.children),Js(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||qm(t.textContent,a)?(n.popover!=null&&(X("beforetoggle",t),X("toggle",t)),n.onScroll!=null&&X("scroll",t),n.onScrollEnd!=null&&X("scrollend",t),n.onClick!=null&&(t.onclick=qr),t=!0):t=!1,t||Ha(e)}function kc(e){for(Be=e.return;Be;)switch(Be.tag){case 5:case 13:wt=!1;return;case 27:case 3:wt=!0;return;default:Be=Be.return}}function In(e){if(e!==Be)return!1;if(!W)return kc(e),W=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||No(e.type,e.memoizedProps)),a=!a),a&&ye&&Ha(e),kc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){ye=pt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}ye=null}}else t===27?(t=ye,ja(e.type)?(e=Co,Co=null,ye=e):ye=t):ye=Be?pt(e.stateNode.nextSibling):null;return!0}function Jl(){ye=Be=null,W=!1}function Rc(){var e=za;return e!==null&&($e===null?$e=e:$e.push.apply($e,e),za=null),e}function Ol(e){za===null?za=[e]:za.push(e)}var Pi=At(null),Xa=null,Ht=null;function na(e,t,a){de(Pi,t._currentValue),t._currentValue=a}function Vt(e){e._currentValue=Pi.current,Re(Pi)}function Wi(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Ii(e,t,a,n){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var s=l.dependencies;if(s!==null){var r=l.child;s=s.firstContext;e:for(;s!==null;){var i=s;s=l;for(var o=0;o<t.length;o++)if(i.context===t[o]){s.lanes|=a,i=s.alternate,i!==null&&(i.lanes|=a),Wi(s.return,a,e),n||(r=null);break e}s=i.next}}else if(l.tag===18){if(r=l.return,r===null)throw Error(T(341));r.lanes|=a,s=r.alternate,s!==null&&(s.lanes|=a),Wi(r,a,e),r=null}else r=l.child;if(r!==null)r.return=l;else for(r=l;r!==null;){if(r===e){r=null;break}if(l=r.sibling,l!==null){l.return=r.return,r=l;break}r=r.return}l=r}}function Fl(e,t,a,n){e=null;for(var l=t,s=!1;l!==null;){if(!s){if(l.flags&524288)s=!0;else if(l.flags&262144)break}if(l.tag===10){var r=l.alternate;if(r===null)throw Error(T(387));if(r=r.memoizedProps,r!==null){var i=l.type;at(l.pendingProps.value,r.value)||(e!==null?e.push(i):e=[i])}}else if(l===Xs.current){if(r=l.alternate,r===null)throw Error(T(387));r.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(_l):e=[_l])}l=l.return}e!==null&&Ii(t,e,a,n),t.flags|=262144}function er(e){for(e=e.firstContext;e!==null;){if(!at(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ba(e){Xa=e,Ht=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _e(e){return oh(Xa,e)}function ys(e,t){return Xa===null&&Ba(e),oh(e,t)}function oh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ht===null){if(e===null)throw Error(T(308));Ht=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ht=Ht.next=t;return a}var O0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},M0=Ee.unstable_scheduleCallback,z0=Ee.unstable_NormalPriority,Ne={$$typeof:Lt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uu(){return{controller:new O0,data:new Map,refCount:0}}function Pl(e){e.refCount--,e.refCount===0&&M0(z0,function(){e.controller.abort()})}var gl=null,eo=0,An=0,bn=null;function D0(e,t){if(gl===null){var a=gl=[];eo=0,An=Mu(),bn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return eo++,t.then(Oc,Oc),t}function Oc(){if(--eo===0&&gl!==null){bn!==null&&(bn.status="fulfilled");var e=gl;gl=null,An=0,bn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function L0(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(l){a.push(l)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var l=0;l<a.length;l++)(0,a[l])(t)},function(l){for(n.status="rejected",n.reason=l,l=0;l<a.length;l++)(0,a[l])(void 0)}),n}var Mc=H.S;H.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&D0(e,t),Mc!==null&&Mc(e,t)};var Da=At(null);function cu(){var e=Da.current;return e!==null?e:ie.pooledCache}function Ls(e,t){t===null?de(Da,Da.current):de(Da,t.pool)}function uh(){var e=cu();return e===null?null:{parent:Ne._currentValue,pool:e}}var Wl=Error(T(460)),ch=Error(T(474)),Lr=Error(T(542)),to={then:function(){}};function zc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xs(){}function fh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(xs,xs),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lc(e),e;default:if(typeof t.status=="string")t.then(xs,xs);else{if(e=ie,e!==null&&100<e.shellSuspendCounter)throw Error(T(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=n}},function(n){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Lc(e),e}throw pl=t,Wl}}var pl=null;function Dc(){if(pl===null)throw Error(T(459));var e=pl;return pl=null,e}function Lc(e){if(e===Wl||e===Lr)throw Error(T(483))}var aa=!1;function fu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ao(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 da(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ha(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,ne&2){var l=n.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),n.pending=t,t=Ps(e),sh(e,null,a),t}return Dr(e,n,t,a),Ps(e)}function yl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,zd(e,a)}}function ci(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var l=null,s=null;if(a=a.firstBaseUpdate,a!==null){do{var r={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};s===null?l=s=r:s=s.next=r,a=a.next}while(a!==null);s===null?l=s=t:s=s.next=t}else l=s=t;a={baseState:n.baseState,firstBaseUpdate:l,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var no=!1;function xl(){if(no){var e=bn;if(e!==null)throw e}}function vl(e,t,a,n){no=!1;var l=e.updateQueue;aa=!1;var s=l.firstBaseUpdate,r=l.lastBaseUpdate,i=l.shared.pending;if(i!==null){l.shared.pending=null;var o=i,c=o.next;o.next=null,r===null?s=c:r.next=c,r=o;var f=e.alternate;f!==null&&(f=f.updateQueue,i=f.lastBaseUpdate,i!==r&&(i===null?f.firstBaseUpdate=c:i.next=c,f.lastBaseUpdate=o))}if(s!==null){var g=l.baseState;r=0,f=c=o=null,i=s;do{var d=i.lane&-536870913,y=d!==i.lane;if(y?(P&d)===d:(n&d)===d){d!==0&&d===An&&(no=!0),f!==null&&(f=f.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var S=e,b=i;d=t;var w=a;switch(b.tag){case 1:if(S=b.payload,typeof S=="function"){g=S.call(w,g,d);break e}g=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=b.payload,d=typeof S=="function"?S.call(w,g,d):S,d==null)break e;g=ue({},g,d);break e;case 2:aa=!0}}d=i.callback,d!==null&&(e.flags|=64,y&&(e.flags|=8192),y=l.callbacks,y===null?l.callbacks=[d]:y.push(d))}else y={lane:d,tag:i.tag,payload:i.payload,callback:i.callback,next:null},f===null?(c=f=y,o=g):f=f.next=y,r|=d;if(i=i.next,i===null){if(i=l.shared.pending,i===null)break;y=i,i=y.next,y.next=null,l.lastBaseUpdate=y,l.shared.pending=null}}while(!0);f===null&&(o=g),l.baseState=o,l.firstBaseUpdate=c,l.lastBaseUpdate=f,s===null&&(l.shared.lanes=0),wa|=r,e.lanes=r,e.memoizedState=g}}function dh(e,t){if(typeof e!="function")throw Error(T(191,e));e.call(t)}function hh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)dh(a[e],t)}var kn=At(null),tr=At(0);function Uc(e,t){e=Qt,de(tr,e),de(kn,t),Qt=e|t.baseLanes}function lo(){de(tr,Qt),de(kn,kn.current)}function du(){Qt=tr.current,Re(kn),Re(tr)}var ba=0,$=null,se=null,Se=null,ar=!1,Sn=!1,Ga=!1,nr=0,Ml=0,wn=null,U0=0;function ve(){throw Error(T(321))}function hu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!at(e[a],t[a]))return!1;return!0}function mu(e,t,a,n,l,s){return ba=s,$=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?$h:Xh,Ga=!1,s=a(n,l),Ga=!1,Sn&&(s=gh(t,a,n,l)),mh(e),s}function mh(e){H.H=lr;var t=se!==null&&se.next!==null;if(ba=0,Se=se=$=null,ar=!1,Ml=0,wn=null,t)throw Error(T(300));e===null||ke||(e=e.dependencies,e!==null&&er(e)&&(ke=!0))}function gh(e,t,a,n){$=e;var l=0;do{if(Sn&&(wn=null),Ml=0,Sn=!1,25<=l)throw Error(T(301));if(l+=1,Se=se=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}H.H=Y0,s=t(a,n)}while(Sn);return s}function _0(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?Il(t):t,e=e.useState()[0],(se!==null?se.memoizedState:null)!==e&&($.flags|=1024),t}function gu(){var e=nr!==0;return nr=0,e}function pu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function yu(e){if(ar){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ar=!1}ba=0,Se=se=$=null,Sn=!1,Ml=nr=0,wn=null}function qe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?$.memoizedState=Se=e:Se=Se.next=e,Se}function we(){if(se===null){var e=$.alternate;e=e!==null?e.memoizedState:null}else e=se.next;var t=Se===null?$.memoizedState:Se.next;if(t!==null)Se=t,se=e;else{if(e===null)throw $.alternate===null?Error(T(467)):Error(T(310));se=e,e={memoizedState:se.memoizedState,baseState:se.baseState,baseQueue:se.baseQueue,queue:se.queue,next:null},Se===null?$.memoizedState=Se=e:Se=Se.next=e}return Se}function xu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Il(e){var t=Ml;return Ml+=1,wn===null&&(wn=[]),e=fh(wn,e,t),t=$,(Se===null?t.memoizedState:Se.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?$h:Xh),e}function Ur(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Il(e);if(e.$$typeof===Lt)return _e(e)}throw Error(T(438,String(e)))}function vu(e){var t=null,a=$.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=$.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=xu(),$.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=Sp;return t.index++,a}function $t(e,t){return typeof t=="function"?t(e):t}function Us(e){var t=we();return bu(t,se,e)}function bu(e,t,a){var n=e.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=a;var l=e.baseQueue,s=n.pending;if(s!==null){if(l!==null){var r=l.next;l.next=s.next,s.next=r}t.baseQueue=l=s,n.pending=null}if(s=e.baseState,l===null)e.memoizedState=s;else{t=l.next;var i=r=null,o=null,c=t,f=!1;do{var g=c.lane&-536870913;if(g!==c.lane?(P&g)===g:(ba&g)===g){var d=c.revertLane;if(d===0)o!==null&&(o=o.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),g===An&&(f=!0);else if((ba&d)===d){c=c.next,d===An&&(f=!0);continue}else g={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(i=o=g,r=s):o=o.next=g,$.lanes|=d,wa|=d;g=c.action,Ga&&a(s,g),s=c.hasEagerState?c.eagerState:a(s,g)}else d={lane:g,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(i=o=d,r=s):o=o.next=d,$.lanes|=g,wa|=g;c=c.next}while(c!==null&&c!==t);if(o===null?r=s:o.next=i,!at(s,e.memoizedState)&&(ke=!0,f&&(a=bn,a!==null)))throw a;e.memoizedState=s,e.baseState=r,e.baseQueue=o,n.lastRenderedState=s}return l===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function fi(e){var t=we(),a=t.queue;if(a===null)throw Error(T(311));a.lastRenderedReducer=e;var n=a.dispatch,l=a.pending,s=t.memoizedState;if(l!==null){a.pending=null;var r=l=l.next;do s=e(s,r.action),r=r.next;while(r!==l);at(s,t.memoizedState)||(ke=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),a.lastRenderedState=s}return[s,n]}function ph(e,t,a){var n=$,l=we(),s=W;if(s){if(a===void 0)throw Error(T(407));a=a()}else a=t();var r=!at((se||l).memoizedState,a);r&&(l.memoizedState=a,ke=!0),l=l.queue;var i=vh.bind(null,n,l,e);if(es(2048,8,i,[e]),l.getSnapshot!==t||r||Se!==null&&Se.memoizedState.tag&1){if(n.flags|=2048,Rn(9,_r(),xh.bind(null,n,l,a,t),null),ie===null)throw Error(T(349));s||ba&124||yh(n,t,a)}return a}function yh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=$.updateQueue,t===null?(t=xu(),$.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function xh(e,t,a,n){t.value=a,t.getSnapshot=n,bh(t)&&Sh(e)}function vh(e,t,a){return a(function(){bh(t)&&Sh(e)})}function bh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!at(e,a)}catch{return!0}}function Sh(e){var t=Bn(e,2);t!==null&&tt(t,e,2)}function so(e){var t=qe();if(typeof e=="function"){var a=e;if(e=a(),Ga){ia(!0);try{a()}finally{ia(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$t,lastRenderedState:e},t}function wh(e,t,a,n){return e.baseState=a,bu(e,se,typeof n=="function"?n:$t)}function H0(e,t,a,n,l){if(Hr(e))throw Error(T(485));if(e=t.action,e!==null){var s={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){s.listeners.push(r)}};H.T!==null?a(!0):s.isTransition=!1,n(s),a=t.pending,a===null?(s.next=t.pending=s,Nh(t,s)):(s.next=a.next,t.pending=a.next=s)}}function Nh(e,t){var a=t.action,n=t.payload,l=e.state;if(t.isTransition){var s=H.T,r={};H.T=r;try{var i=a(l,n),o=H.S;o!==null&&o(r,i),_c(e,t,i)}catch(c){ro(e,t,c)}finally{H.T=s}}else try{s=a(l,n),_c(e,t,s)}catch(c){ro(e,t,c)}}function _c(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Hc(e,t,n)},function(n){return ro(e,t,n)}):Hc(e,t,a)}function Hc(e,t,a){t.status="fulfilled",t.value=a,jh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Nh(e,a)))}function ro(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,jh(t),t=t.next;while(t!==n)}e.action=null}function jh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Eh(e,t){return t}function Bc(e,t){if(W){var a=ie.formState;if(a!==null){e:{var n=$;if(W){if(ye){t:{for(var l=ye,s=wt;l.nodeType!==8;){if(!s){l=null;break t}if(l=pt(l.nextSibling),l===null){l=null;break t}}s=l.data,l=s==="F!"||s==="F"?l:null}if(l){ye=pt(l.nextSibling),n=l.data==="F!";break e}}Ha(n)}n=!1}n&&(t=a[0])}}return a=qe(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eh,lastRenderedState:t},a.queue=n,a=Vh.bind(null,$,n),n.dispatch=a,n=so(!1),s=ju.bind(null,$,!1,n.queue),n=qe(),l={state:t,dispatch:null,action:e,pending:null},n.queue=l,a=H0.bind(null,$,l,s,a),l.dispatch=a,n.memoizedState=e,[t,a,!1]}function Gc(e){var t=we();return Ch(t,se,e)}function Ch(e,t,a){if(t=bu(e,t,Eh)[0],e=Us($t)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Il(t)}catch(r){throw r===Wl?Lr:r}else n=t;t=we();var l=t.queue,s=l.dispatch;return a!==t.memoizedState&&($.flags|=2048,Rn(9,_r(),B0.bind(null,l,a),null)),[n,s,e]}function B0(e,t){e.action=t}function Vc(e){var t=we(),a=se;if(a!==null)return Ch(t,a,e);we(),t=t.memoizedState,a=we();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Rn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=$.updateQueue,t===null&&(t=xu(),$.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function _r(){return{destroy:void 0,resource:void 0}}function Th(){return we().memoizedState}function _s(e,t,a,n){var l=qe();n=n===void 0?null:n,$.flags|=e,l.memoizedState=Rn(1|t,_r(),a,n)}function es(e,t,a,n){var l=we();n=n===void 0?null:n;var s=l.memoizedState.inst;se!==null&&n!==null&&hu(n,se.memoizedState.deps)?l.memoizedState=Rn(t,s,a,n):($.flags|=e,l.memoizedState=Rn(1|t,s,a,n))}function qc(e,t){_s(8390656,8,e,t)}function Ah(e,t){es(2048,8,e,t)}function kh(e,t){return es(4,2,e,t)}function Rh(e,t){return es(4,4,e,t)}function Oh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Mh(e,t,a){a=a!=null?a.concat([e]):null,es(4,4,Oh.bind(null,t,e),a)}function Su(){}function zh(e,t){var a=we();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&hu(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Dh(e,t){var a=we();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&hu(t,n[1]))return n[0];if(n=e(),Ga){ia(!0);try{e()}finally{ia(!1)}}return a.memoizedState=[n,t],n}function wu(e,t,a){return a===void 0||ba&1073741824?e.memoizedState=t:(e.memoizedState=a,e=jm(),$.lanes|=e,wa|=e,a)}function Lh(e,t,a,n){return at(a,t)?a:kn.current!==null?(e=wu(e,a,n),at(e,t)||(ke=!0),e):ba&42?(e=jm(),$.lanes|=e,wa|=e,t):(ke=!0,e.memoizedState=a)}function Uh(e,t,a,n,l){var s=I.p;I.p=s!==0&&8>s?s:8;var r=H.T,i={};H.T=i,ju(e,!1,t,a);try{var o=l(),c=H.S;if(c!==null&&c(i,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var f=L0(o,n);bl(e,t,f,et(e))}else bl(e,t,n,et(e))}catch(g){bl(e,t,{then:function(){},status:"rejected",reason:g},et())}finally{I.p=s,H.T=r}}function G0(){}function io(e,t,a,n){if(e.tag!==5)throw Error(T(476));var l=_h(e).queue;Uh(e,l,t,Ra,a===null?G0:function(){return Hh(e),a(n)})}function _h(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ra,baseState:Ra,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$t,lastRenderedState:Ra},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$t,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hh(e){var t=_h(e).next.queue;bl(e,t,{},et())}function Nu(){return _e(_l)}function Bh(){return we().memoizedState}function Gh(){return we().memoizedState}function V0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=et();e=da(a);var n=ha(t,e,a);n!==null&&(tt(n,t,a),yl(n,t,a)),t={cache:uu()},e.payload=t;return}t=t.return}}function q0(e,t,a){var n=et();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Hr(e)?qh(t,a):(a=su(e,t,a,n),a!==null&&(tt(a,e,n),Yh(a,t,n)))}function Vh(e,t,a){var n=et();bl(e,t,a,n)}function bl(e,t,a,n){var l={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hr(e))qh(t,l);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var r=t.lastRenderedState,i=s(r,a);if(l.hasEagerState=!0,l.eagerState=i,at(i,r))return Dr(e,t,l,0),ie===null&&zr(),!1}catch{}finally{}if(a=su(e,t,l,n),a!==null)return tt(a,e,n),Yh(a,t,n),!0}return!1}function ju(e,t,a,n){if(n={lane:2,revertLane:Mu(),action:n,hasEagerState:!1,eagerState:null,next:null},Hr(e)){if(t)throw Error(T(479))}else t=su(e,a,n,2),t!==null&&tt(t,e,2)}function Hr(e){var t=e.alternate;return e===$||t!==null&&t===$}function qh(e,t){Sn=ar=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Yh(e,t,a){if(a&4194048){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,zd(e,a)}}var lr={readContext:_e,use:Ur,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useLayoutEffect:ve,useInsertionEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useSyncExternalStore:ve,useId:ve,useHostTransitionStatus:ve,useFormState:ve,useActionState:ve,useOptimistic:ve,useMemoCache:ve,useCacheRefresh:ve},$h={readContext:_e,use:Ur,useCallback:function(e,t){return qe().memoizedState=[e,t===void 0?null:t],e},useContext:_e,useEffect:qc,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,_s(4194308,4,Oh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return _s(4194308,4,e,t)},useInsertionEffect:function(e,t){_s(4,2,e,t)},useMemo:function(e,t){var a=qe();t=t===void 0?null:t;var n=e();if(Ga){ia(!0);try{e()}finally{ia(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=qe();if(a!==void 0){var l=a(t);if(Ga){ia(!0);try{a(t)}finally{ia(!1)}}}else l=t;return n.memoizedState=n.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},n.queue=e,e=e.dispatch=q0.bind(null,$,e),[n.memoizedState,e]},useRef:function(e){var t=qe();return e={current:e},t.memoizedState=e},useState:function(e){e=so(e);var t=e.queue,a=Vh.bind(null,$,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Su,useDeferredValue:function(e,t){var a=qe();return wu(a,e,t)},useTransition:function(){var e=so(!1);return e=Uh.bind(null,$,e.queue,!0,!1),qe().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=$,l=qe();if(W){if(a===void 0)throw Error(T(407));a=a()}else{if(a=t(),ie===null)throw Error(T(349));P&124||yh(n,t,a)}l.memoizedState=a;var s={value:a,getSnapshot:t};return l.queue=s,qc(vh.bind(null,n,s,e),[e]),n.flags|=2048,Rn(9,_r(),xh.bind(null,n,s,a,t),null),a},useId:function(){var e=qe(),t=ie.identifierPrefix;if(W){var a=_t,n=Ut;a=(n&~(1<<32-Ie(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=nr++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=U0++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Nu,useFormState:Bc,useActionState:Bc,useOptimistic:function(e){var t=qe();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ju.bind(null,$,!0,a),a.dispatch=t,[e,t]},useMemoCache:vu,useCacheRefresh:function(){return qe().memoizedState=V0.bind(null,$)}},Xh={readContext:_e,use:Ur,useCallback:zh,useContext:_e,useEffect:Ah,useImperativeHandle:Mh,useInsertionEffect:kh,useLayoutEffect:Rh,useMemo:Dh,useReducer:Us,useRef:Th,useState:function(){return Us($t)},useDebugValue:Su,useDeferredValue:function(e,t){var a=we();return Lh(a,se.memoizedState,e,t)},useTransition:function(){var e=Us($t)[0],t=we().memoizedState;return[typeof e=="boolean"?e:Il(e),t]},useSyncExternalStore:ph,useId:Bh,useHostTransitionStatus:Nu,useFormState:Gc,useActionState:Gc,useOptimistic:function(e,t){var a=we();return wh(a,se,e,t)},useMemoCache:vu,useCacheRefresh:Gh},Y0={readContext:_e,use:Ur,useCallback:zh,useContext:_e,useEffect:Ah,useImperativeHandle:Mh,useInsertionEffect:kh,useLayoutEffect:Rh,useMemo:Dh,useReducer:fi,useRef:Th,useState:function(){return fi($t)},useDebugValue:Su,useDeferredValue:function(e,t){var a=we();return se===null?wu(a,e,t):Lh(a,se.memoizedState,e,t)},useTransition:function(){var e=fi($t)[0],t=we().memoizedState;return[typeof e=="boolean"?e:Il(e),t]},useSyncExternalStore:ph,useId:Bh,useHostTransitionStatus:Nu,useFormState:Vc,useActionState:Vc,useOptimistic:function(e,t){var a=we();return se!==null?wh(a,se,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:vu,useCacheRefresh:Gh},Nn=null,zl=0;function vs(e){var t=zl;return zl+=1,Nn===null&&(Nn=[]),fh(Nn,e,t)}function el(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function bs(e,t){throw t.$$typeof===vp?Error(T(525)):(e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Yc(e){var t=e._init;return t(e._payload)}function Qh(e){function t(h,m){if(e){var p=h.deletions;p===null?(h.deletions=[m],h.flags|=16):p.push(m)}}function a(h,m){if(!e)return null;for(;m!==null;)t(h,m),m=m.sibling;return null}function n(h){for(var m=new Map;h!==null;)h.key!==null?m.set(h.key,h):m.set(h.index,h),h=h.sibling;return m}function l(h,m){return h=Gt(h,m),h.index=0,h.sibling=null,h}function s(h,m,p){return h.index=p,e?(p=h.alternate,p!==null?(p=p.index,p<m?(h.flags|=67108866,m):p):(h.flags|=67108866,m)):(h.flags|=1048576,m)}function r(h){return e&&h.alternate===null&&(h.flags|=67108866),h}function i(h,m,p,v){return m===null||m.tag!==6?(m=oi(p,h.mode,v),m.return=h,m):(m=l(m,p),m.return=h,m)}function o(h,m,p,v){var N=p.type;return N===ln?f(h,m,p.props.children,v,p.key):m!==null&&(m.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===ta&&Yc(N)===m.type)?(m=l(m,p.props),el(m,p),m.return=h,m):(m=Ds(p.type,p.key,p.props,null,h.mode,v),el(m,p),m.return=h,m)}function c(h,m,p,v){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=ui(p,h.mode,v),m.return=h,m):(m=l(m,p.children||[]),m.return=h,m)}function f(h,m,p,v,N){return m===null||m.tag!==7?(m=Oa(p,h.mode,v,N),m.return=h,m):(m=l(m,p),m.return=h,m)}function g(h,m,p){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=oi(""+m,h.mode,p),m.return=h,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ds:return p=Ds(m.type,m.key,m.props,null,h.mode,p),el(p,m),p.return=h,p;case il:return m=ui(m,h.mode,p),m.return=h,m;case ta:var v=m._init;return m=v(m._payload),g(h,m,p)}if(ol(m)||Fn(m))return m=Oa(m,h.mode,p,null),m.return=h,m;if(typeof m.then=="function")return g(h,vs(m),p);if(m.$$typeof===Lt)return g(h,ys(h,m),p);bs(h,m)}return null}function d(h,m,p,v){var N=m!==null?m.key:null;if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return N!==null?null:i(h,m,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ds:return p.key===N?o(h,m,p,v):null;case il:return p.key===N?c(h,m,p,v):null;case ta:return N=p._init,p=N(p._payload),d(h,m,p,v)}if(ol(p)||Fn(p))return N!==null?null:f(h,m,p,v,null);if(typeof p.then=="function")return d(h,m,vs(p),v);if(p.$$typeof===Lt)return d(h,m,ys(h,p),v);bs(h,p)}return null}function y(h,m,p,v,N){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return h=h.get(p)||null,i(m,h,""+v,N);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ds:return h=h.get(v.key===null?p:v.key)||null,o(m,h,v,N);case il:return h=h.get(v.key===null?p:v.key)||null,c(m,h,v,N);case ta:var E=v._init;return v=E(v._payload),y(h,m,p,v,N)}if(ol(v)||Fn(v))return h=h.get(p)||null,f(m,h,v,N,null);if(typeof v.then=="function")return y(h,m,p,vs(v),N);if(v.$$typeof===Lt)return y(h,m,p,ys(m,v),N);bs(m,v)}return null}function S(h,m,p,v){for(var N=null,E=null,j=m,C=m=0,k=null;j!==null&&C<p.length;C++){j.index>C?(k=j,j=null):k=j.sibling;var R=d(h,j,p[C],v);if(R===null){j===null&&(j=k);break}e&&j&&R.alternate===null&&t(h,j),m=s(R,m,C),E===null?N=R:E.sibling=R,E=R,j=k}if(C===p.length)return a(h,j),W&&Aa(h,C),N;if(j===null){for(;C<p.length;C++)j=g(h,p[C],v),j!==null&&(m=s(j,m,C),E===null?N=j:E.sibling=j,E=j);return W&&Aa(h,C),N}for(j=n(j);C<p.length;C++)k=y(j,h,C,p[C],v),k!==null&&(e&&k.alternate!==null&&j.delete(k.key===null?C:k.key),m=s(k,m,C),E===null?N=k:E.sibling=k,E=k);return e&&j.forEach(function(B){return t(h,B)}),W&&Aa(h,C),N}function b(h,m,p,v){if(p==null)throw Error(T(151));for(var N=null,E=null,j=m,C=m=0,k=null,R=p.next();j!==null&&!R.done;C++,R=p.next()){j.index>C?(k=j,j=null):k=j.sibling;var B=d(h,j,R.value,v);if(B===null){j===null&&(j=k);break}e&&j&&B.alternate===null&&t(h,j),m=s(B,m,C),E===null?N=B:E.sibling=B,E=B,j=k}if(R.done)return a(h,j),W&&Aa(h,C),N;if(j===null){for(;!R.done;C++,R=p.next())R=g(h,R.value,v),R!==null&&(m=s(R,m,C),E===null?N=R:E.sibling=R,E=R);return W&&Aa(h,C),N}for(j=n(j);!R.done;C++,R=p.next())R=y(j,h,C,R.value,v),R!==null&&(e&&R.alternate!==null&&j.delete(R.key===null?C:R.key),m=s(R,m,C),E===null?N=R:E.sibling=R,E=R);return e&&j.forEach(function(te){return t(h,te)}),W&&Aa(h,C),N}function w(h,m,p,v){if(typeof p=="object"&&p!==null&&p.type===ln&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case ds:e:{for(var N=p.key;m!==null;){if(m.key===N){if(N=p.type,N===ln){if(m.tag===7){a(h,m.sibling),v=l(m,p.props.children),v.return=h,h=v;break e}}else if(m.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===ta&&Yc(N)===m.type){a(h,m.sibling),v=l(m,p.props),el(v,p),v.return=h,h=v;break e}a(h,m);break}else t(h,m);m=m.sibling}p.type===ln?(v=Oa(p.props.children,h.mode,v,p.key),v.return=h,h=v):(v=Ds(p.type,p.key,p.props,null,h.mode,v),el(v,p),v.return=h,h=v)}return r(h);case il:e:{for(N=p.key;m!==null;){if(m.key===N)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){a(h,m.sibling),v=l(m,p.children||[]),v.return=h,h=v;break e}else{a(h,m);break}else t(h,m);m=m.sibling}v=ui(p,h.mode,v),v.return=h,h=v}return r(h);case ta:return N=p._init,p=N(p._payload),w(h,m,p,v)}if(ol(p))return S(h,m,p,v);if(Fn(p)){if(N=Fn(p),typeof N!="function")throw Error(T(150));return p=N.call(p),b(h,m,p,v)}if(typeof p.then=="function")return w(h,m,vs(p),v);if(p.$$typeof===Lt)return w(h,m,ys(h,p),v);bs(h,p)}return typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint"?(p=""+p,m!==null&&m.tag===6?(a(h,m.sibling),v=l(m,p),v.return=h,h=v):(a(h,m),v=oi(p,h.mode,v),v.return=h,h=v),r(h)):a(h,m)}return function(h,m,p,v){try{zl=0;var N=w(h,m,p,v);return Nn=null,N}catch(j){if(j===Wl||j===Lr)throw j;var E=Pe(29,j,null,h.mode);return E.lanes=v,E.return=h,E}finally{}}}var On=Qh(!0),Kh=Qh(!1),ft=At(null),Tt=null;function la(e){var t=e.alternate;de(je,je.current&1),de(ft,e),Tt===null&&(t===null||kn.current!==null||t.memoizedState!==null)&&(Tt=e)}function Zh(e){if(e.tag===22){if(de(je,je.current),de(ft,e),Tt===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Tt=e)}}else sa()}function sa(){de(je,je.current),de(ft,ft.current)}function Bt(e){Re(ft),Tt===e&&(Tt=null),Re(je)}var je=At(0);function sr(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||Eo(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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}function di(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:ue({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var oo={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=et(),l=da(n);l.payload=t,a!=null&&(l.callback=a),t=ha(e,l,n),t!==null&&(tt(t,e,n),yl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=et(),l=da(n);l.tag=1,l.payload=t,a!=null&&(l.callback=a),t=ha(e,l,n),t!==null&&(tt(t,e,n),yl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=et(),n=da(a);n.tag=2,t!=null&&(n.callback=t),t=ha(e,n,a),t!==null&&(tt(t,e,a),yl(t,e,a))}};function $c(e,t,a,n,l,s,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,r):t.prototype&&t.prototype.isPureReactComponent?!Rl(a,n)||!Rl(l,s):!0}function Xc(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&oo.enqueueReplaceState(t,t.state,null)}function Va(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=ue({},a));for(var l in e)a[l]===void 0&&(a[l]=e[l])}return a}var rr=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)};function Jh(e){rr(e)}function Fh(e){console.error(e)}function Ph(e){rr(e)}function ir(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Qc(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function uo(e,t,a){return a=da(a),a.tag=3,a.payload={element:null},a.callback=function(){ir(e,t)},a}function Wh(e){return e=da(e),e.tag=3,e}function Ih(e,t,a,n){var l=a.type.getDerivedStateFromError;if(typeof l=="function"){var s=n.value;e.payload=function(){return l(s)},e.callback=function(){Qc(t,a,n)}}var r=a.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Qc(t,a,n),typeof l!="function"&&(ma===null?ma=new Set([this]):ma.add(this));var i=n.stack;this.componentDidCatch(n.value,{componentStack:i!==null?i:""})})}function $0(e,t,a,n,l){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Fl(t,a,l,!0),a=ft.current,a!==null){switch(a.tag){case 13:return Tt===null?xo():a.alternate===null&&xe===0&&(xe=3),a.flags&=-257,a.flags|=65536,a.lanes=l,n===to?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ni(e,n,l)),!1;case 22:return a.flags|=65536,n===to?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Ni(e,n,l)),!1}throw Error(T(435,a.tag))}return Ni(e,n,l),xo(),!1}if(W)return t=ft.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=l,n!==Fi&&(e=Error(T(422),{cause:n}),Ol(ut(e,a)))):(n!==Fi&&(t=Error(T(423),{cause:n}),Ol(ut(t,a))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,n=ut(n,a),l=uo(e.stateNode,n,l),ci(e,l),xe!==4&&(xe=2)),!1;var s=Error(T(520),{cause:n});if(s=ut(s,a),Nl===null?Nl=[s]:Nl.push(s),xe!==4&&(xe=2),t===null)return!0;n=ut(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=l&-l,a.lanes|=e,e=uo(a.stateNode,n,e),ci(a,e),!1;case 1:if(t=a.type,s=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(ma===null||!ma.has(s))))return a.flags|=65536,l&=-l,a.lanes|=l,l=Wh(l),Ih(l,e,a,n),ci(a,l),!1}a=a.return}while(a!==null);return!1}var em=Error(T(461)),ke=!1;function ze(e,t,a,n){t.child=e===null?Kh(t,null,a,n):On(t,e.child,a,n)}function Kc(e,t,a,n,l){a=a.render;var s=t.ref;if("ref"in n){var r={};for(var i in n)i!=="ref"&&(r[i]=n[i])}else r=n;return Ba(t),n=mu(e,t,a,r,s,l),i=gu(),e!==null&&!ke?(pu(e,t,l),Xt(e,t,l)):(W&&i&&iu(t),t.flags|=1,ze(e,t,n,l),t.child)}function Zc(e,t,a,n,l){if(e===null){var s=a.type;return typeof s=="function"&&!ru(s)&&s.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=s,tm(e,t,s,n,l)):(e=Ds(a.type,null,n,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Eu(e,l)){var r=s.memoizedProps;if(a=a.compare,a=a!==null?a:Rl,a(r,n)&&e.ref===t.ref)return Xt(e,t,l)}return t.flags|=1,e=Gt(s,n),e.ref=t.ref,e.return=t,t.child=e}function tm(e,t,a,n,l){if(e!==null){var s=e.memoizedProps;if(Rl(s,n)&&e.ref===t.ref)if(ke=!1,t.pendingProps=n=s,Eu(e,l))e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,Xt(e,t,l)}return co(e,t,a,n,l)}function am(e,t,a){var n=t.pendingProps,l=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden"){if(t.flags&128){if(n=s!==null?s.baseLanes|a:a,e!==null){for(l=t.child=e.child,s=0;l!==null;)s=s|l.lanes|l.childLanes,l=l.sibling;t.childLanes=s&~n}else t.childLanes=0,t.child=null;return Jc(e,t,n,a)}if(a&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ls(t,s!==null?s.cachePool:null),s!==null?Uc(t,s):lo(),Zh(t);else return t.lanes=t.childLanes=536870912,Jc(e,t,s!==null?s.baseLanes|a:a,a)}else s!==null?(Ls(t,s.cachePool),Uc(t,s),sa(),t.memoizedState=null):(e!==null&&Ls(t,null),lo(),sa());return ze(e,t,l,a),t.child}function Jc(e,t,a,n){var l=cu();return l=l===null?null:{parent:Ne._currentValue,pool:l},t.memoizedState={baseLanes:a,cachePool:l},e!==null&&Ls(t,null),lo(),Zh(t),e!==null&&Fl(e,t,n,!0),null}function Hs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(T(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function co(e,t,a,n,l){return Ba(t),a=mu(e,t,a,n,void 0,l),n=gu(),e!==null&&!ke?(pu(e,t,l),Xt(e,t,l)):(W&&n&&iu(t),t.flags|=1,ze(e,t,a,l),t.child)}function Fc(e,t,a,n,l,s){return Ba(t),t.updateQueue=null,a=gh(t,n,a,l),mh(e),n=gu(),e!==null&&!ke?(pu(e,t,s),Xt(e,t,s)):(W&&n&&iu(t),t.flags|=1,ze(e,t,a,s),t.child)}function Pc(e,t,a,n,l){if(Ba(t),t.stateNode===null){var s=hn,r=a.contextType;typeof r=="object"&&r!==null&&(s=_e(r)),s=new a(n,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=oo,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=n,s.state=t.memoizedState,s.refs={},fu(t),r=a.contextType,s.context=typeof r=="object"&&r!==null?_e(r):hn,s.state=t.memoizedState,r=a.getDerivedStateFromProps,typeof r=="function"&&(di(t,a,r,n),s.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(r=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),r!==s.state&&oo.enqueueReplaceState(s,s.state,null),vl(t,n,s,l),xl(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){s=t.stateNode;var i=t.memoizedProps,o=Va(a,i);s.props=o;var c=s.context,f=a.contextType;r=hn,typeof f=="object"&&f!==null&&(r=_e(f));var g=a.getDerivedStateFromProps;f=typeof g=="function"||typeof s.getSnapshotBeforeUpdate=="function",i=t.pendingProps!==i,f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i||c!==r)&&Xc(t,s,n,r),aa=!1;var d=t.memoizedState;s.state=d,vl(t,n,s,l),xl(),c=t.memoizedState,i||d!==c||aa?(typeof g=="function"&&(di(t,a,g,n),c=t.memoizedState),(o=aa||$c(t,a,o,n,d,c,r))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),s.props=n,s.state=c,s.context=r,n=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,ao(e,t),r=t.memoizedProps,f=Va(a,r),s.props=f,g=t.pendingProps,d=s.context,c=a.contextType,o=hn,typeof c=="object"&&c!==null&&(o=_e(c)),i=a.getDerivedStateFromProps,(c=typeof i=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(r!==g||d!==o)&&Xc(t,s,n,o),aa=!1,d=t.memoizedState,s.state=d,vl(t,n,s,l),xl();var y=t.memoizedState;r!==g||d!==y||aa||e!==null&&e.dependencies!==null&&er(e.dependencies)?(typeof i=="function"&&(di(t,a,i,n),y=t.memoizedState),(f=aa||$c(t,a,f,n,d,y,o)||e!==null&&e.dependencies!==null&&er(e.dependencies))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,y,o),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,y,o)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=y),s.props=n,s.state=y,s.context=o,n=f):(typeof s.componentDidUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),n=!1)}return s=n,Hs(e,t),n=(t.flags&128)!==0,s||n?(s=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&n?(t.child=On(t,e.child,null,l),t.child=On(t,null,a,l)):ze(e,t,a,l),t.memoizedState=s.state,e=t.child):e=Xt(e,t,l),e}function Wc(e,t,a,n){return Jl(),t.flags|=256,ze(e,t,a,n),t.child}var hi={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mi(e){return{baseLanes:e,cachePool:uh()}}function gi(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ct),e}function nm(e,t,a){var n=t.pendingProps,l=!1,s=(t.flags&128)!==0,r;if((r=s)||(r=e!==null&&e.memoizedState===null?!1:(je.current&2)!==0),r&&(l=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(W){if(l?la(t):sa(),W){var i=ye,o;if(o=i){e:{for(o=i,i=wt;o.nodeType!==8;){if(!i){i=null;break e}if(o=pt(o.nextSibling),o===null){i=null;break e}}i=o}i!==null?(t.memoizedState={dehydrated:i,treeContext:Ma!==null?{id:Ut,overflow:_t}:null,retryLane:536870912,hydrationErrors:null},o=Pe(18,null,null,0),o.stateNode=i,o.return=t,t.child=o,Be=t,ye=null,o=!0):o=!1}o||Ha(t)}if(i=t.memoizedState,i!==null&&(i=i.dehydrated,i!==null))return Eo(i)?t.lanes=32:t.lanes=536870912,null;Bt(t)}return i=n.children,n=n.fallback,l?(sa(),l=t.mode,i=or({mode:"hidden",children:i},l),n=Oa(n,l,a,null),i.return=t,n.return=t,i.sibling=n,t.child=i,l=t.child,l.memoizedState=mi(a),l.childLanes=gi(e,r,a),t.memoizedState=hi,n):(la(t),fo(t,i))}if(o=e.memoizedState,o!==null&&(i=o.dehydrated,i!==null)){if(s)t.flags&256?(la(t),t.flags&=-257,t=pi(e,t,a)):t.memoizedState!==null?(sa(),t.child=e.child,t.flags|=128,t=null):(sa(),l=n.fallback,i=t.mode,n=or({mode:"visible",children:n.children},i),l=Oa(l,i,a,null),l.flags|=2,n.return=t,l.return=t,n.sibling=l,t.child=n,On(t,e.child,null,a),n=t.child,n.memoizedState=mi(a),n.childLanes=gi(e,r,a),t.memoizedState=hi,t=l);else if(la(t),Eo(i)){if(r=i.nextSibling&&i.nextSibling.dataset,r)var c=r.dgst;r=c,n=Error(T(419)),n.stack="",n.digest=r,Ol({value:n,source:null,stack:null}),t=pi(e,t,a)}else if(ke||Fl(e,t,a,!1),r=(a&e.childLanes)!==0,ke||r){if(r=ie,r!==null&&(n=a&-a,n=n&42?1:Jo(n),n=n&(r.suspendedLanes|a)?0:n,n!==0&&n!==o.retryLane))throw o.retryLane=n,Bn(e,n),tt(r,e,n),em;i.data==="$?"||xo(),t=pi(e,t,a)}else i.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,ye=pt(i.nextSibling),Be=t,W=!0,za=null,wt=!1,e!==null&&(rt[it++]=Ut,rt[it++]=_t,rt[it++]=Ma,Ut=e.id,_t=e.overflow,Ma=t),t=fo(t,n.children),t.flags|=4096);return t}return l?(sa(),l=n.fallback,i=t.mode,o=e.child,c=o.sibling,n=Gt(o,{mode:"hidden",children:n.children}),n.subtreeFlags=o.subtreeFlags&65011712,c!==null?l=Gt(c,l):(l=Oa(l,i,a,null),l.flags|=2),l.return=t,n.return=t,n.sibling=l,t.child=n,n=l,l=t.child,i=e.child.memoizedState,i===null?i=mi(a):(o=i.cachePool,o!==null?(c=Ne._currentValue,o=o.parent!==c?{parent:c,pool:c}:o):o=uh(),i={baseLanes:i.baseLanes|a,cachePool:o}),l.memoizedState=i,l.childLanes=gi(e,r,a),t.memoizedState=hi,n):(la(t),a=e.child,e=a.sibling,a=Gt(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=a,t.memoizedState=null,a)}function fo(e,t){return t=or({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function or(e,t){return e=Pe(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function pi(e,t,a){return On(t,e.child,null,a),e=fo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ic(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Wi(e.return,t,a)}function yi(e,t,a,n,l){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:l}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=a,s.tailMode=l)}function lm(e,t,a){var n=t.pendingProps,l=n.revealOrder,s=n.tail;if(ze(e,t,n.children,a),n=je.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ic(e,a,t);else if(e.tag===19)Ic(e,a,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}n&=1}switch(de(je,n),l){case"forwards":for(a=t.child,l=null;a!==null;)e=a.alternate,e!==null&&sr(e)===null&&(l=a),a=a.sibling;a=l,a===null?(l=t.child,t.child=null):(l=a.sibling,a.sibling=null),yi(t,!1,l,a,s);break;case"backwards":for(a=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&sr(e)===null){t.child=l;break}e=l.sibling,l.sibling=a,a=l,l=e}yi(t,!0,a,null,s);break;case"together":yi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Xt(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),wa|=t.lanes,!(a&t.childLanes))if(e!==null){if(Fl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,a=Gt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Gt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Eu(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&er(e)))}function X0(e,t,a){switch(t.tag){case 3:Qs(t,t.stateNode.containerInfo),na(t,Ne,e.memoizedState.cache),Jl();break;case 27:case 5:Gi(t);break;case 4:Qs(t,t.stateNode.containerInfo);break;case 10:na(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(la(t),t.flags|=128,null):a&t.child.childLanes?nm(e,t,a):(la(t),e=Xt(e,t,a),e!==null?e.sibling:null);la(t);break;case 19:var l=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Fl(e,t,a,!1),n=(a&t.childLanes)!==0),l){if(n)return lm(e,t,a);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),de(je,je.current),n)break;return null;case 22:case 23:return t.lanes=0,am(e,t,a);case 24:na(t,Ne,e.memoizedState.cache)}return Xt(e,t,a)}function sm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ke=!0;else{if(!Eu(e,a)&&!(t.flags&128))return ke=!1,X0(e,t,a);ke=!!(e.flags&131072)}else ke=!1,W&&t.flags&1048576&&ih(t,Is,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,l=n._init;if(n=l(n._payload),t.type=n,typeof n=="function")ru(n)?(e=Va(n,e),t.tag=1,t=Pc(null,t,n,e,a)):(t.tag=0,t=co(null,t,n,e,a));else{if(n!=null){if(l=n.$$typeof,l===Qo){t.tag=11,t=Kc(null,t,n,e,a);break e}else if(l===Ko){t.tag=14,t=Zc(null,t,n,e,a);break e}}throw t=Hi(n)||n,Error(T(306,t,""))}}return t;case 0:return co(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,l=Va(n,t.pendingProps),Pc(e,t,n,l,a);case 3:e:{if(Qs(t,t.stateNode.containerInfo),e===null)throw Error(T(387));n=t.pendingProps;var s=t.memoizedState;l=s.element,ao(e,t),vl(t,n,null,a);var r=t.memoizedState;if(n=r.cache,na(t,Ne,n),n!==s.cache&&Ii(t,[Ne],a,!0),xl(),n=r.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Wc(e,t,n,a);break e}else if(n!==l){l=ut(Error(T(424)),t),Ol(l),t=Wc(e,t,n,a);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(ye=pt(e.firstChild),Be=t,W=!0,za=null,wt=!0,a=Kh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Jl(),n===l){t=Xt(e,t,a);break e}ze(e,t,n,a)}t=t.child}return t;case 26:return Hs(e,t),e===null?(a=yf(t.type,null,t.pendingProps,null))?t.memoizedState=a:W||(a=t.type,e=t.pendingProps,n=gr(fa.current).createElement(a),n[Ue]=t,n[Xe]=e,Le(n,a,e),Ae(n),t.stateNode=n):t.memoizedState=yf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Gi(t),e===null&&W&&(n=t.stateNode=Xm(t.type,t.pendingProps,fa.current),Be=t,wt=!0,l=ye,ja(t.type)?(Co=l,ye=pt(n.firstChild)):ye=l),ze(e,t,t.pendingProps.children,a),Hs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((l=n=ye)&&(n=vy(n,t.type,t.pendingProps,wt),n!==null?(t.stateNode=n,Be=t,ye=pt(n.firstChild),wt=!1,l=!0):l=!1),l||Ha(t)),Gi(t),l=t.type,s=t.pendingProps,r=e!==null?e.memoizedProps:null,n=s.children,No(l,s)?n=null:r!==null&&No(l,r)&&(t.flags|=32),t.memoizedState!==null&&(l=mu(e,t,_0,null,null,a),_l._currentValue=l),Hs(e,t),ze(e,t,n,a),t.child;case 6:return e===null&&W&&((e=a=ye)&&(a=by(a,t.pendingProps,wt),a!==null?(t.stateNode=a,Be=t,ye=null,e=!0):e=!1),e||Ha(t)),null;case 13:return nm(e,t,a);case 4:return Qs(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=On(t,null,n,a):ze(e,t,n,a),t.child;case 11:return Kc(e,t,t.type,t.pendingProps,a);case 7:return ze(e,t,t.pendingProps,a),t.child;case 8:return ze(e,t,t.pendingProps.children,a),t.child;case 12:return ze(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,na(t,t.type,n.value),ze(e,t,n.children,a),t.child;case 9:return l=t.type._context,n=t.pendingProps.children,Ba(t),l=_e(l),n=n(l),t.flags|=1,ze(e,t,n,a),t.child;case 14:return Zc(e,t,t.type,t.pendingProps,a);case 15:return tm(e,t,t.type,t.pendingProps,a);case 19:return lm(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=or(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=Gt(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return am(e,t,a);case 24:return Ba(t),n=_e(Ne),e===null?(l=cu(),l===null&&(l=ie,s=uu(),l.pooledCache=s,s.refCount++,s!==null&&(l.pooledCacheLanes|=a),l=s),t.memoizedState={parent:n,cache:l},fu(t),na(t,Ne,l)):(e.lanes&a&&(ao(e,t),vl(t,null,null,a),xl()),l=e.memoizedState,s=t.memoizedState,l.parent!==n?(l={parent:n,cache:n},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),na(t,Ne,n)):(n=s.cache,na(t,Ne,n),n!==l.cache&&Ii(t,[Ne],a,!0))),ze(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(T(156,t.tag))}function Mt(e){e.flags|=4}function ef(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Zm(t)){if(t=ft.current,t!==null&&((P&4194048)===P?Tt!==null:(P&62914560)!==P&&!(P&536870912)||t!==Tt))throw pl=to,ch;e.flags|=8192}}function Ss(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Od():536870912,e.lanes|=t,Mn|=t)}function tl(e,t){if(!W)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var l=e.child;l!==null;)a|=l.lanes|l.childLanes,n|=l.subtreeFlags&65011712,n|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)a|=l.lanes|l.childLanes,n|=l.subtreeFlags,n|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Q0(e,t,a){var n=t.pendingProps;switch(ou(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ge(t),null;case 1:return ge(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vt(Ne),En(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(In(t)?Mt(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Rc())),ge(t),null;case 26:return a=t.memoizedState,e===null?(Mt(t),a!==null?(ge(t),ef(t,a)):(ge(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Mt(t),ge(t),ef(t,a)):(ge(t),t.flags&=-16777217):(e.memoizedProps!==n&&Mt(t),ge(t),t.flags&=-16777217),null;case 27:Ks(t),a=fa.current;var l=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Mt(t);else{if(!n){if(t.stateNode===null)throw Error(T(166));return ge(t),null}e=Et.current,In(t)?Ac(t):(e=Xm(l,n,a),t.stateNode=e,Mt(t))}return ge(t),null;case 5:if(Ks(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Mt(t);else{if(!n){if(t.stateNode===null)throw Error(T(166));return ge(t),null}if(e=Et.current,In(t))Ac(t);else{switch(l=gr(fa.current),e){case 1:e=l.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=l.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?l.createElement("select",{is:n.is}):l.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?l.createElement(a,{is:n.is}):l.createElement(a)}}e[Ue]=t,e[Xe]=n;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)e.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=e;e:switch(Le(e,a,n),a){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Mt(t)}}return ge(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Mt(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(T(166));if(e=fa.current,In(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,l=Be,l!==null)switch(l.tag){case 27:case 5:n=l.memoizedProps}e[Ue]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||qm(e.nodeValue,a)),e||Ha(t)}else e=gr(e).createTextNode(n),e[Ue]=t,t.stateNode=e}return ge(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=In(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(T(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(T(317));l[Ue]=t}else Jl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ge(t),l=!1}else l=Rc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Bt(t),t):(Bt(t),null)}if(Bt(t),t.flags&128)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,l=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(l=n.alternate.memoizedState.cachePool.pool);var s=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==l&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Ss(t,t.updateQueue),ge(t),null;case 4:return En(),e===null&&zu(t.stateNode.containerInfo),ge(t),null;case 10:return Vt(t.type),ge(t),null;case 19:if(Re(je),l=t.memoizedState,l===null)return ge(t),null;if(n=(t.flags&128)!==0,s=l.rendering,s===null)if(n)tl(l,!1);else{if(xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=sr(e),s!==null){for(t.flags|=128,tl(l,!1),e=s.updateQueue,t.updateQueue=e,Ss(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)rh(a,e),a=a.sibling;return de(je,je.current&1|2),t.child}e=e.sibling}l.tail!==null&&Ct()>cr&&(t.flags|=128,n=!0,tl(l,!1),t.lanes=4194304)}else{if(!n)if(e=sr(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Ss(t,e),tl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!W)return ge(t),null}else 2*Ct()-l.renderingStartTime>cr&&a!==536870912&&(t.flags|=128,n=!0,tl(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(e=l.last,e!==null?e.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Ct(),t.sibling=null,e=je.current,de(je,n?e&1|2:e&1),t):(ge(t),null);case 22:case 23:return Bt(t),du(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?a&536870912&&!(t.flags&128)&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),a=t.updateQueue,a!==null&&Ss(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Re(Da),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Vt(Ne),ge(t),null;case 25:return null;case 30:return null}throw Error(T(156,t.tag))}function K0(e,t){switch(ou(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vt(Ne),En(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ks(t),null;case 13:if(Bt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));Jl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(je),null;case 4:return En(),null;case 10:return Vt(t.type),null;case 22:case 23:return Bt(t),du(),e!==null&&Re(Da),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vt(Ne),null;case 25:return null;default:return null}}function rm(e,t){switch(ou(t),t.tag){case 3:Vt(Ne),En();break;case 26:case 27:case 5:Ks(t);break;case 4:En();break;case 13:Bt(t);break;case 19:Re(je);break;case 10:Vt(t.type);break;case 22:case 23:Bt(t),du(),e!==null&&Re(Da);break;case 24:Vt(Ne)}}function ts(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var l=n.next;a=l;do{if((a.tag&e)===e){n=void 0;var s=a.create,r=a.inst;n=s(),r.destroy=n}a=a.next}while(a!==l)}}catch(i){re(t,t.return,i)}}function Sa(e,t,a){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var s=l.next;n=s;do{if((n.tag&e)===e){var r=n.inst,i=r.destroy;if(i!==void 0){r.destroy=void 0,l=t;var o=a,c=i;try{c()}catch(f){re(l,o,f)}}}n=n.next}while(n!==s)}}catch(f){re(t,t.return,f)}}function im(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{hh(t,a)}catch(n){re(e,e.return,n)}}}function om(e,t,a){a.props=Va(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){re(e,t,n)}}function Sl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(l){re(e,t,l)}}function Nt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(l){re(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(l){re(e,t,l)}else a.current=null}function um(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(l){re(e,e.return,l)}}function xi(e,t,a){try{var n=e.stateNode;my(n,e.type,a,t),n[Xe]=t}catch(l){re(e,e.return,l)}}function cm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ja(e.type)||e.tag===4}function vi(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cm(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&&ja(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 ho(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=qr));else if(n!==4&&(n===27&&ja(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(ho(e,t,a),e=e.sibling;e!==null;)ho(e,t,a),e=e.sibling}function ur(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&ja(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ur(e,t,a),e=e.sibling;e!==null;)ur(e,t,a),e=e.sibling}function fm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Le(t,n,a),t[Ue]=e,t[Xe]=a}catch(s){re(e,e.return,s)}}var Dt=!1,be=!1,bi=!1,tf=typeof WeakSet=="function"?WeakSet:Set,Te=null;function Z0(e,t){if(e=e.containerInfo,So=vr,e=Wd(e),nu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var l=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{a.nodeType,s.nodeType}catch{a=null;break e}var r=0,i=-1,o=-1,c=0,f=0,g=e,d=null;t:for(;;){for(var y;g!==a||l!==0&&g.nodeType!==3||(i=r+l),g!==s||n!==0&&g.nodeType!==3||(o=r+n),g.nodeType===3&&(r+=g.nodeValue.length),(y=g.firstChild)!==null;)d=g,g=y;for(;;){if(g===e)break t;if(d===a&&++c===l&&(i=r),d===s&&++f===n&&(o=r),(y=g.nextSibling)!==null)break;g=d,d=g.parentNode}g=y}a=i===-1||o===-1?null:{start:i,end:o}}else a=null}a=a||{start:0,end:0}}else a=null;for(wo={focusedElem:e,selectionRange:a},vr=!1,Te=t;Te!==null;)if(t=Te,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Te=e;else for(;Te!==null;){switch(t=Te,s=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&s!==null){e=void 0,a=t,l=s.memoizedProps,s=s.memoizedState,n=a.stateNode;try{var S=Va(a.type,l,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(S,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(b){re(a,a.return,b)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)jo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jo(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(T(163))}if(e=t.sibling,e!==null){e.return=t.return,Te=e;break}Te=t.return}}function dm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Pt(e,a),n&4&&ts(5,a);break;case 1:if(Pt(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(r){re(a,a.return,r)}else{var l=Va(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){re(a,a.return,r)}}n&64&&im(a),n&512&&Sl(a,a.return);break;case 3:if(Pt(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{hh(e,t)}catch(r){re(a,a.return,r)}}break;case 27:t===null&&n&4&&fm(a);case 26:case 5:Pt(e,a),t===null&&n&4&&um(a),n&512&&Sl(a,a.return);break;case 12:Pt(e,a);break;case 13:Pt(e,a),n&4&&gm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=ny.bind(null,a),Sy(e,a))));break;case 22:if(n=a.memoizedState!==null||Dt,!n){t=t!==null&&t.memoizedState!==null||be,l=Dt;var s=be;Dt=n,(be=t)&&!s?ea(e,a,(a.subtreeFlags&8772)!==0):Pt(e,a),Dt=l,be=s}break;case 30:break;default:Pt(e,a)}}function hm(e){var t=e.alternate;t!==null&&(e.alternate=null,hm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Po(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 ce=null,Ye=!1;function zt(e,t,a){for(a=a.child;a!==null;)mm(e,t,a),a=a.sibling}function mm(e,t,a){if(We&&typeof We.onCommitFiberUnmount=="function")try{We.onCommitFiberUnmount($l,a)}catch{}switch(a.tag){case 26:be||Nt(a,t),zt(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:be||Nt(a,t);var n=ce,l=Ye;ja(a.type)&&(ce=a.stateNode,Ye=!1),zt(e,t,a),El(a.stateNode),ce=n,Ye=l;break;case 5:be||Nt(a,t);case 6:if(n=ce,l=Ye,ce=null,zt(e,t,a),ce=n,Ye=l,ce!==null)if(Ye)try{(ce.nodeType===9?ce.body:ce.nodeName==="HTML"?ce.ownerDocument.body:ce).removeChild(a.stateNode)}catch(s){re(a,t,s)}else try{ce.removeChild(a.stateNode)}catch(s){re(a,t,s)}break;case 18:ce!==null&&(Ye?(e=ce,mf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Gl(e)):mf(ce,a.stateNode));break;case 4:n=ce,l=Ye,ce=a.stateNode.containerInfo,Ye=!0,zt(e,t,a),ce=n,Ye=l;break;case 0:case 11:case 14:case 15:be||Sa(2,a,t),be||Sa(4,a,t),zt(e,t,a);break;case 1:be||(Nt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&om(a,t,n)),zt(e,t,a);break;case 21:zt(e,t,a);break;case 22:be=(n=be)||a.memoizedState!==null,zt(e,t,a),be=n;break;default:zt(e,t,a)}}function gm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(a){re(t,t.return,a)}}function J0(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tf),t;default:throw Error(T(435,e.tag))}}function Si(e,t){var a=J0(e);t.forEach(function(n){var l=ly.bind(null,e,n);a.has(n)||(a.add(n),n.then(l,l))})}function Ze(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var l=a[n],s=e,r=t,i=r;e:for(;i!==null;){switch(i.tag){case 27:if(ja(i.type)){ce=i.stateNode,Ye=!1;break e}break;case 5:ce=i.stateNode,Ye=!1;break e;case 3:case 4:ce=i.stateNode.containerInfo,Ye=!0;break e}i=i.return}if(ce===null)throw Error(T(160));mm(s,r,l),ce=null,Ye=!1,s=l.alternate,s!==null&&(s.return=null),l.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)pm(t,e),t=t.sibling}var gt=null;function pm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ze(t,e),Je(e),n&4&&(Sa(3,e,e.return),ts(3,e),Sa(5,e,e.return));break;case 1:Ze(t,e),Je(e),n&512&&(be||a===null||Nt(a,a.return)),n&64&&Dt&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var l=gt;if(Ze(t,e),Je(e),n&512&&(be||a===null||Nt(a,a.return)),n&4){var s=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,l=l.ownerDocument||l;t:switch(n){case"title":s=l.getElementsByTagName("title")[0],(!s||s[Kl]||s[Ue]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=l.createElement(n),l.head.insertBefore(s,l.querySelector("head > title"))),Le(s,n,a),s[Ue]=e,Ae(s),n=s;break e;case"link":var r=vf("link","href",l).get(n+(a.href||""));if(r){for(var i=0;i<r.length;i++)if(s=r[i],s.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&s.getAttribute("rel")===(a.rel==null?null:a.rel)&&s.getAttribute("title")===(a.title==null?null:a.title)&&s.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){r.splice(i,1);break t}}s=l.createElement(n),Le(s,n,a),l.head.appendChild(s);break;case"meta":if(r=vf("meta","content",l).get(n+(a.content||""))){for(i=0;i<r.length;i++)if(s=r[i],s.getAttribute("content")===(a.content==null?null:""+a.content)&&s.getAttribute("name")===(a.name==null?null:a.name)&&s.getAttribute("property")===(a.property==null?null:a.property)&&s.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&s.getAttribute("charset")===(a.charSet==null?null:a.charSet)){r.splice(i,1);break t}}s=l.createElement(n),Le(s,n,a),l.head.appendChild(s);break;default:throw Error(T(468,n))}s[Ue]=e,Ae(s),n=s}e.stateNode=n}else bf(l,e.type,e.stateNode);else e.stateNode=xf(l,n,e.memoizedProps);else s!==n?(s===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):s.count--,n===null?bf(l,e.type,e.stateNode):xf(l,n,e.memoizedProps)):n===null&&e.stateNode!==null&&xi(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ze(t,e),Je(e),n&512&&(be||a===null||Nt(a,a.return)),a!==null&&n&4&&xi(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ze(t,e),Je(e),n&512&&(be||a===null||Nt(a,a.return)),e.flags&32){l=e.stateNode;try{Tn(l,"")}catch(y){re(e,e.return,y)}}n&4&&e.stateNode!=null&&(l=e.memoizedProps,xi(e,l,a!==null?a.memoizedProps:l)),n&1024&&(bi=!0);break;case 6:if(Ze(t,e),Je(e),n&4){if(e.stateNode===null)throw Error(T(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(y){re(e,e.return,y)}}break;case 3:if(Vs=null,l=gt,gt=pr(t.containerInfo),Ze(t,e),gt=l,Je(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(y){re(e,e.return,y)}bi&&(bi=!1,ym(e));break;case 4:n=gt,gt=pr(e.stateNode.containerInfo),Ze(t,e),Je(e),gt=n;break;case 12:Ze(t,e),Je(e);break;case 13:Ze(t,e),Je(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ru=Ct()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Si(e,n)));break;case 22:l=e.memoizedState!==null;var o=a!==null&&a.memoizedState!==null,c=Dt,f=be;if(Dt=c||l,be=f||o,Ze(t,e),be=f,Dt=c,Je(e),n&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(a===null||o||Dt||be||ka(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){o=a=t;try{if(s=o.stateNode,l)r=s.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{i=o.stateNode;var g=o.memoizedProps.style,d=g!=null&&g.hasOwnProperty("display")?g.display:null;i.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(y){re(o,o.return,y)}}}else if(t.tag===6){if(a===null){o=t;try{o.stateNode.nodeValue=l?"":o.memoizedProps}catch(y){re(o,o.return,y)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,Si(e,a))));break;case 19:Ze(t,e),Je(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Si(e,n)));break;case 30:break;case 21:break;default:Ze(t,e),Je(e)}}function Je(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(cm(n)){a=n;break}n=n.return}if(a==null)throw Error(T(160));switch(a.tag){case 27:var l=a.stateNode,s=vi(e);ur(e,s,l);break;case 5:var r=a.stateNode;a.flags&32&&(Tn(r,""),a.flags&=-33);var i=vi(e);ur(e,i,r);break;case 3:case 4:var o=a.stateNode.containerInfo,c=vi(e);ho(e,c,o);break;default:throw Error(T(161))}}catch(f){re(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ym(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ym(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Pt(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dm(e,t.alternate,t),t=t.sibling}function ka(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Sa(4,t,t.return),ka(t);break;case 1:Nt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&om(t,t.return,a),ka(t);break;case 27:El(t.stateNode);case 26:case 5:Nt(t,t.return),ka(t);break;case 22:t.memoizedState===null&&ka(t);break;case 30:ka(t);break;default:ka(t)}e=e.sibling}}function ea(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,l=e,s=t,r=s.flags;switch(s.tag){case 0:case 11:case 15:ea(l,s,a),ts(4,s);break;case 1:if(ea(l,s,a),n=s,l=n.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(c){re(n,n.return,c)}if(n=s,l=n.updateQueue,l!==null){var i=n.stateNode;try{var o=l.shared.hiddenCallbacks;if(o!==null)for(l.shared.hiddenCallbacks=null,l=0;l<o.length;l++)dh(o[l],i)}catch(c){re(n,n.return,c)}}a&&r&64&&im(s),Sl(s,s.return);break;case 27:fm(s);case 26:case 5:ea(l,s,a),a&&n===null&&r&4&&um(s),Sl(s,s.return);break;case 12:ea(l,s,a);break;case 13:ea(l,s,a),a&&r&4&&gm(l,s);break;case 22:s.memoizedState===null&&ea(l,s,a),Sl(s,s.return);break;case 30:break;default:ea(l,s,a)}t=t.sibling}}function Cu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Pl(a))}function Tu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pl(e))}function bt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)xm(e,t,a,n),t=t.sibling}function xm(e,t,a,n){var l=t.flags;switch(t.tag){case 0:case 11:case 15:bt(e,t,a,n),l&2048&&ts(9,t);break;case 1:bt(e,t,a,n);break;case 3:bt(e,t,a,n),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Pl(e)));break;case 12:if(l&2048){bt(e,t,a,n),e=t.stateNode;try{var s=t.memoizedProps,r=s.id,i=s.onPostCommit;typeof i=="function"&&i(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){re(t,t.return,o)}}else bt(e,t,a,n);break;case 13:bt(e,t,a,n);break;case 23:break;case 22:s=t.stateNode,r=t.alternate,t.memoizedState!==null?s._visibility&2?bt(e,t,a,n):wl(e,t):s._visibility&2?bt(e,t,a,n):(s._visibility|=2,an(e,t,a,n,(t.subtreeFlags&10256)!==0)),l&2048&&Cu(r,t);break;case 24:bt(e,t,a,n),l&2048&&Tu(t.alternate,t);break;default:bt(e,t,a,n)}}function an(e,t,a,n,l){for(l=l&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var s=e,r=t,i=a,o=n,c=r.flags;switch(r.tag){case 0:case 11:case 15:an(s,r,i,o,l),ts(8,r);break;case 23:break;case 22:var f=r.stateNode;r.memoizedState!==null?f._visibility&2?an(s,r,i,o,l):wl(s,r):(f._visibility|=2,an(s,r,i,o,l)),l&&c&2048&&Cu(r.alternate,r);break;case 24:an(s,r,i,o,l),l&&c&2048&&Tu(r.alternate,r);break;default:an(s,r,i,o,l)}t=t.sibling}}function wl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,l=n.flags;switch(n.tag){case 22:wl(a,n),l&2048&&Cu(n.alternate,n);break;case 24:wl(a,n),l&2048&&Tu(n.alternate,n);break;default:wl(a,n)}t=t.sibling}}var cl=8192;function Ka(e){if(e.subtreeFlags&cl)for(e=e.child;e!==null;)vm(e),e=e.sibling}function vm(e){switch(e.tag){case 26:Ka(e),e.flags&cl&&e.memoizedState!==null&&Dy(gt,e.memoizedState,e.memoizedProps);break;case 5:Ka(e);break;case 3:case 4:var t=gt;gt=pr(e.stateNode.containerInfo),Ka(e),gt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=cl,cl=16777216,Ka(e),cl=t):Ka(e));break;default:Ka(e)}}function bm(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 al(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Te=n,wm(n,e)}bm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Sm(e),e=e.sibling}function Sm(e){switch(e.tag){case 0:case 11:case 15:al(e),e.flags&2048&&Sa(9,e,e.return);break;case 3:al(e);break;case 12:al(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bs(e)):al(e);break;default:al(e)}}function Bs(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Te=n,wm(n,e)}bm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Sa(8,t,t.return),Bs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Bs(t));break;default:Bs(t)}e=e.sibling}}function wm(e,t){for(;Te!==null;){var a=Te;switch(a.tag){case 0:case 11:case 15:Sa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Pl(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Te=n;else e:for(a=e;Te!==null;){n=Te;var l=n.sibling,s=n.return;if(hm(n),n===a){Te=null;break e}if(l!==null){l.return=s,Te=l;break e}Te=s}}}var F0={getCacheForType:function(e){var t=_e(Ne),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},P0=typeof WeakMap=="function"?WeakMap:Map,ne=0,ie=null,Q=null,P=0,ae=0,Fe=null,ua=!1,Gn=!1,Au=!1,Qt=0,xe=0,wa=0,La=0,ku=0,ct=0,Mn=0,Nl=null,$e=null,mo=!1,Ru=0,cr=1/0,fr=null,ma=null,De=0,ga=null,zn=null,jn=0,go=0,po=null,Nm=null,jl=0,yo=null;function et(){if(ne&2&&P!==0)return P&-P;if(H.T!==null){var e=An;return e!==0?e:Mu()}return Dd()}function jm(){ct===0&&(ct=!(P&536870912)||W?Rd():536870912);var e=ft.current;return e!==null&&(e.flags|=32),ct}function tt(e,t,a){(e===ie&&(ae===2||ae===9)||e.cancelPendingCommit!==null)&&(Dn(e,0),ca(e,P,ct,!1)),Ql(e,a),(!(ne&2)||e!==ie)&&(e===ie&&(!(ne&2)&&(La|=a),xe===4&&ca(e,P,ct,!1)),kt(e))}function Em(e,t,a){if(ne&6)throw Error(T(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Xl(e,t),l=n?ey(e,t):wi(e,t,!0),s=n;do{if(l===0){Gn&&!n&&ca(e,t,0,!1);break}else{if(a=e.current.alternate,s&&!W0(a)){l=wi(e,t,!1),s=!1;continue}if(l===2){if(s=t,e.errorRecoveryDisabledLanes&s)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var i=e;l=Nl;var o=i.current.memoizedState.isDehydrated;if(o&&(Dn(i,r).flags|=256),r=wi(i,r,!1),r!==2){if(Au&&!o){i.errorRecoveryDisabledLanes|=s,La|=s,l=4;break e}s=$e,$e=l,s!==null&&($e===null?$e=s:$e.push.apply($e,s))}l=r}if(s=!1,l!==2)continue}}if(l===1){Dn(e,0),ca(e,t,0,!0);break}e:{switch(n=e,s=l,s){case 0:case 1:throw Error(T(345));case 4:if((t&4194048)!==t)break;case 6:ca(n,t,ct,!ua);break e;case 2:$e=null;break;case 3:case 5:break;default:throw Error(T(329))}if((t&62914560)===t&&(l=Ru+300-Ct(),10<l)){if(ca(n,t,ct,!ua),kr(n,0,!0)!==0)break e;n.timeoutHandle=$m(af.bind(null,n,a,$e,fr,mo,t,ct,La,Mn,ua,s,2,-0,0),l);break e}af(n,a,$e,fr,mo,t,ct,La,Mn,ua,s,0,-0,0)}}break}while(!0);kt(e)}function af(e,t,a,n,l,s,r,i,o,c,f,g,d,y){if(e.timeoutHandle=-1,g=t.subtreeFlags,(g&8192||(g&16785408)===16785408)&&(Ul={stylesheets:null,count:0,unsuspend:zy},vm(t),g=Ly(),g!==null)){e.cancelPendingCommit=g(lf.bind(null,e,t,s,a,n,l,r,i,o,f,1,d,y)),ca(e,s,r,!c);return}lf(e,t,s,a,n,l,r,i,o)}function W0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var l=a[n],s=l.getSnapshot;l=l.value;try{if(!at(s(),l))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 ca(e,t,a,n){t&=~ku,t&=~La,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var l=t;0<l;){var s=31-Ie(l),r=1<<s;n[s]=-1,l&=~r}a!==0&&Md(e,a,t)}function Br(){return ne&6?!0:(as(0),!1)}function Ou(){if(Q!==null){if(ae===0)var e=Q.return;else e=Q,Ht=Xa=null,yu(e),Nn=null,zl=0,e=Q;for(;e!==null;)rm(e.alternate,e),e=e.return;Q=null}}function Dn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,py(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ou(),ie=e,Q=a=Gt(e.current,null),P=t,ae=0,Fe=null,ua=!1,Gn=Xl(e,t),Au=!1,Mn=ct=ku=La=wa=xe=0,$e=Nl=null,mo=!1,t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var l=31-Ie(n),s=1<<l;t|=e[l],n&=~s}return Qt=t,zr(),a}function Cm(e,t){$=null,H.H=lr,t===Wl||t===Lr?(t=Dc(),ae=3):t===ch?(t=Dc(),ae=4):ae=t===em?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Fe=t,Q===null&&(xe=1,ir(e,ut(t,e.current)))}function Tm(){var e=H.H;return H.H=lr,e===null?lr:e}function Am(){var e=H.A;return H.A=F0,e}function xo(){xe=4,ua||(P&4194048)!==P&&ft.current!==null||(Gn=!0),!(wa&134217727)&&!(La&134217727)||ie===null||ca(ie,P,ct,!1)}function wi(e,t,a){var n=ne;ne|=2;var l=Tm(),s=Am();(ie!==e||P!==t)&&(fr=null,Dn(e,t)),t=!1;var r=xe;e:do try{if(ae!==0&&Q!==null){var i=Q,o=Fe;switch(ae){case 8:Ou(),r=6;break e;case 3:case 2:case 9:case 6:ft.current===null&&(t=!0);var c=ae;if(ae=0,Fe=null,pn(e,i,o,c),a&&Gn){r=0;break e}break;default:c=ae,ae=0,Fe=null,pn(e,i,o,c)}}I0(),r=xe;break}catch(f){Cm(e,f)}while(!0);return t&&e.shellSuspendCounter++,Ht=Xa=null,ne=n,H.H=l,H.A=s,Q===null&&(ie=null,P=0,zr()),r}function I0(){for(;Q!==null;)km(Q)}function ey(e,t){var a=ne;ne|=2;var n=Tm(),l=Am();ie!==e||P!==t?(fr=null,cr=Ct()+500,Dn(e,t)):Gn=Xl(e,t);e:do try{if(ae!==0&&Q!==null){t=Q;var s=Fe;t:switch(ae){case 1:ae=0,Fe=null,pn(e,t,s,1);break;case 2:case 9:if(zc(s)){ae=0,Fe=null,nf(t);break}t=function(){ae!==2&&ae!==9||ie!==e||(ae=7),kt(e)},s.then(t,t);break e;case 3:ae=7;break e;case 4:ae=5;break e;case 7:zc(s)?(ae=0,Fe=null,nf(t)):(ae=0,Fe=null,pn(e,t,s,7));break;case 5:var r=null;switch(Q.tag){case 26:r=Q.memoizedState;case 5:case 27:var i=Q;if(!r||Zm(r)){ae=0,Fe=null;var o=i.sibling;if(o!==null)Q=o;else{var c=i.return;c!==null?(Q=c,Gr(c)):Q=null}break t}}ae=0,Fe=null,pn(e,t,s,5);break;case 6:ae=0,Fe=null,pn(e,t,s,6);break;case 8:Ou(),xe=6;break e;default:throw Error(T(462))}}ty();break}catch(f){Cm(e,f)}while(!0);return Ht=Xa=null,H.H=n,H.A=l,ne=a,Q!==null?0:(ie=null,P=0,zr(),xe)}function ty(){for(;Q!==null&&!Np();)km(Q)}function km(e){var t=sm(e.alternate,e,Qt);e.memoizedProps=e.pendingProps,t===null?Gr(e):Q=t}function nf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Fc(a,t,t.pendingProps,t.type,void 0,P);break;case 11:t=Fc(a,t,t.pendingProps,t.type.render,t.ref,P);break;case 5:yu(t);default:rm(a,t),t=Q=rh(t,Qt),t=sm(a,t,Qt)}e.memoizedProps=e.pendingProps,t===null?Gr(e):Q=t}function pn(e,t,a,n){Ht=Xa=null,yu(t),Nn=null,zl=0;var l=t.return;try{if($0(e,l,t,a,P)){xe=1,ir(e,ut(a,e.current)),Q=null;return}}catch(s){if(l!==null)throw Q=l,s;xe=1,ir(e,ut(a,e.current)),Q=null;return}t.flags&32768?(W||n===1?e=!0:Gn||P&536870912?e=!1:(ua=e=!0,(n===2||n===9||n===3||n===6)&&(n=ft.current,n!==null&&n.tag===13&&(n.flags|=16384))),Rm(t,e)):Gr(t)}function Gr(e){var t=e;do{if(t.flags&32768){Rm(t,ua);return}e=t.return;var a=Q0(t.alternate,t,Qt);if(a!==null){Q=a;return}if(t=t.sibling,t!==null){Q=t;return}Q=t=e}while(t!==null);xe===0&&(xe=5)}function Rm(e,t){do{var a=K0(e.alternate,e);if(a!==null){a.flags&=32767,Q=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Q=e;return}Q=e=a}while(e!==null);xe=6,Q=null}function lf(e,t,a,n,l,s,r,i,o){e.cancelPendingCommit=null;do Vr();while(De!==0);if(ne&6)throw Error(T(327));if(t!==null){if(t===e.current)throw Error(T(177));if(s=t.lanes|t.childLanes,s|=lu,zp(e,a,s,r,i,o),e===ie&&(Q=ie=null,P=0),zn=t,ga=e,jn=a,go=s,po=l,Nm=n,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sy(Zs,function(){return Lm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,t.subtreeFlags&13878||n){n=H.T,H.T=null,l=I.p,I.p=2,r=ne,ne|=4;try{Z0(e,t,a)}finally{ne=r,I.p=l,H.T=n}}De=1,Om(),Mm(),zm()}}function Om(){if(De===1){De=0;var e=ga,t=zn,a=(t.flags&13878)!==0;if(t.subtreeFlags&13878||a){a=H.T,H.T=null;var n=I.p;I.p=2;var l=ne;ne|=4;try{pm(t,e);var s=wo,r=Wd(e.containerInfo),i=s.focusedElem,o=s.selectionRange;if(r!==i&&i&&i.ownerDocument&&Pd(i.ownerDocument.documentElement,i)){if(o!==null&&nu(i)){var c=o.start,f=o.end;if(f===void 0&&(f=c),"selectionStart"in i)i.selectionStart=c,i.selectionEnd=Math.min(f,i.value.length);else{var g=i.ownerDocument||document,d=g&&g.defaultView||window;if(d.getSelection){var y=d.getSelection(),S=i.textContent.length,b=Math.min(o.start,S),w=o.end===void 0?b:Math.min(o.end,S);!y.extend&&b>w&&(r=w,w=b,b=r);var h=Ec(i,b),m=Ec(i,w);if(h&&m&&(y.rangeCount!==1||y.anchorNode!==h.node||y.anchorOffset!==h.offset||y.focusNode!==m.node||y.focusOffset!==m.offset)){var p=g.createRange();p.setStart(h.node,h.offset),y.removeAllRanges(),b>w?(y.addRange(p),y.extend(m.node,m.offset)):(p.setEnd(m.node,m.offset),y.addRange(p))}}}}for(g=[],y=i;y=y.parentNode;)y.nodeType===1&&g.push({element:y,left:y.scrollLeft,top:y.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<g.length;i++){var v=g[i];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}vr=!!So,wo=So=null}finally{ne=l,I.p=n,H.T=a}}e.current=t,De=2}}function Mm(){if(De===2){De=0;var e=ga,t=zn,a=(t.flags&8772)!==0;if(t.subtreeFlags&8772||a){a=H.T,H.T=null;var n=I.p;I.p=2;var l=ne;ne|=4;try{dm(e,t.alternate,t)}finally{ne=l,I.p=n,H.T=a}}De=3}}function zm(){if(De===4||De===3){De=0,jp();var e=ga,t=zn,a=jn,n=Nm;t.subtreeFlags&10256||t.flags&10256?De=5:(De=0,zn=ga=null,Dm(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(ma=null),Fo(a),t=t.stateNode,We&&typeof We.onCommitFiberRoot=="function")try{We.onCommitFiberRoot($l,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=H.T,l=I.p,I.p=2,H.T=null;try{for(var s=e.onRecoverableError,r=0;r<n.length;r++){var i=n[r];s(i.value,{componentStack:i.stack})}}finally{H.T=t,I.p=l}}jn&3&&Vr(),kt(e),l=e.pendingLanes,a&4194090&&l&42?e===yo?jl++:(jl=0,yo=e):jl=0,as(0)}}function Dm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Pl(t)))}function Vr(e){return Om(),Mm(),zm(),Lm()}function Lm(){if(De!==5)return!1;var e=ga,t=go;go=0;var a=Fo(jn),n=H.T,l=I.p;try{I.p=32>a?32:a,H.T=null,a=po,po=null;var s=ga,r=jn;if(De=0,zn=ga=null,jn=0,ne&6)throw Error(T(331));var i=ne;if(ne|=4,Sm(s.current),xm(s,s.current,r,a),ne=i,as(0,!1),We&&typeof We.onPostCommitFiberRoot=="function")try{We.onPostCommitFiberRoot($l,s)}catch{}return!0}finally{I.p=l,H.T=n,Dm(e,t)}}function sf(e,t,a){t=ut(a,t),t=uo(e.stateNode,t,2),e=ha(e,t,2),e!==null&&(Ql(e,2),kt(e))}function re(e,t,a){if(e.tag===3)sf(e,e,a);else for(;t!==null;){if(t.tag===3){sf(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ma===null||!ma.has(n))){e=ut(a,e),a=Wh(2),n=ha(t,a,2),n!==null&&(Ih(a,n,t,e),Ql(n,2),kt(n));break}}t=t.return}}function Ni(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new P0;var l=new Set;n.set(t,l)}else l=n.get(t),l===void 0&&(l=new Set,n.set(t,l));l.has(a)||(Au=!0,l.add(a),e=ay.bind(null,e,t,a),t.then(e,e))}function ay(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ie===e&&(P&a)===a&&(xe===4||xe===3&&(P&62914560)===P&&300>Ct()-Ru?!(ne&2)&&Dn(e,0):ku|=a,Mn===P&&(Mn=0)),kt(e)}function Um(e,t){t===0&&(t=Od()),e=Bn(e,t),e!==null&&(Ql(e,t),kt(e))}function ny(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Um(e,a)}function ly(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,l=e.memoizedState;l!==null&&(a=l.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(T(314))}n!==null&&n.delete(t),Um(e,a)}function sy(e,t){return Zo(e,t)}var dr=null,nn=null,vo=!1,hr=!1,ji=!1,Ua=0;function kt(e){e!==nn&&e.next===null&&(nn===null?dr=nn=e:nn=nn.next=e),hr=!0,vo||(vo=!0,iy())}function as(e,t){if(!ji&&hr){ji=!0;do for(var a=!1,n=dr;n!==null;){if(e!==0){var l=n.pendingLanes;if(l===0)var s=0;else{var r=n.suspendedLanes,i=n.pingedLanes;s=(1<<31-Ie(42|e)+1)-1,s&=l&~(r&~i),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,rf(n,s))}else s=P,s=kr(n,n===ie?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),!(s&3)||Xl(n,s)||(a=!0,rf(n,s));n=n.next}while(a);ji=!1}}function ry(){_m()}function _m(){hr=vo=!1;var e=0;Ua!==0&&(gy()&&(e=Ua),Ua=0);for(var t=Ct(),a=null,n=dr;n!==null;){var l=n.next,s=Hm(n,t);s===0?(n.next=null,a===null?dr=l:a.next=l,l===null&&(nn=a)):(a=n,(e!==0||s&3)&&(hr=!0)),n=l}as(e)}function Hm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,l=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var r=31-Ie(s),i=1<<r,o=l[r];o===-1?(!(i&a)||i&n)&&(l[r]=Mp(i,t)):o<=t&&(e.expiredLanes|=i),s&=~i}if(t=ie,a=P,a=kr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(ae===2||ae===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Fr(n),e.callbackNode=null,e.callbackPriority=0;if(!(a&3)||Xl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Fr(n),Fo(a)){case 2:case 8:a=Ad;break;case 32:a=Zs;break;case 268435456:a=kd;break;default:a=Zs}return n=Bm.bind(null,e),a=Zo(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Fr(n),e.callbackPriority=2,e.callbackNode=null,2}function Bm(e,t){if(De!==0&&De!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Vr()&&e.callbackNode!==a)return null;var n=P;return n=kr(e,e===ie?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Em(e,n,t),Hm(e,Ct()),e.callbackNode!=null&&e.callbackNode===a?Bm.bind(null,e):null)}function rf(e,t){if(Vr())return null;Em(e,t,!0)}function iy(){yy(function(){ne&6?Zo(Td,ry):_m()})}function Mu(){return Ua===0&&(Ua=Rd()),Ua}function of(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Os(""+e)}function uf(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function oy(e,t,a,n,l){if(t==="submit"&&a&&a.stateNode===l){var s=of((l[Xe]||null).action),r=n.submitter;r&&(t=(t=r[Xe]||null)?of(t.formAction):r.getAttribute("formAction"),t!==null&&(s=t,r=null));var i=new Rr("action","action",null,n,l);e.push({event:i,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ua!==0){var o=r?uf(l,r):new FormData(l);io(a,{pending:!0,data:o,method:l.method,action:s},null,o)}}else typeof s=="function"&&(i.preventDefault(),o=r?uf(l,r):new FormData(l),io(a,{pending:!0,data:o,method:l.method,action:s},s,o))},currentTarget:l}]})}}for(var Ei=0;Ei<Ji.length;Ei++){var Ci=Ji[Ei],uy=Ci.toLowerCase(),cy=Ci[0].toUpperCase()+Ci.slice(1);xt(uy,"on"+cy)}xt(eh,"onAnimationEnd");xt(th,"onAnimationIteration");xt(ah,"onAnimationStart");xt("dblclick","onDoubleClick");xt("focusin","onFocus");xt("focusout","onBlur");xt(T0,"onTransitionRun");xt(A0,"onTransitionStart");xt(k0,"onTransitionCancel");xt(nh,"onTransitionEnd");Cn("onMouseEnter",["mouseout","mouseover"]);Cn("onMouseLeave",["mouseout","mouseover"]);Cn("onPointerEnter",["pointerout","pointerover"]);Cn("onPointerLeave",["pointerout","pointerover"]);qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qa("onBeforeInput",["compositionend","keypress","textInput","paste"]);qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dl="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(" "),fy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Dl));function Gm(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],l=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var r=n.length-1;0<=r;r--){var i=n[r],o=i.instance,c=i.currentTarget;if(i=i.listener,o!==s&&l.isPropagationStopped())break e;s=i,l.currentTarget=c;try{s(l)}catch(f){rr(f)}l.currentTarget=null,s=o}else for(r=0;r<n.length;r++){if(i=n[r],o=i.instance,c=i.currentTarget,i=i.listener,o!==s&&l.isPropagationStopped())break e;s=i,l.currentTarget=c;try{s(l)}catch(f){rr(f)}l.currentTarget=null,s=o}}}}function X(e,t){var a=t[qi];a===void 0&&(a=t[qi]=new Set);var n=e+"__bubble";a.has(n)||(Vm(t,e,2,!1),a.add(n))}function Ti(e,t,a){var n=0;t&&(n|=4),Vm(a,e,n,t)}var ws="_reactListening"+Math.random().toString(36).slice(2);function zu(e){if(!e[ws]){e[ws]=!0,Ld.forEach(function(a){a!=="selectionchange"&&(fy.has(a)||Ti(a,!1,e),Ti(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ws]||(t[ws]=!0,Ti("selectionchange",!1,t))}}function Vm(e,t,a,n){switch(Im(t)){case 2:var l=Hy;break;case 8:l=By;break;default:l=_u}a=l.bind(null,t,a,e),l=void 0,!Qi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),n?l!==void 0?e.addEventListener(t,a,{capture:!0,passive:l}):e.addEventListener(t,a,!0):l!==void 0?e.addEventListener(t,a,{passive:l}):e.addEventListener(t,a,!1)}function Ai(e,t,a,n,l){var s=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var r=n.tag;if(r===3||r===4){var i=n.stateNode.containerInfo;if(i===l)break;if(r===4)for(r=n.return;r!==null;){var o=r.tag;if((o===3||o===4)&&r.stateNode.containerInfo===l)return;r=r.return}for(;i!==null;){if(r=rn(i),r===null)return;if(o=r.tag,o===5||o===6||o===26||o===27){n=s=r;continue e}i=i.parentNode}}n=n.return}Yd(function(){var c=s,f=Io(a),g=[];e:{var d=lh.get(e);if(d!==void 0){var y=Rr,S=e;switch(e){case"keypress":if(zs(a)===0)break e;case"keydown":case"keyup":y=s0;break;case"focusin":S="focus",y=li;break;case"focusout":S="blur",y=li;break;case"beforeblur":case"afterblur":y=li;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=gc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Kp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=o0;break;case eh:case th:case ah:y=Fp;break;case nh:y=c0;break;case"scroll":case"scrollend":y=Xp;break;case"wheel":y=d0;break;case"copy":case"cut":case"paste":y=Wp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=yc;break;case"toggle":case"beforetoggle":y=m0}var b=(t&4)!==0,w=!b&&(e==="scroll"||e==="scrollend"),h=b?d!==null?d+"Capture":null:d;b=[];for(var m=c,p;m!==null;){var v=m;if(p=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||p===null||h===null||(v=Al(m,h),v!=null&&b.push(Ll(m,v,p))),w)break;m=m.return}0<b.length&&(d=new y(d,S,null,a,f),g.push({event:d,listeners:b}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&a!==Xi&&(S=a.relatedTarget||a.fromElement)&&(rn(S)||S[_n]))break e;if((y||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,y?(S=a.relatedTarget||a.toElement,y=c,S=S?rn(S):null,S!==null&&(w=Yl(S),b=S.tag,S!==w||b!==5&&b!==27&&b!==6)&&(S=null)):(y=null,S=c),y!==S)){if(b=gc,v="onMouseLeave",h="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(b=yc,v="onPointerLeave",h="onPointerEnter",m="pointer"),w=y==null?d:ul(y),p=S==null?d:ul(S),d=new b(v,m+"leave",y,a,f),d.target=w,d.relatedTarget=p,v=null,rn(f)===c&&(b=new b(h,m+"enter",S,a,f),b.target=p,b.relatedTarget=w,v=b),w=v,y&&S)t:{for(b=y,h=S,m=0,p=b;p;p=Za(p))m++;for(p=0,v=h;v;v=Za(v))p++;for(;0<m-p;)b=Za(b),m--;for(;0<p-m;)h=Za(h),p--;for(;m--;){if(b===h||h!==null&&b===h.alternate)break t;b=Za(b),h=Za(h)}b=null}else b=null;y!==null&&cf(g,d,y,b,!1),S!==null&&w!==null&&cf(g,w,S,b,!0)}}e:{if(d=c?ul(c):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var N=Sc;else if(bc(d))if(Jd)N=j0;else{N=w0;var E=S0}else y=d.nodeName,!y||y.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&Wo(c.elementType)&&(N=Sc):N=N0;if(N&&(N=N(e,c))){Zd(g,N,a,f);break e}E&&E(e,d,c),e==="focusout"&&c&&d.type==="number"&&c.memoizedProps.value!=null&&$i(d,"number",d.value)}switch(E=c?ul(c):window,e){case"focusin":(bc(E)||E.contentEditable==="true")&&(cn=E,Ki=c,ml=null);break;case"focusout":ml=Ki=cn=null;break;case"mousedown":Zi=!0;break;case"contextmenu":case"mouseup":case"dragend":Zi=!1,Cc(g,a,f);break;case"selectionchange":if(C0)break;case"keydown":case"keyup":Cc(g,a,f)}var j;if(au)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else un?Qd(e,a)&&(C="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(C="onCompositionStart");C&&(Xd&&a.locale!=="ko"&&(un||C!=="onCompositionStart"?C==="onCompositionEnd"&&un&&(j=$d()):(oa=f,eu="value"in oa?oa.value:oa.textContent,un=!0)),E=mr(c,C),0<E.length&&(C=new pc(C,e,null,a,f),g.push({event:C,listeners:E}),j?C.data=j:(j=Kd(a),j!==null&&(C.data=j)))),(j=p0?y0(e,a):x0(e,a))&&(C=mr(c,"onBeforeInput"),0<C.length&&(E=new pc("onBeforeInput","beforeinput",null,a,f),g.push({event:E,listeners:C}),E.data=j)),oy(g,e,c,a,f)}Gm(g,t)})}function Ll(e,t,a){return{instance:e,listener:t,currentTarget:a}}function mr(e,t){for(var a=t+"Capture",n=[];e!==null;){var l=e,s=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||s===null||(l=Al(e,a),l!=null&&n.unshift(Ll(e,l,s)),l=Al(e,t),l!=null&&n.push(Ll(e,l,s))),e.tag===3)return n;e=e.return}return[]}function Za(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cf(e,t,a,n,l){for(var s=t._reactName,r=[];a!==null&&a!==n;){var i=a,o=i.alternate,c=i.stateNode;if(i=i.tag,o!==null&&o===n)break;i!==5&&i!==26&&i!==27||c===null||(o=c,l?(c=Al(a,s),c!=null&&r.unshift(Ll(a,c,o))):l||(c=Al(a,s),c!=null&&r.push(Ll(a,c,o)))),a=a.return}r.length!==0&&e.push({event:t,listeners:r})}var dy=/\r\n?/g,hy=/\u0000|\uFFFD/g;function ff(e){return(typeof e=="string"?e:""+e).replace(dy,`
|
|
49
|
+
`).replace(hy,"")}function qm(e,t){return t=ff(t),ff(e)===t}function qr(){}function le(e,t,a,n,l,s){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Tn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Tn(e,""+n);break;case"className":gs(e,"class",n);break;case"tabIndex":gs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":gs(e,a,n);break;case"style":qd(e,n,s);break;case"data":if(t!=="object"){gs(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Os(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"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 s=="function"&&(a==="formAction"?(t!=="input"&&le(e,t,"name",l.name,l,null),le(e,t,"formEncType",l.formEncType,l,null),le(e,t,"formMethod",l.formMethod,l,null),le(e,t,"formTarget",l.formTarget,l,null)):(le(e,t,"encType",l.encType,l,null),le(e,t,"method",l.method,l,null),le(e,t,"target",l.target,l,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Os(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=qr);break;case"onScroll":n!=null&&X("scroll",e);break;case"onScrollEnd":n!=null&&X("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(T(61));if(a=n.__html,a!=null){if(l.children!=null)throw Error(T(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=Os(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":X("beforetoggle",e),X("toggle",e),Rs(e,"popover",n);break;case"xlinkActuate":Ot(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Ot(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Ot(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Ot(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Ot(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Ot(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Ot(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Ot(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Ot(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Rs(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Yp.get(a)||a,Rs(e,a,n))}}function bo(e,t,a,n,l,s){switch(a){case"style":qd(e,n,s);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(T(61));if(a=n.__html,a!=null){if(l.children!=null)throw Error(T(60));e.innerHTML=a}}break;case"children":typeof n=="string"?Tn(e,n):(typeof n=="number"||typeof n=="bigint")&&Tn(e,""+n);break;case"onScroll":n!=null&&X("scroll",e);break;case"onScrollEnd":n!=null&&X("scrollend",e);break;case"onClick":n!=null&&(e.onclick=qr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ud.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(l=a.endsWith("Capture"),t=a.slice(2,l?a.length-7:void 0),s=e[Xe]||null,s=s!=null?s[a]:null,typeof s=="function"&&e.removeEventListener(t,s,l),typeof n=="function")){typeof s!="function"&&s!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,l);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Rs(e,a,n)}}}function Le(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":X("error",e),X("load",e);var n=!1,l=!1,s;for(s in a)if(a.hasOwnProperty(s)){var r=a[s];if(r!=null)switch(s){case"src":n=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(T(137,t));default:le(e,t,s,r,a,null)}}l&&le(e,t,"srcSet",a.srcSet,a,null),n&&le(e,t,"src",a.src,a,null);return;case"input":X("invalid",e);var i=s=r=l=null,o=null,c=null;for(n in a)if(a.hasOwnProperty(n)){var f=a[n];if(f!=null)switch(n){case"name":l=f;break;case"type":r=f;break;case"checked":o=f;break;case"defaultChecked":c=f;break;case"value":s=f;break;case"defaultValue":i=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(T(137,t));break;default:le(e,t,n,f,a,null)}}Bd(e,s,i,o,c,r,l,!1),Js(e);return;case"select":X("invalid",e),n=r=s=null;for(l in a)if(a.hasOwnProperty(l)&&(i=a[l],i!=null))switch(l){case"value":s=i;break;case"defaultValue":r=i;break;case"multiple":n=i;default:le(e,t,l,i,a,null)}t=s,a=r,e.multiple=!!n,t!=null?xn(e,!!n,t,!1):a!=null&&xn(e,!!n,a,!0);return;case"textarea":X("invalid",e),s=l=n=null;for(r in a)if(a.hasOwnProperty(r)&&(i=a[r],i!=null))switch(r){case"value":n=i;break;case"defaultValue":l=i;break;case"children":s=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(T(91));break;default:le(e,t,r,i,a,null)}Vd(e,n,l,s),Js(e);return;case"option":for(o in a)if(a.hasOwnProperty(o)&&(n=a[o],n!=null))switch(o){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:le(e,t,o,n,a,null)}return;case"dialog":X("beforetoggle",e),X("toggle",e),X("cancel",e),X("close",e);break;case"iframe":case"object":X("load",e);break;case"video":case"audio":for(n=0;n<Dl.length;n++)X(Dl[n],e);break;case"image":X("error",e),X("load",e);break;case"details":X("toggle",e);break;case"embed":case"source":case"link":X("error",e),X("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(c in a)if(a.hasOwnProperty(c)&&(n=a[c],n!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(T(137,t));default:le(e,t,c,n,a,null)}return;default:if(Wo(t)){for(f in a)a.hasOwnProperty(f)&&(n=a[f],n!==void 0&&bo(e,t,f,n,a,void 0));return}}for(i in a)a.hasOwnProperty(i)&&(n=a[i],n!=null&&le(e,t,i,n,a,null))}function my(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,s=null,r=null,i=null,o=null,c=null,f=null;for(y in a){var g=a[y];if(a.hasOwnProperty(y)&&g!=null)switch(y){case"checked":break;case"value":break;case"defaultValue":o=g;default:n.hasOwnProperty(y)||le(e,t,y,null,n,g)}}for(var d in n){var y=n[d];if(g=a[d],n.hasOwnProperty(d)&&(y!=null||g!=null))switch(d){case"type":s=y;break;case"name":l=y;break;case"checked":c=y;break;case"defaultChecked":f=y;break;case"value":r=y;break;case"defaultValue":i=y;break;case"children":case"dangerouslySetInnerHTML":if(y!=null)throw Error(T(137,t));break;default:y!==g&&le(e,t,d,y,n,g)}}Yi(e,r,i,o,c,f,s,l);return;case"select":y=r=i=d=null;for(s in a)if(o=a[s],a.hasOwnProperty(s)&&o!=null)switch(s){case"value":break;case"multiple":y=o;default:n.hasOwnProperty(s)||le(e,t,s,null,n,o)}for(l in n)if(s=n[l],o=a[l],n.hasOwnProperty(l)&&(s!=null||o!=null))switch(l){case"value":d=s;break;case"defaultValue":i=s;break;case"multiple":r=s;default:s!==o&&le(e,t,l,s,n,o)}t=i,a=r,n=y,d!=null?xn(e,!!a,d,!1):!!n!=!!a&&(t!=null?xn(e,!!a,t,!0):xn(e,!!a,a?[]:"",!1));return;case"textarea":y=d=null;for(i in a)if(l=a[i],a.hasOwnProperty(i)&&l!=null&&!n.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:le(e,t,i,null,n,l)}for(r in n)if(l=n[r],s=a[r],n.hasOwnProperty(r)&&(l!=null||s!=null))switch(r){case"value":d=l;break;case"defaultValue":y=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(T(91));break;default:l!==s&&le(e,t,r,l,n,s)}Gd(e,d,y);return;case"option":for(var S in a)if(d=a[S],a.hasOwnProperty(S)&&d!=null&&!n.hasOwnProperty(S))switch(S){case"selected":e.selected=!1;break;default:le(e,t,S,null,n,d)}for(o in n)if(d=n[o],y=a[o],n.hasOwnProperty(o)&&d!==y&&(d!=null||y!=null))switch(o){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:le(e,t,o,d,n,y)}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 b in a)d=a[b],a.hasOwnProperty(b)&&d!=null&&!n.hasOwnProperty(b)&&le(e,t,b,null,n,d);for(c in n)if(d=n[c],y=a[c],n.hasOwnProperty(c)&&d!==y&&(d!=null||y!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(T(137,t));break;default:le(e,t,c,d,n,y)}return;default:if(Wo(t)){for(var w in a)d=a[w],a.hasOwnProperty(w)&&d!==void 0&&!n.hasOwnProperty(w)&&bo(e,t,w,void 0,n,d);for(f in n)d=n[f],y=a[f],!n.hasOwnProperty(f)||d===y||d===void 0&&y===void 0||bo(e,t,f,d,n,y);return}}for(var h in a)d=a[h],a.hasOwnProperty(h)&&d!=null&&!n.hasOwnProperty(h)&&le(e,t,h,null,n,d);for(g in n)d=n[g],y=a[g],!n.hasOwnProperty(g)||d===y||d==null&&y==null||le(e,t,g,d,n,y)}var So=null,wo=null;function gr(e){return e.nodeType===9?e:e.ownerDocument}function df(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 Ym(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 No(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 ki=null;function gy(){var e=window.event;return e&&e.type==="popstate"?e===ki?!1:(ki=e,!0):(ki=null,!1)}var $m=typeof setTimeout=="function"?setTimeout:void 0,py=typeof clearTimeout=="function"?clearTimeout:void 0,hf=typeof Promise=="function"?Promise:void 0,yy=typeof queueMicrotask=="function"?queueMicrotask:typeof hf<"u"?function(e){return hf.resolve(null).then(e).catch(xy)}:$m;function xy(e){setTimeout(function(){throw e})}function ja(e){return e==="head"}function mf(e,t){var a=t,n=0,l=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(0<n&&8>n){a=n;var r=e.ownerDocument;if(a&1&&El(r.documentElement),a&2&&El(r.body),a&4)for(a=r.head,El(a),r=a.firstChild;r;){var i=r.nextSibling,o=r.nodeName;r[Kl]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&r.rel.toLowerCase()==="stylesheet"||a.removeChild(r),r=i}}if(l===0){e.removeChild(s),Gl(t);return}l--}else a==="$"||a==="$?"||a==="$!"?l++:n=a.charCodeAt(0)-48;else n=0;a=s}while(a);Gl(t)}function jo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":jo(a),Po(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function vy(e,t,a,n){for(;e.nodeType===1;){var l=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Kl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=pt(e.nextSibling),e===null)break}return null}function by(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=pt(e.nextSibling),e===null))return null;return e}function Eo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Sy(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function pt(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Co=null;function gf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function Xm(e,t,a){switch(t=gr(a),e){case"html":if(e=t.documentElement,!e)throw Error(T(452));return e;case"head":if(e=t.head,!e)throw Error(T(453));return e;case"body":if(e=t.body,!e)throw Error(T(454));return e;default:throw Error(T(451))}}function El(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Po(e)}var dt=new Map,pf=new Set;function pr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zt=I.d;I.d={f:wy,r:Ny,D:jy,C:Ey,L:Cy,m:Ty,X:ky,S:Ay,M:Ry};function wy(){var e=Zt.f(),t=Br();return e||t}function Ny(e){var t=Hn(e);t!==null&&t.tag===5&&t.type==="form"?Hh(t):Zt.r(e)}var Vn=typeof document>"u"?null:document;function Qm(e,t,a){var n=Vn;if(n&&typeof t=="string"&&t){var l=ot(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),pf.has(l)||(pf.add(l),e={rel:e,crossOrigin:a,href:t},n.querySelector(l)===null&&(t=n.createElement("link"),Le(t,"link",e),Ae(t),n.head.appendChild(t)))}}function jy(e){Zt.D(e),Qm("dns-prefetch",e,null)}function Ey(e,t){Zt.C(e,t),Qm("preconnect",e,t)}function Cy(e,t,a){Zt.L(e,t,a);var n=Vn;if(n&&e&&t){var l='link[rel="preload"][as="'+ot(t)+'"]';t==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+ot(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+ot(a.imageSizes)+'"]')):l+='[href="'+ot(e)+'"]';var s=l;switch(t){case"style":s=Ln(e);break;case"script":s=qn(e)}dt.has(s)||(e=ue({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),dt.set(s,e),n.querySelector(l)!==null||t==="style"&&n.querySelector(ns(s))||t==="script"&&n.querySelector(ls(s))||(t=n.createElement("link"),Le(t,"link",e),Ae(t),n.head.appendChild(t)))}}function Ty(e,t){Zt.m(e,t);var a=Vn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+ot(n)+'"][href="'+ot(e)+'"]',s=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=qn(e)}if(!dt.has(s)&&(e=ue({rel:"modulepreload",href:e},t),dt.set(s,e),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ls(s)))return}n=a.createElement("link"),Le(n,"link",e),Ae(n),a.head.appendChild(n)}}}function Ay(e,t,a){Zt.S(e,t,a);var n=Vn;if(n&&e){var l=yn(n).hoistableStyles,s=Ln(e);t=t||"default";var r=l.get(s);if(!r){var i={loading:0,preload:null};if(r=n.querySelector(ns(s)))i.loading=5;else{e=ue({rel:"stylesheet",href:e,"data-precedence":t},a),(a=dt.get(s))&&Du(e,a);var o=r=n.createElement("link");Ae(o),Le(o,"link",e),o._p=new Promise(function(c,f){o.onload=c,o.onerror=f}),o.addEventListener("load",function(){i.loading|=1}),o.addEventListener("error",function(){i.loading|=2}),i.loading|=4,Gs(r,t,n)}r={type:"stylesheet",instance:r,count:1,state:i},l.set(s,r)}}}function ky(e,t){Zt.X(e,t);var a=Vn;if(a&&e){var n=yn(a).hoistableScripts,l=qn(e),s=n.get(l);s||(s=a.querySelector(ls(l)),s||(e=ue({src:e,async:!0},t),(t=dt.get(l))&&Lu(e,t),s=a.createElement("script"),Ae(s),Le(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(l,s))}}function Ry(e,t){Zt.M(e,t);var a=Vn;if(a&&e){var n=yn(a).hoistableScripts,l=qn(e),s=n.get(l);s||(s=a.querySelector(ls(l)),s||(e=ue({src:e,async:!0,type:"module"},t),(t=dt.get(l))&&Lu(e,t),s=a.createElement("script"),Ae(s),Le(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(l,s))}}function yf(e,t,a,n){var l=(l=fa.current)?pr(l):null;if(!l)throw Error(T(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ln(a.href),a=yn(l).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ln(a.href);var s=yn(l).hoistableStyles,r=s.get(e);if(r||(l=l.ownerDocument||l,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,r),(s=l.querySelector(ns(e)))&&!s._p&&(r.instance=s,r.state.loading=5),dt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},dt.set(e,a),s||Oy(l,e,a,r.state))),t&&n===null)throw Error(T(528,""));return r}if(t&&n!==null)throw Error(T(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=qn(a),a=yn(l).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(T(444,e))}}function Ln(e){return'href="'+ot(e)+'"'}function ns(e){return'link[rel="stylesheet"]['+e+"]"}function Km(e){return ue({},e,{"data-precedence":e.precedence,precedence:null})}function Oy(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Le(t,"link",a),Ae(t),e.head.appendChild(t))}function qn(e){return'[src="'+ot(e)+'"]'}function ls(e){return"script[async]"+e}function xf(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+ot(a.href)+'"]');if(n)return t.instance=n,Ae(n),n;var l=ue({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ae(n),Le(n,"style",l),Gs(n,a.precedence,e),t.instance=n;case"stylesheet":l=Ln(a.href);var s=e.querySelector(ns(l));if(s)return t.state.loading|=4,t.instance=s,Ae(s),s;n=Km(a),(l=dt.get(l))&&Du(n,l),s=(e.ownerDocument||e).createElement("link"),Ae(s);var r=s;return r._p=new Promise(function(i,o){r.onload=i,r.onerror=o}),Le(s,"link",n),t.state.loading|=4,Gs(s,a.precedence,e),t.instance=s;case"script":return s=qn(a.src),(l=e.querySelector(ls(s)))?(t.instance=l,Ae(l),l):(n=a,(l=dt.get(s))&&(n=ue({},a),Lu(n,l)),e=e.ownerDocument||e,l=e.createElement("script"),Ae(l),Le(l,"link",n),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(T(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(n=t.instance,t.state.loading|=4,Gs(n,a.precedence,e));return t.instance}function Gs(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=n.length?n[n.length-1]:null,s=l,r=0;r<n.length;r++){var i=n[r];if(i.dataset.precedence===t)s=i;else if(s!==l)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Du(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Vs=null;function vf(e,t,a){if(Vs===null){var n=new Map,l=Vs=new Map;l.set(a,n)}else l=Vs,n=l.get(a),n||(n=new Map,l.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),l=0;l<a.length;l++){var s=a[l];if(!(s[Kl]||s[Ue]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var r=s.getAttribute(t)||"";r=e+r;var i=n.get(r);i?i.push(s):n.set(r,[s])}}return n}function bf(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function My(e,t,a){if(a===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 Zm(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Ul=null;function zy(){}function Dy(e,t,a){if(Ul===null)throw Error(T(475));var n=Ul;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var l=Ln(a.href),s=e.querySelector(ns(l));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=yr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=s,Ae(s);return}s=e.ownerDocument||e,a=Km(a),(l=dt.get(l))&&Du(a,l),s=s.createElement("link"),Ae(s);var r=s;r._p=new Promise(function(i,o){r.onload=i,r.onerror=o}),Le(s,"link",a),t.instance=s}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(n.count++,t=yr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function Ly(){if(Ul===null)throw Error(T(475));var e=Ul;return e.stylesheets&&e.count===0&&To(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&To(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function yr(){if(this.count--,this.count===0){if(this.stylesheets)To(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xr=null;function To(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xr=new Map,t.forEach(Uy,e),xr=null,yr.call(e))}function Uy(e,t){if(!(t.state.loading&4)){var a=xr.get(e);if(a)var n=a.get(null);else{a=new Map,xr.set(e,a);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<l.length;s++){var r=l[s];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(a.set(r.dataset.precedence,r),n=r)}n&&a.set(null,n)}l=t.instance,r=l.getAttribute("data-precedence"),s=a.get(r)||n,s===n&&a.set(null,l),a.set(r,l),this.count++,n=yr.bind(this),l.addEventListener("load",n),l.addEventListener("error",n),s?s.parentNode.insertBefore(l,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var _l={$$typeof:Lt,Provider:null,Consumer:null,_currentValue:Ra,_currentValue2:Ra,_threadCount:0};function _y(e,t,a,n,l,s,r,i){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=Pr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pr(0),this.hiddenUpdates=Pr(null),this.identifierPrefix=n,this.onUncaughtError=l,this.onCaughtError=s,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=i,this.incompleteTransitions=new Map}function Jm(e,t,a,n,l,s,r,i,o,c,f,g){return e=new _y(e,t,a,r,i,o,c,g),t=1,s===!0&&(t|=24),s=Pe(3,null,null,t),e.current=s,s.stateNode=e,t=uu(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:n,isDehydrated:a,cache:t},fu(s),e}function Fm(e){return e?(e=hn,e):hn}function Pm(e,t,a,n,l,s){l=Fm(l),n.context===null?n.context=l:n.pendingContext=l,n=da(t),n.payload={element:a},s=s===void 0?null:s,s!==null&&(n.callback=s),a=ha(e,n,t),a!==null&&(tt(a,e,t),yl(a,e,t))}function Sf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Uu(e,t){Sf(e,t),(e=e.alternate)&&Sf(e,t)}function Wm(e){if(e.tag===13){var t=Bn(e,67108864);t!==null&&tt(t,e,67108864),Uu(e,67108864)}}var vr=!0;function Hy(e,t,a,n){var l=H.T;H.T=null;var s=I.p;try{I.p=2,_u(e,t,a,n)}finally{I.p=s,H.T=l}}function By(e,t,a,n){var l=H.T;H.T=null;var s=I.p;try{I.p=8,_u(e,t,a,n)}finally{I.p=s,H.T=l}}function _u(e,t,a,n){if(vr){var l=Ao(n);if(l===null)Ai(e,t,n,br,a),wf(e,n);else if(Vy(l,e,t,a,n))n.stopPropagation();else if(wf(e,n),t&4&&-1<Gy.indexOf(e)){for(;l!==null;){var s=Hn(l);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var r=Ta(s.pendingLanes);if(r!==0){var i=s;for(i.pendingLanes|=2,i.entangledLanes|=2;r;){var o=1<<31-Ie(r);i.entanglements[1]|=o,r&=~o}kt(s),!(ne&6)&&(cr=Ct()+500,as(0))}}break;case 13:i=Bn(s,2),i!==null&&tt(i,s,2),Br(),Uu(s,2)}if(s=Ao(n),s===null&&Ai(e,t,n,br,a),s===l)break;l=s}l!==null&&n.stopPropagation()}else Ai(e,t,n,null,a)}}function Ao(e){return e=Io(e),Hu(e)}var br=null;function Hu(e){if(br=null,e=rn(e),e!==null){var t=Yl(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=Nd(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return br=e,null}function Im(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(Ep()){case Td:return 2;case Ad:return 8;case Zs:case Cp:return 32;case kd:return 268435456;default:return 32}default:return 32}}var ko=!1,pa=null,ya=null,xa=null,Hl=new Map,Bl=new Map,ra=[],Gy="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 wf(e,t){switch(e){case"focusin":case"focusout":pa=null;break;case"dragenter":case"dragleave":ya=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Bl.delete(t.pointerId)}}function nl(e,t,a,n,l,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:s,targetContainers:[l]},t!==null&&(t=Hn(t),t!==null&&Wm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Vy(e,t,a,n,l){switch(t){case"focusin":return pa=nl(pa,e,t,a,n,l),!0;case"dragenter":return ya=nl(ya,e,t,a,n,l),!0;case"mouseover":return xa=nl(xa,e,t,a,n,l),!0;case"pointerover":var s=l.pointerId;return Hl.set(s,nl(Hl.get(s)||null,e,t,a,n,l)),!0;case"gotpointercapture":return s=l.pointerId,Bl.set(s,nl(Bl.get(s)||null,e,t,a,n,l)),!0}return!1}function eg(e){var t=rn(e.target);if(t!==null){var a=Yl(t);if(a!==null){if(t=a.tag,t===13){if(t=Nd(a),t!==null){e.blockedOn=t,Dp(e.priority,function(){if(a.tag===13){var n=et();n=Jo(n);var l=Bn(a,n);l!==null&&tt(l,a,n),Uu(a,n)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Ao(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Xi=n,a.target.dispatchEvent(n),Xi=null}else return t=Hn(a),t!==null&&Wm(t),e.blockedOn=a,!1;t.shift()}return!0}function Nf(e,t,a){qs(e)&&a.delete(t)}function qy(){ko=!1,pa!==null&&qs(pa)&&(pa=null),ya!==null&&qs(ya)&&(ya=null),xa!==null&&qs(xa)&&(xa=null),Hl.forEach(Nf),Bl.forEach(Nf)}function Ns(e,t){e.blockedOn===t&&(e.blockedOn=null,ko||(ko=!0,Ee.unstable_scheduleCallback(Ee.unstable_NormalPriority,qy)))}var js=null;function jf(e){js!==e&&(js=e,Ee.unstable_scheduleCallback(Ee.unstable_NormalPriority,function(){js===e&&(js=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],l=e[t+2];if(typeof n!="function"){if(Hu(n||a)===null)continue;break}var s=Hn(a);s!==null&&(e.splice(t,3),t-=3,io(s,{pending:!0,data:l,method:a.method,action:n},n,l))}}))}function Gl(e){function t(o){return Ns(o,e)}pa!==null&&Ns(pa,e),ya!==null&&Ns(ya,e),xa!==null&&Ns(xa,e),Hl.forEach(t),Bl.forEach(t);for(var a=0;a<ra.length;a++){var n=ra[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ra.length&&(a=ra[0],a.blockedOn===null);)eg(a),a.blockedOn===null&&ra.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var l=a[n],s=a[n+1],r=l[Xe]||null;if(typeof s=="function")r||jf(a);else if(r){var i=null;if(s&&s.hasAttribute("formAction")){if(l=s,r=s[Xe]||null)i=r.formAction;else if(Hu(l)!==null)continue}else i=r.action;typeof i=="function"?a[n+1]=i:(a.splice(n,3),n-=3),jf(a)}}}function Bu(e){this._internalRoot=e}Yr.prototype.render=Bu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));var a=t.current,n=et();Pm(a,n,e,t,null,null)};Yr.prototype.unmount=Bu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pm(e.current,2,null,e,null,null),Br(),t[_n]=null}};function Yr(e){this._internalRoot=e}Yr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Dd();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ra.length&&t!==0&&t<ra[a].priority;a++);ra.splice(a,0,e),a===0&&eg(e)}};var Ef=Sd.version;if(Ef!=="19.1.0")throw Error(T(527,Ef,"19.1.0"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(T(188)):(e=Object.keys(e).join(","),Error(T(268,e)));return e=xp(t),e=e!==null?jd(e):null,e=e===null?null:e.stateNode,e};var Yy={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Es=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Es.isDisabled&&Es.supportsFiber)try{$l=Es.inject(Yy),We=Es}catch{}}Tr.createRoot=function(e,t){if(!wd(e))throw Error(T(299));var a=!1,n="",l=Jh,s=Fh,r=Ph,i=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(i=t.unstable_transitionCallbacks)),t=Jm(e,1,!1,null,null,a,n,l,s,r,i,null),e[_n]=t.current,zu(e),new Bu(t)};Tr.hydrateRoot=function(e,t,a){if(!wd(e))throw Error(T(299));var n=!1,l="",s=Jh,r=Fh,i=Ph,o=null,c=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(s=a.onUncaughtError),a.onCaughtError!==void 0&&(r=a.onCaughtError),a.onRecoverableError!==void 0&&(i=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(o=a.unstable_transitionCallbacks),a.formState!==void 0&&(c=a.formState)),t=Jm(e,1,!0,t,a??null,n,l,s,r,i,o,c),t.context=Fm(null),a=t.current,n=et(),n=Jo(n),l=da(n),l.callback=null,ha(a,l,n),a=n,t.current.lanes=a,Ql(t,a),kt(t),e[_n]=t.current,zu(e),new Yr(t)};Tr.version="19.1.0";function tg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(tg)}catch(e){console.error(e)}}tg(),gd.exports=Tr;var $y=gd.exports;const Xy=ld($y);var Gu={};Object.defineProperty(Gu,"__esModule",{value:!0});Gu.parse=Wy;Gu.serialize=Iy;const Qy=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,Ky=/^[\u0021-\u003A\u003C-\u007E]*$/,Zy=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Jy=/^[\u0020-\u003A\u003D-\u007E]*$/,Fy=Object.prototype.toString,Py=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function Wy(e,t){const a=new Py,n=e.length;if(n<2)return a;const l=(t==null?void 0:t.decode)||ex;let s=0;do{const r=e.indexOf("=",s);if(r===-1)break;const i=e.indexOf(";",s),o=i===-1?n:i;if(r>o){s=e.lastIndexOf(";",r-1)+1;continue}const c=Cf(e,s,r),f=Tf(e,r,c),g=e.slice(c,f);if(a[g]===void 0){let d=Cf(e,r+1,o),y=Tf(e,o,d);const S=l(e.slice(d,y));a[g]=S}s=o+1}while(s<n);return a}function Cf(e,t,a){do{const n=e.charCodeAt(t);if(n!==32&&n!==9)return t}while(++t<a);return a}function Tf(e,t,a){for(;t>a;){const n=e.charCodeAt(--t);if(n!==32&&n!==9)return t+1}return a}function Iy(e,t,a){const n=(a==null?void 0:a.encode)||encodeURIComponent;if(!Qy.test(e))throw new TypeError(`argument name is invalid: ${e}`);const l=n(t);if(!Ky.test(l))throw new TypeError(`argument val is invalid: ${t}`);let s=e+"="+l;if(!a)return s;if(a.maxAge!==void 0){if(!Number.isInteger(a.maxAge))throw new TypeError(`option maxAge is invalid: ${a.maxAge}`);s+="; Max-Age="+a.maxAge}if(a.domain){if(!Zy.test(a.domain))throw new TypeError(`option domain is invalid: ${a.domain}`);s+="; Domain="+a.domain}if(a.path){if(!Jy.test(a.path))throw new TypeError(`option path is invalid: ${a.path}`);s+="; Path="+a.path}if(a.expires){if(!tx(a.expires)||!Number.isFinite(a.expires.valueOf()))throw new TypeError(`option expires is invalid: ${a.expires}`);s+="; Expires="+a.expires.toUTCString()}if(a.httpOnly&&(s+="; HttpOnly"),a.secure&&(s+="; Secure"),a.partitioned&&(s+="; Partitioned"),a.priority)switch(typeof a.priority=="string"?a.priority.toLowerCase():void 0){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${a.priority}`)}if(a.sameSite)switch(typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"none":s+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${a.sameSite}`)}return s}function ex(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function tx(e){return Fy.call(e)==="[object Date]"}var Af="popstate";function ax(e={}){function t(n,l){let{pathname:s,search:r,hash:i}=n.location;return Ro("",{pathname:s,search:r,hash:i},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function a(n,l){return typeof l=="string"?l:Vl(l)}return lx(t,a,null,e)}function he(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nx(){return Math.random().toString(36).substring(2,10)}function kf(e,t){return{usr:e.state,key:e.key,idx:t}}function Ro(e,t,a=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Yn(t):t,state:a,key:t&&t.key||n||nx()}}function Vl({pathname:e="/",search:t="",hash:a=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function Yn(e){let t={};if(e){let a=e.indexOf("#");a>=0&&(t.hash=e.substring(a),e=e.substring(0,a));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function lx(e,t,a,n={}){let{window:l=document.defaultView,v5Compat:s=!1}=n,r=l.history,i="POP",o=null,c=f();c==null&&(c=0,r.replaceState({...r.state,idx:c},""));function f(){return(r.state||{idx:null}).idx}function g(){i="POP";let w=f(),h=w==null?null:w-c;c=w,o&&o({action:i,location:b.location,delta:h})}function d(w,h){i="PUSH";let m=Ro(b.location,w,h);c=f()+1;let p=kf(m,c),v=b.createHref(m);try{r.pushState(p,"",v)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;l.location.assign(v)}s&&o&&o({action:i,location:b.location,delta:1})}function y(w,h){i="REPLACE";let m=Ro(b.location,w,h);c=f();let p=kf(m,c),v=b.createHref(m);r.replaceState(p,"",v),s&&o&&o({action:i,location:b.location,delta:0})}function S(w){return sx(w)}let b={get action(){return i},get location(){return e(l,r)},listen(w){if(o)throw new Error("A history only accepts one active listener");return l.addEventListener(Af,g),o=w,()=>{l.removeEventListener(Af,g),o=null}},createHref(w){return t(l,w)},createURL:S,encodeLocation(w){let h=S(w);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:d,replace:y,go(w){return r.go(w)}};return b}function sx(e,t=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),he(a,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Vl(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=a+n),new URL(n,a)}function ag(e,t,a="/"){return rx(e,t,a,!1)}function rx(e,t,a,n){let l=typeof t=="string"?Yn(t):t,s=Kt(l.pathname||"/",a);if(s==null)return null;let r=ng(e);ix(r);let i=null;for(let o=0;i==null&&o<r.length;++o){let c=xx(s);i=px(r[o],c,n)}return i}function ng(e,t=[],a=[],n=""){let l=(s,r,i)=>{let o={relativePath:i===void 0?s.path||"":i,caseSensitive:s.caseSensitive===!0,childrenIndex:r,route:s};o.relativePath.startsWith("/")&&(he(o.relativePath.startsWith(n),`Absolute route path "${o.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(n.length));let c=qt([n,o.relativePath]),f=a.concat(o);s.children&&s.children.length>0&&(he(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),ng(s.children,t,f,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:mx(c,s.index),routesMeta:f})};return e.forEach((s,r)=>{var i;if(s.path===""||!((i=s.path)!=null&&i.includes("?")))l(s,r);else for(let o of lg(s.path))l(s,r,o)}),t}function lg(e){let t=e.split("/");if(t.length===0)return[];let[a,...n]=t,l=a.endsWith("?"),s=a.replace(/\?$/,"");if(n.length===0)return l?[s,""]:[s];let r=lg(n.join("/")),i=[];return i.push(...r.map(o=>o===""?s:[s,o].join("/"))),l&&i.push(...r),i.map(o=>e.startsWith("/")&&o===""?"/":o)}function ix(e){e.sort((t,a)=>t.score!==a.score?a.score-t.score:gx(t.routesMeta.map(n=>n.childrenIndex),a.routesMeta.map(n=>n.childrenIndex)))}var ox=/^:[\w-]+$/,ux=3,cx=2,fx=1,dx=10,hx=-2,Rf=e=>e==="*";function mx(e,t){let a=e.split("/"),n=a.length;return a.some(Rf)&&(n+=hx),t&&(n+=cx),a.filter(l=>!Rf(l)).reduce((l,s)=>l+(ox.test(s)?ux:s===""?fx:dx),n)}function gx(e,t){return e.length===t.length&&e.slice(0,-1).every((n,l)=>n===t[l])?e[e.length-1]-t[t.length-1]:0}function px(e,t,a=!1){let{routesMeta:n}=e,l={},s="/",r=[];for(let i=0;i<n.length;++i){let o=n[i],c=i===n.length-1,f=s==="/"?t:t.slice(s.length)||"/",g=Sr({path:o.relativePath,caseSensitive:o.caseSensitive,end:c},f),d=o.route;if(!g&&c&&a&&!n[n.length-1].route.index&&(g=Sr({path:o.relativePath,caseSensitive:o.caseSensitive,end:!1},f)),!g)return null;Object.assign(l,g.params),r.push({params:l,pathname:qt([s,g.pathname]),pathnameBase:wx(qt([s,g.pathnameBase])),route:d}),g.pathnameBase!=="/"&&(s=qt([s,g.pathnameBase]))}return r}function Sr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,n]=yx(e.path,e.caseSensitive,e.end),l=t.match(a);if(!l)return null;let s=l[0],r=s.replace(/(.)\/+$/,"$1"),i=l.slice(1);return{params:n.reduce((c,{paramName:f,isOptional:g},d)=>{if(f==="*"){let S=i[d]||"";r=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const y=i[d];return g&&!y?c[f]=void 0:c[f]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:r,pattern:e}}function yx(e,t=!1,a=!0){yt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(r,i,o)=>(n.push({paramName:i,isOptional:o!=null}),o?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),n]}function xx(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return yt(!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 Kt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let a=t.endsWith("/")?t.length-1:t.length,n=e.charAt(a);return n&&n!=="/"?null:e.slice(a)||"/"}function vx(e,t="/"){let{pathname:a,search:n="",hash:l=""}=typeof e=="string"?Yn(e):e;return{pathname:a?a.startsWith("/")?a:bx(a,t):t,search:Nx(n),hash:jx(l)}}function bx(e,t){let a=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?a.length>1&&a.pop():l!=="."&&a.push(l)}),a.length>1?a.join("/"):"/"}function Ri(e,t,a,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Sx(e){return e.filter((t,a)=>a===0||t.route.path&&t.route.path.length>0)}function Vu(e){let t=Sx(e);return t.map((a,n)=>n===t.length-1?a.pathname:a.pathnameBase)}function qu(e,t,a,n=!1){let l;typeof e=="string"?l=Yn(e):(l={...e},he(!l.pathname||!l.pathname.includes("?"),Ri("?","pathname","search",l)),he(!l.pathname||!l.pathname.includes("#"),Ri("#","pathname","hash",l)),he(!l.search||!l.search.includes("#"),Ri("#","search","hash",l)));let s=e===""||l.pathname==="",r=s?"/":l.pathname,i;if(r==null)i=a;else{let g=t.length-1;if(!n&&r.startsWith("..")){let d=r.split("/");for(;d[0]==="..";)d.shift(),g-=1;l.pathname=d.join("/")}i=g>=0?t[g]:"/"}let o=vx(l,i),c=r&&r!=="/"&&r.endsWith("/"),f=(s||r===".")&&a.endsWith("/");return!o.pathname.endsWith("/")&&(c||f)&&(o.pathname+="/"),o}var qt=e=>e.join("/").replace(/\/\/+/g,"/"),wx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Nx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,jx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ex(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var sg=["POST","PUT","PATCH","DELETE"];new Set(sg);var Cx=["GET",...sg];new Set(Cx);var $n=x.createContext(null);$n.displayName="DataRouter";var $r=x.createContext(null);$r.displayName="DataRouterState";var rg=x.createContext({isTransitioning:!1});rg.displayName="ViewTransition";var Tx=x.createContext(new Map);Tx.displayName="Fetchers";var Ax=x.createContext(null);Ax.displayName="Await";var vt=x.createContext(null);vt.displayName="Navigation";var ss=x.createContext(null);ss.displayName="Location";var ht=x.createContext({outlet:null,matches:[],isDataRoute:!1});ht.displayName="Route";var Yu=x.createContext(null);Yu.displayName="RouteError";function kx(e,{relative:t}={}){he(Xn(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:n}=x.useContext(vt),{hash:l,pathname:s,search:r}=rs(e,{relative:t}),i=s;return a!=="/"&&(i=s==="/"?a:qt([a,s])),n.createHref({pathname:i,search:r,hash:l})}function Xn(){return x.useContext(ss)!=null}function Rt(){return he(Xn(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(ss).location}var ig="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function og(e){x.useContext(vt).static||x.useLayoutEffect(e)}function Qa(){let{isDataRoute:e}=x.useContext(ht);return e?Xx():Rx()}function Rx(){he(Xn(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext($n),{basename:t,navigator:a}=x.useContext(vt),{matches:n}=x.useContext(ht),{pathname:l}=Rt(),s=JSON.stringify(Vu(n)),r=x.useRef(!1);return og(()=>{r.current=!0}),x.useCallback((o,c={})=>{if(yt(r.current,ig),!r.current)return;if(typeof o=="number"){a.go(o);return}let f=qu(o,JSON.parse(s),l,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:qt([t,f.pathname])),(c.replace?a.replace:a.push)(f,c.state,c)},[t,a,s,l,e])}var Ox=x.createContext(null);function Mx(e){let t=x.useContext(ht).outlet;return t&&x.createElement(Ox.Provider,{value:e},t)}function zx(){let{matches:e}=x.useContext(ht),t=e[e.length-1];return t?t.params:{}}function rs(e,{relative:t}={}){let{matches:a}=x.useContext(ht),{pathname:n}=Rt(),l=JSON.stringify(Vu(a));return x.useMemo(()=>qu(e,JSON.parse(l),n,t==="path"),[e,l,n,t])}function Dx(e,t){return ug(e,t)}function ug(e,t,a,n){var m;he(Xn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l,static:s}=x.useContext(vt),{matches:r}=x.useContext(ht),i=r[r.length-1],o=i?i.params:{},c=i?i.pathname:"/",f=i?i.pathnameBase:"/",g=i&&i.route;{let p=g&&g.path||"";cg(c,!g||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${p}">) 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.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let d=Rt(),y;if(t){let p=typeof t=="string"?Yn(t):t;he(f==="/"||((m=p.pathname)==null?void 0:m.startsWith(f)),`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 "${f}" but pathname "${p.pathname}" was given in the \`location\` prop.`),y=p}else y=d;let S=y.pathname||"/",b=S;if(f!=="/"){let p=f.replace(/^\//,"").split("/");b="/"+S.replace(/^\//,"").split("/").slice(p.length).join("/")}let w=!s&&a&&a.matches&&a.matches.length>0?a.matches:ag(e,{pathname:b});yt(g||w!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),yt(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.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 h=Bx(w&&w.map(p=>Object.assign({},p,{params:Object.assign({},o,p.params),pathname:qt([f,l.encodeLocation?l.encodeLocation(p.pathname).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?f:qt([f,l.encodeLocation?l.encodeLocation(p.pathnameBase).pathname:p.pathnameBase])})),r,a,n);return t&&h?x.createElement(ss.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...y},navigationType:"POP"}},h):h}function Lx(){let e=$x(),t=Ex(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},r=null;return console.error("Error handled by React Router default ErrorBoundary:",e),r=x.createElement(x.Fragment,null,x.createElement("p",null,"💿 Hey developer 👋"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:s},"ErrorBoundary")," or"," ",x.createElement("code",{style:s},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),a?x.createElement("pre",{style:l},a):null,r)}var Ux=x.createElement(Lx,null),_x=class extends x.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){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?x.createElement(ht.Provider,{value:this.props.routeContext},x.createElement(Yu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Hx({routeContext:e,match:t,children:a}){let n=x.useContext($n);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(ht.Provider,{value:e},a)}function Bx(e,t=[],a=null,n=null){if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let l=e,s=a==null?void 0:a.errors;if(s!=null){let o=l.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);he(o>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),l=l.slice(0,Math.min(l.length,o+1))}let r=!1,i=-1;if(a)for(let o=0;o<l.length;o++){let c=l[o];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(i=o),c.route.id){let{loaderData:f,errors:g}=a,d=c.route.loader&&!f.hasOwnProperty(c.route.id)&&(!g||g[c.route.id]===void 0);if(c.route.lazy||d){r=!0,i>=0?l=l.slice(0,i+1):l=[l[0]];break}}}return l.reduceRight((o,c,f)=>{let g,d=!1,y=null,S=null;a&&(g=s&&c.route.id?s[c.route.id]:void 0,y=c.route.errorElement||Ux,r&&(i<0&&f===0?(cg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,S=null):i===f&&(d=!0,S=c.route.hydrateFallbackElement||null)));let b=t.concat(l.slice(0,f+1)),w=()=>{let h;return g?h=y:d?h=S:c.route.Component?h=x.createElement(c.route.Component,null):c.route.element?h=c.route.element:h=o,x.createElement(Hx,{match:c,routeContext:{outlet:o,matches:b,isDataRoute:a!=null},children:h})};return a&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?x.createElement(_x,{location:a.location,revalidation:a.revalidation,component:y,error:g,children:w(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):w()},null)}function $u(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gx(e){let t=x.useContext($n);return he(t,$u(e)),t}function Vx(e){let t=x.useContext($r);return he(t,$u(e)),t}function qx(e){let t=x.useContext(ht);return he(t,$u(e)),t}function Xu(e){let t=qx(e),a=t.matches[t.matches.length-1];return he(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function Yx(){return Xu("useRouteId")}function $x(){var n;let e=x.useContext(Yu),t=Vx("useRouteError"),a=Xu("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[a]}function Xx(){let{router:e}=Gx("useNavigate"),t=Xu("useNavigate"),a=x.useRef(!1);return og(()=>{a.current=!0}),x.useCallback(async(l,s={})=>{yt(a.current,ig),a.current&&(typeof l=="number"?e.navigate(l):await e.navigate(l,{fromRouteId:t,...s}))},[e,t])}var Of={};function cg(e,t,a){!t&&!Of[e]&&(Of[e]=!0,yt(!1,a))}x.memo(Qx);function Qx({routes:e,future:t,state:a}){return ug(e,void 0,a,t)}function fg({to:e,replace:t,state:a,relative:n}){he(Xn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=x.useContext(vt);yt(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=x.useContext(ht),{pathname:r}=Rt(),i=Qa(),o=qu(e,Vu(s),r,n==="path"),c=JSON.stringify(o);return x.useEffect(()=>{i(JSON.parse(c),{replace:t,state:a,relative:n})},[i,c,n,t,a]),null}function dg(e){return Mx(e.context)}function nt(e){he(!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 Kx({basename:e="/",children:t=null,location:a,navigationType:n="POP",navigator:l,static:s=!1}){he(!Xn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let r=e.replace(/^\/*/,"/"),i=x.useMemo(()=>({basename:r,navigator:l,static:s,future:{}}),[r,l,s]);typeof a=="string"&&(a=Yn(a));let{pathname:o="/",search:c="",hash:f="",state:g=null,key:d="default"}=a,y=x.useMemo(()=>{let S=Kt(o,r);return S==null?null:{location:{pathname:S,search:c,hash:f,state:g,key:d},navigationType:n}},[r,o,c,f,g,d,n]);return yt(y!=null,`<Router basename="${r}"> is not able to match the URL "${o}${c}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:x.createElement(vt.Provider,{value:i},x.createElement(ss.Provider,{children:t,value:y}))}function Zx({children:e,location:t}){return Dx(Oo(e),t)}function Oo(e,t=[]){let a=[];return x.Children.forEach(e,(n,l)=>{if(!x.isValidElement(n))return;let s=[...t,l];if(n.type===x.Fragment){a.push.apply(a,Oo(n.props.children,s));return}he(n.type===nt,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),he(!n.props.index||!n.props.children,"An index route cannot have child routes.");let r={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(r.children=Oo(n.props.children,s)),a.push(r)}),a}var Ys="get",$s="application/x-www-form-urlencoded";function Xr(e){return e!=null&&typeof e.tagName=="string"}function Jx(e){return Xr(e)&&e.tagName.toLowerCase()==="button"}function Fx(e){return Xr(e)&&e.tagName.toLowerCase()==="form"}function Px(e){return Xr(e)&&e.tagName.toLowerCase()==="input"}function Wx(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ix(e,t){return e.button===0&&(!t||t==="_self")&&!Wx(e)}var Cs=null;function ev(){if(Cs===null)try{new FormData(document.createElement("form"),0),Cs=!1}catch{Cs=!0}return Cs}var tv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Oi(e){return e!=null&&!tv.has(e)?(yt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$s}"`),null):e}function av(e,t){let a,n,l,s,r;if(Fx(e)){let i=e.getAttribute("action");n=i?Kt(i,t):null,a=e.getAttribute("method")||Ys,l=Oi(e.getAttribute("enctype"))||$s,s=new FormData(e)}else if(Jx(e)||Px(e)&&(e.type==="submit"||e.type==="image")){let i=e.form;if(i==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let o=e.getAttribute("formaction")||i.getAttribute("action");if(n=o?Kt(o,t):null,a=e.getAttribute("formmethod")||i.getAttribute("method")||Ys,l=Oi(e.getAttribute("formenctype"))||Oi(i.getAttribute("enctype"))||$s,s=new FormData(i,e),!ev()){let{name:c,type:f,value:g}=e;if(f==="image"){let d=c?`${c}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else c&&s.append(c,g)}}else{if(Xr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Ys,n=null,l=$s,r=e}return s&&l==="text/plain"&&(r=s,s=void 0),{action:n,method:a.toLowerCase(),encType:l,formData:s,body:r}}function Qu(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function nv(e,t){if(e.id in t)return t[e.id];try{let a=await import(e.module);return t[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function lv(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 sv(e,t,a){let n=await Promise.all(e.map(async l=>{let s=t.routes[l.route.id];if(s){let r=await nv(s,a);return r.links?r.links():[]}return[]}));return uv(n.flat(1).filter(lv).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Mf(e,t,a,n,l,s){let r=(o,c)=>a[c]?o.route.id!==a[c].route.id:!0,i=(o,c)=>{var f;return a[c].pathname!==o.pathname||((f=a[c].route.path)==null?void 0:f.endsWith("*"))&&a[c].params["*"]!==o.params["*"]};return s==="assets"?t.filter((o,c)=>r(o,c)||i(o,c)):s==="data"?t.filter((o,c)=>{var g;let f=n.routes[o.route.id];if(!f||!f.hasLoader)return!1;if(r(o,c)||i(o,c))return!0;if(o.route.shouldRevalidate){let d=o.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((g=a[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:o.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function rv(e,t,{includeHydrateFallback:a}={}){return iv(e.map(n=>{let l=t.routes[n.route.id];if(!l)return[];let s=[l.module];return l.clientActionModule&&(s=s.concat(l.clientActionModule)),l.clientLoaderModule&&(s=s.concat(l.clientLoaderModule)),a&&l.hydrateFallbackModule&&(s=s.concat(l.hydrateFallbackModule)),l.imports&&(s=s.concat(l.imports)),s}).flat(1))}function iv(e){return[...new Set(e)]}function ov(e){let t={},a=Object.keys(e).sort();for(let n of a)t[n]=e[n];return t}function uv(e,t){let a=new Set;return new Set(t),e.reduce((n,l)=>{let s=JSON.stringify(ov(l));return a.has(s)||(a.add(s),n.push({key:s,link:l})),n},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var cv=new Set([100,101,204,205]);function fv(e,t){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a.pathname==="/"?a.pathname="_root.data":t&&Kt(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.data`:a.pathname=`${a.pathname.replace(/\/$/,"")}.data`,a}function hg(){let e=x.useContext($n);return Qu(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function dv(){let e=x.useContext($r);return Qu(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ku=x.createContext(void 0);Ku.displayName="FrameworkContext";function mg(){let e=x.useContext(Ku);return Qu(e,"You must render this element inside a <HydratedRouter> element"),e}function hv(e,t){let a=x.useContext(Ku),[n,l]=x.useState(!1),[s,r]=x.useState(!1),{onFocus:i,onBlur:o,onMouseEnter:c,onMouseLeave:f,onTouchStart:g}=t,d=x.useRef(null);x.useEffect(()=>{if(e==="render"&&r(!0),e==="viewport"){let b=h=>{h.forEach(m=>{r(m.isIntersecting)})},w=new IntersectionObserver(b,{threshold:.5});return d.current&&w.observe(d.current),()=>{w.disconnect()}}},[e]),x.useEffect(()=>{if(n){let b=setTimeout(()=>{r(!0)},100);return()=>{clearTimeout(b)}}},[n]);let y=()=>{l(!0)},S=()=>{l(!1),r(!1)};return a?e!=="intent"?[s,d,{}]:[s,d,{onFocus:ll(i,y),onBlur:ll(o,S),onMouseEnter:ll(c,y),onMouseLeave:ll(f,S),onTouchStart:ll(g,y)}]:[!1,d,{}]}function ll(e,t){return a=>{e&&e(a),a.defaultPrevented||t(a)}}function mv({page:e,...t}){let{router:a}=hg(),n=x.useMemo(()=>ag(a.routes,e,a.basename),[a.routes,e,a.basename]);return n?x.createElement(pv,{page:e,matches:n,...t}):null}function gv(e){let{manifest:t,routeModules:a}=mg(),[n,l]=x.useState([]);return x.useEffect(()=>{let s=!1;return sv(e,t,a).then(r=>{s||l(r)}),()=>{s=!0}},[e,t,a]),n}function pv({page:e,matches:t,...a}){let n=Rt(),{manifest:l,routeModules:s}=mg(),{basename:r}=hg(),{loaderData:i,matches:o}=dv(),c=x.useMemo(()=>Mf(e,t,o,l,n,"data"),[e,t,o,l,n]),f=x.useMemo(()=>Mf(e,t,o,l,n,"assets"),[e,t,o,l,n]),g=x.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let S=new Set,b=!1;if(t.forEach(h=>{var p;let m=l.routes[h.route.id];!m||!m.hasLoader||(!c.some(v=>v.route.id===h.route.id)&&h.route.id in i&&((p=s[h.route.id])!=null&&p.shouldRevalidate)||m.hasClientLoader?b=!0:S.add(h.route.id))}),S.size===0)return[];let w=fv(e,r);return b&&S.size>0&&w.searchParams.set("_routes",t.filter(h=>S.has(h.route.id)).map(h=>h.route.id).join(",")),[w.pathname+w.search]},[r,i,n,l,c,t,e,s]),d=x.useMemo(()=>rv(f,l),[f,l]),y=gv(f);return x.createElement(x.Fragment,null,g.map(S=>x.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...a})),d.map(S=>x.createElement("link",{key:S,rel:"modulepreload",href:S,...a})),y.map(({key:S,link:b})=>x.createElement("link",{key:S,...b})))}function yv(...e){return t=>{e.forEach(a=>{typeof a=="function"?a(t):a!=null&&(a.current=t)})}}var gg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gg&&(window.__reactRouterVersion="7.6.0")}catch{}function xv({basename:e,children:t,window:a}){let n=x.useRef();n.current==null&&(n.current=ax({window:a,v5Compat:!0}));let l=n.current,[s,r]=x.useState({action:l.action,location:l.location}),i=x.useCallback(o=>{x.startTransition(()=>r(o))},[r]);return x.useLayoutEffect(()=>l.listen(i),[l,i]),x.createElement(Kx,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:l})}var pg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yg=x.forwardRef(function({onClick:t,discover:a="render",prefetch:n="none",relative:l,reloadDocument:s,replace:r,state:i,target:o,to:c,preventScrollReset:f,viewTransition:g,...d},y){let{basename:S}=x.useContext(vt),b=typeof c=="string"&&pg.test(c),w,h=!1;if(typeof c=="string"&&b&&(w=c,gg))try{let k=new URL(window.location.href),R=c.startsWith("//")?new URL(k.protocol+c):new URL(c),B=Kt(R.pathname,S);R.origin===k.origin&&B!=null?c=B+R.search+R.hash:h=!0}catch{yt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let m=kx(c,{relative:l}),[p,v,N]=hv(n,d),E=Sv(c,{replace:r,state:i,target:o,preventScrollReset:f,relative:l,viewTransition:g});function j(k){t&&t(k),k.defaultPrevented||E(k)}let C=x.createElement("a",{...d,...N,href:w||m,onClick:h||s?t:j,ref:yv(y,v),target:o,"data-discover":!b&&a==="render"?"true":void 0});return p&&!b?x.createElement(x.Fragment,null,C,x.createElement(mv,{page:m})):C});yg.displayName="Link";var xg=x.forwardRef(function({"aria-current":t="page",caseSensitive:a=!1,className:n="",end:l=!1,style:s,to:r,viewTransition:i,children:o,...c},f){let g=rs(r,{relative:c.relative}),d=Rt(),y=x.useContext($r),{navigator:S,basename:b}=x.useContext(vt),w=y!=null&&Cv(g)&&i===!0,h=S.encodeLocation?S.encodeLocation(g).pathname:g.pathname,m=d.pathname,p=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;a||(m=m.toLowerCase(),p=p?p.toLowerCase():null,h=h.toLowerCase()),p&&b&&(p=Kt(p,b)||p);const v=h!=="/"&&h.endsWith("/")?h.length-1:h.length;let N=m===h||!l&&m.startsWith(h)&&m.charAt(v)==="/",E=p!=null&&(p===h||!l&&p.startsWith(h)&&p.charAt(h.length)==="/"),j={isActive:N,isPending:E,isTransitioning:w},C=N?t:void 0,k;typeof n=="function"?k=n(j):k=[n,N?"active":null,E?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let R=typeof s=="function"?s(j):s;return x.createElement(yg,{...c,"aria-current":C,className:k,ref:f,style:R,to:r,viewTransition:i},typeof o=="function"?o(j):o)});xg.displayName="NavLink";var vv=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:a,reloadDocument:n,replace:l,state:s,method:r=Ys,action:i,onSubmit:o,relative:c,preventScrollReset:f,viewTransition:g,...d},y)=>{let S=jv(),b=Ev(i,{relative:c}),w=r.toLowerCase()==="get"?"get":"post",h=typeof i=="string"&&pg.test(i),m=p=>{if(o&&o(p),p.defaultPrevented)return;p.preventDefault();let v=p.nativeEvent.submitter,N=(v==null?void 0:v.getAttribute("formmethod"))||r;S(v||p.currentTarget,{fetcherKey:t,method:N,navigate:a,replace:l,state:s,relative:c,preventScrollReset:f,viewTransition:g})};return x.createElement("form",{ref:y,method:w,action:b,onSubmit:n?o:m,...d,"data-discover":!h&&e==="render"?"true":void 0})});vv.displayName="Form";function bv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vg(e){let t=x.useContext($n);return he(t,bv(e)),t}function Sv(e,{target:t,replace:a,state:n,preventScrollReset:l,relative:s,viewTransition:r}={}){let i=Qa(),o=Rt(),c=rs(e,{relative:s});return x.useCallback(f=>{if(Ix(f,t)){f.preventDefault();let g=a!==void 0?a:Vl(o)===Vl(c);i(e,{replace:g,state:n,preventScrollReset:l,relative:s,viewTransition:r})}},[o,i,c,a,n,t,e,l,s,r])}var wv=0,Nv=()=>`__${String(++wv)}__`;function jv(){let{router:e}=vg("useSubmit"),{basename:t}=x.useContext(vt),a=Yx();return x.useCallback(async(n,l={})=>{let{action:s,method:r,encType:i,formData:o,body:c}=av(n,t);if(l.navigate===!1){let f=l.fetcherKey||Nv();await e.fetch(f,a,l.action||s,{preventScrollReset:l.preventScrollReset,formData:o,body:c,formMethod:l.method||r,formEncType:l.encType||i,flushSync:l.flushSync})}else await e.navigate(l.action||s,{preventScrollReset:l.preventScrollReset,formData:o,body:c,formMethod:l.method||r,formEncType:l.encType||i,replace:l.replace,state:l.state,fromRouteId:a,flushSync:l.flushSync,viewTransition:l.viewTransition})},[e,t,a])}function Ev(e,{relative:t}={}){let{basename:a}=x.useContext(vt),n=x.useContext(ht);he(n,"useFormAction must be used inside a RouteContext");let[l]=n.matches.slice(-1),s={...rs(e||".",{relative:t})},r=Rt();if(e==null){s.search=r.search;let i=new URLSearchParams(s.search),o=i.getAll("index");if(o.some(f=>f==="")){i.delete("index"),o.filter(g=>g).forEach(g=>i.append("index",g));let f=i.toString();s.search=f?`?${f}`:""}}return(!e||e===".")&&l.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(s.pathname=s.pathname==="/"?a:qt([a,s.pathname])),Vl(s)}function Cv(e,t={}){let a=x.useContext(rg);he(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=vg("useViewTransitionState"),l=rs(e,{relative:t.relative});if(!a.isTransitioning)return!1;let s=Kt(a.currentLocation.pathname,n)||a.currentLocation.pathname,r=Kt(a.nextLocation.pathname,n)||a.nextLocation.pathname;return Sr(l.pathname,r)!=null||Sr(l.pathname,s)!=null}[...cv];const Qr="",Zu="mcphub_token",is=()=>localStorage.getItem(Zu),bg=e=>{localStorage.setItem(Zu,e)},Mo=()=>{localStorage.removeItem(Zu)},Tv=async e=>{try{const a=await(await fetch(`${Qr}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();return a.success&&a.token&&bg(a.token),a}catch(t){return console.error("Login error:",t),{success:!1,message:"An error occurred during login"}}},Av=async e=>{try{const a=await(await fetch(`${Qr}/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json();return a.success&&a.token&&bg(a.token),a}catch(t){return console.error("Register error:",t),{success:!1,message:"An error occurred during registration"}}},kv=async()=>{const e=is();if(!e)return{success:!1,message:"No authentication token"};try{return await(await fetch(`${Qr}/auth/user`,{method:"GET",headers:{"x-auth-token":e}})).json()}catch(t){return console.error("Get current user error:",t),{success:!1,message:"An error occurred while fetching user data"}}},Rv=async e=>{const t=is();if(!t)return{success:!1,message:"No authentication token"};try{return await(await fetch(`${Qr}/auth/change-password`,{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":t},body:JSON.stringify(e)})).json()}catch(a){return console.error("Change password error:",a),{success:!1,message:"An error occurred while changing password"}}},Ov=()=>{Mo()},St={token:null,isAuthenticated:!1,loading:!0,user:null,error:null},Sg=x.createContext({auth:St,login:async()=>!1,register:async()=>!1,logout:()=>{}}),Mv=({children:e})=>{const[t,a]=x.useState(St);x.useEffect(()=>{(async()=>{const i=is();if(!i){a({...St,loading:!1});return}try{const o=await kv();o.success&&o.user?a({token:i,isAuthenticated:!0,loading:!1,user:o.user,error:null}):(Mo(),a({...St,loading:!1}))}catch{Mo(),a({...St,loading:!1})}})()},[]);const n=async(r,i)=>{try{const o=await Tv({username:r,password:i});return o.success&&o.token&&o.user?(a({token:o.token,isAuthenticated:!0,loading:!1,user:o.user,error:null}),!0):(a({...St,loading:!1,error:o.message||"Authentication failed"}),!1)}catch{return a({...St,loading:!1,error:"Authentication failed"}),!1}},l=async(r,i,o=!1)=>{try{const c=await Av({username:r,password:i,isAdmin:o});return c.success&&c.token&&c.user?(a({token:c.token,isAuthenticated:!0,loading:!1,user:c.user,error:null}),!0):(a({...St,loading:!1,error:c.message||"Registration failed"}),!1)}catch{return a({...St,loading:!1,error:"Registration failed"}),!1}},s=()=>{Ov(),a({...St,loading:!1})};return u.jsx(Sg.Provider,{value:{auth:t,login:n,register:l,logout:s},children:e})},Kr=()=>x.useContext(Sg);/**
|
|
52
|
+
* @license lucide-react v0.486.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const zv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Dv=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,n)=>n?n.toUpperCase():a.toLowerCase()),zf=e=>{const t=Dv(e);return t.charAt(0).toUpperCase()+t.slice(1)},wg=(...e)=>e.filter((t,a,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===a).join(" ").trim();/**
|
|
57
|
+
* @license lucide-react v0.486.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/var Lv={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"};/**
|
|
62
|
+
* @license lucide-react v0.486.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const Uv=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:n,className:l="",children:s,iconNode:r,...i},o)=>x.createElement("svg",{ref:o,...Lv,width:t,height:t,stroke:e,strokeWidth:n?Number(a)*24/Number(t):a,className:wg("lucide",l),...i},[...r.map(([c,f])=>x.createElement(c,f)),...Array.isArray(s)?s:[s]]));/**
|
|
67
|
+
* @license lucide-react v0.486.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const Ke=(e,t)=>{const a=x.forwardRef(({className:n,...l},s)=>x.createElement(Uv,{ref:s,iconNode:t,className:wg(`lucide-${zv(zf(e))}`,`lucide-${e}`,n),...l}));return a.displayName=zf(e),a};/**
|
|
72
|
+
* @license lucide-react v0.486.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const _v=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ju=Ke("check",_v);/**
|
|
77
|
+
* @license lucide-react v0.486.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Hv=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ng=Ke("chevron-down",Hv);/**
|
|
82
|
+
* @license lucide-react v0.486.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Bv=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],jg=Ke("chevron-right",Bv);/**
|
|
87
|
+
* @license lucide-react v0.486.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const Gv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Vv=Ke("circle-alert",Gv);/**
|
|
92
|
+
* @license lucide-react v0.486.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const qv=[["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"}]],Eg=Ke("copy",qv);/**
|
|
97
|
+
* @license lucide-react v0.486.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const Yv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],$v=Ke("info",Yv);/**
|
|
102
|
+
* @license lucide-react v0.486.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Xv=[["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"}]],Qv=Ke("log-out",Xv);/**
|
|
107
|
+
* @license lucide-react v0.486.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Kv=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],Zv=Ke("moon",Kv);/**
|
|
112
|
+
* @license lucide-react v0.486.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Jv=[["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"}]],Fv=Ke("settings",Jv);/**
|
|
117
|
+
* @license lucide-react v0.486.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Pv=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Wv=Ke("square-pen",Pv);/**
|
|
122
|
+
* @license lucide-react v0.486.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Iv=[["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"}]],eb=Ke("sun",Iv);/**
|
|
127
|
+
* @license lucide-react v0.486.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const tb=[["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"}]],ab=Ke("trash",tb);/**
|
|
132
|
+
* @license lucide-react v0.486.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const nb=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],lb=Ke("user",nb);/**
|
|
137
|
+
* @license lucide-react v0.486.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const sb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],zo=Ke("x",sb);function Cg(e){var t,a,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=Cg(e[t]))&&(n&&(n+=" "),n+=a)}else for(a in e)e[a]&&(n&&(n+=" "),n+=a);return n}function rb(){for(var e,t,a=0,n="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=Cg(e))&&(n&&(n+=" "),n+=t);return n}const Fu="-",ib=e=>{const t=ub(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:r=>{const i=r.split(Fu);return i[0]===""&&i.length!==1&&i.shift(),Tg(i,t)||ob(r)},getConflictingClassGroupIds:(r,i)=>{const o=a[r]||[];return i&&n[r]?[...o,...n[r]]:o}}},Tg=(e,t)=>{var r;if(e.length===0)return t.classGroupId;const a=e[0],n=t.nextPart.get(a),l=n?Tg(e.slice(1),n):void 0;if(l)return l;if(t.validators.length===0)return;const s=e.join(Fu);return(r=t.validators.find(({validator:i})=>i(s)))==null?void 0:r.classGroupId},Df=/^\[(.+)\]$/,ob=e=>{if(Df.test(e)){const t=Df.exec(e)[1],a=t==null?void 0:t.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},ub=e=>{const{theme:t,classGroups:a}=e,n={nextPart:new Map,validators:[]};for(const l in a)Do(a[l],n,l,t);return n},Do=(e,t,a,n)=>{e.forEach(l=>{if(typeof l=="string"){const s=l===""?t:Lf(t,l);s.classGroupId=a;return}if(typeof l=="function"){if(cb(l)){Do(l(n),t,a,n);return}t.validators.push({validator:l,classGroupId:a});return}Object.entries(l).forEach(([s,r])=>{Do(r,Lf(t,s),a,n)})})},Lf=(e,t)=>{let a=e;return t.split(Fu).forEach(n=>{a.nextPart.has(n)||a.nextPart.set(n,{nextPart:new Map,validators:[]}),a=a.nextPart.get(n)}),a},cb=e=>e.isThemeGetter,fb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,n=new Map;const l=(s,r)=>{a.set(s,r),t++,t>e&&(t=0,n=a,a=new Map)};return{get(s){let r=a.get(s);if(r!==void 0)return r;if((r=n.get(s))!==void 0)return l(s,r),r},set(s,r){a.has(s)?a.set(s,r):l(s,r)}}},Lo="!",Uo=":",db=Uo.length,hb=e=>{const{prefix:t,experimentalParseClassName:a}=e;let n=l=>{const s=[];let r=0,i=0,o=0,c;for(let S=0;S<l.length;S++){let b=l[S];if(r===0&&i===0){if(b===Uo){s.push(l.slice(o,S)),o=S+db;continue}if(b==="/"){c=S;continue}}b==="["?r++:b==="]"?r--:b==="("?i++:b===")"&&i--}const f=s.length===0?l:l.substring(o),g=mb(f),d=g!==f,y=c&&c>o?c-o:void 0;return{modifiers:s,hasImportantModifier:d,baseClassName:g,maybePostfixModifierPosition:y}};if(t){const l=t+Uo,s=n;n=r=>r.startsWith(l)?s(r.substring(l.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:r,maybePostfixModifierPosition:void 0}}if(a){const l=n;n=s=>a({className:s,parseClassName:l})}return n},mb=e=>e.endsWith(Lo)?e.substring(0,e.length-1):e.startsWith(Lo)?e.substring(1):e,gb=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const l=[];let s=[];return n.forEach(r=>{r[0]==="["||t[r]?(l.push(...s.sort(),r),s=[]):s.push(r)}),l.push(...s.sort()),l}},pb=e=>({cache:fb(e.cacheSize),parseClassName:hb(e),sortModifiers:gb(e),...ib(e)}),yb=/\s+/,xb=(e,t)=>{const{parseClassName:a,getClassGroupId:n,getConflictingClassGroupIds:l,sortModifiers:s}=t,r=[],i=e.trim().split(yb);let o="";for(let c=i.length-1;c>=0;c-=1){const f=i[c],{isExternal:g,modifiers:d,hasImportantModifier:y,baseClassName:S,maybePostfixModifierPosition:b}=a(f);if(g){o=f+(o.length>0?" "+o:o);continue}let w=!!b,h=n(w?S.substring(0,b):S);if(!h){if(!w){o=f+(o.length>0?" "+o:o);continue}if(h=n(S),!h){o=f+(o.length>0?" "+o:o);continue}w=!1}const m=s(d).join(":"),p=y?m+Lo:m,v=p+h;if(r.includes(v))continue;r.push(v);const N=l(h,w);for(let E=0;E<N.length;++E){const j=N[E];r.push(p+j)}o=f+(o.length>0?" "+o:o)}return o};function vb(){let e=0,t,a,n="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ag(t))&&(n&&(n+=" "),n+=a);return n}const Ag=e=>{if(typeof e=="string")return e;let t,a="";for(let n=0;n<e.length;n++)e[n]&&(t=Ag(e[n]))&&(a&&(a+=" "),a+=t);return a};function bb(e,...t){let a,n,l,s=r;function r(o){const c=t.reduce((f,g)=>g(f),e());return a=pb(c),n=a.cache.get,l=a.cache.set,s=i,i(o)}function i(o){const c=n(o);if(c)return c;const f=xb(o,a);return l(o,f),f}return function(){return s(vb.apply(null,arguments))}}const Ce=e=>{const t=a=>a[e]||[];return t.isThemeGetter=!0,t},kg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Sb=/^\d+\/\d+$/,wb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Nb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Eb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ja=e=>Sb.test(e),K=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>!!e&&Number.isInteger(Number(e)),Uf=e=>e.endsWith("%")&&K(e.slice(0,-1)),It=e=>wb.test(e),Tb=()=>!0,Ab=e=>Nb.test(e)&&!jb.test(e),Pu=()=>!1,kb=e=>Eb.test(e),Rb=e=>Cb.test(e),Ob=e=>!O(e)&&!M(e),Mb=e=>Qn(e,zg,Pu),O=e=>kg.test(e),Ca=e=>Qn(e,Dg,Ab),Mi=e=>Qn(e,Yb,K),zb=e=>Qn(e,Og,Pu),Db=e=>Qn(e,Mg,Rb),Lb=e=>Qn(e,Pu,kb),M=e=>Rg.test(e),sl=e=>Kn(e,Dg),Ub=e=>Kn(e,$b),_b=e=>Kn(e,Og),Hb=e=>Kn(e,zg),Bb=e=>Kn(e,Mg),Gb=e=>Kn(e,Xb,!0),Qn=(e,t,a)=>{const n=kg.exec(e);return n?n[1]?t(n[1]):a(n[2]):!1},Kn=(e,t,a=!1)=>{const n=Rg.exec(e);return n?n[1]?t(n[1]):a:!1},Og=e=>e==="position",Vb=new Set(["image","url"]),Mg=e=>Vb.has(e),qb=new Set(["length","size","percentage"]),zg=e=>qb.has(e),Dg=e=>e==="length",Yb=e=>e==="number",$b=e=>e==="family-name",Xb=e=>e==="shadow",Qb=()=>{const e=Ce("color"),t=Ce("font"),a=Ce("text"),n=Ce("font-weight"),l=Ce("tracking"),s=Ce("leading"),r=Ce("breakpoint"),i=Ce("container"),o=Ce("spacing"),c=Ce("radius"),f=Ce("shadow"),g=Ce("inset-shadow"),d=Ce("drop-shadow"),y=Ce("blur"),S=Ce("perspective"),b=Ce("aspect"),w=Ce("ease"),h=Ce("animate"),m=()=>["auto","avoid","all","avoid-page","page","left","right","column"],p=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],v=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],E=()=>[M,O,o],j=()=>[Ja,"full","auto",...E()],C=()=>[Wt,"none","subgrid",M,O],k=()=>["auto",{span:["full",Wt,M,O]},Wt,M,O],R=()=>[Wt,"auto",M,O],B=()=>["auto","min","max","fr",M,O],te=()=>["start","end","center","between","around","evenly","stretch","baseline"],me=()=>["start","end","center","stretch"],Z=()=>["auto",...E()],oe=()=>[Ja,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],A=()=>[e,M,O],_=()=>[Uf,sl,Ca],z=()=>["","none","full",c,M,O],U=()=>["",K,sl,Ca],J=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Me=()=>["","none",y,M,O],F=()=>["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",M,O],pe=()=>["none",K,M,O],mt=()=>["none",K,M,O],D=()=>[K,M,O],L=()=>[Ja,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[It],breakpoint:[It],color:[Tb],container:[It],"drop-shadow":[It],ease:["in","out","in-out"],font:[Ob],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[It],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[It],shadow:[It],spacing:["px",K],text:[It],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ja,O,M,b]}],container:["container"],columns:[{columns:[K,O,M,i]}],"break-after":[{"break-after":m()}],"break-before":[{"break-before":m()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...p(),O,M]}],overflow:[{overflow:v()}],"overflow-x":[{"overflow-x":v()}],"overflow-y":[{"overflow-y":v()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:j()}],"inset-x":[{"inset-x":j()}],"inset-y":[{"inset-y":j()}],start:[{start:j()}],end:[{end:j()}],top:[{top:j()}],right:[{right:j()}],bottom:[{bottom:j()}],left:[{left:j()}],visibility:["visible","invisible","collapse"],z:[{z:[Wt,"auto",M,O]}],basis:[{basis:[Ja,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[K,Ja,"auto","initial","none",O]}],grow:[{grow:["",K,M,O]}],shrink:[{shrink:["",K,M,O]}],order:[{order:[Wt,"first","last","none",M,O]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:k()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:k()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...me(),"normal"]}],"justify-self":[{"justify-self":["auto",...me()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...me(),"baseline"]}],"align-self":[{self:["auto",...me(),"baseline"]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...me(),"baseline"]}],"place-self":[{"place-self":["auto",...me()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],w:[{w:[i,"screen",...oe()]}],"min-w":[{"min-w":[i,"screen","none",...oe()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[r]},...oe()]}],h:[{h:["screen",...oe()]}],"min-h":[{"min-h":["screen","none",...oe()]}],"max-h":[{"max-h":["screen",...oe()]}],"font-size":[{text:["base",a,sl,Ca]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,M,Mi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uf,O]}],"font-family":[{font:[Ub,O,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[l,M,O]}],"line-clamp":[{"line-clamp":[K,"none",M,Mi]}],leading:[{leading:[s,...E()]}],"list-image":[{"list-image":["none",M,O]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",M,O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[K,"from-font","auto",M,Ca]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[K,"auto",M,O]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",M,O]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",M,O]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...p(),_b,zb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:["auto","cover","contain",Hb,Mb]}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Wt,M,O],radial:["",M,O],conic:[Wt,M,O]},Bb,Db]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:_()}],"gradient-via-pos":[{via:_()}],"gradient-to-pos":[{to:_()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:U()}],"border-w-x":[{"border-x":U()}],"border-w-y":[{"border-y":U()}],"border-w-s":[{"border-s":U()}],"border-w-e":[{"border-e":U()}],"border-w-t":[{"border-t":U()}],"border-w-r":[{"border-r":U()}],"border-w-b":[{"border-b":U()}],"border-w-l":[{"border-l":U()}],"divide-x":[{"divide-x":U()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":U()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[K,M,O]}],"outline-w":[{outline:["",K,sl,Ca]}],"outline-color":[{outline:[e]}],shadow:[{shadow:["","none",f,Gb,Lb]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",M,O,g]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[K,Ca]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":U()}],"inset-ring-color":[{"inset-ring":A()}],opacity:[{opacity:[K,M,O]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],filter:[{filter:["","none",M,O]}],blur:[{blur:Me()}],brightness:[{brightness:[K,M,O]}],contrast:[{contrast:[K,M,O]}],"drop-shadow":[{"drop-shadow":["","none",d,M,O]}],grayscale:[{grayscale:["",K,M,O]}],"hue-rotate":[{"hue-rotate":[K,M,O]}],invert:[{invert:["",K,M,O]}],saturate:[{saturate:[K,M,O]}],sepia:[{sepia:["",K,M,O]}],"backdrop-filter":[{"backdrop-filter":["","none",M,O]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[K,M,O]}],"backdrop-contrast":[{"backdrop-contrast":[K,M,O]}],"backdrop-grayscale":[{"backdrop-grayscale":["",K,M,O]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[K,M,O]}],"backdrop-invert":[{"backdrop-invert":["",K,M,O]}],"backdrop-opacity":[{"backdrop-opacity":[K,M,O]}],"backdrop-saturate":[{"backdrop-saturate":[K,M,O]}],"backdrop-sepia":[{"backdrop-sepia":["",K,M,O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",M,O]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[K,"initial",M,O]}],ease:[{ease:["linear","initial",w,M,O]}],delay:[{delay:[K,M,O]}],animate:[{animate:["none",h,M,O]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,M,O]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:mt()}],"scale-x":[{"scale-x":mt()}],"scale-y":[{"scale-y":mt()}],"scale-z":[{"scale-z":mt()}],"scale-3d":["scale-3d"],skew:[{skew:D()}],"skew-x":[{"skew-x":D()}],"skew-y":[{"skew-y":D()}],transform:[{transform:[M,O,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:L()}],"translate-x":[{"translate-x":L()}],"translate-y":[{"translate-y":L()}],"translate-z":[{"translate-z":L()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",M,O]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",M,O]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[K,sl,Ca,Mi]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["before","after","placeholder","file","marker","selection","first-line","first-letter","backdrop","*","**"]}},Kb=bb(Qb);function va(...e){return Kb(rb(e))}const Zb=({message:e,type:t="info",duration:a=3e3,onClose:n,visible:l})=>{x.useEffect(()=>{if(l){const o=setTimeout(()=>{n()},a);return()=>clearTimeout(o)}},[l,a,n]);const s={success:u.jsx(Ju,{className:"w-5 h-5 text-green-500"}),error:u.jsx(zo,{className:"w-5 h-5 text-red-500"}),info:u.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),warning:u.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})},r={success:"bg-green-50 border-green-200",error:"bg-red-50 border-red-200",info:"bg-blue-50 border-blue-200",warning:"bg-yellow-50 border-yellow-200"},i={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return u.jsx("div",{className:va("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",r[t],"transform transition-all duration-300 ease-in-out",l?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:u.jsxs("div",{className:"flex items-start",children:[u.jsx("div",{className:"flex-shrink-0",children:s[t]}),u.jsx("div",{className:"ml-3",children:u.jsx("p",{className:va("text-sm font-medium",i[t]),children:e})}),u.jsx("div",{className:"ml-auto pl-3",children:u.jsx("div",{className:"-mx-1.5 -my-1.5",children:u.jsxs("button",{onClick:n,className:va("inline-flex rounded-md p-1.5",`hover:bg-${t}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${t}-500`),children:[u.jsx("span",{className:"sr-only",children:"Dismiss"}),u.jsx(zo,{className:"h-5 w-5"})]})})})]})})},Lg=x.createContext(void 0),os=()=>{const e=x.useContext(Lg);if(!e)throw new Error("useToast must be used within a ToastProvider");return e},Jb=({children:e})=>{const[t,a]=x.useState({message:"",type:"info",visible:!1,duration:3e3}),n=(s,r="info",i=3e3)=>{a({message:s,type:r,visible:!0,duration:i})},l=()=>{a(s=>({...s,visible:!1}))};return u.jsxs(Lg.Provider,{value:{showToast:n},children:[e,u.jsx(Zb,{message:t.message,type:t.type,duration:t.duration,onClose:l,visible:t.visible})]})},Ug=x.createContext(void 0),Fb=()=>{const e=x.useContext(Ug);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e},Pb=({children:e})=>{const[t,a]=x.useState(()=>localStorage.getItem("theme")||"system"),[n,l]=x.useState("light"),s=r=>{a(r),localStorage.setItem("theme",r)};return x.useEffect(()=>{const r=()=>{const o=window.document.documentElement,c=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",f=t==="system"?c:t;l(f),f==="dark"?(console.log("Applying dark mode to HTML root element"),o.classList.add("dark"),document.body.style.backgroundColor="#111827"):(console.log("Removing dark mode from HTML root element"),o.classList.remove("dark"),document.body.style.backgroundColor="")},i=window.matchMedia("(prefers-color-scheme: dark)");return i.addEventListener("change",r),r(),()=>{i.removeEventListener("change",r)}},[t]),u.jsx(Ug.Provider,{value:{theme:t,setTheme:s,resolvedTheme:n},children:e})},Wb=(e,t,a,n)=>{var s,r,i,o;const l=[a,{code:t,...n||{}}];if((r=(s=e==null?void 0:e.services)==null?void 0:s.logger)!=null&&r.forward)return e.services.logger.forward(l,"warn","react-i18next::",!0);_a(l[0])&&(l[0]=`react-i18next:: ${l[0]}`),(o=(i=e==null?void 0:e.services)==null?void 0:i.logger)!=null&&o.warn?e.services.logger.warn(...l):console!=null&&console.warn&&console.warn(...l)},_f={},_o=(e,t,a,n)=>{_a(a)&&_f[a]||(_a(a)&&(_f[a]=new Date),Wb(e,t,a,n))},_g=(e,t)=>()=>{if(e.isInitialized)t();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),t()};e.on("initialized",a)}},Ho=(e,t,a)=>{e.loadNamespaces(t,_g(e,a))},Hf=(e,t,a,n)=>{if(_a(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ho(e,a,n);a.forEach(l=>{e.options.ns.indexOf(l)<0&&e.options.ns.push(l)}),e.loadLanguages(t,_g(e,n))},Ib=(e,t,a={})=>!t.languages||!t.languages.length?(_o(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:a.lng,precheck:(n,l)=>{var s;if(((s=a.bindI18n)==null?void 0:s.indexOf("languageChanging"))>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!l(n.isLanguageChangingTo,e))return!1}}),_a=e=>typeof e=="string",e1=e=>typeof e=="object"&&e!==null,t1=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,a1={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},n1=e=>a1[e],l1=e=>e.replace(t1,n1);let Bo={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:l1};const s1=(e={})=>{Bo={...Bo,...e}},r1=()=>Bo;let Hg;const i1=e=>{Hg=e},o1=()=>Hg,u1={type:"3rdParty",init(e){s1(e.options.react),i1(e)}},c1=x.createContext();class f1{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const d1=(e,t)=>{const a=x.useRef();return x.useEffect(()=>{a.current=e},[e,t]),a.current},Bg=(e,t,a,n)=>e.getFixedT(t,a,n),h1=(e,t,a,n)=>x.useCallback(Bg(e,t,a,n),[e,t,a,n]),ee=(e,t={})=>{var v,N,E,j;const{i18n:a}=t,{i18n:n,defaultNS:l}=x.useContext(c1)||{},s=a||n||o1();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new f1),!s){_o(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const C=(R,B)=>_a(B)?B:e1(B)&&_a(B.defaultValue)?B.defaultValue:Array.isArray(R)?R[R.length-1]:R,k=[C,{},!1];return k.t=C,k.i18n={},k.ready=!1,k}(v=s.options.react)!=null&&v.wait&&_o(s,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const r={...r1(),...s.options.react,...t},{useSuspense:i,keyPrefix:o}=r;let c=l||((N=s.options)==null?void 0:N.defaultNS);c=_a(c)?[c]:c||["translation"],(j=(E=s.reportNamespaces).addUsedNamespaces)==null||j.call(E,c);const f=(s.isInitialized||s.initializedStoreOnce)&&c.every(C=>Ib(C,s,r)),g=h1(s,t.lng||null,r.nsMode==="fallback"?c:c[0],o),d=()=>g,y=()=>Bg(s,t.lng||null,r.nsMode==="fallback"?c:c[0],o),[S,b]=x.useState(d);let w=c.join();t.lng&&(w=`${t.lng}${w}`);const h=d1(w),m=x.useRef(!0);x.useEffect(()=>{const{bindI18n:C,bindI18nStore:k}=r;m.current=!0,!f&&!i&&(t.lng?Hf(s,t.lng,c,()=>{m.current&&b(y)}):Ho(s,c,()=>{m.current&&b(y)})),f&&h&&h!==w&&m.current&&b(y);const R=()=>{m.current&&b(y)};return C&&(s==null||s.on(C,R)),k&&(s==null||s.store.on(k,R)),()=>{m.current=!1,s&&(C==null||C.split(" ").forEach(B=>s.off(B,R))),k&&s&&k.split(" ").forEach(B=>s.store.off(B,R))}},[s,w]),x.useEffect(()=>{m.current&&f&&b(d)},[s,o,f]);const p=[S,s,f];if(p.t=S,p.i18n=s,p.ready=f,f||!f&&!i)return p;throw new Promise(C=>{t.lng?Hf(s,t.lng,c,()=>C()):Ho(s,c,()=>C())})},Gg=()=>{const{t:e}=ee(),{theme:t,setTheme:a}=Fb();return u.jsx("div",{className:"flex items-center space-x-2",children:u.jsxs("div",{className:"flex bg-gray-200 dark:bg-gray-700 rounded-lg p-1",children:[u.jsx("button",{onClick:()=>a("light"),className:`flex items-center justify-center rounded-md p-1.5 ${t==="light"?"bg-white text-yellow-600 shadow":"text-black dark:text-gray-300 hover:text-yellow-600 dark:hover:text-yellow-500"}`,title:e("theme.light"),"aria-label":e("theme.light"),children:u.jsx(eb,{size:18})}),u.jsx("button",{onClick:()=>a("dark"),className:`flex items-center justify-center rounded-md p-1.5 ${t==="dark"?"bg-gray-800 text-blue-400 shadow":"text-gray-600 dark:text-gray-300 hover:text-blue-500 dark:hover:text-blue-400"}`,title:e("theme.dark"),"aria-label":e("theme.dark"),children:u.jsx(Zv,{size:18})})]})})},m1=({onToggleSidebar:e})=>{const{t}=ee(),{auth:a}=Kr();return u.jsx("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:u.jsxs("div",{className:"flex justify-between items-center px-4 py-3",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("button",{onClick:e,className:"p-2 rounded-md text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none","aria-label":t("app.toggleSidebar"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),u.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:t("app.title")})]}),u.jsx("div",{className:"flex items-center space-x-4",children:u.jsx(Gg,{})})]})})},g1=({isOpen:e,onClose:t,version:a})=>{const{t:n}=ee(),[l,s]=x.useState(!1),[r,i]=x.useState("");return x.useEffect(()=>{e&&(async()=>{try{s(!1),i("0.0.28")}catch(c){console.error("Failed to check for updates:",c)}})()},[e]),e?u.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6 relative",children:[u.jsx("button",{onClick:t,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":n("common.close"),children:u.jsx(zo,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:n("about.title")}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[n("about.currentVersion"),":"]}),u.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:a})]}),l&&u.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:u.jsxs("div",{className:"flex items-start",children:[u.jsx("div",{className:"flex-shrink-0",children:u.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsx("div",{className:"ml-3",children:u.jsxs("p",{className:"text-sm font-medium text-blue-800 dark:text-blue-200",children:[n("about.newVersion")," (v",r,")"]})})]})})]})]})})}):null},p1=({collapsed:e,version:t})=>{var w;const{t:a}=ee(),n=Qa(),{auth:l,logout:s}=Kr(),[r,i]=x.useState(!1),[o,c]=x.useState(!1),[f,g]=x.useState(!1),d=x.useRef(null);x.useEffect(()=>{(async()=>{c(!1)})()},[]),x.useEffect(()=>{const h=m=>{d.current&&!d.current.contains(m.target)&&i(!1)};return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[]);const y=()=>{n("/settings"),i(!1)},S=()=>{s(),n("/login")},b=()=>{g(!0),i(!1)};return u.jsxs("div",{ref:d,className:"relative",children:[u.jsxs("button",{onClick:()=>i(!r),className:`flex ${e?"justify-center":"items-center"} w-full p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors rounded-md ${r?"bg-gray-100 dark:bg-gray-700":""}`,children:[u.jsxs("div",{className:"flex-shrink-0 relative",children:[u.jsx("div",{className:"w-7 h-7 flex items-center justify-center rounded-full border border-gray-300 dark:border-gray-600 bg-gray-50 dark:bg-gray-700",children:u.jsx(lb,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),o&&u.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!e&&u.jsx("div",{className:"ml-3 flex flex-col items-start",children:u.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((w=l.user)==null?void 0:w.username)||a("auth.user")})})]}),r&&u.jsxs("div",{className:"absolute top-0 transform -translate-y-full left-0 w-48 bg-white dark:bg-gray-800 shadow-lg rounded-md py-1 z-50",children:[u.jsxs("button",{onClick:y,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[u.jsx(Fv,{className:"h-4 w-4 mr-2"}),a("nav.settings")]}),u.jsxs("button",{onClick:b,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 relative",children:[u.jsx($v,{className:"h-4 w-4 mr-2"}),a("about.title")," (",t,")",o&&u.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),u.jsxs("button",{onClick:S,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[u.jsx(Qv,{className:"h-4 w-4 mr-2"}),a("app.logout")]})]}),u.jsx(g1,{isOpen:f,onClose:()=>g(!1),version:t})]})},y1=({collapsed:e})=>{const{t}=ee();Rt();const a="0.5.4",n=[{path:"/",label:t("nav.dashboard"),icon:u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[u.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),u.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:t("nav.servers"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M2 5a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2V5zm14 1a1 1 0 11-2 0 1 1 0 012 0zM2 13a2 2 0 012-2h12a2 2 0 012 2v2a2 2 0 01-2 2H4a2 2 0 01-2-2v-2zm14 1a1 1 0 11-2 0 1 1 0 012 0z",clipRule:"evenodd"})})},{path:"/groups",label:t("nav.groups"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{d:"M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"})})},{path:"/market",label:t("nav.market"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3zM16 16.5a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0zM6.5 18a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"})})},{path:"/logs",label:t("nav.logs"),icon:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}];return u.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${e?"w-16":"w-64"}`,children:[u.jsx("div",{className:"overflow-y-auto flex-grow",children:u.jsx("nav",{className:"p-3 space-y-1",children:n.map(l=>u.jsxs(xg,{to:l.path,className:({isActive:s})=>`flex items-center px-3 py-2 rounded-md transition-colors ${s?"bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`,end:l.path==="/",children:[u.jsx("span",{className:"flex-shrink-0",children:l.icon}),!e&&u.jsx("span",{className:"ml-3",children:l.label})]},l.path))})}),u.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:u.jsx(p1,{collapsed:e,version:a})})]})},x1=({children:e})=>u.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:u.jsx("div",{className:"container mx-auto",children:e})}),v1=()=>{const[e,t]=md.useState(!1),a=()=>{t(!e)};return u.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[u.jsx(m1,{onToggleSidebar:a}),u.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[u.jsx(y1,{collapsed:e}),u.jsx(x1,{children:u.jsx(dg,{})})]})]})},b1=({redirectPath:e="/login"})=>{const{t}=ee(),{auth:a}=Kr();return a.loading?u.jsx("div",{className:"flex items-center justify-center h-screen",children:t("app.loading")}):a.isAuthenticated?u.jsx(dg,{}):u.jsx(fg,{to:e,replace:!0})},S1=()=>{const{t:e}=ee(),[t,a]=x.useState(""),[n,l]=x.useState(""),[s,r]=x.useState(null),[i,o]=x.useState(!1),{login:c}=Kr(),f=Qa(),g=async d=>{d.preventDefault(),r(null),o(!0);try{if(!t||!n){r(e("auth.emptyFields")),o(!1);return}await c(t,n)?f("/"):r(e("auth.loginFailed"))}catch{r(e("auth.loginError"))}finally{o(!1)}};return u.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8",children:[u.jsx("div",{className:"absolute top-4 right-4",children:u.jsx(Gg,{})}),u.jsxs("div",{className:"max-w-md w-full space-y-8",children:[u.jsx("div",{children:u.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:e("auth.loginTitle")})}),u.jsxs("form",{className:"mt-8 space-y-6",onSubmit:g,children:[u.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"username",className:"sr-only",children:e("auth.username")}),u.jsx("input",{id:"username",name:"username",type:"text",autoComplete:"username",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white dark:bg-gray-800 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:e("auth.username"),value:t,onChange:d=>a(d.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"sr-only",children:e("auth.password")}),u.jsx("input",{id:"password",name:"password",type:"password",autoComplete:"current-password",required:!0,className:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 dark:border-gray-700 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white dark:bg-gray-800 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm",placeholder:e("auth.password"),value:n,onChange:d=>l(d.target.value)})]})]}),s&&u.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center",children:s}),u.jsx("div",{children:u.jsx("button",{type:"submit",disabled:i,className:"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:e(i?"auth.loggingIn":"auth.login")})})]})]})]})},Ts={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},us=()=>{const{t:e}=ee(),[t,a]=x.useState([]),[n,l]=x.useState(null),[s,r]=x.useState(0),[i,o]=x.useState(!0),[c,f]=x.useState(0),g=x.useRef(null),d=x.useRef(0),y=()=>{g.current&&(clearInterval(g.current),g.current=null)},S=x.useCallback(()=>{y();const v=async()=>{try{const N=localStorage.getItem("mcphub_token"),j=await(await fetch("/api/servers",{headers:{"x-auth-token":N||""}})).json();j&&j.success&&Array.isArray(j.data)?a(j.data):j&&Array.isArray(j)?a(j):(console.error("Invalid server data format:",j),a([])),l(null)}catch(N){console.error("Error fetching servers during normal polling:",N),navigator.onLine?N instanceof TypeError&&(N.message.includes("NetworkError")||N.message.includes("Failed to fetch"))?l(e("errors.serverConnection")):l(e("errors.serverFetch")):l(e("errors.network"))}};v(),g.current=setInterval(v,Ts.normal.pollingInterval)},[e]);return x.useEffect(()=>{s>0&&(d.current=0,f(0));const v=async()=>{try{const N=localStorage.getItem("mcphub_token"),j=await(await fetch("/api/servers",{headers:{"x-auth-token":N||""}})).json();return j&&j.success&&Array.isArray(j.data)?(a(j.data),o(!1),S(),!0):j&&Array.isArray(j)?(a(j),o(!1),S(),!0):(console.error("Invalid server data format:",j),a([]),o(!1),S(),!0)}catch(N){return d.current+=1,console.error(`Initial loading attempt ${d.current} failed:`,N),f(d.current),navigator.onLine?l(e("errors.initialStartup")):l(e("errors.network")),d.current>=Ts.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),o(!1),y(),S()),!1}};return i?(y(),v(),g.current=setInterval(v,Ts.startup.pollingInterval),console.log(`Started initial polling with interval: ${Ts.startup.pollingInterval}ms`)):S(),()=>{y()}},[s,e,i,S]),{servers:t,error:n,setError:l,isLoading:i,fetchAttempts:c,triggerRefresh:()=>{y(),i&&(o(!0),d.current=0,f(0)),r(v=>v+1)},handleServerAdd:()=>{r(v=>v+1)},handleServerEdit:async v=>{try{const N=localStorage.getItem("mcphub_token"),j=await(await fetch("/api/settings",{headers:{"x-auth-token":N||""}})).json();if(j&&j.success&&j.data&&j.data.mcpServers&&j.data.mcpServers[v.name]){const C=j.data.mcpServers[v.name];return{name:v.name,status:v.status,tools:v.tools||[],config:C}}else return console.error("Failed to get server config from settings:",j),l(e("server.invalidConfig",{serverName:v.name})),null}catch(N){return console.error("Error fetching server settings:",N),l(N instanceof Error?N.message:String(N)),null}},handleServerRemove:async v=>{try{const N=localStorage.getItem("mcphub_token"),E=await fetch(`/api/servers/${v}`,{method:"DELETE",headers:{"x-auth-token":N||""}}),j=await E.json();return E.ok?(r(C=>C+1),!0):(l(j.message||e("server.deleteError",{serverName:v})),!1)}catch(N){return l(e("errors.general")+": "+(N instanceof Error?N.message:String(N))),!1}},handleServerToggle:async(v,N)=>{try{const E=localStorage.getItem("mcphub_token"),j=await fetch(`/api/servers/${v.name}/toggle`,{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":E||""},body:JSON.stringify({enabled:N})}),C=await j.json();return j.ok?(r(k=>k+1),!0):(console.error("Failed to toggle server:",C),l(e("server.toggleError",{serverName:v.name})),!1)}catch(E){return console.error("Error toggling server:",E),l(E instanceof Error?E.message:String(E)),!1}}}},w1=()=>{const{t:e}=ee(),{servers:t,error:a,setError:n,isLoading:l}=us(),s={total:t.length,online:t.filter(o=>o.status==="connected").length,offline:t.filter(o=>o.status==="disconnected").length,connecting:t.filter(o=>o.status==="connecting").length},r={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"},i=o=>t.length===0?0:Math.round(t.filter(c=>c.status===o).length/t.length*100);return u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:e("pages.dashboard.title")}),a&&u.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-red-600 text-lg font-medium",children:e("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:a})]}),u.jsx("button",{onClick:()=>n(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":e("app.closeButton"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),l?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):u.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[u.jsx("div",{className:"bg-white rounded-lg shadow p-6",children:u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.totalServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.total})]})]})}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.onlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.online})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${i("connected")}%`}})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.offlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.offline})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-red-500 rounded-full",style:{width:`${i("disconnected")}%`}})})]}),u.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),u.jsxs("div",{className:"ml-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:e("pages.dashboard.connectingServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:s.connecting})]})]}),u.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:u.jsx("div",{className:"h-full bg-yellow-500 rounded-full",style:{width:`${i("connecting")}%`}})})]})]}),t.length>0&&!l&&u.jsxs("div",{className:"mt-8",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:e("pages.dashboard.recentServers")}),u.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e("server.name")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e("server.status")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e("server.tools")}),u.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:e("server.enabled")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:t.slice(0,5).map((o,c)=>{var f;return u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:o.name}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${o.status==="connected"?"bg-green-100 text-green-800":o.status==="disconnected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:e(r[o.status]||o.status)})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((f=o.tools)==null?void 0:f.length)||0}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:o.enabled!==!1?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})})]},c)})})]})})]})]})},N1={default:"bg-blue-500 text-white hover:bg-blue-600",secondary:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600",outline:"bg-transparent border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800",destructive:"bg-red-500 text-white hover:bg-red-600"};function As({children:e,variant:t="default",className:a,onClick:n}){return u.jsx("span",{className:va("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",N1[t],n?"cursor-pointer":"",a),onClick:n,children:e})}const j1=({status:e})=>{const{t}=ee(),a={connecting:"bg-yellow-100 text-yellow-800",connected:"bg-green-100 text-green-800",disconnected:"bg-red-100 text-red-800"},n={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"};return u.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${a[e]}`,children:t(n[e]||e)})},E1=({tool:e})=>{const[t,a]=x.useState(!1);return u.jsxs("div",{className:"bg-white shadow rounded-lg p-4 mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>a(!t),children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900",children:e.name}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:t?u.jsx(Ng,{size:18}):u.jsx(jg,{size:18})})]}),t&&u.jsxs("div",{className:"mt-4",children:[u.jsx("p",{className:"text-gray-600 mb-2",children:e.description||"No description available"}),u.jsxs("div",{className:"bg-gray-50 rounded p-2",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:"Input Schema:"}),u.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(e.inputSchema,null,2)})]})]})]})},Vg=({isOpen:e,onClose:t,onConfirm:a,serverName:n,isGroup:l=!1})=>{const{t:s}=ee();return e?u.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-30 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:s(l?"groups.confirmDelete":"server.confirmDelete")}),u.jsx("p",{className:"text-gray-500 mb-6",children:l?s("groups.deleteWarning",{name:n}):s("server.deleteWarning",{name:n})}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{onClick:t,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:s("common.cancel")}),u.jsx("button",{onClick:a,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:s("common.delete")})]})]})})}):null},C1=({server:e,onRemove:t,onEdit:a,onToggle:n})=>{const{t:l}=ee(),{showToast:s}=os(),[r,i]=x.useState(!1),[o,c]=x.useState(!1),[f,g]=x.useState(!1),[d,y]=x.useState(!1),[S,b]=x.useState(!1),w=x.useRef(null);x.useEffect(()=>{const j=C=>{w.current&&!w.current.contains(C.target)&&y(!1)};return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]);const h=j=>{j.stopPropagation(),c(!0)},m=j=>{j.stopPropagation(),a(e)},p=async j=>{if(j.stopPropagation(),!(f||!n)){g(!0);try{await n(e,e.enabled===!1)}finally{g(!1)}}},v=j=>{j.stopPropagation(),y(!d)},N=j=>{if(j.stopPropagation(),!!e.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(e.error).then(()=>{b(!0),s(l("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>b(!1),2e3)});else{const C=document.createElement("textarea");C.value=e.error,C.style.position="fixed",C.style.left="-9999px",document.body.appendChild(C),C.focus(),C.select();try{document.execCommand("copy"),b(!0),s(l("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>b(!1),2e3)}catch(k){s(l("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",k)}document.body.removeChild(C)}},E=()=>{t(e.name),c(!1)};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${e.enabled===!1?"opacity-60":""}`,children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>i(!r),children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("h2",{className:`text-xl font-semibold ${e.enabled===!1?"text-gray-600":"text-gray-900"}`,children:e.name}),u.jsx(j1,{status:e.status}),e.error&&u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"cursor-pointer",onClick:v,"aria-label":l("server.viewErrorDetails"),children:u.jsx(Vv,{className:"text-red-500 hover:text-red-600",size:18})}),d&&u.jsxs("div",{ref:w,className:"absolute z-10 mt-2 bg-white border border-gray-200 rounded-md shadow-lg p-0 w-120",style:{left:"-231px",top:"24px",maxHeight:"300px",overflowY:"auto",width:"480px",transform:"translateX(50%)"},onClick:j=>j.stopPropagation(),children:[u.jsxs("div",{className:"flex justify-between items-center sticky top-0 bg-white py-2 px-4 border-b border-gray-200 z-20 shadow-sm",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx("h4",{className:"text-sm font-medium text-red-600",children:l("server.errorDetails")}),u.jsx("button",{onClick:N,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:l("common.copy"),children:S?u.jsx(Ju,{size:14,className:"text-green-500"}):u.jsx(Eg,{size:14})})]}),u.jsx("button",{onClick:j=>{j.stopPropagation(),y(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),u.jsx("div",{className:"p-4 pt-2",children:u.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:e.error})})]})]})]}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx("button",{onClick:m,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:l("server.edit")}),u.jsx("div",{className:"flex items-center",children:u.jsx("button",{onClick:p,className:`px-3 py-1 text-sm rounded transition-colors ${f?"bg-gray-200 text-gray-500":e.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,disabled:f,children:f?l("common.processing"):e.enabled!==!1?l("server.disable"):l("server.enable")})}),u.jsx("button",{onClick:h,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:l("server.delete")}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:r?u.jsx(Ng,{size:18}):u.jsx(jg,{size:18})})]})]}),r&&e.tools&&u.jsxs("div",{className:"mt-6",children:[u.jsx("h3",{className:`text-lg font-medium ${e.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:l("server.tools")}),u.jsx("div",{className:"space-y-4",children:e.tools.map((j,C)=>u.jsx(E1,{tool:j},C))})]})]}),u.jsx(Vg,{isOpen:o,onClose:()=>c(!1),onConfirm:E,serverName:e.name})]})},Wu=({onSubmit:e,onCancel:t,initialData:a=null,modalTitle:n,formError:l=null})=>{const{t:s}=ee(),[r,i]=x.useState(a&&a.config&&a.config.url?"sse":"stdio"),[o,c]=x.useState({name:a&&a.name||"",url:a&&a.config&&a.config.url||"",command:a&&a.config&&a.config.command||"",arguments:a&&a.config&&a.config.args?Array.isArray(a.config.args)?a.config.args.join(" "):String(a.config.args):"",args:a&&a.config&&a.config.args||[]}),[f,g]=x.useState(a&&a.config&&a.config.env?Object.entries(a.config.env).map(([N,E])=>({key:N,value:E})):[]),[d,y]=x.useState(null),S=!!a,b=N=>{const{name:E,value:j}=N.target;c({...o,[E]:j})},w=N=>{let E=N.split(" ").filter(j=>j.trim()!=="");c({...o,arguments:N,args:E})},h=(N,E,j)=>{const C=[...f];C[N][E]=j,g(C)},m=()=>{g([...f,{key:"",value:""}])},p=N=>{const E=[...f];E.splice(N,1),g(E)},v=async N=>{N.preventDefault(),y(null);try{const E={};f.forEach(({key:C,value:k})=>{C.trim()&&(E[C.trim()]=k)});const j={name:o.name,config:r==="sse"?{url:o.url}:{command:o.command,args:o.args,env:Object.keys(E).length>0?E:void 0}};e(j)}catch(E){y(`Error: ${E instanceof Error?E.message:String(E)}`)}};return u.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:n}),u.jsx("button",{onClick:t,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(d||l)&&u.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:l||d}),u.jsxs("form",{onSubmit:v,children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:s("server.name")}),u.jsx("input",{type:"text",name:"name",id:"name",value:o.name,onChange:b,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: time-mcp",required:!0,disabled:S})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:s("server.type")}),u.jsxs("div",{className:"flex space-x-4",children:[u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:r==="stdio",onChange:()=>i("stdio"),className:"mr-1"}),u.jsx("label",{htmlFor:"command",children:"stdio"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:r==="sse",onChange:()=>i("sse"),className:"mr-1"}),u.jsx("label",{htmlFor:"url",children:"sse"})]})]})]}),r==="sse"?u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:s("server.url")}),u.jsx("input",{type:"url",name:"url",id:"url",value:o.url,onChange:b,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: http://localhost:3000/sse",required:r==="sse"})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:s("server.command")}),u.jsx("input",{type:"text",name:"command",id:"command",value:o.command,onChange:b,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: npx",required:r==="stdio"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:s("server.arguments")}),u.jsx("input",{type:"text",name:"arguments",id:"arguments",value:o.arguments,onChange:N=>w(N.target.value),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"e.g.: -y time-mcp",required:r==="stdio"})]}),u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center mb-2",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:s("server.envVars")}),u.jsxs("button",{type:"button",onClick:m,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",s("server.add")]})]}),f.map((N,E)=>u.jsxs("div",{className:"flex items-center mb-2",children:[u.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[u.jsx("input",{type:"text",value:N.key,onChange:j=>h(E,"key",j.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:s("server.key")}),u.jsx("span",{className:"flex items-center",children:":"}),u.jsx("input",{type:"text",value:N.value,onChange:j=>h(E,"value",j.target.value),className:"shadow appearance-none border rounded py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline w-1/2",placeholder:s("server.value")})]}),u.jsxs("button",{type:"button",onClick:()=>p(E),className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center justify-center min-w-[56px] ml-2",children:["- ",s("server.remove")]})]},E))]})]}),u.jsxs("div",{className:"flex justify-end mt-6",children:[u.jsx("button",{type:"button",onClick:t,className:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-medium py-2 px-4 rounded mr-2",children:s("server.cancel")}),u.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:s(S?"server.save":"server.add")})]})]})]})},T1=({onAdd:e})=>{const{t}=ee(),[a,n]=x.useState(!1),[l,s]=x.useState(null),r=()=>{n(!a),s(null)},i=async o=>{try{s(null);const c=localStorage.getItem("mcphub_token"),f=await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":c||""},body:JSON.stringify(o)}),g=await f.json();if(!f.ok){g&&g.message?s(g.message):f.status===400?s(t("server.invalidData")):f.status===409?s(t("server.alreadyExists",{serverName:o.name})):s(t("server.addError"));return}n(!1),e()}catch(c){console.error("Error adding server:",c),navigator.onLine?c instanceof TypeError&&(c.message.includes("NetworkError")||c.message.includes("Failed to fetch"))?s(t("errors.serverConnection")):s(t("errors.serverAdd")):s(t("errors.network"))}};return u.jsxs("div",{children:[u.jsx("button",{onClick:r,className:"w-full bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:t("server.addServer")}),a&&u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Wu,{onSubmit:i,onCancel:r,modalTitle:t("server.addServer"),formError:l})})]})},A1=({server:e,onEdit:t,onCancel:a})=>{const{t:n}=ee(),[l,s]=x.useState(null),r=async i=>{try{s(null);const o=localStorage.getItem("mcphub_token"),c=await fetch(`/api/servers/${e.name}`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":o||""},body:JSON.stringify(i)}),f=await c.json();if(!c.ok){f&&f.message?s(f.message):c.status===404?s(n("server.notFound",{serverName:e.name})):c.status===400?s(n("server.invalidData")):s(n("server.updateError",{serverName:e.name}));return}t()}catch(o){console.error("Error updating server:",o),navigator.onLine?o instanceof TypeError&&(o.message.includes("NetworkError")||o.message.includes("Failed to fetch"))?s(n("errors.serverConnection")):s(n("errors.serverUpdate",{serverName:e.name})):s(n("errors.network"))}};return u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Wu,{onSubmit:r,onCancel:a,initialData:e,modalTitle:n("server.editTitle",{serverName:e.name}),formError:l})})},k1=()=>{const{t:e}=ee(),t=Qa(),{servers:a,error:n,setError:l,isLoading:s,handleServerAdd:r,handleServerEdit:i,handleServerRemove:o,handleServerToggle:c,triggerRefresh:f}=us(),[g,d]=x.useState(null),[y,S]=x.useState(!1),b=async m=>{const p=await i(m);p&&d(p)},w=()=>{d(null),f()},h=async()=>{S(!0);try{f(),await new Promise(m=>setTimeout(m,500))}finally{S(!1)}};return u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-8",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e("pages.servers.title")}),u.jsxs("div",{className:"flex space-x-4",children:[u.jsxs("button",{onClick:()=>t("/market"),className:"px-4 py-2 bg-emerald-100 text-emerald-800 rounded hover:bg-emerald-200 flex items-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{d:"M3 1a1 1 0 000 2h1.22l.305 1.222a.997.997 0 00.01.042l1.358 5.43-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 000-2H6.414l1-1H14a1 1 0 00.894-.553l3-6A1 1 0 0017 3H6.28l-.31-1.243A1 1 0 005 1H3z"})}),e("nav.market")]}),u.jsx(T1,{onAdd:r}),u.jsxs("button",{onClick:h,disabled:y,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center ${y?"opacity-70 cursor-not-allowed":""}`,children:[y?u.jsxs("svg",{className:"animate-spin h-4 w-4 mr-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z",clipRule:"evenodd"})}),e("common.refresh")]})]})]}),n&&u.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-red-600 text-lg font-medium",children:e("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:n})]}),u.jsx("button",{onClick:()=>l(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":e("app.closeButton"),children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 111.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),s?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):a.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:e("app.noServers")})}):u.jsx("div",{className:"space-y-6",children:a.map((m,p)=>u.jsx(C1,{server:m,onRemove:o,onEdit:b,onToggle:c},p))}),g&&u.jsx(A1,{server:g,onEdit:w,onCancel:()=>d(null)})]})},Iu=()=>{const{t:e}=ee(),[t,a]=x.useState([]),[n,l]=x.useState(!0),[s,r]=x.useState(null),[i,o]=x.useState(0),c=x.useCallback(async()=>{try{l(!0);const h=localStorage.getItem("mcphub_token"),m=await fetch("/api/groups",{headers:{"x-auth-token":h||""}});if(!m.ok)throw new Error(`Status: ${m.status}`);const p=await m.json();p&&p.success&&Array.isArray(p.data)?a(p.data):(console.error("Invalid group data format:",p),a([])),r(null)}catch(h){console.error("Error fetching groups:",h),r(h instanceof Error?h.message:"Failed to fetch groups"),a([])}finally{l(!1)}},[]),f=x.useCallback(()=>{o(h=>h+1)},[]),g=async(h,m,p=[])=>{try{const v=localStorage.getItem("mcphub_token"),N=await fetch("/api/groups",{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":v||""},body:JSON.stringify({name:h,description:m,servers:p})}),E=await N.json();return N.ok?(f(),E.data||null):(r(E.message||e("groups.createError")),null)}catch(v){return r(v instanceof Error?v.message:"Failed to create group"),null}},d=async(h,m)=>{try{const p=localStorage.getItem("mcphub_token"),v=await fetch(`/api/groups/${h}`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":p||""},body:JSON.stringify(m)}),N=await v.json();return v.ok?(f(),N.data||null):(r(N.message||e("groups.updateError")),null)}catch(p){return r(p instanceof Error?p.message:"Failed to update group"),null}},y=async(h,m)=>{try{const p=localStorage.getItem("mcphub_token"),v=await fetch(`/api/groups/${h}/servers/batch`,{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":p||""},body:JSON.stringify({servers:m})}),N=await v.json();return v.ok?(f(),N.data||null):(r(N.message||e("groups.updateError")),null)}catch(p){return r(p instanceof Error?p.message:"Failed to update group servers"),null}},S=async h=>{try{const m=localStorage.getItem("mcphub_token"),p=await fetch(`/api/groups/${h}`,{method:"DELETE",headers:{"x-auth-token":m||""}}),v=await p.json();return p.ok?(f(),!0):(r(v.message||e("groups.deleteError")),!1)}catch(m){return r(m instanceof Error?m.message:"Failed to delete group"),!1}},b=async(h,m)=>{try{const p=localStorage.getItem("mcphub_token"),v=await fetch(`/api/groups/${h}/servers`,{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":p||""},body:JSON.stringify({serverName:m})}),N=await v.json();return v.ok?(f(),N.data||null):(r(N.message||e("groups.serverAddError")),null)}catch(p){return r(p instanceof Error?p.message:"Failed to add server to group"),null}},w=async(h,m)=>{try{const p=localStorage.getItem("mcphub_token"),v=await fetch(`/api/groups/${h}/servers/${m}`,{method:"DELETE",headers:{"x-auth-token":p||""}}),N=await v.json();return v.ok?(f(),N.data||null):(r(N.message||e("groups.serverRemoveError")),null)}catch(p){return r(p instanceof Error?p.message:"Failed to remove server from group"),null}};return x.useEffect(()=>{c()},[c,i]),{groups:t,loading:n,error:s,setError:r,triggerRefresh:f,createGroup:g,updateGroup:d,updateGroupServers:y,deleteGroup:S,addServerToGroup:b,removeServerFromGroup:w}},R1=({value:e,isSelected:t,onClick:a,children:n})=>u.jsxs("button",{type:"button",role:"checkbox","aria-checked":t,className:va("flex w-full items-center justify-between p-2 rounded transition-colors cursor-pointer",t?"bg-blue-50 text-blue-700 hover:bg-blue-100 border-l-4 border-blue-500":"hover:bg-gray-50 text-gray-700"),onClick:a,children:[u.jsx("span",{className:"flex items-center",children:n}),t&&u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"w-5 h-5 text-blue-500",children:u.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})]}),qg=({label:e,helpText:t,noOptionsText:a="No options available",values:n,options:l,onChange:s,className:r})=>{const i=o=>{const c=n.includes(o);s(c?n.filter(f=>f!==o):[...n,o])};return u.jsxs("div",{className:r,children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:e}),u.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:l.length===0?u.jsx("p",{className:"text-gray-500 text-sm p-3",children:a}):u.jsx("div",{className:"space-y-1 p-1",children:l.map(o=>u.jsx(R1,{value:o.value,isSelected:n.includes(o.value),onClick:()=>i(o.value),children:o.label},o.value))})}),t&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:t})]})},Bf=({checked:e,onCheckedChange:t,disabled:a=!1})=>u.jsx("button",{type:"button",role:"switch","aria-checked":e,disabled:a,className:va("relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",e?"bg-blue-600":"bg-gray-200",a?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!a&&t(!e),children:u.jsx("span",{className:va("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",e?"translate-x-6":"translate-x-1")})}),O1=({onAdd:e,onCancel:t})=>{const{t:a}=ee(),{createGroup:n}=Iu(),{servers:l}=us(),[s,r]=x.useState([]),[i,o]=x.useState(null),[c,f]=x.useState(!1),[g,d]=x.useState({name:"",description:"",servers:[]});x.useEffect(()=>{r(l.filter(b=>b.enabled!==!1))},[l]);const y=b=>{const{name:w,value:h}=b.target;d(m=>({...m,[w]:h}))},S=async b=>{b.preventDefault(),f(!0),o(null);try{if(!g.name.trim()){o(a("groups.nameRequired")),f(!1);return}if(!await n(g.name,g.description,g.servers)){o(a("groups.createError")),f(!1);return}e()}catch(w){o(w instanceof Error?w.message:String(w)),f(!1)}};return u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:a("groups.addNew")}),i&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:i}),u.jsxs("form",{onSubmit:S,children:[u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[a("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:g.name,onChange:y,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:a("groups.namePlaceholder"),required:!0})]}),u.jsx(qg,{className:"mb-6",label:a("groups.servers"),noOptionsText:a("groups.noServerOptions"),values:g.servers,options:s.map(b=>({value:b.name,label:b.name})),onChange:b=>d(w=>({...w,servers:b}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:c,children:a("common.cancel")}),u.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:c,children:a(c?"common.submitting":"common.create")})]})]})]})})})},M1=({group:e,onEdit:t,onCancel:a})=>{const{t:n}=ee(),{updateGroup:l}=Iu(),{servers:s}=us(),[r,i]=x.useState([]),[o,c]=x.useState(null),[f,g]=x.useState(!1),[d,y]=x.useState({name:e.name,description:e.description||"",servers:e.servers||[]});x.useEffect(()=>{i(s.filter(w=>w.enabled!==!1))},[s]);const S=w=>{const{name:h,value:m}=w.target;y(p=>({...p,[h]:m}))},b=async w=>{w.preventDefault(),g(!0),c(null);try{if(!d.name.trim()){c(n("groups.nameRequired")),g(!1);return}if(!await l(e.id,{name:d.name,description:d.description,servers:d.servers})){c(n("groups.updateError")),g(!1);return}t()}catch(h){c(h instanceof Error?h.message:String(h)),g(!1)}};return u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:u.jsxs("div",{className:"p-6",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:n("groups.edit")}),o&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:o}),u.jsxs("form",{onSubmit:b,children:[u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[n("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:d.name,onChange:S,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:n("groups.namePlaceholder"),required:!0})]}),u.jsx(qg,{className:"mb-6",label:n("groups.servers"),noOptionsText:n("groups.noServerOptions"),values:d.servers,options:r.map(w=>({value:w.name,label:w.name})),onChange:w=>y(h=>({...h,servers:w}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:f,children:n("common.cancel")}),u.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:f,children:n(f?"common.submitting":"common.save")})]})]})]})})})},z1=({group:e,servers:t,onEdit:a,onDelete:n})=>{const{t:l}=ee(),{showToast:s}=os(),[r,i]=x.useState(!1),[o,c]=x.useState(!1),f=()=>{a(e)},g=()=>{i(!0)},d=()=>{n(e.id),i(!1)},y=()=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(e.id).then(()=>{c(!0),setTimeout(()=>c(!1),2e3)});else{const b=document.createElement("textarea");b.value=e.id,b.style.position="fixed",b.style.left="-9999px",document.body.appendChild(b),b.focus(),b.select();try{document.execCommand("copy"),c(!0),setTimeout(()=>c(!1),2e3)}catch(w){s(l("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",w)}document.body.removeChild(b)}},S=t.filter(b=>e.servers.includes(b.name));return u.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:e.name}),u.jsxs("div",{className:"flex items-center ml-3",children:[u.jsx("span",{className:"text-xs text-gray-500 mr-1",children:e.id}),u.jsx("button",{onClick:y,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:l("common.copy"),children:o?u.jsx(Ju,{size:14,className:"text-green-500"}):u.jsx(Eg,{size:14})})]})]}),e.description&&u.jsx("p",{className:"text-gray-600 text-sm mt-1",children:e.description})]}),u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("div",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-sm",children:l("groups.serverCount",{count:e.servers.length})}),u.jsx("button",{onClick:f,className:"text-gray-500 hover:text-gray-700",title:l("groups.edit"),children:u.jsx(Wv,{size:18})}),u.jsx("button",{onClick:g,className:"text-gray-500 hover:text-red-600",title:l("groups.delete"),children:u.jsx(ab,{size:18})})]})]}),u.jsx("div",{className:"mt-4",children:S.length===0?u.jsx("p",{className:"text-gray-500 italic",children:l("groups.noServers")}):u.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:S.map(b=>u.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[u.jsx("span",{className:"font-medium text-gray-700 text-sm",children:b.name}),u.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${b.status==="connected"?"bg-green-500":b.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},b.name))})}),u.jsx(Vg,{isOpen:r,onClose:()=>i(!1),onConfirm:d,serverName:e.name,isGroup:!0})]})},D1=()=>{const{t:e}=ee(),{groups:t,loading:a,error:n,setError:l,deleteGroup:s,triggerRefresh:r}=Iu(),{servers:i}=us(),[o,c]=x.useState(null),[f,g]=x.useState(!1),d=h=>{c(h)},y=()=>{c(null),r()},S=async h=>{await s(h)||l(e("groups.deleteError"))},b=()=>{g(!0)},w=()=>{g(!1),r()};return u.jsxs("div",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-8",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:e("pages.groups.title")}),u.jsx("div",{className:"flex space-x-4",children:u.jsxs("button",{onClick:b,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M10 3a1 1 0 00-1 1v5H4a1 1 0 100 2h5v5a1 1 0 102 0v-5h5a1 1 0 100-2h-5V4a1 1 0 00-1-1z",clipRule:"evenodd"})}),e("groups.add")]})})]}),n&&u.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:u.jsx("p",{children:n})}),a?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsxs("div",{className:"flex flex-col items-center justify-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):t.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:e("groups.noGroups")})}):u.jsx("div",{className:"space-y-6",children:t.map(h=>u.jsx(z1,{group:h,servers:i,onEdit:d,onDelete:S},h.id))}),f&&u.jsx(O1,{onAdd:w,onCancel:w}),o&&u.jsx(M1,{group:o,onEdit:y,onCancel:()=>c(null)})]})},L1=({onSuccess:e,onCancel:t})=>{const{t:a}=ee(),[n,l]=x.useState({currentPassword:"",newPassword:""}),[s,r]=x.useState(""),[i,o]=x.useState(!1),[c,f]=x.useState(null),[g,d]=x.useState(!1),y=b=>{const{name:w,value:h}=b.target;w==="confirmPassword"?r(h):l(m=>({...m,[w]:h}))},S=async b=>{if(b.preventDefault(),f(null),n.newPassword!==s){f(a("auth.passwordsNotMatch"));return}o(!0);try{const w=await Rv(n);w.success?(d(!0),e&&e()):f(w.message||a("auth.changePasswordError"))}catch{f(a("auth.changePasswordError"))}finally{o(!1)}};return u.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[u.jsx("h2",{className:"text-xl font-bold mb-4",children:a("auth.changePassword")}),g?u.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:a("auth.changePasswordSuccess")}):u.jsxs("form",{onSubmit:S,children:[c&&u.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:c}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:a("auth.currentPassword")}),u.jsx("input",{type:"password",id:"currentPassword",name:"currentPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:n.currentPassword,onChange:y,required:!0})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:a("auth.newPassword")}),u.jsx("input",{type:"password",id:"newPassword",name:"newPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:n.newPassword,onChange:y,required:!0,minLength:6})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:a("auth.confirmPassword")}),u.jsx("input",{type:"password",id:"confirmPassword",name:"confirmPassword",className:"w-full p-2 border rounded focus:outline-none focus:ring-2 focus:ring-blue-500",value:s,onChange:y,required:!0,minLength:6})]}),u.jsxs("div",{className:"flex justify-end space-x-2",children:[t&&u.jsx("button",{type:"button",onClick:t,disabled:i,className:"py-2 px-4 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:a("common.cancel")}),u.jsx("button",{type:"submit",disabled:i,className:"py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500",children:i?u.jsxs("span",{className:"flex items-center",children:[u.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),a("common.save")]}):a("common.save")})]})]})]})},U1=()=>{const{t:e}=ee(),{showToast:t}=os(),[a,n]=x.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0}),[l,s]=x.useState({pythonIndexUrl:""}),[r,i]=x.useState(!1),[o,c]=x.useState(null),[f,g]=x.useState(0),d=x.useCallback(()=>{g(w=>w+1)},[]),y=x.useCallback(async()=>{var w,h,m,p;i(!0),c(null);try{const v=localStorage.getItem("mcphub_token"),N=await fetch("/api/settings",{headers:{"x-auth-token":v||""}});if(!N.ok)throw new Error(`HTTP error! Status: ${N.status}`);const E=await N.json();E.success&&((h=(w=E.data)==null?void 0:w.systemConfig)!=null&&h.routing)&&n({enableGlobalRoute:E.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:E.data.systemConfig.routing.enableGroupNameRoute??!0}),E.success&&((p=(m=E.data)==null?void 0:m.systemConfig)!=null&&p.install)&&s({pythonIndexUrl:E.data.systemConfig.install.pythonIndexUrl||""})}catch(v){console.error("Failed to fetch settings:",v),c(v instanceof Error?v.message:"Failed to fetch settings"),t(e("errors.failedToFetchSettings"))}finally{i(!1)}},[e,t]),S=async(w,h)=>{i(!0),c(null);try{const m=localStorage.getItem("mcphub_token"),p=await fetch("/api/system-config",{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":m||""},body:JSON.stringify({routing:{[w]:h}})});if(!p.ok)throw new Error(`HTTP error! Status: ${p.status}`);return(await p.json()).success?(n({...a,[w]:h}),t(e("settings.systemConfigUpdated")),!0):(t(e("errors.failedToUpdateSystemConfig")),!1)}catch(m){return console.error("Failed to update system config:",m),c(m instanceof Error?m.message:"Failed to update system config"),t(e("errors.failedToUpdateSystemConfig")),!1}finally{i(!1)}},b=async(w,h)=>{i(!0),c(null);try{const m=localStorage.getItem("mcphub_token"),p=await fetch("/api/system-config",{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":m||""},body:JSON.stringify({install:{[w]:h}})});if(!p.ok)throw new Error(`HTTP error! Status: ${p.status}`);return(await p.json()).success?(s({...l,[w]:h}),t(e("settings.systemConfigUpdated")),!0):(t(e("errors.failedToUpdateSystemConfig")),!1)}catch(m){return console.error("Failed to update system config:",m),c(m instanceof Error?m.message:"Failed to update system config"),t(e("errors.failedToUpdateSystemConfig")),!1}finally{i(!1)}};return x.useEffect(()=>{y()},[y,f]),{routingConfig:a,installConfig:l,loading:r,error:o,setError:c,triggerRefresh:d,fetchSettings:y,updateRoutingConfig:S,updateInstallConfig:b}},_1=()=>{const{t:e,i18n:t}=ee(),a=Qa(),{showToast:n}=os(),[l,s]=x.useState(t.language);x.useEffect(()=>{s(t.language)},[t.language]);const[r,i]=x.useState({pythonIndexUrl:""}),{routingConfig:o,installConfig:c,loading:f,updateRoutingConfig:g,updateInstallConfig:d}=U1();x.useEffect(()=>{c&&i(c)},[c]);const[y,S]=x.useState({routingConfig:!1,installConfig:!1,password:!1}),b=N=>{S(E=>({...E,[N]:!E[N]}))},w=async(N,E)=>{await g(N,E)},h=N=>{i({...r,pythonIndexUrl:N})},m=async()=>{await d("pythonIndexUrl",r.pythonIndexUrl)},p=()=>{setTimeout(()=>{a("/")},2e3)},v=N=>{localStorage.setItem("i18nextLng",N),window.location.reload()};return u.jsxs("div",{className:"container mx-auto",children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:e("pages.settings.title")}),u.jsx("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:e("pages.settings.language")}),u.jsxs("div",{className:"flex space-x-3",children:[u.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${l.startsWith("en")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>v("en"),children:"English"}),u.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${l.startsWith("zh")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>v("zh"),children:"中文"})]})]})}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>b("routingConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:e("pages.settings.routeConfig")}),u.jsx("span",{className:"text-gray-500",children:y.routingConfig?"▼":"►"})]}),y.routingConfig&&u.jsxs("div",{className:"space-y-4 mt-4",children:[u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.enableGlobalRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:e("settings.enableGlobalRouteDescription")})]}),u.jsx(Bf,{disabled:f,checked:o.enableGlobalRoute,onCheckedChange:N=>w("enableGlobalRoute",N)})]}),u.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.enableGroupNameRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:e("settings.enableGroupNameRouteDescription")})]}),u.jsx(Bf,{disabled:f,checked:o.enableGroupNameRoute,onCheckedChange:N=>w("enableGroupNameRoute",N)})]})]})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>b("installConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:e("settings.installConfig")}),u.jsx("span",{className:"text-gray-500",children:y.installConfig?"▼":"►"})]}),y.installConfig&&u.jsx("div",{className:"space-y-4 mt-4",children:u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsxs("div",{className:"mb-2",children:[u.jsx("h3",{className:"font-medium text-gray-700",children:e("settings.pythonIndexUrl")}),u.jsx("p",{className:"text-sm text-gray-500",children:e("settings.pythonIndexUrlDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:r.pythonIndexUrl,onChange:N=>h(N.target.value),placeholder:e("settings.pythonIndexUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm",disabled:f}),u.jsx("button",{onClick:m,disabled:f,className:"mt-1 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-md text-sm font-medium disabled:opacity-50",children:e("common.save")})]})]})})]}),u.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>b("password"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:e("auth.changePassword")}),u.jsx("span",{className:"text-gray-500",children:y.password?"▼":"►"})]}),y.password&&u.jsx("div",{className:"max-w-lg mt-4",children:u.jsx(L1,{onSuccess:p})})]})]})},H1=()=>{const{t:e}=ee(),[t,a]=x.useState([]),[n,l]=x.useState([]),[s,r]=x.useState([]),[i,o]=x.useState([]),[c,f]=x.useState(""),[g,d]=x.useState(""),[y,S]=x.useState(""),[b,w]=x.useState(!0),[h,m]=x.useState(null),[p,v]=x.useState(null),[N,E]=x.useState([]),[j,C]=x.useState(1),[k,R]=x.useState(9),[B,te]=x.useState(1),me=x.useCallback(async()=>{try{w(!0);const D=localStorage.getItem("mcphub_token"),L=await fetch("/api/market/servers",{headers:{"x-auth-token":D||""}});if(!L.ok)throw new Error(`Status: ${L.status}`);const G=await L.json();G&&G.success&&Array.isArray(G.data)?(l(G.data),Z(G.data,j)):(console.error("Invalid market servers data format:",G),m(e("market.fetchError")))}catch(D){console.error("Error fetching market servers:",D),m(D instanceof Error?D.message:String(D))}finally{w(!1)}},[e]),Z=x.useCallback((D,L,G=k)=>{const q=D.length,Jt=Math.ceil(q/G);te(Jt);const Zn=Math.max(1,Math.min(L,Jt));Zn!==L&&C(Zn);const cs=(Zn-1)*G,Jn=D.slice(cs,cs+G);a(Jn)},[k]),oe=x.useCallback(D=>{C(D),Z(n,D,k)},[n,Z,k]),A=x.useCallback(async()=>{try{const D=localStorage.getItem("mcphub_token"),L=await fetch("/api/market/categories",{headers:{"x-auth-token":D||""}});if(!L.ok)throw new Error(`Status: ${L.status}`);const G=await L.json();G&&G.success&&Array.isArray(G.data)?r(G.data):console.error("Invalid categories data format:",G)}catch(D){console.error("Error fetching categories:",D)}},[]),_=x.useCallback(async()=>{try{const D=localStorage.getItem("mcphub_token"),L=await fetch("/api/market/tags",{headers:{"x-auth-token":D||""}});if(!L.ok)throw new Error(`Status: ${L.status}`);const G=await L.json();G&&G.success&&Array.isArray(G.data)?o(G.data):console.error("Invalid tags data format:",G)}catch(D){console.error("Error fetching tags:",D)}},[]),z=x.useCallback(async D=>{try{w(!0);const L=localStorage.getItem("mcphub_token"),G=await fetch(`/api/market/servers/${D}`,{headers:{"x-auth-token":L||""}});if(!G.ok)throw new Error(`Status: ${G.status}`);const q=await G.json();return q&&q.success&&q.data?(v(q.data),q.data):(console.error("Invalid server data format:",q),m(e("market.serverNotFound")),null)}catch(L){return console.error(`Error fetching server ${D}:`,L),m(L instanceof Error?L.message:String(L)),null}finally{w(!1)}},[e]),U=x.useCallback(async D=>{try{if(w(!0),S(D),!D.trim()){me();return}const L=localStorage.getItem("mcphub_token"),G=await fetch(`/api/market/servers/search?query=${encodeURIComponent(D)}`,{headers:{"x-auth-token":L||""}});if(!G.ok)throw new Error(`Status: ${G.status}`);const q=await G.json();q&&q.success&&Array.isArray(q.data)?(l(q.data),C(1),Z(q.data,1)):(console.error("Invalid search results format:",q),m(e("market.searchError")))}catch(L){console.error("Error searching servers:",L),m(L instanceof Error?L.message:String(L))}finally{w(!1)}},[e,n,Z,me]),J=x.useCallback(async D=>{try{if(w(!0),f(D),d(""),!D){me();return}const L=localStorage.getItem("mcphub_token"),G=await fetch(`/api/market/categories/${encodeURIComponent(D)}`,{headers:{"x-auth-token":L||""}});if(!G.ok)throw new Error(`Status: ${G.status}`);const q=await G.json();q&&q.success&&Array.isArray(q.data)?(l(q.data),C(1),Z(q.data,1)):(console.error("Invalid category filter results format:",q),m(e("market.filterError")))}catch(L){console.error("Error filtering servers by category:",L),m(L instanceof Error?L.message:String(L))}finally{w(!1)}},[e,me,Z]),Oe=x.useCallback(async D=>{try{if(w(!0),d(D),f(""),!D){me();return}const L=localStorage.getItem("mcphub_token"),G=await fetch(`/api/market/tags/${encodeURIComponent(D)}`,{headers:{"x-auth-token":L||""}});if(!G.ok)throw new Error(`Status: ${G.status}`);const q=await G.json();q&&q.success&&Array.isArray(q.data)?(l(q.data),C(1),Z(q.data,1)):(console.error("Invalid tag filter results format:",q),m(e("market.tagFilterError")))}catch(L){console.error("Error filtering servers by tag:",L),m(L instanceof Error?L.message:String(L))}finally{w(!1)}},[e,me,Z]),Me=x.useCallback(async()=>{try{const D=localStorage.getItem("mcphub_token"),L=await fetch("/api/servers",{headers:{"x-auth-token":D||""}});if(!L.ok)throw new Error(`Status: ${L.status}`);const G=await L.json();if(G&&G.success&&Array.isArray(G.data)){const q=G.data.map(Jt=>Jt.name);E(q)}}catch(D){console.error("Error fetching installed servers:",D)}},[]),F=x.useCallback(D=>N.includes(D),[N]),pe=x.useCallback(async D=>{var L,G;try{const q=(L=D.installations)!=null&&L.npm?"npm":Object.keys(D.installations||{}).length>0?Object.keys(D.installations)[0]:null;if(!q||!((G=D.installations)!=null&&G[q]))return m(e("market.noInstallationMethod")),!1;const Jt=D.installations[q],Zn={name:D.name,config:{command:Jt.command,args:Jt.args,env:Jt.env||{}}},cs=localStorage.getItem("mcphub_token"),Jn=await fetch("/api/servers",{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":cs||""},body:JSON.stringify(Zn)});if(!Jn.ok){const Zg=await Jn.json();throw new Error(Zg.message||`Status: ${Jn.status}`)}return await Me(),!0}catch(q){return console.error("Error installing server:",q),m(q instanceof Error?q.message:String(q)),!1}},[e,Me]),mt=x.useCallback(D=>{R(D),C(1),Z(n,1,D)},[n,Z]);return x.useEffect(()=>{me(),A(),_(),Me()},[me,A,_,Me]),{servers:t,allServers:n,categories:s,tags:i,selectedCategory:c,selectedTag:g,searchQuery:y,loading:b,error:h,setError:m,currentServer:p,fetchMarketServers:me,fetchServerByName:z,searchServers:U,filterByCategory:J,filterByTag:Oe,installServer:pe,currentPage:j,totalPages:B,serversPerPage:k,changePage:oe,changeServersPerPage:mt,isServerInstalled:F}},B1=({server:e,onClick:t})=>{var i,o,c,f;const{t:a}=ee(),n=()=>{if(!e.tags||e.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const g=28,d=m=>m.length+3;let y=0,S=0;const b=[...e.tags].sort((m,p)=>m.length-p.length);for(S=0;S<b.length;S++){const m=d(b[S]);if(y+m>g)break;if(y+=m,S===b.length-1)return{tagsToShow:b,hasMore:!1,moreCount:0}}S===0&&b.length>0&&(S=1);const w=b.length-S,h=3+String(w).length+a("market.moreTags").length;return y+h<=g||S<1?{tagsToShow:b.slice(0,S),hasMore:!0,moreCount:w}:{tagsToShow:b.slice(0,Math.max(1,S-1)),hasMore:!0,moreCount:w+1}},{tagsToShow:l,hasMore:s,moreCount:r}=n();return u.jsxs("div",{className:"bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow cursor-pointer flex flex-col h-full",onClick:()=>t(e),children:[u.jsxs("div",{className:"flex justify-between items-start mb-3",children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:e.display_name}),e.is_official&&u.jsx("span",{className:"bg-blue-100 text-blue-800 text-xs font-medium px-2.5 py-0.5 rounded flex-shrink-0",children:a("market.official")})]}),u.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:e.description}),u.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((i=e.categories)==null?void 0:i.length)>0?e.categories.map((g,d)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:g},d)):u.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),u.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((o=e.tags)==null?void 0:o.length)>0?u.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[l.map((g,d)=>u.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",g]},d)),s&&u.jsxs("span",{className:"bg-gray-100 text-gray-600 text-xs px-1.5 py-1 rounded flex-shrink-0",children:["+",r," ",a("market.moreTags")]})]}):u.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),u.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500 border-t border-gray-100",children:[u.jsxs("div",{className:"overflow-hidden",children:[u.jsxs("span",{className:"whitespace-nowrap",children:[a("market.by")," "]}),u.jsx("span",{className:"font-medium whitespace-nowrap overflow-hidden text-ellipsis max-w-[120px] inline-block align-bottom",children:((c=e.author)==null?void 0:c.name)||a("market.unknown")})]}),u.jsxs("div",{className:"flex items-center flex-shrink-0",children:[u.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z",clipRule:"evenodd"})}),u.jsxs("span",{children:[((f=e.tools)==null?void 0:f.length)||0," ",a("market.tools")]})]})]})]})},G1=({server:e,onBack:t,onInstall:a,installing:n=!1,isInstalled:l=!1})=>{var h,m;const{t:s}=ee(),[r,i]=x.useState(!1),[o,c]=x.useState(null),f=()=>l?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:s("market.installed")}:n?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:s("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white",disabled:!1,text:s("market.install")},g=()=>{i(!r),c(null)},d=()=>{l||g()},y=()=>{if(!e.installations)return;if(e.installations.npm)return e.installations.npm;if(e.installations.uvx)return e.installations.uvx;if(e.installations.default)return e.installations.default;const p=Object.keys(e.installations);if(p.length>0)return e.installations[p[0]]},S=async p=>{try{c(null),a(e),i(!1)}catch(v){console.error("Error installing server:",v),c(s("errors.serverInstall"))}},b=f(),w=y();return u.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[u.jsx("div",{className:"mb-4",children:u.jsxs("button",{onClick:t,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[u.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M9.707 16.707a1 1 0 01-1.414 0l-6-6a1 1 0 010-1.414l6-6a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l4.293 4.293a1 1 0 010 1.414z",clipRule:"evenodd"})}),s("market.backToList")]})}),u.jsxs("div",{className:"flex justify-between items-start mb-4",children:[u.jsx("div",{children:u.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[e.display_name,u.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",e.name,")"]}),u.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[s("market.author"),": ",e.author.name," • ",s("market.license"),": ",e.license," •",u.jsx("a",{href:e.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:s("market.repository")})]})]})}),u.jsxs("div",{className:"flex items-center",children:[e.is_official&&u.jsx("span",{className:"bg-blue-100 text-blue-800 text-sm font-medium px-4 py-2 rounded mr-2 flex items-center",children:s("market.official")}),u.jsx("button",{onClick:d,disabled:b.disabled,className:b.className,children:b.text})]})]}),u.jsx("p",{className:"text-gray-700 mb-6",children:e.description}),u.jsxs("div",{className:"mb-6",children:[u.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[s("market.categories")," & ",s("market.tags")]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[(h=e.categories)==null?void 0:h.map((p,v)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:p},`cat-${v}`)),e.tags&&e.tags.map((p,v)=>u.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",p]},`tag-${v}`))]})]}),e.arguments&&Object.keys(e.arguments).length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.arguments")}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[u.jsx("thead",{className:"bg-gray-50",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:s("market.argumentName")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:s("market.description")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:s("market.required")}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:s("market.example")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(e.arguments).map(([p,v],N)=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:p}),u.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:v.description}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:v.required?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:u.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:v.example})})]},N))})]})})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.tools")}),u.jsx("div",{className:"space-y-4",children:(m=e.tools)==null?void 0:m.map((p,v)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsxs("h4",{className:"font-medium mb-2",children:[p.name,u.jsx("button",{type:"button",onClick:()=>{const N=document.getElementById(`schema-${v}`);N&&N.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:s("market.viewSchema")})]}),u.jsx("p",{className:"text-gray-600 mb-2",children:p.description}),u.jsx("div",{className:"mt-2",children:u.jsx("pre",{id:`schema-${v}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(p.inputSchema,null,2)})})]},v))})]}),e.examples&&e.examples.length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:s("market.examples")}),u.jsx("div",{className:"space-y-4",children:e.examples.map((p,v)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsx("h4",{className:"font-medium mb-2",children:p.title}),u.jsx("p",{className:"text-gray-600 mb-2",children:p.description}),u.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:p.prompt})]},v))})]}),u.jsx("div",{className:"mt-6 flex justify-end",children:u.jsx("button",{onClick:d,disabled:b.disabled,className:b.className,children:b.text})}),r&&u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Wu,{onSubmit:S,onCancel:g,modalTitle:s("market.installServer",{name:e.display_name}),formError:o,initialData:{name:e.name,status:"disconnected",config:w?{command:w.command||"",args:w.args||[],env:w.env||{}}:void 0}})})]})},V1=({currentPage:e,totalPages:t,onPageChange:a})=>{const n=()=>{const l=[];l.push(u.jsx("button",{onClick:()=>a(1),className:`px-3 py-1 mx-1 rounded ${e===1?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"1"},"first"));let r=Math.max(2,e-Math.floor(5/2));r>2&&l.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let i=r;i<=Math.min(t-1,r+5-3);i++)l.push(u.jsx("button",{onClick:()=>a(i),className:`px-3 py-1 mx-1 rounded ${e===i?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:i},i));return r+5-3<t-1&&l.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),t>1&&l.push(u.jsx("button",{onClick:()=>a(t),className:`px-3 py-1 mx-1 rounded ${e===t?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:t},"last")),l};return t<=1?null:u.jsxs("div",{className:"flex justify-center items-center my-6",children:[u.jsx("button",{onClick:()=>a(Math.max(1,e-1)),disabled:e===1,className:`px-3 py-1 rounded mr-2 ${e===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"« Prev"}),u.jsx("div",{className:"flex",children:n()}),u.jsx("button",{onClick:()=>a(Math.min(t,e+1)),disabled:e===t,className:`px-3 py-1 rounded ml-2 ${e===t?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"Next »"})]})},Gf=()=>{const{t:e}=ee(),t=Qa();Rt();const{serverName:a}=zx(),{showToast:n}=os(),{servers:l,allServers:s,categories:r,loading:i,error:o,setError:c,searchServers:f,filterByCategory:g,filterByTag:d,selectedCategory:y,selectedTag:S,installServer:b,fetchServerByName:w,isServerInstalled:h,currentPage:m,totalPages:p,changePage:v,serversPerPage:N,changeServersPerPage:E}=H1(),[j,C]=x.useState(null),[k,R]=x.useState(""),[B,te]=x.useState(!1),[me,Z]=x.useState(!1);x.useEffect(()=>{(async()=>{if(a){const pe=await w(a);pe?C(pe):t("/market")}else C(null)})()},[a,w,t]);const oe=F=>{F.preventDefault(),f(k)},A=F=>{g(F)},_=()=>{R(""),g(""),d("")},z=F=>{t(`/market/${F.name}`)},U=()=>{t("/market")},J=async F=>{try{te(!0),await b(F)&&n(e("market.installSuccess",{serverName:F.display_name}),"success")}finally{te(!1)}},Oe=F=>{v(F),window.scrollTo({top:0,behavior:"smooth"})},Me=F=>{const pe=parseInt(F.target.value,10);E(pe)};return j?u.jsx(G1,{server:j,onBack:U,onInstall:J,installing:B,isInstalled:h(j.name)}):u.jsxs("div",{children:[u.jsx("div",{className:"flex justify-between items-center mb-8",children:u.jsx("div",{children:u.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[e("market.title"),u.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:e("pages.market.title").split(" - ")[1]})]})})}),o&&u.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("p",{children:o}),u.jsx("button",{onClick:()=>c(null),className:"text-red-700 hover:text-red-900",children:u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:u.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 011.414 0L10 8.586l4.293-4.293a1 1 01.414 1.414L11.414 10l4.293 4.293a1 1 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 01-1.414-1.414L8.586 10 4.293 5.707a1 1 010-1.414z",clipRule:"evenodd"})})})]})}),u.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:u.jsxs("form",{onSubmit:oe,className:"flex space-x-4 mb-0",children:[u.jsx("div",{className:"flex-grow",children:u.jsx("input",{type:"text",value:k,onChange:F=>R(F.target.value),placeholder:e("market.searchPlaceholder"),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"})}),u.jsx("button",{type:"submit",className:"bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded",children:e("market.search")}),(k||y||S)&&u.jsx("button",{type:"button",onClick:_,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:e("market.clearFilters")})]})}),u.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[u.jsx("div",{className:"md:w-48 flex-shrink-0",children:u.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4",children:r.length>0?u.jsxs("div",{className:"mb-6",children:[u.jsxs("div",{className:"flex justify-between items-center mb-3",children:[u.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")}),y&&u.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>g(""),children:e("market.clearCategoryFilter")})]}),u.jsx("div",{className:"flex flex-col gap-2",children:r.map(F=>u.jsx("button",{onClick:()=>A(F),className:`px-3 py-2 rounded text-sm text-left ${y===F?"bg-blue-100 text-blue-800 font-medium":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:F},F))})]}):i?u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")})}),u.jsxs("div",{className:"flex flex-col gap-2 items-center py-4",children:[u.jsxs("svg",{className:"animate-spin h-6 w-6 text-blue-500 mb-2",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-sm text-gray-600",children:e("app.loading")})]})]}):u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:e("market.categories")})}),u.jsx("p",{className:"text-sm text-gray-600 py-2",children:e("market.noCategories")})]})})}),u.jsx("div",{className:"flex-grow",children:i?u.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:u.jsxs("div",{className:"flex flex-col items-center",children:[u.jsxs("svg",{className:"animate-spin h-10 w-10 text-blue-500 mb-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),u.jsx("p",{className:"text-gray-600",children:e("app.loading")})]})}):l.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:e("market.noServers")})}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:l.map((F,pe)=>u.jsx(B1,{server:F,onClick:z},pe))}),u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("div",{className:"text-sm text-gray-500",children:e("market.showing",{from:(m-1)*N+1,to:Math.min(m*N,s.length),total:s.length})}),u.jsx(V1,{currentPage:m,totalPages:p,onPageChange:Oe}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[e("market.perPage"),":"]}),u.jsxs("select",{id:"perPage",value:N,onChange:Me,className:"border rounded p-1 text-sm",children:[u.jsx("option",{value:"6",children:"6"}),u.jsx("option",{value:"9",children:"9"}),u.jsx("option",{value:"12",children:"12"}),u.jsx("option",{value:"24",children:"24"})]})]})]}),u.jsx("div",{className:"mt-6"})]})})]})]})},q1={default:"bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-500",outline:"border border-gray-300 dark:border-gray-700 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",ghost:"bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",link:"bg-transparent underline-offset-4 hover:underline text-blue-500 hover:text-blue-600",destructive:"bg-red-500 text-white hover:bg-red-600 focus:ring-red-500"},Y1={default:"h-10 py-2 px-4",sm:"h-8 px-3 text-sm",lg:"h-12 px-6",icon:"h-10 w-10 p-0"};function $1({variant:e="default",size:t="default",className:a,disabled:n,children:l,...s}){return u.jsx("button",{className:va("rounded-md inline-flex items-center justify-center font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none",q1[e],Y1[t],a),disabled:n,...s,children:l})}const X1=({logs:e,isLoading:t=!1,error:a=null,onClear:n})=>{const{t:l}=ee(),s=x.useRef(null),[r,i]=x.useState(!0),[o,c]=x.useState(""),[f,g]=x.useState(["info","error","warn","debug"]),[d,y]=x.useState(["main","child-process"]);x.useEffect(()=>{r&&s.current&&(s.current.scrollTop=s.current.scrollHeight)},[e,r]);const S=e.filter(h=>{const m=o?h.message.toLowerCase().includes(o.toLowerCase()):!0,p=f.includes(h.type),v=d.includes(h.source);return m&&p&&v}),b=h=>new Date(h).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),w=h=>{switch(h){case"error":return"bg-red-500";case"warn":return"bg-yellow-500";case"debug":return"bg-purple-500";default:return"bg-blue-500"}};return u.jsxs("div",{className:"flex flex-col h-full",children:[u.jsxs("div",{className:"bg-card p-3 rounded-t-md border-b flex flex-wrap items-center justify-between gap-2",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("span",{className:"font-semibold text-sm",children:[l("logs.filters"),":"]}),u.jsx("input",{type:"text",placeholder:l("logs.search"),className:"px-2 py-1 text-sm border rounded",value:o,onChange:h=>c(h.target.value)}),u.jsx("div",{className:"flex gap-1 items-center",children:["info","error","warn","debug"].map(h=>u.jsx(As,{variant:f.includes(h)?"default":"outline",className:`cursor-pointer ${f.includes(h)?w(h):""}`,onClick:()=>{f.includes(h)?g(m=>m.filter(p=>p!==h)):g(m=>[...m,h])},children:h},h))}),u.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child-process"].map(h=>u.jsx(As,{variant:d.includes(h)?"default":"outline",className:"cursor-pointer",onClick:()=>{d.includes(h)?y(m=>m.filter(p=>p!==h)):y(m=>[...m,h])},children:l(h==="main"?"logs.mainProcess":"logs.childProcess")},h))})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[u.jsx("input",{type:"checkbox",checked:r,onChange:()=>i(!r),className:"form-checkbox h-4 w-4"}),l("logs.autoScroll")]}),u.jsx($1,{variant:"outline",size:"sm",onClick:n,disabled:t||e.length===0,children:l("logs.clearLogs")})]})]}),u.jsx("div",{ref:s,className:"flex-grow p-2 overflow-auto bg-card rounded-b-md font-mono text-sm",style:{maxHeight:"calc(100vh - 300px)"},children:t?u.jsx("div",{className:"flex justify-center items-center h-full",children:u.jsx("span",{children:l("logs.loading")})}):a?u.jsx("div",{className:"text-red-500 p-2",children:a.message}):S.length===0?u.jsx("div",{className:"text-center text-muted-foreground p-8",children:o||f.length<4||d.length<2?l("logs.noMatch"):l("logs.noLogs")}):S.map((h,m)=>u.jsxs("div",{className:`py-1 border-b border-gray-100 dark:border-gray-800 ${h.type==="error"?"text-red-500":h.type==="warn"?"text-yellow-500":""}`,children:[u.jsxs("span",{className:"text-gray-400",children:["[",b(h.timestamp),"]"]}),u.jsx(As,{className:`ml-2 mr-1 ${w(h.type)}`,children:h.type}),u.jsxs(As,{variant:"outline",className:"mr-2",children:[h.source==="main"?l("logs.main"):l("logs.child"),h.processId?` (${h.processId})`:""]}),u.jsx("span",{className:"whitespace-pre-wrap",children:h.message})]},`${h.timestamp}-${m}`))})]})},Q1=async()=>{try{const e=is();if(!e)throw new Error("Authentication token not found. Please log in.");const a=await(await fetch("/api/logs",{method:"DELETE",headers:{"x-auth-token":e}})).json();if(!a.success)throw new Error(a.error||"Failed to clear logs")}catch(e){throw console.error("Error clearing logs:",e),e}},K1=()=>{const[e,t]=x.useState([]),[a,n]=x.useState(!0),[l,s]=x.useState(null);return x.useEffect(()=>{let i=null,o=!0;const c=()=>{try{i&&i.close();const f=is();if(!f){s(new Error("Authentication token not found. Please log in.")),n(!1);return}i=new EventSource(`/api/logs/stream?token=${f}`),i.onmessage=g=>{if(o)try{const d=JSON.parse(g.data);d.type==="initial"?(t(d.logs),n(!1)):d.type==="log"&&t(y=>[...y,d.log])}catch(d){console.error("Error parsing SSE message:",d)}},i.onerror=()=>{o&&(i&&(i.close(),setTimeout(c,5e3)),s(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(f){if(!o)return;s(f instanceof Error?f:new Error("Failed to connect to log stream")),n(!1)}};return c(),()=>{o=!1,i&&i.close()}},[]),{logs:e,loading:a,error:l,clearLogs:async()=>{try{await Q1(),t([])}catch(i){s(i instanceof Error?i:new Error("Failed to clear logs"))}}}},Z1=()=>{const{t:e}=ee(),{logs:t,loading:a,error:n,clearLogs:l}=K1();return u.jsxs("div",{className:"container mx-auto p-4",children:[u.jsx("div",{className:"flex justify-between items-center mb-4",children:u.jsx("h1",{className:"text-2xl font-bold",children:e("pages.logs.title")})}),u.jsx("div",{className:"bg-card rounded-md shadow-sm",children:u.jsx(X1,{logs:t,isLoading:a,error:n,onClear:l})})]})};function J1(){return u.jsx(Pb,{children:u.jsx(Mv,{children:u.jsx(Jb,{children:u.jsx(xv,{children:u.jsxs(Zx,{children:[u.jsx(nt,{path:"/login",element:u.jsx(S1,{})}),u.jsx(nt,{element:u.jsx(b1,{}),children:u.jsxs(nt,{element:u.jsx(v1,{}),children:[u.jsx(nt,{path:"/",element:u.jsx(w1,{})}),u.jsx(nt,{path:"/servers",element:u.jsx(k1,{})}),u.jsx(nt,{path:"/groups",element:u.jsx(D1,{})}),u.jsx(nt,{path:"/market",element:u.jsx(Gf,{})}),u.jsx(nt,{path:"/market/:serverName",element:u.jsx(Gf,{})}),u.jsx(nt,{path:"/logs",element:u.jsx(Z1,{})}),u.jsx(nt,{path:"/settings",element:u.jsx(_1,{})})]})}),u.jsx(nt,{path:"*",element:u.jsx(fg,{to:"/"})})]})})})})})}const V=e=>typeof e=="string",rl=()=>{let e,t;const a=new Promise((n,l)=>{e=n,t=l});return a.resolve=e,a.reject=t,a},Vf=e=>e==null?"":""+e,F1=(e,t,a)=>{e.forEach(n=>{t[n]&&(a[n]=t[n])})},P1=/###/g,qf=e=>e&&e.indexOf("###")>-1?e.replace(P1,"."):e,Yf=e=>!e||V(e),Cl=(e,t,a)=>{const n=V(t)?t.split("."):t;let l=0;for(;l<n.length-1;){if(Yf(e))return{};const s=qf(n[l]);!e[s]&&a&&(e[s]=new a),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={},++l}return Yf(e)?{}:{obj:e,k:qf(n[l])}},$f=(e,t,a)=>{const{obj:n,k:l}=Cl(e,t,Object);if(n!==void 0||t.length===1){n[l]=a;return}let s=t[t.length-1],r=t.slice(0,t.length-1),i=Cl(e,r,Object);for(;i.obj===void 0&&r.length;)s=`${r[r.length-1]}.${s}`,r=r.slice(0,r.length-1),i=Cl(e,r,Object),i!=null&&i.obj&&typeof i.obj[`${i.k}.${s}`]<"u"&&(i.obj=void 0);i.obj[`${i.k}.${s}`]=a},W1=(e,t,a,n)=>{const{obj:l,k:s}=Cl(e,t,Object);l[s]=l[s]||[],l[s].push(a)},wr=(e,t)=>{const{obj:a,k:n}=Cl(e,t);if(a&&Object.prototype.hasOwnProperty.call(a,n))return a[n]},I1=(e,t,a)=>{const n=wr(e,a);return n!==void 0?n:wr(t,a)},Yg=(e,t,a)=>{for(const n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?V(e[n])||e[n]instanceof String||V(t[n])||t[n]instanceof String?a&&(e[n]=t[n]):Yg(e[n],t[n],a):e[n]=t[n]);return e},Fa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var e2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const t2=e=>V(e)?e.replace(/[&<>"'\/]/g,t=>e2[t]):e;class a2{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const a=this.regExpMap.get(t);if(a!==void 0)return a;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}const n2=[" ",",","?","!",";"],l2=new a2(20),s2=(e,t,a)=>{t=t||"",a=a||"";const n=n2.filter(r=>t.indexOf(r)<0&&a.indexOf(r)<0);if(n.length===0)return!0;const l=l2.getRegExp(`(${n.map(r=>r==="?"?"\\?":r).join("|")})`);let s=!l.test(e);if(!s){const r=e.indexOf(a);r>0&&!l.test(e.substring(0,r))&&(s=!0)}return s},Go=function(e,t){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const n=t.split(a);let l=e;for(let s=0;s<n.length;){if(!l||typeof l!="object")return;let r,i="";for(let o=s;o<n.length;++o)if(o!==s&&(i+=a),i+=n[o],r=l[i],r!==void 0){if(["string","number","boolean"].indexOf(typeof r)>-1&&o<n.length-1)continue;s+=o-s+1;break}l=r}return l},Nr=e=>e==null?void 0:e.replace("_","-"),r2={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var a,n;(n=(a=console==null?void 0:console[e])==null?void 0:a.apply)==null||n.call(a,console,t)}};class jr{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,a)}init(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=t||r2,this.options=a,this.debug=a.debug}log(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"log","",!0)}warn(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"warn","",!0)}error(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"error","")}deprecate(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return this.forward(a,"warn","WARNING DEPRECATED: ",!0)}forward(t,a,n,l){return l&&!this.debug?null:(V(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[a](t))}create(t){return new jr(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new jr(this.logger,t)}}var jt=new jr;class Zr{constructor(){this.observers={}}on(t,a){return t.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const l=this.observers[n].get(a)||0;this.observers[n].set(a,l+1)}),this}off(t,a){if(this.observers[t]){if(!a){delete this.observers[t];return}this.observers[t].delete(a)}}emit(t){for(var a=arguments.length,n=new Array(a>1?a-1:0),l=1;l<a;l++)n[l-1]=arguments[l];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(r=>{let[i,o]=r;for(let c=0;c<o;c++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(r=>{let[i,o]=r;for(let c=0;c<o;c++)i.apply(i,[t,...n])})}}class Xf extends Zr{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const a=this.options.ns.indexOf(t);a>-1&&this.options.ns.splice(a,1)}getResource(t,a,n){var c,f;let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,r=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let i;t.indexOf(".")>-1?i=t.split("."):(i=[t,a],n&&(Array.isArray(n)?i.push(...n):V(n)&&s?i.push(...n.split(s)):i.push(n)));const o=wr(this.data,i);return!o&&!a&&!n&&t.indexOf(".")>-1&&(t=i[0],a=i[1],n=i.slice(2).join(".")),o||!r||!V(n)?o:Go((f=(c=this.data)==null?void 0:c[t])==null?void 0:f[a],n,s)}addResource(t,a,n,l){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const r=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let i=[t,a];n&&(i=i.concat(r?n.split(r):n)),t.indexOf(".")>-1&&(i=t.split("."),l=a,a=i[1]),this.addNamespaces(a),$f(this.data,i,l),s.silent||this.emit("added",t,a,n,l)}addResources(t,a,n){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(V(n[s])||Array.isArray(n[s]))&&this.addResource(t,a,s,n[s],{silent:!0});l.silent||this.emit("added",t,a,n)}addResourceBundle(t,a,n,l,s){let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},i=[t,a];t.indexOf(".")>-1&&(i=t.split("."),l=n,n=a,a=i[1]),this.addNamespaces(a);let o=wr(this.data,i)||{};r.skipCopy||(n=JSON.parse(JSON.stringify(n))),l?Yg(o,n,s):o={...o,...n},$f(this.data,i,o),r.silent||this.emit("added",t,a,n)}removeResourceBundle(t,a){this.hasResourceBundle(t,a)&&delete this.data[t][a],this.removeNamespaces(a),this.emit("removed",t,a)}hasResourceBundle(t,a){return this.getResource(t,a)!==void 0}getResourceBundle(t,a){return a||(a=this.options.defaultNS),this.getResource(t,a)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const a=this.getDataByLanguage(t);return!!(a&&Object.keys(a)||[]).find(l=>a[l]&&Object.keys(a[l]).length>0)}toJSON(){return this.data}}var $g={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,a,n,l){return e.forEach(s=>{var r;t=((r=this.processors[s])==null?void 0:r.process(t,a,n,l))??t}),t}};const Qf={},Kf=e=>!V(e)&&typeof e!="boolean"&&typeof e!="number";class Er extends Zr{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),F1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=jt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const n=this.resolve(t,a);return(n==null?void 0:n.res)!==void 0}extractFromKey(t,a){let n=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=a.ns||this.options.defaultNS||[];const r=n&&t.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!s2(t,n,l);if(r&&!i){const o=t.match(this.interpolator.nestingRegexp);if(o&&o.length>0)return{key:t,namespaces:V(s)?[s]:s};const c=t.split(n);(n!==l||n===l&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),t=c.join(l)}return{key:t,namespaces:V(s)?[s]:s}}translate(t,a,n){if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:r,namespaces:i}=this.extractFromKey(t[t.length-1],a),o=i[i.length-1],c=a.lng||this.language,f=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(f){const B=a.nsSeparator||this.options.nsSeparator;return l?{res:`${o}${B}${r}`,usedKey:r,exactUsedKey:r,usedLng:c,usedNS:o,usedParams:this.getUsedParamsDetails(a)}:`${o}${B}${r}`}return l?{res:r,usedKey:r,exactUsedKey:r,usedLng:c,usedNS:o,usedParams:this.getUsedParamsDetails(a)}:r}const g=this.resolve(t,a);let d=g==null?void 0:g.res;const y=(g==null?void 0:g.usedKey)||r,S=(g==null?void 0:g.exactUsedKey)||r,b=["[object Number]","[object Function]","[object RegExp]"],w=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,h=!this.i18nFormat||this.i18nFormat.handleAsObject,m=a.count!==void 0&&!V(a.count),p=Er.hasDefaultValue(a),v=m?this.pluralResolver.getSuffix(c,a.count,a):"",N=a.ordinal&&m?this.pluralResolver.getSuffix(c,a.count,{ordinal:!1}):"",E=m&&!a.ordinal&&a.count===0,j=E&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${v}`]||a[`defaultValue${N}`]||a.defaultValue;let C=d;h&&!d&&p&&(C=j);const k=Kf(C),R=Object.prototype.toString.apply(C);if(h&&C&&k&&b.indexOf(R)<0&&!(V(w)&&Array.isArray(C))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const B=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,C,{...a,ns:i}):`key '${r} (${this.language})' returned an object instead of string.`;return l?(g.res=B,g.usedParams=this.getUsedParamsDetails(a),g):B}if(s){const B=Array.isArray(C),te=B?[]:{},me=B?S:y;for(const Z in C)if(Object.prototype.hasOwnProperty.call(C,Z)){const oe=`${me}${s}${Z}`;p&&!d?te[Z]=this.translate(oe,{...a,defaultValue:Kf(j)?j[Z]:void 0,joinArrays:!1,ns:i}):te[Z]=this.translate(oe,{...a,joinArrays:!1,ns:i}),te[Z]===oe&&(te[Z]=C[Z])}d=te}}else if(h&&V(w)&&Array.isArray(d))d=d.join(w),d&&(d=this.extendTranslation(d,t,a,n));else{let B=!1,te=!1;!this.isValidLookup(d)&&p&&(B=!0,d=j),this.isValidLookup(d)||(te=!0,d=r);const Z=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&te?void 0:d,oe=p&&j!==d&&this.options.updateMissing;if(te||B||oe){if(this.logger.log(oe?"updateKey":"missingKey",c,o,r,oe?j:d),s){const U=this.resolve(r,{...a,keySeparator:!1});U&&U.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let A=[];const _=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&_&&_[0])for(let U=0;U<_.length;U++)A.push(_[U]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(a.lng||this.language):A.push(a.lng||this.language);const z=(U,J,Oe)=>{var F;const Me=p&&Oe!==d?Oe:Z;this.options.missingKeyHandler?this.options.missingKeyHandler(U,o,J,Me,oe,a):(F=this.backendConnector)!=null&&F.saveMissing&&this.backendConnector.saveMissing(U,o,J,Me,oe,a),this.emit("missingKey",U,o,J,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&m?A.forEach(U=>{const J=this.pluralResolver.getSuffixes(U,a);E&&a[`defaultValue${this.options.pluralSeparator}zero`]&&J.indexOf(`${this.options.pluralSeparator}zero`)<0&&J.push(`${this.options.pluralSeparator}zero`),J.forEach(Oe=>{z([U],r+Oe,a[`defaultValue${Oe}`]||j)})}):z(A,r,j))}d=this.extendTranslation(d,t,a,g,n),te&&d===r&&this.options.appendNamespaceToMissingKey&&(d=`${o}:${r}`),(te||B)&&this.options.parseMissingKeyHandler&&(d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${o}:${r}`:r,B?d:void 0))}return l?(g.res=d,g.usedParams=this.getUsedParamsDetails(a),g):d}extendTranslation(t,a,n,l,s){var c,f;var r=this;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||l.usedLng,l.usedNS,l.usedKey,{resolved:l});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const g=V(t)&&(((f=n==null?void 0:n.interpolation)==null?void 0:f.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(g){const S=t.match(this.interpolator.nestingRegexp);d=S&&S.length}let y=n.replace&&!V(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),t=this.interpolator.interpolate(t,y,n.lng||this.language||l.usedLng,n),g){const S=t.match(this.interpolator.nestingRegexp),b=S&&S.length;d<b&&(n.nest=!1)}!n.lng&&l&&l.res&&(n.lng=this.language||l.usedLng),n.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var S=arguments.length,b=new Array(S),w=0;w<S;w++)b[w]=arguments[w];return(s==null?void 0:s[0])===b[0]&&!n.context?(r.logger.warn(`It seems you are nesting recursively key: ${b[0]} in key: ${a[0]}`),null):r.translate(...b,a)},n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,o=V(i)?[i]:i;return t!=null&&(o!=null&&o.length)&&n.applyPostProcessor!==!1&&(t=$g.handle(o,t,a,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...l,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,l,s,r,i;return V(t)&&(t=[t]),t.forEach(o=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(o,a),f=c.key;l=f;let g=c.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const d=a.count!==void 0&&!V(a.count),y=d&&!a.ordinal&&a.count===0,S=a.context!==void 0&&(V(a.context)||typeof a.context=="number")&&a.context!=="",b=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);g.forEach(w=>{var h,m;this.isValidLookup(n)||(i=w,!Qf[`${b[0]}-${w}`]&&((h=this.utils)!=null&&h.hasLoadedNamespace)&&!((m=this.utils)!=null&&m.hasLoadedNamespace(i))&&(Qf[`${b[0]}-${w}`]=!0,this.logger.warn(`key "${l}" for languages "${b.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(p=>{var E;if(this.isValidLookup(n))return;r=p;const v=[f];if((E=this.i18nFormat)!=null&&E.addLookupKeys)this.i18nFormat.addLookupKeys(v,f,p,w,a);else{let j;d&&(j=this.pluralResolver.getSuffix(p,a.count,a));const C=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(f+j),a.ordinal&&j.indexOf(k)===0&&v.push(f+j.replace(k,this.options.pluralSeparator)),y&&v.push(f+C)),S){const R=`${f}${this.options.contextSeparator}${a.context}`;v.push(R),d&&(v.push(R+j),a.ordinal&&j.indexOf(k)===0&&v.push(R+j.replace(k,this.options.pluralSeparator)),y&&v.push(R+C))}}let N;for(;N=v.pop();)this.isValidLookup(n)||(s=N,n=this.getResource(p,w,N,a))}))})}),{res:n,usedKey:l,exactUsedKey:s,usedLng:r,usedNS:i}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,a,n){var s;let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,a,n,l):this.resourceStore.getResource(t,a,n,l)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!V(t.replace);let l=n?t.replace:t;if(n&&typeof t.count<"u"&&(l.count=t.count),this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),!n){l={...l};for(const s of a)delete l[s]}return l}static hasDefaultValue(t){const a="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&a===n.substring(0,a.length)&&t[n]!==void 0)return!0;return!1}}class Zf{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=jt.create("languageUtils")}getScriptPartFromCode(t){if(t=Nr(t),!t||t.indexOf("-")<0)return null;const a=t.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(t){if(t=Nr(t),!t||t.indexOf("-")<0)return t;const a=t.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(t){if(V(t)&&t.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(t)[0]}catch{}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let a;return t.forEach(n=>{if(a)return;const l=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(l))&&(a=l)}),!a&&this.options.supportedLngs&&t.forEach(n=>{if(a)return;const l=this.getLanguagePartFromCode(n);if(this.isSupportedCode(l))return a=l;a=this.options.supportedLngs.find(s=>{if(s===l)return s;if(!(s.indexOf("-")<0&&l.indexOf("-")<0)&&(s.indexOf("-")>0&&l.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===l||s.indexOf(l)===0&&l.length>1))return s})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(t,a){if(!t)return[];if(typeof t=="function"&&(t=t(a)),V(t)&&(t=[t]),Array.isArray(t))return t;if(!a)return t.default||[];let n=t[a];return n||(n=t[this.getScriptPartFromCode(a)]),n||(n=t[this.formatLanguageCode(a)]),n||(n=t[this.getLanguagePartFromCode(a)]),n||(n=t.default),n||[]}toResolveHierarchy(t,a){const n=this.getFallbackCodes(a||this.options.fallbackLng||[],t),l=[],s=r=>{r&&(this.isSupportedCode(r)?l.push(r):this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`))};return V(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(t))):V(t)&&s(this.formatLanguageCode(t)),n.forEach(r=>{l.indexOf(r)<0&&s(this.formatLanguageCode(r))}),l}}const Jf={zero:0,one:1,two:2,few:3,many:4,other:5},Ff={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class i2{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=a,this.logger=jt.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,a){this.rules[t]=a}clearCache(){this.pluralRulesCache={}}getRule(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=Nr(t==="dev"?"en":t),l=a.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:l});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let r;try{r=new Intl.PluralRules(n,{type:l})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Ff;if(!t.match(/-|_/))return Ff;const o=this.languageUtils.getLanguagePartFromCode(t);r=this.getRule(o,a)}return this.pluralRulesCache[s]=r,r}needsPlural(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,a);return n||(n=this.getRule("dev",a)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,n).map(l=>`${a}${l}`)}getSuffixes(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(t,a);return n||(n=this.getRule("dev",a)),n?n.resolvedOptions().pluralCategories.sort((l,s)=>Jf[l]-Jf[s]).map(l=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const l=this.getRule(t,n);return l?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${l.select(a)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",a,n))}}const Pf=function(e,t,a){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=I1(e,t,a);return!s&&l&&V(a)&&(s=Go(e,a,n),s===void 0&&(s=Go(t,a,n))),s},zi=e=>e.replace(/\$/g,"$$$$");class o2{constructor(){var a;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jt.create("interpolator"),this.options=t,this.format=((a=t==null?void 0:t.interpolation)==null?void 0:a.format)||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:a,escapeValue:n,useRawValueToEscape:l,prefix:s,prefixEscaped:r,suffix:i,suffixEscaped:o,formatSeparator:c,unescapeSuffix:f,unescapePrefix:g,nestingPrefix:d,nestingPrefixEscaped:y,nestingSuffix:S,nestingSuffixEscaped:b,nestingOptionsSeparator:w,maxReplaces:h,alwaysFormat:m}=t.interpolation;this.escape=a!==void 0?a:t2,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=s?Fa(s):r||"{{",this.suffix=i?Fa(i):o||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?Fa(d):y||Fa("$t("),this.nestingSuffix=S?Fa(S):b||Fa(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=h||1e3,this.alwaysFormat=m!==void 0?m:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(a,n)=>(a==null?void 0:a.source)===n?(a.lastIndex=0,a):new RegExp(n,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,a,n,l){var y;let s,r,i;const o=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=S=>{if(S.indexOf(this.formatSeparator)<0){const m=Pf(a,o,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,n,{...l,...a,interpolationkey:S}):m}const b=S.split(this.formatSeparator),w=b.shift().trim(),h=b.join(this.formatSeparator).trim();return this.format(Pf(a,o,w,this.options.keySeparator,this.options.ignoreJSONStructure),h,n,{...l,...a,interpolationkey:w})};this.resetRegExp();const f=(l==null?void 0:l.missingInterpolationHandler)||this.options.missingInterpolationHandler,g=((y=l==null?void 0:l.interpolation)==null?void 0:y.skipOnVariables)!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>zi(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?zi(this.escape(S)):zi(S)}].forEach(S=>{for(i=0;s=S.regex.exec(t);){const b=s[1].trim();if(r=c(b),r===void 0)if(typeof f=="function"){const h=f(t,s,l);r=V(h)?h:""}else if(l&&Object.prototype.hasOwnProperty.call(l,b))r="";else if(g){r=s[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),r="";else!V(r)&&!this.useRawValueToEscape&&(r=Vf(r));const w=S.safeValue(r);if(t=t.replace(s[0],w),g?(S.regex.lastIndex+=r.length,S.regex.lastIndex-=s[0].length):S.regex.lastIndex=0,i++,i>=this.maxReplaces)break}}),t}nest(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l,s,r;const i=(o,c)=>{const f=this.nestingOptionsSeparator;if(o.indexOf(f)<0)return o;const g=o.split(new RegExp(`${f}[ ]*{`));let d=`{${g[1]}`;o=g[0],d=this.interpolate(d,r);const y=d.match(/'/g),S=d.match(/"/g);(((y==null?void 0:y.length)??0)%2===0&&!S||S.length%2!==0)&&(d=d.replace(/'/g,'"'));try{r=JSON.parse(d),c&&(r={...c,...r})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${o}`,b),`${o}${f}${d}`}return r.defaultValue&&r.defaultValue.indexOf(this.prefix)>-1&&delete r.defaultValue,o};for(;l=this.nestingRegexp.exec(t);){let o=[];r={...n},r=r.replace&&!V(r.replace)?r.replace:r,r.applyPostProcessor=!1,delete r.defaultValue;let c=!1;if(l[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(l[1])){const f=l[1].split(this.formatSeparator).map(g=>g.trim());l[1]=f.shift(),o=f,c=!0}if(s=a(i.call(this,l[1].trim(),r),r),s&&l[0]===t&&!V(s))return s;V(s)||(s=Vf(s)),s||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${t}`),s=""),c&&(s=o.reduce((f,g)=>this.format(f,g,n.lng,{...n,interpolationkey:l[1].trim()}),s.trim())),t=t.replace(l[0],s),this.regexp.lastIndex=0}return t}}const u2=e=>{let t=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const l=n[1].substring(0,n[1].length-1);t==="currency"&&l.indexOf(":")<0?a.currency||(a.currency=l.trim()):t==="relativetime"&&l.indexOf(":")<0?a.range||(a.range=l.trim()):l.split(";").forEach(r=>{if(r){const[i,...o]=r.split(":"),c=o.join(":").trim().replace(/^'+|'+$/g,""),f=i.trim();a[f]||(a[f]=c),c==="false"&&(a[f]=!1),c==="true"&&(a[f]=!0),isNaN(c)||(a[f]=parseInt(c,10))}})}return{formatName:t,formatOptions:a}},Pa=e=>{const t={};return(a,n,l)=>{let s=l;l&&l.interpolationkey&&l.formatParams&&l.formatParams[l.interpolationkey]&&l[l.interpolationkey]&&(s={...s,[l.interpolationkey]:void 0});const r=n+JSON.stringify(s);let i=t[r];return i||(i=e(Nr(n),l),t[r]=i),i(a)}};class c2{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=jt.create("formatter"),this.options=t,this.formats={number:Pa((a,n)=>{const l=new Intl.NumberFormat(a,{...n});return s=>l.format(s)}),currency:Pa((a,n)=>{const l=new Intl.NumberFormat(a,{...n,style:"currency"});return s=>l.format(s)}),datetime:Pa((a,n)=>{const l=new Intl.DateTimeFormat(a,{...n});return s=>l.format(s)}),relativetime:Pa((a,n)=>{const l=new Intl.RelativeTimeFormat(a,{...n});return s=>l.format(s,n.range||"day")}),list:Pa((a,n)=>{const l=new Intl.ListFormat(a,{...n});return s=>l.format(s)})},this.init(t)}init(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=a.interpolation.formatSeparator||","}add(t,a){this.formats[t.toLowerCase().trim()]=a}addCached(t,a){this.formats[t.toLowerCase().trim()]=Pa(a)}format(t,a,n){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=a.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(i=>i.indexOf(")")>-1)){const i=s.findIndex(o=>o.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,i)].join(this.formatSeparator)}return s.reduce((i,o)=>{var g;const{formatName:c,formatOptions:f}=u2(o);if(this.formats[c]){let d=i;try{const y=((g=l==null?void 0:l.formatParams)==null?void 0:g[l.interpolationkey])||{},S=y.locale||y.lng||l.locale||l.lng||n;d=this.formats[c](i,S,{...f,...l,...y})}catch(y){this.logger.warn(y)}return d}else this.logger.warn(`there was no format function for ${c}`);return i},t)}}const f2=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class d2 extends Zr{constructor(t,a,n){var s,r;let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=a,this.services=n,this.languageUtils=n.languageUtils,this.options=l,this.logger=jt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],(r=(s=this.backend)==null?void 0:s.init)==null||r.call(s,n,l.backend,l)}queueLoad(t,a,n,l){const s={},r={},i={},o={};return t.forEach(c=>{let f=!0;a.forEach(g=>{const d=`${c}|${g}`;!n.reload&&this.store.hasResourceBundle(c,g)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?r[d]===void 0&&(r[d]=!0):(this.state[d]=1,f=!1,r[d]===void 0&&(r[d]=!0),s[d]===void 0&&(s[d]=!0),o[g]===void 0&&(o[g]=!0)))}),f||(i[c]=!0)}),(Object.keys(s).length||Object.keys(r).length)&&this.queue.push({pending:r,pendingCount:Object.keys(r).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(s),pending:Object.keys(r),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(o)}}loaded(t,a,n){const l=t.split("|"),s=l[0],r=l[1];a&&this.emit("failedLoading",s,r,a),!a&&n&&this.store.addResourceBundle(s,r,n,void 0,void 0,{skipCopy:!0}),this.state[t]=a?-1:2,a&&n&&(this.state[t]=0);const i={};this.queue.forEach(o=>{W1(o.loaded,[s],r),f2(o,t),a&&o.errors.push(a),o.pendingCount===0&&!o.done&&(Object.keys(o.loaded).forEach(c=>{i[c]||(i[c]={});const f=o.loaded[c];f.length&&f.forEach(g=>{i[c][g]===void 0&&(i[c][g]=!0)})}),o.done=!0,o.errors.length?o.callback(o.errors):o.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(o=>!o.done)}read(t,a,n){let l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,r=arguments.length>5?arguments[5]:void 0;if(!t.length)return r(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:a,fcName:n,tried:l,wait:s,callback:r});return}this.readingCalls++;const i=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(c&&f&&l<this.maxRetries){setTimeout(()=>{this.read.call(this,t,a,n,l+1,s*2,r)},s);return}r(c,f)},o=this.backend[n].bind(this.backend);if(o.length===2){try{const c=o(t,a);c&&typeof c.then=="function"?c.then(f=>i(null,f)).catch(i):i(null,c)}catch(c){i(c)}return}return o(t,a,i)}prepareLoading(t,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();V(t)&&(t=this.languageUtils.toResolveHierarchy(t)),V(a)&&(a=[a]);const s=this.queueLoad(t,a,n,l);if(!s.toLoad.length)return s.pending.length||l(),null;s.toLoad.forEach(r=>{this.loadOne(r)})}load(t,a,n){this.prepareLoading(t,a,{},n)}reload(t,a,n){this.prepareLoading(t,a,{reload:!0},n)}loadOne(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=t.split("|"),l=n[0],s=n[1];this.read(l,s,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${a}loading namespace ${s} for language ${l} failed`,r),!r&&i&&this.logger.log(`${a}loaded namespace ${s} for language ${l}`,i),this.loaded(t,r,i)})}saveMissing(t,a,n,l,s){var o,c,f,g,d;let r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},i=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(o=this.services)==null?void 0:o.utils)!=null&&c.hasLoadedNamespace&&!((g=(f=this.services)==null?void 0:f.utils)!=null&&g.hasLoadedNamespace(a))){this.logger.warn(`did not save key "${n}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((d=this.backend)!=null&&d.create){const y={...r,isUpdate:s},S=this.backend.create.bind(this.backend);if(S.length<6)try{let b;S.length===5?b=S(t,a,n,l,y):b=S(t,a,n,l),b&&typeof b.then=="function"?b.then(w=>i(null,w)).catch(i):i(null,b)}catch(b){i(b)}else S(t,a,n,l,i,y)}!t||!t[0]||this.store.addResource(t[0],a,n,l)}}}const Wf=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),V(e[1])&&(t.defaultValue=e[1]),V(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(n=>{t[n]=a[n]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),If=e=>{var t,a;return V(e.ns)&&(e.ns=[e.ns]),V(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),V(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((a=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:a.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},ks=()=>{},h2=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class ql extends Zr{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(super(),this.options=If(t),this.services={},this.logger=jt,this.modules={external:[]},h2(this),a&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,a),this;setTimeout(()=>{this.init(t,a)},0)}}init(){var t=this;let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof a=="function"&&(n=a,a={}),a.defaultNS==null&&a.ns&&(V(a.ns)?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));const l=Wf();this.options={...l,...this.options,...If(a)},this.options.interpolation={...l.interpolation,...this.options.interpolation},a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);const s=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?jt.init(s(this.modules.logger),this.options):jt.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=c2;const g=new Zf(this.options);this.store=new Xf(this.options.resources,this.options);const d=this.services;d.logger=jt,d.resourceStore=this.store,d.languageUtils=g,d.pluralResolver=new i2(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===l.interpolation.format)&&(d.formatter=s(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new o2(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new d2(s(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(y){for(var S=arguments.length,b=new Array(S>1?S-1:0),w=1;w<S;w++)b[w-1]=arguments[w];t.emit(y,...b)}),this.modules.languageDetector&&(d.languageDetector=s(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=s(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Er(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,b=new Array(S>1?S-1:0),w=1;w<S;w++)b[w-1]=arguments[w];t.emit(y,...b)}),this.modules.external.forEach(y=>{y.init&&y.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ks),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const o=rl(),c=()=>{const f=(g,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(g,d)};if(this.languages&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),o}loadResources(t){var s,r;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ks;const l=V(t)?t:this.language;if(typeof t=="function"&&(n=t),!this.options.resources||this.options.partialBundledLanguages){if((l==null?void 0:l.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const i=[],o=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(g=>{g!=="cimode"&&i.indexOf(g)<0&&i.push(g)})};l?o(l):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>o(f)),(r=(s=this.options.preload)==null?void 0:s.forEach)==null||r.call(s,c=>o(c)),this.services.backendConnector.load(i,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(t,a,n){const l=rl();return typeof t=="function"&&(n=t,t=void 0),typeof a=="function"&&(n=a,a=void 0),t||(t=this.languages),a||(a=this.options.ns),n||(n=ks),this.services.backendConnector.reload(t,a,s=>{l.resolve(),n(s)}),l}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&$g.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let a=0;a<this.languages.length;a++){const n=this.languages[a];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(t,a){var n=this;this.isLanguageChangingTo=t;const l=rl();this.emit("languageChanging",t);const s=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},r=(o,c)=>{c?(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,l.resolve(function(){return n.t(...arguments)}),a&&a(o,function(){return n.t(...arguments)})},i=o=>{var f,g;!t&&!o&&this.services.languageDetector&&(o=[]);const c=V(o)?o:this.services.languageUtils.getBestMatchFromCodes(o);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(g=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||g.call(f,c)),this.loadResources(c,d=>{r(d,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(t),l}getFixedT(t,a,n){var l=this;const s=function(r,i){let o;if(typeof i!="object"){for(var c=arguments.length,f=new Array(c>2?c-2:0),g=2;g<c;g++)f[g-2]=arguments[g];o=l.options.overloadTranslationOptionHandler([r,i].concat(f))}else o={...i};o.lng=o.lng||s.lng,o.lngs=o.lngs||s.lngs,o.ns=o.ns||s.ns,o.keyPrefix!==""&&(o.keyPrefix=o.keyPrefix||n||s.keyPrefix);const d=l.options.keySeparator||".";let y;return o.keyPrefix&&Array.isArray(r)?y=r.map(S=>`${o.keyPrefix}${d}${S}`):y=o.keyPrefix?`${o.keyPrefix}${d}${r}`:r,l.t(y,o)};return V(t)?s.lng=t:s.lngs=t,s.ns=a,s.keyPrefix=n,s}t(){var l;for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return(l=this.translator)==null?void 0:l.translate(...a)}exists(){var l;for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return(l=this.translator)==null?void 0:l.exists(...a)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=a.lng||this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const r=(i,o)=>{const c=this.services.backendConnector.state[`${i}|${o}`];return c===-1||c===0||c===2};if(a.precheck){const i=a.precheck(this,r);if(i!==void 0)return i}return!!(this.hasResourceBundle(n,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||r(n,t)&&(!l||r(s,t)))}loadNamespaces(t,a){const n=rl();return this.options.ns?(V(t)&&(t=[t]),t.forEach(l=>{this.options.ns.indexOf(l)<0&&this.options.ns.push(l)}),this.loadResources(l=>{n.resolve(),a&&a(l)}),n):(a&&a(),Promise.resolve())}loadLanguages(t,a){const n=rl();V(t)&&(t=[t]);const l=this.options.preload||[],s=t.filter(r=>l.indexOf(r)<0&&this.services.languageUtils.isSupportedCode(r));return s.length?(this.options.preload=l.concat(s),this.loadResources(r=>{n.resolve(),a&&a(r)}),n):(a&&a(),Promise.resolve())}dir(t){var l,s;if(t||(t=this.resolvedLanguage||(((l=this.languages)==null?void 0:l.length)>0?this.languages[0]:this.language)),!t)return"rtl";const a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new Zf(Wf());return a.indexOf(n.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return new ql(t,a)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ks;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const l={...this.options,...t,isClone:!0},s=new ql(l);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(i=>{s[i]=this[i]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const i=Object.keys(this.store.data).reduce((o,c)=>(o[c]={...this.store.data[c]},Object.keys(o[c]).reduce((f,g)=>(f[g]={...o[c][g]},f),{})),{});s.store=new Xf(i,l),s.services.resourceStore=s.store}return s.translator=new Er(s.services,l),s.translator.on("*",function(i){for(var o=arguments.length,c=new Array(o>1?o-1:0),f=1;f<o;f++)c[f-1]=arguments[f];s.emit(i,...c)}),s.init(l,a),s.translator.options=l,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const He=ql.createInstance();He.createInstance=ql.createInstance;He.createInstance;He.dir;He.init;He.loadResources;He.reloadResources;He.use;He.changeLanguage;He.getFixedT;He.t;He.exists;He.setDefaultNamespace;He.hasLoadedNamespace;He.loadNamespaces;He.loadLanguages;const{slice:m2,forEach:g2}=[];function p2(e){return g2.call(m2.call(arguments,1),t=>{if(t)for(const a in t)e[a]===void 0&&(e[a]=t[a])}),e}const ed=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,y2=function(e,t){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},l=encodeURIComponent(t);let s=`${e}=${l}`;if(n.maxAge>0){const r=n.maxAge-0;if(Number.isNaN(r))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(r)}`}if(n.domain){if(!ed.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!ed.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},td={create(e,t,a,n){let l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};a&&(l.expires=new Date,l.expires.setTime(l.expires.getTime()+a*60*1e3)),n&&(l.domain=n),document.cookie=y2(e,encodeURIComponent(t),l)},read(e){const t=`${e}=`,a=document.cookie.split(";");for(let n=0;n<a.length;n++){let l=a[n];for(;l.charAt(0)===" ";)l=l.substring(1,l.length);if(l.indexOf(t)===0)return l.substring(t.length,l.length)}return null},remove(e){this.create(e,"",-1)}};var x2={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return td.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:a,cookieMinutes:n,cookieDomain:l,cookieOptions:s}=t;a&&typeof document<"u"&&td.create(a,e,n,l,s)}},v2={name:"querystring",lookup(e){var n;let{lookupQuerystring:t}=e,a;if(typeof window<"u"){let{search:l}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(l=window.location.hash.substring(window.location.hash.indexOf("?")));const r=l.substring(1).split("&");for(let i=0;i<r.length;i++){const o=r[i].indexOf("=");o>0&&r[i].substring(0,o)===t&&(a=r[i].substring(o+1))}}return a}};let Wa=null;const ad=()=>{if(Wa!==null)return Wa;try{if(Wa=typeof window<"u"&&window.localStorage!==null,!Wa)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Wa=!1}return Wa};var b2={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&ad())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:a}=t;a&&ad()&&window.localStorage.setItem(a,e)}};let Ia=null;const nd=()=>{if(Ia!==null)return Ia;try{if(Ia=typeof window<"u"&&window.sessionStorage!==null,!Ia)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ia=!1}return Ia};var S2={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&nd())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:a}=t;a&&nd()&&window.sessionStorage.setItem(a,e)}},w2={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:a,userLanguage:n,language:l}=navigator;if(a)for(let s=0;s<a.length;s++)t.push(a[s]);n&&t.push(n),l&&t.push(l)}return t.length>0?t:void 0}},N2={name:"htmlTag",lookup(e){let{htmlTag:t}=e,a;const n=t||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(a=n.getAttribute("lang")),a}},j2={name:"path",lookup(e){var l;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(l=a[typeof t=="number"?t:0])==null?void 0:l.replace("/",""):void 0}},E2={name:"subdomain",lookup(e){var l,s;let{lookupFromSubdomainIndex:t}=e;const a=typeof t=="number"?t+1:1,n=typeof window<"u"&&((s=(l=window.location)==null?void 0:l.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[a]}};let Xg=!1;try{document.cookie,Xg=!0}catch{}const Qg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Xg||Qg.splice(1,1);const C2=()=>({order:Qg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class Kg{constructor(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,a)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=p2(a,this.options||{},C2()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=l=>l.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(x2),this.addDetector(v2),this.addDetector(b2),this.addDetector(S2),this.addDetector(w2),this.addDetector(N2),this.addDetector(j2),this.addDetector(E2)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,a=[];return t.forEach(n=>{if(this.detectors[n]){let l=this.detectors[n].lookup(this.options);l&&typeof l=="string"&&(l=[l]),l&&(a=a.concat(l))}}),a=a.map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}cacheUserLanguage(t){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;a&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||a.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(t,this.options)}))}}Kg.type="languageDetector";const T2={title:"MCP Hub Dashboard",error:"Error",closeButton:"Close",noServers:"No MCP servers available",loading:"Loading...",logout:"Logout",profile:"Profile",changePassword:"Change Password",toggleSidebar:"Toggle Sidebar",welcomeUser:"Welcome, {{username}}",name:"MCP Hub"},A2={title:"About",versionInfo:"MCP Hub Version: {{version}}",newVersion:"New version available!",currentVersion:"Current version"},k2={viewProfile:"View profile",userCenter:"User Center"},R2={title:"Theme",light:"Light",dark:"Dark",system:"System"},O2={login:"Login",loginTitle:"Login to MCP Hub",username:"Username",password:"Password",loggingIn:"Logging in...",emptyFields:"Username and password cannot be empty",loginFailed:"Login failed, please check your username and password",loginError:"An error occurred during login",currentPassword:"Current Password",newPassword:"New Password",confirmPassword:"Confirm Password",passwordsNotMatch:"New password and confirmation do not match",changePasswordSuccess:"Password changed successfully",changePasswordError:"Failed to change password",changePassword:"Change Password",passwordChanged:"Password changed successfully",passwordChangeError:"Failed to change password"},M2={addServer:"Add Server",add:"Add",edit:"Edit",delete:"Delete",confirmDelete:"Are you sure you want to delete this server?",deleteWarning:"Deleting server '{{name}}' will remove it and all its data. This action cannot be undone.",status:"Status",tools:"Tools",name:"Server Name",url:"Server URL",apiKey:"API Key",save:"Save",cancel:"Cancel",invalidConfig:"Could not find configuration data for {{serverName}}",addError:"Failed to add server",editError:"Failed to edit server {{serverName}}",deleteError:"Failed to delete server {{serverName}}",updateError:"Failed to update server",editTitle:"Edit Server: {{serverName}}",type:"Server Type",command:"Command",arguments:"Arguments",envVars:"Environment Variables",key:"key",value:"value",enabled:"Enabled",enable:"Enable",disable:"Disable",remove:"Remove",toggleError:"Failed to toggle server {{serverName}}",alreadyExists:"Server {{serverName}} already exists",invalidData:"Invalid server data provided",notFound:"Server {{serverName}} not found",namePlaceholder:"Enter server name",urlPlaceholder:"Enter server URL",commandPlaceholder:"Enter command",argumentsPlaceholder:"Enter arguments",errorDetails:"Error Details",viewErrorDetails:"View error details"},z2={online:"Online",offline:"Offline",connecting:"Connecting"},D2={general:"Something went wrong",network:"Network connection error. Please check your internet connection",serverConnection:"Unable to connect to the server. Please check if the server is running",serverAdd:"Failed to add server. Please check the server status",serverUpdate:"Failed to edit server {{serverName}}. Please check the server status",serverFetch:"Failed to retrieve server data. Please try again later",initialStartup:"The server might be starting up. Please wait a moment as this process can take some time on first launch...",serverInstall:"Failed to install server",failedToFetchSettings:"Failed to fetch settings",failedToUpdateRouteConfig:"Failed to update route configuration"},L2={processing:"Processing...",save:"Save",cancel:"Cancel",refresh:"Refresh",create:"Create",submitting:"Submitting...",delete:"Delete",copy:"Copy",copySuccess:"Copied to clipboard",copyFailed:"Copy failed",close:"Close"},U2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},_2={dashboard:{title:"Dashboard",totalServers:"Total Servers",onlineServers:"Online Servers",offlineServers:"Offline Servers",connectingServers:"Connecting Servers",recentServers:"Recent Servers"},servers:{title:"Servers Management"},groups:{title:"Group Management"},settings:{title:"Settings",language:"Language",account:"Account Settings",password:"Change Password",appearance:"Appearance",routeConfig:"Route Configuration",installConfig:"Installation Configuration"},market:{title:"Server Market - (Data from mcpm.sh)"},logs:{title:"System Logs"}},H2={filters:"Filters",search:"Search logs...",autoScroll:"Auto-scroll",clearLogs:"Clear logs",loading:"Loading logs...",noLogs:"No logs available.",noMatch:"No logs match the current filters.",mainProcess:"Main Process",childProcess:"Child Process",main:"Main",child:"Child"},B2={add:"Add",addNew:"Add New Group",edit:"Edit Group",delete:"Delete",confirmDelete:"Are you sure you want to delete this group?",deleteWarning:"Deleting group '{{name}}' will remove it and all its server associations. This action cannot be undone.",name:"Group Name",namePlaceholder:"Enter group name",nameRequired:"Group name is required",description:"Description",descriptionPlaceholder:"Enter group description (optional)",createError:"Failed to create group",updateError:"Failed to update group",deleteError:"Failed to delete group",serverAddError:"Failed to add server to group",serverRemoveError:"Failed to remove server from group",addServer:"Add Server to Group",selectServer:"Select a server to add",servers:"Servers in Group",remove:"Remove",noGroups:"No groups available. Create a new group to get started.",noServers:"No servers in this group.",noServerOptions:"No servers available",serverCount:"{{count}} Servers"},G2={title:"Server Market",official:"Official",by:"By",unknown:"Unknown",tools:"tools",search:"Search",searchPlaceholder:"Search for servers by name, category, or tags",clearFilters:"Clear",clearCategoryFilter:"",clearTagFilter:"",categories:"Categories",tags:"Tags",showTags:"Show tags",hideTags:"Hide tags",moreTags:"",noServers:"No servers found matching your search",backToList:"Back to list",install:"Install",installing:"Installing...",installed:"Installed",installServer:"Install Server: {{name}}",installSuccess:"Server {{serverName}} installed successfully",author:"Author",license:"License",repository:"Repository",examples:"Examples",arguments:"Arguments",argumentName:"Name",description:"Description",required:"Required",example:"Example",viewSchema:"View schema",fetchError:"Error fetching market servers",serverNotFound:"Server not found",searchError:"Error searching servers",filterError:"Error filtering servers by category",tagFilterError:"Error filtering servers by tag",noInstallationMethod:"No installation method available for this server",showing:"Showing {{from}}-{{to}} of {{total}} servers",perPage:"Per page"},V2={enableGlobalRoute:"Enable Global Route",enableGlobalRouteDescription:"Allow connections to /sse endpoint without specifying a group ID",enableGroupNameRoute:"Enable Group Name Route",enableGroupNameRouteDescription:"Allow connections to /sse endpoint using group names instead of just group IDs",pythonIndexUrl:"Python Package Repository URL",pythonIndexUrlDescription:"Set UV_DEFAULT_INDEX environment variable for Python package installation",pythonIndexUrlPlaceholder:"e.g. https://pypi.org/simple",installConfig:"Installation Configuration",systemConfigUpdated:"System configuration updated successfully"},q2={app:T2,about:A2,profile:k2,theme:R2,auth:O2,server:M2,status:z2,errors:D2,common:L2,nav:U2,pages:_2,logs:H2,groups:B2,market:G2,settings:V2},Y2={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},$2={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本"},X2={viewProfile:"查看个人中心",userCenter:"个人中心"},Q2={title:"主题",light:"浅色",dark:"深色",system:"系统"},K2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},Z2={addServer:"添加服务器",add:"添加",edit:"编辑",delete:"删除",confirmDelete:"您确定要删除此服务器吗?",deleteWarning:"删除服务器 '{{name}}' 将会移除该服务器及其所有数据。此操作无法撤销。",status:"状态",tools:"工具",name:"服务器名称",url:"服务器 URL",apiKey:"API 密钥",save:"保存",cancel:"取消",addError:"添加服务器失败",editError:"编辑服务器 {{serverName}} 失败",invalidConfig:"无法找到 {{serverName}} 的配置数据",deleteError:"删除服务器 {{serverName}} 失败",updateError:"更新服务器失败",editTitle:"编辑服务器: {{serverName}}",type:"服务器类型",command:"命令",arguments:"参数",envVars:"环境变量",key:"键",value:"值",enabled:"已启用",enable:"启用",disable:"禁用",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情"},J2={online:"在线",offline:"离线",connecting:"连接中"},F2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败"},P2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭"},W2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},I2={dashboard:{title:"仪表盘",totalServers:"服务器总数",onlineServers:"在线服务器",offlineServers:"离线服务器",connectingServers:"连接中服务",recentServers:"最近的服务器"},servers:{title:"服务器管理"},settings:{title:"设置",language:"语言",account:"账户设置",password:"修改密码",appearance:"外观",routeConfig:"路由配置",installConfig:"安装配置"},groups:{title:"分组管理"},market:{title:"服务器市场 - (数据来源于 mcpm.sh)"},logs:{title:"系统日志"}},eS={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},tS={add:"添加",addNew:"添加新分组",edit:"编辑分组",delete:"删除",confirmDelete:"您确定要删除此分组吗?",deleteWarning:"删除分组 '{{name}}' 将会移除该分组及其所有服务器关联。此操作无法撤销。",name:"分组名称",namePlaceholder:"请输入分组名称",nameRequired:"分组名称不能为空",description:"描述",descriptionPlaceholder:"请输入分组描述(可选)",createError:"创建分组失败",updateError:"更新分组失败",deleteError:"删除分组失败",serverAddError:"向分组添加服务器失败",serverRemoveError:"从分组移除服务器失败",addServer:"添加服务器到分组",selectServer:"选择要添加的服务器",servers:"分组中的服务器",remove:"移除",noGroups:"暂无可用分组。创建一个新分组以开始使用。",noServers:"此分组中没有服务器。",noServerOptions:"没有可用的服务器",serverCount:"{{count}} 台服务器"},aS={title:"服务器市场",official:"官方",by:"作者",unknown:"未知",tools:"工具",search:"搜索",searchPlaceholder:"搜索服务器名称、分类或标签",clearFilters:"清除",clearCategoryFilter:"",clearTagFilter:"",categories:"分类",tags:"标签",showTags:"显示标签",hideTags:"隐藏标签",moreTags:"",noServers:"未找到匹配的服务器",backToList:"返回列表",install:"安装",installing:"安装中...",installed:"已安装",installServer:"安装服务器: {{name}}",installSuccess:"服务器 {{serverName}} 安装成功",author:"作者",license:"许可证",repository:"代码仓库",examples:"示例",arguments:"参数",argumentName:"名称",description:"描述",required:"必填",example:"示例",viewSchema:"查看结构",fetchError:"获取服务器市场数据失败",serverNotFound:"未找到服务器",searchError:"搜索服务器失败",filterError:"按分类筛选服务器失败",tagFilterError:"按标签筛选服务器失败",noInstallationMethod:"该服务器没有可用的安装方法",showing:"显示 {{from}}-{{to}}/{{total}} 个服务器",perPage:"每页显示"},nS={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",pythonIndexUrl:"Python 包仓库地址",pythonIndexUrlDescription:"设置 UV_DEFAULT_INDEX 环境变量,用于 Python 包安装",pythonIndexUrlPlaceholder:"例如: https://mirrors.aliyun.com/pypi/simple",installConfig:"安装配置",systemConfigUpdated:"系统配置更新成功"},lS={app:Y2,about:$2,profile:X2,theme:Q2,auth:K2,server:Z2,status:J2,errors:F2,common:P2,nav:W2,pages:I2,logs:eS,groups:tS,market:aS,settings:nS};He.use(Kg).use(u1).init({resources:{en:{translation:q2},zh:{translation:lS}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});Xy.createRoot(document.getElementById("root")).render(u.jsx(md.StrictMode,{children:u.jsx(J1,{})}));
|