@samanhappy/mcphub 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/controllers/configController.js +27 -0
- package/dist/controllers/configController.js.map +1 -1
- package/dist/controllers/dxtController.js +139 -0
- package/dist/controllers/dxtController.js.map +1 -0
- package/dist/controllers/groupController.js +1 -1
- package/dist/controllers/groupController.js.map +1 -1
- package/dist/controllers/serverController.js +9 -3
- package/dist/controllers/serverController.js.map +1 -1
- package/dist/middlewares/auth.js +28 -0
- package/dist/middlewares/auth.js.map +1 -1
- package/dist/models/User.js +5 -5
- package/dist/models/User.js.map +1 -1
- package/dist/routes/index.js +6 -1
- package/dist/routes/index.js.map +1 -1
- package/dist/services/logService.js +2 -1
- package/dist/services/logService.js.map +1 -1
- package/dist/services/mcpService.js +28 -0
- package/dist/services/mcpService.js.map +1 -1
- package/dist/services/vectorSearchService.js +1 -1
- package/dist/services/vectorSearchService.js.map +1 -1
- package/dist/utils/smartRouting.js +1 -1
- package/dist/utils/smartRouting.js.map +1 -1
- package/frontend/dist/assets/index-BS_54XZ9.js +186 -0
- package/frontend/dist/assets/index-BS_54XZ9.js.map +1 -0
- package/frontend/dist/assets/index-DVcFHJ6u.css +1 -0
- package/frontend/dist/index.html +2 -2
- package/package.json +13 -1
- package/frontend/dist/assets/index-BTlOGwgN.css +0 -1
- package/frontend/dist/assets/index-BmFb5olQ.js +0 -186
- package/frontend/dist/assets/index-BmFb5olQ.js.map +0 -1
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))c(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&c(h)}).observe(document,{childList:!0,subtree:!0});function r(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(f){if(f.ep)return;f.ep=!0;const d=r(f);fetch(f.href,d)}})();function Bh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ac={exports:{}},Nl={};/**
|
|
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 Zm;function F0(){if(Zm)return Nl;Zm=1;var s=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(c,f,d){var h=null;if(d!==void 0&&(h=""+d),f.key!==void 0&&(h=""+f.key),"key"in f){d={};for(var x in f)x!=="key"&&(d[x]=f[x])}else d=f;return f=d.ref,{$$typeof:s,type:c,key:h,ref:f!==void 0?f:null,props:d}}return Nl.Fragment=i,Nl.jsx=r,Nl.jsxs=r,Nl}var Fm;function J0(){return Fm||(Fm=1,Ac.exports=F0()),Ac.exports}var l=J0(),Rc={exports:{}},Ce={};/**
|
|
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 Jm;function I0(){if(Jm)return Ce;Jm=1;var s=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),j=Symbol.iterator;function v(N){return N===null||typeof N!="object"?null:(N=j&&N[j]||N["@@iterator"],typeof N=="function"?N:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(N,X,ne){this.props=N,this.context=X,this.refs=C,this.updater=ne||T}k.prototype.isReactComponent={},k.prototype.setState=function(N,X){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,X,"setState")},k.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function M(){}M.prototype=k.prototype;function A(N,X,ne){this.props=N,this.context=X,this.refs=C,this.updater=ne||T}var L=A.prototype=new M;L.constructor=A,S(L,k.prototype),L.isPureReactComponent=!0;var q=Array.isArray,$={H:null,A:null,T:null,S:null,V:null},ce=Object.prototype.hasOwnProperty;function P(N,X,ne,F,re,je){return ne=je.ref,{$$typeof:s,type:N,key:X,ref:ne!==void 0?ne:null,props:je}}function Y(N,X){return P(N.type,X,void 0,void 0,void 0,N.props)}function W(N){return typeof N=="object"&&N!==null&&N.$$typeof===s}function B(N){var X={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(ne){return X[ne]})}var V=/\/+/g;function ae(N,X){return typeof N=="object"&&N!==null&&N.key!=null?B(""+N.key):X.toString(36)}function se(){}function Z(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(se,se):(N.status="pending",N.then(function(X){N.status==="pending"&&(N.status="fulfilled",N.value=X)},function(X){N.status==="pending"&&(N.status="rejected",N.reason=X)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function U(N,X,ne,F,re){var je=typeof N;(je==="undefined"||je==="boolean")&&(N=null);var te=!1;if(N===null)te=!0;else switch(je){case"bigint":case"string":case"number":te=!0;break;case"object":switch(N.$$typeof){case s:case i:te=!0;break;case y:return te=N._init,U(te(N._payload),X,ne,F,re)}}if(te)return re=re(N),te=F===""?"."+ae(N,0):F,q(re)?(ne="",te!=null&&(ne=te.replace(V,"$&/")+"/"),U(re,X,ne,"",function(xe){return xe})):re!=null&&(W(re)&&(re=Y(re,ne+(re.key==null||N&&N.key===re.key?"":(""+re.key).replace(V,"$&/")+"/")+te)),X.push(re)),1;te=0;var le=F===""?".":F+":";if(q(N))for(var oe=0;oe<N.length;oe++)F=N[oe],je=le+ae(F,oe),te+=U(F,X,ne,je,re);else if(oe=v(N),typeof oe=="function")for(N=oe.call(N),oe=0;!(F=N.next()).done;)F=F.value,je=le+ae(F,oe++),te+=U(F,X,ne,je,re);else if(je==="object"){if(typeof N.then=="function")return U(Z(N),X,ne,F,re);throw X=String(N),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return te}function R(N,X,ne){if(N==null)return N;var F=[],re=0;return U(N,F,"","",function(je){return X.call(ne,je,re++)}),F}function Q(N){if(N._status===-1){var X=N._result;X=X(),X.then(function(ne){(N._status===0||N._status===-1)&&(N._status=1,N._result=ne)},function(ne){(N._status===0||N._status===-1)&&(N._status=2,N._result=ne)}),N._status===-1&&(N._status=0,N._result=X)}if(N._status===1)return N._result.default;throw N._result}var z=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)};function ue(){}return Ce.Children={map:R,forEach:function(N,X,ne){R(N,function(){X.apply(this,arguments)},ne)},count:function(N){var X=0;return R(N,function(){X++}),X},toArray:function(N){return R(N,function(X){return X})||[]},only:function(N){if(!W(N))throw Error("React.Children.only expected to receive a single React element child.");return N}},Ce.Component=k,Ce.Fragment=r,Ce.Profiler=f,Ce.PureComponent=A,Ce.StrictMode=c,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(N){return $.H.useMemoCache(N)}},Ce.cache=function(N){return function(){return N.apply(null,arguments)}},Ce.cloneElement=function(N,X,ne){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var F=S({},N.props),re=N.key,je=void 0;if(X!=null)for(te in X.ref!==void 0&&(je=void 0),X.key!==void 0&&(re=""+X.key),X)!ce.call(X,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&X.ref===void 0||(F[te]=X[te]);var te=arguments.length-2;if(te===1)F.children=ne;else if(1<te){for(var le=Array(te),oe=0;oe<te;oe++)le[oe]=arguments[oe+2];F.children=le}return P(N.type,re,void 0,void 0,je,F)},Ce.createContext=function(N){return N={$$typeof:h,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:d,_context:N},N},Ce.createElement=function(N,X,ne){var F,re={},je=null;if(X!=null)for(F in X.key!==void 0&&(je=""+X.key),X)ce.call(X,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(re[F]=X[F]);var te=arguments.length-2;if(te===1)re.children=ne;else if(1<te){for(var le=Array(te),oe=0;oe<te;oe++)le[oe]=arguments[oe+2];re.children=le}if(N&&N.defaultProps)for(F in te=N.defaultProps,te)re[F]===void 0&&(re[F]=te[F]);return P(N,je,void 0,void 0,null,re)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(N){return{$$typeof:x,render:N}},Ce.isValidElement=W,Ce.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:Q}},Ce.memo=function(N,X){return{$$typeof:m,type:N,compare:X===void 0?null:X}},Ce.startTransition=function(N){var X=$.T,ne={};$.T=ne;try{var F=N(),re=$.S;re!==null&&re(ne,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(ue,z)}catch(je){z(je)}finally{$.T=X}},Ce.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Ce.use=function(N){return $.H.use(N)},Ce.useActionState=function(N,X,ne){return $.H.useActionState(N,X,ne)},Ce.useCallback=function(N,X){return $.H.useCallback(N,X)},Ce.useContext=function(N){return $.H.useContext(N)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(N,X){return $.H.useDeferredValue(N,X)},Ce.useEffect=function(N,X,ne){var F=$.H;if(typeof ne=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return F.useEffect(N,X)},Ce.useId=function(){return $.H.useId()},Ce.useImperativeHandle=function(N,X,ne){return $.H.useImperativeHandle(N,X,ne)},Ce.useInsertionEffect=function(N,X){return $.H.useInsertionEffect(N,X)},Ce.useLayoutEffect=function(N,X){return $.H.useLayoutEffect(N,X)},Ce.useMemo=function(N,X){return $.H.useMemo(N,X)},Ce.useOptimistic=function(N,X){return $.H.useOptimistic(N,X)},Ce.useReducer=function(N,X,ne){return $.H.useReducer(N,X,ne)},Ce.useRef=function(N){return $.H.useRef(N)},Ce.useState=function(N){return $.H.useState(N)},Ce.useSyncExternalStore=function(N,X,ne){return $.H.useSyncExternalStore(N,X,ne)},Ce.useTransition=function(){return $.H.useTransition()},Ce.version="19.1.0",Ce}var Im;function Jc(){return Im||(Im=1,Rc.exports=I0()),Rc.exports}var w=Jc();const qc=Bh(w);var Oc={exports:{}},Cl={},Mc={exports:{}},zc={};/**
|
|
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 Wm;function W0(){return Wm||(Wm=1,function(s){function i(R,Q){var z=R.length;R.push(Q);e:for(;0<z;){var ue=z-1>>>1,N=R[ue];if(0<f(N,Q))R[ue]=Q,R[z]=N,z=ue;else break e}}function r(R){return R.length===0?null:R[0]}function c(R){if(R.length===0)return null;var Q=R[0],z=R.pop();if(z!==Q){R[0]=z;e:for(var ue=0,N=R.length,X=N>>>1;ue<X;){var ne=2*(ue+1)-1,F=R[ne],re=ne+1,je=R[re];if(0>f(F,z))re<N&&0>f(je,F)?(R[ue]=je,R[re]=z,ue=re):(R[ue]=F,R[ne]=z,ue=ne);else if(re<N&&0>f(je,z))R[ue]=je,R[re]=z,ue=re;else break e}}return Q}function f(R,Q){var z=R.sortIndex-Q.sortIndex;return z!==0?z:R.id-Q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;s.unstable_now=function(){return d.now()}}else{var h=Date,x=h.now();s.unstable_now=function(){return h.now()-x}}var g=[],m=[],y=1,j=null,v=3,T=!1,S=!1,C=!1,k=!1,M=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function q(R){for(var Q=r(m);Q!==null;){if(Q.callback===null)c(m);else if(Q.startTime<=R)c(m),Q.sortIndex=Q.expirationTime,i(g,Q);else break;Q=r(m)}}function $(R){if(C=!1,q(R),!S)if(r(g)!==null)S=!0,ce||(ce=!0,ae());else{var Q=r(m);Q!==null&&U($,Q.startTime-R)}}var ce=!1,P=-1,Y=5,W=-1;function B(){return k?!0:!(s.unstable_now()-W<Y)}function V(){if(k=!1,ce){var R=s.unstable_now();W=R;var Q=!0;try{e:{S=!1,C&&(C=!1,A(P),P=-1),T=!0;var z=v;try{t:{for(q(R),j=r(g);j!==null&&!(j.expirationTime>R&&B());){var ue=j.callback;if(typeof ue=="function"){j.callback=null,v=j.priorityLevel;var N=ue(j.expirationTime<=R);if(R=s.unstable_now(),typeof N=="function"){j.callback=N,q(R),Q=!0;break t}j===r(g)&&c(g),q(R)}else c(g);j=r(g)}if(j!==null)Q=!0;else{var X=r(m);X!==null&&U($,X.startTime-R),Q=!1}}break e}finally{j=null,v=z,T=!1}Q=void 0}}finally{Q?ae():ce=!1}}}var ae;if(typeof L=="function")ae=function(){L(V)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,Z=se.port2;se.port1.onmessage=V,ae=function(){Z.postMessage(null)}}else ae=function(){M(V,0)};function U(R,Q){P=M(function(){R(s.unstable_now())},Q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(R){R.callback=null},s.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<R?Math.floor(1e3/R):5},s.unstable_getCurrentPriorityLevel=function(){return v},s.unstable_next=function(R){switch(v){case 1:case 2:case 3:var Q=3;break;default:Q=v}var z=v;v=Q;try{return R()}finally{v=z}},s.unstable_requestPaint=function(){k=!0},s.unstable_runWithPriority=function(R,Q){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var z=v;v=R;try{return Q()}finally{v=z}},s.unstable_scheduleCallback=function(R,Q,z){var ue=s.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?ue+z:ue):z=ue,R){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=z+N,R={id:y++,callback:Q,priorityLevel:R,startTime:z,expirationTime:N,sortIndex:-1},z>ue?(R.sortIndex=z,i(m,R),r(g)===null&&R===r(m)&&(C?(A(P),P=-1):C=!0,U($,z-ue))):(R.sortIndex=N,i(g,R),S||T||(S=!0,ce||(ce=!0,ae()))),R},s.unstable_shouldYield=B,s.unstable_wrapCallback=function(R){var Q=v;return function(){var z=v;v=Q;try{return R.apply(this,arguments)}finally{v=z}}}}(zc)),zc}var eh;function ex(){return eh||(eh=1,Mc.exports=W0()),Mc.exports}var Dc={exports:{}},pt={};/**
|
|
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 th;function tx(){if(th)return pt;th=1;var s=Jc();function i(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var c={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(g,m,y){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:j==null?null:""+j,children:g,containerInfo:m,implementation:y}}var h=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,pt.createPortal=function(g,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return d(g,m,null,y)},pt.flushSync=function(g){var m=h.T,y=c.p;try{if(h.T=null,c.p=2,g)return g()}finally{h.T=m,c.p=y,c.d.f()}},pt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,c.d.C(g,m))},pt.prefetchDNS=function(g){typeof g=="string"&&c.d.D(g)},pt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var y=m.as,j=x(y,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,T=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?c.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:j,integrity:v,fetchPriority:T}):y==="script"&&c.d.X(g,{crossOrigin:j,integrity:v,fetchPriority:T,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},pt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=x(m.as,m.crossOrigin);c.d.M(g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&c.d.M(g)},pt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,j=x(y,m.crossOrigin);c.d.L(g,y,{crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},pt.preloadModule=function(g,m){if(typeof g=="string")if(m){var y=x(m.as,m.crossOrigin);c.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else c.d.m(g)},pt.requestFormReset=function(g){c.d.r(g)},pt.unstable_batchedUpdates=function(g,m){return g(m)},pt.useFormState=function(g,m,y){return h.H.useFormState(g,m,y)},pt.useFormStatus=function(){return h.H.useHostTransitionStatus()},pt.version="19.1.0",pt}var ah;function ax(){if(ah)return Dc.exports;ah=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),Dc.exports=tx(),Dc.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 nh;function nx(){if(nh)return Cl;nh=1;var s=ex(),i=Jc(),r=ax();function c(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 f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(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(d(e)!==e)throw Error(c(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(c(188));return t!==e?null:e}for(var a=e,n=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(n=o.return,n!==null){a=n;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return x(o),e;if(u===n)return x(o),t;u=u.sibling}throw Error(c(188))}if(a.return!==n.return)a=o,n=u;else{for(var p=!1,b=o.child;b;){if(b===a){p=!0,a=o,n=u;break}if(b===n){p=!0,n=o,a=u;break}b=b.sibling}if(!p){for(b=u.child;b;){if(b===a){p=!0,a=u,n=o;break}if(b===n){p=!0,n=u,a=o;break}b=b.sibling}if(!p)throw Error(c(189))}}if(a.alternate!==n)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,j=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),A=Symbol.for("react.consumer"),L=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function Z(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 S:return"Fragment";case k:return"Profiler";case C:return"StrictMode";case $:return"Suspense";case ce:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case L:return(e.displayName||"Context")+".Provider";case A:return(e._context.displayName||"Context")+".Consumer";case q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:Z(e.type)||"Memo";case Y:t=e._payload,e=e._init;try{return Z(e(t))}catch{}}return null}var U=Array.isArray,R=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z={pending:!1,data:null,method:null,action:null},ue=[],N=-1;function X(e){return{current:e}}function ne(e){0>N||(e.current=ue[N],ue[N]=null,N--)}function F(e,t){N++,ue[N]=e.current,e.current=t}var re=X(null),je=X(null),te=X(null),le=X(null);function oe(e,t){switch(F(te,t),F(je,e),F(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sm(t),e=Nm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ne(re),F(re,e)}function xe(){ne(re),ne(je),ne(te)}function ye(e){e.memoizedState!==null&&F(le,e);var t=re.current,a=Nm(t,e.type);t!==a&&(F(je,e),F(re,a))}function Me(e){je.current===e&&(ne(re),ne(je)),le.current===e&&(ne(le),bl._currentValue=z)}var Ve=Object.prototype.hasOwnProperty,Nt=s.unstable_scheduleCallback,Ct=s.unstable_cancelCallback,fa=s.unstable_shouldYield,Ie=s.unstable_requestPaint,Xe=s.unstable_now,sn=s.unstable_getCurrentPriorityLevel,Oa=s.unstable_ImmediatePriority,ln=s.unstable_UserBlockingPriority,Yt=s.unstable_NormalPriority,Hl=s.unstable_LowPriority,Ts=s.unstable_IdlePriority,Bl=s.log,ql=s.unstable_setDisableYieldValue,Ma=null,mt=null;function Xt(e){if(typeof Bl=="function"&&ql(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(Ma,e)}catch{}}var ht=Math.clz32?Math.clz32:$l,Vl=Math.log,Gl=Math.LN2;function $l(e){return e>>>=0,e===0?32:31-(Vl(e)/Gl|0)|0}var rn=256,on=4194304;function aa(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 cn(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var o=0,u=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~u,n!==0?o=aa(n):(p&=b,p!==0?o=aa(p):a||(a=b&~e,a!==0&&(o=aa(a))))):(b=n&~u,b!==0?o=aa(b):p!==0?o=aa(p):a||(a=n&~e,a!==0&&(o=aa(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function de(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ie(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 pe(){var e=rn;return rn<<=1,(rn&4194048)===0&&(rn=256),e}function Qt(){var e=on;return on<<=1,(on&62914560)===0&&(on=4194304),e}function Pt(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Zt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function un(e,t,a,n,o,u){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 J=31-ht(a),ee=1<<J;b[J]=0,E[J]=-1;var G=H[J];if(G!==null)for(H[J]=null,J=0;J<G.length;J++){var K=G[J];K!==null&&(K.lane&=-536870913)}a&=~ee}n!==0&&Kl(e,n,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(p&~t))}function Kl(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-ht(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function Et(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-ht(a),o=1<<n;o&t|e[n]&t&&(e[n]|=t),a&=~o}}function na(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 On(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function As(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:$m(e.type))}function Yl(e,t){var a=Q.p;try{return Q.p=e,t()}finally{Q.p=a}}var Ft=Math.random().toString(36).slice(2),tt="__reactFiber$"+Ft,yt="__reactProps$"+Ft,Mn="__reactContainer$"+Ft,vi="__reactEvents$"+Ft,qg="__reactListeners$"+Ft,Vg="__reactHandles$"+Ft,uu="__reactResources$"+Ft,Rs="__reactMarker$"+Ft;function wi(e){delete e[tt],delete e[yt],delete e[vi],delete e[qg],delete e[Vg]}function zn(e){var t=e[tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Mn]||a[tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Tm(e);e!==null;){if(a=e[tt])return a;e=Tm(e)}return t}e=a,a=e.parentNode}return null}function Dn(e){if(e=e[tt]||e[Mn]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Os(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(c(33))}function Un(e){var t=e[uu];return t||(t=e[uu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function rt(e){e[Rs]=!0}var du=new Set,fu={};function dn(e,t){Ln(e,t),Ln(e+"Capture",t)}function Ln(e,t){for(fu[e]=t,e=0;e<t.length;e++)du.add(t[e])}var Gg=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]*$"),mu={},hu={};function $g(e){return Ve.call(hu,e)?!0:Ve.call(mu,e)?!1:Gg.test(e)?hu[e]=!0:(mu[e]=!0,!1)}function Xl(e,t,a){if($g(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 Ql(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 ma(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 ji,gu;function _n(e){if(ji===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ji=t&&t[1]||"",gu=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ji+e+gu}var Si=!1;function Ni(e,t){if(!e||Si)return"";Si=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(K){var G=K}Reflect.construct(e,[],ee)}else{try{ee.call()}catch(K){G=K}e.call(ee.prototype)}}else{try{throw Error()}catch(K){G=K}(ee=e())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(K){if(K&&G&&typeof K.stack=="string")return[K.stack,G.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=n.DetermineComponentFrameRoot(),p=u[0],b=u[1];if(p&&b){var E=p.split(`
|
|
44
|
+
`),H=b.split(`
|
|
45
|
+
`);for(o=n=0;n<E.length&&!E[n].includes("DetermineComponentFrameRoot");)n++;for(;o<H.length&&!H[o].includes("DetermineComponentFrameRoot");)o++;if(n===E.length||o===H.length)for(n=E.length-1,o=H.length-1;1<=n&&0<=o&&E[n]!==H[o];)o--;for(;1<=n&&0<=o;n--,o--)if(E[n]!==H[o]){if(n!==1||o!==1)do if(n--,o--,0>o||E[n]!==H[o]){var J=`
|
|
46
|
+
`+E[n].replace(" at new "," at ");return e.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",e.displayName)),J}while(1<=n&&0<=o);break}}}finally{Si=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?_n(a):""}function Kg(e){switch(e.tag){case 26:case 27:case 5:return _n(e.type);case 16:return _n("Lazy");case 13:return _n("Suspense");case 19:return _n("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 _n("Activity");default:return""}}function pu(e){try{var t="";do t+=Kg(e),e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}function Dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yg(e){var t=xu(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 o=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){n=""+p,u.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 Pl(e){e._valueTracker||(e._valueTracker=Yg(e))}function yu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=xu(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Zl(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 Xg=/[\n"\\]/g;function Ut(e){return e.replace(Xg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ci(e,t,a,n,o,u,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=""+Dt(t)):e.value!==""+Dt(t)&&(e.value=""+Dt(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?Ei(e,p,Dt(t)):a!=null?Ei(e,p,Dt(a)):n!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Dt(b):e.removeAttribute("name")}function bu(e,t,a,n,o,u,p,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null))return;a=a!=null?""+Dt(a):"",t=t!=null?""+Dt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}n=n??o,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 Ei(e,t,a){t==="number"&&Zl(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hn(e,t,a,n){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Dt(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function vu(e,t,a){if(t!=null&&(t=""+Dt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Dt(a):""}function wu(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(c(92));if(U(n)){if(1<n.length)throw Error(c(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Dt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function Bn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Qg=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 ju(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||Qg.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Su(e,t,a){if(t!=null&&typeof t!="object")throw Error(c(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 o in t)n=t[o],t.hasOwnProperty(o)&&a[o]!==n&&ju(e,o,n)}else for(var u in t)t.hasOwnProperty(u)&&ju(e,u,t[u])}function ki(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 Pg=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"]]),Zg=/^[\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 Fl(e){return Zg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Ti=null;function Ai(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qn=null,Vn=null;function Nu(e){var t=Dn(e);if(t&&(e=t.stateNode)){var a=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ci(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="'+Ut(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var o=n[yt]||null;if(!o)throw Error(c(90));Ci(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&yu(n)}break e;case"textarea":vu(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Hn(e,!!a.multiple,t,!1)}}}var Ri=!1;function Cu(e,t,a){if(Ri)return e(t,a);Ri=!0;try{var n=e(t);return n}finally{if(Ri=!1,(qn!==null||Vn!==null)&&(Ur(),qn&&(t=qn,e=Vn,Vn=qn=null,Nu(t),e)))for(t=0;t<e.length;t++)Nu(e[t])}}function Ms(e,t){var a=e.stateNode;if(a===null)return null;var n=a[yt]||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(c(231,t,typeof a));return a}var ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oi=!1;if(ha)try{var zs={};Object.defineProperty(zs,"passive",{get:function(){Oi=!0}}),window.addEventListener("test",zs,zs),window.removeEventListener("test",zs,zs)}catch{Oi=!1}var za=null,Mi=null,Jl=null;function Eu(){if(Jl)return Jl;var e,t=Mi,a=t.length,n,o="value"in za?za.value:za.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var p=a-e;for(n=1;n<=p&&t[a-n]===o[u-n];n++);return Jl=o.slice(e,1<n?1-n:void 0)}function Il(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 Wl(){return!0}function ku(){return!1}function vt(e){function t(a,n,o,u,p){this._reactName=a,this._targetInst=o,this.type=n,this.nativeEvent=u,this.target=p,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Wl:ku,this.isPropagationStopped=ku,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=Wl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},er=vt(fn),Ds=y({},fn,{view:0,detail:0}),Fg=vt(Ds),zi,Di,Us,tr=y({},Ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Li,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!==Us&&(Us&&e.type==="mousemove"?(zi=e.screenX-Us.screenX,Di=e.screenY-Us.screenY):Di=zi=0,Us=e),zi)},movementY:function(e){return"movementY"in e?e.movementY:Di}}),Tu=vt(tr),Jg=y({},tr,{dataTransfer:0}),Ig=vt(Jg),Wg=y({},Ds,{relatedTarget:0}),Ui=vt(Wg),ep=y({},fn,{animationName:0,elapsedTime:0,pseudoElement:0}),tp=vt(ep),ap=y({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),np=vt(ap),sp=y({},fn,{data:0}),Au=vt(sp),lp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rp={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"},ip={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function op(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ip[e])?!!t[e]:!1}function Li(){return op}var cp=y({},Ds,{key:function(e){if(e.key){var t=lp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Il(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Li,charCode:function(e){return e.type==="keypress"?Il(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Il(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),up=vt(cp),dp=y({},tr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ru=vt(dp),fp=y({},Ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Li}),mp=vt(fp),hp=y({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0}),gp=vt(hp),pp=y({},tr,{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}),xp=vt(pp),yp=y({},fn,{newState:0,oldState:0}),bp=vt(yp),vp=[9,13,27,32],_i=ha&&"CompositionEvent"in window,Ls=null;ha&&"documentMode"in document&&(Ls=document.documentMode);var wp=ha&&"TextEvent"in window&&!Ls,Ou=ha&&(!_i||Ls&&8<Ls&&11>=Ls),Mu=" ",zu=!1;function Du(e,t){switch(e){case"keyup":return vp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gn=!1;function jp(e,t){switch(e){case"compositionend":return Uu(t);case"keypress":return t.which!==32?null:(zu=!0,Mu);case"textInput":return e=t.data,e===Mu&&zu?null:e;default:return null}}function Sp(e,t){if(Gn)return e==="compositionend"||!_i&&Du(e,t)?(e=Eu(),Jl=Mi=za=null,Gn=!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 Ou&&t.locale!=="ko"?null:t.data;default:return null}}var Np={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 Lu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Np[e.type]:t==="textarea"}function _u(e,t,a,n){qn?Vn?Vn.push(n):Vn=[n]:qn=n,t=Vr(t,"onChange"),0<t.length&&(a=new er("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var _s=null,Hs=null;function Cp(e){ym(e,0)}function ar(e){var t=Os(e);if(yu(t))return e}function Hu(e,t){if(e==="change")return t}var Bu=!1;if(ha){var Hi;if(ha){var Bi="oninput"in document;if(!Bi){var qu=document.createElement("div");qu.setAttribute("oninput","return;"),Bi=typeof qu.oninput=="function"}Hi=Bi}else Hi=!1;Bu=Hi&&(!document.documentMode||9<document.documentMode)}function Vu(){_s&&(_s.detachEvent("onpropertychange",Gu),Hs=_s=null)}function Gu(e){if(e.propertyName==="value"&&ar(Hs)){var t=[];_u(t,Hs,e,Ai(e)),Cu(Cp,t)}}function Ep(e,t,a){e==="focusin"?(Vu(),_s=t,Hs=a,_s.attachEvent("onpropertychange",Gu)):e==="focusout"&&Vu()}function kp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ar(Hs)}function Tp(e,t){if(e==="click")return ar(t)}function Ap(e,t){if(e==="input"||e==="change")return ar(t)}function Rp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:Rp;function Bs(e,t){if(kt(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 o=a[n];if(!Ve.call(t,o)||!kt(e[o],t[o]))return!1}return!0}function $u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ku(e,t){var a=$u(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=$u(a)}}function Yu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Zl(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=Zl(e.document)}return t}function qi(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 Op=ha&&"documentMode"in document&&11>=document.documentMode,$n=null,Vi=null,qs=null,Gi=!1;function Qu(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Gi||$n==null||$n!==Zl(n)||(n=$n,"selectionStart"in n&&qi(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}),qs&&Bs(qs,n)||(qs=n,n=Vr(Vi,"onSelect"),0<n.length&&(t=new er("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=$n)))}function mn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Kn={animationend:mn("Animation","AnimationEnd"),animationiteration:mn("Animation","AnimationIteration"),animationstart:mn("Animation","AnimationStart"),transitionrun:mn("Transition","TransitionRun"),transitionstart:mn("Transition","TransitionStart"),transitioncancel:mn("Transition","TransitionCancel"),transitionend:mn("Transition","TransitionEnd")},$i={},Pu={};ha&&(Pu=document.createElement("div").style,"AnimationEvent"in window||(delete Kn.animationend.animation,delete Kn.animationiteration.animation,delete Kn.animationstart.animation),"TransitionEvent"in window||delete Kn.transitionend.transition);function hn(e){if($i[e])return $i[e];if(!Kn[e])return e;var t=Kn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Pu)return $i[e]=t[a];return e}var Zu=hn("animationend"),Fu=hn("animationiteration"),Ju=hn("animationstart"),Mp=hn("transitionrun"),zp=hn("transitionstart"),Dp=hn("transitioncancel"),Iu=hn("transitionend"),Wu=new Map,Ki="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(" ");Ki.push("scrollEnd");function Jt(e,t){Wu.set(e,t),dn(t,[e])}var ed=new WeakMap;function Lt(e,t){if(typeof e=="object"&&e!==null){var a=ed.get(e);return a!==void 0?a:(t={value:e,source:t,stack:pu(t)},ed.set(e,t),t)}return{value:e,source:t,stack:pu(t)}}var _t=[],Yn=0,Yi=0;function nr(){for(var e=Yn,t=Yi=Yn=0;t<e;){var a=_t[t];_t[t++]=null;var n=_t[t];_t[t++]=null;var o=_t[t];_t[t++]=null;var u=_t[t];if(_t[t++]=null,n!==null&&o!==null){var p=n.pending;p===null?o.next=o:(o.next=p.next,p.next=o),n.pending=o}u!==0&&td(a,o,u)}}function sr(e,t,a,n){_t[Yn++]=e,_t[Yn++]=t,_t[Yn++]=a,_t[Yn++]=n,Yi|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Xi(e,t,a,n){return sr(e,t,a,n),lr(e)}function Xn(e,t){return sr(e,null,null,t),lr(e)}function td(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,n=u.alternate,n!==null&&(n.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-ht(a),e=u.hiddenUpdates,n=e[o],n===null?e[o]=[t]:n.push(t),t.lane=a|536870912),u):null}function lr(e){if(50<dl)throw dl=0,Wo=null,Error(c(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Qn={};function Up(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 Tt(e,t,a,n){return new Up(e,t,a,n)}function Qi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ga(e,t){var a=e.alternate;return a===null?(a=Tt(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 ad(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 rr(e,t,a,n,o,u){var p=0;if(n=e,typeof e=="function")Qi(e)&&(p=1);else if(typeof e=="string")p=_0(e,a,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=Tt(31,a,t,o),e.elementType=W,e.lanes=u,e;case S:return gn(a.children,o,u,t);case C:p=8,o|=24;break;case k:return e=Tt(12,a,t,o|2),e.elementType=k,e.lanes=u,e;case $:return e=Tt(13,a,t,o),e.elementType=$,e.lanes=u,e;case ce:return e=Tt(19,a,t,o),e.elementType=ce,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:case L:p=10;break e;case A:p=9;break e;case q:p=11;break e;case P:p=14;break e;case Y:p=16,n=null;break e}p=29,a=Error(c(130,e===null?"null":typeof e,"")),n=null}return t=Tt(p,a,t,o),t.elementType=e,t.type=n,t.lanes=u,t}function gn(e,t,a,n){return e=Tt(7,e,n,t),e.lanes=a,e}function Pi(e,t,a){return e=Tt(6,e,null,t),e.lanes=a,e}function Zi(e,t,a){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pn=[],Zn=0,ir=null,or=0,Ht=[],Bt=0,pn=null,pa=1,xa="";function xn(e,t){Pn[Zn++]=or,Pn[Zn++]=ir,ir=e,or=t}function nd(e,t,a){Ht[Bt++]=pa,Ht[Bt++]=xa,Ht[Bt++]=pn,pn=e;var n=pa;e=xa;var o=32-ht(n)-1;n&=~(1<<o),a+=1;var u=32-ht(t)+o;if(30<u){var p=o-o%5;u=(n&(1<<p)-1).toString(32),n>>=p,o-=p,pa=1<<32-ht(t)+o|a<<o|n,xa=u+e}else pa=1<<u|a<<o|n,xa=e}function Fi(e){e.return!==null&&(xn(e,1),nd(e,1,0))}function Ji(e){for(;e===ir;)ir=Pn[--Zn],Pn[Zn]=null,or=Pn[--Zn],Pn[Zn]=null;for(;e===pn;)pn=Ht[--Bt],Ht[Bt]=null,xa=Ht[--Bt],Ht[Bt]=null,pa=Ht[--Bt],Ht[Bt]=null}var bt=null,Pe=null,Ue=!1,yn=null,sa=!1,Ii=Error(c(519));function bn(e){var t=Error(c(418,""));throw $s(Lt(t,e)),Ii}function sd(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[tt]=e,t[yt]=n,a){case"dialog":Re("cancel",t),Re("close",t);break;case"iframe":case"object":case"embed":Re("load",t);break;case"video":case"audio":for(a=0;a<ml.length;a++)Re(ml[a],t);break;case"source":Re("error",t);break;case"img":case"image":case"link":Re("error",t),Re("load",t);break;case"details":Re("toggle",t);break;case"input":Re("invalid",t),bu(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Pl(t);break;case"select":Re("invalid",t);break;case"textarea":Re("invalid",t),wu(t,n.value,n.defaultValue,n.children),Pl(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||jm(t.textContent,a)?(n.popover!=null&&(Re("beforetoggle",t),Re("toggle",t)),n.onScroll!=null&&Re("scroll",t),n.onScrollEnd!=null&&Re("scrollend",t),n.onClick!=null&&(t.onclick=Gr),t=!0):t=!1,t||bn(e)}function ld(e){for(bt=e.return;bt;)switch(bt.tag){case 5:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:bt=bt.return}}function Vs(e){if(e!==bt)return!1;if(!Ue)return ld(e),Ue=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||gc(e.type,e.memoizedProps)),a=!a),a&&Pe&&bn(e),ld(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){Pe=Wt(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}Pe=null}}else t===27?(t=Pe,Za(e.type)?(e=bc,bc=null,Pe=e):Pe=t):Pe=bt?Wt(e.stateNode.nextSibling):null;return!0}function Gs(){Pe=bt=null,Ue=!1}function rd(){var e=yn;return e!==null&&(St===null?St=e:St.push.apply(St,e),yn=null),e}function $s(e){yn===null?yn=[e]:yn.push(e)}var Wi=X(null),vn=null,ya=null;function Da(e,t,a){F(Wi,t._currentValue),t._currentValue=a}function ba(e){e._currentValue=Wi.current,ne(Wi)}function eo(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 to(e,t,a,n){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var p=o.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=o;for(var E=0;E<t.length;E++)if(b.context===t[E]){u.lanes|=a,b=u.alternate,b!==null&&(b.lanes|=a),eo(u.return,a,e),n||(p=null);break e}u=b.next}}else if(o.tag===18){if(p=o.return,p===null)throw Error(c(341));p.lanes|=a,u=p.alternate,u!==null&&(u.lanes|=a),eo(p,a,e),p=null}else p=o.child;if(p!==null)p.return=o;else for(p=o;p!==null;){if(p===e){p=null;break}if(o=p.sibling,o!==null){o.return=p.return,p=o;break}p=p.return}o=p}}function Ks(e,t,a,n){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var p=o.alternate;if(p===null)throw Error(c(387));if(p=p.memoizedProps,p!==null){var b=o.type;kt(o.pendingProps.value,p.value)||(e!==null?e.push(b):e=[b])}}else if(o===le.current){if(p=o.alternate,p===null)throw Error(c(387));p.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(bl):e=[bl])}o=o.return}e!==null&&to(t,e,a,n),t.flags|=262144}function cr(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wn(e){vn=e,ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return id(vn,e)}function ur(e,t){return vn===null&&wn(e),id(e,t)}function id(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ya===null){if(e===null)throw Error(c(308));ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ya=ya.next=t;return a}var Lp=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()})}},_p=s.unstable_scheduleCallback,Hp=s.unstable_NormalPriority,at={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ao(){return{controller:new Lp,data:new Map,refCount:0}}function Ys(e){e.refCount--,e.refCount===0&&_p(Hp,function(){e.controller.abort()})}var Xs=null,no=0,Fn=0,Jn=null;function Bp(e,t){if(Xs===null){var a=Xs=[];no=0,Fn=rc(),Jn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return no++,t.then(od,od),t}function od(){if(--no===0&&Xs!==null){Jn!==null&&(Jn.status="fulfilled");var e=Xs;Xs=null,Fn=0,Jn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qp(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(n.status="rejected",n.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),n}var cd=R.S;R.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bp(e,t),cd!==null&&cd(e,t)};var jn=X(null);function so(){var e=jn.current;return e!==null?e:$e.pooledCache}function dr(e,t){t===null?F(jn,jn.current):F(jn,t.pool)}function ud(){var e=so();return e===null?null:{parent:at._currentValue,pool:e}}var Qs=Error(c(460)),dd=Error(c(474)),fr=Error(c(542)),lo={then:function(){}};function fd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mr(){}function md(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(mr,mr),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gd(e),e;default:if(typeof t.status=="string")t.then(mr,mr);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(c(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=n}},function(n){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,gd(e),e}throw Ps=t,Qs}}var Ps=null;function hd(){if(Ps===null)throw Error(c(459));var e=Ps;return Ps=null,e}function gd(e){if(e===Qs||e===fr)throw Error(c(483))}var Ua=!1;function ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function io(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 La(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _a(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Le&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,t=lr(e),td(e,null,a),t}return sr(e,n,t,a),lr(e)}function Zs(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,Et(e,a)}}function oo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=p:u=u.next=p,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:u,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 co=!1;function Fs(){if(co){var e=Jn;if(e!==null)throw e}}function Js(e,t,a,n){co=!1;var o=e.updateQueue;Ua=!1;var u=o.firstBaseUpdate,p=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var E=b,H=E.next;E.next=null,p===null?u=H:p.next=H,p=E;var J=e.alternate;J!==null&&(J=J.updateQueue,b=J.lastBaseUpdate,b!==p&&(b===null?J.firstBaseUpdate=H:b.next=H,J.lastBaseUpdate=E))}if(u!==null){var ee=o.baseState;p=0,J=H=E=null,b=u;do{var G=b.lane&-536870913,K=G!==b.lane;if(K?(ze&G)===G:(n&G)===G){G!==0&&G===Fn&&(co=!0),J!==null&&(J=J.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var we=e,be=b;G=t;var qe=a;switch(be.tag){case 1:if(we=be.payload,typeof we=="function"){ee=we.call(qe,ee,G);break e}ee=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=be.payload,G=typeof we=="function"?we.call(qe,ee,G):we,G==null)break e;ee=y({},ee,G);break e;case 2:Ua=!0}}G=b.callback,G!==null&&(e.flags|=64,K&&(e.flags|=8192),K=o.callbacks,K===null?o.callbacks=[G]:K.push(G))}else K={lane:G,tag:b.tag,payload:b.payload,callback:b.callback,next:null},J===null?(H=J=K,E=ee):J=J.next=K,p|=G;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;K=b,b=K.next,K.next=null,o.lastBaseUpdate=K,o.shared.pending=null}}while(!0);J===null&&(E=ee),o.baseState=E,o.firstBaseUpdate=H,o.lastBaseUpdate=J,u===null&&(o.shared.lanes=0),Ya|=p,e.lanes=p,e.memoizedState=ee}}function pd(e,t){if(typeof e!="function")throw Error(c(191,e));e.call(t)}function xd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)pd(a[e],t)}var In=X(null),hr=X(0);function yd(e,t){e=Ea,F(hr,e),F(In,t),Ea=e|t.baseLanes}function uo(){F(hr,Ea),F(In,In.current)}function fo(){Ea=hr.current,ne(In),ne(hr)}var Ha=0,Ee=null,He=null,We=null,gr=!1,Wn=!1,Sn=!1,pr=0,Is=0,es=null,Vp=0;function Fe(){throw Error(c(321))}function mo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!kt(e[a],t[a]))return!1;return!0}function ho(e,t,a,n,o,u){return Ha=u,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=e===null||e.memoizedState===null?tf:af,Sn=!1,u=a(n,o),Sn=!1,Wn&&(u=vd(t,a,n,o)),bd(e),u}function bd(e){R.H=jr;var t=He!==null&&He.next!==null;if(Ha=0,We=He=Ee=null,gr=!1,Is=0,es=null,t)throw Error(c(300));e===null||it||(e=e.dependencies,e!==null&&cr(e)&&(it=!0))}function vd(e,t,a,n){Ee=e;var o=0;do{if(Wn&&(es=null),Is=0,Wn=!1,25<=o)throw Error(c(301));if(o+=1,We=He=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}R.H=Pp,u=t(a,n)}while(Wn);return u}function Gp(){var e=R.H,t=e.useState()[0];return t=typeof t.then=="function"?Ws(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(Ee.flags|=1024),t}function go(){var e=pr!==0;return pr=0,e}function po(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function xo(e){if(gr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}gr=!1}Ha=0,We=He=Ee=null,Wn=!1,Is=pr=0,es=null}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?Ee.memoizedState=We=e:We=We.next=e,We}function et(){if(He===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=We===null?Ee.memoizedState:We.next;if(t!==null)We=t,He=e;else{if(e===null)throw Ee.alternate===null?Error(c(467)):Error(c(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},We===null?Ee.memoizedState=We=e:We=We.next=e}return We}function yo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ws(e){var t=Is;return Is+=1,es===null&&(es=[]),e=md(es,e,t),t=Ee,(We===null?t.memoizedState:We.next)===null&&(t=t.alternate,R.H=t===null||t.memoizedState===null?tf:af),e}function xr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ws(e);if(e.$$typeof===L)return gt(e)}throw Error(c(438,String(e)))}function bo(e){var t=null,a=Ee.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ee.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=yo(),Ee.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]=B;return t.index++,a}function va(e,t){return typeof t=="function"?t(e):t}function yr(e){var t=et();return vo(t,He,e)}function vo(e,t,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var o=e.baseQueue,u=n.pending;if(u!==null){if(o!==null){var p=o.next;o.next=u.next,u.next=p}t.baseQueue=o=u,n.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var b=p=null,E=null,H=t,J=!1;do{var ee=H.lane&-536870913;if(ee!==H.lane?(ze&ee)===ee:(Ha&ee)===ee){var G=H.revertLane;if(G===0)E!==null&&(E=E.next={lane:0,revertLane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),ee===Fn&&(J=!0);else if((Ha&G)===G){H=H.next,G===Fn&&(J=!0);continue}else ee={lane:0,revertLane:H.revertLane,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},E===null?(b=E=ee,p=u):E=E.next=ee,Ee.lanes|=G,Ya|=G;ee=H.action,Sn&&a(u,ee),u=H.hasEagerState?H.eagerState:a(u,ee)}else G={lane:ee,revertLane:H.revertLane,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},E===null?(b=E=G,p=u):E=E.next=G,Ee.lanes|=ee,Ya|=ee;H=H.next}while(H!==null&&H!==t);if(E===null?p=u:E.next=b,!kt(u,e.memoizedState)&&(it=!0,J&&(a=Jn,a!==null)))throw a;e.memoizedState=u,e.baseState=p,e.baseQueue=E,n.lastRenderedState=u}return o===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function wo(e){var t=et(),a=t.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var p=o=o.next;do u=e(u,p.action),p=p.next;while(p!==o);kt(u,t.memoizedState)||(it=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function wd(e,t,a){var n=Ee,o=et(),u=Ue;if(u){if(a===void 0)throw Error(c(407));a=a()}else a=t();var p=!kt((He||o).memoizedState,a);p&&(o.memoizedState=a,it=!0),o=o.queue;var b=Nd.bind(null,n,o,e);if(el(2048,8,b,[e]),o.getSnapshot!==t||p||We!==null&&We.memoizedState.tag&1){if(n.flags|=2048,ts(9,br(),Sd.bind(null,n,o,a,t),null),$e===null)throw Error(c(349));u||(Ha&124)!==0||jd(n,t,a)}return a}function jd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ee.updateQueue,t===null?(t=yo(),Ee.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Sd(e,t,a,n){t.value=a,t.getSnapshot=n,Cd(t)&&Ed(e)}function Nd(e,t,a){return a(function(){Cd(t)&&Ed(e)})}function Cd(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!kt(e,a)}catch{return!0}}function Ed(e){var t=Xn(e,2);t!==null&&zt(t,e,2)}function jo(e){var t=wt();if(typeof e=="function"){var a=e;if(e=a(),Sn){Xt(!0);try{a()}finally{Xt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t}function kd(e,t,a,n){return e.baseState=a,vo(e,He,typeof n=="function"?n:va)}function $p(e,t,a,n,o){if(wr(e))throw Error(c(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){u.listeners.push(p)}};R.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,Td(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Td(e,t){var a=t.action,n=t.payload,o=e.state;if(t.isTransition){var u=R.T,p={};R.T=p;try{var b=a(o,n),E=R.S;E!==null&&E(p,b),Ad(e,t,b)}catch(H){So(e,t,H)}finally{R.T=u}}else try{u=a(o,n),Ad(e,t,u)}catch(H){So(e,t,H)}}function Ad(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Rd(e,t,n)},function(n){return So(e,t,n)}):Rd(e,t,a)}function Rd(e,t,a){t.status="fulfilled",t.value=a,Od(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Td(e,a)))}function So(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Od(t),t=t.next;while(t!==n)}e.action=null}function Od(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Md(e,t){return t}function zd(e,t){if(Ue){var a=$e.formState;if(a!==null){e:{var n=Ee;if(Ue){if(Pe){t:{for(var o=Pe,u=sa;o.nodeType!==8;){if(!u){o=null;break t}if(o=Wt(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){Pe=Wt(o.nextSibling),n=o.data==="F!";break e}}bn(n)}n=!1}n&&(t=a[0])}}return a=wt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Md,lastRenderedState:t},a.queue=n,a=Id.bind(null,Ee,n),n.dispatch=a,n=jo(!1),u=To.bind(null,Ee,!1,n.queue),n=wt(),o={state:t,dispatch:null,action:e,pending:null},n.queue=o,a=$p.bind(null,Ee,o,u,a),o.dispatch=a,n.memoizedState=e,[t,a,!1]}function Dd(e){var t=et();return Ud(t,He,e)}function Ud(e,t,a){if(t=vo(e,t,Md)[0],e=yr(va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Ws(t)}catch(p){throw p===Qs?fr:p}else n=t;t=et();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(Ee.flags|=2048,ts(9,br(),Kp.bind(null,o,a),null)),[n,u,e]}function Kp(e,t){e.action=t}function Ld(e){var t=et(),a=He;if(a!==null)return Ud(t,a,e);et(),t=t.memoizedState,a=et();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function ts(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=yo(),Ee.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 br(){return{destroy:void 0,resource:void 0}}function _d(){return et().memoizedState}function vr(e,t,a,n){var o=wt();n=n===void 0?null:n,Ee.flags|=e,o.memoizedState=ts(1|t,br(),a,n)}function el(e,t,a,n){var o=et();n=n===void 0?null:n;var u=o.memoizedState.inst;He!==null&&n!==null&&mo(n,He.memoizedState.deps)?o.memoizedState=ts(t,u,a,n):(Ee.flags|=e,o.memoizedState=ts(1|t,u,a,n))}function Hd(e,t){vr(8390656,8,e,t)}function Bd(e,t){el(2048,8,e,t)}function qd(e,t){return el(4,2,e,t)}function Vd(e,t){return el(4,4,e,t)}function Gd(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 $d(e,t,a){a=a!=null?a.concat([e]):null,el(4,4,Gd.bind(null,t,e),a)}function No(){}function Kd(e,t){var a=et();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&mo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Yd(e,t){var a=et();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&mo(t,n[1]))return n[0];if(n=e(),Sn){Xt(!0);try{e()}finally{Xt(!1)}}return a.memoizedState=[n,t],n}function Co(e,t,a){return a===void 0||(Ha&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Zf(),Ee.lanes|=e,Ya|=e,a)}function Xd(e,t,a,n){return kt(a,t)?a:In.current!==null?(e=Co(e,a,n),kt(e,t)||(it=!0),e):(Ha&42)===0?(it=!0,e.memoizedState=a):(e=Zf(),Ee.lanes|=e,Ya|=e,t)}function Qd(e,t,a,n,o){var u=Q.p;Q.p=u!==0&&8>u?u:8;var p=R.T,b={};R.T=b,To(e,!1,t,a);try{var E=o(),H=R.S;if(H!==null&&H(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var J=qp(E,n);tl(e,t,J,Mt(e))}else tl(e,t,n,Mt(e))}catch(ee){tl(e,t,{then:function(){},status:"rejected",reason:ee},Mt())}finally{Q.p=u,R.T=p}}function Yp(){}function Eo(e,t,a,n){if(e.tag!==5)throw Error(c(476));var o=Pd(e).queue;Qd(e,o,t,z,a===null?Yp:function(){return Zd(e),a(n)})}function Pd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:z,baseState:z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:z},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zd(e){var t=Pd(e).next.queue;tl(e,t,{},Mt())}function ko(){return gt(bl)}function Fd(){return et().memoizedState}function Jd(){return et().memoizedState}function Xp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Mt();e=La(a);var n=_a(t,e,a);n!==null&&(zt(n,t,a),Zs(n,t,a)),t={cache:ao()},e.payload=t;return}t=t.return}}function Qp(e,t,a){var n=Mt();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},wr(e)?Wd(t,a):(a=Xi(e,t,a,n),a!==null&&(zt(a,e,n),ef(a,t,n)))}function Id(e,t,a){var n=Mt();tl(e,t,a,n)}function tl(e,t,a,n){var o={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(wr(e))Wd(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var p=t.lastRenderedState,b=u(p,a);if(o.hasEagerState=!0,o.eagerState=b,kt(b,p))return sr(e,t,o,0),$e===null&&nr(),!1}catch{}finally{}if(a=Xi(e,t,o,n),a!==null)return zt(a,e,n),ef(a,t,n),!0}return!1}function To(e,t,a,n){if(n={lane:2,revertLane:rc(),action:n,hasEagerState:!1,eagerState:null,next:null},wr(e)){if(t)throw Error(c(479))}else t=Xi(e,a,n,2),t!==null&&zt(t,e,2)}function wr(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Wd(e,t){Wn=gr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function ef(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Et(e,a)}}var jr={readContext:gt,use:xr,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe},tf={readContext:gt,use:xr,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Hd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,vr(4194308,4,Gd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return vr(4194308,4,e,t)},useInsertionEffect:function(e,t){vr(4,2,e,t)},useMemo:function(e,t){var a=wt();t=t===void 0?null:t;var n=e();if(Sn){Xt(!0);try{e()}finally{Xt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=wt();if(a!==void 0){var o=a(t);if(Sn){Xt(!0);try{a(t)}finally{Xt(!1)}}}else o=t;return n.memoizedState=n.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},n.queue=e,e=e.dispatch=Qp.bind(null,Ee,e),[n.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:function(e){e=jo(e);var t=e.queue,a=Id.bind(null,Ee,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:No,useDeferredValue:function(e,t){var a=wt();return Co(a,e,t)},useTransition:function(){var e=jo(!1);return e=Qd.bind(null,Ee,e.queue,!0,!1),wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ee,o=wt();if(Ue){if(a===void 0)throw Error(c(407));a=a()}else{if(a=t(),$e===null)throw Error(c(349));(ze&124)!==0||jd(n,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,Hd(Nd.bind(null,n,u,e),[e]),n.flags|=2048,ts(9,br(),Sd.bind(null,n,u,a,t),null),a},useId:function(){var e=wt(),t=$e.identifierPrefix;if(Ue){var a=xa,n=pa;a=(n&~(1<<32-ht(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=pr++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=Vp++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:ko,useFormState:zd,useActionState:zd,useOptimistic:function(e){var t=wt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=To.bind(null,Ee,!0,a),a.dispatch=t,[e,t]},useMemoCache:bo,useCacheRefresh:function(){return wt().memoizedState=Xp.bind(null,Ee)}},af={readContext:gt,use:xr,useCallback:Kd,useContext:gt,useEffect:Bd,useImperativeHandle:$d,useInsertionEffect:qd,useLayoutEffect:Vd,useMemo:Yd,useReducer:yr,useRef:_d,useState:function(){return yr(va)},useDebugValue:No,useDeferredValue:function(e,t){var a=et();return Xd(a,He.memoizedState,e,t)},useTransition:function(){var e=yr(va)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Ws(e),t]},useSyncExternalStore:wd,useId:Fd,useHostTransitionStatus:ko,useFormState:Dd,useActionState:Dd,useOptimistic:function(e,t){var a=et();return kd(a,He,e,t)},useMemoCache:bo,useCacheRefresh:Jd},Pp={readContext:gt,use:xr,useCallback:Kd,useContext:gt,useEffect:Bd,useImperativeHandle:$d,useInsertionEffect:qd,useLayoutEffect:Vd,useMemo:Yd,useReducer:wo,useRef:_d,useState:function(){return wo(va)},useDebugValue:No,useDeferredValue:function(e,t){var a=et();return He===null?Co(a,e,t):Xd(a,He.memoizedState,e,t)},useTransition:function(){var e=wo(va)[0],t=et().memoizedState;return[typeof e=="boolean"?e:Ws(e),t]},useSyncExternalStore:wd,useId:Fd,useHostTransitionStatus:ko,useFormState:Ld,useActionState:Ld,useOptimistic:function(e,t){var a=et();return He!==null?kd(a,He,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:bo,useCacheRefresh:Jd},as=null,al=0;function Sr(e){var t=al;return al+=1,as===null&&(as=[]),md(as,e,t)}function nl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Nr(e,t){throw t.$$typeof===j?Error(c(525)):(e=Object.prototype.toString.call(t),Error(c(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function nf(e){var t=e._init;return t(e._payload)}function sf(e){function t(D,O){if(e){var _=D.deletions;_===null?(D.deletions=[O],D.flags|=16):_.push(O)}}function a(D,O){if(!e)return null;for(;O!==null;)t(D,O),O=O.sibling;return null}function n(D){for(var O=new Map;D!==null;)D.key!==null?O.set(D.key,D):O.set(D.index,D),D=D.sibling;return O}function o(D,O){return D=ga(D,O),D.index=0,D.sibling=null,D}function u(D,O,_){return D.index=_,e?(_=D.alternate,_!==null?(_=_.index,_<O?(D.flags|=67108866,O):_):(D.flags|=67108866,O)):(D.flags|=1048576,O)}function p(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function b(D,O,_,I){return O===null||O.tag!==6?(O=Pi(_,D.mode,I),O.return=D,O):(O=o(O,_),O.return=D,O)}function E(D,O,_,I){var fe=_.type;return fe===S?J(D,O,_.props.children,I,_.key):O!==null&&(O.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Y&&nf(fe)===O.type)?(O=o(O,_.props),nl(O,_),O.return=D,O):(O=rr(_.type,_.key,_.props,null,D.mode,I),nl(O,_),O.return=D,O)}function H(D,O,_,I){return O===null||O.tag!==4||O.stateNode.containerInfo!==_.containerInfo||O.stateNode.implementation!==_.implementation?(O=Zi(_,D.mode,I),O.return=D,O):(O=o(O,_.children||[]),O.return=D,O)}function J(D,O,_,I,fe){return O===null||O.tag!==7?(O=gn(_,D.mode,I,fe),O.return=D,O):(O=o(O,_),O.return=D,O)}function ee(D,O,_){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Pi(""+O,D.mode,_),O.return=D,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case v:return _=rr(O.type,O.key,O.props,null,D.mode,_),nl(_,O),_.return=D,_;case T:return O=Zi(O,D.mode,_),O.return=D,O;case Y:var I=O._init;return O=I(O._payload),ee(D,O,_)}if(U(O)||ae(O))return O=gn(O,D.mode,_,null),O.return=D,O;if(typeof O.then=="function")return ee(D,Sr(O),_);if(O.$$typeof===L)return ee(D,ur(D,O),_);Nr(D,O)}return null}function G(D,O,_,I){var fe=O!==null?O.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return fe!==null?null:b(D,O,""+_,I);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case v:return _.key===fe?E(D,O,_,I):null;case T:return _.key===fe?H(D,O,_,I):null;case Y:return fe=_._init,_=fe(_._payload),G(D,O,_,I)}if(U(_)||ae(_))return fe!==null?null:J(D,O,_,I,null);if(typeof _.then=="function")return G(D,O,Sr(_),I);if(_.$$typeof===L)return G(D,O,ur(D,_),I);Nr(D,_)}return null}function K(D,O,_,I,fe){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return D=D.get(_)||null,b(O,D,""+I,fe);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case v:return D=D.get(I.key===null?_:I.key)||null,E(O,D,I,fe);case T:return D=D.get(I.key===null?_:I.key)||null,H(O,D,I,fe);case Y:var Te=I._init;return I=Te(I._payload),K(D,O,_,I,fe)}if(U(I)||ae(I))return D=D.get(_)||null,J(O,D,I,fe,null);if(typeof I.then=="function")return K(D,O,_,Sr(I),fe);if(I.$$typeof===L)return K(D,O,_,ur(O,I),fe);Nr(O,I)}return null}function we(D,O,_,I){for(var fe=null,Te=null,ge=O,ve=O=0,ct=null;ge!==null&&ve<_.length;ve++){ge.index>ve?(ct=ge,ge=null):ct=ge.sibling;var De=G(D,ge,_[ve],I);if(De===null){ge===null&&(ge=ct);break}e&&ge&&De.alternate===null&&t(D,ge),O=u(De,O,ve),Te===null?fe=De:Te.sibling=De,Te=De,ge=ct}if(ve===_.length)return a(D,ge),Ue&&xn(D,ve),fe;if(ge===null){for(;ve<_.length;ve++)ge=ee(D,_[ve],I),ge!==null&&(O=u(ge,O,ve),Te===null?fe=ge:Te.sibling=ge,Te=ge);return Ue&&xn(D,ve),fe}for(ge=n(ge);ve<_.length;ve++)ct=K(ge,D,ve,_[ve],I),ct!==null&&(e&&ct.alternate!==null&&ge.delete(ct.key===null?ve:ct.key),O=u(ct,O,ve),Te===null?fe=ct:Te.sibling=ct,Te=ct);return e&&ge.forEach(function(en){return t(D,en)}),Ue&&xn(D,ve),fe}function be(D,O,_,I){if(_==null)throw Error(c(151));for(var fe=null,Te=null,ge=O,ve=O=0,ct=null,De=_.next();ge!==null&&!De.done;ve++,De=_.next()){ge.index>ve?(ct=ge,ge=null):ct=ge.sibling;var en=G(D,ge,De.value,I);if(en===null){ge===null&&(ge=ct);break}e&&ge&&en.alternate===null&&t(D,ge),O=u(en,O,ve),Te===null?fe=en:Te.sibling=en,Te=en,ge=ct}if(De.done)return a(D,ge),Ue&&xn(D,ve),fe;if(ge===null){for(;!De.done;ve++,De=_.next())De=ee(D,De.value,I),De!==null&&(O=u(De,O,ve),Te===null?fe=De:Te.sibling=De,Te=De);return Ue&&xn(D,ve),fe}for(ge=n(ge);!De.done;ve++,De=_.next())De=K(ge,D,ve,De.value,I),De!==null&&(e&&De.alternate!==null&&ge.delete(De.key===null?ve:De.key),O=u(De,O,ve),Te===null?fe=De:Te.sibling=De,Te=De);return e&&ge.forEach(function(Z0){return t(D,Z0)}),Ue&&xn(D,ve),fe}function qe(D,O,_,I){if(typeof _=="object"&&_!==null&&_.type===S&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case v:e:{for(var fe=_.key;O!==null;){if(O.key===fe){if(fe=_.type,fe===S){if(O.tag===7){a(D,O.sibling),I=o(O,_.props.children),I.return=D,D=I;break e}}else if(O.elementType===fe||typeof fe=="object"&&fe!==null&&fe.$$typeof===Y&&nf(fe)===O.type){a(D,O.sibling),I=o(O,_.props),nl(I,_),I.return=D,D=I;break e}a(D,O);break}else t(D,O);O=O.sibling}_.type===S?(I=gn(_.props.children,D.mode,I,_.key),I.return=D,D=I):(I=rr(_.type,_.key,_.props,null,D.mode,I),nl(I,_),I.return=D,D=I)}return p(D);case T:e:{for(fe=_.key;O!==null;){if(O.key===fe)if(O.tag===4&&O.stateNode.containerInfo===_.containerInfo&&O.stateNode.implementation===_.implementation){a(D,O.sibling),I=o(O,_.children||[]),I.return=D,D=I;break e}else{a(D,O);break}else t(D,O);O=O.sibling}I=Zi(_,D.mode,I),I.return=D,D=I}return p(D);case Y:return fe=_._init,_=fe(_._payload),qe(D,O,_,I)}if(U(_))return we(D,O,_,I);if(ae(_)){if(fe=ae(_),typeof fe!="function")throw Error(c(150));return _=fe.call(_),be(D,O,_,I)}if(typeof _.then=="function")return qe(D,O,Sr(_),I);if(_.$$typeof===L)return qe(D,O,ur(D,_),I);Nr(D,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,O!==null&&O.tag===6?(a(D,O.sibling),I=o(O,_),I.return=D,D=I):(a(D,O),I=Pi(_,D.mode,I),I.return=D,D=I),p(D)):a(D,O)}return function(D,O,_,I){try{al=0;var fe=qe(D,O,_,I);return as=null,fe}catch(ge){if(ge===Qs||ge===fr)throw ge;var Te=Tt(29,ge,null,D.mode);return Te.lanes=I,Te.return=D,Te}finally{}}}var ns=sf(!0),lf=sf(!1),qt=X(null),la=null;function Ba(e){var t=e.alternate;F(nt,nt.current&1),F(qt,e),la===null&&(t===null||In.current!==null||t.memoizedState!==null)&&(la=e)}function rf(e){if(e.tag===22){if(F(nt,nt.current),F(qt,e),la===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(la=e)}}else qa()}function qa(){F(nt,nt.current),F(qt,qt.current)}function wa(e){ne(qt),la===e&&(la=null),ne(nt)}var nt=X(0);function Cr(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==="$?"||yc(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 Ao(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 Ro={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Mt(),o=La(n);o.payload=t,a!=null&&(o.callback=a),t=_a(e,o,n),t!==null&&(zt(t,e,n),Zs(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Mt(),o=La(n);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=_a(e,o,n),t!==null&&(zt(t,e,n),Zs(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Mt(),n=La(a);n.tag=2,t!=null&&(n.callback=t),t=_a(e,n,a),t!==null&&(zt(t,e,a),Zs(t,e,a))}};function of(e,t,a,n,o,u,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,p):t.prototype&&t.prototype.isPureReactComponent?!Bs(a,n)||!Bs(o,u):!0}function cf(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&&Ro.enqueueReplaceState(t,t.state,null)}function Nn(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 o in e)a[o]===void 0&&(a[o]=e[o])}return a}var Er=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 uf(e){Er(e)}function df(e){console.error(e)}function ff(e){Er(e)}function kr(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function mf(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Oo(e,t,a){return a=La(a),a.tag=3,a.payload={element:null},a.callback=function(){kr(e,t)},a}function hf(e){return e=La(e),e.tag=3,e}function gf(e,t,a,n){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=n.value;e.payload=function(){return o(u)},e.callback=function(){mf(t,a,n)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){mf(t,a,n),typeof o!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var b=n.stack;this.componentDidCatch(n.value,{componentStack:b!==null?b:""})})}function Zp(e,t,a,n,o){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Ks(t,a,o,!0),a=qt.current,a!==null){switch(a.tag){case 13:return la===null?tc():a.alternate===null&&Ze===0&&(Ze=3),a.flags&=-257,a.flags|=65536,a.lanes=o,n===lo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),nc(e,n,o)),!1;case 22:return a.flags|=65536,n===lo?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)),nc(e,n,o)),!1}throw Error(c(435,a.tag))}return nc(e,n,o),tc(),!1}if(Ue)return t=qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,n!==Ii&&(e=Error(c(422),{cause:n}),$s(Lt(e,a)))):(n!==Ii&&(t=Error(c(423),{cause:n}),$s(Lt(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,n=Lt(n,a),o=Oo(e.stateNode,n,o),oo(e,o),Ze!==4&&(Ze=2)),!1;var u=Error(c(520),{cause:n});if(u=Lt(u,a),ul===null?ul=[u]:ul.push(u),Ze!==4&&(Ze=2),t===null)return!0;n=Lt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Oo(a.stateNode,n,e),oo(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Xa===null||!Xa.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=hf(o),gf(o,e,a,n),oo(a,o),!1}a=a.return}while(a!==null);return!1}var pf=Error(c(461)),it=!1;function ut(e,t,a,n){t.child=e===null?lf(t,null,a,n):ns(t,e.child,a,n)}function xf(e,t,a,n,o){a=a.render;var u=t.ref;if("ref"in n){var p={};for(var b in n)b!=="ref"&&(p[b]=n[b])}else p=n;return wn(t),n=ho(e,t,a,p,u,o),b=go(),e!==null&&!it?(po(e,t,o),ja(e,t,o)):(Ue&&b&&Fi(t),t.flags|=1,ut(e,t,n,o),t.child)}function yf(e,t,a,n,o){if(e===null){var u=a.type;return typeof u=="function"&&!Qi(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,bf(e,t,u,n,o)):(e=rr(a.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Bo(e,o)){var p=u.memoizedProps;if(a=a.compare,a=a!==null?a:Bs,a(p,n)&&e.ref===t.ref)return ja(e,t,o)}return t.flags|=1,e=ga(u,n),e.ref=t.ref,e.return=t,t.child=e}function bf(e,t,a,n,o){if(e!==null){var u=e.memoizedProps;if(Bs(u,n)&&e.ref===t.ref)if(it=!1,t.pendingProps=n=u,Bo(e,o))(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,ja(e,t,o)}return Mo(e,t,a,n,o)}function vf(e,t,a){var n=t.pendingProps,o=n.children,u=e!==null?e.memoizedState:null;if(n.mode==="hidden"){if((t.flags&128)!==0){if(n=u!==null?u.baseLanes|a:a,e!==null){for(o=t.child=e.child,u=0;o!==null;)u=u|o.lanes|o.childLanes,o=o.sibling;t.childLanes=u&~n}else t.childLanes=0,t.child=null;return wf(e,t,n,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&dr(t,u!==null?u.cachePool:null),u!==null?yd(t,u):uo(),rf(t);else return t.lanes=t.childLanes=536870912,wf(e,t,u!==null?u.baseLanes|a:a,a)}else u!==null?(dr(t,u.cachePool),yd(t,u),qa(),t.memoizedState=null):(e!==null&&dr(t,null),uo(),qa());return ut(e,t,o,a),t.child}function wf(e,t,a,n){var o=so();return o=o===null?null:{parent:at._currentValue,pool:o},t.memoizedState={baseLanes:a,cachePool:o},e!==null&&dr(t,null),uo(),rf(t),e!==null&&Ks(e,t,n,!0),null}function Tr(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(c(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Mo(e,t,a,n,o){return wn(t),a=ho(e,t,a,n,void 0,o),n=go(),e!==null&&!it?(po(e,t,o),ja(e,t,o)):(Ue&&n&&Fi(t),t.flags|=1,ut(e,t,a,o),t.child)}function jf(e,t,a,n,o,u){return wn(t),t.updateQueue=null,a=vd(t,n,a,o),bd(e),n=go(),e!==null&&!it?(po(e,t,u),ja(e,t,u)):(Ue&&n&&Fi(t),t.flags|=1,ut(e,t,a,u),t.child)}function Sf(e,t,a,n,o){if(wn(t),t.stateNode===null){var u=Qn,p=a.contextType;typeof p=="object"&&p!==null&&(u=gt(p)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ro,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},ro(t),p=a.contextType,u.context=typeof p=="object"&&p!==null?gt(p):Qn,u.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(Ao(t,a,p,n),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(p=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),p!==u.state&&Ro.enqueueReplaceState(u,u.state,null),Js(t,n,u,o),Fs(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,E=Nn(a,b);u.props=E;var H=u.context,J=a.contextType;p=Qn,typeof J=="object"&&J!==null&&(p=gt(J));var ee=a.getDerivedStateFromProps;J=typeof ee=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,J||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||H!==p)&&cf(t,u,n,p),Ua=!1;var G=t.memoizedState;u.state=G,Js(t,n,u,o),Fs(),H=t.memoizedState,b||G!==H||Ua?(typeof ee=="function"&&(Ao(t,a,ee,n),H=t.memoizedState),(E=Ua||of(t,a,E,n,G,H,p))?(J||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=H),u.props=n,u.state=H,u.context=p,n=E):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,io(e,t),p=t.memoizedProps,J=Nn(a,p),u.props=J,ee=t.pendingProps,G=u.context,H=a.contextType,E=Qn,typeof H=="object"&&H!==null&&(E=gt(H)),b=a.getDerivedStateFromProps,(H=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(p!==ee||G!==E)&&cf(t,u,n,E),Ua=!1,G=t.memoizedState,u.state=G,Js(t,n,u,o),Fs();var K=t.memoizedState;p!==ee||G!==K||Ua||e!==null&&e.dependencies!==null&&cr(e.dependencies)?(typeof b=="function"&&(Ao(t,a,b,n),K=t.memoizedState),(J=Ua||of(t,a,J,n,G,K,E)||e!==null&&e.dependencies!==null&&cr(e.dependencies))?(H||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,K,E),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,K,E)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=K),u.props=n,u.state=K,u.context=E,n=J):(typeof u.componentDidUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),n=!1)}return u=n,Tr(e,t),n=(t.flags&128)!==0,u||n?(u=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&n?(t.child=ns(t,e.child,null,o),t.child=ns(t,null,a,o)):ut(e,t,a,o),t.memoizedState=u.state,e=t.child):e=ja(e,t,o),e}function Nf(e,t,a,n){return Gs(),t.flags|=256,ut(e,t,a,n),t.child}var zo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Do(e){return{baseLanes:e,cachePool:ud()}}function Uo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Vt),e}function Cf(e,t,a){var n=t.pendingProps,o=!1,u=(t.flags&128)!==0,p;if((p=u)||(p=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),p&&(o=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ue){if(o?Ba(t):qa(),Ue){var b=Pe,E;if(E=b){e:{for(E=b,b=sa;E.nodeType!==8;){if(!b){b=null;break e}if(E=Wt(E.nextSibling),E===null){b=null;break e}}b=E}b!==null?(t.memoizedState={dehydrated:b,treeContext:pn!==null?{id:pa,overflow:xa}:null,retryLane:536870912,hydrationErrors:null},E=Tt(18,null,null,0),E.stateNode=b,E.return=t,t.child=E,bt=t,Pe=null,E=!0):E=!1}E||bn(t)}if(b=t.memoizedState,b!==null&&(b=b.dehydrated,b!==null))return yc(b)?t.lanes=32:t.lanes=536870912,null;wa(t)}return b=n.children,n=n.fallback,o?(qa(),o=t.mode,b=Ar({mode:"hidden",children:b},o),n=gn(n,o,a,null),b.return=t,n.return=t,b.sibling=n,t.child=b,o=t.child,o.memoizedState=Do(a),o.childLanes=Uo(e,p,a),t.memoizedState=zo,n):(Ba(t),Lo(t,b))}if(E=e.memoizedState,E!==null&&(b=E.dehydrated,b!==null)){if(u)t.flags&256?(Ba(t),t.flags&=-257,t=_o(e,t,a)):t.memoizedState!==null?(qa(),t.child=e.child,t.flags|=128,t=null):(qa(),o=n.fallback,b=t.mode,n=Ar({mode:"visible",children:n.children},b),o=gn(o,b,a,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,ns(t,e.child,null,a),n=t.child,n.memoizedState=Do(a),n.childLanes=Uo(e,p,a),t.memoizedState=zo,t=o);else if(Ba(t),yc(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var H=p.dgst;p=H,n=Error(c(419)),n.stack="",n.digest=p,$s({value:n,source:null,stack:null}),t=_o(e,t,a)}else if(it||Ks(e,t,a,!1),p=(a&e.childLanes)!==0,it||p){if(p=$e,p!==null&&(n=a&-a,n=(n&42)!==0?1:na(n),n=(n&(p.suspendedLanes|a))!==0?0:n,n!==0&&n!==E.retryLane))throw E.retryLane=n,Xn(e,n),zt(p,e,n),pf;b.data==="$?"||tc(),t=_o(e,t,a)}else b.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Pe=Wt(b.nextSibling),bt=t,Ue=!0,yn=null,sa=!1,e!==null&&(Ht[Bt++]=pa,Ht[Bt++]=xa,Ht[Bt++]=pn,pa=e.id,xa=e.overflow,pn=t),t=Lo(t,n.children),t.flags|=4096);return t}return o?(qa(),o=n.fallback,b=t.mode,E=e.child,H=E.sibling,n=ga(E,{mode:"hidden",children:n.children}),n.subtreeFlags=E.subtreeFlags&65011712,H!==null?o=ga(H,o):(o=gn(o,b,a,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,b=e.child.memoizedState,b===null?b=Do(a):(E=b.cachePool,E!==null?(H=at._currentValue,E=E.parent!==H?{parent:H,pool:H}:E):E=ud(),b={baseLanes:b.baseLanes|a,cachePool:E}),o.memoizedState=b,o.childLanes=Uo(e,p,a),t.memoizedState=zo,n):(Ba(t),a=e.child,e=a.sibling,a=ga(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 Lo(e,t){return t=Ar({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ar(e,t){return e=Tt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function _o(e,t,a){return ns(t,e.child,null,a),e=Lo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ef(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),eo(e.return,t,a)}function Ho(e,t,a,n,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=n,u.tail=a,u.tailMode=o)}function kf(e,t,a){var n=t.pendingProps,o=n.revealOrder,u=n.tail;if(ut(e,t,n.children,a),n=nt.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&&Ef(e,a,t);else if(e.tag===19)Ef(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(F(nt,n),o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Cr(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),Ho(t,!1,o,a,u);break;case"backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Cr(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Ho(t,!0,a,null,u);break;case"together":Ho(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ja(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ya|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ks(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(c(153));if(t.child!==null){for(e=t.child,a=ga(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ga(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Bo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&cr(e)))}function Fp(e,t,a){switch(t.tag){case 3:oe(t,t.stateNode.containerInfo),Da(t,at,e.memoizedState.cache),Gs();break;case 27:case 5:ye(t);break;case 4:oe(t,t.stateNode.containerInfo);break;case 10:Da(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Ba(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Cf(e,t,a):(Ba(t),e=ja(e,t,a),e!==null?e.sibling:null);Ba(t);break;case 19:var o=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Ks(e,t,a,!1),n=(a&t.childLanes)!==0),o){if(n)return kf(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),F(nt,nt.current),n)break;return null;case 22:case 23:return t.lanes=0,vf(e,t,a);case 24:Da(t,at,e.memoizedState.cache)}return ja(e,t,a)}function Tf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)it=!0;else{if(!Bo(e,a)&&(t.flags&128)===0)return it=!1,Fp(e,t,a);it=(e.flags&131072)!==0}else it=!1,Ue&&(t.flags&1048576)!==0&&nd(t,or,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,o=n._init;if(n=o(n._payload),t.type=n,typeof n=="function")Qi(n)?(e=Nn(n,e),t.tag=1,t=Sf(null,t,n,e,a)):(t.tag=0,t=Mo(null,t,n,e,a));else{if(n!=null){if(o=n.$$typeof,o===q){t.tag=11,t=xf(null,t,n,e,a);break e}else if(o===P){t.tag=14,t=yf(null,t,n,e,a);break e}}throw t=Z(n)||n,Error(c(306,t,""))}}return t;case 0:return Mo(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,o=Nn(n,t.pendingProps),Sf(e,t,n,o,a);case 3:e:{if(oe(t,t.stateNode.containerInfo),e===null)throw Error(c(387));n=t.pendingProps;var u=t.memoizedState;o=u.element,io(e,t),Js(t,n,null,a);var p=t.memoizedState;if(n=p.cache,Da(t,at,n),n!==u.cache&&to(t,[at],a,!0),Fs(),n=p.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Nf(e,t,n,a);break e}else if(n!==o){o=Lt(Error(c(424)),t),$s(o),t=Nf(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(Pe=Wt(e.firstChild),bt=t,Ue=!0,yn=null,sa=!0,a=lf(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Gs(),n===o){t=ja(e,t,a);break e}ut(e,t,n,a)}t=t.child}return t;case 26:return Tr(e,t),e===null?(a=Mm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ue||(a=t.type,e=t.pendingProps,n=$r(te.current).createElement(a),n[tt]=t,n[yt]=e,ft(n,a,e),rt(n),t.stateNode=n):t.memoizedState=Mm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&Ue&&(n=t.stateNode=Am(t.type,t.pendingProps,te.current),bt=t,sa=!0,o=Pe,Za(t.type)?(bc=o,Pe=Wt(n.firstChild)):Pe=o),ut(e,t,t.pendingProps.children,a),Tr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ue&&((o=n=Pe)&&(n=N0(n,t.type,t.pendingProps,sa),n!==null?(t.stateNode=n,bt=t,Pe=Wt(n.firstChild),sa=!1,o=!0):o=!1),o||bn(t)),ye(t),o=t.type,u=t.pendingProps,p=e!==null?e.memoizedProps:null,n=u.children,gc(o,u)?n=null:p!==null&&gc(o,p)&&(t.flags|=32),t.memoizedState!==null&&(o=ho(e,t,Gp,null,null,a),bl._currentValue=o),Tr(e,t),ut(e,t,n,a),t.child;case 6:return e===null&&Ue&&((e=a=Pe)&&(a=C0(a,t.pendingProps,sa),a!==null?(t.stateNode=a,bt=t,Pe=null,e=!0):e=!1),e||bn(t)),null;case 13:return Cf(e,t,a);case 4:return oe(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ns(t,null,n,a):ut(e,t,n,a),t.child;case 11:return xf(e,t,t.type,t.pendingProps,a);case 7:return ut(e,t,t.pendingProps,a),t.child;case 8:return ut(e,t,t.pendingProps.children,a),t.child;case 12:return ut(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Da(t,t.type,n.value),ut(e,t,n.children,a),t.child;case 9:return o=t.type._context,n=t.pendingProps.children,wn(t),o=gt(o),n=n(o),t.flags|=1,ut(e,t,n,a),t.child;case 14:return yf(e,t,t.type,t.pendingProps,a);case 15:return bf(e,t,t.type,t.pendingProps,a);case 19:return kf(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=Ar(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=ga(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return vf(e,t,a);case 24:return wn(t),n=gt(at),e===null?(o=so(),o===null&&(o=$e,u=ao(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:n,cache:o},ro(t),Da(t,at,o)):((e.lanes&a)!==0&&(io(e,t),Js(t,null,null,a),Fs()),o=e.memoizedState,u=t.memoizedState,o.parent!==n?(o={parent:n,cache:n},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Da(t,at,n)):(n=u.cache,Da(t,at,n),n!==o.cache&&to(t,[at],a,!0))),ut(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(c(156,t.tag))}function Sa(e){e.flags|=4}function Af(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_m(t)){if(t=qt.current,t!==null&&((ze&4194048)===ze?la!==null:(ze&62914560)!==ze&&(ze&536870912)===0||t!==la))throw Ps=lo,dd;e.flags|=8192}}function Rr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Qt():536870912,e.lanes|=t,is|=t)}function sl(e,t){if(!Ue)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 o=e.child;o!==null;)a|=o.lanes|o.childLanes,n|=o.subtreeFlags&65011712,n|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Jp(e,t,a){var n=t.pendingProps;switch(Ji(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),ba(at),xe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Vs(t)?Sa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rd())),Qe(t),null;case 26:return a=t.memoizedState,e===null?(Sa(t),a!==null?(Qe(t),Af(t,a)):(Qe(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Sa(t),Qe(t),Af(t,a)):(Qe(t),t.flags&=-16777217):(e.memoizedProps!==n&&Sa(t),Qe(t),t.flags&=-16777217),null;case 27:Me(t),a=te.current;var o=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Sa(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return Qe(t),null}e=re.current,Vs(t)?sd(t):(e=Am(o,n,a),t.stateNode=e,Sa(t))}return Qe(t),null;case 5:if(Me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Sa(t);else{if(!n){if(t.stateNode===null)throw Error(c(166));return Qe(t),null}if(e=re.current,Vs(t))sd(t);else{switch(o=$r(te.current),e){case 1:e=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?o.createElement("select",{is:n.is}):o.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?o.createElement(a,{is:n.is}):o.createElement(a)}}e[tt]=t,e[yt]=n;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=e;e:switch(ft(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&&Sa(t)}}return Qe(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Sa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(c(166));if(e=te.current,Vs(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,o=bt,o!==null)switch(o.tag){case 27:case 5:n=o.memoizedProps}e[tt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||jm(e.nodeValue,a)),e||bn(t)}else e=$r(e).createTextNode(n),e[tt]=t,t.stateNode=e}return Qe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Vs(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(c(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(c(317));o[tt]=t}else Gs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Qe(t),o=!1}else o=rd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(wa(t),t):(wa(t),null)}if(wa(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,o=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(o=n.alternate.memoizedState.cachePool.pool);var u=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==o&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Rr(t,t.updateQueue),Qe(t),null;case 4:return xe(),e===null&&uc(t.stateNode.containerInfo),Qe(t),null;case 10:return ba(t.type),Qe(t),null;case 19:if(ne(nt),o=t.memoizedState,o===null)return Qe(t),null;if(n=(t.flags&128)!==0,u=o.rendering,u===null)if(n)sl(o,!1);else{if(Ze!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Cr(e),u!==null){for(t.flags|=128,sl(o,!1),e=u.updateQueue,t.updateQueue=e,Rr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ad(a,e),a=a.sibling;return F(nt,nt.current&1|2),t.child}e=e.sibling}o.tail!==null&&Xe()>zr&&(t.flags|=128,n=!0,sl(o,!1),t.lanes=4194304)}else{if(!n)if(e=Cr(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Rr(t,e),sl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!Ue)return Qe(t),null}else 2*Xe()-o.renderingStartTime>zr&&a!==536870912&&(t.flags|=128,n=!0,sl(o,!1),t.lanes=4194304);o.isBackwards?(u.sibling=t.child,t.child=u):(e=o.last,e!==null?e.sibling=u:t.child=u,o.last=u)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xe(),t.sibling=null,e=nt.current,F(nt,n?e&1|2:e&1),t):(Qe(t),null);case 22:case 23:return wa(t),fo(),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&&ne(jn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ba(at),Qe(t),null;case 25:return null;case 30:return null}throw Error(c(156,t.tag))}function Ip(e,t){switch(Ji(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ba(at),xe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 13:if(wa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(c(340));Gs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(nt),null;case 4:return xe(),null;case 10:return ba(t.type),null;case 22:case 23:return wa(t),fo(),e!==null&&ne(jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ba(at),null;case 25:return null;default:return null}}function Rf(e,t){switch(Ji(t),t.tag){case 3:ba(at),xe();break;case 26:case 27:case 5:Me(t);break;case 4:xe();break;case 13:wa(t);break;case 19:ne(nt);break;case 10:ba(t.type);break;case 22:case 23:wa(t),fo(),e!==null&&ne(jn);break;case 24:ba(at)}}function ll(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var o=n.next;a=o;do{if((a.tag&e)===e){n=void 0;var u=a.create,p=a.inst;n=u(),p.destroy=n}a=a.next}while(a!==o)}}catch(b){Ge(t,t.return,b)}}function Va(e,t,a){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var u=o.next;n=u;do{if((n.tag&e)===e){var p=n.inst,b=p.destroy;if(b!==void 0){p.destroy=void 0,o=t;var E=a,H=b;try{H()}catch(J){Ge(o,E,J)}}}n=n.next}while(n!==u)}}catch(J){Ge(t,t.return,J)}}function Of(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{xd(t,a)}catch(n){Ge(e,e.return,n)}}}function Mf(e,t,a){a.props=Nn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ge(e,t,n)}}function rl(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(o){Ge(e,t,o)}}function ra(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(o){Ge(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Ge(e,t,o)}else a.current=null}function zf(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(o){Ge(e,e.return,o)}}function qo(e,t,a){try{var n=e.stateNode;b0(n,e.type,a,t),n[yt]=t}catch(o){Ge(e,e.return,o)}}function Df(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Za(e.type)||e.tag===4}function Vo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Df(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&&Za(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 Go(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=Gr));else if(n!==4&&(n===27&&Za(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Go(e,t,a),e=e.sibling;e!==null;)Go(e,t,a),e=e.sibling}function Or(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&&Za(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Or(e,t,a),e=e.sibling;e!==null;)Or(e,t,a),e=e.sibling}function Uf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);ft(t,n,a),t[tt]=e,t[yt]=a}catch(u){Ge(e,e.return,u)}}var Na=!1,Je=!1,$o=!1,Lf=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Wp(e,t){if(e=e.containerInfo,mc=Zr,e=Xu(e),qi(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 o=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var p=0,b=-1,E=-1,H=0,J=0,ee=e,G=null;t:for(;;){for(var K;ee!==a||o!==0&&ee.nodeType!==3||(b=p+o),ee!==u||n!==0&&ee.nodeType!==3||(E=p+n),ee.nodeType===3&&(p+=ee.nodeValue.length),(K=ee.firstChild)!==null;)G=ee,ee=K;for(;;){if(ee===e)break t;if(G===a&&++H===o&&(b=p),G===u&&++J===n&&(E=p),(K=ee.nextSibling)!==null)break;ee=G,G=ee.parentNode}ee=K}a=b===-1||E===-1?null:{start:b,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(hc={focusedElem:e,selectionRange:a},Zr=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){switch(t=ot,u=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var we=Nn(a.type,o,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(we,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(be){Ge(a,a.return,be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)xc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":xc(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(c(163))}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}}function _f(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ga(e,a),n&4&&ll(5,a);break;case 1:if(Ga(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){Ge(a,a.return,p)}else{var o=Nn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){Ge(a,a.return,p)}}n&64&&Of(a),n&512&&rl(a,a.return);break;case 3:if(Ga(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{xd(e,t)}catch(p){Ge(a,a.return,p)}}break;case 27:t===null&&n&4&&Uf(a);case 26:case 5:Ga(e,a),t===null&&n&4&&zf(a),n&512&&rl(a,a.return);break;case 12:Ga(e,a);break;case 13:Ga(e,a),n&4&&qf(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=o0.bind(null,a),E0(e,a))));break;case 22:if(n=a.memoizedState!==null||Na,!n){t=t!==null&&t.memoizedState!==null||Je,o=Na;var u=Je;Na=n,(Je=t)&&!u?$a(e,a,(a.subtreeFlags&8772)!==0):Ga(e,a),Na=o,Je=u}break;case 30:break;default:Ga(e,a)}}function Hf(e){var t=e.alternate;t!==null&&(e.alternate=null,Hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wi(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 Ke=null,jt=!1;function Ca(e,t,a){for(a=a.child;a!==null;)Bf(e,t,a),a=a.sibling}function Bf(e,t,a){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(Ma,a)}catch{}switch(a.tag){case 26:Je||ra(a,t),Ca(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Je||ra(a,t);var n=Ke,o=jt;Za(a.type)&&(Ke=a.stateNode,jt=!1),Ca(e,t,a),gl(a.stateNode),Ke=n,jt=o;break;case 5:Je||ra(a,t);case 6:if(n=Ke,o=jt,Ke=null,Ca(e,t,a),Ke=n,jt=o,Ke!==null)if(jt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(a.stateNode)}catch(u){Ge(a,t,u)}else try{Ke.removeChild(a.stateNode)}catch(u){Ge(a,t,u)}break;case 18:Ke!==null&&(jt?(e=Ke,km(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Sl(e)):km(Ke,a.stateNode));break;case 4:n=Ke,o=jt,Ke=a.stateNode.containerInfo,jt=!0,Ca(e,t,a),Ke=n,jt=o;break;case 0:case 11:case 14:case 15:Je||Va(2,a,t),Je||Va(4,a,t),Ca(e,t,a);break;case 1:Je||(ra(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Mf(a,t,n)),Ca(e,t,a);break;case 21:Ca(e,t,a);break;case 22:Je=(n=Je)||a.memoizedState!==null,Ca(e,t,a),Je=n;break;default:Ca(e,t,a)}}function qf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Sl(e)}catch(a){Ge(t,t.return,a)}}function e0(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lf),t;default:throw Error(c(435,e.tag))}}function Ko(e,t){var a=e0(e);t.forEach(function(n){var o=c0.bind(null,e,n);a.has(n)||(a.add(n),n.then(o,o))})}function At(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var o=a[n],u=e,p=t,b=p;e:for(;b!==null;){switch(b.tag){case 27:if(Za(b.type)){Ke=b.stateNode,jt=!1;break e}break;case 5:Ke=b.stateNode,jt=!1;break e;case 3:case 4:Ke=b.stateNode.containerInfo,jt=!0;break e}b=b.return}if(Ke===null)throw Error(c(160));Bf(u,p,o),Ke=null,jt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Vf(t,e),t=t.sibling}var It=null;function Vf(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:At(t,e),Rt(e),n&4&&(Va(3,e,e.return),ll(3,e),Va(5,e,e.return));break;case 1:At(t,e),Rt(e),n&512&&(Je||a===null||ra(a,a.return)),n&64&&Na&&(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 o=It;if(At(t,e),Rt(e),n&512&&(Je||a===null||ra(a,a.return)),n&4){var u=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,o=o.ownerDocument||o;t:switch(n){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Rs]||u[tt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(n),o.head.insertBefore(u,o.querySelector("head > title"))),ft(u,n,a),u[tt]=e,rt(u),n=u;break e;case"link":var p=Um("link","href",o).get(n+(a.href||""));if(p){for(var b=0;b<p.length;b++)if(u=p[b],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(b,1);break t}}u=o.createElement(n),ft(u,n,a),o.head.appendChild(u);break;case"meta":if(p=Um("meta","content",o).get(n+(a.content||""))){for(b=0;b<p.length;b++)if(u=p[b],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(b,1);break t}}u=o.createElement(n),ft(u,n,a),o.head.appendChild(u);break;default:throw Error(c(468,n))}u[tt]=e,rt(u),n=u}e.stateNode=n}else Lm(o,e.type,e.stateNode);else e.stateNode=Dm(o,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?Lm(o,e.type,e.stateNode):Dm(o,n,e.memoizedProps)):n===null&&e.stateNode!==null&&qo(e,e.memoizedProps,a.memoizedProps)}break;case 27:At(t,e),Rt(e),n&512&&(Je||a===null||ra(a,a.return)),a!==null&&n&4&&qo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(At(t,e),Rt(e),n&512&&(Je||a===null||ra(a,a.return)),e.flags&32){o=e.stateNode;try{Bn(o,"")}catch(K){Ge(e,e.return,K)}}n&4&&e.stateNode!=null&&(o=e.memoizedProps,qo(e,o,a!==null?a.memoizedProps:o)),n&1024&&($o=!0);break;case 6:if(At(t,e),Rt(e),n&4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(K){Ge(e,e.return,K)}}break;case 3:if(Xr=null,o=It,It=Kr(t.containerInfo),At(t,e),It=o,Rt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Sl(t.containerInfo)}catch(K){Ge(e,e.return,K)}$o&&($o=!1,Gf(e));break;case 4:n=It,It=Kr(e.stateNode.containerInfo),At(t,e),Rt(e),It=n;break;case 12:At(t,e),Rt(e);break;case 13:At(t,e),Rt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Fo=Xe()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Ko(e,n)));break;case 22:o=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,H=Na,J=Je;if(Na=H||o,Je=J||E,At(t,e),Je=J,Na=H,Rt(e),n&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||E||Na||Je||Cn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(u=E.stateNode,o)p=u.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{b=E.stateNode;var ee=E.memoizedProps.style,G=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;b.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(K){Ge(E,E.return,K)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=o?"":E.memoizedProps}catch(K){Ge(E,E.return,K)}}}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,Ko(e,a))));break;case 19:At(t,e),Rt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Ko(e,n)));break;case 30:break;case 21:break;default:At(t,e),Rt(e)}}function Rt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Df(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var o=a.stateNode,u=Vo(e);Or(e,u,o);break;case 5:var p=a.stateNode;a.flags&32&&(Bn(p,""),a.flags&=-33);var b=Vo(e);Or(e,b,p);break;case 3:case 4:var E=a.stateNode.containerInfo,H=Vo(e);Go(e,H,E);break;default:throw Error(c(161))}}catch(J){Ge(e,e.return,J)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Gf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ga(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_f(e,t.alternate,t),t=t.sibling}function Cn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Va(4,t,t.return),Cn(t);break;case 1:ra(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Mf(t,t.return,a),Cn(t);break;case 27:gl(t.stateNode);case 26:case 5:ra(t,t.return),Cn(t);break;case 22:t.memoizedState===null&&Cn(t);break;case 30:Cn(t);break;default:Cn(t)}e=e.sibling}}function $a(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,o=e,u=t,p=u.flags;switch(u.tag){case 0:case 11:case 15:$a(o,u,a),ll(4,u);break;case 1:if($a(o,u,a),n=u,o=n.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(H){Ge(n,n.return,H)}if(n=u,o=n.updateQueue,o!==null){var b=n.stateNode;try{var E=o.shared.hiddenCallbacks;if(E!==null)for(o.shared.hiddenCallbacks=null,o=0;o<E.length;o++)pd(E[o],b)}catch(H){Ge(n,n.return,H)}}a&&p&64&&Of(u),rl(u,u.return);break;case 27:Uf(u);case 26:case 5:$a(o,u,a),a&&n===null&&p&4&&zf(u),rl(u,u.return);break;case 12:$a(o,u,a);break;case 13:$a(o,u,a),a&&p&4&&qf(o,u);break;case 22:u.memoizedState===null&&$a(o,u,a),rl(u,u.return);break;case 30:break;default:$a(o,u,a)}t=t.sibling}}function Yo(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&&Ys(a))}function Xo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ys(e))}function ia(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)$f(e,t,a,n),t=t.sibling}function $f(e,t,a,n){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ia(e,t,a,n),o&2048&&ll(9,t);break;case 1:ia(e,t,a,n);break;case 3:ia(e,t,a,n),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ys(e)));break;case 12:if(o&2048){ia(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,p=u.id,b=u.onPostCommit;typeof b=="function"&&b(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Ge(t,t.return,E)}}else ia(e,t,a,n);break;case 13:ia(e,t,a,n);break;case 23:break;case 22:u=t.stateNode,p=t.alternate,t.memoizedState!==null?u._visibility&2?ia(e,t,a,n):il(e,t):u._visibility&2?ia(e,t,a,n):(u._visibility|=2,ss(e,t,a,n,(t.subtreeFlags&10256)!==0)),o&2048&&Yo(p,t);break;case 24:ia(e,t,a,n),o&2048&&Xo(t.alternate,t);break;default:ia(e,t,a,n)}}function ss(e,t,a,n,o){for(o=o&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var u=e,p=t,b=a,E=n,H=p.flags;switch(p.tag){case 0:case 11:case 15:ss(u,p,b,E,o),ll(8,p);break;case 23:break;case 22:var J=p.stateNode;p.memoizedState!==null?J._visibility&2?ss(u,p,b,E,o):il(u,p):(J._visibility|=2,ss(u,p,b,E,o)),o&&H&2048&&Yo(p.alternate,p);break;case 24:ss(u,p,b,E,o),o&&H&2048&&Xo(p.alternate,p);break;default:ss(u,p,b,E,o)}t=t.sibling}}function il(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,o=n.flags;switch(n.tag){case 22:il(a,n),o&2048&&Yo(n.alternate,n);break;case 24:il(a,n),o&2048&&Xo(n.alternate,n);break;default:il(a,n)}t=t.sibling}}var ol=8192;function ls(e){if(e.subtreeFlags&ol)for(e=e.child;e!==null;)Kf(e),e=e.sibling}function Kf(e){switch(e.tag){case 26:ls(e),e.flags&ol&&e.memoizedState!==null&&B0(It,e.memoizedState,e.memoizedProps);break;case 5:ls(e);break;case 3:case 4:var t=It;It=Kr(e.stateNode.containerInfo),ls(e),It=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=ol,ol=16777216,ls(e),ol=t):ls(e));break;default:ls(e)}}function Yf(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 cl(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];ot=n,Qf(n,e)}Yf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Xf(e),e=e.sibling}function Xf(e){switch(e.tag){case 0:case 11:case 15:cl(e),e.flags&2048&&Va(9,e,e.return);break;case 3:cl(e);break;case 12:cl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Mr(e)):cl(e);break;default:cl(e)}}function Mr(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];ot=n,Qf(n,e)}Yf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Va(8,t,t.return),Mr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Mr(t));break;default:Mr(t)}e=e.sibling}}function Qf(e,t){for(;ot!==null;){var a=ot;switch(a.tag){case 0:case 11:case 15:Va(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:Ys(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,ot=n;else e:for(a=e;ot!==null;){n=ot;var o=n.sibling,u=n.return;if(Hf(n),n===a){ot=null;break e}if(o!==null){o.return=u,ot=o;break e}ot=u}}}var t0={getCacheForType:function(e){var t=gt(at),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},a0=typeof WeakMap=="function"?WeakMap:Map,Le=0,$e=null,Ae=null,ze=0,_e=0,Ot=null,Ka=!1,rs=!1,Qo=!1,Ea=0,Ze=0,Ya=0,En=0,Po=0,Vt=0,is=0,ul=null,St=null,Zo=!1,Fo=0,zr=1/0,Dr=null,Xa=null,dt=0,Qa=null,os=null,cs=0,Jo=0,Io=null,Pf=null,dl=0,Wo=null;function Mt(){if((Le&2)!==0&&ze!==0)return ze&-ze;if(R.T!==null){var e=Fn;return e!==0?e:rc()}return As()}function Zf(){Vt===0&&(Vt=(ze&536870912)===0||Ue?pe():536870912);var e=qt.current;return e!==null&&(e.flags|=32),Vt}function zt(e,t,a){(e===$e&&(_e===2||_e===9)||e.cancelPendingCommit!==null)&&(us(e,0),Pa(e,ze,Vt,!1)),Zt(e,a),((Le&2)===0||e!==$e)&&(e===$e&&((Le&2)===0&&(En|=a),Ze===4&&Pa(e,ze,Vt,!1)),oa(e))}function Ff(e,t,a){if((Le&6)!==0)throw Error(c(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||de(e,t),o=n?l0(e,t):ac(e,t,!0),u=n;do{if(o===0){rs&&!n&&Pa(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!n0(a)){o=ac(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)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;o=ul;var E=b.current.memoizedState.isDehydrated;if(E&&(us(b,p).flags|=256),p=ac(b,p,!1),p!==2){if(Qo&&!E){b.errorRecoveryDisabledLanes|=u,En|=u,o=4;break e}u=St,St=o,u!==null&&(St===null?St=u:St.push.apply(St,u))}o=p}if(u=!1,o!==2)continue}}if(o===1){us(e,0),Pa(e,t,0,!0);break}e:{switch(n=e,u=o,u){case 0:case 1:throw Error(c(345));case 4:if((t&4194048)!==t)break;case 6:Pa(n,t,Vt,!Ka);break e;case 2:St=null;break;case 3:case 5:break;default:throw Error(c(329))}if((t&62914560)===t&&(o=Fo+300-Xe(),10<o)){if(Pa(n,t,Vt,!Ka),cn(n,0,!0)!==0)break e;n.timeoutHandle=Cm(Jf.bind(null,n,a,St,Dr,Zo,t,Vt,En,is,Ka,u,2,-0,0),o);break e}Jf(n,a,St,Dr,Zo,t,Vt,En,is,Ka,u,0,-0,0)}}break}while(!0);oa(e)}function Jf(e,t,a,n,o,u,p,b,E,H,J,ee,G,K){if(e.timeoutHandle=-1,ee=t.subtreeFlags,(ee&8192||(ee&16785408)===16785408)&&(yl={stylesheets:null,count:0,unsuspend:H0},Kf(t),ee=q0(),ee!==null)){e.cancelPendingCommit=ee(sm.bind(null,e,t,u,a,n,o,p,b,E,J,1,G,K)),Pa(e,u,p,!H);return}sm(e,t,u,a,n,o,p,b,E)}function n0(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 o=a[n],u=o.getSnapshot;o=o.value;try{if(!kt(u(),o))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 Pa(e,t,a,n){t&=~Po,t&=~En,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var o=t;0<o;){var u=31-ht(o),p=1<<u;n[u]=-1,o&=~p}a!==0&&Kl(e,a,t)}function Ur(){return(Le&6)===0?(fl(0),!1):!0}function ec(){if(Ae!==null){if(_e===0)var e=Ae.return;else e=Ae,ya=vn=null,xo(e),as=null,al=0,e=Ae;for(;e!==null;)Rf(e.alternate,e),e=e.return;Ae=null}}function us(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,w0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ec(),$e=e,Ae=a=ga(e.current,null),ze=t,_e=0,Ot=null,Ka=!1,rs=de(e,t),Qo=!1,is=Vt=Po=En=Ya=Ze=0,St=ul=null,Zo=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var o=31-ht(n),u=1<<o;t|=e[o],n&=~u}return Ea=t,nr(),a}function If(e,t){Ee=null,R.H=jr,t===Qs||t===fr?(t=hd(),_e=3):t===dd?(t=hd(),_e=4):_e=t===pf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ot=t,Ae===null&&(Ze=1,kr(e,Lt(t,e.current)))}function Wf(){var e=R.H;return R.H=jr,e===null?jr:e}function em(){var e=R.A;return R.A=t0,e}function tc(){Ze=4,Ka||(ze&4194048)!==ze&&qt.current!==null||(rs=!0),(Ya&134217727)===0&&(En&134217727)===0||$e===null||Pa($e,ze,Vt,!1)}function ac(e,t,a){var n=Le;Le|=2;var o=Wf(),u=em();($e!==e||ze!==t)&&(Dr=null,us(e,t)),t=!1;var p=Ze;e:do try{if(_e!==0&&Ae!==null){var b=Ae,E=Ot;switch(_e){case 8:ec(),p=6;break e;case 3:case 2:case 9:case 6:qt.current===null&&(t=!0);var H=_e;if(_e=0,Ot=null,ds(e,b,E,H),a&&rs){p=0;break e}break;default:H=_e,_e=0,Ot=null,ds(e,b,E,H)}}s0(),p=Ze;break}catch(J){If(e,J)}while(!0);return t&&e.shellSuspendCounter++,ya=vn=null,Le=n,R.H=o,R.A=u,Ae===null&&($e=null,ze=0,nr()),p}function s0(){for(;Ae!==null;)tm(Ae)}function l0(e,t){var a=Le;Le|=2;var n=Wf(),o=em();$e!==e||ze!==t?(Dr=null,zr=Xe()+500,us(e,t)):rs=de(e,t);e:do try{if(_e!==0&&Ae!==null){t=Ae;var u=Ot;t:switch(_e){case 1:_e=0,Ot=null,ds(e,t,u,1);break;case 2:case 9:if(fd(u)){_e=0,Ot=null,am(t);break}t=function(){_e!==2&&_e!==9||$e!==e||(_e=7),oa(e)},u.then(t,t);break e;case 3:_e=7;break e;case 4:_e=5;break e;case 7:fd(u)?(_e=0,Ot=null,am(t)):(_e=0,Ot=null,ds(e,t,u,7));break;case 5:var p=null;switch(Ae.tag){case 26:p=Ae.memoizedState;case 5:case 27:var b=Ae;if(!p||_m(p)){_e=0,Ot=null;var E=b.sibling;if(E!==null)Ae=E;else{var H=b.return;H!==null?(Ae=H,Lr(H)):Ae=null}break t}}_e=0,Ot=null,ds(e,t,u,5);break;case 6:_e=0,Ot=null,ds(e,t,u,6);break;case 8:ec(),Ze=6;break e;default:throw Error(c(462))}}r0();break}catch(J){If(e,J)}while(!0);return ya=vn=null,R.H=n,R.A=o,Le=a,Ae!==null?0:($e=null,ze=0,nr(),Ze)}function r0(){for(;Ae!==null&&!fa();)tm(Ae)}function tm(e){var t=Tf(e.alternate,e,Ea);e.memoizedProps=e.pendingProps,t===null?Lr(e):Ae=t}function am(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=jf(a,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=jf(a,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:xo(t);default:Rf(a,t),t=Ae=ad(t,Ea),t=Tf(a,t,Ea)}e.memoizedProps=e.pendingProps,t===null?Lr(e):Ae=t}function ds(e,t,a,n){ya=vn=null,xo(t),as=null,al=0;var o=t.return;try{if(Zp(e,o,t,a,ze)){Ze=1,kr(e,Lt(a,e.current)),Ae=null;return}}catch(u){if(o!==null)throw Ae=o,u;Ze=1,kr(e,Lt(a,e.current)),Ae=null;return}t.flags&32768?(Ue||n===1?e=!0:rs||(ze&536870912)!==0?e=!1:(Ka=e=!0,(n===2||n===9||n===3||n===6)&&(n=qt.current,n!==null&&n.tag===13&&(n.flags|=16384))),nm(t,e)):Lr(t)}function Lr(e){var t=e;do{if((t.flags&32768)!==0){nm(t,Ka);return}e=t.return;var a=Jp(t.alternate,t,Ea);if(a!==null){Ae=a;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);Ze===0&&(Ze=5)}function nm(e,t){do{var a=Ip(e.alternate,e);if(a!==null){a.flags&=32767,Ae=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ae=e;return}Ae=e=a}while(e!==null);Ze=6,Ae=null}function sm(e,t,a,n,o,u,p,b,E){e.cancelPendingCommit=null;do _r();while(dt!==0);if((Le&6)!==0)throw Error(c(327));if(t!==null){if(t===e.current)throw Error(c(177));if(u=t.lanes|t.childLanes,u|=Yi,un(e,a,u,p,b,E),e===$e&&(Ae=$e=null,ze=0),os=t,Qa=e,cs=a,Jo=u,Io=o,Pf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,u0(Yt,function(){return cm(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=R.T,R.T=null,o=Q.p,Q.p=2,p=Le,Le|=4;try{Wp(e,t,a)}finally{Le=p,Q.p=o,R.T=n}}dt=1,lm(),rm(),im()}}function lm(){if(dt===1){dt=0;var e=Qa,t=os,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=R.T,R.T=null;var n=Q.p;Q.p=2;var o=Le;Le|=4;try{Vf(t,e);var u=hc,p=Xu(e.containerInfo),b=u.focusedElem,E=u.selectionRange;if(p!==b&&b&&b.ownerDocument&&Yu(b.ownerDocument.documentElement,b)){if(E!==null&&qi(b)){var H=E.start,J=E.end;if(J===void 0&&(J=H),"selectionStart"in b)b.selectionStart=H,b.selectionEnd=Math.min(J,b.value.length);else{var ee=b.ownerDocument||document,G=ee&&ee.defaultView||window;if(G.getSelection){var K=G.getSelection(),we=b.textContent.length,be=Math.min(E.start,we),qe=E.end===void 0?be:Math.min(E.end,we);!K.extend&&be>qe&&(p=qe,qe=be,be=p);var D=Ku(b,be),O=Ku(b,qe);if(D&&O&&(K.rangeCount!==1||K.anchorNode!==D.node||K.anchorOffset!==D.offset||K.focusNode!==O.node||K.focusOffset!==O.offset)){var _=ee.createRange();_.setStart(D.node,D.offset),K.removeAllRanges(),be>qe?(K.addRange(_),K.extend(O.node,O.offset)):(_.setEnd(O.node,O.offset),K.addRange(_))}}}}for(ee=[],K=b;K=K.parentNode;)K.nodeType===1&&ee.push({element:K,left:K.scrollLeft,top:K.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<ee.length;b++){var I=ee[b];I.element.scrollLeft=I.left,I.element.scrollTop=I.top}}Zr=!!mc,hc=mc=null}finally{Le=o,Q.p=n,R.T=a}}e.current=t,dt=2}}function rm(){if(dt===2){dt=0;var e=Qa,t=os,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=R.T,R.T=null;var n=Q.p;Q.p=2;var o=Le;Le|=4;try{_f(e,t.alternate,t)}finally{Le=o,Q.p=n,R.T=a}}dt=3}}function im(){if(dt===4||dt===3){dt=0,Ie();var e=Qa,t=os,a=cs,n=Pf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,os=Qa=null,om(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Xa=null),On(a),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(Ma,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=R.T,o=Q.p,Q.p=2,R.T=null;try{for(var u=e.onRecoverableError,p=0;p<n.length;p++){var b=n[p];u(b.value,{componentStack:b.stack})}}finally{R.T=t,Q.p=o}}(cs&3)!==0&&_r(),oa(e),o=e.pendingLanes,(a&4194090)!==0&&(o&42)!==0?e===Wo?dl++:(dl=0,Wo=e):dl=0,fl(0)}}function om(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ys(t)))}function _r(e){return lm(),rm(),im(),cm()}function cm(){if(dt!==5)return!1;var e=Qa,t=Jo;Jo=0;var a=On(cs),n=R.T,o=Q.p;try{Q.p=32>a?32:a,R.T=null,a=Io,Io=null;var u=Qa,p=cs;if(dt=0,os=Qa=null,cs=0,(Le&6)!==0)throw Error(c(331));var b=Le;if(Le|=4,Xf(u.current),$f(u,u.current,p,a),Le=b,fl(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(Ma,u)}catch{}return!0}finally{Q.p=o,R.T=n,om(e,t)}}function um(e,t,a){t=Lt(a,t),t=Oo(e.stateNode,t,2),e=_a(e,t,2),e!==null&&(Zt(e,2),oa(e))}function Ge(e,t,a){if(e.tag===3)um(e,e,a);else for(;t!==null;){if(t.tag===3){um(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Xa===null||!Xa.has(n))){e=Lt(a,e),a=hf(2),n=_a(t,a,2),n!==null&&(gf(a,n,t,e),Zt(n,2),oa(n));break}}t=t.return}}function nc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new a0;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(a)||(Qo=!0,o.add(a),e=i0.bind(null,e,t,a),t.then(e,e))}function i0(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,$e===e&&(ze&a)===a&&(Ze===4||Ze===3&&(ze&62914560)===ze&&300>Xe()-Fo?(Le&2)===0&&us(e,0):Po|=a,is===ze&&(is=0)),oa(e)}function dm(e,t){t===0&&(t=Qt()),e=Xn(e,t),e!==null&&(Zt(e,t),oa(e))}function o0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),dm(e,a)}function c0(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&&n.delete(t),dm(e,a)}function u0(e,t){return Nt(e,t)}var Hr=null,fs=null,sc=!1,Br=!1,lc=!1,kn=0;function oa(e){e!==fs&&e.next===null&&(fs===null?Hr=fs=e:fs=fs.next=e),Br=!0,sc||(sc=!0,f0())}function fl(e,t){if(!lc&&Br){lc=!0;do for(var a=!1,n=Hr;n!==null;){if(e!==0){var o=n.pendingLanes;if(o===0)var u=0;else{var p=n.suspendedLanes,b=n.pingedLanes;u=(1<<31-ht(42|e)+1)-1,u&=o&~(p&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,gm(n,u))}else u=ze,u=cn(n,n===$e?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||de(n,u)||(a=!0,gm(n,u));n=n.next}while(a);lc=!1}}function d0(){fm()}function fm(){Br=sc=!1;var e=0;kn!==0&&(v0()&&(e=kn),kn=0);for(var t=Xe(),a=null,n=Hr;n!==null;){var o=n.next,u=mm(n,t);u===0?(n.next=null,a===null?Hr=o:a.next=o,o===null&&(fs=a)):(a=n,(e!==0||(u&3)!==0)&&(Br=!0)),n=o}fl(e)}function mm(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var p=31-ht(u),b=1<<p,E=o[p];E===-1?((b&a)===0||(b&n)!==0)&&(o[p]=ie(b,t)):E<=t&&(e.expiredLanes|=b),u&=~b}if(t=$e,a=ze,a=cn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(_e===2||_e===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Ct(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||de(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Ct(n),On(a)){case 2:case 8:a=ln;break;case 32:a=Yt;break;case 268435456:a=Ts;break;default:a=Yt}return n=hm.bind(null,e),a=Nt(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Ct(n),e.callbackPriority=2,e.callbackNode=null,2}function hm(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_r()&&e.callbackNode!==a)return null;var n=ze;return n=cn(e,e===$e?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Ff(e,n,t),mm(e,Xe()),e.callbackNode!=null&&e.callbackNode===a?hm.bind(null,e):null)}function gm(e,t){if(_r())return null;Ff(e,t,!0)}function f0(){j0(function(){(Le&6)!==0?Nt(Oa,d0):fm()})}function rc(){return kn===0&&(kn=pe()),kn}function pm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Fl(""+e)}function xm(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 m0(e,t,a,n,o){if(t==="submit"&&a&&a.stateNode===o){var u=pm((o[yt]||null).action),p=n.submitter;p&&(t=(t=p[yt]||null)?pm(t.formAction):p.getAttribute("formAction"),t!==null&&(u=t,p=null));var b=new er("action","action",null,n,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(kn!==0){var E=p?xm(o,p):new FormData(o);Eo(a,{pending:!0,data:E,method:o.method,action:u},null,E)}}else typeof u=="function"&&(b.preventDefault(),E=p?xm(o,p):new FormData(o),Eo(a,{pending:!0,data:E,method:o.method,action:u},u,E))},currentTarget:o}]})}}for(var ic=0;ic<Ki.length;ic++){var oc=Ki[ic],h0=oc.toLowerCase(),g0=oc[0].toUpperCase()+oc.slice(1);Jt(h0,"on"+g0)}Jt(Zu,"onAnimationEnd"),Jt(Fu,"onAnimationIteration"),Jt(Ju,"onAnimationStart"),Jt("dblclick","onDoubleClick"),Jt("focusin","onFocus"),Jt("focusout","onBlur"),Jt(Mp,"onTransitionRun"),Jt(zp,"onTransitionStart"),Jt(Dp,"onTransitionCancel"),Jt(Iu,"onTransitionEnd"),Ln("onMouseEnter",["mouseout","mouseover"]),Ln("onMouseLeave",["mouseout","mouseover"]),Ln("onPointerEnter",["pointerout","pointerover"]),Ln("onPointerLeave",["pointerout","pointerover"]),dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dn("onBeforeInput",["compositionend","keypress","textInput","paste"]),dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ml="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(" "),p0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ml));function ym(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],o=n.event;n=n.listeners;e:{var u=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!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=H;try{u(o)}catch(J){Er(J)}o.currentTarget=null,u=E}else for(p=0;p<n.length;p++){if(b=n[p],E=b.instance,H=b.currentTarget,b=b.listener,E!==u&&o.isPropagationStopped())break e;u=b,o.currentTarget=H;try{u(o)}catch(J){Er(J)}o.currentTarget=null,u=E}}}}function Re(e,t){var a=t[vi];a===void 0&&(a=t[vi]=new Set);var n=e+"__bubble";a.has(n)||(bm(t,e,2,!1),a.add(n))}function cc(e,t,a){var n=0;t&&(n|=4),bm(a,e,n,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function uc(e){if(!e[qr]){e[qr]=!0,du.forEach(function(a){a!=="selectionchange"&&(p0.has(a)||cc(a,!1,e),cc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qr]||(t[qr]=!0,cc("selectionchange",!1,t))}}function bm(e,t,a,n){switch($m(t)){case 2:var o=$0;break;case 8:o=K0;break;default:o=Nc}a=o.bind(null,t,a,e),o=void 0,!Oi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function dc(e,t,a,n,o){var u=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===o)break;if(p===4)for(p=n.return;p!==null;){var E=p.tag;if((E===3||E===4)&&p.stateNode.containerInfo===o)return;p=p.return}for(;b!==null;){if(p=zn(b),p===null)return;if(E=p.tag,E===5||E===6||E===26||E===27){n=u=p;continue e}b=b.parentNode}}n=n.return}Cu(function(){var H=u,J=Ai(a),ee=[];e:{var G=Wu.get(e);if(G!==void 0){var K=er,we=e;switch(e){case"keypress":if(Il(a)===0)break e;case"keydown":case"keyup":K=up;break;case"focusin":we="focus",K=Ui;break;case"focusout":we="blur",K=Ui;break;case"beforeblur":case"afterblur":K=Ui;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":K=Tu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Ig;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=mp;break;case Zu:case Fu:case Ju:K=tp;break;case Iu:K=gp;break;case"scroll":case"scrollend":K=Fg;break;case"wheel":K=xp;break;case"copy":case"cut":case"paste":K=np;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=Ru;break;case"toggle":case"beforetoggle":K=bp}var be=(t&4)!==0,qe=!be&&(e==="scroll"||e==="scrollend"),D=be?G!==null?G+"Capture":null:G;be=[];for(var O=H,_;O!==null;){var I=O;if(_=I.stateNode,I=I.tag,I!==5&&I!==26&&I!==27||_===null||D===null||(I=Ms(O,D),I!=null&&be.push(hl(O,I,_))),qe)break;O=O.return}0<be.length&&(G=new K(G,we,null,a,J),ee.push({event:G,listeners:be}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",K=e==="mouseout"||e==="pointerout",G&&a!==Ti&&(we=a.relatedTarget||a.fromElement)&&(zn(we)||we[Mn]))break e;if((K||G)&&(G=J.window===J?J:(G=J.ownerDocument)?G.defaultView||G.parentWindow:window,K?(we=a.relatedTarget||a.toElement,K=H,we=we?zn(we):null,we!==null&&(qe=d(we),be=we.tag,we!==qe||be!==5&&be!==27&&be!==6)&&(we=null)):(K=null,we=H),K!==we)){if(be=Tu,I="onMouseLeave",D="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(be=Ru,I="onPointerLeave",D="onPointerEnter",O="pointer"),qe=K==null?G:Os(K),_=we==null?G:Os(we),G=new be(I,O+"leave",K,a,J),G.target=qe,G.relatedTarget=_,I=null,zn(J)===H&&(be=new be(D,O+"enter",we,a,J),be.target=_,be.relatedTarget=qe,I=be),qe=I,K&&we)t:{for(be=K,D=we,O=0,_=be;_;_=ms(_))O++;for(_=0,I=D;I;I=ms(I))_++;for(;0<O-_;)be=ms(be),O--;for(;0<_-O;)D=ms(D),_--;for(;O--;){if(be===D||D!==null&&be===D.alternate)break t;be=ms(be),D=ms(D)}be=null}else be=null;K!==null&&vm(ee,G,K,be,!1),we!==null&&qe!==null&&vm(ee,qe,we,be,!0)}}e:{if(G=H?Os(H):window,K=G.nodeName&&G.nodeName.toLowerCase(),K==="select"||K==="input"&&G.type==="file")var fe=Hu;else if(Lu(G))if(Bu)fe=Ap;else{fe=kp;var Te=Ep}else K=G.nodeName,!K||K.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&ki(H.elementType)&&(fe=Hu):fe=Tp;if(fe&&(fe=fe(e,H))){_u(ee,fe,a,J);break e}Te&&Te(e,G,H),e==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&Ei(G,"number",G.value)}switch(Te=H?Os(H):window,e){case"focusin":(Lu(Te)||Te.contentEditable==="true")&&($n=Te,Vi=H,qs=null);break;case"focusout":qs=Vi=$n=null;break;case"mousedown":Gi=!0;break;case"contextmenu":case"mouseup":case"dragend":Gi=!1,Qu(ee,a,J);break;case"selectionchange":if(Op)break;case"keydown":case"keyup":Qu(ee,a,J)}var ge;if(_i)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else Gn?Du(e,a)&&(ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ve="onCompositionStart");ve&&(Ou&&a.locale!=="ko"&&(Gn||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&Gn&&(ge=Eu()):(za=J,Mi="value"in za?za.value:za.textContent,Gn=!0)),Te=Vr(H,ve),0<Te.length&&(ve=new Au(ve,e,null,a,J),ee.push({event:ve,listeners:Te}),ge?ve.data=ge:(ge=Uu(a),ge!==null&&(ve.data=ge)))),(ge=wp?jp(e,a):Sp(e,a))&&(ve=Vr(H,"onBeforeInput"),0<ve.length&&(Te=new Au("onBeforeInput","beforeinput",null,a,J),ee.push({event:Te,listeners:ve}),Te.data=ge)),m0(ee,e,H,a,J)}ym(ee,t)})}function hl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Vr(e,t){for(var a=t+"Capture",n=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Ms(e,a),o!=null&&n.unshift(hl(e,o,u)),o=Ms(e,t),o!=null&&n.push(hl(e,o,u))),e.tag===3)return n;e=e.return}return[]}function ms(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function vm(e,t,a,n,o){for(var u=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,o?(H=Ms(a,u),H!=null&&p.unshift(hl(a,H,E))):o||(H=Ms(a,u),H!=null&&p.push(hl(a,H,E)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var x0=/\r\n?/g,y0=/\u0000|\uFFFD/g;function wm(e){return(typeof e=="string"?e:""+e).replace(x0,`
|
|
49
|
+
`).replace(y0,"")}function jm(e,t){return t=wm(t),wm(e)===t}function Gr(){}function Be(e,t,a,n,o,u){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Bn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Bn(e,""+n);break;case"className":Ql(e,"class",n);break;case"tabIndex":Ql(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ql(e,a,n);break;case"style":Su(e,n,u);break;case"data":if(t!=="object"){Ql(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=Fl(""+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 u=="function"&&(a==="formAction"?(t!=="input"&&Be(e,t,"name",o.name,o,null),Be(e,t,"formEncType",o.formEncType,o,null),Be(e,t,"formMethod",o.formMethod,o,null),Be(e,t,"formTarget",o.formTarget,o,null)):(Be(e,t,"encType",o.encType,o,null),Be(e,t,"method",o.method,o,null),Be(e,t,"target",o.target,o,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Fl(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Gr);break;case"onScroll":n!=null&&Re("scroll",e);break;case"onScrollEnd":n!=null&&Re("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(o.children!=null)throw Error(c(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=Fl(""+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":Re("beforetoggle",e),Re("toggle",e),Xl(e,"popover",n);break;case"xlinkActuate":ma(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":ma(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":ma(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":ma(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":ma(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":ma(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":ma(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":ma(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":ma(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Xl(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=Pg.get(a)||a,Xl(e,a,n))}}function fc(e,t,a,n,o,u){switch(a){case"style":Su(e,n,u);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(c(61));if(a=n.__html,a!=null){if(o.children!=null)throw Error(c(60));e.innerHTML=a}}break;case"children":typeof n=="string"?Bn(e,n):(typeof n=="number"||typeof n=="bigint")&&Bn(e,""+n);break;case"onScroll":n!=null&&Re("scroll",e);break;case"onScrollEnd":n!=null&&Re("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Gr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!fu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[yt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof n=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,o);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Xl(e,a,n)}}}function ft(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",e),Re("load",e);var n=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var p=a[u];if(p!=null)switch(u){case"src":n=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,t));default:Be(e,t,u,p,a,null)}}o&&Be(e,t,"srcSet",a.srcSet,a,null),n&&Be(e,t,"src",a.src,a,null);return;case"input":Re("invalid",e);var b=u=p=o=null,E=null,H=null;for(n in a)if(a.hasOwnProperty(n)){var J=a[n];if(J!=null)switch(n){case"name":o=J;break;case"type":p=J;break;case"checked":E=J;break;case"defaultChecked":H=J;break;case"value":u=J;break;case"defaultValue":b=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(c(137,t));break;default:Be(e,t,n,J,a,null)}}bu(e,u,b,E,H,p,o,!1),Pl(e);return;case"select":Re("invalid",e),n=p=u=null;for(o in a)if(a.hasOwnProperty(o)&&(b=a[o],b!=null))switch(o){case"value":u=b;break;case"defaultValue":p=b;break;case"multiple":n=b;default:Be(e,t,o,b,a,null)}t=u,a=p,e.multiple=!!n,t!=null?Hn(e,!!n,t,!1):a!=null&&Hn(e,!!n,a,!0);return;case"textarea":Re("invalid",e),u=o=n=null;for(p in a)if(a.hasOwnProperty(p)&&(b=a[p],b!=null))switch(p){case"value":n=b;break;case"defaultValue":o=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(c(91));break;default:Be(e,t,p,b,a,null)}wu(e,n,o,u),Pl(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:Be(e,t,E,n,a,null)}return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(n=0;n<ml.length;n++)Re(ml[n],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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(c(137,t));default:Be(e,t,H,n,a,null)}return;default:if(ki(t)){for(J in a)a.hasOwnProperty(J)&&(n=a[J],n!==void 0&&fc(e,t,J,n,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null&&Be(e,t,b,n,a,null))}function b0(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 o=null,u=null,p=null,b=null,E=null,H=null,J=null;for(K in a){var ee=a[K];if(a.hasOwnProperty(K)&&ee!=null)switch(K){case"checked":break;case"value":break;case"defaultValue":E=ee;default:n.hasOwnProperty(K)||Be(e,t,K,null,n,ee)}}for(var G in n){var K=n[G];if(ee=a[G],n.hasOwnProperty(G)&&(K!=null||ee!=null))switch(G){case"type":u=K;break;case"name":o=K;break;case"checked":H=K;break;case"defaultChecked":J=K;break;case"value":p=K;break;case"defaultValue":b=K;break;case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(c(137,t));break;default:K!==ee&&Be(e,t,G,K,n,ee)}}Ci(e,p,b,E,H,J,u,o);return;case"select":K=p=b=G=null;for(u in a)if(E=a[u],a.hasOwnProperty(u)&&E!=null)switch(u){case"value":break;case"multiple":K=E;default:n.hasOwnProperty(u)||Be(e,t,u,null,n,E)}for(o in n)if(u=n[o],E=a[o],n.hasOwnProperty(o)&&(u!=null||E!=null))switch(o){case"value":G=u;break;case"defaultValue":b=u;break;case"multiple":p=u;default:u!==E&&Be(e,t,o,u,n,E)}t=b,a=p,n=K,G!=null?Hn(e,!!a,G,!1):!!n!=!!a&&(t!=null?Hn(e,!!a,t,!0):Hn(e,!!a,a?[]:"",!1));return;case"textarea":K=G=null;for(b in a)if(o=a[b],a.hasOwnProperty(b)&&o!=null&&!n.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Be(e,t,b,null,n,o)}for(p in n)if(o=n[p],u=a[p],n.hasOwnProperty(p)&&(o!=null||u!=null))switch(p){case"value":G=o;break;case"defaultValue":K=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(c(91));break;default:o!==u&&Be(e,t,p,o,n,u)}vu(e,G,K);return;case"option":for(var we in a)if(G=a[we],a.hasOwnProperty(we)&&G!=null&&!n.hasOwnProperty(we))switch(we){case"selected":e.selected=!1;break;default:Be(e,t,we,null,n,G)}for(E in n)if(G=n[E],K=a[E],n.hasOwnProperty(E)&&G!==K&&(G!=null||K!=null))switch(E){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Be(e,t,E,G,n,K)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var be in a)G=a[be],a.hasOwnProperty(be)&&G!=null&&!n.hasOwnProperty(be)&&Be(e,t,be,null,n,G);for(H in n)if(G=n[H],K=a[H],n.hasOwnProperty(H)&&G!==K&&(G!=null||K!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(c(137,t));break;default:Be(e,t,H,G,n,K)}return;default:if(ki(t)){for(var qe in a)G=a[qe],a.hasOwnProperty(qe)&&G!==void 0&&!n.hasOwnProperty(qe)&&fc(e,t,qe,void 0,n,G);for(J in n)G=n[J],K=a[J],!n.hasOwnProperty(J)||G===K||G===void 0&&K===void 0||fc(e,t,J,G,n,K);return}}for(var D in a)G=a[D],a.hasOwnProperty(D)&&G!=null&&!n.hasOwnProperty(D)&&Be(e,t,D,null,n,G);for(ee in n)G=n[ee],K=a[ee],!n.hasOwnProperty(ee)||G===K||G==null&&K==null||Be(e,t,ee,G,n,K)}var mc=null,hc=null;function $r(e){return e.nodeType===9?e:e.ownerDocument}function Sm(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 Nm(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 gc(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 pc=null;function v0(){var e=window.event;return e&&e.type==="popstate"?e===pc?!1:(pc=e,!0):(pc=null,!1)}var Cm=typeof setTimeout=="function"?setTimeout:void 0,w0=typeof clearTimeout=="function"?clearTimeout:void 0,Em=typeof Promise=="function"?Promise:void 0,j0=typeof queueMicrotask=="function"?queueMicrotask:typeof Em<"u"?function(e){return Em.resolve(null).then(e).catch(S0)}:Cm;function S0(e){setTimeout(function(){throw e})}function Za(e){return e==="head"}function km(e,t){var a=t,n=0,o=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(0<n&&8>n){a=n;var p=e.ownerDocument;if(a&1&&gl(p.documentElement),a&2&&gl(p.body),a&4)for(a=p.head,gl(a),p=a.firstChild;p;){var b=p.nextSibling,E=p.nodeName;p[Rs]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&p.rel.toLowerCase()==="stylesheet"||a.removeChild(p),p=b}}if(o===0){e.removeChild(u),Sl(t);return}o--}else a==="$"||a==="$?"||a==="$!"?o++:n=a.charCodeAt(0)-48;else n=0;a=u}while(a);Sl(t)}function xc(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":xc(a),wi(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function N0(e,t,a,n){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Rs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Wt(e.nextSibling),e===null)break}return null}function C0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Wt(e.nextSibling),e===null))return null;return e}function yc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function E0(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 Wt(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 bc=null;function Tm(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 Am(e,t,a){switch(t=$r(a),e){case"html":if(e=t.documentElement,!e)throw Error(c(452));return e;case"head":if(e=t.head,!e)throw Error(c(453));return e;case"body":if(e=t.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function gl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wi(e)}var Gt=new Map,Rm=new Set;function Kr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ka=Q.d;Q.d={f:k0,r:T0,D:A0,C:R0,L:O0,m:M0,X:D0,S:z0,M:U0};function k0(){var e=ka.f(),t=Ur();return e||t}function T0(e){var t=Dn(e);t!==null&&t.tag===5&&t.type==="form"?Zd(t):ka.r(e)}var hs=typeof document>"u"?null:document;function Om(e,t,a){var n=hs;if(n&&typeof t=="string"&&t){var o=Ut(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Rm.has(o)||(Rm.add(o),e={rel:e,crossOrigin:a,href:t},n.querySelector(o)===null&&(t=n.createElement("link"),ft(t,"link",e),rt(t),n.head.appendChild(t)))}}function A0(e){ka.D(e),Om("dns-prefetch",e,null)}function R0(e,t){ka.C(e,t),Om("preconnect",e,t)}function O0(e,t,a){ka.L(e,t,a);var n=hs;if(n&&e&&t){var o='link[rel="preload"][as="'+Ut(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Ut(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Ut(a.imageSizes)+'"]')):o+='[href="'+Ut(e)+'"]';var u=o;switch(t){case"style":u=gs(e);break;case"script":u=ps(e)}Gt.has(u)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Gt.set(u,e),n.querySelector(o)!==null||t==="style"&&n.querySelector(pl(u))||t==="script"&&n.querySelector(xl(u))||(t=n.createElement("link"),ft(t,"link",e),rt(t),n.head.appendChild(t)))}}function M0(e,t){ka.m(e,t);var a=hs;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Ut(n)+'"][href="'+Ut(e)+'"]',u=o;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=ps(e)}if(!Gt.has(u)&&(e=y({rel:"modulepreload",href:e},t),Gt.set(u,e),a.querySelector(o)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(xl(u)))return}n=a.createElement("link"),ft(n,"link",e),rt(n),a.head.appendChild(n)}}}function z0(e,t,a){ka.S(e,t,a);var n=hs;if(n&&e){var o=Un(n).hoistableStyles,u=gs(e);t=t||"default";var p=o.get(u);if(!p){var b={loading:0,preload:null};if(p=n.querySelector(pl(u)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Gt.get(u))&&vc(e,a);var E=p=n.createElement("link");rt(E),ft(E,"link",e),E._p=new Promise(function(H,J){E.onload=H,E.onerror=J}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Yr(p,t,n)}p={type:"stylesheet",instance:p,count:1,state:b},o.set(u,p)}}}function D0(e,t){ka.X(e,t);var a=hs;if(a&&e){var n=Un(a).hoistableScripts,o=ps(e),u=n.get(o);u||(u=a.querySelector(xl(o)),u||(e=y({src:e,async:!0},t),(t=Gt.get(o))&&wc(e,t),u=a.createElement("script"),rt(u),ft(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(o,u))}}function U0(e,t){ka.M(e,t);var a=hs;if(a&&e){var n=Un(a).hoistableScripts,o=ps(e),u=n.get(o);u||(u=a.querySelector(xl(o)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Gt.get(o))&&wc(e,t),u=a.createElement("script"),rt(u),ft(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(o,u))}}function Mm(e,t,a,n){var o=(o=te.current)?Kr(o):null;if(!o)throw Error(c(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=gs(a.href),a=Un(o).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=gs(a.href);var u=Un(o).hoistableStyles,p=u.get(e);if(p||(o=o.ownerDocument||o,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,p),(u=o.querySelector(pl(e)))&&!u._p&&(p.instance=u,p.state.loading=5),Gt.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},Gt.set(e,a),u||L0(o,e,a,p.state))),t&&n===null)throw Error(c(528,""));return p}if(t&&n!==null)throw Error(c(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ps(a),a=Un(o).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(c(444,e))}}function gs(e){return'href="'+Ut(e)+'"'}function pl(e){return'link[rel="stylesheet"]['+e+"]"}function zm(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function L0(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}),ft(t,"link",a),rt(t),e.head.appendChild(t))}function ps(e){return'[src="'+Ut(e)+'"]'}function xl(e){return"script[async]"+e}function Dm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Ut(a.href)+'"]');if(n)return t.instance=n,rt(n),n;var o=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),rt(n),ft(n,"style",o),Yr(n,a.precedence,e),t.instance=n;case"stylesheet":o=gs(a.href);var u=e.querySelector(pl(o));if(u)return t.state.loading|=4,t.instance=u,rt(u),u;n=zm(a),(o=Gt.get(o))&&vc(n,o),u=(e.ownerDocument||e).createElement("link"),rt(u);var p=u;return p._p=new Promise(function(b,E){p.onload=b,p.onerror=E}),ft(u,"link",n),t.state.loading|=4,Yr(u,a.precedence,e),t.instance=u;case"script":return u=ps(a.src),(o=e.querySelector(xl(u)))?(t.instance=o,rt(o),o):(n=a,(o=Gt.get(u))&&(n=y({},a),wc(n,o)),e=e.ownerDocument||e,o=e.createElement("script"),rt(o),ft(o,"link",n),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(c(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Yr(n,a.precedence,e));return t.instance}function Yr(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=n.length?n[n.length-1]:null,u=o,p=0;p<n.length;p++){var b=n[p];if(b.dataset.precedence===t)u=b;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Xr=null;function Um(e,t,a){if(Xr===null){var n=new Map,o=Xr=new Map;o.set(a,n)}else o=Xr,n=o.get(a),n||(n=new Map,o.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[Rs]||u[tt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var p=u.getAttribute(t)||"";p=e+p;var b=n.get(p);b?b.push(u):n.set(p,[u])}}return n}function Lm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function _0(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 _m(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var yl=null;function H0(){}function B0(e,t,a){if(yl===null)throw Error(c(475));var n=yl;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var o=gs(a.href),u=e.querySelector(pl(o));if(u){e=u._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=Qr.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=u,rt(u);return}u=e.ownerDocument||e,a=zm(a),(o=Gt.get(o))&&vc(a,o),u=u.createElement("link"),rt(u);var p=u;p._p=new Promise(function(b,E){p.onload=b,p.onerror=E}),ft(u,"link",a),t.instance=u}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(n.count++,t=Qr.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function q0(){if(yl===null)throw Error(c(475));var e=yl;return e.stylesheets&&e.count===0&&jc(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&jc(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 Qr(){if(this.count--,this.count===0){if(this.stylesheets)jc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Pr=null;function jc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Pr=new Map,t.forEach(V0,e),Pr=null,Qr.call(e))}function V0(e,t){if(!(t.state.loading&4)){var a=Pr.get(e);if(a)var n=a.get(null);else{a=new Map,Pr.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var p=o[u];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),n=p)}n&&a.set(null,n)}o=t.instance,p=o.getAttribute("data-precedence"),u=a.get(p)||n,u===n&&a.set(null,o),a.set(p,o),this.count++,n=Qr.bind(this),o.addEventListener("load",n),o.addEventListener("error",n),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var bl={$$typeof:L,Provider:null,Consumer:null,_currentValue:z,_currentValue2:z,_threadCount:0};function G0(e,t,a,n,o,u,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=Pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pt(0),this.hiddenUpdates=Pt(null),this.identifierPrefix=n,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Hm(e,t,a,n,o,u,p,b,E,H,J,ee){return e=new G0(e,t,a,p,b,E,H,ee),t=1,u===!0&&(t|=24),u=Tt(3,null,null,t),e.current=u,u.stateNode=e,t=ao(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},ro(u),e}function Bm(e){return e?(e=Qn,e):Qn}function qm(e,t,a,n,o,u){o=Bm(o),n.context===null?n.context=o:n.pendingContext=o,n=La(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),a=_a(e,n,t),a!==null&&(zt(a,e,t),Zs(a,e,t))}function Vm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Sc(e,t){Vm(e,t),(e=e.alternate)&&Vm(e,t)}function Gm(e){if(e.tag===13){var t=Xn(e,67108864);t!==null&&zt(t,e,67108864),Sc(e,67108864)}}var Zr=!0;function $0(e,t,a,n){var o=R.T;R.T=null;var u=Q.p;try{Q.p=2,Nc(e,t,a,n)}finally{Q.p=u,R.T=o}}function K0(e,t,a,n){var o=R.T;R.T=null;var u=Q.p;try{Q.p=8,Nc(e,t,a,n)}finally{Q.p=u,R.T=o}}function Nc(e,t,a,n){if(Zr){var o=Cc(n);if(o===null)dc(e,t,n,Fr,a),Km(e,n);else if(X0(o,e,t,a,n))n.stopPropagation();else if(Km(e,n),t&4&&-1<Y0.indexOf(e)){for(;o!==null;){var u=Dn(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var p=aa(u.pendingLanes);if(p!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;p;){var E=1<<31-ht(p);b.entanglements[1]|=E,p&=~E}oa(u),(Le&6)===0&&(zr=Xe()+500,fl(0))}}break;case 13:b=Xn(u,2),b!==null&&zt(b,u,2),Ur(),Sc(u,2)}if(u=Cc(n),u===null&&dc(e,t,n,Fr,a),u===o)break;o=u}o!==null&&n.stopPropagation()}else dc(e,t,n,null,a)}}function Cc(e){return e=Ai(e),Ec(e)}var Fr=null;function Ec(e){if(Fr=null,e=zn(e),e!==null){var t=d(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 Fr=e,null}function $m(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(sn()){case Oa:return 2;case ln:return 8;case Yt:case Hl:return 32;case Ts:return 268435456;default:return 32}default:return 32}}var kc=!1,Fa=null,Ja=null,Ia=null,vl=new Map,wl=new Map,Wa=[],Y0="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 Km(e,t){switch(e){case"focusin":case"focusout":Fa=null;break;case"dragenter":case"dragleave":Ja=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":vl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wl.delete(t.pointerId)}}function jl(e,t,a,n,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[o]},t!==null&&(t=Dn(t),t!==null&&Gm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function X0(e,t,a,n,o){switch(t){case"focusin":return Fa=jl(Fa,e,t,a,n,o),!0;case"dragenter":return Ja=jl(Ja,e,t,a,n,o),!0;case"mouseover":return Ia=jl(Ia,e,t,a,n,o),!0;case"pointerover":var u=o.pointerId;return vl.set(u,jl(vl.get(u)||null,e,t,a,n,o)),!0;case"gotpointercapture":return u=o.pointerId,wl.set(u,jl(wl.get(u)||null,e,t,a,n,o)),!0}return!1}function Ym(e){var t=zn(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Yl(e.priority,function(){if(a.tag===13){var n=Mt();n=na(n);var o=Xn(a,n);o!==null&&zt(o,a,n),Sc(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 Jr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Cc(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Ti=n,a.target.dispatchEvent(n),Ti=null}else return t=Dn(a),t!==null&&Gm(t),e.blockedOn=a,!1;t.shift()}return!0}function Xm(e,t,a){Jr(e)&&a.delete(t)}function Q0(){kc=!1,Fa!==null&&Jr(Fa)&&(Fa=null),Ja!==null&&Jr(Ja)&&(Ja=null),Ia!==null&&Jr(Ia)&&(Ia=null),vl.forEach(Xm),wl.forEach(Xm)}function Ir(e,t){e.blockedOn===t&&(e.blockedOn=null,kc||(kc=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Q0)))}var Wr=null;function Qm(e){Wr!==e&&(Wr=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Wr===e&&(Wr=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],o=e[t+2];if(typeof n!="function"){if(Ec(n||a)===null)continue;break}var u=Dn(a);u!==null&&(e.splice(t,3),t-=3,Eo(u,{pending:!0,data:o,method:a.method,action:n},n,o))}}))}function Sl(e){function t(E){return Ir(E,e)}Fa!==null&&Ir(Fa,e),Ja!==null&&Ir(Ja,e),Ia!==null&&Ir(Ia,e),vl.forEach(t),wl.forEach(t);for(var a=0;a<Wa.length;a++){var n=Wa[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Wa.length&&(a=Wa[0],a.blockedOn===null);)Ym(a),a.blockedOn===null&&Wa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var o=a[n],u=a[n+1],p=o[yt]||null;if(typeof u=="function")p||Qm(a);else if(p){var b=null;if(u&&u.hasAttribute("formAction")){if(o=u,p=u[yt]||null)b=p.formAction;else if(Ec(o)!==null)continue}else b=p.action;typeof b=="function"?a[n+1]=b:(a.splice(n,3),n-=3),Qm(a)}}}function Tc(e){this._internalRoot=e}ei.prototype.render=Tc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(c(409));var a=t.current,n=Mt();qm(a,n,e,t,null,null)},ei.prototype.unmount=Tc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qm(e.current,2,null,e,null,null),Ur(),t[Mn]=null}};function ei(e){this._internalRoot=e}ei.prototype.unstable_scheduleHydration=function(e){if(e){var t=As();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Wa.length&&t!==0&&t<Wa[a].priority;a++);Wa.splice(a,0,e),a===0&&Ym(e)}};var Pm=i.version;if(Pm!=="19.1.0")throw Error(c(527,Pm,"19.1.0"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(c(188)):(e=Object.keys(e).join(","),Error(c(268,e)));return e=g(t),e=e!==null?m(e):null,e=e===null?null:e.stateNode,e};var P0={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ti=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ti.isDisabled&&ti.supportsFiber)try{Ma=ti.inject(P0),mt=ti}catch{}}return Cl.createRoot=function(e,t){if(!f(e))throw Error(c(299));var a=!1,n="",o=uf,u=df,p=ff,b=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(b=t.unstable_transitionCallbacks)),t=Hm(e,1,!1,null,null,a,n,o,u,p,b,null),e[Mn]=t.current,uc(e),new Tc(t)},Cl.hydrateRoot=function(e,t,a){if(!f(e))throw Error(c(299));var n=!1,o="",u=uf,p=df,b=ff,E=null,H=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=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=Hm(e,1,!0,t,a??null,n,o,u,p,b,E,H),t.context=Bm(null),a=t.current,n=Mt(),n=na(n),o=La(n),o.callback=null,_a(a,o,n),a=n,t.current.lanes=a,Zt(t,a),oa(t),e[Mn]=t.current,uc(e),new ei(t)},Cl.version="19.1.0",Cl}var sh;function sx(){if(sh)return Oc.exports;sh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(i){console.error(i)}}return s(),Oc.exports=nx(),Oc.exports}var lx=sx();const lh=Bh(lx);var El={},rh;function rx(){if(rh)return El;rh=1,Object.defineProperty(El,"__esModule",{value:!0}),El.parse=h,El.serialize=m;const s=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,i=/^[\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,c=/^[\u0020-\u003A\u003D-\u007E]*$/,f=Object.prototype.toString,d=(()=>{const v=function(){};return v.prototype=Object.create(null),v})();function h(v,T){const S=new d,C=v.length;if(C<2)return S;const k=(T==null?void 0:T.decode)||y;let M=0;do{const A=v.indexOf("=",M);if(A===-1)break;const L=v.indexOf(";",M),q=L===-1?C:L;if(A>q){M=v.lastIndexOf(";",A-1)+1;continue}const $=x(v,M,A),ce=g(v,A,$),P=v.slice($,ce);if(S[P]===void 0){let Y=x(v,A+1,q),W=g(v,q,Y);const B=k(v.slice(Y,W));S[P]=B}M=q+1}while(M<C);return S}function x(v,T,S){do{const C=v.charCodeAt(T);if(C!==32&&C!==9)return T}while(++T<S);return S}function g(v,T,S){for(;T>S;){const C=v.charCodeAt(--T);if(C!==32&&C!==9)return T+1}return S}function m(v,T,S){const C=(S==null?void 0:S.encode)||encodeURIComponent;if(!s.test(v))throw new TypeError(`argument name is invalid: ${v}`);const k=C(T);if(!i.test(k))throw new TypeError(`argument val is invalid: ${T}`);let M=v+"="+k;if(!S)return M;if(S.maxAge!==void 0){if(!Number.isInteger(S.maxAge))throw new TypeError(`option maxAge is invalid: ${S.maxAge}`);M+="; Max-Age="+S.maxAge}if(S.domain){if(!r.test(S.domain))throw new TypeError(`option domain is invalid: ${S.domain}`);M+="; Domain="+S.domain}if(S.path){if(!c.test(S.path))throw new TypeError(`option path is invalid: ${S.path}`);M+="; Path="+S.path}if(S.expires){if(!j(S.expires)||!Number.isFinite(S.expires.valueOf()))throw new TypeError(`option expires is invalid: ${S.expires}`);M+="; Expires="+S.expires.toUTCString()}if(S.httpOnly&&(M+="; HttpOnly"),S.secure&&(M+="; Secure"),S.partitioned&&(M+="; Partitioned"),S.priority)switch(typeof S.priority=="string"?S.priority.toLowerCase():void 0){case"low":M+="; Priority=Low";break;case"medium":M+="; Priority=Medium";break;case"high":M+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${S.priority}`)}if(S.sameSite)switch(typeof S.sameSite=="string"?S.sameSite.toLowerCase():S.sameSite){case!0:case"strict":M+="; SameSite=Strict";break;case"lax":M+="; SameSite=Lax";break;case"none":M+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${S.sameSite}`)}return M}function y(v){if(v.indexOf("%")===-1)return v;try{return decodeURIComponent(v)}catch{return v}}function j(v){return f.call(v)==="[object Date]"}return El}rx();var ih="popstate";function ix(s={}){function i(c,f){let{pathname:d,search:h,hash:x}=c.location;return Vc("",{pathname:d,search:h,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function r(c,f){return typeof f=="string"?f:Ol(f)}return cx(i,r,null,s)}function Ye(s,i){if(s===!1||s===null||typeof s>"u")throw new Error(i)}function ea(s,i){if(!s){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function ox(){return Math.random().toString(36).substring(2,10)}function oh(s,i){return{usr:s.state,key:s.key,idx:i}}function Vc(s,i,r=null,c){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof i=="string"?Ss(i):i,state:r,key:i&&i.key||c||ox()}}function Ol({pathname:s="/",search:i="",hash:r=""}){return i&&i!=="?"&&(s+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function Ss(s){let i={};if(s){let r=s.indexOf("#");r>=0&&(i.hash=s.substring(r),s=s.substring(0,r));let c=s.indexOf("?");c>=0&&(i.search=s.substring(c),s=s.substring(0,c)),s&&(i.pathname=s)}return i}function cx(s,i,r,c={}){let{window:f=document.defaultView,v5Compat:d=!1}=c,h=f.history,x="POP",g=null,m=y();m==null&&(m=0,h.replaceState({...h.state,idx:m},""));function y(){return(h.state||{idx:null}).idx}function j(){x="POP";let k=y(),M=k==null?null:k-m;m=k,g&&g({action:x,location:C.location,delta:M})}function v(k,M){x="PUSH";let A=Vc(C.location,k,M);m=y()+1;let L=oh(A,m),q=C.createHref(A);try{h.pushState(L,"",q)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;f.location.assign(q)}d&&g&&g({action:x,location:C.location,delta:1})}function T(k,M){x="REPLACE";let A=Vc(C.location,k,M);m=y();let L=oh(A,m),q=C.createHref(A);h.replaceState(L,"",q),d&&g&&g({action:x,location:C.location,delta:0})}function S(k){return ux(k)}let C={get action(){return x},get location(){return s(f,h)},listen(k){if(g)throw new Error("A history only accepts one active listener");return f.addEventListener(ih,j),g=k,()=>{f.removeEventListener(ih,j),g=null}},createHref(k){return i(f,k)},createURL:S,encodeLocation(k){let M=S(k);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:v,replace:T,go(k){return h.go(k)}};return C}function ux(s,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Ye(r,"No window.location.(origin|href) available to create URL");let c=typeof s=="string"?s:Ol(s);return c=c.replace(/ $/,"%20"),!i&&c.startsWith("//")&&(c=r+c),new URL(c,r)}function qh(s,i,r="/"){return dx(s,i,r,!1)}function dx(s,i,r,c){let f=typeof i=="string"?Ss(i):i,d=Ra(f.pathname||"/",r);if(d==null)return null;let h=Vh(s);fx(h);let x=null;for(let g=0;x==null&&g<h.length;++g){let m=Sx(d);x=wx(h[g],m,c)}return x}function Vh(s,i=[],r=[],c=""){let f=(d,h,x)=>{let g={relativePath:x===void 0?d.path||"":x,caseSensitive:d.caseSensitive===!0,childrenIndex:h,route:d};g.relativePath.startsWith("/")&&(Ye(g.relativePath.startsWith(c),`Absolute route path "${g.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(c.length));let m=Aa([c,g.relativePath]),y=r.concat(g);d.children&&d.children.length>0&&(Ye(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Vh(d.children,i,y,m)),!(d.path==null&&!d.index)&&i.push({path:m,score:bx(m,d.index),routesMeta:y})};return s.forEach((d,h)=>{var x;if(d.path===""||!((x=d.path)!=null&&x.includes("?")))f(d,h);else for(let g of Gh(d.path))f(d,h,g)}),i}function Gh(s){let i=s.split("/");if(i.length===0)return[];let[r,...c]=i,f=r.endsWith("?"),d=r.replace(/\?$/,"");if(c.length===0)return f?[d,""]:[d];let h=Gh(c.join("/")),x=[];return x.push(...h.map(g=>g===""?d:[d,g].join("/"))),f&&x.push(...h),x.map(g=>s.startsWith("/")&&g===""?"/":g)}function fx(s){s.sort((i,r)=>i.score!==r.score?r.score-i.score:vx(i.routesMeta.map(c=>c.childrenIndex),r.routesMeta.map(c=>c.childrenIndex)))}var mx=/^:[\w-]+$/,hx=3,gx=2,px=1,xx=10,yx=-2,ch=s=>s==="*";function bx(s,i){let r=s.split("/"),c=r.length;return r.some(ch)&&(c+=yx),i&&(c+=gx),r.filter(f=>!ch(f)).reduce((f,d)=>f+(mx.test(d)?hx:d===""?px:xx),c)}function vx(s,i){return s.length===i.length&&s.slice(0,-1).every((c,f)=>c===i[f])?s[s.length-1]-i[i.length-1]:0}function wx(s,i,r=!1){let{routesMeta:c}=s,f={},d="/",h=[];for(let x=0;x<c.length;++x){let g=c[x],m=x===c.length-1,y=d==="/"?i:i.slice(d.length)||"/",j=ui({path:g.relativePath,caseSensitive:g.caseSensitive,end:m},y),v=g.route;if(!j&&m&&r&&!c[c.length-1].route.index&&(j=ui({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!j)return null;Object.assign(f,j.params),h.push({params:f,pathname:Aa([d,j.pathname]),pathnameBase:kx(Aa([d,j.pathnameBase])),route:v}),j.pathnameBase!=="/"&&(d=Aa([d,j.pathnameBase]))}return h}function ui(s,i){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[r,c]=jx(s.path,s.caseSensitive,s.end),f=i.match(r);if(!f)return null;let d=f[0],h=d.replace(/(.)\/+$/,"$1"),x=f.slice(1);return{params:c.reduce((m,{paramName:y,isOptional:j},v)=>{if(y==="*"){let S=x[v]||"";h=d.slice(0,d.length-S.length).replace(/(.)\/+$/,"$1")}const T=x[v];return j&&!T?m[y]=void 0:m[y]=(T||"").replace(/%2F/g,"/"),m},{}),pathname:d,pathnameBase:h,pattern:s}}function jx(s,i=!1,r=!0){ea(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let c=[],f="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,x,g)=>(c.push({paramName:x,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)"));return s.endsWith("*")?(c.push({paramName:"*"}),f+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?f+="\\/*$":s!==""&&s!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,i?void 0:"i"),c]}function Sx(s){try{return s.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return ea(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),s}}function Ra(s,i){if(i==="/")return s;if(!s.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,c=s.charAt(r);return c&&c!=="/"?null:s.slice(r)||"/"}function Nx(s,i="/"){let{pathname:r,search:c="",hash:f=""}=typeof s=="string"?Ss(s):s;return{pathname:r?r.startsWith("/")?r:Cx(r,i):i,search:Tx(c),hash:Ax(f)}}function Cx(s,i){let r=i.replace(/\/+$/,"").split("/");return s.split("/").forEach(f=>{f===".."?r.length>1&&r.pop():f!=="."&&r.push(f)}),r.length>1?r.join("/"):"/"}function Uc(s,i,r,c){return`Cannot include a '${s}' character in a manually specified \`to.${i}\` field [${JSON.stringify(c)}]. 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 Ex(s){return s.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function Ic(s){let i=Ex(s);return i.map((r,c)=>c===i.length-1?r.pathname:r.pathnameBase)}function Wc(s,i,r,c=!1){let f;typeof s=="string"?f=Ss(s):(f={...s},Ye(!f.pathname||!f.pathname.includes("?"),Uc("?","pathname","search",f)),Ye(!f.pathname||!f.pathname.includes("#"),Uc("#","pathname","hash",f)),Ye(!f.search||!f.search.includes("#"),Uc("#","search","hash",f)));let d=s===""||f.pathname==="",h=d?"/":f.pathname,x;if(h==null)x=r;else{let j=i.length-1;if(!c&&h.startsWith("..")){let v=h.split("/");for(;v[0]==="..";)v.shift(),j-=1;f.pathname=v.join("/")}x=j>=0?i[j]:"/"}let g=Nx(f,x),m=h&&h!=="/"&&h.endsWith("/"),y=(d||h===".")&&r.endsWith("/");return!g.pathname.endsWith("/")&&(m||y)&&(g.pathname+="/"),g}var Aa=s=>s.join("/").replace(/\/\/+/g,"/"),kx=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),Tx=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Ax=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function Rx(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}var $h=["POST","PUT","PATCH","DELETE"];new Set($h);var Ox=["GET",...$h];new Set(Ox);var Ns=w.createContext(null);Ns.displayName="DataRouter";var gi=w.createContext(null);gi.displayName="DataRouterState";var Kh=w.createContext({isTransitioning:!1});Kh.displayName="ViewTransition";var Mx=w.createContext(new Map);Mx.displayName="Fetchers";var zx=w.createContext(null);zx.displayName="Await";var ta=w.createContext(null);ta.displayName="Navigation";var Dl=w.createContext(null);Dl.displayName="Location";var Kt=w.createContext({outlet:null,matches:[],isDataRoute:!1});Kt.displayName="Route";var eu=w.createContext(null);eu.displayName="RouteError";function Dx(s,{relative:i}={}){Ye(Cs(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:c}=w.useContext(ta),{hash:f,pathname:d,search:h}=Ul(s,{relative:i}),x=d;return r!=="/"&&(x=d==="/"?r:Aa([r,d])),c.createHref({pathname:x,search:h,hash:f})}function Cs(){return w.useContext(Dl)!=null}function da(){return Ye(Cs(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Dl).location}var Yh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Xh(s){w.useContext(ta).static||w.useLayoutEffect(s)}function Rn(){let{isDataRoute:s}=w.useContext(Kt);return s?Fx():Ux()}function Ux(){Ye(Cs(),"useNavigate() may be used only in the context of a <Router> component.");let s=w.useContext(Ns),{basename:i,navigator:r}=w.useContext(ta),{matches:c}=w.useContext(Kt),{pathname:f}=da(),d=JSON.stringify(Ic(c)),h=w.useRef(!1);return Xh(()=>{h.current=!0}),w.useCallback((g,m={})=>{if(ea(h.current,Yh),!h.current)return;if(typeof g=="number"){r.go(g);return}let y=Wc(g,JSON.parse(d),f,m.relative==="path");s==null&&i!=="/"&&(y.pathname=y.pathname==="/"?i:Aa([i,y.pathname])),(m.replace?r.replace:r.push)(y,m.state,m)},[i,r,d,f,s])}var Lx=w.createContext(null);function _x(s){let i=w.useContext(Kt).outlet;return i&&w.createElement(Lx.Provider,{value:s},i)}function Hx(){let{matches:s}=w.useContext(Kt),i=s[s.length-1];return i?i.params:{}}function Ul(s,{relative:i}={}){let{matches:r}=w.useContext(Kt),{pathname:c}=da(),f=JSON.stringify(Ic(r));return w.useMemo(()=>Wc(s,JSON.parse(f),c,i==="path"),[s,f,c,i])}function Bx(s,i){return Qh(s,i)}function Qh(s,i,r,c){var M;Ye(Cs(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=w.useContext(ta),{matches:d}=w.useContext(Kt),h=d[d.length-1],x=h?h.params:{},g=h?h.pathname:"/",m=h?h.pathnameBase:"/",y=h&&h.route;{let A=y&&y.path||"";Ph(g,!y||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${g}" (under <Route path="${A}">) 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="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let j=da(),v;if(i){let A=typeof i=="string"?Ss(i):i;Ye(m==="/"||((M=A.pathname)==null?void 0:M.startsWith(m)),`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 "${m}" but pathname "${A.pathname}" was given in the \`location\` prop.`),v=A}else v=j;let T=v.pathname||"/",S=T;if(m!=="/"){let A=m.replace(/^\//,"").split("/");S="/"+T.replace(/^\//,"").split("/").slice(A.length).join("/")}let C=qh(s,{pathname:S});ea(y||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),ea(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 "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=Kx(C&&C.map(A=>Object.assign({},A,{params:Object.assign({},x,A.params),pathname:Aa([m,f.encodeLocation?f.encodeLocation(A.pathname).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?m:Aa([m,f.encodeLocation?f.encodeLocation(A.pathnameBase).pathname:A.pathnameBase])})),d,r,c);return i&&k?w.createElement(Dl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...v},navigationType:"POP"}},k):k}function qx(){let s=Zx(),i=Rx(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),r=s instanceof Error?s.stack:null,c="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:c},d={padding:"2px 4px",backgroundColor:c},h=null;return console.error("Error handled by React Router default ErrorBoundary:",s),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:d},"ErrorBoundary")," or"," ",w.createElement("code",{style:d},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},i),r?w.createElement("pre",{style:f},r):null,h)}var Vx=w.createElement(qx,null),Gx=class extends w.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,i){return i.location!==s.location||i.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:i.error,location:i.location,revalidation:s.revalidation||i.revalidation}}componentDidCatch(s,i){console.error("React Router caught the following error during render",s,i)}render(){return this.state.error!==void 0?w.createElement(Kt.Provider,{value:this.props.routeContext},w.createElement(eu.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function $x({routeContext:s,match:i,children:r}){let c=w.useContext(Ns);return c&&c.static&&c.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=i.route.id),w.createElement(Kt.Provider,{value:s},r)}function Kx(s,i=[],r=null,c=null){if(s==null){if(!r)return null;if(r.errors)s=r.matches;else if(i.length===0&&!r.initialized&&r.matches.length>0)s=r.matches;else return null}let f=s,d=r==null?void 0:r.errors;if(d!=null){let g=f.findIndex(m=>m.route.id&&(d==null?void 0:d[m.route.id])!==void 0);Ye(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,g+1))}let h=!1,x=-1;if(r)for(let g=0;g<f.length;g++){let m=f[g];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(x=g),m.route.id){let{loaderData:y,errors:j}=r,v=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!j||j[m.route.id]===void 0);if(m.route.lazy||v){h=!0,x>=0?f=f.slice(0,x+1):f=[f[0]];break}}}return f.reduceRight((g,m,y)=>{let j,v=!1,T=null,S=null;r&&(j=d&&m.route.id?d[m.route.id]:void 0,T=m.route.errorElement||Vx,h&&(x<0&&y===0?(Ph("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,S=null):x===y&&(v=!0,S=m.route.hydrateFallbackElement||null)));let C=i.concat(f.slice(0,y+1)),k=()=>{let M;return j?M=T:v?M=S:m.route.Component?M=w.createElement(m.route.Component,null):m.route.element?M=m.route.element:M=g,w.createElement($x,{match:m,routeContext:{outlet:g,matches:C,isDataRoute:r!=null},children:M})};return r&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?w.createElement(Gx,{location:r.location,revalidation:r.revalidation,component:T,error:j,children:k(),routeContext:{outlet:null,matches:C,isDataRoute:!0}}):k()},null)}function tu(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yx(s){let i=w.useContext(Ns);return Ye(i,tu(s)),i}function Xx(s){let i=w.useContext(gi);return Ye(i,tu(s)),i}function Qx(s){let i=w.useContext(Kt);return Ye(i,tu(s)),i}function au(s){let i=Qx(s),r=i.matches[i.matches.length-1];return Ye(r.route.id,`${s} can only be used on routes that contain a unique "id"`),r.route.id}function Px(){return au("useRouteId")}function Zx(){var c;let s=w.useContext(eu),i=Xx("useRouteError"),r=au("useRouteError");return s!==void 0?s:(c=i.errors)==null?void 0:c[r]}function Fx(){let{router:s}=Yx("useNavigate"),i=au("useNavigate"),r=w.useRef(!1);return Xh(()=>{r.current=!0}),w.useCallback(async(f,d={})=>{ea(r.current,Yh),r.current&&(typeof f=="number"?s.navigate(f):await s.navigate(f,{fromRouteId:i,...d}))},[s,i])}var uh={};function Ph(s,i,r){!i&&!uh[s]&&(uh[s]=!0,ea(!1,r))}w.memo(Jx);function Jx({routes:s,future:i,state:r}){return Qh(s,void 0,r,i)}function Zh({to:s,replace:i,state:r,relative:c}){Ye(Cs(),"<Navigate> may be used only in the context of a <Router> component.");let{static:f}=w.useContext(ta);ea(!f,"<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:d}=w.useContext(Kt),{pathname:h}=da(),x=Rn(),g=Wc(s,Ic(d),h,c==="path"),m=JSON.stringify(g);return w.useEffect(()=>{x(JSON.parse(m),{replace:i,state:r,relative:c})},[x,m,c,i,r]),null}function Fh(s){return _x(s.context)}function $t(s){Ye(!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 Ix({basename:s="/",children:i=null,location:r,navigationType:c="POP",navigator:f,static:d=!1}){Ye(!Cs(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=s.replace(/^\/*/,"/"),x=w.useMemo(()=>({basename:h,navigator:f,static:d,future:{}}),[h,f,d]);typeof r=="string"&&(r=Ss(r));let{pathname:g="/",search:m="",hash:y="",state:j=null,key:v="default"}=r,T=w.useMemo(()=>{let S=Ra(g,h);return S==null?null:{location:{pathname:S,search:m,hash:y,state:j,key:v},navigationType:c}},[h,g,m,y,j,v,c]);return ea(T!=null,`<Router basename="${h}"> is not able to match the URL "${g}${m}${y}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:w.createElement(ta.Provider,{value:x},w.createElement(Dl.Provider,{children:i,value:T}))}function Wx({children:s,location:i}){return Bx(Gc(s),i)}function Gc(s,i=[]){let r=[];return w.Children.forEach(s,(c,f)=>{if(!w.isValidElement(c))return;let d=[...i,f];if(c.type===w.Fragment){r.push.apply(r,Gc(c.props.children,d));return}Ye(c.type===$t,`[${typeof c.type=="string"?c.type:c.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ye(!c.props.index||!c.props.children,"An index route cannot have child routes.");let h={id:c.props.id||d.join("-"),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&&(h.children=Gc(c.props.children,d)),r.push(h)}),r}var oi="get",ci="application/x-www-form-urlencoded";function pi(s){return s!=null&&typeof s.tagName=="string"}function ey(s){return pi(s)&&s.tagName.toLowerCase()==="button"}function ty(s){return pi(s)&&s.tagName.toLowerCase()==="form"}function ay(s){return pi(s)&&s.tagName.toLowerCase()==="input"}function ny(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function sy(s,i){return s.button===0&&(!i||i==="_self")&&!ny(s)}var ai=null;function ly(){if(ai===null)try{new FormData(document.createElement("form"),0),ai=!1}catch{ai=!0}return ai}var ry=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Lc(s){return s!=null&&!ry.has(s)?(ea(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ci}"`),null):s}function iy(s,i){let r,c,f,d,h;if(ty(s)){let x=s.getAttribute("action");c=x?Ra(x,i):null,r=s.getAttribute("method")||oi,f=Lc(s.getAttribute("enctype"))||ci,d=new FormData(s)}else if(ey(s)||ay(s)&&(s.type==="submit"||s.type==="image")){let x=s.form;if(x==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=s.getAttribute("formaction")||x.getAttribute("action");if(c=g?Ra(g,i):null,r=s.getAttribute("formmethod")||x.getAttribute("method")||oi,f=Lc(s.getAttribute("formenctype"))||Lc(x.getAttribute("enctype"))||ci,d=new FormData(x,s),!ly()){let{name:m,type:y,value:j}=s;if(y==="image"){let v=m?`${m}.`:"";d.append(`${v}x`,"0"),d.append(`${v}y`,"0")}else m&&d.append(m,j)}}else{if(pi(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=oi,c=null,f=ci,h=s}return d&&f==="text/plain"&&(h=d,d=void 0),{action:c,method:r.toLowerCase(),encType:f,formData:d,body:h}}function nu(s,i){if(s===!1||s===null||typeof s>"u")throw new Error(i)}async function oy(s,i){if(s.id in i)return i[s.id];try{let r=await import(s.module);return i[s.id]=r,r}catch(r){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function cy(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function uy(s,i,r){let c=await Promise.all(s.map(async f=>{let d=i.routes[f.route.id];if(d){let h=await oy(d,r);return h.links?h.links():[]}return[]}));return hy(c.flat(1).filter(cy).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function dh(s,i,r,c,f,d){let h=(g,m)=>r[m]?g.route.id!==r[m].route.id:!0,x=(g,m)=>{var y;return r[m].pathname!==g.pathname||((y=r[m].route.path)==null?void 0:y.endsWith("*"))&&r[m].params["*"]!==g.params["*"]};return d==="assets"?i.filter((g,m)=>h(g,m)||x(g,m)):d==="data"?i.filter((g,m)=>{var j;let y=c.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(h(g,m)||x(g,m))return!0;if(g.route.shouldRevalidate){let v=g.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((j=r[0])==null?void 0:j.params)||{},nextUrl:new URL(s,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function dy(s,i,{includeHydrateFallback:r}={}){return fy(s.map(c=>{let f=i.routes[c.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),r&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function fy(s){return[...new Set(s)]}function my(s){let i={},r=Object.keys(s).sort();for(let c of r)i[c]=s[c];return i}function hy(s,i){let r=new Set;return new Set(i),s.reduce((c,f)=>{let d=JSON.stringify(my(f));return r.has(d)||(r.add(d),c.push({key:d,link:f})),c},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var gy=new Set([100,101,204,205]);function py(s,i){let r=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return r.pathname==="/"?r.pathname="_root.data":i&&Ra(r.pathname,i)==="/"?r.pathname=`${i.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}function Jh(){let s=w.useContext(Ns);return nu(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function xy(){let s=w.useContext(gi);return nu(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var su=w.createContext(void 0);su.displayName="FrameworkContext";function Ih(){let s=w.useContext(su);return nu(s,"You must render this element inside a <HydratedRouter> element"),s}function yy(s,i){let r=w.useContext(su),[c,f]=w.useState(!1),[d,h]=w.useState(!1),{onFocus:x,onBlur:g,onMouseEnter:m,onMouseLeave:y,onTouchStart:j}=i,v=w.useRef(null);w.useEffect(()=>{if(s==="render"&&h(!0),s==="viewport"){let C=M=>{M.forEach(A=>{h(A.isIntersecting)})},k=new IntersectionObserver(C,{threshold:.5});return v.current&&k.observe(v.current),()=>{k.disconnect()}}},[s]),w.useEffect(()=>{if(c){let C=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(C)}}},[c]);let T=()=>{f(!0)},S=()=>{f(!1),h(!1)};return r?s!=="intent"?[d,v,{}]:[d,v,{onFocus:kl(x,T),onBlur:kl(g,S),onMouseEnter:kl(m,T),onMouseLeave:kl(y,S),onTouchStart:kl(j,T)}]:[!1,v,{}]}function kl(s,i){return r=>{s&&s(r),r.defaultPrevented||i(r)}}function by({page:s,...i}){let{router:r}=Jh(),c=w.useMemo(()=>qh(r.routes,s,r.basename),[r.routes,s,r.basename]);return c?w.createElement(wy,{page:s,matches:c,...i}):null}function vy(s){let{manifest:i,routeModules:r}=Ih(),[c,f]=w.useState([]);return w.useEffect(()=>{let d=!1;return uy(s,i,r).then(h=>{d||f(h)}),()=>{d=!0}},[s,i,r]),c}function wy({page:s,matches:i,...r}){let c=da(),{manifest:f,routeModules:d}=Ih(),{basename:h}=Jh(),{loaderData:x,matches:g}=xy(),m=w.useMemo(()=>dh(s,i,g,f,c,"data"),[s,i,g,f,c]),y=w.useMemo(()=>dh(s,i,g,f,c,"assets"),[s,i,g,f,c]),j=w.useMemo(()=>{if(s===c.pathname+c.search+c.hash)return[];let S=new Set,C=!1;if(i.forEach(M=>{var L;let A=f.routes[M.route.id];!A||!A.hasLoader||(!m.some(q=>q.route.id===M.route.id)&&M.route.id in x&&((L=d[M.route.id])!=null&&L.shouldRevalidate)||A.hasClientLoader?C=!0:S.add(M.route.id))}),S.size===0)return[];let k=py(s,h);return C&&S.size>0&&k.searchParams.set("_routes",i.filter(M=>S.has(M.route.id)).map(M=>M.route.id).join(",")),[k.pathname+k.search]},[h,x,c,f,m,i,s,d]),v=w.useMemo(()=>dy(y,f),[y,f]),T=vy(y);return w.createElement(w.Fragment,null,j.map(S=>w.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),v.map(S=>w.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),T.map(({key:S,link:C})=>w.createElement("link",{key:S,...C})))}function jy(...s){return i=>{s.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var Wh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Wh&&(window.__reactRouterVersion="7.6.1")}catch{}function Sy({basename:s,children:i,window:r}){let c=w.useRef();c.current==null&&(c.current=ix({window:r,v5Compat:!0}));let f=c.current,[d,h]=w.useState({action:f.action,location:f.location}),x=w.useCallback(g=>{w.startTransition(()=>h(g))},[h]);return w.useLayoutEffect(()=>f.listen(x),[f,x]),w.createElement(Ix,{basename:s,children:i,location:d.location,navigationType:d.action,navigator:f})}var eg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tg=w.forwardRef(function({onClick:i,discover:r="render",prefetch:c="none",relative:f,reloadDocument:d,replace:h,state:x,target:g,to:m,preventScrollReset:y,viewTransition:j,...v},T){let{basename:S}=w.useContext(ta),C=typeof m=="string"&&eg.test(m),k,M=!1;if(typeof m=="string"&&C&&(k=m,Wh))try{let W=new URL(window.location.href),B=m.startsWith("//")?new URL(W.protocol+m):new URL(m),V=Ra(B.pathname,S);B.origin===W.origin&&V!=null?m=V+B.search+B.hash:M=!0}catch{ea(!1,`<Link to="${m}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let A=Dx(m,{relative:f}),[L,q,$]=yy(c,v),ce=Ey(m,{replace:h,state:x,target:g,preventScrollReset:y,relative:f,viewTransition:j});function P(W){i&&i(W),W.defaultPrevented||ce(W)}let Y=w.createElement("a",{...v,...$,href:k||A,onClick:M||d?i:P,ref:jy(T,q),target:g,"data-discover":!C&&r==="render"?"true":void 0});return L&&!C?w.createElement(w.Fragment,null,Y,w.createElement(by,{page:A})):Y});tg.displayName="Link";var ag=w.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:c="",end:f=!1,style:d,to:h,viewTransition:x,children:g,...m},y){let j=Ul(h,{relative:m.relative}),v=da(),T=w.useContext(gi),{navigator:S,basename:C}=w.useContext(ta),k=T!=null&&Oy(j)&&x===!0,M=S.encodeLocation?S.encodeLocation(j).pathname:j.pathname,A=v.pathname,L=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;r||(A=A.toLowerCase(),L=L?L.toLowerCase():null,M=M.toLowerCase()),L&&C&&(L=Ra(L,C)||L);const q=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let $=A===M||!f&&A.startsWith(M)&&A.charAt(q)==="/",ce=L!=null&&(L===M||!f&&L.startsWith(M)&&L.charAt(M.length)==="/"),P={isActive:$,isPending:ce,isTransitioning:k},Y=$?i:void 0,W;typeof c=="function"?W=c(P):W=[c,$?"active":null,ce?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let B=typeof d=="function"?d(P):d;return w.createElement(tg,{...m,"aria-current":Y,className:W,ref:y,style:B,to:h,viewTransition:x},typeof g=="function"?g(P):g)});ag.displayName="NavLink";var Ny=w.forwardRef(({discover:s="render",fetcherKey:i,navigate:r,reloadDocument:c,replace:f,state:d,method:h=oi,action:x,onSubmit:g,relative:m,preventScrollReset:y,viewTransition:j,...v},T)=>{let S=Ay(),C=Ry(x,{relative:m}),k=h.toLowerCase()==="get"?"get":"post",M=typeof x=="string"&&eg.test(x),A=L=>{if(g&&g(L),L.defaultPrevented)return;L.preventDefault();let q=L.nativeEvent.submitter,$=(q==null?void 0:q.getAttribute("formmethod"))||h;S(q||L.currentTarget,{fetcherKey:i,method:$,navigate:r,replace:f,state:d,relative:m,preventScrollReset:y,viewTransition:j})};return w.createElement("form",{ref:T,method:k,action:C,onSubmit:c?g:A,...v,"data-discover":!M&&s==="render"?"true":void 0})});Ny.displayName="Form";function Cy(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ng(s){let i=w.useContext(Ns);return Ye(i,Cy(s)),i}function Ey(s,{target:i,replace:r,state:c,preventScrollReset:f,relative:d,viewTransition:h}={}){let x=Rn(),g=da(),m=Ul(s,{relative:d});return w.useCallback(y=>{if(sy(y,i)){y.preventDefault();let j=r!==void 0?r:Ol(g)===Ol(m);x(s,{replace:j,state:c,preventScrollReset:f,relative:d,viewTransition:h})}},[g,x,m,r,c,i,s,f,d,h])}var ky=0,Ty=()=>`__${String(++ky)}__`;function Ay(){let{router:s}=ng("useSubmit"),{basename:i}=w.useContext(ta),r=Px();return w.useCallback(async(c,f={})=>{let{action:d,method:h,encType:x,formData:g,body:m}=iy(c,i);if(f.navigate===!1){let y=f.fetcherKey||Ty();await s.fetch(y,r,f.action||d,{preventScrollReset:f.preventScrollReset,formData:g,body:m,formMethod:f.method||h,formEncType:f.encType||x,flushSync:f.flushSync})}else await s.navigate(f.action||d,{preventScrollReset:f.preventScrollReset,formData:g,body:m,formMethod:f.method||h,formEncType:f.encType||x,replace:f.replace,state:f.state,fromRouteId:r,flushSync:f.flushSync,viewTransition:f.viewTransition})},[s,i,r])}function Ry(s,{relative:i}={}){let{basename:r}=w.useContext(ta),c=w.useContext(Kt);Ye(c,"useFormAction must be used inside a RouteContext");let[f]=c.matches.slice(-1),d={...Ul(s||".",{relative:i})},h=da();if(s==null){d.search=h.search;let x=new URLSearchParams(d.search),g=x.getAll("index");if(g.some(y=>y==="")){x.delete("index"),g.filter(j=>j).forEach(j=>x.append("index",j));let y=x.toString();d.search=y?`?${y}`:""}}return(!s||s===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(d.pathname=d.pathname==="/"?r:Aa([r,d.pathname])),Ol(d)}function Oy(s,i={}){let r=w.useContext(Kh);Ye(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=ng("useViewTransitionState"),f=Ul(s,{relative:i.relative});if(!r.isTransitioning)return!1;let d=Ra(r.currentLocation.pathname,c)||r.currentLocation.pathname,h=Ra(r.nextLocation.pathname,c)||r.nextLocation.pathname;return ui(f.pathname,h)!=null||ui(f.pathname,d)!=null}[...gy];const My=()=>window.__MCPHUB_CONFIG__||{basePath:"",version:"dev",name:"mcphub"},lu=()=>{const i=My().basePath||"";return i&&!i.startsWith("/")?"/"+i:i},zy=()=>lu()+"/api",Ne=s=>{const i=zy(),r=s.startsWith("/")?s:"/"+s;return i+r},Dy=async()=>{try{const s=window.location.pathname,i=[s.replace(/\/[^/]*$/,"")+"/config","/config",...s.includes("/")?[s.split("/")[1]?`/${s.split("/")[1]}/config`:"/config"]:["/config"]];for(const r of i)try{const c=await fetch(r,{method:"GET",headers:{Accept:"application/json","Cache-Control":"no-cache"}});if(c.ok){const f=await c.json();if(f.success&&f.data)return f.data}}catch(c){console.debug(`Failed to load config from ${r}:`,c)}return console.warn("Could not load runtime config from server, using defaults"),{basePath:"",version:"dev",name:"mcphub"}}catch(s){return console.error("Error loading runtime config:",s),{basePath:"",version:"dev",name:"mcphub"}}},ru="mcphub_token",nn=()=>localStorage.getItem(ru),sg=s=>{localStorage.setItem(ru,s)},$c=()=>{localStorage.removeItem(ru)},Uy=async s=>{try{console.log(Ne("/auth/login"));const r=await(await fetch(Ne("/auth/login"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();return r.success&&r.token&&sg(r.token),r}catch(i){return console.error("Login error:",i),{success:!1,message:"An error occurred during login"}}},Ly=async s=>{try{const r=await(await fetch(Ne("/auth/register"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).json();return r.success&&r.token&&sg(r.token),r}catch(i){return console.error("Register error:",i),{success:!1,message:"An error occurred during registration"}}},_y=async()=>{const s=nn();if(!s)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ne("/auth/user"),{method:"GET",headers:{"x-auth-token":s}})).json()}catch(i){return console.error("Get current user error:",i),{success:!1,message:"An error occurred while fetching user data"}}},Hy=async s=>{const i=nn();if(!i)return{success:!1,message:"No authentication token"};try{return await(await fetch(Ne("/auth/change-password"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":i},body:JSON.stringify(s)})).json()}catch(r){return console.error("Change password error:",r),{success:!1,message:"An error occurred while changing password"}}},By=()=>{$c()},qy=async()=>{var s;try{const i=lu(),r=await fetch(`${i}/public-config`,{method:"GET",headers:{"Content-Type":"application/json"}});return r.ok?{skipAuth:((s=(await r.json()).data)==null?void 0:s.skipAuth)===!0}:{skipAuth:!1}}catch(i){return console.debug("Failed to get public config:",i),{skipAuth:!1}}},Vy=async()=>{try{return(await qy()).skipAuth}catch(s){return console.debug("Failed to check skipAuth setting:",s),!1}},ca={isAuthenticated:!1,loading:!0,user:null,error:null},lg=w.createContext({auth:ca,login:async()=>!1,register:async()=>!1,logout:()=>{}}),Gy=({children:s})=>{const[i,r]=w.useState(ca);w.useEffect(()=>{(async()=>{if(await Vy()){r({isAuthenticated:!0,loading:!1,user:{username:"guest",isAdmin:!0},error:null});return}if(!nn()){r({...ca,loading:!1});return}try{const m=await _y();m.success&&m.user?r({isAuthenticated:!0,loading:!1,user:m.user,error:null}):($c(),r({...ca,loading:!1}))}catch{$c(),r({...ca,loading:!1})}})()},[]);const c=async(h,x)=>{try{const g=await Uy({username:h,password:x});return g.success&&g.token&&g.user?(r({isAuthenticated:!0,loading:!1,user:g.user,error:null}),!0):(r({...ca,loading:!1,error:g.message||"Authentication failed"}),!1)}catch{return r({...ca,loading:!1,error:"Authentication failed"}),!1}},f=async(h,x,g=!1)=>{try{const m=await Ly({username:h,password:x,isAdmin:g});return m.success&&m.token&&m.user?(r({isAuthenticated:!0,loading:!1,user:m.user,error:null}),!0):(r({...ca,loading:!1,error:m.message||"Registration failed"}),!1)}catch{return r({...ca,loading:!1,error:"Registration failed"}),!1}},d=()=>{By(),r({...ca,loading:!1})};return l.jsx(lg.Provider,{value:{auth:i,login:c,register:f,logout:d},children:s})},xi=()=>w.useContext(lg);/**
|
|
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=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ky=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,c)=>c?c.toUpperCase():r.toLowerCase()),fh=s=>{const i=Ky(s);return i.charAt(0).toUpperCase()+i.slice(1)},rg=(...s)=>s.filter((i,r,c)=>!!i&&i.trim()!==""&&c.indexOf(i)===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 Yy={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 Xy=w.forwardRef(({color:s="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:c,className:f="",children:d,iconNode:h,...x},g)=>w.createElement("svg",{ref:g,...Yy,width:i,height:i,stroke:s,strokeWidth:c?Number(r)*24/Number(i):r,className:rg("lucide",f),...x},[...h.map(([m,y])=>w.createElement(m,y)),...Array.isArray(d)?d:[d]]));/**
|
|
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 lt=(s,i)=>{const r=w.forwardRef(({className:c,...f},d)=>w.createElement(Xy,{ref:d,iconNode:i,className:rg(`lucide-${$y(fh(s))}`,`lucide-${s}`,c),...f}));return r.displayName=fh(s),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 Qy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yi=lt("check",Qy);/**
|
|
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 Py=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ig=lt("chevron-down",Py);/**
|
|
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 Zy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],og=lt("chevron-right",Zy);/**
|
|
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 Fy=[["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"}]],cg=lt("circle-alert",Fy);/**
|
|
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 Jy=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Iy=lt("circle-check-big",Jy);/**
|
|
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 Wy=[["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"}]],eb=lt("circle-x",Wy);/**
|
|
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 tb=[["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"}]],ug=lt("copy",tb);/**
|
|
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 ab=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],nb=lt("info",ab);/**
|
|
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 sb=[["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"}]],lb=lt("loader",sb);/**
|
|
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 rb=[["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"}]],ib=lt("log-out",rb);/**
|
|
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 ob=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],cb=lt("moon",ob);/**
|
|
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 ub=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],db=lt("play",ub);/**
|
|
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 fb=[["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"}]],mb=lt("refresh-cw",fb);/**
|
|
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 hb=[["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"}]],gb=lt("settings",hb);/**
|
|
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 pb=[["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"}]],dg=lt("square-pen",pb);/**
|
|
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 xb=[["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"}]],yb=lt("sun",xb);/**
|
|
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 bb=[["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"}]],vb=lt("trash",bb);/**
|
|
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 wb=[["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"}]],jb=lt("user",wb);/**
|
|
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 Sb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ml=lt("x",Sb);function fg(s){var i,r,c="";if(typeof s=="string"||typeof s=="number")c+=s;else if(typeof s=="object")if(Array.isArray(s)){var f=s.length;for(i=0;i<f;i++)s[i]&&(r=fg(s[i]))&&(c&&(c+=" "),c+=r)}else for(r in s)s[r]&&(c&&(c+=" "),c+=r);return c}function Nb(){for(var s,i,r=0,c="",f=arguments.length;r<f;r++)(s=arguments[r])&&(i=fg(s))&&(c&&(c+=" "),c+=i);return c}const iu="-",Cb=s=>{const i=kb(s),{conflictingClassGroups:r,conflictingClassGroupModifiers:c}=s;return{getClassGroupId:h=>{const x=h.split(iu);return x[0]===""&&x.length!==1&&x.shift(),mg(x,i)||Eb(h)},getConflictingClassGroupIds:(h,x)=>{const g=r[h]||[];return x&&c[h]?[...g,...c[h]]:g}}},mg=(s,i)=>{var h;if(s.length===0)return i.classGroupId;const r=s[0],c=i.nextPart.get(r),f=c?mg(s.slice(1),c):void 0;if(f)return f;if(i.validators.length===0)return;const d=s.join(iu);return(h=i.validators.find(({validator:x})=>x(d)))==null?void 0:h.classGroupId},mh=/^\[(.+)\]$/,Eb=s=>{if(mh.test(s)){const i=mh.exec(s)[1],r=i==null?void 0:i.substring(0,i.indexOf(":"));if(r)return"arbitrary.."+r}},kb=s=>{const{theme:i,classGroups:r}=s,c={nextPart:new Map,validators:[]};for(const f in r)Kc(r[f],c,f,i);return c},Kc=(s,i,r,c)=>{s.forEach(f=>{if(typeof f=="string"){const d=f===""?i:hh(i,f);d.classGroupId=r;return}if(typeof f=="function"){if(Tb(f)){Kc(f(c),i,r,c);return}i.validators.push({validator:f,classGroupId:r});return}Object.entries(f).forEach(([d,h])=>{Kc(h,hh(i,d),r,c)})})},hh=(s,i)=>{let r=s;return i.split(iu).forEach(c=>{r.nextPart.has(c)||r.nextPart.set(c,{nextPart:new Map,validators:[]}),r=r.nextPart.get(c)}),r},Tb=s=>s.isThemeGetter,Ab=s=>{if(s<1)return{get:()=>{},set:()=>{}};let i=0,r=new Map,c=new Map;const f=(d,h)=>{r.set(d,h),i++,i>s&&(i=0,c=r,r=new Map)};return{get(d){let h=r.get(d);if(h!==void 0)return h;if((h=c.get(d))!==void 0)return f(d,h),h},set(d,h){r.has(d)?r.set(d,h):f(d,h)}}},Yc="!",Xc=":",Rb=Xc.length,Ob=s=>{const{prefix:i,experimentalParseClassName:r}=s;let c=f=>{const d=[];let h=0,x=0,g=0,m;for(let S=0;S<f.length;S++){let C=f[S];if(h===0&&x===0){if(C===Xc){d.push(f.slice(g,S)),g=S+Rb;continue}if(C==="/"){m=S;continue}}C==="["?h++:C==="]"?h--:C==="("?x++:C===")"&&x--}const y=d.length===0?f:f.substring(g),j=Mb(y),v=j!==y,T=m&&m>g?m-g:void 0;return{modifiers:d,hasImportantModifier:v,baseClassName:j,maybePostfixModifierPosition:T}};if(i){const f=i+Xc,d=c;c=h=>h.startsWith(f)?d(h.substring(f.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:h,maybePostfixModifierPosition:void 0}}if(r){const f=c;c=d=>r({className:d,parseClassName:f})}return c},Mb=s=>s.endsWith(Yc)?s.substring(0,s.length-1):s.startsWith(Yc)?s.substring(1):s,zb=s=>{const i=Object.fromEntries(s.orderSensitiveModifiers.map(c=>[c,!0]));return c=>{if(c.length<=1)return c;const f=[];let d=[];return c.forEach(h=>{h[0]==="["||i[h]?(f.push(...d.sort(),h),d=[]):d.push(h)}),f.push(...d.sort()),f}},Db=s=>({cache:Ab(s.cacheSize),parseClassName:Ob(s),sortModifiers:zb(s),...Cb(s)}),Ub=/\s+/,Lb=(s,i)=>{const{parseClassName:r,getClassGroupId:c,getConflictingClassGroupIds:f,sortModifiers:d}=i,h=[],x=s.trim().split(Ub);let g="";for(let m=x.length-1;m>=0;m-=1){const y=x[m],{isExternal:j,modifiers:v,hasImportantModifier:T,baseClassName:S,maybePostfixModifierPosition:C}=r(y);if(j){g=y+(g.length>0?" "+g:g);continue}let k=!!C,M=c(k?S.substring(0,C):S);if(!M){if(!k){g=y+(g.length>0?" "+g:g);continue}if(M=c(S),!M){g=y+(g.length>0?" "+g:g);continue}k=!1}const A=d(v).join(":"),L=T?A+Yc:A,q=L+M;if(h.includes(q))continue;h.push(q);const $=f(M,k);for(let ce=0;ce<$.length;++ce){const P=$[ce];h.push(L+P)}g=y+(g.length>0?" "+g:g)}return g};function _b(){let s=0,i,r,c="";for(;s<arguments.length;)(i=arguments[s++])&&(r=hg(i))&&(c&&(c+=" "),c+=r);return c}const hg=s=>{if(typeof s=="string")return s;let i,r="";for(let c=0;c<s.length;c++)s[c]&&(i=hg(s[c]))&&(r&&(r+=" "),r+=i);return r};function Hb(s,...i){let r,c,f,d=h;function h(g){const m=i.reduce((y,j)=>j(y),s());return r=Db(m),c=r.cache.get,f=r.cache.set,d=x,x(g)}function x(g){const m=c(g);if(m)return m;const y=Lb(g,r);return f(g,y),y}return function(){return d(_b.apply(null,arguments))}}const st=s=>{const i=r=>r[s]||[];return i.isThemeGetter=!0,i},gg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,pg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Bb=/^\d+\/\d+$/,qb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vb=/\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$/,Gb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$b=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Kb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xs=s=>Bb.test(s),ke=s=>!!s&&!Number.isNaN(Number(s)),tn=s=>!!s&&Number.isInteger(Number(s)),_c=s=>s.endsWith("%")&&ke(s.slice(0,-1)),Ta=s=>qb.test(s),Yb=()=>!0,Xb=s=>Vb.test(s)&&!Gb.test(s),xg=()=>!1,Qb=s=>$b.test(s),Pb=s=>Kb.test(s),Zb=s=>!me(s)&&!he(s),Fb=s=>Es(s,vg,xg),me=s=>gg.test(s),Tn=s=>Es(s,wg,Xb),Hc=s=>Es(s,tv,ke),gh=s=>Es(s,yg,xg),Jb=s=>Es(s,bg,Pb),ni=s=>Es(s,jg,Qb),he=s=>pg.test(s),Tl=s=>ks(s,wg),Ib=s=>ks(s,av),ph=s=>ks(s,yg),Wb=s=>ks(s,vg),ev=s=>ks(s,bg),si=s=>ks(s,jg,!0),Es=(s,i,r)=>{const c=gg.exec(s);return c?c[1]?i(c[1]):r(c[2]):!1},ks=(s,i,r=!1)=>{const c=pg.exec(s);return c?c[1]?i(c[1]):r:!1},yg=s=>s==="position"||s==="percentage",bg=s=>s==="image"||s==="url",vg=s=>s==="length"||s==="size"||s==="bg-size",wg=s=>s==="length",tv=s=>s==="number",av=s=>s==="family-name",jg=s=>s==="shadow",nv=()=>{const s=st("color"),i=st("font"),r=st("text"),c=st("font-weight"),f=st("tracking"),d=st("leading"),h=st("breakpoint"),x=st("container"),g=st("spacing"),m=st("radius"),y=st("shadow"),j=st("inset-shadow"),v=st("text-shadow"),T=st("drop-shadow"),S=st("blur"),C=st("perspective"),k=st("aspect"),M=st("ease"),A=st("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...q(),he,me],ce=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],Y=()=>[he,me,g],W=()=>[xs,"full","auto",...Y()],B=()=>[tn,"none","subgrid",he,me],V=()=>["auto",{span:["full",tn,he,me]},tn,he,me],ae=()=>[tn,"auto",he,me],se=()=>["auto","min","max","fr",he,me],Z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...Y()],Q=()=>[xs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],z=()=>[s,he,me],ue=()=>[...q(),ph,gh,{position:[he,me]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",Wb,Fb,{size:[he,me]}],ne=()=>[_c,Tl,Tn],F=()=>["","none","full",m,he,me],re=()=>["",ke,Tl,Tn],je=()=>["solid","dashed","dotted","double"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],le=()=>[ke,_c,ph,gh],oe=()=>["","none",S,he,me],xe=()=>["none",ke,he,me],ye=()=>["none",ke,he,me],Me=()=>[ke,he,me],Ve=()=>[xs,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ta],breakpoint:[Ta],color:[Yb],container:[Ta],"drop-shadow":[Ta],ease:["in","out","in-out"],font:[Zb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ta],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ta],shadow:[Ta],spacing:["px",ke],text:[Ta],"text-shadow":[Ta],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xs,me,he,k]}],container:["container"],columns:[{columns:[ke,me,he,x]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:$()}],overflow:[{overflow:ce()}],"overflow-x":[{"overflow-x":ce()}],"overflow-y":[{"overflow-y":ce()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{start:W()}],end:[{end:W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[tn,"auto",he,me]}],basis:[{basis:[xs,"full","auto",x,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,xs,"auto","initial","none",me]}],grow:[{grow:["",ke,he,me]}],shrink:[{shrink:["",ke,he,me]}],order:[{order:[tn,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:V()}],"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:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...Z(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...Z()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":Z()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[x,"screen",...Q()]}],"min-w":[{"min-w":[x,"screen","none",...Q()]}],"max-w":[{"max-w":[x,"screen","none","prose",{screen:[h]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,Tl,Tn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[c,he,Hc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",_c,me]}],"font-family":[{font:[Ib,me,i]}],"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:[f,he,me]}],"line-clamp":[{"line-clamp":[ke,"none",he,Hc]}],leading:[{leading:[d,...Y()]}],"list-image":[{"list-image":["none",he,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...je(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",he,Tn]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[ke,"auto",he,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,me]}],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",he,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},tn,he,me],radial:["",he,me],conic:[tn,he,me]},ev,Jb]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...je(),"hidden","none"]}],"divide-style":[{divide:[...je(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...je(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,he,me]}],"outline-w":[{outline:["",ke,Tl,Tn]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",y,si,ni]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",j,si,ni]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[ke,Tn]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",v,si,ni]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[ke,he,me]}],"mix-blend":[{"mix-blend":[...te(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":te()}],"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":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":q()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:oe()}],brightness:[{brightness:[ke,he,me]}],contrast:[{contrast:[ke,he,me]}],"drop-shadow":[{"drop-shadow":["","none",T,si,ni]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",ke,he,me]}],"hue-rotate":[{"hue-rotate":[ke,he,me]}],invert:[{invert:["",ke,he,me]}],saturate:[{saturate:[ke,he,me]}],sepia:[{sepia:["",ke,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[ke,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[ke,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,he,me]}],"backdrop-invert":[{"backdrop-invert":["",ke,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[ke,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[ke,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,he,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",he,me]}],ease:[{ease:["linear","initial",M,he,me]}],delay:[{delay:[ke,he,me]}],animate:[{animate:["none",A,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,he,me]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ve()}],"translate-x":[{"translate-x":Ve()}],"translate-y":[{"translate-y":Ve()}],"translate-z":[{"translate-z":Ve()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",he,me]}],"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":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"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",he,me]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[ke,Tl,Tn,Hc]}],stroke:[{stroke:["none",...z()]}],"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"]}},sv=Hb(nv);function an(...s){return sv(Nb(s))}const lv=({message:s,type:i="info",duration:r=3e3,onClose:c,visible:f})=>{w.useEffect(()=>{if(f){const g=setTimeout(()=>{c()},r);return()=>clearTimeout(g)}},[f,r,c]);const d={success:l.jsx(yi,{className:"w-5 h-5 text-green-500"}),error:l.jsx(Ml,{className:"w-5 h-5 text-red-500"}),info:l.jsx("svg",{className:"w-5 h-5 text-blue-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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:l.jsx("svg",{className:"w-5 h-5 text-yellow-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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 l.jsx("div",{className:an("fixed top-4 right-4 z-50 max-w-sm p-4 rounded-md shadow-lg border",h[i],"transform transition-all duration-300 ease-in-out",f?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:l.jsxs("div",{className:"flex items-start",children:[l.jsx("div",{className:"flex-shrink-0",children:d[i]}),l.jsx("div",{className:"ml-3",children:l.jsx("p",{className:an("text-sm font-medium",x[i]),children:s})}),l.jsx("div",{className:"ml-auto pl-3",children:l.jsx("div",{className:"-mx-1.5 -my-1.5",children:l.jsxs("button",{onClick:c,className:an("inline-flex rounded-md p-1.5",`hover:bg-${i}-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-${i}-500`),children:[l.jsx("span",{className:"sr-only",children:"Dismiss"}),l.jsx(Ml,{className:"h-5 w-5"})]})})})]})})},Sg=w.createContext(void 0),Ll=()=>{const s=w.useContext(Sg);if(!s)throw new Error("useToast must be used within a ToastProvider");return s},rv=({children:s})=>{const[i,r]=w.useState({message:"",type:"info",visible:!1,duration:3e3}),c=w.useCallback((d,h="info",x=3e3)=>{r({message:d,type:h,visible:!0,duration:x})},[]),f=w.useCallback(()=>{r(d=>({...d,visible:!1}))},[]);return l.jsxs(Sg.Provider,{value:{showToast:c},children:[s,l.jsx(lv,{message:i.message,type:i.type,duration:i.duration,onClose:f,visible:i.visible})]})},Ng=w.createContext(void 0),iv=()=>{const s=w.useContext(Ng);if(!s)throw new Error("useTheme must be used within a ThemeProvider");return s},ov=({children:s})=>{const[i,r]=w.useState(()=>localStorage.getItem("theme")||"system"),[c,f]=w.useState("light"),d=h=>{r(h),localStorage.setItem("theme",h)};return w.useEffect(()=>{const h=()=>{const g=window.document.documentElement,m=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",y=i==="system"?m:i;f(y),y==="dark"?(console.log("Applying dark mode to HTML root element"),g.classList.add("dark"),document.body.style.backgroundColor="#111827"):(console.log("Removing dark mode from HTML root element"),g.classList.remove("dark"),document.body.style.backgroundColor="")},x=window.matchMedia("(prefers-color-scheme: dark)");return x.addEventListener("change",h),h(),()=>{x.removeEventListener("change",h)}},[i]),l.jsx(Ng.Provider,{value:{theme:i,setTheme:d,resolvedTheme:c},children:s})},cv=(s,i,r,c)=>{var d,h,x,g;const f=[r,{code:i,...c||{}}];if((h=(d=s==null?void 0:s.services)==null?void 0:d.logger)!=null&&h.forward)return s.services.logger.forward(f,"warn","react-i18next::",!0);An(f[0])&&(f[0]=`react-i18next:: ${f[0]}`),(g=(x=s==null?void 0:s.services)==null?void 0:x.logger)!=null&&g.warn?s.services.logger.warn(...f):console!=null&&console.warn&&console.warn(...f)},xh={},Qc=(s,i,r,c)=>{An(r)&&xh[r]||(An(r)&&(xh[r]=new Date),cv(s,i,r,c))},Cg=(s,i)=>()=>{if(s.isInitialized)i();else{const r=()=>{setTimeout(()=>{s.off("initialized",r)},0),i()};s.on("initialized",r)}},Pc=(s,i,r)=>{s.loadNamespaces(i,Cg(s,r))},yh=(s,i,r,c)=>{if(An(r)&&(r=[r]),s.options.preload&&s.options.preload.indexOf(i)>-1)return Pc(s,r,c);r.forEach(f=>{s.options.ns.indexOf(f)<0&&s.options.ns.push(f)}),s.loadLanguages(i,Cg(s,c))},uv=(s,i,r={})=>!i.languages||!i.languages.length?(Qc(i,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:i.languages}),!0):i.hasLoadedNamespace(s,{lng:r.lng,precheck:(c,f)=>{var d;if(((d=r.bindI18n)==null?void 0:d.indexOf("languageChanging"))>-1&&c.services.backendConnector.backend&&c.isLanguageChangingTo&&!f(c.isLanguageChangingTo,s))return!1}}),An=s=>typeof s=="string",dv=s=>typeof s=="object"&&s!==null,fv=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,mv={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},hv=s=>mv[s],gv=s=>s.replace(fv,hv);let Zc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:gv};const pv=(s={})=>{Zc={...Zc,...s}},xv=()=>Zc;let Eg;const yv=s=>{Eg=s},bv=()=>Eg,vv={type:"3rdParty",init(s){pv(s.options.react),yv(s)}},wv=w.createContext();class jv{constructor(){this.usedNamespaces={}}addUsedNamespaces(i){i.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Sv=(s,i)=>{const r=w.useRef();return w.useEffect(()=>{r.current=s},[s,i]),r.current},kg=(s,i,r,c)=>s.getFixedT(i,r,c),Nv=(s,i,r,c)=>w.useCallback(kg(s,i,r,c),[s,i,r,c]),Oe=(s,i={})=>{var q,$,ce,P;const{i18n:r}=i,{i18n:c,defaultNS:f}=w.useContext(wv)||{},d=r||c||bv();if(d&&!d.reportNamespaces&&(d.reportNamespaces=new jv),!d){Qc(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const Y=(B,V)=>An(V)?V:dv(V)&&An(V.defaultValue)?V.defaultValue:Array.isArray(B)?B[B.length-1]:B,W=[Y,{},!1];return W.t=Y,W.i18n={},W.ready=!1,W}(q=d.options.react)!=null&&q.wait&&Qc(d,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const h={...xv(),...d.options.react,...i},{useSuspense:x,keyPrefix:g}=h;let m=f||(($=d.options)==null?void 0:$.defaultNS);m=An(m)?[m]:m||["translation"],(P=(ce=d.reportNamespaces).addUsedNamespaces)==null||P.call(ce,m);const y=(d.isInitialized||d.initializedStoreOnce)&&m.every(Y=>uv(Y,d,h)),j=Nv(d,i.lng||null,h.nsMode==="fallback"?m:m[0],g),v=()=>j,T=()=>kg(d,i.lng||null,h.nsMode==="fallback"?m:m[0],g),[S,C]=w.useState(v);let k=m.join();i.lng&&(k=`${i.lng}${k}`);const M=Sv(k),A=w.useRef(!0);w.useEffect(()=>{const{bindI18n:Y,bindI18nStore:W}=h;A.current=!0,!y&&!x&&(i.lng?yh(d,i.lng,m,()=>{A.current&&C(T)}):Pc(d,m,()=>{A.current&&C(T)})),y&&M&&M!==k&&A.current&&C(T);const B=()=>{A.current&&C(T)};return Y&&(d==null||d.on(Y,B)),W&&(d==null||d.store.on(W,B)),()=>{A.current=!1,d&&(Y==null||Y.split(" ").forEach(V=>d.off(V,B))),W&&d&&W.split(" ").forEach(V=>d.store.off(V,B))}},[d,k]),w.useEffect(()=>{A.current&&y&&C(v)},[d,g,y]);const L=[S,d,y];if(L.t=S,L.i18n=d,L.ready=y,y||!y&&!x)return L;throw new Promise(Y=>{i.lng?yh(d,i.lng,m,()=>Y()):Pc(d,m,()=>Y())})},Tg=()=>{const{t:s}=Oe(),{theme:i,setTheme:r}=iv();return l.jsx("div",{className:"flex items-center space-x-2",children:l.jsxs("div",{className:"flex bg-gray-200 dark:bg-gray-700 rounded-lg p-1",children:[l.jsx("button",{onClick:()=>r("light"),className:`flex items-center justify-center rounded-md p-1.5 ${i==="light"?"bg-white text-yellow-600 shadow":"text-black dark:text-gray-300 hover:text-yellow-600 dark:hover:text-yellow-500"}`,title:s("theme.light"),"aria-label":s("theme.light"),children:l.jsx(yb,{size:18})}),l.jsx("button",{onClick:()=>r("dark"),className:`flex items-center justify-center rounded-md p-1.5 ${i==="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:s("theme.dark"),"aria-label":s("theme.dark"),children:l.jsx(cb,{size:18})})]})})},Cv=s=>l.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[l.jsx("title",{children:"GitHub"}),l.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"})]}),Ev=s=>l.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[l.jsx("title",{children:"Sponsor"}),l.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"})]}),kv=s=>l.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[l.jsx("title",{children:"WeChat"}),l.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"})]}),Tv=s=>l.jsxs("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"currentColor",...s,children:[l.jsx("title",{children:"Discord"}),l.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"})]}),Av=({open:s,onOpenChange:i})=>{const{i18n:r,t:c}=Oe();return s?l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6 relative",children:[l.jsx("button",{onClick:()=>i(!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":c("common.close"),children:l.jsx(Ml,{className:"h-5 w-5"})}),l.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:c("sponsor.title")}),l.jsx("div",{className:"flex flex-col items-center justify-center py-4",children:r.language==="zh"?l.jsx("img",{src:"./assets/reward.png",alt:c("sponsor.rewardAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}):l.jsxs("div",{className:"text-center",children:[l.jsx("p",{className:"mb-4 text-gray-700 dark:text-gray-300",children:c("sponsor.supportMessage")}),l.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:c("sponsor.supportButton")})]})})]})})}):null},Rv=({open:s,onOpenChange:i})=>{const{t:r}=Oe();return s?l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6 relative",children:[l.jsx("button",{onClick:()=>i(!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:l.jsx(Ml,{className:"h-5 w-5"})}),l.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:r("wechat.title")}),l.jsxs("div",{className:"flex flex-col items-center justify-center py-4",children:[l.jsx("img",{src:"./assets/wexin.png",alt:r("wechat.qrCodeAlt"),className:"max-w-full h-auto",style:{maxHeight:"400px"}}),l.jsx("p",{className:"mt-4 text-center text-gray-700 dark:text-gray-300",children:r("wechat.scanMessage")})]})]})})}):null},Ov=({onToggleSidebar:s})=>{const{t:i,i18n:r}=Oe(),{auth:c}=xi(),[f,d]=w.useState(!1),[h,x]=w.useState(!1);return l.jsxs("header",{className:"bg-white dark:bg-gray-800 shadow-sm z-10",children:[l.jsxs("div",{className:"flex justify-between items-center px-4 py-3",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("button",{onClick:s,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":i("app.toggleSidebar"),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})}),l.jsx("h1",{className:"ml-4 text-xl font-bold text-gray-900 dark:text-white",children:i("app.title")})]}),l.jsxs("div",{className:"flex items-center space-x-4",children:[l.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:"v0.8.2"}),l.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:l.jsx(Cv,{className:"h-5 w-5"})}),r.language==="zh"?l.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":i("wechat.label"),children:l.jsx(kv,{className:"h-5 w-5"})}):l.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":i("discord.label"),children:l.jsx(Tv,{className:"h-5 w-5"})}),l.jsx("button",{onClick:()=>d(!0),className:"text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 focus:outline-none","aria-label":i("sponsor.label"),children:l.jsx(Ev,{className:"h-5 w-5"})}),l.jsx(Tg,{})]})]}),l.jsx(Av,{open:f,onOpenChange:d}),l.jsx(Rv,{open:h,onOpenChange:x})]})},Mv="https://registry.npmjs.org",zv="@samanhappy/mcphub",Ag=async()=>{try{const s=await fetch(`${Mv}/${zv}/latest`);if(!s.ok)throw new Error(`Failed to fetch latest version: ${s.status}`);return(await s.json()).version||null}catch(s){return console.error("Error checking for latest version:",s),null}},Rg=(s,i)=>{if(s==="dev")return-1;const r=s.split(".").map(Number),c=i.split(".").map(Number);for(let f=0;f<3;f++){const d=r[f]||0,h=c[f]||0;if(d>h)return-1;if(d<h)return 1}return 0},Dv=({isOpen:s,onClose:i,version:r})=>{const{t:c}=Oe(),[f,d]=w.useState(!1),[h,x]=w.useState(""),[g,m]=w.useState(!1),y=async()=>{m(!0);try{const j=await Ag();j&&(x(j),d(Rg(r,j)>0))}catch(j){console.error("Failed to check for updates:",j)}finally{m(!1)}};return w.useEffect(()=>{s&&y()},[s,r]),s?l.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white dark:bg-gray-800 rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6 relative",children:[l.jsx("button",{onClick:i,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400","aria-label":c("common.close"),children:l.jsx(Ml,{className:"h-5 w-5"})}),l.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4",children:c("about.title")}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-gray-700 dark:text-gray-300",children:[c("about.currentVersion"),":"]}),l.jsx("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:r})]}),f&&h&&l.jsx("div",{className:"bg-blue-50 dark:bg-blue-900 p-3 rounded",children:l.jsxs("div",{className:"flex items-start",children:[l.jsx("div",{className:"flex-shrink-0",children:l.jsx("svg",{className:"h-5 w-5 text-blue-600 dark:text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})}),l.jsxs("div",{className:"ml-3 flex-1 text-sm text-blue-700 dark:text-blue-300",children:[l.jsx("p",{children:c("about.newVersionAvailable",{version:h})}),l.jsx("p",{className:"mt-1",children:l.jsx("a",{href:"https://github.com/samanhappy/mcphub",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline",children:c("about.viewOnGitHub")})})]})]})}),l.jsxs("button",{onClick:y,disabled:g,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
|
+
${g?"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:[l.jsx(mb,{className:`h-4 w-4 mr-2 ${g?"animate-spin":""}`}),c(g?"about.checking":"about.checkForUpdates")]})]})]})})}):null},Uv=({collapsed:s,version:i})=>{var k;const{t:r}=Oe(),c=Rn(),{auth:f,logout:d}=xi(),[h,x]=w.useState(!1),[g,m]=w.useState(!1),[y,j]=w.useState(!1),v=w.useRef(null);w.useEffect(()=>{(async()=>{try{const A=await Ag();A&&m(Rg(i,A)>0)}catch(A){console.error("Error checking for new version:",A)}})()},[i]),w.useEffect(()=>{const M=A=>{v.current&&!v.current.contains(A.target)&&x(!1)};return document.addEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)}},[]);const T=()=>{c("/settings"),x(!1)},S=()=>{d(),c("/login")},C=()=>{j(!0),x(!1)};return l.jsxs("div",{ref:v,className:"relative",children:[l.jsxs("button",{onClick:()=>x(!h),className:`flex ${s?"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:[l.jsxs("div",{className:"flex-shrink-0 relative",children:[l.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:l.jsx(jb,{className:"h-4 w-4 text-gray-700 dark:text-gray-300"})}),g&&l.jsx("span",{className:"absolute -top-1 -right-1 block w-2 h-2 bg-red-500 rounded-full"})]}),!s&&l.jsx("div",{className:"ml-3 flex flex-col items-start",children:l.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:((k=f.user)==null?void 0:k.username)||r("auth.user")})})]}),h&&l.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:[l.jsxs("button",{onClick:T,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:[l.jsx(gb,{className:"h-4 w-4 mr-2"}),r("nav.settings")]}),l.jsxs("button",{onClick:C,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:[l.jsx(nb,{className:"h-4 w-4 mr-2"}),r("about.title"),g&&l.jsx("span",{className:"absolute top-2 right-4 block w-2 h-2 bg-red-500 rounded-full"})]}),l.jsxs("button",{onClick:S,className:"flex items-center w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700",children:[l.jsx(ib,{className:"h-4 w-4 mr-2"}),r("app.logout")]})]}),l.jsx(Dv,{isOpen:y,onClose:()=>j(!1),version:i})]})},Lv=({collapsed:s})=>{const{t:i}=Oe();da();const r="0.8.2",c=[{path:"/",label:i("nav.dashboard"),icon:l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:[l.jsx("path",{d:"M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}),l.jsx("path",{d:"M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"})]})},{path:"/servers",label:i("nav.servers"),icon:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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:i("nav.groups"),icon:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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:i("nav.market"),icon:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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:i("nav.logs"),icon:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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 l.jsxs("aside",{className:`bg-white dark:bg-gray-800 shadow-sm transition-all duration-300 ease-in-out flex flex-col h-full relative ${s?"w-16":"w-64"}`,children:[l.jsx("div",{className:"overflow-y-auto flex-grow",children:l.jsx("nav",{className:"p-3 space-y-1",children:c.map(f=>l.jsxs(ag,{to:f.path,className:({isActive:d})=>`flex items-center px-3 py-2 rounded-md transition-colors ${d?"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:f.path==="/",children:[l.jsx("span",{className:"flex-shrink-0",children:f.icon}),!s&&l.jsx("span",{className:"ml-3",children:f.label})]},f.path))})}),l.jsx("div",{className:"p-3 bg-white dark:bg-gray-800",children:l.jsx(Uv,{collapsed:s,version:r})})]})},_v=({children:s})=>l.jsx("main",{className:"flex-1 overflow-auto p-6 bg-gray-100 dark:bg-gray-900",children:l.jsx("div",{className:"container mx-auto",children:s})}),Hv=()=>{const[s,i]=qc.useState(!1),r=()=>{i(!s)};return l.jsxs("div",{className:"flex flex-col h-screen bg-gray-100 dark:bg-gray-900",children:[l.jsx(Ov,{onToggleSidebar:r}),l.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[l.jsx(Lv,{collapsed:s}),l.jsx(_v,{children:l.jsx(Fh,{})})]})]})},Bv=({redirectPath:s="/login"})=>{const{t:i}=Oe(),{auth:r}=xi();return r.loading?l.jsx("div",{className:"flex items-center justify-center h-screen",children:i("app.loading")}):r.isAuthenticated?l.jsx(Fh,{}):l.jsx(Zh,{to:s,replace:!0})},qv=()=>{const{t:s}=Oe(),[i,r]=w.useState(""),[c,f]=w.useState(""),[d,h]=w.useState(null),[x,g]=w.useState(!1),{login:m}=xi(),y=Rn(),j=async v=>{v.preventDefault(),h(null),g(!0);try{if(!i||!c){h(s("auth.emptyFields")),g(!1);return}await m(i,c)?y("/"):h(s("auth.loginFailed"))}catch{h(s("auth.loginError"))}finally{g(!1)}};return l.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:[l.jsx("div",{className:"absolute top-4 right-4",children:l.jsx(Tg,{})}),l.jsxs("div",{className:"max-w-md w-full space-y-8",children:[l.jsx("div",{children:l.jsx("h2",{className:"mt-6 text-center text-3xl font-extrabold text-gray-900 dark:text-white",children:s("auth.loginTitle")})}),l.jsxs("form",{className:"mt-8 space-y-6",onSubmit:j,children:[l.jsxs("div",{className:"rounded-md shadow-sm -space-y-px",children:[l.jsxs("div",{children:[l.jsx("label",{htmlFor:"username",className:"sr-only",children:s("auth.username")}),l.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:s("auth.username"),value:i,onChange:v=>r(v.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{htmlFor:"password",className:"sr-only",children:s("auth.password")}),l.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:s("auth.password"),value:c,onChange:v=>f(v.target.value)})]})]}),d&&l.jsx("div",{className:"text-red-500 dark:text-red-400 text-sm text-center",children:d}),l.jsx("div",{children:l.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:s(x?"auth.loggingIn":"auth.login")})})]})]})]})},li={startup:{maxAttempts:60,pollingInterval:3e3},normal:{pollingInterval:1e4}},_l=()=>{const{t:s}=Oe(),[i,r]=w.useState([]),[c,f]=w.useState(null),[d,h]=w.useState(0),[x,g]=w.useState(!0),[m,y]=w.useState(0),j=w.useRef(null),v=w.useRef(0),T=()=>{j.current&&(clearInterval(j.current),j.current=null)},S=w.useCallback(()=>{T();const q=async()=>{try{const $=localStorage.getItem("mcphub_token"),P=await(await fetch(Ne("/servers"),{headers:{"x-auth-token":$||""}})).json();P&&P.success&&Array.isArray(P.data)?r(P.data):P&&Array.isArray(P)?r(P):(console.error("Invalid server data format:",P),r([])),f(null)}catch($){console.error("Error fetching servers during normal polling:",$),navigator.onLine?$ instanceof TypeError&&($.message.includes("NetworkError")||$.message.includes("Failed to fetch"))?f(s("errors.serverConnection")):f(s("errors.serverFetch")):f(s("errors.network"))}};q(),j.current=setInterval(q,li.normal.pollingInterval)},[s]);return w.useEffect(()=>{d>0&&(v.current=0,y(0));const q=async()=>{try{const $=localStorage.getItem("mcphub_token"),P=await(await fetch(Ne("/servers"),{headers:{"x-auth-token":$||""}})).json();return P&&P.success&&Array.isArray(P.data)?(r(P.data),g(!1),S(),!0):P&&Array.isArray(P)?(r(P),g(!1),S(),!0):(console.error("Invalid server data format:",P),r([]),g(!1),S(),!0)}catch($){return v.current+=1,console.error(`Initial loading attempt ${v.current} failed:`,$),y(v.current),navigator.onLine?f(s("errors.initialStartup")):f(s("errors.network")),v.current>=li.startup.maxAttempts&&(console.log("Maximum startup attempts reached, switching to normal polling"),g(!1),T(),S()),!1}};return x?(T(),q(),j.current=setInterval(q,li.startup.pollingInterval),console.log(`Started initial polling with interval: ${li.startup.pollingInterval}ms`)):S(),()=>{T()}},[d,s,x,S]),{servers:i,error:c,setError:f,isLoading:x,fetchAttempts:m,triggerRefresh:()=>{T(),x&&(g(!0),v.current=0,y(0)),h(q=>q+1)},handleServerAdd:()=>{h(q=>q+1)},handleServerEdit:async q=>{try{const $=localStorage.getItem("mcphub_token"),P=await(await fetch(Ne("/settings"),{headers:{"x-auth-token":$||""}})).json();if(P&&P.success&&P.data&&P.data.mcpServers&&P.data.mcpServers[q.name]){const Y=P.data.mcpServers[q.name];return{name:q.name,status:q.status,tools:q.tools||[],config:Y}}else return console.error("Failed to get server config from settings:",P),f(s("server.invalidConfig",{serverName:q.name})),null}catch($){return console.error("Error fetching server settings:",$),f($ instanceof Error?$.message:String($)),null}},handleServerRemove:async q=>{try{const $=localStorage.getItem("mcphub_token"),ce=await fetch(Ne(`/servers/${q}`),{method:"DELETE",headers:{"x-auth-token":$||""}}),P=await ce.json();return ce.ok?(h(Y=>Y+1),!0):(f(P.message||s("server.deleteError",{serverName:q})),!1)}catch($){return f(s("errors.general")+": "+($ instanceof Error?$.message:String($))),!1}},handleServerToggle:async(q,$)=>{try{const ce=localStorage.getItem("mcphub_token"),P=await fetch(Ne(`/servers/${q.name}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":ce||""},body:JSON.stringify({enabled:$})}),Y=await P.json();return P.ok?(h(W=>W+1),!0):(console.error("Failed to toggle server:",Y),f(s("server.toggleError",{serverName:q.name})),!1)}catch(ce){return console.error("Error toggling server:",ce),f(ce instanceof Error?ce.message:String(ce)),!1}}}},Vv=()=>{const{t:s}=Oe(),{servers:i,error:r,setError:c,isLoading:f}=_l(),d={total:i.length,online:i.filter(g=>g.status==="connected").length,offline:i.filter(g=>g.status==="disconnected").length,connecting:i.filter(g=>g.status==="connecting").length},h={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"},x=g=>i.length===0?0:Math.round(i.filter(m=>m.status===g).length/i.length*100);return l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:s("pages.dashboard.title")}),r&&l.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-red-600 text-lg font-medium",children:s("app.error")}),l.jsx("p",{className:"text-gray-600 mt-1",children:r})]}),l.jsx("button",{onClick:()=>c(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":s("app.closeButton"),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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?l.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):l.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",children:[l.jsx("div",{className:"bg-white rounded-lg shadow p-6",children:l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"p-3 rounded-full bg-blue-100 text-blue-800",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})}),l.jsxs("div",{className:"ml-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.totalServers")}),l.jsx("p",{className:"text-3xl font-bold text-gray-900",children:d.total})]})]})}),l.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"p-3 rounded-full bg-green-100 text-green-800",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})}),l.jsxs("div",{className:"ml-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.onlineServers")}),l.jsx("p",{className:"text-3xl font-bold text-gray-900",children:d.online})]})]}),l.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:l.jsx("div",{className:"h-full bg-green-500 rounded-full",style:{width:`${x("connected")}%`}})})]}),l.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"p-3 rounded-full bg-red-100 text-red-800",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})})}),l.jsxs("div",{className:"ml-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.offlineServers")}),l.jsx("p",{className:"text-3xl font-bold text-gray-900",children:d.offline})]})]}),l.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:l.jsx("div",{className:"h-full bg-red-500 rounded-full",style:{width:`${x("disconnected")}%`}})})]}),l.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("div",{className:"p-3 rounded-full bg-yellow-100 text-yellow-800",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})})}),l.jsxs("div",{className:"ml-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-700",children:s("pages.dashboard.connectingServers")}),l.jsx("p",{className:"text-3xl font-bold text-gray-900",children:d.connecting})]})]}),l.jsx("div",{className:"mt-4 h-2 bg-gray-200 rounded-full",children:l.jsx("div",{className:"h-full bg-yellow-500 rounded-full",style:{width:`${x("connecting")}%`}})})]})]}),i.length>0&&!f&&l.jsxs("div",{className:"mt-8",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:s("pages.dashboard.recentServers")}),l.jsx("div",{className:"bg-white shadow rounded-lg overflow-hidden",children:l.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[l.jsx("thead",{className:"bg-gray-50",children:l.jsxs("tr",{children:[l.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.name")}),l.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.status")}),l.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.tools")}),l.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:s("server.enabled")})]})}),l.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:i.slice(0,5).map((g,m)=>{var y;return l.jsxs("tr",{children:[l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:g.name}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:l.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${g.status==="connected"?"bg-green-100 text-green-800":g.status==="disconnected"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:s(h[g.status]||g.status)})}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:((y=g.tools)==null?void 0:y.length)||0}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:g.enabled!==!1?l.jsx("span",{className:"text-green-600",children:"✓"}):l.jsx("span",{className:"text-red-600",children:"✗"})})]},m)})})]})})]})]})},Gv="modulepreload",$v=function(s,i){return new URL(s,i).href},bh={},Kv=function(i,r,c){let f=Promise.resolve();if(r&&r.length>0){let h=function(y){return Promise.all(y.map(j=>Promise.resolve(j).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const x=document.getElementsByTagName("link"),g=document.querySelector("meta[property=csp-nonce]"),m=(g==null?void 0:g.nonce)||(g==null?void 0:g.getAttribute("nonce"));f=h(r.map(y=>{if(y=$v(y,c),y in bh)return;bh[y]=!0;const j=y.endsWith(".css"),v=j?'[rel="stylesheet"]':"";if(!!c)for(let C=x.length-1;C>=0;C--){const k=x[C];if(k.href===y&&(!j||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${v}`))return;const S=document.createElement("link");if(S.rel=j?"stylesheet":Gv,j||(S.as="script"),S.crossOrigin="",S.href=y,m&&S.setAttribute("nonce",m),document.head.appendChild(S),j)return new Promise((C,k)=>{S.addEventListener("load",C),S.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${y}`)))})}))}function d(h){const x=new Event("vite:preloadError",{cancelable:!0});if(x.payload=h,window.dispatchEvent(x),!x.defaultPrevented)throw h}return f.then(h=>{for(const x of h||[])x.status==="rejected"&&d(x.reason);return i().catch(d)})},Yv={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 ri({children:s,variant:i="default",className:r,onClick:c}){return l.jsx("span",{className:an("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-semibold transition-colors",Yv[i],c?"cursor-pointer":"",r),onClick:c,children:s})}const Xv=({status:s})=>{const{t:i}=Oe(),r={connecting:"bg-yellow-100 text-yellow-800",connected:"bg-green-100 text-green-800",disconnected:"bg-red-100 text-red-800"},c={connected:"status.online",disconnected:"status.offline",connecting:"status.connecting"};return l.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${r[s]}`,children:i(c[s]||s)})},Og=async(s,i)=>{try{const r=nn(),c=i?`/tools/call/${i}`:"/tools/call",f=await fetch(Ne(c),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":r||"",Authorization:`Bearer ${r}`},body:JSON.stringify({toolName:s.toolName,arguments:s.arguments})});if(!f.ok)throw new Error(`HTTP ${f.status}: ${f.statusText}`);const d=await f.json();return d.success?{success:!0,content:d.data.content||[]}:{success:!1,error:d.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=async(s,i,r)=>{try{const c=nn(),f=await fetch(Ne(`/servers/${s}/tools/${i}/toggle`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":c||"",Authorization:`Bearer ${c}`},body:JSON.stringify({enabled:r})});if(!f.ok)throw new Error(`HTTP ${f.status}: ${f.statusText}`);const d=await f.json();return{success:d.success,error:d.success?void 0:d.message}}catch(c){return console.error("Error toggling tool:",c),{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}},Mg=async(s,i,r)=>{try{const c=nn(),f=await fetch(Ne(`/servers/${s}/tools/${i}/description`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":c||"",Authorization:`Bearer ${c||""}`},body:JSON.stringify({description:r})});if(!f.ok)throw new Error(`HTTP ${f.status}: ${f.statusText}`);const d=await f.json();return{success:d.success,error:d.success?void 0:d.message}}catch(c){return console.error("Error updating tool description:",c),{success:!1,error:c instanceof Error?c.message:"Unknown error occurred"}}},Pv=Object.freeze(Object.defineProperty({__proto__:null,callTool:Og,toggleTool:Qv,updateToolDescription:Mg},Symbol.toStringTag,{value:"Module"})),Zv=({value:s,isSelected:i,onClick:r,children:c})=>l.jsxs("button",{type:"button",role:"checkbox","aria-checked":i,className:an("flex w-full items-center justify-between p-2 rounded transition-colors cursor-pointer",i?"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:[l.jsx("span",{className:"flex items-center",children:c}),i&&l.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:l.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"})})]}),zg=({label:s,helpText:i,noOptionsText:r="No options available",values:c,options:f,onChange:d,className:h})=>{const x=g=>{const m=c.includes(g);d(m?c.filter(y=>y!==g):[...c,g])};return l.jsxs("div",{className:h,children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:s}),l.jsx("div",{className:"border rounded shadow max-h-60 overflow-y-auto",children:f.length===0?l.jsx("p",{className:"text-gray-500 text-sm p-3",children:r}):l.jsx("div",{className:"space-y-1 p-1",children:f.map(g=>l.jsx(Zv,{value:g.value,isSelected:c.includes(g.value),onClick:()=>x(g.value),children:g.label},g.value))})}),i&&l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:i})]})},js=({checked:s,onCheckedChange:i,disabled:r=!1})=>l.jsx("button",{type:"button",role:"switch","aria-checked":s,disabled:r,className:an("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",s?"bg-blue-600":"bg-gray-200",r?"opacity-50 cursor-not-allowed":"cursor-pointer"),onClick:()=>!r&&i(!s),children:l.jsx("span",{className:an("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",s?"translate-x-6":"translate-x-1")})}),Fv=({schema:s,onSubmit:i,onCancel:r,loading:c=!1,storageKey:f})=>{const{t:d}=Oe(),[h,x]=w.useState({}),[g,m]=w.useState({}),[y,j]=w.useState(!1),[v,T]=w.useState(""),[S,C]=w.useState(""),k=w.useMemo(()=>(V=>{const ae=se=>{if(typeof se=="object"&&se!==null){const Z=se;return{type:Z.type||"string",description:Z.description,enum:Z.enum,default:Z.default,properties:Z.properties?Object.fromEntries(Object.entries(Z.properties).map(([U,R])=>[U,ae(R)])):void 0,required:Z.required,items:Z.items?ae(Z.items):void 0}}return{type:"string"}};return{type:V.type,properties:V.properties?Object.fromEntries(Object.entries(V.properties).map(([se,Z])=>[se,ae(Z)])):void 0,required:V.required}})(s),[s]);w.useEffect(()=>{const B=(ae,se="")=>{const Z={};return ae.type==="object"&&ae.properties&&Object.entries(ae.properties).forEach(([U,R])=>{const Q=se?`${se}.${U}`:U;R.default!==void 0?Z[U]=R.default:R.type==="string"?Z[U]="":R.type==="number"||R.type==="integer"?Z[U]=0:R.type==="boolean"?Z[U]=!1:R.type==="array"?Z[U]=[]:R.type==="object"&&(R.properties?Z[U]=B(R,Q):Z[U]={})}),Z};let V=B(k);if(f)try{const ae=localStorage.getItem(f);if(ae){const se=JSON.parse(ae);V={...V,...se}}}catch(ae){console.warn("Failed to load saved form data:",ae)}x(V)},[k,f]),w.useEffect(()=>{y&&Object.keys(h).length>0&&(T(JSON.stringify(h,null,2)),C(""))},[y,h]);const M=B=>{T(B),C("");try{const V=JSON.parse(B);if(x(V),f)try{localStorage.setItem(f,JSON.stringify(V))}catch(ae){console.warn("Failed to save form data to localStorage:",ae)}}catch{C(d("tool.invalidJsonFormat"))}},A=()=>{T(JSON.stringify(h,null,2)),C(""),j(!0)},L=()=>{if(v.trim())try{const B=JSON.parse(v);x(B),C(""),j(!1)}catch{C(d("tool.fixJsonBeforeSwitching"));return}else j(!1)},q=(B,V)=>{x(ae=>{const se={...ae},Z=B.split(".");let U=se;for(let R=0;R<Z.length-1;R++)U[Z[R]]||(U[Z[R]]={}),U=U[Z[R]];if(U[Z[Z.length-1]]=V,f)try{localStorage.setItem(f,JSON.stringify(se))}catch(R){console.warn("Failed to save form data to localStorage:",R)}return se}),g[B]&&m(ae=>{const se={...ae};return delete se[B],se})},$=()=>{const B={},V=(ae,se,Z="")=>{ae.type==="object"&&ae.properties&&Object.entries(ae.properties).forEach(([U,R])=>{var ue;const Q=Z?`${Z}.${U}`:U,z=P(se,Q);if((ue=ae.required)!=null&&ue.includes(U)&&(z==null||z==="")){B[Q]=`${U} is required`;return}z!=null&&z!==""&&(R.type==="string"&&typeof z!="string"?B[Q]=`${U} must be a string`:R.type==="number"&&typeof z!="number"?B[Q]=`${U} must be a number`:R.type==="integer"&&(!Number.isInteger(z)||typeof z!="number")?B[Q]=`${U} must be an integer`:R.type==="boolean"&&typeof z!="boolean"?B[Q]=`${U} must be a boolean`:R.type==="array"&&Array.isArray(z)?R.items&&z.forEach((N,X)=>{var ne;((ne=R.items)==null?void 0:ne.type)==="object"&&R.items.properties&&V(R.items,N,`${Q}.${X}`)}):R.type==="object"&&typeof z=="object"&&V(R,z,Q))})};return V(k,h),m(B),Object.keys(B).length===0},ce=B=>{B.preventDefault(),$()&&i(h)},P=(B,V)=>V.split(".").reduce((ae,se)=>ae==null?void 0:ae[se],B),Y=(B,V,ae,se)=>{const Z=ae==null?void 0:ae[B];return V.type==="string"?V.enum?l.jsxs("select",{value:Z||"",onChange:U=>se(U.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",children:[l.jsx("option",{value:"",children:d("tool.selectOption")}),V.enum.map((U,R)=>l.jsx("option",{value:U,children:U},R))]}):l.jsx("input",{type:"text",value:Z||"",onChange:U=>se(U.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:V.description||d("tool.enterKey",{key:B})}):V.type==="number"||V.type==="integer"?l.jsx("input",{type:"number",step:V.type==="integer"?"1":"any",value:Z||"",onChange:U=>{const R=U.target.value===""?"":V.type==="integer"?parseInt(U.target.value):parseFloat(U.target.value);se(R)},className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500"}):V.type==="boolean"?l.jsx("input",{type:"checkbox",checked:Z||!1,onChange:U=>se(U.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}):l.jsx("input",{type:"text",value:Z||"",onChange:U=>se(U.target.value),className:"w-full border rounded-md px-2 py-1 text-sm border-gray-300 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:V.description||d("tool.enterKey",{key:B})})},W=(B,V,ae="")=>{var R,Q,z,ue,N,X,ne,F,re,je,te,le,oe,xe;const se=ae?`${ae}.${B}`:B,Z=P(h,se),U=g[se];if(V.type==="array"){const ye=P(h,se)||[];return l.jsxs("div",{className:"mb-6",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[B,(ae?(Q=(R=P(k,ae))==null?void 0:R.required)==null?void 0:Q.includes(B):(z=k.required)==null?void 0:z.includes(B))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsxs("div",{className:"border border-gray-200 rounded-md p-3 bg-gray-50",children:[ye.map((Me,Ve)=>{var Nt,Ct,fa;return l.jsxs("div",{className:"mb-3 p-3 bg-white border rounded-md",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("span",{className:"text-sm font-medium text-gray-600",children:d("tool.item",{index:Ve+1})}),l.jsx("button",{type:"button",onClick:()=>{const Ie=[...ye];Ie.splice(Ve,1),q(se,Ie)},className:"text-red-500 hover:text-red-700 text-sm",children:d("common.remove")})]}),((Nt=V.items)==null?void 0:Nt.type)==="string"&&V.items.enum?l.jsxs("select",{value:Me||"",onChange:Ie=>{const Xe=[...ye];Xe[Ve]=Ie.target.value,q(se,Xe)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",children:[l.jsx("option",{value:"",children:d("tool.selectOption")}),V.items.enum.map((Ie,Xe)=>l.jsx("option",{value:Ie,children:Ie},Xe))]}):((Ct=V.items)==null?void 0:Ct.type)==="object"&&V.items.properties?l.jsx("div",{className:"space-y-3",children:Object.entries(V.items.properties).map(([Ie,Xe])=>{var sn,Oa;return l.jsxs("div",{children:[l.jsxs("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:[Ie,((Oa=(sn=V.items)==null?void 0:sn.required)==null?void 0:Oa.includes(Ie))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),Y(Ie,Xe,Me,ln=>{const Yt=[...ye];Yt[Ve]={...Yt[Ve],[Ie]:ln},q(se,Yt)})]},Ie)})}):l.jsx("input",{type:"text",value:Me||"",onChange:Ie=>{const Xe=[...ye];Xe[Ve]=Ie.target.value,q(se,Xe)},className:"w-full border rounded-md px-3 py-2 border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:d("tool.enterValue",{type:((fa=V.items)==null?void 0:fa.type)||"value"})})]},Ve)}),l.jsx("button",{type:"button",onClick:()=>{var Ve;const Me=((Ve=V.items)==null?void 0:Ve.type)==="object"?{}:"";q(se,[...ye,Me])},className:"w-full mt-2 px-3 py-2 text-sm text-blue-600 border border-blue-300 rounded-md hover:bg-blue-50",children:d("tool.addItem",{key:B})})]}),U&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:U})]},se)}return V.type==="object"?V.properties?l.jsxs("div",{className:"mb-6",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[B,(ae?(N=(ue=P(k,ae))==null?void 0:ue.required)==null?void 0:N.includes(B):(X=k.required)==null?void 0:X.includes(B))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("div",{className:"border border-gray-200 rounded-md p-4 bg-gray-50",children:Object.entries(V.properties).map(([ye,Me])=>W(ye,Me,se))}),U&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:U})]},se):l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[B,(ae?(F=(ne=P(k,ae))==null?void 0:ne.required)==null?void 0:F.includes(B):(re=k.required)==null?void 0:re.includes(B))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"}),l.jsx("span",{className:"text-xs text-gray-500 ml-1",children:"(JSON object)"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("textarea",{value:typeof Z=="object"?JSON.stringify(Z,null,2):Z||"{}",onChange:ye=>{try{const Me=JSON.parse(ye.target.value);q(se,Me)}catch{q(se,ye.target.value)}},placeholder:`{
|
|
168
|
+
"key": "value"
|
|
169
|
+
}`,className:`w-full border rounded-md px-3 py-2 font-mono text-sm ${U?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,rows:4}),U&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:U})]},se):V.type==="string"?V.enum?l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[B,(ae?!1:(je=k.required)==null?void 0:je.includes(B))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsxs("select",{value:Z||"",onChange:ye=>q(se,ye.target.value),className:`w-full border rounded-md px-3 py-2 ${U?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`,children:[l.jsx("option",{value:"",children:d("tool.selectOption")}),V.enum.map((ye,Me)=>l.jsx("option",{value:ye,children:ye},Me))]}),U&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:U})]},se):l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[B,(ae?!1:(te=k.required)==null?void 0:te.includes(B))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("input",{type:"text",value:Z||"",onChange:ye=>q(se,ye.target.value),className:`w-full border rounded-md px-3 py-2 ${U?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),U&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:U})]},se):V.type==="number"||V.type==="integer"?l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[B,(ae?!1:(le=k.required)==null?void 0:le.includes(B))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("input",{type:"number",step:V.type==="integer"?"1":"any",value:Z||"",onChange:ye=>{const Me=ye.target.value===""?"":V.type==="integer"?parseInt(ye.target.value):parseFloat(ye.target.value);q(se,Me)},className:`w-full border rounded-md px-3 py-2 ${U?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),U&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:U})]},se):V.type==="boolean"?l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("input",{type:"checkbox",checked:Z||!1,onChange:ye=>q(se,ye.target.checked),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),l.jsxs("label",{className:"ml-2 block text-sm text-gray-700",children:[B,(ae?!1:(oe=k.required)==null?void 0:oe.includes(B))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:V.description}),U&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:U})]},se):l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:[B,(ae?!1:(xe=k.required)==null?void 0:xe.includes(B))&&l.jsx("span",{className:"text-red-500 ml-1",children:"*"}),l.jsxs("span",{className:"text-xs text-gray-500 ml-1",children:["(",V.type,")"]})]}),V.description&&l.jsx("p",{className:"text-xs text-gray-500 mb-2",children:V.description}),l.jsx("input",{type:"text",value:Z||"",onChange:ye=>q(se,ye.target.value),placeholder:d("tool.enterValue",{type:V.type}),className:`w-full border rounded-md px-3 py-2 ${U?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),U&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:U})]},se)};return k.properties?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex justify-between items-center border-b pb-3",children:[l.jsx("h3",{className:"text-lg font-medium text-gray-900",children:d("tool.parameters")}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx("button",{type:"button",onClick:L,className:`px-3 py-1 text-sm rounded-md transition-colors ${y?"bg-gray-100 text-gray-600 hover:bg-gray-200":"bg-blue-600 text-white"}`,children:d("tool.formMode")}),l.jsx("button",{type:"button",onClick:A,className:`px-3 py-1 text-sm rounded-md transition-colors ${y?"bg-blue-600 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:d("tool.jsonMode")})]})]}),y?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:d("tool.jsonConfiguration")}),l.jsx("textarea",{value:v,onChange:B=>M(B.target.value),placeholder:`{
|
|
170
|
+
"key": "value"
|
|
171
|
+
}`,className:`w-full h-64 border rounded-md px-3 py-2 font-mono text-sm resize-y ${S?"border-red-500":"border-gray-300"} focus:outline-none focus:ring-2 focus:ring-blue-500`}),S&&l.jsx("p",{className:"text-red-500 text-xs mt-1",children:S})]}),l.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[l.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:d("tool.cancel")}),l.jsx("button",{onClick:()=>{try{const B=JSON.parse(v);i(B)}catch{C(d("tool.invalidJsonFormat"))}},disabled:c||!!S,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:d(c?"tool.running":"tool.runTool")})]})]}):l.jsxs("form",{onSubmit:ce,className:"space-y-4",children:[Object.entries(k.properties||{}).map(([B,V])=>W(B,V)),l.jsxs("div",{className:"flex justify-end space-x-2 pt-4",children:[l.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:d("tool.cancel")}),l.jsx("button",{type:"submit",disabled:c,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:d(c?"tool.running":"tool.runTool")})]})]})]}):l.jsxs("div",{className:"p-4 bg-gray-50 rounded-md",children:[l.jsx("p",{className:"text-sm text-gray-600",children:d("tool.noParameters")}),l.jsxs("div",{className:"flex justify-end space-x-2 mt-4",children:[l.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:d("tool.cancel")}),l.jsx("button",{onClick:()=>i({}),disabled:c,className:"px-4 py-2 text-sm text-white bg-blue-600 rounded-md hover:bg-blue-700 disabled:opacity-50",children:d(c?"tool.running":"tool.runTool")})]})]})},Jv=({result:s,onClose:i})=>{const{t:r}=Oe(),c=s.content,f=h=>Array.isArray(h)?h.map((x,g)=>l.jsx("div",{className:"mb-3 last:mb-0",children:d(x)},g)):d(h),d=h=>{if(typeof h=="string")return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.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 l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:h.text})});if(h.type==="image"&&h.data)return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.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),g=typeof h=="string"?JSON.parse(h):h;return l.jsxs("div",{className:"bg-gray-50 rounded-md p-3",children:[l.jsx("div",{className:"text-xs text-gray-500 mb-2",children:r("tool.jsonResponse")}),l.jsx("pre",{className:"text-sm text-gray-800 overflow-auto",children:JSON.stringify(g,null,2)})]})}catch{return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(h)})})}}return l.jsx("div",{className:"bg-gray-50 rounded-md p-3",children:l.jsx("pre",{className:"whitespace-pre-wrap text-sm text-gray-800 font-mono",children:String(h)})})};return l.jsxs("div",{className:"border border-gray-300 rounded-lg bg-white shadow-sm",children:[l.jsx("div",{className:"border-b border-gray-300 px-4 py-3 bg-gray-50 rounded-t-lg",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"flex items-center space-x-2",children:[s.success?l.jsx(Iy,{size:20,className:"text-green-500"}):l.jsx(eb,{size:20,className:"text-red-500"}),l.jsx("div",{children:l.jsxs("h4",{className:"text-sm font-medium text-gray-900",children:[r("tool.execution")," ",s.success?r("tool.successful"):r("tool.failed")]})})]}),l.jsx("button",{onClick:i,className:"text-gray-400 hover:text-gray-600 text-sm",children:"✕"})]})}),l.jsx("div",{className:"p-4",children:s.success?l.jsx("div",{children:s.content&&s.content.length>0?l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.result")}),f(s.content)]}):l.jsx("div",{className:"text-sm text-gray-500 italic",children:r("tool.noContent")})}):l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[l.jsx(cg,{size:16,className:"text-red-500"}),l.jsx("span",{className:"text-sm font-medium text-red-700",children:r("tool.error")})]}),c&&c.length>0?l.jsxs("div",{children:[l.jsx("div",{className:"text-sm text-gray-600 mb-3",children:r("tool.errorDetails")}),f(c)]}):l.jsx("div",{className:"bg-red-50 border border-red-300 rounded-md p-3",children:l.jsx("pre",{className:"text-sm text-red-800 whitespace-pre-wrap",children:s.error||s.message||r("tool.unknownError")})})]})})]})},Iv=({tool:s,server:i,onToggle:r,onDescriptionUpdate:c})=>{const{t:f}=Oe(),[d,h]=w.useState(!1),[x,g]=w.useState(!1),[m,y]=w.useState(!1),[j,v]=w.useState(null),[T,S]=w.useState(!1),[C,k]=w.useState(s.description||""),M=w.useRef(null),A=w.useRef(null),[L,q]=w.useState(0);w.useEffect(()=>{T&&M.current&&(M.current.focus(),L>0&&(M.current.style.width=`${L+20}px`))},[T,L]),w.useEffect(()=>{!T&&A.current&&q(A.current.offsetWidth)},[T,C]);const $=w.useCallback(()=>`mcphub_tool_form_${i?`${i}_`:""}${s.name}`,[s.name,i]),ce=w.useCallback(()=>{localStorage.removeItem($())},[$]),P=U=>{r&&r(s.name,U)},Y=()=>{S(!0)},W=async()=>{try{const U=await Mg(i,s.name,C);U.success?(S(!1),c&&c(s.name,C)):(k(s.description||""),console.error("Failed to update tool description:",U.error))}catch(U){console.error("Error updating tool description:",U),k(s.description||""),S(!1)}},B=U=>{k(U.target.value)},V=U=>{U.key==="Enter"?W():U.key==="Escape"&&(k(s.description||""),S(!1))},ae=async U=>{y(!0);try{const R=await Og({toolName:s.name,arguments:U},i);v(R)}catch(R){v({success:!1,error:R instanceof Error?R.message:"Unknown error occurred"})}finally{y(!1)}},se=()=>{g(!1),ce(),v(null)},Z=()=>{v(null)};return l.jsxs("div",{className:"bg-white border border-gray-300 shadow rounded-lg p-4 mb-4",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>h(!d),children:[l.jsx("div",{className:"flex-1",children:l.jsxs("h3",{className:"text-lg font-medium text-gray-900",children:[s.name.replace(i+"-",""),l.jsx("span",{className:"ml-2 text-sm font-normal text-gray-600 inline-flex items-center",children:T?l.jsxs(l.Fragment,{children:[l.jsx("input",{ref:M,type:"text",className:"px-2 py-1 border border-blue-300 rounded bg-white text-sm",value:C,onChange:B,onKeyDown:V,onClick:U=>U.stopPropagation(),style:{minWidth:"100px",width:L>0?`${L+20}px`:"auto"}}),l.jsx("button",{className:"ml-2 p-1 text-green-600 hover:text-green-800",onClick:U=>{U.stopPropagation(),W()},children:l.jsx(yi,{size:16})})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{ref:A,children:C||f("tool.noDescription")}),l.jsx("button",{className:"ml-2 p-1 text-gray-500 hover:text-blue-600 transition-colors",onClick:U=>{U.stopPropagation(),Y()},children:l.jsx(dg,{size:14})})]})})]})}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("div",{className:"flex items-center space-x-2",onClick:U=>U.stopPropagation(),children:l.jsx(js,{checked:s.enabled??!0,onCheckedChange:P,disabled:m})}),l.jsxs("button",{onClick:U=>{U.stopPropagation(),h(!0),g(!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:m||!s.enabled,children:[m?l.jsx(lb,{size:14,className:"animate-spin"}):l.jsx(db,{size:14}),l.jsx("span",{children:f(m?"tool.running":"tool.run")})]}),l.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:d?l.jsx(ig,{size:18}):l.jsx(og,{size:18})})]})]}),d&&l.jsxs("div",{className:"mt-4 space-y-4",children:[!x&&l.jsxs("div",{className:"bg-gray-50 rounded p-3 border border-gray-300",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-2",children:f("tool.inputSchema")}),l.jsx("pre",{className:"text-xs text-gray-600 overflow-auto",children:JSON.stringify(s.inputSchema,null,2)})]}),x&&l.jsxs("div",{className:"border border-gray-300 rounded-lg p-4 bg-blue-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-900 mb-3",children:f("tool.runToolWithName",{name:s.name.replace(i+"-","")})}),l.jsx(Fv,{schema:s.inputSchema||{type:"object"},onSubmit:ae,onCancel:se,loading:m,storageKey:$()}),j&&l.jsx("div",{className:"mt-4",children:l.jsx(Jv,{result:j,onClose:Z})})]})]})]})},Dg=({isOpen:s,onClose:i,onConfirm:r,serverName:c,isGroup:f=!1})=>{const{t:d}=Oe();return s?l.jsx("div",{className:"fixed inset-0 bg-black/50 bg-opacity-30 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6",children:[l.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-3",children:d(f?"groups.confirmDelete":"server.confirmDelete")}),l.jsx("p",{className:"text-gray-500 mb-6",children:f?d("groups.deleteWarning",{name:c}):d("server.deleteWarning",{name:c})}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{onClick:i,className:"px-4 py-2 text-gray-600 hover:text-gray-800",children:d("common.cancel")}),l.jsx("button",{onClick:r,className:"px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600",children:d("common.delete")})]})]})})}):null},Wv=({server:s,onRemove:i,onEdit:r,onToggle:c,onRefresh:f})=>{var W;const{t:d}=Oe(),{showToast:h}=Ll(),[x,g]=w.useState(!1),[m,y]=w.useState(!1),[j,v]=w.useState(!1),[T,S]=w.useState(!1),[C,k]=w.useState(!1),M=w.useRef(null);w.useEffect(()=>{const B=V=>{M.current&&!M.current.contains(V.target)&&S(!1)};return document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[]);const A=B=>{B.stopPropagation(),y(!0)},L=B=>{B.stopPropagation(),r(s)},q=async B=>{if(B.stopPropagation(),!(j||!c)){v(!0);try{await c(s,s.enabled===!1)}finally{v(!1)}}},$=B=>{B.stopPropagation(),S(!T)},ce=B=>{if(B.stopPropagation(),!!s.error)if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(s.error).then(()=>{k(!0),h(d("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>k(!1),2e3)});else{const V=document.createElement("textarea");V.value=s.error,V.style.position="fixed",V.style.left="-9999px",document.body.appendChild(V),V.focus(),V.select();try{document.execCommand("copy"),k(!0),h(d("common.copySuccess")||"Copied to clipboard","success"),setTimeout(()=>k(!1),2e3)}catch(ae){h(d("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",ae)}document.body.removeChild(V)}},P=()=>{i(s.name),y(!1)},Y=async(B,V)=>{try{const{toggleTool:ae}=await Kv(async()=>{const{toggleTool:Z}=await Promise.resolve().then(()=>Pv);return{toggleTool:Z}},[],import.meta.url),se=await ae(s.name,B,V);se.success?(h(d(V?"tool.enableSuccess":"tool.disableSuccess",{name:B}),"success"),f&&f()):h(se.error||d("tool.toggleFailed"),"error")}catch(ae){console.error("Error toggling tool:",ae),h(d("tool.toggleFailed"),"error")}};return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:`bg-white shadow rounded-lg p-6 mb-6 ${s.enabled===!1?"opacity-60":""}`,children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>g(!x),children:[l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("h2",{className:`text-xl font-semibold ${s.enabled===!1?"text-gray-600":"text-gray-900"}`,children:s.name}),l.jsx(Xv,{status:s.status}),l.jsxs("div",{className:"flex items-center px-2 py-1 bg-blue-50 text-blue-700 rounded-full text-sm",children:[l.jsx("svg",{className:"w-4 h-4 mr-1",fill:"currentColor",viewBox:"0 0 20 20",children:l.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"})}),l.jsxs("span",{children:[((W=s.tools)==null?void 0:W.length)||0," ",d("server.tools")]})]}),s.error&&l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"cursor-pointer",onClick:$,"aria-label":d("server.viewErrorDetails"),children:l.jsx(cg,{className:"text-red-500 hover:text-red-600",size:18})}),T&&l.jsxs("div",{ref:M,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:B=>B.stopPropagation(),children:[l.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:[l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("h4",{className:"text-sm font-medium text-red-600",children:d("server.errorDetails")}),l.jsx("button",{onClick:ce,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:d("common.copy"),children:C?l.jsx(yi,{size:14,className:"text-green-500"}):l.jsx(ug,{size:14})})]}),l.jsx("button",{onClick:B=>{B.stopPropagation(),S(!1)},className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),l.jsx("div",{className:"p-4 pt-2",children:l.jsx("pre",{className:"text-sm text-gray-700 break-words whitespace-pre-wrap",children:s.error})})]})]})]}),l.jsxs("div",{className:"flex space-x-2",children:[l.jsx("button",{onClick:L,className:"px-3 py-1 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 text-sm",children:d("server.edit")}),l.jsx("div",{className:"flex items-center",children:l.jsx("button",{onClick:q,className:`px-3 py-1 text-sm rounded transition-colors ${j?"bg-gray-200 text-gray-500":s.enabled!==!1?"bg-green-100 text-green-800 hover:bg-green-200":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,disabled:j,children:j?d("common.processing"):s.enabled!==!1?d("server.disable"):d("server.enable")})}),l.jsx("button",{onClick:A,className:"px-3 py-1 bg-red-100 text-red-800 rounded hover:bg-red-200 text-sm",children:d("server.delete")}),l.jsx("button",{className:"text-gray-400 hover:text-gray-600",children:x?l.jsx(ig,{size:18}):l.jsx(og,{size:18})})]})]}),x&&s.tools&&l.jsxs("div",{className:"mt-6",children:[l.jsx("h6",{className:`font-medium ${s.enabled===!1?"text-gray-600":"text-gray-900"} mb-4`,children:d("server.tools")}),l.jsx("div",{className:"space-y-4",children:s.tools.map((B,V)=>l.jsx(Iv,{server:s.name,tool:B,onToggle:Y},V))})]})]}),l.jsx(Dg,{isOpen:m,onClose:()=>y(!1),onConfirm:P,serverName:s.name})]})},ou=({onSubmit:s,onCancel:i,initialData:r=null,modalTitle:c,formError:f=null})=>{var U,R,Q,z,ue,N,X,ne,F,re,je,te,le,oe,xe,ye,Me,Ve,Nt,Ct,fa,Ie,Xe,sn,Oa,ln,Yt,Hl,Ts,Bl,ql,Ma,mt,Xt,ht,Vl,Gl,$l,rn,on,aa,cn;const{t:d}=Oe(),h=()=>!r||!r.config?"stdio":r.config.type?r.config.type:r.config.url?"sse":"stdio",[x,g]=w.useState(h()),[m,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:[],options:{timeout:r&&r.config&&r.config.options&&r.config.options.timeout||6e4,resetTimeoutOnProgress:r&&r.config&&r.config.options&&r.config.options.resetTimeoutOnProgress||!1,maxTotalTimeout:r&&r.config&&r.config.options&&r.config.options.maxTotalTimeout||void 0},openapi:r&&r.config&&r.config.openapi?{url:r.config.openapi.url||"",schema:r.config.openapi.schema?JSON.stringify(r.config.openapi.schema,null,2):"",inputMode:r.config.openapi.url?"url":r.config.openapi.schema?"schema":"url",version:r.config.openapi.version||"3.1.0",securityType:((U=r.config.openapi.security)==null?void 0:U.type)||"none",apiKeyName:((Q=(R=r.config.openapi.security)==null?void 0:R.apiKey)==null?void 0:Q.name)||"",apiKeyIn:((ue=(z=r.config.openapi.security)==null?void 0:z.apiKey)==null?void 0:ue.in)||"header",apiKeyValue:((X=(N=r.config.openapi.security)==null?void 0:N.apiKey)==null?void 0:X.value)||"",httpScheme:((F=(ne=r.config.openapi.security)==null?void 0:ne.http)==null?void 0:F.scheme)||"bearer",httpCredentials:((je=(re=r.config.openapi.security)==null?void 0:re.http)==null?void 0:je.credentials)||"",oauth2Token:((le=(te=r.config.openapi.security)==null?void 0:te.oauth2)==null?void 0:le.token)||"",openIdConnectUrl:((xe=(oe=r.config.openapi.security)==null?void 0:oe.openIdConnect)==null?void 0:xe.url)||"",openIdConnectToken:((Me=(ye=r.config.openapi.security)==null?void 0:ye.openIdConnect)==null?void 0:Me.token)||""}:{inputMode:"url",url:"",schema:"",version:"3.1.0",securityType:"none"}}),[j,v]=w.useState(r&&r.config&&r.config.env?Object.entries(r.config.env).map(([de,ie])=>({key:de,value:ie})):[]),[T,S]=w.useState(r&&r.config&&r.config.headers?Object.entries(r.config.headers).map(([de,ie])=>({key:de,value:ie})):[]),[C,k]=w.useState(!1),[M,A]=w.useState(null),L=!!r,q=de=>{const{name:ie,value:pe}=de.target;y({...m,[ie]:pe})},$=de=>{const ie=de.split(" ").filter(pe=>pe.trim()!=="");y({...m,arguments:de,args:ie})},ce=de=>{g(de),y(ie=>({...ie,type:de}))},P=(de,ie,pe)=>{const Qt=[...j];Qt[de][ie]=pe,v(Qt)},Y=()=>{v([...j,{key:"",value:""}])},W=de=>{const ie=[...j];ie.splice(de,1),v(ie)},B=(de,ie,pe)=>{const Qt=[...T];Qt[de][ie]=pe,S(Qt)},V=()=>{S([...T,{key:"",value:""}])},ae=de=>{const ie=[...T];ie.splice(de,1),S(ie)},se=(de,ie)=>{y(pe=>({...pe,options:{...pe.options,[de]:ie}}))},Z=async de=>{var ie,pe,Qt;de.preventDefault(),A(null);try{const Pt={};j.forEach(({key:Et,value:na})=>{Et.trim()&&(Pt[Et.trim()]=na)});const Zt={};T.forEach(({key:Et,value:na})=>{Et.trim()&&(Zt[Et.trim()]=na)});const un={};(ie=m.options)!=null&&ie.timeout&&m.options.timeout!==6e4&&(un.timeout=m.options.timeout),(pe=m.options)!=null&&pe.resetTimeoutOnProgress&&(un.resetTimeoutOnProgress=m.options.resetTimeoutOnProgress),(Qt=m.options)!=null&&Qt.maxTotalTimeout&&(un.maxTotalTimeout=m.options.maxTotalTimeout);const Kl={name:m.name,config:{type:x,...x==="openapi"?{openapi:(()=>{var na,On,As,Yl,Ft,tt;const Et={version:((na=m.openapi)==null?void 0:na.version)||"3.1.0"};if(((On=m.openapi)==null?void 0:On.inputMode)==="url")Et.url=((As=m.openapi)==null?void 0:As.url)||"";else if(((Yl=m.openapi)==null?void 0:Yl.inputMode)==="schema"&&((Ft=m.openapi)!=null&&Ft.schema))try{Et.schema=JSON.parse(m.openapi.schema)}catch{throw new Error("Invalid JSON schema format")}return(tt=m.openapi)!=null&&tt.securityType&&m.openapi.securityType!=="none"&&(Et.security={type:m.openapi.securityType,...m.openapi.securityType==="apiKey"&&{apiKey:{name:m.openapi.apiKeyName||"",in:m.openapi.apiKeyIn||"header",value:m.openapi.apiKeyValue||""}},...m.openapi.securityType==="http"&&{http:{scheme:m.openapi.httpScheme||"bearer",credentials:m.openapi.httpCredentials||""}},...m.openapi.securityType==="oauth2"&&{oauth2:{token:m.openapi.oauth2Token||""}},...m.openapi.securityType==="openIdConnect"&&{openIdConnect:{url:m.openapi.openIdConnectUrl||"",token:m.openapi.openIdConnectToken||""}}}),Et})(),...Object.keys(Zt).length>0?{headers:Zt}:{}}:x==="sse"||x==="streamable-http"?{url:m.url,...Object.keys(Zt).length>0?{headers:Zt}:{}}:{command:m.command,args:m.args,env:Object.keys(Pt).length>0?Pt:void 0},...Object.keys(un).length>0?{options:un}:{}}};s(Kl)}catch(Pt){A(`Error: ${Pt instanceof Error?Pt.message:String(Pt)}`)}};return l.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-xl max-h-screen overflow-y-auto",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:c}),l.jsx("button",{onClick:i,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(M||f)&&l.jsx("div",{className:"bg-red-50 text-red-700 p-3 rounded mb-4",children:f||M}),l.jsxs("form",{onSubmit:Z,children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:d("server.name")}),l.jsx("input",{type:"text",name:"name",id:"name",value:m.name,onChange:q,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:L})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:d("server.type")}),l.jsxs("div",{className:"flex space-x-4",children:[l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"command",name:"serverType",value:"command",checked:x==="stdio",onChange:()=>ce("stdio"),className:"mr-1"}),l.jsx("label",{htmlFor:"command",children:"STDIO"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"url",name:"serverType",value:"url",checked:x==="sse",onChange:()=>ce("sse"),className:"mr-1"}),l.jsx("label",{htmlFor:"url",children:"SSE"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"streamable-http",name:"serverType",value:"streamable-http",checked:x==="streamable-http",onChange:()=>ce("streamable-http"),className:"mr-1"}),l.jsx("label",{htmlFor:"streamable-http",children:"Streamable HTTP"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"openapi",name:"serverType",value:"openapi",checked:x==="openapi",onChange:()=>ce("openapi"),className:"mr-1"}),l.jsx("label",{htmlFor:"openapi",children:"OpenAPI"})]})]})]}),x==="openapi"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:d("server.openapi.inputMode")}),l.jsxs("div",{className:"flex space-x-4",children:[l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"input-mode-url",name:"inputMode",value:"url",checked:((Ve=m.openapi)==null?void 0:Ve.inputMode)==="url",onChange:()=>y(de=>({...de,openapi:{...de.openapi,inputMode:"url"}})),className:"mr-1"}),l.jsx("label",{htmlFor:"input-mode-url",children:d("server.openapi.inputModeUrl")})]}),l.jsxs("div",{children:[l.jsx("input",{type:"radio",id:"input-mode-schema",name:"inputMode",value:"schema",checked:((Nt=m.openapi)==null?void 0:Nt.inputMode)==="schema",onChange:()=>y(de=>({...de,openapi:{...de.openapi,inputMode:"schema"}})),className:"mr-1"}),l.jsx("label",{htmlFor:"input-mode-schema",children:d("server.openapi.inputModeSchema")})]})]})]}),((Ct=m.openapi)==null?void 0:Ct.inputMode)==="url"&&l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"openapi-url",children:d("server.openapi.specUrl")}),l.jsx("input",{type:"url",name:"openapi-url",id:"openapi-url",value:((fa=m.openapi)==null?void 0:fa.url)||"",onChange:de=>y(ie=>({...ie,openapi:{...ie.openapi,url:de.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.: https://api.example.com/openapi.json",required:x==="openapi"&&((Ie=m.openapi)==null?void 0:Ie.inputMode)==="url"})]}),((Xe=m.openapi)==null?void 0:Xe.inputMode)==="schema"&&l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"openapi-schema",children:d("server.openapi.schema")}),l.jsx("textarea",{name:"openapi-schema",id:"openapi-schema",rows:10,value:((sn=m.openapi)==null?void 0:sn.schema)||"",onChange:de=>y(ie=>({...ie,openapi:{...ie.openapi,schema:de.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 font-mono text-sm",placeholder:`{
|
|
172
|
+
"openapi": "3.1.0",
|
|
173
|
+
"info": {
|
|
174
|
+
"title": "API",
|
|
175
|
+
"version": "1.0.0"
|
|
176
|
+
},
|
|
177
|
+
"servers": [
|
|
178
|
+
{
|
|
179
|
+
"url": "https://api.example.com"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
"paths": {
|
|
183
|
+
...
|
|
184
|
+
}
|
|
185
|
+
}`,required:x==="openapi"&&((Oa=m.openapi)==null?void 0:Oa.inputMode)==="schema"}),l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:d("server.openapi.schemaHelp")})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:d("server.openapi.security")}),l.jsxs("select",{value:((ln=m.openapi)==null?void 0:ln.securityType)||"none",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,securityType:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",children:[l.jsx("option",{value:"none",children:d("server.openapi.securityNone")}),l.jsx("option",{value:"apiKey",children:d("server.openapi.securityApiKey")}),l.jsx("option",{value:"http",children:d("server.openapi.securityHttp")}),l.jsx("option",{value:"oauth2",children:d("server.openapi.securityOAuth2")}),l.jsx("option",{value:"openIdConnect",children:d("server.openapi.securityOpenIdConnect")})]})]}),((Yt=m.openapi)==null?void 0:Yt.securityType)==="apiKey"&&l.jsxs("div",{className:"mb-4 p-4 border rounded bg-gray-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:d("server.openapi.apiKeyConfig")}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.apiKeyName")}),l.jsx("input",{type:"text",value:((Hl=m.openapi)==null?void 0:Hl.apiKeyName)||"",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,apiKeyName:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"Authorization"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.apiKeyIn")}),l.jsxs("select",{value:((Ts=m.openapi)==null?void 0:Ts.apiKeyIn)||"header",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,apiKeyIn:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",children:[l.jsx("option",{value:"header",children:"Header"}),l.jsx("option",{value:"query",children:"Query"}),l.jsx("option",{value:"cookie",children:"Cookie"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.apiKeyValue")}),l.jsx("input",{type:"password",value:((Bl=m.openapi)==null?void 0:Bl.apiKeyValue)||"",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,apiKeyValue:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"your-api-key"})]})]})]}),((ql=m.openapi)==null?void 0:ql.securityType)==="http"&&l.jsxs("div",{className:"mb-4 p-4 border rounded bg-gray-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:d("server.openapi.httpAuthConfig")}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.httpScheme")}),l.jsxs("select",{value:((Ma=m.openapi)==null?void 0:Ma.httpScheme)||"bearer",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,httpScheme:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",children:[l.jsx("option",{value:"basic",children:"Basic"}),l.jsx("option",{value:"bearer",children:"Bearer"}),l.jsx("option",{value:"digest",children:"Digest"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.httpCredentials")}),l.jsx("input",{type:"password",value:((mt=m.openapi)==null?void 0:mt.httpCredentials)||"",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,httpCredentials:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:((Xt=m.openapi)==null?void 0:Xt.httpScheme)==="basic"?"base64-encoded-credentials":"bearer-token"})]})]})]}),((ht=m.openapi)==null?void 0:ht.securityType)==="oauth2"&&l.jsxs("div",{className:"mb-4 p-4 border rounded bg-gray-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:d("server.openapi.oauth2Config")}),l.jsx("div",{className:"grid grid-cols-1 gap-3",children:l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.oauth2Token")}),l.jsx("input",{type:"password",value:((Vl=m.openapi)==null?void 0:Vl.oauth2Token)||"",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,oauth2Token:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"access-token"})]})})]}),((Gl=m.openapi)==null?void 0:Gl.securityType)==="openIdConnect"&&l.jsxs("div",{className:"mb-4 p-4 border rounded bg-gray-50",children:[l.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-3",children:d("server.openapi.openIdConnectConfig")}),l.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.openIdConnectUrl")}),l.jsx("input",{type:"url",value:(($l=m.openapi)==null?void 0:$l.openIdConnectUrl)||"",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,openIdConnectUrl:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"https://example.com/.well-known/openid_configuration"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs text-gray-600 mb-1",children:d("server.openapi.openIdConnectToken")}),l.jsx("input",{type:"password",value:((rn=m.openapi)==null?void 0:rn.openIdConnectToken)||"",onChange:de=>y(ie=>{var pe;return{...ie,openapi:{...ie.openapi,openIdConnectToken:de.target.value,url:((pe=ie.openapi)==null?void 0:pe.url)||""}}}),className:"w-full border rounded px-2 py-1 text-sm",placeholder:"id-token"})]})]})]}),l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:d("server.headers")}),l.jsxs("button",{type:"button",onClick:V,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",d("server.add")]})]}),T.map((de,ie)=>l.jsxs("div",{className:"flex items-center mb-2",children:[l.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[l.jsx("input",{type:"text",value:de.key,onChange:pe=>B(ie,"key",pe.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"}),l.jsx("span",{className:"flex items-center",children:":"}),l.jsx("input",{type:"text",value:de.value,onChange:pe=>B(ie,"value",pe.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..."})]}),l.jsxs("button",{type:"button",onClick:()=>ae(ie),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:["- ",d("server.remove")]})]},ie))]})]}):x==="sse"||x==="streamable-http"?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"url",children:d("server.url")}),l.jsx("input",{type:"url",name:"url",id:"url",value:m.url,onChange:q,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"})]}),l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:d("server.headers")}),l.jsxs("button",{type:"button",onClick:V,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",d("server.add")]})]}),T.map((de,ie)=>l.jsxs("div",{className:"flex items-center mb-2",children:[l.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[l.jsx("input",{type:"text",value:de.key,onChange:pe=>B(ie,"key",pe.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"}),l.jsx("span",{className:"flex items-center",children:":"}),l.jsx("input",{type:"text",value:de.value,onChange:pe=>B(ie,"value",pe.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..."})]}),l.jsxs("button",{type:"button",onClick:()=>ae(ie),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:["- ",d("server.remove")]})]},ie))]})]}):l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"command",children:d("server.command")}),l.jsx("input",{type:"text",name:"command",id:"command",value:m.command,onChange:q,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"})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"arguments",children:d("server.arguments")}),l.jsx("input",{type:"text",name:"arguments",id:"arguments",value:m.arguments,onChange:de=>$(de.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"})]}),l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex justify-between items-center mb-2",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold",children:d("server.envVars")}),l.jsxs("button",{type:"button",onClick:Y,className:"bg-gray-200 hover:bg-gray-300 text-gray-700 font-medium py-1 px-2 rounded text-sm flex items-center",children:["+ ",d("server.add")]})]}),j.map((de,ie)=>l.jsxs("div",{className:"flex items-center mb-2",children:[l.jsxs("div",{className:"flex items-center space-x-2 flex-grow",children:[l.jsx("input",{type:"text",value:de.key,onChange:pe=>P(ie,"key",pe.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:d("server.key")}),l.jsx("span",{className:"flex items-center",children:":"}),l.jsx("input",{type:"text",value:de.value,onChange:pe=>P(ie,"value",pe.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:d("server.value")})]}),l.jsxs("button",{type:"button",onClick:()=>W(ie),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:["- ",d("server.remove")]})]},ie))]})]}),x!=="openapi"&&l.jsxs("div",{className:"mb-4",children:[l.jsxs("div",{className:"flex items-center justify-between cursor-pointer bg-gray-50 hover:bg-gray-100 p-3 rounded border",onClick:()=>k(!C),children:[l.jsx("label",{className:"text-gray-700 text-sm font-bold",children:d("server.requestOptions")}),l.jsx("span",{className:"text-gray-500 text-sm",children:C?"▼":"▶"})]}),C&&l.jsxs("div",{className:"border rounded-b p-4 bg-gray-50 border-t-0",children:[l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-gray-600 text-sm font-medium mb-1",htmlFor:"timeout",children:d("server.timeout")}),l.jsx("input",{type:"number",id:"timeout",value:((on=m.options)==null?void 0:on.timeout)||6e4,onChange:de=>se("timeout",parseInt(de.target.value)||6e4),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"30000",min:"1000",max:"300000"}),l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:d("server.timeoutDescription")})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-gray-600 text-sm font-medium mb-1",htmlFor:"maxTotalTimeout",children:d("server.maxTotalTimeout")}),l.jsx("input",{type:"number",id:"maxTotalTimeout",value:((aa=m.options)==null?void 0:aa.maxTotalTimeout)||"",onChange:de=>se("maxTotalTimeout",de.target.value?parseInt(de.target.value):void 0),className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:"Optional",min:"1000"}),l.jsx("p",{className:"text-xs text-gray-500 mt-1",children:d("server.maxTotalTimeoutDescription")})]})]}),l.jsxs("div",{className:"mt-3",children:[l.jsxs("label",{className:"flex items-center",children:[l.jsx("input",{type:"checkbox",checked:((cn=m.options)==null?void 0:cn.resetTimeoutOnProgress)||!1,onChange:de=>se("resetTimeoutOnProgress",de.target.checked),className:"mr-2"}),l.jsx("span",{className:"text-gray-600 text-sm",children:d("server.resetTimeoutOnProgress")})]}),l.jsx("p",{className:"text-xs text-gray-500 mt-1 ml-6",children:d("server.resetTimeoutOnProgressDescription")})]})]})]}),l.jsxs("div",{className:"flex justify-end mt-6",children:[l.jsx("button",{type:"button",onClick:i,className:"bg-gray-300 hover:bg-gray-400 text-gray-800 font-medium py-2 px-4 rounded mr-2",children:d("server.cancel")}),l.jsx("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded",children:d(L?"server.save":"server.add")})]})]})]})},e1=({onAdd:s})=>{const{t:i}=Oe(),[r,c]=w.useState(!1),[f,d]=w.useState(null),h=()=>{c(!r),d(null)},x=async g=>{try{d(null);const m=localStorage.getItem("mcphub_token"),y=await fetch(Ne("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":m||""},body:JSON.stringify(g)}),j=await y.json();if(!y.ok){j&&j.message?d(j.message):y.status===400?d(i("server.invalidData")):y.status===409?d(i("server.alreadyExists",{serverName:g.name})):d(i("server.addError"));return}c(!1),s()}catch(m){console.error("Error adding server:",m),navigator.onLine?m instanceof TypeError&&(m.message.includes("NetworkError")||m.message.includes("Failed to fetch"))?d(i("errors.serverConnection")):d(i("errors.serverAdd")):d(i("errors.network"))}};return l.jsxs("div",{children:[l.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:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),i("server.add")]}),r&&l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx(ou,{onSubmit:x,onCancel:h,modalTitle:i("server.addServer"),formError:f})})]})},t1=({server:s,onEdit:i,onCancel:r})=>{const{t:c}=Oe(),[f,d]=w.useState(null),h=async x=>{try{d(null);const g=localStorage.getItem("mcphub_token"),m=await fetch(Ne(`/servers/${s.name}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":g||""},body:JSON.stringify(x)}),y=await m.json();if(!m.ok){y&&y.message?d(y.message):m.status===404?d(c("server.notFound",{serverName:s.name})):m.status===400?d(c("server.invalidData")):d(c("server.updateError",{serverName:s.name}));return}i()}catch(g){console.error("Error updating server:",g),navigator.onLine?g instanceof TypeError&&(g.message.includes("NetworkError")||g.message.includes("Failed to fetch"))?d(c("errors.serverConnection")):d(c("errors.serverUpdate",{serverName:s.name})):d(c("errors.network"))}};return l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx(ou,{onSubmit:h,onCancel:r,initialData:s,modalTitle:c("server.editTitle",{serverName:s.name}),formError:f})})},a1=({isOpen:s,onClose:i,onConfirm:r,title:c,message:f,confirmText:d,cancelText:h,variant:x="warning"})=>{const{t:g}=Oe();if(!s)return null;const m=()=>{switch(x){case"danger":return{icon:l.jsx("svg",{className:"w-6 h-6 text-red-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),confirmClass:"bg-red-600 hover:bg-red-700 text-white"};case"warning":return{icon:l.jsx("svg",{className:"w-6 h-6 text-yellow-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),confirmClass:"bg-yellow-600 hover:bg-yellow-700 text-white"};case"info":return{icon:l.jsx("svg",{className:"w-6 h-6 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})}),confirmClass:"bg-blue-600 hover:bg-blue-700 text-white"};default:return{icon:null,confirmClass:"bg-blue-600 hover:bg-blue-700 text-white"}}},{icon:y,confirmClass:j}=m(),v=S=>{S.target===S.currentTarget&&i()},T=S=>{S.key==="Escape"?i():S.key==="Enter"&&r()};return l.jsx("div",{className:"fixed inset-0 bg-black/50 z-[100] flex items-center justify-center p-4",onClick:v,onKeyDown:T,tabIndex:-1,children:l.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-md w-full transform transition-all duration-200 ease-out",role:"dialog","aria-modal":"true","aria-labelledby":"confirm-dialog-title","aria-describedby":"confirm-dialog-message",children:l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-start space-x-3",children:[y&&l.jsx("div",{className:"flex-shrink-0",children:y}),l.jsxs("div",{className:"flex-1",children:[c&&l.jsx("h3",{id:"confirm-dialog-title",className:"text-lg font-medium text-gray-900 mb-2",children:c}),l.jsx("p",{id:"confirm-dialog-message",className:"text-gray-600 leading-relaxed",children:f})]})]}),l.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[l.jsx("button",{onClick:i,className:"px-4 py-2 text-gray-600 hover:text-gray-800 hover:bg-gray-100 rounded-md transition-colors duration-150",autoFocus:!0,children:h||g("common.cancel")}),l.jsx("button",{onClick:r,className:`px-4 py-2 rounded-md transition-colors duration-150 focus:outline-none focus:ring-2 focus:ring-offset-2 ${j}`,children:d||g("common.confirm")})]})]})})})},n1=({onSuccess:s,onCancel:i})=>{const{t:r}=Oe(),[c,f]=w.useState(!1),[d,h]=w.useState(!1),[x,g]=w.useState(null),[m,y]=w.useState(null),[j,v]=w.useState(!1),[T,S]=w.useState(null),[C,k]=w.useState(""),[M,A]=w.useState(!1),[L,q]=w.useState(""),$=Z=>{Z.preventDefault(),f(!0)},ce=Z=>{Z.preventDefault(),f(!1)},P=Z=>{Z.preventDefault(),f(!1);const U=Z.dataTransfer.files;if(U.length>0){const R=U[0];R.name.endsWith(".dxt")?(y(R),g(null)):g(r("dxt.invalidFileType"))}},Y=Z=>{const U=Z.target.files;if(U&&U.length>0){const R=U[0];R.name.endsWith(".dxt")?(y(R),g(null)):g(r("dxt.invalidFileType"))}},W=async()=>{if(!m){g(r("dxt.noFileSelected"));return}h(!0),g(null);try{const Z=new FormData;Z.append("dxtFile",m);const U=localStorage.getItem("mcphub_token"),R=await fetch(Ne("/dxt/upload"),{method:"POST",headers:{"x-auth-token":U||""},body:Z}),Q=await R.json();if(!R.ok)throw new Error(Q.message||`HTTP error! Status: ${R.status}`);if(Q.success&&Q.data)S(Q.data.manifest),k(Q.data.extractDir),v(!0);else throw new Error(Q.message||r("dxt.uploadFailed"))}catch(Z){console.error("DXT upload error:",Z),g(Z instanceof Error?Z.message:r("dxt.uploadFailed"))}finally{h(!1)}},B=async(Z,U=!1)=>{var R;h(!0),g(null);try{const Q=se(T,C,Z),z=localStorage.getItem("mcphub_token");if(!U){const F=await fetch(Ne("/servers"),{method:"GET",headers:{"x-auth-token":z||""}});if(F.ok&&((R=(await F.json()).data)==null?void 0:R.find(te=>te.name===Z))){q(Z),A(!0),h(!1);return}}const ue=U?"PUT":"POST",N=Ne(U?`/servers/${encodeURIComponent(Z)}`:"/servers"),X=await fetch(N,{method:ue,headers:{"Content-Type":"application/json","x-auth-token":z||""},body:JSON.stringify({name:Z,config:Q})}),ne=await X.json();if(!X.ok)throw new Error(ne.message||`HTTP error! Status: ${X.status}`);if(ne.success)s(Q);else throw new Error(ne.message||r("dxt.installFailed"))}catch(Q){console.error("DXT install error:",Q),g(Q instanceof Error?Q.message:r("dxt.installFailed")),h(!1)}},V=()=>{A(!1),L&&B(L,!0)},ae=()=>{A(!1),q(""),h(!1)},se=(Z,U,R)=>{var ue;const Q=((ue=Z.server)==null?void 0:ue.mcp_config)||{},z={type:"stdio",command:Q.command||"node",args:(Q.args||[]).map(N=>N.replace("${__dirname}",U))};return Q.env&&Object.keys(Q.env).length>0&&(z.env={...Q.env},Object.keys(z.env).forEach(N=>{typeof z.env[N]=="string"&&(z.env[N]=z.env[N].replace("${__dirname}",U))})),z};return j&&T?l.jsxs(l.Fragment,{children:[l.jsx(a1,{isOpen:M,onClose:ae,onConfirm:V,title:r("dxt.serverExistsTitle"),message:r("dxt.serverExistsConfirm",{serverName:L}),confirmText:r("dxt.override"),cancelText:r("common.cancel"),variant:"warning"}),l.jsx("div",{className:`fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4 ${M?"opacity-50 pointer-events-none":""}`,children:l.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-2xl max-h-screen overflow-y-auto",children:[l.jsxs("div",{className:"flex justify-between items-center mb-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:r("dxt.installServer")}),l.jsx("button",{onClick:i,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),x&&l.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 rounded",children:l.jsx("p",{className:"text-red-700",children:x})}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[l.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:r("dxt.extensionInfo")}),l.jsxs("div",{className:"space-y-2 text-sm",children:[l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.name"),":"]})," ",T.display_name||T.name]}),l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.version"),":"]})," ",T.version]}),l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.description"),":"]})," ",T.description]}),T.author&&l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.author"),":"]})," ",T.author.name]}),T.tools&&T.tools.length>0&&l.jsxs("div",{children:[l.jsxs("strong",{children:[r("dxt.tools"),":"]}),l.jsx("ul",{className:"list-disc list-inside ml-4",children:T.tools.map((Z,U)=>l.jsxs("li",{children:[Z.name," - ",Z.description]},U))})]})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:r("dxt.serverName")}),l.jsx("input",{type:"text",id:"serverName",defaultValue:T.name,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:r("dxt.serverNamePlaceholder")})]}),l.jsxs("div",{className:"flex justify-end space-x-4",children:[l.jsx("button",{onClick:i,disabled:d,className:"px-4 py-2 text-gray-700 bg-gray-200 rounded hover:bg-gray-300 disabled:opacity-50",children:r("common.cancel")}),l.jsx("button",{onClick:()=>{const Z=document.getElementById("serverName"),U=(Z==null?void 0:Z.value.trim())||T.name;B(U)},disabled:d,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 flex items-center",children:d?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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("dxt.installing")]}):r("dxt.install")})]})]})]})})]}):l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsxs("div",{className:"bg-white shadow rounded-lg p-6 w-full max-w-lg",children:[l.jsxs("div",{className:"flex justify-between items-center mb-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:r("dxt.uploadTitle")}),l.jsx("button",{onClick:i,className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),x&&l.jsx("div",{className:"mb-4 bg-red-50 border-l-4 border-red-500 p-4 rounded",children:l.jsx("p",{className:"text-red-700",children:x})}),l.jsxs("div",{className:`relative border-2 border-dashed rounded-lg p-8 text-center transition-colors ${c?"border-blue-500 bg-blue-50":m?"border-green-500 bg-green-50":"border-gray-300 hover:border-gray-400"}`,onDragOver:$,onDragLeave:ce,onDrop:P,children:[m?l.jsxs("div",{className:"space-y-2",children:[l.jsx("svg",{className:"mx-auto h-12 w-12 text-green-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.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"})}),l.jsx("p",{className:"text-sm text-gray-900 font-medium",children:m.name}),l.jsxs("p",{className:"text-xs text-gray-500",children:[(m.size/1024/1024).toFixed(2)," MB"]})]}):l.jsxs("div",{className:"space-y-2",children:[l.jsx("svg",{className:"mx-auto h-12 w-12 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})}),l.jsxs("div",{children:[l.jsx("p",{className:"text-sm text-gray-900",children:r("dxt.dropFileHere")}),l.jsx("p",{className:"text-xs text-gray-500",children:r("dxt.orClickToSelect")})]})]}),l.jsx("input",{type:"file",accept:".dxt",onChange:Y,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"})]}),l.jsxs("div",{className:"mt-6 flex justify-end space-x-4",children:[l.jsx("button",{onClick:i,disabled:d,className:"px-4 py-2 text-gray-700 bg-gray-200 rounded hover:bg-gray-300 disabled:opacity-50",children:r("common.cancel")}),l.jsx("button",{onClick:W,disabled:!m||d,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50 flex items-center",children:d?l.jsxs(l.Fragment,{children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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("dxt.uploading")]}):r("dxt.upload")})]})]})})},s1=()=>{const{t:s}=Oe(),i=Rn(),{servers:r,error:c,setError:f,isLoading:d,handleServerAdd:h,handleServerEdit:x,handleServerRemove:g,handleServerToggle:m,triggerRefresh:y}=_l(),[j,v]=w.useState(null),[T,S]=w.useState(!1),[C,k]=w.useState(!1),M=async $=>{const ce=await x($);ce&&v(ce)},A=()=>{v(null),y()},L=async()=>{S(!0);try{y(),await new Promise($=>setTimeout($,500))}finally{S(!1)}},q=$=>{k(!1),y()};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-8",children:[l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.servers.title")}),l.jsxs("div",{className:"flex space-x-4",children:[l.jsxs("button",{onClick:()=>i("/market"),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),s("nav.market")]}),l.jsx(e1,{onAdd:h}),l.jsxs("button",{onClick:()=>k(!0),className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.jsx("path",{d:"M5.5 13a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 13H11V9.413l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.413V13H5.5z"})}),s("dxt.upload")]}),l.jsxs("button",{onClick:L,disabled:T,className:`px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center ${T?"opacity-70 cursor-not-allowed":""}`,children:[T?l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}):l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),s("common.refresh")]})]})]}),c&&l.jsx("div",{className:"mb-6 bg-red-50 border-l-4 border-red-500 p-4 rounded shadow-sm",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-red-600 text-lg font-medium",children:s("app.error")}),l.jsx("p",{className:"text-gray-600 mt-1",children:c})]}),l.jsx("button",{onClick:()=>f(null),className:"ml-4 text-gray-500 hover:text-gray-700","aria-label":s("app.closeButton"),children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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?l.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):r.length===0?l.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:l.jsx("p",{className:"text-gray-600",children:s("app.noServers")})}):l.jsx("div",{className:"space-y-6",children:r.map(($,ce)=>l.jsx(Wv,{server:$,onRemove:g,onEdit:M,onToggle:m,onRefresh:y},ce))}),j&&l.jsx(t1,{server:j,onEdit:A,onCancel:()=>v(null)}),C&&l.jsx(n1,{onSuccess:q,onCancel:()=>k(!1)})]})},cu=()=>{const{t:s}=Oe(),[i,r]=w.useState([]),[c,f]=w.useState(!0),[d,h]=w.useState(null),[x,g]=w.useState(0),m=w.useCallback(async()=>{try{f(!0);const M=localStorage.getItem("mcphub_token"),A=await fetch(Ne("/groups"),{headers:{"x-auth-token":M||""}});if(!A.ok)throw new Error(`Status: ${A.status}`);const L=await A.json();L&&L.success&&Array.isArray(L.data)?r(L.data):(console.error("Invalid group data format:",L),r([])),h(null)}catch(M){console.error("Error fetching groups:",M),h(M instanceof Error?M.message:"Failed to fetch groups"),r([])}finally{f(!1)}},[]),y=w.useCallback(()=>{g(M=>M+1)},[]),j=async(M,A,L=[])=>{try{const q=localStorage.getItem("mcphub_token"),$=await fetch(Ne("/groups"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":q||""},body:JSON.stringify({name:M,description:A,servers:L})}),ce=await $.json();return $.ok?(y(),ce.data||null):(h(ce.message||s("groups.createError")),null)}catch(q){return h(q instanceof Error?q.message:"Failed to create group"),null}},v=async(M,A)=>{try{const L=localStorage.getItem("mcphub_token"),q=await fetch(Ne(`/groups/${M}`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":L||""},body:JSON.stringify(A)}),$=await q.json();return q.ok?(y(),$.data||null):(h($.message||s("groups.updateError")),null)}catch(L){return h(L instanceof Error?L.message:"Failed to update group"),null}},T=async(M,A)=>{try{const L=localStorage.getItem("mcphub_token"),q=await fetch(Ne(`/groups/${M}/servers/batch`),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":L||""},body:JSON.stringify({servers:A})}),$=await q.json();return q.ok?(y(),$.data||null):(h($.message||s("groups.updateError")),null)}catch(L){return h(L instanceof Error?L.message:"Failed to update group servers"),null}},S=async M=>{try{const A=localStorage.getItem("mcphub_token"),L=await fetch(Ne(`/groups/${M}`),{method:"DELETE",headers:{"x-auth-token":A||""}}),q=await L.json();return L.ok?(y(),!0):(h(q.message||s("groups.deleteError")),!1)}catch(A){return h(A instanceof Error?A.message:"Failed to delete group"),!1}},C=async(M,A)=>{try{const L=localStorage.getItem("mcphub_token"),q=await fetch(Ne(`/groups/${M}/servers`),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":L||""},body:JSON.stringify({serverName:A})}),$=await q.json();return q.ok?(y(),$.data||null):(h($.message||s("groups.serverAddError")),null)}catch(L){return h(L instanceof Error?L.message:"Failed to add server to group"),null}},k=async(M,A)=>{try{const L=localStorage.getItem("mcphub_token"),q=await fetch(Ne(`/groups/${M}/servers/${A}`),{method:"DELETE",headers:{"x-auth-token":L||""}}),$=await q.json();return q.ok?(y(),$.data||null):(h($.message||s("groups.serverRemoveError")),null)}catch(L){return h(L instanceof Error?L.message:"Failed to remove server from group"),null}};return w.useEffect(()=>{m()},[m,x]),{groups:i,loading:c,error:d,setError:h,triggerRefresh:y,createGroup:j,updateGroup:v,updateGroupServers:T,deleteGroup:S,addServerToGroup:C,removeServerFromGroup:k}},l1=({onAdd:s,onCancel:i})=>{const{t:r}=Oe(),{createGroup:c}=cu(),{servers:f}=_l(),[d,h]=w.useState([]),[x,g]=w.useState(null),[m,y]=w.useState(!1),[j,v]=w.useState({name:"",description:"",servers:[]});w.useEffect(()=>{h(f.filter(C=>C.enabled!==!1))},[f]);const T=C=>{const{name:k,value:M}=C.target;v(A=>({...A,[k]:M}))},S=async C=>{C.preventDefault(),y(!0),g(null);try{if(!j.name.trim()){g(r("groups.nameRequired")),y(!1);return}if(!await c(j.name,j.description,j.servers)){g(r("groups.createError")),y(!1);return}s()}catch(k){g(k instanceof Error?k.message:String(k)),y(!1)}};return l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:r("groups.addNew")}),x&&l.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:x}),l.jsxs("form",{onSubmit:S,children:[l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[r("groups.name")," *"]}),l.jsx("input",{type:"text",id:"name",name:"name",value:j.name,onChange:T,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})]}),l.jsx(zg,{className:"mb-6",label:r("groups.servers"),noOptionsText:r("groups.noServerOptions"),values:j.servers,options:d.map(C=>({value:C.name,label:C.name})),onChange:C=>v(k=>({...k,servers:C}))}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{type:"button",onClick:i,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:m,children:r("common.cancel")}),l.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-50",disabled:m,children:r(m?"common.submitting":"common.create")})]})]})]})})})},r1=({group:s,onEdit:i,onCancel:r})=>{const{t:c}=Oe(),{updateGroup:f}=cu(),{servers:d}=_l(),[h,x]=w.useState([]),[g,m]=w.useState(null),[y,j]=w.useState(!1),[v,T]=w.useState({name:s.name,description:s.description||"",servers:s.servers||[]});w.useEffect(()=>{x(d.filter(k=>k.enabled!==!1))},[d]);const S=k=>{const{name:M,value:A}=k.target;T(L=>({...L,[M]:A}))},C=async k=>{k.preventDefault(),j(!0),m(null);try{if(!v.name.trim()){m(c("groups.nameRequired")),j(!1);return}if(!await f(s.id,{name:v.name,description:v.description,servers:v.servers})){m(c("groups.updateError")),j(!1);return}i()}catch(M){m(M instanceof Error?M.message:String(M)),j(!1)}};return l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx("div",{className:"bg-white rounded-lg shadow-lg max-w-md w-full",children:l.jsxs("div",{className:"p-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-800 mb-4",children:c("groups.edit")}),g&&l.jsx("div",{className:"mb-4 p-3 bg-red-100 text-red-700 rounded",children:g}),l.jsxs("form",{onSubmit:C,children:[l.jsxs("div",{className:"mb-4",children:[l.jsxs("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:[c("groups.name")," *"]}),l.jsx("input",{type:"text",id:"name",name:"name",value:v.name,onChange:S,className:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",placeholder:c("groups.namePlaceholder"),required:!0})]}),l.jsx(zg,{className:"mb-6",label:c("groups.servers"),noOptionsText:c("groups.noServerOptions"),values:v.servers,options:h.map(k=>({value:k.name,label:k.name})),onChange:k=>T(M=>({...M,servers:k}))}),l.jsxs("div",{className:"flex justify-end space-x-3",children:[l.jsx("button",{type:"button",onClick:r,className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:y,children:c("common.cancel")}),l.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:c(y?"common.submitting":"common.save")})]})]})]})})})},i1=({group:s,servers:i,onEdit:r,onDelete:c})=>{const{t:f}=Oe(),{showToast:d}=Ll(),[h,x]=w.useState(!1),[g,m]=w.useState(!1),y=()=>{r(s)},j=()=>{x(!0)},v=()=>{c(s.id),x(!1)},T=()=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(s.id).then(()=>{m(!0),setTimeout(()=>m(!1),2e3)});else{const C=document.createElement("textarea");C.value=s.id,C.style.position="fixed",C.style.left="-9999px",document.body.appendChild(C),C.focus(),C.select();try{document.execCommand("copy"),m(!0),setTimeout(()=>m(!1),2e3)}catch(k){d(f("common.copyFailed")||"Copy failed","error"),console.error("Copy to clipboard failed:",k)}document.body.removeChild(C)}},S=i.filter(C=>s.servers.includes(C.name));return l.jsxs("div",{className:"bg-white shadow rounded-lg p-6",children:[l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-800",children:s.name}),l.jsxs("div",{className:"flex items-center ml-3",children:[l.jsx("span",{className:"text-xs text-gray-500 mr-1",children:s.id}),l.jsx("button",{onClick:T,className:"p-1 text-gray-400 hover:text-gray-600 transition-colors",title:f("common.copy"),children:g?l.jsx(yi,{size:14,className:"text-green-500"}):l.jsx(ug,{size:14})})]})]}),s.description&&l.jsx("p",{className:"text-gray-600 text-sm mt-1",children:s.description})]}),l.jsxs("div",{className:"flex items-center space-x-3",children:[l.jsx("div",{className:"bg-blue-50 text-blue-700 px-3 py-1 rounded-full text-sm",children:f("groups.serverCount",{count:s.servers.length})}),l.jsx("button",{onClick:y,className:"text-gray-500 hover:text-gray-700",title:f("groups.edit"),children:l.jsx(dg,{size:18})}),l.jsx("button",{onClick:j,className:"text-gray-500 hover:text-red-600",title:f("groups.delete"),children:l.jsx(vb,{size:18})})]})]}),l.jsx("div",{className:"mt-4",children:S.length===0?l.jsx("p",{className:"text-gray-500 italic",children:f("groups.noServers")}):l.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:S.map(C=>l.jsxs("div",{className:"inline-flex items-center px-3 py-1 bg-gray-50 rounded",children:[l.jsx("span",{className:"font-medium text-gray-700 text-sm",children:C.name}),l.jsx("span",{className:`ml-2 inline-block h-2 w-2 rounded-full ${C.status==="connected"?"bg-green-500":C.status==="connecting"?"bg-yellow-500":"bg-red-500"}`})]},C.name))})}),l.jsx(Dg,{isOpen:h,onClose:()=>x(!1),onConfirm:v,serverName:s.name,isGroup:!0})]})},o1=()=>{const{t:s}=Oe(),{groups:i,loading:r,error:c,setError:f,deleteGroup:d,triggerRefresh:h}=cu(),{servers:x}=_l(),[g,m]=w.useState(null),[y,j]=w.useState(!1),v=M=>{m(M)},T=()=>{m(null),h()},S=async M=>{await d(M)||f(s("groups.deleteError"))},C=()=>{j(!0)},k=()=>{j(!1),h()};return l.jsxs("div",{children:[l.jsxs("div",{className:"flex justify-between items-center mb-8",children:[l.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:s("pages.groups.title")}),l.jsx("div",{className:"flex space-x-4",children:l.jsxs("button",{onClick:C,className:"px-4 py-2 bg-blue-100 text-blue-800 rounded hover:bg-blue-200 flex items-center",children:[l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),s("groups.add")]})})]}),c&&l.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:l.jsx("p",{children:c})}),r?l.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:l.jsxs("div",{className:"flex flex-col items-center justify-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):i.length===0?l.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:l.jsx("p",{className:"text-gray-600",children:s("groups.noGroups")})}):l.jsx("div",{className:"space-y-6",children:i.map(M=>l.jsx(i1,{group:M,servers:x,onEdit:v,onDelete:S},M.id))}),y&&l.jsx(l1,{onAdd:k,onCancel:k}),g&&l.jsx(r1,{group:g,onEdit:T,onCancel:()=>m(null)})]})},c1=({onSuccess:s,onCancel:i})=>{const{t:r}=Oe(),[c,f]=w.useState({currentPassword:"",newPassword:""}),[d,h]=w.useState(""),[x,g]=w.useState(!1),[m,y]=w.useState(null),[j,v]=w.useState(!1),T=C=>{const{name:k,value:M}=C.target;k==="confirmPassword"?h(M):f(A=>({...A,[k]:M}))},S=async C=>{if(C.preventDefault(),y(null),c.newPassword!==d){y(r("auth.passwordsNotMatch"));return}g(!0);try{const k=await Hy(c);k.success?(v(!0),s&&s()):y(k.message||r("auth.changePasswordError"))}catch{y(r("auth.changePasswordError"))}finally{g(!1)}};return l.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[l.jsx("h2",{className:"text-xl font-bold mb-4",children:r("auth.changePassword")}),j?l.jsx("div",{className:"bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded mb-4",children:r("auth.changePasswordSuccess")}):l.jsxs("form",{onSubmit:S,children:[m&&l.jsx("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:m}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"currentPassword",children:r("auth.currentPassword")}),l.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:c.currentPassword,onChange:T,required:!0})]}),l.jsxs("div",{className:"mb-4",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"newPassword",children:r("auth.newPassword")}),l.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:c.newPassword,onChange:T,required:!0,minLength:6})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:r("auth.confirmPassword")}),l.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:d,onChange:T,required:!0,minLength:6})]}),l.jsxs("div",{className:"flex justify-end space-x-2",children:[i&&l.jsx("button",{type:"button",onClick:i,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")}),l.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?l.jsxs("span",{className:"flex items-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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")})]})]})]})},u1=()=>{const{t:s}=Oe(),{showToast:i}=Ll(),[r,c]=w.useState({enableGlobalRoute:!0,enableGroupNameRoute:!0,enableBearerAuth:!1,bearerAuthKey:"",skipAuth:!1}),[f,d]=w.useState({bearerAuthKey:""}),[h,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[g,m]=w.useState({enabled:!1,dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),[y,j]=w.useState(!1),[v,T]=w.useState(null),[S,C]=w.useState(0),k=w.useCallback(()=>{C(P=>P+1)},[]),M=w.useCallback(async()=>{var P,Y,W,B,V,ae;j(!0),T(null);try{const se=localStorage.getItem("mcphub_token"),Z=await fetch(Ne("/settings"),{headers:{"x-auth-token":se||""}});if(!Z.ok)throw new Error(`HTTP error! Status: ${Z.status}`);const U=await Z.json();U.success&&((Y=(P=U.data)==null?void 0:P.systemConfig)!=null&&Y.routing)&&c({enableGlobalRoute:U.data.systemConfig.routing.enableGlobalRoute??!0,enableGroupNameRoute:U.data.systemConfig.routing.enableGroupNameRoute??!0,enableBearerAuth:U.data.systemConfig.routing.enableBearerAuth??!1,bearerAuthKey:U.data.systemConfig.routing.bearerAuthKey||"",skipAuth:U.data.systemConfig.routing.skipAuth??!1}),U.success&&((B=(W=U.data)==null?void 0:W.systemConfig)!=null&&B.install)&&x({pythonIndexUrl:U.data.systemConfig.install.pythonIndexUrl||"",npmRegistry:U.data.systemConfig.install.npmRegistry||""}),U.success&&((ae=(V=U.data)==null?void 0:V.systemConfig)!=null&&ae.smartRouting)&&m({enabled:U.data.systemConfig.smartRouting.enabled??!1,dbUrl:U.data.systemConfig.smartRouting.dbUrl||"",openaiApiBaseUrl:U.data.systemConfig.smartRouting.openaiApiBaseUrl||"",openaiApiKey:U.data.systemConfig.smartRouting.openaiApiKey||"",openaiApiEmbeddingModel:U.data.systemConfig.smartRouting.openaiApiEmbeddingModel||""})}catch(se){console.error("Failed to fetch settings:",se),T(se instanceof Error?se.message:"Failed to fetch settings"),i(s("errors.failedToFetchSettings"))}finally{j(!1)}},[s]),A=async(P,Y)=>{j(!0),T(null);try{const W=localStorage.getItem("mcphub_token"),B=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":W||""},body:JSON.stringify({routing:{[P]:Y}})});if(!B.ok)throw new Error(`HTTP error! Status: ${B.status}`);return(await B.json()).success?(c({...r,[P]:Y}),i(s("settings.systemConfigUpdated")),!0):(i(s("errors.failedToUpdateRouteConfig")),!1)}catch(W){return console.error("Failed to update routing config:",W),T(W instanceof Error?W.message:"Failed to update routing config"),i(s("errors.failedToUpdateRouteConfig")),!1}finally{j(!1)}},L=async(P,Y)=>{j(!0),T(null);try{const W=localStorage.getItem("mcphub_token"),B=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":W||""},body:JSON.stringify({install:{[P]:Y}})});if(!B.ok)throw new Error(`HTTP error! Status: ${B.status}`);return(await B.json()).success?(x({...h,[P]:Y}),i(s("settings.systemConfigUpdated")),!0):(i(s("errors.failedToUpdateSystemConfig")),!1)}catch(W){return console.error("Failed to update system config:",W),T(W instanceof Error?W.message:"Failed to update system config"),i(s("errors.failedToUpdateSystemConfig")),!1}finally{j(!1)}},q=async(P,Y)=>{j(!0),T(null);try{const W=localStorage.getItem("mcphub_token"),B=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":W||""},body:JSON.stringify({smartRouting:{[P]:Y}})});if(!B.ok){const ae=await B.json();throw new Error(ae.message||`HTTP error! Status: ${B.status}`)}const V=await B.json();return V.success?(m({...g,[P]:Y}),i(s("settings.systemConfigUpdated")),!0):(i(V.message||s("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(W){console.error("Failed to update smart routing config:",W);const B=W instanceof Error?W.message:"Failed to update smart routing config";return T(B),i(B),!1}finally{j(!1)}},$=async P=>{j(!0),T(null);try{const Y=localStorage.getItem("mcphub_token"),W=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":Y||""},body:JSON.stringify({smartRouting:P})});if(!W.ok){const V=await W.json();throw new Error(V.message||`HTTP error! Status: ${W.status}`)}const B=await W.json();return B.success?(m({...g,...P}),i(s("settings.systemConfigUpdated")),!0):(i(B.message||s("errors.failedToUpdateSmartRoutingConfig")),!1)}catch(Y){console.error("Failed to update smart routing config:",Y);const W=Y instanceof Error?Y.message:"Failed to update smart routing config";return T(W),i(W),!1}finally{j(!1)}},ce=async P=>{j(!0),T(null);try{const Y=localStorage.getItem("mcphub_token"),W=await fetch(Ne("/system-config"),{method:"PUT",headers:{"Content-Type":"application/json","x-auth-token":Y||""},body:JSON.stringify({routing:P})});if(!W.ok)throw new Error(`HTTP error! Status: ${W.status}`);return(await W.json()).success?(c({...r,...P}),i(s("settings.systemConfigUpdated")),!0):(i(s("errors.failedToUpdateRouteConfig")),!1)}catch(Y){return console.error("Failed to update routing config:",Y),T(Y instanceof Error?Y.message:"Failed to update routing config"),i(s("errors.failedToUpdateRouteConfig")),!1}finally{j(!1)}};return w.useEffect(()=>{M()},[M,S]),w.useEffect(()=>{r&&d({bearerAuthKey:r.bearerAuthKey})},[r]),{routingConfig:r,tempRoutingConfig:f,setTempRoutingConfig:d,installConfig:h,smartRoutingConfig:g,loading:y,error:v,setError:T,triggerRefresh:k,fetchSettings:M,updateRoutingConfig:A,updateInstallConfig:L,updateSmartRoutingConfig:q,updateSmartRoutingConfigBatch:$,updateRoutingConfigBatch:ce}};function d1(s=32){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=new Uint8Array(s);return crypto.getRandomValues(r),Array.from(r).map(c=>i.charAt(c%i.length)).join("")}const f1=()=>{const{t:s,i18n:i}=Oe(),r=Rn(),{showToast:c}=Ll(),[f,d]=w.useState(i.language);w.useEffect(()=>{d(i.language)},[i.language]);const[h,x]=w.useState({pythonIndexUrl:"",npmRegistry:""}),[g,m]=w.useState({dbUrl:"",openaiApiBaseUrl:"",openaiApiKey:"",openaiApiEmbeddingModel:""}),{routingConfig:y,tempRoutingConfig:j,setTempRoutingConfig:v,installConfig:T,smartRoutingConfig:S,loading:C,updateRoutingConfig:k,updateRoutingConfigBatch:M,updateInstallConfig:A,updateSmartRoutingConfig:L,updateSmartRoutingConfigBatch:q}=u1();w.useEffect(()=>{T&&x(T)},[T]),w.useEffect(()=>{S&&m({dbUrl:S.dbUrl||"",openaiApiBaseUrl:S.openaiApiBaseUrl||"",openaiApiKey:S.openaiApiKey||"",openaiApiEmbeddingModel:S.openaiApiEmbeddingModel||""})},[S]);const[$,ce]=w.useState({routingConfig:!1,installConfig:!1,smartRoutingConfig:!1,password:!1}),P=z=>{ce(ue=>({...ue,[z]:!ue[z]}))},Y=async(z,ue)=>{if(z==="enableBearerAuth"&&ue===!0&&!j.bearerAuthKey&&!y.bearerAuthKey){const N=d1();W(N),await M({enableBearerAuth:!0,bearerAuthKey:N})&&v(ne=>({...ne,bearerAuthKey:N}));return}await k(z,ue)},W=z=>{v(ue=>({...ue,bearerAuthKey:z}))},B=async()=>{await k("bearerAuthKey",j.bearerAuthKey)},V=(z,ue)=>{x({...h,[z]:ue})},ae=async z=>{await A(z,h[z])},se=(z,ue)=>{m({...g,[z]:ue})},Z=async z=>{await L(z,g[z])},U=async z=>{if(z){const ue=g.dbUrl||S.dbUrl,N=g.openaiApiKey||S.openaiApiKey;if(!ue||!N){const ne=[];ue||ne.push(s("settings.dbUrl")),N||ne.push(s("settings.openaiApiKey")),c(s("settings.smartRoutingValidationError",{fields:ne.join(", ")}));return}const X={enabled:z};g.dbUrl!==S.dbUrl&&(X.dbUrl=g.dbUrl),g.openaiApiBaseUrl!==S.openaiApiBaseUrl&&(X.openaiApiBaseUrl=g.openaiApiBaseUrl),g.openaiApiKey!==S.openaiApiKey&&(X.openaiApiKey=g.openaiApiKey),g.openaiApiEmbeddingModel!==S.openaiApiEmbeddingModel&&(X.openaiApiEmbeddingModel=g.openaiApiEmbeddingModel),await q(X)}else await L("enabled",z)},R=()=>{setTimeout(()=>{r("/")},2e3)},Q=z=>{localStorage.setItem("i18nextLng",z),window.location.reload()};return l.jsxs("div",{className:"container mx-auto",children:[l.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-8",children:s("pages.settings.title")}),l.jsx("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.language")}),l.jsxs("div",{className:"flex space-x-3",children:[l.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${f.startsWith("en")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>Q("en"),children:"English"}),l.jsx("button",{className:`px-3 py-1.5 rounded-md transition-colors text-sm ${f.startsWith("zh")?"bg-blue-500 text-white":"bg-blue-100 text-blue-800 hover:bg-blue-200"}`,onClick:()=>Q("zh"),children:"中文"})]})]})}),l.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>P("smartRoutingConfig"),children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.smartRouting")}),l.jsx("span",{className:"text-gray-500",children:$.smartRoutingConfig?"▼":"►"})]}),$.smartRoutingConfig&&l.jsxs("div",{className:"space-y-4 mt-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableSmartRouting")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableSmartRoutingDescription")})]}),l.jsx(js,{disabled:C,checked:S.enabled,onCheckedChange:z=>U(z)})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsx("div",{className:"mb-2",children:l.jsxs("h3",{className:"font-medium text-gray-700",children:[l.jsx("span",{className:"text-red-500 px-1",children:"*"}),s("settings.dbUrl")]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:g.dbUrl,onChange:z=>se("dbUrl",z.target.value),placeholder:s("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:C}),l.jsx("button",{onClick:()=>Z("dbUrl"),disabled:C,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:s("common.save")})]})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsx("div",{className:"mb-2",children:l.jsxs("h3",{className:"font-medium text-gray-700",children:[l.jsx("span",{className:"text-red-500 px-1",children:"*"}),s("settings.openaiApiKey")]})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"password",value:g.openaiApiKey,onChange:z=>se("openaiApiKey",z.target.value),placeholder:s("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:C}),l.jsx("button",{onClick:()=>Z("openaiApiKey"),disabled:C,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:s("common.save")})]})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsx("div",{className:"mb-2",children:l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.openaiApiBaseUrl")})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:g.openaiApiBaseUrl,onChange:z=>se("openaiApiBaseUrl",z.target.value),placeholder:s("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:C}),l.jsx("button",{onClick:()=>Z("openaiApiBaseUrl"),disabled:C,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:s("common.save")})]})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsx("div",{className:"mb-2",children:l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.openaiApiEmbeddingModel")})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:g.openaiApiEmbeddingModel,onChange:z=>se("openaiApiEmbeddingModel",z.target.value),placeholder:s("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:C}),l.jsx("button",{onClick:()=>Z("openaiApiEmbeddingModel"),disabled:C,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:s("common.save")})]})]})]})]}),l.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>P("routingConfig"),children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("pages.settings.routeConfig")}),l.jsx("span",{className:"text-gray-500",children:$.routingConfig?"▼":"►"})]}),$.routingConfig&&l.jsxs("div",{className:"space-y-4 mt-4",children:[l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableBearerAuth")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableBearerAuthDescription")})]}),l.jsx(js,{disabled:C,checked:y.enableBearerAuth,onCheckedChange:z=>Y("enableBearerAuth",z)})]}),y.enableBearerAuth&&l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{className:"mb-2",children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.bearerAuthKey")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.bearerAuthKeyDescription")})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:j.bearerAuthKey,onChange:z=>W(z.target.value),placeholder:s("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:C||!y.enableBearerAuth}),l.jsx("button",{onClick:B,disabled:C||!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:s("common.save")})]})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableGlobalRoute")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableGlobalRouteDescription")})]}),l.jsx(js,{disabled:C,checked:y.enableGlobalRoute,onCheckedChange:z=>Y("enableGlobalRoute",z)})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.enableGroupNameRoute")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.enableGroupNameRouteDescription")})]}),l.jsx(js,{disabled:C,checked:y.enableGroupNameRoute,onCheckedChange:z=>Y("enableGroupNameRoute",z)})]}),l.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.skipAuth")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.skipAuthDescription")})]}),l.jsx(js,{disabled:C,checked:y.skipAuth,onCheckedChange:z=>Y("skipAuth",z)})]})]})]}),l.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>P("installConfig"),children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("settings.installConfig")}),l.jsx("span",{className:"text-gray-500",children:$.installConfig?"▼":"►"})]}),$.installConfig&&l.jsxs("div",{className:"space-y-4 mt-4",children:[l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{className:"mb-2",children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.pythonIndexUrl")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.pythonIndexUrlDescription")})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:h.pythonIndexUrl,onChange:z=>V("pythonIndexUrl",z.target.value),placeholder:s("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:C}),l.jsx("button",{onClick:()=>ae("pythonIndexUrl"),disabled:C,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:s("common.save")})]})]}),l.jsxs("div",{className:"p-3 bg-gray-50 rounded-md",children:[l.jsxs("div",{className:"mb-2",children:[l.jsx("h3",{className:"font-medium text-gray-700",children:s("settings.npmRegistry")}),l.jsx("p",{className:"text-sm text-gray-500",children:s("settings.npmRegistryDescription")})]}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("input",{type:"text",value:h.npmRegistry,onChange:z=>V("npmRegistry",z.target.value),placeholder:s("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:C}),l.jsx("button",{onClick:()=>ae("npmRegistry"),disabled:C,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:s("common.save")})]})]})]})]}),l.jsxs("div",{className:"bg-white shadow rounded-lg py-4 px-6 mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center cursor-pointer",onClick:()=>P("password"),children:[l.jsx("h2",{className:"font-semibold text-gray-800",children:s("auth.changePassword")}),l.jsx("span",{className:"text-gray-500",children:$.password?"▼":"►"})]}),$.password&&l.jsx("div",{className:"max-w-lg mt-4",children:l.jsx(c1,{onSuccess:R})})]})]})},m1=()=>{const{t:s}=Oe(),[i,r]=w.useState([]),[c,f]=w.useState([]),[d,h]=w.useState([]),[x,g]=w.useState([]),[m,y]=w.useState(""),[j,v]=w.useState(""),[T,S]=w.useState(""),[C,k]=w.useState(!0),[M,A]=w.useState(null),[L,q]=w.useState(null),[$,ce]=w.useState([]),[P,Y]=w.useState(1),[W,B]=w.useState(9),[V,ae]=w.useState(1),se=w.useCallback(async()=>{try{k(!0);const te=localStorage.getItem("mcphub_token"),le=await fetch(Ne("/market/servers"),{headers:{"x-auth-token":te||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const oe=await le.json();oe&&oe.success&&Array.isArray(oe.data)?(f(oe.data),Z(oe.data,P)):(console.error("Invalid market servers data format:",oe),A(s("market.fetchError")))}catch(te){console.error("Error fetching market servers:",te),A(te instanceof Error?te.message:String(te))}finally{k(!1)}},[s]),Z=w.useCallback((te,le,oe=W)=>{const xe=te.length,ye=Math.ceil(xe/oe);ae(ye);const Me=Math.max(1,Math.min(le,ye));Me!==le&&Y(Me);const Ve=(Me-1)*oe,Nt=te.slice(Ve,Ve+oe);r(Nt)},[W]),U=w.useCallback(te=>{Y(te),Z(c,te,W)},[c,Z,W]),R=w.useCallback(async()=>{try{const te=localStorage.getItem("mcphub_token"),le=await fetch(Ne("/market/categories"),{headers:{"x-auth-token":te||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const oe=await le.json();oe&&oe.success&&Array.isArray(oe.data)?h(oe.data):console.error("Invalid categories data format:",oe)}catch(te){console.error("Error fetching categories:",te)}},[]),Q=w.useCallback(async()=>{try{const te=localStorage.getItem("mcphub_token"),le=await fetch(Ne("/market/tags"),{headers:{"x-auth-token":te||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const oe=await le.json();oe&&oe.success&&Array.isArray(oe.data)?g(oe.data):console.error("Invalid tags data format:",oe)}catch(te){console.error("Error fetching tags:",te)}},[]),z=w.useCallback(async te=>{try{k(!0);const le=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/market/servers/${te}`),{headers:{"x-auth-token":le||""}});if(!oe.ok)throw new Error(`Status: ${oe.status}`);const xe=await oe.json();return xe&&xe.success&&xe.data?(q(xe.data),xe.data):(console.error("Invalid server data format:",xe),A(s("market.serverNotFound")),null)}catch(le){return console.error(`Error fetching server ${te}:`,le),A(le instanceof Error?le.message:String(le)),null}finally{k(!1)}},[s]),ue=w.useCallback(async te=>{try{if(k(!0),S(te),!te.trim()){se();return}const le=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/market/servers/search?query=${encodeURIComponent(te)}`),{headers:{"x-auth-token":le||""}});if(!oe.ok)throw new Error(`Status: ${oe.status}`);const xe=await oe.json();xe&&xe.success&&Array.isArray(xe.data)?(f(xe.data),Y(1),Z(xe.data,1)):(console.error("Invalid search results format:",xe),A(s("market.searchError")))}catch(le){console.error("Error searching servers:",le),A(le instanceof Error?le.message:String(le))}finally{k(!1)}},[s,c,Z,se]),N=w.useCallback(async te=>{try{if(k(!0),y(te),v(""),!te){se();return}const le=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/market/categories/${encodeURIComponent(te)}`),{headers:{"x-auth-token":le||""}});if(!oe.ok)throw new Error(`Status: ${oe.status}`);const xe=await oe.json();xe&&xe.success&&Array.isArray(xe.data)?(f(xe.data),Y(1),Z(xe.data,1)):(console.error("Invalid category filter results format:",xe),A(s("market.filterError")))}catch(le){console.error("Error filtering servers by category:",le),A(le instanceof Error?le.message:String(le))}finally{k(!1)}},[s,se,Z]),X=w.useCallback(async te=>{try{if(k(!0),v(te),y(""),!te){se();return}const le=localStorage.getItem("mcphub_token"),oe=await fetch(Ne(`/market/tags/${encodeURIComponent(te)}`),{headers:{"x-auth-token":le||""}});if(!oe.ok)throw new Error(`Status: ${oe.status}`);const xe=await oe.json();xe&&xe.success&&Array.isArray(xe.data)?(f(xe.data),Y(1),Z(xe.data,1)):(console.error("Invalid tag filter results format:",xe),A(s("market.tagFilterError")))}catch(le){console.error("Error filtering servers by tag:",le),A(le instanceof Error?le.message:String(le))}finally{k(!1)}},[s,se,Z]),ne=w.useCallback(async()=>{try{const te=localStorage.getItem("mcphub_token"),le=await fetch(Ne("/servers"),{headers:{"x-auth-token":te||""}});if(!le.ok)throw new Error(`Status: ${le.status}`);const oe=await le.json();if(oe&&oe.success&&Array.isArray(oe.data)){const xe=oe.data.map(ye=>ye.name);ce(xe)}}catch(te){console.error("Error fetching installed servers:",te)}},[]),F=w.useCallback(te=>$.includes(te),[$]),re=w.useCallback(async(te,le)=>{var oe,xe;try{const ye=(oe=te.installations)!=null&&oe.npm?"npm":Object.keys(te.installations||{}).length>0?Object.keys(te.installations)[0]:null;if(!ye||!((xe=te.installations)!=null&&xe[ye]))return A(s("market.noInstallationMethod")),!1;const Me=te.installations[ye],Ve={name:te.name,config:le.type==="stdio"?{command:le.command||Me.command||"",args:le.args||Me.args||[],env:{...Me.env,...le.env}}:le},Nt=localStorage.getItem("mcphub_token"),Ct=await fetch(Ne("/servers"),{method:"POST",headers:{"Content-Type":"application/json","x-auth-token":Nt||""},body:JSON.stringify(Ve)});if(!Ct.ok){const fa=await Ct.json();throw new Error(fa.message||`Status: ${Ct.status}`)}return await ne(),!0}catch(ye){return console.error("Error installing server:",ye),A(ye instanceof Error?ye.message:String(ye)),!1}},[s,ne]),je=w.useCallback(te=>{B(te),Y(1),Z(c,1,te)},[c,Z]);return w.useEffect(()=>{se(),R(),Q(),ne()},[se,R,Q,ne]),{servers:i,allServers:c,categories:d,tags:x,selectedCategory:m,selectedTag:j,searchQuery:T,loading:C,error:M,setError:A,currentServer:L,fetchMarketServers:se,fetchServerByName:z,searchServers:ue,filterByCategory:N,filterByTag:X,installServer:re,currentPage:P,totalPages:V,serversPerPage:W,changePage:U,changeServersPerPage:je,isServerInstalled:F}},h1=({server:s,onClick:i})=>{var x,g,m,y;const{t:r}=Oe(),c=()=>{if(!s.tags||s.tags.length===0)return{tagsToShow:[],hasMore:!1,moreCount:0};const j=28,v=A=>A.length+3;let T=0,S=0;const C=[...s.tags].sort((A,L)=>A.length-L.length);for(S=0;S<C.length;S++){const A=v(C[S]);if(T+A>j)break;if(T+=A,S===C.length-1)return{tagsToShow:C,hasMore:!1,moreCount:0}}S===0&&C.length>0&&(S=1);const k=C.length-S,M=3+String(k).length+r("market.moreTags").length;return T+M<=j||S<1?{tagsToShow:C.slice(0,S),hasMore:!0,moreCount:k}:{tagsToShow:C.slice(0,Math.max(1,S-1)),hasMore:!0,moreCount:k+1}},{tagsToShow:f,hasMore:d,moreCount:h}=c();return l.jsxs("div",{className:"bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow cursor-pointer flex flex-col h-full",onClick:()=>i(s),children:[l.jsxs("div",{className:"flex justify-between items-start mb-3",children:[l.jsx("h3",{className:"text-lg font-semibold text-gray-900 line-clamp-1 mr-2",children:s.display_name}),s.is_official&&l.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")})]}),l.jsx("p",{className:"text-gray-600 text-sm mb-4 line-clamp-2 min-h-[40px]",children:s.description}),l.jsx("div",{className:"flex flex-wrap gap-1 mb-2 min-h-[28px]",children:((x=s.categories)==null?void 0:x.length)>0?s.categories.map((j,v)=>l.jsx("span",{className:"bg-gray-100 text-gray-800 text-xs px-2 py-1 rounded whitespace-nowrap",children:j},v)):l.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),l.jsx("div",{className:"relative mb-3 min-h-[28px] overflow-x-auto",children:((g=s.tags)==null?void 0:g.length)>0?l.jsxs("div",{className:"flex gap-1 items-center whitespace-nowrap",children:[f.map((j,v)=>l.jsxs("span",{className:"bg-green-50 text-green-700 text-xs px-2 py-1 rounded flex-shrink-0",children:["#",j]},v)),d&&l.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")]})]}):l.jsx("span",{className:"text-xs text-gray-400 py-1",children:"-"})}),l.jsxs("div",{className:"flex justify-between items-center mt-auto pt-2 text-xs text-gray-500 border-t border-gray-100",children:[l.jsxs("div",{className:"overflow-hidden",children:[l.jsxs("span",{className:"whitespace-nowrap",children:[r("market.by")," "]}),l.jsx("span",{className:"font-medium whitespace-nowrap overflow-hidden text-ellipsis max-w-[120px] inline-block align-bottom",children:((m=s.author)==null?void 0:m.name)||r("market.unknown")})]}),l.jsxs("div",{className:"flex items-center flex-shrink-0",children:[l.jsx("svg",{className:"h-4 w-4 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),l.jsxs("span",{children:[((y=s.tools)==null?void 0:y.length)||0," ",r("market.tools")]})]})]})]})},g1=({server:s,onBack:i,onInstall:r,installing:c=!1,isInstalled:f=!1})=>{var M,A;const{t:d}=Oe(),[h,x]=w.useState(!1),[g,m]=w.useState(null),y=()=>f?{className:"bg-green-600 cursor-default px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:d("market.installed")}:c?{className:"bg-gray-400 cursor-not-allowed px-4 py-2 rounded text-sm font-medium text-white",disabled:!0,text:d("market.installing")}:{className:"bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded text-sm font-medium text-white",disabled:!1,text:d("market.install")},j=()=>{x(!h),m(null)},v=()=>{f||j()},T=()=>{if(!s.installations)return;if(s.installations.npm)return s.installations.npm;if(s.installations.uvx)return s.installations.uvx;if(s.installations.default)return s.installations.default;const L=Object.keys(s.installations);if(L.length>0)return s.installations[L[0]]},S=async L=>{try{m(null),r(s,L.config),x(!1)}catch(q){console.error("Error installing server:",q),m(d("errors.serverInstall"))}},C=y(),k=T();return l.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[l.jsx("div",{className:"mb-4",children:l.jsxs("button",{onClick:i,className:"text-gray-600 hover:text-gray-900 flex items-center",children:[l.jsx("svg",{className:"h-5 w-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})}),d("market.backToList")]})}),l.jsxs("div",{className:"flex justify-between items-start mb-4",children:[l.jsx("div",{children:l.jsxs("h2",{className:"text-2xl font-bold text-gray-900 flex items-center flex-wrap",children:[s.display_name,l.jsxs("span",{className:"text-sm font-normal text-gray-500 ml-2",children:["(",s.name,")"]}),l.jsxs("span",{className:"text-sm font-normal text-gray-600 ml-4",children:[d("market.author"),": ",s.author.name," • ",d("market.license"),": ",s.license," •",l.jsx("a",{href:s.repository.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline ml-1",children:d("market.repository")})]})]})}),l.jsxs("div",{className:"flex items-center",children:[s.is_official&&l.jsx("span",{className:"bg-blue-100 text-blue-800 text-sm font-medium px-4 py-2 rounded mr-2 flex items-center",children:d("market.official")}),l.jsx("button",{onClick:v,disabled:C.disabled,className:C.className,children:C.text})]})]}),l.jsx("p",{className:"text-gray-700 mb-6",children:s.description}),l.jsxs("div",{className:"mb-6",children:[l.jsxs("h3",{className:"text-lg font-semibold mb-3",children:[d("market.categories")," & ",d("market.tags")]}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[(M=s.categories)==null?void 0:M.map((L,q)=>l.jsx("span",{className:"bg-gray-100 text-gray-800 px-3 py-1 rounded",children:L},`cat-${q}`)),s.tags&&s.tags.map((L,q)=>l.jsxs("span",{className:"bg-gray-100 text-green-700 px-2 py-1 rounded text-sm",children:["#",L]},`tag-${q}`))]})]}),s.arguments&&Object.keys(s.arguments).length>0&&l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:d("market.arguments")}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[l.jsx("thead",{className:"bg-gray-50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:d("market.argumentName")}),l.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:d("market.description")}),l.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:d("market.required")}),l.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider whitespace-nowrap",children:d("market.example")})]})}),l.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:Object.entries(s.arguments).map(([L,q],$)=>l.jsxs("tr",{children:[l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:L}),l.jsx("td",{className:"px-6 py-4 text-sm text-gray-500",children:q.description}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:q.required?l.jsx("span",{className:"text-green-600",children:"✓"}):l.jsx("span",{className:"text-red-600",children:"✗"})}),l.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:l.jsx("code",{className:"bg-gray-100 px-2 py-1 rounded",children:q.example})})]},$))})]})})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:d("market.tools")}),l.jsx("div",{className:"space-y-4",children:(A=s.tools)==null?void 0:A.map((L,q)=>l.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[l.jsxs("h4",{className:"font-medium mb-2",children:[L.name,l.jsx("button",{type:"button",onClick:()=>{const $=document.getElementById(`schema-${q}`);$&&$.classList.toggle("hidden")},className:"text-sm text-blue-600 hover:underline focus:outline-none ml-2",children:d("market.viewSchema")})]}),l.jsx("p",{className:"text-gray-600 mb-2",children:L.description}),l.jsx("div",{className:"mt-2",children:l.jsx("pre",{id:`schema-${q}`,className:"hidden bg-gray-50 p-3 rounded text-sm overflow-auto mt-2",children:JSON.stringify(L.inputSchema,null,2)})})]},q))})]}),s.examples&&s.examples.length>0&&l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-3",children:d("market.examples")}),l.jsx("div",{className:"space-y-4",children:s.examples.map((L,q)=>l.jsxs("div",{className:"border border-gray-200 rounded p-4",children:[l.jsx("h4",{className:"font-medium mb-2",children:L.title}),l.jsx("p",{className:"text-gray-600 mb-2",children:L.description}),l.jsx("pre",{className:"bg-gray-50 p-3 rounded text-sm overflow-auto",children:L.prompt})]},q))})]}),l.jsx("div",{className:"mt-6 flex justify-end",children:l.jsx("button",{onClick:v,disabled:C.disabled,className:C.className,children:C.text})}),h&&l.jsx("div",{className:"fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4",children:l.jsx(ou,{onSubmit:S,onCancel:j,modalTitle:d("market.installServer",{name:s.display_name}),formError:g,initialData:{name:s.name,status:"disconnected",config:k?{command:k.command||"",args:k.args||[],env:k.env||{}}:void 0}})})]})},p1=({currentPage:s,totalPages:i,onPageChange:r})=>{const c=()=>{const f=[];f.push(l.jsx("button",{onClick:()=>r(1),className:`px-3 py-1 mx-1 rounded ${s===1?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"1"},"first"));let h=Math.max(2,s-Math.floor(5/2));h>2&&f.push(l.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis1"));for(let x=h;x<=Math.min(i-1,h+5-3);x++)f.push(l.jsx("button",{onClick:()=>r(x),className:`px-3 py-1 mx-1 rounded ${s===x?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:x},x));return h+5-3<i-1&&f.push(l.jsx("span",{className:"px-3 py-1",children:"..."},"ellipsis2")),i>1&&f.push(l.jsx("button",{onClick:()=>r(i),className:`px-3 py-1 mx-1 rounded ${s===i?"bg-blue-500 text-white":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:i},"last")),f};return i<=1?null:l.jsxs("div",{className:"flex justify-center items-center my-6",children:[l.jsx("button",{onClick:()=>r(Math.max(1,s-1)),disabled:s===1,className:`px-3 py-1 rounded mr-2 ${s===1?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"« Prev"}),l.jsx("div",{className:"flex",children:c()}),l.jsx("button",{onClick:()=>r(Math.min(i,s+1)),disabled:s===i,className:`px-3 py-1 rounded ml-2 ${s===i?"bg-gray-100 text-gray-400 cursor-not-allowed":"bg-gray-200 hover:bg-gray-300 text-gray-700"}`,children:"Next »"})]})},vh=()=>{const{t:s}=Oe(),i=Rn();da();const{serverName:r}=Hx(),{showToast:c}=Ll(),{servers:f,allServers:d,categories:h,loading:x,error:g,setError:m,searchServers:y,filterByCategory:j,filterByTag:v,selectedCategory:T,selectedTag:S,installServer:C,fetchServerByName:k,isServerInstalled:M,currentPage:A,totalPages:L,changePage:q,serversPerPage:$,changeServersPerPage:ce}=m1(),[P,Y]=w.useState(null),[W,B]=w.useState(""),[V,ae]=w.useState(!1),[se,Z]=w.useState(!1);w.useEffect(()=>{(async()=>{if(r){const re=await k(r);re?Y(re):i("/market")}else Y(null)})()},[r,k,i]);const U=F=>{F.preventDefault(),y(W)},R=F=>{j(F)},Q=()=>{B(""),j(""),v("")},z=F=>{i(`/market/${F.name}`)},ue=()=>{i("/market")},N=async(F,re)=>{try{ae(!0),await C(F,re)&&c(s("market.installSuccess",{serverName:F.display_name}),"success")}finally{ae(!1)}},X=F=>{q(F),window.scrollTo({top:0,behavior:"smooth"})},ne=F=>{const re=parseInt(F.target.value,10);ce(re)};return P?l.jsx(g1,{server:P,onBack:ue,onInstall:N,installing:V,isInstalled:M(P.name)}):l.jsxs("div",{children:[l.jsx("div",{className:"flex justify-between items-center mb-8",children:l.jsx("div",{children:l.jsxs("h1",{className:"text-2xl font-bold text-gray-900 flex items-center",children:[s("market.title"),l.jsx("span",{className:"text-sm text-gray-500 font-normal ml-2",children:s("pages.market.title").split(" - ")[1]})]})})}),g&&l.jsx("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4 mb-6",children:l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("p",{children:g}),l.jsx("button",{onClick:()=>m(null),className:"text-red-700 hover:text-red-900",children:l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:l.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"})})})]})}),l.jsx("div",{className:"bg-white shadow rounded-lg p-6 mb-6",children:l.jsxs("form",{onSubmit:U,className:"flex space-x-4 mb-0",children:[l.jsx("div",{className:"flex-grow",children:l.jsx("input",{type:"text",value:W,onChange:F=>B(F.target.value),placeholder:s("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"})}),l.jsx("button",{type:"submit",className:"bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded",children:s("market.search")}),(W||T||S)&&l.jsx("button",{type:"button",onClick:Q,className:"border border-gray-300 text-gray-700 font-medium py-2 px-4 rounded hover:bg-gray-50",children:s("market.clearFilters")})]})}),l.jsxs("div",{className:"flex flex-col md:flex-row gap-6",children:[l.jsx("div",{className:"md:w-48 flex-shrink-0",children:l.jsx("div",{className:"bg-white shadow rounded-lg p-4 mb-6 sticky top-4",children:h.length>0?l.jsxs("div",{className:"mb-6",children:[l.jsxs("div",{className:"flex justify-between items-center mb-3",children:[l.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")}),T&&l.jsx("span",{className:"text-xs text-blue-600 cursor-pointer hover:underline",onClick:()=>j(""),children:s("market.clearCategoryFilter")})]}),l.jsx("div",{className:"flex flex-col gap-2",children:h.map(F=>l.jsx("button",{onClick:()=>R(F),className:`px-3 py-2 rounded text-sm text-left ${T===F?"bg-blue-100 text-blue-800 font-medium":"bg-gray-100 text-gray-800 hover:bg-gray-200"}`,children:F},F))})]}):x?l.jsxs("div",{className:"mb-6",children:[l.jsx("div",{className:"mb-3",children:l.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")})}),l.jsxs("div",{className:"flex flex-col gap-2 items-center py-4",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-sm text-gray-600",children:s("app.loading")})]})]}):l.jsxs("div",{className:"mb-6",children:[l.jsx("div",{className:"mb-3",children:l.jsx("h3",{className:"font-medium text-gray-900",children:s("market.categories")})}),l.jsx("p",{className:"text-sm text-gray-600 py-2",children:s("market.noCategories")})]})})}),l.jsx("div",{className:"flex-grow",children:x?l.jsx("div",{className:"bg-white shadow rounded-lg p-6 flex items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center",children:[l.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:[l.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),l.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"})]}),l.jsx("p",{className:"text-gray-600",children:s("app.loading")})]})}):f.length===0?l.jsx("div",{className:"bg-white shadow rounded-lg p-6",children:l.jsx("p",{className:"text-gray-600",children:s("market.noServers")})}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6",children:f.map((F,re)=>l.jsx(h1,{server:F,onClick:z},re))}),l.jsxs("div",{className:"flex justify-between items-center mb-4",children:[l.jsx("div",{className:"text-sm text-gray-500",children:s("market.showing",{from:(A-1)*$+1,to:Math.min(A*$,d.length),total:d.length})}),l.jsx(p1,{currentPage:A,totalPages:L,onPageChange:X}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsxs("label",{htmlFor:"perPage",className:"text-sm text-gray-600",children:[s("market.perPage"),":"]}),l.jsxs("select",{id:"perPage",value:$,onChange:ne,className:"border rounded p-1 text-sm",children:[l.jsx("option",{value:"6",children:"6"}),l.jsx("option",{value:"9",children:"9"}),l.jsx("option",{value:"12",children:"12"}),l.jsx("option",{value:"24",children:"24"})]})]})]}),l.jsx("div",{className:"mt-6"})]})})]})]})},x1={default:"bg-blue-500 text-white hover:bg-blue-600 focus:ring-blue-500",outline:"border border-gray-300 dark:border-gray-700 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",ghost:"bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 text-gray-700 dark:text-gray-300",link:"bg-transparent underline-offset-4 hover:underline text-blue-500 hover:text-blue-600",destructive:"bg-red-500 text-white hover:bg-red-600 focus:ring-red-500"},y1={default:"h-10 py-2 px-4",sm:"h-8 px-3 text-sm",lg:"h-12 px-6",icon:"h-10 w-10 p-0"};function b1({variant:s="default",size:i="default",className:r,disabled:c,children:f,...d}){return l.jsx("button",{className:an("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",x1[s],y1[i],r),disabled:c,...d,children:f})}const v1=({logs:s,isLoading:i=!1,error:r=null,onClear:c})=>{const{t:f}=Oe(),d=w.useRef(null),[h,x]=w.useState(!0),[g,m]=w.useState(""),[y,j]=w.useState(["info","error","warn","debug"]),[v,T]=w.useState(["main","child"]);w.useEffect(()=>{h&&d.current&&(d.current.scrollTop=d.current.scrollHeight)},[s,h]);const S=s.filter(A=>{const L=g?A.message.toLowerCase().includes(g.toLowerCase()):!0,q=y.includes(A.type),$=v.includes(A.source);return L&&q&&$}),C=A=>new Date(A).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),k=A=>{switch(A){case"error":return"bg-red-400";case"warn":return"bg-yellow-400";case"debug":return"bg-purple-400";default:return"bg-blue-400"}},M=A=>{switch(A){case"main":return"bg-green-400";case"child":return"bg-orange-400";default:return"bg-gray-400"}};return l.jsxs("div",{className:"flex flex-col h-full",children:[l.jsxs("div",{className:"bg-card p-3 rounded-t-md border-b flex flex-wrap items-center justify-between gap-2",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("span",{className:"font-semibold text-sm",children:[f("logs.filters"),":"]}),l.jsx("input",{type:"text",placeholder:f("logs.search"),className:"px-2 py-1 text-sm border rounded",value:g,onChange:A=>m(A.target.value)}),l.jsx("div",{className:"flex gap-1 items-center",children:["info","error","warn","debug"].map(A=>l.jsx(ri,{variant:y.includes(A)?"default":"outline",className:`cursor-pointer ${y.includes(A)?k(A):""}`,onClick:()=>{y.includes(A)?j(L=>L.filter(q=>q!==A)):j(L=>[...L,A])},children:A},A))}),l.jsx("div",{className:"flex gap-1 items-center ml-2",children:["main","child"].map(A=>l.jsx(ri,{variant:v.includes(A)?"default":"outline",className:`cursor-pointer ${v.includes(A)?M(A):""}`,onClick:()=>{v.includes(A)?T(L=>L.filter(q=>q!==A)):T(L=>[...L,A])},children:f(A==="main"?"logs.mainProcess":"logs.childProcess")},A))})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("label",{className:"flex items-center gap-1 text-sm",children:[l.jsx("input",{type:"checkbox",checked:h,onChange:()=>x(!h),className:"form-checkbox h-4 w-4"}),f("logs.autoScroll")]}),l.jsx(b1,{variant:"outline",size:"sm",onClick:c,disabled:i||s.length===0,children:f("logs.clearLogs")})]})]}),l.jsx("div",{ref:d,className:"flex-grow p-2 overflow-auto bg-card rounded-b-md font-mono text-sm",style:{maxHeight:"calc(100vh - 300px)"},children:i?l.jsx("div",{className:"flex justify-center items-center h-full",children:l.jsx("span",{children:f("logs.loading")})}):r?l.jsx("div",{className:"text-red-500 p-2",children:r.message}):S.length===0?l.jsx("div",{className:"text-center text-muted-foreground p-8",children:g||y.length<4||v.length<2?f("logs.noMatch"):f("logs.noLogs")}):S.map((A,L)=>l.jsxs("div",{className:`py-1 border-b border-gray-100 dark:border-gray-800 ${A.type==="error"?"text-red-500":A.type==="warn"?"text-yellow-500":""}`,children:[l.jsxs("span",{className:"text-gray-400",children:["[",C(A.timestamp),"]"]}),l.jsx(ri,{className:`ml-2 mr-1 ${k(A.type)}`,children:A.type}),l.jsxs(ri,{variant:"default",className:`mr-2 ${M(A.source)}`,children:[A.source==="main"?f("logs.main"):f("logs.child"),A.processId?` (${A.processId})`:""]}),l.jsx("span",{className:"whitespace-pre-wrap",children:A.message})]},`${A.timestamp}-${L}`))})]})},w1=async()=>{try{const s=nn(),r=await(await fetch(Ne("/logs"),{method:"DELETE",headers:{"x-auth-token":s||""}})).json();if(!r.success)throw new Error(r.error||"Failed to clear logs")}catch(s){throw console.error("Error clearing logs:",s),s}},j1=()=>{const[s,i]=w.useState([]),[r,c]=w.useState(!0),[f,d]=w.useState(null);return w.useEffect(()=>{let x=null,g=!0;const m=()=>{try{x&&x.close();const y=nn();x=new EventSource(Ne(`/logs/stream?token=${y}`)),x.onmessage=j=>{if(g)try{const v=JSON.parse(j.data);v.type==="initial"?(i(v.logs),c(!1)):v.type==="log"&&i(T=>[...T,v.log])}catch(v){console.error("Error parsing SSE message:",v)}},x.onerror=()=>{g&&(x&&(x.close(),setTimeout(m,5e3)),d(new Error("Connection to log stream lost, attempting to reconnect...")))}}catch(y){if(!g)return;d(y instanceof Error?y:new Error("Failed to connect to log stream")),c(!1)}};return m(),()=>{g=!1,x&&x.close()}},[]),{logs:s,loading:r,error:f,clearLogs:async()=>{try{await w1(),i([])}catch(x){d(x instanceof Error?x:new Error("Failed to clear logs"))}}}},S1=()=>{const{t:s}=Oe(),{logs:i,loading:r,error:c,clearLogs:f}=j1();return l.jsxs("div",{className:"container mx-auto p-4",children:[l.jsx("div",{className:"flex justify-between items-center mb-4",children:l.jsx("h1",{className:"text-2xl font-bold",children:s("pages.logs.title")})}),l.jsx("div",{className:"bg-card rounded-md shadow-sm",children:l.jsx(v1,{logs:i,isLoading:r,error:c,onClear:f})})]})};function wh(){const s=lu();return l.jsx(ov,{children:l.jsx(Gy,{children:l.jsx(rv,{children:l.jsx(Sy,{basename:s,children:l.jsxs(Wx,{children:[l.jsx($t,{path:"/login",element:l.jsx(qv,{})}),l.jsx($t,{element:l.jsx(Bv,{}),children:l.jsxs($t,{element:l.jsx(Hv,{}),children:[l.jsx($t,{path:"/",element:l.jsx(Vv,{})}),l.jsx($t,{path:"/servers",element:l.jsx(s1,{})}),l.jsx($t,{path:"/groups",element:l.jsx(o1,{})}),l.jsx($t,{path:"/market",element:l.jsx(vh,{})}),l.jsx($t,{path:"/market/:serverName",element:l.jsx(vh,{})}),l.jsx($t,{path:"/logs",element:l.jsx(S1,{})}),l.jsx($t,{path:"/settings",element:l.jsx(f1,{})})]})}),l.jsx($t,{path:"*",element:l.jsx(Zh,{to:"/"})})]})})})})})}const Se=s=>typeof s=="string",Al=()=>{let s,i;const r=new Promise((c,f)=>{s=c,i=f});return r.resolve=s,r.reject=i,r},jh=s=>s==null?"":""+s,N1=(s,i,r)=>{s.forEach(c=>{i[c]&&(r[c]=i[c])})},C1=/###/g,Sh=s=>s&&s.indexOf("###")>-1?s.replace(C1,"."):s,Nh=s=>!s||Se(s),Rl=(s,i,r)=>{const c=Se(i)?i.split("."):i;let f=0;for(;f<c.length-1;){if(Nh(s))return{};const d=Sh(c[f]);!s[d]&&r&&(s[d]=new r),Object.prototype.hasOwnProperty.call(s,d)?s=s[d]:s={},++f}return Nh(s)?{}:{obj:s,k:Sh(c[f])}},Ch=(s,i,r)=>{const{obj:c,k:f}=Rl(s,i,Object);if(c!==void 0||i.length===1){c[f]=r;return}let d=i[i.length-1],h=i.slice(0,i.length-1),x=Rl(s,h,Object);for(;x.obj===void 0&&h.length;)d=`${h[h.length-1]}.${d}`,h=h.slice(0,h.length-1),x=Rl(s,h,Object),x!=null&&x.obj&&typeof x.obj[`${x.k}.${d}`]<"u"&&(x.obj=void 0);x.obj[`${x.k}.${d}`]=r},E1=(s,i,r,c)=>{const{obj:f,k:d}=Rl(s,i,Object);f[d]=f[d]||[],f[d].push(r)},di=(s,i)=>{const{obj:r,k:c}=Rl(s,i);if(r&&Object.prototype.hasOwnProperty.call(r,c))return r[c]},k1=(s,i,r)=>{const c=di(s,r);return c!==void 0?c:di(i,r)},Ug=(s,i,r)=>{for(const c in i)c!=="__proto__"&&c!=="constructor"&&(c in s?Se(s[c])||s[c]instanceof String||Se(i[c])||i[c]instanceof String?r&&(s[c]=i[c]):Ug(s[c],i[c],r):s[c]=i[c]);return s},ys=s=>s.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var T1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const A1=s=>Se(s)?s.replace(/[&<>"'\/]/g,i=>T1[i]):s;class R1{constructor(i){this.capacity=i,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(i){const r=this.regExpMap.get(i);if(r!==void 0)return r;const c=new RegExp(i);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(i,c),this.regExpQueue.push(i),c}}const O1=[" ",",","?","!",";"],M1=new R1(20),z1=(s,i,r)=>{i=i||"",r=r||"";const c=O1.filter(h=>i.indexOf(h)<0&&r.indexOf(h)<0);if(c.length===0)return!0;const f=M1.getRegExp(`(${c.map(h=>h==="?"?"\\?":h).join("|")})`);let d=!f.test(s);if(!d){const h=s.indexOf(r);h>0&&!f.test(s.substring(0,h))&&(d=!0)}return d},Fc=function(s,i){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!s)return;if(s[i])return Object.prototype.hasOwnProperty.call(s,i)?s[i]:void 0;const c=i.split(r);let f=s;for(let d=0;d<c.length;){if(!f||typeof f!="object")return;let h,x="";for(let g=d;g<c.length;++g)if(g!==d&&(x+=r),x+=c[g],h=f[x],h!==void 0){if(["string","number","boolean"].indexOf(typeof h)>-1&&g<c.length-1)continue;d+=g-d+1;break}f=h}return f},fi=s=>s==null?void 0:s.replace("_","-"),D1={type:"logger",log(s){this.output("log",s)},warn(s){this.output("warn",s)},error(s){this.output("error",s)},output(s,i){var r,c;(c=(r=console==null?void 0:console[s])==null?void 0:r.apply)==null||c.call(r,console,i)}};class mi{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(i,r)}init(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=i||D1,this.options=r,this.debug=r.debug}log(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return this.forward(r,"log","",!0)}warn(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return this.forward(r,"warn","",!0)}error(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return this.forward(r,"error","")}deprecate(){for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(i,r,c,f){return f&&!this.debug?null:(Se(i[0])&&(i[0]=`${c}${this.prefix} ${i[0]}`),this.logger[r](i))}create(i){return new mi(this.logger,{prefix:`${this.prefix}:${i}:`,...this.options})}clone(i){return i=i||this.options,i.prefix=i.prefix||this.prefix,new mi(this.logger,i)}}var ua=new mi;class bi{constructor(){this.observers={}}on(i,r){return i.split(" ").forEach(c=>{this.observers[c]||(this.observers[c]=new Map);const f=this.observers[c].get(r)||0;this.observers[c].set(r,f+1)}),this}off(i,r){if(this.observers[i]){if(!r){delete this.observers[i];return}this.observers[i].delete(r)}}emit(i){for(var r=arguments.length,c=new Array(r>1?r-1:0),f=1;f<r;f++)c[f-1]=arguments[f];this.observers[i]&&Array.from(this.observers[i].entries()).forEach(h=>{let[x,g]=h;for(let m=0;m<g;m++)x(...c)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(h=>{let[x,g]=h;for(let m=0;m<g;m++)x.apply(x,[i,...c])})}}class Eh extends bi{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=i||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}removeNamespaces(i){const r=this.options.ns.indexOf(i);r>-1&&this.options.ns.splice(r,1)}getResource(i,r,c){var m,y;let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const d=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,h=f.ignoreJSONStructure!==void 0?f.ignoreJSONStructure:this.options.ignoreJSONStructure;let x;i.indexOf(".")>-1?x=i.split("."):(x=[i,r],c&&(Array.isArray(c)?x.push(...c):Se(c)&&d?x.push(...c.split(d)):x.push(c)));const g=di(this.data,x);return!g&&!r&&!c&&i.indexOf(".")>-1&&(i=x[0],r=x[1],c=x.slice(2).join(".")),g||!h||!Se(c)?g:Fc((y=(m=this.data)==null?void 0:m[i])==null?void 0:y[r],c,d)}addResource(i,r,c,f){let d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const h=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let x=[i,r];c&&(x=x.concat(h?c.split(h):c)),i.indexOf(".")>-1&&(x=i.split("."),f=r,r=x[1]),this.addNamespaces(r),Ch(this.data,x,f),d.silent||this.emit("added",i,r,c,f)}addResources(i,r,c){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const d in c)(Se(c[d])||Array.isArray(c[d]))&&this.addResource(i,r,d,c[d],{silent:!0});f.silent||this.emit("added",i,r,c)}addResourceBundle(i,r,c,f,d){let h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},x=[i,r];i.indexOf(".")>-1&&(x=i.split("."),f=c,c=r,r=x[1]),this.addNamespaces(r);let g=di(this.data,x)||{};h.skipCopy||(c=JSON.parse(JSON.stringify(c))),f?Ug(g,c,d):g={...g,...c},Ch(this.data,x,g),h.silent||this.emit("added",i,r,c)}removeResourceBundle(i,r){this.hasResourceBundle(i,r)&&delete this.data[i][r],this.removeNamespaces(r),this.emit("removed",i,r)}hasResourceBundle(i,r){return this.getResource(i,r)!==void 0}getResourceBundle(i,r){return r||(r=this.options.defaultNS),this.getResource(i,r)}getDataByLanguage(i){return this.data[i]}hasLanguageSomeTranslations(i){const r=this.getDataByLanguage(i);return!!(r&&Object.keys(r)||[]).find(f=>r[f]&&Object.keys(r[f]).length>0)}toJSON(){return this.data}}var Lg={processors:{},addPostProcessor(s){this.processors[s.name]=s},handle(s,i,r,c,f){return s.forEach(d=>{var h;i=((h=this.processors[d])==null?void 0:h.process(i,r,c,f))??i}),i}};const kh={},Th=s=>!Se(s)&&typeof s!="boolean"&&typeof s!="number";class hi extends bi{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),N1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],i,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ua.create("translator")}changeLanguage(i){i&&(this.language=i)}exists(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;const c=this.resolve(i,r);return(c==null?void 0:c.res)!==void 0}extractFromKey(i,r){let c=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const f=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let d=r.ns||this.options.defaultNS||[];const h=c&&i.indexOf(c)>-1,x=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!z1(i,c,f);if(h&&!x){const g=i.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:i,namespaces:Se(d)?[d]:d};const m=i.split(c);(c!==f||c===f&&this.options.ns.indexOf(m[0])>-1)&&(d=m.shift()),i=m.join(f)}return{key:i,namespaces:Se(d)?[d]:d}}translate(i,r,c){if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);const f=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,d=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:h,namespaces:x}=this.extractFromKey(i[i.length-1],r),g=x[x.length-1],m=r.lng||this.language,y=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((m==null?void 0:m.toLowerCase())==="cimode"){if(y){const V=r.nsSeparator||this.options.nsSeparator;return f?{res:`${g}${V}${h}`,usedKey:h,exactUsedKey:h,usedLng:m,usedNS:g,usedParams:this.getUsedParamsDetails(r)}:`${g}${V}${h}`}return f?{res:h,usedKey:h,exactUsedKey:h,usedLng:m,usedNS:g,usedParams:this.getUsedParamsDetails(r)}:h}const j=this.resolve(i,r);let v=j==null?void 0:j.res;const T=(j==null?void 0:j.usedKey)||h,S=(j==null?void 0:j.exactUsedKey)||h,C=["[object Number]","[object Function]","[object RegExp]"],k=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,A=r.count!==void 0&&!Se(r.count),L=hi.hasDefaultValue(r),q=A?this.pluralResolver.getSuffix(m,r.count,r):"",$=r.ordinal&&A?this.pluralResolver.getSuffix(m,r.count,{ordinal:!1}):"",ce=A&&!r.ordinal&&r.count===0,P=ce&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${q}`]||r[`defaultValue${$}`]||r.defaultValue;let Y=v;M&&!v&&L&&(Y=P);const W=Th(Y),B=Object.prototype.toString.apply(Y);if(M&&Y&&W&&C.indexOf(B)<0&&!(Se(k)&&Array.isArray(Y))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(T,Y,{...r,ns:x}):`key '${h} (${this.language})' returned an object instead of string.`;return f?(j.res=V,j.usedParams=this.getUsedParamsDetails(r),j):V}if(d){const V=Array.isArray(Y),ae=V?[]:{},se=V?S:T;for(const Z in Y)if(Object.prototype.hasOwnProperty.call(Y,Z)){const U=`${se}${d}${Z}`;L&&!v?ae[Z]=this.translate(U,{...r,defaultValue:Th(P)?P[Z]:void 0,joinArrays:!1,ns:x}):ae[Z]=this.translate(U,{...r,joinArrays:!1,ns:x}),ae[Z]===U&&(ae[Z]=Y[Z])}v=ae}}else if(M&&Se(k)&&Array.isArray(v))v=v.join(k),v&&(v=this.extendTranslation(v,i,r,c));else{let V=!1,ae=!1;!this.isValidLookup(v)&&L&&(V=!0,v=P),this.isValidLookup(v)||(ae=!0,v=h);const Z=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ae?void 0:v,U=L&&P!==v&&this.options.updateMissing;if(ae||V||U){if(this.logger.log(U?"updateKey":"missingKey",m,g,h,U?P:v),d){const ue=this.resolve(h,{...r,keySeparator:!1});ue&&ue.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 R=[];const Q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Q&&Q[0])for(let ue=0;ue<Q.length;ue++)R.push(Q[ue]);else this.options.saveMissingTo==="all"?R=this.languageUtils.toResolveHierarchy(r.lng||this.language):R.push(r.lng||this.language);const z=(ue,N,X)=>{var F;const ne=L&&X!==v?X:Z;this.options.missingKeyHandler?this.options.missingKeyHandler(ue,g,N,ne,U,r):(F=this.backendConnector)!=null&&F.saveMissing&&this.backendConnector.saveMissing(ue,g,N,ne,U,r),this.emit("missingKey",ue,g,N,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?R.forEach(ue=>{const N=this.pluralResolver.getSuffixes(ue,r);ce&&r[`defaultValue${this.options.pluralSeparator}zero`]&&N.indexOf(`${this.options.pluralSeparator}zero`)<0&&N.push(`${this.options.pluralSeparator}zero`),N.forEach(X=>{z([ue],h+X,r[`defaultValue${X}`]||P)})}):z(R,h,P))}v=this.extendTranslation(v,i,r,j,c),ae&&v===h&&this.options.appendNamespaceToMissingKey&&(v=`${g}:${h}`),(ae||V)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}:${h}`:h,V?v:void 0))}return f?(j.res=v,j.usedParams=this.getUsedParamsDetails(r),j):v}extendTranslation(i,r,c,f,d){var m,y;var h=this;if((m=this.i18nFormat)!=null&&m.parse)i=this.i18nFormat.parse(i,{...this.options.interpolation.defaultVariables,...c},c.lng||this.language||f.usedLng,f.usedNS,f.usedKey,{resolved:f});else if(!c.skipInterpolation){c.interpolation&&this.interpolator.init({...c,interpolation:{...this.options.interpolation,...c.interpolation}});const j=Se(i)&&(((y=c==null?void 0:c.interpolation)==null?void 0:y.skipOnVariables)!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(j){const S=i.match(this.interpolator.nestingRegexp);v=S&&S.length}let T=c.replace&&!Se(c.replace)?c.replace:c;if(this.options.interpolation.defaultVariables&&(T={...this.options.interpolation.defaultVariables,...T}),i=this.interpolator.interpolate(i,T,c.lng||this.language||f.usedLng,c),j){const S=i.match(this.interpolator.nestingRegexp),C=S&&S.length;v<C&&(c.nest=!1)}!c.lng&&f&&f.res&&(c.lng=this.language||f.usedLng),c.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var S=arguments.length,C=new Array(S),k=0;k<S;k++)C[k]=arguments[k];return(d==null?void 0:d[0])===C[0]&&!c.context?(h.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${r[0]}`),null):h.translate(...C,r)},c)),c.interpolation&&this.interpolator.reset()}const x=c.postProcess||this.options.postProcess,g=Se(x)?[x]:x;return i!=null&&(g!=null&&g.length)&&c.applyPostProcessor!==!1&&(i=Lg.handle(g,i,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...f,usedParams:this.getUsedParamsDetails(c)},...c}:c,this)),i}resolve(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c,f,d,h,x;return Se(i)&&(i=[i]),i.forEach(g=>{if(this.isValidLookup(c))return;const m=this.extractFromKey(g,r),y=m.key;f=y;let j=m.namespaces;this.options.fallbackNS&&(j=j.concat(this.options.fallbackNS));const v=r.count!==void 0&&!Se(r.count),T=v&&!r.ordinal&&r.count===0,S=r.context!==void 0&&(Se(r.context)||typeof r.context=="number")&&r.context!=="",C=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);j.forEach(k=>{var M,A;this.isValidLookup(c)||(x=k,!kh[`${C[0]}-${k}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((A=this.utils)!=null&&A.hasLoadedNamespace(x))&&(kh[`${C[0]}-${k}`]=!0,this.logger.warn(`key "${f}" for languages "${C.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!!!")),C.forEach(L=>{var ce;if(this.isValidLookup(c))return;h=L;const q=[y];if((ce=this.i18nFormat)!=null&&ce.addLookupKeys)this.i18nFormat.addLookupKeys(q,y,L,k,r);else{let P;v&&(P=this.pluralResolver.getSuffix(L,r.count,r));const Y=`${this.options.pluralSeparator}zero`,W=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(q.push(y+P),r.ordinal&&P.indexOf(W)===0&&q.push(y+P.replace(W,this.options.pluralSeparator)),T&&q.push(y+Y)),S){const B=`${y}${this.options.contextSeparator}${r.context}`;q.push(B),v&&(q.push(B+P),r.ordinal&&P.indexOf(W)===0&&q.push(B+P.replace(W,this.options.pluralSeparator)),T&&q.push(B+Y))}}let $;for(;$=q.pop();)this.isValidLookup(c)||(d=$,c=this.getResource(L,k,$,r))}))})}),{res:c,usedKey:f,exactUsedKey:d,usedLng:h,usedNS:x}}isValidLookup(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}getResource(i,r,c){var d;let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(d=this.i18nFormat)!=null&&d.getResource?this.i18nFormat.getResource(i,r,c,f):this.resourceStore.getResource(i,r,c,f)}getUsedParamsDetails(){let i=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"],c=i.replace&&!Se(i.replace);let f=c?i.replace:i;if(c&&typeof i.count<"u"&&(f.count=i.count),this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),!c){f={...f};for(const d of r)delete f[d]}return f}static hasDefaultValue(i){const r="defaultValue";for(const c in i)if(Object.prototype.hasOwnProperty.call(i,c)&&r===c.substring(0,r.length)&&i[c]!==void 0)return!0;return!1}}class Ah{constructor(i){this.options=i,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ua.create("languageUtils")}getScriptPartFromCode(i){if(i=fi(i),!i||i.indexOf("-")<0)return null;const r=i.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(i){if(i=fi(i),!i||i.indexOf("-")<0)return i;const r=i.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(i){if(Se(i)&&i.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(i)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?i.toLowerCase():i)}return this.options.cleanCode||this.options.lowerCaseLng?i.toLowerCase():i}isSupportedCode(i){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(i=this.getLanguagePartFromCode(i)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(i)>-1}getBestMatchFromCodes(i){if(!i)return null;let r;return i.forEach(c=>{if(r)return;const f=this.formatLanguageCode(c);(!this.options.supportedLngs||this.isSupportedCode(f))&&(r=f)}),!r&&this.options.supportedLngs&&i.forEach(c=>{if(r)return;const f=this.getLanguagePartFromCode(c);if(this.isSupportedCode(f))return r=f;r=this.options.supportedLngs.find(d=>{if(d===f)return d;if(!(d.indexOf("-")<0&&f.indexOf("-")<0)&&(d.indexOf("-")>0&&f.indexOf("-")<0&&d.substring(0,d.indexOf("-"))===f||d.indexOf(f)===0&&f.length>1))return d})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(i,r){if(!i)return[];if(typeof i=="function"&&(i=i(r)),Se(i)&&(i=[i]),Array.isArray(i))return i;if(!r)return i.default||[];let c=i[r];return c||(c=i[this.getScriptPartFromCode(r)]),c||(c=i[this.formatLanguageCode(r)]),c||(c=i[this.getLanguagePartFromCode(r)]),c||(c=i.default),c||[]}toResolveHierarchy(i,r){const c=this.getFallbackCodes(r||this.options.fallbackLng||[],i),f=[],d=h=>{h&&(this.isSupportedCode(h)?f.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return Se(i)&&(i.indexOf("-")>-1||i.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(i)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(i)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(i))):Se(i)&&d(this.formatLanguageCode(i)),c.forEach(h=>{f.indexOf(h)<0&&d(this.formatLanguageCode(h))}),f}}const Rh={zero:0,one:1,two:2,few:3,many:4,other:5},Oh={select:s=>s===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class U1{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=i,this.options=r,this.logger=ua.create("pluralResolver"),this.pluralRulesCache={}}addRule(i,r){this.rules[i]=r}clearCache(){this.pluralRulesCache={}}getRule(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const c=fi(i==="dev"?"en":i),f=r.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:c,type:f});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];let h;try{h=new Intl.PluralRules(c,{type:f})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Oh;if(!i.match(/-|_/))return Oh;const g=this.languageUtils.getLanguagePartFromCode(i);h=this.getRule(g,r)}return this.pluralRulesCache[d]=h,h}needsPlural(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=this.getRule(i,r);return c||(c=this.getRule("dev",r)),(c==null?void 0:c.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(i,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(i,c).map(f=>`${r}${f}`)}getSuffixes(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=this.getRule(i,r);return c||(c=this.getRule("dev",r)),c?c.resolvedOptions().pluralCategories.sort((f,d)=>Rh[f]-Rh[d]).map(f=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${f}`):[]}getSuffix(i,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const f=this.getRule(i,c);return f?`${this.options.prepend}${c.ordinal?`ordinal${this.options.prepend}`:""}${f.select(r)}`:(this.logger.warn(`no plural rule found for: ${i}`),this.getSuffix("dev",r,c))}}const Mh=function(s,i,r){let c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,d=k1(s,i,r);return!d&&f&&Se(r)&&(d=Fc(s,r,c),d===void 0&&(d=Fc(i,r,c))),d},Bc=s=>s.replace(/\$/g,"$$$$");class L1{constructor(){var r;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ua.create("interpolator"),this.options=i,this.format=((r=i==null?void 0:i.interpolation)==null?void 0:r.format)||(c=>c),this.init(i)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};i.interpolation||(i.interpolation={escapeValue:!0});const{escape:r,escapeValue:c,useRawValueToEscape:f,prefix:d,prefixEscaped:h,suffix:x,suffixEscaped:g,formatSeparator:m,unescapeSuffix:y,unescapePrefix:j,nestingPrefix:v,nestingPrefixEscaped:T,nestingSuffix:S,nestingSuffixEscaped:C,nestingOptionsSeparator:k,maxReplaces:M,alwaysFormat:A}=i.interpolation;this.escape=r!==void 0?r:A1,this.escapeValue=c!==void 0?c:!0,this.useRawValueToEscape=f!==void 0?f:!1,this.prefix=d?ys(d):h||"{{",this.suffix=x?ys(x):g||"}}",this.formatSeparator=m||",",this.unescapePrefix=y?"":j||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=v?ys(v):T||ys("$t("),this.nestingSuffix=S?ys(S):C||ys(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=M||1e3,this.alwaysFormat=A!==void 0?A:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const i=(r,c)=>(r==null?void 0:r.source)===c?(r.lastIndex=0,r):new RegExp(c,"g");this.regexp=i(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=i(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=i(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(i,r,c,f){var T;let d,h,x;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=S=>{if(S.indexOf(this.formatSeparator)<0){const A=Mh(r,g,S,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(A,void 0,c,{...f,...r,interpolationkey:S}):A}const C=S.split(this.formatSeparator),k=C.shift().trim(),M=C.join(this.formatSeparator).trim();return this.format(Mh(r,g,k,this.options.keySeparator,this.options.ignoreJSONStructure),M,c,{...f,...r,interpolationkey:k})};this.resetRegExp();const y=(f==null?void 0:f.missingInterpolationHandler)||this.options.missingInterpolationHandler,j=((T=f==null?void 0:f.interpolation)==null?void 0:T.skipOnVariables)!==void 0?f.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:S=>Bc(S)},{regex:this.regexp,safeValue:S=>this.escapeValue?Bc(this.escape(S)):Bc(S)}].forEach(S=>{for(x=0;d=S.regex.exec(i);){const C=d[1].trim();if(h=m(C),h===void 0)if(typeof y=="function"){const M=y(i,d,f);h=Se(M)?M:""}else if(f&&Object.prototype.hasOwnProperty.call(f,C))h="";else if(j){h=d[0];continue}else this.logger.warn(`missed to pass in variable ${C} for interpolating ${i}`),h="";else!Se(h)&&!this.useRawValueToEscape&&(h=jh(h));const k=S.safeValue(h);if(i=i.replace(d[0],k),j?(S.regex.lastIndex+=h.length,S.regex.lastIndex-=d[0].length):S.regex.lastIndex=0,x++,x>=this.maxReplaces)break}}),i}nest(i,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f,d,h;const x=(g,m)=>{const y=this.nestingOptionsSeparator;if(g.indexOf(y)<0)return g;const j=g.split(new RegExp(`${y}[ ]*{`));let v=`{${j[1]}`;g=j[0],v=this.interpolate(v,h);const T=v.match(/'/g),S=v.match(/"/g);(((T==null?void 0:T.length)??0)%2===0&&!S||S.length%2!==0)&&(v=v.replace(/'/g,'"'));try{h=JSON.parse(v),m&&(h={...m,...h})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,C),`${g}${y}${v}`}return h.defaultValue&&h.defaultValue.indexOf(this.prefix)>-1&&delete h.defaultValue,g};for(;f=this.nestingRegexp.exec(i);){let g=[];h={...c},h=h.replace&&!Se(h.replace)?h.replace:h,h.applyPostProcessor=!1,delete h.defaultValue;let m=!1;if(f[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(f[1])){const y=f[1].split(this.formatSeparator).map(j=>j.trim());f[1]=y.shift(),g=y,m=!0}if(d=r(x.call(this,f[1].trim(),h),h),d&&f[0]===i&&!Se(d))return d;Se(d)||(d=jh(d)),d||(this.logger.warn(`missed to resolve ${f[1]} for nesting ${i}`),d=""),m&&(d=g.reduce((y,j)=>this.format(y,j,c.lng,{...c,interpolationkey:f[1].trim()}),d.trim())),i=i.replace(f[0],d),this.regexp.lastIndex=0}return i}}const _1=s=>{let i=s.toLowerCase().trim();const r={};if(s.indexOf("(")>-1){const c=s.split("(");i=c[0].toLowerCase().trim();const f=c[1].substring(0,c[1].length-1);i==="currency"&&f.indexOf(":")<0?r.currency||(r.currency=f.trim()):i==="relativetime"&&f.indexOf(":")<0?r.range||(r.range=f.trim()):f.split(";").forEach(h=>{if(h){const[x,...g]=h.split(":"),m=g.join(":").trim().replace(/^'+|'+$/g,""),y=x.trim();r[y]||(r[y]=m),m==="false"&&(r[y]=!1),m==="true"&&(r[y]=!0),isNaN(m)||(r[y]=parseInt(m,10))}})}return{formatName:i,formatOptions:r}},bs=s=>{const i={};return(r,c,f)=>{let d=f;f&&f.interpolationkey&&f.formatParams&&f.formatParams[f.interpolationkey]&&f[f.interpolationkey]&&(d={...d,[f.interpolationkey]:void 0});const h=c+JSON.stringify(d);let x=i[h];return x||(x=s(fi(c),f),i[h]=x),x(r)}};class H1{constructor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ua.create("formatter"),this.options=i,this.formats={number:bs((r,c)=>{const f=new Intl.NumberFormat(r,{...c});return d=>f.format(d)}),currency:bs((r,c)=>{const f=new Intl.NumberFormat(r,{...c,style:"currency"});return d=>f.format(d)}),datetime:bs((r,c)=>{const f=new Intl.DateTimeFormat(r,{...c});return d=>f.format(d)}),relativetime:bs((r,c)=>{const f=new Intl.RelativeTimeFormat(r,{...c});return d=>f.format(d,c.range||"day")}),list:bs((r,c)=>{const f=new Intl.ListFormat(r,{...c});return d=>f.format(d)})},this.init(i)}init(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=r.interpolation.formatSeparator||","}add(i,r){this.formats[i.toLowerCase().trim()]=r}addCached(i,r){this.formats[i.toLowerCase().trim()]=bs(r)}format(i,r,c){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const d=r.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(x=>x.indexOf(")")>-1)){const x=d.findIndex(g=>g.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,x)].join(this.formatSeparator)}return d.reduce((x,g)=>{var j;const{formatName:m,formatOptions:y}=_1(g);if(this.formats[m]){let v=x;try{const T=((j=f==null?void 0:f.formatParams)==null?void 0:j[f.interpolationkey])||{},S=T.locale||T.lng||f.locale||f.lng||c;v=this.formats[m](x,S,{...y,...f,...T})}catch(T){this.logger.warn(T)}return v}else this.logger.warn(`there was no format function for ${m}`);return x},i)}}const B1=(s,i)=>{s.pending[i]!==void 0&&(delete s.pending[i],s.pendingCount--)};class q1 extends bi{constructor(i,r,c){var d,h;let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=i,this.store=r,this.services=c,this.languageUtils=c.languageUtils,this.options=f,this.logger=ua.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=f.maxParallelReads||10,this.readingCalls=0,this.maxRetries=f.maxRetries>=0?f.maxRetries:5,this.retryTimeout=f.retryTimeout>=1?f.retryTimeout:350,this.state={},this.queue=[],(h=(d=this.backend)==null?void 0:d.init)==null||h.call(d,c,f.backend,f)}queueLoad(i,r,c,f){const d={},h={},x={},g={};return i.forEach(m=>{let y=!0;r.forEach(j=>{const v=`${m}|${j}`;!c.reload&&this.store.hasResourceBundle(m,j)?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),d[v]===void 0&&(d[v]=!0),g[j]===void 0&&(g[j]=!0)))}),y||(x[m]=!0)}),(Object.keys(d).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:f}),{toLoad:Object.keys(d),pending:Object.keys(h),toLoadLanguages:Object.keys(x),toLoadNamespaces:Object.keys(g)}}loaded(i,r,c){const f=i.split("|"),d=f[0],h=f[1];r&&this.emit("failedLoading",d,h,r),!r&&c&&this.store.addResourceBundle(d,h,c,void 0,void 0,{skipCopy:!0}),this.state[i]=r?-1:2,r&&c&&(this.state[i]=0);const x={};this.queue.forEach(g=>{E1(g.loaded,[d],h),B1(g,i),r&&g.errors.push(r),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(m=>{x[m]||(x[m]={});const y=g.loaded[m];y.length&&y.forEach(j=>{x[m][j]===void 0&&(x[m][j]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",x),this.queue=this.queue.filter(g=>!g.done)}read(i,r,c){let f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!i.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:r,fcName:c,tried:f,wait:d,callback:h});return}this.readingCalls++;const x=(m,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const j=this.waitingReads.shift();this.read(j.lng,j.ns,j.fcName,j.tried,j.wait,j.callback)}if(m&&y&&f<this.maxRetries){setTimeout(()=>{this.read.call(this,i,r,c,f+1,d*2,h)},d);return}h(m,y)},g=this.backend[c].bind(this.backend);if(g.length===2){try{const m=g(i,r);m&&typeof m.then=="function"?m.then(y=>x(null,y)).catch(x):x(null,m)}catch(m){x(m)}return}return g(i,r,x)}prepareLoading(i,r){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},f=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."),f&&f();Se(i)&&(i=this.languageUtils.toResolveHierarchy(i)),Se(r)&&(r=[r]);const d=this.queueLoad(i,r,c,f);if(!d.toLoad.length)return d.pending.length||f(),null;d.toLoad.forEach(h=>{this.loadOne(h)})}load(i,r,c){this.prepareLoading(i,r,{},c)}reload(i,r,c){this.prepareLoading(i,r,{reload:!0},c)}loadOne(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const c=i.split("|"),f=c[0],d=c[1];this.read(f,d,"read",void 0,void 0,(h,x)=>{h&&this.logger.warn(`${r}loading namespace ${d} for language ${f} failed`,h),!h&&x&&this.logger.log(`${r}loaded namespace ${d} for language ${f}`,x),this.loaded(i,h,x)})}saveMissing(i,r,c,f,d){var g,m,y,j,v;let h=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},x=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((m=(g=this.services)==null?void 0:g.utils)!=null&&m.hasLoadedNamespace&&!((j=(y=this.services)==null?void 0:y.utils)!=null&&j.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${c}" 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(!(c==null||c==="")){if((v=this.backend)!=null&&v.create){const T={...h,isUpdate:d},S=this.backend.create.bind(this.backend);if(S.length<6)try{let C;S.length===5?C=S(i,r,c,f,T):C=S(i,r,c,f),C&&typeof C.then=="function"?C.then(k=>x(null,k)).catch(x):x(null,C)}catch(C){x(C)}else S(i,r,c,f,x,T)}!i||!i[0]||this.store.addResource(i[0],r,c,f)}}}const zh=()=>({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:s=>{let i={};if(typeof s[1]=="object"&&(i=s[1]),Se(s[1])&&(i.defaultValue=s[1]),Se(s[2])&&(i.tDescription=s[2]),typeof s[2]=="object"||typeof s[3]=="object"){const r=s[3]||s[2];Object.keys(r).forEach(c=>{i[c]=r[c]})}return i},interpolation:{escapeValue:!0,format:s=>s,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Dh=s=>{var i,r;return Se(s.ns)&&(s.ns=[s.ns]),Se(s.fallbackLng)&&(s.fallbackLng=[s.fallbackLng]),Se(s.fallbackNS)&&(s.fallbackNS=[s.fallbackNS]),((r=(i=s.supportedLngs)==null?void 0:i.indexOf)==null?void 0:r.call(i,"cimode"))<0&&(s.supportedLngs=s.supportedLngs.concat(["cimode"])),typeof s.initImmediate=="boolean"&&(s.initAsync=s.initImmediate),s},ii=()=>{},V1=s=>{Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach(r=>{typeof s[r]=="function"&&(s[r]=s[r].bind(s))})};class zl extends bi{constructor(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Dh(i),this.services={},this.logger=ua,this.modules={external:[]},V1(this),r&&!this.isInitialized&&!i.isClone){if(!this.options.initAsync)return this.init(i,r),this;setTimeout(()=>{this.init(i,r)},0)}}init(){var i=this;let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof r=="function"&&(c=r,r={}),r.defaultNS==null&&r.ns&&(Se(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const f=zh();this.options={...f,...this.options,...Dh(r)},this.options.interpolation={...f.interpolation,...this.options.interpolation},r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator);const d=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?ua.init(d(this.modules.logger),this.options):ua.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=H1;const j=new Ah(this.options);this.store=new Eh(this.options.resources,this.options);const v=this.services;v.logger=ua,v.resourceStore=this.store,v.languageUtils=j,v.pluralResolver=new U1(j,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===f.interpolation.format)&&(v.formatter=d(y),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new L1(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new q1(d(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",function(T){for(var S=arguments.length,C=new Array(S>1?S-1:0),k=1;k<S;k++)C[k-1]=arguments[k];i.emit(T,...C)}),this.modules.languageDetector&&(v.languageDetector=d(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=d(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new hi(this.services,this.options),this.translator.on("*",function(T){for(var S=arguments.length,C=new Array(S>1?S-1:0),k=1;k<S;k++)C[k-1]=arguments[k];i.emit(T,...C)}),this.modules.external.forEach(T=>{T.init&&T.init(this)})}if(this.format=this.options.interpolation.format,c||(c=ii),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 i.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return i.store[y](...arguments),i}});const g=Al(),m=()=>{const y=(j,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),g.resolve(v),c(j,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?m():setTimeout(m,0),g}loadResources(i){var d,h;let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;const f=Se(i)?i:this.language;if(typeof i=="function"&&(c=i),!this.options.resources||this.options.partialBundledLanguages){if((f==null?void 0:f.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return c();const x=[],g=m=>{if(!m||m==="cimode")return;this.services.languageUtils.toResolveHierarchy(m).forEach(j=>{j!=="cimode"&&x.indexOf(j)<0&&x.push(j)})};f?g(f):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>g(y)),(h=(d=this.options.preload)==null?void 0:d.forEach)==null||h.call(d,m=>g(m)),this.services.backendConnector.load(x,this.options.ns,m=>{!m&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),c(m)})}else c(null)}reloadResources(i,r,c){const f=Al();return typeof i=="function"&&(c=i,i=void 0),typeof r=="function"&&(c=r,r=void 0),i||(i=this.languages),r||(r=this.options.ns),c||(c=ii),this.services.backendConnector.reload(i,r,d=>{f.resolve(),c(d)}),f}use(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&Lg.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}setResolvedLanguage(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(let r=0;r<this.languages.length;r++){const c=this.languages[r];if(!(["cimode","dev"].indexOf(c)>-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}}changeLanguage(i,r){var c=this;this.isLanguageChangingTo=i;const f=Al();this.emit("languageChanging",i);const d=g=>{this.language=g,this.languages=this.services.languageUtils.toResolveHierarchy(g),this.resolvedLanguage=void 0,this.setResolvedLanguage(g)},h=(g,m)=>{m?(d(m),this.translator.changeLanguage(m),this.isLanguageChangingTo=void 0,this.emit("languageChanged",m),this.logger.log("languageChanged",m)):this.isLanguageChangingTo=void 0,f.resolve(function(){return c.t(...arguments)}),r&&r(g,function(){return c.t(...arguments)})},x=g=>{var y,j;!i&&!g&&this.services.languageDetector&&(g=[]);const m=Se(g)?g:this.services.languageUtils.getBestMatchFromCodes(g);m&&(this.language||d(m),this.translator.language||this.translator.changeLanguage(m),(j=(y=this.services.languageDetector)==null?void 0:y.cacheUserLanguage)==null||j.call(y,m)),this.loadResources(m,v=>{h(v,m)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?x(this.services.languageDetector.detect()):!i&&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(i),f}getFixedT(i,r,c){var f=this;const d=function(h,x){let g;if(typeof x!="object"){for(var m=arguments.length,y=new Array(m>2?m-2:0),j=2;j<m;j++)y[j-2]=arguments[j];g=f.options.overloadTranslationOptionHandler([h,x].concat(y))}else g={...x};g.lng=g.lng||d.lng,g.lngs=g.lngs||d.lngs,g.ns=g.ns||d.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||c||d.keyPrefix);const v=f.options.keySeparator||".";let T;return g.keyPrefix&&Array.isArray(h)?T=h.map(S=>`${g.keyPrefix}${v}${S}`):T=g.keyPrefix?`${g.keyPrefix}${v}${h}`:h,f.t(T,g)};return Se(i)?d.lng=i:d.lngs=i,d.ns=r,d.keyPrefix=c,d}t(){var f;for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return(f=this.translator)==null?void 0:f.translate(...r)}exists(){var f;for(var i=arguments.length,r=new Array(i),c=0;c<i;c++)r[c]=arguments[c];return(f=this.translator)==null?void 0:f.exists(...r)}setDefaultNamespace(i){this.options.defaultNS=i}hasLoadedNamespace(i){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 c=r.lng||this.resolvedLanguage||this.languages[0],f=this.options?this.options.fallbackLng:!1,d=this.languages[this.languages.length-1];if(c.toLowerCase()==="cimode")return!0;const h=(x,g)=>{const m=this.services.backendConnector.state[`${x}|${g}`];return m===-1||m===0||m===2};if(r.precheck){const x=r.precheck(this,h);if(x!==void 0)return x}return!!(this.hasResourceBundle(c,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(c,i)&&(!f||h(d,i)))}loadNamespaces(i,r){const c=Al();return this.options.ns?(Se(i)&&(i=[i]),i.forEach(f=>{this.options.ns.indexOf(f)<0&&this.options.ns.push(f)}),this.loadResources(f=>{c.resolve(),r&&r(f)}),c):(r&&r(),Promise.resolve())}loadLanguages(i,r){const c=Al();Se(i)&&(i=[i]);const f=this.options.preload||[],d=i.filter(h=>f.indexOf(h)<0&&this.services.languageUtils.isSupportedCode(h));return d.length?(this.options.preload=f.concat(d),this.loadResources(h=>{c.resolve(),r&&r(h)}),c):(r&&r(),Promise.resolve())}dir(i){var f,d;if(i||(i=this.resolvedLanguage||(((f=this.languages)==null?void 0:f.length)>0?this.languages[0]:this.language)),!i)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"],c=((d=this.services)==null?void 0:d.languageUtils)||new Ah(zh());return r.indexOf(c.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new zl(i,r)}cloneInstance(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ii;const c=i.forkResourceStore;c&&delete i.forkResourceStore;const f={...this.options,...i,isClone:!0},d=new zl(f);if((i.debug!==void 0||i.prefix!==void 0)&&(d.logger=d.logger.clone(i)),["store","services","language"].forEach(x=>{d[x]=this[x]}),d.services={...this.services},d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},c){const x=Object.keys(this.store.data).reduce((g,m)=>(g[m]={...this.store.data[m]},Object.keys(g[m]).reduce((y,j)=>(y[j]={...g[m][j]},y),{})),{});d.store=new Eh(x,f),d.services.resourceStore=d.store}return d.translator=new hi(d.services,f),d.translator.on("*",function(x){for(var g=arguments.length,m=new Array(g>1?g-1:0),y=1;y<g;y++)m[y-1]=arguments[y];d.emit(x,...m)}),d.init(f,r),d.translator.options=f,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const xt=zl.createInstance();xt.createInstance=zl.createInstance;xt.createInstance;xt.dir;xt.init;xt.loadResources;xt.reloadResources;xt.use;xt.changeLanguage;xt.getFixedT;xt.t;xt.exists;xt.setDefaultNamespace;xt.hasLoadedNamespace;xt.loadNamespaces;xt.loadLanguages;const{slice:G1,forEach:$1}=[];function K1(s){return $1.call(G1.call(arguments,1),i=>{if(i)for(const r in i)s[r]===void 0&&(s[r]=i[r])}),s}function Y1(s){return typeof s!="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(s))}const Uh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,X1=function(s,i){const c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},f=encodeURIComponent(i);let d=`${s}=${f}`;if(c.maxAge>0){const h=c.maxAge-0;if(Number.isNaN(h))throw new Error("maxAge should be a Number");d+=`; Max-Age=${Math.floor(h)}`}if(c.domain){if(!Uh.test(c.domain))throw new TypeError("option domain is invalid");d+=`; Domain=${c.domain}`}if(c.path){if(!Uh.test(c.path))throw new TypeError("option path is invalid");d+=`; Path=${c.path}`}if(c.expires){if(typeof c.expires.toUTCString!="function")throw new TypeError("option expires is invalid");d+=`; Expires=${c.expires.toUTCString()}`}if(c.httpOnly&&(d+="; HttpOnly"),c.secure&&(d+="; Secure"),c.sameSite)switch(typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return c.partitioned&&(d+="; Partitioned"),d},Lh={create(s,i,r,c){let f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(f.expires=new Date,f.expires.setTime(f.expires.getTime()+r*60*1e3)),c&&(f.domain=c),document.cookie=X1(s,encodeURIComponent(i),f)},read(s){const i=`${s}=`,r=document.cookie.split(";");for(let c=0;c<r.length;c++){let f=r[c];for(;f.charAt(0)===" ";)f=f.substring(1,f.length);if(f.indexOf(i)===0)return f.substring(i.length,f.length)}return null},remove(s){this.create(s,"",-1)}};var Q1={name:"cookie",lookup(s){let{lookupCookie:i}=s;if(i&&typeof document<"u")return Lh.read(i)||void 0},cacheUserLanguage(s,i){let{lookupCookie:r,cookieMinutes:c,cookieDomain:f,cookieOptions:d}=i;r&&typeof document<"u"&&Lh.create(r,s,c,f,d)}},P1={name:"querystring",lookup(s){var c;let{lookupQuerystring:i}=s,r;if(typeof window<"u"){let{search:f}=window.location;!window.location.search&&((c=window.location.hash)==null?void 0:c.indexOf("?"))>-1&&(f=window.location.hash.substring(window.location.hash.indexOf("?")));const h=f.substring(1).split("&");for(let x=0;x<h.length;x++){const g=h[x].indexOf("=");g>0&&h[x].substring(0,g)===i&&(r=h[x].substring(g+1))}}return r}};let vs=null;const _h=()=>{if(vs!==null)return vs;try{if(vs=typeof window<"u"&&window.localStorage!==null,!vs)return!1;const s="i18next.translate.boo";window.localStorage.setItem(s,"foo"),window.localStorage.removeItem(s)}catch{vs=!1}return vs};var Z1={name:"localStorage",lookup(s){let{lookupLocalStorage:i}=s;if(i&&_h())return window.localStorage.getItem(i)||void 0},cacheUserLanguage(s,i){let{lookupLocalStorage:r}=i;r&&_h()&&window.localStorage.setItem(r,s)}};let ws=null;const Hh=()=>{if(ws!==null)return ws;try{if(ws=typeof window<"u"&&window.sessionStorage!==null,!ws)return!1;const s="i18next.translate.boo";window.sessionStorage.setItem(s,"foo"),window.sessionStorage.removeItem(s)}catch{ws=!1}return ws};var F1={name:"sessionStorage",lookup(s){let{lookupSessionStorage:i}=s;if(i&&Hh())return window.sessionStorage.getItem(i)||void 0},cacheUserLanguage(s,i){let{lookupSessionStorage:r}=i;r&&Hh()&&window.sessionStorage.setItem(r,s)}},J1={name:"navigator",lookup(s){const i=[];if(typeof navigator<"u"){const{languages:r,userLanguage:c,language:f}=navigator;if(r)for(let d=0;d<r.length;d++)i.push(r[d]);c&&i.push(c),f&&i.push(f)}return i.length>0?i:void 0}},I1={name:"htmlTag",lookup(s){let{htmlTag:i}=s,r;const c=i||(typeof document<"u"?document.documentElement:null);return c&&typeof c.getAttribute=="function"&&(r=c.getAttribute("lang")),r}},W1={name:"path",lookup(s){var f;let{lookupFromPathIndex:i}=s;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(f=r[typeof i=="number"?i:0])==null?void 0:f.replace("/",""):void 0}},e2={name:"subdomain",lookup(s){var f,d;let{lookupFromSubdomainIndex:i}=s;const r=typeof i=="number"?i+1:1,c=typeof window<"u"&&((d=(f=window.location)==null?void 0:f.hostname)==null?void 0:d.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(c)return c[r]}};let _g=!1;try{document.cookie,_g=!0}catch{}const Hg=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];_g||Hg.splice(1,1);const t2=()=>({order:Hg,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:s=>s});class Bg{constructor(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(i,r)}init(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=i,this.options=K1(r,this.options||{},t2()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=f=>f.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=c,this.addDetector(Q1),this.addDetector(P1),this.addDetector(Z1),this.addDetector(F1),this.addDetector(J1),this.addDetector(I1),this.addDetector(W1),this.addDetector(e2)}addDetector(i){return this.detectors[i.name]=i,this}detect(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return i.forEach(c=>{if(this.detectors[c]){let f=this.detectors[c].lookup(this.options);f&&typeof f=="string"&&(f=[f]),f&&(r=r.concat(f))}}),r=r.filter(c=>c!=null&&!Y1(c)).map(c=>this.options.convertDetectedLanguage(c)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(i){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(i)>-1||r.forEach(c=>{this.detectors[c]&&this.detectors[c].cacheUserLanguage(i,this.options)}))}}Bg.type="languageDetector";const a2={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"},n2={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..."},s2={viewProfile:"View profile",userCenter:"User Center"},l2={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"},r2={label:"WeChat",title:"Connect via WeChat",qrCodeAlt:"WeChat QR Code",scanMessage:"Scan this QR code to connect with us on WeChat"},i2={label:"Discord",title:"Join our Discord server",community:"Join our growing community on Discord for support, discussions, and updates!"},o2={title:"Theme",light:"Light",dark:"Dark",system:"System"},c2={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"},u2={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",requestOptions:"Configuration",timeout:"Request Timeout",timeoutDescription:"Timeout for requests to the MCP server (ms)",maxTotalTimeout:"Maximum Total Timeout",maxTotalTimeoutDescription:"Maximum total timeout for requests sent to the MCP server (ms) (Use with progress notifications)",resetTimeoutOnProgress:"Reset Timeout on Progress",resetTimeoutOnProgressDescription:"Reset timeout on progress notifications",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",openapi:{inputMode:"Input Mode",inputModeUrl:"Specification URL",inputModeSchema:"JSON Schema",specUrl:"OpenAPI Specification URL",schema:"OpenAPI JSON Schema",schemaHelp:"Paste your complete OpenAPI JSON schema here",security:"Security Type",securityNone:"None",securityApiKey:"API Key",securityHttp:"HTTP Authentication",securityOAuth2:"OAuth 2.0",securityOpenIdConnect:"OpenID Connect",apiKeyConfig:"API Key Configuration",apiKeyName:"Header/Parameter Name",apiKeyIn:"Location",apiKeyValue:"API Key Value",httpAuthConfig:"HTTP Authentication Configuration",httpScheme:"Authentication Scheme",httpCredentials:"Credentials",oauth2Config:"OAuth 2.0 Configuration",oauth2Token:"Access Token",openIdConnectConfig:"OpenID Connect Configuration",openIdConnectUrl:"Discovery URL",openIdConnectToken:"ID Token"}},d2={online:"Online",offline:"Offline",connecting:"Connecting"},f2={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"},m2={processing:"Processing...",save:"Save",cancel:"Cancel",refresh:"Refresh",create:"Create",submitting:"Submitting...",delete:"Delete",remove:"Remove",copy:"Copy",copySuccess:"Copied to clipboard",copyFailed:"Copy failed",close:"Close",confirm:"Confirm"},h2={dashboard:"Dashboard",servers:"Servers",groups:"Groups",settings:"Settings",changePassword:"Change Password",market:"Market",logs:"Logs"},g2={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"}},p2={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"},x2={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"},y2={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"},b2={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",enabled:"Enabled",enableSuccess:"Tool {{name}} enabled successfully",disableSuccess:"Tool {{name}} disabled successfully",toggleFailed:"Failed to toggle tool status",parameters:"Tool Parameters",formMode:"Form Mode",jsonMode:"JSON Mode",jsonConfiguration:"JSON Configuration",invalidJsonFormat:"Invalid JSON format",fixJsonBeforeSwitching:"Please fix JSON format before switching to form mode",item:"Item {{index}}",addItem:"Add {{key}} item",enterKey:"Enter {{key}}"},v2={enableGlobalRoute:"Enable Global Route",enableGlobalRouteDescription:"Allow connections to /sse endpoint without specifying a group ID",enableGroupNameRoute:"Enable Group Name Route",enableGroupNameRouteDescription:"Allow connections to /sse endpoint using group names instead of just group IDs",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",skipAuth:"Skip Authentication",skipAuthDescription:"Bypass login requirement for frontend and API access (DEFAULT OFF for security)",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}}"},w2={upload:"Upload",uploadTitle:"Upload DXT Extension",dropFileHere:"Drop your .dxt file here",orClickToSelect:"or click to select from your computer",invalidFileType:"Please select a valid .dxt file",noFileSelected:"Please select a .dxt file to upload",uploading:"Uploading...",uploadFailed:"Failed to upload DXT file",installServer:"Install MCP Server from DXT",extensionInfo:"Extension Information",name:"Name",version:"Version",description:"Description",author:"Author",tools:"Tools",serverName:"Server Name",serverNamePlaceholder:"Enter a name for this server",install:"Install",installing:"Installing...",installFailed:"Failed to install server from DXT",serverExistsTitle:"Server Already Exists",serverExistsConfirm:"Server '{{serverName}}' already exists. Do you want to override it with the new version?",override:"Override"},j2={app:a2,about:n2,profile:s2,sponsor:l2,wechat:r2,discord:i2,theme:o2,auth:c2,server:u2,status:d2,errors:f2,common:m2,nav:h2,pages:g2,logs:p2,groups:x2,market:y2,tool:b2,settings:v2,dxt:w2},S2={title:"MCP Hub 控制面板",error:"错误",closeButton:"关闭",noServers:"没有可用的 MCP 服务器",loading:"加载中...",logout:"退出登录",profile:"个人资料",changePassword:"修改密码",toggleSidebar:"切换侧边栏",welcomeUser:"欢迎, {{username}}",name:"MCP Hub"},N2={title:"关于",versionInfo:"MCP Hub 版本: {{version}}",newVersion:"有新版本可用!",currentVersion:"当前版本",newVersionAvailable:"新版本 {{version}} 已发布",viewOnGitHub:"在 GitHub 上查看",checkForUpdates:"检查更新",checking:"检查更新中..."},C2={viewProfile:"查看个人中心",userCenter:"个人中心"},E2={label:"赞助",title:"支持项目",rewardAlt:"赞赏码",supportMessage:"通过捐赠支持 MCP Hub 的开发!",supportButton:"在 Ko-fi 上支持"},k2={label:"微信",title:"微信联系",qrCodeAlt:"微信二维码",scanMessage:"扫描二维码添加微信"},T2={label:"Discord",title:"加入我们的 Discord 服务器",community:"加入我们不断壮大的 Discord 社区,获取支持、参与讨论并了解最新动态!"},A2={title:"主题",light:"浅色",dark:"深色",system:"系统"},R2={login:"登录",loginTitle:"登录 MCP Hub",username:"用户名",password:"密码",loggingIn:"登录中...",emptyFields:"用户名和密码不能为空",loginFailed:"登录失败,请检查用户名和密码",loginError:"登录过程中出现错误",currentPassword:"当前密码",newPassword:"新密码",confirmPassword:"确认密码",passwordsNotMatch:"新密码与确认密码不一致",changePasswordSuccess:"密码修改成功",changePasswordError:"修改密码失败",changePassword:"修改密码",passwordChanged:"密码修改成功",passwordChangeError:"修改密码失败"},O2={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:"禁用",requestOptions:"配置",timeout:"请求超时",timeoutDescription:"请求超时时间(毫秒)",maxTotalTimeout:"最大总超时",maxTotalTimeoutDescription:"无论是否有进度通知的最大总超时时间(毫秒)",resetTimeoutOnProgress:"收到进度通知时重置超时",resetTimeoutOnProgressDescription:"适用于发送周期性进度更新的长时间运行操作",remove:"移除",toggleError:"切换服务器 {{serverName}} 状态失败",alreadyExists:"服务器 {{serverName}} 已经存在",invalidData:"提供的服务器数据无效",notFound:"找不到服务器 {{serverName}}",namePlaceholder:"请输入服务器名称",urlPlaceholder:"请输入服务器URL",commandPlaceholder:"请输入命令",argumentsPlaceholder:"请输入参数",errorDetails:"错误详情",viewErrorDetails:"查看错误详情",openapi:{inputMode:"输入模式",inputModeUrl:"规范 URL",inputModeSchema:"JSON 模式",specUrl:"OpenAPI 规范 URL",schema:"OpenAPI JSON 模式",schemaHelp:"请在此处粘贴完整的 OpenAPI JSON 模式",security:"安全类型",securityNone:"无",securityApiKey:"API 密钥",securityHttp:"HTTP 认证",securityOAuth2:"OAuth 2.0",securityOpenIdConnect:"OpenID Connect",apiKeyConfig:"API 密钥配置",apiKeyName:"请求头/参数名称",apiKeyIn:"位置",apiKeyValue:"API 密钥值",httpAuthConfig:"HTTP 认证配置",httpScheme:"认证方案",httpCredentials:"凭据",oauth2Config:"OAuth 2.0 配置",oauth2Token:"访问令牌",openIdConnectConfig:"OpenID Connect 配置",openIdConnectUrl:"发现 URL",openIdConnectToken:"ID 令牌"}},M2={online:"在线",offline:"离线",connecting:"连接中"},z2={general:"发生错误",network:"网络连接错误,请检查您的互联网连接",serverConnection:"无法连接到服务器,请检查服务器是否正在运行",serverAdd:"添加服务器失败,请检查服务器状态",serverUpdate:"编辑服务器 {{serverName}} 失败,请检查服务器状态",serverFetch:"获取服务器数据失败,请稍后重试",initialStartup:"服务器可能正在启动中。首次启动可能需要一些时间,请耐心等候...",serverInstall:"安装服务器失败",failedToFetchSettings:"获取设置失败",failedToUpdateSystemConfig:"更新系统配置失败",failedToUpdateRouteConfig:"更新路由配置失败",failedToUpdateSmartRoutingConfig:"更新智能路由配置失败"},D2={processing:"处理中...",save:"保存",cancel:"取消",refresh:"刷新",create:"创建",submitting:"提交中...",delete:"删除",remove:"移除",copy:"复制",copySuccess:"已复制到剪贴板",copyFailed:"复制失败",close:"关闭",confirm:"确认"},U2={dashboard:"仪表盘",servers:"服务器",settings:"设置",changePassword:"修改密码",groups:"分组",market:"市场",logs:"日志"},L2={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:"系统日志"}},_2={filters:"筛选",search:"搜索日志...",autoScroll:"自动滚动",clearLogs:"清除日志",loading:"加载日志中...",noLogs:"暂无日志。",noMatch:"没有匹配当前筛选条件的日志。",mainProcess:"主进程",childProcess:"子进程",main:"主",child:"子"},H2={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}} 台服务器"},B2={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:"每页显示"},q2={run:"运行",running:"运行中...",runTool:"运行工具",cancel:"取消",noDescription:"无描述信息",inputSchema:"输入模式:",runToolWithName:"运行工具:{{name}}",execution:"工具执行",successful:"成功",failed:"失败",result:"结果:",error:"错误",errorDetails:"错误详情:",noContent:"工具执行成功但未返回内容。",unknownError:"发生未知错误",jsonResponse:"JSON 响应:",toolResult:"工具结果",noParameters:"此工具不需要任何参数。",selectOption:"选择一个选项",enterValue:"输入{{type}}值",enabled:"已启用",enableSuccess:"工具 {{name}} 启用成功",disableSuccess:"工具 {{name}} 禁用成功",toggleFailed:"切换工具状态失败",parameters:"工具参数",formMode:"表单模式",jsonMode:"JSON 模式",jsonConfiguration:"JSON 配置",invalidJsonFormat:"无效的 JSON 格式",fixJsonBeforeSwitching:"请修复 JSON 格式后再切换到表单模式",item:"项目 {{index}}",addItem:"添加 {{key}} 项目",enterKey:"输入 {{key}}"},V2={enableGlobalRoute:"启用全局路由",enableGlobalRouteDescription:"允许不指定组 ID 就连接到 /sse 端点",enableGroupNameRoute:"启用组名路由",enableGroupNameRouteDescription:"允许使用组名而不仅仅是组 ID 连接到 /sse 端点",enableBearerAuth:"启用 Bearer 认证",enableBearerAuthDescription:"对 MCP 请求启用 Bearer 令牌认证",bearerAuthKey:"Bearer 认证密钥",bearerAuthKeyDescription:"Bearer 令牌中需要携带的认证密钥",bearerAuthKeyPlaceholder:"请输入 Bearer 认证密钥",skipAuth:"免登录开关",skipAuthDescription:"跳过前端和 API 访问的登录要求(默认关闭确保安全性)",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}}"},G2={upload:"上传",uploadTitle:"上传 DXT 扩展",dropFileHere:"将 .dxt 文件拖拽到此处",orClickToSelect:"或点击从计算机选择",invalidFileType:"请选择有效的 .dxt 文件",noFileSelected:"请选择要上传的 .dxt 文件",uploading:"上传中...",uploadFailed:"上传 DXT 文件失败",installServer:"从 DXT 安装 MCP 服务器",extensionInfo:"扩展信息",name:"名称",version:"版本",description:"描述",author:"作者",tools:"工具",serverName:"服务器名称",serverNamePlaceholder:"为此服务器输入名称",install:"安装",installing:"安装中...",installFailed:"从 DXT 安装服务器失败",serverExistsTitle:"服务器已存在",serverExistsConfirm:"服务器 '{{serverName}}' 已存在。是否要用新版本覆盖它?",override:"覆盖"},$2={app:S2,about:N2,profile:C2,sponsor:E2,wechat:k2,discord:T2,theme:A2,auth:R2,server:O2,status:M2,errors:z2,common:D2,nav:U2,pages:L2,logs:_2,groups:H2,market:B2,tool:q2,settings:V2,dxt:G2};xt.use(Bg).use(vv).init({resources:{en:{translation:j2},zh:{translation:$2}},fallbackLng:"en",debug:!1,defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage","cookie","htmlTag","navigator"],caches:["localStorage","cookie"]}});async function K2(){try{console.log("Loading runtime configuration...");const s=await Dy();console.log("Runtime configuration loaded:",s),window.__MCPHUB_CONFIG__=s,lh.createRoot(document.getElementById("root")).render(l.jsx(qc.StrictMode,{children:l.jsx(wh,{})}))}catch(s){console.error("Failed to initialize app:",s),console.log("Starting app with default configuration..."),window.__MCPHUB_CONFIG__={basePath:"",version:"dev",name:"mcphub"},lh.createRoot(document.getElementById("root")).render(l.jsx(qc.StrictMode,{children:l.jsx(wh,{})}))}}K2();
|
|
186
|
+
//# sourceMappingURL=index-BS_54XZ9.js.map
|