@samanhappy/mcphub 0.7.4 → 0.7.6

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.
@@ -1,168 +0,0 @@
1
- (function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))o(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function r(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(d){if(d.ep)return;d.ep=!0;const f=r(d);fetch(d.href,f)}})();function Em(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var ou={exports:{}},ls={};/**
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 Lh;function Qp(){if(Lh)return ls;Lh=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(o,d,f){var h=null;if(f!==void 0&&(h=""+f),d.key!==void 0&&(h=""+d.key),"key"in d){f={};for(var x in d)x!=="key"&&(f[x]=d[x])}else f=d;return d=f.ref,{$$typeof:l,type:o,key:h,ref:d!==void 0?d:null,props:f}}return ls.Fragment=s,ls.jsx=r,ls.jsxs=r,ls}var _h;function Xp(){return _h||(_h=1,ou.exports=Qp()),ou.exports}var u=Xp(),uu={exports:{}},be={};/**
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 Hh;function Zp(){if(Hh)return be;Hh=1;var l=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),S=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,N={};function C(A,$,W){this.props=A,this.context=$,this.refs=N,this.updater=W||M}C.prototype.isReactComponent={},C.prototype.setState=function(A,$){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,$,"setState")},C.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function R(){}R.prototype=C.prototype;function k(A,$,W){this.props=A,this.context=$,this.refs=N,this.updater=W||M}var T=k.prototype=new R;T.constructor=k,j(T,C.prototype),T.isPureReactComponent=!0;var D=Array.isArray,U={H:null,A:null,T:null,S:null,V:null},te=Object.prototype.hasOwnProperty;function Y(A,$,W,Z,ne,ve){return W=ve.ref,{$$typeof:l,type:A,key:$,ref:W!==void 0?W:null,props:ve}}function L(A,$){return Y(A.type,$,void 0,void 0,void 0,A.props)}function X(A){return typeof A=="object"&&A!==null&&A.$$typeof===l}function I(A){var $={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(W){return $[W]})}var fe=/\/+/g;function ae(A,$){return typeof A=="object"&&A!==null&&A.key!=null?I(""+A.key):$.toString(36)}function se(){}function ie(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(se,se):(A.status="pending",A.then(function($){A.status==="pending"&&(A.status="fulfilled",A.value=$)},function($){A.status==="pending"&&(A.status="rejected",A.reason=$)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function re(A,$,W,Z,ne){var ve=typeof A;(ve==="undefined"||ve==="boolean")&&(A=null);var J=!1;if(A===null)J=!0;else switch(ve){case"bigint":case"string":case"number":J=!0;break;case"object":switch(A.$$typeof){case l:case s:J=!0;break;case y:return J=A._init,re(J(A._payload),$,W,Z,ne)}}if(J)return ne=ne(A),J=Z===""?"."+ae(A,0):Z,D(ne)?(W="",J!=null&&(W=J.replace(fe,"$&/")+"/"),re(ne,$,W,"",function(me){return me})):ne!=null&&(X(ne)&&(ne=L(ne,W+(ne.key==null||A&&A.key===ne.key?"":(""+ne.key).replace(fe,"$&/")+"/")+J)),$.push(ne)),1;J=0;var ee=Z===""?".":Z+":";if(D(A))for(var le=0;le<A.length;le++)Z=A[le],ve=ee+ae(Z,le),J+=re(Z,$,W,ve,ne);else if(le=v(A),typeof le=="function")for(A=le.call(A),le=0;!(Z=A.next()).done;)Z=Z.value,ve=ee+ae(Z,le++),J+=re(Z,$,W,ve,ne);else if(ve==="object"){if(typeof A.then=="function")return re(ie(A),$,W,Z,ne);throw $=String(A),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return J}function G(A,$,W){if(A==null)return A;var Z=[],ne=0;return re(A,Z,"","",function(ve){return $.call(W,ve,ne++)}),Z}function F(A){if(A._status===-1){var $=A._result;$=$(),$.then(function(W){(A._status===0||A._status===-1)&&(A._status=1,A._result=W)},function(W){(A._status===0||A._status===-1)&&(A._status=2,A._result=W)}),A._status===-1&&(A._status=0,A._result=$)}if(A._status===1)return A._result.default;throw A._result}var q=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)};function de(){}return be.Children={map:G,forEach:function(A,$,W){G(A,function(){$.apply(this,arguments)},W)},count:function(A){var $=0;return G(A,function(){$++}),$},toArray:function(A){return G(A,function($){return $})||[]},only:function(A){if(!X(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},be.Component=C,be.Fragment=r,be.Profiler=d,be.PureComponent=k,be.StrictMode=o,be.Suspense=m,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,be.__COMPILER_RUNTIME={__proto__:null,c:function(A){return U.H.useMemoCache(A)}},be.cache=function(A){return function(){return A.apply(null,arguments)}},be.cloneElement=function(A,$,W){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var Z=j({},A.props),ne=A.key,ve=void 0;if($!=null)for(J in $.ref!==void 0&&(ve=void 0),$.key!==void 0&&(ne=""+$.key),$)!te.call($,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&$.ref===void 0||(Z[J]=$[J]);var J=arguments.length-2;if(J===1)Z.children=W;else if(1<J){for(var ee=Array(J),le=0;le<J;le++)ee[le]=arguments[le+2];Z.children=ee}return Y(A.type,ne,void 0,void 0,ve,Z)},be.createContext=function(A){return A={$$typeof:h,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:f,_context:A},A},be.createElement=function(A,$,W){var Z,ne={},ve=null;if($!=null)for(Z in $.key!==void 0&&(ve=""+$.key),$)te.call($,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ne[Z]=$[Z]);var J=arguments.length-2;if(J===1)ne.children=W;else if(1<J){for(var ee=Array(J),le=0;le<J;le++)ee[le]=arguments[le+2];ne.children=ee}if(A&&A.defaultProps)for(Z in J=A.defaultProps,J)ne[Z]===void 0&&(ne[Z]=J[Z]);return Y(A,ve,void 0,void 0,null,ne)},be.createRef=function(){return{current:null}},be.forwardRef=function(A){return{$$typeof:x,render:A}},be.isValidElement=X,be.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:F}},be.memo=function(A,$){return{$$typeof:g,type:A,compare:$===void 0?null:$}},be.startTransition=function(A){var $=U.T,W={};U.T=W;try{var Z=A(),ne=U.S;ne!==null&&ne(W,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(de,q)}catch(ve){q(ve)}finally{U.T=$}},be.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},be.use=function(A){return U.H.use(A)},be.useActionState=function(A,$,W){return U.H.useActionState(A,$,W)},be.useCallback=function(A,$){return U.H.useCallback(A,$)},be.useContext=function(A){return U.H.useContext(A)},be.useDebugValue=function(){},be.useDeferredValue=function(A,$){return U.H.useDeferredValue(A,$)},be.useEffect=function(A,$,W){var Z=U.H;if(typeof W=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return Z.useEffect(A,$)},be.useId=function(){return U.H.useId()},be.useImperativeHandle=function(A,$,W){return U.H.useImperativeHandle(A,$,W)},be.useInsertionEffect=function(A,$){return U.H.useInsertionEffect(A,$)},be.useLayoutEffect=function(A,$){return U.H.useLayoutEffect(A,$)},be.useMemo=function(A,$){return U.H.useMemo(A,$)},be.useOptimistic=function(A,$){return U.H.useOptimistic(A,$)},be.useReducer=function(A,$,W){return U.H.useReducer(A,$,W)},be.useRef=function(A){return U.H.useRef(A)},be.useState=function(A){return U.H.useState(A)},be.useSyncExternalStore=function(A,$,W){return U.H.useSyncExternalStore(A,$,W)},be.useTransition=function(){return U.H.useTransition()},be.version="19.1.0",be}var Bh;function Ru(){return Bh||(Bh=1,uu.exports=Zp()),uu.exports}var w=Ru();const bu=Em(w);var cu={exports:{}},ss={},du={exports:{}},fu={};/**
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
- */var qh;function Pp(){return qh||(qh=1,function(l){function s(G,F){var q=G.length;G.push(F);e:for(;0<q;){var de=q-1>>>1,A=G[de];if(0<d(A,F))G[de]=F,G[q]=A,q=de;else break e}}function r(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var F=G[0],q=G.pop();if(q!==F){G[0]=q;e:for(var de=0,A=G.length,$=A>>>1;de<$;){var W=2*(de+1)-1,Z=G[W],ne=W+1,ve=G[ne];if(0>d(Z,q))ne<A&&0>d(ve,Z)?(G[de]=ve,G[ne]=q,de=ne):(G[de]=Z,G[W]=q,de=W);else if(ne<A&&0>d(ve,q))G[de]=ve,G[ne]=q,de=ne;else break e}}return F}function d(G,F){var q=G.sortIndex-F.sortIndex;return q!==0?q:G.id-F.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var h=Date,x=h.now();l.unstable_now=function(){return h.now()-x}}var m=[],g=[],y=1,S=null,v=3,M=!1,j=!1,N=!1,C=!1,R=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function D(G){for(var F=r(g);F!==null;){if(F.callback===null)o(g);else if(F.startTime<=G)o(g),F.sortIndex=F.expirationTime,s(m,F);else break;F=r(g)}}function U(G){if(N=!1,D(G),!j)if(r(m)!==null)j=!0,te||(te=!0,ae());else{var F=r(g);F!==null&&re(U,F.startTime-G)}}var te=!1,Y=-1,L=5,X=-1;function I(){return C?!0:!(l.unstable_now()-X<L)}function fe(){if(C=!1,te){var G=l.unstable_now();X=G;var F=!0;try{e:{j=!1,N&&(N=!1,k(Y),Y=-1),M=!0;var q=v;try{t:{for(D(G),S=r(m);S!==null&&!(S.expirationTime>G&&I());){var de=S.callback;if(typeof de=="function"){S.callback=null,v=S.priorityLevel;var A=de(S.expirationTime<=G);if(G=l.unstable_now(),typeof A=="function"){S.callback=A,D(G),F=!0;break t}S===r(m)&&o(m),D(G)}else o(m);S=r(m)}if(S!==null)F=!0;else{var $=r(g);$!==null&&re(U,$.startTime-G),F=!1}}break e}finally{S=null,v=q,M=!1}F=void 0}}finally{F?ae():te=!1}}}var ae;if(typeof T=="function")ae=function(){T(fe)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,ie=se.port2;se.port1.onmessage=fe,ae=function(){ie.postMessage(null)}}else ae=function(){R(fe,0)};function re(G,F){Y=R(function(){G(l.unstable_now())},F)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(G){G.callback=null},l.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<G?Math.floor(1e3/G):5},l.unstable_getCurrentPriorityLevel=function(){return v},l.unstable_next=function(G){switch(v){case 1:case 2:case 3:var F=3;break;default:F=v}var q=v;v=F;try{return G()}finally{v=q}},l.unstable_requestPaint=function(){C=!0},l.unstable_runWithPriority=function(G,F){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var q=v;v=G;try{return F()}finally{v=q}},l.unstable_scheduleCallback=function(G,F,q){var de=l.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?de+q:de):q=de,G){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=q+A,G={id:y++,callback:F,priorityLevel:G,startTime:q,expirationTime:A,sortIndex:-1},q>de?(G.sortIndex=q,s(g,G),r(m)===null&&G===r(g)&&(N?(k(Y),Y=-1):N=!0,re(U,q-de))):(G.sortIndex=A,s(m,G),j||M||(j=!0,te||(te=!0,ae()))),G},l.unstable_shouldYield=I,l.unstable_wrapCallback=function(G){var F=v;return function(){var q=v;v=F;try{return G.apply(this,arguments)}finally{v=q}}}}(fu)),fu}var Gh;function Jp(){return Gh||(Gh=1,du.exports=Pp()),du.exports}var hu={exports:{}},it={};/**
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 Vh;function Fp(){if(Vh)return it;Vh=1;var l=Ru();function s(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)g+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(s(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(m,g,y){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:S==null?null:""+S,children:m,containerInfo:g,implementation:y}}var h=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,it.createPortal=function(m,g){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return f(m,g,null,y)},it.flushSync=function(m){var g=h.T,y=o.p;try{if(h.T=null,o.p=2,m)return m()}finally{h.T=g,o.p=y,o.d.f()}},it.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(m,g))},it.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},it.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var y=g.as,S=x(y,g.crossOrigin),v=typeof g.integrity=="string"?g.integrity:void 0,M=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;y==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:S,integrity:v,fetchPriority:M}):y==="script"&&o.d.X(m,{crossOrigin:S,integrity:v,fetchPriority:M,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},it.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var y=x(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},it.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var y=g.as,S=x(y,g.crossOrigin);o.d.L(m,y,{crossOrigin:S,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},it.preloadModule=function(m,g){if(typeof m=="string")if(g){var y=x(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},it.requestFormReset=function(m){o.d.r(m)},it.unstable_batchedUpdates=function(m,g){return m(g)},it.useFormState=function(m,g,y){return h.H.useFormState(m,g,y)},it.useFormStatus=function(){return h.H.useHostTransitionStatus()},it.version="19.1.0",it}var Yh;function Wp(){if(Yh)return hu.exports;Yh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),hu.exports=Fp(),hu.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 $h;function Ip(){if($h)return ss;$h=1;var l=Jp(),s=Ru(),r=Wp();function o(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 d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(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 x(e){if(f(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var c=i.alternate;if(c===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===a)return x(i),e;if(c===n)return x(i),t;c=c.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=c;else{for(var p=!1,b=i.child;b;){if(b===a){p=!0,a=i,n=c;break}if(b===n){p=!0,n=i,a=c;break}b=b.sibling}if(!p){for(b=c.child;b;){if(b===a){p=!0,a=c,n=i;break}if(b===n){p=!0,n=c,a=i;break}b=b.sibling}if(!p)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),k=Symbol.for("react.consumer"),T=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function ie(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case C:return"Profiler";case N:return"StrictMode";case U:return"Suspense";case te:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case T:return(e.displayName||"Context")+".Provider";case k:return(e._context.displayName||"Context")+".Consumer";case D:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return t=e.displayName||null,t!==null?t:ie(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var re=Array.isArray,G=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},de=[],A=-1;function $(e){return{current:e}}function W(e){0>A||(e.current=de[A],de[A]=null,A--)}function Z(e,t){A++,de[A]=e.current,e.current=t}var ne=$(null),ve=$(null),J=$(null),ee=$(null);function le(e,t){switch(Z(J,t),Z(ve,e),Z(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ch(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ch(t),e=dh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}W(ne),Z(ne,e)}function me(){W(ne),W(ve),W(J)}function tt(e){e.memoizedState!==null&&Z(ee,e);var t=ne.current,a=dh(t,e.type);t!==a&&(Z(ve,e),Z(ne,a))}function ct(e){ve.current===e&&(W(ne),W(ve)),ee.current===e&&(W(ee),Il._currentValue=q)}var pt=Object.prototype.hasOwnProperty,Ft=l.unstable_scheduleCallback,rl=l.unstable_cancelCallback,jg=l.unstable_shouldYield,Eg=l.unstable_requestPaint,Vt=l.unstable_now,Cg=l.unstable_getCurrentPriorityLevel,Yu=l.unstable_ImmediatePriority,$u=l.unstable_UserBlockingPriority,ys=l.unstable_NormalPriority,kg=l.unstable_LowPriority,Ku=l.unstable_IdlePriority,Ag=l.log,Tg=l.unstable_setDisableYieldValue,il=null,xt=null;function pa(e){if(typeof Ag=="function"&&Tg(e),xt&&typeof xt.setStrictMode=="function")try{xt.setStrictMode(il,e)}catch{}}var yt=Math.clz32?Math.clz32:Mg,Rg=Math.log,Og=Math.LN2;function Mg(e){return e>>>=0,e===0?32:31-(Rg(e)/Og|0)|0}var bs=256,vs=4194304;function Va(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 ws(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~c,n!==0?i=Va(n):(p&=b,p!==0?i=Va(p):a||(a=b&~e,a!==0&&(i=Va(a))))):(b=n&~c,b!==0?i=Va(b):p!==0?i=Va(p):a||(a=n&~e,a!==0&&(i=Va(a)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:i}function ol(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function zg(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 Qu(){var e=bs;return bs<<=1,(bs&4194048)===0&&(bs=256),e}function Xu(){var e=vs;return vs<<=1,(vs&62914560)===0&&(vs=4194304),e}function Jr(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ul(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Dg(e,t,a,n,i,c){var p=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 b=e.entanglements,E=e.expirationTimes,H=e.hiddenUpdates;for(a=p&~a;0<a;){var K=31-yt(a),P=1<<K;b[K]=0,E[K]=-1;var B=H[K];if(B!==null)for(H[K]=null,K=0;K<B.length;K++){var V=B[K];V!==null&&(V.lane&=-536870913)}a&=~P}n!==0&&Zu(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(p&~t))}function Zu(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-yt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function Pu(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-yt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Fr(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 Wr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ju(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Rh(e.type))}function Ug(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var xa=Math.random().toString(36).slice(2),st="__reactFiber$"+xa,dt="__reactProps$"+xa,cn="__reactContainer$"+xa,Ir="__reactEvents$"+xa,Lg="__reactListeners$"+xa,_g="__reactHandles$"+xa,Fu="__reactResources$"+xa,cl="__reactMarker$"+xa;function ei(e){delete e[st],delete e[dt],delete e[Ir],delete e[Lg],delete e[_g]}function dn(e){var t=e[st];if(t)return t;for(var a=e.parentNode;a;){if(t=a[cn]||a[st]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=gh(e);e!==null;){if(a=e[st])return a;e=gh(e)}return t}e=a,a=e.parentNode}return null}function fn(e){if(e=e[st]||e[cn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function dl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function hn(e){var t=e[Fu];return t||(t=e[Fu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Fe(e){e[cl]=!0}var Wu=new Set,Iu={};function Ya(e,t){mn(e,t),mn(e+"Capture",t)}function mn(e,t){for(Iu[e]=t,e=0;e<t.length;e++)Wu.add(t[e])}var Hg=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]*$"),ec={},tc={};function Bg(e){return pt.call(tc,e)?!0:pt.call(ec,e)?!1:Hg.test(e)?tc[e]=!0:(ec[e]=!0,!1)}function Ss(e,t,a){if(Bg(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 Ns(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 Wt(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 ti,ac;function gn(e){if(ti===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ti=t&&t[1]||"",ac=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+ti+e+ac}var ai=!1;function ni(e,t){if(!e||ai)return"";ai=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(V){var B=V}Reflect.construct(e,[],P)}else{try{P.call()}catch(V){B=V}e.call(P.prototype)}}else{try{throw Error()}catch(V){B=V}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(V){if(V&&B&&typeof V.stack=="string")return[V.stack,B.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),p=c[0],b=c[1];if(p&&b){var E=p.split(`
44
- `),H=b.split(`
45
- `);for(i=n=0;n<E.length&&!E[n].includes("DetermineComponentFrameRoot");)n++;for(;i<H.length&&!H[i].includes("DetermineComponentFrameRoot");)i++;if(n===E.length||i===H.length)for(n=E.length-1,i=H.length-1;1<=n&&0<=i&&E[n]!==H[i];)i--;for(;1<=n&&0<=i;n--,i--)if(E[n]!==H[i]){if(n!==1||i!==1)do if(n--,i--,0>i||E[n]!==H[i]){var K=`
46
- `+E[n].replace(" at new "," at ");return e.displayName&&K.includes("<anonymous>")&&(K=K.replace("<anonymous>",e.displayName)),K}while(1<=n&&0<=i);break}}}finally{ai=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?gn(a):""}function qg(e){switch(e.tag){case 26:case 27:case 5:return gn(e.type);case 16:return gn("Lazy");case 13:return gn("Suspense");case 19:return gn("SuspenseList");case 0:case 15:return ni(e.type,!1);case 11:return ni(e.type.render,!1);case 1:return ni(e.type,!0);case 31:return gn("Activity");default:return""}}function nc(e){try{var t="";do t+=qg(e),e=e.return;while(e);return t}catch(a){return`
47
- Error generating stack: `+a.message+`
48
- `+a.stack}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gg(e){var t=lc(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 i=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(p){n=""+p,c.call(this,p)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(p){n=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function js(e){e._valueTracker||(e._valueTracker=Gg(e))}function sc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=lc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Es(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 Vg=/[\n"\\]/g;function kt(e){return e.replace(Vg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function li(e,t,a,n,i,c,p,b){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?si(e,p,Ct(t)):a!=null?si(e,p,Ct(a)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Ct(b):e.removeAttribute("name")}function rc(e,t,a,n,i,c,p,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null))return;a=a!=null?""+Ct(a):"",t=t!=null?""+Ct(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=b?e.checked:!!n,e.defaultChecked=!!n,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p)}function si(e,t,a){t==="number"&&Es(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function pn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ic(e,t,a){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ct(a):""}function oc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(re(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Ct(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function xn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Yg=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 uc(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||Yg.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function cc(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(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 i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&uc(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&uc(e,c,t[c])}function ri(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 $g=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"]]),Kg=/^[\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 Cs(e){return Kg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var ii=null;function oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,bn=null;function dc(e){var t=fn(e);if(t&&(e=t.stateNode)){var a=e[dt]||null;e:switch(e=t.stateNode,t.type){case"input":if(li(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="'+kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[dt]||null;if(!i)throw Error(o(90));li(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&sc(n)}break e;case"textarea":ic(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&pn(e,!!a.multiple,t,!1)}}}var ui=!1;function fc(e,t,a){if(ui)return e(t,a);ui=!0;try{var n=e(t);return n}finally{if(ui=!1,(yn!==null||bn!==null)&&(dr(),yn&&(t=yn,e=bn,bn=yn=null,dc(t),e)))for(t=0;t<e.length;t++)dc(e[t])}}function fl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[dt]||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(o(231,t,typeof a));return a}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ci=!1;if(It)try{var hl={};Object.defineProperty(hl,"passive",{get:function(){ci=!0}}),window.addEventListener("test",hl,hl),window.removeEventListener("test",hl,hl)}catch{ci=!1}var ya=null,di=null,ks=null;function hc(){if(ks)return ks;var e,t=di,a=t.length,n,i="value"in ya?ya.value:ya.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var p=a-e;for(n=1;n<=p&&t[a-n]===i[c-n];n++);return ks=i.slice(e,1<n?1-n:void 0)}function As(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 Ts(){return!0}function mc(){return!1}function ft(e){function t(a,n,i,c,p){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ts:mc,this.isPropagationStopped=mc,this}return y(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=Ts)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ts)},persist:function(){},isPersistent:Ts}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rs=ft($a),ml=y({},$a,{view:0,detail:0}),Qg=ft(ml),fi,hi,gl,Os=y({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gi,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!==gl&&(gl&&e.type==="mousemove"?(fi=e.screenX-gl.screenX,hi=e.screenY-gl.screenY):hi=fi=0,gl=e),fi)},movementY:function(e){return"movementY"in e?e.movementY:hi}}),gc=ft(Os),Xg=y({},Os,{dataTransfer:0}),Zg=ft(Xg),Pg=y({},ml,{relatedTarget:0}),mi=ft(Pg),Jg=y({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),Fg=ft(Jg),Wg=y({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ig=ft(Wg),e0=y({},$a,{data:0}),pc=ft(e0),t0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a0={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"},n0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=n0[e])?!!t[e]:!1}function gi(){return l0}var s0=y({},ml,{key:function(e){if(e.key){var t=t0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=As(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?a0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gi,charCode:function(e){return e.type==="keypress"?As(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?As(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),r0=ft(s0),i0=y({},Os,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xc=ft(i0),o0=y({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gi}),u0=ft(o0),c0=y({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),d0=ft(c0),f0=y({},Os,{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}),h0=ft(f0),m0=y({},$a,{newState:0,oldState:0}),g0=ft(m0),p0=[9,13,27,32],pi=It&&"CompositionEvent"in window,pl=null;It&&"documentMode"in document&&(pl=document.documentMode);var x0=It&&"TextEvent"in window&&!pl,yc=It&&(!pi||pl&&8<pl&&11>=pl),bc=" ",vc=!1;function wc(e,t){switch(e){case"keyup":return p0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vn=!1;function y0(e,t){switch(e){case"compositionend":return Sc(t);case"keypress":return t.which!==32?null:(vc=!0,bc);case"textInput":return e=t.data,e===bc&&vc?null:e;default:return null}}function b0(e,t){if(vn)return e==="compositionend"||!pi&&wc(e,t)?(e=hc(),ks=di=ya=null,vn=!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 yc&&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 Nc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!v0[e.type]:t==="textarea"}function jc(e,t,a,n){yn?bn?bn.push(n):bn=[n]:yn=n,t=xr(t,"onChange"),0<t.length&&(a=new Rs("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var xl=null,yl=null;function w0(e){sh(e,0)}function Ms(e){var t=dl(e);if(sc(t))return e}function Ec(e,t){if(e==="change")return t}var Cc=!1;if(It){var xi;if(It){var yi="oninput"in document;if(!yi){var kc=document.createElement("div");kc.setAttribute("oninput","return;"),yi=typeof kc.oninput=="function"}xi=yi}else xi=!1;Cc=xi&&(!document.documentMode||9<document.documentMode)}function Ac(){xl&&(xl.detachEvent("onpropertychange",Tc),yl=xl=null)}function Tc(e){if(e.propertyName==="value"&&Ms(yl)){var t=[];jc(t,yl,e,oi(e)),fc(w0,t)}}function S0(e,t,a){e==="focusin"?(Ac(),xl=t,yl=a,xl.attachEvent("onpropertychange",Tc)):e==="focusout"&&Ac()}function N0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ms(yl)}function j0(e,t){if(e==="click")return Ms(t)}function E0(e,t){if(e==="input"||e==="change")return Ms(t)}function C0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:C0;function bl(e,t){if(bt(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 i=a[n];if(!pt.call(t,i)||!bt(e[i],t[i]))return!1}return!0}function Rc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Oc(e,t){var a=Rc(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=Rc(a)}}function Mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Es(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=Es(e.document)}return t}function bi(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 k0=It&&"documentMode"in document&&11>=document.documentMode,wn=null,vi=null,vl=null,wi=!1;function Dc(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;wi||wn==null||wn!==Es(n)||(n=wn,"selectionStart"in n&&bi(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}),vl&&bl(vl,n)||(vl=n,n=xr(vi,"onSelect"),0<n.length&&(t=new Rs("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=wn)))}function Ka(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Sn={animationend:Ka("Animation","AnimationEnd"),animationiteration:Ka("Animation","AnimationIteration"),animationstart:Ka("Animation","AnimationStart"),transitionrun:Ka("Transition","TransitionRun"),transitionstart:Ka("Transition","TransitionStart"),transitioncancel:Ka("Transition","TransitionCancel"),transitionend:Ka("Transition","TransitionEnd")},Si={},Uc={};It&&(Uc=document.createElement("div").style,"AnimationEvent"in window||(delete Sn.animationend.animation,delete Sn.animationiteration.animation,delete Sn.animationstart.animation),"TransitionEvent"in window||delete Sn.transitionend.transition);function Qa(e){if(Si[e])return Si[e];if(!Sn[e])return e;var t=Sn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Uc)return Si[e]=t[a];return e}var Lc=Qa("animationend"),_c=Qa("animationiteration"),Hc=Qa("animationstart"),A0=Qa("transitionrun"),T0=Qa("transitionstart"),R0=Qa("transitioncancel"),Bc=Qa("transitionend"),qc=new Map,Ni="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(" ");Ni.push("scrollEnd");function _t(e,t){qc.set(e,t),Ya(t,[e])}var Gc=new WeakMap;function At(e,t){if(typeof e=="object"&&e!==null){var a=Gc.get(e);return a!==void 0?a:(t={value:e,source:t,stack:nc(t)},Gc.set(e,t),t)}return{value:e,source:t,stack:nc(t)}}var Tt=[],Nn=0,ji=0;function zs(){for(var e=Nn,t=ji=Nn=0;t<e;){var a=Tt[t];Tt[t++]=null;var n=Tt[t];Tt[t++]=null;var i=Tt[t];Tt[t++]=null;var c=Tt[t];if(Tt[t++]=null,n!==null&&i!==null){var p=n.pending;p===null?i.next=i:(i.next=p.next,p.next=i),n.pending=i}c!==0&&Vc(a,i,c)}}function Ds(e,t,a,n){Tt[Nn++]=e,Tt[Nn++]=t,Tt[Nn++]=a,Tt[Nn++]=n,ji|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Ei(e,t,a,n){return Ds(e,t,a,n),Us(e)}function jn(e,t){return Ds(e,null,null,t),Us(e)}function Vc(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-yt(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function Us(e){if(50<Kl)throw Kl=0,Mo=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var En={};function O0(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 vt(e,t,a,n){return new O0(e,t,a,n)}function Ci(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ea(e,t){var a=e.alternate;return a===null?(a=vt(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 Yc(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 Ls(e,t,a,n,i,c){var p=0;if(n=e,typeof e=="function")Ci(e)&&(p=1);else if(typeof e=="string")p=zp(e,a,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=vt(31,a,t,i),e.elementType=X,e.lanes=c,e;case j:return Xa(a.children,i,c,t);case N:p=8,i|=24;break;case C:return e=vt(12,a,t,i|2),e.elementType=C,e.lanes=c,e;case U:return e=vt(13,a,t,i),e.elementType=U,e.lanes=c,e;case te:return e=vt(19,a,t,i),e.elementType=te,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:case T:p=10;break e;case k:p=9;break e;case D:p=11;break e;case Y:p=14;break e;case L:p=16,n=null;break e}p=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=vt(p,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Xa(e,t,a,n){return e=vt(7,e,n,t),e.lanes=a,e}function ki(e,t,a){return e=vt(6,e,null,t),e.lanes=a,e}function Ai(e,t,a){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Cn=[],kn=0,_s=null,Hs=0,Rt=[],Ot=0,Za=null,ta=1,aa="";function Pa(e,t){Cn[kn++]=Hs,Cn[kn++]=_s,_s=e,Hs=t}function $c(e,t,a){Rt[Ot++]=ta,Rt[Ot++]=aa,Rt[Ot++]=Za,Za=e;var n=ta;e=aa;var i=32-yt(n)-1;n&=~(1<<i),a+=1;var c=32-yt(t)+i;if(30<c){var p=i-i%5;c=(n&(1<<p)-1).toString(32),n>>=p,i-=p,ta=1<<32-yt(t)+i|a<<i|n,aa=c+e}else ta=1<<c|a<<i|n,aa=e}function Ti(e){e.return!==null&&(Pa(e,1),$c(e,1,0))}function Ri(e){for(;e===_s;)_s=Cn[--kn],Cn[kn]=null,Hs=Cn[--kn],Cn[kn]=null;for(;e===Za;)Za=Rt[--Ot],Rt[Ot]=null,aa=Rt[--Ot],Rt[Ot]=null,ta=Rt[--Ot],Rt[Ot]=null}var ut=null,Ge=null,Re=!1,Ja=null,Yt=!1,Oi=Error(o(519));function Fa(e){var t=Error(o(418,""));throw Nl(At(t,e)),Oi}function Kc(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[st]=e,t[dt]=n,a){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(a=0;a<Xl.length;a++)Ee(Xl[a],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),rc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),js(t);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),oc(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||uh(t.textContent,a)?(n.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),n.onScroll!=null&&Ee("scroll",t),n.onScrollEnd!=null&&Ee("scrollend",t),n.onClick!=null&&(t.onclick=yr),t=!0):t=!1,t||Fa(e)}function Qc(e){for(ut=e.return;ut;)switch(ut.tag){case 5:case 13:Yt=!1;return;case 27:case 3:Yt=!0;return;default:ut=ut.return}}function wl(e){if(e!==ut)return!1;if(!Re)return Qc(e),Re=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Zo(e.type,e.memoizedProps)),a=!a),a&&Ge&&Fa(e),Qc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Ge=Bt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Ge=null}}else t===27?(t=Ge,Da(e.type)?(e=Wo,Wo=null,Ge=e):Ge=t):Ge=ut?Bt(e.stateNode.nextSibling):null;return!0}function Sl(){Ge=ut=null,Re=!1}function Xc(){var e=Ja;return e!==null&&(gt===null?gt=e:gt.push.apply(gt,e),Ja=null),e}function Nl(e){Ja===null?Ja=[e]:Ja.push(e)}var Mi=$(null),Wa=null,na=null;function ba(e,t,a){Z(Mi,t._currentValue),t._currentValue=a}function la(e){e._currentValue=Mi.current,W(Mi)}function zi(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 Di(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var p=i.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=i;for(var E=0;E<t.length;E++)if(b.context===t[E]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),zi(c.return,a,e),n||(p=null);break e}c=b.next}}else if(i.tag===18){if(p=i.return,p===null)throw Error(o(341));p.lanes|=a,c=p.alternate,c!==null&&(c.lanes|=a),zi(p,a,e),p=null}else p=i.child;if(p!==null)p.return=i;else for(p=i;p!==null;){if(p===e){p=null;break}if(i=p.sibling,i!==null){i.return=p.return,p=i;break}p=p.return}i=p}}function jl(e,t,a,n){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var p=i.alternate;if(p===null)throw Error(o(387));if(p=p.memoizedProps,p!==null){var b=i.type;bt(i.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(i===ee.current){if(p=i.alternate,p===null)throw Error(o(387));p.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Il):e=[Il])}i=i.return}e!==null&&Di(t,e,a,n),t.flags|=262144}function Bs(e){for(e=e.firstContext;e!==null;){if(!bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ia(e){Wa=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rt(e){return Zc(Wa,e)}function qs(e,t){return Wa===null&&Ia(e),Zc(e,t)}function Zc(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},na===null){if(e===null)throw Error(o(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return a}var M0=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()})}},z0=l.unstable_scheduleCallback,D0=l.unstable_NormalPriority,Xe={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ui(){return{controller:new M0,data:new Map,refCount:0}}function El(e){e.refCount--,e.refCount===0&&z0(D0,function(){e.controller.abort()})}var Cl=null,Li=0,An=0,Tn=null;function U0(e,t){if(Cl===null){var a=Cl=[];Li=0,An=Bo(),Tn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Li++,t.then(Pc,Pc),t}function Pc(){if(--Li===0&&Cl!==null){Tn!==null&&(Tn.status="fulfilled");var e=Cl;Cl=null,An=0,Tn=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(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var Jc=G.S;G.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&U0(e,t),Jc!==null&&Jc(e,t)};var en=$(null);function _i(){var e=en.current;return e!==null?e:_e.pooledCache}function Gs(e,t){t===null?Z(en,en.current):Z(en,t.pool)}function Fc(){var e=_i();return e===null?null:{parent:Xe._currentValue,pool:e}}var kl=Error(o(460)),Wc=Error(o(474)),Vs=Error(o(542)),Hi={then:function(){}};function Ic(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ys(){}function ed(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Ys,Ys),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ad(e),e;default:if(typeof t.status=="string")t.then(Ys,Ys);else{if(e=_e,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ad(e),e}throw Al=t,kl}}var Al=null;function td(){if(Al===null)throw Error(o(459));var e=Al;return Al=null,e}function ad(e){if(e===kl||e===Vs)throw Error(o(483))}var va=!1;function Bi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qi(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 wa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Oe&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Us(e),Vc(e,null,a),t}return Ds(e,n,t,a),Us(e)}function Tl(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,Pu(e,a)}}function Gi(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=p:c=c.next=p,a=a.next}while(a!==null);c===null?i=c=t:c=c.next=t}else i=c=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:c,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 Vi=!1;function Rl(){if(Vi){var e=Tn;if(e!==null)throw e}}function Ol(e,t,a,n){Vi=!1;var i=e.updateQueue;va=!1;var c=i.firstBaseUpdate,p=i.lastBaseUpdate,b=i.shared.pending;if(b!==null){i.shared.pending=null;var E=b,H=E.next;E.next=null,p===null?c=H:p.next=H,p=E;var K=e.alternate;K!==null&&(K=K.updateQueue,b=K.lastBaseUpdate,b!==p&&(b===null?K.firstBaseUpdate=H:b.next=H,K.lastBaseUpdate=E))}if(c!==null){var P=i.baseState;p=0,K=H=E=null,b=c;do{var B=b.lane&-536870913,V=B!==b.lane;if(V?(Ae&B)===B:(n&B)===B){B!==0&&B===An&&(Vi=!0),K!==null&&(K=K.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var xe=e,ge=b;B=t;var Ue=a;switch(ge.tag){case 1:if(xe=ge.payload,typeof xe=="function"){P=xe.call(Ue,P,B);break e}P=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ge.payload,B=typeof xe=="function"?xe.call(Ue,P,B):xe,B==null)break e;P=y({},P,B);break e;case 2:va=!0}}B=b.callback,B!==null&&(e.flags|=64,V&&(e.flags|=8192),V=i.callbacks,V===null?i.callbacks=[B]:V.push(B))}else V={lane:B,tag:b.tag,payload:b.payload,callback:b.callback,next:null},K===null?(H=K=V,E=P):K=K.next=V,p|=B;if(b=b.next,b===null){if(b=i.shared.pending,b===null)break;V=b,b=V.next,V.next=null,i.lastBaseUpdate=V,i.shared.pending=null}}while(!0);K===null&&(E=P),i.baseState=E,i.firstBaseUpdate=H,i.lastBaseUpdate=K,c===null&&(i.shared.lanes=0),Ra|=p,e.lanes=p,e.memoizedState=P}}function nd(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ld(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)nd(a[e],t)}var Rn=$(null),$s=$(0);function sd(e,t){e=da,Z($s,e),Z(Rn,t),da=e|t.baseLanes}function Yi(){Z($s,da),Z(Rn,Rn.current)}function $i(){da=$s.current,W(Rn),W($s)}var Na=0,we=null,ze=null,Ke=null,Ks=!1,On=!1,tn=!1,Qs=0,Ml=0,Mn=null,_0=0;function Ye(){throw Error(o(321))}function Ki(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!bt(e[a],t[a]))return!1;return!0}function Qi(e,t,a,n,i,c){return Na=c,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Vd:Yd,tn=!1,c=a(n,i),tn=!1,On&&(c=id(t,a,n,i)),rd(e),c}function rd(e){G.H=Ws;var t=ze!==null&&ze.next!==null;if(Na=0,Ke=ze=we=null,Ks=!1,Ml=0,Mn=null,t)throw Error(o(300));e===null||We||(e=e.dependencies,e!==null&&Bs(e)&&(We=!0))}function id(e,t,a,n){we=e;var i=0;do{if(On&&(Mn=null),Ml=0,On=!1,25<=i)throw Error(o(301));if(i+=1,Ke=ze=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}G.H=$0,c=t(a,n)}while(On);return c}function H0(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?zl(t):t,e=e.useState()[0],(ze!==null?ze.memoizedState:null)!==e&&(we.flags|=1024),t}function Xi(){var e=Qs!==0;return Qs=0,e}function Zi(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Pi(e){if(Ks){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ks=!1}Na=0,Ke=ze=we=null,On=!1,Ml=Qs=0,Mn=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?we.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function Qe(){if(ze===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=ze.next;var t=Ke===null?we.memoizedState:Ke.next;if(t!==null)Ke=t,ze=e;else{if(e===null)throw we.alternate===null?Error(o(467)):Error(o(310));ze=e,e={memoizedState:ze.memoizedState,baseState:ze.baseState,baseQueue:ze.baseQueue,queue:ze.queue,next:null},Ke===null?we.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function zl(e){var t=Ml;return Ml+=1,Mn===null&&(Mn=[]),e=ed(Mn,e,t),t=we,(Ke===null?t.memoizedState:Ke.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Vd:Yd),e}function Xs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return zl(e);if(e.$$typeof===T)return rt(e)}throw Error(o(438,String(e)))}function Fi(e){var t=null,a=we.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=we.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ji(),we.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]=I;return t.index++,a}function sa(e,t){return typeof t=="function"?t(e):t}function Zs(e){var t=Qe();return Wi(t,ze,e)}function Wi(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,c=n.pending;if(c!==null){if(i!==null){var p=i.next;i.next=c.next,c.next=p}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var b=p=null,E=null,H=t,K=!1;do{var P=H.lane&-536870913;if(P!==H.lane?(Ae&P)===P:(Na&P)===P){var B=H.revertLane;if(B===0)E!==null&&(E=E.next={lane:0,revertLane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),P===An&&(K=!0);else if((Na&B)===B){H=H.next,B===An&&(K=!0);continue}else P={lane:0,revertLane:H.revertLane,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},E===null?(b=E=P,p=c):E=E.next=P,we.lanes|=B,Ra|=B;P=H.action,tn&&a(c,P),c=H.hasEagerState?H.eagerState:a(c,P)}else B={lane:P,revertLane:H.revertLane,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},E===null?(b=E=B,p=c):E=E.next=B,we.lanes|=P,Ra|=P;H=H.next}while(H!==null&&H!==t);if(E===null?p=c:E.next=b,!bt(c,e.memoizedState)&&(We=!0,K&&(a=Tn,a!==null)))throw a;e.memoizedState=c,e.baseState=p,e.baseQueue=E,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Ii(e){var t=Qe(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,c=t.memoizedState;if(i!==null){a.pending=null;var p=i=i.next;do c=e(c,p.action),p=p.next;while(p!==i);bt(c,t.memoizedState)||(We=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function od(e,t,a){var n=we,i=Qe(),c=Re;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var p=!bt((ze||i).memoizedState,a);p&&(i.memoizedState=a,We=!0),i=i.queue;var b=dd.bind(null,n,i,e);if(Dl(2048,8,b,[e]),i.getSnapshot!==t||p||Ke!==null&&Ke.memoizedState.tag&1){if(n.flags|=2048,zn(9,Ps(),cd.bind(null,n,i,a,t),null),_e===null)throw Error(o(349));c||(Na&124)!==0||ud(n,t,a)}return a}function ud(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=we.updateQueue,t===null?(t=Ji(),we.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function cd(e,t,a,n){t.value=a,t.getSnapshot=n,fd(t)&&hd(e)}function dd(e,t,a){return a(function(){fd(t)&&hd(e)})}function fd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!bt(e,a)}catch{return!0}}function hd(e){var t=jn(e,2);t!==null&&Et(t,e,2)}function eo(e){var t=ht();if(typeof e=="function"){var a=e;if(e=a(),tn){pa(!0);try{a()}finally{pa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e},t}function md(e,t,a,n){return e.baseState=a,Wi(e,ze,typeof n=="function"?n:sa)}function B0(e,t,a,n,i){if(Fs(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){c.listeners.push(p)}};G.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,gd(t,c)):(c.next=a.next,t.pending=a.next=c)}}function gd(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=G.T,p={};G.T=p;try{var b=a(i,n),E=G.S;E!==null&&E(p,b),pd(e,t,b)}catch(H){to(e,t,H)}finally{G.T=c}}else try{c=a(i,n),pd(e,t,c)}catch(H){to(e,t,H)}}function pd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){xd(e,t,n)},function(n){return to(e,t,n)}):xd(e,t,a)}function xd(e,t,a){t.status="fulfilled",t.value=a,yd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,gd(e,a)))}function to(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,yd(t),t=t.next;while(t!==n)}e.action=null}function yd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bd(e,t){return t}function vd(e,t){if(Re){var a=_e.formState;if(a!==null){e:{var n=we;if(Re){if(Ge){t:{for(var i=Ge,c=Yt;i.nodeType!==8;){if(!c){i=null;break t}if(i=Bt(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){Ge=Bt(i.nextSibling),n=i.data==="F!";break e}}Fa(n)}n=!1}n&&(t=a[0])}}return a=ht(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bd,lastRenderedState:t},a.queue=n,a=Bd.bind(null,we,n),n.dispatch=a,n=eo(!1),c=ro.bind(null,we,!1,n.queue),n=ht(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=B0.bind(null,we,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function wd(e){var t=Qe();return Sd(t,ze,e)}function Sd(e,t,a){if(t=Wi(e,t,bd)[0],e=Zs(sa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=zl(t)}catch(p){throw p===kl?Vs:p}else n=t;t=Qe();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(we.flags|=2048,zn(9,Ps(),q0.bind(null,i,a),null)),[n,c,e]}function q0(e,t){e.action=t}function Nd(e){var t=Qe(),a=ze;if(a!==null)return Sd(t,a,e);Qe(),t=t.memoizedState,a=Qe();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function zn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=we.updateQueue,t===null&&(t=Ji(),we.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 Ps(){return{destroy:void 0,resource:void 0}}function jd(){return Qe().memoizedState}function Js(e,t,a,n){var i=ht();n=n===void 0?null:n,we.flags|=e,i.memoizedState=zn(1|t,Ps(),a,n)}function Dl(e,t,a,n){var i=Qe();n=n===void 0?null:n;var c=i.memoizedState.inst;ze!==null&&n!==null&&Ki(n,ze.memoizedState.deps)?i.memoizedState=zn(t,c,a,n):(we.flags|=e,i.memoizedState=zn(1|t,c,a,n))}function Ed(e,t){Js(8390656,8,e,t)}function Cd(e,t){Dl(2048,8,e,t)}function kd(e,t){return Dl(4,2,e,t)}function Ad(e,t){return Dl(4,4,e,t)}function Td(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 Rd(e,t,a){a=a!=null?a.concat([e]):null,Dl(4,4,Td.bind(null,t,e),a)}function ao(){}function Od(e,t){var a=Qe();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Ki(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Md(e,t){var a=Qe();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Ki(t,n[1]))return n[0];if(n=e(),tn){pa(!0);try{e()}finally{pa(!1)}}return a.memoizedState=[n,t],n}function no(e,t,a){return a===void 0||(Na&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Lf(),we.lanes|=e,Ra|=e,a)}function zd(e,t,a,n){return bt(a,t)?a:Rn.current!==null?(e=no(e,a,n),bt(e,t)||(We=!0),e):(Na&42)===0?(We=!0,e.memoizedState=a):(e=Lf(),we.lanes|=e,Ra|=e,t)}function Dd(e,t,a,n,i){var c=F.p;F.p=c!==0&&8>c?c:8;var p=G.T,b={};G.T=b,ro(e,!1,t,a);try{var E=i(),H=G.S;if(H!==null&&H(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var K=L0(E,n);Ul(e,t,K,jt(e))}else Ul(e,t,n,jt(e))}catch(P){Ul(e,t,{then:function(){},status:"rejected",reason:P},jt())}finally{F.p=c,G.T=p}}function G0(){}function lo(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Ud(e).queue;Dd(e,i,t,q,a===null?G0:function(){return Ld(e),a(n)})}function Ud(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:q},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sa,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ld(e){var t=Ud(e).next.queue;Ul(e,t,{},jt())}function so(){return rt(Il)}function _d(){return Qe().memoizedState}function Hd(){return Qe().memoizedState}function V0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=jt();e=wa(a);var n=Sa(t,e,a);n!==null&&(Et(n,t,a),Tl(n,t,a)),t={cache:Ui()},e.payload=t;return}t=t.return}}function Y0(e,t,a){var n=jt();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Fs(e)?qd(t,a):(a=Ei(e,t,a,n),a!==null&&(Et(a,e,n),Gd(a,t,n)))}function Bd(e,t,a){var n=jt();Ul(e,t,a,n)}function Ul(e,t,a,n){var i={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))qd(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var p=t.lastRenderedState,b=c(p,a);if(i.hasEagerState=!0,i.eagerState=b,bt(b,p))return Ds(e,t,i,0),_e===null&&zs(),!1}catch{}finally{}if(a=Ei(e,t,i,n),a!==null)return Et(a,e,n),Gd(a,t,n),!0}return!1}function ro(e,t,a,n){if(n={lane:2,revertLane:Bo(),action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(o(479))}else t=Ei(e,a,n,2),t!==null&&Et(t,e,2)}function Fs(e){var t=e.alternate;return e===we||t!==null&&t===we}function qd(e,t){On=Ks=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Gd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Pu(e,a)}}var Ws={readContext:rt,use:Xs,useCallback:Ye,useContext:Ye,useEffect:Ye,useImperativeHandle:Ye,useLayoutEffect:Ye,useInsertionEffect:Ye,useMemo:Ye,useReducer:Ye,useRef:Ye,useState:Ye,useDebugValue:Ye,useDeferredValue:Ye,useTransition:Ye,useSyncExternalStore:Ye,useId:Ye,useHostTransitionStatus:Ye,useFormState:Ye,useActionState:Ye,useOptimistic:Ye,useMemoCache:Ye,useCacheRefresh:Ye},Vd={readContext:rt,use:Xs,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:rt,useEffect:Ed,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Js(4194308,4,Td.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Js(4194308,4,e,t)},useInsertionEffect:function(e,t){Js(4,2,e,t)},useMemo:function(e,t){var a=ht();t=t===void 0?null:t;var n=e();if(tn){pa(!0);try{e()}finally{pa(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ht();if(a!==void 0){var i=a(t);if(tn){pa(!0);try{a(t)}finally{pa(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=Y0.bind(null,we,e),[n.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=eo(e);var t=e.queue,a=Bd.bind(null,we,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ao,useDeferredValue:function(e,t){var a=ht();return no(a,e,t)},useTransition:function(){var e=eo(!1);return e=Dd.bind(null,we,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=we,i=ht();if(Re){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),_e===null)throw Error(o(349));(Ae&124)!==0||ud(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Ed(dd.bind(null,n,c,e),[e]),n.flags|=2048,zn(9,Ps(),cd.bind(null,n,c,a,t),null),a},useId:function(){var e=ht(),t=_e.identifierPrefix;if(Re){var a=aa,n=ta;a=(n&~(1<<32-yt(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=Qs++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=_0++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:so,useFormState:vd,useActionState:vd,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ro.bind(null,we,!0,a),a.dispatch=t,[e,t]},useMemoCache:Fi,useCacheRefresh:function(){return ht().memoizedState=V0.bind(null,we)}},Yd={readContext:rt,use:Xs,useCallback:Od,useContext:rt,useEffect:Cd,useImperativeHandle:Rd,useInsertionEffect:kd,useLayoutEffect:Ad,useMemo:Md,useReducer:Zs,useRef:jd,useState:function(){return Zs(sa)},useDebugValue:ao,useDeferredValue:function(e,t){var a=Qe();return zd(a,ze.memoizedState,e,t)},useTransition:function(){var e=Zs(sa)[0],t=Qe().memoizedState;return[typeof e=="boolean"?e:zl(e),t]},useSyncExternalStore:od,useId:_d,useHostTransitionStatus:so,useFormState:wd,useActionState:wd,useOptimistic:function(e,t){var a=Qe();return md(a,ze,e,t)},useMemoCache:Fi,useCacheRefresh:Hd},$0={readContext:rt,use:Xs,useCallback:Od,useContext:rt,useEffect:Cd,useImperativeHandle:Rd,useInsertionEffect:kd,useLayoutEffect:Ad,useMemo:Md,useReducer:Ii,useRef:jd,useState:function(){return Ii(sa)},useDebugValue:ao,useDeferredValue:function(e,t){var a=Qe();return ze===null?no(a,e,t):zd(a,ze.memoizedState,e,t)},useTransition:function(){var e=Ii(sa)[0],t=Qe().memoizedState;return[typeof e=="boolean"?e:zl(e),t]},useSyncExternalStore:od,useId:_d,useHostTransitionStatus:so,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var a=Qe();return ze!==null?md(a,ze,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Fi,useCacheRefresh:Hd},Dn=null,Ll=0;function Is(e){var t=Ll;return Ll+=1,Dn===null&&(Dn=[]),ed(Dn,e,t)}function _l(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function er(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $d(e){var t=e._init;return t(e._payload)}function Kd(e){function t(z,O){if(e){var _=z.deletions;_===null?(z.deletions=[O],z.flags|=16):_.push(O)}}function a(z,O){if(!e)return null;for(;O!==null;)t(z,O),O=O.sibling;return null}function n(z){for(var O=new Map;z!==null;)z.key!==null?O.set(z.key,z):O.set(z.index,z),z=z.sibling;return O}function i(z,O){return z=ea(z,O),z.index=0,z.sibling=null,z}function c(z,O,_){return z.index=_,e?(_=z.alternate,_!==null?(_=_.index,_<O?(z.flags|=67108866,O):_):(z.flags|=67108866,O)):(z.flags|=1048576,O)}function p(z){return e&&z.alternate===null&&(z.flags|=67108866),z}function b(z,O,_,Q){return O===null||O.tag!==6?(O=ki(_,z.mode,Q),O.return=z,O):(O=i(O,_),O.return=z,O)}function E(z,O,_,Q){var oe=_.type;return oe===j?K(z,O,_.props.children,Q,_.key):O!==null&&(O.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===L&&$d(oe)===O.type)?(O=i(O,_.props),_l(O,_),O.return=z,O):(O=Ls(_.type,_.key,_.props,null,z.mode,Q),_l(O,_),O.return=z,O)}function H(z,O,_,Q){return O===null||O.tag!==4||O.stateNode.containerInfo!==_.containerInfo||O.stateNode.implementation!==_.implementation?(O=Ai(_,z.mode,Q),O.return=z,O):(O=i(O,_.children||[]),O.return=z,O)}function K(z,O,_,Q,oe){return O===null||O.tag!==7?(O=Xa(_,z.mode,Q,oe),O.return=z,O):(O=i(O,_),O.return=z,O)}function P(z,O,_){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=ki(""+O,z.mode,_),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case v:return _=Ls(O.type,O.key,O.props,null,z.mode,_),_l(_,O),_.return=z,_;case M:return O=Ai(O,z.mode,_),O.return=z,O;case L:var Q=O._init;return O=Q(O._payload),P(z,O,_)}if(re(O)||ae(O))return O=Xa(O,z.mode,_,null),O.return=z,O;if(typeof O.then=="function")return P(z,Is(O),_);if(O.$$typeof===T)return P(z,qs(z,O),_);er(z,O)}return null}function B(z,O,_,Q){var oe=O!==null?O.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return oe!==null?null:b(z,O,""+_,Q);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case v:return _.key===oe?E(z,O,_,Q):null;case M:return _.key===oe?H(z,O,_,Q):null;case L:return oe=_._init,_=oe(_._payload),B(z,O,_,Q)}if(re(_)||ae(_))return oe!==null?null:K(z,O,_,Q,null);if(typeof _.then=="function")return B(z,O,Is(_),Q);if(_.$$typeof===T)return B(z,O,qs(z,_),Q);er(z,_)}return null}function V(z,O,_,Q,oe){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return z=z.get(_)||null,b(O,z,""+Q,oe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return z=z.get(Q.key===null?_:Q.key)||null,E(O,z,Q,oe);case M:return z=z.get(Q.key===null?_:Q.key)||null,H(O,z,Q,oe);case L:var Ne=Q._init;return Q=Ne(Q._payload),V(z,O,_,Q,oe)}if(re(Q)||ae(Q))return z=z.get(_)||null,K(O,z,Q,oe,null);if(typeof Q.then=="function")return V(z,O,_,Is(Q),oe);if(Q.$$typeof===T)return V(z,O,_,qs(O,Q),oe);er(O,Q)}return null}function xe(z,O,_,Q){for(var oe=null,Ne=null,he=O,pe=O=0,et=null;he!==null&&pe<_.length;pe++){he.index>pe?(et=he,he=null):et=he.sibling;var Te=B(z,he,_[pe],Q);if(Te===null){he===null&&(he=et);break}e&&he&&Te.alternate===null&&t(z,he),O=c(Te,O,pe),Ne===null?oe=Te:Ne.sibling=Te,Ne=Te,he=et}if(pe===_.length)return a(z,he),Re&&Pa(z,pe),oe;if(he===null){for(;pe<_.length;pe++)he=P(z,_[pe],Q),he!==null&&(O=c(he,O,pe),Ne===null?oe=he:Ne.sibling=he,Ne=he);return Re&&Pa(z,pe),oe}for(he=n(he);pe<_.length;pe++)et=V(he,z,pe,_[pe],Q),et!==null&&(e&&et.alternate!==null&&he.delete(et.key===null?pe:et.key),O=c(et,O,pe),Ne===null?oe=et:Ne.sibling=et,Ne=et);return e&&he.forEach(function(Ba){return t(z,Ba)}),Re&&Pa(z,pe),oe}function ge(z,O,_,Q){if(_==null)throw Error(o(151));for(var oe=null,Ne=null,he=O,pe=O=0,et=null,Te=_.next();he!==null&&!Te.done;pe++,Te=_.next()){he.index>pe?(et=he,he=null):et=he.sibling;var Ba=B(z,he,Te.value,Q);if(Ba===null){he===null&&(he=et);break}e&&he&&Ba.alternate===null&&t(z,he),O=c(Ba,O,pe),Ne===null?oe=Ba:Ne.sibling=Ba,Ne=Ba,he=et}if(Te.done)return a(z,he),Re&&Pa(z,pe),oe;if(he===null){for(;!Te.done;pe++,Te=_.next())Te=P(z,Te.value,Q),Te!==null&&(O=c(Te,O,pe),Ne===null?oe=Te:Ne.sibling=Te,Ne=Te);return Re&&Pa(z,pe),oe}for(he=n(he);!Te.done;pe++,Te=_.next())Te=V(he,z,pe,Te.value,Q),Te!==null&&(e&&Te.alternate!==null&&he.delete(Te.key===null?pe:Te.key),O=c(Te,O,pe),Ne===null?oe=Te:Ne.sibling=Te,Ne=Te);return e&&he.forEach(function(Kp){return t(z,Kp)}),Re&&Pa(z,pe),oe}function Ue(z,O,_,Q){if(typeof _=="object"&&_!==null&&_.type===j&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case v:e:{for(var oe=_.key;O!==null;){if(O.key===oe){if(oe=_.type,oe===j){if(O.tag===7){a(z,O.sibling),Q=i(O,_.props.children),Q.return=z,z=Q;break e}}else if(O.elementType===oe||typeof oe=="object"&&oe!==null&&oe.$$typeof===L&&$d(oe)===O.type){a(z,O.sibling),Q=i(O,_.props),_l(Q,_),Q.return=z,z=Q;break e}a(z,O);break}else t(z,O);O=O.sibling}_.type===j?(Q=Xa(_.props.children,z.mode,Q,_.key),Q.return=z,z=Q):(Q=Ls(_.type,_.key,_.props,null,z.mode,Q),_l(Q,_),Q.return=z,z=Q)}return p(z);case M:e:{for(oe=_.key;O!==null;){if(O.key===oe)if(O.tag===4&&O.stateNode.containerInfo===_.containerInfo&&O.stateNode.implementation===_.implementation){a(z,O.sibling),Q=i(O,_.children||[]),Q.return=z,z=Q;break e}else{a(z,O);break}else t(z,O);O=O.sibling}Q=Ai(_,z.mode,Q),Q.return=z,z=Q}return p(z);case L:return oe=_._init,_=oe(_._payload),Ue(z,O,_,Q)}if(re(_))return xe(z,O,_,Q);if(ae(_)){if(oe=ae(_),typeof oe!="function")throw Error(o(150));return _=oe.call(_),ge(z,O,_,Q)}if(typeof _.then=="function")return Ue(z,O,Is(_),Q);if(_.$$typeof===T)return Ue(z,O,qs(z,_),Q);er(z,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,O!==null&&O.tag===6?(a(z,O.sibling),Q=i(O,_),Q.return=z,z=Q):(a(z,O),Q=ki(_,z.mode,Q),Q.return=z,z=Q),p(z)):a(z,O)}return function(z,O,_,Q){try{Ll=0;var oe=Ue(z,O,_,Q);return Dn=null,oe}catch(he){if(he===kl||he===Vs)throw he;var Ne=vt(29,he,null,z.mode);return Ne.lanes=Q,Ne.return=z,Ne}finally{}}}var Un=Kd(!0),Qd=Kd(!1),Mt=$(null),$t=null;function ja(e){var t=e.alternate;Z(Ze,Ze.current&1),Z(Mt,e),$t===null&&(t===null||Rn.current!==null||t.memoizedState!==null)&&($t=e)}function Xd(e){if(e.tag===22){if(Z(Ze,Ze.current),Z(Mt,e),$t===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&($t=e)}}else Ea()}function Ea(){Z(Ze,Ze.current),Z(Mt,Mt.current)}function ra(e){W(Mt),$t===e&&($t=null),W(Ze)}var Ze=$(0);function tr(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==="$?"||Fo(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)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 io(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var oo={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=jt(),i=wa(n);i.payload=t,a!=null&&(i.callback=a),t=Sa(e,i,n),t!==null&&(Et(t,e,n),Tl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=jt(),i=wa(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Sa(e,i,n),t!==null&&(Et(t,e,n),Tl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=jt(),n=wa(a);n.tag=2,t!=null&&(n.callback=t),t=Sa(e,n,a),t!==null&&(Et(t,e,a),Tl(t,e,a))}};function Zd(e,t,a,n,i,c,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,p):t.prototype&&t.prototype.isPureReactComponent?!bl(a,n)||!bl(i,c):!0}function Pd(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 an(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=y({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}var ar=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 Jd(e){ar(e)}function Fd(e){console.error(e)}function Wd(e){ar(e)}function nr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Id(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function uo(e,t,a){return a=wa(a),a.tag=3,a.payload={element:null},a.callback=function(){nr(e,t)},a}function ef(e){return e=wa(e),e.tag=3,e}function tf(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var c=n.value;e.payload=function(){return i(c)},e.callback=function(){Id(t,a,n)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Id(t,a,n),typeof i!="function"&&(Oa===null?Oa=new Set([this]):Oa.add(this));var b=n.stack;this.componentDidCatch(n.value,{componentStack:b!==null?b:""})})}function K0(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&jl(t,a,i,!0),a=Mt.current,a!==null){switch(a.tag){case 13:return $t===null?Do():a.alternate===null&&Ve===0&&(Ve=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Hi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Lo(e,n,i)),!1;case 22:return a.flags|=65536,n===Hi?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)),Lo(e,n,i)),!1}throw Error(o(435,a.tag))}return Lo(e,n,i),Do(),!1}if(Re)return t=Mt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Oi&&(e=Error(o(422),{cause:n}),Nl(At(e,a)))):(n!==Oi&&(t=Error(o(423),{cause:n}),Nl(At(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=At(n,a),i=uo(e.stateNode,n,i),Gi(e,i),Ve!==4&&(Ve=2)),!1;var c=Error(o(520),{cause:n});if(c=At(c,a),$l===null?$l=[c]:$l.push(c),Ve!==4&&(Ve=2),t===null)return!0;n=At(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=uo(a.stateNode,n,e),Gi(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Oa===null||!Oa.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=ef(i),tf(i,e,a,n),Gi(a,i),!1}a=a.return}while(a!==null);return!1}var af=Error(o(461)),We=!1;function at(e,t,a,n){t.child=e===null?Qd(t,null,a,n):Un(t,e.child,a,n)}function nf(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var p={};for(var b in n)b!=="ref"&&(p[b]=n[b])}else p=n;return Ia(t),n=Qi(e,t,a,p,c,i),b=Xi(),e!==null&&!We?(Zi(e,t,i),ia(e,t,i)):(Re&&b&&Ti(t),t.flags|=1,at(e,t,n,i),t.child)}function lf(e,t,a,n,i){if(e===null){var c=a.type;return typeof c=="function"&&!Ci(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,sf(e,t,c,n,i)):(e=Ls(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yo(e,i)){var p=c.memoizedProps;if(a=a.compare,a=a!==null?a:bl,a(p,n)&&e.ref===t.ref)return ia(e,t,i)}return t.flags|=1,e=ea(c,n),e.ref=t.ref,e.return=t,t.child=e}function sf(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(bl(c,n)&&e.ref===t.ref)if(We=!1,t.pendingProps=n=c,yo(e,i))(e.flags&131072)!==0&&(We=!0);else return t.lanes=e.lanes,ia(e,t,i)}return co(e,t,a,n,i)}function rf(e,t,a){var n=t.pendingProps,i=n.children,c=e!==null?e.memoizedState:null;if(n.mode==="hidden"){if((t.flags&128)!==0){if(n=c!==null?c.baseLanes|a:a,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;t.childLanes=c&~n}else t.childLanes=0,t.child=null;return of(e,t,n,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gs(t,c!==null?c.cachePool:null),c!==null?sd(t,c):Yi(),Xd(t);else return t.lanes=t.childLanes=536870912,of(e,t,c!==null?c.baseLanes|a:a,a)}else c!==null?(Gs(t,c.cachePool),sd(t,c),Ea(),t.memoizedState=null):(e!==null&&Gs(t,null),Yi(),Ea());return at(e,t,i,a),t.child}function of(e,t,a,n){var i=_i();return i=i===null?null:{parent:Xe._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Gs(t,null),Yi(),Xd(t),e!==null&&jl(e,t,n,!0),null}function lr(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(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function co(e,t,a,n,i){return Ia(t),a=Qi(e,t,a,n,void 0,i),n=Xi(),e!==null&&!We?(Zi(e,t,i),ia(e,t,i)):(Re&&n&&Ti(t),t.flags|=1,at(e,t,a,i),t.child)}function uf(e,t,a,n,i,c){return Ia(t),t.updateQueue=null,a=id(t,n,a,i),rd(e),n=Xi(),e!==null&&!We?(Zi(e,t,c),ia(e,t,c)):(Re&&n&&Ti(t),t.flags|=1,at(e,t,a,c),t.child)}function cf(e,t,a,n,i){if(Ia(t),t.stateNode===null){var c=En,p=a.contextType;typeof p=="object"&&p!==null&&(c=rt(p)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=oo,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Bi(t),p=a.contextType,c.context=typeof p=="object"&&p!==null?rt(p):En,c.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(io(t,a,p,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(p=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),p!==c.state&&oo.enqueueReplaceState(c,c.state,null),Ol(t,n,c,i),Rl(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,E=an(a,b);c.props=E;var H=c.context,K=a.contextType;p=En,typeof K=="object"&&K!==null&&(p=rt(K));var P=a.getDerivedStateFromProps;K=typeof P=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,K||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||H!==p)&&Pd(t,c,n,p),va=!1;var B=t.memoizedState;c.state=B,Ol(t,n,c,i),Rl(),H=t.memoizedState,b||B!==H||va?(typeof P=="function"&&(io(t,a,P,n),H=t.memoizedState),(E=va||Zd(t,a,E,n,B,H,p))?(K||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=H),c.props=n,c.state=H,c.context=p,n=E):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,qi(e,t),p=t.memoizedProps,K=an(a,p),c.props=K,P=t.pendingProps,B=c.context,H=a.contextType,E=En,typeof H=="object"&&H!==null&&(E=rt(H)),b=a.getDerivedStateFromProps,(H=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(p!==P||B!==E)&&Pd(t,c,n,E),va=!1,B=t.memoizedState,c.state=B,Ol(t,n,c,i),Rl();var V=t.memoizedState;p!==P||B!==V||va||e!==null&&e.dependencies!==null&&Bs(e.dependencies)?(typeof b=="function"&&(io(t,a,b,n),V=t.memoizedState),(K=va||Zd(t,a,K,n,B,V,E)||e!==null&&e.dependencies!==null&&Bs(e.dependencies))?(H||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,V,E),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,V,E)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=V),c.props=n,c.state=V,c.context=E,n=K):(typeof c.componentDidUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&B===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,lr(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=Un(t,e.child,null,i),t.child=Un(t,null,a,i)):at(e,t,a,i),t.memoizedState=c.state,e=t.child):e=ia(e,t,i),e}function df(e,t,a,n){return Sl(),t.flags|=256,at(e,t,a,n),t.child}var fo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ho(e){return{baseLanes:e,cachePool:Fc()}}function mo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=zt),e}function ff(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,p;if((p=c)||(p=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),p&&(i=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Re){if(i?ja(t):Ea(),Re){var b=Ge,E;if(E=b){e:{for(E=b,b=Yt;E.nodeType!==8;){if(!b){b=null;break e}if(E=Bt(E.nextSibling),E===null){b=null;break e}}b=E}b!==null?(t.memoizedState={dehydrated:b,treeContext:Za!==null?{id:ta,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},E=vt(18,null,null,0),E.stateNode=b,E.return=t,t.child=E,ut=t,Ge=null,E=!0):E=!1}E||Fa(t)}if(b=t.memoizedState,b!==null&&(b=b.dehydrated,b!==null))return Fo(b)?t.lanes=32:t.lanes=536870912,null;ra(t)}return b=n.children,n=n.fallback,i?(Ea(),i=t.mode,b=sr({mode:"hidden",children:b},i),n=Xa(n,i,a,null),b.return=t,n.return=t,b.sibling=n,t.child=b,i=t.child,i.memoizedState=ho(a),i.childLanes=mo(e,p,a),t.memoizedState=fo,n):(ja(t),go(t,b))}if(E=e.memoizedState,E!==null&&(b=E.dehydrated,b!==null)){if(c)t.flags&256?(ja(t),t.flags&=-257,t=po(e,t,a)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),i=n.fallback,b=t.mode,n=sr({mode:"visible",children:n.children},b),i=Xa(i,b,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,Un(t,e.child,null,a),n=t.child,n.memoizedState=ho(a),n.childLanes=mo(e,p,a),t.memoizedState=fo,t=i);else if(ja(t),Fo(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var H=p.dgst;p=H,n=Error(o(419)),n.stack="",n.digest=p,Nl({value:n,source:null,stack:null}),t=po(e,t,a)}else if(We||jl(e,t,a,!1),p=(a&e.childLanes)!==0,We||p){if(p=_e,p!==null&&(n=a&-a,n=(n&42)!==0?1:Fr(n),n=(n&(p.suspendedLanes|a))!==0?0:n,n!==0&&n!==E.retryLane))throw E.retryLane=n,jn(e,n),Et(p,e,n),af;b.data==="$?"||Do(),t=po(e,t,a)}else b.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Ge=Bt(b.nextSibling),ut=t,Re=!0,Ja=null,Yt=!1,e!==null&&(Rt[Ot++]=ta,Rt[Ot++]=aa,Rt[Ot++]=Za,ta=e.id,aa=e.overflow,Za=t),t=go(t,n.children),t.flags|=4096);return t}return i?(Ea(),i=n.fallback,b=t.mode,E=e.child,H=E.sibling,n=ea(E,{mode:"hidden",children:n.children}),n.subtreeFlags=E.subtreeFlags&65011712,H!==null?i=ea(H,i):(i=Xa(i,b,a,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,b=e.child.memoizedState,b===null?b=ho(a):(E=b.cachePool,E!==null?(H=Xe._currentValue,E=E.parent!==H?{parent:H,pool:H}:E):E=Fc(),b={baseLanes:b.baseLanes|a,cachePool:E}),i.memoizedState=b,i.childLanes=mo(e,p,a),t.memoizedState=fo,n):(ja(t),a=e.child,e=a.sibling,a=ea(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function go(e,t){return t=sr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function sr(e,t){return e=vt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function po(e,t,a){return Un(t,e.child,null,a),e=go(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hf(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),zi(e.return,t,a)}function xo(e,t,a,n,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=n,c.tail=a,c.tailMode=i)}function mf(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;if(at(e,t,n.children,a),n=Ze.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hf(e,a,t);else if(e.tag===19)hf(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(Z(Ze,n),i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&tr(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),xo(t,!1,i,a,c);break;case"backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&tr(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}xo(t,!0,a,null,c);break;case"together":xo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ia(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ra|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(jl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=ea(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ea(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function yo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bs(e)))}function Q0(e,t,a){switch(t.tag){case 3:le(t,t.stateNode.containerInfo),ba(t,Xe,e.memoizedState.cache),Sl();break;case 27:case 5:tt(t);break;case 4:le(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(ja(t),t.flags|=128,null):(a&t.child.childLanes)!==0?ff(e,t,a):(ja(t),e=ia(e,t,a),e!==null?e.sibling:null);ja(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(jl(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return mf(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Z(Ze,Ze.current),n)break;return null;case 22:case 23:return t.lanes=0,rf(e,t,a);case 24:ba(t,Xe,e.memoizedState.cache)}return ia(e,t,a)}function gf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)We=!0;else{if(!yo(e,a)&&(t.flags&128)===0)return We=!1,Q0(e,t,a);We=(e.flags&131072)!==0}else We=!1,Re&&(t.flags&1048576)!==0&&$c(t,Hs,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,i=n._init;if(n=i(n._payload),t.type=n,typeof n=="function")Ci(n)?(e=an(n,e),t.tag=1,t=cf(null,t,n,e,a)):(t.tag=0,t=co(null,t,n,e,a));else{if(n!=null){if(i=n.$$typeof,i===D){t.tag=11,t=nf(null,t,n,e,a);break e}else if(i===Y){t.tag=14,t=lf(null,t,n,e,a);break e}}throw t=ie(n)||n,Error(o(306,t,""))}}return t;case 0:return co(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=an(n,t.pendingProps),cf(e,t,n,i,a);case 3:e:{if(le(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,qi(e,t),Ol(t,n,null,a);var p=t.memoizedState;if(n=p.cache,ba(t,Xe,n),n!==c.cache&&Di(t,[Xe],a,!0),Rl(),n=p.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=df(e,t,n,a);break e}else if(n!==i){i=At(Error(o(424)),t),Nl(i),t=df(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(Ge=Bt(e.firstChild),ut=t,Re=!0,Ja=null,Yt=!0,a=Qd(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Sl(),n===i){t=ia(e,t,a);break e}at(e,t,n,a)}t=t.child}return t;case 26:return lr(e,t),e===null?(a=bh(t.type,null,t.pendingProps,null))?t.memoizedState=a:Re||(a=t.type,e=t.pendingProps,n=br(J.current).createElement(a),n[st]=t,n[dt]=e,lt(n,a,e),Fe(n),t.stateNode=n):t.memoizedState=bh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return tt(t),e===null&&Re&&(n=t.stateNode=ph(t.type,t.pendingProps,J.current),ut=t,Yt=!0,i=Ge,Da(t.type)?(Wo=i,Ge=Bt(n.firstChild)):Ge=i),at(e,t,t.pendingProps.children,a),lr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Re&&((i=n=Ge)&&(n=vp(n,t.type,t.pendingProps,Yt),n!==null?(t.stateNode=n,ut=t,Ge=Bt(n.firstChild),Yt=!1,i=!0):i=!1),i||Fa(t)),tt(t),i=t.type,c=t.pendingProps,p=e!==null?e.memoizedProps:null,n=c.children,Zo(i,c)?n=null:p!==null&&Zo(i,p)&&(t.flags|=32),t.memoizedState!==null&&(i=Qi(e,t,H0,null,null,a),Il._currentValue=i),lr(e,t),at(e,t,n,a),t.child;case 6:return e===null&&Re&&((e=a=Ge)&&(a=wp(a,t.pendingProps,Yt),a!==null?(t.stateNode=a,ut=t,Ge=null,e=!0):e=!1),e||Fa(t)),null;case 13:return ff(e,t,a);case 4:return le(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Un(t,null,n,a):at(e,t,n,a),t.child;case 11:return nf(e,t,t.type,t.pendingProps,a);case 7:return at(e,t,t.pendingProps,a),t.child;case 8:return at(e,t,t.pendingProps.children,a),t.child;case 12:return at(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,ba(t,t.type,n.value),at(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,Ia(t),i=rt(i),n=n(i),t.flags|=1,at(e,t,n,a),t.child;case 14:return lf(e,t,t.type,t.pendingProps,a);case 15:return sf(e,t,t.type,t.pendingProps,a);case 19:return mf(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=sr(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=ea(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return rf(e,t,a);case 24:return Ia(t),n=rt(Xe),e===null?(i=_i(),i===null&&(i=_e,c=Ui(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},Bi(t),ba(t,Xe,i)):((e.lanes&a)!==0&&(qi(e,t),Ol(t,null,null,a),Rl()),i=e.memoizedState,c=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ba(t,Xe,n)):(n=c.cache,ba(t,Xe,n),n!==i.cache&&Di(t,[Xe],a,!0))),at(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function oa(e){e.flags|=4}function pf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jh(t)){if(t=Mt.current,t!==null&&((Ae&4194048)===Ae?$t!==null:(Ae&62914560)!==Ae&&(Ae&536870912)===0||t!==$t))throw Al=Hi,Wc;e.flags|=8192}}function rr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xu():536870912,e.lanes|=t,Bn|=t)}function Hl(e,t){if(!Re)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 qe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function X0(e,t,a){var n=t.pendingProps;switch(Ri(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(t),null;case 1:return qe(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(Xe),me(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(wl(t)?oa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xc())),qe(t),null;case 26:return a=t.memoizedState,e===null?(oa(t),a!==null?(qe(t),pf(t,a)):(qe(t),t.flags&=-16777217)):a?a!==e.memoizedState?(oa(t),qe(t),pf(t,a)):(qe(t),t.flags&=-16777217):(e.memoizedProps!==n&&oa(t),qe(t),t.flags&=-16777217),null;case 27:ct(t),a=J.current;var i=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&oa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return qe(t),null}e=ne.current,wl(t)?Kc(t):(e=ph(i,n,a),t.stateNode=e,oa(t))}return qe(t),null;case 5:if(ct(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&oa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return qe(t),null}if(e=ne.current,wl(t))Kc(t);else{switch(i=br(J.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?i.createElement("select",{is:n.is}):i.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?i.createElement(a,{is:n.is}):i.createElement(a)}}e[st]=t,e[dt]=n;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(lt(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&&oa(t)}}return qe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&oa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=J.current,wl(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=ut,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[st]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||uh(e.nodeValue,a)),e||Fa(t)}else e=br(e).createTextNode(n),e[st]=t,t.stateNode=e}return qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=wl(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[st]=t}else Sl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;qe(t),i=!1}else i=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ra(t),t):(ra(t),null)}if(ra(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool);var c=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==i&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),rr(t,t.updateQueue),qe(t),null;case 4:return me(),e===null&&Yo(t.stateNode.containerInfo),qe(t),null;case 10:return la(t.type),qe(t),null;case 19:if(W(Ze),i=t.memoizedState,i===null)return qe(t),null;if(n=(t.flags&128)!==0,c=i.rendering,c===null)if(n)Hl(i,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=tr(e),c!==null){for(t.flags|=128,Hl(i,!1),e=c.updateQueue,t.updateQueue=e,rr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Yc(a,e),a=a.sibling;return Z(Ze,Ze.current&1|2),t.child}e=e.sibling}i.tail!==null&&Vt()>ur&&(t.flags|=128,n=!0,Hl(i,!1),t.lanes=4194304)}else{if(!n)if(e=tr(c),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,rr(t,e),Hl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Re)return qe(t),null}else 2*Vt()-i.renderingStartTime>ur&&a!==536870912&&(t.flags|=128,n=!0,Hl(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(e=i.last,e!==null?e.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Vt(),t.sibling=null,e=Ze.current,Z(Ze,n?e&1|2:e&1),t):(qe(t),null);case 22:case 23:return ra(t),$i(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(qe(t),t.subtreeFlags&6&&(t.flags|=8192)):qe(t),a=t.updateQueue,a!==null&&rr(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&&W(en),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),la(Xe),qe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Z0(e,t){switch(Ri(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(Xe),me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ct(t),null;case 13:if(ra(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Sl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(Ze),null;case 4:return me(),null;case 10:return la(t.type),null;case 22:case 23:return ra(t),$i(),e!==null&&W(en),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(Xe),null;case 25:return null;default:return null}}function xf(e,t){switch(Ri(t),t.tag){case 3:la(Xe),me();break;case 26:case 27:case 5:ct(t);break;case 4:me();break;case 13:ra(t);break;case 19:W(Ze);break;case 10:la(t.type);break;case 22:case 23:ra(t),$i(),e!==null&&W(en);break;case 24:la(Xe)}}function Bl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){n=void 0;var c=a.create,p=a.inst;n=c(),p.destroy=n}a=a.next}while(a!==i)}}catch(b){Le(t,t.return,b)}}function Ca(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next;n=c;do{if((n.tag&e)===e){var p=n.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,i=t;var E=a,H=b;try{H()}catch(K){Le(i,E,K)}}}n=n.next}while(n!==c)}}catch(K){Le(t,t.return,K)}}function yf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ld(t,a)}catch(n){Le(e,e.return,n)}}}function bf(e,t,a){a.props=an(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Le(e,t,n)}}function ql(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(i){Le(e,t,i)}}function Kt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){Le(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){Le(e,t,i)}else a.current=null}function vf(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(i){Le(e,e.return,i)}}function bo(e,t,a){try{var n=e.stateNode;gp(n,e.type,a,t),n[dt]=t}catch(i){Le(e,e.return,i)}}function wf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Da(e.type)||e.tag===4}function vo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wf(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&&Da(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 wo(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=yr));else if(n!==4&&(n===27&&Da(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(wo(e,t,a),e=e.sibling;e!==null;)wo(e,t,a),e=e.sibling}function ir(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&&Da(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ir(e,t,a),e=e.sibling;e!==null;)ir(e,t,a),e=e.sibling}function Sf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);lt(t,n,a),t[st]=e,t[dt]=a}catch(c){Le(e,e.return,c)}}var ua=!1,$e=!1,So=!1,Nf=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function P0(e,t){if(e=e.containerInfo,Qo=Er,e=zc(e),bi(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 i=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var p=0,b=-1,E=-1,H=0,K=0,P=e,B=null;t:for(;;){for(var V;P!==a||i!==0&&P.nodeType!==3||(b=p+i),P!==c||n!==0&&P.nodeType!==3||(E=p+n),P.nodeType===3&&(p+=P.nodeValue.length),(V=P.firstChild)!==null;)B=P,P=V;for(;;){if(P===e)break t;if(B===a&&++H===i&&(b=p),B===c&&++K===n&&(E=p),(V=P.nextSibling)!==null)break;P=B,B=P.parentNode}P=V}a=b===-1||E===-1?null:{start:b,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xo={focusedElem:e,selectionRange:a},Er=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){switch(t=Ie,c=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,i=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var xe=an(a.type,i,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(xe,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(ge){Le(a,a.return,ge)}}break;case 3:if((e&1024)!==0){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)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Ie=e;break}Ie=t.return}}function jf(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:ka(e,a),n&4&&Bl(5,a);break;case 1:if(ka(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){Le(a,a.return,p)}else{var i=an(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Le(a,a.return,p)}}n&64&&yf(a),n&512&&ql(a,a.return);break;case 3:if(ka(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{ld(e,t)}catch(p){Le(a,a.return,p)}}break;case 27:t===null&&n&4&&Sf(a);case 26:case 5:ka(e,a),t===null&&n&4&&vf(a),n&512&&ql(a,a.return);break;case 12:ka(e,a);break;case 13:ka(e,a),n&4&&kf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=lp.bind(null,a),Sp(e,a))));break;case 22:if(n=a.memoizedState!==null||ua,!n){t=t!==null&&t.memoizedState!==null||$e,i=ua;var c=$e;ua=n,($e=t)&&!c?Aa(e,a,(a.subtreeFlags&8772)!==0):ka(e,a),ua=i,$e=c}break;case 30:break;default:ka(e,a)}}function Ef(e){var t=e.alternate;t!==null&&(e.alternate=null,Ef(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ei(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 He=null,mt=!1;function ca(e,t,a){for(a=a.child;a!==null;)Cf(e,t,a),a=a.sibling}function Cf(e,t,a){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(il,a)}catch{}switch(a.tag){case 26:$e||Kt(a,t),ca(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:$e||Kt(a,t);var n=He,i=mt;Da(a.type)&&(He=a.stateNode,mt=!1),ca(e,t,a),Pl(a.stateNode),He=n,mt=i;break;case 5:$e||Kt(a,t);case 6:if(n=He,i=mt,He=null,ca(e,t,a),He=n,mt=i,He!==null)if(mt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(c){Le(a,t,c)}else try{He.removeChild(a.stateNode)}catch(c){Le(a,t,c)}break;case 18:He!==null&&(mt?(e=He,mh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ns(e)):mh(He,a.stateNode));break;case 4:n=He,i=mt,He=a.stateNode.containerInfo,mt=!0,ca(e,t,a),He=n,mt=i;break;case 0:case 11:case 14:case 15:$e||Ca(2,a,t),$e||Ca(4,a,t),ca(e,t,a);break;case 1:$e||(Kt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&bf(a,t,n)),ca(e,t,a);break;case 21:ca(e,t,a);break;case 22:$e=(n=$e)||a.memoizedState!==null,ca(e,t,a),$e=n;break;default:ca(e,t,a)}}function kf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ns(e)}catch(a){Le(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 Nf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nf),t;default:throw Error(o(435,e.tag))}}function No(e,t){var a=J0(e);t.forEach(function(n){var i=sp.bind(null,e,n);a.has(n)||(a.add(n),n.then(i,i))})}function wt(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,p=t,b=p;e:for(;b!==null;){switch(b.tag){case 27:if(Da(b.type)){He=b.stateNode,mt=!1;break e}break;case 5:He=b.stateNode,mt=!1;break e;case 3:case 4:He=b.stateNode.containerInfo,mt=!0;break e}b=b.return}if(He===null)throw Error(o(160));Cf(c,p,i),He=null,mt=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Af(t,e),t=t.sibling}var Ht=null;function Af(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wt(t,e),St(e),n&4&&(Ca(3,e,e.return),Bl(3,e),Ca(5,e,e.return));break;case 1:wt(t,e),St(e),n&512&&($e||a===null||Kt(a,a.return)),n&64&&ua&&(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 i=Ht;if(wt(t,e),St(e),n&512&&($e||a===null||Kt(a,a.return)),n&4){var c=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,i=i.ownerDocument||i;t:switch(n){case"title":c=i.getElementsByTagName("title")[0],(!c||c[cl]||c[st]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),lt(c,n,a),c[st]=e,Fe(c),n=c;break e;case"link":var p=Sh("link","href",i).get(n+(a.href||""));if(p){for(var b=0;b<p.length;b++)if(c=p[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(b,1);break t}}c=i.createElement(n),lt(c,n,a),i.head.appendChild(c);break;case"meta":if(p=Sh("meta","content",i).get(n+(a.content||""))){for(b=0;b<p.length;b++)if(c=p[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(b,1);break t}}c=i.createElement(n),lt(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[st]=e,Fe(c),n=c}e.stateNode=n}else Nh(i,e.type,e.stateNode);else e.stateNode=wh(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?Nh(i,e.type,e.stateNode):wh(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&bo(e,e.memoizedProps,a.memoizedProps)}break;case 27:wt(t,e),St(e),n&512&&($e||a===null||Kt(a,a.return)),a!==null&&n&4&&bo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(wt(t,e),St(e),n&512&&($e||a===null||Kt(a,a.return)),e.flags&32){i=e.stateNode;try{xn(i,"")}catch(V){Le(e,e.return,V)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,bo(e,i,a!==null?a.memoizedProps:i)),n&1024&&(So=!0);break;case 6:if(wt(t,e),St(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(V){Le(e,e.return,V)}}break;case 3:if(Sr=null,i=Ht,Ht=vr(t.containerInfo),wt(t,e),Ht=i,St(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{ns(t.containerInfo)}catch(V){Le(e,e.return,V)}So&&(So=!1,Tf(e));break;case 4:n=Ht,Ht=vr(e.stateNode.containerInfo),wt(t,e),St(e),Ht=n;break;case 12:wt(t,e),St(e);break;case 13:wt(t,e),St(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(To=Vt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,No(e,n)));break;case 22:i=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,H=ua,K=$e;if(ua=H||i,$e=K||E,wt(t,e),$e=K,ua=H,St(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||E||ua||$e||nn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(c=E.stateNode,i)p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{b=E.stateNode;var P=E.memoizedProps.style,B=P!=null&&P.hasOwnProperty("display")?P.display:null;b.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(V){Le(E,E.return,V)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=i?"":E.memoizedProps}catch(V){Le(E,E.return,V)}}}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,No(e,a))));break;case 19:wt(t,e),St(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,No(e,n)));break;case 30:break;case 21:break;default:wt(t,e),St(e)}}function St(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(wf(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=vo(e);ir(e,c,i);break;case 5:var p=a.stateNode;a.flags&32&&(xn(p,""),a.flags&=-33);var b=vo(e);ir(e,b,p);break;case 3:case 4:var E=a.stateNode.containerInfo,H=vo(e);wo(e,H,E);break;default:throw Error(o(161))}}catch(K){Le(e,e.return,K)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jf(e,t.alternate,t),t=t.sibling}function nn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ca(4,t,t.return),nn(t);break;case 1:Kt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&bf(t,t.return,a),nn(t);break;case 27:Pl(t.stateNode);case 26:case 5:Kt(t,t.return),nn(t);break;case 22:t.memoizedState===null&&nn(t);break;case 30:nn(t);break;default:nn(t)}e=e.sibling}}function Aa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,p=c.flags;switch(c.tag){case 0:case 11:case 15:Aa(i,c,a),Bl(4,c);break;case 1:if(Aa(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(H){Le(n,n.return,H)}if(n=c,i=n.updateQueue,i!==null){var b=n.stateNode;try{var E=i.shared.hiddenCallbacks;if(E!==null)for(i.shared.hiddenCallbacks=null,i=0;i<E.length;i++)nd(E[i],b)}catch(H){Le(n,n.return,H)}}a&&p&64&&yf(c),ql(c,c.return);break;case 27:Sf(c);case 26:case 5:Aa(i,c,a),a&&n===null&&p&4&&vf(c),ql(c,c.return);break;case 12:Aa(i,c,a);break;case 13:Aa(i,c,a),a&&p&4&&kf(i,c);break;case 22:c.memoizedState===null&&Aa(i,c,a),ql(c,c.return);break;case 30:break;default:Aa(i,c,a)}t=t.sibling}}function jo(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&&El(a))}function Eo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&El(e))}function Qt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rf(e,t,a,n),t=t.sibling}function Rf(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Qt(e,t,a,n),i&2048&&Bl(9,t);break;case 1:Qt(e,t,a,n);break;case 3:Qt(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&El(e)));break;case 12:if(i&2048){Qt(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,p=c.id,b=c.onPostCommit;typeof b=="function"&&b(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Le(t,t.return,E)}}else Qt(e,t,a,n);break;case 13:Qt(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,p=t.alternate,t.memoizedState!==null?c._visibility&2?Qt(e,t,a,n):Gl(e,t):c._visibility&2?Qt(e,t,a,n):(c._visibility|=2,Ln(e,t,a,n,(t.subtreeFlags&10256)!==0)),i&2048&&jo(p,t);break;case 24:Qt(e,t,a,n),i&2048&&Eo(t.alternate,t);break;default:Qt(e,t,a,n)}}function Ln(e,t,a,n,i){for(i=i&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var c=e,p=t,b=a,E=n,H=p.flags;switch(p.tag){case 0:case 11:case 15:Ln(c,p,b,E,i),Bl(8,p);break;case 23:break;case 22:var K=p.stateNode;p.memoizedState!==null?K._visibility&2?Ln(c,p,b,E,i):Gl(c,p):(K._visibility|=2,Ln(c,p,b,E,i)),i&&H&2048&&jo(p.alternate,p);break;case 24:Ln(c,p,b,E,i),i&&H&2048&&Eo(p.alternate,p);break;default:Ln(c,p,b,E,i)}t=t.sibling}}function Gl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:Gl(a,n),i&2048&&jo(n.alternate,n);break;case 24:Gl(a,n),i&2048&&Eo(n.alternate,n);break;default:Gl(a,n)}t=t.sibling}}var Vl=8192;function _n(e){if(e.subtreeFlags&Vl)for(e=e.child;e!==null;)Of(e),e=e.sibling}function Of(e){switch(e.tag){case 26:_n(e),e.flags&Vl&&e.memoizedState!==null&&Up(Ht,e.memoizedState,e.memoizedProps);break;case 5:_n(e);break;case 3:case 4:var t=Ht;Ht=vr(e.stateNode.containerInfo),_n(e),Ht=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Vl,Vl=16777216,_n(e),Vl=t):_n(e));break;default:_n(e)}}function Mf(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 Yl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Ie=n,Df(n,e)}Mf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zf(e),e=e.sibling}function zf(e){switch(e.tag){case 0:case 11:case 15:Yl(e),e.flags&2048&&Ca(9,e,e.return);break;case 3:Yl(e);break;case 12:Yl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,or(e)):Yl(e);break;default:Yl(e)}}function or(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Ie=n,Df(n,e)}Mf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ca(8,t,t.return),or(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,or(t));break;default:or(t)}e=e.sibling}}function Df(e,t){for(;Ie!==null;){var a=Ie;switch(a.tag){case 0:case 11:case 15:Ca(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:El(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Ie=n;else e:for(a=e;Ie!==null;){n=Ie;var i=n.sibling,c=n.return;if(Ef(n),n===a){Ie=null;break e}if(i!==null){i.return=c,Ie=i;break e}Ie=c}}}var F0={getCacheForType:function(e){var t=rt(Xe),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},W0=typeof WeakMap=="function"?WeakMap:Map,Oe=0,_e=null,je=null,Ae=0,Me=0,Nt=null,Ta=!1,Hn=!1,Co=!1,da=0,Ve=0,Ra=0,ln=0,ko=0,zt=0,Bn=0,$l=null,gt=null,Ao=!1,To=0,ur=1/0,cr=null,Oa=null,nt=0,Ma=null,qn=null,Gn=0,Ro=0,Oo=null,Uf=null,Kl=0,Mo=null;function jt(){if((Oe&2)!==0&&Ae!==0)return Ae&-Ae;if(G.T!==null){var e=An;return e!==0?e:Bo()}return Ju()}function Lf(){zt===0&&(zt=(Ae&536870912)===0||Re?Qu():536870912);var e=Mt.current;return e!==null&&(e.flags|=32),zt}function Et(e,t,a){(e===_e&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Vn(e,0),za(e,Ae,zt,!1)),ul(e,a),((Oe&2)===0||e!==_e)&&(e===_e&&((Oe&2)===0&&(ln|=a),Ve===4&&za(e,Ae,zt,!1)),Xt(e))}function _f(e,t,a){if((Oe&6)!==0)throw Error(o(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||ol(e,t),i=n?tp(e,t):Uo(e,t,!0),c=n;do{if(i===0){Hn&&!n&&za(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!I0(a)){i=Uo(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var b=e;i=$l;var E=b.current.memoizedState.isDehydrated;if(E&&(Vn(b,p).flags|=256),p=Uo(b,p,!1),p!==2){if(Co&&!E){b.errorRecoveryDisabledLanes|=c,ln|=c,i=4;break e}c=gt,gt=i,c!==null&&(gt===null?gt=c:gt.push.apply(gt,c))}i=p}if(c=!1,i!==2)continue}}if(i===1){Vn(e,0),za(e,t,0,!0);break}e:{switch(n=e,c=i,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:za(n,t,zt,!Ta);break e;case 2:gt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=To+300-Vt(),10<i)){if(za(n,t,zt,!Ta),ws(n,0,!0)!==0)break e;n.timeoutHandle=fh(Hf.bind(null,n,a,gt,cr,Ao,t,zt,ln,Bn,Ta,c,2,-0,0),i);break e}Hf(n,a,gt,cr,Ao,t,zt,ln,Bn,Ta,c,0,-0,0)}}break}while(!0);Xt(e)}function Hf(e,t,a,n,i,c,p,b,E,H,K,P,B,V){if(e.timeoutHandle=-1,P=t.subtreeFlags,(P&8192||(P&16785408)===16785408)&&(Wl={stylesheets:null,count:0,unsuspend:Dp},Of(t),P=Lp(),P!==null)){e.cancelPendingCommit=P(Kf.bind(null,e,t,c,a,n,i,p,b,E,K,1,B,V)),za(e,c,p,!H);return}Kf(e,t,c,a,n,i,p,b,E)}function I0(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 i=a[n],c=i.getSnapshot;i=i.value;try{if(!bt(c(),i))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 za(e,t,a,n){t&=~ko,t&=~ln,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-yt(i),p=1<<c;n[c]=-1,i&=~p}a!==0&&Zu(e,a,t)}function dr(){return(Oe&6)===0?(Ql(0),!1):!0}function zo(){if(je!==null){if(Me===0)var e=je.return;else e=je,na=Wa=null,Pi(e),Dn=null,Ll=0,e=je;for(;e!==null;)xf(e.alternate,e),e=e.return;je=null}}function Vn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,xp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),zo(),_e=e,je=a=ea(e.current,null),Ae=t,Me=0,Nt=null,Ta=!1,Hn=ol(e,t),Co=!1,Bn=zt=ko=ln=Ra=Ve=0,gt=$l=null,Ao=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-yt(n),c=1<<i;t|=e[i],n&=~c}return da=t,zs(),a}function Bf(e,t){we=null,G.H=Ws,t===kl||t===Vs?(t=td(),Me=3):t===Wc?(t=td(),Me=4):Me=t===af?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nt=t,je===null&&(Ve=1,nr(e,At(t,e.current)))}function qf(){var e=G.H;return G.H=Ws,e===null?Ws:e}function Gf(){var e=G.A;return G.A=F0,e}function Do(){Ve=4,Ta||(Ae&4194048)!==Ae&&Mt.current!==null||(Hn=!0),(Ra&134217727)===0&&(ln&134217727)===0||_e===null||za(_e,Ae,zt,!1)}function Uo(e,t,a){var n=Oe;Oe|=2;var i=qf(),c=Gf();(_e!==e||Ae!==t)&&(cr=null,Vn(e,t)),t=!1;var p=Ve;e:do try{if(Me!==0&&je!==null){var b=je,E=Nt;switch(Me){case 8:zo(),p=6;break e;case 3:case 2:case 9:case 6:Mt.current===null&&(t=!0);var H=Me;if(Me=0,Nt=null,Yn(e,b,E,H),a&&Hn){p=0;break e}break;default:H=Me,Me=0,Nt=null,Yn(e,b,E,H)}}ep(),p=Ve;break}catch(K){Bf(e,K)}while(!0);return t&&e.shellSuspendCounter++,na=Wa=null,Oe=n,G.H=i,G.A=c,je===null&&(_e=null,Ae=0,zs()),p}function ep(){for(;je!==null;)Vf(je)}function tp(e,t){var a=Oe;Oe|=2;var n=qf(),i=Gf();_e!==e||Ae!==t?(cr=null,ur=Vt()+500,Vn(e,t)):Hn=ol(e,t);e:do try{if(Me!==0&&je!==null){t=je;var c=Nt;t:switch(Me){case 1:Me=0,Nt=null,Yn(e,t,c,1);break;case 2:case 9:if(Ic(c)){Me=0,Nt=null,Yf(t);break}t=function(){Me!==2&&Me!==9||_e!==e||(Me=7),Xt(e)},c.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:Ic(c)?(Me=0,Nt=null,Yf(t)):(Me=0,Nt=null,Yn(e,t,c,7));break;case 5:var p=null;switch(je.tag){case 26:p=je.memoizedState;case 5:case 27:var b=je;if(!p||jh(p)){Me=0,Nt=null;var E=b.sibling;if(E!==null)je=E;else{var H=b.return;H!==null?(je=H,fr(H)):je=null}break t}}Me=0,Nt=null,Yn(e,t,c,5);break;case 6:Me=0,Nt=null,Yn(e,t,c,6);break;case 8:zo(),Ve=6;break e;default:throw Error(o(462))}}ap();break}catch(K){Bf(e,K)}while(!0);return na=Wa=null,G.H=n,G.A=i,Oe=a,je!==null?0:(_e=null,Ae=0,zs(),Ve)}function ap(){for(;je!==null&&!jg();)Vf(je)}function Vf(e){var t=gf(e.alternate,e,da);e.memoizedProps=e.pendingProps,t===null?fr(e):je=t}function Yf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=uf(a,t,t.pendingProps,t.type,void 0,Ae);break;case 11:t=uf(a,t,t.pendingProps,t.type.render,t.ref,Ae);break;case 5:Pi(t);default:xf(a,t),t=je=Yc(t,da),t=gf(a,t,da)}e.memoizedProps=e.pendingProps,t===null?fr(e):je=t}function Yn(e,t,a,n){na=Wa=null,Pi(t),Dn=null,Ll=0;var i=t.return;try{if(K0(e,i,t,a,Ae)){Ve=1,nr(e,At(a,e.current)),je=null;return}}catch(c){if(i!==null)throw je=i,c;Ve=1,nr(e,At(a,e.current)),je=null;return}t.flags&32768?(Re||n===1?e=!0:Hn||(Ae&536870912)!==0?e=!1:(Ta=e=!0,(n===2||n===9||n===3||n===6)&&(n=Mt.current,n!==null&&n.tag===13&&(n.flags|=16384))),$f(t,e)):fr(t)}function fr(e){var t=e;do{if((t.flags&32768)!==0){$f(t,Ta);return}e=t.return;var a=X0(t.alternate,t,da);if(a!==null){je=a;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);Ve===0&&(Ve=5)}function $f(e,t){do{var a=Z0(e.alternate,e);if(a!==null){a.flags&=32767,je=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=a}while(e!==null);Ve=6,je=null}function Kf(e,t,a,n,i,c,p,b,E){e.cancelPendingCommit=null;do hr();while(nt!==0);if((Oe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=ji,Dg(e,a,c,p,b,E),e===_e&&(je=_e=null,Ae=0),qn=t,Ma=e,Gn=a,Ro=c,Oo=i,Uf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,rp(ys,function(){return Jf(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=G.T,G.T=null,i=F.p,F.p=2,p=Oe,Oe|=4;try{P0(e,t,a)}finally{Oe=p,F.p=i,G.T=n}}nt=1,Qf(),Xf(),Zf()}}function Qf(){if(nt===1){nt=0;var e=Ma,t=qn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null;var n=F.p;F.p=2;var i=Oe;Oe|=4;try{Af(t,e);var c=Xo,p=zc(e.containerInfo),b=c.focusedElem,E=c.selectionRange;if(p!==b&&b&&b.ownerDocument&&Mc(b.ownerDocument.documentElement,b)){if(E!==null&&bi(b)){var H=E.start,K=E.end;if(K===void 0&&(K=H),"selectionStart"in b)b.selectionStart=H,b.selectionEnd=Math.min(K,b.value.length);else{var P=b.ownerDocument||document,B=P&&P.defaultView||window;if(B.getSelection){var V=B.getSelection(),xe=b.textContent.length,ge=Math.min(E.start,xe),Ue=E.end===void 0?ge:Math.min(E.end,xe);!V.extend&&ge>Ue&&(p=Ue,Ue=ge,ge=p);var z=Oc(b,ge),O=Oc(b,Ue);if(z&&O&&(V.rangeCount!==1||V.anchorNode!==z.node||V.anchorOffset!==z.offset||V.focusNode!==O.node||V.focusOffset!==O.offset)){var _=P.createRange();_.setStart(z.node,z.offset),V.removeAllRanges(),ge>Ue?(V.addRange(_),V.extend(O.node,O.offset)):(_.setEnd(O.node,O.offset),V.addRange(_))}}}}for(P=[],V=b;V=V.parentNode;)V.nodeType===1&&P.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<P.length;b++){var Q=P[b];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Er=!!Qo,Xo=Qo=null}finally{Oe=i,F.p=n,G.T=a}}e.current=t,nt=2}}function Xf(){if(nt===2){nt=0;var e=Ma,t=qn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=G.T,G.T=null;var n=F.p;F.p=2;var i=Oe;Oe|=4;try{jf(e,t.alternate,t)}finally{Oe=i,F.p=n,G.T=a}}nt=3}}function Zf(){if(nt===4||nt===3){nt=0,Eg();var e=Ma,t=qn,a=Gn,n=Uf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?nt=5:(nt=0,qn=Ma=null,Pf(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Oa=null),Wr(a),t=t.stateNode,xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(il,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=G.T,i=F.p,F.p=2,G.T=null;try{for(var c=e.onRecoverableError,p=0;p<n.length;p++){var b=n[p];c(b.value,{componentStack:b.stack})}}finally{G.T=t,F.p=i}}(Gn&3)!==0&&hr(),Xt(e),i=e.pendingLanes,(a&4194090)!==0&&(i&42)!==0?e===Mo?Kl++:(Kl=0,Mo=e):Kl=0,Ql(0)}}function Pf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,El(t)))}function hr(e){return Qf(),Xf(),Zf(),Jf()}function Jf(){if(nt!==5)return!1;var e=Ma,t=Ro;Ro=0;var a=Wr(Gn),n=G.T,i=F.p;try{F.p=32>a?32:a,G.T=null,a=Oo,Oo=null;var c=Ma,p=Gn;if(nt=0,qn=Ma=null,Gn=0,(Oe&6)!==0)throw Error(o(331));var b=Oe;if(Oe|=4,zf(c.current),Rf(c,c.current,p,a),Oe=b,Ql(0,!1),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(il,c)}catch{}return!0}finally{F.p=i,G.T=n,Pf(e,t)}}function Ff(e,t,a){t=At(a,t),t=uo(e.stateNode,t,2),e=Sa(e,t,2),e!==null&&(ul(e,2),Xt(e))}function Le(e,t,a){if(e.tag===3)Ff(e,e,a);else for(;t!==null;){if(t.tag===3){Ff(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Oa===null||!Oa.has(n))){e=At(a,e),a=ef(2),n=Sa(t,a,2),n!==null&&(tf(a,n,t,e),ul(n,2),Xt(n));break}}t=t.return}}function Lo(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new W0;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(Co=!0,i.add(a),e=np.bind(null,e,t,a),t.then(e,e))}function np(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,_e===e&&(Ae&a)===a&&(Ve===4||Ve===3&&(Ae&62914560)===Ae&&300>Vt()-To?(Oe&2)===0&&Vn(e,0):ko|=a,Bn===Ae&&(Bn=0)),Xt(e)}function Wf(e,t){t===0&&(t=Xu()),e=jn(e,t),e!==null&&(ul(e,t),Xt(e))}function lp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Wf(e,a)}function sp(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),Wf(e,a)}function rp(e,t){return Ft(e,t)}var mr=null,$n=null,_o=!1,gr=!1,Ho=!1,sn=0;function Xt(e){e!==$n&&e.next===null&&($n===null?mr=$n=e:$n=$n.next=e),gr=!0,_o||(_o=!0,op())}function Ql(e,t){if(!Ho&&gr){Ho=!0;do for(var a=!1,n=mr;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var p=n.suspendedLanes,b=n.pingedLanes;c=(1<<31-yt(42|e)+1)-1,c&=i&~(p&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,ah(n,c))}else c=Ae,c=ws(n,n===_e?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||ol(n,c)||(a=!0,ah(n,c));n=n.next}while(a);Ho=!1}}function ip(){If()}function If(){gr=_o=!1;var e=0;sn!==0&&(pp()&&(e=sn),sn=0);for(var t=Vt(),a=null,n=mr;n!==null;){var i=n.next,c=eh(n,t);c===0?(n.next=null,a===null?mr=i:a.next=i,i===null&&($n=a)):(a=n,(e!==0||(c&3)!==0)&&(gr=!0)),n=i}Ql(e)}function eh(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var p=31-yt(c),b=1<<p,E=i[p];E===-1?((b&a)===0||(b&n)!==0)&&(i[p]=zg(b,t)):E<=t&&(e.expiredLanes|=b),c&=~b}if(t=_e,a=Ae,a=ws(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&rl(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ol(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&rl(n),Wr(a)){case 2:case 8:a=$u;break;case 32:a=ys;break;case 268435456:a=Ku;break;default:a=ys}return n=th.bind(null,e),a=Ft(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&rl(n),e.callbackPriority=2,e.callbackNode=null,2}function th(e,t){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(hr()&&e.callbackNode!==a)return null;var n=Ae;return n=ws(e,e===_e?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(_f(e,n,t),eh(e,Vt()),e.callbackNode!=null&&e.callbackNode===a?th.bind(null,e):null)}function ah(e,t){if(hr())return null;_f(e,t,!0)}function op(){yp(function(){(Oe&6)!==0?Ft(Yu,ip):If()})}function Bo(){return sn===0&&(sn=Qu()),sn}function nh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Cs(""+e)}function lh(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 up(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=nh((i[dt]||null).action),p=n.submitter;p&&(t=(t=p[dt]||null)?nh(t.formAction):p.getAttribute("formAction"),t!==null&&(c=t,p=null));var b=new Rs("action","action",null,n,i);e.push({event:b,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(sn!==0){var E=p?lh(i,p):new FormData(i);lo(a,{pending:!0,data:E,method:i.method,action:c},null,E)}}else typeof c=="function"&&(b.preventDefault(),E=p?lh(i,p):new FormData(i),lo(a,{pending:!0,data:E,method:i.method,action:c},c,E))},currentTarget:i}]})}}for(var qo=0;qo<Ni.length;qo++){var Go=Ni[qo],cp=Go.toLowerCase(),dp=Go[0].toUpperCase()+Go.slice(1);_t(cp,"on"+dp)}_t(Lc,"onAnimationEnd"),_t(_c,"onAnimationIteration"),_t(Hc,"onAnimationStart"),_t("dblclick","onDoubleClick"),_t("focusin","onFocus"),_t("focusout","onBlur"),_t(A0,"onTransitionRun"),_t(T0,"onTransitionStart"),_t(R0,"onTransitionCancel"),_t(Bc,"onTransitionEnd"),mn("onMouseEnter",["mouseout","mouseover"]),mn("onMouseLeave",["mouseout","mouseover"]),mn("onPointerEnter",["pointerout","pointerover"]),mn("onPointerLeave",["pointerout","pointerover"]),Ya("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ya("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ya("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ya("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ya("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xl="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(" "),fp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xl));function sh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var p=n.length-1;0<=p;p--){var b=n[p],E=b.instance,H=b.currentTarget;if(b=b.listener,E!==c&&i.isPropagationStopped())break e;c=b,i.currentTarget=H;try{c(i)}catch(K){ar(K)}i.currentTarget=null,c=E}else for(p=0;p<n.length;p++){if(b=n[p],E=b.instance,H=b.currentTarget,b=b.listener,E!==c&&i.isPropagationStopped())break e;c=b,i.currentTarget=H;try{c(i)}catch(K){ar(K)}i.currentTarget=null,c=E}}}}function Ee(e,t){var a=t[Ir];a===void 0&&(a=t[Ir]=new Set);var n=e+"__bubble";a.has(n)||(rh(t,e,2,!1),a.add(n))}function Vo(e,t,a){var n=0;t&&(n|=4),rh(a,e,n,t)}var pr="_reactListening"+Math.random().toString(36).slice(2);function Yo(e){if(!e[pr]){e[pr]=!0,Wu.forEach(function(a){a!=="selectionchange"&&(fp.has(a)||Vo(a,!1,e),Vo(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[pr]||(t[pr]=!0,Vo("selectionchange",!1,t))}}function rh(e,t,a,n){switch(Rh(t)){case 2:var i=Bp;break;case 8:i=qp;break;default:i=nu}a=i.bind(null,t,a,e),i=void 0,!ci||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function $o(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var p=n.tag;if(p===3||p===4){var b=n.stateNode.containerInfo;if(b===i)break;if(p===4)for(p=n.return;p!==null;){var E=p.tag;if((E===3||E===4)&&p.stateNode.containerInfo===i)return;p=p.return}for(;b!==null;){if(p=dn(b),p===null)return;if(E=p.tag,E===5||E===6||E===26||E===27){n=c=p;continue e}b=b.parentNode}}n=n.return}fc(function(){var H=c,K=oi(a),P=[];e:{var B=qc.get(e);if(B!==void 0){var V=Rs,xe=e;switch(e){case"keypress":if(As(a)===0)break e;case"keydown":case"keyup":V=r0;break;case"focusin":xe="focus",V=mi;break;case"focusout":xe="blur",V=mi;break;case"beforeblur":case"afterblur":V=mi;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":V=gc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Zg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=u0;break;case Lc:case _c:case Hc:V=Fg;break;case Bc:V=d0;break;case"scroll":case"scrollend":V=Qg;break;case"wheel":V=h0;break;case"copy":case"cut":case"paste":V=Ig;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=xc;break;case"toggle":case"beforetoggle":V=g0}var ge=(t&4)!==0,Ue=!ge&&(e==="scroll"||e==="scrollend"),z=ge?B!==null?B+"Capture":null:B;ge=[];for(var O=H,_;O!==null;){var Q=O;if(_=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||_===null||z===null||(Q=fl(O,z),Q!=null&&ge.push(Zl(O,Q,_))),Ue)break;O=O.return}0<ge.length&&(B=new V(B,xe,null,a,K),P.push({event:B,listeners:ge}))}}if((t&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",B&&a!==ii&&(xe=a.relatedTarget||a.fromElement)&&(dn(xe)||xe[cn]))break e;if((V||B)&&(B=K.window===K?K:(B=K.ownerDocument)?B.defaultView||B.parentWindow:window,V?(xe=a.relatedTarget||a.toElement,V=H,xe=xe?dn(xe):null,xe!==null&&(Ue=f(xe),ge=xe.tag,xe!==Ue||ge!==5&&ge!==27&&ge!==6)&&(xe=null)):(V=null,xe=H),V!==xe)){if(ge=gc,Q="onMouseLeave",z="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(ge=xc,Q="onPointerLeave",z="onPointerEnter",O="pointer"),Ue=V==null?B:dl(V),_=xe==null?B:dl(xe),B=new ge(Q,O+"leave",V,a,K),B.target=Ue,B.relatedTarget=_,Q=null,dn(K)===H&&(ge=new ge(z,O+"enter",xe,a,K),ge.target=_,ge.relatedTarget=Ue,Q=ge),Ue=Q,V&&xe)t:{for(ge=V,z=xe,O=0,_=ge;_;_=Kn(_))O++;for(_=0,Q=z;Q;Q=Kn(Q))_++;for(;0<O-_;)ge=Kn(ge),O--;for(;0<_-O;)z=Kn(z),_--;for(;O--;){if(ge===z||z!==null&&ge===z.alternate)break t;ge=Kn(ge),z=Kn(z)}ge=null}else ge=null;V!==null&&ih(P,B,V,ge,!1),xe!==null&&Ue!==null&&ih(P,Ue,xe,ge,!0)}}e:{if(B=H?dl(H):window,V=B.nodeName&&B.nodeName.toLowerCase(),V==="select"||V==="input"&&B.type==="file")var oe=Ec;else if(Nc(B))if(Cc)oe=E0;else{oe=N0;var Ne=S0}else V=B.nodeName,!V||V.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?H&&ri(H.elementType)&&(oe=Ec):oe=j0;if(oe&&(oe=oe(e,H))){jc(P,oe,a,K);break e}Ne&&Ne(e,B,H),e==="focusout"&&H&&B.type==="number"&&H.memoizedProps.value!=null&&si(B,"number",B.value)}switch(Ne=H?dl(H):window,e){case"focusin":(Nc(Ne)||Ne.contentEditable==="true")&&(wn=Ne,vi=H,vl=null);break;case"focusout":vl=vi=wn=null;break;case"mousedown":wi=!0;break;case"contextmenu":case"mouseup":case"dragend":wi=!1,Dc(P,a,K);break;case"selectionchange":if(k0)break;case"keydown":case"keyup":Dc(P,a,K)}var he;if(pi)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else vn?wc(e,a)&&(pe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(pe="onCompositionStart");pe&&(yc&&a.locale!=="ko"&&(vn||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&vn&&(he=hc()):(ya=K,di="value"in ya?ya.value:ya.textContent,vn=!0)),Ne=xr(H,pe),0<Ne.length&&(pe=new pc(pe,e,null,a,K),P.push({event:pe,listeners:Ne}),he?pe.data=he:(he=Sc(a),he!==null&&(pe.data=he)))),(he=x0?y0(e,a):b0(e,a))&&(pe=xr(H,"onBeforeInput"),0<pe.length&&(Ne=new pc("onBeforeInput","beforeinput",null,a,K),P.push({event:Ne,listeners:pe}),Ne.data=he)),up(P,e,H,a,K)}sh(P,t)})}function Zl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function xr(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=fl(e,a),i!=null&&n.unshift(Zl(e,i,c)),i=fl(e,t),i!=null&&n.push(Zl(e,i,c))),e.tag===3)return n;e=e.return}return[]}function Kn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ih(e,t,a,n,i){for(var c=t._reactName,p=[];a!==null&&a!==n;){var b=a,E=b.alternate,H=b.stateNode;if(b=b.tag,E!==null&&E===n)break;b!==5&&b!==26&&b!==27||H===null||(E=H,i?(H=fl(a,c),H!=null&&p.unshift(Zl(a,H,E))):i||(H=fl(a,c),H!=null&&p.push(Zl(a,H,E)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var hp=/\r\n?/g,mp=/\u0000|\uFFFD/g;function oh(e){return(typeof e=="string"?e:""+e).replace(hp,`
49
- `).replace(mp,"")}function uh(e,t){return t=oh(t),oh(e)===t}function yr(){}function De(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||xn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&xn(e,""+n);break;case"className":Ns(e,"class",n);break;case"tabIndex":Ns(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ns(e,a,n);break;case"style":cc(e,n,c);break;case"data":if(t!=="object"){Ns(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=Cs(""+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 c=="function"&&(a==="formAction"?(t!=="input"&&De(e,t,"name",i.name,i,null),De(e,t,"formEncType",i.formEncType,i,null),De(e,t,"formMethod",i.formMethod,i,null),De(e,t,"formTarget",i.formTarget,i,null)):(De(e,t,"encType",i.encType,i,null),De(e,t,"method",i.method,i,null),De(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Cs(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=yr);break;case"onScroll":n!=null&&Ee("scroll",e);break;case"onScrollEnd":n!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(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=Cs(""+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":Ee("beforetoggle",e),Ee("toggle",e),Ss(e,"popover",n);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ss(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=$g.get(a)||a,Ss(e,a,n))}}function Ko(e,t,a,n,i,c){switch(a){case"style":cc(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?xn(e,n):(typeof n=="number"||typeof n=="bigint")&&xn(e,""+n);break;case"onScroll":n!=null&&Ee("scroll",e);break;case"onScrollEnd":n!=null&&Ee("scrollend",e);break;case"onClick":n!=null&&(e.onclick=yr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Iu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),c=e[dt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof n=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Ss(e,a,n)}}}function lt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var p=a[c];if(p!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:De(e,t,c,p,a,null)}}i&&De(e,t,"srcSet",a.srcSet,a,null),n&&De(e,t,"src",a.src,a,null);return;case"input":Ee("invalid",e);var b=c=p=i=null,E=null,H=null;for(n in a)if(a.hasOwnProperty(n)){var K=a[n];if(K!=null)switch(n){case"name":i=K;break;case"type":p=K;break;case"checked":E=K;break;case"defaultChecked":H=K;break;case"value":c=K;break;case"defaultValue":b=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(o(137,t));break;default:De(e,t,n,K,a,null)}}rc(e,c,b,E,H,p,i,!1),js(e);return;case"select":Ee("invalid",e),n=p=c=null;for(i in a)if(a.hasOwnProperty(i)&&(b=a[i],b!=null))switch(i){case"value":c=b;break;case"defaultValue":p=b;break;case"multiple":n=b;default:De(e,t,i,b,a,null)}t=c,a=p,e.multiple=!!n,t!=null?pn(e,!!n,t,!1):a!=null&&pn(e,!!n,a,!0);return;case"textarea":Ee("invalid",e),c=i=n=null;for(p in a)if(a.hasOwnProperty(p)&&(b=a[p],b!=null))switch(p){case"value":n=b;break;case"defaultValue":i=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:De(e,t,p,b,a,null)}oc(e,n,i,c),js(e);return;case"option":for(E in a)if(a.hasOwnProperty(E)&&(n=a[E],n!=null))switch(E){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:De(e,t,E,n,a,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(n=0;n<Xl.length;n++)Ee(Xl[n],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("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(H in a)if(a.hasOwnProperty(H)&&(n=a[H],n!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:De(e,t,H,n,a,null)}return;default:if(ri(t)){for(K in a)a.hasOwnProperty(K)&&(n=a[K],n!==void 0&&Ko(e,t,K,n,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null&&De(e,t,b,n,a,null))}function gp(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 i=null,c=null,p=null,b=null,E=null,H=null,K=null;for(V in a){var P=a[V];if(a.hasOwnProperty(V)&&P!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":E=P;default:n.hasOwnProperty(V)||De(e,t,V,null,n,P)}}for(var B in n){var V=n[B];if(P=a[B],n.hasOwnProperty(B)&&(V!=null||P!=null))switch(B){case"type":c=V;break;case"name":i=V;break;case"checked":H=V;break;case"defaultChecked":K=V;break;case"value":p=V;break;case"defaultValue":b=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(o(137,t));break;default:V!==P&&De(e,t,B,V,n,P)}}li(e,p,b,E,H,K,c,i);return;case"select":V=p=b=B=null;for(c in a)if(E=a[c],a.hasOwnProperty(c)&&E!=null)switch(c){case"value":break;case"multiple":V=E;default:n.hasOwnProperty(c)||De(e,t,c,null,n,E)}for(i in n)if(c=n[i],E=a[i],n.hasOwnProperty(i)&&(c!=null||E!=null))switch(i){case"value":B=c;break;case"defaultValue":b=c;break;case"multiple":p=c;default:c!==E&&De(e,t,i,c,n,E)}t=b,a=p,n=V,B!=null?pn(e,!!a,B,!1):!!n!=!!a&&(t!=null?pn(e,!!a,t,!0):pn(e,!!a,a?[]:"",!1));return;case"textarea":V=B=null;for(b in a)if(i=a[b],a.hasOwnProperty(b)&&i!=null&&!n.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:De(e,t,b,null,n,i)}for(p in n)if(i=n[p],c=a[p],n.hasOwnProperty(p)&&(i!=null||c!=null))switch(p){case"value":B=i;break;case"defaultValue":V=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&De(e,t,p,i,n,c)}ic(e,B,V);return;case"option":for(var xe in a)if(B=a[xe],a.hasOwnProperty(xe)&&B!=null&&!n.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:De(e,t,xe,null,n,B)}for(E in n)if(B=n[E],V=a[E],n.hasOwnProperty(E)&&B!==V&&(B!=null||V!=null))switch(E){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:De(e,t,E,B,n,V)}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 ge in a)B=a[ge],a.hasOwnProperty(ge)&&B!=null&&!n.hasOwnProperty(ge)&&De(e,t,ge,null,n,B);for(H in n)if(B=n[H],V=a[H],n.hasOwnProperty(H)&&B!==V&&(B!=null||V!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(o(137,t));break;default:De(e,t,H,B,n,V)}return;default:if(ri(t)){for(var Ue in a)B=a[Ue],a.hasOwnProperty(Ue)&&B!==void 0&&!n.hasOwnProperty(Ue)&&Ko(e,t,Ue,void 0,n,B);for(K in n)B=n[K],V=a[K],!n.hasOwnProperty(K)||B===V||B===void 0&&V===void 0||Ko(e,t,K,B,n,V);return}}for(var z in a)B=a[z],a.hasOwnProperty(z)&&B!=null&&!n.hasOwnProperty(z)&&De(e,t,z,null,n,B);for(P in n)B=n[P],V=a[P],!n.hasOwnProperty(P)||B===V||B==null&&V==null||De(e,t,P,B,n,V)}var Qo=null,Xo=null;function br(e){return e.nodeType===9?e:e.ownerDocument}function ch(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 dh(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 Zo(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 Po=null;function pp(){var e=window.event;return e&&e.type==="popstate"?e===Po?!1:(Po=e,!0):(Po=null,!1)}var fh=typeof setTimeout=="function"?setTimeout:void 0,xp=typeof clearTimeout=="function"?clearTimeout:void 0,hh=typeof Promise=="function"?Promise:void 0,yp=typeof queueMicrotask=="function"?queueMicrotask:typeof hh<"u"?function(e){return hh.resolve(null).then(e).catch(bp)}:fh;function bp(e){setTimeout(function(){throw e})}function Da(e){return e==="head"}function mh(e,t){var a=t,n=0,i=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"){if(0<n&&8>n){a=n;var p=e.ownerDocument;if(a&1&&Pl(p.documentElement),a&2&&Pl(p.body),a&4)for(a=p.head,Pl(a),p=a.firstChild;p;){var b=p.nextSibling,E=p.nodeName;p[cl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=b}}if(i===0){e.removeChild(c),ns(t);return}i--}else a==="$"||a==="$?"||a==="$!"?i++:n=a.charCodeAt(0)-48;else n=0;a=c}while(a);ns(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),ei(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function vp(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[cl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Bt(e.nextSibling),e===null)break}return null}function wp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Bt(e.nextSibling),e===null))return null;return e}function Fo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Sp(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 Bt(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 Wo=null;function gh(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 ph(e,t,a){switch(t=br(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Pl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ei(e)}var Dt=new Map,xh=new Set;function vr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=F.d;F.d={f:Np,r:jp,D:Ep,C:Cp,L:kp,m:Ap,X:Rp,S:Tp,M:Op};function Np(){var e=fa.f(),t=dr();return e||t}function jp(e){var t=fn(e);t!==null&&t.tag===5&&t.type==="form"?Ld(t):fa.r(e)}var Qn=typeof document>"u"?null:document;function yh(e,t,a){var n=Qn;if(n&&typeof t=="string"&&t){var i=kt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),xh.has(i)||(xh.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),lt(t,"link",e),Fe(t),n.head.appendChild(t)))}}function Ep(e){fa.D(e),yh("dns-prefetch",e,null)}function Cp(e,t){fa.C(e,t),yh("preconnect",e,t)}function kp(e,t,a){fa.L(e,t,a);var n=Qn;if(n&&e&&t){var i='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+kt(a.imageSizes)+'"]')):i+='[href="'+kt(e)+'"]';var c=i;switch(t){case"style":c=Xn(e);break;case"script":c=Zn(e)}Dt.has(c)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Dt.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Jl(c))||t==="script"&&n.querySelector(Fl(c))||(t=n.createElement("link"),lt(t,"link",e),Fe(t),n.head.appendChild(t)))}}function Ap(e,t){fa.m(e,t);var a=Qn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+kt(n)+'"][href="'+kt(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Zn(e)}if(!Dt.has(c)&&(e=y({rel:"modulepreload",href:e},t),Dt.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fl(c)))return}n=a.createElement("link"),lt(n,"link",e),Fe(n),a.head.appendChild(n)}}}function Tp(e,t,a){fa.S(e,t,a);var n=Qn;if(n&&e){var i=hn(n).hoistableStyles,c=Xn(e);t=t||"default";var p=i.get(c);if(!p){var b={loading:0,preload:null};if(p=n.querySelector(Jl(c)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Dt.get(c))&&Io(e,a);var E=p=n.createElement("link");Fe(E),lt(E,"link",e),E._p=new Promise(function(H,K){E.onload=H,E.onerror=K}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,wr(p,t,n)}p={type:"stylesheet",instance:p,count:1,state:b},i.set(c,p)}}}function Rp(e,t){fa.X(e,t);var a=Qn;if(a&&e){var n=hn(a).hoistableScripts,i=Zn(e),c=n.get(i);c||(c=a.querySelector(Fl(i)),c||(e=y({src:e,async:!0},t),(t=Dt.get(i))&&eu(e,t),c=a.createElement("script"),Fe(c),lt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function Op(e,t){fa.M(e,t);var a=Qn;if(a&&e){var n=hn(a).hoistableScripts,i=Zn(e),c=n.get(i);c||(c=a.querySelector(Fl(i)),c||(e=y({src:e,async:!0,type:"module"},t),(t=Dt.get(i))&&eu(e,t),c=a.createElement("script"),Fe(c),lt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function bh(e,t,a,n){var i=(i=J.current)?vr(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Xn(a.href),a=hn(i).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=Xn(a.href);var c=hn(i).hoistableStyles,p=c.get(e);if(p||(i=i.ownerDocument||i,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,p),(c=i.querySelector(Jl(e)))&&!c._p&&(p.instance=c,p.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),c||Mp(i,e,a,p.state))),t&&n===null)throw Error(o(528,""));return p}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Zn(a),a=hn(i).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(o(444,e))}}function Xn(e){return'href="'+kt(e)+'"'}function Jl(e){return'link[rel="stylesheet"]['+e+"]"}function vh(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Mp(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}),lt(t,"link",a),Fe(t),e.head.appendChild(t))}function Zn(e){return'[src="'+kt(e)+'"]'}function Fl(e){return"script[async]"+e}function wh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+kt(a.href)+'"]');if(n)return t.instance=n,Fe(n),n;var i=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Fe(n),lt(n,"style",i),wr(n,a.precedence,e),t.instance=n;case"stylesheet":i=Xn(a.href);var c=e.querySelector(Jl(i));if(c)return t.state.loading|=4,t.instance=c,Fe(c),c;n=vh(a),(i=Dt.get(i))&&Io(n,i),c=(e.ownerDocument||e).createElement("link"),Fe(c);var p=c;return p._p=new Promise(function(b,E){p.onload=b,p.onerror=E}),lt(c,"link",n),t.state.loading|=4,wr(c,a.precedence,e),t.instance=c;case"script":return c=Zn(a.src),(i=e.querySelector(Fl(c)))?(t.instance=i,Fe(i),i):(n=a,(i=Dt.get(c))&&(n=y({},a),eu(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Fe(i),lt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,wr(n,a.precedence,e));return t.instance}function wr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,c=i,p=0;p<n.length;p++){var b=n[p];if(b.dataset.precedence===t)c=b;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Io(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function eu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Sr=null;function Sh(e,t,a){if(Sr===null){var n=new Map,i=Sr=new Map;i.set(a,n)}else i=Sr,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var c=a[i];if(!(c[cl]||c[st]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var p=c.getAttribute(t)||"";p=e+p;var b=n.get(p);b?b.push(c):n.set(p,[c])}}return n}function Nh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function zp(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 jh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Wl=null;function Dp(){}function Up(e,t,a){if(Wl===null)throw Error(o(475));var n=Wl;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var i=Xn(a.href),c=e.querySelector(Jl(i));if(c){e=c._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=Nr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=c,Fe(c);return}c=e.ownerDocument||e,a=vh(a),(i=Dt.get(i))&&Io(a,i),c=c.createElement("link"),Fe(c);var p=c;p._p=new Promise(function(b,E){p.onload=b,p.onerror=E}),lt(c,"link",a),t.instance=c}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(n.count++,t=Nr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function Lp(){if(Wl===null)throw Error(o(475));var e=Wl;return e.stylesheets&&e.count===0&&tu(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&tu(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 Nr(){if(this.count--,this.count===0){if(this.stylesheets)tu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var jr=null;function tu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,jr=new Map,t.forEach(_p,e),jr=null,Nr.call(e))}function _p(e,t){if(!(t.state.loading&4)){var a=jr.get(e);if(a)var n=a.get(null);else{a=new Map,jr.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var p=i[c];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),n=p)}n&&a.set(null,n)}i=t.instance,p=i.getAttribute("data-precedence"),c=a.get(p)||n,c===n&&a.set(null,i),a.set(p,i),this.count++,n=Nr.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Il={$$typeof:T,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function Hp(e,t,a,n,i,c,p,b){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=Jr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jr(0),this.hiddenUpdates=Jr(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Eh(e,t,a,n,i,c,p,b,E,H,K,P){return e=new Hp(e,t,a,p,b,E,H,P),t=1,c===!0&&(t|=24),c=vt(3,null,null,t),e.current=c,c.stateNode=e,t=Ui(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},Bi(c),e}function Ch(e){return e?(e=En,e):En}function kh(e,t,a,n,i,c){i=Ch(i),n.context===null?n.context=i:n.pendingContext=i,n=wa(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=Sa(e,n,t),a!==null&&(Et(a,e,t),Tl(a,e,t))}function Ah(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function au(e,t){Ah(e,t),(e=e.alternate)&&Ah(e,t)}function Th(e){if(e.tag===13){var t=jn(e,67108864);t!==null&&Et(t,e,67108864),au(e,67108864)}}var Er=!0;function Bp(e,t,a,n){var i=G.T;G.T=null;var c=F.p;try{F.p=2,nu(e,t,a,n)}finally{F.p=c,G.T=i}}function qp(e,t,a,n){var i=G.T;G.T=null;var c=F.p;try{F.p=8,nu(e,t,a,n)}finally{F.p=c,G.T=i}}function nu(e,t,a,n){if(Er){var i=lu(n);if(i===null)$o(e,t,n,Cr,a),Oh(e,n);else if(Vp(i,e,t,a,n))n.stopPropagation();else if(Oh(e,n),t&4&&-1<Gp.indexOf(e)){for(;i!==null;){var c=fn(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var p=Va(c.pendingLanes);if(p!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var E=1<<31-yt(p);b.entanglements[1]|=E,p&=~E}Xt(c),(Oe&6)===0&&(ur=Vt()+500,Ql(0))}}break;case 13:b=jn(c,2),b!==null&&Et(b,c,2),dr(),au(c,2)}if(c=lu(n),c===null&&$o(e,t,n,Cr,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else $o(e,t,n,null,a)}}function lu(e){return e=oi(e),su(e)}var Cr=null;function su(e){if(Cr=null,e=dn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(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 Cr=e,null}function Rh(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(Cg()){case Yu:return 2;case $u:return 8;case ys:case kg:return 32;case Ku:return 268435456;default:return 32}default:return 32}}var ru=!1,Ua=null,La=null,_a=null,es=new Map,ts=new Map,Ha=[],Gp="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 Oh(e,t){switch(e){case"focusin":case"focusout":Ua=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":_a=null;break;case"pointerover":case"pointerout":es.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ts.delete(t.pointerId)}}function as(e,t,a,n,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]},t!==null&&(t=fn(t),t!==null&&Th(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Vp(e,t,a,n,i){switch(t){case"focusin":return Ua=as(Ua,e,t,a,n,i),!0;case"dragenter":return La=as(La,e,t,a,n,i),!0;case"mouseover":return _a=as(_a,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return es.set(c,as(es.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,ts.set(c,as(ts.get(c)||null,e,t,a,n,i)),!0}return!1}function Mh(e){var t=dn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Ug(e.priority,function(){if(a.tag===13){var n=jt();n=Fr(n);var i=jn(a,n);i!==null&&Et(i,a,n),au(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 kr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=lu(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);ii=n,a.target.dispatchEvent(n),ii=null}else return t=fn(a),t!==null&&Th(t),e.blockedOn=a,!1;t.shift()}return!0}function zh(e,t,a){kr(e)&&a.delete(t)}function Yp(){ru=!1,Ua!==null&&kr(Ua)&&(Ua=null),La!==null&&kr(La)&&(La=null),_a!==null&&kr(_a)&&(_a=null),es.forEach(zh),ts.forEach(zh)}function Ar(e,t){e.blockedOn===t&&(e.blockedOn=null,ru||(ru=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Yp)))}var Tr=null;function Dh(e){Tr!==e&&(Tr=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Tr===e&&(Tr=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(su(n||a)===null)continue;break}var c=fn(a);c!==null&&(e.splice(t,3),t-=3,lo(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function ns(e){function t(E){return Ar(E,e)}Ua!==null&&Ar(Ua,e),La!==null&&Ar(La,e),_a!==null&&Ar(_a,e),es.forEach(t),ts.forEach(t);for(var a=0;a<Ha.length;a++){var n=Ha[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ha.length&&(a=Ha[0],a.blockedOn===null);)Mh(a),a.blockedOn===null&&Ha.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],c=a[n+1],p=i[dt]||null;if(typeof c=="function")p||Dh(a);else if(p){var b=null;if(c&&c.hasAttribute("formAction")){if(i=c,p=c[dt]||null)b=p.formAction;else if(su(i)!==null)continue}else b=p.action;typeof b=="function"?a[n+1]=b:(a.splice(n,3),n-=3),Dh(a)}}}function iu(e){this._internalRoot=e}Rr.prototype.render=iu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=jt();kh(a,n,e,t,null,null)},Rr.prototype.unmount=iu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kh(e.current,2,null,e,null,null),dr(),t[cn]=null}};function Rr(e){this._internalRoot=e}Rr.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ju();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ha.length&&t!==0&&t<Ha[a].priority;a++);Ha.splice(a,0,e),a===0&&Mh(e)}};var Uh=s.version;if(Uh!=="19.1.0")throw Error(o(527,Uh,"19.1.0"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var $p={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Or=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Or.isDisabled&&Or.supportsFiber)try{il=Or.inject($p),xt=Or}catch{}}return ss.createRoot=function(e,t){if(!d(e))throw Error(o(299));var a=!1,n="",i=Jd,c=Fd,p=Wd,b=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(b=t.unstable_transitionCallbacks)),t=Eh(e,1,!1,null,null,a,n,i,c,p,b,null),e[cn]=t.current,Yo(e),new iu(t)},ss.hydrateRoot=function(e,t,a){if(!d(e))throw Error(o(299));var n=!1,i="",c=Jd,p=Fd,b=Wd,E=null,H=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(E=a.unstable_transitionCallbacks),a.formState!==void 0&&(H=a.formState)),t=Eh(e,1,!0,t,a??null,n,i,c,p,b,E,H),t.context=Ch(null),a=t.current,n=jt(),n=Fr(n),i=wa(n),i.callback=null,Sa(a,i,n),a=n,t.current.lanes=a,ul(t,a),Xt(t),e[cn]=t.current,Yo(e),new Rr(t)},ss.version="19.1.0",ss}var Kh;function ex(){if(Kh)return cu.exports;Kh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(s){console.error(s)}}return l(),cu.exports=Ip(),cu.exports}var tx=ex();const Qh=Em(tx);var rs={},Xh;function ax(){if(Xh)return rs;Xh=1,Object.defineProperty(rs,"__esModule",{value:!0}),rs.parse=h,rs.serialize=g;const l=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,s=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,d=Object.prototype.toString,f=(()=>{const v=function(){};return v.prototype=Object.create(null),v})();function h(v,M){const j=new f,N=v.length;if(N<2)return j;const C=(M==null?void 0:M.decode)||y;let R=0;do{const k=v.indexOf("=",R);if(k===-1)break;const T=v.indexOf(";",R),D=T===-1?N:T;if(k>D){R=v.lastIndexOf(";",k-1)+1;continue}const U=x(v,R,k),te=m(v,k,U),Y=v.slice(U,te);if(j[Y]===void 0){let L=x(v,k+1,D),X=m(v,D,L);const I=C(v.slice(L,X));j[Y]=I}R=D+1}while(R<N);return j}function x(v,M,j){do{const N=v.charCodeAt(M);if(N!==32&&N!==9)return M}while(++M<j);return j}function m(v,M,j){for(;M>j;){const N=v.charCodeAt(--M);if(N!==32&&N!==9)return M+1}return j}function g(v,M,j){const N=(j==null?void 0:j.encode)||encodeURIComponent;if(!l.test(v))throw new TypeError(`argument name is invalid: ${v}`);const C=N(M);if(!s.test(C))throw new TypeError(`argument val is invalid: ${M}`);let R=v+"="+C;if(!j)return R;if(j.maxAge!==void 0){if(!Number.isInteger(j.maxAge))throw new TypeError(`option maxAge is invalid: ${j.maxAge}`);R+="; Max-Age="+j.maxAge}if(j.domain){if(!r.test(j.domain))throw new TypeError(`option domain is invalid: ${j.domain}`);R+="; Domain="+j.domain}if(j.path){if(!o.test(j.path))throw new TypeError(`option path is invalid: ${j.path}`);R+="; Path="+j.path}if(j.expires){if(!S(j.expires)||!Number.isFinite(j.expires.valueOf()))throw new TypeError(`option expires is invalid: ${j.expires}`);R+="; Expires="+j.expires.toUTCString()}if(j.httpOnly&&(R+="; HttpOnly"),j.secure&&(R+="; Secure"),j.partitioned&&(R+="; Partitioned"),j.priority)switch(typeof j.priority=="string"?j.priority.toLowerCase():void 0){case"low":R+="; Priority=Low";break;case"medium":R+="; Priority=Medium";break;case"high":R+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${j.priority}`)}if(j.sameSite)switch(typeof j.sameSite=="string"?j.sameSite.toLowerCase():j.sameSite){case!0:case"strict":R+="; SameSite=Strict";break;case"lax":R+="; SameSite=Lax";break;case"none":R+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${j.sameSite}`)}return R}function y(v){if(v.indexOf("%")===-1)return v;try{return decodeURIComponent(v)}catch{return v}}function S(v){return d.call(v)==="[object Date]"}return rs}ax();var Zh="popstate";function nx(l={}){function s(o,d){let{pathname:f,search:h,hash:x}=o.location;return vu("",{pathname:f,search:h,hash:x},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(o,d){return typeof d=="string"?d:ds(d)}return sx(s,r,null,l)}function Be(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}function qt(l,s){if(!l){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function lx(){return Math.random().toString(36).substring(2,10)}function Ph(l,s){return{usr:l.state,key:l.key,idx:s}}function vu(l,s,r=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof s=="string"?el(s):s,state:r,key:s&&s.key||o||lx()}}function ds({pathname:l="/",search:s="",hash:r=""}){return s&&s!=="?"&&(l+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(l+=r.charAt(0)==="#"?r:"#"+r),l}function el(l){let s={};if(l){let r=l.indexOf("#");r>=0&&(s.hash=l.substring(r),l=l.substring(0,r));let o=l.indexOf("?");o>=0&&(s.search=l.substring(o),l=l.substring(0,o)),l&&(s.pathname=l)}return s}function sx(l,s,r,o={}){let{window:d=document.defaultView,v5Compat:f=!1}=o,h=d.history,x="POP",m=null,g=y();g==null&&(g=0,h.replaceState({...h.state,idx:g},""));function y(){return(h.state||{idx:null}).idx}function S(){x="POP";let C=y(),R=C==null?null:C-g;g=C,m&&m({action:x,location:N.location,delta:R})}function v(C,R){x="PUSH";let k=vu(N.location,C,R);g=y()+1;let T=Ph(k,g),D=N.createHref(k);try{h.pushState(T,"",D)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;d.location.assign(D)}f&&m&&m({action:x,location:N.location,delta:1})}function M(C,R){x="REPLACE";let k=vu(N.location,C,R);g=y();let T=Ph(k,g),D=N.createHref(k);h.replaceState(T,"",D),f&&m&&m({action:x,location:N.location,delta:0})}function j(C){return rx(C)}let N={get action(){return x},get location(){return l(d,h)},listen(C){if(m)throw new Error("A history only accepts one active listener");return d.addEventListener(Zh,S),m=C,()=>{d.removeEventListener(Zh,S),m=null}},createHref(C){return s(d,C)},createURL:j,encodeLocation(C){let R=j(C);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:v,replace:M,go(C){return h.go(C)}};return N}function rx(l,s=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Be(r,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:ds(l);return o=o.replace(/ $/,"%20"),!s&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Cm(l,s,r="/"){return ix(l,s,r,!1)}function ix(l,s,r,o){let d=typeof s=="string"?el(s):s,f=ga(d.pathname||"/",r);if(f==null)return null;let h=km(l);ox(h);let x=null;for(let m=0;x==null&&m<h.length;++m){let g=bx(f);x=xx(h[m],g,o)}return x}function km(l,s=[],r=[],o=""){let d=(f,h,x)=>{let m={relativePath:x===void 0?f.path||"":x,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};m.relativePath.startsWith("/")&&(Be(m.relativePath.startsWith(o),`Absolute route path "${m.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(o.length));let g=ma([o,m.relativePath]),y=r.concat(m);f.children&&f.children.length>0&&(Be(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),km(f.children,s,y,g)),!(f.path==null&&!f.index)&&s.push({path:g,score:gx(g,f.index),routesMeta:y})};return l.forEach((f,h)=>{var x;if(f.path===""||!((x=f.path)!=null&&x.includes("?")))d(f,h);else for(let m of Am(f.path))d(f,h,m)}),s}function Am(l){let s=l.split("/");if(s.length===0)return[];let[r,...o]=s,d=r.endsWith("?"),f=r.replace(/\?$/,"");if(o.length===0)return d?[f,""]:[f];let h=Am(o.join("/")),x=[];return x.push(...h.map(m=>m===""?f:[f,m].join("/"))),d&&x.push(...h),x.map(m=>l.startsWith("/")&&m===""?"/":m)}function ox(l){l.sort((s,r)=>s.score!==r.score?r.score-s.score:px(s.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var ux=/^:[\w-]+$/,cx=3,dx=2,fx=1,hx=10,mx=-2,Jh=l=>l==="*";function gx(l,s){let r=l.split("/"),o=r.length;return r.some(Jh)&&(o+=mx),s&&(o+=dx),r.filter(d=>!Jh(d)).reduce((d,f)=>d+(ux.test(f)?cx:f===""?fx:hx),o)}function px(l,s){return l.length===s.length&&l.slice(0,-1).every((o,d)=>o===s[d])?l[l.length-1]-s[s.length-1]:0}function xx(l,s,r=!1){let{routesMeta:o}=l,d={},f="/",h=[];for(let x=0;x<o.length;++x){let m=o[x],g=x===o.length-1,y=f==="/"?s:s.slice(f.length)||"/",S=Gr({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},y),v=m.route;if(!S&&g&&r&&!o[o.length-1].route.index&&(S=Gr({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},y)),!S)return null;Object.assign(d,S.params),h.push({params:d,pathname:ma([f,S.pathname]),pathnameBase:Nx(ma([f,S.pathnameBase])),route:v}),S.pathnameBase!=="/"&&(f=ma([f,S.pathnameBase]))}return h}function Gr(l,s){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,o]=yx(l.path,l.caseSensitive,l.end),d=s.match(r);if(!d)return null;let f=d[0],h=f.replace(/(.)\/+$/,"$1"),x=d.slice(1);return{params:o.reduce((g,{paramName:y,isOptional:S},v)=>{if(y==="*"){let j=x[v]||"";h=f.slice(0,f.length-j.length).replace(/(.)\/+$/,"$1")}const M=x[v];return S&&!M?g[y]=void 0:g[y]=(M||"").replace(/%2F/g,"/"),g},{}),pathname:f,pathnameBase:h,pattern:l}}function yx(l,s=!1,r=!0){qt(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let o=[],d="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,x,m)=>(o.push({paramName:x,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return l.endsWith("*")?(o.push({paramName:"*"}),d+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?d+="\\/*$":l!==""&&l!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,s?void 0:"i"),o]}function bx(l){try{return l.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return qt(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${s}).`),l}}function ga(l,s){if(s==="/")return l;if(!l.toLowerCase().startsWith(s.toLowerCase()))return null;let r=s.endsWith("/")?s.length-1:s.length,o=l.charAt(r);return o&&o!=="/"?null:l.slice(r)||"/"}function vx(l,s="/"){let{pathname:r,search:o="",hash:d=""}=typeof l=="string"?el(l):l;return{pathname:r?r.startsWith("/")?r:wx(r,s):s,search:jx(o),hash:Ex(d)}}function wx(l,s){let r=s.replace(/\/+$/,"").split("/");return l.split("/").forEach(d=>{d===".."?r.length>1&&r.pop():d!=="."&&r.push(d)}),r.length>1?r.join("/"):"/"}function mu(l,s,r,o){return`Cannot include a '${l}' character in a manually specified \`to.${s}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Sx(l){return l.filter((s,r)=>r===0||s.route.path&&s.route.path.length>0)}function Ou(l){let s=Sx(l);return s.map((r,o)=>o===s.length-1?r.pathname:r.pathnameBase)}function Mu(l,s,r,o=!1){let d;typeof l=="string"?d=el(l):(d={...l},Be(!d.pathname||!d.pathname.includes("?"),mu("?","pathname","search",d)),Be(!d.pathname||!d.pathname.includes("#"),mu("#","pathname","hash",d)),Be(!d.search||!d.search.includes("#"),mu("#","search","hash",d)));let f=l===""||d.pathname==="",h=f?"/":d.pathname,x;if(h==null)x=r;else{let S=s.length-1;if(!o&&h.startsWith("..")){let v=h.split("/");for(;v[0]==="..";)v.shift(),S-=1;d.pathname=v.join("/")}x=S>=0?s[S]:"/"}let m=vx(d,x),g=h&&h!=="/"&&h.endsWith("/"),y=(f||h===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(g||y)&&(m.pathname+="/"),m}var ma=l=>l.join("/").replace(/\/\/+/g,"/"),Nx=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),jx=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Ex=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l;function Cx(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}var Tm=["POST","PUT","PATCH","DELETE"];new Set(Tm);var kx=["GET",...Tm];new Set(kx);var tl=w.createContext(null);tl.displayName="DataRouter";var Qr=w.createContext(null);Qr.displayName="DataRouterState";var Rm=w.createContext({isTransitioning:!1});Rm.displayName="ViewTransition";var Ax=w.createContext(new Map);Ax.displayName="Fetchers";var Tx=w.createContext(null);Tx.displayName="Await";var Gt=w.createContext(null);Gt.displayName="Navigation";var ms=w.createContext(null);ms.displayName="Location";var Lt=w.createContext({outlet:null,matches:[],isDataRoute:!1});Lt.displayName="Route";var zu=w.createContext(null);zu.displayName="RouteError";function Rx(l,{relative:s}={}){Be(al(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=w.useContext(Gt),{hash:d,pathname:f,search:h}=gs(l,{relative:s}),x=f;return r!=="/"&&(x=f==="/"?r:ma([r,f])),o.createHref({pathname:x,search:h,hash:d})}function al(){return w.useContext(ms)!=null}function Jt(){return Be(al(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(ms).location}var Om="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Mm(l){w.useContext(Gt).static||w.useLayoutEffect(l)}function un(){let{isDataRoute:l}=w.useContext(Lt);return l?Qx():Ox()}function Ox(){Be(al(),"useNavigate() may be used only in the context of a <Router> component.");let l=w.useContext(tl),{basename:s,navigator:r}=w.useContext(Gt),{matches:o}=w.useContext(Lt),{pathname:d}=Jt(),f=JSON.stringify(Ou(o)),h=w.useRef(!1);return Mm(()=>{h.current=!0}),w.useCallback((m,g={})=>{if(qt(h.current,Om),!h.current)return;if(typeof m=="number"){r.go(m);return}let y=Mu(m,JSON.parse(f),d,g.relative==="path");l==null&&s!=="/"&&(y.pathname=y.pathname==="/"?s:ma([s,y.pathname])),(g.replace?r.replace:r.push)(y,g.state,g)},[s,r,f,d,l])}var Mx=w.createContext(null);function zx(l){let s=w.useContext(Lt).outlet;return s&&w.createElement(Mx.Provider,{value:l},s)}function Dx(){let{matches:l}=w.useContext(Lt),s=l[l.length-1];return s?s.params:{}}function gs(l,{relative:s}={}){let{matches:r}=w.useContext(Lt),{pathname:o}=Jt(),d=JSON.stringify(Ou(r));return w.useMemo(()=>Mu(l,JSON.parse(d),o,s==="path"),[l,d,o,s])}function Ux(l,s){return zm(l,s)}function zm(l,s,r,o){var k;Be(al(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:d,static:f}=w.useContext(Gt),{matches:h}=w.useContext(Lt),x=h[h.length-1],m=x?x.params:{},g=x?x.pathname:"/",y=x?x.pathnameBase:"/",S=x&&x.route;{let T=S&&S.path||"";Dm(g,!S||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${T}">) 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="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let v=Jt(),M;if(s){let T=typeof s=="string"?el(s):s;Be(y==="/"||((k=T.pathname)==null?void 0:k.startsWith(y)),`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 "${y}" but pathname "${T.pathname}" was given in the \`location\` prop.`),M=T}else M=v;let j=M.pathname||"/",N=j;if(y!=="/"){let T=y.replace(/^\//,"").split("/");N="/"+j.replace(/^\//,"").split("/").slice(T.length).join("/")}let C=!f&&r&&r.matches&&r.matches.length>0?r.matches:Cm(l,{pathname:N});qt(S||C!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),qt(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${M.pathname}${M.search}${M.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let R=qx(C&&C.map(T=>Object.assign({},T,{params:Object.assign({},m,T.params),pathname:ma([y,d.encodeLocation?d.encodeLocation(T.pathname).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?y:ma([y,d.encodeLocation?d.encodeLocation(T.pathnameBase).pathname:T.pathnameBase])})),h,r,o);return s&&R?w.createElement(ms.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...M},navigationType:"POP"}},R):R}function Lx(){let l=Kx(),s=Cx(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),r=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},h=null;return console.error("Error handled by React Router default ErrorBoundary:",l),h=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:f},"ErrorBoundary")," or"," ",w.createElement("code",{style:f},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},s),r?w.createElement("pre",{style:d},r):null,h)}var _x=w.createElement(Lx,null),Hx=class extends w.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,s){return s.location!==l.location||s.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:s.error,location:s.location,revalidation:l.revalidation||s.revalidation}}componentDidCatch(l,s){console.error("React Router caught the following error during render",l,s)}render(){return this.state.error!==void 0?w.createElement(Lt.Provider,{value:this.props.routeContext},w.createElement(zu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Bx({routeContext:l,match:s,children:r}){let o=w.useContext(tl);return o&&o.static&&o.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=s.route.id),w.createElement(Lt.Provider,{value:l},r)}function qx(l,s=[],r=null,o=null){if(l==null){if(!r)return null;if(r.errors)l=r.matches;else if(s.length===0&&!r.initialized&&r.matches.length>0)l=r.matches;else return null}let d=l,f=r==null?void 0:r.errors;if(f!=null){let m=d.findIndex(g=>g.route.id&&(f==null?void 0:f[g.route.id])!==void 0);Be(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),d=d.slice(0,Math.min(d.length,m+1))}let h=!1,x=-1;if(r)for(let m=0;m<d.length;m++){let g=d[m];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(x=m),g.route.id){let{loaderData:y,errors:S}=r,v=g.route.loader&&!y.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||v){h=!0,x>=0?d=d.slice(0,x+1):d=[d[0]];break}}}return d.reduceRight((m,g,y)=>{let S,v=!1,M=null,j=null;r&&(S=f&&g.route.id?f[g.route.id]:void 0,M=g.route.errorElement||_x,h&&(x<0&&y===0?(Dm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,j=null):x===y&&(v=!0,j=g.route.hydrateFallbackElement||null)));let N=s.concat(d.slice(0,y+1)),C=()=>{let R;return S?R=M:v?R=j:g.route.Component?R=w.createElement(g.route.Component,null):g.route.element?R=g.route.element:R=m,w.createElement(Bx,{match:g,routeContext:{outlet:m,matches:N,isDataRoute:r!=null},children:R})};return r&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?w.createElement(Hx,{location:r.location,revalidation:r.revalidation,component:M,error:S,children:C(),routeContext:{outlet:null,matches:N,isDataRoute:!0}}):C()},null)}function Du(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gx(l){let s=w.useContext(tl);return Be(s,Du(l)),s}function Vx(l){let s=w.useContext(Qr);return Be(s,Du(l)),s}function Yx(l){let s=w.useContext(Lt);return Be(s,Du(l)),s}function Uu(l){let s=Yx(l),r=s.matches[s.matches.length-1];return Be(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function $x(){return Uu("useRouteId")}function Kx(){var o;let l=w.useContext(zu),s=Vx("useRouteError"),r=Uu("useRouteError");return l!==void 0?l:(o=s.errors)==null?void 0:o[r]}function Qx(){let{router:l}=Gx("useNavigate"),s=Uu("useNavigate"),r=w.useRef(!1);return Mm(()=>{r.current=!0}),w.useCallback(async(d,f={})=>{qt(r.current,Om),r.current&&(typeof d=="number"?l.navigate(d):await l.navigate(d,{fromRouteId:s,...f}))},[l,s])}var Fh={};function Dm(l,s,r){!s&&!Fh[l]&&(Fh[l]=!0,qt(!1,r))}w.memo(Xx);function Xx({routes:l,future:s,state:r}){return zm(l,void 0,r,s)}function Um({to:l,replace:s,state:r,relative:o}){Be(al(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=w.useContext(Gt);qt(!d,"<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:f}=w.useContext(Lt),{pathname:h}=Jt(),x=un(),m=Mu(l,Ou(f),h,o==="path"),g=JSON.stringify(m);return w.useEffect(()=>{x(JSON.parse(g),{replace:s,state:r,relative:o})},[x,g,o,s,r]),null}function Lm(l){return zx(l.context)}function Ut(l){Be(!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 Zx({basename:l="/",children:s=null,location:r,navigationType:o="POP",navigator:d,static:f=!1}){Be(!al(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=l.replace(/^\/*/,"/"),x=w.useMemo(()=>({basename:h,navigator:d,static:f,future:{}}),[h,d,f]);typeof r=="string"&&(r=el(r));let{pathname:m="/",search:g="",hash:y="",state:S=null,key:v="default"}=r,M=w.useMemo(()=>{let j=ga(m,h);return j==null?null:{location:{pathname:j,search:g,hash:y,state:S,key:v},navigationType:o}},[h,m,g,y,S,v,o]);return qt(M!=null,`<Router basename="${h}"> is not able to match the URL "${m}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),M==null?null:w.createElement(Gt.Provider,{value:x},w.createElement(ms.Provider,{children:s,value:M}))}function Px({children:l,location:s}){return Ux(wu(l),s)}function wu(l,s=[]){let r=[];return w.Children.forEach(l,(o,d)=>{if(!w.isValidElement(o))return;let f=[...s,d];if(o.type===w.Fragment){r.push.apply(r,wu(o.props.children,f));return}Be(o.type===Ut,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Be(!o.props.index||!o.props.children,"An index route cannot have child routes.");let h={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(h.children=wu(o.props.children,f)),r.push(h)}),r}var Br="get",qr="application/x-www-form-urlencoded";function Xr(l){return l!=null&&typeof l.tagName=="string"}function Jx(l){return Xr(l)&&l.tagName.toLowerCase()==="button"}function Fx(l){return Xr(l)&&l.tagName.toLowerCase()==="form"}function Wx(l){return Xr(l)&&l.tagName.toLowerCase()==="input"}function Ix(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function ey(l,s){return l.button===0&&(!s||s==="_self")&&!Ix(l)}var Mr=null;function ty(){if(Mr===null)try{new FormData(document.createElement("form"),0),Mr=!1}catch{Mr=!0}return Mr}var ay=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gu(l){return l!=null&&!ay.has(l)?(qt(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${qr}"`),null):l}function ny(l,s){let r,o,d,f,h;if(Fx(l)){let x=l.getAttribute("action");o=x?ga(x,s):null,r=l.getAttribute("method")||Br,d=gu(l.getAttribute("enctype"))||qr,f=new FormData(l)}else if(Jx(l)||Wx(l)&&(l.type==="submit"||l.type==="image")){let x=l.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=l.getAttribute("formaction")||x.getAttribute("action");if(o=m?ga(m,s):null,r=l.getAttribute("formmethod")||x.getAttribute("method")||Br,d=gu(l.getAttribute("formenctype"))||gu(x.getAttribute("enctype"))||qr,f=new FormData(x,l),!ty()){let{name:g,type:y,value:S}=l;if(y==="image"){let v=g?`${g}.`:"";f.append(`${v}x`,"0"),f.append(`${v}y`,"0")}else g&&f.append(g,S)}}else{if(Xr(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Br,o=null,d=qr,h=l}return f&&d==="text/plain"&&(h=f,f=void 0),{action:o,method:r.toLowerCase(),encType:d,formData:f,body:h}}function Lu(l,s){if(l===!1||l===null||typeof l>"u")throw new Error(s)}async function ly(l,s){if(l.id in s)return s[l.id];try{let r=await import(l.module);return s[l.id]=r,r}catch(r){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function sy(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function ry(l,s,r){let o=await Promise.all(l.map(async d=>{let f=s.routes[d.route.id];if(f){let h=await ly(f,r);return h.links?h.links():[]}return[]}));return cy(o.flat(1).filter(sy).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Wh(l,s,r,o,d,f){let h=(m,g)=>r[g]?m.route.id!==r[g].route.id:!0,x=(m,g)=>{var y;return r[g].pathname!==m.pathname||((y=r[g].route.path)==null?void 0:y.endsWith("*"))&&r[g].params["*"]!==m.params["*"]};return f==="assets"?s.filter((m,g)=>h(m,g)||x(m,g)):f==="data"?s.filter((m,g)=>{var S;let y=o.routes[m.route.id];if(!y||!y.hasLoader)return!1;if(h(m,g)||x(m,g))return!0;if(m.route.shouldRevalidate){let v=m.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:((S=r[0])==null?void 0:S.params)||{},nextUrl:new URL(l,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function iy(l,s,{includeHydrateFallback:r}={}){return oy(l.map(o=>{let d=s.routes[o.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),r&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function oy(l){return[...new Set(l)]}function uy(l){let s={},r=Object.keys(l).sort();for(let o of r)s[o]=l[o];return s}function cy(l,s){let r=new Set;return new Set(s),l.reduce((o,d)=>{let f=JSON.stringify(uy(d));return r.has(f)||(r.add(f),o.push({key:f,link:d})),o},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var dy=new Set([100,101,204,205]);function fy(l,s){let r=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return r.pathname==="/"?r.pathname="_root.data":s&&ga(r.pathname,s)==="/"?r.pathname=`${s.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function _m(){let l=w.useContext(tl);return Lu(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function hy(){let l=w.useContext(Qr);return Lu(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var _u=w.createContext(void 0);_u.displayName="FrameworkContext";function Hm(){let l=w.useContext(_u);return Lu(l,"You must render this element inside a <HydratedRouter> element"),l}function my(l,s){let r=w.useContext(_u),[o,d]=w.useState(!1),[f,h]=w.useState(!1),{onFocus:x,onBlur:m,onMouseEnter:g,onMouseLeave:y,onTouchStart:S}=s,v=w.useRef(null);w.useEffect(()=>{if(l==="render"&&h(!0),l==="viewport"){let N=R=>{R.forEach(k=>{h(k.isIntersecting)})},C=new IntersectionObserver(N,{threshold:.5});return v.current&&C.observe(v.current),()=>{C.disconnect()}}},[l]),w.useEffect(()=>{if(o){let N=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(N)}}},[o]);let M=()=>{d(!0)},j=()=>{d(!1),h(!1)};return r?l!=="intent"?[f,v,{}]:[f,v,{onFocus:is(x,M),onBlur:is(m,j),onMouseEnter:is(g,M),onMouseLeave:is(y,j),onTouchStart:is(S,M)}]:[!1,v,{}]}function is(l,s){return r=>{l&&l(r),r.defaultPrevented||s(r)}}function gy({page:l,...s}){let{router:r}=_m(),o=w.useMemo(()=>Cm(r.routes,l,r.basename),[r.routes,l,r.basename]);return o?w.createElement(xy,{page:l,matches:o,...s}):null}function py(l){let{manifest:s,routeModules:r}=Hm(),[o,d]=w.useState([]);return w.useEffect(()=>{let f=!1;return ry(l,s,r).then(h=>{f||d(h)}),()=>{f=!0}},[l,s,r]),o}function xy({page:l,matches:s,...r}){let o=Jt(),{manifest:d,routeModules:f}=Hm(),{basename:h}=_m(),{loaderData:x,matches:m}=hy(),g=w.useMemo(()=>Wh(l,s,m,d,o,"data"),[l,s,m,d,o]),y=w.useMemo(()=>Wh(l,s,m,d,o,"assets"),[l,s,m,d,o]),S=w.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let j=new Set,N=!1;if(s.forEach(R=>{var T;let k=d.routes[R.route.id];!k||!k.hasLoader||(!g.some(D=>D.route.id===R.route.id)&&R.route.id in x&&((T=f[R.route.id])!=null&&T.shouldRevalidate)||k.hasClientLoader?N=!0:j.add(R.route.id))}),j.size===0)return[];let C=fy(l,h);return N&&j.size>0&&C.searchParams.set("_routes",s.filter(R=>j.has(R.route.id)).map(R=>R.route.id).join(",")),[C.pathname+C.search]},[h,x,o,d,g,s,l,f]),v=w.useMemo(()=>iy(y,d),[y,d]),M=py(y);return w.createElement(w.Fragment,null,S.map(j=>w.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...r})),v.map(j=>w.createElement("link",{key:j,rel:"modulepreload",href:j,...r})),M.map(({key:j,link:N})=>w.createElement("link",{key:j,...N})))}function yy(...l){return s=>{l.forEach(r=>{typeof r=="function"?r(s):r!=null&&(r.current=s)})}}var Bm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bm&&(window.__reactRouterVersion="7.6.0")}catch{}function by({basename:l,children:s,window:r}){let o=w.useRef();o.current==null&&(o.current=nx({window:r,v5Compat:!0}));let d=o.current,[f,h]=w.useState({action:d.action,location:d.location}),x=w.useCallback(m=>{w.startTransition(()=>h(m))},[h]);return w.useLayoutEffect(()=>d.listen(x),[d,x]),w.createElement(Zx,{basename:l,children:s,location:f.location,navigationType:f.action,navigator:d})}var qm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gm=w.forwardRef(function({onClick:s,discover:r="render",prefetch:o="none",relative:d,reloadDocument:f,replace:h,state:x,target:m,to:g,preventScrollReset:y,viewTransition:S,...v},M){let{basename:j}=w.useContext(Gt),N=typeof g=="string"&&qm.test(g),C,R=!1;if(typeof g=="string"&&N&&(C=g,Bm))try{let X=new URL(window.location.href),I=g.startsWith("//")?new URL(X.protocol+g):new URL(g),fe=ga(I.pathname,j);I.origin===X.origin&&fe!=null?g=fe+I.search+I.hash:R=!0}catch{qt(!1,`<Link to="${g}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let k=Rx(g,{relative:d}),[T,D,U]=my(o,v),te=Sy(g,{replace:h,state:x,target:m,preventScrollReset:y,relative:d,viewTransition:S});function Y(X){s&&s(X),X.defaultPrevented||te(X)}let L=w.createElement("a",{...v,...U,href:C||k,onClick:R||f?s:Y,ref:yy(M,D),target:m,"data-discover":!N&&r==="render"?"true":void 0});return T&&!N?w.createElement(w.Fragment,null,L,w.createElement(gy,{page:k})):L});Gm.displayName="Link";var Vm=w.forwardRef(function({"aria-current":s="page",caseSensitive:r=!1,className:o="",end:d=!1,style:f,to:h,viewTransition:x,children:m,...g},y){let S=gs(h,{relative:g.relative}),v=Jt(),M=w.useContext(Qr),{navigator:j,basename:N}=w.useContext(Gt),C=M!=null&&ky(S)&&x===!0,R=j.encodeLocation?j.encodeLocation(S).pathname:S.pathname,k=v.pathname,T=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;r||(k=k.toLowerCase(),T=T?T.toLowerCase():null,R=R.toLowerCase()),T&&N&&(T=ga(T,N)||T);const D=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let U=k===R||!d&&k.startsWith(R)&&k.charAt(D)==="/",te=T!=null&&(T===R||!d&&T.startsWith(R)&&T.charAt(R.length)==="/"),Y={isActive:U,isPending:te,isTransitioning:C},L=U?s:void 0,X;typeof o=="function"?X=o(Y):X=[o,U?"active":null,te?"pending":null,C?"transitioning":null].filter(Boolean).join(" ");let I=typeof f=="function"?f(Y):f;return w.createElement(Gm,{...g,"aria-current":L,className:X,ref:y,style:I,to:h,viewTransition:x},typeof m=="function"?m(Y):m)});Vm.displayName="NavLink";var vy=w.forwardRef(({discover:l="render",fetcherKey:s,navigate:r,reloadDocument:o,replace:d,state:f,method:h=Br,action:x,onSubmit:m,relative:g,preventScrollReset:y,viewTransition:S,...v},M)=>{let j=Ey(),N=Cy(x,{relative:g}),C=h.toLowerCase()==="get"?"get":"post",R=typeof x=="string"&&qm.test(x),k=T=>{if(m&&m(T),T.defaultPrevented)return;T.preventDefault();let D=T.nativeEvent.submitter,U=(D==null?void 0:D.getAttribute("formmethod"))||h;j(D||T.currentTarget,{fetcherKey:s,method:U,navigate:r,replace:d,state:f,relative:g,preventScrollReset:y,viewTransition:S})};return w.createElement("form",{ref:M,method:C,action:N,onSubmit:o?m:k,...v,"data-discover":!R&&l==="render"?"true":void 0})});vy.displayName="Form";function wy(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ym(l){let s=w.useContext(tl);return Be(s,wy(l)),s}function Sy(l,{target:s,replace:r,state:o,preventScrollReset:d,relative:f,viewTransition:h}={}){let x=un(),m=Jt(),g=gs(l,{relative:f});return w.useCallback(y=>{if(ey(y,s)){y.preventDefault();let S=r!==void 0?r:ds(m)===ds(g);x(l,{replace:S,state:o,preventScrollReset:d,relative:f,viewTransition:h})}},[m,x,g,r,o,s,l,d,f,h])}var Ny=0,jy=()=>`__${String(++Ny)}__`;function Ey(){let{router:l}=Ym("useSubmit"),{basename:s}=w.useContext(Gt),r=$x();return w.useCallback(async(o,d={})=>{let{action:f,method:h,encType:x,formData:m,body:g}=ny(o,s);if(d.navigate===!1){let y=d.fetcherKey||jy();await l.fetch(y,r,d.action||f,{preventScrollReset:d.preventScrollReset,formData:m,body:g,formMethod:d.method||h,formEncType:d.encType||x,flushSync:d.flushSync})}else await l.navigate(d.action||f,{preventScrollReset:d.preventScrollReset,formData:m,body:g,formMethod:d.method||h,formEncType:d.encType||x,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,s,r])}function Cy(l,{relative:s}={}){let{basename:r}=w.useContext(Gt),o=w.useContext(Lt);Be(o,"useFormAction must be used inside a RouteContext");let[d]=o.matches.slice(-1),f={...gs(l||".",{relative:s})},h=Jt();if(l==null){f.search=h.search;let x=new URLSearchParams(f.search),m=x.getAll("index");if(m.some(y=>y==="")){x.delete("index"),m.filter(S=>S).forEach(S=>x.append("index",S));let y=x.toString();f.search=y?`?${y}`:""}}return(!l||l===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:ma([r,f.pathname])),ds(f)}function ky(l,s={}){let r=w.useContext(Rm);Be(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Ym("useViewTransitionState"),d=gs(l,{relative:s.relative});if(!r.isTransitioning)return!1;let f=ga(r.currentLocation.pathname,o)||r.currentLocation.pathname,h=ga(r.nextLocation.pathname,o)||r.nextLocation.pathname;return Gr(d.pathname,h)!=null||Gr(d.pathname,f)!=null}[...dy];const Ay=()=>window.__MCPHUB_CONFIG__||{basePath:"",version:"dev",name:"mcphub"},$m=()=>{const s=Ay().basePath||"";return s&&!s.startsWith("/")?"/"+s:s},Ty=()=>$m()+"/api",Ce=l=>{const s=Ty(),r=l.startsWith("/")?l:"/"+l;return s+r},Ry=async()=>{try{const l=window.location.pathname,s=[l.replace(/\/[^\/]*$/,"")+"/config","/config",...l.includes("/")?[l.split("/")[1]?`/${l.split("/")[1]}/config`:"/config"]:["/config"]];for(const r of s)try{const o=await fetch(r,{method:"GET",headers:{Accept:"application/json","Cache-Control":"no-cache"}});if(o.ok){const d=await o.json();if(d.success&&d.data)return d.data}}catch(o){console.debug(`Failed to load config from ${r}:`,o)}return console.warn("Could not load runtime config from server, using defaults"),{basePath:"",version:"dev",name:"mcphub"}}catch(l){return console.error("Error loading runtime config:",l),{basePath:"",version:"dev",name:"mcphub"}}},Hu="mcphub_token",nl=()=>localStorage.getItem(Hu),Km=l=>{localStorage.setItem(Hu,l)},Su=()=>{localStorage.removeItem(Hu)},Oy=async l=>{try{console.log(Ce("/auth/login"));const r=await(await fetch(Ce("/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return r.success&&r.token&&Km(r.token),r}catch(s){return console.error("Login error:",s),{success:!1,message:"An error occurred during login"}}},My=async l=>{try{const r=await(await fetch(Ce("/auth/register"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})).json();return r.success&&r.token&&Km(r.token),r}catch(s){return console.error("Register error:",s),{success:!1,message:"An error occurred during registration"}}},zy=async()=>{const l=nl();if(!l)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ce("/auth/user"),{method:"GET",headers:{"x-auth-token":l}})).json()}catch(s){return console.error("Get current user error:",s),{success:!1,message:"An error occurred while fetching user data"}}},Dy=async l=>{const s=nl();if(!s)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ce("/auth/change-password"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":s},body:JSON.stringify(l)})).json()}catch(r){return console.error("Change password error:",r),{success:!1,message:"An error occurred while changing password"}}},Uy=()=>{Su()},Zt={token:null,isAuthenticated:!1,loading:!0,user:null,error:null},Qm=w.createContext({auth:Zt,login:async()=>!1,register:async()=>!1,logout:()=>{}}),Ly=({children:l})=>{const[s,r]=w.useState(Zt);w.useEffect(()=>{(async()=>{const x=nl();if(!x){r({...Zt,loading:!1});return}try{const m=await zy();m.success&&m.user?r({token:x,isAuthenticated:!0,loading:!1,user:m.user,error:null}):(Su(),r({...Zt,loading:!1}))}catch{Su(),r({...Zt,loading:!1})}})()},[]);const o=async(h,x)=>{try{const m=await Oy({username:h,password:x});return m.success&&m.token&&m.user?(r({token:m.token,isAuthenticated:!0,loading:!1,user:m.user,error:null}),!0):(r({...Zt,loading:!1,error:m.message||"Authentication failed"}),!1)}catch{return r({...Zt,loading:!1,error:"Authentication failed"}),!1}},d=async(h,x,m=!1)=>{try{const g=await My({username:h,password:x,isAdmin:m});return g.success&&g.token&&g.user?(r({token:g.token,isAuthenticated:!0,loading:!1,user:g.user,error:null}),!0):(r({...Zt,loading:!1,error:g.message||"Registration failed"}),!1)}catch{return r({...Zt,loading:!1,error:"Registration failed"}),!1}},f=()=>{Uy(),r({...Zt,loading:!1})};return u.jsx(Qm.Provider,{value:{auth:s,login:o,register:d,logout:f},children:l})},Zr=()=>w.useContext(Qm);/**
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 _y=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Hy=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(s,r,o)=>o?o.toUpperCase():r.toLowerCase()),Ih=l=>{const s=Hy(l);return s.charAt(0).toUpperCase()+s.slice(1)},Xm=(...l)=>l.filter((s,r,o)=>!!s&&s.trim()!==""&&o.indexOf(s)===r).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 By={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 qy=w.forwardRef(({color:l="currentColor",size:s=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:d="",children:f,iconNode:h,...x},m)=>w.createElement("svg",{ref:m,...By,width:s,height:s,stroke:l,strokeWidth:o?Number(r)*24/Number(s):r,className:Xm("lucide",d),...x},[...h.map(([g,y])=>w.createElement(g,y)),...Array.isArray(f)?f:[f]]));/**
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 Je=(l,s)=>{const r=w.forwardRef(({className:o,...d},f)=>w.createElement(qy,{ref:f,iconNode:s,className:Xm(`lucide-${_y(Ih(l))}`,`lucide-${l}`,o),...d}));return r.displayName=Ih(l),r};/**
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 Gy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Bu=Je("check",Gy);/**
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 Vy=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zm=Je("chevron-down",Vy);/**
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 Yy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pm=Je("chevron-right",Yy);/**
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 $y=[["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"}]],Jm=Je("circle-alert",$y);/**
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 Ky=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Qy=Je("circle-check-big",Ky);/**
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 Xy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Zy=Je("circle-x",Xy);/**
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 Py=[["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"}]],Fm=Je("copy",Py);/**
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 Jy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Fy=Je("info",Jy);/**
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 Wy=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],Iy=Je("loader",Wy);/**
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 eb=[["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"}]],tb=Je("log-out",eb);/**
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 ab=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],nb=Je("moon",ab);/**
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 lb=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],sb=Je("play",lb);/**
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 rb=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ib=Je("refresh-cw",rb);/**
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 ob=[["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"}]],ub=Je("settings",ob);/**
142
- * @license lucide-react v0.486.0 - ISC
143
- *
144
- * This source code is licensed under the ISC license.
145
- * See the LICENSE file in the root directory of this source tree.
146
- */const cb=[["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"}]],db=Je("square-pen",cb);/**
147
- * @license lucide-react v0.486.0 - ISC
148
- *
149
- * This source code is licensed under the ISC license.
150
- * See the LICENSE file in the root directory of this source tree.
151
- */const fb=[["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"}]],hb=Je("sun",fb);/**
152
- * @license lucide-react v0.486.0 - ISC
153
- *
154
- * This source code is licensed under the ISC license.
155
- * See the LICENSE file in the root directory of this source tree.
156
- */const mb=[["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"}]],gb=Je("trash",mb);/**
157
- * @license lucide-react v0.486.0 - ISC
158
- *
159
- * This source code is licensed under the ISC license.
160
- * See the LICENSE file in the root directory of this source tree.
161
- */const pb=[["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"}]],xb=Je("user",pb);/**
162
- * @license lucide-react v0.486.0 - ISC
163
- *
164
- * This source code is licensed under the ISC license.
165
- * See the LICENSE file in the root directory of this source tree.
166
- */const yb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fs=Je("x",yb);function Wm(l){var s,r,o="";if(typeof l=="string"||typeof l=="number")o+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(s=0;s<d;s++)l[s]&&(r=Wm(l[s]))&&(o&&(o+=" "),o+=r)}else for(r in l)l[r]&&(o&&(o+=" "),o+=r);return o}function bb(){for(var l,s,r=0,o="",d=arguments.length;r<d;r++)(l=arguments[r])&&(s=Wm(l))&&(o&&(o+=" "),o+=s);return o}const qu="-",vb=l=>{const s=Sb(l),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=l;return{getClassGroupId:h=>{const x=h.split(qu);return x[0]===""&&x.length!==1&&x.shift(),Im(x,s)||wb(h)},getConflictingClassGroupIds:(h,x)=>{const m=r[h]||[];return x&&o[h]?[...m,...o[h]]:m}}},Im=(l,s)=>{var h;if(l.length===0)return s.classGroupId;const r=l[0],o=s.nextPart.get(r),d=o?Im(l.slice(1),o):void 0;if(d)return d;if(s.validators.length===0)return;const f=l.join(qu);return(h=s.validators.find(({validator:x})=>x(f)))==null?void 0:h.classGroupId},em=/^\[(.+)\]$/,wb=l=>{if(em.test(l)){const s=em.exec(l)[1],r=s==null?void 0:s.substring(0,s.indexOf(":"));if(r)return"arbitrary.."+r}},Sb=l=>{const{theme:s,classGroups:r}=l,o={nextPart:new Map,validators:[]};for(const d in r)Nu(r[d],o,d,s);return o},Nu=(l,s,r,o)=>{l.forEach(d=>{if(typeof d=="string"){const f=d===""?s:tm(s,d);f.classGroupId=r;return}if(typeof d=="function"){if(Nb(d)){Nu(d(o),s,r,o);return}s.validators.push({validator:d,classGroupId:r});return}Object.entries(d).forEach(([f,h])=>{Nu(h,tm(s,f),r,o)})})},tm=(l,s)=>{let r=l;return s.split(qu).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Nb=l=>l.isThemeGetter,jb=l=>{if(l<1)return{get:()=>{},set:()=>{}};let s=0,r=new Map,o=new Map;const d=(f,h)=>{r.set(f,h),s++,s>l&&(s=0,o=r,r=new Map)};return{get(f){let h=r.get(f);if(h!==void 0)return h;if((h=o.get(f))!==void 0)return d(f,h),h},set(f,h){r.has(f)?r.set(f,h):d(f,h)}}},ju="!",Eu=":",Eb=Eu.length,Cb=l=>{const{prefix:s,experimentalParseClassName:r}=l;let o=d=>{const f=[];let h=0,x=0,m=0,g;for(let j=0;j<d.length;j++){let N=d[j];if(h===0&&x===0){if(N===Eu){f.push(d.slice(m,j)),m=j+Eb;continue}if(N==="/"){g=j;continue}}N==="["?h++:N==="]"?h--:N==="("?x++:N===")"&&x--}const y=f.length===0?d:d.substring(m),S=kb(y),v=S!==y,M=g&&g>m?g-m:void 0;return{modifiers:f,hasImportantModifier:v,baseClassName:S,maybePostfixModifierPosition:M}};if(s){const d=s+Eu,f=o;o=h=>h.startsWith(d)?f(h.substring(d.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:h,maybePostfixModifierPosition:void 0}}if(r){const d=o;o=f=>r({className:f,parseClassName:d})}return o},kb=l=>l.endsWith(ju)?l.substring(0,l.length-1):l.startsWith(ju)?l.substring(1):l,Ab=l=>{const s=Object.fromEntries(l.orderSensitiveModifiers.map(o=>[o,!0]));return o=>{if(o.length<=1)return o;const d=[];let f=[];return o.forEach(h=>{h[0]==="["||s[h]?(d.push(...f.sort(),h),f=[]):f.push(h)}),d.push(...f.sort()),d}},Tb=l=>({cache:jb(l.cacheSize),parseClassName:Cb(l),sortModifiers:Ab(l),...vb(l)}),Rb=/\s+/,Ob=(l,s)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:d,sortModifiers:f}=s,h=[],x=l.trim().split(Rb);let m="";for(let g=x.length-1;g>=0;g-=1){const y=x[g],{isExternal:S,modifiers:v,hasImportantModifier:M,baseClassName:j,maybePostfixModifierPosition:N}=r(y);if(S){m=y+(m.length>0?" "+m:m);continue}let C=!!N,R=o(C?j.substring(0,N):j);if(!R){if(!C){m=y+(m.length>0?" "+m:m);continue}if(R=o(j),!R){m=y+(m.length>0?" "+m:m);continue}C=!1}const k=f(v).join(":"),T=M?k+ju:k,D=T+R;if(h.includes(D))continue;h.push(D);const U=d(R,C);for(let te=0;te<U.length;++te){const Y=U[te];h.push(T+Y)}m=y+(m.length>0?" "+m:m)}return m};function Mb(){let l=0,s,r,o="";for(;l<arguments.length;)(s=arguments[l++])&&(r=eg(s))&&(o&&(o+=" "),o+=r);return o}const eg=l=>{if(typeof l=="string")return l;let s,r="";for(let o=0;o<l.length;o++)l[o]&&(s=eg(l[o]))&&(r&&(r+=" "),r+=s);return r};function zb(l,...s){let r,o,d,f=h;function h(m){const g=s.reduce((y,S)=>S(y),l());return r=Tb(g),o=r.cache.get,d=r.cache.set,f=x,x(m)}function x(m){const g=o(m);if(g)return g;const y=Ob(m,r);return d(m,y),y}return function(){return f(Mb.apply(null,arguments))}}const Pe=l=>{const s=r=>r[l]||[];return s.isThemeGetter=!0,s},tg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ag=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Db=/^\d+\/\d+$/,Ub=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lb=/\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$/,_b=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pn=l=>Db.test(l),Se=l=>!!l&&!Number.isNaN(Number(l)),qa=l=>!!l&&Number.isInteger(Number(l)),pu=l=>l.endsWith("%")&&Se(l.slice(0,-1)),ha=l=>Ub.test(l),qb=()=>!0,Gb=l=>Lb.test(l)&&!_b.test(l),ng=()=>!1,Vb=l=>Hb.test(l),Yb=l=>Bb.test(l),$b=l=>!ue(l)&&!ce(l),Kb=l=>ll(l,rg,ng),ue=l=>tg.test(l),rn=l=>ll(l,ig,Gb),xu=l=>ll(l,Jb,Se),am=l=>ll(l,lg,ng),Qb=l=>ll(l,sg,Yb),zr=l=>ll(l,og,Vb),ce=l=>ag.test(l),os=l=>sl(l,ig),Xb=l=>sl(l,Fb),nm=l=>sl(l,lg),Zb=l=>sl(l,rg),Pb=l=>sl(l,sg),Dr=l=>sl(l,og,!0),ll=(l,s,r)=>{const o=tg.exec(l);return o?o[1]?s(o[1]):r(o[2]):!1},sl=(l,s,r=!1)=>{const o=ag.exec(l);return o?o[1]?s(o[1]):r:!1},lg=l=>l==="position"||l==="percentage",sg=l=>l==="image"||l==="url",rg=l=>l==="length"||l==="size"||l==="bg-size",ig=l=>l==="length",Jb=l=>l==="number",Fb=l=>l==="family-name",og=l=>l==="shadow",Wb=()=>{const l=Pe("color"),s=Pe("font"),r=Pe("text"),o=Pe("font-weight"),d=Pe("tracking"),f=Pe("leading"),h=Pe("breakpoint"),x=Pe("container"),m=Pe("spacing"),g=Pe("radius"),y=Pe("shadow"),S=Pe("inset-shadow"),v=Pe("text-shadow"),M=Pe("drop-shadow"),j=Pe("blur"),N=Pe("perspective"),C=Pe("aspect"),R=Pe("ease"),k=Pe("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...D(),ce,ue],te=()=>["auto","hidden","clip","visible","scroll"],Y=()=>["auto","contain","none"],L=()=>[ce,ue,m],X=()=>[Pn,"full","auto",...L()],I=()=>[qa,"none","subgrid",ce,ue],fe=()=>["auto",{span:["full",qa,ce,ue]},qa,ce,ue],ae=()=>[qa,"auto",ce,ue],se=()=>["auto","min","max","fr",ce,ue],ie=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],G=()=>["auto",...L()],F=()=>[Pn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],q=()=>[l,ce,ue],de=()=>[...D(),nm,am,{position:[ce,ue]}],A=()=>["no-repeat",{repeat:["","x","y","space","round"]}],$=()=>["auto","cover","contain",Zb,Kb,{size:[ce,ue]}],W=()=>[pu,os,rn],Z=()=>["","none","full",g,ce,ue],ne=()=>["",Se,os,rn],ve=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Se,pu,nm,am],le=()=>["","none",j,ce,ue],me=()=>["none",Se,ce,ue],tt=()=>["none",Se,ce,ue],ct=()=>[Se,ce,ue],pt=()=>[Pn,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ha],breakpoint:[ha],color:[qb],container:[ha],"drop-shadow":[ha],ease:["in","out","in-out"],font:[$b],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ha],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ha],shadow:[ha],spacing:["px",Se],text:[ha],"text-shadow":[ha],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pn,ue,ce,C]}],container:["container"],columns:[{columns:[Se,ue,ce,x]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:U()}],overflow:[{overflow:te()}],"overflow-x":[{"overflow-x":te()}],"overflow-y":[{"overflow-y":te()}],overscroll:[{overscroll:Y()}],"overscroll-x":[{"overscroll-x":Y()}],"overscroll-y":[{"overscroll-y":Y()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{start:X()}],end:[{end:X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[qa,"auto",ce,ue]}],basis:[{basis:[Pn,"full","auto",x,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Se,Pn,"auto","initial","none",ue]}],grow:[{grow:["",Se,ce,ue]}],shrink:[{shrink:["",Se,ce,ue]}],order:[{order:[qa,"first","last","none",ce,ue]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":se()}],"auto-rows":[{"auto-rows":se()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...ie(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ie()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:G()}],mx:[{mx:G()}],my:[{my:G()}],ms:[{ms:G()}],me:[{me:G()}],mt:[{mt:G()}],mr:[{mr:G()}],mb:[{mb:G()}],ml:[{ml:G()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[x,"screen",...F()]}],"min-w":[{"min-w":[x,"screen","none",...F()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[h]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",r,os,rn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,ce,xu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pu,ue]}],"font-family":[{font:[Xb,ue,s]}],"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:[d,ce,ue]}],"line-clamp":[{"line-clamp":[Se,"none",ce,xu]}],leading:[{leading:[f,...L()]}],"list-image":[{"list-image":["none",ce,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ce,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:q()}],"text-color":[{text:q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Se,"from-font","auto",ce,rn]}],"text-decoration-color":[{decoration:q()}],"underline-offset":[{"underline-offset":[Se,"auto",ce,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ce,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ce,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:A()}],"bg-size":[{bg:$()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qa,ce,ue],radial:["",ce,ue],conic:[qa,ce,ue]},Pb,Qb]}],"bg-color":[{bg:q()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:q()}],"gradient-via":[{via:q()}],"gradient-to":[{to:q()}],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:ne()}],"border-w-x":[{"border-x":ne()}],"border-w-y":[{"border-y":ne()}],"border-w-s":[{"border-s":ne()}],"border-w-e":[{"border-e":ne()}],"border-w-t":[{"border-t":ne()}],"border-w-r":[{"border-r":ne()}],"border-w-b":[{"border-b":ne()}],"border-w-l":[{"border-l":ne()}],"divide-x":[{"divide-x":ne()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ne()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:q()}],"border-color-x":[{"border-x":q()}],"border-color-y":[{"border-y":q()}],"border-color-s":[{"border-s":q()}],"border-color-e":[{"border-e":q()}],"border-color-t":[{"border-t":q()}],"border-color-r":[{"border-r":q()}],"border-color-b":[{"border-b":q()}],"border-color-l":[{"border-l":q()}],"divide-color":[{divide:q()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Se,ce,ue]}],"outline-w":[{outline:["",Se,os,rn]}],"outline-color":[{outline:q()}],shadow:[{shadow:["","none",y,Dr,zr]}],"shadow-color":[{shadow:q()}],"inset-shadow":[{"inset-shadow":["none",S,Dr,zr]}],"inset-shadow-color":[{"inset-shadow":q()}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:q()}],"ring-offset-w":[{"ring-offset":[Se,rn]}],"ring-offset-color":[{"ring-offset":q()}],"inset-ring-w":[{"inset-ring":ne()}],"inset-ring-color":[{"inset-ring":q()}],"text-shadow":[{"text-shadow":["none",v,Dr,zr]}],"text-shadow-color":[{"text-shadow":q()}],opacity:[{opacity:[Se,ce,ue]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Se]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":q()}],"mask-image-linear-to-color":[{"mask-linear-to":q()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":q()}],"mask-image-t-to-color":[{"mask-t-to":q()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":q()}],"mask-image-r-to-color":[{"mask-r-to":q()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":q()}],"mask-image-b-to-color":[{"mask-b-to":q()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":q()}],"mask-image-l-to-color":[{"mask-l-to":q()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":q()}],"mask-image-x-to-color":[{"mask-x-to":q()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":q()}],"mask-image-y-to-color":[{"mask-y-to":q()}],"mask-image-radial":[{"mask-radial":[ce,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":q()}],"mask-image-radial-to-color":[{"mask-radial-to":q()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Se]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":q()}],"mask-image-conic-to-color":[{"mask-conic-to":q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:A()}],"mask-size":[{mask:$()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ce,ue]}],filter:[{filter:["","none",ce,ue]}],blur:[{blur:le()}],brightness:[{brightness:[Se,ce,ue]}],contrast:[{contrast:[Se,ce,ue]}],"drop-shadow":[{"drop-shadow":["","none",M,Dr,zr]}],"drop-shadow-color":[{"drop-shadow":q()}],grayscale:[{grayscale:["",Se,ce,ue]}],"hue-rotate":[{"hue-rotate":[Se,ce,ue]}],invert:[{invert:["",Se,ce,ue]}],saturate:[{saturate:[Se,ce,ue]}],sepia:[{sepia:["",Se,ce,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",ce,ue]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Se,ce,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Se,ce,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Se,ce,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Se,ce,ue]}],"backdrop-invert":[{"backdrop-invert":["",Se,ce,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Se,ce,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Se,ce,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Se,ce,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ce,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Se,"initial",ce,ue]}],ease:[{ease:["linear","initial",R,ce,ue]}],delay:[{delay:[Se,ce,ue]}],animate:[{animate:["none",k,ce,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,ce,ue]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:tt()}],"scale-x":[{"scale-x":tt()}],"scale-y":[{"scale-y":tt()}],"scale-z":[{"scale-z":tt()}],"scale-3d":["scale-3d"],skew:[{skew:ct()}],"skew-x":[{"skew-x":ct()}],"skew-y":[{"skew-y":ct()}],transform:[{transform:[ce,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pt()}],"translate-x":[{"translate-x":pt()}],"translate-y":[{"translate-y":pt()}],"translate-z":[{"translate-z":pt()}],"translate-none":["translate-none"],accent:[{accent:q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:q()}],"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",ce,ue]}],"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":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",ce,ue]}],fill:[{fill:["none",...q()]}],"stroke-w":[{stroke:[Se,os,rn,xu]}],stroke:[{stroke:["none",...q()]}],"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-x","border-w-y","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-x","border-color-y","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:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Ib=zb(Wb);function Ga(...l){return Ib(bb(l))}const ev=({message:l,type:s="info",duration:r=3e3,onClose:o,visible:d})=>{w.useEffect(()=>{if(d){const m=setTimeout(()=>{o()},r);return()=>clearTimeout(m)}},[d,r,o]);const f={success:u.jsx(Bu,{className:"w-5 h-5 text-green-500"}),error:u.jsx(fs,{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"})})},h={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"},x={success:"text-green-800",error:"text-red-800",info:"text-blue-800",warning:"text-yellow-800"};return u.jsx("div",{className:Ga("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",h[s],"transform transition-all duration-300 ease-in-out",d?"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:f[s]}),u.jsx("div",{className:"ml-3",children:u.jsx("p",{className:Ga("text-sm font-medium",x[s]),children:l})}),u.jsx("div",{className:"ml-auto pl-3",children:u.jsx("div",{className:"-mx-1.5 -my-1.5",children:u.jsxs("button",{onClick:o,className:Ga("inline-flex rounded-md p-1.5",`hover:bg-${s}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${s}-500`),children:[u.jsx("span",{className:"sr-only",children:"Dismiss"}),u.jsx(fs,{className:"h-5 w-5"})]})})})]})})},ug=w.createContext(void 0),ps=()=>{const l=w.useContext(ug);if(!l)throw new Error("useToast must be used within a ToastProvider");return l},tv=({children:l})=>{const[s,r]=w.useState({message:"",type:"info",visible:!1,duration:3e3}),o=w.useCallback((f,h="info",x=3e3)=>{r({message:f,type:h,visible:!0,duration:x})},[]),d=w.useCallback(()=>{r(f=>({...f,visible:!1}))},[]);return u.jsxs(ug.Provider,{value:{showToast:o},children:[l,u.jsx(ev,{message:s.message,type:s.type,duration:s.duration,onClose:d,visible:s.visible})]})},cg=w.createContext(void 0),av=()=>{const l=w.useContext(cg);if(!l)throw new Error("useTheme must be used within a ThemeProvider");return l},nv=({children:l})=>{const[s,r]=w.useState(()=>localStorage.getItem("theme")||"system"),[o,d]=w.useState("light"),f=h=>{r(h),localStorage.setItem("theme",h)};return w.useEffect(()=>{const h=()=>{const m=window.document.documentElement,g=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",y=s==="system"?g:s;d(y),y==="dark"?(console.log("Applying dark mode to HTML root element"),m.classList.add("dark"),document.body.style.backgroundColor="#111827"):(console.log("Removing dark mode from HTML root element"),m.classList.remove("dark"),document.body.style.backgroundColor="")},x=window.matchMedia("(prefers-color-scheme: dark)");return x.addEventListener("change",h),h(),()=>{x.removeEventListener("change",h)}},[s]),u.jsx(cg.Provider,{value:{theme:s,setTheme:f,resolvedTheme:o},children:l})},lv=(l,s,r,o)=>{var f,h,x,m;const d=[r,{code:s,...o||{}}];if((h=(f=l==null?void 0:l.services)==null?void 0:f.logger)!=null&&h.forward)return l.services.logger.forward(d,"warn","react-i18next::",!0);on(d[0])&&(d[0]=`react-i18next:: ${d[0]}`),(m=(x=l==null?void 0:l.services)==null?void 0:x.logger)!=null&&m.warn?l.services.logger.warn(...d):console!=null&&console.warn&&console.warn(...d)},lm={},Cu=(l,s,r,o)=>{on(r)&&lm[r]||(on(r)&&(lm[r]=new Date),lv(l,s,r,o))},dg=(l,s)=>()=>{if(l.isInitialized)s();else{const r=()=>{setTimeout(()=>{l.off("initialized",r)},0),s()};l.on("initialized",r)}},ku=(l,s,r)=>{l.loadNamespaces(s,dg(l,r))},sm=(l,s,r,o)=>{if(on(r)&&(r=[r]),l.options.preload&&l.options.preload.indexOf(s)>-1)return ku(l,r,o);r.forEach(d=>{l.options.ns.indexOf(d)<0&&l.options.ns.push(d)}),l.loadLanguages(s,dg(l,o))},sv=(l,s,r={})=>!s.languages||!s.languages.length?(Cu(s,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:s.languages}),!0):s.hasLoadedNamespace(l,{lng:r.lng,precheck:(o,d)=>{var f;if(((f=r.bindI18n)==null?void 0:f.indexOf("languageChanging"))>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!d(o.isLanguageChangingTo,l))return!1}}),on=l=>typeof l=="string",rv=l=>typeof l=="object"&&l!==null,iv=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ov={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},uv=l=>ov[l],cv=l=>l.replace(iv,uv);let Au={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:cv};const dv=(l={})=>{Au={...Au,...l}},fv=()=>Au;let fg;const hv=l=>{fg=l},mv=()=>fg,gv={type:"3rdParty",init(l){dv(l.options.react),hv(l)}},pv=w.createContext();class xv{constructor(){this.usedNamespaces={}}addUsedNamespaces(s){s.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const yv=(l,s)=>{const r=w.useRef();return w.useEffect(()=>{r.current=l},[l,s]),r.current},hg=(l,s,r,o)=>l.getFixedT(s,r,o),bv=(l,s,r,o)=>w.useCallback(hg(l,s,r,o),[l,s,r,o]),ke=(l,s={})=>{var D,U,te,Y;const{i18n:r}=s,{i18n:o,defaultNS:d}=w.useContext(pv)||{},f=r||o||mv();if(f&&!f.reportNamespaces&&(f.reportNamespaces=new xv),!f){Cu(f,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const L=(I,fe)=>on(fe)?fe:rv(fe)&&on(fe.defaultValue)?fe.defaultValue:Array.isArray(I)?I[I.length-1]:I,X=[L,{},!1];return X.t=L,X.i18n={},X.ready=!1,X}(D=f.options.react)!=null&&D.wait&&Cu(f,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const h={...fv(),...f.options.react,...s},{useSuspense:x,keyPrefix:m}=h;let g=d||((U=f.options)==null?void 0:U.defaultNS);g=on(g)?[g]:g||["translation"],(Y=(te=f.reportNamespaces).addUsedNamespaces)==null||Y.call(te,g);const y=(f.isInitialized||f.initializedStoreOnce)&&g.every(L=>sv(L,f,h)),S=bv(f,s.lng||null,h.nsMode==="fallback"?g:g[0],m),v=()=>S,M=()=>hg(f,s.lng||null,h.nsMode==="fallback"?g:g[0],m),[j,N]=w.useState(v);let C=g.join();s.lng&&(C=`${s.lng}${C}`);const R=yv(C),k=w.useRef(!0);w.useEffect(()=>{const{bindI18n:L,bindI18nStore:X}=h;k.current=!0,!y&&!x&&(s.lng?sm(f,s.lng,g,()=>{k.current&&N(M)}):ku(f,g,()=>{k.current&&N(M)})),y&&R&&R!==C&&k.current&&N(M);const I=()=>{k.current&&N(M)};return L&&(f==null||f.on(L,I)),X&&(f==null||f.store.on(X,I)),()=>{k.current=!1,f&&(L==null||L.split(" ").forEach(fe=>f.off(fe,I))),X&&f&&X.split(" ").forEach(fe=>f.store.off(fe,I))}},[f,C]),w.useEffect(()=>{k.current&&y&&N(v)},[f,m,y]);const T=[j,f,y];if(T.t=j,T.i18n=f,T.ready=y,y||!y&&!x)return T;throw new Promise(L=>{s.lng?sm(f,s.lng,g,()=>L()):ku(f,g,()=>L())})},mg=()=>{const{t:l}=ke(),{theme:s,setTheme:r}=av();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:()=>r("light"),className:`flex items-center justify-center rounded-md p-1.5 ${s==="light"?"bg-white text-yellow-600 shadow":"text-black dark:text-gray-300 hover:text-yellow-600 dark:hover:text-yellow-500"}`,title:l("theme.light"),"aria-label":l("theme.light"),children:u.jsx(hb,{size:18})}),u.jsx("button",{onClick:()=>r("dark"),className:`flex items-center justify-center rounded-md p-1.5 ${s==="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:l("theme.dark"),"aria-label":l("theme.dark"),children:u.jsx(nb,{size:18})})]})})},vv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"GitHub"}),u.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),wv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"Sponsor"}),u.jsx("path",{d:"M17.625 1.499c-2.32 0-4.354 1.203-5.625 3.03-1.271-1.827-3.305-3.03-5.625-3.03C3.129 1.499 0 4.253 0 8.249c0 4.275 3.068 7.847 5.828 10.227a33.14 33.14 0 0 0 5.616 3.876l.028.017.008.003-.001.003c.163.085.342.126.521.125.179.001.358-.041.521-.125l-.001-.003.008-.003.028-.017a33.14 33.14 0 0 0 5.616-3.876C20.932 16.096 24 12.524 24 8.249c0-3.996-3.129-6.75-6.375-6.75zm-.919 15.275a30.766 30.766 0 0 1-4.703 3.316l-.004-.002-.004.002a30.955 30.955 0 0 1-4.703-3.316c-2.677-2.307-5.047-5.298-5.047-8.523 0-2.754 2.121-4.5 4.125-4.5 2.06 0 3.914 1.479 4.544 3.684.143.495.596.797 1.086.796.49.001.943-.302 1.085-.796.63-2.205 2.484-3.684 4.544-3.684 2.004 0 4.125 1.746 4.125 4.5 0 3.225-2.37 6.216-5.048 8.523z"})]}),Sv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"WeChat"}),u.jsx("path",{d:"M8.691 2.188C3.891 2.188 0 5.476 0 9.53c0 2.212 1.17 4.203 3.002 5.55a.59.59 0 0 1 .213.665l-.39 1.48c-.019.07-.048.141-.048.213 0 .163.13.295.29.295a.326.326 0 0 0 .167-.054l1.903-1.114a.864.864 0 0 1 .717-.098 10.16 10.16 0 0 0 2.837.403c.276 0 .543-.027.811-.05-.857-2.578.157-4.972 1.932-6.446 1.703-1.415 3.882-1.98 5.853-1.838-.576-3.583-4.196-6.348-8.596-6.348zM5.785 5.991c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178A1.17 1.17 0 0 1 4.623 7.17c0-.651.52-1.18 1.162-1.18zm5.813 0c.642 0 1.162.529 1.162 1.18a1.17 1.17 0 0 1-1.162 1.178 1.17 1.17 0 0 1-1.162-1.178c0-.651.52-1.18 1.162-1.18zm5.34 2.867c-1.797-.052-3.746.512-5.28 1.786-1.72 1.428-2.687 3.72-1.78 6.22.942 2.453 3.666 4.229 6.884 4.229.826 0 1.622-.12 2.361-.336a.722.722 0 0 1 .598.082l1.584.926a.272.272 0 0 0 .14.047c.134 0 .24-.111.24-.247 0-.06-.023-.12-.038-.177l-.327-1.233a.582.582 0 0 1-.023-.156.49.49 0 0 1 .201-.398C23.024 18.48 24 16.82 24 14.98c0-3.21-2.931-5.837-6.656-6.088V8.89c-.135-.01-.27-.027-.407-.03zm-2.53 3.274c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.97-.982zm4.844 0c.535 0 .969.44.969.982a.976.976 0 0 1-.969.983.976.976 0 0 1-.969-.983c0-.542.434-.982.969-.982z"})]}),Nv=l=>u.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...l,children:[u.jsx("title",{children:"Discord"}),u.jsx("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"})]}),jv=({open:l,onOpenChange:s})=>{const{i18n:r,t:o}=ke();return l?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 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:()=>s(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:u.jsx(fs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("sponsor.title")}),u.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:r.language==="zh"?u.jsx("img",{src:"./assets/reward.png",alt:o("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):u.jsxs("div",{className:"text-center",children:[u.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:o("sponsor.supportMessage")}),u.jsx("a",{href:"https://ko-fi.com/samanhappy",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center bg-[#13C3FF] text-white px-4 py-2 rounded-md hover:bg-[#00A5E5] transition-colors",children:o("sponsor.supportButton")})]})})]})})}):null},Ev=({open:l,onOpenChange:s})=>{const{t:r}=ke();return l?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 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:()=>s(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":r("common.close"),children:u.jsx(fs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:r("wechat.title")}),u.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[u.jsx("img",{src:"./assets/wexin.png",alt:r("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),u.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:r("wechat.scanMessage")})]})]})})}):null},Cv=({onToggleSidebar:l})=>{const{t:s,i18n:r}=ke(),{auth:o}=Zr(),[d,f]=w.useState(!1),[h,x]=w.useState(!1);return u.jsxs("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:l,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":s("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:s("app.title")})]}),u.jsxs("div",{className:"flex items-center space-x-4",children:[u.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"v0.7.4"}),u.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200","aria-label":"GitHub Repository",children:u.jsx(vv,{className:"h-5 w-5"})}),r.language==="zh"?u.jsx("button",{onClick:()=>x(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":s("wechat.label"),children:u.jsx(Sv,{className:"h-5 w-5"})}):u.jsx("a",{href:"https://discord.gg/qMKNsn5Q",target:"_blank",rel:"noopener noreferrer",className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200","aria-label":s("discord.label"),children:u.jsx(Nv,{className:"h-5 w-5"})}),u.jsx("button",{onClick:()=>f(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":s("sponsor.label"),children:u.jsx(wv,{className:"h-5 w-5"})}),u.jsx(mg,{})]})]}),u.jsx(jv,{open:d,onOpenChange:f}),u.jsx(Ev,{open:h,onOpenChange:x})]})},kv="https://registry.npmjs.org",Av="@samanhappy/mcphub",gg=async()=>{try{const l=await fetch(`${kv}/${Av}/latest`);if(!l.ok)throw new Error(`Failed to fetch latest version: ${l.status}`);return(await l.json()).version||null}catch(l){return console.error("Error checking for latest version:",l),null}},pg=(l,s)=>{if(l==="dev")return-1;const r=l.split(".").map(Number),o=s.split(".").map(Number);for(let d=0;d<3;d++){const f=r[d]||0,h=o[d]||0;if(f>h)return-1;if(f<h)return 1}return 0},Tv=({isOpen:l,onClose:s,version:r})=>{const{t:o}=ke(),[d,f]=w.useState(!1),[h,x]=w.useState(""),[m,g]=w.useState(!1),y=async()=>{g(!0);try{const S=await gg();S&&(x(S),f(pg(r,S)>0))}catch(S){console.error("Failed to check for updates:",S)}finally{g(!1)}};return w.useEffect(()=>{l&&y()},[l,r]),l?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:s,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":o("common.close"),children:u.jsx(fs,{className:"h-5 w-5"})}),u.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:o("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:[o("about.currentVersion"),":"]}),u.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:r})]}),d&&h&&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.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[u.jsx("p",{children:o("about.newVersionAvailable",{version:h})}),u.jsx("p",{className:"mt-1",children:u.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:o("about.viewOnGitHub")})})]})]})}),u.jsxs("button",{onClick:y,disabled:m,className:`mt-4 inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium
167
- ${m?"text-gray-400 dark:text-gray-500 bg-gray-100 dark:bg-gray-800":"text-gray-700 dark:text-gray-300 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"} focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500`,children:[u.jsx(ib,{className:`h-4 w-4 mr-2 ${m?"animate-spin":""}`}),o(m?"about.checking":"about.checkForUpdates")]})]})]})})}):null},Rv=({collapsed:l,version:s})=>{var C;const{t:r}=ke(),o=un(),{auth:d,logout:f}=Zr(),[h,x]=w.useState(!1),[m,g]=w.useState(!1),[y,S]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{(async()=>{try{const k=await gg();k&&g(pg(s,k)>0)}catch(k){console.error("Error checking for new version:",k)}})()},[s]),w.useEffect(()=>{const R=k=>{v.current&&!v.current.contains(k.target)&&x(!1)};return document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}},[]);const M=()=>{o("/settings"),x(!1)},j=()=>{f(),o("/login")},N=()=>{S(!0),x(!1)};return u.jsxs("div",{ref:v,className:"relative",children:[u.jsxs("button",{onClick:()=>x(!h),className:`flex ${l?"justify-center":"items-center"} w-full p-2 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors rounded-md ${h?"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(xb,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),m&&u.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!l&&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:((C=d.user)==null?void 0:C.username)||r("auth.user")})})]}),h&&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:M,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(ub,{className:"h-4 w-4 mr-2"}),r("nav.settings")]}),u.jsxs("button",{onClick:N,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(Fy,{className:"h-4 w-4 mr-2"}),r("about.title"),m&&u.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),u.jsxs("button",{onClick:j,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(tb,{className:"h-4 w-4 mr-2"}),r("app.logout")]})]}),u.jsx(Tv,{isOpen:y,onClose:()=>S(!1),version:s})]})},Ov=({collapsed:l})=>{const{t:s}=ke();Jt();const r="0.7.4",o=[{path:"/",label:s("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:s("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:s("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:s("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:s("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 ${l?"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:o.map(d=>u.jsxs(Vm,{to:d.path,className:({isActive:f})=>`flex items-center px-3 py-2 rounded-md transition-colors ${f?"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:d.path==="/",children:[u.jsx("span",{className:"flex-shrink-0",children:d.icon}),!l&&u.jsx("span",{className:"ml-3",children:d.label})]},d.path))})}),u.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:u.jsx(Rv,{collapsed:l,version:r})})]})},Mv=({children:l})=>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:l})}),zv=()=>{const[l,s]=bu.useState(!1),r=()=>{s(!l)};return u.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[u.jsx(Cv,{onToggleSidebar:r}),u.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[u.jsx(Ov,{collapsed:l}),u.jsx(Mv,{children:u.jsx(Lm,{})})]})]})},Dv=({redirectPath:l="/login"})=>{const{t:s}=ke(),{auth:r}=Zr();return r.loading?u.jsx("div",{className:"flex items-center justify-center h-screen",children:s("app.loading")}):r.isAuthenticated?u.jsx(Lm,{}):u.jsx(Um,{to:l,replace:!0})},Uv=()=>{const{t:l}=ke(),[s,r]=w.useState(""),[o,d]=w.useState(""),[f,h]=w.useState(null),[x,m]=w.useState(!1),{login:g}=Zr(),y=un(),S=async v=>{v.preventDefault(),h(null),m(!0);try{if(!s||!o){h(l("auth.emptyFields")),m(!1);return}await g(s,o)?y("/"):h(l("auth.loginFailed"))}catch{h(l("auth.loginError"))}finally{m(!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(mg,{})}),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:l("auth.loginTitle")})}),u.jsxs("form",{className:"mt-8 space-y-6",onSubmit:S,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:l("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:l("auth.username"),value:s,onChange:v=>r(v.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"sr-only",children:l("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:l("auth.password"),value:o,onChange:v=>d(v.target.value)})]})]}),f&&u.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center",children:f}),u.jsx("div",{children:u.jsx("button",{type:"submit",disabled:x,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:l(x?"auth.loggingIn":"auth.login")})})]})]})]})},Ur={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},xs=()=>{const{t:l}=ke(),[s,r]=w.useState([]),[o,d]=w.useState(null),[f,h]=w.useState(0),[x,m]=w.useState(!0),[g,y]=w.useState(0),S=w.useRef(null),v=w.useRef(0),M=()=>{S.current&&(clearInterval(S.current),S.current=null)},j=w.useCallback(()=>{M();const D=async()=>{try{const U=localStorage.getItem("mcphub_token"),Y=await(await fetch(Ce("/servers"),{headers:{"x-auth-token":U||""}})).json();Y&&Y.success&&Array.isArray(Y.data)?r(Y.data):Y&&Array.isArray(Y)?r(Y):(console.error("Invalid server data format:",Y),r([])),d(null)}catch(U){console.error("Error fetching servers during normal polling:",U),navigator.onLine?U instanceof TypeError&&(U.message.includes("NetworkError")||U.message.includes("Failed to fetch"))?d(l("errors.serverConnection")):d(l("errors.serverFetch")):d(l("errors.network"))}};D(),S.current=setInterval(D,Ur.normal.pollingInterval)},[l]);return w.useEffect(()=>{f>0&&(v.current=0,y(0));const D=async()=>{try{const U=localStorage.getItem("mcphub_token"),Y=await(await fetch(Ce("/servers"),{headers:{"x-auth-token":U||""}})).json();return Y&&Y.success&&Array.isArray(Y.data)?(r(Y.data),m(!1),j(),!0):Y&&Array.isArray(Y)?(r(Y),m(!1),j(),!0):(console.error("Invalid server data format:",Y),r([]),m(!1),j(),!0)}catch(U){return v.current+=1,console.error(`Initial loading attempt ${v.current} failed:`,U),y(v.current),navigator.onLine?d(l("errors.initialStartup")):d(l("errors.network")),v.current>=Ur.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),m(!1),M(),j()),!1}};return x?(M(),D(),S.current=setInterval(D,Ur.startup.pollingInterval),console.log(`Started initial polling with interval: ${Ur.startup.pollingInterval}ms`)):j(),()=>{M()}},[f,l,x,j]),{servers:s,error:o,setError:d,isLoading:x,fetchAttempts:g,triggerRefresh:()=>{M(),x&&(m(!0),v.current=0,y(0)),h(D=>D+1)},handleServerAdd:()=>{h(D=>D+1)},handleServerEdit:async D=>{try{const U=localStorage.getItem("mcphub_token"),Y=await(await fetch(Ce("/settings"),{headers:{"x-auth-token":U||""}})).json();if(Y&&Y.success&&Y.data&&Y.data.mcpServers&&Y.data.mcpServers[D.name]){const L=Y.data.mcpServers[D.name];return{name:D.name,status:D.status,tools:D.tools||[],config:L}}else return console.error("Failed to get server config from settings:",Y),d(l("server.invalidConfig",{serverName:D.name})),null}catch(U){return console.error("Error fetching server settings:",U),d(U instanceof Error?U.message:String(U)),null}},handleServerRemove:async D=>{try{const U=localStorage.getItem("mcphub_token"),te=await fetch(Ce(`/servers/${D}`),{method:"DELETE",headers:{"x-auth-token":U||""}}),Y=await te.json();return te.ok?(h(L=>L+1),!0):(d(Y.message||l("server.deleteError",{serverName:D})),!1)}catch(U){return d(l("errors.general")+": "+(U instanceof Error?U.message:String(U))),!1}},handleServerToggle:async(D,U)=>{try{const te=localStorage.getItem("mcphub_token"),Y=await fetch(Ce(`/servers/${D.name}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":te||""},body:JSON.stringify({enabled:U})}),L=await Y.json();return Y.ok?(h(X=>X+1),!0):(console.error("Failed to toggle server:",L),d(l("server.toggleError",{serverName:D.name})),!1)}catch(te){return console.error("Error toggling server:",te),d(te instanceof Error?te.message:String(te)),!1}}}},Lv=()=>{const{t:l}=ke(),{servers:s,error:r,setError:o,isLoading:d}=xs(),f={total:s.length,online:s.filter(m=>m.status==="connected").length,offline:s.filter(m=>m.status==="disconnected").length,connecting:s.filter(m=>m.status==="connecting").length},h={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"},x=m=>s.length===0?0:Math.round(s.filter(g=>g.status===m).length/s.length*100);return u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:l("pages.dashboard.title")}),r&&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:l("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:r})]}),u.jsx("button",{onClick:()=>o(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("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"})})})]})}),d?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:l("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:l("pages.dashboard.totalServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.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:l("pages.dashboard.onlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.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:`${x("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:l("pages.dashboard.offlineServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.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:`${x("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:l("pages.dashboard.connectingServers")}),u.jsx("p",{className:"text-3xl font-bold text-gray-900",children:f.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:`${x("connecting")}%`}})})]})]}),s.length>0&&!d&&u.jsxs("div",{className:"mt-8",children:[u.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:l("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:l("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:l("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:l("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:l("server.enabled")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:s.slice(0,5).map((m,g)=>{var y;return u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:m.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 ${m.status==="connected"?"bg-green-100 text-green-800":m.status==="disconnected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:l(h[m.status]||m.status)})}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((y=m.tools)==null?void 0:y.length)||0}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:m.enabled!==!1?u.jsx("span",{className:"text-green-600",children:"✓"}):u.jsx("span",{className:"text-red-600",children:"✗"})})]},g)})})]})})]})]})},_v={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 Lr({children:l,variant:s="default",className:r,onClick:o}){return u.jsx("span",{className:Ga("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",_v[s],o?"cursor-pointer":"",r),onClick:o,children:l})}const Hv=({status:l})=>{const{t:s}=ke(),r={connecting:"bg-yellow-100 text-yellow-800",connected:"bg-green-100 text-green-800",disconnected:"bg-red-100 text-red-800"},o={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 ${r[l]}`,children:s(o[l]||l)})},Bv=async(l,s)=>{try{const r=nl();if(!r)throw new Error("Authentication token not found. Please log in.");const o=s?`/tools/call/${s}`:"/tools/call",d=await fetch(Ce(o),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":r,Authorization:`Bearer ${r}`},body:JSON.stringify({toolName:l.toolName,arguments:l.arguments})});if(!d.ok)throw new Error(`HTTP ${d.status}: ${d.statusText}`);const f=await d.json();return f.success?{success:!0,content:f.data.content||[]}:{success:!1,error:f.message||"Tool call failed"}}catch(r){return console.error("Error calling tool:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}},qv=({schema:l,onSubmit:s,onCancel:r,loading:o=!1,storageKey:d})=>{const{t:f}=ke(),[h,x]=w.useState({}),[m,g]=w.useState({}),y=w.useMemo(()=>(C=>{const R=k=>{if(typeof k=="object"&&k!==null){const T=k;return{type:T.type||"string",description:T.description,enum:T.enum,default:T.default,properties:T.properties?Object.fromEntries(Object.entries(T.properties).map(([D,U])=>[D,R(U)])):void 0,required:T.required,items:T.items?R(T.items):void 0}}return{type:"string"}};return{type:C.type,properties:C.properties?Object.fromEntries(Object.entries(C.properties).map(([k,T])=>[k,R(T)])):void 0,required:C.required}})(l),[l]);w.useEffect(()=>{const N=(R,k="")=>{const T={};return R.type==="object"&&R.properties&&Object.entries(R.properties).forEach(([D,U])=>{const te=k?`${k}.${D}`:D;U.default!==void 0?T[D]=U.default:U.type==="string"?T[D]="":U.type==="number"||U.type==="integer"?T[D]=0:U.type==="boolean"?T[D]=!1:U.type==="array"?T[D]=[]:U.type==="object"&&(T[D]=N(U,te))}),T};let C=N(y);if(d)try{const R=localStorage.getItem(d);if(R){const k=JSON.parse(R);C={...C,...k}}}catch(R){console.warn("Failed to load saved form data:",R)}x(C)},[y,d]);const S=(N,C)=>{x(R=>{const k={...R},T=N.split(".");let D=k;for(let U=0;U<T.length-1;U++)D[T[U]]||(D[T[U]]={}),D=D[T[U]];if(D[T[T.length-1]]=C,d)try{localStorage.setItem(d,JSON.stringify(k))}catch(U){console.warn("Failed to save form data to localStorage:",U)}return k}),m[N]&&g(R=>{const k={...R};return delete k[N],k})},v=()=>{const N={},C=(R,k,T="")=>{R.type==="object"&&R.properties&&Object.entries(R.properties).forEach(([D,U])=>{var L;const te=T?`${T}.${D}`:D,Y=k==null?void 0:k[D];if((L=R.required)!=null&&L.includes(D)&&(Y==null||Y==="")){N[te]=`${D} is required`;return}Y!=null&&Y!==""&&(U.type==="string"&&typeof Y!="string"?N[te]=`${D} must be a string`:U.type==="number"&&typeof Y!="number"?N[te]=`${D} must be a number`:U.type==="integer"&&(!Number.isInteger(Y)||typeof Y!="number")?N[te]=`${D} must be an integer`:U.type==="boolean"&&typeof Y!="boolean"?N[te]=`${D} must be a boolean`:U.type==="object"&&typeof Y=="object"&&C(U,Y,te))})};return C(y,h),g(N),Object.keys(N).length===0},M=N=>{N.preventDefault(),v()&&s(h)},j=(N,C,R="")=>{var U,te,Y,L,X;const k=R?`${R}.${N}`:N,T=h[N],D=m[k];return C.type==="string"?C.enum?u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[N,((U=y.required)==null?void 0:U.includes(N))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),C.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:C.description}),u.jsxs("select",{value:T||"",onChange:I=>S(k,I.target.value),className:`w-full border rounded-md px-3 py-2 ${D?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[u.jsx("option",{value:"",children:f("tool.selectOption")}),C.enum.map((I,fe)=>u.jsx("option",{value:I,children:I},fe))]}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},k):u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[N,((te=y.required)==null?void 0:te.includes(N))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),C.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:C.description}),u.jsx("input",{type:"text",value:T||"",onChange:I=>S(k,I.target.value),className:`w-full border rounded-md px-3 py-2 ${D?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},k):C.type==="number"||C.type==="integer"?u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[N,((Y=y.required)==null?void 0:Y.includes(N))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),C.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:C.description}),u.jsx("input",{type:"number",step:C.type==="integer"?"1":"any",value:T||"",onChange:I=>{const fe=I.target.value===""?"":C.type==="integer"?parseInt(I.target.value):parseFloat(I.target.value);S(k,fe)},className:`w-full border rounded-md px-3 py-2 ${D?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},k):C.type==="boolean"?u.jsxs("div",{className:"mb-4",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("input",{type:"checkbox",checked:T||!1,onChange:I=>S(k,I.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),u.jsxs("label",{className:"ml-2 block text-sm text-gray-700",children:[N,((L=y.required)==null?void 0:L.includes(N))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),C.description&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:C.description}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},k):u.jsxs("div",{className:"mb-4",children:[u.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[N,((X=y.required)==null?void 0:X.includes(N))&&u.jsx("span",{className:"text-red-500 ml-1",children:"*"}),u.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",C.type,")"]})]}),C.description&&u.jsx("p",{className:"text-xs text-gray-500 mb-2",children:C.description}),u.jsx("input",{type:"text",value:T||"",onChange:I=>S(k,I.target.value),placeholder:f("tool.enterValue",{type:C.type}),className:`w-full border rounded-md px-3 py-2 ${D?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),D&&u.jsx("p",{className:"text-red-500 text-xs mt-1",children:D})]},k)};return y.properties?u.jsxs("form",{onSubmit:M,className:"space-y-4",children:[Object.entries(y.properties||{}).map(([N,C])=>j(N,C)),u.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:f("tool.cancel")}),u.jsx("button",{type:"submit",disabled:o,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:f(o?"tool.running":"tool.runTool")})]})]}):u.jsxs("div",{className:"p-4 bg-gray-50 rounded-md",children:[u.jsx("p",{className:"text-sm text-gray-600",children:f("tool.noParameters")}),u.jsxs("div",{className:"flex justify-end space-x-2 mt-4",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-sm text-gray-600 bg-gray-100 rounded-md hover:bg-gray-200",children:f("tool.cancel")}),u.jsx("button",{onClick:()=>s({}),disabled:o,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:f(o?"tool.running":"tool.runTool")})]})]})},Gv=({result:l,onClose:s})=>{const{t:r}=ke(),o=l.content,d=h=>Array.isArray(h)?h.map((x,m)=>u.jsx("div",{className:"mb-3 last:mb-0",children:f(x)},m)):f(h),f=h=>{if(typeof h=="string")return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:h})});if(typeof h=="object"&&h!==null){if(h.type==="text"&&h.text)return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:h.text})});if(h.type==="image"&&h.data)return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("img",{src:`data:${h.mimeType||"image/png"};base64,${h.data}`,alt:r("tool.toolResult"),className:"max-w-full h-auto rounded-md"})});try{const x=typeof h=="string"?h:JSON.stringify(h,null,2),m=typeof h=="string"?JSON.parse(h):h;return u.jsxs("div",{className:"bg-gray-50 rounded-md p-3",children:[u.jsx("div",{className:"text-xs text-gray-500 mb-2",children:r("tool.jsonResponse")}),u.jsx("pre",{className:"text-sm text-gray-800 overflow-auto",children:JSON.stringify(m,null,2)})]})}catch{return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(h)})})}}return u.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:u.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(h)})})};return u.jsxs("div",{className:"border border-gray-300 rounded-lg bg-white shadow-sm",children:[u.jsx("div",{className:"border-b border-gray-300 px-4 py-3 bg-gray-50 rounded-t-lg",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center space-x-2",children:[l.success?u.jsx(Qy,{size:20,className:"text-green-500"}):u.jsx(Zy,{size:20,className:"text-red-500"}),u.jsx("div",{children:u.jsxs("h4",{className:"text-sm font-medium text-gray-900",children:[r("tool.execution")," ",l.success?r("tool.successful"):r("tool.failed")]})})]}),u.jsx("button",{onClick:s,className:"text-gray-400 hover:text-gray-600 text-sm",children:"✕"})]})}),u.jsx("div",{className:"p-4",children:l.success?u.jsx("div",{children:l.content&&l.content.length>0?u.jsxs("div",{children:[u.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.result")}),d(l.content)]}):u.jsx("div",{className:"text-sm text-gray-500 italic",children:r("tool.noContent")})}):u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[u.jsx(Jm,{size:16,className:"text-red-500"}),u.jsx("span",{className:"text-sm font-medium text-red-700",children:r("tool.error")})]}),o&&o.length>0?u.jsxs("div",{children:[u.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.errorDetails")}),d(o)]}):u.jsx("div",{className:"bg-red-50 border border-red-300 rounded-md p-3",children:u.jsx("pre",{className:"text-sm text-red-800 whitespace-pre-wrap",children:l.error||l.message||r("tool.unknownError")})})]})})]})},Vv=({tool:l,server:s})=>{const{t:r}=ke(),[o,d]=w.useState(!1),[f,h]=w.useState(!1),[x,m]=w.useState(!1),[g,y]=w.useState(null),S=w.useCallback(()=>`mcphub_tool_form_${s?`${s}_`:""}${l.name}`,[l.name,s]),v=w.useCallback(()=>{localStorage.removeItem(S())},[S]),M=async C=>{m(!0);try{const R=await Bv({toolName:l.name,arguments:C},s);y(R)}catch(R){y({success:!1,error:R instanceof Error?R.message:"Unknown error occurred"})}finally{m(!1)}},j=()=>{h(!1),v(),y(null)},N=()=>{y(null)};return u.jsxs("div",{className:"bg-white border border-gray-300 shadow rounded-lg p-4 mb-4",children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>d(!o),children:[u.jsx("div",{className:"flex-1",children:u.jsxs("h3",{className:"text-lg font-medium text-gray-900",children:[l.name,u.jsx("span",{className:"ml-2 text-sm font-normal text-gray-600",children:l.description||r("tool.noDescription")})]})}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("button",{onClick:C=>{C.stopPropagation(),d(!0),h(!0)},className:"flex items-center space-x-1 px-3 py-1 text-sm text-blue-600 bg-blue-50 hover:bg-blue-100 rounded-md transition-colors",disabled:x,children:[x?u.jsx(Iy,{size:14,className:"animate-spin"}):u.jsx(sb,{size:14}),u.jsx("span",{children:r(x?"tool.running":"tool.run")})]}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:o?u.jsx(Zm,{size:18}):u.jsx(Pm,{size:18})})]})]}),o&&u.jsxs("div",{className:"mt-4 space-y-4",children:[!f&&u.jsxs("div",{className:"bg-gray-50 rounded p-3 border border-gray-300",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:r("tool.inputSchema")}),u.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(l.inputSchema,null,2)})]}),f&&u.jsxs("div",{className:"border border-gray-300 rounded-lg p-4 bg-blue-50",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:r("tool.runToolWithName",{name:l.name})}),u.jsx(qv,{schema:l.inputSchema||{type:"object"},onSubmit:M,onCancel:j,loading:x,storageKey:S()}),g&&u.jsx("div",{className:"mt-4",children:u.jsx(Gv,{result:g,onClose:N})})]})]})]})},xg=({isOpen:l,onClose:s,onConfirm:r,serverName:o,isGroup:d=!1})=>{const{t:f}=ke();return l?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 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:f(d?"groups.confirmDelete":"server.confirmDelete")}),u.jsx("p",{className:"text-gray-500 mb-6",children:d?f("groups.deleteWarning",{name:o}):f("server.deleteWarning",{name:o})}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:f("common.cancel")}),u.jsx("button",{onClick:r,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:f("common.delete")})]})]})})}):null},Yv=({server:l,onRemove:s,onEdit:r,onToggle:o})=>{var Y;const{t:d}=ke(),{showToast:f}=ps(),[h,x]=w.useState(!1),[m,g]=w.useState(!1),[y,S]=w.useState(!1),[v,M]=w.useState(!1),[j,N]=w.useState(!1),C=w.useRef(null);w.useEffect(()=>{const L=X=>{C.current&&!C.current.contains(X.target)&&M(!1)};return document.addEventListener("mousedown",L),()=>{document.removeEventListener("mousedown",L)}},[]);const R=L=>{L.stopPropagation(),g(!0)},k=L=>{L.stopPropagation(),r(l)},T=async L=>{if(L.stopPropagation(),!(y||!o)){S(!0);try{await o(l,l.enabled===!1)}finally{S(!1)}}},D=L=>{L.stopPropagation(),M(!v)},U=L=>{if(L.stopPropagation(),!!l.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.error).then(()=>{N(!0),f(d("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>N(!1),2e3)});else{const X=document.createElement("textarea");X.value=l.error,X.style.position="fixed",X.style.left="-9999px",document.body.appendChild(X),X.focus(),X.select();try{document.execCommand("copy"),N(!0),f(d("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>N(!1),2e3)}catch(I){f(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",I)}document.body.removeChild(X)}},te=()=>{s(l.name),g(!1)};return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${l.enabled===!1?"opacity-60":""}`,children:[u.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>x(!h),children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("h2",{className:`text-xl font-semibold ${l.enabled===!1?"text-gray-600":"text-gray-900"}`,children:l.name}),u.jsx(Hv,{status:l.status}),u.jsxs("div",{className:"flex items-center px-2 py-1 bg-blue-50 text-blue-700 rounded-full text-sm",children:[u.jsx("svg",{className:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",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:[((Y=l.tools)==null?void 0:Y.length)||0," ",d("server.tools")]})]}),l.error&&u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"cursor-pointer",onClick:D,"aria-label":d("server.viewErrorDetails"),children:u.jsx(Jm,{className:"text-red-500 hover:text-red-600",size:18})}),v&&u.jsxs("div",{ref:C,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:L=>L.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:d("server.errorDetails")}),u.jsx("button",{onClick:U,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:j?u.jsx(Bu,{size:14,className:"text-green-500"}):u.jsx(Fm,{size:14})})]}),u.jsx("button",{onClick:L=>{L.stopPropagation(),M(!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:l.error})})]})]})]}),u.jsxs("div",{className:"flex space-x-2",children:[u.jsx("button",{onClick:k,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:d("server.edit")}),u.jsx("div",{className:"flex items-center",children:u.jsx("button",{onClick:T,className:`px-3 py-1 text-sm rounded transition-colors ${y?"bg-gray-200 text-gray-500":l.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,disabled:y,children:y?d("common.processing"):l.enabled!==!1?d("server.disable"):d("server.enable")})}),u.jsx("button",{onClick:R,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:d("server.delete")}),u.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:h?u.jsx(Zm,{size:18}):u.jsx(Pm,{size:18})})]})]}),h&&l.tools&&u.jsxs("div",{className:"mt-6",children:[u.jsx("h6",{className:`font-medium ${l.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:d("server.tools")}),u.jsx("div",{className:"space-y-4",children:l.tools.map((L,X)=>u.jsx(Vv,{server:l.name,tool:L},X))})]})]}),u.jsx(xg,{isOpen:m,onClose:()=>g(!1),onConfirm:te,serverName:l.name})]})},Gu=({onSubmit:l,onCancel:s,initialData:r=null,modalTitle:o,formError:d=null})=>{const{t:f}=ke(),h=()=>!r||!r.config?"stdio":r.config.type?r.config.type:r.config.url?"sse":"stdio",[x,m]=w.useState(h()),[g,y]=w.useState({name:r&&r.name||"",url:r&&r.config&&r.config.url||"",command:r&&r.config&&r.config.command||"",arguments:r&&r.config&&r.config.args?Array.isArray(r.config.args)?r.config.args.join(" "):String(r.config.args):"",args:r&&r.config&&r.config.args||[],type:h(),env:[],headers:[]}),[S,v]=w.useState(r&&r.config&&r.config.env?Object.entries(r.config.env).map(([ae,se])=>({key:ae,value:se})):[]),[M,j]=w.useState(r&&r.config&&r.config.headers?Object.entries(r.config.headers).map(([ae,se])=>({key:ae,value:se})):[]),[N,C]=w.useState(null),R=!!r,k=ae=>{const{name:se,value:ie}=ae.target;y({...g,[se]:ie})},T=ae=>{let se=ae.split(" ").filter(ie=>ie.trim()!=="");y({...g,arguments:ae,args:se})},D=ae=>{m(ae),y(se=>({...se,type:ae}))},U=(ae,se,ie)=>{const re=[...S];re[ae][se]=ie,v(re)},te=()=>{v([...S,{key:"",value:""}])},Y=ae=>{const se=[...S];se.splice(ae,1),v(se)},L=(ae,se,ie)=>{const re=[...M];re[ae][se]=ie,j(re)},X=()=>{j([...M,{key:"",value:""}])},I=ae=>{const se=[...M];se.splice(ae,1),j(se)},fe=async ae=>{ae.preventDefault(),C(null);try{const se={};S.forEach(({key:G,value:F})=>{G.trim()&&(se[G.trim()]=F)});const ie={};M.forEach(({key:G,value:F})=>{G.trim()&&(ie[G.trim()]=F)});const re={name:g.name,config:{type:x,...x==="sse"||x==="streamable-http"?{url:g.url,...Object.keys(ie).length>0?{headers:ie}:{}}:{command:g.command,args:g.args,env:Object.keys(se).length>0?se:void 0}}};l(re)}catch(se){C(`Error: ${se instanceof Error?se.message:String(se)}`)}};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:o}),u.jsx("button",{onClick:s,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(N||d)&&u.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:d||N}),u.jsxs("form",{onSubmit:fe,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:f("server.name")}),u.jsx("input",{type:"text",name:"name",id:"name",value:g.name,onChange:k,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:R})]}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:f("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:x==="stdio",onChange:()=>D("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:x==="sse",onChange:()=>D("sse"),className:"mr-1"}),u.jsx("label",{htmlFor:"url",children:"SSE"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"radio",id:"streamable-http",name:"serverType",value:"streamable-http",checked:x==="streamable-http",onChange:()=>D("streamable-http"),className:"mr-1"}),u.jsx("label",{htmlFor:"streamable-http",children:"Streamable HTTP"})]})]})]}),x==="sse"||x==="streamable-http"?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:"url",children:f("server.url")}),u.jsx("input",{type:"url",name:"url",id:"url",value:g.url,onChange:k,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:x==="streamable-http"?"e.g.: http://localhost:3000/mcp":"e.g.: http://localhost:3000/sse",required:x==="sse"||x==="streamable-http"})]}),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:f("server.headers")}),u.jsxs("button",{type:"button",onClick:X,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",f("server.add")]})]}),M.map((ae,se)=>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:ae.key,onChange:ie=>L(se,"key",ie.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:"Authorization"}),u.jsx("span",{className:"flex items-center",children:":"}),u.jsx("input",{type:"text",value:ae.value,onChange:ie=>L(se,"value",ie.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:"Bearer token..."})]}),u.jsxs("button",{type:"button",onClick:()=>I(se),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:["- ",f("server.remove")]})]},se))]})]}):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:f("server.command")}),u.jsx("input",{type:"text",name:"command",id:"command",value:g.command,onChange:k,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:x==="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:f("server.arguments")}),u.jsx("input",{type:"text",name:"arguments",id:"arguments",value:g.arguments,onChange:ae=>T(ae.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:x==="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:f("server.envVars")}),u.jsxs("button",{type:"button",onClick:te,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",f("server.add")]})]}),S.map((ae,se)=>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:ae.key,onChange:ie=>U(se,"key",ie.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:f("server.key")}),u.jsx("span",{className:"flex items-center",children:":"}),u.jsx("input",{type:"text",value:ae.value,onChange:ie=>U(se,"value",ie.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:f("server.value")})]}),u.jsxs("button",{type:"button",onClick:()=>Y(se),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:["- ",f("server.remove")]})]},se))]})]}),u.jsxs("div",{className:"flex justify-end mt-6",children:[u.jsx("button",{type:"button",onClick:s,className:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-medium py-2 px-4 rounded mr-2",children:f("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:f(R?"server.save":"server.add")})]})]})]})},$v=({onAdd:l})=>{const{t:s}=ke(),[r,o]=w.useState(!1),[d,f]=w.useState(null),h=()=>{o(!r),f(null)},x=async m=>{try{f(null);const g=localStorage.getItem("mcphub_token"),y=await fetch(Ce("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify(m)}),S=await y.json();if(!y.ok){S&&S.message?f(S.message):y.status===400?f(s("server.invalidData")):y.status===409?f(s("server.alreadyExists",{serverName:m.name})):f(s("server.addError"));return}o(!1),l()}catch(g){console.error("Error adding server:",g),navigator.onLine?g instanceof TypeError&&(g.message.includes("NetworkError")||g.message.includes("Failed to fetch"))?f(s("errors.serverConnection")):f(s("errors.serverAdd")):f(s("errors.network"))}};return u.jsxs("div",{children:[u.jsxs("button",{onClick:h,className:"w-full bg-blue-100 text-blue-800 rounded hover:bg-blue-200 py-2 px-4 flex items-center justify-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 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z",clipRule:"evenodd"})}),s("server.add")]}),r&&u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Gu,{onSubmit:x,onCancel:h,modalTitle:s("server.addServer"),formError:d})})]})},Kv=({server:l,onEdit:s,onCancel:r})=>{const{t:o}=ke(),[d,f]=w.useState(null),h=async x=>{try{f(null);const m=localStorage.getItem("mcphub_token"),g=await fetch(Ce(`/servers/${l.name}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":m||""},body:JSON.stringify(x)}),y=await g.json();if(!g.ok){y&&y.message?f(y.message):g.status===404?f(o("server.notFound",{serverName:l.name})):g.status===400?f(o("server.invalidData")):f(o("server.updateError",{serverName:l.name}));return}s()}catch(m){console.error("Error updating server:",m),navigator.onLine?m instanceof TypeError&&(m.message.includes("NetworkError")||m.message.includes("Failed to fetch"))?f(o("errors.serverConnection")):f(o("errors.serverUpdate",{serverName:l.name})):f(o("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(Gu,{onSubmit:h,onCancel:r,initialData:l,modalTitle:o("server.editTitle",{serverName:l.name}),formError:d})})},Qv=()=>{const{t:l}=ke(),s=un(),{servers:r,error:o,setError:d,isLoading:f,handleServerAdd:h,handleServerEdit:x,handleServerRemove:m,handleServerToggle:g,triggerRefresh:y}=xs(),[S,v]=w.useState(null),[M,j]=w.useState(!1),N=async k=>{const T=await x(k);T&&v(T)},C=()=>{v(null),y()},R=async()=>{j(!0);try{y(),await new Promise(k=>setTimeout(k,500))}finally{j(!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:l("pages.servers.title")}),u.jsxs("div",{className:"flex space-x-4",children:[u.jsxs("button",{onClick:()=>s("/market"),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",{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"})}),l("nav.market")]}),u.jsx($v,{onAdd:h}),u.jsxs("button",{onClick:R,disabled:M,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center ${M?"opacity-70 cursor-not-allowed":""}`,children:[M?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"})}),l("common.refresh")]})]})]}),o&&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:l("app.error")}),u.jsx("p",{className:"text-gray-600 mt-1",children:o})]}),u.jsx("button",{onClick:()=>d(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":l("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"})})})]})}),f?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:l("app.loading")})]})}):r.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("app.noServers")})}):u.jsx("div",{className:"space-y-6",children:r.map((k,T)=>u.jsx(Yv,{server:k,onRemove:m,onEdit:N,onToggle:g},T))}),S&&u.jsx(Kv,{server:S,onEdit:C,onCancel:()=>v(null)})]})},Vu=()=>{const{t:l}=ke(),[s,r]=w.useState([]),[o,d]=w.useState(!0),[f,h]=w.useState(null),[x,m]=w.useState(0),g=w.useCallback(async()=>{try{d(!0);const R=localStorage.getItem("mcphub_token"),k=await fetch(Ce("/groups"),{headers:{"x-auth-token":R||""}});if(!k.ok)throw new Error(`Status: ${k.status}`);const T=await k.json();T&&T.success&&Array.isArray(T.data)?r(T.data):(console.error("Invalid group data format:",T),r([])),h(null)}catch(R){console.error("Error fetching groups:",R),h(R instanceof Error?R.message:"Failed to fetch groups"),r([])}finally{d(!1)}},[]),y=w.useCallback(()=>{m(R=>R+1)},[]),S=async(R,k,T=[])=>{try{const D=localStorage.getItem("mcphub_token"),U=await fetch(Ce("/groups"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":D||""},body:JSON.stringify({name:R,description:k,servers:T})}),te=await U.json();return U.ok?(y(),te.data||null):(h(te.message||l("groups.createError")),null)}catch(D){return h(D instanceof Error?D.message:"Failed to create group"),null}},v=async(R,k)=>{try{const T=localStorage.getItem("mcphub_token"),D=await fetch(Ce(`/groups/${R}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":T||""},body:JSON.stringify(k)}),U=await D.json();return D.ok?(y(),U.data||null):(h(U.message||l("groups.updateError")),null)}catch(T){return h(T instanceof Error?T.message:"Failed to update group"),null}},M=async(R,k)=>{try{const T=localStorage.getItem("mcphub_token"),D=await fetch(Ce(`/groups/${R}/servers/batch`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":T||""},body:JSON.stringify({servers:k})}),U=await D.json();return D.ok?(y(),U.data||null):(h(U.message||l("groups.updateError")),null)}catch(T){return h(T instanceof Error?T.message:"Failed to update group servers"),null}},j=async R=>{try{const k=localStorage.getItem("mcphub_token"),T=await fetch(Ce(`/groups/${R}`),{method:"DELETE",headers:{"x-auth-token":k||""}}),D=await T.json();return T.ok?(y(),!0):(h(D.message||l("groups.deleteError")),!1)}catch(k){return h(k instanceof Error?k.message:"Failed to delete group"),!1}},N=async(R,k)=>{try{const T=localStorage.getItem("mcphub_token"),D=await fetch(Ce(`/groups/${R}/servers`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":T||""},body:JSON.stringify({serverName:k})}),U=await D.json();return D.ok?(y(),U.data||null):(h(U.message||l("groups.serverAddError")),null)}catch(T){return h(T instanceof Error?T.message:"Failed to add server to group"),null}},C=async(R,k)=>{try{const T=localStorage.getItem("mcphub_token"),D=await fetch(Ce(`/groups/${R}/servers/${k}`),{method:"DELETE",headers:{"x-auth-token":T||""}}),U=await D.json();return D.ok?(y(),U.data||null):(h(U.message||l("groups.serverRemoveError")),null)}catch(T){return h(T instanceof Error?T.message:"Failed to remove server from group"),null}};return w.useEffect(()=>{g()},[g,x]),{groups:s,loading:o,error:f,setError:h,triggerRefresh:y,createGroup:S,updateGroup:v,updateGroupServers:M,deleteGroup:j,addServerToGroup:N,removeServerFromGroup:C}},Xv=({value:l,isSelected:s,onClick:r,children:o})=>u.jsxs("button",{type:"button",role:"checkbox","aria-checked":s,className:Ga("flex w-full items-center justify-between p-2 rounded transition-colors cursor-pointer",s?"bg-blue-50 text-blue-700 hover:bg-blue-100 border-l-4 border-blue-500":"hover:bg-gray-50 text-gray-700"),onClick:r,children:[u.jsx("span",{className:"flex items-center",children:o}),s&&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"})})]}),yg=({label:l,helpText:s,noOptionsText:r="No options available",values:o,options:d,onChange:f,className:h})=>{const x=m=>{const g=o.includes(m);f(g?o.filter(y=>y!==m):[...o,m])};return u.jsxs("div",{className:h,children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:l}),u.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:d.length===0?u.jsx("p",{className:"text-gray-500 text-sm p-3",children:r}):u.jsx("div",{className:"space-y-1 p-1",children:d.map(m=>u.jsx(Xv,{value:m.value,isSelected:o.includes(m.value),onClick:()=>x(m.value),children:m.label},m.value))})}),s&&u.jsx("p",{className:"text-xs text-gray-500 mt-1",children:s})]})},_r=({checked:l,onCheckedChange:s,disabled:r=!1})=>u.jsx("button",{type:"button",role:"switch","aria-checked":l,disabled:r,className:Ga("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",l?"bg-blue-600":"bg-gray-200",r?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!r&&s(!l),children:u.jsx("span",{className:Ga("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",l?"translate-x-6":"translate-x-1")})}),Zv=({onAdd:l,onCancel:s})=>{const{t:r}=ke(),{createGroup:o}=Vu(),{servers:d}=xs(),[f,h]=w.useState([]),[x,m]=w.useState(null),[g,y]=w.useState(!1),[S,v]=w.useState({name:"",description:"",servers:[]});w.useEffect(()=>{h(d.filter(N=>N.enabled!==!1))},[d]);const M=N=>{const{name:C,value:R}=N.target;v(k=>({...k,[C]:R}))},j=async N=>{N.preventDefault(),y(!0),m(null);try{if(!S.name.trim()){m(r("groups.nameRequired")),y(!1);return}if(!await o(S.name,S.description,S.servers)){m(r("groups.createError")),y(!1);return}l()}catch(C){m(C instanceof Error?C.message:String(C)),y(!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:r("groups.addNew")}),x&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:x}),u.jsxs("form",{onSubmit:j,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:[r("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:S.name,onChange:M,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:r("groups.namePlaceholder"),required:!0})]}),u.jsx(yg,{className:"mb-6",label:r("groups.servers"),noOptionsText:r("groups.noServerOptions"),values:S.servers,options:f.map(N=>({value:N.name,label:N.name})),onChange:N=>v(C=>({...C,servers:N}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:s,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:g,children:r("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:g,children:r(g?"common.submitting":"common.create")})]})]})]})})})},Pv=({group:l,onEdit:s,onCancel:r})=>{const{t:o}=ke(),{updateGroup:d}=Vu(),{servers:f}=xs(),[h,x]=w.useState([]),[m,g]=w.useState(null),[y,S]=w.useState(!1),[v,M]=w.useState({name:l.name,description:l.description||"",servers:l.servers||[]});w.useEffect(()=>{x(f.filter(C=>C.enabled!==!1))},[f]);const j=C=>{const{name:R,value:k}=C.target;M(T=>({...T,[R]:k}))},N=async C=>{C.preventDefault(),S(!0),g(null);try{if(!v.name.trim()){g(o("groups.nameRequired")),S(!1);return}if(!await d(l.id,{name:v.name,description:v.description,servers:v.servers})){g(o("groups.updateError")),S(!1);return}s()}catch(R){g(R instanceof Error?R.message:String(R)),S(!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:o("groups.edit")}),m&&u.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:m}),u.jsxs("form",{onSubmit:N,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:[o("groups.name")," *"]}),u.jsx("input",{type:"text",id:"name",name:"name",value:v.name,onChange:j,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:o("groups.namePlaceholder"),required:!0})]}),u.jsx(yg,{className:"mb-6",label:o("groups.servers"),noOptionsText:o("groups.noServerOptions"),values:v.servers,options:h.map(C=>({value:C.name,label:C.name})),onChange:C=>M(R=>({...R,servers:C}))}),u.jsxs("div",{className:"flex justify-end space-x-3",children:[u.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:y,children:o("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:y,children:o(y?"common.submitting":"common.save")})]})]})]})})})},Jv=({group:l,servers:s,onEdit:r,onDelete:o})=>{const{t:d}=ke(),{showToast:f}=ps(),[h,x]=w.useState(!1),[m,g]=w.useState(!1),y=()=>{r(l)},S=()=>{x(!0)},v=()=>{o(l.id),x(!1)},M=()=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(l.id).then(()=>{g(!0),setTimeout(()=>g(!1),2e3)});else{const N=document.createElement("textarea");N.value=l.id,N.style.position="fixed",N.style.left="-9999px",document.body.appendChild(N),N.focus(),N.select();try{document.execCommand("copy"),g(!0),setTimeout(()=>g(!1),2e3)}catch(C){f(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",C)}document.body.removeChild(N)}},j=s.filter(N=>l.servers.includes(N.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:l.name}),u.jsxs("div",{className:"flex items-center ml-3",children:[u.jsx("span",{className:"text-xs text-gray-500 mr-1",children:l.id}),u.jsx("button",{onClick:M,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:m?u.jsx(Bu,{size:14,className:"text-green-500"}):u.jsx(Fm,{size:14})})]})]}),l.description&&u.jsx("p",{className:"text-gray-600 text-sm mt-1",children:l.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:d("groups.serverCount",{count:l.servers.length})}),u.jsx("button",{onClick:y,className:"text-gray-500 hover:text-gray-700",title:d("groups.edit"),children:u.jsx(db,{size:18})}),u.jsx("button",{onClick:S,className:"text-gray-500 hover:text-red-600",title:d("groups.delete"),children:u.jsx(gb,{size:18})})]})]}),u.jsx("div",{className:"mt-4",children:j.length===0?u.jsx("p",{className:"text-gray-500 italic",children:d("groups.noServers")}):u.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:j.map(N=>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:N.name}),u.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${N.status==="connected"?"bg-green-500":N.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},N.name))})}),u.jsx(xg,{isOpen:h,onClose:()=>x(!1),onConfirm:v,serverName:l.name,isGroup:!0})]})},Fv=()=>{const{t:l}=ke(),{groups:s,loading:r,error:o,setError:d,deleteGroup:f,triggerRefresh:h}=Vu(),{servers:x}=xs(),[m,g]=w.useState(null),[y,S]=w.useState(!1),v=R=>{g(R)},M=()=>{g(null),h()},j=async R=>{await f(R)||d(l("groups.deleteError"))},N=()=>{S(!0)},C=()=>{S(!1),h()};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:l("pages.groups.title")}),u.jsx("div",{className:"flex space-x-4",children:u.jsxs("button",{onClick:N,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"})}),l("groups.add")]})})]}),o&&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:o})}),r?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:l("app.loading")})]})}):s.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("groups.noGroups")})}):u.jsx("div",{className:"space-y-6",children:s.map(R=>u.jsx(Jv,{group:R,servers:x,onEdit:v,onDelete:j},R.id))}),y&&u.jsx(Zv,{onAdd:C,onCancel:C}),m&&u.jsx(Pv,{group:m,onEdit:M,onCancel:()=>g(null)})]})},Wv=({onSuccess:l,onCancel:s})=>{const{t:r}=ke(),[o,d]=w.useState({currentPassword:"",newPassword:""}),[f,h]=w.useState(""),[x,m]=w.useState(!1),[g,y]=w.useState(null),[S,v]=w.useState(!1),M=N=>{const{name:C,value:R}=N.target;C==="confirmPassword"?h(R):d(k=>({...k,[C]:R}))},j=async N=>{if(N.preventDefault(),y(null),o.newPassword!==f){y(r("auth.passwordsNotMatch"));return}m(!0);try{const C=await Dy(o);C.success?(v(!0),l&&l()):y(C.message||r("auth.changePasswordError"))}catch{y(r("auth.changePasswordError"))}finally{m(!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:r("auth.changePassword")}),S?u.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:r("auth.changePasswordSuccess")}):u.jsxs("form",{onSubmit:j,children:[g&&u.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:g}),u.jsxs("div",{className:"mb-4",children:[u.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:r("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:o.currentPassword,onChange:M,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:r("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:o.newPassword,onChange:M,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:r("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:f,onChange:M,required:!0,minLength:6})]}),u.jsxs("div",{className:"flex justify-end space-x-2",children:[s&&u.jsx("button",{type:"button",onClick:s,disabled:x,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:r("common.cancel")}),u.jsx("button",{type:"submit",disabled:x,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:x?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"})]}),r("common.save")]}):r("common.save")})]})]})]})},Iv=()=>{const{t:l}=ke(),{showToast:s}=ps(),[r,o]=w.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:""}),[d,f]=w.useState({bearerAuthKey:""}),[h,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[m,g]=w.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[y,S]=w.useState(!1),[v,M]=w.useState(null),[j,N]=w.useState(0),C=w.useCallback(()=>{N(Y=>Y+1)},[]),R=w.useCallback(async()=>{var Y,L,X,I,fe,ae;S(!0),M(null);try{const se=localStorage.getItem("mcphub_token"),ie=await fetch(Ce("/settings"),{headers:{"x-auth-token":se||""}});if(!ie.ok)throw new Error(`HTTP error! Status: ${ie.status}`);const re=await ie.json();re.success&&((L=(Y=re.data)==null?void 0:Y.systemConfig)!=null&&L.routing)&&o({enableGlobalRoute:re.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:re.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:re.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:re.data.systemConfig.routing.bearerAuthKey||""}),re.success&&((I=(X=re.data)==null?void 0:X.systemConfig)!=null&&I.install)&&x({pythonIndexUrl:re.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:re.data.systemConfig.install.npmRegistry||""}),re.success&&((ae=(fe=re.data)==null?void 0:fe.systemConfig)!=null&&ae.smartRouting)&&g({enabled:re.data.systemConfig.smartRouting.enabled??!1,dbUrl:re.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:re.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:re.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:re.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""})}catch(se){console.error("Failed to fetch settings:",se),M(se instanceof Error?se.message:"Failed to fetch settings"),s(l("errors.failedToFetchSettings"))}finally{S(!1)}},[l]),k=async(Y,L)=>{S(!0),M(null);try{const X=localStorage.getItem("mcphub_token"),I=await fetch(Ce("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":X||""},body:JSON.stringify({routing:{[Y]:L}})});if(!I.ok)throw new Error(`HTTP error! Status: ${I.status}`);return(await I.json()).success?(o({...r,[Y]:L}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateRouteConfig")),!1)}catch(X){return console.error("Failed to update routing config:",X),M(X instanceof Error?X.message:"Failed to update routing config"),s(l("errors.failedToUpdateRouteConfig")),!1}finally{S(!1)}},T=async(Y,L)=>{S(!0),M(null);try{const X=localStorage.getItem("mcphub_token"),I=await fetch(Ce("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":X||""},body:JSON.stringify({install:{[Y]:L}})});if(!I.ok)throw new Error(`HTTP error! Status: ${I.status}`);return(await I.json()).success?(x({...h,[Y]:L}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateSystemConfig")),!1)}catch(X){return console.error("Failed to update system config:",X),M(X instanceof Error?X.message:"Failed to update system config"),s(l("errors.failedToUpdateSystemConfig")),!1}finally{S(!1)}},D=async(Y,L)=>{S(!0),M(null);try{const X=localStorage.getItem("mcphub_token"),I=await fetch(Ce("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":X||""},body:JSON.stringify({smartRouting:{[Y]:L}})});if(!I.ok){const ae=await I.json();throw new Error(ae.message||`HTTP error! Status: ${I.status}`)}const fe=await I.json();return fe.success?(g({...m,[Y]:L}),s(l("settings.systemConfigUpdated")),!0):(s(fe.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(X){console.error("Failed to update smart routing config:",X);const I=X instanceof Error?X.message:"Failed to update smart routing config";return M(I),s(I),!1}finally{S(!1)}},U=async Y=>{S(!0),M(null);try{const L=localStorage.getItem("mcphub_token"),X=await fetch(Ce("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":L||""},body:JSON.stringify({smartRouting:Y})});if(!X.ok){const fe=await X.json();throw new Error(fe.message||`HTTP error! Status: ${X.status}`)}const I=await X.json();return I.success?(g({...m,...Y}),s(l("settings.systemConfigUpdated")),!0):(s(I.message||l("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(L){console.error("Failed to update smart routing config:",L);const X=L instanceof Error?L.message:"Failed to update smart routing config";return M(X),s(X),!1}finally{S(!1)}},te=async Y=>{S(!0),M(null);try{const L=localStorage.getItem("mcphub_token"),X=await fetch(Ce("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":L||""},body:JSON.stringify({routing:Y})});if(!X.ok)throw new Error(`HTTP error! Status: ${X.status}`);return(await X.json()).success?(o({...r,...Y}),s(l("settings.systemConfigUpdated")),!0):(s(l("errors.failedToUpdateRouteConfig")),!1)}catch(L){return console.error("Failed to update routing config:",L),M(L instanceof Error?L.message:"Failed to update routing config"),s(l("errors.failedToUpdateRouteConfig")),!1}finally{S(!1)}};return w.useEffect(()=>{R()},[R,j]),w.useEffect(()=>{r&&f({bearerAuthKey:r.bearerAuthKey})},[r]),{routingConfig:r,tempRoutingConfig:d,setTempRoutingConfig:f,installConfig:h,smartRoutingConfig:m,loading:y,error:v,setError:M,triggerRefresh:C,fetchSettings:R,updateRoutingConfig:k,updateInstallConfig:T,updateSmartRoutingConfig:D,updateSmartRoutingConfigBatch:U,updateRoutingConfigBatch:te}};function e1(l=32){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=new Uint8Array(l);return crypto.getRandomValues(r),Array.from(r).map(o=>s.charAt(o%s.length)).join("")}const t1=()=>{const{t:l,i18n:s}=ke(),r=un(),{showToast:o}=ps(),[d,f]=w.useState(s.language);w.useEffect(()=>{f(s.language)},[s.language]);const[h,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[m,g]=w.useState({dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),{routingConfig:y,tempRoutingConfig:S,setTempRoutingConfig:v,installConfig:M,smartRoutingConfig:j,loading:N,updateRoutingConfig:C,updateRoutingConfigBatch:R,updateInstallConfig:k,updateSmartRoutingConfig:T,updateSmartRoutingConfigBatch:D}=Iv();w.useEffect(()=>{M&&x(M)},[M]),w.useEffect(()=>{j&&g({dbUrl:j.dbUrl||"",openaiApiBaseUrl:j.openaiApiBaseUrl||"",openaiApiKey:j.openaiApiKey||"",openaiApiEmbeddingModel:j.openaiApiEmbeddingModel||""})},[j]);const[U,te]=w.useState({routingConfig:!1,installConfig:!1,smartRoutingConfig:!1,password:!1}),Y=q=>{te(de=>({...de,[q]:!de[q]}))},L=async(q,de)=>{if(q==="enableBearerAuth"&&de===!0&&!S.bearerAuthKey&&!y.bearerAuthKey){const A=e1();X(A),await R({enableBearerAuth:!0,bearerAuthKey:A})&&v(W=>({...W,bearerAuthKey:A}));return}await C(q,de)},X=q=>{v(de=>({...de,bearerAuthKey:q}))},I=async()=>{await C("bearerAuthKey",S.bearerAuthKey)},fe=(q,de)=>{x({...h,[q]:de})},ae=async q=>{await k(q,h[q])},se=(q,de)=>{g({...m,[q]:de})},ie=async q=>{await T(q,m[q])},re=async q=>{if(q){const de=m.dbUrl||j.dbUrl,A=m.openaiApiKey||j.openaiApiKey;if(!de||!A){const W=[];de||W.push(l("settings.dbUrl")),A||W.push(l("settings.openaiApiKey")),o(l("settings.smartRoutingValidationError",{fields:W.join(", ")}));return}const $={enabled:q};m.dbUrl!==j.dbUrl&&($.dbUrl=m.dbUrl),m.openaiApiBaseUrl!==j.openaiApiBaseUrl&&($.openaiApiBaseUrl=m.openaiApiBaseUrl),m.openaiApiKey!==j.openaiApiKey&&($.openaiApiKey=m.openaiApiKey),m.openaiApiEmbeddingModel!==j.openaiApiEmbeddingModel&&($.openaiApiEmbeddingModel=m.openaiApiEmbeddingModel),await D($)}else await T("enabled",q)},G=()=>{setTimeout(()=>{r("/")},2e3)},F=q=>{localStorage.setItem("i18nextLng",q),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:l("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:l("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 ${d.startsWith("en")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>F("en"),children:"English"}),u.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${d.startsWith("zh")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>F("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:()=>Y("smartRoutingConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.smartRouting")}),u.jsx("span",{className:"text-gray-500",children:U.smartRoutingConfig?"▼":"►"})]}),U.smartRoutingConfig&&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:l("settings.enableSmartRouting")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableSmartRoutingDescription")})]}),u.jsx(_r,{disabled:N,checked:j.enabled,onCheckedChange:q=>re(q)})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsxs("h3",{className:"font-medium text-gray-700",children:[u.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.dbUrl")]})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:m.dbUrl,onChange:q=>se("dbUrl",q.target.value),placeholder:l("settings.dbUrlPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300",disabled:N}),u.jsx("button",{onClick:()=>ie("dbUrl"),disabled:N,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:l("common.save")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsxs("h3",{className:"font-medium text-gray-700",children:[u.jsx("span",{className:"text-red-500 px-1",children:"*"}),l("settings.openaiApiKey")]})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"password",value:m.openaiApiKey,onChange:q=>se("openaiApiKey",q.target.value),placeholder:l("settings.openaiApiKeyPlaceholder"),className:"flex-1 mt-1 block w-full py-2 px-3 border rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm border-gray-300",disabled:N}),u.jsx("button",{onClick:()=>ie("openaiApiKey"),disabled:N,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:l("common.save")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiBaseUrl")})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:m.openaiApiBaseUrl,onChange:q=>se("openaiApiBaseUrl",q.target.value),placeholder:l("settings.openaiApiBaseUrlPlaceholder"),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:N}),u.jsx("button",{onClick:()=>ie("openaiApiBaseUrl"),disabled:N,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:l("common.save")})]})]}),u.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[u.jsx("div",{className:"mb-2",children:u.jsx("h3",{className:"font-medium text-gray-700",children:l("settings.openaiApiEmbeddingModel")})}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:m.openaiApiEmbeddingModel,onChange:q=>se("openaiApiEmbeddingModel",q.target.value),placeholder:l("settings.openaiApiEmbeddingModelPlaceholder"),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:N}),u.jsx("button",{onClick:()=>ie("openaiApiEmbeddingModel"),disabled:N,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:l("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:()=>Y("routingConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("pages.settings.routeConfig")}),u.jsx("span",{className:"text-gray-500",children:U.routingConfig?"▼":"►"})]}),U.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:l("settings.enableBearerAuth")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableBearerAuthDescription")})]}),u.jsx(_r,{disabled:N,checked:y.enableBearerAuth,onCheckedChange:q=>L("enableBearerAuth",q)})]}),y.enableBearerAuth&&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:l("settings.bearerAuthKey")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.bearerAuthKeyDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:S.bearerAuthKey,onChange:q=>X(q.target.value),placeholder:l("settings.bearerAuthKeyPlaceholder"),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:N||!y.enableBearerAuth}),u.jsx("button",{onClick:I,disabled:N||!y.enableBearerAuth,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:l("common.save")})]})]}),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:l("settings.enableGlobalRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGlobalRouteDescription")})]}),u.jsx(_r,{disabled:N,checked:y.enableGlobalRoute,onCheckedChange:q=>L("enableGlobalRoute",q)})]}),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:l("settings.enableGroupNameRoute")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.enableGroupNameRouteDescription")})]}),u.jsx(_r,{disabled:N,checked:y.enableGroupNameRoute,onCheckedChange:q=>L("enableGroupNameRoute",q)})]})]})]}),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:()=>Y("installConfig"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("settings.installConfig")}),u.jsx("span",{className:"text-gray-500",children:U.installConfig?"▼":"►"})]}),U.installConfig&&u.jsxs("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:l("settings.pythonIndexUrl")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.pythonIndexUrlDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:h.pythonIndexUrl,onChange:q=>fe("pythonIndexUrl",q.target.value),placeholder:l("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:N}),u.jsx("button",{onClick:()=>ae("pythonIndexUrl"),disabled:N,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:l("common.save")})]})]}),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:l("settings.npmRegistry")}),u.jsx("p",{className:"text-sm text-gray-500",children:l("settings.npmRegistryDescription")})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("input",{type:"text",value:h.npmRegistry,onChange:q=>fe("npmRegistry",q.target.value),placeholder:l("settings.npmRegistryPlaceholder"),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:N}),u.jsx("button",{onClick:()=>ae("npmRegistry"),disabled:N,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:l("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:()=>Y("password"),children:[u.jsx("h2",{className:"font-semibold text-gray-800",children:l("auth.changePassword")}),u.jsx("span",{className:"text-gray-500",children:U.password?"▼":"►"})]}),U.password&&u.jsx("div",{className:"max-w-lg mt-4",children:u.jsx(Wv,{onSuccess:G})})]})]})},a1=()=>{const{t:l}=ke(),[s,r]=w.useState([]),[o,d]=w.useState([]),[f,h]=w.useState([]),[x,m]=w.useState([]),[g,y]=w.useState(""),[S,v]=w.useState(""),[M,j]=w.useState(""),[N,C]=w.useState(!0),[R,k]=w.useState(null),[T,D]=w.useState(null),[U,te]=w.useState([]),[Y,L]=w.useState(1),[X,I]=w.useState(9),[fe,ae]=w.useState(1),se=w.useCallback(async()=>{try{C(!0);const J=localStorage.getItem("mcphub_token"),ee=await fetch(Ce("/market/servers"),{headers:{"x-auth-token":J||""}});if(!ee.ok)throw new Error(`Status: ${ee.status}`);const le=await ee.json();le&&le.success&&Array.isArray(le.data)?(d(le.data),ie(le.data,Y)):(console.error("Invalid market servers data format:",le),k(l("market.fetchError")))}catch(J){console.error("Error fetching market servers:",J),k(J instanceof Error?J.message:String(J))}finally{C(!1)}},[l]),ie=w.useCallback((J,ee,le=X)=>{const me=J.length,tt=Math.ceil(me/le);ae(tt);const ct=Math.max(1,Math.min(ee,tt));ct!==ee&&L(ct);const pt=(ct-1)*le,Ft=J.slice(pt,pt+le);r(Ft)},[X]),re=w.useCallback(J=>{L(J),ie(o,J,X)},[o,ie,X]),G=w.useCallback(async()=>{try{const J=localStorage.getItem("mcphub_token"),ee=await fetch(Ce("/market/categories"),{headers:{"x-auth-token":J||""}});if(!ee.ok)throw new Error(`Status: ${ee.status}`);const le=await ee.json();le&&le.success&&Array.isArray(le.data)?h(le.data):console.error("Invalid categories data format:",le)}catch(J){console.error("Error fetching categories:",J)}},[]),F=w.useCallback(async()=>{try{const J=localStorage.getItem("mcphub_token"),ee=await fetch(Ce("/market/tags"),{headers:{"x-auth-token":J||""}});if(!ee.ok)throw new Error(`Status: ${ee.status}`);const le=await ee.json();le&&le.success&&Array.isArray(le.data)?m(le.data):console.error("Invalid tags data format:",le)}catch(J){console.error("Error fetching tags:",J)}},[]),q=w.useCallback(async J=>{try{C(!0);const ee=localStorage.getItem("mcphub_token"),le=await fetch(Ce(`/market/servers/${J}`),{headers:{"x-auth-token":ee||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const me=await le.json();return me&&me.success&&me.data?(D(me.data),me.data):(console.error("Invalid server data format:",me),k(l("market.serverNotFound")),null)}catch(ee){return console.error(`Error fetching server ${J}:`,ee),k(ee instanceof Error?ee.message:String(ee)),null}finally{C(!1)}},[l]),de=w.useCallback(async J=>{try{if(C(!0),j(J),!J.trim()){se();return}const ee=localStorage.getItem("mcphub_token"),le=await fetch(Ce(`/market/servers/search?query=${encodeURIComponent(J)}`),{headers:{"x-auth-token":ee||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const me=await le.json();me&&me.success&&Array.isArray(me.data)?(d(me.data),L(1),ie(me.data,1)):(console.error("Invalid search results format:",me),k(l("market.searchError")))}catch(ee){console.error("Error searching servers:",ee),k(ee instanceof Error?ee.message:String(ee))}finally{C(!1)}},[l,o,ie,se]),A=w.useCallback(async J=>{try{if(C(!0),y(J),v(""),!J){se();return}const ee=localStorage.getItem("mcphub_token"),le=await fetch(Ce(`/market/categories/${encodeURIComponent(J)}`),{headers:{"x-auth-token":ee||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const me=await le.json();me&&me.success&&Array.isArray(me.data)?(d(me.data),L(1),ie(me.data,1)):(console.error("Invalid category filter results format:",me),k(l("market.filterError")))}catch(ee){console.error("Error filtering servers by category:",ee),k(ee instanceof Error?ee.message:String(ee))}finally{C(!1)}},[l,se,ie]),$=w.useCallback(async J=>{try{if(C(!0),v(J),y(""),!J){se();return}const ee=localStorage.getItem("mcphub_token"),le=await fetch(Ce(`/market/tags/${encodeURIComponent(J)}`),{headers:{"x-auth-token":ee||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const me=await le.json();me&&me.success&&Array.isArray(me.data)?(d(me.data),L(1),ie(me.data,1)):(console.error("Invalid tag filter results format:",me),k(l("market.tagFilterError")))}catch(ee){console.error("Error filtering servers by tag:",ee),k(ee instanceof Error?ee.message:String(ee))}finally{C(!1)}},[l,se,ie]),W=w.useCallback(async()=>{try{const J=localStorage.getItem("mcphub_token"),ee=await fetch(Ce("/servers"),{headers:{"x-auth-token":J||""}});if(!ee.ok)throw new Error(`Status: ${ee.status}`);const le=await ee.json();if(le&&le.success&&Array.isArray(le.data)){const me=le.data.map(tt=>tt.name);te(me)}}catch(J){console.error("Error fetching installed servers:",J)}},[]),Z=w.useCallback(J=>U.includes(J),[U]),ne=w.useCallback(async J=>{var ee,le;try{const me=(ee=J.installations)!=null&&ee.npm?"npm":Object.keys(J.installations||{}).length>0?Object.keys(J.installations)[0]:null;if(!me||!((le=J.installations)!=null&&le[me]))return k(l("market.noInstallationMethod")),!1;const tt=J.installations[me],ct={name:J.name,config:{command:tt.command,args:tt.args,env:tt.env||{}}},pt=localStorage.getItem("mcphub_token"),Ft=await fetch(Ce("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":pt||""},body:JSON.stringify(ct)});if(!Ft.ok){const rl=await Ft.json();throw new Error(rl.message||`Status: ${Ft.status}`)}return await W(),!0}catch(me){return console.error("Error installing server:",me),k(me instanceof Error?me.message:String(me)),!1}},[l,W]),ve=w.useCallback(J=>{I(J),L(1),ie(o,1,J)},[o,ie]);return w.useEffect(()=>{se(),G(),F(),W()},[se,G,F,W]),{servers:s,allServers:o,categories:f,tags:x,selectedCategory:g,selectedTag:S,searchQuery:M,loading:N,error:R,setError:k,currentServer:T,fetchMarketServers:se,fetchServerByName:q,searchServers:de,filterByCategory:A,filterByTag:$,installServer:ne,currentPage:Y,totalPages:fe,serversPerPage:X,changePage:re,changeServersPerPage:ve,isServerInstalled:Z}},n1=({server:l,onClick:s})=>{var x,m,g,y;const{t:r}=ke(),o=()=>{if(!l.tags||l.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const S=28,v=k=>k.length+3;let M=0,j=0;const N=[...l.tags].sort((k,T)=>k.length-T.length);for(j=0;j<N.length;j++){const k=v(N[j]);if(M+k>S)break;if(M+=k,j===N.length-1)return{tagsToShow:N,hasMore:!1,moreCount:0}}j===0&&N.length>0&&(j=1);const C=N.length-j,R=3+String(C).length+r("market.moreTags").length;return M+R<=S||j<1?{tagsToShow:N.slice(0,j),hasMore:!0,moreCount:C}:{tagsToShow:N.slice(0,Math.max(1,j-1)),hasMore:!0,moreCount:C+1}},{tagsToShow:d,hasMore:f,moreCount:h}=o();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:()=>s(l),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:l.display_name}),l.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:r("market.official")})]}),u.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:l.description}),u.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((x=l.categories)==null?void 0:x.length)>0?l.categories.map((S,v)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:S},v)):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:((m=l.tags)==null?void 0:m.length)>0?u.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[d.map((S,v)=>u.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",S]},v)),f&&u.jsxs("span",{className:"bg-gray-100 text-gray-600 text-xs px-1.5 py-1 rounded flex-shrink-0",children:["+",h," ",r("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:[r("market.by")," "]}),u.jsx("span",{className:"font-medium whitespace-nowrap overflow-hidden text-ellipsis max-w-[120px] inline-block align-bottom",children:((g=l.author)==null?void 0:g.name)||r("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:[((y=l.tools)==null?void 0:y.length)||0," ",r("market.tools")]})]})]})]})},l1=({server:l,onBack:s,onInstall:r,installing:o=!1,isInstalled:d=!1})=>{var R,k;const{t:f}=ke(),[h,x]=w.useState(!1),[m,g]=w.useState(null),y=()=>d?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:f("market.installed")}:o?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:f("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white",disabled:!1,text:f("market.install")},S=()=>{x(!h),g(null)},v=()=>{d||S()},M=()=>{if(!l.installations)return;if(l.installations.npm)return l.installations.npm;if(l.installations.uvx)return l.installations.uvx;if(l.installations.default)return l.installations.default;const T=Object.keys(l.installations);if(T.length>0)return l.installations[T[0]]},j=async T=>{try{g(null),r(l),x(!1)}catch(D){console.error("Error installing server:",D),g(f("errors.serverInstall"))}},N=y(),C=M();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:s,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"})}),f("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:[l.display_name,u.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",l.name,")"]}),u.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[f("market.author"),": ",l.author.name," • ",f("market.license"),": ",l.license," •",u.jsx("a",{href:l.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:f("market.repository")})]})]})}),u.jsxs("div",{className:"flex items-center",children:[l.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:f("market.official")}),u.jsx("button",{onClick:v,disabled:N.disabled,className:N.className,children:N.text})]})]}),u.jsx("p",{className:"text-gray-700 mb-6",children:l.description}),u.jsxs("div",{className:"mb-6",children:[u.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[f("market.categories")," & ",f("market.tags")]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[(R=l.categories)==null?void 0:R.map((T,D)=>u.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:T},`cat-${D}`)),l.tags&&l.tags.map((T,D)=>u.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",T]},`tag-${D}`))]})]}),l.arguments&&Object.keys(l.arguments).length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("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:f("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:f("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:f("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:f("market.example")})]})}),u.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(l.arguments).map(([T,D],U)=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:T}),u.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:D.description}),u.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:D.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:D.example})})]},U))})]})})]}),u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.tools")}),u.jsx("div",{className:"space-y-4",children:(k=l.tools)==null?void 0:k.map((T,D)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsxs("h4",{className:"font-medium mb-2",children:[T.name,u.jsx("button",{type:"button",onClick:()=>{const U=document.getElementById(`schema-${D}`);U&&U.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:f("market.viewSchema")})]}),u.jsx("p",{className:"text-gray-600 mb-2",children:T.description}),u.jsx("div",{className:"mt-2",children:u.jsx("pre",{id:`schema-${D}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(T.inputSchema,null,2)})})]},D))})]}),l.examples&&l.examples.length>0&&u.jsxs("div",{className:"mb-6",children:[u.jsx("h3",{className:"text-lg font-semibold mb-3",children:f("market.examples")}),u.jsx("div",{className:"space-y-4",children:l.examples.map((T,D)=>u.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[u.jsx("h4",{className:"font-medium mb-2",children:T.title}),u.jsx("p",{className:"text-gray-600 mb-2",children:T.description}),u.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:T.prompt})]},D))})]}),u.jsx("div",{className:"mt-6 flex justify-end",children:u.jsx("button",{onClick:v,disabled:N.disabled,className:N.className,children:N.text})}),h&&u.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:u.jsx(Gu,{onSubmit:j,onCancel:S,modalTitle:f("market.installServer",{name:l.display_name}),formError:m,initialData:{name:l.name,status:"disconnected",config:C?{command:C.command||"",args:C.args||[],env:C.env||{}}:void 0}})})]})},s1=({currentPage:l,totalPages:s,onPageChange:r})=>{const o=()=>{const d=[];d.push(u.jsx("button",{onClick:()=>r(1),className:`px-3 py-1 mx-1 rounded ${l===1?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"1"},"first"));let h=Math.max(2,l-Math.floor(5/2));h>2&&d.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let x=h;x<=Math.min(s-1,h+5-3);x++)d.push(u.jsx("button",{onClick:()=>r(x),className:`px-3 py-1 mx-1 rounded ${l===x?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:x},x));return h+5-3<s-1&&d.push(u.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),s>1&&d.push(u.jsx("button",{onClick:()=>r(s),className:`px-3 py-1 mx-1 rounded ${l===s?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:s},"last")),d};return s<=1?null:u.jsxs("div",{className:"flex justify-center items-center my-6",children:[u.jsx("button",{onClick:()=>r(Math.max(1,l-1)),disabled:l===1,className:`px-3 py-1 rounded mr-2 ${l===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:o()}),u.jsx("button",{onClick:()=>r(Math.min(s,l+1)),disabled:l===s,className:`px-3 py-1 rounded ml-2 ${l===s?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"Next »"})]})},rm=()=>{const{t:l}=ke(),s=un();Jt();const{serverName:r}=Dx(),{showToast:o}=ps(),{servers:d,allServers:f,categories:h,loading:x,error:m,setError:g,searchServers:y,filterByCategory:S,filterByTag:v,selectedCategory:M,selectedTag:j,installServer:N,fetchServerByName:C,isServerInstalled:R,currentPage:k,totalPages:T,changePage:D,serversPerPage:U,changeServersPerPage:te}=a1(),[Y,L]=w.useState(null),[X,I]=w.useState(""),[fe,ae]=w.useState(!1),[se,ie]=w.useState(!1);w.useEffect(()=>{(async()=>{if(r){const ne=await C(r);ne?L(ne):s("/market")}else L(null)})()},[r,C,s]);const re=Z=>{Z.preventDefault(),y(X)},G=Z=>{S(Z)},F=()=>{I(""),S(""),v("")},q=Z=>{s(`/market/${Z.name}`)},de=()=>{s("/market")},A=async Z=>{try{ae(!0),await N(Z)&&o(l("market.installSuccess",{serverName:Z.display_name}),"success")}finally{ae(!1)}},$=Z=>{D(Z),window.scrollTo({top:0,behavior:"smooth"})},W=Z=>{const ne=parseInt(Z.target.value,10);te(ne)};return Y?u.jsx(l1,{server:Y,onBack:de,onInstall:A,installing:fe,isInstalled:R(Y.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:[l("market.title"),u.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:l("pages.market.title").split(" - ")[1]})]})})}),m&&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:m}),u.jsx("button",{onClick:()=>g(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:re,className:"flex space-x-4 mb-0",children:[u.jsx("div",{className:"flex-grow",children:u.jsx("input",{type:"text",value:X,onChange:Z=>I(Z.target.value),placeholder:l("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:l("market.search")}),(X||M||j)&&u.jsx("button",{type:"button",onClick:F,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:l("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:h.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:l("market.categories")}),M&&u.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>S(""),children:l("market.clearCategoryFilter")})]}),u.jsx("div",{className:"flex flex-col gap-2",children:h.map(Z=>u.jsx("button",{onClick:()=>G(Z),className:`px-3 py-2 rounded text-sm text-left ${M===Z?"bg-blue-100 text-blue-800 font-medium":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:Z},Z))})]}):x?u.jsxs("div",{className:"mb-6",children:[u.jsx("div",{className:"mb-3",children:u.jsx("h3",{className:"font-medium text-gray-900",children:l("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:l("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:l("market.categories")})}),u.jsx("p",{className:"text-sm text-gray-600 py-2",children:l("market.noCategories")})]})})}),u.jsx("div",{className:"flex-grow",children:x?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:l("app.loading")})]})}):d.length===0?u.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:u.jsx("p",{className:"text-gray-600",children:l("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:d.map((Z,ne)=>u.jsx(n1,{server:Z,onClick:q},ne))}),u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("div",{className:"text-sm text-gray-500",children:l("market.showing",{from:(k-1)*U+1,to:Math.min(k*U,f.length),total:f.length})}),u.jsx(s1,{currentPage:k,totalPages:T,onPageChange:$}),u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[l("market.perPage"),":"]}),u.jsxs("select",{id:"perPage",value:U,onChange:W,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"})]})})]})]})},r1={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"},i1={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 o1({variant:l="default",size:s="default",className:r,disabled:o,children:d,...f}){return u.jsx("button",{className:Ga("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",r1[l],i1[s],r),disabled:o,...f,children:d})}const u1=({logs:l,isLoading:s=!1,error:r=null,onClear:o})=>{const{t:d}=ke(),f=w.useRef(null),[h,x]=w.useState(!0),[m,g]=w.useState(""),[y,S]=w.useState(["info","error","warn","debug"]),[v,M]=w.useState(["main","child"]);w.useEffect(()=>{h&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[l,h]);const j=l.filter(k=>{const T=m?k.message.toLowerCase().includes(m.toLowerCase()):!0,D=y.includes(k.type),U=v.includes(k.source);return T&&D&&U}),N=k=>new Date(k).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),C=k=>{switch(k){case"error":return"bg-red-400";case"warn":return"bg-yellow-400";case"debug":return"bg-purple-400";default:return"bg-blue-400"}},R=k=>{switch(k){case"main":return"bg-green-400";case"child":return"bg-orange-400";default:return"bg-gray-400"}};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:[d("logs.filters"),":"]}),u.jsx("input",{type:"text",placeholder:d("logs.search"),className:"px-2 py-1 text-sm border rounded",value:m,onChange:k=>g(k.target.value)}),u.jsx("div",{className:"flex gap-1 items-center",children:["info","error","warn","debug"].map(k=>u.jsx(Lr,{variant:y.includes(k)?"default":"outline",className:`cursor-pointer ${y.includes(k)?C(k):""}`,onClick:()=>{y.includes(k)?S(T=>T.filter(D=>D!==k)):S(T=>[...T,k])},children:k},k))}),u.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(k=>u.jsx(Lr,{variant:v.includes(k)?"default":"outline",className:`cursor-pointer ${v.includes(k)?R(k):""}`,onClick:()=>{v.includes(k)?M(T=>T.filter(D=>D!==k)):M(T=>[...T,k])},children:d(k==="main"?"logs.mainProcess":"logs.childProcess")},k))})]}),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:h,onChange:()=>x(!h),className:"form-checkbox h-4 w-4"}),d("logs.autoScroll")]}),u.jsx(o1,{variant:"outline",size:"sm",onClick:o,disabled:s||l.length===0,children:d("logs.clearLogs")})]})]}),u.jsx("div",{ref:f,className:"flex-grow p-2 overflow-auto bg-card rounded-b-md font-mono text-sm",style:{maxHeight:"calc(100vh - 300px)"},children:s?u.jsx("div",{className:"flex justify-center items-center h-full",children:u.jsx("span",{children:d("logs.loading")})}):r?u.jsx("div",{className:"text-red-500 p-2",children:r.message}):j.length===0?u.jsx("div",{className:"text-center text-muted-foreground p-8",children:m||y.length<4||v.length<2?d("logs.noMatch"):d("logs.noLogs")}):j.map((k,T)=>u.jsxs("div",{className:`py-1 border-b border-gray-100 dark:border-gray-800 ${k.type==="error"?"text-red-500":k.type==="warn"?"text-yellow-500":""}`,children:[u.jsxs("span",{className:"text-gray-400",children:["[",N(k.timestamp),"]"]}),u.jsx(Lr,{className:`ml-2 mr-1 ${C(k.type)}`,children:k.type}),u.jsxs(Lr,{variant:"default",className:`mr-2 ${R(k.source)}`,children:[k.source==="main"?d("logs.main"):d("logs.child"),k.processId?` (${k.processId})`:""]}),u.jsx("span",{className:"whitespace-pre-wrap",children:k.message})]},`${k.timestamp}-${T}`))})]})},c1=async()=>{try{const l=nl();if(!l)throw new Error("Authentication token not found. Please log in.");const r=await(await fetch(Ce("/logs"),{method:"DELETE",headers:{"x-auth-token":l}})).json();if(!r.success)throw new Error(r.error||"Failed to clear logs")}catch(l){throw console.error("Error clearing logs:",l),l}},d1=()=>{const[l,s]=w.useState([]),[r,o]=w.useState(!0),[d,f]=w.useState(null);return w.useEffect(()=>{let x=null,m=!0;const g=()=>{try{x&&x.close();const y=nl();if(!y){f(new Error("Authentication token not found. Please log in.")),o(!1);return}x=new EventSource(Ce(`/logs/stream?token=${y}`)),x.onmessage=S=>{if(m)try{const v=JSON.parse(S.data);v.type==="initial"?(s(v.logs),o(!1)):v.type==="log"&&s(M=>[...M,v.log])}catch(v){console.error("Error parsing SSE message:",v)}},x.onerror=()=>{m&&(x&&(x.close(),setTimeout(g,5e3)),f(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(y){if(!m)return;f(y instanceof Error?y:new Error("Failed to connect to log stream")),o(!1)}};return g(),()=>{m=!1,x&&x.close()}},[]),{logs:l,loading:r,error:d,clearLogs:async()=>{try{await c1(),s([])}catch(x){f(x instanceof Error?x:new Error("Failed to clear logs"))}}}},f1=()=>{const{t:l}=ke(),{logs:s,loading:r,error:o,clearLogs:d}=d1();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:l("pages.logs.title")})}),u.jsx("div",{className:"bg-card rounded-md shadow-sm",children:u.jsx(u1,{logs:s,isLoading:r,error:o,onClear:d})})]})};function im(){const l=$m();return u.jsx(nv,{children:u.jsx(Ly,{children:u.jsx(tv,{children:u.jsx(by,{basename:l,children:u.jsxs(Px,{children:[u.jsx(Ut,{path:"/login",element:u.jsx(Uv,{})}),u.jsx(Ut,{element:u.jsx(Dv,{}),children:u.jsxs(Ut,{element:u.jsx(zv,{}),children:[u.jsx(Ut,{path:"/",element:u.jsx(Lv,{})}),u.jsx(Ut,{path:"/servers",element:u.jsx(Qv,{})}),u.jsx(Ut,{path:"/groups",element:u.jsx(Fv,{})}),u.jsx(Ut,{path:"/market",element:u.jsx(rm,{})}),u.jsx(Ut,{path:"/market/:serverName",element:u.jsx(rm,{})}),u.jsx(Ut,{path:"/logs",element:u.jsx(f1,{})}),u.jsx(Ut,{path:"/settings",element:u.jsx(t1,{})})]})}),u.jsx(Ut,{path:"*",element:u.jsx(Um,{to:"/"})})]})})})})})}const ye=l=>typeof l=="string",us=()=>{let l,s;const r=new Promise((o,d)=>{l=o,s=d});return r.resolve=l,r.reject=s,r},om=l=>l==null?"":""+l,h1=(l,s,r)=>{l.forEach(o=>{s[o]&&(r[o]=s[o])})},m1=/###/g,um=l=>l&&l.indexOf("###")>-1?l.replace(m1,"."):l,cm=l=>!l||ye(l),cs=(l,s,r)=>{const o=ye(s)?s.split("."):s;let d=0;for(;d<o.length-1;){if(cm(l))return{};const f=um(o[d]);!l[f]&&r&&(l[f]=new r),Object.prototype.hasOwnProperty.call(l,f)?l=l[f]:l={},++d}return cm(l)?{}:{obj:l,k:um(o[d])}},dm=(l,s,r)=>{const{obj:o,k:d}=cs(l,s,Object);if(o!==void 0||s.length===1){o[d]=r;return}let f=s[s.length-1],h=s.slice(0,s.length-1),x=cs(l,h,Object);for(;x.obj===void 0&&h.length;)f=`${h[h.length-1]}.${f}`,h=h.slice(0,h.length-1),x=cs(l,h,Object),x!=null&&x.obj&&typeof x.obj[`${x.k}.${f}`]<"u"&&(x.obj=void 0);x.obj[`${x.k}.${f}`]=r},g1=(l,s,r,o)=>{const{obj:d,k:f}=cs(l,s,Object);d[f]=d[f]||[],d[f].push(r)},Vr=(l,s)=>{const{obj:r,k:o}=cs(l,s);if(r&&Object.prototype.hasOwnProperty.call(r,o))return r[o]},p1=(l,s,r)=>{const o=Vr(l,r);return o!==void 0?o:Vr(s,r)},bg=(l,s,r)=>{for(const o in s)o!=="__proto__"&&o!=="constructor"&&(o in l?ye(l[o])||l[o]instanceof String||ye(s[o])||s[o]instanceof String?r&&(l[o]=s[o]):bg(l[o],s[o],r):l[o]=s[o]);return l},Jn=l=>l.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var x1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const y1=l=>ye(l)?l.replace(/[&<>"'\/]/g,s=>x1[s]):l;class b1{constructor(s){this.capacity=s,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(s){const r=this.regExpMap.get(s);if(r!==void 0)return r;const o=new RegExp(s);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(s,o),this.regExpQueue.push(s),o}}const v1=[" ",",","?","!",";"],w1=new b1(20),S1=(l,s,r)=>{s=s||"",r=r||"";const o=v1.filter(h=>s.indexOf(h)<0&&r.indexOf(h)<0);if(o.length===0)return!0;const d=w1.getRegExp(`(${o.map(h=>h==="?"?"\\?":h).join("|")})`);let f=!d.test(l);if(!f){const h=l.indexOf(r);h>0&&!d.test(l.substring(0,h))&&(f=!0)}return f},Tu=function(l,s){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!l)return;if(l[s])return Object.prototype.hasOwnProperty.call(l,s)?l[s]:void 0;const o=s.split(r);let d=l;for(let f=0;f<o.length;){if(!d||typeof d!="object")return;let h,x="";for(let m=f;m<o.length;++m)if(m!==f&&(x+=r),x+=o[m],h=d[x],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&m<o.length-1)continue;f+=m-f+1;break}d=h}return d},Yr=l=>l==null?void 0:l.replace("_","-"),N1={type:"logger",log(l){this.output("log",l)},warn(l){this.output("warn",l)},error(l){this.output("error",l)},output(l,s){var r,o;(o=(r=console==null?void 0:console[l])==null?void 0:r.apply)==null||o.call(r,console,s)}};class $r{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(s,r)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=s||N1,this.options=r,this.debug=r.debug}log(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}warn(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}error(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"error","")}deprecate(){for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(s,r,o,d){return d&&!this.debug?null:(ye(s[0])&&(s[0]=`${o}${this.prefix} ${s[0]}`),this.logger[r](s))}create(s){return new $r(this.logger,{prefix:`${this.prefix}:${s}:`,...this.options})}clone(s){return s=s||this.options,s.prefix=s.prefix||this.prefix,new $r(this.logger,s)}}var Pt=new $r;class Pr{constructor(){this.observers={}}on(s,r){return s.split(" ").forEach(o=>{this.observers[o]||(this.observers[o]=new Map);const d=this.observers[o].get(r)||0;this.observers[o].set(r,d+1)}),this}off(s,r){if(this.observers[s]){if(!r){delete this.observers[s];return}this.observers[s].delete(r)}}emit(s){for(var r=arguments.length,o=new Array(r>1?r-1:0),d=1;d<r;d++)o[d-1]=arguments[d];this.observers[s]&&Array.from(this.observers[s].entries()).forEach(h=>{let[x,m]=h;for(let g=0;g<m;g++)x(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(h=>{let[x,m]=h;for(let g=0;g<m;g++)x.apply(x,[s,...o])})}}class fm extends Pr{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=s||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}removeNamespaces(s){const r=this.options.ns.indexOf(s);r>-1&&this.options.ns.splice(r,1)}getResource(s,r,o){var g,y;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const f=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator,h=d.ignoreJSONStructure!==void 0?d.ignoreJSONStructure:this.options.ignoreJSONStructure;let x;s.indexOf(".")>-1?x=s.split("."):(x=[s,r],o&&(Array.isArray(o)?x.push(...o):ye(o)&&f?x.push(...o.split(f)):x.push(o)));const m=Vr(this.data,x);return!m&&!r&&!o&&s.indexOf(".")>-1&&(s=x[0],r=x[1],o=x.slice(2).join(".")),m||!h||!ye(o)?m:Tu((y=(g=this.data)==null?void 0:g[s])==null?void 0:y[r],o,f)}addResource(s,r,o,d){let f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const h=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator;let x=[s,r];o&&(x=x.concat(h?o.split(h):o)),s.indexOf(".")>-1&&(x=s.split("."),d=r,r=x[1]),this.addNamespaces(r),dm(this.data,x,d),f.silent||this.emit("added",s,r,o,d)}addResources(s,r,o){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const f in o)(ye(o[f])||Array.isArray(o[f]))&&this.addResource(s,r,f,o[f],{silent:!0});d.silent||this.emit("added",s,r,o)}addResourceBundle(s,r,o,d,f){let h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},x=[s,r];s.indexOf(".")>-1&&(x=s.split("."),d=o,o=r,r=x[1]),this.addNamespaces(r);let m=Vr(this.data,x)||{};h.skipCopy||(o=JSON.parse(JSON.stringify(o))),d?bg(m,o,f):m={...m,...o},dm(this.data,x,m),h.silent||this.emit("added",s,r,o)}removeResourceBundle(s,r){this.hasResourceBundle(s,r)&&delete this.data[s][r],this.removeNamespaces(r),this.emit("removed",s,r)}hasResourceBundle(s,r){return this.getResource(s,r)!==void 0}getResourceBundle(s,r){return r||(r=this.options.defaultNS),this.getResource(s,r)}getDataByLanguage(s){return this.data[s]}hasLanguageSomeTranslations(s){const r=this.getDataByLanguage(s);return!!(r&&Object.keys(r)||[]).find(d=>r[d]&&Object.keys(r[d]).length>0)}toJSON(){return this.data}}var vg={processors:{},addPostProcessor(l){this.processors[l.name]=l},handle(l,s,r,o,d){return l.forEach(f=>{var h;s=((h=this.processors[f])==null?void 0:h.process(s,r,o,d))??s}),s}};const hm={},mm=l=>!ye(l)&&typeof l!="boolean"&&typeof l!="number";class Kr extends Pr{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),h1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],s,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pt.create("translator")}changeLanguage(s){s&&(this.language=s)}exists(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;const o=this.resolve(s,r);return(o==null?void 0:o.res)!==void 0}extractFromKey(s,r){let o=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const d=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let f=r.ns||this.options.defaultNS||[];const h=o&&s.indexOf(o)>-1,x=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!S1(s,o,d);if(h&&!x){const m=s.match(this.interpolator.nestingRegexp);if(m&&m.length>0)return{key:s,namespaces:ye(f)?[f]:f};const g=s.split(o);(o!==d||o===d&&this.options.ns.indexOf(g[0])>-1)&&(f=g.shift()),s=g.join(d)}return{key:s,namespaces:ye(f)?[f]:f}}translate(s,r,o){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);const d=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,f=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:h,namespaces:x}=this.extractFromKey(s[s.length-1],r),m=x[x.length-1],g=r.lng||this.language,y=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((g==null?void 0:g.toLowerCase())==="cimode"){if(y){const fe=r.nsSeparator||this.options.nsSeparator;return d?{res:`${m}${fe}${h}`,usedKey:h,exactUsedKey:h,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:`${m}${fe}${h}`}return d?{res:h,usedKey:h,exactUsedKey:h,usedLng:g,usedNS:m,usedParams:this.getUsedParamsDetails(r)}:h}const S=this.resolve(s,r);let v=S==null?void 0:S.res;const M=(S==null?void 0:S.usedKey)||h,j=(S==null?void 0:S.exactUsedKey)||h,N=["[object Number]","[object Function]","[object RegExp]"],C=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,k=r.count!==void 0&&!ye(r.count),T=Kr.hasDefaultValue(r),D=k?this.pluralResolver.getSuffix(g,r.count,r):"",U=r.ordinal&&k?this.pluralResolver.getSuffix(g,r.count,{ordinal:!1}):"",te=k&&!r.ordinal&&r.count===0,Y=te&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${D}`]||r[`defaultValue${U}`]||r.defaultValue;let L=v;R&&!v&&T&&(L=Y);const X=mm(L),I=Object.prototype.toString.apply(L);if(R&&L&&X&&N.indexOf(I)<0&&!(ye(C)&&Array.isArray(L))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const fe=this.options.returnedObjectHandler?this.options.returnedObjectHandler(M,L,{...r,ns:x}):`key '${h} (${this.language})' returned an object instead of string.`;return d?(S.res=fe,S.usedParams=this.getUsedParamsDetails(r),S):fe}if(f){const fe=Array.isArray(L),ae=fe?[]:{},se=fe?j:M;for(const ie in L)if(Object.prototype.hasOwnProperty.call(L,ie)){const re=`${se}${f}${ie}`;T&&!v?ae[ie]=this.translate(re,{...r,defaultValue:mm(Y)?Y[ie]:void 0,joinArrays:!1,ns:x}):ae[ie]=this.translate(re,{...r,joinArrays:!1,ns:x}),ae[ie]===re&&(ae[ie]=L[ie])}v=ae}}else if(R&&ye(C)&&Array.isArray(v))v=v.join(C),v&&(v=this.extendTranslation(v,s,r,o));else{let fe=!1,ae=!1;!this.isValidLookup(v)&&T&&(fe=!0,v=Y),this.isValidLookup(v)||(ae=!0,v=h);const ie=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ae?void 0:v,re=T&&Y!==v&&this.options.updateMissing;if(ae||fe||re){if(this.logger.log(re?"updateKey":"missingKey",g,m,h,re?Y:v),f){const de=this.resolve(h,{...r,keySeparator:!1});de&&de.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 G=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let de=0;de<F.length;de++)G.push(F[de]);else this.options.saveMissingTo==="all"?G=this.languageUtils.toResolveHierarchy(r.lng||this.language):G.push(r.lng||this.language);const q=(de,A,$)=>{var Z;const W=T&&$!==v?$:ie;this.options.missingKeyHandler?this.options.missingKeyHandler(de,m,A,W,re,r):(Z=this.backendConnector)!=null&&Z.saveMissing&&this.backendConnector.saveMissing(de,m,A,W,re,r),this.emit("missingKey",de,m,A,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?G.forEach(de=>{const A=this.pluralResolver.getSuffixes(de,r);te&&r[`defaultValue${this.options.pluralSeparator}zero`]&&A.indexOf(`${this.options.pluralSeparator}zero`)<0&&A.push(`${this.options.pluralSeparator}zero`),A.forEach($=>{q([de],h+$,r[`defaultValue${$}`]||Y)})}):q(G,h,Y))}v=this.extendTranslation(v,s,r,S,o),ae&&v===h&&this.options.appendNamespaceToMissingKey&&(v=`${m}:${h}`),(ae||fe)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}:${h}`:h,fe?v:void 0))}return d?(S.res=v,S.usedParams=this.getUsedParamsDetails(r),S):v}extendTranslation(s,r,o,d,f){var g,y;var h=this;if((g=this.i18nFormat)!=null&&g.parse)s=this.i18nFormat.parse(s,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||d.usedLng,d.usedNS,d.usedKey,{resolved:d});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const S=ye(s)&&(((y=o==null?void 0:o.interpolation)==null?void 0:y.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(S){const j=s.match(this.interpolator.nestingRegexp);v=j&&j.length}let M=o.replace&&!ye(o.replace)?o.replace:o;if(this.options.interpolation.defaultVariables&&(M={...this.options.interpolation.defaultVariables,...M}),s=this.interpolator.interpolate(s,M,o.lng||this.language||d.usedLng,o),S){const j=s.match(this.interpolator.nestingRegexp),N=j&&j.length;v<N&&(o.nest=!1)}!o.lng&&d&&d.res&&(o.lng=this.language||d.usedLng),o.nest!==!1&&(s=this.interpolator.nest(s,function(){for(var j=arguments.length,N=new Array(j),C=0;C<j;C++)N[C]=arguments[C];return(f==null?void 0:f[0])===N[0]&&!o.context?(h.logger.warn(`It seems you are nesting recursively key: ${N[0]} in key: ${r[0]}`),null):h.translate(...N,r)},o)),o.interpolation&&this.interpolator.reset()}const x=o.postProcess||this.options.postProcess,m=ye(x)?[x]:x;return s!=null&&(m!=null&&m.length)&&o.applyPostProcessor!==!1&&(s=vg.handle(m,s,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...d,usedParams:this.getUsedParamsDetails(o)},...o}:o,this)),s}resolve(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o,d,f,h,x;return ye(s)&&(s=[s]),s.forEach(m=>{if(this.isValidLookup(o))return;const g=this.extractFromKey(m,r),y=g.key;d=y;let S=g.namespaces;this.options.fallbackNS&&(S=S.concat(this.options.fallbackNS));const v=r.count!==void 0&&!ye(r.count),M=v&&!r.ordinal&&r.count===0,j=r.context!==void 0&&(ye(r.context)||typeof r.context=="number")&&r.context!=="",N=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);S.forEach(C=>{var R,k;this.isValidLookup(o)||(x=C,!hm[`${N[0]}-${C}`]&&((R=this.utils)!=null&&R.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(x))&&(hm[`${N[0]}-${C}`]=!0,this.logger.warn(`key "${d}" for languages "${N.join(", ")}" won't get resolved as namespace "${x}" 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!!!")),N.forEach(T=>{var te;if(this.isValidLookup(o))return;h=T;const D=[y];if((te=this.i18nFormat)!=null&&te.addLookupKeys)this.i18nFormat.addLookupKeys(D,y,T,C,r);else{let Y;v&&(Y=this.pluralResolver.getSuffix(T,r.count,r));const L=`${this.options.pluralSeparator}zero`,X=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(D.push(y+Y),r.ordinal&&Y.indexOf(X)===0&&D.push(y+Y.replace(X,this.options.pluralSeparator)),M&&D.push(y+L)),j){const I=`${y}${this.options.contextSeparator}${r.context}`;D.push(I),v&&(D.push(I+Y),r.ordinal&&Y.indexOf(X)===0&&D.push(I+Y.replace(X,this.options.pluralSeparator)),M&&D.push(I+L))}}let U;for(;U=D.pop();)this.isValidLookup(o)||(f=U,o=this.getResource(T,C,U,r))}))})}),{res:o,usedKey:d,exactUsedKey:f,usedLng:h,usedNS:x}}isValidLookup(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}getResource(s,r,o){var f;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(f=this.i18nFormat)!=null&&f.getResource?this.i18nFormat.getResource(s,r,o,d):this.resourceStore.getResource(s,r,o,d)}getUsedParamsDetails(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=s.replace&&!ye(s.replace);let d=o?s.replace:s;if(o&&typeof s.count<"u"&&(d.count=s.count),this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),!o){d={...d};for(const f of r)delete d[f]}return d}static hasDefaultValue(s){const r="defaultValue";for(const o in s)if(Object.prototype.hasOwnProperty.call(s,o)&&r===o.substring(0,r.length)&&s[o]!==void 0)return!0;return!1}}class gm{constructor(s){this.options=s,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pt.create("languageUtils")}getScriptPartFromCode(s){if(s=Yr(s),!s||s.indexOf("-")<0)return null;const r=s.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(s){if(s=Yr(s),!s||s.indexOf("-")<0)return s;const r=s.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(s){if(ye(s)&&s.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(s)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?s.toLowerCase():s)}return this.options.cleanCode||this.options.lowerCaseLng?s.toLowerCase():s}isSupportedCode(s){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(s=this.getLanguagePartFromCode(s)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(s)>-1}getBestMatchFromCodes(s){if(!s)return null;let r;return s.forEach(o=>{if(r)return;const d=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(d))&&(r=d)}),!r&&this.options.supportedLngs&&s.forEach(o=>{if(r)return;const d=this.getLanguagePartFromCode(o);if(this.isSupportedCode(d))return r=d;r=this.options.supportedLngs.find(f=>{if(f===d)return f;if(!(f.indexOf("-")<0&&d.indexOf("-")<0)&&(f.indexOf("-")>0&&d.indexOf("-")<0&&f.substring(0,f.indexOf("-"))===d||f.indexOf(d)===0&&d.length>1))return f})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(s,r){if(!s)return[];if(typeof s=="function"&&(s=s(r)),ye(s)&&(s=[s]),Array.isArray(s))return s;if(!r)return s.default||[];let o=s[r];return o||(o=s[this.getScriptPartFromCode(r)]),o||(o=s[this.formatLanguageCode(r)]),o||(o=s[this.getLanguagePartFromCode(r)]),o||(o=s.default),o||[]}toResolveHierarchy(s,r){const o=this.getFallbackCodes(r||this.options.fallbackLng||[],s),d=[],f=h=>{h&&(this.isSupportedCode(h)?d.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return ye(s)&&(s.indexOf("-")>-1||s.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(s)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(s)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(s))):ye(s)&&f(this.formatLanguageCode(s)),o.forEach(h=>{d.indexOf(h)<0&&f(this.formatLanguageCode(h))}),d}}const pm={zero:0,one:1,two:2,few:3,many:4,other:5},xm={select:l=>l===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class j1{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=s,this.options=r,this.logger=Pt.create("pluralResolver"),this.pluralRulesCache={}}addRule(s,r){this.rules[s]=r}clearCache(){this.pluralRulesCache={}}getRule(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=Yr(s==="dev"?"en":s),d=r.ordinal?"ordinal":"cardinal",f=JSON.stringify({cleanedCode:o,type:d});if(f in this.pluralRulesCache)return this.pluralRulesCache[f];let h;try{h=new Intl.PluralRules(o,{type:d})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),xm;if(!s.match(/-|_/))return xm;const m=this.languageUtils.getLanguagePartFromCode(s);h=this.getRule(m,r)}return this.pluralRulesCache[f]=h,h}needsPlural(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(s,r);return o||(o=this.getRule("dev",r)),(o==null?void 0:o.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(s,o).map(d=>`${r}${d}`)}getSuffixes(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(s,r);return o||(o=this.getRule("dev",r)),o?o.resolvedOptions().pluralCategories.sort((d,f)=>pm[d]-pm[f]).map(d=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${d}`):[]}getSuffix(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const d=this.getRule(s,o);return d?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${d.select(r)}`:(this.logger.warn(`no plural rule found for: ${s}`),this.getSuffix("dev",r,o))}}const ym=function(l,s,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,f=p1(l,s,r);return!f&&d&&ye(r)&&(f=Tu(l,r,o),f===void 0&&(f=Tu(s,r,o))),f},yu=l=>l.replace(/\$/g,"$$$$");class E1{constructor(){var r;let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Pt.create("interpolator"),this.options=s,this.format=((r=s==null?void 0:s.interpolation)==null?void 0:r.format)||(o=>o),this.init(s)}init(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};s.interpolation||(s.interpolation={escapeValue:!0});const{escape:r,escapeValue:o,useRawValueToEscape:d,prefix:f,prefixEscaped:h,suffix:x,suffixEscaped:m,formatSeparator:g,unescapeSuffix:y,unescapePrefix:S,nestingPrefix:v,nestingPrefixEscaped:M,nestingSuffix:j,nestingSuffixEscaped:N,nestingOptionsSeparator:C,maxReplaces:R,alwaysFormat:k}=s.interpolation;this.escape=r!==void 0?r:y1,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=d!==void 0?d:!1,this.prefix=f?Jn(f):h||"{{",this.suffix=x?Jn(x):m||"}}",this.formatSeparator=g||",",this.unescapePrefix=y?"":S||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=v?Jn(v):M||Jn("$t("),this.nestingSuffix=j?Jn(j):N||Jn(")"),this.nestingOptionsSeparator=C||",",this.maxReplaces=R||1e3,this.alwaysFormat=k!==void 0?k:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const s=(r,o)=>(r==null?void 0:r.source)===o?(r.lastIndex=0,r):new RegExp(o,"g");this.regexp=s(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=s(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=s(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(s,r,o,d){var M;let f,h,x;const m=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=j=>{if(j.indexOf(this.formatSeparator)<0){const k=ym(r,m,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,o,{...d,...r,interpolationkey:j}):k}const N=j.split(this.formatSeparator),C=N.shift().trim(),R=N.join(this.formatSeparator).trim();return this.format(ym(r,m,C,this.options.keySeparator,this.options.ignoreJSONStructure),R,o,{...d,...r,interpolationkey:C})};this.resetRegExp();const y=(d==null?void 0:d.missingInterpolationHandler)||this.options.missingInterpolationHandler,S=((M=d==null?void 0:d.interpolation)==null?void 0:M.skipOnVariables)!==void 0?d.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>yu(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?yu(this.escape(j)):yu(j)}].forEach(j=>{for(x=0;f=j.regex.exec(s);){const N=f[1].trim();if(h=g(N),h===void 0)if(typeof y=="function"){const R=y(s,f,d);h=ye(R)?R:""}else if(d&&Object.prototype.hasOwnProperty.call(d,N))h="";else if(S){h=f[0];continue}else this.logger.warn(`missed to pass in variable ${N} for interpolating ${s}`),h="";else!ye(h)&&!this.useRawValueToEscape&&(h=om(h));const C=j.safeValue(h);if(s=s.replace(f[0],C),S?(j.regex.lastIndex+=h.length,j.regex.lastIndex-=f[0].length):j.regex.lastIndex=0,x++,x>=this.maxReplaces)break}}),s}nest(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d,f,h;const x=(m,g)=>{const y=this.nestingOptionsSeparator;if(m.indexOf(y)<0)return m;const S=m.split(new RegExp(`${y}[ ]*{`));let v=`{${S[1]}`;m=S[0],v=this.interpolate(v,h);const M=v.match(/'/g),j=v.match(/"/g);(((M==null?void 0:M.length)??0)%2===0&&!j||j.length%2!==0)&&(v=v.replace(/'/g,'"'));try{h=JSON.parse(v),g&&(h={...g,...h})}catch(N){return this.logger.warn(`failed parsing options string in nesting for key ${m}`,N),`${m}${y}${v}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,m};for(;d=this.nestingRegexp.exec(s);){let m=[];h={...o},h=h.replace&&!ye(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;let g=!1;if(d[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(d[1])){const y=d[1].split(this.formatSeparator).map(S=>S.trim());d[1]=y.shift(),m=y,g=!0}if(f=r(x.call(this,d[1].trim(),h),h),f&&d[0]===s&&!ye(f))return f;ye(f)||(f=om(f)),f||(this.logger.warn(`missed to resolve ${d[1]} for nesting ${s}`),f=""),g&&(f=m.reduce((y,S)=>this.format(y,S,o.lng,{...o,interpolationkey:d[1].trim()}),f.trim())),s=s.replace(d[0],f),this.regexp.lastIndex=0}return s}}const C1=l=>{let s=l.toLowerCase().trim();const r={};if(l.indexOf("(")>-1){const o=l.split("(");s=o[0].toLowerCase().trim();const d=o[1].substring(0,o[1].length-1);s==="currency"&&d.indexOf(":")<0?r.currency||(r.currency=d.trim()):s==="relativetime"&&d.indexOf(":")<0?r.range||(r.range=d.trim()):d.split(";").forEach(h=>{if(h){const[x,...m]=h.split(":"),g=m.join(":").trim().replace(/^'+|'+$/g,""),y=x.trim();r[y]||(r[y]=g),g==="false"&&(r[y]=!1),g==="true"&&(r[y]=!0),isNaN(g)||(r[y]=parseInt(g,10))}})}return{formatName:s,formatOptions:r}},Fn=l=>{const s={};return(r,o,d)=>{let f=d;d&&d.interpolationkey&&d.formatParams&&d.formatParams[d.interpolationkey]&&d[d.interpolationkey]&&(f={...f,[d.interpolationkey]:void 0});const h=o+JSON.stringify(f);let x=s[h];return x||(x=l(Yr(o),d),s[h]=x),x(r)}};class k1{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Pt.create("formatter"),this.options=s,this.formats={number:Fn((r,o)=>{const d=new Intl.NumberFormat(r,{...o});return f=>d.format(f)}),currency:Fn((r,o)=>{const d=new Intl.NumberFormat(r,{...o,style:"currency"});return f=>d.format(f)}),datetime:Fn((r,o)=>{const d=new Intl.DateTimeFormat(r,{...o});return f=>d.format(f)}),relativetime:Fn((r,o)=>{const d=new Intl.RelativeTimeFormat(r,{...o});return f=>d.format(f,o.range||"day")}),list:Fn((r,o)=>{const d=new Intl.ListFormat(r,{...o});return f=>d.format(f)})},this.init(s)}init(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(s,r){this.formats[s.toLowerCase().trim()]=r}addCached(s,r){this.formats[s.toLowerCase().trim()]=Fn(r)}format(s,r,o){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const f=r.split(this.formatSeparator);if(f.length>1&&f[0].indexOf("(")>1&&f[0].indexOf(")")<0&&f.find(x=>x.indexOf(")")>-1)){const x=f.findIndex(m=>m.indexOf(")")>-1);f[0]=[f[0],...f.splice(1,x)].join(this.formatSeparator)}return f.reduce((x,m)=>{var S;const{formatName:g,formatOptions:y}=C1(m);if(this.formats[g]){let v=x;try{const M=((S=d==null?void 0:d.formatParams)==null?void 0:S[d.interpolationkey])||{},j=M.locale||M.lng||d.locale||d.lng||o;v=this.formats[g](x,j,{...y,...d,...M})}catch(M){this.logger.warn(M)}return v}else this.logger.warn(`there was no format function for ${g}`);return x},s)}}const A1=(l,s)=>{l.pending[s]!==void 0&&(delete l.pending[s],l.pendingCount--)};class T1 extends Pr{constructor(s,r,o){var f,h;let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=s,this.store=r,this.services=o,this.languageUtils=o.languageUtils,this.options=d,this.logger=Pt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=d.maxParallelReads||10,this.readingCalls=0,this.maxRetries=d.maxRetries>=0?d.maxRetries:5,this.retryTimeout=d.retryTimeout>=1?d.retryTimeout:350,this.state={},this.queue=[],(h=(f=this.backend)==null?void 0:f.init)==null||h.call(f,o,d.backend,d)}queueLoad(s,r,o,d){const f={},h={},x={},m={};return s.forEach(g=>{let y=!0;r.forEach(S=>{const v=`${g}|${S}`;!o.reload&&this.store.hasResourceBundle(g,S)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?h[v]===void 0&&(h[v]=!0):(this.state[v]=1,y=!1,h[v]===void 0&&(h[v]=!0),f[v]===void 0&&(f[v]=!0),m[S]===void 0&&(m[S]=!0)))}),y||(x[g]=!0)}),(Object.keys(f).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:d}),{toLoad:Object.keys(f),pending:Object.keys(h),toLoadLanguages:Object.keys(x),toLoadNamespaces:Object.keys(m)}}loaded(s,r,o){const d=s.split("|"),f=d[0],h=d[1];r&&this.emit("failedLoading",f,h,r),!r&&o&&this.store.addResourceBundle(f,h,o,void 0,void 0,{skipCopy:!0}),this.state[s]=r?-1:2,r&&o&&(this.state[s]=0);const x={};this.queue.forEach(m=>{g1(m.loaded,[f],h),A1(m,s),r&&m.errors.push(r),m.pendingCount===0&&!m.done&&(Object.keys(m.loaded).forEach(g=>{x[g]||(x[g]={});const y=m.loaded[g];y.length&&y.forEach(S=>{x[g][S]===void 0&&(x[g][S]=!0)})}),m.done=!0,m.errors.length?m.callback(m.errors):m.callback())}),this.emit("loaded",x),this.queue=this.queue.filter(m=>!m.done)}read(s,r,o){let d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!s.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:r,fcName:o,tried:d,wait:f,callback:h});return}this.readingCalls++;const x=(g,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const S=this.waitingReads.shift();this.read(S.lng,S.ns,S.fcName,S.tried,S.wait,S.callback)}if(g&&y&&d<this.maxRetries){setTimeout(()=>{this.read.call(this,s,r,o,d+1,f*2,h)},f);return}h(g,y)},m=this.backend[o].bind(this.backend);if(m.length===2){try{const g=m(s,r);g&&typeof g.then=="function"?g.then(y=>x(null,y)).catch(x):x(null,g)}catch(g){x(g)}return}return m(s,r,x)}prepareLoading(s,r){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},d=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."),d&&d();ye(s)&&(s=this.languageUtils.toResolveHierarchy(s)),ye(r)&&(r=[r]);const f=this.queueLoad(s,r,o,d);if(!f.toLoad.length)return f.pending.length||d(),null;f.toLoad.forEach(h=>{this.loadOne(h)})}load(s,r,o){this.prepareLoading(s,r,{},o)}reload(s,r,o){this.prepareLoading(s,r,{reload:!0},o)}loadOne(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const o=s.split("|"),d=o[0],f=o[1];this.read(d,f,"read",void 0,void 0,(h,x)=>{h&&this.logger.warn(`${r}loading namespace ${f} for language ${d} failed`,h),!h&&x&&this.logger.log(`${r}loaded namespace ${f} for language ${d}`,x),this.loaded(s,h,x)})}saveMissing(s,r,o,d,f){var m,g,y,S,v;let h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},x=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((g=(m=this.services)==null?void 0:m.utils)!=null&&g.hasLoadedNamespace&&!((S=(y=this.services)==null?void 0:y.utils)!=null&&S.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${o}" as the namespace "${r}" 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(!(o==null||o==="")){if((v=this.backend)!=null&&v.create){const M={...h,isUpdate:f},j=this.backend.create.bind(this.backend);if(j.length<6)try{let N;j.length===5?N=j(s,r,o,d,M):N=j(s,r,o,d),N&&typeof N.then=="function"?N.then(C=>x(null,C)).catch(x):x(null,N)}catch(N){x(N)}else j(s,r,o,d,x,M)}!s||!s[0]||this.store.addResource(s[0],r,o,d)}}}const bm=()=>({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:l=>{let s={};if(typeof l[1]=="object"&&(s=l[1]),ye(l[1])&&(s.defaultValue=l[1]),ye(l[2])&&(s.tDescription=l[2]),typeof l[2]=="object"||typeof l[3]=="object"){const r=l[3]||l[2];Object.keys(r).forEach(o=>{s[o]=r[o]})}return s},interpolation:{escapeValue:!0,format:l=>l,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),vm=l=>{var s,r;return ye(l.ns)&&(l.ns=[l.ns]),ye(l.fallbackLng)&&(l.fallbackLng=[l.fallbackLng]),ye(l.fallbackNS)&&(l.fallbackNS=[l.fallbackNS]),((r=(s=l.supportedLngs)==null?void 0:s.indexOf)==null?void 0:r.call(s,"cimode"))<0&&(l.supportedLngs=l.supportedLngs.concat(["cimode"])),typeof l.initImmediate=="boolean"&&(l.initAsync=l.initImmediate),l},Hr=()=>{},R1=l=>{Object.getOwnPropertyNames(Object.getPrototypeOf(l)).forEach(r=>{typeof l[r]=="function"&&(l[r]=l[r].bind(l))})};class hs extends Pr{constructor(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=vm(s),this.services={},this.logger=Pt,this.modules={external:[]},R1(this),r&&!this.isInitialized&&!s.isClone){if(!this.options.initAsync)return this.init(s,r),this;setTimeout(()=>{this.init(s,r)},0)}}init(){var s=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(o=r,r={}),r.defaultNS==null&&r.ns&&(ye(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const d=bm();this.options={...d,...this.options,...vm(r)},this.options.interpolation={...d.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const f=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?Pt.init(f(this.modules.logger),this.options):Pt.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=k1;const S=new gm(this.options);this.store=new fm(this.options.resources,this.options);const v=this.services;v.logger=Pt,v.resourceStore=this.store,v.languageUtils=S,v.pluralResolver=new j1(S,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===d.interpolation.format)&&(v.formatter=f(y),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new E1(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new T1(f(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",function(M){for(var j=arguments.length,N=new Array(j>1?j-1:0),C=1;C<j;C++)N[C-1]=arguments[C];s.emit(M,...N)}),this.modules.languageDetector&&(v.languageDetector=f(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=f(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new Kr(this.services,this.options),this.translator.on("*",function(M){for(var j=arguments.length,N=new Array(j>1?j-1:0),C=1;C<j;C++)N[C-1]=arguments[C];s.emit(M,...N)}),this.modules.external.forEach(M=>{M.init&&M.init(this)})}if(this.format=this.options.interpolation.format,o||(o=Hr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[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(y=>{this[y]=function(){return s.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return s.store[y](...arguments),s}});const m=us(),g=()=>{const y=(S,v)=>{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),m.resolve(v),o(S,v)};if(this.languages&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),m}loadResources(s){var f,h;let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hr;const d=ye(s)?s:this.language;if(typeof s=="function"&&(o=s),!this.options.resources||this.options.partialBundledLanguages){if((d==null?void 0:d.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const x=[],m=g=>{if(!g||g==="cimode")return;this.services.languageUtils.toResolveHierarchy(g).forEach(S=>{S!=="cimode"&&x.indexOf(S)<0&&x.push(S)})};d?m(d):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>m(y)),(h=(f=this.options.preload)==null?void 0:f.forEach)==null||h.call(f,g=>m(g)),this.services.backendConnector.load(x,this.options.ns,g=>{!g&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(g)})}else o(null)}reloadResources(s,r,o){const d=us();return typeof s=="function"&&(o=s,s=void 0),typeof r=="function"&&(o=r,r=void 0),s||(s=this.languages),r||(r=this.options.ns),o||(o=Hr),this.services.backendConnector.reload(s,r,f=>{d.resolve(),o(f)}),d}use(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&vg.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}setResolvedLanguage(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(let r=0;r<this.languages.length;r++){const o=this.languages[r];if(!(["cimode","dev"].indexOf(o)>-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}changeLanguage(s,r){var o=this;this.isLanguageChangingTo=s;const d=us();this.emit("languageChanging",s);const f=m=>{this.language=m,this.languages=this.services.languageUtils.toResolveHierarchy(m),this.resolvedLanguage=void 0,this.setResolvedLanguage(m)},h=(m,g)=>{g?(f(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,d.resolve(function(){return o.t(...arguments)}),r&&r(m,function(){return o.t(...arguments)})},x=m=>{var y,S;!s&&!m&&this.services.languageDetector&&(m=[]);const g=ye(m)?m:this.services.languageUtils.getBestMatchFromCodes(m);g&&(this.language||f(g),this.translator.language||this.translator.changeLanguage(g),(S=(y=this.services.languageDetector)==null?void 0:y.cacheUserLanguage)==null||S.call(y,g)),this.loadResources(g,v=>{h(v,g)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?x(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(x):this.services.languageDetector.detect(x):x(s),d}getFixedT(s,r,o){var d=this;const f=function(h,x){let m;if(typeof x!="object"){for(var g=arguments.length,y=new Array(g>2?g-2:0),S=2;S<g;S++)y[S-2]=arguments[S];m=d.options.overloadTranslationOptionHandler([h,x].concat(y))}else m={...x};m.lng=m.lng||f.lng,m.lngs=m.lngs||f.lngs,m.ns=m.ns||f.ns,m.keyPrefix!==""&&(m.keyPrefix=m.keyPrefix||o||f.keyPrefix);const v=d.options.keySeparator||".";let M;return m.keyPrefix&&Array.isArray(h)?M=h.map(j=>`${m.keyPrefix}${v}${j}`):M=m.keyPrefix?`${m.keyPrefix}${v}${h}`:h,d.t(M,m)};return ye(s)?f.lng=s:f.lngs=s,f.ns=r,f.keyPrefix=o,f}t(){var d;for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return(d=this.translator)==null?void 0:d.translate(...r)}exists(){var d;for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return(d=this.translator)==null?void 0:d.exists(...r)}setDefaultNamespace(s){this.options.defaultNS=s}hasLoadedNamespace(s){let r=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 o=r.lng||this.resolvedLanguage||this.languages[0],d=this.options?this.options.fallbackLng:!1,f=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const h=(x,m)=>{const g=this.services.backendConnector.state[`${x}|${m}`];return g===-1||g===0||g===2};if(r.precheck){const x=r.precheck(this,h);if(x!==void 0)return x}return!!(this.hasResourceBundle(o,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(o,s)&&(!d||h(f,s)))}loadNamespaces(s,r){const o=us();return this.options.ns?(ye(s)&&(s=[s]),s.forEach(d=>{this.options.ns.indexOf(d)<0&&this.options.ns.push(d)}),this.loadResources(d=>{o.resolve(),r&&r(d)}),o):(r&&r(),Promise.resolve())}loadLanguages(s,r){const o=us();ye(s)&&(s=[s]);const d=this.options.preload||[],f=s.filter(h=>d.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return f.length?(this.options.preload=d.concat(f),this.loadResources(h=>{o.resolve(),r&&r(h)}),o):(r&&r(),Promise.resolve())}dir(s){var d,f;if(s||(s=this.resolvedLanguage||(((d=this.languages)==null?void 0:d.length)>0?this.languages[0]:this.language)),!s)return"rtl";const r=["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"],o=((f=this.services)==null?void 0:f.languageUtils)||new gm(bm());return r.indexOf(o.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new hs(s,r)}cloneInstance(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hr;const o=s.forkResourceStore;o&&delete s.forkResourceStore;const d={...this.options,...s,isClone:!0},f=new hs(d);if((s.debug!==void 0||s.prefix!==void 0)&&(f.logger=f.logger.clone(s)),["store","services","language"].forEach(x=>{f[x]=this[x]}),f.services={...this.services},f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},o){const x=Object.keys(this.store.data).reduce((m,g)=>(m[g]={...this.store.data[g]},Object.keys(m[g]).reduce((y,S)=>(y[S]={...m[g][S]},y),{})),{});f.store=new fm(x,d),f.services.resourceStore=f.store}return f.translator=new Kr(f.services,d),f.translator.on("*",function(x){for(var m=arguments.length,g=new Array(m>1?m-1:0),y=1;y<m;y++)g[y-1]=arguments[y];f.emit(x,...g)}),f.init(d,r),f.translator.options=d,f.translator.backendConnector.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const ot=hs.createInstance();ot.createInstance=hs.createInstance;ot.createInstance;ot.dir;ot.init;ot.loadResources;ot.reloadResources;ot.use;ot.changeLanguage;ot.getFixedT;ot.t;ot.exists;ot.setDefaultNamespace;ot.hasLoadedNamespace;ot.loadNamespaces;ot.loadLanguages;const{slice:O1,forEach:M1}=[];function z1(l){return M1.call(O1.call(arguments,1),s=>{if(s)for(const r in s)l[r]===void 0&&(l[r]=s[r])}),l}function D1(l){return typeof l!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(l))}const wm=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,U1=function(l,s){const o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},d=encodeURIComponent(s);let f=`${l}=${d}`;if(o.maxAge>0){const h=o.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");f+=`; Max-Age=${Math.floor(h)}`}if(o.domain){if(!wm.test(o.domain))throw new TypeError("option domain is invalid");f+=`; Domain=${o.domain}`}if(o.path){if(!wm.test(o.path))throw new TypeError("option path is invalid");f+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");f+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(f+="; HttpOnly"),o.secure&&(f+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:f+="; SameSite=Strict";break;case"lax":f+="; SameSite=Lax";break;case"strict":f+="; SameSite=Strict";break;case"none":f+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o.partitioned&&(f+="; Partitioned"),f},Sm={create(l,s,r,o){let d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(d.expires=new Date,d.expires.setTime(d.expires.getTime()+r*60*1e3)),o&&(d.domain=o),document.cookie=U1(l,encodeURIComponent(s),d)},read(l){const s=`${l}=`,r=document.cookie.split(";");for(let o=0;o<r.length;o++){let d=r[o];for(;d.charAt(0)===" ";)d=d.substring(1,d.length);if(d.indexOf(s)===0)return d.substring(s.length,d.length)}return null},remove(l){this.create(l,"",-1)}};var L1={name:"cookie",lookup(l){let{lookupCookie:s}=l;if(s&&typeof document<"u")return Sm.read(s)||void 0},cacheUserLanguage(l,s){let{lookupCookie:r,cookieMinutes:o,cookieDomain:d,cookieOptions:f}=s;r&&typeof document<"u"&&Sm.create(r,l,o,d,f)}},_1={name:"querystring",lookup(l){var o;let{lookupQuerystring:s}=l,r;if(typeof window<"u"){let{search:d}=window.location;!window.location.search&&((o=window.location.hash)==null?void 0:o.indexOf("?"))>-1&&(d=window.location.hash.substring(window.location.hash.indexOf("?")));const h=d.substring(1).split("&");for(let x=0;x<h.length;x++){const m=h[x].indexOf("=");m>0&&h[x].substring(0,m)===s&&(r=h[x].substring(m+1))}}return r}};let Wn=null;const Nm=()=>{if(Wn!==null)return Wn;try{if(Wn=typeof window<"u"&&window.localStorage!==null,!Wn)return!1;const l="i18next.translate.boo";window.localStorage.setItem(l,"foo"),window.localStorage.removeItem(l)}catch{Wn=!1}return Wn};var H1={name:"localStorage",lookup(l){let{lookupLocalStorage:s}=l;if(s&&Nm())return window.localStorage.getItem(s)||void 0},cacheUserLanguage(l,s){let{lookupLocalStorage:r}=s;r&&Nm()&&window.localStorage.setItem(r,l)}};let In=null;const jm=()=>{if(In!==null)return In;try{if(In=typeof window<"u"&&window.sessionStorage!==null,!In)return!1;const l="i18next.translate.boo";window.sessionStorage.setItem(l,"foo"),window.sessionStorage.removeItem(l)}catch{In=!1}return In};var B1={name:"sessionStorage",lookup(l){let{lookupSessionStorage:s}=l;if(s&&jm())return window.sessionStorage.getItem(s)||void 0},cacheUserLanguage(l,s){let{lookupSessionStorage:r}=s;r&&jm()&&window.sessionStorage.setItem(r,l)}},q1={name:"navigator",lookup(l){const s=[];if(typeof navigator<"u"){const{languages:r,userLanguage:o,language:d}=navigator;if(r)for(let f=0;f<r.length;f++)s.push(r[f]);o&&s.push(o),d&&s.push(d)}return s.length>0?s:void 0}},G1={name:"htmlTag",lookup(l){let{htmlTag:s}=l,r;const o=s||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(r=o.getAttribute("lang")),r}},V1={name:"path",lookup(l){var d;let{lookupFromPathIndex:s}=l;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(d=r[typeof s=="number"?s:0])==null?void 0:d.replace("/",""):void 0}},Y1={name:"subdomain",lookup(l){var d,f;let{lookupFromSubdomainIndex:s}=l;const r=typeof s=="number"?s+1:1,o=typeof window<"u"&&((f=(d=window.location)==null?void 0:d.hostname)==null?void 0:f.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(o)return o[r]}};let wg=!1;try{document.cookie,wg=!0}catch{}const Sg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];wg||Sg.splice(1,1);const $1=()=>({order:Sg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:l=>l});class Ng{constructor(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(s,r)}init(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=s,this.options=z1(r,this.options||{},$1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=d=>d.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(L1),this.addDetector(_1),this.addDetector(H1),this.addDetector(B1),this.addDetector(q1),this.addDetector(G1),this.addDetector(V1),this.addDetector(Y1)}addDetector(s){return this.detectors[s.name]=s,this}detect(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return s.forEach(o=>{if(this.detectors[o]){let d=this.detectors[o].lookup(this.options);d&&typeof d=="string"&&(d=[d]),d&&(r=r.concat(d))}}),r=r.filter(o=>o!=null&&!D1(o)).map(o=>this.options.convertDetectedLanguage(o)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(s){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(s)>-1||r.forEach(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(s,this.options)}))}}Ng.type="languageDetector";const K1={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"},Q1={title:"About",versionInfo:"MCP Hub Version: {{version}}",newVersion:"New version available!",currentVersion:"Current version",newVersionAvailable:"New version {{version}} is available",viewOnGitHub:"View on GitHub",checkForUpdates:"Check for Updates",checking:"Checking for updates..."},X1={viewProfile:"View profile",userCenter:"User Center"},Z1={label:"Sponsor",title:"Support the Project",rewardAlt:"Reward QR Code",supportMessage:"Support the development of MCP Hub by buying me a coffee!",supportButton:"Support on Ko-fi"},P1={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},J1={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},F1={title:"Theme",light:"Light",dark:"Dark",system:"System"},W1={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"},I1={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",headers:"HTTP Headers",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"},e2={online:"Online",offline:"Offline",connecting:"Connecting"},t2={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",failedToUpdateSmartRoutingConfig:"Failed to update smart routing configuration"},a2={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"},n2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},l2={dashboard:{title:"Dashboard",totalServers:"Total",onlineServers:"Online",offlineServers:"Offline",connectingServers:"Connecting",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:"Security",installConfig:"Installation",smartRouting:"Smart Routing"},market:{title:"Server Market - (Data from mcpm.sh)"},logs:{title:"System Logs"}},s2={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"},r2={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"},i2={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"},o2={run:"Run",running:"Running...",runTool:"Run Tool",cancel:"Cancel",noDescription:"No description available",inputSchema:"Input Schema:",runToolWithName:"Run Tool: {{name}}",execution:"Tool Execution",successful:"Successful",failed:"Failed",result:"Result:",error:"Error",errorDetails:"Error Details:",noContent:"Tool executed successfully but returned no content.",unknownError:"Unknown error occurred",jsonResponse:"JSON Response:",toolResult:"Tool result",noParameters:"This tool does not require any parameters.",selectOption:"Select an option",enterValue:"Enter {{type}} value"},u2={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",enableBearerAuth:"Enable Bearer Authentication",enableBearerAuthDescription:"Require bearer token authentication for MCP requests",bearerAuthKey:"Bearer Authentication Key",bearerAuthKeyDescription:"The authentication key that will be required in the Bearer token",bearerAuthKeyPlaceholder:"Enter bearer authentication key",pythonIndexUrl:"Python Package Repository URL",pythonIndexUrlDescription:"Set UV_DEFAULT_INDEX environment variable for Python package installation",pythonIndexUrlPlaceholder:"e.g. https://pypi.org/simple",npmRegistry:"NPM Registry URL",npmRegistryDescription:"Set npm_config_registry environment variable for NPM package installation",npmRegistryPlaceholder:"e.g. https://registry.npmjs.org/",installConfig:"Installation",systemConfigUpdated:"System configuration updated successfully",enableSmartRouting:"Enable Smart Routing",enableSmartRoutingDescription:"Enable smart routing feature to search the most suitable tool based on input (using $smart group name)",dbUrl:"PostgreSQL URL (requires pgvector support)",dbUrlPlaceholder:"e.g. postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API Base URL",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API Key",openaiApiKeyPlaceholder:"Enter OpenAI API key",openaiApiEmbeddingModel:"OpenAI Embedding Model",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"Smart routing configuration updated successfully",smartRoutingRequiredFields:"Database URL and OpenAI API Key are required to enable smart routing",smartRoutingValidationError:"Please fill in the required fields before enabling Smart Routing: {{fields}}"},c2={app:K1,about:Q1,profile:X1,sponsor:Z1,wechat:P1,discord:J1,theme:F1,auth:W1,server:I1,status:e2,errors:t2,common:a2,nav:n2,pages:l2,logs:s2,groups:r2,market:i2,tool:o2,settings:u2},d2={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},f2={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},h2={viewProfile:"查看个人中心",userCenter:"个人中心"},m2={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCP Hub 的开发!",supportButton:"在 Ko-fi 上支持"},g2={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},p2={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},x2={title:"主题",light:"浅色",dark:"深色",system:"系统"},y2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},b2={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:"环境变量",headers:"HTTP 请求头",key:"键",value:"值",enabled:"已启用",enable:"启用",disable:"禁用",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情"},v2={online:"在线",offline:"离线",connecting:"连接中"},w2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败",failedToUpdateSmartRoutingConfig:"更新智能路由配置失败"},S2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭"},N2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},j2={dashboard:{title:"仪表盘",totalServers:"总数",onlineServers:"在线",offlineServers:"离线",connectingServers:"连接中",recentServers:"最近的服务器"},servers:{title:"服务器管理"},settings:{title:"设置",language:"语言",account:"账户设置",password:"修改密码",appearance:"外观",routeConfig:"安全配置",installConfig:"安装",smartRouting:"智能路由"},groups:{title:"分组管理"},market:{title:"服务器市场 - (数据来源于 mcpm.sh)"},logs:{title:"系统日志"}},E2={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},C2={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}} 台服务器"},k2={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:"每页显示"},A2={run:"运行",running:"运行中...",runTool:"运行工具",cancel:"取消",noDescription:"无描述信息",inputSchema:"输入模式:",runToolWithName:"运行工具:{{name}}",execution:"工具执行",successful:"成功",failed:"失败",result:"结果:",error:"错误",errorDetails:"错误详情:",noContent:"工具执行成功但未返回内容。",unknownError:"发生未知错误",jsonResponse:"JSON 响应:",toolResult:"工具结果",noParameters:"此工具不需要任何参数。",selectOption:"选择一个选项",enterValue:"输入{{type}}值"},T2={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",enableBearerAuth:"启用 Bearer 认证",enableBearerAuthDescription:"对 MCP 请求启用 Bearer 令牌认证",bearerAuthKey:"Bearer 认证密钥",bearerAuthKeyDescription:"Bearer 令牌中需要携带的认证密钥",bearerAuthKeyPlaceholder:"请输入 Bearer 认证密钥",pythonIndexUrl:"Python 包仓库地址",pythonIndexUrlDescription:"设置 UV_DEFAULT_INDEX 环境变量,用于 Python 包安装",pythonIndexUrlPlaceholder:"例如: https://mirrors.aliyun.com/pypi/simple",npmRegistry:"NPM 仓库地址",npmRegistryDescription:"设置 npm_config_registry 环境变量,用于 NPM 包安装",npmRegistryPlaceholder:"例如: https://registry.npmmirror.com/",installConfig:"安装配置",systemConfigUpdated:"系统配置更新成功",enableSmartRouting:"启用智能路由",enableSmartRoutingDescription:"开启智能路由功能,根据输入自动搜索最合适的工具(使用 $smart 分组)",dbUrl:"PostgreSQL 连接地址(必须支持 pgvector)",dbUrlPlaceholder:"例如: postgresql://user:password@localhost:5432/dbname",openaiApiBaseUrl:"OpenAI API 基础地址",openaiApiBaseUrlPlaceholder:"https://api.openai.com/v1",openaiApiKey:"OpenAI API 密钥",openaiApiKeyDescription:"用于访问 OpenAI API 的密钥",openaiApiKeyPlaceholder:"请输入 OpenAI API 密钥",openaiApiEmbeddingModel:"OpenAI 嵌入模型",openaiApiEmbeddingModelPlaceholder:"text-embedding-3-small",smartRoutingConfigUpdated:"智能路由配置更新成功",smartRoutingRequiredFields:"启用智能路由需要填写数据库连接地址和 OpenAI API 密钥",smartRoutingValidationError:"启用智能路由前请先填写必要字段:{{fields}}"},R2={app:d2,about:f2,profile:h2,sponsor:m2,wechat:g2,discord:p2,theme:x2,auth:y2,server:b2,status:v2,errors:w2,common:S2,nav:N2,pages:j2,logs:E2,groups:C2,market:k2,tool:A2,settings:T2};ot.use(Ng).use(gv).init({resources:{en:{translation:c2},zh:{translation:R2}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});async function O2(){try{console.log("Loading runtime configuration...");const l=await Ry();console.log("Runtime configuration loaded:",l),window.__MCPHUB_CONFIG__=l,Qh.createRoot(document.getElementById("root")).render(u.jsx(bu.StrictMode,{children:u.jsx(im,{})}))}catch(l){console.error("Failed to initialize app:",l),console.log("Starting app with default configuration..."),window.__MCPHUB_CONFIG__={basePath:"",version:"dev",name:"mcphub"},Qh.createRoot(document.getElementById("root")).render(u.jsx(bu.StrictMode,{children:u.jsx(im,{})}))}}O2();
168
- //# sourceMappingURL=index-3z3kqnGQ.js.map