@alexberardi/jarvis-admin 0.1.21 → 0.1.22
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/package.json +1 -1
- package/public/assets/index-DOoSsOJV.js +17 -0
- package/public/index.html +1 -1
- package/server/dist/config.js +4 -4
- package/server/dist/config.js.map +1 -1
- package/server/dist/data/service-registry.json +2 -1
- package/server/dist/routes/install.d.ts.map +1 -1
- package/server/dist/routes/install.js +30 -1
- package/server/dist/routes/install.js.map +1 -1
- package/server/dist/services/generators/compose-generator.js +5 -0
- package/server/dist/services/generators/compose-generator.js.map +1 -1
- package/server/dist/types/service-registry.d.ts +2 -0
- package/server/dist/types/service-registry.d.ts.map +1 -1
- package/server/node_modules/.package-lock.json +9 -0
- package/server/node_modules/bcryptjs/LICENSE +27 -0
- package/server/node_modules/bcryptjs/README.md +201 -0
- package/server/node_modules/bcryptjs/bin/bcrypt +23 -0
- package/server/node_modules/bcryptjs/index.d.ts +3 -0
- package/server/node_modules/bcryptjs/index.js +1159 -0
- package/server/node_modules/bcryptjs/package.json +76 -0
- package/server/node_modules/bcryptjs/types.d.ts +157 -0
- package/server/node_modules/bcryptjs/umd/index.d.ts +3 -0
- package/server/node_modules/bcryptjs/umd/index.js +1220 -0
- package/server/node_modules/bcryptjs/umd/package.json +3 -0
- package/server/node_modules/bcryptjs/umd/types.d.ts +157 -0
- package/server/package.json +2 -0
- package/server/src/data/service-registry.json +2 -1
- package/public/assets/index-BpdNLMNo.js +0 -17
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))i(d);new MutationObserver(d=>{for(const f of d)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function s(d){const f={};return d.integrity&&(f.integrity=d.integrity),d.referrerPolicy&&(f.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?f.credentials="include":d.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function i(d){if(d.ep)return;d.ep=!0;const f=s(d);fetch(d.href,f)}})();function Tg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Eu={exports:{}},ls={};var wp;function g0(){if(wp)return ls;wp=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(i,d,f){var m=null;if(f!==void 0&&(m=""+f),d.key!==void 0&&(m=""+d.key),"key"in d){f={};for(var g in d)g!=="key"&&(f[g]=d[g])}else f=d;return d=f.ref,{$$typeof:n,type:i,key:m,ref:d!==void 0?d:null,props:f}}return ls.Fragment=r,ls.jsx=s,ls.jsxs=s,ls}var Np;function y0(){return Np||(Np=1,Eu.exports=g0()),Eu.exports}var u=y0(),ju={exports:{}},ve={};var Ep;function x0(){if(Ep)return ve;Ep=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),w=Symbol.iterator;function M(R){return R===null||typeof R!="object"?null:(R=w&&R[w]||R["@@iterator"],typeof R=="function"?R:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,T={};function z(R,q,G){this.props=R,this.context=q,this.refs=T,this.updater=G||N}z.prototype.isReactComponent={},z.prototype.setState=function(R,q){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,q,"setState")},z.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function _(){}_.prototype=z.prototype;function Y(R,q,G){this.props=R,this.context=q,this.refs=T,this.updater=G||N}var L=Y.prototype=new _;L.constructor=Y,j(L,z.prototype),L.isPureReactComponent=!0;var te=Array.isArray;function P(){}var W={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function ge(R,q,G){var $=G.ref;return{$$typeof:n,type:R,key:q,ref:$!==void 0?$:null,props:G}}function Oe(R,q){return ge(R.type,q,R.props)}function ne(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function Q(R){var q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(G){return q[G]})}var K=/\/+/g;function ce(R,q){return typeof R=="object"&&R!==null&&R.key!=null?Q(""+R.key):q.toString(36)}function he(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(P,P):(R.status="pending",R.then(function(q){R.status==="pending"&&(R.status="fulfilled",R.value=q)},function(q){R.status==="pending"&&(R.status="rejected",R.reason=q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function O(R,q,G,$,ae){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var ue=!1;if(R===null)ue=!0;else switch(fe){case"bigint":case"string":case"number":ue=!0;break;case"object":switch(R.$$typeof){case n:case r:ue=!0;break;case v:return ue=R._init,O(ue(R._payload),q,G,$,ae)}}if(ue)return ae=ae(R),ue=$===""?"."+ce(R,0):$,te(ae)?(G="",ue!=null&&(G=ue.replace(K,"$&/")+"/"),O(ae,q,G,"",function(bt){return bt})):ae!=null&&(ne(ae)&&(ae=Oe(ae,G+(ae.key==null||R&&R.key===ae.key?"":(""+ae.key).replace(K,"$&/")+"/")+ue)),q.push(ae)),1;ue=0;var be=$===""?".":$+":";if(te(R))for(var ze=0;ze<R.length;ze++)$=R[ze],fe=be+ce($,ze),ue+=O($,q,G,fe,ae);else if(ze=M(R),typeof ze=="function")for(R=ze.call(R),ze=0;!($=R.next()).done;)$=$.value,fe=be+ce($,ze++),ue+=O($,q,G,fe,ae);else if(fe==="object"){if(typeof R.then=="function")return O(he(R),q,G,$,ae);throw q=String(R),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return ue}function J(R,q,G){if(R==null)return R;var $=[],ae=0;return O(R,$,"","",function(fe){return q.call(G,fe,ae++)}),$}function F(R){if(R._status===-1){var q=R._result;q=q(),q.then(function(G){(R._status===0||R._status===-1)&&(R._status=1,R._result=G)},function(G){(R._status===0||R._status===-1)&&(R._status=2,R._result=G)}),R._status===-1&&(R._status=0,R._result=q)}if(R._status===1)return R._result.default;throw R._result}var Se=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},xe={map:J,forEach:function(R,q,G){J(R,function(){q.apply(this,arguments)},G)},count:function(R){var q=0;return J(R,function(){q++}),q},toArray:function(R){return J(R,function(q){return q})||[]},only:function(R){if(!ne(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return ve.Activity=p,ve.Children=xe,ve.Component=z,ve.Fragment=s,ve.Profiler=d,ve.PureComponent=Y,ve.StrictMode=i,ve.Suspense=x,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,ve.__COMPILER_RUNTIME={__proto__:null,c:function(R){return W.H.useMemoCache(R)}},ve.cache=function(R){return function(){return R.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(R,q,G){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var $=j({},R.props),ae=R.key;if(q!=null)for(fe in q.key!==void 0&&(ae=""+q.key),q)!I.call(q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&q.ref===void 0||($[fe]=q[fe]);var fe=arguments.length-2;if(fe===1)$.children=G;else if(1<fe){for(var ue=Array(fe),be=0;be<fe;be++)ue[be]=arguments[be+2];$.children=ue}return ge(R.type,ae,$)},ve.createContext=function(R){return R={$$typeof:m,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:f,_context:R},R},ve.createElement=function(R,q,G){var $,ae={},fe=null;if(q!=null)for($ in q.key!==void 0&&(fe=""+q.key),q)I.call(q,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(ae[$]=q[$]);var ue=arguments.length-2;if(ue===1)ae.children=G;else if(1<ue){for(var be=Array(ue),ze=0;ze<ue;ze++)be[ze]=arguments[ze+2];ae.children=be}if(R&&R.defaultProps)for($ in ue=R.defaultProps,ue)ae[$]===void 0&&(ae[$]=ue[$]);return ge(R,fe,ae)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(R){return{$$typeof:g,render:R}},ve.isValidElement=ne,ve.lazy=function(R){return{$$typeof:v,_payload:{_status:-1,_result:R},_init:F}},ve.memo=function(R,q){return{$$typeof:y,type:R,compare:q===void 0?null:q}},ve.startTransition=function(R){var q=W.T,G={};W.T=G;try{var $=R(),ae=W.S;ae!==null&&ae(G,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(P,Se)}catch(fe){Se(fe)}finally{q!==null&&G.types!==null&&(q.types=G.types),W.T=q}},ve.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},ve.use=function(R){return W.H.use(R)},ve.useActionState=function(R,q,G){return W.H.useActionState(R,q,G)},ve.useCallback=function(R,q){return W.H.useCallback(R,q)},ve.useContext=function(R){return W.H.useContext(R)},ve.useDebugValue=function(){},ve.useDeferredValue=function(R,q){return W.H.useDeferredValue(R,q)},ve.useEffect=function(R,q){return W.H.useEffect(R,q)},ve.useEffectEvent=function(R){return W.H.useEffectEvent(R)},ve.useId=function(){return W.H.useId()},ve.useImperativeHandle=function(R,q,G){return W.H.useImperativeHandle(R,q,G)},ve.useInsertionEffect=function(R,q){return W.H.useInsertionEffect(R,q)},ve.useLayoutEffect=function(R,q){return W.H.useLayoutEffect(R,q)},ve.useMemo=function(R,q){return W.H.useMemo(R,q)},ve.useOptimistic=function(R,q){return W.H.useOptimistic(R,q)},ve.useReducer=function(R,q,G){return W.H.useReducer(R,q,G)},ve.useRef=function(R){return W.H.useRef(R)},ve.useState=function(R){return W.H.useState(R)},ve.useSyncExternalStore=function(R,q,G){return W.H.useSyncExternalStore(R,q,G)},ve.useTransition=function(){return W.H.useTransition()},ve.version="19.2.4",ve}var jp;function rd(){return jp||(jp=1,ju.exports=x0()),ju.exports}var S=rd();const ee=Tg(S);var Ru={exports:{}},rs={},Tu={exports:{}},Cu={};var Rp;function v0(){return Rp||(Rp=1,(function(n){function r(O,J){var F=O.length;O.push(J);e:for(;0<F;){var Se=F-1>>>1,xe=O[Se];if(0<d(xe,J))O[Se]=J,O[F]=xe,F=Se;else break e}}function s(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var J=O[0],F=O.pop();if(F!==J){O[0]=F;e:for(var Se=0,xe=O.length,R=xe>>>1;Se<R;){var q=2*(Se+1)-1,G=O[q],$=q+1,ae=O[$];if(0>d(G,F))$<xe&&0>d(ae,G)?(O[Se]=ae,O[$]=F,Se=$):(O[Se]=G,O[q]=F,Se=q);else if($<xe&&0>d(ae,F))O[Se]=ae,O[$]=F,Se=$;else break e}}return J}function d(O,J){var F=O.sortIndex-J.sortIndex;return F!==0?F:O.id-J.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,g=m.now();n.unstable_now=function(){return m.now()-g}}var x=[],y=[],v=1,p=null,w=3,M=!1,N=!1,j=!1,T=!1,z=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function L(O){for(var J=s(y);J!==null;){if(J.callback===null)i(y);else if(J.startTime<=O)i(y),J.sortIndex=J.expirationTime,r(x,J);else break;J=s(y)}}function te(O){if(j=!1,L(O),!N)if(s(x)!==null)N=!0,P||(P=!0,Q());else{var J=s(y);J!==null&&he(te,J.startTime-O)}}var P=!1,W=-1,I=5,ge=-1;function Oe(){return T?!0:!(n.unstable_now()-ge<I)}function ne(){if(T=!1,P){var O=n.unstable_now();ge=O;var J=!0;try{e:{N=!1,j&&(j=!1,_(W),W=-1),M=!0;var F=w;try{t:{for(L(O),p=s(x);p!==null&&!(p.expirationTime>O&&Oe());){var Se=p.callback;if(typeof Se=="function"){p.callback=null,w=p.priorityLevel;var xe=Se(p.expirationTime<=O);if(O=n.unstable_now(),typeof xe=="function"){p.callback=xe,L(O),J=!0;break t}p===s(x)&&i(x),L(O)}else i(x);p=s(x)}if(p!==null)J=!0;else{var R=s(y);R!==null&&he(te,R.startTime-O),J=!1}}break e}finally{p=null,w=F,M=!1}J=void 0}}finally{J?Q():P=!1}}}var Q;if(typeof Y=="function")Q=function(){Y(ne)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,ce=K.port2;K.port1.onmessage=ne,Q=function(){ce.postMessage(null)}}else Q=function(){z(ne,0)};function he(O,J){W=z(function(){O(n.unstable_now())},J)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(O){switch(w){case 1:case 2:case 3:var J=3;break;default:J=w}var F=w;w=J;try{return O()}finally{w=F}},n.unstable_requestPaint=function(){T=!0},n.unstable_runWithPriority=function(O,J){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var F=w;w=O;try{return J()}finally{w=F}},n.unstable_scheduleCallback=function(O,J,F){var Se=n.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?Se+F:Se):F=Se,O){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=F+xe,O={id:v++,callback:J,priorityLevel:O,startTime:F,expirationTime:xe,sortIndex:-1},F>Se?(O.sortIndex=F,r(y,O),s(x)===null&&O===s(y)&&(j?(_(W),W=-1):j=!0,he(te,F-Se))):(O.sortIndex=xe,r(x,O),N||M||(N=!0,P||(P=!0,Q()))),O},n.unstable_shouldYield=Oe,n.unstable_wrapCallback=function(O){var J=w;return function(){var F=w;w=J;try{return O.apply(this,arguments)}finally{w=F}}}})(Cu)),Cu}var Tp;function b0(){return Tp||(Tp=1,Tu.exports=v0()),Tu.exports}var _u={exports:{}},xt={};var Cp;function S0(){if(Cp)return xt;Cp=1;var n=rd();function r(x){var y="https://react.dev/errors/"+x;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)y+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+x+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function f(x,y,v){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:p==null?null:""+p,children:x,containerInfo:y,implementation:v}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(x,y){if(x==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,xt.createPortal=function(x,y){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(r(299));return f(x,y,null,v)},xt.flushSync=function(x){var y=m.T,v=i.p;try{if(m.T=null,i.p=2,x)return x()}finally{m.T=y,i.p=v,i.d.f()}},xt.preconnect=function(x,y){typeof x=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,i.d.C(x,y))},xt.prefetchDNS=function(x){typeof x=="string"&&i.d.D(x)},xt.preinit=function(x,y){if(typeof x=="string"&&y&&typeof y.as=="string"){var v=y.as,p=g(v,y.crossOrigin),w=typeof y.integrity=="string"?y.integrity:void 0,M=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;v==="style"?i.d.S(x,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:p,integrity:w,fetchPriority:M}):v==="script"&&i.d.X(x,{crossOrigin:p,integrity:w,fetchPriority:M,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},xt.preinitModule=function(x,y){if(typeof x=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var v=g(y.as,y.crossOrigin);i.d.M(x,{crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&i.d.M(x)},xt.preload=function(x,y){if(typeof x=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var v=y.as,p=g(v,y.crossOrigin);i.d.L(x,v,{crossOrigin:p,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},xt.preloadModule=function(x,y){if(typeof x=="string")if(y){var v=g(y.as,y.crossOrigin);i.d.m(x,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else i.d.m(x)},xt.requestFormReset=function(x){i.d.r(x)},xt.unstable_batchedUpdates=function(x,y){return x(y)},xt.useFormState=function(x,y,v){return m.H.useFormState(x,y,v)},xt.useFormStatus=function(){return m.H.useHostTransitionStatus()},xt.version="19.2.4",xt}var _p;function Cg(){if(_p)return _u.exports;_p=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),_u.exports=S0(),_u.exports}var Mp;function w0(){if(Mp)return rs;Mp=1;var n=b0(),r=rd(),s=Cg();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(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 g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(f(e)!==e)throw Error(i(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var c=o.alternate;if(c===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===c.child){for(c=o.child;c;){if(c===a)return x(o),e;if(c===l)return x(o),t;c=c.sibling}throw Error(i(188))}if(a.return!==l.return)a=o,l=c;else{for(var h=!1,b=o.child;b;){if(b===a){h=!0,a=o,l=c;break}if(b===l){h=!0,l=o,a=c;break}b=b.sibling}if(!h){for(b=c.child;b;){if(b===a){h=!0,a=c,l=o;break}if(b===l){h=!0,l=c,a=o;break}b=b.sibling}if(!h)throw Error(i(189))}}if(a.alternate!==l)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,w=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),Oe=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var K=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===K?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case z:return"Profiler";case T:return"StrictMode";case te:return"Suspense";case P:return"SuspenseList";case ge:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case Y:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case L:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case I:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var he=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},Se=[],xe=-1;function R(e){return{current:e}}function q(e){0>xe||(e.current=Se[xe],Se[xe]=null,xe--)}function G(e,t){xe++,Se[xe]=e.current,e.current=t}var $=R(null),ae=R(null),fe=R(null),ue=R(null);function be(e,t){switch(G(fe,t),G(ae,e),G($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xh(t),e=Fh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q($),G($,e)}function ze(){q($),q(ae),q(fe)}function bt(e){e.memoizedState!==null&&G(ue,e);var t=$.current,a=Fh(t,e.type);t!==a&&(G(ae,e),G($,a))}function qt(e){ae.current===e&&(q($),q(ae)),ue.current===e&&(q(ue),es._currentValue=F)}var St,ws;function ca(e){if(St===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);St=t&&t[1]||"",ws=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+St+e+ws}var cr=!1;function cl(e,t){if(!e||cr)return"";cr=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(B){var U=B}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(B){U=B}e.call(Z.prototype)}}else{try{throw Error()}catch(B){U=B}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(B){if(B&&U&&typeof B.stack=="string")return[B.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),h=c[0],b=c[1];if(h&&b){var E=h.split(`
|
|
4
|
+
`),D=b.split(`
|
|
5
|
+
`);for(o=l=0;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;for(;o<D.length&&!D[o].includes("DetermineComponentFrameRoot");)o++;if(l===E.length||o===D.length)for(l=E.length-1,o=D.length-1;1<=l&&0<=o&&E[l]!==D[o];)o--;for(;1<=l&&0<=o;l--,o--)if(E[l]!==D[o]){if(l!==1||o!==1)do if(l--,o--,0>o||E[l]!==D[o]){var V=`
|
|
6
|
+
`+E[l].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=l&&0<=o);break}}}finally{cr=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ca(a):""}function On(e,t){switch(e.tag){case 26:case 27:case 5:return ca(e.type);case 16:return ca("Lazy");case 13:return e.child!==t&&t!==null?ca("Suspense Fallback"):ca("Suspense");case 19:return ca("SuspenseList");case 0:case 15:return cl(e.type,!1);case 11:return cl(e.type.render,!1);case 1:return cl(e.type,!0);case 31:return ca("Activity");default:return""}}function ur(e){try{var t="",a=null;do t+=On(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var Gt=Object.prototype.hasOwnProperty,dr=n.unstable_scheduleCallback,fr=n.unstable_cancelCallback,wt=n.unstable_shouldYield,en=n.unstable_requestPaint,Nt=n.unstable_now,fo=n.unstable_getCurrentPriorityLevel,zn=n.unstable_ImmediatePriority,Ns=n.unstable_UserBlockingPriority,kn=n.unstable_NormalPriority,mr=n.unstable_LowPriority,Ma=n.unstable_IdlePriority,Es=n.log,tn=n.unstable_setDisableYieldValue,Dn=null,Et=null;function ua(e){if(typeof Es=="function"&&tn(e),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(Dn,e)}catch{}}var gt=Math.clz32?Math.clz32:va,mo=Math.log,hr=Math.LN2;function va(e){return e>>>=0,e===0?32:31-(mo(e)/hr|0)|0}var ul=256,dl=262144,Un=4194304;function ba(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ye(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,c=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=l&134217727;return b!==0?(l=b&~c,l!==0?o=ba(l):(h&=b,h!==0?o=ba(h):a||(a=b&~e,a!==0&&(o=ba(a))))):(b=l&~c,b!==0?o=ba(b):h!==0?o=ba(h):a||(a=l&~e,a!==0&&(o=ba(a)))),o===0?0:t!==0&&t!==o&&(t&c)===0&&(c=o&-o,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:o}function Xe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ot(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 yt(){var e=Un;return Un<<=1,(Un&62914560)===0&&(Un=4194304),e}function an(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Tt(e,t,a,l,o,c){var h=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,D=e.hiddenUpdates;for(a=h&~a;0<a;){var V=31-gt(a),Z=1<<V;b[V]=0,E[V]=-1;var U=D[V];if(U!==null)for(D[V]=null,V=0;V<U.length;V++){var B=U[V];B!==null&&(B.lane&=-536870913)}a&=~Z}l!==0&&Ln(e,l,0),c!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=c&~(h&~t))}function Ln(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-gt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Ct(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-gt(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function _t(e,t){var a=t&-t;return a=(a&42)!==0?1:fl(a),(a&(e.suspendedLanes|t))!==0?0:a}function fl(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 da(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ho(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:pp(e.type))}function Md(e,t){var a=J.p;try{return J.p=e,t()}finally{J.p=a}}var nn=Math.random().toString(36).slice(2),dt="__reactFiber$"+nn,Mt="__reactProps$"+nn,ml="__reactContainer$"+nn,po="__reactEvents$"+nn,rx="__reactListeners$"+nn,sx="__reactHandles$"+nn,Ad="__reactResources$"+nn,pr="__reactMarker$"+nn;function go(e){delete e[dt],delete e[Mt],delete e[po],delete e[rx],delete e[sx]}function hl(e){var t=e[dt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ml]||a[dt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Wh(e);e!==null;){if(a=e[dt])return a;e=Wh(e)}return t}e=a,a=e.parentNode}return null}function pl(e){if(e=e[dt]||e[ml]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function gr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gl(e){var t=e[Ad];return t||(t=e[Ad]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[pr]=!0}var Od=new Set,zd={};function Bn(e,t){yl(e,t),yl(e+"Capture",t)}function yl(e,t){for(zd[e]=t,e=0;e<t.length;e++)Od.add(t[e])}var ix=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]*$"),kd={},Dd={};function ox(e){return Gt.call(Dd,e)?!0:Gt.call(kd,e)?!1:ix.test(e)?Dd[e]=!0:(kd[e]=!0,!1)}function js(e,t,a){if(ox(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Rs(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 Aa(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ud(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function cx(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(h){a=""+h,c.call(this,h)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(h){a=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yo(e){if(!e._valueTracker){var t=Ud(e)?"checked":"value";e._valueTracker=cx(e,t,""+e[t])}}function Ld(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Ud(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Ts(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 ux=/[\n"\\]/g;function Wt(e){return e.replace(ux,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xo(e,t,a,l,o,c,h,b){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Pt(t)):e.value!==""+Pt(t)&&(e.value=""+Pt(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?vo(e,h,Pt(t)):a!=null?vo(e,h,Pt(a)):l!=null&&e.removeAttribute("value"),o==null&&c!=null&&(e.defaultChecked=!!c),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Pt(b):e.removeAttribute("name")}function Bd(e,t,a,l,o,c,h,b){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){yo(e);return}a=a!=null?""+Pt(a):"",t=t!=null?""+Pt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=b?e.checked:!!l,e.defaultChecked=!!l,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),yo(e)}function vo(e,t,a){t==="number"&&Ts(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function xl(e,t,a,l){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&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Pt(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Hd(e,t,a){if(t!=null&&(t=""+Pt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Pt(a):""}function qd(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(i(92));if(he(l)){if(1<l.length)throw Error(i(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Pt(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),yo(e)}function vl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var dx=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 Gd(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||dx.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Qd(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&Gd(e,o,l)}else for(var c in t)t.hasOwnProperty(c)&&Gd(e,c,t[c])}function bo(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 fx=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"]]),mx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Cs(e){return mx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Oa(){}var So=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bl=null,Sl=null;function Vd(e){var t=pl(e);if(t&&(e=t.stateNode)){var a=e[Mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(xo(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="'+Wt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[Mt]||null;if(!o)throw Error(i(90));xo(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Ld(l)}break e;case"textarea":Hd(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&xl(e,!!a.multiple,t,!1)}}}var No=!1;function Yd(e,t,a){if(No)return e(t,a);No=!0;try{var l=e(t);return l}finally{if(No=!1,(bl!==null||Sl!==null)&&(pi(),bl&&(t=bl,e=Sl,Sl=bl=null,Vd(t),e)))for(t=0;t<e.length;t++)Vd(e[t])}}function yr(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Mt]||null;if(l===null)return null;a=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var za=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eo=!1;if(za)try{var xr={};Object.defineProperty(xr,"passive",{get:function(){Eo=!0}}),window.addEventListener("test",xr,xr),window.removeEventListener("test",xr,xr)}catch{Eo=!1}var ln=null,jo=null,_s=null;function Xd(){if(_s)return _s;var e,t=jo,a=t.length,l,o="value"in ln?ln.value:ln.textContent,c=o.length;for(e=0;e<a&&t[e]===o[e];e++);var h=a-e;for(l=1;l<=h&&t[a-l]===o[c-l];l++);return _s=o.slice(e,1<l?1-l:void 0)}function Ms(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 As(){return!0}function Fd(){return!1}function At(e){function t(a,l,o,c,h){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=c,this.target=h,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(c):c[b]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?As:Fd,this.isPropagationStopped=Fd,this}return p(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=As)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=As)},persist:function(){},isPersistent:As}),t}var Hn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Os=At(Hn),vr=p({},Hn,{view:0,detail:0}),hx=At(vr),Ro,To,br,zs=p({},vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_o,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!==br&&(br&&e.type==="mousemove"?(Ro=e.screenX-br.screenX,To=e.screenY-br.screenY):To=Ro=0,br=e),Ro)},movementY:function(e){return"movementY"in e?e.movementY:To}}),Kd=At(zs),px=p({},zs,{dataTransfer:0}),gx=At(px),yx=p({},vr,{relatedTarget:0}),Co=At(yx),xx=p({},Hn,{animationName:0,elapsedTime:0,pseudoElement:0}),vx=At(xx),bx=p({},Hn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sx=At(bx),wx=p({},Hn,{data:0}),Zd=At(wx),Nx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ex={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"},jx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=jx[e])?!!t[e]:!1}function _o(){return Rx}var Tx=p({},vr,{key:function(e){if(e.key){var t=Nx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ms(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ex[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_o,charCode:function(e){return e.type==="keypress"?Ms(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ms(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Cx=At(Tx),_x=p({},zs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jd=At(_x),Mx=p({},vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_o}),Ax=At(Mx),Ox=p({},Hn,{propertyName:0,elapsedTime:0,pseudoElement:0}),zx=At(Ox),kx=p({},zs,{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}),Dx=At(kx),Ux=p({},Hn,{newState:0,oldState:0}),Lx=At(Ux),Bx=[9,13,27,32],Mo=za&&"CompositionEvent"in window,Sr=null;za&&"documentMode"in document&&(Sr=document.documentMode);var Hx=za&&"TextEvent"in window&&!Sr,$d=za&&(!Mo||Sr&&8<Sr&&11>=Sr),Id=" ",Pd=!1;function Wd(e,t){switch(e){case"keyup":return Bx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ef(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wl=!1;function qx(e,t){switch(e){case"compositionend":return ef(t);case"keypress":return t.which!==32?null:(Pd=!0,Id);case"textInput":return e=t.data,e===Id&&Pd?null:e;default:return null}}function Gx(e,t){if(wl)return e==="compositionend"||!Mo&&Wd(e,t)?(e=Xd(),_s=jo=ln=null,wl=!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 $d&&t.locale!=="ko"?null:t.data;default:return null}}var Qx={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 tf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qx[e.type]:t==="textarea"}function af(e,t,a,l){bl?Sl?Sl.push(l):Sl=[l]:bl=l,t=wi(t,"onChange"),0<t.length&&(a=new Os("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var wr=null,Nr=null;function Vx(e){Hh(e,0)}function ks(e){var t=gr(e);if(Ld(t))return e}function nf(e,t){if(e==="change")return t}var lf=!1;if(za){var Ao;if(za){var Oo="oninput"in document;if(!Oo){var rf=document.createElement("div");rf.setAttribute("oninput","return;"),Oo=typeof rf.oninput=="function"}Ao=Oo}else Ao=!1;lf=Ao&&(!document.documentMode||9<document.documentMode)}function sf(){wr&&(wr.detachEvent("onpropertychange",of),Nr=wr=null)}function of(e){if(e.propertyName==="value"&&ks(Nr)){var t=[];af(t,Nr,e,wo(e)),Yd(Vx,t)}}function Yx(e,t,a){e==="focusin"?(sf(),wr=t,Nr=a,wr.attachEvent("onpropertychange",of)):e==="focusout"&&sf()}function Xx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ks(Nr)}function Fx(e,t){if(e==="click")return ks(t)}function Kx(e,t){if(e==="input"||e==="change")return ks(t)}function Zx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qt=typeof Object.is=="function"?Object.is:Zx;function Er(e,t){if(Qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!Gt.call(t,o)||!Qt(e[o],t[o]))return!1}return!0}function cf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uf(e,t){var a=cf(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=cf(a)}}function df(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?df(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ff(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ts(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=Ts(e.document)}return t}function zo(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 Jx=za&&"documentMode"in document&&11>=document.documentMode,Nl=null,ko=null,jr=null,Do=!1;function mf(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Do||Nl==null||Nl!==Ts(l)||(l=Nl,"selectionStart"in l&&zo(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),jr&&Er(jr,l)||(jr=l,l=wi(ko,"onSelect"),0<l.length&&(t=new Os("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Nl)))}function qn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var El={animationend:qn("Animation","AnimationEnd"),animationiteration:qn("Animation","AnimationIteration"),animationstart:qn("Animation","AnimationStart"),transitionrun:qn("Transition","TransitionRun"),transitionstart:qn("Transition","TransitionStart"),transitioncancel:qn("Transition","TransitionCancel"),transitionend:qn("Transition","TransitionEnd")},Uo={},hf={};za&&(hf=document.createElement("div").style,"AnimationEvent"in window||(delete El.animationend.animation,delete El.animationiteration.animation,delete El.animationstart.animation),"TransitionEvent"in window||delete El.transitionend.transition);function Gn(e){if(Uo[e])return Uo[e];if(!El[e])return e;var t=El[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in hf)return Uo[e]=t[a];return e}var pf=Gn("animationend"),gf=Gn("animationiteration"),yf=Gn("animationstart"),$x=Gn("transitionrun"),Ix=Gn("transitionstart"),Px=Gn("transitioncancel"),xf=Gn("transitionend"),vf=new Map,Lo="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(" ");Lo.push("scrollEnd");function fa(e,t){vf.set(e,t),Bn(t,[e])}var Ds=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)},ea=[],jl=0,Bo=0;function Us(){for(var e=jl,t=Bo=jl=0;t<e;){var a=ea[t];ea[t++]=null;var l=ea[t];ea[t++]=null;var o=ea[t];ea[t++]=null;var c=ea[t];if(ea[t++]=null,l!==null&&o!==null){var h=l.pending;h===null?o.next=o:(o.next=h.next,h.next=o),l.pending=o}c!==0&&bf(a,o,c)}}function Ls(e,t,a,l){ea[jl++]=e,ea[jl++]=t,ea[jl++]=a,ea[jl++]=l,Bo|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Ho(e,t,a,l){return Ls(e,t,a,l),Bs(e)}function Qn(e,t){return Ls(e,null,null,t),Bs(e)}function bf(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,c=e.return;c!==null;)c.childLanes|=a,l=c.alternate,l!==null&&(l.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(o=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,o&&t!==null&&(o=31-gt(a),e=c.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),c):null}function Bs(e){if(50<Kr)throw Kr=0,Zc=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rl={};function Wx(e,t,a,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,a,l){return new Wx(e,t,a,l)}function qo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ka(e,t){var a=e.alternate;return a===null?(a=Vt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Sf(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 Hs(e,t,a,l,o,c){var h=0;if(l=e,typeof e=="function")qo(e)&&(h=1);else if(typeof e=="string")h=l0(e,a,$.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ge:return e=Vt(31,a,t,o),e.elementType=ge,e.lanes=c,e;case j:return Vn(a.children,o,c,t);case T:h=8,o|=24;break;case z:return e=Vt(12,a,t,o|2),e.elementType=z,e.lanes=c,e;case te:return e=Vt(13,a,t,o),e.elementType=te,e.lanes=c,e;case P:return e=Vt(19,a,t,o),e.elementType=P,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:h=10;break e;case _:h=9;break e;case L:h=11;break e;case W:h=14;break e;case I:h=16,l=null;break e}h=29,a=Error(i(130,e===null?"null":typeof e,"")),l=null}return t=Vt(h,a,t,o),t.elementType=e,t.type=l,t.lanes=c,t}function Vn(e,t,a,l){return e=Vt(7,e,l,t),e.lanes=a,e}function Go(e,t,a){return e=Vt(6,e,null,t),e.lanes=a,e}function wf(e){var t=Vt(18,null,null,0);return t.stateNode=e,t}function Qo(e,t,a){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Nf=new WeakMap;function ta(e,t){if(typeof e=="object"&&e!==null){var a=Nf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ur(t)},Nf.set(e,t),t)}return{value:e,source:t,stack:ur(t)}}var Tl=[],Cl=0,qs=null,Rr=0,aa=[],na=0,rn=null,Sa=1,wa="";function Da(e,t){Tl[Cl++]=Rr,Tl[Cl++]=qs,qs=e,Rr=t}function Ef(e,t,a){aa[na++]=Sa,aa[na++]=wa,aa[na++]=rn,rn=e;var l=Sa;e=wa;var o=32-gt(l)-1;l&=~(1<<o),a+=1;var c=32-gt(t)+o;if(30<c){var h=o-o%5;c=(l&(1<<h)-1).toString(32),l>>=h,o-=h,Sa=1<<32-gt(t)+o|a<<o|l,wa=c+e}else Sa=1<<c|a<<o|l,wa=e}function Vo(e){e.return!==null&&(Da(e,1),Ef(e,1,0))}function Yo(e){for(;e===qs;)qs=Tl[--Cl],Tl[Cl]=null,Rr=Tl[--Cl],Tl[Cl]=null;for(;e===rn;)rn=aa[--na],aa[na]=null,wa=aa[--na],aa[na]=null,Sa=aa[--na],aa[na]=null}function jf(e,t){aa[na++]=Sa,aa[na++]=wa,aa[na++]=rn,Sa=t.id,wa=t.overflow,rn=e}var ft=null,Ve=null,Ae=!1,sn=null,la=!1,Xo=Error(i(519));function on(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Tr(ta(t,e)),Xo}function Rf(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[dt]=e,t[Mt]=l,a){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(a=0;a<Jr.length;a++)Te(Jr[a],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),Bd(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),qd(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Vh(t.textContent,a)?(l.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),l.onScroll!=null&&Te("scroll",t),l.onScrollEnd!=null&&Te("scrollend",t),l.onClick!=null&&(t.onclick=Oa),t=!0):t=!1,t||on(e,!0)}function Tf(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:la=!1;return;case 27:case 3:la=!0;return;default:ft=ft.return}}function _l(e){if(e!==ft)return!1;if(!Ae)return Tf(e),Ae=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||cu(e.type,e.memoizedProps)),a=!a),a&&Ve&&on(e),Tf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ve=Ph(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));Ve=Ph(e)}else t===27?(t=Ve,wn(e.type)?(e=hu,hu=null,Ve=e):Ve=t):Ve=ft?sa(e.stateNode.nextSibling):null;return!0}function Yn(){Ve=ft=null,Ae=!1}function Fo(){var e=sn;return e!==null&&(Dt===null?Dt=e:Dt.push.apply(Dt,e),sn=null),e}function Tr(e){sn===null?sn=[e]:sn.push(e)}var Ko=R(null),Xn=null,Ua=null;function cn(e,t,a){G(Ko,t._currentValue),t._currentValue=a}function La(e){e._currentValue=Ko.current,q(Ko)}function Zo(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Jo(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var c=o.dependencies;if(c!==null){var h=o.child;c=c.firstContext;e:for(;c!==null;){var b=c;c=o;for(var E=0;E<t.length;E++)if(b.context===t[E]){c.lanes|=a,b=c.alternate,b!==null&&(b.lanes|=a),Zo(c.return,a,e),l||(h=null);break e}c=b.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(i(341));h.lanes|=a,c=h.alternate,c!==null&&(c.lanes|=a),Zo(h,a,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function Ml(e,t,a,l){e=null;for(var o=t,c=!1;o!==null;){if(!c){if((o.flags&524288)!==0)c=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(i(387));if(h=h.memoizedProps,h!==null){var b=o.type;Qt(o.pendingProps.value,h.value)||(e!==null?e.push(b):e=[b])}}else if(o===ue.current){if(h=o.alternate,h===null)throw Error(i(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(es):e=[es])}o=o.return}e!==null&&Jo(t,e,a,l),t.flags|=262144}function Gs(e){for(e=e.firstContext;e!==null;){if(!Qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fn(e){Xn=e,Ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function mt(e){return Cf(Xn,e)}function Qs(e,t){return Xn===null&&Fn(e),Cf(e,t)}function Cf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ua===null){if(e===null)throw Error(i(308));Ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ua=Ua.next=t;return a}var ev=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},tv=n.unstable_scheduleCallback,av=n.unstable_NormalPriority,tt={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $o(){return{controller:new ev,data:new Map,refCount:0}}function Cr(e){e.refCount--,e.refCount===0&&tv(av,function(){e.controller.abort()})}var _r=null,Io=0,Al=0,Ol=null;function nv(e,t){if(_r===null){var a=_r=[];Io=0,Al=eu(),Ol={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Io++,t.then(_f,_f),t}function _f(){if(--Io===0&&_r!==null){Ol!==null&&(Ol.status="fulfilled");var e=_r;_r=null,Al=0,Ol=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function lv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var Mf=O.S;O.S=function(e,t){mh=Nt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&nv(e,t),Mf!==null&&Mf(e,t)};var Kn=R(null);function Po(){var e=Kn.current;return e!==null?e:Qe.pooledCache}function Vs(e,t){t===null?G(Kn,Kn.current):G(Kn,t.pool)}function Af(){var e=Po();return e===null?null:{parent:tt._currentValue,pool:e}}var zl=Error(i(460)),Wo=Error(i(474)),Ys=Error(i(542)),Xs={then:function(){}};function Of(e){return e=e.status,e==="fulfilled"||e==="rejected"}function zf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Oa,Oa),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Df(e),e;default:if(typeof t.status=="string")t.then(Oa,Oa);else{if(e=Qe,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Df(e),e}throw Jn=t,zl}}function Zn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Jn=a,zl):a}}var Jn=null;function kf(){if(Jn===null)throw Error(i(459));var e=Jn;return Jn=null,e}function Df(e){if(e===zl||e===Ys)throw Error(i(483))}var kl=null,Mr=0;function Fs(e){var t=Mr;return Mr+=1,kl===null&&(kl=[]),zf(kl,e,t)}function Ar(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ks(e,t){throw t.$$typeof===w?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Uf(e){function t(A,C){if(e){var k=A.deletions;k===null?(A.deletions=[C],A.flags|=16):k.push(C)}}function a(A,C){if(!e)return null;for(;C!==null;)t(A,C),C=C.sibling;return null}function l(A){for(var C=new Map;A!==null;)A.key!==null?C.set(A.key,A):C.set(A.index,A),A=A.sibling;return C}function o(A,C){return A=ka(A,C),A.index=0,A.sibling=null,A}function c(A,C,k){return A.index=k,e?(k=A.alternate,k!==null?(k=k.index,k<C?(A.flags|=67108866,C):k):(A.flags|=67108866,C)):(A.flags|=1048576,C)}function h(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function b(A,C,k,X){return C===null||C.tag!==6?(C=Go(k,A.mode,X),C.return=A,C):(C=o(C,k),C.return=A,C)}function E(A,C,k,X){var de=k.type;return de===j?V(A,C,k.props.children,X,k.key):C!==null&&(C.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===I&&Zn(de)===C.type)?(C=o(C,k.props),Ar(C,k),C.return=A,C):(C=Hs(k.type,k.key,k.props,null,A.mode,X),Ar(C,k),C.return=A,C)}function D(A,C,k,X){return C===null||C.tag!==4||C.stateNode.containerInfo!==k.containerInfo||C.stateNode.implementation!==k.implementation?(C=Qo(k,A.mode,X),C.return=A,C):(C=o(C,k.children||[]),C.return=A,C)}function V(A,C,k,X,de){return C===null||C.tag!==7?(C=Vn(k,A.mode,X,de),C.return=A,C):(C=o(C,k),C.return=A,C)}function Z(A,C,k){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Go(""+C,A.mode,k),C.return=A,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case M:return k=Hs(C.type,C.key,C.props,null,A.mode,k),Ar(k,C),k.return=A,k;case N:return C=Qo(C,A.mode,k),C.return=A,C;case I:return C=Zn(C),Z(A,C,k)}if(he(C)||Q(C))return C=Vn(C,A.mode,k,null),C.return=A,C;if(typeof C.then=="function")return Z(A,Fs(C),k);if(C.$$typeof===Y)return Z(A,Qs(A,C),k);Ks(A,C)}return null}function U(A,C,k,X){var de=C!==null?C.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return de!==null?null:b(A,C,""+k,X);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case M:return k.key===de?E(A,C,k,X):null;case N:return k.key===de?D(A,C,k,X):null;case I:return k=Zn(k),U(A,C,k,X)}if(he(k)||Q(k))return de!==null?null:V(A,C,k,X,null);if(typeof k.then=="function")return U(A,C,Fs(k),X);if(k.$$typeof===Y)return U(A,C,Qs(A,k),X);Ks(A,k)}return null}function B(A,C,k,X,de){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return A=A.get(k)||null,b(C,A,""+X,de);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case M:return A=A.get(X.key===null?k:X.key)||null,E(C,A,X,de);case N:return A=A.get(X.key===null?k:X.key)||null,D(C,A,X,de);case I:return X=Zn(X),B(A,C,k,X,de)}if(he(X)||Q(X))return A=A.get(k)||null,V(C,A,X,de,null);if(typeof X.then=="function")return B(A,C,k,Fs(X),de);if(X.$$typeof===Y)return B(A,C,k,Qs(C,X),de);Ks(C,X)}return null}function re(A,C,k,X){for(var de=null,ke=null,oe=C,Ne=C=0,_e=null;oe!==null&&Ne<k.length;Ne++){oe.index>Ne?(_e=oe,oe=null):_e=oe.sibling;var De=U(A,oe,k[Ne],X);if(De===null){oe===null&&(oe=_e);break}e&&oe&&De.alternate===null&&t(A,oe),C=c(De,C,Ne),ke===null?de=De:ke.sibling=De,ke=De,oe=_e}if(Ne===k.length)return a(A,oe),Ae&&Da(A,Ne),de;if(oe===null){for(;Ne<k.length;Ne++)oe=Z(A,k[Ne],X),oe!==null&&(C=c(oe,C,Ne),ke===null?de=oe:ke.sibling=oe,ke=oe);return Ae&&Da(A,Ne),de}for(oe=l(oe);Ne<k.length;Ne++)_e=B(oe,A,Ne,k[Ne],X),_e!==null&&(e&&_e.alternate!==null&&oe.delete(_e.key===null?Ne:_e.key),C=c(_e,C,Ne),ke===null?de=_e:ke.sibling=_e,ke=_e);return e&&oe.forEach(function(Tn){return t(A,Tn)}),Ae&&Da(A,Ne),de}function me(A,C,k,X){if(k==null)throw Error(i(151));for(var de=null,ke=null,oe=C,Ne=C=0,_e=null,De=k.next();oe!==null&&!De.done;Ne++,De=k.next()){oe.index>Ne?(_e=oe,oe=null):_e=oe.sibling;var Tn=U(A,oe,De.value,X);if(Tn===null){oe===null&&(oe=_e);break}e&&oe&&Tn.alternate===null&&t(A,oe),C=c(Tn,C,Ne),ke===null?de=Tn:ke.sibling=Tn,ke=Tn,oe=_e}if(De.done)return a(A,oe),Ae&&Da(A,Ne),de;if(oe===null){for(;!De.done;Ne++,De=k.next())De=Z(A,De.value,X),De!==null&&(C=c(De,C,Ne),ke===null?de=De:ke.sibling=De,ke=De);return Ae&&Da(A,Ne),de}for(oe=l(oe);!De.done;Ne++,De=k.next())De=B(oe,A,Ne,De.value,X),De!==null&&(e&&De.alternate!==null&&oe.delete(De.key===null?Ne:De.key),C=c(De,C,Ne),ke===null?de=De:ke.sibling=De,ke=De);return e&&oe.forEach(function(p0){return t(A,p0)}),Ae&&Da(A,Ne),de}function Ge(A,C,k,X){if(typeof k=="object"&&k!==null&&k.type===j&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case M:e:{for(var de=k.key;C!==null;){if(C.key===de){if(de=k.type,de===j){if(C.tag===7){a(A,C.sibling),X=o(C,k.props.children),X.return=A,A=X;break e}}else if(C.elementType===de||typeof de=="object"&&de!==null&&de.$$typeof===I&&Zn(de)===C.type){a(A,C.sibling),X=o(C,k.props),Ar(X,k),X.return=A,A=X;break e}a(A,C);break}else t(A,C);C=C.sibling}k.type===j?(X=Vn(k.props.children,A.mode,X,k.key),X.return=A,A=X):(X=Hs(k.type,k.key,k.props,null,A.mode,X),Ar(X,k),X.return=A,A=X)}return h(A);case N:e:{for(de=k.key;C!==null;){if(C.key===de)if(C.tag===4&&C.stateNode.containerInfo===k.containerInfo&&C.stateNode.implementation===k.implementation){a(A,C.sibling),X=o(C,k.children||[]),X.return=A,A=X;break e}else{a(A,C);break}else t(A,C);C=C.sibling}X=Qo(k,A.mode,X),X.return=A,A=X}return h(A);case I:return k=Zn(k),Ge(A,C,k,X)}if(he(k))return re(A,C,k,X);if(Q(k)){if(de=Q(k),typeof de!="function")throw Error(i(150));return k=de.call(k),me(A,C,k,X)}if(typeof k.then=="function")return Ge(A,C,Fs(k),X);if(k.$$typeof===Y)return Ge(A,C,Qs(A,k),X);Ks(A,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,C!==null&&C.tag===6?(a(A,C.sibling),X=o(C,k),X.return=A,A=X):(a(A,C),X=Go(k,A.mode,X),X.return=A,A=X),h(A)):a(A,C)}return function(A,C,k,X){try{Mr=0;var de=Ge(A,C,k,X);return kl=null,de}catch(oe){if(oe===zl||oe===Ys)throw oe;var ke=Vt(29,oe,null,A.mode);return ke.lanes=X,ke.return=A,ke}}}var $n=Uf(!0),Lf=Uf(!1),un=!1;function ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tc(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 dn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fn(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ue&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=Bs(e),bf(e,null,a),t}return Ls(e,l,t,a),Bs(e)}function Or(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Ct(e,a)}}function ac(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?o=c=h:c=c.next=h,a=a.next}while(a!==null);c===null?o=c=t:c=c.next=t}else o=c=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var nc=!1;function zr(){if(nc){var e=Ol;if(e!==null)throw e}}function kr(e,t,a,l){nc=!1;var o=e.updateQueue;un=!1;var c=o.firstBaseUpdate,h=o.lastBaseUpdate,b=o.shared.pending;if(b!==null){o.shared.pending=null;var E=b,D=E.next;E.next=null,h===null?c=D:h.next=D,h=E;var V=e.alternate;V!==null&&(V=V.updateQueue,b=V.lastBaseUpdate,b!==h&&(b===null?V.firstBaseUpdate=D:b.next=D,V.lastBaseUpdate=E))}if(c!==null){var Z=o.baseState;h=0,V=D=E=null,b=c;do{var U=b.lane&-536870913,B=U!==b.lane;if(B?(Ce&U)===U:(l&U)===U){U!==0&&U===Al&&(nc=!0),V!==null&&(V=V.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var re=e,me=b;U=t;var Ge=a;switch(me.tag){case 1:if(re=me.payload,typeof re=="function"){Z=re.call(Ge,Z,U);break e}Z=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=me.payload,U=typeof re=="function"?re.call(Ge,Z,U):re,U==null)break e;Z=p({},Z,U);break e;case 2:un=!0}}U=b.callback,U!==null&&(e.flags|=64,B&&(e.flags|=8192),B=o.callbacks,B===null?o.callbacks=[U]:B.push(U))}else B={lane:U,tag:b.tag,payload:b.payload,callback:b.callback,next:null},V===null?(D=V=B,E=Z):V=V.next=B,h|=U;if(b=b.next,b===null){if(b=o.shared.pending,b===null)break;B=b,b=B.next,B.next=null,o.lastBaseUpdate=B,o.shared.pending=null}}while(!0);V===null&&(E=Z),o.baseState=E,o.firstBaseUpdate=D,o.lastBaseUpdate=V,c===null&&(o.shared.lanes=0),yn|=h,e.lanes=h,e.memoizedState=Z}}function Bf(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Hf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Bf(a[e],t)}var Dl=R(null),Zs=R(0);function qf(e,t){e=Fa,G(Zs,e),G(Dl,t),Fa=e|t.baseLanes}function lc(){G(Zs,Fa),G(Dl,Dl.current)}function rc(){Fa=Zs.current,q(Dl),q(Zs)}var Yt=R(null),ra=null;function mn(e){var t=e.alternate;G(Ie,Ie.current&1),G(Yt,e),ra===null&&(t===null||Dl.current!==null||t.memoizedState!==null)&&(ra=e)}function sc(e){G(Ie,Ie.current),G(Yt,e),ra===null&&(ra=e)}function Gf(e){e.tag===22?(G(Ie,Ie.current),G(Yt,e),ra===null&&(ra=e)):hn()}function hn(){G(Ie,Ie.current),G(Yt,Yt.current)}function Xt(e){q(Yt),ra===e&&(ra=null),q(Ie)}var Ie=R(0);function Js(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||fu(a)||mu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==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}var Ba=0,we=null,He=null,at=null,$s=!1,Ul=!1,In=!1,Is=0,Dr=0,Ll=null,rv=0;function Je(){throw Error(i(321))}function ic(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Qt(e[a],t[a]))return!1;return!0}function oc(e,t,a,l,o,c){return Ba=c,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Em:Nc,In=!1,c=a(l,o),In=!1,Ul&&(c=Vf(t,a,l,o)),Qf(e),c}function Qf(e){O.H=Br;var t=He!==null&&He.next!==null;if(Ba=0,at=He=we=null,$s=!1,Dr=0,Ll=null,t)throw Error(i(300));e===null||nt||(e=e.dependencies,e!==null&&Gs(e)&&(nt=!0))}function Vf(e,t,a,l){we=e;var o=0;do{if(Ul&&(Ll=null),Dr=0,Ul=!1,25<=o)throw Error(i(301));if(o+=1,at=He=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}O.H=jm,c=t(a,l)}while(Ul);return c}function sv(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?Ur(t):t,e=e.useState()[0],(He!==null?He.memoizedState:null)!==e&&(we.flags|=1024),t}function cc(){var e=Is!==0;return Is=0,e}function uc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function dc(e){if($s){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$s=!1}Ba=0,at=He=we=null,Ul=!1,Dr=Is=0,Ll=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?we.memoizedState=at=e:at=at.next=e,at}function Pe(){if(He===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=He.next;var t=at===null?we.memoizedState:at.next;if(t!==null)at=t,He=e;else{if(e===null)throw we.alternate===null?Error(i(467)):Error(i(310));He=e,e={memoizedState:He.memoizedState,baseState:He.baseState,baseQueue:He.baseQueue,queue:He.queue,next:null},at===null?we.memoizedState=at=e:at=at.next=e}return at}function Ps(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ur(e){var t=Dr;return Dr+=1,Ll===null&&(Ll=[]),e=zf(Ll,e,t),t=we,(at===null?t.memoizedState:at.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Em:Nc),e}function Ws(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ur(e);if(e.$$typeof===Y)return mt(e)}throw Error(i(438,String(e)))}function fc(e){var t=null,a=we.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=we.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ps(),we.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=Oe;return t.index++,a}function Ha(e,t){return typeof t=="function"?t(e):t}function ei(e){var t=Pe();return mc(t,He,e)}function mc(e,t,a){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=a;var o=e.baseQueue,c=l.pending;if(c!==null){if(o!==null){var h=o.next;o.next=c.next,c.next=h}t.baseQueue=o=c,l.pending=null}if(c=e.baseState,o===null)e.memoizedState=c;else{t=o.next;var b=h=null,E=null,D=t,V=!1;do{var Z=D.lane&-536870913;if(Z!==D.lane?(Ce&Z)===Z:(Ba&Z)===Z){var U=D.revertLane;if(U===0)E!==null&&(E=E.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Z===Al&&(V=!0);else if((Ba&U)===U){D=D.next,U===Al&&(V=!0);continue}else Z={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=Z,h=c):E=E.next=Z,we.lanes|=U,yn|=U;Z=D.action,In&&a(c,Z),c=D.hasEagerState?D.eagerState:a(c,Z)}else U={lane:Z,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},E===null?(b=E=U,h=c):E=E.next=U,we.lanes|=Z,yn|=Z;D=D.next}while(D!==null&&D!==t);if(E===null?h=c:E.next=b,!Qt(c,e.memoizedState)&&(nt=!0,V&&(a=Ol,a!==null)))throw a;e.memoizedState=c,e.baseState=h,e.baseQueue=E,l.lastRenderedState=c}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function hc(e){var t=Pe(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,c=t.memoizedState;if(o!==null){a.pending=null;var h=o=o.next;do c=e(c,h.action),h=h.next;while(h!==o);Qt(c,t.memoizedState)||(nt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,l]}function Yf(e,t,a){var l=we,o=Pe(),c=Ae;if(c){if(a===void 0)throw Error(i(407));a=a()}else a=t();var h=!Qt((He||o).memoizedState,a);if(h&&(o.memoizedState=a,nt=!0),o=o.queue,yc(Kf.bind(null,l,o,e),[e]),o.getSnapshot!==t||h||at!==null&&at.memoizedState.tag&1){if(l.flags|=2048,Bl(9,{destroy:void 0},Ff.bind(null,l,o,a,t),null),Qe===null)throw Error(i(349));c||(Ba&127)!==0||Xf(l,t,a)}return a}function Xf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=we.updateQueue,t===null?(t=Ps(),we.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ff(e,t,a,l){t.value=a,t.getSnapshot=l,Zf(t)&&Jf(e)}function Kf(e,t,a){return a(function(){Zf(t)&&Jf(e)})}function Zf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Qt(e,a)}catch{return!0}}function Jf(e){var t=Qn(e,2);t!==null&&Ut(t,e,2)}function pc(e){var t=jt();if(typeof e=="function"){var a=e;if(e=a(),In){ua(!0);try{a()}finally{ua(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ha,lastRenderedState:e},t}function $f(e,t,a,l){return e.baseState=a,mc(e,He,typeof l=="function"?l:Ha)}function iv(e,t,a,l,o){if(ni(e))throw Error(i(485));if(e=t.action,e!==null){var c={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){c.listeners.push(h)}};O.T!==null?a(!0):c.isTransition=!1,l(c),a=t.pending,a===null?(c.next=t.pending=c,If(t,c)):(c.next=a.next,t.pending=a.next=c)}}function If(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var c=O.T,h={};O.T=h;try{var b=a(o,l),E=O.S;E!==null&&E(h,b),Pf(e,t,b)}catch(D){gc(e,t,D)}finally{c!==null&&h.types!==null&&(c.types=h.types),O.T=c}}else try{c=a(o,l),Pf(e,t,c)}catch(D){gc(e,t,D)}}function Pf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Wf(e,t,l)},function(l){return gc(e,t,l)}):Wf(e,t,a)}function Wf(e,t,a){t.status="fulfilled",t.value=a,em(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,If(e,a)))}function gc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,em(t),t=t.next;while(t!==l)}e.action=null}function em(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function tm(e,t){return t}function am(e,t){if(Ae){var a=Qe.formState;if(a!==null){e:{var l=we;if(Ae){if(Ve){t:{for(var o=Ve,c=la;o.nodeType!==8;){if(!c){o=null;break t}if(o=sa(o.nextSibling),o===null){o=null;break t}}c=o.data,o=c==="F!"||c==="F"?o:null}if(o){Ve=sa(o.nextSibling),l=o.data==="F!";break e}}on(l)}l=!1}l&&(t=a[0])}}return a=jt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:tm,lastRenderedState:t},a.queue=l,a=Sm.bind(null,we,l),l.dispatch=a,l=pc(!1),c=wc.bind(null,we,!1,l.queue),l=jt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=iv.bind(null,we,o,c,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function nm(e){var t=Pe();return lm(t,He,e)}function lm(e,t,a){if(t=mc(e,t,tm)[0],e=ei(Ha)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ur(t)}catch(h){throw h===zl?Ys:h}else l=t;t=Pe();var o=t.queue,c=o.dispatch;return a!==t.memoizedState&&(we.flags|=2048,Bl(9,{destroy:void 0},ov.bind(null,o,a),null)),[l,c,e]}function ov(e,t){e.action=t}function rm(e){var t=Pe(),a=He;if(a!==null)return lm(t,a,e);Pe(),t=t.memoizedState,a=Pe();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Bl(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=we.updateQueue,t===null&&(t=Ps(),we.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function sm(){return Pe().memoizedState}function ti(e,t,a,l){var o=jt();we.flags|=e,o.memoizedState=Bl(1|t,{destroy:void 0},a,l===void 0?null:l)}function ai(e,t,a,l){var o=Pe();l=l===void 0?null:l;var c=o.memoizedState.inst;He!==null&&l!==null&&ic(l,He.memoizedState.deps)?o.memoizedState=Bl(t,c,a,l):(we.flags|=e,o.memoizedState=Bl(1|t,c,a,l))}function im(e,t){ti(8390656,8,e,t)}function yc(e,t){ai(2048,8,e,t)}function cv(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=Ps(),we.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function om(e){var t=Pe().memoizedState;return cv({ref:t,nextImpl:e}),function(){if((Ue&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function cm(e,t){return ai(4,2,e,t)}function um(e,t){return ai(4,4,e,t)}function dm(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 fm(e,t,a){a=a!=null?a.concat([e]):null,ai(4,4,dm.bind(null,t,e),a)}function xc(){}function mm(e,t){var a=Pe();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&ic(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function hm(e,t){var a=Pe();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&ic(t,l[1]))return l[0];if(l=e(),In){ua(!0);try{e()}finally{ua(!1)}}return a.memoizedState=[l,t],l}function vc(e,t,a){return a===void 0||(Ba&1073741824)!==0&&(Ce&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=ph(),we.lanes|=e,yn|=e,a)}function pm(e,t,a,l){return Qt(a,t)?a:Dl.current!==null?(e=vc(e,a,l),Qt(e,t)||(nt=!0),e):(Ba&42)===0||(Ba&1073741824)!==0&&(Ce&261930)===0?(nt=!0,e.memoizedState=a):(e=ph(),we.lanes|=e,yn|=e,t)}function gm(e,t,a,l,o){var c=J.p;J.p=c!==0&&8>c?c:8;var h=O.T,b={};O.T=b,wc(e,!1,t,a);try{var E=o(),D=O.S;if(D!==null&&D(b,E),E!==null&&typeof E=="object"&&typeof E.then=="function"){var V=lv(E,l);Lr(e,t,V,Zt(e))}else Lr(e,t,l,Zt(e))}catch(Z){Lr(e,t,{then:function(){},status:"rejected",reason:Z},Zt())}finally{J.p=c,h!==null&&b.types!==null&&(h.types=b.types),O.T=h}}function uv(){}function bc(e,t,a,l){if(e.tag!==5)throw Error(i(476));var o=ym(e).queue;gm(e,o,t,F,a===null?uv:function(){return xm(e),a(l)})}function ym(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ha,lastRenderedState:F},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ha,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xm(e){var t=ym(e);t.next===null&&(t=e.alternate.memoizedState),Lr(e,t.next.queue,{},Zt())}function Sc(){return mt(es)}function vm(){return Pe().memoizedState}function bm(){return Pe().memoizedState}function dv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Zt();e=dn(a);var l=fn(t,e,a);l!==null&&(Ut(l,t,a),Or(l,t,a)),t={cache:$o()},e.payload=t;return}t=t.return}}function fv(e,t,a){var l=Zt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ni(e)?wm(t,a):(a=Ho(e,t,a,l),a!==null&&(Ut(a,e,l),Nm(a,t,l)))}function Sm(e,t,a){var l=Zt();Lr(e,t,a,l)}function Lr(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ni(e))wm(t,o);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var h=t.lastRenderedState,b=c(h,a);if(o.hasEagerState=!0,o.eagerState=b,Qt(b,h))return Ls(e,t,o,0),Qe===null&&Us(),!1}catch{}if(a=Ho(e,t,o,l),a!==null)return Ut(a,e,l),Nm(a,t,l),!0}return!1}function wc(e,t,a,l){if(l={lane:2,revertLane:eu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ni(e)){if(t)throw Error(i(479))}else t=Ho(e,a,l,2),t!==null&&Ut(t,e,2)}function ni(e){var t=e.alternate;return e===we||t!==null&&t===we}function wm(e,t){Ul=$s=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Nm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Ct(e,a)}}var Br={readContext:mt,use:Ws,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};Br.useEffectEvent=Je;var Em={readContext:mt,use:Ws,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:im,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ti(4194308,4,dm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ti(4194308,4,e,t)},useInsertionEffect:function(e,t){ti(4,2,e,t)},useMemo:function(e,t){var a=jt();t=t===void 0?null:t;var l=e();if(In){ua(!0);try{e()}finally{ua(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=jt();if(a!==void 0){var o=a(t);if(In){ua(!0);try{a(t)}finally{ua(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=fv.bind(null,we,e),[l.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:function(e){e=pc(e);var t=e.queue,a=Sm.bind(null,we,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:xc,useDeferredValue:function(e,t){var a=jt();return vc(a,e,t)},useTransition:function(){var e=pc(!1);return e=gm.bind(null,we,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=we,o=jt();if(Ae){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),Qe===null)throw Error(i(349));(Ce&127)!==0||Xf(l,t,a)}o.memoizedState=a;var c={value:a,getSnapshot:t};return o.queue=c,im(Kf.bind(null,l,c,e),[e]),l.flags|=2048,Bl(9,{destroy:void 0},Ff.bind(null,l,c,a,t),null),a},useId:function(){var e=jt(),t=Qe.identifierPrefix;if(Ae){var a=wa,l=Sa;a=(l&~(1<<32-gt(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Is++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=rv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Sc,useFormState:am,useActionState:am,useOptimistic:function(e){var t=jt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=wc.bind(null,we,!0,a),a.dispatch=t,[e,t]},useMemoCache:fc,useCacheRefresh:function(){return jt().memoizedState=dv.bind(null,we)},useEffectEvent:function(e){var t=jt(),a={impl:e};return t.memoizedState=a,function(){if((Ue&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Nc={readContext:mt,use:Ws,useCallback:mm,useContext:mt,useEffect:yc,useImperativeHandle:fm,useInsertionEffect:cm,useLayoutEffect:um,useMemo:hm,useReducer:ei,useRef:sm,useState:function(){return ei(Ha)},useDebugValue:xc,useDeferredValue:function(e,t){var a=Pe();return pm(a,He.memoizedState,e,t)},useTransition:function(){var e=ei(Ha)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:Ur(e),t]},useSyncExternalStore:Yf,useId:vm,useHostTransitionStatus:Sc,useFormState:nm,useActionState:nm,useOptimistic:function(e,t){var a=Pe();return $f(a,He,e,t)},useMemoCache:fc,useCacheRefresh:bm};Nc.useEffectEvent=om;var jm={readContext:mt,use:Ws,useCallback:mm,useContext:mt,useEffect:yc,useImperativeHandle:fm,useInsertionEffect:cm,useLayoutEffect:um,useMemo:hm,useReducer:hc,useRef:sm,useState:function(){return hc(Ha)},useDebugValue:xc,useDeferredValue:function(e,t){var a=Pe();return He===null?vc(a,e,t):pm(a,He.memoizedState,e,t)},useTransition:function(){var e=hc(Ha)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:Ur(e),t]},useSyncExternalStore:Yf,useId:vm,useHostTransitionStatus:Sc,useFormState:rm,useActionState:rm,useOptimistic:function(e,t){var a=Pe();return He!==null?$f(a,He,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:fc,useCacheRefresh:bm};jm.useEffectEvent=om;function Ec(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var jc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Zt(),o=dn(l);o.payload=t,a!=null&&(o.callback=a),t=fn(e,o,l),t!==null&&(Ut(t,e,l),Or(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Zt(),o=dn(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=fn(e,o,l),t!==null&&(Ut(t,e,l),Or(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Zt(),l=dn(a);l.tag=2,t!=null&&(l.callback=t),t=fn(e,l,a),t!==null&&(Ut(t,e,a),Or(t,e,a))}};function Rm(e,t,a,l,o,c,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,h):t.prototype&&t.prototype.isPureReactComponent?!Er(a,l)||!Er(o,c):!0}function Tm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&jc.enqueueReplaceState(t,t.state,null)}function Pn(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function Cm(e){Ds(e)}function _m(e){console.error(e)}function Mm(e){Ds(e)}function li(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Am(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Rc(e,t,a){return a=dn(a),a.tag=3,a.payload={element:null},a.callback=function(){li(e,t)},a}function Om(e){return e=dn(e),e.tag=3,e}function zm(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var c=l.value;e.payload=function(){return o(c)},e.callback=function(){Am(t,a,l)}}var h=a.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){Am(t,a,l),typeof o!="function"&&(xn===null?xn=new Set([this]):xn.add(this));var b=l.stack;this.componentDidCatch(l.value,{componentStack:b!==null?b:""})})}function mv(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Ml(t,a,o,!0),a=Yt.current,a!==null){switch(a.tag){case 31:case 13:return ra===null?gi():a.alternate===null&&$e===0&&($e=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===Xs?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Ic(e,l,o)),!1;case 22:return a.flags|=65536,l===Xs?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Ic(e,l,o)),!1}throw Error(i(435,a.tag))}return Ic(e,l,o),gi(),!1}if(Ae)return t=Yt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==Xo&&(e=Error(i(422),{cause:l}),Tr(ta(e,a)))):(l!==Xo&&(t=Error(i(423),{cause:l}),Tr(ta(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=ta(l,a),o=Rc(e.stateNode,l,o),ac(e,o),$e!==4&&($e=2)),!1;var c=Error(i(520),{cause:l});if(c=ta(c,a),Fr===null?Fr=[c]:Fr.push(c),$e!==4&&($e=2),t===null)return!0;l=ta(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Rc(a.stateNode,l,e),ac(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(xn===null||!xn.has(c))))return a.flags|=65536,o&=-o,a.lanes|=o,o=Om(o),zm(o,e,a,l),ac(a,o),!1}a=a.return}while(a!==null);return!1}var Tc=Error(i(461)),nt=!1;function ht(e,t,a,l){t.child=e===null?Lf(t,null,a,l):$n(t,e.child,a,l)}function km(e,t,a,l,o){a=a.render;var c=t.ref;if("ref"in l){var h={};for(var b in l)b!=="ref"&&(h[b]=l[b])}else h=l;return Fn(t),l=oc(e,t,a,h,c,o),b=cc(),e!==null&&!nt?(uc(e,t,o),qa(e,t,o)):(Ae&&b&&Vo(t),t.flags|=1,ht(e,t,l,o),t.child)}function Dm(e,t,a,l,o){if(e===null){var c=a.type;return typeof c=="function"&&!qo(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,Um(e,t,c,l,o)):(e=Hs(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Dc(e,o)){var h=c.memoizedProps;if(a=a.compare,a=a!==null?a:Er,a(h,l)&&e.ref===t.ref)return qa(e,t,o)}return t.flags|=1,e=ka(c,l),e.ref=t.ref,e.return=t,t.child=e}function Um(e,t,a,l,o){if(e!==null){var c=e.memoizedProps;if(Er(c,l)&&e.ref===t.ref)if(nt=!1,t.pendingProps=l=c,Dc(e,o))(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,qa(e,t,o)}return Cc(e,t,a,l,o)}function Lm(e,t,a,l){var o=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~c}else l=0,t.child=null;return Bm(e,t,c,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vs(t,c!==null?c.cachePool:null),c!==null?qf(t,c):lc(),Gf(t);else return l=t.lanes=536870912,Bm(e,t,c!==null?c.baseLanes|a:a,a,l)}else c!==null?(Vs(t,c.cachePool),qf(t,c),hn(),t.memoizedState=null):(e!==null&&Vs(t,null),lc(),hn());return ht(e,t,o,a),t.child}function Hr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Bm(e,t,a,l,o){var c=Po();return c=c===null?null:{parent:tt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Vs(t,null),lc(),Gf(t),e!==null&&Ml(e,t,l,!0),t.childLanes=o,null}function ri(e,t){return t=ii({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Hm(e,t,a){return $n(t,e.child,null,a),e=ri(t,t.pendingProps),e.flags|=2,Xt(t),t.memoizedState=null,e}function hv(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(l.mode==="hidden")return e=ri(t,l),t.lanes=536870912,Hr(null,e);if(sc(t),(e=Ve)?(e=Ih(e,la),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rn!==null?{id:Sa,overflow:wa}:null,retryLane:536870912,hydrationErrors:null},a=wf(e),a.return=t,t.child=a,ft=t,Ve=null)):e=null,e===null)throw on(t);return t.lanes=536870912,null}return ri(t,l)}var c=e.memoizedState;if(c!==null){var h=c.dehydrated;if(sc(t),o)if(t.flags&256)t.flags&=-257,t=Hm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(nt||Ml(e,t,a,!1),o=(a&e.childLanes)!==0,nt||o){if(l=Qe,l!==null&&(h=_t(l,a),h!==0&&h!==c.retryLane))throw c.retryLane=h,Qn(e,h),Ut(l,e,h),Tc;gi(),t=Hm(e,t,a)}else e=c.treeContext,Ve=sa(h.nextSibling),ft=t,Ae=!0,sn=null,la=!1,e!==null&&jf(t,e),t=ri(t,l),t.flags|=4096;return t}return e=ka(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function si(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(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Cc(e,t,a,l,o){return Fn(t),a=oc(e,t,a,l,void 0,o),l=cc(),e!==null&&!nt?(uc(e,t,o),qa(e,t,o)):(Ae&&l&&Vo(t),t.flags|=1,ht(e,t,a,o),t.child)}function qm(e,t,a,l,o,c){return Fn(t),t.updateQueue=null,a=Vf(t,l,a,o),Qf(e),l=cc(),e!==null&&!nt?(uc(e,t,c),qa(e,t,c)):(Ae&&l&&Vo(t),t.flags|=1,ht(e,t,a,c),t.child)}function Gm(e,t,a,l,o){if(Fn(t),t.stateNode===null){var c=Rl,h=a.contextType;typeof h=="object"&&h!==null&&(c=mt(h)),c=new a(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=jc,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},ec(t),h=a.contextType,c.context=typeof h=="object"&&h!==null?mt(h):Rl,c.state=t.memoizedState,h=a.getDerivedStateFromProps,typeof h=="function"&&(Ec(t,a,h,l),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(h=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),h!==c.state&&jc.enqueueReplaceState(c,c.state,null),kr(t,l,c,o),zr(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var b=t.memoizedProps,E=Pn(a,b);c.props=E;var D=c.context,V=a.contextType;h=Rl,typeof V=="object"&&V!==null&&(h=mt(V));var Z=a.getDerivedStateFromProps;V=typeof Z=="function"||typeof c.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,V||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(b||D!==h)&&Tm(t,c,l,h),un=!1;var U=t.memoizedState;c.state=U,kr(t,l,c,o),zr(),D=t.memoizedState,b||U!==D||un?(typeof Z=="function"&&(Ec(t,a,Z,l),D=t.memoizedState),(E=un||Rm(t,a,E,l,U,D,h))?(V||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=D),c.props=l,c.state=D,c.context=h,l=E):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,tc(e,t),h=t.memoizedProps,V=Pn(a,h),c.props=V,Z=t.pendingProps,U=c.context,D=a.contextType,E=Rl,typeof D=="object"&&D!==null&&(E=mt(D)),b=a.getDerivedStateFromProps,(D=typeof b=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h!==Z||U!==E)&&Tm(t,c,l,E),un=!1,U=t.memoizedState,c.state=U,kr(t,l,c,o),zr();var B=t.memoizedState;h!==Z||U!==B||un||e!==null&&e.dependencies!==null&&Gs(e.dependencies)?(typeof b=="function"&&(Ec(t,a,b,l),B=t.memoizedState),(V=un||Rm(t,a,V,l,U,B,E)||e!==null&&e.dependencies!==null&&Gs(e.dependencies))?(D||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,B,E),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,B,E)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=B),c.props=l,c.state=B,c.context=E,l=V):(typeof c.componentDidUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,si(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=$n(t,e.child,null,o),t.child=$n(t,null,a,o)):ht(e,t,a,o),t.memoizedState=c.state,e=t.child):e=qa(e,t,o),e}function Qm(e,t,a,l){return Yn(),t.flags|=256,ht(e,t,a,l),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mc(e){return{baseLanes:e,cachePool:Af()}}function Ac(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Kt),e}function Vm(e,t,a){var l=t.pendingProps,o=!1,c=(t.flags&128)!==0,h;if((h=c)||(h=e!==null&&e.memoizedState===null?!1:(Ie.current&2)!==0),h&&(o=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(o?mn(t):hn(),(e=Ve)?(e=Ih(e,la),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rn!==null?{id:Sa,overflow:wa}:null,retryLane:536870912,hydrationErrors:null},a=wf(e),a.return=t,t.child=a,ft=t,Ve=null)):e=null,e===null)throw on(t);return mu(e)?t.lanes=32:t.lanes=536870912,null}var b=l.children;return l=l.fallback,o?(hn(),o=t.mode,b=ii({mode:"hidden",children:b},o),l=Vn(l,o,a,null),b.return=t,l.return=t,b.sibling=l,t.child=b,l=t.child,l.memoizedState=Mc(a),l.childLanes=Ac(e,h,a),t.memoizedState=_c,Hr(null,l)):(mn(t),Oc(t,b))}var E=e.memoizedState;if(E!==null&&(b=E.dehydrated,b!==null)){if(c)t.flags&256?(mn(t),t.flags&=-257,t=zc(e,t,a)):t.memoizedState!==null?(hn(),t.child=e.child,t.flags|=128,t=null):(hn(),b=l.fallback,o=t.mode,l=ii({mode:"visible",children:l.children},o),b=Vn(b,o,a,null),b.flags|=2,l.return=t,b.return=t,l.sibling=b,t.child=l,$n(t,e.child,null,a),l=t.child,l.memoizedState=Mc(a),l.childLanes=Ac(e,h,a),t.memoizedState=_c,t=Hr(null,l));else if(mn(t),mu(b)){if(h=b.nextSibling&&b.nextSibling.dataset,h)var D=h.dgst;h=D,l=Error(i(419)),l.stack="",l.digest=h,Tr({value:l,source:null,stack:null}),t=zc(e,t,a)}else if(nt||Ml(e,t,a,!1),h=(a&e.childLanes)!==0,nt||h){if(h=Qe,h!==null&&(l=_t(h,a),l!==0&&l!==E.retryLane))throw E.retryLane=l,Qn(e,l),Ut(h,e,l),Tc;fu(b)||gi(),t=zc(e,t,a)}else fu(b)?(t.flags|=192,t.child=e.child,t=null):(e=E.treeContext,Ve=sa(b.nextSibling),ft=t,Ae=!0,sn=null,la=!1,e!==null&&jf(t,e),t=Oc(t,l.children),t.flags|=4096);return t}return o?(hn(),b=l.fallback,o=t.mode,E=e.child,D=E.sibling,l=ka(E,{mode:"hidden",children:l.children}),l.subtreeFlags=E.subtreeFlags&65011712,D!==null?b=ka(D,b):(b=Vn(b,o,a,null),b.flags|=2),b.return=t,l.return=t,l.sibling=b,t.child=l,Hr(null,l),l=t.child,b=e.child.memoizedState,b===null?b=Mc(a):(o=b.cachePool,o!==null?(E=tt._currentValue,o=o.parent!==E?{parent:E,pool:E}:o):o=Af(),b={baseLanes:b.baseLanes|a,cachePool:o}),l.memoizedState=b,l.childLanes=Ac(e,h,a),t.memoizedState=_c,Hr(e.child,l)):(mn(t),a=e.child,e=a.sibling,a=ka(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=a,t.memoizedState=null,a)}function Oc(e,t){return t=ii({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ii(e,t){return e=Vt(22,e,null,t),e.lanes=0,e}function zc(e,t,a){return $n(t,e.child,null,a),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ym(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Zo(e.return,t,a)}function kc(e,t,a,l,o,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:c}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=l,h.tail=a,h.tailMode=o,h.treeForkCount=c)}function Xm(e,t,a){var l=t.pendingProps,o=l.revealOrder,c=l.tail;l=l.children;var h=Ie.current,b=(h&2)!==0;if(b?(h=h&1|2,t.flags|=128):h&=1,G(Ie,h),ht(e,t,l,a),l=Ae?Rr:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ym(e,a,t);else if(e.tag===19)Ym(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}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&Js(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),kc(t,!1,o,a,c,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Js(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}kc(t,!0,a,null,c,l);break;case"together":kc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function qa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),yn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ml(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=ka(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ka(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Dc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Gs(e)))}function pv(e,t,a){switch(t.tag){case 3:be(t,t.stateNode.containerInfo),cn(t,tt,e.memoizedState.cache),Yn();break;case 27:case 5:bt(t);break;case 4:be(t,t.stateNode.containerInfo);break;case 10:cn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,sc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(mn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Vm(e,t,a):(mn(t),e=qa(e,t,a),e!==null?e.sibling:null);mn(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Ml(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Xm(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),G(Ie,Ie.current),l)break;return null;case 22:return t.lanes=0,Lm(e,t,a,t.pendingProps);case 24:cn(t,tt,e.memoizedState.cache)}return qa(e,t,a)}function Fm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)nt=!0;else{if(!Dc(e,a)&&(t.flags&128)===0)return nt=!1,pv(e,t,a);nt=(e.flags&131072)!==0}else nt=!1,Ae&&(t.flags&1048576)!==0&&Ef(t,Rr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Zn(t.elementType),t.type=e,typeof e=="function")qo(e)?(l=Pn(e,l),t.tag=1,t=Gm(null,t,e,l,a)):(t.tag=0,t=Cc(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===L){t.tag=11,t=km(null,t,e,l,a);break e}else if(o===W){t.tag=14,t=Dm(null,t,e,l,a);break e}}throw t=ce(e)||e,Error(i(306,t,""))}}return t;case 0:return Cc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=Pn(l,t.pendingProps),Gm(e,t,l,o,a);case 3:e:{if(be(t,t.stateNode.containerInfo),e===null)throw Error(i(387));l=t.pendingProps;var c=t.memoizedState;o=c.element,tc(e,t),kr(t,l,null,a);var h=t.memoizedState;if(l=h.cache,cn(t,tt,l),l!==c.cache&&Jo(t,[tt],a,!0),zr(),l=h.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Qm(e,t,l,a);break e}else if(l!==o){o=ta(Error(i(424)),t),Tr(o),t=Qm(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ve=sa(e.firstChild),ft=t,Ae=!0,sn=null,la=!0,a=Lf(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Yn(),l===o){t=qa(e,t,a);break e}ht(e,t,l,a)}t=t.child}return t;case 26:return si(e,t),e===null?(a=np(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ae||(a=t.type,e=t.pendingProps,l=Ni(fe.current).createElement(a),l[dt]=t,l[Mt]=e,pt(l,a,e),ct(l),t.stateNode=l):t.memoizedState=np(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return bt(t),e===null&&Ae&&(l=t.stateNode=ep(t.type,t.pendingProps,fe.current),ft=t,la=!0,o=Ve,wn(t.type)?(hu=o,Ve=sa(l.firstChild)):Ve=o),ht(e,t,t.pendingProps.children,a),si(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((o=l=Ve)&&(l=Xv(l,t.type,t.pendingProps,la),l!==null?(t.stateNode=l,ft=t,Ve=sa(l.firstChild),la=!1,o=!0):o=!1),o||on(t)),bt(t),o=t.type,c=t.pendingProps,h=e!==null?e.memoizedProps:null,l=c.children,cu(o,c)?l=null:h!==null&&cu(o,h)&&(t.flags|=32),t.memoizedState!==null&&(o=oc(e,t,sv,null,null,a),es._currentValue=o),si(e,t),ht(e,t,l,a),t.child;case 6:return e===null&&Ae&&((e=a=Ve)&&(a=Fv(a,t.pendingProps,la),a!==null?(t.stateNode=a,ft=t,Ve=null,e=!0):e=!1),e||on(t)),null;case 13:return Vm(e,t,a);case 4:return be(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=$n(t,null,l,a):ht(e,t,l,a),t.child;case 11:return km(e,t,t.type,t.pendingProps,a);case 7:return ht(e,t,t.pendingProps,a),t.child;case 8:return ht(e,t,t.pendingProps.children,a),t.child;case 12:return ht(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,cn(t,t.type,l.value),ht(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,Fn(t),o=mt(o),l=l(o),t.flags|=1,ht(e,t,l,a),t.child;case 14:return Dm(e,t,t.type,t.pendingProps,a);case 15:return Um(e,t,t.type,t.pendingProps,a);case 19:return Xm(e,t,a);case 31:return hv(e,t,a);case 22:return Lm(e,t,a,t.pendingProps);case 24:return Fn(t),l=mt(tt),e===null?(o=Po(),o===null&&(o=Qe,c=$o(),o.pooledCache=c,c.refCount++,c!==null&&(o.pooledCacheLanes|=a),o=c),t.memoizedState={parent:l,cache:o},ec(t),cn(t,tt,o)):((e.lanes&a)!==0&&(tc(e,t),kr(t,null,null,a),zr()),o=e.memoizedState,c=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),cn(t,tt,l)):(l=c.cache,cn(t,tt,l),l!==o.cache&&Jo(t,[tt],a,!0))),ht(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ga(e){e.flags|=4}function Uc(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(vh())e.flags|=8192;else throw Jn=Xs,Wo}else e.flags&=-16777217}function Km(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!op(t))if(vh())e.flags|=8192;else throw Jn=Xs,Wo}function oi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yt():536870912,e.lanes|=t,Ql|=t)}function qr(e,t){if(!Ae)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 l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function gv(e,t,a){var l=t.pendingProps;switch(Yo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),La(tt),ze(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(_l(t)?Ga(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fo())),Ye(t),null;case 26:var o=t.type,c=t.memoizedState;return e===null?(Ga(t),c!==null?(Ye(t),Km(t,c)):(Ye(t),Uc(t,o,null,l,a))):c?c!==e.memoizedState?(Ga(t),Ye(t),Km(t,c)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ga(t),Ye(t),Uc(t,o,e,l,a)),null;case 27:if(qt(t),a=fe.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ga(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return Ye(t),null}e=$.current,_l(t)?Rf(t):(e=ep(o,l,a),t.stateNode=e,Ga(t))}return Ye(t),null;case 5:if(qt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ga(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return Ye(t),null}if(c=$.current,_l(t))Rf(t);else{var h=Ni(fe.current);switch(c){case 1:c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":c=h.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":c=h.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":c=h.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?h.createElement("select",{is:l.is}):h.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?h.createElement(o,{is:l.is}):h.createElement(o)}}c[dt]=t,c[Mt]=l;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)c.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=c;e:switch(pt(c,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ga(t)}}return Ye(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ga(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(e=fe.current,_l(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=ft,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[dt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Vh(e.nodeValue,a)),e||on(t,!0)}else e=Ni(e).createTextNode(l),e[dt]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=_l(t),a!==null){if(e===null){if(!l)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[dt]=t}else Yn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=Fo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Xt(t),t):(Xt(t),null);if((t.flags&128)!==0)throw Error(i(558))}return Ye(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=_l(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(i(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));o[dt]=t}else Yn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),o=!1}else o=Fo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(Xt(t),t):(Xt(t),null)}return Xt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),oi(t,t.updateQueue),Ye(t),null);case 4:return ze(),e===null&&lu(t.stateNode.containerInfo),Ye(t),null;case 10:return La(t.type),Ye(t),null;case 19:if(q(Ie),l=t.memoizedState,l===null)return Ye(t),null;if(o=(t.flags&128)!==0,c=l.rendering,c===null)if(o)qr(l,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Js(e),c!==null){for(t.flags|=128,qr(l,!1),e=c.updateQueue,t.updateQueue=e,oi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Sf(a,e),a=a.sibling;return G(Ie,Ie.current&1|2),Ae&&Da(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Nt()>mi&&(t.flags|=128,o=!0,qr(l,!1),t.lanes=4194304)}else{if(!o)if(e=Js(c),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,oi(t,e),qr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!Ae)return Ye(t),null}else 2*Nt()-l.renderingStartTime>mi&&a!==536870912&&(t.flags|=128,o=!0,qr(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Nt(),e.sibling=null,a=Ie.current,G(Ie,o?a&1|2:a&1),Ae&&Da(t,l.treeForkCount),e):(Ye(t),null);case 22:case 23:return Xt(t),rc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&oi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&q(Kn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),La(tt),Ye(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function yv(e,t){switch(Yo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return La(tt),ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return qt(t),null;case 31:if(t.memoizedState!==null){if(Xt(t),t.alternate===null)throw Error(i(340));Yn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Xt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Yn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(Ie),null;case 4:return ze(),null;case 10:return La(t.type),null;case 22:case 23:return Xt(t),rc(),e!==null&&q(Kn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return La(tt),null;case 25:return null;default:return null}}function Zm(e,t){switch(Yo(t),t.tag){case 3:La(tt),ze();break;case 26:case 27:case 5:qt(t);break;case 4:ze();break;case 31:t.memoizedState!==null&&Xt(t);break;case 13:Xt(t);break;case 19:q(Ie);break;case 10:La(t.type);break;case 22:case 23:Xt(t),rc(),e!==null&&q(Kn);break;case 24:La(tt)}}function Gr(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var c=a.create,h=a.inst;l=c(),h.destroy=l}a=a.next}while(a!==o)}}catch(b){Be(t,t.return,b)}}function pn(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){var h=l.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,o=t;var E=a,D=b;try{D()}catch(V){Be(o,E,V)}}}l=l.next}while(l!==c)}}catch(V){Be(t,t.return,V)}}function Jm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Hf(t,a)}catch(l){Be(e,e.return,l)}}}function $m(e,t,a){a.props=Pn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Be(e,t,l)}}function Qr(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){Be(e,t,o)}}function Na(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){Be(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){Be(e,t,o)}else a.current=null}function Im(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){Be(e,e.return,o)}}function Lc(e,t,a){try{var l=e.stateNode;Hv(l,e.type,a,t),l[Mt]=t}catch(o){Be(e,e.return,o)}}function Pm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&wn(e.type)||e.tag===4}function Bc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pm(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&&wn(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 Hc(e,t,a){var l=e.tag;if(l===5||l===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=Oa));else if(l!==4&&(l===27&&wn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Hc(e,t,a),e=e.sibling;e!==null;)Hc(e,t,a),e=e.sibling}function ci(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&wn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ci(e,t,a),e=e.sibling;e!==null;)ci(e,t,a),e=e.sibling}function Wm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);pt(t,l,a),t[dt]=e,t[Mt]=a}catch(c){Be(e,e.return,c)}}var Qa=!1,lt=!1,qc=!1,eh=typeof WeakSet=="function"?WeakSet:Set,ut=null;function xv(e,t){if(e=e.containerInfo,iu=Mi,e=ff(e),zo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var h=0,b=-1,E=-1,D=0,V=0,Z=e,U=null;t:for(;;){for(var B;Z!==a||o!==0&&Z.nodeType!==3||(b=h+o),Z!==c||l!==0&&Z.nodeType!==3||(E=h+l),Z.nodeType===3&&(h+=Z.nodeValue.length),(B=Z.firstChild)!==null;)U=Z,Z=B;for(;;){if(Z===e)break t;if(U===a&&++D===o&&(b=h),U===c&&++V===l&&(E=h),(B=Z.nextSibling)!==null)break;Z=U,U=Z.parentNode}Z=B}a=b===-1||E===-1?null:{start:b,end:E}}else a=null}a=a||{start:0,end:0}}else a=null;for(ou={focusedElem:e,selectionRange:a},Mi=!1,ut=t;ut!==null;)if(t=ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ut=e;else for(;ut!==null;){switch(t=ut,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,o=c.memoizedProps,c=c.memoizedState,l=a.stateNode;try{var re=Pn(a.type,o);e=l.getSnapshotBeforeUpdate(re,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(me){Be(a,a.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)du(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":du(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(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ut=e;break}ut=t.return}}function th(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Ya(e,a),l&4&&Gr(5,a);break;case 1:if(Ya(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(h){Be(a,a.return,h)}else{var o=Pn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Be(a,a.return,h)}}l&64&&Jm(a),l&512&&Qr(a,a.return);break;case 3:if(Ya(e,a),l&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{Hf(e,t)}catch(h){Be(a,a.return,h)}}break;case 27:t===null&&l&4&&Wm(a);case 26:case 5:Ya(e,a),t===null&&l&4&&Im(a),l&512&&Qr(a,a.return);break;case 12:Ya(e,a);break;case 31:Ya(e,a),l&4&&lh(e,a);break;case 13:Ya(e,a),l&4&&rh(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Tv.bind(null,a),Kv(e,a))));break;case 22:if(l=a.memoizedState!==null||Qa,!l){t=t!==null&&t.memoizedState!==null||lt,o=Qa;var c=lt;Qa=l,(lt=t)&&!c?Xa(e,a,(a.subtreeFlags&8772)!==0):Ya(e,a),Qa=o,lt=c}break;case 30:break;default:Ya(e,a)}}function ah(e){var t=e.alternate;t!==null&&(e.alternate=null,ah(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&go(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 Fe=null,Ot=!1;function Va(e,t,a){for(a=a.child;a!==null;)nh(e,t,a),a=a.sibling}function nh(e,t,a){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(Dn,a)}catch{}switch(a.tag){case 26:lt||Na(a,t),Va(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:lt||Na(a,t);var l=Fe,o=Ot;wn(a.type)&&(Fe=a.stateNode,Ot=!1),Va(e,t,a),Ir(a.stateNode),Fe=l,Ot=o;break;case 5:lt||Na(a,t);case 6:if(l=Fe,o=Ot,Fe=null,Va(e,t,a),Fe=l,Ot=o,Fe!==null)if(Ot)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(a.stateNode)}catch(c){Be(a,t,c)}else try{Fe.removeChild(a.stateNode)}catch(c){Be(a,t,c)}break;case 18:Fe!==null&&(Ot?(e=Fe,Jh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),$l(e)):Jh(Fe,a.stateNode));break;case 4:l=Fe,o=Ot,Fe=a.stateNode.containerInfo,Ot=!0,Va(e,t,a),Fe=l,Ot=o;break;case 0:case 11:case 14:case 15:pn(2,a,t),lt||pn(4,a,t),Va(e,t,a);break;case 1:lt||(Na(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&$m(a,t,l)),Va(e,t,a);break;case 21:Va(e,t,a);break;case 22:lt=(l=lt)||a.memoizedState!==null,Va(e,t,a),lt=l;break;default:Va(e,t,a)}}function lh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{$l(e)}catch(a){Be(t,t.return,a)}}}function rh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{$l(e)}catch(a){Be(t,t.return,a)}}function vv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new eh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new eh),t;default:throw Error(i(435,e.tag))}}function ui(e,t){var a=vv(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=Cv.bind(null,e,l);l.then(o,o)}})}function zt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],c=e,h=t,b=h;e:for(;b!==null;){switch(b.tag){case 27:if(wn(b.type)){Fe=b.stateNode,Ot=!1;break e}break;case 5:Fe=b.stateNode,Ot=!1;break e;case 3:case 4:Fe=b.stateNode.containerInfo,Ot=!0;break e}b=b.return}if(Fe===null)throw Error(i(160));nh(c,h,o),Fe=null,Ot=!1,c=o.alternate,c!==null&&(c.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)sh(t,e),t=t.sibling}var ma=null;function sh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:zt(t,e),kt(e),l&4&&(pn(3,e,e.return),Gr(3,e),pn(5,e,e.return));break;case 1:zt(t,e),kt(e),l&512&&(lt||a===null||Na(a,a.return)),l&64&&Qa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=ma;if(zt(t,e),kt(e),l&512&&(lt||a===null||Na(a,a.return)),l&4){var c=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":c=o.getElementsByTagName("title")[0],(!c||c[pr]||c[dt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=o.createElement(l),o.head.insertBefore(c,o.querySelector("head > title"))),pt(c,l,a),c[dt]=e,ct(c),l=c;break e;case"link":var h=sp("link","href",o).get(l+(a.href||""));if(h){for(var b=0;b<h.length;b++)if(c=h[b],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(b,1);break t}}c=o.createElement(l),pt(c,l,a),o.head.appendChild(c);break;case"meta":if(h=sp("meta","content",o).get(l+(a.content||""))){for(b=0;b<h.length;b++)if(c=h[b],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){h.splice(b,1);break t}}c=o.createElement(l),pt(c,l,a),o.head.appendChild(c);break;default:throw Error(i(468,l))}c[dt]=e,ct(c),l=c}e.stateNode=l}else ip(o,e.type,e.stateNode);else e.stateNode=rp(o,l,e.memoizedProps);else c!==l?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,l===null?ip(o,e.type,e.stateNode):rp(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Lc(e,e.memoizedProps,a.memoizedProps)}break;case 27:zt(t,e),kt(e),l&512&&(lt||a===null||Na(a,a.return)),a!==null&&l&4&&Lc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(zt(t,e),kt(e),l&512&&(lt||a===null||Na(a,a.return)),e.flags&32){o=e.stateNode;try{vl(o,"")}catch(re){Be(e,e.return,re)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,Lc(e,o,a!==null?a.memoizedProps:o)),l&1024&&(qc=!0);break;case 6:if(zt(t,e),kt(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(re){Be(e,e.return,re)}}break;case 3:if(Ri=null,o=ma,ma=Ei(t.containerInfo),zt(t,e),ma=o,kt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{$l(t.containerInfo)}catch(re){Be(e,e.return,re)}qc&&(qc=!1,ih(e));break;case 4:l=ma,ma=Ei(e.stateNode.containerInfo),zt(t,e),kt(e),ma=l;break;case 12:zt(t,e),kt(e);break;case 31:zt(t,e),kt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ui(e,l)));break;case 13:zt(t,e),kt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(fi=Nt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ui(e,l)));break;case 22:o=e.memoizedState!==null;var E=a!==null&&a.memoizedState!==null,D=Qa,V=lt;if(Qa=D||o,lt=V||E,zt(t,e),lt=V,Qa=D,kt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||E||Qa||lt||Wn(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){E=a=t;try{if(c=E.stateNode,o)h=c.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{b=E.stateNode;var Z=E.memoizedProps.style,U=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;b.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(re){Be(E,E.return,re)}}}else if(t.tag===6){if(a===null){E=t;try{E.stateNode.nodeValue=o?"":E.memoizedProps}catch(re){Be(E,E.return,re)}}}else if(t.tag===18){if(a===null){E=t;try{var B=E.stateNode;o?$h(B,!0):$h(E.stateNode,!1)}catch(re){Be(E,E.return,re)}}}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}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,ui(e,a))));break;case 19:zt(t,e),kt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ui(e,l)));break;case 30:break;case 21:break;default:zt(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Pm(l)){a=l;break}l=l.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var o=a.stateNode,c=Bc(e);ci(e,c,o);break;case 5:var h=a.stateNode;a.flags&32&&(vl(h,""),a.flags&=-33);var b=Bc(e);ci(e,b,h);break;case 3:case 4:var E=a.stateNode.containerInfo,D=Bc(e);Hc(e,D,E);break;default:throw Error(i(161))}}catch(V){Be(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ih(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ih(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ya(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)th(e,t.alternate,t),t=t.sibling}function Wn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:pn(4,t,t.return),Wn(t);break;case 1:Na(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&$m(t,t.return,a),Wn(t);break;case 27:Ir(t.stateNode);case 26:case 5:Na(t,t.return),Wn(t);break;case 22:t.memoizedState===null&&Wn(t);break;case 30:Wn(t);break;default:Wn(t)}e=e.sibling}}function Xa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,c=t,h=c.flags;switch(c.tag){case 0:case 11:case 15:Xa(o,c,a),Gr(4,c);break;case 1:if(Xa(o,c,a),l=c,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(D){Be(l,l.return,D)}if(l=c,o=l.updateQueue,o!==null){var b=l.stateNode;try{var E=o.shared.hiddenCallbacks;if(E!==null)for(o.shared.hiddenCallbacks=null,o=0;o<E.length;o++)Bf(E[o],b)}catch(D){Be(l,l.return,D)}}a&&h&64&&Jm(c),Qr(c,c.return);break;case 27:Wm(c);case 26:case 5:Xa(o,c,a),a&&l===null&&h&4&&Im(c),Qr(c,c.return);break;case 12:Xa(o,c,a);break;case 31:Xa(o,c,a),a&&h&4&&lh(o,c);break;case 13:Xa(o,c,a),a&&h&4&&rh(o,c);break;case 22:c.memoizedState===null&&Xa(o,c,a),Qr(c,c.return);break;case 30:break;default:Xa(o,c,a)}t=t.sibling}}function Gc(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&&Cr(a))}function Qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e))}function ha(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)oh(e,t,a,l),t=t.sibling}function oh(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:ha(e,t,a,l),o&2048&&Gr(9,t);break;case 1:ha(e,t,a,l);break;case 3:ha(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e)));break;case 12:if(o&2048){ha(e,t,a,l),e=t.stateNode;try{var c=t.memoizedProps,h=c.id,b=c.onPostCommit;typeof b=="function"&&b(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(E){Be(t,t.return,E)}}else ha(e,t,a,l);break;case 31:ha(e,t,a,l);break;case 13:ha(e,t,a,l);break;case 23:break;case 22:c=t.stateNode,h=t.alternate,t.memoizedState!==null?c._visibility&2?ha(e,t,a,l):Vr(e,t):c._visibility&2?ha(e,t,a,l):(c._visibility|=2,Hl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Gc(h,t);break;case 24:ha(e,t,a,l),o&2048&&Qc(t.alternate,t);break;default:ha(e,t,a,l)}}function Hl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,h=t,b=a,E=l,D=h.flags;switch(h.tag){case 0:case 11:case 15:Hl(c,h,b,E,o),Gr(8,h);break;case 23:break;case 22:var V=h.stateNode;h.memoizedState!==null?V._visibility&2?Hl(c,h,b,E,o):Vr(c,h):(V._visibility|=2,Hl(c,h,b,E,o)),o&&D&2048&&Gc(h.alternate,h);break;case 24:Hl(c,h,b,E,o),o&&D&2048&&Qc(h.alternate,h);break;default:Hl(c,h,b,E,o)}t=t.sibling}}function Vr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:Vr(a,l),o&2048&&Gc(l.alternate,l);break;case 24:Vr(a,l),o&2048&&Qc(l.alternate,l);break;default:Vr(a,l)}t=t.sibling}}var Yr=8192;function ql(e,t,a){if(e.subtreeFlags&Yr)for(e=e.child;e!==null;)ch(e,t,a),e=e.sibling}function ch(e,t,a){switch(e.tag){case 26:ql(e,t,a),e.flags&Yr&&e.memoizedState!==null&&r0(a,ma,e.memoizedState,e.memoizedProps);break;case 5:ql(e,t,a);break;case 3:case 4:var l=ma;ma=Ei(e.stateNode.containerInfo),ql(e,t,a),ma=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Yr,Yr=16777216,ql(e,t,a),Yr=l):ql(e,t,a));break;default:ql(e,t,a)}}function uh(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 Xr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ut=l,fh(l,e)}uh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)dh(e),e=e.sibling}function dh(e){switch(e.tag){case 0:case 11:case 15:Xr(e),e.flags&2048&&pn(9,e,e.return);break;case 3:Xr(e);break;case 12:Xr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,di(e)):Xr(e);break;default:Xr(e)}}function di(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];ut=l,fh(l,e)}uh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pn(8,t,t.return),di(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,di(t));break;default:di(t)}e=e.sibling}}function fh(e,t){for(;ut!==null;){var a=ut;switch(a.tag){case 0:case 11:case 15:pn(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Cr(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ut=l;else e:for(a=e;ut!==null;){l=ut;var o=l.sibling,c=l.return;if(ah(l),l===a){ut=null;break e}if(o!==null){o.return=c,ut=o;break e}ut=c}}}var bv={getCacheForType:function(e){var t=mt(tt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return mt(tt).controller.signal}},Sv=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Qe=null,Re=null,Ce=0,Le=0,Ft=null,gn=!1,Gl=!1,Vc=!1,Fa=0,$e=0,yn=0,el=0,Yc=0,Kt=0,Ql=0,Fr=null,Dt=null,Xc=!1,fi=0,mh=0,mi=1/0,hi=null,xn=null,rt=0,vn=null,Vl=null,Ka=0,Fc=0,Kc=null,hh=null,Kr=0,Zc=null;function Zt(){return(Ue&2)!==0&&Ce!==0?Ce&-Ce:O.T!==null?eu():ho()}function ph(){if(Kt===0)if((Ce&536870912)===0||Ae){var e=dl;dl<<=1,(dl&3932160)===0&&(dl=262144),Kt=e}else Kt=536870912;return e=Yt.current,e!==null&&(e.flags|=32),Kt}function Ut(e,t,a){(e===Qe&&(Le===2||Le===9)||e.cancelPendingCommit!==null)&&(Yl(e,0),bn(e,Ce,Kt,!1)),Ze(e,a),((Ue&2)===0||e!==Qe)&&(e===Qe&&((Ue&2)===0&&(el|=a),$e===4&&bn(e,Ce,Kt,!1)),Ea(e))}function gh(e,t,a){if((Ue&6)!==0)throw Error(i(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Xe(e,t),o=l?Ev(e,t):$c(e,t,!0),c=l;do{if(o===0){Gl&&!l&&bn(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!wv(a)){o=$c(e,t,!1),c=!1;continue}if(o===2){if(c=t,e.errorRecoveryDisabledLanes&c)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var b=e;o=Fr;var E=b.current.memoizedState.isDehydrated;if(E&&(Yl(b,h).flags|=256),h=$c(b,h,!1),h!==2){if(Vc&&!E){b.errorRecoveryDisabledLanes|=c,el|=c,o=4;break e}c=Dt,Dt=o,c!==null&&(Dt===null?Dt=c:Dt.push.apply(Dt,c))}o=h}if(c=!1,o!==2)continue}}if(o===1){Yl(e,0),bn(e,t,0,!0);break}e:{switch(l=e,c=o,c){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:bn(l,t,Kt,!gn);break e;case 2:Dt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(o=fi+300-Nt(),10<o)){if(bn(l,t,Kt,!gn),ye(l,0,!0)!==0)break e;Ka=t,l.timeoutHandle=Kh(yh.bind(null,l,a,Dt,hi,Xc,t,Kt,el,Ql,gn,c,"Throttled",-0,0),o);break e}yh(l,a,Dt,hi,Xc,t,Kt,el,Ql,gn,c,null,-0,0)}}break}while(!0);Ea(e)}function yh(e,t,a,l,o,c,h,b,E,D,V,Z,U,B){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Oa},ch(t,c,Z);var re=(c&62914560)===c?fi-Nt():(c&4194048)===c?mh-Nt():0;if(re=s0(Z,re),re!==null){Ka=c,e.cancelPendingCommit=re(jh.bind(null,e,t,c,a,l,o,h,b,E,V,Z,null,U,B)),bn(e,c,h,!D);return}}jh(e,t,c,a,l,o,h,b,E)}function wv(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 l=0;l<a.length;l++){var o=a[l],c=o.getSnapshot;o=o.value;try{if(!Qt(c(),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 bn(e,t,a,l){t&=~Yc,t&=~el,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var c=31-gt(o),h=1<<c;l[c]=-1,o&=~h}a!==0&&Ln(e,a,t)}function pi(){return(Ue&6)===0?(Zr(0),!1):!0}function Jc(){if(Re!==null){if(Le===0)var e=Re.return;else e=Re,Ua=Xn=null,dc(e),kl=null,Mr=0,e=Re;for(;e!==null;)Zm(e.alternate,e),e=e.return;Re=null}}function Yl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Qv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ka=0,Jc(),Qe=e,Re=a=ka(e.current,null),Ce=t,Le=0,Ft=null,gn=!1,Gl=Xe(e,t),Vc=!1,Ql=Kt=Yc=el=yn=$e=0,Dt=Fr=null,Xc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-gt(l),c=1<<o;t|=e[o],l&=~c}return Fa=t,Us(),a}function xh(e,t){we=null,O.H=Br,t===zl||t===Ys?(t=kf(),Le=3):t===Wo?(t=kf(),Le=4):Le=t===Tc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ft=t,Re===null&&($e=1,li(e,ta(t,e.current)))}function vh(){var e=Yt.current;return e===null?!0:(Ce&4194048)===Ce?ra===null:(Ce&62914560)===Ce||(Ce&536870912)!==0?e===ra:!1}function bh(){var e=O.H;return O.H=Br,e===null?Br:e}function Sh(){var e=O.A;return O.A=bv,e}function gi(){$e=4,gn||(Ce&4194048)!==Ce&&Yt.current!==null||(Gl=!0),(yn&134217727)===0&&(el&134217727)===0||Qe===null||bn(Qe,Ce,Kt,!1)}function $c(e,t,a){var l=Ue;Ue|=2;var o=bh(),c=Sh();(Qe!==e||Ce!==t)&&(hi=null,Yl(e,t)),t=!1;var h=$e;e:do try{if(Le!==0&&Re!==null){var b=Re,E=Ft;switch(Le){case 8:Jc(),h=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&&(t=!0);var D=Le;if(Le=0,Ft=null,Xl(e,b,E,D),a&&Gl){h=0;break e}break;default:D=Le,Le=0,Ft=null,Xl(e,b,E,D)}}Nv(),h=$e;break}catch(V){xh(e,V)}while(!0);return t&&e.shellSuspendCounter++,Ua=Xn=null,Ue=l,O.H=o,O.A=c,Re===null&&(Qe=null,Ce=0,Us()),h}function Nv(){for(;Re!==null;)wh(Re)}function Ev(e,t){var a=Ue;Ue|=2;var l=bh(),o=Sh();Qe!==e||Ce!==t?(hi=null,mi=Nt()+500,Yl(e,t)):Gl=Xe(e,t);e:do try{if(Le!==0&&Re!==null){t=Re;var c=Ft;t:switch(Le){case 1:Le=0,Ft=null,Xl(e,t,c,1);break;case 2:case 9:if(Of(c)){Le=0,Ft=null,Nh(t);break}t=function(){Le!==2&&Le!==9||Qe!==e||(Le=7),Ea(e)},c.then(t,t);break e;case 3:Le=7;break e;case 4:Le=5;break e;case 7:Of(c)?(Le=0,Ft=null,Nh(t)):(Le=0,Ft=null,Xl(e,t,c,7));break;case 5:var h=null;switch(Re.tag){case 26:h=Re.memoizedState;case 5:case 27:var b=Re;if(h?op(h):b.stateNode.complete){Le=0,Ft=null;var E=b.sibling;if(E!==null)Re=E;else{var D=b.return;D!==null?(Re=D,yi(D)):Re=null}break t}}Le=0,Ft=null,Xl(e,t,c,5);break;case 6:Le=0,Ft=null,Xl(e,t,c,6);break;case 8:Jc(),$e=6;break e;default:throw Error(i(462))}}jv();break}catch(V){xh(e,V)}while(!0);return Ua=Xn=null,O.H=l,O.A=o,Ue=a,Re!==null?0:(Qe=null,Ce=0,Us(),$e)}function jv(){for(;Re!==null&&!wt();)wh(Re)}function wh(e){var t=Fm(e.alternate,e,Fa);e.memoizedProps=e.pendingProps,t===null?yi(e):Re=t}function Nh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=qm(a,t,t.pendingProps,t.type,void 0,Ce);break;case 11:t=qm(a,t,t.pendingProps,t.type.render,t.ref,Ce);break;case 5:dc(t);default:Zm(a,t),t=Re=Sf(t,Fa),t=Fm(a,t,Fa)}e.memoizedProps=e.pendingProps,t===null?yi(e):Re=t}function Xl(e,t,a,l){Ua=Xn=null,dc(t),kl=null,Mr=0;var o=t.return;try{if(mv(e,o,t,a,Ce)){$e=1,li(e,ta(a,e.current)),Re=null;return}}catch(c){if(o!==null)throw Re=o,c;$e=1,li(e,ta(a,e.current)),Re=null;return}t.flags&32768?(Ae||l===1?e=!0:Gl||(Ce&536870912)!==0?e=!1:(gn=e=!0,(l===2||l===9||l===3||l===6)&&(l=Yt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Eh(t,e)):yi(t)}function yi(e){var t=e;do{if((t.flags&32768)!==0){Eh(t,gn);return}e=t.return;var a=gv(t.alternate,t,Fa);if(a!==null){Re=a;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);$e===0&&($e=5)}function Eh(e,t){do{var a=yv(e.alternate,e);if(a!==null){a.flags&=32767,Re=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=a}while(e!==null);$e=6,Re=null}function jh(e,t,a,l,o,c,h,b,E){e.cancelPendingCommit=null;do xi();while(rt!==0);if((Ue&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(c=t.lanes|t.childLanes,c|=Bo,Tt(e,a,c,h,b,E),e===Qe&&(Re=Qe=null,Ce=0),Vl=t,vn=e,Ka=a,Fc=c,Kc=o,hh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_v(kn,function(){return Mh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null,o=J.p,J.p=2,h=Ue,Ue|=4;try{xv(e,t,a)}finally{Ue=h,J.p=o,O.T=l}}rt=1,Rh(),Th(),Ch()}}function Rh(){if(rt===1){rt=0;var e=vn,t=Vl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null;var l=J.p;J.p=2;var o=Ue;Ue|=4;try{sh(t,e);var c=ou,h=ff(e.containerInfo),b=c.focusedElem,E=c.selectionRange;if(h!==b&&b&&b.ownerDocument&&df(b.ownerDocument.documentElement,b)){if(E!==null&&zo(b)){var D=E.start,V=E.end;if(V===void 0&&(V=D),"selectionStart"in b)b.selectionStart=D,b.selectionEnd=Math.min(V,b.value.length);else{var Z=b.ownerDocument||document,U=Z&&Z.defaultView||window;if(U.getSelection){var B=U.getSelection(),re=b.textContent.length,me=Math.min(E.start,re),Ge=E.end===void 0?me:Math.min(E.end,re);!B.extend&&me>Ge&&(h=Ge,Ge=me,me=h);var A=uf(b,me),C=uf(b,Ge);if(A&&C&&(B.rangeCount!==1||B.anchorNode!==A.node||B.anchorOffset!==A.offset||B.focusNode!==C.node||B.focusOffset!==C.offset)){var k=Z.createRange();k.setStart(A.node,A.offset),B.removeAllRanges(),me>Ge?(B.addRange(k),B.extend(C.node,C.offset)):(k.setEnd(C.node,C.offset),B.addRange(k))}}}}for(Z=[],B=b;B=B.parentNode;)B.nodeType===1&&Z.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<Z.length;b++){var X=Z[b];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Mi=!!iu,ou=iu=null}finally{Ue=o,J.p=l,O.T=a}}e.current=t,rt=2}}function Th(){if(rt===2){rt=0;var e=vn,t=Vl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=O.T,O.T=null;var l=J.p;J.p=2;var o=Ue;Ue|=4;try{th(e,t.alternate,t)}finally{Ue=o,J.p=l,O.T=a}}rt=3}}function Ch(){if(rt===4||rt===3){rt=0,en();var e=vn,t=Vl,a=Ka,l=hh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?rt=5:(rt=0,Vl=vn=null,_h(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(xn=null),da(a),t=t.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(Dn,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=O.T,o=J.p,J.p=2,O.T=null;try{for(var c=e.onRecoverableError,h=0;h<l.length;h++){var b=l[h];c(b.value,{componentStack:b.stack})}}finally{O.T=t,J.p=o}}(Ka&3)!==0&&xi(),Ea(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Zc?Kr++:(Kr=0,Zc=e):Kr=0,Zr(0)}}function _h(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Cr(t)))}function xi(){return Rh(),Th(),Ch(),Mh()}function Mh(){if(rt!==5)return!1;var e=vn,t=Fc;Fc=0;var a=da(Ka),l=O.T,o=J.p;try{J.p=32>a?32:a,O.T=null,a=Kc,Kc=null;var c=vn,h=Ka;if(rt=0,Vl=vn=null,Ka=0,(Ue&6)!==0)throw Error(i(331));var b=Ue;if(Ue|=4,dh(c.current),oh(c,c.current,h,a),Ue=b,Zr(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(Dn,c)}catch{}return!0}finally{J.p=o,O.T=l,_h(e,t)}}function Ah(e,t,a){t=ta(a,t),t=Rc(e.stateNode,t,2),e=fn(e,t,2),e!==null&&(Ze(e,2),Ea(e))}function Be(e,t,a){if(e.tag===3)Ah(e,e,a);else for(;t!==null;){if(t.tag===3){Ah(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(xn===null||!xn.has(l))){e=ta(a,e),a=Om(2),l=fn(t,a,2),l!==null&&(zm(a,l,t,e),Ze(l,2),Ea(l));break}}t=t.return}}function Ic(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Sv;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(Vc=!0,o.add(a),e=Rv.bind(null,e,t,a),t.then(e,e))}function Rv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Qe===e&&(Ce&a)===a&&($e===4||$e===3&&(Ce&62914560)===Ce&&300>Nt()-fi?(Ue&2)===0&&Yl(e,0):Yc|=a,Ql===Ce&&(Ql=0)),Ea(e)}function Oh(e,t){t===0&&(t=yt()),e=Qn(e,t),e!==null&&(Ze(e,t),Ea(e))}function Tv(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Oh(e,a)}function Cv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(t),Oh(e,a)}function _v(e,t){return dr(e,t)}var vi=null,Fl=null,Pc=!1,bi=!1,Wc=!1,Sn=0;function Ea(e){e!==Fl&&e.next===null&&(Fl===null?vi=Fl=e:Fl=Fl.next=e),bi=!0,Pc||(Pc=!0,Av())}function Zr(e,t){if(!Wc&&bi){Wc=!0;do for(var a=!1,l=vi;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var c=0;else{var h=l.suspendedLanes,b=l.pingedLanes;c=(1<<31-gt(42|e)+1)-1,c&=o&~(h&~b),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Uh(l,c))}else c=Ce,c=ye(l,l===Qe?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||Xe(l,c)||(a=!0,Uh(l,c));l=l.next}while(a);Wc=!1}}function Mv(){zh()}function zh(){bi=Pc=!1;var e=0;Sn!==0&&Gv()&&(e=Sn);for(var t=Nt(),a=null,l=vi;l!==null;){var o=l.next,c=kh(l,t);c===0?(l.next=null,a===null?vi=o:a.next=o,o===null&&(Fl=a)):(a=l,(e!==0||(c&3)!==0)&&(bi=!0)),l=o}rt!==0&&rt!==5||Zr(e),Sn!==0&&(Sn=0)}function kh(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var h=31-gt(c),b=1<<h,E=o[h];E===-1?((b&a)===0||(b&l)!==0)&&(o[h]=ot(b,t)):E<=t&&(e.expiredLanes|=b),c&=~b}if(t=Qe,a=Ce,a=ye(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Le===2||Le===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&fr(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Xe(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&fr(l),da(a)){case 2:case 8:a=Ns;break;case 32:a=kn;break;case 268435456:a=Ma;break;default:a=kn}return l=Dh.bind(null,e),a=dr(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&fr(l),e.callbackPriority=2,e.callbackNode=null,2}function Dh(e,t){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xi()&&e.callbackNode!==a)return null;var l=Ce;return l=ye(e,e===Qe?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(gh(e,l,t),kh(e,Nt()),e.callbackNode!=null&&e.callbackNode===a?Dh.bind(null,e):null)}function Uh(e,t){if(xi())return null;gh(e,t,!0)}function Av(){Vv(function(){(Ue&6)!==0?dr(zn,Mv):zh()})}function eu(){if(Sn===0){var e=Al;e===0&&(e=ul,ul<<=1,(ul&261888)===0&&(ul=256)),Sn=e}return Sn}function Lh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Cs(""+e)}function Bh(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 Ov(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var c=Lh((o[Mt]||null).action),h=l.submitter;h&&(t=(t=h[Mt]||null)?Lh(t.formAction):h.getAttribute("formAction"),t!==null&&(c=t,h=null));var b=new Os("action","action",null,l,o);e.push({event:b,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Sn!==0){var E=h?Bh(o,h):new FormData(o);bc(a,{pending:!0,data:E,method:o.method,action:c},null,E)}}else typeof c=="function"&&(b.preventDefault(),E=h?Bh(o,h):new FormData(o),bc(a,{pending:!0,data:E,method:o.method,action:c},c,E))},currentTarget:o}]})}}for(var tu=0;tu<Lo.length;tu++){var au=Lo[tu],zv=au.toLowerCase(),kv=au[0].toUpperCase()+au.slice(1);fa(zv,"on"+kv)}fa(pf,"onAnimationEnd"),fa(gf,"onAnimationIteration"),fa(yf,"onAnimationStart"),fa("dblclick","onDoubleClick"),fa("focusin","onFocus"),fa("focusout","onBlur"),fa($x,"onTransitionRun"),fa(Ix,"onTransitionStart"),fa(Px,"onTransitionCancel"),fa(xf,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),Bn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Bn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Bn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Bn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Bn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Bn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jr="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(" "),Dv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jr));function Hh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var h=l.length-1;0<=h;h--){var b=l[h],E=b.instance,D=b.currentTarget;if(b=b.listener,E!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=D;try{c(o)}catch(V){Ds(V)}o.currentTarget=null,c=E}else for(h=0;h<l.length;h++){if(b=l[h],E=b.instance,D=b.currentTarget,b=b.listener,E!==c&&o.isPropagationStopped())break e;c=b,o.currentTarget=D;try{c(o)}catch(V){Ds(V)}o.currentTarget=null,c=E}}}}function Te(e,t){var a=t[po];a===void 0&&(a=t[po]=new Set);var l=e+"__bubble";a.has(l)||(qh(t,e,2,!1),a.add(l))}function nu(e,t,a){var l=0;t&&(l|=4),qh(a,e,l,t)}var Si="_reactListening"+Math.random().toString(36).slice(2);function lu(e){if(!e[Si]){e[Si]=!0,Od.forEach(function(a){a!=="selectionchange"&&(Dv.has(a)||nu(a,!1,e),nu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Si]||(t[Si]=!0,nu("selectionchange",!1,t))}}function qh(e,t,a,l){switch(pp(t)){case 2:var o=c0;break;case 8:o=u0;break;default:o=vu}a=o.bind(null,t,a,e),o=void 0,!Eo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?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 ru(e,t,a,l,o){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var h=l.tag;if(h===3||h===4){var b=l.stateNode.containerInfo;if(b===o)break;if(h===4)for(h=l.return;h!==null;){var E=h.tag;if((E===3||E===4)&&h.stateNode.containerInfo===o)return;h=h.return}for(;b!==null;){if(h=hl(b),h===null)return;if(E=h.tag,E===5||E===6||E===26||E===27){l=c=h;continue e}b=b.parentNode}}l=l.return}Yd(function(){var D=c,V=wo(a),Z=[];e:{var U=vf.get(e);if(U!==void 0){var B=Os,re=e;switch(e){case"keypress":if(Ms(a)===0)break e;case"keydown":case"keyup":B=Cx;break;case"focusin":re="focus",B=Co;break;case"focusout":re="blur",B=Co;break;case"beforeblur":case"afterblur":B=Co;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":B=Kd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=gx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=Ax;break;case pf:case gf:case yf:B=vx;break;case xf:B=zx;break;case"scroll":case"scrollend":B=hx;break;case"wheel":B=Dx;break;case"copy":case"cut":case"paste":B=Sx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=Jd;break;case"toggle":case"beforetoggle":B=Lx}var me=(t&4)!==0,Ge=!me&&(e==="scroll"||e==="scrollend"),A=me?U!==null?U+"Capture":null:U;me=[];for(var C=D,k;C!==null;){var X=C;if(k=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||k===null||A===null||(X=yr(C,A),X!=null&&me.push($r(C,X,k))),Ge)break;C=C.return}0<me.length&&(U=new B(U,re,null,a,V),Z.push({event:U,listeners:me}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",U&&a!==So&&(re=a.relatedTarget||a.fromElement)&&(hl(re)||re[ml]))break e;if((B||U)&&(U=V.window===V?V:(U=V.ownerDocument)?U.defaultView||U.parentWindow:window,B?(re=a.relatedTarget||a.toElement,B=D,re=re?hl(re):null,re!==null&&(Ge=f(re),me=re.tag,re!==Ge||me!==5&&me!==27&&me!==6)&&(re=null)):(B=null,re=D),B!==re)){if(me=Kd,X="onMouseLeave",A="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(me=Jd,X="onPointerLeave",A="onPointerEnter",C="pointer"),Ge=B==null?U:gr(B),k=re==null?U:gr(re),U=new me(X,C+"leave",B,a,V),U.target=Ge,U.relatedTarget=k,X=null,hl(V)===D&&(me=new me(A,C+"enter",re,a,V),me.target=k,me.relatedTarget=Ge,X=me),Ge=X,B&&re)t:{for(me=Uv,A=B,C=re,k=0,X=A;X;X=me(X))k++;X=0;for(var de=C;de;de=me(de))X++;for(;0<k-X;)A=me(A),k--;for(;0<X-k;)C=me(C),X--;for(;k--;){if(A===C||C!==null&&A===C.alternate){me=A;break t}A=me(A),C=me(C)}me=null}else me=null;B!==null&&Gh(Z,U,B,me,!1),re!==null&&Ge!==null&&Gh(Z,Ge,re,me,!0)}}e:{if(U=D?gr(D):window,B=U.nodeName&&U.nodeName.toLowerCase(),B==="select"||B==="input"&&U.type==="file")var ke=nf;else if(tf(U))if(lf)ke=Kx;else{ke=Xx;var oe=Yx}else B=U.nodeName,!B||B.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&bo(D.elementType)&&(ke=nf):ke=Fx;if(ke&&(ke=ke(e,D))){af(Z,ke,a,V);break e}oe&&oe(e,U,D),e==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&vo(U,"number",U.value)}switch(oe=D?gr(D):window,e){case"focusin":(tf(oe)||oe.contentEditable==="true")&&(Nl=oe,ko=D,jr=null);break;case"focusout":jr=ko=Nl=null;break;case"mousedown":Do=!0;break;case"contextmenu":case"mouseup":case"dragend":Do=!1,mf(Z,a,V);break;case"selectionchange":if(Jx)break;case"keydown":case"keyup":mf(Z,a,V)}var Ne;if(Mo)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else wl?Wd(e,a)&&(_e="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(_e="onCompositionStart");_e&&($d&&a.locale!=="ko"&&(wl||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&wl&&(Ne=Xd()):(ln=V,jo="value"in ln?ln.value:ln.textContent,wl=!0)),oe=wi(D,_e),0<oe.length&&(_e=new Zd(_e,e,null,a,V),Z.push({event:_e,listeners:oe}),Ne?_e.data=Ne:(Ne=ef(a),Ne!==null&&(_e.data=Ne)))),(Ne=Hx?qx(e,a):Gx(e,a))&&(_e=wi(D,"onBeforeInput"),0<_e.length&&(oe=new Zd("onBeforeInput","beforeinput",null,a,V),Z.push({event:oe,listeners:_e}),oe.data=Ne)),Ov(Z,e,D,a,V)}Hh(Z,t)})}function $r(e,t,a){return{instance:e,listener:t,currentTarget:a}}function wi(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,c=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||c===null||(o=yr(e,a),o!=null&&l.unshift($r(e,o,c)),o=yr(e,t),o!=null&&l.push($r(e,o,c))),e.tag===3)return l;e=e.return}return[]}function Uv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Gh(e,t,a,l,o){for(var c=t._reactName,h=[];a!==null&&a!==l;){var b=a,E=b.alternate,D=b.stateNode;if(b=b.tag,E!==null&&E===l)break;b!==5&&b!==26&&b!==27||D===null||(E=D,o?(D=yr(a,c),D!=null&&h.unshift($r(a,D,E))):o||(D=yr(a,c),D!=null&&h.push($r(a,D,E)))),a=a.return}h.length!==0&&e.push({event:t,listeners:h})}var Lv=/\r\n?/g,Bv=/\u0000|\uFFFD/g;function Qh(e){return(typeof e=="string"?e:""+e).replace(Lv,`
|
|
9
|
+
`).replace(Bv,"")}function Vh(e,t){return t=Qh(t),Qh(e)===t}function qe(e,t,a,l,o,c){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||vl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&vl(e,""+l);break;case"className":Rs(e,"class",l);break;case"tabIndex":Rs(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Rs(e,a,l);break;case"style":Qd(e,l,c);break;case"data":if(t!=="object"){Rs(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Cs(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(t!=="input"&&qe(e,t,"name",o.name,o,null),qe(e,t,"formEncType",o.formEncType,o,null),qe(e,t,"formMethod",o.formMethod,o,null),qe(e,t,"formTarget",o.formTarget,o,null)):(qe(e,t,"encType",o.encType,o,null),qe(e,t,"method",o.method,o,null),qe(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Cs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Oa);break;case"onScroll":l!=null&&Te("scroll",e);break;case"onScrollEnd":l!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Cs(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Te("beforetoggle",e),Te("toggle",e),js(e,"popover",l);break;case"xlinkActuate":Aa(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Aa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Aa(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Aa(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Aa(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Aa(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Aa(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Aa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Aa(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":js(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=fx.get(a)||a,js(e,a,l))}}function su(e,t,a,l,o,c){switch(a){case"style":Qd(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof l=="string"?vl(e,l):(typeof l=="number"||typeof l=="bigint")&&vl(e,""+l);break;case"onScroll":l!=null&&Te("scroll",e);break;case"onScrollEnd":l!=null&&Te("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Oa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!zd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),c=e[Mt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,o),typeof l=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):js(e,a,l)}}}function pt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var l=!1,o=!1,c;for(c in a)if(a.hasOwnProperty(c)){var h=a[c];if(h!=null)switch(c){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:qe(e,t,c,h,a,null)}}o&&qe(e,t,"srcSet",a.srcSet,a,null),l&&qe(e,t,"src",a.src,a,null);return;case"input":Te("invalid",e);var b=c=h=o=null,E=null,D=null;for(l in a)if(a.hasOwnProperty(l)){var V=a[l];if(V!=null)switch(l){case"name":o=V;break;case"type":h=V;break;case"checked":E=V;break;case"defaultChecked":D=V;break;case"value":c=V;break;case"defaultValue":b=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(i(137,t));break;default:qe(e,t,l,V,a,null)}}Bd(e,c,b,E,D,h,o,!1);return;case"select":Te("invalid",e),l=h=c=null;for(o in a)if(a.hasOwnProperty(o)&&(b=a[o],b!=null))switch(o){case"value":c=b;break;case"defaultValue":h=b;break;case"multiple":l=b;default:qe(e,t,o,b,a,null)}t=c,a=h,e.multiple=!!l,t!=null?xl(e,!!l,t,!1):a!=null&&xl(e,!!l,a,!0);return;case"textarea":Te("invalid",e),c=o=l=null;for(h in a)if(a.hasOwnProperty(h)&&(b=a[h],b!=null))switch(h){case"value":l=b;break;case"defaultValue":o=b;break;case"children":c=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(i(91));break;default:qe(e,t,h,b,a,null)}qd(e,l,o,c);return;case"option":for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null)&&(E==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":qe(e,t,E,l,a,null));return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(l=0;l<Jr.length;l++)Te(Jr[l],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("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(D in a)if(a.hasOwnProperty(D)&&(l=a[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:qe(e,t,D,l,a,null)}return;default:if(bo(t)){for(V in a)a.hasOwnProperty(V)&&(l=a[V],l!==void 0&&su(e,t,V,l,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(l=a[b],l!=null&&qe(e,t,b,l,a,null))}function Hv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,c=null,h=null,b=null,E=null,D=null,V=null;for(B in a){var Z=a[B];if(a.hasOwnProperty(B)&&Z!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":E=Z;default:l.hasOwnProperty(B)||qe(e,t,B,null,l,Z)}}for(var U in l){var B=l[U];if(Z=a[U],l.hasOwnProperty(U)&&(B!=null||Z!=null))switch(U){case"type":c=B;break;case"name":o=B;break;case"checked":D=B;break;case"defaultChecked":V=B;break;case"value":h=B;break;case"defaultValue":b=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(i(137,t));break;default:B!==Z&&qe(e,t,U,B,l,Z)}}xo(e,h,b,E,D,V,c,o);return;case"select":B=h=b=U=null;for(c in a)if(E=a[c],a.hasOwnProperty(c)&&E!=null)switch(c){case"value":break;case"multiple":B=E;default:l.hasOwnProperty(c)||qe(e,t,c,null,l,E)}for(o in l)if(c=l[o],E=a[o],l.hasOwnProperty(o)&&(c!=null||E!=null))switch(o){case"value":U=c;break;case"defaultValue":b=c;break;case"multiple":h=c;default:c!==E&&qe(e,t,o,c,l,E)}t=b,a=h,l=B,U!=null?xl(e,!!a,U,!1):!!l!=!!a&&(t!=null?xl(e,!!a,t,!0):xl(e,!!a,a?[]:"",!1));return;case"textarea":B=U=null;for(b in a)if(o=a[b],a.hasOwnProperty(b)&&o!=null&&!l.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:qe(e,t,b,null,l,o)}for(h in l)if(o=l[h],c=a[h],l.hasOwnProperty(h)&&(o!=null||c!=null))switch(h){case"value":U=o;break;case"defaultValue":B=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(i(91));break;default:o!==c&&qe(e,t,h,o,l,c)}Hd(e,U,B);return;case"option":for(var re in a)U=a[re],a.hasOwnProperty(re)&&U!=null&&!l.hasOwnProperty(re)&&(re==="selected"?e.selected=!1:qe(e,t,re,null,l,U));for(E in l)U=l[E],B=a[E],l.hasOwnProperty(E)&&U!==B&&(U!=null||B!=null)&&(E==="selected"?e.selected=U&&typeof U!="function"&&typeof U!="symbol":qe(e,t,E,U,l,B));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 me in a)U=a[me],a.hasOwnProperty(me)&&U!=null&&!l.hasOwnProperty(me)&&qe(e,t,me,null,l,U);for(D in l)if(U=l[D],B=a[D],l.hasOwnProperty(D)&&U!==B&&(U!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(i(137,t));break;default:qe(e,t,D,U,l,B)}return;default:if(bo(t)){for(var Ge in a)U=a[Ge],a.hasOwnProperty(Ge)&&U!==void 0&&!l.hasOwnProperty(Ge)&&su(e,t,Ge,void 0,l,U);for(V in l)U=l[V],B=a[V],!l.hasOwnProperty(V)||U===B||U===void 0&&B===void 0||su(e,t,V,U,l,B);return}}for(var A in a)U=a[A],a.hasOwnProperty(A)&&U!=null&&!l.hasOwnProperty(A)&&qe(e,t,A,null,l,U);for(Z in l)U=l[Z],B=a[Z],!l.hasOwnProperty(Z)||U===B||U==null&&B==null||qe(e,t,Z,U,l,B)}function Yh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],c=o.transferSize,h=o.initiatorType,b=o.duration;if(c&&b&&Yh(h)){for(h=0,b=o.responseEnd,l+=1;l<a.length;l++){var E=a[l],D=E.startTime;if(D>b)break;var V=E.transferSize,Z=E.initiatorType;V&&Yh(Z)&&(E=E.responseEnd,h+=V*(E<b?1:(b-D)/(E-D)))}if(--l,t+=8*(c+h)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var iu=null,ou=null;function Ni(e){return e.nodeType===9?e:e.ownerDocument}function Xh(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 Fh(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 cu(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 uu=null;function Gv(){var e=window.event;return e&&e.type==="popstate"?e===uu?!1:(uu=e,!0):(uu=null,!1)}var Kh=typeof setTimeout=="function"?setTimeout:void 0,Qv=typeof clearTimeout=="function"?clearTimeout:void 0,Zh=typeof Promise=="function"?Promise:void 0,Vv=typeof queueMicrotask=="function"?queueMicrotask:typeof Zh<"u"?function(e){return Zh.resolve(null).then(e).catch(Yv)}:Kh;function Yv(e){setTimeout(function(){throw e})}function wn(e){return e==="head"}function Jh(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),$l(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ir(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ir(a);for(var c=a.firstChild;c;){var h=c.nextSibling,b=c.nodeName;c[pr]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=h}}else a==="body"&&Ir(e.ownerDocument.body);a=o}while(a);$l(t)}function $h(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function du(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":du(a),go(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Xv(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[pr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==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(c=e.getAttribute("src"),(c!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=sa(e.nextSibling),e===null)break}return null}function Fv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=sa(e.nextSibling),e===null))return null;return e}function Ih(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=sa(e.nextSibling),e===null))return null;return e}function fu(e){return e.data==="$?"||e.data==="$~"}function mu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Kv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function sa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var hu=null;function Ph(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return sa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Wh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function ep(e,t,a){switch(t=Ni(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ir(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);go(e)}var ia=new Map,tp=new Set;function Ei(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Za=J.d;J.d={f:Zv,r:Jv,D:$v,C:Iv,L:Pv,m:Wv,X:t0,S:e0,M:a0};function Zv(){var e=Za.f(),t=pi();return e||t}function Jv(e){var t=pl(e);t!==null&&t.tag===5&&t.type==="form"?xm(t):Za.r(e)}var Kl=typeof document>"u"?null:document;function ap(e,t,a){var l=Kl;if(l&&typeof t=="string"&&t){var o=Wt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),tp.has(o)||(tp.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),pt(t,"link",e),ct(t),l.head.appendChild(t)))}}function $v(e){Za.D(e),ap("dns-prefetch",e,null)}function Iv(e,t){Za.C(e,t),ap("preconnect",e,t)}function Pv(e,t,a){Za.L(e,t,a);var l=Kl;if(l&&e&&t){var o='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+Wt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+Wt(a.imageSizes)+'"]')):o+='[href="'+Wt(e)+'"]';var c=o;switch(t){case"style":c=Zl(e);break;case"script":c=Jl(e)}ia.has(c)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),ia.set(c,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(Pr(c))||t==="script"&&l.querySelector(Wr(c))||(t=l.createElement("link"),pt(t,"link",e),ct(t),l.head.appendChild(t)))}}function Wv(e,t){Za.m(e,t);var a=Kl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Wt(l)+'"][href="'+Wt(e)+'"]',c=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Jl(e)}if(!ia.has(c)&&(e=p({rel:"modulepreload",href:e},t),ia.set(c,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Wr(c)))return}l=a.createElement("link"),pt(l,"link",e),ct(l),a.head.appendChild(l)}}}function e0(e,t,a){Za.S(e,t,a);var l=Kl;if(l&&e){var o=gl(l).hoistableStyles,c=Zl(e);t=t||"default";var h=o.get(c);if(!h){var b={loading:0,preload:null};if(h=l.querySelector(Pr(c)))b.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=ia.get(c))&&pu(e,a);var E=h=l.createElement("link");ct(E),pt(E,"link",e),E._p=new Promise(function(D,V){E.onload=D,E.onerror=V}),E.addEventListener("load",function(){b.loading|=1}),E.addEventListener("error",function(){b.loading|=2}),b.loading|=4,ji(h,t,l)}h={type:"stylesheet",instance:h,count:1,state:b},o.set(c,h)}}}function t0(e,t){Za.X(e,t);var a=Kl;if(a&&e){var l=gl(a).hoistableScripts,o=Jl(e),c=l.get(o);c||(c=a.querySelector(Wr(o)),c||(e=p({src:e,async:!0},t),(t=ia.get(o))&&gu(e,t),c=a.createElement("script"),ct(c),pt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function a0(e,t){Za.M(e,t);var a=Kl;if(a&&e){var l=gl(a).hoistableScripts,o=Jl(e),c=l.get(o);c||(c=a.querySelector(Wr(o)),c||(e=p({src:e,async:!0,type:"module"},t),(t=ia.get(o))&&gu(e,t),c=a.createElement("script"),ct(c),pt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(o,c))}}function np(e,t,a,l){var o=(o=fe.current)?Ei(o):null;if(!o)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Zl(a.href),a=gl(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Zl(a.href);var c=gl(o).hoistableStyles,h=c.get(e);if(h||(o=o.ownerDocument||o,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,h),(c=o.querySelector(Pr(e)))&&!c._p&&(h.instance=c,h.state.loading=5),ia.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},ia.set(e,a),c||n0(o,e,a,h.state))),t&&l===null)throw Error(i(528,""));return h}if(t&&l!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Jl(a),a=gl(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Zl(e){return'href="'+Wt(e)+'"'}function Pr(e){return'link[rel="stylesheet"]['+e+"]"}function lp(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function n0(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),pt(t,"link",a),ct(t),e.head.appendChild(t))}function Jl(e){return'[src="'+Wt(e)+'"]'}function Wr(e){return"script[async]"+e}function rp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Wt(a.href)+'"]');if(l)return t.instance=l,ct(l),l;var o=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ct(l),pt(l,"style",o),ji(l,a.precedence,e),t.instance=l;case"stylesheet":o=Zl(a.href);var c=e.querySelector(Pr(o));if(c)return t.state.loading|=4,t.instance=c,ct(c),c;l=lp(a),(o=ia.get(o))&&pu(l,o),c=(e.ownerDocument||e).createElement("link"),ct(c);var h=c;return h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),pt(c,"link",l),t.state.loading|=4,ji(c,a.precedence,e),t.instance=c;case"script":return c=Jl(a.src),(o=e.querySelector(Wr(c)))?(t.instance=o,ct(o),o):(l=a,(o=ia.get(c))&&(l=p({},a),gu(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),ct(o),pt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ji(l,a.precedence,e));return t.instance}function ji(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,c=o,h=0;h<l.length;h++){var b=l[h];if(b.dataset.precedence===t)c=b;else if(c!==o)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function pu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ri=null;function sp(e,t,a){if(Ri===null){var l=new Map,o=Ri=new Map;o.set(a,l)}else o=Ri,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var c=a[o];if(!(c[pr]||c[dt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var h=c.getAttribute(t)||"";h=e+h;var b=l.get(h);b?b.push(c):l.set(h,[c])}}return l}function ip(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function l0(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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 op(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r0(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Zl(l.href),c=t.querySelector(Pr(o));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ti.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,ct(c);return}c=t.ownerDocument||t,l=lp(l),(o=ia.get(o))&&pu(l,o),c=c.createElement("link"),ct(c);var h=c;h._p=new Promise(function(b,E){h.onload=b,h.onerror=E}),pt(c,"link",l),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ti.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var yu=0;function s0(e,t){return e.stylesheets&&e.count===0&&_i(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&_i(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&yu===0&&(yu=62500*qv());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_i(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>yu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function Ti(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_i(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ci=null;function _i(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ci=new Map,t.forEach(i0,e),Ci=null,Ti.call(e))}function i0(e,t){if(!(t.state.loading&4)){var a=Ci.get(e);if(a)var l=a.get(null);else{a=new Map,Ci.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<o.length;c++){var h=o[c];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(a.set(h.dataset.precedence,h),l=h)}l&&a.set(null,l)}o=t.instance,h=o.getAttribute("data-precedence"),c=a.get(h)||l,c===l&&a.set(null,o),a.set(h,o),this.count++,l=Ti.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),c?c.parentNode.insertBefore(o,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var es={$$typeof:Y,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function o0(e,t,a,l,o,c,h,b,E){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=an(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=an(0),this.hiddenUpdates=an(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=c,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=E,this.incompleteTransitions=new Map}function cp(e,t,a,l,o,c,h,b,E,D,V,Z){return e=new o0(e,t,a,h,E,D,V,Z,b),t=1,c===!0&&(t|=24),c=Vt(3,null,null,t),e.current=c,c.stateNode=e,t=$o(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:a,cache:t},ec(c),e}function up(e){return e?(e=Rl,e):Rl}function dp(e,t,a,l,o,c){o=up(o),l.context===null?l.context=o:l.pendingContext=o,l=dn(t),l.payload={element:a},c=c===void 0?null:c,c!==null&&(l.callback=c),a=fn(e,l,t),a!==null&&(Ut(a,e,t),Or(a,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function xu(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=Qn(e,67108864);t!==null&&Ut(t,e,67108864),xu(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=Zt();t=fl(t);var a=Qn(e,t);a!==null&&Ut(a,e,t),xu(e,t)}}var Mi=!0;function c0(e,t,a,l){var o=O.T;O.T=null;var c=J.p;try{J.p=2,vu(e,t,a,l)}finally{J.p=c,O.T=o}}function u0(e,t,a,l){var o=O.T;O.T=null;var c=J.p;try{J.p=8,vu(e,t,a,l)}finally{J.p=c,O.T=o}}function vu(e,t,a,l){if(Mi){var o=bu(l);if(o===null)ru(e,t,l,Ai,a),gp(e,l);else if(f0(o,e,t,a,l))l.stopPropagation();else if(gp(e,l),t&4&&-1<d0.indexOf(e)){for(;o!==null;){var c=pl(o);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var h=ba(c.pendingLanes);if(h!==0){var b=c;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var E=1<<31-gt(h);b.entanglements[1]|=E,h&=~E}Ea(c),(Ue&6)===0&&(mi=Nt()+500,Zr(0))}}break;case 31:case 13:b=Qn(c,2),b!==null&&Ut(b,c,2),pi(),xu(c,2)}if(c=bu(l),c===null&&ru(e,t,l,Ai,a),c===o)break;o=c}o!==null&&l.stopPropagation()}else ru(e,t,l,null,a)}}function bu(e){return e=wo(e),Su(e)}var Ai=null;function Su(e){if(Ai=null,e=hl(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=g(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 Ai=e,null}function pp(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(fo()){case zn:return 2;case Ns:return 8;case kn:case mr:return 32;case Ma:return 268435456;default:return 32}default:return 32}}var wu=!1,Nn=null,En=null,jn=null,ts=new Map,as=new Map,Rn=[],d0="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 gp(e,t){switch(e){case"focusin":case"focusout":Nn=null;break;case"dragenter":case"dragleave":En=null;break;case"mouseover":case"mouseout":jn=null;break;case"pointerover":case"pointerout":ts.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":as.delete(t.pointerId)}}function ns(e,t,a,l,o,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:c,targetContainers:[o]},t!==null&&(t=pl(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function f0(e,t,a,l,o){switch(t){case"focusin":return Nn=ns(Nn,e,t,a,l,o),!0;case"dragenter":return En=ns(En,e,t,a,l,o),!0;case"mouseover":return jn=ns(jn,e,t,a,l,o),!0;case"pointerover":var c=o.pointerId;return ts.set(c,ns(ts.get(c)||null,e,t,a,l,o)),!0;case"gotpointercapture":return c=o.pointerId,as.set(c,ns(as.get(c)||null,e,t,a,l,o)),!0}return!1}function yp(e){var t=hl(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Md(e.priority,function(){hp(a)});return}}else if(t===31){if(t=g(a),t!==null){e.blockedOn=t,Md(e.priority,function(){hp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Oi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=bu(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);So=l,a.target.dispatchEvent(l),So=null}else return t=pl(a),t!==null&&mp(t),e.blockedOn=a,!1;t.shift()}return!0}function xp(e,t,a){Oi(e)&&a.delete(t)}function m0(){wu=!1,Nn!==null&&Oi(Nn)&&(Nn=null),En!==null&&Oi(En)&&(En=null),jn!==null&&Oi(jn)&&(jn=null),ts.forEach(xp),as.forEach(xp)}function zi(e,t){e.blockedOn===t&&(e.blockedOn=null,wu||(wu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,m0)))}var ki=null;function vp(e){ki!==e&&(ki=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ki===e&&(ki=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(Su(l||a)===null)continue;break}var c=pl(a);c!==null&&(e.splice(t,3),t-=3,bc(c,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function $l(e){function t(E){return zi(E,e)}Nn!==null&&zi(Nn,e),En!==null&&zi(En,e),jn!==null&&zi(jn,e),ts.forEach(t),as.forEach(t);for(var a=0;a<Rn.length;a++){var l=Rn[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Rn.length&&(a=Rn[0],a.blockedOn===null);)yp(a),a.blockedOn===null&&Rn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],c=a[l+1],h=o[Mt]||null;if(typeof c=="function")h||vp(a);else if(h){var b=null;if(c&&c.hasAttribute("formAction")){if(o=c,h=c[Mt]||null)b=h.formAction;else if(Su(o)!==null)continue}else b=h.action;typeof b=="function"?a[l+1]=b:(a.splice(l,3),l-=3),vp(a)}}}function bp(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Nu(e){this._internalRoot=e}Di.prototype.render=Nu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,l=Zt();dp(a,l,e,t,null,null)},Di.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),pi(),t[ml]=null}};function Di(e){this._internalRoot=e}Di.prototype.unstable_scheduleHydration=function(e){if(e){var t=ho();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Rn.length&&t!==0&&t<Rn[a].priority;a++);Rn.splice(a,0,e),a===0&&yp(e)}};var Sp=r.version;if(Sp!=="19.2.4")throw Error(i(527,Sp,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=y(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var h0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ui=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ui.isDisabled&&Ui.supportsFiber)try{Dn=Ui.inject(h0),Et=Ui}catch{}}return rs.createRoot=function(e,t){if(!d(e))throw Error(i(299));var a=!1,l="",o=Cm,c=_m,h=Mm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=cp(e,1,!1,null,null,a,l,null,o,c,h,bp),e[ml]=t.current,lu(e),new Nu(t)},rs.hydrateRoot=function(e,t,a){if(!d(e))throw Error(i(299));var l=!1,o="",c=Cm,h=_m,b=Mm,E=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(h=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(E=a.formState)),t=cp(e,1,!0,t,a??null,l,o,E,c,h,b,bp),t.context=up(null),a=t.current,l=Zt(),l=fl(l),o=dn(l),o.callback=null,fn(a,o,l),a=l,t.current.lanes=a,Ze(t,a),Ea(t),e[ml]=t.current,lu(e),new Di(t)},rs.version="19.2.4",rs}var Ap;function N0(){if(Ap)return Ru.exports;Ap=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Ru.exports=w0(),Ru.exports}var E0=N0();var Op="popstate";function j0(n={}){function r(i,d){let{pathname:f,search:m,hash:g}=i.location;return Qu("",{pathname:f,search:m,hash:g},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function s(i,d){return typeof d=="string"?d:fs(d)}return T0(r,s,null,n)}function Ke(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function pa(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function R0(){return Math.random().toString(36).substring(2,10)}function zp(n,r){return{usr:n.state,key:n.key,idx:r}}function Qu(n,r,s=null,i){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?ar(r):r,state:s,key:r&&r.key||i||R0()}}function fs({pathname:n="/",search:r="",hash:s=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function ar(n){let r={};if(n){let s=n.indexOf("#");s>=0&&(r.hash=n.substring(s),n=n.substring(0,s));let i=n.indexOf("?");i>=0&&(r.search=n.substring(i),n=n.substring(0,i)),n&&(r.pathname=n)}return r}function T0(n,r,s,i={}){let{window:d=document.defaultView,v5Compat:f=!1}=i,m=d.history,g="POP",x=null,y=v();y==null&&(y=0,m.replaceState({...m.state,idx:y},""));function v(){return(m.state||{idx:null}).idx}function p(){g="POP";let T=v(),z=T==null?null:T-y;y=T,x&&x({action:g,location:j.location,delta:z})}function w(T,z){g="PUSH";let _=Qu(j.location,T,z);y=v()+1;let Y=zp(_,y),L=j.createHref(_);try{m.pushState(Y,"",L)}catch(te){if(te instanceof DOMException&&te.name==="DataCloneError")throw te;d.location.assign(L)}f&&x&&x({action:g,location:j.location,delta:1})}function M(T,z){g="REPLACE";let _=Qu(j.location,T,z);y=v();let Y=zp(_,y),L=j.createHref(_);m.replaceState(Y,"",L),f&&x&&x({action:g,location:j.location,delta:0})}function N(T){return C0(T)}let j={get action(){return g},get location(){return n(d,m)},listen(T){if(x)throw new Error("A history only accepts one active listener");return d.addEventListener(Op,p),x=T,()=>{d.removeEventListener(Op,p),x=null}},createHref(T){return r(d,T)},createURL:N,encodeLocation(T){let z=N(T);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:w,replace:M,go(T){return m.go(T)}};return j}function C0(n,r=!1){let s="http://localhost";typeof window<"u"&&(s=window.location.origin!=="null"?window.location.origin:window.location.href),Ke(s,"No window.location.(origin|href) available to create URL");let i=typeof n=="string"?n:fs(n);return i=i.replace(/ $/,"%20"),!r&&i.startsWith("//")&&(i=s+i),new URL(i,s)}function _g(n,r,s="/"){return _0(n,r,s,!1)}function _0(n,r,s,i){let d=typeof r=="string"?ar(r):r,f=Ia(d.pathname||"/",s);if(f==null)return null;let m=Mg(n);M0(m);let g=null;for(let x=0;g==null&&x<m.length;++x){let y=G0(f);g=H0(m[x],y,i)}return g}function Mg(n,r=[],s=[],i="",d=!1){let f=(m,g,x=d,y)=>{let v={relativePath:y===void 0?m.path||"":y,caseSensitive:m.caseSensitive===!0,childrenIndex:g,route:m};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(i)&&x)return;Ke(v.relativePath.startsWith(i),`Absolute route path "${v.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(i.length)}let p=$a([i,v.relativePath]),w=s.concat(v);m.children&&m.children.length>0&&(Ke(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Mg(m.children,r,w,p,x)),!(m.path==null&&!m.index)&&r.push({path:p,score:L0(p,m.index),routesMeta:w})};return n.forEach((m,g)=>{if(m.path===""||!m.path?.includes("?"))f(m,g);else for(let x of Ag(m.path))f(m,g,!0,x)}),r}function Ag(n){let r=n.split("/");if(r.length===0)return[];let[s,...i]=r,d=s.endsWith("?"),f=s.replace(/\?$/,"");if(i.length===0)return d?[f,""]:[f];let m=Ag(i.join("/")),g=[];return g.push(...m.map(x=>x===""?f:[f,x].join("/"))),d&&g.push(...m),g.map(x=>n.startsWith("/")&&x===""?"/":x)}function M0(n){n.sort((r,s)=>r.score!==s.score?s.score-r.score:B0(r.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var A0=/^:[\w-]+$/,O0=3,z0=2,k0=1,D0=10,U0=-2,kp=n=>n==="*";function L0(n,r){let s=n.split("/"),i=s.length;return s.some(kp)&&(i+=U0),r&&(i+=z0),s.filter(d=>!kp(d)).reduce((d,f)=>d+(A0.test(f)?O0:f===""?k0:D0),i)}function B0(n,r){return n.length===r.length&&n.slice(0,-1).every((i,d)=>i===r[d])?n[n.length-1]-r[r.length-1]:0}function H0(n,r,s=!1){let{routesMeta:i}=n,d={},f="/",m=[];for(let g=0;g<i.length;++g){let x=i[g],y=g===i.length-1,v=f==="/"?r:r.slice(f.length)||"/",p=Ii({path:x.relativePath,caseSensitive:x.caseSensitive,end:y},v),w=x.route;if(!p&&y&&s&&!i[i.length-1].route.index&&(p=Ii({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},v)),!p)return null;Object.assign(d,p.params),m.push({params:d,pathname:$a([f,p.pathname]),pathnameBase:X0($a([f,p.pathnameBase])),route:w}),p.pathnameBase!=="/"&&(f=$a([f,p.pathnameBase]))}return m}function Ii(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,i]=q0(n.path,n.caseSensitive,n.end),d=r.match(s);if(!d)return null;let f=d[0],m=f.replace(/(.)\/+$/,"$1"),g=d.slice(1);return{params:i.reduce((y,{paramName:v,isOptional:p},w)=>{if(v==="*"){let N=g[w]||"";m=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const M=g[w];return p&&!M?y[v]=void 0:y[v]=(M||"").replace(/%2F/g,"/"),y},{}),pathname:f,pathnameBase:m,pattern:n}}function q0(n,r=!1,s=!0){pa(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let i=[],d="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,g,x)=>(i.push({paramName:g,isOptional:x!=null}),x?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(i.push({paramName:"*"}),d+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?d+="\\/*$":n!==""&&n!=="/"&&(d+="(?:(?=\\/|$))"),[new RegExp(d,r?void 0:"i"),i]}function G0(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return pa(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function Ia(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let s=r.endsWith("/")?r.length-1:r.length,i=n.charAt(s);return i&&i!=="/"?null:n.slice(s)||"/"}var Q0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function V0(n,r="/"){let{pathname:s,search:i="",hash:d=""}=typeof n=="string"?ar(n):n,f;return s?(s=s.replace(/\/\/+/g,"/"),s.startsWith("/")?f=Dp(s.substring(1),"/"):f=Dp(s,r)):f=r,{pathname:f,search:F0(i),hash:K0(d)}}function Dp(n,r){let s=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(d=>{d===".."?s.length>1&&s.pop():d!=="."&&s.push(d)}),s.length>1?s.join("/"):"/"}function Mu(n,r,s,i){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Y0(n){return n.filter((r,s)=>s===0||r.route.path&&r.route.path.length>0)}function sd(n){let r=Y0(n);return r.map((s,i)=>i===r.length-1?s.pathname:s.pathnameBase)}function id(n,r,s,i=!1){let d;typeof n=="string"?d=ar(n):(d={...n},Ke(!d.pathname||!d.pathname.includes("?"),Mu("?","pathname","search",d)),Ke(!d.pathname||!d.pathname.includes("#"),Mu("#","pathname","hash",d)),Ke(!d.search||!d.search.includes("#"),Mu("#","search","hash",d)));let f=n===""||d.pathname==="",m=f?"/":d.pathname,g;if(m==null)g=s;else{let p=r.length-1;if(!i&&m.startsWith("..")){let w=m.split("/");for(;w[0]==="..";)w.shift(),p-=1;d.pathname=w.join("/")}g=p>=0?r[p]:"/"}let x=V0(d,g),y=m&&m!=="/"&&m.endsWith("/"),v=(f||m===".")&&s.endsWith("/");return!x.pathname.endsWith("/")&&(y||v)&&(x.pathname+="/"),x}var $a=n=>n.join("/").replace(/\/\/+/g,"/"),X0=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),F0=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,K0=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,Z0=class{constructor(n,r,s,i=!1){this.status=n,this.statusText=r||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function J0(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function $0(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Og=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zg(n,r){let s=n;if(typeof s!="string"||!Q0.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,d=!1;if(Og)try{let f=new URL(window.location.href),m=s.startsWith("//")?new URL(f.protocol+s):new URL(s),g=Ia(m.pathname,r);m.origin===f.origin&&g!=null?s=g+m.search+m.hash:d=!0}catch{pa(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:d,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var kg=["POST","PUT","PATCH","DELETE"];new Set(kg);var I0=["GET",...kg];new Set(I0);var nr=S.createContext(null);nr.displayName="DataRouter";var no=S.createContext(null);no.displayName="DataRouterState";var P0=S.createContext(!1),Dg=S.createContext({isTransitioning:!1});Dg.displayName="ViewTransition";var W0=S.createContext(new Map);W0.displayName="Fetchers";var eb=S.createContext(null);eb.displayName="Await";var It=S.createContext(null);It.displayName="Navigation";var ps=S.createContext(null);ps.displayName="Location";var ya=S.createContext({outlet:null,matches:[],isDataRoute:!1});ya.displayName="Route";var od=S.createContext(null);od.displayName="RouteError";var Ug="REACT_ROUTER_ERROR",tb="REDIRECT",ab="ROUTE_ERROR_RESPONSE";function nb(n){if(n.startsWith(`${Ug}:${tb}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function lb(n){if(n.startsWith(`${Ug}:${ab}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Z0(r.status,r.statusText,r.data)}catch{}}function rb(n,{relative:r}={}){Ke(lr(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=S.useContext(It),{hash:d,pathname:f,search:m}=gs(n,{relative:r}),g=f;return s!=="/"&&(g=f==="/"?s:$a([s,f])),i.createHref({pathname:g,search:m,hash:d})}function lr(){return S.useContext(ps)!=null}function Mn(){return Ke(lr(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(ps).location}var Lg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Bg(n){S.useContext(It).static||S.useLayoutEffect(n)}function An(){let{isDataRoute:n}=S.useContext(ya);return n?bb():sb()}function sb(){Ke(lr(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(nr),{basename:r,navigator:s}=S.useContext(It),{matches:i}=S.useContext(ya),{pathname:d}=Mn(),f=JSON.stringify(sd(i)),m=S.useRef(!1);return Bg(()=>{m.current=!0}),S.useCallback((x,y={})=>{if(pa(m.current,Lg),!m.current)return;if(typeof x=="number"){s.go(x);return}let v=id(x,JSON.parse(f),d,y.relative==="path");n==null&&r!=="/"&&(v.pathname=v.pathname==="/"?r:$a([r,v.pathname])),(y.replace?s.replace:s.push)(v,y.state,y)},[r,s,f,d,n])}var ib=S.createContext(null);function ob(n){let r=S.useContext(ya).outlet;return S.useMemo(()=>r&&S.createElement(ib.Provider,{value:n},r),[r,n])}function gs(n,{relative:r}={}){let{matches:s}=S.useContext(ya),{pathname:i}=Mn(),d=JSON.stringify(sd(s));return S.useMemo(()=>id(n,JSON.parse(d),i,r==="path"),[n,d,i,r])}function cb(n,r){return Hg(n,r)}function Hg(n,r,s,i,d){Ke(lr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=S.useContext(It),{matches:m}=S.useContext(ya),g=m[m.length-1],x=g?g.params:{},y=g?g.pathname:"/",v=g?g.pathnameBase:"/",p=g&&g.route;{let _=p&&p.path||"";Gg(y,!p||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${_}">) 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.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let w=Mn(),M;if(r){let _=typeof r=="string"?ar(r):r;Ke(v==="/"||_.pathname?.startsWith(v),`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 "${v}" but pathname "${_.pathname}" was given in the \`location\` prop.`),M=_}else M=w;let N=M.pathname||"/",j=N;if(v!=="/"){let _=v.replace(/^\//,"").split("/");j="/"+N.replace(/^\//,"").split("/").slice(_.length).join("/")}let T=_g(n,{pathname:j});pa(p||T!=null,`No routes matched location "${M.pathname}${M.search}${M.hash}" `),pa(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${M.pathname}${M.search}${M.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let z=hb(T&&T.map(_=>Object.assign({},_,{params:Object.assign({},x,_.params),pathname:$a([v,f.encodeLocation?f.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?v:$a([v,f.encodeLocation?f.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),m,s,i,d);return r&&z?S.createElement(ps.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...M},navigationType:"POP"}},z):z}function ub(){let n=vb(),r=J0(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,i="rgba(200,200,200, 0.5)",d={padding:"0.5rem",backgroundColor:i},f={padding:"2px 4px",backgroundColor:i},m=null;return console.error("Error handled by React Router default ErrorBoundary:",n),m=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:f},"ErrorBoundary")," or"," ",S.createElement("code",{style:f},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},r),s?S.createElement("pre",{style:d},s):null,m)}var db=S.createElement(ub,null),qg=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=lb(n.digest);s&&(n=s)}let r=n!==void 0?S.createElement(ya.Provider,{value:this.props.routeContext},S.createElement(od.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(fb,{error:n},r):r}};qg.contextType=P0;var Au=new WeakMap;function fb({children:n,error:r}){let{basename:s}=S.useContext(It);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let i=nb(r.digest);if(i){let d=Au.get(r);if(d)throw d;let f=zg(i.location,s);if(Og&&!Au.get(r))if(f.isExternal||i.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:i.replace}));throw Au.set(r,m),m}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function mb({routeContext:n,match:r,children:s}){let i=S.useContext(nr);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),S.createElement(ya.Provider,{value:n},s)}function hb(n,r=[],s=null,i=null,d=null){if(n==null){if(!s)return null;if(s.errors)n=s.matches;else if(r.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let f=n,m=s?.errors;if(m!=null){let v=f.findIndex(p=>p.route.id&&m?.[p.route.id]!==void 0);Ke(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),f=f.slice(0,Math.min(f.length,v+1))}let g=!1,x=-1;if(s)for(let v=0;v<f.length;v++){let p=f[v];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(x=v),p.route.id){let{loaderData:w,errors:M}=s,N=p.route.loader&&!w.hasOwnProperty(p.route.id)&&(!M||M[p.route.id]===void 0);if(p.route.lazy||N){g=!0,x>=0?f=f.slice(0,x+1):f=[f[0]];break}}}let y=s&&i?(v,p)=>{i(v,{location:s.location,params:s.matches?.[0]?.params??{},unstable_pattern:$0(s.matches),errorInfo:p})}:void 0;return f.reduceRight((v,p,w)=>{let M,N=!1,j=null,T=null;s&&(M=m&&p.route.id?m[p.route.id]:void 0,j=p.route.errorElement||db,g&&(x<0&&w===0?(Gg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,T=null):x===w&&(N=!0,T=p.route.hydrateFallbackElement||null)));let z=r.concat(f.slice(0,w+1)),_=()=>{let Y;return M?Y=j:N?Y=T:p.route.Component?Y=S.createElement(p.route.Component,null):p.route.element?Y=p.route.element:Y=v,S.createElement(mb,{match:p,routeContext:{outlet:v,matches:z,isDataRoute:s!=null},children:Y})};return s&&(p.route.ErrorBoundary||p.route.errorElement||w===0)?S.createElement(qg,{location:s.location,revalidation:s.revalidation,component:j,error:M,children:_(),routeContext:{outlet:null,matches:z,isDataRoute:!0},onError:y}):_()},null)}function cd(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pb(n){let r=S.useContext(nr);return Ke(r,cd(n)),r}function gb(n){let r=S.useContext(no);return Ke(r,cd(n)),r}function yb(n){let r=S.useContext(ya);return Ke(r,cd(n)),r}function ud(n){let r=yb(n),s=r.matches[r.matches.length-1];return Ke(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function xb(){return ud("useRouteId")}function vb(){let n=S.useContext(od),r=gb("useRouteError"),s=ud("useRouteError");return n!==void 0?n:r.errors?.[s]}function bb(){let{router:n}=pb("useNavigate"),r=ud("useNavigate"),s=S.useRef(!1);return Bg(()=>{s.current=!0}),S.useCallback(async(d,f={})=>{pa(s.current,Lg),s.current&&(typeof d=="number"?await n.navigate(d):await n.navigate(d,{fromRouteId:r,...f}))},[n,r])}var Up={};function Gg(n,r,s){!r&&!Up[n]&&(Up[n]=!0,pa(!1,s))}S.memo(Sb);function Sb({routes:n,future:r,state:s,onError:i}){return Hg(n,void 0,s,i,r)}function Pi({to:n,replace:r,state:s,relative:i}){Ke(lr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:d}=S.useContext(It);pa(!d,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=S.useContext(ya),{pathname:m}=Mn(),g=An(),x=id(n,sd(f),m,i==="path"),y=JSON.stringify(x);return S.useEffect(()=>{g(JSON.parse(y),{replace:r,state:s,relative:i})},[g,y,i,r,s]),null}function wb(n){return ob(n.context)}function Jt(n){Ke(!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 Nb({basename:n="/",children:r=null,location:s,navigationType:i="POP",navigator:d,static:f=!1,unstable_useTransitions:m}){Ke(!lr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let g=n.replace(/^\/*/,"/"),x=S.useMemo(()=>({basename:g,navigator:d,static:f,unstable_useTransitions:m,future:{}}),[g,d,f,m]);typeof s=="string"&&(s=ar(s));let{pathname:y="/",search:v="",hash:p="",state:w=null,key:M="default"}=s,N=S.useMemo(()=>{let j=Ia(y,g);return j==null?null:{location:{pathname:j,search:v,hash:p,state:w,key:M},navigationType:i}},[g,y,v,p,w,M,i]);return pa(N!=null,`<Router basename="${g}"> is not able to match the URL "${y}${v}${p}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:S.createElement(It.Provider,{value:x},S.createElement(ps.Provider,{children:r,value:N}))}function Eb({children:n,location:r}){return cb(Vu(n),r)}function Vu(n,r=[]){let s=[];return S.Children.forEach(n,(i,d)=>{if(!S.isValidElement(i))return;let f=[...r,d];if(i.type===S.Fragment){s.push.apply(s,Vu(i.props.children,f));return}Ke(i.type===Jt,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ke(!i.props.index||!i.props.children,"An index route cannot have child routes.");let m={id:i.props.id||f.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(m.children=Vu(i.props.children,f)),s.push(m)}),s}var Fi="get",Ki="application/x-www-form-urlencoded";function lo(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function jb(n){return lo(n)&&n.tagName.toLowerCase()==="button"}function Rb(n){return lo(n)&&n.tagName.toLowerCase()==="form"}function Tb(n){return lo(n)&&n.tagName.toLowerCase()==="input"}function Cb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function _b(n,r){return n.button===0&&(!r||r==="_self")&&!Cb(n)}var Li=null;function Mb(){if(Li===null)try{new FormData(document.createElement("form"),0),Li=!1}catch{Li=!0}return Li}var Ab=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ou(n){return n!=null&&!Ab.has(n)?(pa(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ki}"`),null):n}function Ob(n,r){let s,i,d,f,m;if(Rb(n)){let g=n.getAttribute("action");i=g?Ia(g,r):null,s=n.getAttribute("method")||Fi,d=Ou(n.getAttribute("enctype"))||Ki,f=new FormData(n)}else if(jb(n)||Tb(n)&&(n.type==="submit"||n.type==="image")){let g=n.form;if(g==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=n.getAttribute("formaction")||g.getAttribute("action");if(i=x?Ia(x,r):null,s=n.getAttribute("formmethod")||g.getAttribute("method")||Fi,d=Ou(n.getAttribute("formenctype"))||Ou(g.getAttribute("enctype"))||Ki,f=new FormData(g,n),!Mb()){let{name:y,type:v,value:p}=n;if(v==="image"){let w=y?`${y}.`:"";f.append(`${w}x`,"0"),f.append(`${w}y`,"0")}else y&&f.append(y,p)}}else{if(lo(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=Fi,i=null,d=Ki,m=n}return f&&d==="text/plain"&&(m=f,f=void 0),{action:i,method:s.toLowerCase(),encType:d,formData:f,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dd(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function zb(n,r,s,i){let d=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?d.pathname.endsWith("/")?d.pathname=`${d.pathname}_.${i}`:d.pathname=`${d.pathname}.${i}`:d.pathname==="/"?d.pathname=`_root.${i}`:r&&Ia(d.pathname,r)==="/"?d.pathname=`${r.replace(/\/$/,"")}/_root.${i}`:d.pathname=`${d.pathname.replace(/\/$/,"")}.${i}`,d}async function kb(n,r){if(n.id in r)return r[n.id];try{let s=await import(n.module);return r[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Db(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Ub(n,r,s){let i=await Promise.all(n.map(async d=>{let f=r.routes[d.route.id];if(f){let m=await kb(f,s);return m.links?m.links():[]}return[]}));return qb(i.flat(1).filter(Db).filter(d=>d.rel==="stylesheet"||d.rel==="preload").map(d=>d.rel==="stylesheet"?{...d,rel:"prefetch",as:"style"}:{...d,rel:"prefetch"}))}function Lp(n,r,s,i,d,f){let m=(x,y)=>s[y]?x.route.id!==s[y].route.id:!0,g=(x,y)=>s[y].pathname!==x.pathname||s[y].route.path?.endsWith("*")&&s[y].params["*"]!==x.params["*"];return f==="assets"?r.filter((x,y)=>m(x,y)||g(x,y)):f==="data"?r.filter((x,y)=>{let v=i.routes[x.route.id];if(!v||!v.hasLoader)return!1;if(m(x,y)||g(x,y))return!0;if(x.route.shouldRevalidate){let p=x.route.shouldRevalidate({currentUrl:new URL(d.pathname+d.search+d.hash,window.origin),currentParams:s[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function Lb(n,r,{includeHydrateFallback:s}={}){return Bb(n.map(i=>{let d=r.routes[i.route.id];if(!d)return[];let f=[d.module];return d.clientActionModule&&(f=f.concat(d.clientActionModule)),d.clientLoaderModule&&(f=f.concat(d.clientLoaderModule)),s&&d.hydrateFallbackModule&&(f=f.concat(d.hydrateFallbackModule)),d.imports&&(f=f.concat(d.imports)),f}).flat(1))}function Bb(n){return[...new Set(n)]}function Hb(n){let r={},s=Object.keys(n).sort();for(let i of s)r[i]=n[i];return r}function qb(n,r){let s=new Set;return new Set(r),n.reduce((i,d)=>{let f=JSON.stringify(Hb(d));return s.has(f)||(s.add(f),i.push({key:f,link:d})),i},[])}function Qg(){let n=S.useContext(nr);return dd(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Gb(){let n=S.useContext(no);return dd(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var fd=S.createContext(void 0);fd.displayName="FrameworkContext";function Vg(){let n=S.useContext(fd);return dd(n,"You must render this element inside a <HydratedRouter> element"),n}function Qb(n,r){let s=S.useContext(fd),[i,d]=S.useState(!1),[f,m]=S.useState(!1),{onFocus:g,onBlur:x,onMouseEnter:y,onMouseLeave:v,onTouchStart:p}=r,w=S.useRef(null);S.useEffect(()=>{if(n==="render"&&m(!0),n==="viewport"){let j=z=>{z.forEach(_=>{m(_.isIntersecting)})},T=new IntersectionObserver(j,{threshold:.5});return w.current&&T.observe(w.current),()=>{T.disconnect()}}},[n]),S.useEffect(()=>{if(i){let j=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(j)}}},[i]);let M=()=>{d(!0)},N=()=>{d(!1),m(!1)};return s?n!=="intent"?[f,w,{}]:[f,w,{onFocus:ss(g,M),onBlur:ss(x,N),onMouseEnter:ss(y,M),onMouseLeave:ss(v,N),onTouchStart:ss(p,M)}]:[!1,w,{}]}function ss(n,r){return s=>{n&&n(s),s.defaultPrevented||r(s)}}function Vb({page:n,...r}){let{router:s}=Qg(),i=S.useMemo(()=>_g(s.routes,n,s.basename),[s.routes,n,s.basename]);return i?S.createElement(Xb,{page:n,matches:i,...r}):null}function Yb(n){let{manifest:r,routeModules:s}=Vg(),[i,d]=S.useState([]);return S.useEffect(()=>{let f=!1;return Ub(n,r,s).then(m=>{f||d(m)}),()=>{f=!0}},[n,r,s]),i}function Xb({page:n,matches:r,...s}){let i=Mn(),{future:d,manifest:f,routeModules:m}=Vg(),{basename:g}=Qg(),{loaderData:x,matches:y}=Gb(),v=S.useMemo(()=>Lp(n,r,y,f,i,"data"),[n,r,y,f,i]),p=S.useMemo(()=>Lp(n,r,y,f,i,"assets"),[n,r,y,f,i]),w=S.useMemo(()=>{if(n===i.pathname+i.search+i.hash)return[];let j=new Set,T=!1;if(r.forEach(_=>{let Y=f.routes[_.route.id];!Y||!Y.hasLoader||(!v.some(L=>L.route.id===_.route.id)&&_.route.id in x&&m[_.route.id]?.shouldRevalidate||Y.hasClientLoader?T=!0:j.add(_.route.id))}),j.size===0)return[];let z=zb(n,g,d.unstable_trailingSlashAwareDataRequests,"data");return T&&j.size>0&&z.searchParams.set("_routes",r.filter(_=>j.has(_.route.id)).map(_=>_.route.id).join(",")),[z.pathname+z.search]},[g,d.unstable_trailingSlashAwareDataRequests,x,i,f,v,r,n,m]),M=S.useMemo(()=>Lb(p,f),[p,f]),N=Yb(p);return S.createElement(S.Fragment,null,w.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...s})),M.map(j=>S.createElement("link",{key:j,rel:"modulepreload",href:j,...s})),N.map(({key:j,link:T})=>S.createElement("link",{key:j,nonce:s.nonce,...T,crossOrigin:T.crossOrigin??s.crossOrigin})))}function Fb(...n){return r=>{n.forEach(s=>{typeof s=="function"?s(r):s!=null&&(s.current=r)})}}var Kb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Kb&&(window.__reactRouterVersion="7.13.0")}catch{}function Zb({basename:n,children:r,unstable_useTransitions:s,window:i}){let d=S.useRef();d.current==null&&(d.current=j0({window:i,v5Compat:!0}));let f=d.current,[m,g]=S.useState({action:f.action,location:f.location}),x=S.useCallback(y=>{s===!1?g(y):S.startTransition(()=>g(y))},[s]);return S.useLayoutEffect(()=>f.listen(x),[f,x]),S.createElement(Nb,{basename:n,children:r,location:m.location,navigationType:m.action,navigator:f,unstable_useTransitions:s})}var Yg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,md=S.forwardRef(function({onClick:r,discover:s="render",prefetch:i="none",relative:d,reloadDocument:f,replace:m,state:g,target:x,to:y,preventScrollReset:v,viewTransition:p,unstable_defaultShouldRevalidate:w,...M},N){let{basename:j,unstable_useTransitions:T}=S.useContext(It),z=typeof y=="string"&&Yg.test(y),_=zg(y,j);y=_.to;let Y=rb(y,{relative:d}),[L,te,P]=Qb(i,M),W=Ib(y,{replace:m,state:g,target:x,preventScrollReset:v,relative:d,viewTransition:p,unstable_defaultShouldRevalidate:w,unstable_useTransitions:T});function I(Oe){r&&r(Oe),Oe.defaultPrevented||W(Oe)}let ge=S.createElement("a",{...M,...P,href:_.absoluteURL||Y,onClick:_.isExternal||f?r:I,ref:Fb(N,te),target:x,"data-discover":!z&&s==="render"?"true":void 0});return L&&!z?S.createElement(S.Fragment,null,ge,S.createElement(Vb,{page:Y})):ge});md.displayName="Link";var Xg=S.forwardRef(function({"aria-current":r="page",caseSensitive:s=!1,className:i="",end:d=!1,style:f,to:m,viewTransition:g,children:x,...y},v){let p=gs(m,{relative:y.relative}),w=Mn(),M=S.useContext(no),{navigator:N,basename:j}=S.useContext(It),T=M!=null&&a1(p)&&g===!0,z=N.encodeLocation?N.encodeLocation(p).pathname:p.pathname,_=w.pathname,Y=M&&M.navigation&&M.navigation.location?M.navigation.location.pathname:null;s||(_=_.toLowerCase(),Y=Y?Y.toLowerCase():null,z=z.toLowerCase()),Y&&j&&(Y=Ia(Y,j)||Y);const L=z!=="/"&&z.endsWith("/")?z.length-1:z.length;let te=_===z||!d&&_.startsWith(z)&&_.charAt(L)==="/",P=Y!=null&&(Y===z||!d&&Y.startsWith(z)&&Y.charAt(z.length)==="/"),W={isActive:te,isPending:P,isTransitioning:T},I=te?r:void 0,ge;typeof i=="function"?ge=i(W):ge=[i,te?"active":null,P?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let Oe=typeof f=="function"?f(W):f;return S.createElement(md,{...y,"aria-current":I,className:ge,ref:v,style:Oe,to:m,viewTransition:g},typeof x=="function"?x(W):x)});Xg.displayName="NavLink";var Jb=S.forwardRef(({discover:n="render",fetcherKey:r,navigate:s,reloadDocument:i,replace:d,state:f,method:m=Fi,action:g,onSubmit:x,relative:y,preventScrollReset:v,viewTransition:p,unstable_defaultShouldRevalidate:w,...M},N)=>{let{unstable_useTransitions:j}=S.useContext(It),T=e1(),z=t1(g,{relative:y}),_=m.toLowerCase()==="get"?"get":"post",Y=typeof g=="string"&&Yg.test(g),L=te=>{if(x&&x(te),te.defaultPrevented)return;te.preventDefault();let P=te.nativeEvent.submitter,W=P?.getAttribute("formmethod")||m,I=()=>T(P||te.currentTarget,{fetcherKey:r,method:W,navigate:s,replace:d,state:f,relative:y,preventScrollReset:v,viewTransition:p,unstable_defaultShouldRevalidate:w});j&&s!==!1?S.startTransition(()=>I()):I()};return S.createElement("form",{ref:N,method:_,action:z,onSubmit:i?x:L,...M,"data-discover":!Y&&n==="render"?"true":void 0})});Jb.displayName="Form";function $b(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Fg(n){let r=S.useContext(nr);return Ke(r,$b(n)),r}function Ib(n,{target:r,replace:s,state:i,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:x}={}){let y=An(),v=Mn(),p=gs(n,{relative:f});return S.useCallback(w=>{if(_b(w,r)){w.preventDefault();let M=s!==void 0?s:fs(v)===fs(p),N=()=>y(n,{replace:M,state:i,preventScrollReset:d,relative:f,viewTransition:m,unstable_defaultShouldRevalidate:g});x?S.startTransition(()=>N()):N()}},[v,y,p,s,i,r,n,d,f,m,g,x])}var Pb=0,Wb=()=>`__${String(++Pb)}__`;function e1(){let{router:n}=Fg("useSubmit"),{basename:r}=S.useContext(It),s=xb(),i=n.fetch,d=n.navigate;return S.useCallback(async(f,m={})=>{let{action:g,method:x,encType:y,formData:v,body:p}=Ob(f,r);if(m.navigate===!1){let w=m.fetcherKey||Wb();await i(w,s,m.action||g,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:v,body:p,formMethod:m.method||x,formEncType:m.encType||y,flushSync:m.flushSync})}else await d(m.action||g,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:v,body:p,formMethod:m.method||x,formEncType:m.encType||y,replace:m.replace,state:m.state,fromRouteId:s,flushSync:m.flushSync,viewTransition:m.viewTransition})},[i,d,r,s])}function t1(n,{relative:r}={}){let{basename:s}=S.useContext(It),i=S.useContext(ya);Ke(i,"useFormAction must be used inside a RouteContext");let[d]=i.matches.slice(-1),f={...gs(n||".",{relative:r})},m=Mn();if(n==null){f.search=m.search;let g=new URLSearchParams(f.search),x=g.getAll("index");if(x.some(v=>v==="")){g.delete("index"),x.filter(p=>p).forEach(p=>g.append("index",p));let v=g.toString();f.search=v?`?${v}`:""}}return(!n||n===".")&&d.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(f.pathname=f.pathname==="/"?s:$a([s,f.pathname])),fs(f)}function a1(n,{relative:r}={}){let s=S.useContext(Dg);Ke(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Fg("useViewTransitionState"),d=gs(n,{relative:r});if(!s.isTransitioning)return!1;let f=Ia(s.currentLocation.pathname,i)||s.currentLocation.pathname,m=Ia(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Ii(d.pathname,m)!=null||Ii(d.pathname,f)!=null}var n1=Cg();const l1=Tg(n1);var rr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},r1={setTimeout:(n,r)=>setTimeout(n,r),clearTimeout:n=>clearTimeout(n),setInterval:(n,r)=>setInterval(n,r),clearInterval:n=>clearInterval(n)},s1=class{#e=r1;#t=!1;setTimeoutProvider(n){this.#e=n}setTimeout(n,r){return this.#e.setTimeout(n,r)}clearTimeout(n){this.#e.clearTimeout(n)}setInterval(n,r){return this.#e.setInterval(n,r)}clearInterval(n){this.#e.clearInterval(n)}},al=new s1;function i1(n){setTimeout(n,0)}var rl=typeof window>"u"||"Deno"in globalThis;function Rt(){}function o1(n,r){return typeof n=="function"?n(r):n}function Yu(n){return typeof n=="number"&&n>=0&&n!==1/0}function Kg(n,r){return Math.max(n+(r||0)-Date.now(),0)}function _n(n,r){return typeof n=="function"?n(r):n}function oa(n,r){return typeof n=="function"?n(r):n}function Bp(n,r){const{type:s="all",exact:i,fetchStatus:d,predicate:f,queryKey:m,stale:g}=n;if(m){if(i){if(r.queryHash!==hd(m,r.options))return!1}else if(!ms(r.queryKey,m))return!1}if(s!=="all"){const x=r.isActive();if(s==="active"&&!x||s==="inactive"&&x)return!1}return!(typeof g=="boolean"&&r.isStale()!==g||d&&d!==r.state.fetchStatus||f&&!f(r))}function Hp(n,r){const{exact:s,status:i,predicate:d,mutationKey:f}=n;if(f){if(!r.options.mutationKey)return!1;if(s){if(sl(r.options.mutationKey)!==sl(f))return!1}else if(!ms(r.options.mutationKey,f))return!1}return!(i&&r.state.status!==i||d&&!d(r))}function hd(n,r){return(r?.queryKeyHashFn||sl)(n)}function sl(n){return JSON.stringify(n,(r,s)=>Xu(s)?Object.keys(s).sort().reduce((i,d)=>(i[d]=s[d],i),{}):s)}function ms(n,r){return n===r?!0:typeof n!=typeof r?!1:n&&r&&typeof n=="object"&&typeof r=="object"?Object.keys(r).every(s=>ms(n[s],r[s])):!1}var c1=Object.prototype.hasOwnProperty;function Zg(n,r,s=0){if(n===r)return n;if(s>500)return r;const i=qp(n)&&qp(r);if(!i&&!(Xu(n)&&Xu(r)))return r;const f=(i?n:Object.keys(n)).length,m=i?r:Object.keys(r),g=m.length,x=i?new Array(g):{};let y=0;for(let v=0;v<g;v++){const p=i?v:m[v],w=n[p],M=r[p];if(w===M){x[p]=w,(i?v<f:c1.call(n,p))&&y++;continue}if(w===null||M===null||typeof w!="object"||typeof M!="object"){x[p]=M;continue}const N=Zg(w,M,s+1);x[p]=N,N===w&&y++}return f===g&&y===f?n:x}function Wi(n,r){if(!r||Object.keys(n).length!==Object.keys(r).length)return!1;for(const s in n)if(n[s]!==r[s])return!1;return!0}function qp(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Xu(n){if(!Gp(n))return!1;const r=n.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!Gp(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Gp(n){return Object.prototype.toString.call(n)==="[object Object]"}function u1(n){return new Promise(r=>{al.setTimeout(r,n)})}function Fu(n,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,r):s.structuralSharing!==!1?Zg(n,r):r}function d1(n,r,s=0){const i=[...n,r];return s&&i.length>s?i.slice(1):i}function f1(n,r,s=0){const i=[r,...n];return s&&i.length>s?i.slice(0,-1):i}var pd=Symbol();function Jg(n,r){return!n.queryFn&&r?.initialPromise?()=>r.initialPromise:!n.queryFn||n.queryFn===pd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function gd(n,r){return typeof n=="function"?n(...r):!!n}function m1(n,r,s){let i=!1,d;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(d??=r(),i||(i=!0,d.aborted?s():d.addEventListener("abort",s,{once:!0})),d)}),n}var h1=class extends rr{#e;#t;#a;constructor(){super(),this.#a=n=>{if(!rl&&window.addEventListener){const r=()=>n();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#a=n,this.#t?.(),this.#t=n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(n){this.#e!==n&&(this.#e=n,this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(r=>{r(n)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},yd=new h1;function Ku(){let n,r;const s=new Promise((d,f)=>{n=d,r=f});s.status="pending",s.catch(()=>{});function i(d){Object.assign(s,d),delete s.resolve,delete s.reject}return s.resolve=d=>{i({status:"fulfilled",value:d}),n(d)},s.reject=d=>{i({status:"rejected",reason:d}),r(d)},s}var p1=i1;function g1(){let n=[],r=0,s=g=>{g()},i=g=>{g()},d=p1;const f=g=>{r?n.push(g):d(()=>{s(g)})},m=()=>{const g=n;n=[],g.length&&d(()=>{i(()=>{g.forEach(x=>{s(x)})})})};return{batch:g=>{let x;r++;try{x=g()}finally{r--,r||m()}return x},batchCalls:g=>(...x)=>{f(()=>{g(...x)})},schedule:f,setNotifyFunction:g=>{s=g},setBatchNotifyFunction:g=>{i=g},setScheduler:g=>{d=g}}}var it=g1(),y1=class extends rr{#e=!0;#t;#a;constructor(){super(),this.#a=n=>{if(!rl&&window.addEventListener){const r=()=>n(!0),s=()=>n(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(n){this.#a=n,this.#t?.(),this.#t=n(this.setOnline.bind(this))}setOnline(n){this.#e!==n&&(this.#e=n,this.listeners.forEach(s=>{s(n)}))}isOnline(){return this.#e}},eo=new y1;function x1(n){return Math.min(1e3*2**n,3e4)}function $g(n){return(n??"online")==="online"?eo.isOnline():!0}var Zu=class extends Error{constructor(n){super("CancelledError"),this.revert=n?.revert,this.silent=n?.silent}};function Ig(n){let r=!1,s=0,i;const d=Ku(),f=()=>d.status!=="pending",m=j=>{if(!f()){const T=new Zu(j);w(T),n.onCancel?.(T)}},g=()=>{r=!0},x=()=>{r=!1},y=()=>yd.isFocused()&&(n.networkMode==="always"||eo.isOnline())&&n.canRun(),v=()=>$g(n.networkMode)&&n.canRun(),p=j=>{f()||(i?.(),d.resolve(j))},w=j=>{f()||(i?.(),d.reject(j))},M=()=>new Promise(j=>{i=T=>{(f()||y())&&j(T)},n.onPause?.()}).then(()=>{i=void 0,f()||n.onContinue?.()}),N=()=>{if(f())return;let j;const T=s===0?n.initialPromise:void 0;try{j=T??n.fn()}catch(z){j=Promise.reject(z)}Promise.resolve(j).then(p).catch(z=>{if(f())return;const _=n.retry??(rl?0:3),Y=n.retryDelay??x1,L=typeof Y=="function"?Y(s,z):Y,te=_===!0||typeof _=="number"&&s<_||typeof _=="function"&&_(s,z);if(r||!te){w(z);return}s++,n.onFail?.(s,z),u1(L).then(()=>y()?void 0:M()).then(()=>{r?w(z):N()})})};return{promise:d,status:()=>d.status,cancel:m,continue:()=>(i?.(),d),cancelRetry:g,continueRetry:x,canStart:v,start:()=>(v()?N():M().then(N),d)}}var Pg=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yu(this.gcTime)&&(this.#e=al.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(rl?1/0:300*1e3))}clearGcTimeout(){this.#e&&(al.clearTimeout(this.#e),this.#e=void 0)}},v1=class extends Pg{#e;#t;#a;#l;#n;#s;#i;constructor(n){super(),this.#i=!1,this.#s=n.defaultOptions,this.setOptions(n.options),this.observers=[],this.#l=n.client,this.#a=this.#l.getQueryCache(),this.queryKey=n.queryKey,this.queryHash=n.queryHash,this.#e=Vp(this.options),this.state=n.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(n){if(this.options={...this.#s,...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=Vp(this.options);r.data!==void 0&&(this.setState(Qp(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(n,r){const s=Fu(this.state.data,n,this.options);return this.#r({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(n,r){this.#r({type:"setState",state:n,setStateOptions:r})}cancel(n){const r=this.#n?.promise;return this.#n?.cancel(n),r?r.then(Rt).catch(Rt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(n=>oa(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===pd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>_n(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!Kg(this.state.dataUpdatedAt,n)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(r=>r!==n),this.observers.length||(this.#n&&(this.#i?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#r({type:"invalidate"})}async fetch(n,r){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(n&&this.setOptions(n),!this.options.queryFn){const g=this.observers.find(x=>x.options.queryFn);g&&this.setOptions(g.options)}const s=new AbortController,i=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(this.#i=!0,s.signal)})},d=()=>{const g=Jg(this.options,r),y=(()=>{const v={client:this.#l,queryKey:this.queryKey,meta:this.meta};return i(v),v})();return this.#i=!1,this.options.persister?this.options.persister(g,y,this):g(y)},m=(()=>{const g={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:d};return i(g),g})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#r({type:"fetch",meta:m.fetchOptions?.meta}),this.#n=Ig({initialPromise:r?.initialPromise,fn:m.fetchFn,onCancel:g=>{g instanceof Zu&&g.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(g,x)=>{this.#r({type:"failed",failureCount:g,error:x})},onPause:()=>{this.#r({type:"pause"})},onContinue:()=>{this.#r({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const g=await this.#n.start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),this.#a.config.onSuccess?.(g,this),this.#a.config.onSettled?.(g,this.state.error,this),g}catch(g){if(g instanceof Zu){if(g.silent)return this.#n.promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw this.#r({type:"error",error:g}),this.#a.config.onError?.(g,this),this.#a.config.onSettled?.(this.state.data,g,this),g}finally{this.scheduleGc()}}#r(n){const r=s=>{switch(n.type){case"failed":return{...s,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Wg(s.data,this.options),fetchMeta:n.meta??null};case"success":const i={...s,...Qp(n.data,n.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=n.manual?i:void 0,i;case"error":const d=n.error;return{...s,error:d,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...n.state}}};this.state=r(this.state),it.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:n})})}};function Wg(n,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$g(r.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Qp(n,r){return{data:n,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Vp(n){const r=typeof n.initialData=="function"?n.initialData():n.initialData,s=r!==void 0,i=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var b1=class extends rr{constructor(n,r){super(),this.options=r,this.#e=n,this.#r=null,this.#i=Ku(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#a=void 0;#l=void 0;#n;#s;#i;#r;#p;#f;#m;#c;#u;#o;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Yp(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ju(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ju(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(n){const r=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof oa(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),r._defaulted&&!Wi(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&Xp(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),i&&(this.#t!==s||oa(this.options.enabled,this.#t)!==oa(r.enabled,this.#t)||_n(this.options.staleTime,this.#t)!==_n(r.staleTime,this.#t))&&this.#g();const d=this.#y();i&&(this.#t!==s||oa(this.options.enabled,this.#t)!==oa(r.enabled,this.#t)||d!==this.#o)&&this.#x(d)}getOptimisticResult(n){const r=this.#e.getQueryCache().build(this.#e,n),s=this.createResult(r,n);return w1(this,s)&&(this.#l=s,this.#s=this.options,this.#n=this.#t.state),s}getCurrentResult(){return this.#l}trackResult(n,r){return new Proxy(n,{get:(s,i)=>(this.trackProp(i),r?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(n){this.#h.add(n)}getCurrentQuery(){return this.#t}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const r=this.#e.defaultQueryOptions(n),s=this.#e.getQueryCache().build(this.#e,r);return s.fetch().then(()=>this.createResult(s,r))}fetch(n){return this.#d({...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#l))}#d(n){this.#w();let r=this.#t.fetch(this.options,n);return n?.throwOnError||(r=r.catch(Rt)),r}#g(){this.#b();const n=_n(this.options.staleTime,this.#t);if(rl||this.#l.isStale||!Yu(n))return;const s=Kg(this.#l.dataUpdatedAt,n)+1;this.#c=al.setTimeout(()=>{this.#l.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#x(n){this.#S(),this.#o=n,!(rl||oa(this.options.enabled,this.#t)===!1||!Yu(this.#o)||this.#o===0)&&(this.#u=al.setInterval(()=>{(this.options.refetchIntervalInBackground||yd.isFocused())&&this.#d()},this.#o))}#v(){this.#g(),this.#x(this.#y())}#b(){this.#c&&(al.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(al.clearInterval(this.#u),this.#u=void 0)}createResult(n,r){const s=this.#t,i=this.options,d=this.#l,f=this.#n,m=this.#s,x=n!==s?n.state:this.#a,{state:y}=n;let v={...y},p=!1,w;if(r._optimisticResults){const I=this.hasListeners(),ge=!I&&Yp(n,r),Oe=I&&Xp(n,s,r,i);(ge||Oe)&&(v={...v,...Wg(y.data,n.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:M,errorUpdatedAt:N,status:j}=v;w=v.data;let T=!1;if(r.placeholderData!==void 0&&w===void 0&&j==="pending"){let I;d?.isPlaceholderData&&r.placeholderData===m?.placeholderData?(I=d.data,T=!0):I=typeof r.placeholderData=="function"?r.placeholderData(this.#m?.state.data,this.#m):r.placeholderData,I!==void 0&&(j="success",w=Fu(d?.data,I,r),p=!0)}if(r.select&&w!==void 0&&!T)if(d&&w===f?.data&&r.select===this.#p)w=this.#f;else try{this.#p=r.select,w=r.select(w),w=Fu(d?.data,w,r),this.#f=w,this.#r=null}catch(I){this.#r=I}this.#r&&(M=this.#r,w=this.#f,N=Date.now(),j="error");const z=v.fetchStatus==="fetching",_=j==="pending",Y=j==="error",L=_&&z,te=w!==void 0,W={status:j,fetchStatus:v.fetchStatus,isPending:_,isSuccess:j==="success",isError:Y,isInitialLoading:L,isLoading:L,data:w,dataUpdatedAt:v.dataUpdatedAt,error:M,errorUpdatedAt:N,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>x.dataUpdateCount||v.errorUpdateCount>x.errorUpdateCount,isFetching:z,isRefetching:z&&!_,isLoadingError:Y&&!te,isPaused:v.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:Y&&te,isStale:xd(n,r),refetch:this.refetch,promise:this.#i,isEnabled:oa(r.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const I=W.data!==void 0,ge=W.status==="error"&&!I,Oe=K=>{ge?K.reject(W.error):I&&K.resolve(W.data)},ne=()=>{const K=this.#i=W.promise=Ku();Oe(K)},Q=this.#i;switch(Q.status){case"pending":n.queryHash===s.queryHash&&Oe(Q);break;case"fulfilled":(ge||W.data!==Q.value)&&ne();break;case"rejected":(!ge||W.error!==Q.reason)&&ne();break}}return W}updateResult(){const n=this.#l,r=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#s=this.options,this.#n.data!==void 0&&(this.#m=this.#t),Wi(r,n))return;this.#l=r;const s=()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,d=typeof i=="function"?i():i;if(d==="all"||!d&&!this.#h.size)return!0;const f=new Set(d??this.#h);return this.options.throwOnError&&f.add("error"),Object.keys(this.#l).some(m=>{const g=m;return this.#l[g]!==n[g]&&f.has(g)})};this.#N({listeners:s()})}#w(){const n=this.#e.getQueryCache().build(this.#e,this.options);if(n===this.#t)return;const r=this.#t;this.#t=n,this.#a=n.state,this.hasListeners()&&(r?.removeObserver(this),n.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#N(n){it.batch(()=>{n.listeners&&this.listeners.forEach(r=>{r(this.#l)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function S1(n,r){return oa(r.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&r.retryOnMount===!1)}function Yp(n,r){return S1(n,r)||n.state.data!==void 0&&Ju(n,r,r.refetchOnMount)}function Ju(n,r,s){if(oa(r.enabled,n)!==!1&&_n(r.staleTime,n)!=="static"){const i=typeof s=="function"?s(n):s;return i==="always"||i!==!1&&xd(n,r)}return!1}function Xp(n,r,s,i){return(n!==r||oa(i.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&xd(n,s)}function xd(n,r){return oa(r.enabled,n)!==!1&&n.isStaleByTime(_n(r.staleTime,n))}function w1(n,r){return!Wi(n.getCurrentResult(),r)}function Fp(n){return{onFetch:(r,s)=>{const i=r.options,d=r.fetchOptions?.meta?.fetchMore?.direction,f=r.state.data?.pages||[],m=r.state.data?.pageParams||[];let g={pages:[],pageParams:[]},x=0;const y=async()=>{let v=!1;const p=N=>{m1(N,()=>r.signal,()=>v=!0)},w=Jg(r.options,r.fetchOptions),M=async(N,j,T)=>{if(v)return Promise.reject();if(j==null&&N.pages.length)return Promise.resolve(N);const _=(()=>{const P={client:r.client,queryKey:r.queryKey,pageParam:j,direction:T?"backward":"forward",meta:r.options.meta};return p(P),P})(),Y=await w(_),{maxPages:L}=r.options,te=T?f1:d1;return{pages:te(N.pages,Y,L),pageParams:te(N.pageParams,j,L)}};if(d&&f.length){const N=d==="backward",j=N?N1:Kp,T={pages:f,pageParams:m},z=j(i,T);g=await M(T,z,N)}else{const N=n??f.length;do{const j=x===0?m[0]??i.initialPageParam:Kp(i,g);if(x>0&&j==null)break;g=await M(g,j),x++}while(x<N)}return g};r.options.persister?r.fetchFn=()=>r.options.persister?.(y,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=y}}}function Kp(n,{pages:r,pageParams:s}){const i=r.length-1;return r.length>0?n.getNextPageParam(r[i],r,s[i],s):void 0}function N1(n,{pages:r,pageParams:s}){return r.length>0?n.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var E1=class extends Pg{#e;#t;#a;#l;constructor(n){super(),this.#e=n.client,this.mutationId=n.mutationId,this.#a=n.mutationCache,this.#t=[],this.state=n.state||ey(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){this.#t.includes(n)||(this.#t.push(n),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){this.#t=this.#t.filter(r=>r!==n),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#l?.continue()??this.execute(this.state.variables)}async execute(n){const r=()=>{this.#n({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#l=Ig({fn:()=>this.options.mutationFn?this.options.mutationFn(n,s):Promise.reject(new Error("No mutationFn found")),onFail:(f,m)=>{this.#n({type:"failed",failureCount:f,error:m})},onPause:()=>{this.#n({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const i=this.state.status==="pending",d=!this.#l.canStart();try{if(i)r();else{this.#n({type:"pending",variables:n,isPaused:d}),this.#a.config.onMutate&&await this.#a.config.onMutate(n,this,s);const m=await this.options.onMutate?.(n,s);m!==this.state.context&&this.#n({type:"pending",context:m,variables:n,isPaused:d})}const f=await this.#l.start();return await this.#a.config.onSuccess?.(f,n,this.state.context,this,s),await this.options.onSuccess?.(f,n,this.state.context,s),await this.#a.config.onSettled?.(f,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(f,null,n,this.state.context,s),this.#n({type:"success",data:f}),f}catch(f){try{await this.#a.config.onError?.(f,n,this.state.context,this,s)}catch(m){Promise.reject(m)}try{await this.options.onError?.(f,n,this.state.context,s)}catch(m){Promise.reject(m)}try{await this.#a.config.onSettled?.(void 0,f,this.state.variables,this.state.context,this,s)}catch(m){Promise.reject(m)}try{await this.options.onSettled?.(void 0,f,n,this.state.context,s)}catch(m){Promise.reject(m)}throw this.#n({type:"error",error:f}),f}finally{this.#a.runNext(this)}}#n(n){const r=s=>{switch(n.type){case"failed":return{...s,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...s,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:n.error,failureCount:s.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=r(this.state),it.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(n)}),this.#a.notify({mutation:this,type:"updated",action:n})})}};function ey(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var j1=class extends rr{constructor(n={}){super(),this.config=n,this.#e=new Set,this.#t=new Map,this.#a=0}#e;#t;#a;build(n,r,s){const i=new E1({client:n,mutationCache:this,mutationId:++this.#a,options:n.defaultMutationOptions(r),state:s});return this.add(i),i}add(n){this.#e.add(n);const r=Bi(n);if(typeof r=="string"){const s=this.#t.get(r);s?s.push(n):this.#t.set(r,[n])}this.notify({type:"added",mutation:n})}remove(n){if(this.#e.delete(n)){const r=Bi(n);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const i=s.indexOf(n);i!==-1&&s.splice(i,1)}else s[0]===n&&this.#t.delete(r)}}this.notify({type:"removed",mutation:n})}canRun(n){const r=Bi(n);if(typeof r=="string"){const i=this.#t.get(r)?.find(d=>d.state.status==="pending");return!i||i===n}else return!0}runNext(n){const r=Bi(n);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==n&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){it.batch(()=>{this.#e.forEach(n=>{this.notify({type:"removed",mutation:n})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(n){const r={exact:!0,...n};return this.getAll().find(s=>Hp(r,s))}findAll(n={}){return this.getAll().filter(r=>Hp(n,r))}notify(n){it.batch(()=>{this.listeners.forEach(r=>{r(n)})})}resumePausedMutations(){const n=this.getAll().filter(r=>r.state.isPaused);return it.batch(()=>Promise.all(n.map(r=>r.continue().catch(Rt))))}};function Bi(n){return n.options.scope?.id}var R1=class extends rr{#e;#t=void 0;#a;#l;constructor(r,s){super(),this.#e=r,this.setOptions(s),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#e.defaultMutationOptions(r),Wi(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),s?.mutationKey&&this.options.mutationKey&&sl(s.mutationKey)!==sl(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(r){this.#n(),this.#s(r)}getCurrentResult(){return this.#t}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#n(),this.#s()}mutate(r,s){return this.#l=s,this.#a?.removeObserver(this),this.#a=this.#e.getMutationCache().build(this.#e,this.options),this.#a.addObserver(this),this.#a.execute(r)}#n(){const r=this.#a?.state??ey();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#s(r){it.batch(()=>{if(this.#l&&this.hasListeners()){const s=this.#t.variables,i=this.#t.context,d={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#l.onSuccess?.(r.data,s,i,d)}catch(f){Promise.reject(f)}try{this.#l.onSettled?.(r.data,null,s,i,d)}catch(f){Promise.reject(f)}}else if(r?.type==="error"){try{this.#l.onError?.(r.error,s,i,d)}catch(f){Promise.reject(f)}try{this.#l.onSettled?.(void 0,r.error,s,i,d)}catch(f){Promise.reject(f)}}}this.listeners.forEach(s=>{s(this.#t)})})}},T1=class extends rr{constructor(n={}){super(),this.config=n,this.#e=new Map}#e;build(n,r,s){const i=r.queryKey,d=r.queryHash??hd(i,r);let f=this.get(d);return f||(f=new v1({client:n,queryKey:i,queryHash:d,options:n.defaultQueryOptions(r),state:s,defaultOptions:n.getQueryDefaults(i)}),this.add(f)),f}add(n){this.#e.has(n.queryHash)||(this.#e.set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const r=this.#e.get(n.queryHash);r&&(n.destroy(),r===n&&this.#e.delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){it.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return this.#e.get(n)}getAll(){return[...this.#e.values()]}find(n){const r={exact:!0,...n};return this.getAll().find(s=>Bp(r,s))}findAll(n={}){const r=this.getAll();return Object.keys(n).length>0?r.filter(s=>Bp(n,s)):r}notify(n){it.batch(()=>{this.listeners.forEach(r=>{r(n)})})}onFocus(){it.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},C1=class{#e;#t;#a;#l;#n;#s;#i;#r;constructor(n={}){this.#e=n.queryCache||new T1,this.#t=n.mutationCache||new j1,this.#a=n.defaultOptions||{},this.#l=new Map,this.#n=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#i=yd.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#r=eo.subscribe(async n=>{n&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#i?.(),this.#i=void 0,this.#r?.(),this.#r=void 0)}isFetching(n){return this.#e.findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return this.#t.findAll({...n,status:"pending"}).length}getQueryData(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(n){const r=this.defaultQueryOptions(n),s=this.#e.build(this,r),i=s.state.data;return i===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(_n(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(i))}getQueriesData(n){return this.#e.findAll(n).map(({queryKey:r,state:s})=>{const i=s.data;return[r,i]})}setQueryData(n,r,s){const i=this.defaultQueryOptions({queryKey:n}),f=this.#e.get(i.queryHash)?.state.data,m=o1(r,f);if(m!==void 0)return this.#e.build(this,i).setData(m,{...s,manual:!0})}setQueriesData(n,r,s){return it.batch(()=>this.#e.findAll(n).map(({queryKey:i})=>[i,this.setQueryData(i,r,s)]))}getQueryState(n){const r=this.defaultQueryOptions({queryKey:n});return this.#e.get(r.queryHash)?.state}removeQueries(n){const r=this.#e;it.batch(()=>{r.findAll(n).forEach(s=>{r.remove(s)})})}resetQueries(n,r){const s=this.#e;return it.batch(()=>(s.findAll(n).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...n},r)))}cancelQueries(n,r={}){const s={revert:!0,...r},i=it.batch(()=>this.#e.findAll(n).map(d=>d.cancel(s)));return Promise.all(i).then(Rt).catch(Rt)}invalidateQueries(n,r={}){return it.batch(()=>(this.#e.findAll(n).forEach(s=>{s.invalidate()}),n?.refetchType==="none"?Promise.resolve():this.refetchQueries({...n,type:n?.refetchType??n?.type??"active"},r)))}refetchQueries(n,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},i=it.batch(()=>this.#e.findAll(n).filter(d=>!d.isDisabled()&&!d.isStatic()).map(d=>{let f=d.fetch(void 0,s);return s.throwOnError||(f=f.catch(Rt)),d.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(i).then(Rt)}fetchQuery(n){const r=this.defaultQueryOptions(n);r.retry===void 0&&(r.retry=!1);const s=this.#e.build(this,r);return s.isStaleByTime(_n(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Rt).catch(Rt)}fetchInfiniteQuery(n){return n.behavior=Fp(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Rt).catch(Rt)}ensureInfiniteQueryData(n){return n.behavior=Fp(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return eo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#a}setDefaultOptions(n){this.#a=n}setQueryDefaults(n,r){this.#l.set(sl(n),{queryKey:n,defaultOptions:r})}getQueryDefaults(n){const r=[...this.#l.values()],s={};return r.forEach(i=>{ms(n,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(n,r){this.#n.set(sl(n),{mutationKey:n,defaultOptions:r})}getMutationDefaults(n){const r=[...this.#n.values()],s={};return r.forEach(i=>{ms(n,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const r={...this.#a.queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return r.queryHash||(r.queryHash=hd(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===pd&&(r.enabled=!1),r}defaultMutationOptions(n){return n?._defaulted?n:{...this.#a.mutations,...n?.mutationKey&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ty=S.createContext(void 0),_a=n=>{const r=S.useContext(ty);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},_1=({client:n,children:r})=>(S.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),u.jsx(ty.Provider,{value:n,children:r})),ay=S.createContext(!1),M1=()=>S.useContext(ay);ay.Provider;function A1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var O1=S.createContext(A1()),z1=()=>S.useContext(O1),k1=(n,r,s)=>{const i=s?.state.error&&typeof n.throwOnError=="function"?gd(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||i)&&(r.isReset()||(n.retryOnMount=!1))},D1=n=>{S.useEffect(()=>{n.clearReset()},[n])},U1=({result:n,errorResetBoundary:r,throwOnError:s,query:i,suspense:d})=>n.isError&&!r.isReset()&&!n.isFetching&&i&&(d&&n.data===void 0||gd(s,[n.error,i])),L1=n=>{if(n.suspense){const s=d=>d==="static"?d:Math.max(d??1e3,1e3),i=n.staleTime;n.staleTime=typeof i=="function"?(...d)=>s(i(...d)):s(i),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},B1=(n,r)=>n.isLoading&&n.isFetching&&!r,H1=(n,r)=>n?.suspense&&r.isPending,Zp=(n,r,s)=>r.fetchOptimistic(n).catch(()=>{s.clearReset()});function q1(n,r,s){const i=M1(),d=z1(),f=_a(),m=f.defaultQueryOptions(n);f.getDefaultOptions().queries?._experimental_beforeQuery?.(m);const g=f.getQueryCache().get(m.queryHash);m._optimisticResults=i?"isRestoring":"optimistic",L1(m),k1(m,d,g),D1(d);const x=!f.getQueryCache().get(m.queryHash),[y]=S.useState(()=>new r(f,m)),v=y.getOptimisticResult(m),p=!i&&n.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(w=>{const M=p?y.subscribe(it.batchCalls(w)):Rt;return y.updateResult(),M},[y,p]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),S.useEffect(()=>{y.setOptions(m)},[m,y]),H1(m,v))throw Zp(m,y,d);if(U1({result:v,errorResetBoundary:d,throwOnError:m.throwOnError,query:g,suspense:m.suspense}))throw v.error;return f.getDefaultOptions().queries?._experimental_afterQuery?.(m,v),m.experimental_prefetchInRender&&!rl&&B1(v,i)&&(x?Zp(m,y,d):g?.promise)?.catch(Rt).finally(()=>{y.updateResult()}),m.notifyOnChangeProps?v:y.trackResult(v)}function Pa(n,r){return q1(n,b1)}function Wa(n,r){const s=_a(),[i]=S.useState(()=>new R1(s,n));S.useEffect(()=>{i.setOptions(n)},[i,n]);const d=S.useSyncExternalStore(S.useCallback(m=>i.subscribe(it.batchCalls(m)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),f=S.useCallback((m,g)=>{i.mutate(m,g).catch(Rt)},[i]);if(d.error&&gd(i.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:f,mutateAsync:d.mutate}}function G1(n){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r.appendChild(s),s.styleSheet?s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n))}const Q1=n=>{switch(n){case"success":return X1;case"info":return K1;case"warning":return F1;case"error":return Z1;default:return null}},V1=Array(12).fill(0),Y1=({visible:n,className:r})=>ee.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":n},ee.createElement("div",{className:"sonner-spinner"},V1.map((s,i)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),X1=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),F1=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),K1=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Z1=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),J1=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),$1=()=>{const[n,r]=ee.useState(document.hidden);return ee.useEffect(()=>{const s=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),n};let $u=1;class I1{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const s=this.subscribers.indexOf(r);this.subscribers.splice(s,1)}),this.publish=r=>{this.subscribers.forEach(s=>s(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var s;const{message:i,...d}=r,f=typeof r?.id=="number"||((s=r.id)==null?void 0:s.length)>0?r.id:$u++,m=this.toasts.find(x=>x.id===f),g=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),m?this.toasts=this.toasts.map(x=>x.id===f?(this.publish({...x,...r,id:f,title:i}),{...x,...r,id:f,dismissible:g,title:i}):x):this.addToast({title:i,...d,dismissible:g,id:f}),f},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:r,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(i=>i({id:s.id,dismiss:!0}))}),r),this.message=(r,s)=>this.create({...s,message:r}),this.error=(r,s)=>this.create({...s,message:r,type:"error"}),this.success=(r,s)=>this.create({...s,type:"success",message:r}),this.info=(r,s)=>this.create({...s,type:"info",message:r}),this.warning=(r,s)=>this.create({...s,type:"warning",message:r}),this.loading=(r,s)=>this.create({...s,type:"loading",message:r}),this.promise=(r,s)=>{if(!s)return;let i;s.loading!==void 0&&(i=this.create({...s,promise:r,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const d=Promise.resolve(r instanceof Function?r():r);let f=i!==void 0,m;const g=d.then(async y=>{if(m=["resolve",y],ee.isValidElement(y))f=!1,this.create({id:i,type:"default",message:y});else if(W1(y)&&!y.ok){f=!1;const p=typeof s.error=="function"?await s.error(`HTTP error! status: ${y.status}`):s.error,w=typeof s.description=="function"?await s.description(`HTTP error! status: ${y.status}`):s.description,N=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:w,...N})}else if(y instanceof Error){f=!1;const p=typeof s.error=="function"?await s.error(y):s.error,w=typeof s.description=="function"?await s.description(y):s.description,N=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:w,...N})}else if(s.success!==void 0){f=!1;const p=typeof s.success=="function"?await s.success(y):s.success,w=typeof s.description=="function"?await s.description(y):s.description,N=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:w,...N})}}).catch(async y=>{if(m=["reject",y],s.error!==void 0){f=!1;const v=typeof s.error=="function"?await s.error(y):s.error,p=typeof s.description=="function"?await s.description(y):s.description,M=typeof v=="object"&&!ee.isValidElement(v)?v:{message:v};this.create({id:i,type:"error",description:p,...M})}}).finally(()=>{f&&(this.dismiss(i),i=void 0),s.finally==null||s.finally.call(s)}),x=()=>new Promise((y,v)=>g.then(()=>m[0]==="reject"?v(m[1]):y(m[1])).catch(v));return typeof i!="string"&&typeof i!="number"?{unwrap:x}:Object.assign(i,{unwrap:x})},this.custom=(r,s)=>{const i=s?.id||$u++;return this.create({jsx:r(i),id:i,...s}),i},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Lt=new I1,P1=(n,r)=>{const s=r?.id||$u++;return Lt.addToast({title:n,...r,id:s}),s},W1=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",e2=P1,t2=()=>Lt.toasts,a2=()=>Lt.getActiveToasts(),We=Object.assign(e2,{success:Lt.success,info:Lt.info,warning:Lt.warning,error:Lt.error,custom:Lt.custom,message:Lt.message,promise:Lt.promise,dismiss:Lt.dismiss,loading:Lt.loading},{getHistory:t2,getToasts:a2});G1("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Hi(n){return n.label!==void 0}const n2=3,l2="24px",r2="16px",Jp=4e3,s2=356,i2=14,o2=45,c2=200;function ja(...n){return n.filter(Boolean).join(" ")}function u2(n){const[r,s]=n.split("-"),i=[];return r&&i.push(r),s&&i.push(s),i}const d2=n=>{var r,s,i,d,f,m,g,x,y;const{invert:v,toast:p,unstyled:w,interacting:M,setHeights:N,visibleToasts:j,heights:T,index:z,toasts:_,expanded:Y,removeToast:L,defaultRichColors:te,closeButton:P,style:W,cancelButtonStyle:I,actionButtonStyle:ge,className:Oe="",descriptionClassName:ne="",duration:Q,position:K,gap:ce,expandByDefault:he,classNames:O,icons:J,closeButtonAriaLabel:F="Close toast"}=n,[Se,xe]=ee.useState(null),[R,q]=ee.useState(null),[G,$]=ee.useState(!1),[ae,fe]=ee.useState(!1),[ue,be]=ee.useState(!1),[ze,bt]=ee.useState(!1),[qt,St]=ee.useState(!1),[ws,ca]=ee.useState(0),[cr,cl]=ee.useState(0),On=ee.useRef(p.duration||Q||Jp),ur=ee.useRef(null),Gt=ee.useRef(null),dr=z===0,fr=z+1<=j,wt=p.type,en=p.dismissible!==!1,Nt=p.className||"",fo=p.descriptionClassName||"",zn=ee.useMemo(()=>T.findIndex(ye=>ye.toastId===p.id)||0,[T,p.id]),Ns=ee.useMemo(()=>{var ye;return(ye=p.closeButton)!=null?ye:P},[p.closeButton,P]),kn=ee.useMemo(()=>p.duration||Q||Jp,[p.duration,Q]),mr=ee.useRef(0),Ma=ee.useRef(0),Es=ee.useRef(0),tn=ee.useRef(null),[Dn,Et]=K.split("-"),ua=ee.useMemo(()=>T.reduce((ye,Xe,ot)=>ot>=zn?ye:ye+Xe.height,0),[T,zn]),gt=$1(),mo=p.invert||v,hr=wt==="loading";Ma.current=ee.useMemo(()=>zn*ce+ua,[zn,ua]),ee.useEffect(()=>{On.current=kn},[kn]),ee.useEffect(()=>{$(!0)},[]),ee.useEffect(()=>{const ye=Gt.current;if(ye){const Xe=ye.getBoundingClientRect().height;return cl(Xe),N(ot=>[{toastId:p.id,height:Xe,position:p.position},...ot]),()=>N(ot=>ot.filter(yt=>yt.toastId!==p.id))}},[N,p.id]),ee.useLayoutEffect(()=>{if(!G)return;const ye=Gt.current,Xe=ye.style.height;ye.style.height="auto";const ot=ye.getBoundingClientRect().height;ye.style.height=Xe,cl(ot),N(yt=>yt.find(Ze=>Ze.toastId===p.id)?yt.map(Ze=>Ze.toastId===p.id?{...Ze,height:ot}:Ze):[{toastId:p.id,height:ot,position:p.position},...yt])},[G,p.title,p.description,N,p.id,p.jsx,p.action,p.cancel]);const va=ee.useCallback(()=>{fe(!0),ca(Ma.current),N(ye=>ye.filter(Xe=>Xe.toastId!==p.id)),setTimeout(()=>{L(p)},c2)},[p,L,N,Ma]);ee.useEffect(()=>{if(p.promise&&wt==="loading"||p.duration===1/0||p.type==="loading")return;let ye;return Y||M||gt?(()=>{if(Es.current<mr.current){const yt=new Date().getTime()-mr.current;On.current=On.current-yt}Es.current=new Date().getTime()})():On.current!==1/0&&(mr.current=new Date().getTime(),ye=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),va()},On.current)),()=>clearTimeout(ye)},[Y,M,p,wt,gt,va]),ee.useEffect(()=>{p.delete&&(va(),p.onDismiss==null||p.onDismiss.call(p,p))},[va,p.delete]);function ul(){var ye;if(J?.loading){var Xe;return ee.createElement("div",{className:ja(O?.loader,p==null||(Xe=p.classNames)==null?void 0:Xe.loader,"sonner-loader"),"data-visible":wt==="loading"},J.loading)}return ee.createElement(Y1,{className:ja(O?.loader,p==null||(ye=p.classNames)==null?void 0:ye.loader),visible:wt==="loading"})}const dl=p.icon||J?.[wt]||Q1(wt);var Un,ba;return ee.createElement("li",{tabIndex:0,ref:Gt,className:ja(Oe,Nt,O?.toast,p==null||(r=p.classNames)==null?void 0:r.toast,O?.default,O?.[wt],p==null||(s=p.classNames)==null?void 0:s[wt]),"data-sonner-toast":"","data-rich-colors":(Un=p.richColors)!=null?Un:te,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":G,"data-promise":!!p.promise,"data-swiped":qt,"data-removed":ae,"data-visible":fr,"data-y-position":Dn,"data-x-position":Et,"data-index":z,"data-front":dr,"data-swiping":ue,"data-dismissible":en,"data-type":wt,"data-invert":mo,"data-swipe-out":ze,"data-swipe-direction":R,"data-expanded":!!(Y||he&&G),"data-testid":p.testId,style:{"--index":z,"--toasts-before":z,"--z-index":_.length-z,"--offset":`${ae?ws:Ma.current}px`,"--initial-height":he?"auto":`${cr}px`,...W,...p.style},onDragEnd:()=>{be(!1),xe(null),tn.current=null},onPointerDown:ye=>{ye.button!==2&&(hr||!en||(ur.current=new Date,ca(Ma.current),ye.target.setPointerCapture(ye.pointerId),ye.target.tagName!=="BUTTON"&&(be(!0),tn.current={x:ye.clientX,y:ye.clientY})))},onPointerUp:()=>{var ye,Xe,ot;if(ze||!en)return;tn.current=null;const yt=Number(((ye=Gt.current)==null?void 0:ye.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),an=Number(((Xe=Gt.current)==null?void 0:Xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ze=new Date().getTime()-((ot=ur.current)==null?void 0:ot.getTime()),Tt=Se==="x"?yt:an,Ln=Math.abs(Tt)/Ze;if(Math.abs(Tt)>=o2||Ln>.11){ca(Ma.current),p.onDismiss==null||p.onDismiss.call(p,p),q(Se==="x"?yt>0?"right":"left":an>0?"down":"up"),va(),bt(!0);return}else{var Ct,_t;(Ct=Gt.current)==null||Ct.style.setProperty("--swipe-amount-x","0px"),(_t=Gt.current)==null||_t.style.setProperty("--swipe-amount-y","0px")}St(!1),be(!1),xe(null)},onPointerMove:ye=>{var Xe,ot,yt;if(!tn.current||!en||((Xe=window.getSelection())==null?void 0:Xe.toString().length)>0)return;const Ze=ye.clientY-tn.current.y,Tt=ye.clientX-tn.current.x;var Ln;const Ct=(Ln=n.swipeDirections)!=null?Ln:u2(K);!Se&&(Math.abs(Tt)>1||Math.abs(Ze)>1)&&xe(Math.abs(Tt)>Math.abs(Ze)?"x":"y");let _t={x:0,y:0};const fl=da=>1/(1.5+Math.abs(da)/20);if(Se==="y"){if(Ct.includes("top")||Ct.includes("bottom"))if(Ct.includes("top")&&Ze<0||Ct.includes("bottom")&&Ze>0)_t.y=Ze;else{const da=Ze*fl(Ze);_t.y=Math.abs(da)<Math.abs(Ze)?da:Ze}}else if(Se==="x"&&(Ct.includes("left")||Ct.includes("right")))if(Ct.includes("left")&&Tt<0||Ct.includes("right")&&Tt>0)_t.x=Tt;else{const da=Tt*fl(Tt);_t.x=Math.abs(da)<Math.abs(Tt)?da:Tt}(Math.abs(_t.x)>0||Math.abs(_t.y)>0)&&St(!0),(ot=Gt.current)==null||ot.style.setProperty("--swipe-amount-x",`${_t.x}px`),(yt=Gt.current)==null||yt.style.setProperty("--swipe-amount-y",`${_t.y}px`)}},Ns&&!p.jsx&&wt!=="loading"?ee.createElement("button",{"aria-label":F,"data-disabled":hr,"data-close-button":!0,onClick:hr||!en?()=>{}:()=>{va(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ja(O?.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(ba=J?.close)!=null?ba:J1):null,(wt||p.icon||p.promise)&&p.icon!==null&&(J?.[wt]!==null||p.icon)?ee.createElement("div",{"data-icon":"",className:ja(O?.icon,p==null||(d=p.classNames)==null?void 0:d.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ul():null,p.type!=="loading"?dl:null):null,ee.createElement("div",{"data-content":"",className:ja(O?.content,p==null||(f=p.classNames)==null?void 0:f.content)},ee.createElement("div",{"data-title":"",className:ja(O?.title,p==null||(m=p.classNames)==null?void 0:m.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ee.createElement("div",{"data-description":"",className:ja(ne,fo,O?.description,p==null||(g=p.classNames)==null?void 0:g.description)},typeof p.description=="function"?p.description():p.description):null),ee.isValidElement(p.cancel)?p.cancel:p.cancel&&Hi(p.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||I,onClick:ye=>{Hi(p.cancel)&&en&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,ye),va())},className:ja(O?.cancelButton,p==null||(x=p.classNames)==null?void 0:x.cancelButton)},p.cancel.label):null,ee.isValidElement(p.action)?p.action:p.action&&Hi(p.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||ge,onClick:ye=>{Hi(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,ye),!ye.defaultPrevented&&va())},className:ja(O?.actionButton,p==null||(y=p.classNames)==null?void 0:y.actionButton)},p.action.label):null)};function $p(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function f2(n,r){const s={};return[n,r].forEach((i,d)=>{const f=d===1,m=f?"--mobile-offset":"--offset",g=f?r2:l2;function x(y){["top","right","bottom","left"].forEach(v=>{s[`${m}-${v}`]=typeof y=="number"?`${y}px`:y})}typeof i=="number"||typeof i=="string"?x(i):typeof i=="object"?["top","right","bottom","left"].forEach(y=>{i[y]===void 0?s[`${m}-${y}`]=g:s[`${m}-${y}`]=typeof i[y]=="number"?`${i[y]}px`:i[y]}):x(g)}),s}const m2=ee.forwardRef(function(r,s){const{id:i,invert:d,position:f="bottom-right",hotkey:m=["altKey","KeyT"],expand:g,closeButton:x,className:y,offset:v,mobileOffset:p,theme:w="light",richColors:M,duration:N,style:j,visibleToasts:T=n2,toastOptions:z,dir:_=$p(),gap:Y=i2,icons:L,containerAriaLabel:te="Notifications"}=r,[P,W]=ee.useState([]),I=ee.useMemo(()=>i?P.filter(G=>G.toasterId===i):P.filter(G=>!G.toasterId),[P,i]),ge=ee.useMemo(()=>Array.from(new Set([f].concat(I.filter(G=>G.position).map(G=>G.position)))),[I,f]),[Oe,ne]=ee.useState([]),[Q,K]=ee.useState(!1),[ce,he]=ee.useState(!1),[O,J]=ee.useState(w!=="system"?w:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=ee.useRef(null),Se=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),xe=ee.useRef(null),R=ee.useRef(!1),q=ee.useCallback(G=>{W($=>{var ae;return(ae=$.find(fe=>fe.id===G.id))!=null&&ae.delete||Lt.dismiss(G.id),$.filter(({id:fe})=>fe!==G.id)})},[]);return ee.useEffect(()=>Lt.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{W($=>$.map(ae=>ae.id===G.id?{...ae,delete:!0}:ae))});return}setTimeout(()=>{l1.flushSync(()=>{W($=>{const ae=$.findIndex(fe=>fe.id===G.id);return ae!==-1?[...$.slice(0,ae),{...$[ae],...G},...$.slice(ae+1)]:[G,...$]})})})}),[P]),ee.useEffect(()=>{if(w!=="system"){J(w);return}if(w==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:$})=>{J($?"dark":"light")})}catch{G.addListener(({matches:ae})=>{try{J(ae?"dark":"light")}catch(fe){console.error(fe)}})}},[w]),ee.useEffect(()=>{P.length<=1&&K(!1)},[P]),ee.useEffect(()=>{const G=$=>{var ae;if(m.every(be=>$[be]||$.code===be)){var ue;K(!0),(ue=F.current)==null||ue.focus()}$.code==="Escape"&&(document.activeElement===F.current||(ae=F.current)!=null&&ae.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[m]),ee.useEffect(()=>{if(F.current)return()=>{xe.current&&(xe.current.focus({preventScroll:!0}),xe.current=null,R.current=!1)}},[F.current]),ee.createElement("section",{ref:s,"aria-label":`${te} ${Se}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ge.map((G,$)=>{var ae;const[fe,ue]=G.split("-");return I.length?ee.createElement("ol",{key:G,dir:_==="auto"?$p():_,tabIndex:-1,ref:F,className:y,"data-sonner-toaster":!0,"data-sonner-theme":O,"data-y-position":fe,"data-x-position":ue,style:{"--front-toast-height":`${((ae=Oe[0])==null?void 0:ae.height)||0}px`,"--width":`${s2}px`,"--gap":`${Y}px`,...j,...f2(v,p)},onBlur:be=>{R.current&&!be.currentTarget.contains(be.relatedTarget)&&(R.current=!1,xe.current&&(xe.current.focus({preventScroll:!0}),xe.current=null))},onFocus:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||R.current||(R.current=!0,xe.current=be.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{ce||K(!1)},onDragEnd:()=>K(!1),onPointerDown:be=>{be.target instanceof HTMLElement&&be.target.dataset.dismissible==="false"||he(!0)},onPointerUp:()=>he(!1)},I.filter(be=>!be.position&&$===0||be.position===G).map((be,ze)=>{var bt,qt;return ee.createElement(d2,{key:be.id,icons:L,index:ze,toast:be,defaultRichColors:M,duration:(bt=z?.duration)!=null?bt:N,className:z?.className,descriptionClassName:z?.descriptionClassName,invert:d,visibleToasts:T,closeButton:(qt=z?.closeButton)!=null?qt:x,interacting:ce,position:G,style:z?.style,unstyled:z?.unstyled,classNames:z?.classNames,cancelButtonStyle:z?.cancelButtonStyle,actionButtonStyle:z?.actionButtonStyle,closeButtonAriaLabel:z?.closeButtonAriaLabel,removeToast:q,toasts:I.filter(St=>St.position==be.position),heights:Oe.filter(St=>St.position==be.position),setHeights:ne,expandByDefault:g,gap:Y,expanded:Q,swipeDirections:r.swipeDirections})})):null}))}),ny=S.createContext(void 0),ly="jarvis-admin-theme";function h2(){const n=localStorage.getItem(ly);return n==="light"||n==="dark"?n:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function p2({children:n}){const[r,s]=S.useState(h2);S.useEffect(()=>{document.documentElement.classList.toggle("dark",r==="dark"),localStorage.setItem(ly,r)},[r]);const i=S.useCallback(()=>{s(d=>d==="dark"?"light":"dark")},[]);return u.jsx(ny.Provider,{value:{theme:r,toggleTheme:i},children:n})}function g2(){const n=S.useContext(ny);if(!n)throw new Error("useTheme must be used within ThemeProvider");return n}function ry(n,r){return function(){return n.apply(r,arguments)}}const{toString:y2}=Object.prototype,{getPrototypeOf:vd}=Object,{iterator:ro,toStringTag:sy}=Symbol,so=(n=>r=>{const s=y2.call(r);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),xa=n=>(n=n.toLowerCase(),r=>so(r)===n),io=n=>r=>typeof r===n,{isArray:sr}=Array,tr=io("undefined");function ys(n){return n!==null&&!tr(n)&&n.constructor!==null&&!tr(n.constructor)&&Bt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const iy=xa("ArrayBuffer");function x2(n){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(n):r=n&&n.buffer&&iy(n.buffer),r}const v2=io("string"),Bt=io("function"),oy=io("number"),xs=n=>n!==null&&typeof n=="object",b2=n=>n===!0||n===!1,Zi=n=>{if(so(n)!=="object")return!1;const r=vd(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(sy in n)&&!(ro in n)},S2=n=>{if(!xs(n)||ys(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},w2=xa("Date"),N2=xa("File"),E2=xa("Blob"),j2=xa("FileList"),R2=n=>xs(n)&&Bt(n.pipe),T2=n=>{let r;return n&&(typeof FormData=="function"&&n instanceof FormData||Bt(n.append)&&((r=so(n))==="formdata"||r==="object"&&Bt(n.toString)&&n.toString()==="[object FormData]"))},C2=xa("URLSearchParams"),[_2,M2,A2,O2]=["ReadableStream","Request","Response","Headers"].map(xa),z2=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vs(n,r,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let i,d;if(typeof n!="object"&&(n=[n]),sr(n))for(i=0,d=n.length;i<d;i++)r.call(null,n[i],i,n);else{if(ys(n))return;const f=s?Object.getOwnPropertyNames(n):Object.keys(n),m=f.length;let g;for(i=0;i<m;i++)g=f[i],r.call(null,n[g],g,n)}}function cy(n,r){if(ys(n))return null;r=r.toLowerCase();const s=Object.keys(n);let i=s.length,d;for(;i-- >0;)if(d=s[i],r===d.toLowerCase())return d;return null}const nl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,uy=n=>!tr(n)&&n!==nl;function Iu(){const{caseless:n,skipUndefined:r}=uy(this)&&this||{},s={},i=(d,f)=>{const m=n&&cy(s,f)||f;Zi(s[m])&&Zi(d)?s[m]=Iu(s[m],d):Zi(d)?s[m]=Iu({},d):sr(d)?s[m]=d.slice():(!r||!tr(d))&&(s[m]=d)};for(let d=0,f=arguments.length;d<f;d++)arguments[d]&&vs(arguments[d],i);return s}const k2=(n,r,s,{allOwnKeys:i}={})=>(vs(r,(d,f)=>{s&&Bt(d)?Object.defineProperty(n,f,{value:ry(d,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,f,{value:d,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),n),D2=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),U2=(n,r,s,i)=>{n.prototype=Object.create(r.prototype,i),Object.defineProperty(n.prototype,"constructor",{value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{value:r.prototype}),s&&Object.assign(n.prototype,s)},L2=(n,r,s,i)=>{let d,f,m;const g={};if(r=r||{},n==null)return r;do{for(d=Object.getOwnPropertyNames(n),f=d.length;f-- >0;)m=d[f],(!i||i(m,n,r))&&!g[m]&&(r[m]=n[m],g[m]=!0);n=s!==!1&&vd(n)}while(n&&(!s||s(n,r))&&n!==Object.prototype);return r},B2=(n,r,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=r.length;const i=n.indexOf(r,s);return i!==-1&&i===s},H2=n=>{if(!n)return null;if(sr(n))return n;let r=n.length;if(!oy(r))return null;const s=new Array(r);for(;r-- >0;)s[r]=n[r];return s},q2=(n=>r=>n&&r instanceof n)(typeof Uint8Array<"u"&&vd(Uint8Array)),G2=(n,r)=>{const i=(n&&n[ro]).call(n);let d;for(;(d=i.next())&&!d.done;){const f=d.value;r.call(n,f[0],f[1])}},Q2=(n,r)=>{let s;const i=[];for(;(s=n.exec(r))!==null;)i.push(s);return i},V2=xa("HTMLFormElement"),Y2=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,i,d){return i.toUpperCase()+d}),Ip=(({hasOwnProperty:n})=>(r,s)=>n.call(r,s))(Object.prototype),X2=xa("RegExp"),dy=(n,r)=>{const s=Object.getOwnPropertyDescriptors(n),i={};vs(s,(d,f)=>{let m;(m=r(d,f,n))!==!1&&(i[f]=m||d)}),Object.defineProperties(n,i)},F2=n=>{dy(n,(r,s)=>{if(Bt(n)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const i=n[s];if(Bt(i)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},K2=(n,r)=>{const s={},i=d=>{d.forEach(f=>{s[f]=!0})};return sr(n)?i(n):i(String(n).split(r)),s},Z2=()=>{},J2=(n,r)=>n!=null&&Number.isFinite(n=+n)?n:r;function $2(n){return!!(n&&Bt(n.append)&&n[sy]==="FormData"&&n[ro])}const I2=n=>{const r=new Array(10),s=(i,d)=>{if(xs(i)){if(r.indexOf(i)>=0)return;if(ys(i))return i;if(!("toJSON"in i)){r[d]=i;const f=sr(i)?[]:{};return vs(i,(m,g)=>{const x=s(m,d+1);!tr(x)&&(f[g]=x)}),r[d]=void 0,f}}return i};return s(n,0)},P2=xa("AsyncFunction"),W2=n=>n&&(xs(n)||Bt(n))&&Bt(n.then)&&Bt(n.catch),fy=((n,r)=>n?setImmediate:r?((s,i)=>(nl.addEventListener("message",({source:d,data:f})=>{d===nl&&f===s&&i.length&&i.shift()()},!1),d=>{i.push(d),nl.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Bt(nl.postMessage)),eS=typeof queueMicrotask<"u"?queueMicrotask.bind(nl):typeof process<"u"&&process.nextTick||fy,tS=n=>n!=null&&Bt(n[ro]),H={isArray:sr,isArrayBuffer:iy,isBuffer:ys,isFormData:T2,isArrayBufferView:x2,isString:v2,isNumber:oy,isBoolean:b2,isObject:xs,isPlainObject:Zi,isEmptyObject:S2,isReadableStream:_2,isRequest:M2,isResponse:A2,isHeaders:O2,isUndefined:tr,isDate:w2,isFile:N2,isBlob:E2,isRegExp:X2,isFunction:Bt,isStream:R2,isURLSearchParams:C2,isTypedArray:q2,isFileList:j2,forEach:vs,merge:Iu,extend:k2,trim:z2,stripBOM:D2,inherits:U2,toFlatObject:L2,kindOf:so,kindOfTest:xa,endsWith:B2,toArray:H2,forEachEntry:G2,matchAll:Q2,isHTMLForm:V2,hasOwnProperty:Ip,hasOwnProp:Ip,reduceDescriptors:dy,freezeMethods:F2,toObjectSet:K2,toCamelCase:Y2,noop:Z2,toFiniteNumber:J2,findKey:cy,global:nl,isContextDefined:uy,isSpecCompliantForm:$2,toJSONObject:I2,isAsyncFn:P2,isThenable:W2,setImmediate:fy,asap:eS,isIterable:tS};let pe=class my extends Error{static from(r,s,i,d,f,m){const g=new my(r.message,s||r.code,i,d,f);return g.cause=r,g.name=r.name,m&&Object.assign(g,m),g}constructor(r,s,i,d,f){super(r),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),i&&(this.config=i),d&&(this.request=d),f&&(this.response=f,this.status=f.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}};pe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";pe.ERR_BAD_OPTION="ERR_BAD_OPTION";pe.ECONNABORTED="ECONNABORTED";pe.ETIMEDOUT="ETIMEDOUT";pe.ERR_NETWORK="ERR_NETWORK";pe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";pe.ERR_DEPRECATED="ERR_DEPRECATED";pe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";pe.ERR_BAD_REQUEST="ERR_BAD_REQUEST";pe.ERR_CANCELED="ERR_CANCELED";pe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";pe.ERR_INVALID_URL="ERR_INVALID_URL";const aS=null;function Pu(n){return H.isPlainObject(n)||H.isArray(n)}function hy(n){return H.endsWith(n,"[]")?n.slice(0,-2):n}function Pp(n,r,s){return n?n.concat(r).map(function(d,f){return d=hy(d),!s&&f?"["+d+"]":d}).join(s?".":""):r}function nS(n){return H.isArray(n)&&!n.some(Pu)}const lS=H.toFlatObject(H,{},null,function(r){return/^is[A-Z]/.test(r)});function oo(n,r,s){if(!H.isObject(n))throw new TypeError("target must be an object");r=r||new FormData,s=H.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,T){return!H.isUndefined(T[j])});const i=s.metaTokens,d=s.visitor||v,f=s.dots,m=s.indexes,x=(s.Blob||typeof Blob<"u"&&Blob)&&H.isSpecCompliantForm(r);if(!H.isFunction(d))throw new TypeError("visitor must be a function");function y(N){if(N===null)return"";if(H.isDate(N))return N.toISOString();if(H.isBoolean(N))return N.toString();if(!x&&H.isBlob(N))throw new pe("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(N)||H.isTypedArray(N)?x&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function v(N,j,T){let z=N;if(N&&!T&&typeof N=="object"){if(H.endsWith(j,"{}"))j=i?j:j.slice(0,-2),N=JSON.stringify(N);else if(H.isArray(N)&&nS(N)||(H.isFileList(N)||H.endsWith(j,"[]"))&&(z=H.toArray(N)))return j=hy(j),z.forEach(function(Y,L){!(H.isUndefined(Y)||Y===null)&&r.append(m===!0?Pp([j],L,f):m===null?j:j+"[]",y(Y))}),!1}return Pu(N)?!0:(r.append(Pp(T,j,f),y(N)),!1)}const p=[],w=Object.assign(lS,{defaultVisitor:v,convertValue:y,isVisitable:Pu});function M(N,j){if(!H.isUndefined(N)){if(p.indexOf(N)!==-1)throw Error("Circular reference detected in "+j.join("."));p.push(N),H.forEach(N,function(z,_){(!(H.isUndefined(z)||z===null)&&d.call(r,z,H.isString(_)?_.trim():_,j,w))===!0&&M(z,j?j.concat(_):[_])}),p.pop()}}if(!H.isObject(n))throw new TypeError("data must be an object");return M(n),r}function Wp(n){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(i){return r[i]})}function bd(n,r){this._pairs=[],n&&oo(n,this,r)}const py=bd.prototype;py.append=function(r,s){this._pairs.push([r,s])};py.toString=function(r){const s=r?function(i){return r.call(this,i,Wp)}:Wp;return this._pairs.map(function(d){return s(d[0])+"="+s(d[1])},"").join("&")};function rS(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function gy(n,r,s){if(!r)return n;const i=s&&s.encode||rS,d=H.isFunction(s)?{serialize:s}:s,f=d&&d.serialize;let m;if(f?m=f(r,d):m=H.isURLSearchParams(r)?r.toString():new bd(r,d).toString(i),m){const g=n.indexOf("#");g!==-1&&(n=n.slice(0,g)),n+=(n.indexOf("?")===-1?"?":"&")+m}return n}class eg{constructor(){this.handlers=[]}use(r,s,i){return this.handlers.push({fulfilled:r,rejected:s,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){H.forEach(this.handlers,function(i){i!==null&&r(i)})}}const yy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sS=typeof URLSearchParams<"u"?URLSearchParams:bd,iS=typeof FormData<"u"?FormData:null,oS=typeof Blob<"u"?Blob:null,cS={isBrowser:!0,classes:{URLSearchParams:sS,FormData:iS,Blob:oS},protocols:["http","https","file","blob","url","data"]},Sd=typeof window<"u"&&typeof document<"u",Wu=typeof navigator=="object"&&navigator||void 0,uS=Sd&&(!Wu||["ReactNative","NativeScript","NS"].indexOf(Wu.product)<0),dS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fS=Sd&&window.location.href||"http://localhost",mS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Sd,hasStandardBrowserEnv:uS,hasStandardBrowserWebWorkerEnv:dS,navigator:Wu,origin:fS},Symbol.toStringTag,{value:"Module"})),vt={...mS,...cS};function hS(n,r){return oo(n,new vt.classes.URLSearchParams,{visitor:function(s,i,d,f){return vt.isNode&&H.isBuffer(s)?(this.append(i,s.toString("base64")),!1):f.defaultVisitor.apply(this,arguments)},...r})}function pS(n){return H.matchAll(/\w+|\[(\w*)]/g,n).map(r=>r[0]==="[]"?"":r[1]||r[0])}function gS(n){const r={},s=Object.keys(n);let i;const d=s.length;let f;for(i=0;i<d;i++)f=s[i],r[f]=n[f];return r}function xy(n){function r(s,i,d,f){let m=s[f++];if(m==="__proto__")return!0;const g=Number.isFinite(+m),x=f>=s.length;return m=!m&&H.isArray(d)?d.length:m,x?(H.hasOwnProp(d,m)?d[m]=[d[m],i]:d[m]=i,!g):((!d[m]||!H.isObject(d[m]))&&(d[m]=[]),r(s,i,d[m],f)&&H.isArray(d[m])&&(d[m]=gS(d[m])),!g)}if(H.isFormData(n)&&H.isFunction(n.entries)){const s={};return H.forEachEntry(n,(i,d)=>{r(pS(i),d,s,0)}),s}return null}function yS(n,r,s){if(H.isString(n))try{return(r||JSON.parse)(n),H.trim(n)}catch(i){if(i.name!=="SyntaxError")throw i}return(s||JSON.stringify)(n)}const bs={transitional:yy,adapter:["xhr","http","fetch"],transformRequest:[function(r,s){const i=s.getContentType()||"",d=i.indexOf("application/json")>-1,f=H.isObject(r);if(f&&H.isHTMLForm(r)&&(r=new FormData(r)),H.isFormData(r))return d?JSON.stringify(xy(r)):r;if(H.isArrayBuffer(r)||H.isBuffer(r)||H.isStream(r)||H.isFile(r)||H.isBlob(r)||H.isReadableStream(r))return r;if(H.isArrayBufferView(r))return r.buffer;if(H.isURLSearchParams(r))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let g;if(f){if(i.indexOf("application/x-www-form-urlencoded")>-1)return hS(r,this.formSerializer).toString();if((g=H.isFileList(r))||i.indexOf("multipart/form-data")>-1){const x=this.env&&this.env.FormData;return oo(g?{"files[]":r}:r,x&&new x,this.formSerializer)}}return f||d?(s.setContentType("application/json",!1),yS(r)):r}],transformResponse:[function(r){const s=this.transitional||bs.transitional,i=s&&s.forcedJSONParsing,d=this.responseType==="json";if(H.isResponse(r)||H.isReadableStream(r))return r;if(r&&H.isString(r)&&(i&&!this.responseType||d)){const m=!(s&&s.silentJSONParsing)&&d;try{return JSON.parse(r,this.parseReviver)}catch(g){if(m)throw g.name==="SyntaxError"?pe.from(g,pe.ERR_BAD_RESPONSE,this,null,this.response):g}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:vt.classes.FormData,Blob:vt.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],n=>{bs.headers[n]={}});const xS=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),vS=n=>{const r={};let s,i,d;return n&&n.split(`
|
|
12
|
+
`).forEach(function(m){d=m.indexOf(":"),s=m.substring(0,d).trim().toLowerCase(),i=m.substring(d+1).trim(),!(!s||r[s]&&xS[s])&&(s==="set-cookie"?r[s]?r[s].push(i):r[s]=[i]:r[s]=r[s]?r[s]+", "+i:i)}),r},tg=Symbol("internals");function is(n){return n&&String(n).trim().toLowerCase()}function Ji(n){return n===!1||n==null?n:H.isArray(n)?n.map(Ji):String(n)}function bS(n){const r=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=s.exec(n);)r[i[1]]=i[2];return r}const SS=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function zu(n,r,s,i,d){if(H.isFunction(i))return i.call(this,r,s);if(d&&(r=s),!!H.isString(r)){if(H.isString(i))return r.indexOf(i)!==-1;if(H.isRegExp(i))return i.test(r)}}function wS(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,s,i)=>s.toUpperCase()+i)}function NS(n,r){const s=H.toCamelCase(" "+r);["get","set","has"].forEach(i=>{Object.defineProperty(n,i+s,{value:function(d,f,m){return this[i].call(this,r,d,f,m)},configurable:!0})})}let Ht=class{constructor(r){r&&this.set(r)}set(r,s,i){const d=this;function f(g,x,y){const v=is(x);if(!v)throw new Error("header name must be a non-empty string");const p=H.findKey(d,v);(!p||d[p]===void 0||y===!0||y===void 0&&d[p]!==!1)&&(d[p||x]=Ji(g))}const m=(g,x)=>H.forEach(g,(y,v)=>f(y,v,x));if(H.isPlainObject(r)||r instanceof this.constructor)m(r,s);else if(H.isString(r)&&(r=r.trim())&&!SS(r))m(vS(r),s);else if(H.isObject(r)&&H.isIterable(r)){let g={},x,y;for(const v of r){if(!H.isArray(v))throw TypeError("Object iterator must return a key-value pair");g[y=v[0]]=(x=g[y])?H.isArray(x)?[...x,v[1]]:[x,v[1]]:v[1]}m(g,s)}else r!=null&&f(s,r,i);return this}get(r,s){if(r=is(r),r){const i=H.findKey(this,r);if(i){const d=this[i];if(!s)return d;if(s===!0)return bS(d);if(H.isFunction(s))return s.call(this,d,i);if(H.isRegExp(s))return s.exec(d);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,s){if(r=is(r),r){const i=H.findKey(this,r);return!!(i&&this[i]!==void 0&&(!s||zu(this,this[i],i,s)))}return!1}delete(r,s){const i=this;let d=!1;function f(m){if(m=is(m),m){const g=H.findKey(i,m);g&&(!s||zu(i,i[g],g,s))&&(delete i[g],d=!0)}}return H.isArray(r)?r.forEach(f):f(r),d}clear(r){const s=Object.keys(this);let i=s.length,d=!1;for(;i--;){const f=s[i];(!r||zu(this,this[f],f,r,!0))&&(delete this[f],d=!0)}return d}normalize(r){const s=this,i={};return H.forEach(this,(d,f)=>{const m=H.findKey(i,f);if(m){s[m]=Ji(d),delete s[f];return}const g=r?wS(f):String(f).trim();g!==f&&delete s[f],s[g]=Ji(d),i[g]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const s=Object.create(null);return H.forEach(this,(i,d)=>{i!=null&&i!==!1&&(s[d]=r&&H.isArray(i)?i.join(", "):i)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,s])=>r+": "+s).join(`
|
|
13
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...s){const i=new this(r);return s.forEach(d=>i.set(d)),i}static accessor(r){const i=(this[tg]=this[tg]={accessors:{}}).accessors,d=this.prototype;function f(m){const g=is(m);i[g]||(NS(d,m),i[g]=!0)}return H.isArray(r)?r.forEach(f):f(r),this}};Ht.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(Ht.prototype,({value:n},r)=>{let s=r[0].toUpperCase()+r.slice(1);return{get:()=>n,set(i){this[s]=i}}});H.freezeMethods(Ht);function ku(n,r){const s=this||bs,i=r||s,d=Ht.from(i.headers);let f=i.data;return H.forEach(n,function(g){f=g.call(s,f,d.normalize(),r?r.status:void 0)}),d.normalize(),f}function vy(n){return!!(n&&n.__CANCEL__)}let Ss=class extends pe{constructor(r,s,i){super(r??"canceled",pe.ERR_CANCELED,s,i),this.name="CanceledError",this.__CANCEL__=!0}};function by(n,r,s){const i=s.config.validateStatus;!s.status||!i||i(s.status)?n(s):r(new pe("Request failed with status code "+s.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function ES(n){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return r&&r[1]||""}function jS(n,r){n=n||10;const s=new Array(n),i=new Array(n);let d=0,f=0,m;return r=r!==void 0?r:1e3,function(x){const y=Date.now(),v=i[f];m||(m=y),s[d]=x,i[d]=y;let p=f,w=0;for(;p!==d;)w+=s[p++],p=p%n;if(d=(d+1)%n,d===f&&(f=(f+1)%n),y-m<r)return;const M=v&&y-v;return M?Math.round(w*1e3/M):void 0}}function RS(n,r){let s=0,i=1e3/r,d,f;const m=(y,v=Date.now())=>{s=v,d=null,f&&(clearTimeout(f),f=null),n(...y)};return[(...y)=>{const v=Date.now(),p=v-s;p>=i?m(y,v):(d=y,f||(f=setTimeout(()=>{f=null,m(d)},i-p)))},()=>d&&m(d)]}const to=(n,r,s=3)=>{let i=0;const d=jS(50,250);return RS(f=>{const m=f.loaded,g=f.lengthComputable?f.total:void 0,x=m-i,y=d(x),v=m<=g;i=m;const p={loaded:m,total:g,progress:g?m/g:void 0,bytes:x,rate:y||void 0,estimated:y&&g&&v?(g-m)/y:void 0,event:f,lengthComputable:g!=null,[r?"download":"upload"]:!0};n(p)},s)},ag=(n,r)=>{const s=n!=null;return[i=>r[0]({lengthComputable:s,total:n,loaded:i}),r[1]]},ng=n=>(...r)=>H.asap(()=>n(...r)),TS=vt.hasStandardBrowserEnv?((n,r)=>s=>(s=new URL(s,vt.origin),n.protocol===s.protocol&&n.host===s.host&&(r||n.port===s.port)))(new URL(vt.origin),vt.navigator&&/(msie|trident)/i.test(vt.navigator.userAgent)):()=>!0,CS=vt.hasStandardBrowserEnv?{write(n,r,s,i,d,f,m){if(typeof document>"u")return;const g=[`${n}=${encodeURIComponent(r)}`];H.isNumber(s)&&g.push(`expires=${new Date(s).toUTCString()}`),H.isString(i)&&g.push(`path=${i}`),H.isString(d)&&g.push(`domain=${d}`),f===!0&&g.push("secure"),H.isString(m)&&g.push(`SameSite=${m}`),document.cookie=g.join("; ")},read(n){if(typeof document>"u")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function _S(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function MS(n,r){return r?n.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):n}function Sy(n,r,s){let i=!_S(r);return n&&(i||s==!1)?MS(n,r):r}const lg=n=>n instanceof Ht?{...n}:n;function il(n,r){r=r||{};const s={};function i(y,v,p,w){return H.isPlainObject(y)&&H.isPlainObject(v)?H.merge.call({caseless:w},y,v):H.isPlainObject(v)?H.merge({},v):H.isArray(v)?v.slice():v}function d(y,v,p,w){if(H.isUndefined(v)){if(!H.isUndefined(y))return i(void 0,y,p,w)}else return i(y,v,p,w)}function f(y,v){if(!H.isUndefined(v))return i(void 0,v)}function m(y,v){if(H.isUndefined(v)){if(!H.isUndefined(y))return i(void 0,y)}else return i(void 0,v)}function g(y,v,p){if(p in r)return i(y,v);if(p in n)return i(void 0,y)}const x={url:f,method:f,data:f,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:g,headers:(y,v,p)=>d(lg(y),lg(v),p,!0)};return H.forEach(Object.keys({...n,...r}),function(v){const p=x[v]||d,w=p(n[v],r[v],v);H.isUndefined(w)&&p!==g||(s[v]=w)}),s}const wy=n=>{const r=il({},n);let{data:s,withXSRFToken:i,xsrfHeaderName:d,xsrfCookieName:f,headers:m,auth:g}=r;if(r.headers=m=Ht.from(m),r.url=gy(Sy(r.baseURL,r.url,r.allowAbsoluteUrls),n.params,n.paramsSerializer),g&&m.set("Authorization","Basic "+btoa((g.username||"")+":"+(g.password?unescape(encodeURIComponent(g.password)):""))),H.isFormData(s)){if(vt.hasStandardBrowserEnv||vt.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(H.isFunction(s.getHeaders)){const x=s.getHeaders(),y=["content-type","content-length"];Object.entries(x).forEach(([v,p])=>{y.includes(v.toLowerCase())&&m.set(v,p)})}}if(vt.hasStandardBrowserEnv&&(i&&H.isFunction(i)&&(i=i(r)),i||i!==!1&&TS(r.url))){const x=d&&f&&CS.read(f);x&&m.set(d,x)}return r},AS=typeof XMLHttpRequest<"u",OS=AS&&function(n){return new Promise(function(s,i){const d=wy(n);let f=d.data;const m=Ht.from(d.headers).normalize();let{responseType:g,onUploadProgress:x,onDownloadProgress:y}=d,v,p,w,M,N;function j(){M&&M(),N&&N(),d.cancelToken&&d.cancelToken.unsubscribe(v),d.signal&&d.signal.removeEventListener("abort",v)}let T=new XMLHttpRequest;T.open(d.method.toUpperCase(),d.url,!0),T.timeout=d.timeout;function z(){if(!T)return;const Y=Ht.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),te={data:!g||g==="text"||g==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:Y,config:n,request:T};by(function(W){s(W),j()},function(W){i(W),j()},te),T=null}"onloadend"in T?T.onloadend=z:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(z)},T.onabort=function(){T&&(i(new pe("Request aborted",pe.ECONNABORTED,n,T)),T=null)},T.onerror=function(L){const te=L&&L.message?L.message:"Network Error",P=new pe(te,pe.ERR_NETWORK,n,T);P.event=L||null,i(P),T=null},T.ontimeout=function(){let L=d.timeout?"timeout of "+d.timeout+"ms exceeded":"timeout exceeded";const te=d.transitional||yy;d.timeoutErrorMessage&&(L=d.timeoutErrorMessage),i(new pe(L,te.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,n,T)),T=null},f===void 0&&m.setContentType(null),"setRequestHeader"in T&&H.forEach(m.toJSON(),function(L,te){T.setRequestHeader(te,L)}),H.isUndefined(d.withCredentials)||(T.withCredentials=!!d.withCredentials),g&&g!=="json"&&(T.responseType=d.responseType),y&&([w,N]=to(y,!0),T.addEventListener("progress",w)),x&&T.upload&&([p,M]=to(x),T.upload.addEventListener("progress",p),T.upload.addEventListener("loadend",M)),(d.cancelToken||d.signal)&&(v=Y=>{T&&(i(!Y||Y.type?new Ss(null,n,T):Y),T.abort(),T=null)},d.cancelToken&&d.cancelToken.subscribe(v),d.signal&&(d.signal.aborted?v():d.signal.addEventListener("abort",v)));const _=ES(d.url);if(_&&vt.protocols.indexOf(_)===-1){i(new pe("Unsupported protocol "+_+":",pe.ERR_BAD_REQUEST,n));return}T.send(f||null)})},zS=(n,r)=>{const{length:s}=n=n?n.filter(Boolean):[];if(r||s){let i=new AbortController,d;const f=function(y){if(!d){d=!0,g();const v=y instanceof Error?y:this.reason;i.abort(v instanceof pe?v:new Ss(v instanceof Error?v.message:v))}};let m=r&&setTimeout(()=>{m=null,f(new pe(`timeout of ${r}ms exceeded`,pe.ETIMEDOUT))},r);const g=()=>{n&&(m&&clearTimeout(m),m=null,n.forEach(y=>{y.unsubscribe?y.unsubscribe(f):y.removeEventListener("abort",f)}),n=null)};n.forEach(y=>y.addEventListener("abort",f));const{signal:x}=i;return x.unsubscribe=()=>H.asap(g),x}},kS=function*(n,r){let s=n.byteLength;if(s<r){yield n;return}let i=0,d;for(;i<s;)d=i+r,yield n.slice(i,d),i=d},DS=async function*(n,r){for await(const s of US(n))yield*kS(s,r)},US=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const r=n.getReader();try{for(;;){const{done:s,value:i}=await r.read();if(s)break;yield i}}finally{await r.cancel()}},rg=(n,r,s,i)=>{const d=DS(n,r);let f=0,m,g=x=>{m||(m=!0,i&&i(x))};return new ReadableStream({async pull(x){try{const{done:y,value:v}=await d.next();if(y){g(),x.close();return}let p=v.byteLength;if(s){let w=f+=p;s(w)}x.enqueue(new Uint8Array(v))}catch(y){throw g(y),y}},cancel(x){return g(x),d.return()}},{highWaterMark:2})},sg=64*1024,{isFunction:qi}=H,LS=(({Request:n,Response:r})=>({Request:n,Response:r}))(H.global),{ReadableStream:ig,TextEncoder:og}=H.global,cg=(n,...r)=>{try{return!!n(...r)}catch{return!1}},BS=n=>{n=H.merge.call({skipUndefined:!0},LS,n);const{fetch:r,Request:s,Response:i}=n,d=r?qi(r):typeof fetch=="function",f=qi(s),m=qi(i);if(!d)return!1;const g=d&&qi(ig),x=d&&(typeof og=="function"?(N=>j=>N.encode(j))(new og):async N=>new Uint8Array(await new s(N).arrayBuffer())),y=f&&g&&cg(()=>{let N=!1;const j=new s(vt.origin,{body:new ig,method:"POST",get duplex(){return N=!0,"half"}}).headers.has("Content-Type");return N&&!j}),v=m&&g&&cg(()=>H.isReadableStream(new i("").body)),p={stream:v&&(N=>N.body)};d&&["text","arrayBuffer","blob","formData","stream"].forEach(N=>{!p[N]&&(p[N]=(j,T)=>{let z=j&&j[N];if(z)return z.call(j);throw new pe(`Response type '${N}' is not supported`,pe.ERR_NOT_SUPPORT,T)})});const w=async N=>{if(N==null)return 0;if(H.isBlob(N))return N.size;if(H.isSpecCompliantForm(N))return(await new s(vt.origin,{method:"POST",body:N}).arrayBuffer()).byteLength;if(H.isArrayBufferView(N)||H.isArrayBuffer(N))return N.byteLength;if(H.isURLSearchParams(N)&&(N=N+""),H.isString(N))return(await x(N)).byteLength},M=async(N,j)=>{const T=H.toFiniteNumber(N.getContentLength());return T??w(j)};return async N=>{let{url:j,method:T,data:z,signal:_,cancelToken:Y,timeout:L,onDownloadProgress:te,onUploadProgress:P,responseType:W,headers:I,withCredentials:ge="same-origin",fetchOptions:Oe}=wy(N),ne=r||fetch;W=W?(W+"").toLowerCase():"text";let Q=zS([_,Y&&Y.toAbortSignal()],L),K=null;const ce=Q&&Q.unsubscribe&&(()=>{Q.unsubscribe()});let he;try{if(P&&y&&T!=="get"&&T!=="head"&&(he=await M(I,z))!==0){let R=new s(j,{method:"POST",body:z,duplex:"half"}),q;if(H.isFormData(z)&&(q=R.headers.get("content-type"))&&I.setContentType(q),R.body){const[G,$]=ag(he,to(ng(P)));z=rg(R.body,sg,G,$)}}H.isString(ge)||(ge=ge?"include":"omit");const O=f&&"credentials"in s.prototype,J={...Oe,signal:Q,method:T.toUpperCase(),headers:I.normalize().toJSON(),body:z,duplex:"half",credentials:O?ge:void 0};K=f&&new s(j,J);let F=await(f?ne(K,Oe):ne(j,J));const Se=v&&(W==="stream"||W==="response");if(v&&(te||Se&&ce)){const R={};["status","statusText","headers"].forEach(ae=>{R[ae]=F[ae]});const q=H.toFiniteNumber(F.headers.get("content-length")),[G,$]=te&&ag(q,to(ng(te),!0))||[];F=new i(rg(F.body,sg,G,()=>{$&&$(),ce&&ce()}),R)}W=W||"text";let xe=await p[H.findKey(p,W)||"text"](F,N);return!Se&&ce&&ce(),await new Promise((R,q)=>{by(R,q,{data:xe,headers:Ht.from(F.headers),status:F.status,statusText:F.statusText,config:N,request:K})})}catch(O){throw ce&&ce(),O&&O.name==="TypeError"&&/Load failed|fetch/i.test(O.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,N,K),{cause:O.cause||O}):pe.from(O,O&&O.code,N,K)}}},HS=new Map,Ny=n=>{let r=n&&n.env||{};const{fetch:s,Request:i,Response:d}=r,f=[i,d,s];let m=f.length,g=m,x,y,v=HS;for(;g--;)x=f[g],y=v.get(x),y===void 0&&v.set(x,y=g?new Map:BS(r)),v=y;return y};Ny();const wd={http:aS,xhr:OS,fetch:{get:Ny}};H.forEach(wd,(n,r)=>{if(n){try{Object.defineProperty(n,"name",{value:r})}catch{}Object.defineProperty(n,"adapterName",{value:r})}});const ug=n=>`- ${n}`,qS=n=>H.isFunction(n)||n===null||n===!1;function GS(n,r){n=H.isArray(n)?n:[n];const{length:s}=n;let i,d;const f={};for(let m=0;m<s;m++){i=n[m];let g;if(d=i,!qS(i)&&(d=wd[(g=String(i)).toLowerCase()],d===void 0))throw new pe(`Unknown adapter '${g}'`);if(d&&(H.isFunction(d)||(d=d.get(r))))break;f[g||"#"+m]=d}if(!d){const m=Object.entries(f).map(([x,y])=>`adapter ${x} `+(y===!1?"is not supported by the environment":"is not available in the build"));let g=s?m.length>1?`since :
|
|
14
|
+
`+m.map(ug).join(`
|
|
15
|
+
`):" "+ug(m[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+g,"ERR_NOT_SUPPORT")}return d}const Ey={getAdapter:GS,adapters:wd};function Du(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new Ss(null,n)}function dg(n){return Du(n),n.headers=Ht.from(n.headers),n.data=ku.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Ey.getAdapter(n.adapter||bs.adapter,n)(n).then(function(i){return Du(n),i.data=ku.call(n,n.transformResponse,i),i.headers=Ht.from(i.headers),i},function(i){return vy(i)||(Du(n),i&&i.response&&(i.response.data=ku.call(n,n.transformResponse,i.response),i.response.headers=Ht.from(i.response.headers))),Promise.reject(i)})}const jy="1.13.4",co={};["object","boolean","number","function","string","symbol"].forEach((n,r)=>{co[n]=function(i){return typeof i===n||"a"+(r<1?"n ":" ")+n}});const fg={};co.transitional=function(r,s,i){function d(f,m){return"[Axios v"+jy+"] Transitional option '"+f+"'"+m+(i?". "+i:"")}return(f,m,g)=>{if(r===!1)throw new pe(d(m," has been removed"+(s?" in "+s:"")),pe.ERR_DEPRECATED);return s&&!fg[m]&&(fg[m]=!0,console.warn(d(m," has been deprecated since v"+s+" and will be removed in the near future"))),r?r(f,m,g):!0}};co.spelling=function(r){return(s,i)=>(console.warn(`${i} is likely a misspelling of ${r}`),!0)};function QS(n,r,s){if(typeof n!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const i=Object.keys(n);let d=i.length;for(;d-- >0;){const f=i[d],m=r[f];if(m){const g=n[f],x=g===void 0||m(g,f,n);if(x!==!0)throw new pe("option "+f+" must be "+x,pe.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new pe("Unknown option "+f,pe.ERR_BAD_OPTION)}}const $i={assertOptions:QS,validators:co},Ra=$i.validators;let ll=class{constructor(r){this.defaults=r||{},this.interceptors={request:new eg,response:new eg}}async request(r,s){try{return await this._request(r,s)}catch(i){if(i instanceof Error){let d={};Error.captureStackTrace?Error.captureStackTrace(d):d=new Error;const f=d.stack?d.stack.replace(/^.+\n/,""):"";try{i.stack?f&&!String(i.stack).endsWith(f.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
16
|
+
`+f):i.stack=f}catch{}}throw i}}_request(r,s){typeof r=="string"?(s=s||{},s.url=r):s=r||{},s=il(this.defaults,s);const{transitional:i,paramsSerializer:d,headers:f}=s;i!==void 0&&$i.assertOptions(i,{silentJSONParsing:Ra.transitional(Ra.boolean),forcedJSONParsing:Ra.transitional(Ra.boolean),clarifyTimeoutError:Ra.transitional(Ra.boolean)},!1),d!=null&&(H.isFunction(d)?s.paramsSerializer={serialize:d}:$i.assertOptions(d,{encode:Ra.function,serialize:Ra.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),$i.assertOptions(s,{baseUrl:Ra.spelling("baseURL"),withXsrfToken:Ra.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let m=f&&H.merge(f.common,f[s.method]);f&&H.forEach(["delete","get","head","post","put","patch","common"],N=>{delete f[N]}),s.headers=Ht.concat(m,f);const g=[];let x=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(s)===!1||(x=x&&j.synchronous,g.unshift(j.fulfilled,j.rejected))});const y=[];this.interceptors.response.forEach(function(j){y.push(j.fulfilled,j.rejected)});let v,p=0,w;if(!x){const N=[dg.bind(this),void 0];for(N.unshift(...g),N.push(...y),w=N.length,v=Promise.resolve(s);p<w;)v=v.then(N[p++],N[p++]);return v}w=g.length;let M=s;for(;p<w;){const N=g[p++],j=g[p++];try{M=N(M)}catch(T){j.call(this,T);break}}try{v=dg.call(this,M)}catch(N){return Promise.reject(N)}for(p=0,w=y.length;p<w;)v=v.then(y[p++],y[p++]);return v}getUri(r){r=il(this.defaults,r);const s=Sy(r.baseURL,r.url,r.allowAbsoluteUrls);return gy(s,r.params,r.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(r){ll.prototype[r]=function(s,i){return this.request(il(i||{},{method:r,url:s,data:(i||{}).data}))}});H.forEach(["post","put","patch"],function(r){function s(i){return function(f,m,g){return this.request(il(g||{},{method:r,headers:i?{"Content-Type":"multipart/form-data"}:{},url:f,data:m}))}}ll.prototype[r]=s(),ll.prototype[r+"Form"]=s(!0)});let VS=class Ry{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(f){s=f});const i=this;this.promise.then(d=>{if(!i._listeners)return;let f=i._listeners.length;for(;f-- >0;)i._listeners[f](d);i._listeners=null}),this.promise.then=d=>{let f;const m=new Promise(g=>{i.subscribe(g),f=g}).then(d);return m.cancel=function(){i.unsubscribe(f)},m},r(function(f,m,g){i.reason||(i.reason=new Ss(f,m,g),s(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const s=this._listeners.indexOf(r);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const r=new AbortController,s=i=>{r.abort(i)};return this.subscribe(s),r.signal.unsubscribe=()=>this.unsubscribe(s),r.signal}static source(){let r;return{token:new Ry(function(d){r=d}),cancel:r}}};function YS(n){return function(s){return n.apply(null,s)}}function XS(n){return H.isObject(n)&&n.isAxiosError===!0}const ed={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ed).forEach(([n,r])=>{ed[r]=n});function Ty(n){const r=new ll(n),s=ry(ll.prototype.request,r);return H.extend(s,ll.prototype,r,{allOwnKeys:!0}),H.extend(s,r,null,{allOwnKeys:!0}),s.create=function(d){return Ty(il(n,d))},s}const et=Ty(bs);et.Axios=ll;et.CanceledError=Ss;et.CancelToken=VS;et.isCancel=vy;et.VERSION=jy;et.toFormData=oo;et.AxiosError=pe;et.Cancel=et.CanceledError;et.all=function(r){return Promise.all(r)};et.spread=YS;et.isAxiosError=XS;et.mergeConfig=il;et.AxiosHeaders=Ht;et.formToJSON=n=>xy(H.isHTMLForm(n)?new FormData(n):n);et.getAdapter=Ey.getAdapter;et.HttpStatusCode=ed;et.default=et;const{Axios:zj,AxiosError:kj,CanceledError:Dj,isCancel:Uj,CancelToken:Lj,VERSION:Bj,all:Hj,Cancel:qj,isAxiosError:Gj,spread:Qj,toFormData:Vj,AxiosHeaders:Yj,HttpStatusCode:Xj,formToJSON:Fj,getAdapter:Kj,mergeConfig:Zj}=et,Me=et.create({baseURL:""});function Wl(n){n?Me.defaults.headers.common.Authorization=`Bearer ${n}`:delete Me.defaults.headers.common.Authorization}let td=null;function FS(n){td=n}let Cy=null;function KS(n){Cy=n}Me.interceptors.request.use(n=>{if(!n.headers.Authorization){const r=localStorage.getItem("access_token");r&&(n.headers.Authorization=`Bearer ${r}`)}return n});Me.interceptors.response.use(n=>n,async n=>{const r=n.config;if(r.url?.startsWith("/api/auth/"))return Promise.reject(n);if(n.response?.status===401&&!r._retry&&td){r._retry=!0;const s=await td();if(s)return r.headers.Authorization=`Bearer ${s}`,Me(r);Cy?.()}return Promise.reject(n)});async function ZS(){const{data:n}=await Me.get("/api/auth/setup-status");return n}async function _y(n,r,s){const{data:i}=await Me.post("/api/auth/setup",{email:n,password:r,username:s});return i}async function JS(n,r){const{data:s}=await Me.post("/api/auth/login",{email:n,password:r});return s}async function $S(n){const{data:r}=await Me.post("/api/auth/refresh",{refresh_token:n});return r}const My=S.createContext(void 0),os="jarvis-admin:access_token",Il="jarvis-admin:refresh_token",Gi="jarvis-admin:user",IS=600*1e3;function PS({children:n}){const[r,s]=S.useState(()=>{const x=localStorage.getItem(os),y=localStorage.getItem(Il),v=localStorage.getItem(Gi);if(x&&y&&v)try{const p=JSON.parse(v);return Wl(x),{user:p,accessToken:x,refreshToken:y,isAuthenticated:!0,isLoading:!1,error:null}}catch{}return{user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,isLoading:!1,error:null}}),i=S.useCallback(()=>{localStorage.removeItem(os),localStorage.removeItem(Il),localStorage.removeItem(Gi),Wl(null),s({user:null,accessToken:null,refreshToken:null,isAuthenticated:!1,isLoading:!1,error:null})},[]),d=S.useCallback(async()=>{const x=localStorage.getItem(Il);if(!x)return null;try{const y=await $S(x),v=y.access_token,p=y.refresh_token??x;return localStorage.setItem(os,v),localStorage.setItem(Il,p),Wl(v),s(w=>({...w,accessToken:v,refreshToken:p})),v}catch{return i(),null}},[i]);S.useEffect(()=>{FS(d),KS(i)},[d,i]),S.useEffect(()=>{if(!r.isAuthenticated)return;const x=setInterval(()=>{d()},IS);return()=>clearInterval(x)},[r.isAuthenticated,d]);const f=S.useCallback(async(x,y)=>{s(v=>({...v,error:null,isLoading:!0}));try{const v=await JS(x,y);if(!v.user.is_superuser){s(p=>({...p,isLoading:!1,error:"Admin access required. This account is not a superuser."}));return}localStorage.setItem(os,v.access_token),localStorage.setItem(Il,v.refresh_token),localStorage.setItem(Gi,JSON.stringify(v.user)),Wl(v.access_token),s({user:v.user,accessToken:v.access_token,refreshToken:v.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(v){const p=v?.response?.data?.detail??"Login failed";s(w=>({...w,isLoading:!1,error:p}))}},[]),m=S.useCallback(async(x,y,v)=>{s(p=>({...p,error:null,isLoading:!0}));try{const p=await _y(x,y,v);localStorage.setItem(os,p.access_token),localStorage.setItem(Il,p.refresh_token),localStorage.setItem(Gi,JSON.stringify(p.user)),Wl(p.access_token),s({user:p.user,accessToken:p.access_token,refreshToken:p.refresh_token,isAuthenticated:!0,isLoading:!1,error:null})}catch(p){const w=p?.response?.data?.detail??"Setup failed";s(M=>({...M,isLoading:!1,error:w}))}},[]),g=S.useMemo(()=>({state:r,login:f,setup:m,logout:i}),[r,f,m,i]);return u.jsx(My.Provider,{value:g,children:n})}function Nd(){const n=S.useContext(My);if(!n)throw new Error("useAuth must be used within AuthProvider");return n}const Ay=(...n)=>n.filter((r,s,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===s).join(" ").trim();const WS=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const ew=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,i)=>i?i.toUpperCase():s.toLowerCase());const mg=n=>{const r=ew(n);return r.charAt(0).toUpperCase()+r.slice(1)};var tw={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"};const aw=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1};const nw=S.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:d="",children:f,iconNode:m,...g},x)=>S.createElement("svg",{ref:x,...tw,width:r,height:r,stroke:n,strokeWidth:i?Number(s)*24/Number(r):s,className:Ay("lucide",d),...!f&&!aw(g)&&{"aria-hidden":"true"},...g},[...m.map(([y,v])=>S.createElement(y,v)),...Array.isArray(f)?f:[f]]));const Ee=(n,r)=>{const s=S.forwardRef(({className:i,...d},f)=>S.createElement(nw,{ref:f,iconNode:r,className:Ay(`lucide-${WS(mg(n))}`,`lucide-${n}`,i),...d}));return s.displayName=mg(n),s};const lw=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],rw=Ee("box",lw);const sw=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],ad=Ee("brain",sw);const iw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ed=Ee("check",iw);const ow=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Oy=Ee("chevron-down",ow);const cw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zy=Ee("chevron-right",cw);const uw=[["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"}]],ky=Ee("circle-alert",uw);const dw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],Dy=Ee("circle-arrow-up",dw);const fw=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],mw=Ee("circle-check-big",fw);const hw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],$t=Ee("circle-check",hw);const pw=[["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"}]],us=Ee("circle-x",pw);const gw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nd=Ee("circle",gw);const yw=[["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"}]],Uy=Ee("copy",yw);const xw=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],hs=Ee("cpu",xw);const vw=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],bw=Ee("database",vw);const Sw=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],ds=Ee("download",Sw);const ww=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Nw=Ee("external-link",ww);const Ew=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],jw=Ee("file-text",Ew);const Rw=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],jd=Ee("hard-drive",Rw);const Tw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Cw=Ee("info",Tw);const _w=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],Mw=Ee("key",_w);const Aw=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Ow=Ee("layout-dashboard",Aw);const zw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ta=Ee("loader-circle",zw);const kw=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Rd=Ee("lock",kw);const Dw=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Uw=Ee("log-out",Dw);const Lw=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Bw=Ee("monitor",Lw);const Hw=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],qw=Ee("moon",Hw);const Gw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Qw=Ee("pencil",Gw);const Vw=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Yw=Ee("play",Vw);const Xw=[["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"}]],ga=Ee("refresh-cw",Xw);const Fw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],uo=Ee("rotate-ccw",Fw);const Kw=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Ly=Ee("rotate-cw",Kw);const Zw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jw=Ee("search",Zw);const $w=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],Td=Ee("server",$w);const Iw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],By=Ee("settings",Iw);const Pw=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Ww=Ee("sparkles",Pw);const eN=[["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"}]],tN=Ee("sun",eN);const aN=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],nN=Ee("trash-2",aN);const lN=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Ca=Ee("triangle-alert",lN);const rN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sN=Ee("x",rN);const iN=[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],oN=Ee("zap-off",iN);const cN=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],uN=Ee("zap",cN);function Hy(n){var r,s,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var d=n.length;for(r=0;r<d;r++)n[r]&&(s=Hy(n[r]))&&(i&&(i+=" "),i+=s)}else for(s in n)n[s]&&(i&&(i+=" "),i+=s);return i}function dN(){for(var n,r,s=0,i="",d=arguments.length;s<d;s++)(n=arguments[s])&&(r=Hy(n))&&(i&&(i+=" "),i+=r);return i}const fN=(n,r)=>{const s=new Array(n.length+r.length);for(let i=0;i<n.length;i++)s[i]=n[i];for(let i=0;i<r.length;i++)s[n.length+i]=r[i];return s},mN=(n,r)=>({classGroupId:n,validator:r}),qy=(n=new Map,r=null,s)=>({nextPart:n,validators:r,classGroupId:s}),ao="-",hg=[],hN="arbitrary..",pN=n=>{const r=yN(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return gN(m);const g=m.split(ao),x=g[0]===""&&g.length>1?1:0;return Gy(g,x,r)},getConflictingClassGroupIds:(m,g)=>{if(g){const x=i[m],y=s[m];return x?y?fN(y,x):x:y||hg}return s[m]||hg}}},Gy=(n,r,s)=>{if(n.length-r===0)return s.classGroupId;const d=n[r],f=s.nextPart.get(d);if(f){const y=Gy(n,r+1,f);if(y)return y}const m=s.validators;if(m===null)return;const g=r===0?n.join(ao):n.slice(r).join(ao),x=m.length;for(let y=0;y<x;y++){const v=m[y];if(v.validator(g))return v.classGroupId}},gN=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),s=r.indexOf(":"),i=r.slice(0,s);return i?hN+i:void 0})(),yN=n=>{const{theme:r,classGroups:s}=n;return xN(s,r)},xN=(n,r)=>{const s=qy();for(const i in n){const d=n[i];Cd(d,s,i,r)}return s},Cd=(n,r,s,i)=>{const d=n.length;for(let f=0;f<d;f++){const m=n[f];vN(m,r,s,i)}},vN=(n,r,s,i)=>{if(typeof n=="string"){bN(n,r,s);return}if(typeof n=="function"){SN(n,r,s,i);return}wN(n,r,s,i)},bN=(n,r,s)=>{const i=n===""?r:Qy(r,n);i.classGroupId=s},SN=(n,r,s,i)=>{if(NN(n)){Cd(n(i),r,s,i);return}r.validators===null&&(r.validators=[]),r.validators.push(mN(s,n))},wN=(n,r,s,i)=>{const d=Object.entries(n),f=d.length;for(let m=0;m<f;m++){const[g,x]=d[m];Cd(x,Qy(r,g),s,i)}},Qy=(n,r)=>{let s=n;const i=r.split(ao),d=i.length;for(let f=0;f<d;f++){const m=i[f];let g=s.nextPart.get(m);g||(g=qy(),s.nextPart.set(m,g)),s=g}return s},NN=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,EN=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),i=Object.create(null);const d=(f,m)=>{s[f]=m,r++,r>n&&(r=0,i=s,s=Object.create(null))};return{get(f){let m=s[f];if(m!==void 0)return m;if((m=i[f])!==void 0)return d(f,m),m},set(f,m){f in s?s[f]=m:d(f,m)}}},ld="!",pg=":",jN=[],gg=(n,r,s,i,d)=>({modifiers:n,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:i,isExternal:d}),RN=n=>{const{prefix:r,experimentalParseClassName:s}=n;let i=d=>{const f=[];let m=0,g=0,x=0,y;const v=d.length;for(let j=0;j<v;j++){const T=d[j];if(m===0&&g===0){if(T===pg){f.push(d.slice(x,j)),x=j+1;continue}if(T==="/"){y=j;continue}}T==="["?m++:T==="]"?m--:T==="("?g++:T===")"&&g--}const p=f.length===0?d:d.slice(x);let w=p,M=!1;p.endsWith(ld)?(w=p.slice(0,-1),M=!0):p.startsWith(ld)&&(w=p.slice(1),M=!0);const N=y&&y>x?y-x:void 0;return gg(f,M,w,N)};if(r){const d=r+pg,f=i;i=m=>m.startsWith(d)?f(m.slice(d.length)):gg(jN,!1,m,void 0,!0)}if(s){const d=i;i=f=>s({className:f,parseClassName:d})}return i},TN=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((s,i)=>{r.set(s,1e6+i)}),s=>{const i=[];let d=[];for(let f=0;f<s.length;f++){const m=s[f],g=m[0]==="[",x=r.has(m);g||x?(d.length>0&&(d.sort(),i.push(...d),d=[]),i.push(m)):d.push(m)}return d.length>0&&(d.sort(),i.push(...d)),i}},CN=n=>({cache:EN(n.cacheSize),parseClassName:RN(n),sortModifiers:TN(n),...pN(n)}),_N=/\s+/,MN=(n,r)=>{const{parseClassName:s,getClassGroupId:i,getConflictingClassGroupIds:d,sortModifiers:f}=r,m=[],g=n.trim().split(_N);let x="";for(let y=g.length-1;y>=0;y-=1){const v=g[y],{isExternal:p,modifiers:w,hasImportantModifier:M,baseClassName:N,maybePostfixModifierPosition:j}=s(v);if(p){x=v+(x.length>0?" "+x:x);continue}let T=!!j,z=i(T?N.substring(0,j):N);if(!z){if(!T){x=v+(x.length>0?" "+x:x);continue}if(z=i(N),!z){x=v+(x.length>0?" "+x:x);continue}T=!1}const _=w.length===0?"":w.length===1?w[0]:f(w).join(":"),Y=M?_+ld:_,L=Y+z;if(m.indexOf(L)>-1)continue;m.push(L);const te=d(z,T);for(let P=0;P<te.length;++P){const W=te[P];m.push(Y+W)}x=v+(x.length>0?" "+x:x)}return x},AN=(...n)=>{let r=0,s,i,d="";for(;r<n.length;)(s=n[r++])&&(i=Vy(s))&&(d&&(d+=" "),d+=i);return d},Vy=n=>{if(typeof n=="string")return n;let r,s="";for(let i=0;i<n.length;i++)n[i]&&(r=Vy(n[i]))&&(s&&(s+=" "),s+=r);return s},ON=(n,...r)=>{let s,i,d,f;const m=x=>{const y=r.reduce((v,p)=>p(v),n());return s=CN(y),i=s.cache.get,d=s.cache.set,f=g,g(x)},g=x=>{const y=i(x);if(y)return y;const v=MN(x,s);return d(x,v),v};return f=m,(...x)=>f(AN(...x))},zN=[],st=n=>{const r=s=>s[n]||zN;return r.isThemeGetter=!0,r},Yy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xy=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kN=/^\d+\/\d+$/,DN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,UN=/\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$/,LN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,BN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pl=n=>kN.test(n),je=n=>!!n&&!Number.isNaN(Number(n)),Cn=n=>!!n&&Number.isInteger(Number(n)),Uu=n=>n.endsWith("%")&&je(n.slice(0,-1)),Ja=n=>DN.test(n),qN=()=>!0,GN=n=>UN.test(n)&&!LN.test(n),Fy=()=>!1,QN=n=>BN.test(n),VN=n=>HN.test(n),YN=n=>!se(n)&&!ie(n),XN=n=>ir(n,Jy,Fy),se=n=>Yy.test(n),tl=n=>ir(n,$y,GN),Lu=n=>ir(n,$N,je),yg=n=>ir(n,Ky,Fy),FN=n=>ir(n,Zy,VN),Qi=n=>ir(n,Iy,QN),ie=n=>Xy.test(n),cs=n=>or(n,$y),KN=n=>or(n,IN),xg=n=>or(n,Ky),ZN=n=>or(n,Jy),JN=n=>or(n,Zy),Vi=n=>or(n,Iy,!0),ir=(n,r,s)=>{const i=Yy.exec(n);return i?i[1]?r(i[1]):s(i[2]):!1},or=(n,r,s=!1)=>{const i=Xy.exec(n);return i?i[1]?r(i[1]):s:!1},Ky=n=>n==="position"||n==="percentage",Zy=n=>n==="image"||n==="url",Jy=n=>n==="length"||n==="size"||n==="bg-size",$y=n=>n==="length",$N=n=>n==="number",IN=n=>n==="family-name",Iy=n=>n==="shadow",PN=()=>{const n=st("color"),r=st("font"),s=st("text"),i=st("font-weight"),d=st("tracking"),f=st("leading"),m=st("breakpoint"),g=st("container"),x=st("spacing"),y=st("radius"),v=st("shadow"),p=st("inset-shadow"),w=st("text-shadow"),M=st("drop-shadow"),N=st("blur"),j=st("perspective"),T=st("aspect"),z=st("ease"),_=st("animate"),Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],te=()=>[...L(),ie,se],P=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],I=()=>[ie,se,x],ge=()=>[Pl,"full","auto",...I()],Oe=()=>[Cn,"none","subgrid",ie,se],ne=()=>["auto",{span:["full",Cn,ie,se]},Cn,ie,se],Q=()=>[Cn,"auto",ie,se],K=()=>["auto","min","max","fr",ie,se],ce=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...I()],J=()=>[Pl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],F=()=>[n,ie,se],Se=()=>[...L(),xg,yg,{position:[ie,se]}],xe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",ZN,XN,{size:[ie,se]}],q=()=>[Uu,cs,tl],G=()=>["","none","full",y,ie,se],$=()=>["",je,cs,tl],ae=()=>["solid","dashed","dotted","double"],fe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>[je,Uu,xg,yg],be=()=>["","none",N,ie,se],ze=()=>["none",je,ie,se],bt=()=>["none",je,ie,se],qt=()=>[je,ie,se],St=()=>[Pl,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ja],breakpoint:[Ja],color:[qN],container:[Ja],"drop-shadow":[Ja],ease:["in","out","in-out"],font:[YN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ja],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ja],shadow:[Ja],spacing:["px",je],text:[Ja],"text-shadow":[Ja],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pl,se,ie,T]}],container:["container"],columns:[{columns:[je,se,ie,g]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"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:te()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ge()}],"inset-x":[{"inset-x":ge()}],"inset-y":[{"inset-y":ge()}],start:[{start:ge()}],end:[{end:ge()}],top:[{top:ge()}],right:[{right:ge()}],bottom:[{bottom:ge()}],left:[{left:ge()}],visibility:["visible","invisible","collapse"],z:[{z:[Cn,"auto",ie,se]}],basis:[{basis:[Pl,"full","auto",g,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,Pl,"auto","initial","none",se]}],grow:[{grow:["",je,ie,se]}],shrink:[{shrink:["",je,ie,se]}],order:[{order:[Cn,"first","last","none",ie,se]}],"grid-cols":[{"grid-cols":Oe()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":Oe()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...ce(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...ce()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":ce()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[g,"screen",...J()]}],"min-w":[{"min-w":[g,"screen","none",...J()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[m]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",s,cs,tl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,ie,Lu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Uu,se]}],"font-family":[{font:[KN,se,r]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,ie,se]}],"line-clamp":[{"line-clamp":[je,"none",ie,Lu]}],leading:[{leading:[f,...I()]}],"list-image":[{"list-image":["none",ie,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ie,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",ie,tl]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[je,"auto",ie,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ie,se]}],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",ie,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Se()}],"bg-repeat":[{bg:xe()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cn,ie,se],radial:["",ie,se],conic:[Cn,ie,se]},JN,FN]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,ie,se]}],"outline-w":[{outline:["",je,cs,tl]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",v,Vi,Qi]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",p,Vi,Qi]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[je,tl]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",w,Vi,Qi]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[je,ie,se]}],"mix-blend":[{"mix-blend":[...fe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":fe()}],"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":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[ie,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"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":L()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Se()}],"mask-repeat":[{mask:xe()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ie,se]}],filter:[{filter:["","none",ie,se]}],blur:[{blur:be()}],brightness:[{brightness:[je,ie,se]}],contrast:[{contrast:[je,ie,se]}],"drop-shadow":[{"drop-shadow":["","none",M,Vi,Qi]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",je,ie,se]}],"hue-rotate":[{"hue-rotate":[je,ie,se]}],invert:[{invert:["",je,ie,se]}],saturate:[{saturate:[je,ie,se]}],sepia:[{sepia:["",je,ie,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ie,se]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[je,ie,se]}],"backdrop-contrast":[{"backdrop-contrast":[je,ie,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,ie,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,ie,se]}],"backdrop-invert":[{"backdrop-invert":["",je,ie,se]}],"backdrop-opacity":[{"backdrop-opacity":[je,ie,se]}],"backdrop-saturate":[{"backdrop-saturate":[je,ie,se]}],"backdrop-sepia":[{"backdrop-sepia":["",je,ie,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ie,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",ie,se]}],ease:[{ease:["linear","initial",z,ie,se]}],delay:[{delay:[je,ie,se]}],animate:[{animate:["none",_,ie,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,ie,se]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:ze()}],"rotate-x":[{"rotate-x":ze()}],"rotate-y":[{"rotate-y":ze()}],"rotate-z":[{"rotate-z":ze()}],scale:[{scale:bt()}],"scale-x":[{"scale-x":bt()}],"scale-y":[{"scale-y":bt()}],"scale-z":[{"scale-z":bt()}],"scale-3d":["scale-3d"],skew:[{skew:qt()}],"skew-x":[{"skew-x":qt()}],"skew-y":[{"skew-y":qt()}],transform:[{transform:[ie,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:St()}],"translate-x":[{"translate-x":St()}],"translate-y":[{"translate-y":St()}],"translate-z":[{"translate-z":St()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"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",ie,se]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",ie,se]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[je,cs,tl,Lu]}],stroke:[{stroke:["none",...F()]}],"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"]}},WN=ON(PN);function le(...n){return WN(dN(n))}async function eE(){const{data:n}=await Me.get("/api/system/info");return n}function tE(){return Pa({queryKey:["system-info"],queryFn:eE,staleTime:6e4})}function aE(n){const r=Math.floor(n/86400),s=Math.floor(n%86400/3600);if(r>0)return`${r}d ${s}h`;const i=Math.floor(n%3600/60);return s>0?`${s}h ${i}m`:`${i}m`}function nE(){const{data:n}=tE();return n?u.jsxs("div",{className:"border-t border-[var(--color-border)] px-3 py-2 text-[10px] text-[var(--color-text-muted)]",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(hs,{size:10}),u.jsxs("span",{children:[n.cpuCount," cores"]}),u.jsx("span",{className:"mx-0.5",children:"|"}),u.jsx(jd,{size:10}),u.jsxs("span",{children:[Math.round(n.totalMemoryMb/1024),"GB"]})]}),u.jsxs("div",{className:"mt-0.5",children:[n.hostname," · up ",aE(n.uptime)," · v",n.version]})]}):null}const lE=[{label:"Dashboard",icon:Ow,path:"/dashboard"},{label:"Settings",icon:By,path:"/settings"},{label:"Services",icon:Td,path:"/services"},{label:"Models",icon:rw,path:"/models"},{label:"Nodes",icon:hs,path:"/nodes"}];function rE(){return u.jsxs("aside",{className:"flex w-56 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsx("div",{className:"flex h-14 items-center border-b border-[var(--color-border)] px-4",children:u.jsx("span",{className:"text-lg font-bold text-[var(--color-primary)]",children:"Jarvis"})}),u.jsx("nav",{className:"flex-1 space-y-1 p-2",children:lE.map(n=>u.jsxs(Xg,{to:n.path,className:({isActive:r})=>le("flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",r?"bg-[var(--color-primary)]/10 text-[var(--color-primary)]":"text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-[var(--color-text)]"),children:[u.jsx(n.icon,{size:18}),n.label]},n.path))}),u.jsx(nE,{})]})}function sE(){const{state:n,logout:r}=Nd(),{theme:s,toggleTheme:i}=g2();return u.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-[var(--color-border)] bg-[var(--color-surface)] px-6",children:[u.jsx("h2",{className:"text-sm font-medium text-[var(--color-text-muted)]",children:"Admin Dashboard"}),u.jsxs("div",{className:"flex items-center gap-3",children:[n.user&&u.jsx("span",{className:"text-sm text-[var(--color-text-muted)]",children:n.user.email}),u.jsx("button",{onClick:i,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",title:`Switch to ${s==="dark"?"light":"dark"} mode`,children:s==="dark"?u.jsx(tN,{size:18}):u.jsx(qw,{size:18})}),u.jsx("button",{onClick:r,className:"rounded-lg p-2 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-red-500",title:"Logout",children:u.jsx(Uw,{size:18})})]})]})}function iE(){const{state:n}=Nd();return n.isLoading?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("p",{className:"text-[var(--color-text-muted)]",children:"Loading..."})}):n.isAuthenticated?u.jsxs("div",{className:"flex h-screen bg-[var(--color-background)]",children:[u.jsx(rE,{}),u.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[u.jsx(sE,{}),u.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:u.jsx(wb,{})})]})]}):u.jsx(Pi,{to:"/login",replace:!0})}function oE(){const{state:n,login:r,setup:s}=Nd(),i=An(),[d,f]=S.useState("loading"),[m,g]=S.useState(""),[x,y]=S.useState(""),[v,p]=S.useState(""),[w,M]=S.useState(""),[N,j]=S.useState(null);if(S.useEffect(()=>{let L=!1;async function te(){try{const{data:P}=await Me.get("/api/setup/status");if(!L&&!P.configured){i("/setup",{replace:!0});return}}catch{if(!L){i("/setup",{replace:!0});return}}try{const P=await ZS();L||f(P.needs_setup?"setup":"login")}catch{L||f("login")}}return te(),()=>{L=!0}},[i]),n.isAuthenticated)return u.jsx(Pi,{to:"/settings",replace:!0});const T=L=>{L.preventDefault(),r(m,v)},z=L=>{if(L.preventDefault(),j(null),v!==w){j("Passwords do not match");return}if(v.length<8){j("Password must be at least 8 characters");return}s(m,v,x||void 0)},_=le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]"),Y=N??n.error;return d==="loading"?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("div",{className:"w-full max-w-sm rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:u.jsx("div",{className:"flex justify-center",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-border)] border-t-[var(--color-primary)]"})})})}):u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("div",{className:"w-full max-w-sm rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:d==="setup"?u.jsxs(u.Fragment,{children:[u.jsx("h1",{className:"mb-1 text-center text-2xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),u.jsx("p",{className:"mb-6 text-center text-sm text-[var(--color-text-muted)]",children:"Set up your first administrator account to get started."}),u.jsxs("form",{onSubmit:z,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:L=>g(L.target.value),className:_,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"username",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Username"}),u.jsx("input",{id:"username",type:"text",required:!0,autoComplete:"username",value:x,onChange:L=>y(L.target.value),className:_,placeholder:"admin"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:v,onChange:L=>p(L.target.value),className:_})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),u.jsx("input",{id:"confirm-password",type:"password",required:!0,minLength:8,autoComplete:"new-password",value:w,onChange:L=>M(L.target.value),className:_})]}),Y&&u.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:Y}),u.jsx("button",{type:"submit",disabled:n.isLoading,className:le("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50","transition-opacity"),children:n.isLoading?"Creating account...":"Create Admin Account"})]})]}):u.jsxs(u.Fragment,{children:[u.jsx("h1",{className:"mb-6 text-center text-2xl font-bold text-[var(--color-text)]",children:"Jarvis Admin"}),u.jsxs("form",{onSubmit:T,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",required:!0,autoComplete:"email",value:m,onChange:L=>g(L.target.value),className:_,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",required:!0,autoComplete:"current-password",value:v,onChange:L=>p(L.target.value),className:_})]}),Y&&u.jsx("p",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:Y}),u.jsx("button",{type:"submit",disabled:n.isLoading,className:le("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50","transition-opacity"),children:n.isLoading?"Signing in...":"Sign in"})]})]})})})}async function cE(){const{data:n}=await Me.get("/api/settings/");return n}async function uE(n,r,s){const{data:i}=await Me.put(`/api/settings/${encodeURIComponent(n)}/${r}`,{value:s});return i}function dE(){return Pa({queryKey:["settings"],queryFn:cE,staleTime:3e4})}function fE(){const n=_a();return Wa({mutationFn:({serviceName:r,key:s,value:i})=>uE(r,s,i),onSuccess:()=>{n.invalidateQueries({queryKey:["settings"]})}})}function mE({setting:n,onSave:r,onCancel:s,isSaving:i}){const[d,f]=S.useState(()=>n.value_type==="json"?JSON.stringify(n.value,null,2):n.value_type==="bool"?"":String(n.value??"")),[m,g]=S.useState(()=>!!n.value),[x,y]=S.useState(null),v=!!n.options?.length,p=v&&!n.options.includes(d),[w,M]=S.useState(p),N=T=>{T.preventDefault();let z;switch(n.value_type){case"bool":z=m;break;case"int":if(z=parseInt(d,10),isNaN(z)){y("Must be a whole number");return}y(null);break;case"float":if(z=parseFloat(d),isNaN(z)){y("Must be a number");return}y(null);break;case"json":try{z=JSON.parse(d),y(null)}catch{y("Invalid JSON");return}break;default:z=d}r(z)},j=le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-1.5","text-sm text-[var(--color-text)] outline-none focus:ring-2 focus:ring-[var(--color-primary)]");return u.jsxs("form",{onSubmit:N,className:"flex items-center gap-2",children:[v?u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("select",{value:w?"__other__":d,onChange:T=>{T.target.value==="__other__"?(M(!0),f("")):(M(!1),f(T.target.value))},className:le(j,"max-w-xs"),children:[n.options.map(T=>u.jsx("option",{value:String(T),children:String(T)},String(T))),u.jsx("option",{value:"__other__",children:"Other..."})]}),w&&u.jsx("input",{type:"text",value:d,onChange:T=>f(T.target.value),placeholder:"Custom value",className:le(j,"max-w-xs"),autoFocus:!0})]}):n.value_type==="bool"?u.jsx("button",{type:"button",onClick:()=>g(T=>!T),className:le("relative h-6 w-11 rounded-full transition-colors",m?"bg-[var(--color-primary)]":"bg-[var(--color-border)]"),children:u.jsx("span",{className:le("absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white transition-transform",m&&"translate-x-5")})}):n.value_type==="json"?u.jsxs("div",{className:"flex-1",children:[u.jsx("textarea",{value:d,onChange:T=>{f(T.target.value),y(null)},rows:4,className:le(j,"font-mono text-xs")}),x&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:x})]}):u.jsxs("div",{children:[u.jsx("input",{type:n.value_type==="int"||n.value_type==="float"?"number":n.is_secret?"password":"text",step:n.value_type==="float"?"any":void 0,value:d,onChange:T=>{f(T.target.value),y(null)},className:le(j,"max-w-xs")}),x&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:x})]}),u.jsx("button",{type:"submit",disabled:i,className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:i?"Saving...":"Save"}),u.jsx("button",{type:"button",onClick:s,className:"rounded-lg border border-[var(--color-border)] px-3 py-1.5 text-xs text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",children:"Cancel"})]})}function hE(n){return n.is_secret?"********":n.value===null||n.value===void 0?"(not set)":n.value_type==="json"?JSON.stringify(n.value):String(n.value)}const pE={string:"bg-blue-500/10 text-blue-500",int:"bg-emerald-500/10 text-emerald-500",float:"bg-emerald-500/10 text-emerald-500",bool:"bg-amber-500/10 text-amber-500",json:"bg-purple-500/10 text-purple-500"};function gE({setting:n,serviceName:r,onRestartService:s}){const[i,d]=S.useState(!1),f=fE(),m=g=>{f.mutate({serviceName:r,key:n.key,value:g},{onSuccess:x=>{d(!1),x.requires_reload?We.warning(`Setting updated. ${r} requires a restart to apply.`,s?{action:{label:"Restart",onClick:s}}:void 0):We.success("Setting updated")},onError:x=>{We.error(`Failed to update: ${x.message}`)}})};return u.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-lg px-3 py-2 hover:bg-[var(--color-surface-alt)]",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"text-sm font-medium text-[var(--color-text)]",children:n.key}),u.jsx("span",{className:le("rounded px-1.5 py-0.5 text-[10px] font-medium",pE[n.value_type]??"bg-gray-500/10 text-gray-500"),children:n.value_type}),n.from_db&&u.jsx("span",{title:"Stored in database",children:u.jsx(bw,{size:12,className:"text-[var(--color-tertiary)]"})}),n.requires_reload&&u.jsx("span",{title:"Requires service restart",children:u.jsx(Ca,{size:12,className:"text-amber-500"})})]}),n.description&&u.jsx("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:n.description}),i?u.jsx("div",{className:"mt-2",children:u.jsx(mE,{setting:n,onSave:m,onCancel:()=>d(!1),isSaving:f.isPending})}):u.jsx("p",{className:"mt-1 font-mono text-xs text-[var(--color-text-muted)]",children:hE(n)})]}),!i&&u.jsx("button",{onClick:()=>d(!0),className:"shrink-0 rounded-lg p-1.5 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)] hover:text-[var(--color-primary)]",title:"Edit",children:u.jsx(Qw,{size:14})})]})}function yE({category:n,settings:r,serviceName:s,onRestartService:i}){const[d,f]=S.useState(!0);return u.jsxs("div",{children:[u.jsxs("button",{onClick:()=>f(m=>!m),className:"flex w-full items-center gap-2 px-3 py-1.5 text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[d?u.jsx(Oy,{size:14}):u.jsx(zy,{size:14}),n,u.jsxs("span",{className:"font-normal",children:["(",r.length,")"]})]}),d&&u.jsx("div",{className:"space-y-0.5",children:r.map(m=>u.jsx(gE,{setting:m,serviceName:s,onRestartService:i},m.key))})]})}async function xE(){const{data:n}=await Me.get("/api/containers");return n}async function vE(n){const{data:r}=await Me.post(`/api/containers/${n}/restart`);return r}function Py(){return Pa({queryKey:["containers"],queryFn:xE,staleTime:1e4,refetchInterval:1e4})}function Wy(){const n=_a();return Wa({mutationFn:r=>vE(r),onSuccess:()=>{n.invalidateQueries({queryKey:["containers"]})}})}function bE({result:n,defaultExpanded:r=!1}){const[s,i]=S.useState(r),{data:d}=Py(),f=Wy(),m=S.useCallback(()=>{const x=d?.containers.find(y=>y.name.includes(n.service_name)||y.name.includes(n.service_name.replace("jarvis-","")));x?f.mutate(x.id,{onSuccess:()=>We.success(`${n.service_name} is restarting...`),onError:y=>We.error(`Restart failed: ${y.message}`)}):We.error(`Could not find container for ${n.service_name}`)},[d,n.service_name,f]),g=S.useMemo(()=>{const x=new Map;for(const y of n.settings){const v=x.get(y.category)??[];x.set(y.category,[...v,y])}return x},[n]);return u.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsxs("button",{onClick:()=>i(x=>!x),className:"flex w-full items-center gap-3 px-4 py-3 text-left hover:bg-[var(--color-surface-alt)]",children:[s?u.jsx(Oy,{size:18,className:"text-[var(--color-text-muted)]"}):u.jsx(zy,{size:18,className:"text-[var(--color-text-muted)]"}),u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:n.service_name}),n.success?u.jsx($t,{size:16,className:"text-[var(--color-secondary)]"}):u.jsx(us,{size:16,className:"text-red-500"}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n.success?`${n.settings.length} settings`:n.error??"Error"}),n.latency_ms!=null&&u.jsxs("span",{className:le("ml-auto text-xs",n.latency_ms>500?"text-amber-500":"text-[var(--color-text-muted)]"),children:[Math.round(n.latency_ms),"ms"]})]}),s&&n.success&&u.jsx("div",{className:"space-y-2 border-t border-[var(--color-border)] px-2 py-3",children:[...g.entries()].map(([x,y])=>u.jsx(yE,{category:x,settings:y,serviceName:n.service_name,onRestartService:m},x))}),s&&!n.success&&u.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-3",children:u.jsx("p",{className:"text-sm text-red-500",children:n.error??"Failed to fetch settings"})})]})}function SE(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=dE(),[m,g]=S.useState(""),x=S.useMemo(()=>{if(!n)return[];if(!m.trim())return n.services;const y=m.toLowerCase();return n.services.map(v=>({...v,settings:v.settings.filter(p=>p.key.toLowerCase().includes(y)||p.category.toLowerCase().includes(y)||(p.description?.toLowerCase().includes(y)??!1))})).filter(v=>v.settings.length>0||v.service_name.toLowerCase().includes(y))},[n,m]);return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(ga,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load settings"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Settings"}),u.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[n&&u.jsxs("span",{children:[n.successful_services,"/",n.total_services," services"]}),u.jsx("button",{onClick:()=>d(),disabled:f,className:le("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(ga,{size:14})})]})]}),u.jsxs("div",{className:"relative",children:[u.jsx(Jw,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-muted)]"}),u.jsx("input",{type:"text",value:m,onChange:y=>g(y.target.value),placeholder:"Search settings...",className:le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] py-2 pl-9 pr-3","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),u.jsxs("div",{className:"space-y-3",children:[x.map((y,v)=>u.jsx(bE,{result:y,defaultExpanded:v===0},y.service_name)),x.length===0&&u.jsx("p",{className:"py-8 text-center text-sm text-[var(--color-text-muted)]",children:m?"No settings match your search":"No services found"})]})]})}async function wE(){const{data:n}=await Me.get("/api/services/registry");return n}async function NE(n){const{data:r}=await Me.post("/api/services/register",n);return r}async function EE(n){const{data:r}=await Me.post("/api/services/rotate-key",n);return r}async function jE(n){const{data:r}=await Me.post("/api/services/probe",n);return r}function RE(){return Pa({queryKey:["service-registry"],queryFn:wE,staleTime:3e4})}function TE(){const n=_a();return Wa({mutationFn:NE,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function CE(){const n=_a();return Wa({mutationFn:EE,onSuccess:()=>{n.invalidateQueries({queryKey:["service-registry"]})}})}function vg({ok:n,label:r}){return u.jsxs("span",{className:le("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",n?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:[n?u.jsx(Ed,{size:12}):u.jsx(sN,{size:12}),r]})}function _E({status:n,error:r,latency:s}){return n==="idle"?null:n==="probing"?u.jsx("span",{className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)]",children:u.jsx(Ta,{size:12,className:"animate-spin"})}):n==="healthy"?u.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600 dark:text-green-400",children:[u.jsx(nd,{size:8,fill:"currentColor"}),s!=null&&`${s}ms`]}):u.jsxs("span",{className:"flex items-center gap-1 text-xs text-red-500",title:r,children:[u.jsx(nd,{size:8,fill:"currentColor"}),r||"Unreachable"]})}function ME({entry:n,checked:r,host:s,port:i,scheme:d,onToggle:f,onHostChange:m,onPortChange:g,onSchemeChange:x,onHostBlur:y,onPortBlur:v,onRotateKey:p,disabled:w,rotating:M,healthStatus:N,healthError:j,healthLatency:T}){return u.jsxs("div",{className:le("flex flex-wrap items-center gap-3 rounded-lg border border-[var(--color-border)] p-3","bg-[var(--color-surface)] transition-colors",r&&"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5"),children:[u.jsx("input",{type:"checkbox",checked:r,onChange:f,disabled:w,className:"h-4 w-4 rounded border-[var(--color-border)] accent-[var(--color-primary)]"}),u.jsxs("div",{className:"min-w-[180px] flex-1",children:[u.jsx("div",{className:"text-sm font-medium text-[var(--color-text)]",children:n.name}),u.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:n.description})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(vg,{ok:n.config_registered,label:"Config"}),u.jsx(vg,{ok:n.auth_registered,label:"Auth"}),n.auth_registered&&u.jsxs("button",{onClick:p,disabled:w||M,className:le("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium","bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]","hover:bg-[var(--color-primary)]/10 hover:text-[var(--color-primary)]","disabled:opacity-50"),title:"Rotate app key",children:[u.jsx(Ly,{size:12,className:M?"animate-spin":""}),"Rotate Key"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{type:"button",onClick:()=>{const z=["http","https","mqtt"],_=z[(z.indexOf(d)+1)%z.length];x(_)},disabled:w,className:le("rounded border px-1.5 py-1 text-xs font-mono",d==="https"?"border-green-500/40 bg-green-500/10 text-green-600 dark:text-green-400":d==="mqtt"?"border-purple-500/40 bg-purple-500/10 text-purple-600 dark:text-purple-400":"border-[var(--color-border)] bg-[var(--color-background)] text-[var(--color-text-muted)]","disabled:opacity-50"),title:"Toggle scheme",children:d}),u.jsx("input",{type:"text",value:s,onChange:z=>m(z.target.value),onBlur:y,disabled:w,placeholder:"host",className:le("w-36 rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2 py-1","text-xs text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]","disabled:opacity-50")}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:":"}),u.jsx("input",{type:"number",value:i,onChange:z=>g(Number(z.target.value)),onBlur:v,disabled:w,className:le("w-20 rounded border border-[var(--color-border)] bg-[var(--color-background)] px-2 py-1","text-xs text-[var(--color-text)] outline-none focus:ring-1 focus:ring-[var(--color-primary)]","disabled:opacity-50")}),u.jsx(_E,{status:N,error:j,latency:T})]})]})}function AE(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=RE(),m=TE(),g=CE(),[x,y]=S.useState({}),[v,p]=S.useState(null),[w,M]=S.useState(null),[N,j]=S.useState(null),[T,z]=S.useState(null),[_,Y]=S.useState({}),L=S.useCallback(Q=>{if(x[Q])return x[Q];const K=n?.services.find(ce=>ce.name===Q);return K?{checked:K.config_registered,host:K.current_host??"localhost",port:K.current_port??K.default_port,scheme:K.current_scheme??"http"}:{checked:!1,host:"localhost",port:0,scheme:"http"}},[x,n]),te=S.useCallback((Q,K)=>{y(ce=>{const he=ce[Q]??{checked:!1,host:"localhost",port:0};return{...ce,[Q]:{...he,...K}}})},[]),P=S.useCallback(async(Q,K,ce,he,O="http")=>{if(!(!K||!ce)){Y(J=>({...J,[Q]:{status:"probing"}}));try{const J=await jE({host:K,port:ce,health_path:he,scheme:O});Y(F=>({...F,[Q]:{status:J.healthy?"healthy":"unhealthy",error:J.error??void 0,latency:J.latency_ms??void 0}}))}catch{Y(J=>({...J,[Q]:{status:"unhealthy",error:"Request failed"}}))}}},[]),W=S.useCallback(()=>{if(!n)return;const Q=n.services.filter(K=>L(K.name).checked).map(K=>{const ce=L(K.name);return{name:K.name,host:ce.host,port:ce.port,scheme:ce.scheme}});if(Q.length===0){We.error("No services selected");return}p(null),M(null),m.mutate({services:Q},{onSuccess:K=>{p(K.results);const ce=K.results.filter(O=>O.config_ok&&O.auth_ok).length,he=K.results.length;ce===he?We.success(`All ${he} services registered`):We.warning(`${ce}/${he} services registered successfully`)},onError:K=>{We.error(`Registration failed: ${K.message}`)}})},[n,L,m]),I=S.useCallback(Q=>{j(Q),M(null),g.mutate({service_name:Q},{onSuccess:K=>{M(K),j(null),We.success(`Key rotated for ${Q}`)},onError:K=>{j(null),We.error(`Key rotation failed: ${K.message}`)}})},[g]),ge=S.useCallback(Q=>{navigator.clipboard.writeText(Q).then(()=>{z(Q),setTimeout(()=>z(null),2e3)})},[]),Oe=n?.services.filter(Q=>L(Q.name).checked).length??0,ne=v?.some(Q=>Q.env_written)||w?.env_written===!0;return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(ga,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load service registry"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Services"}),u.jsx("span",{className:"rounded-full bg-[var(--color-surface-alt)] px-2.5 py-0.5 text-xs font-medium text-[var(--color-text-muted)]",children:n?.services.length??0})]}),u.jsx("button",{onClick:()=>d(),disabled:f,className:le("rounded-lg p-1.5 text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(ga,{size:14})})]}),u.jsx("div",{className:"space-y-2",children:n?.services.map(Q=>{const K=L(Q.name),ce=_[Q.name]??{status:"idle"};return u.jsx(ME,{entry:Q,checked:K.checked,host:K.host,port:K.port,scheme:K.scheme,onToggle:()=>{const he=!K.checked;te(Q.name,{...K,checked:he}),he?P(Q.name,K.host,K.port,Q.health_path,K.scheme):Y(O=>({...O,[Q.name]:{status:"idle"}}))},onHostChange:he=>te(Q.name,{...K,host:he}),onPortChange:he=>te(Q.name,{...K,port:he}),onSchemeChange:he=>te(Q.name,{...K,scheme:he}),onHostBlur:()=>{K.checked&&P(Q.name,K.host,K.port,Q.health_path,K.scheme)},onPortBlur:()=>{K.checked&&P(Q.name,K.host,K.port,Q.health_path,K.scheme)},onRotateKey:()=>I(Q.name),disabled:m.isPending,rotating:N===Q.name,healthStatus:ce.status,healthError:ce.error,healthLatency:ce.latency},Q.name)})}),u.jsx("button",{onClick:W,disabled:m.isPending||Oe===0,className:le("rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white","hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50"),children:m.isPending?"Registering...":`Register Selected (${Oe})`}),w&&u.jsx(OE,{serviceName:w.service_name,appKey:w.app_key,envWritten:w.env_written,copiedKey:T,onCopy:ge,label:"Rotated Key"}),v&&u.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Registration Results"}),v.map(Q=>u.jsxs("div",{className:le("flex flex-wrap items-center gap-3 rounded-lg border p-3 text-sm",Q.config_ok&&Q.auth_ok?"border-green-500/20 bg-green-500/5":"border-yellow-500/20 bg-yellow-500/5"),children:[u.jsx("span",{className:"min-w-[180px] font-medium text-[var(--color-text)]",children:Q.name}),u.jsxs("span",{className:le("text-xs",Q.config_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Config: ",Q.config_ok?"OK":"Failed"]}),u.jsxs("span",{className:le("text-xs",Q.auth_ok?"text-green-600 dark:text-green-400":"text-red-500"),children:["Auth: ",Q.auth_ok?Q.auth_created?"Created":"Exists":"Failed"]}),Q.env_written!==null&&u.jsxs("span",{className:le("text-xs",Q.env_written?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",Q.env_written?"Written":"Failed"]}),Q.error&&u.jsxs("span",{className:"flex items-center gap-1 text-xs text-yellow-600 dark:text-yellow-400",children:[u.jsx(Ca,{size:12}),Q.error]}),Q.auth_created&&Q.app_key&&u.jsxs("div",{className:"mt-1 w-full",children:[u.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[u.jsx(Ca,{size:12}),"App key (shown once only):"]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"flex-1 overflow-x-auto rounded bg-[var(--color-background)] px-2 py-1 font-mono text-xs text-[var(--color-text)]",children:Q.app_key}),u.jsx("button",{onClick:()=>ge(Q.app_key),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:T===Q.app_key?u.jsx(Ed,{size:14,className:"text-green-500"}):u.jsx(Uy,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]},Q.name))]}),ne&&u.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-blue-500/20 bg-blue-500/5 p-3",children:[u.jsx(Cw,{size:16,className:"mt-0.5 shrink-0 text-blue-500"}),u.jsx("p",{className:"text-sm text-[var(--color-text)]",children:"Services whose .env files were updated need to be restarted to pick up the new credentials. Restart each affected service's container or process."})]})]})}function OE({serviceName:n,appKey:r,envWritten:s,copiedKey:i,onCopy:d,label:f}){return u.jsxs("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:[f,": ",n]}),u.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-500/5 p-3",children:[s!==null&&u.jsxs("span",{className:le("mb-2 inline-block text-xs",s?"text-green-600 dark:text-green-400":"text-red-500"),children:[".env: ",s?"Written":"Failed"]}),u.jsxs("div",{children:[u.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-medium text-yellow-600 dark:text-yellow-400",children:[u.jsx(Ca,{size:12}),"New app key (shown once only):"]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("code",{className:"flex-1 overflow-x-auto rounded bg-[var(--color-background)] px-2 py-1 font-mono text-xs text-[var(--color-text)]",children:r}),u.jsx("button",{onClick:()=>d(r),className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Copy to clipboard",children:i===r?u.jsx(Ed,{size:14,className:"text-green-500"}):u.jsx(Uy,{size:14,className:"text-[var(--color-text-muted)]"})})]})]})]})]})}async function zE(){const{data:n}=await Me.get("/api/llm-setup/status");return n}async function kE(n){const{data:r}=await Me.post("/api/llm-setup/configure",{settings:n});return r}async function DE(n,r,s){const{data:i}=await Me.post("/api/llm-setup/download",{repo:n,filename:r,token:s});return i}function UE(){return Pa({queryKey:["llm-status"],queryFn:zE,staleTime:3e4,retry:1})}function ex(){const n=_a();return Wa({mutationFn:r=>kE(r),onSuccess:()=>{n.invalidateQueries({queryKey:["llm-status"]}),n.invalidateQueries({queryKey:["containers"]})}})}function LE(){return Wa({mutationFn:({repo:n,filename:r,token:s})=>DE(n,r,s)})}async function _d(){const{data:n}=await Me.get("/api/install/status");return n}async function BE(n){const r=n?.length?{services:n.join(",")}:{},{data:s}=await Me.get("/api/install/preflight",{params:r});return s}async function HE(){const{data:n}=await Me.get("/api/install/hardware");return n}async function bg(n){const{data:r}=await Me.post("/api/install/generate",n);return r}async function Sg(){const{data:n}=await Me.get("/api/install/health");return n}async function tx(){const{data:n}=await Me.get("/api/install/registry");return n}async function qE(){const{data:n}=await Me.get("/api/install/defaults");return n}const GE={running:"bg-emerald-500",exited:"bg-red-500",restarting:"bg-amber-500",paused:"bg-amber-500",created:"bg-gray-400",dead:"bg-red-700"};function QE(n){return n.match(/^Up (.+)$/)?.[1]??null}function wg({container:n,onRestart:r,isRestarting:s}){const i=QE(n.status),d=n.ports.find(f=>f.public)?.public;return u.jsxs("div",{className:"overflow-hidden rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)]",children:[u.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[u.jsx("div",{className:le("h-2.5 w-2.5 rounded-full",GE[n.state]??"bg-gray-400")}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"truncate text-sm font-medium text-[var(--color-text)]",children:n.displayName??n.name}),n.description&&u.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:n.description})]}),u.jsx("span",{className:le("rounded-full px-2 py-0.5 text-xs font-medium",n.state==="running"?"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400":"bg-red-500/10 text-red-600 dark:text-red-400"),children:n.state})]}),u.jsx("div",{className:"border-t border-[var(--color-border)] px-4 py-2",children:u.jsxs("div",{className:"flex items-center justify-between text-xs text-[var(--color-text-muted)]",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[i&&u.jsxs("span",{children:["Up ",i]}),d&&u.jsxs("span",{children:[":",d]})]}),u.jsxs("div",{className:"flex items-center gap-1",children:[d&&u.jsx("a",{href:`http://localhost:${d}/health`,target:"_blank",rel:"noopener noreferrer",className:"rounded p-1 hover:bg-[var(--color-surface-alt)]",title:"Open health endpoint",children:u.jsx(Nw,{size:13})}),u.jsx("button",{onClick:()=>r(n.id),disabled:s,className:le("rounded p-1 hover:bg-[var(--color-surface-alt)]",s&&"animate-spin"),title:"Restart",children:u.jsx(Ly,{size:13})})]})]})})]})}async function VE(){const{data:n}=await Me.get("/api/update/check");return n}function ax(){return Pa({queryKey:["update-check"],queryFn:VE,staleTime:300*1e3,retry:1,refetchOnWindowFocus:!1})}const Ng="jarvis-update-dismissed-version";function Eg(){const n=An(),{data:r}=ax(),[s,i]=S.useState(()=>r?.latestVersion?localStorage.getItem(Ng)===r.latestVersion:!1);return!r?.updateAvailable||s?null:u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Dy,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Jarvis v",r.latestVersion," available"]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["You have v",r.currentVersion]})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[r.releaseUrl&&u.jsx("a",{href:r.releaseUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Release notes"}),u.jsx("button",{onClick:()=>{localStorage.setItem(Ng,r.latestVersion),i(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/update"),className:"rounded-lg bg-green-600 px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Update"})]})]})}const Bu="jarvis-admin:llm-setup-dismissed";function YE(){const n=An(),[r,s]=S.useState(!1),{data:i,isLoading:d,isError:f,error:m,refetch:g,isFetching:x}=Py(),y=Wy(),v=UE(),[p,w]=S.useState(()=>!!localStorage.getItem(Bu));S.useEffect(()=>{_d().then(_=>{_.deployMode==="compose-export"&&s(!0)}).catch(()=>{})},[]);const M=!!v.data&&!v.data.configured&&!p,N=_=>{y.mutate(_,{onSuccess:()=>We.success("Container restart initiated"),onError:Y=>We.error(`Restart failed: ${Y.message}`)})};if(r)return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),u.jsx(Eg,{}),M&&u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(ad,{size:20,className:"text-[var(--color-primary)]"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:()=>{localStorage.setItem(Bu,"true"),w(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/llm-setup"),className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Set up LLM"})]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-8 text-center",children:[u.jsx(Td,{size:32,className:"mx-auto mb-3 text-[var(--color-text-muted)]"}),u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Running in Docker Compose mode"}),u.jsx("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:"Container management is handled by your Docker environment (TrueNAS, Portainer, etc.). Use your platform's tools to view container status, logs, and restarts."})]})]});if(d)return u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(ga,{className:"animate-spin text-[var(--color-primary)]",size:24})});if(f)return u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load containers"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:m?.message??"Unknown error"}),u.jsx("button",{onClick:()=>g(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]});const j=i?.containers??[],T=j.filter(_=>_.state==="running"),z=j.filter(_=>_.state!=="running");return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Dashboard"}),u.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--color-text-muted)]",children:[u.jsxs("span",{children:[T.length,"/",j.length," running"]}),u.jsx("button",{onClick:()=>g(),disabled:x,className:le("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",x&&"animate-spin"),title:"Refresh",children:u.jsx(ga,{size:14})})]})]}),u.jsx(Eg,{}),M&&u.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(ad,{size:20,className:"text-[var(--color-primary)]"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"LLM not configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"Set up a language model to enable voice command processing"})]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("button",{onClick:()=>{localStorage.setItem(Bu,"true"),w(!0)},className:"text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Dismiss"}),u.jsx("button",{onClick:()=>n("/llm-setup"),className:"rounded-lg bg-[var(--color-primary)] px-3 py-1.5 text-xs text-white hover:opacity-90",children:"Set up LLM"})]})]}),j.length===0&&u.jsx("div",{className:"py-12 text-center",children:u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:i?.error?i.error:"No Jarvis containers found. Is Docker running?"})}),T.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Running"}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:T.map(_=>u.jsx(wg,{container:_,onRestart:N,isRestarting:y.isPending&&y.variables===_.id},_.id))})]}),z.length>0&&u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:"Stopped"}),u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:z.map(_=>u.jsx(wg,{container:_,onRestart:N,isRestarting:y.isPending&&y.variables===_.id},_.id))})]})]})}async function XE(){const{data:n}=await Me.get("/api/nodes");return n}async function FE(n){const{data:r}=await Me.get(`/api/nodes/${n}/nodes`);return r}async function KE(n){const{data:r}=await Me.post(`/api/nodes/${n}/train-adapter`);return r}function ZE(){return Pa({queryKey:["households"],queryFn:XE,staleTime:3e4})}function JE(n){return Pa({queryKey:["household-nodes",n],queryFn:()=>FE(n),enabled:!!n,staleTime:3e4})}function $E(){const n=_a();return Wa({mutationFn:KE,onSuccess:()=>{n.invalidateQueries({queryKey:["household-nodes"]})}})}function IE({node:n,onTrain:r,isTraining:s}){return u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-start justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(hs,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:n.name})]}),u.jsxs("span",{className:le("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium",n.is_active?"bg-green-500/10 text-green-500":"bg-red-500/10 text-red-500"),children:[n.is_active?u.jsx(uN,{size:10}):u.jsx(oN,{size:10}),n.is_active?"Active":"Inactive"]})]}),u.jsxs("div",{className:"mt-3 space-y-1 text-xs text-[var(--color-text-muted)]",children:[u.jsxs("p",{children:[u.jsx("span",{className:"font-medium",children:"ID:"})," ",n.node_id]}),n.services.length>0&&u.jsxs("p",{children:[u.jsx("span",{className:"font-medium",children:"Services:"})," ",n.services.join(", ")]})]}),u.jsx("div",{className:"mt-4",children:u.jsx("button",{onClick:()=>r(n.node_id),disabled:s||!n.is_active,className:le("rounded-lg px-3 py-1.5 text-xs font-medium transition-colors",s||!n.is_active?"cursor-not-allowed bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:s?u.jsxs("span",{className:"flex items-center gap-1.5",children:[u.jsx(ga,{size:12,className:"animate-spin"}),"Training..."]}):"Train Adapter"})})]})}function PE({householdId:n,householdName:r}){const{data:s,isLoading:i,isError:d}=JE(n),f=$E(),m=g=>{f.mutate(g,{onSuccess:x=>We.success(`Training triggered for ${g} (request: ${x.request_id.slice(0,8)}...)`),onError:x=>We.error(`Training failed: ${x.message}`)})};return u.jsxs("div",{className:"space-y-2",children:[u.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--color-text-muted)]",children:r}),i&&u.jsx("div",{className:"flex items-center justify-center py-8",children:u.jsx(ga,{className:"animate-spin text-[var(--color-primary)]",size:18})}),d&&u.jsx("p",{className:"py-4 text-center text-sm text-red-500",children:"Failed to load nodes"}),s&&s.length===0&&u.jsx("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:"No nodes registered in this household"}),s&&s.length>0&&u.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:s.map(g=>u.jsx(IE,{node:g,onTrain:m,isTraining:f.isPending&&f.variables===g.node_id},g.node_id))})]})}function WE(){const{data:n,isLoading:r,isError:s,error:i,refetch:d,isFetching:f}=ZE();return r?u.jsx("div",{className:"flex items-center justify-center py-20",children:u.jsx(ga,{className:"animate-spin text-[var(--color-primary)]",size:24})}):s?u.jsxs("div",{className:"py-20 text-center",children:[u.jsx("p",{className:"mb-2 text-red-500",children:"Failed to load households"}),u.jsx("p",{className:"mb-4 text-sm text-[var(--color-text-muted)]",children:i?.message??"Unknown error"}),u.jsx("button",{onClick:()=>d(),className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Retry"})]}):u.jsxs("div",{className:"mx-auto max-w-4xl space-y-6",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h1",{className:"text-xl font-bold text-[var(--color-text)]",children:"Nodes"}),u.jsx("button",{onClick:()=>d(),disabled:f,className:le("rounded-lg p-1.5 hover:bg-[var(--color-surface-alt)]",f&&"animate-spin"),title:"Refresh",children:u.jsx(ga,{size:14,className:"text-[var(--color-text-muted)]"})})]}),(!n||n.length===0)&&u.jsx("div",{className:"py-12 text-center",children:u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No households found. Register a household in jarvis-auth first."})}),n?.map(m=>u.jsx(PE,{householdId:m.id,householdName:m.name},m.id))]})}async function ej(){const{data:n}=await Me.get("/api/models/installed");return n.models}async function tj(n){const{data:r}=await Me.post("/api/models/download",n);return r}async function aj(n){await Me.delete(`/api/models/${encodeURIComponent(n)}`)}function nj(){return Pa({queryKey:["models","installed"],queryFn:ej,staleTime:1e4})}function nx(){const n=_a();return Wa({mutationFn:r=>tj(r),onSuccess:()=>{n.invalidateQueries({queryKey:["models","installed"]})}})}function lj(){const n=_a();return Wa({mutationFn:r=>aj(r),onSuccess:()=>{n.invalidateQueries({queryKey:["models","installed"]})}})}const er=[{id:"qwen3-4b",displayName:"Qwen 3 4B",hfRepoVllm:"Qwen/Qwen3-4B-AWQ",hfRepoGguf:"Qwen/Qwen3-4B-GGUF",ggufFilename:"Qwen3-4B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"2.5GB",sizeGguf:"2.5GB",vramMb:4096,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"qwen3-8b",displayName:"Qwen 3 8B",hfRepoVllm:"Qwen/Qwen3-8B-AWQ",hfRepoGguf:"Qwen/Qwen3-8B-GGUF",ggufFilename:"Qwen3-8B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"5.7GB",sizeGguf:"5GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"qwen3-14b",displayName:"Qwen 3 14B",hfRepoVllm:"Qwen/Qwen3-14B-AWQ",hfRepoGguf:"Qwen/Qwen3-14B-GGUF",ggufFilename:"Qwen3-14B-Q4_K_M.gguf",chatFormat:"qwen3",contextWindow:40960,sizeVllm:"9.4GB",sizeGguf:"9GB",vramMb:12288,gated:!1,quantization:"awq",promptProvider:"Qwen3LargeUntrained"},{id:"qwen25-7b",displayName:"Qwen 2.5 7B Instruct",hfRepoVllm:"Qwen/Qwen2.5-7B-Instruct-AWQ",hfRepoGguf:"Qwen/Qwen2.5-7B-Instruct-GGUF",ggufFilename:"qwen2.5-7b-instruct-q4_k_m.gguf",chatFormat:"chatml",contextWindow:32768,sizeVllm:"4.7GB",sizeGguf:"4.7GB",vramMb:6144,gated:!1,quantization:"awq",promptProvider:"Qwen25MediumUntrained"},{id:"llama-3.1-8b",displayName:"Llama 3.1 8B Instruct",hfRepoVllm:"hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4",hfRepoGguf:"lmstudio-community/Meta-Llama-3.1-8B-Instruct-GGUF",ggufFilename:"Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf",chatFormat:"llama3",contextWindow:131072,sizeVllm:"5.4GB",sizeGguf:"5GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"Llama31MediumUntrained"},{id:"hermes-3-8b",displayName:"Hermes 3 Llama 3.1 8B",hfRepoVllm:"solidrust/Hermes-3-Llama-3.1-8B-AWQ",hfRepoGguf:"NousResearch/Hermes-3-Llama-3.1-8B-GGUF",ggufFilename:"Hermes-3-Llama-3.1-8B.Q4_K_M.gguf",chatFormat:"chatml",contextWindow:131072,sizeVllm:"5.4GB",sizeGguf:"4.9GB",vramMb:7168,gated:!1,quantization:"awq",promptProvider:"HermesMediumUntrained"}];function rj(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,g]=S.useState(null),{data:x,isLoading:y}=nj(),v=nx(),p=lj();function w(j,T){const z=`${j}/${T??""}`;g(z),v.mutate({repo:j,filename:T||void 0,token:n||void 0},{onSuccess:_=>{We.success(_.message),g(null)},onError:_=>{We.error(_ instanceof Error?_.message:"Download failed"),g(null)}})}function M(j){confirm(`Delete ${j}?`)&&p.mutate(j,{onSuccess:()=>We.success(`Deleted ${j}`),onError:()=>We.error("Failed to delete")})}function N(){s&&w(s,d)}return u.jsxs("div",{className:"mx-auto max-w-4xl space-y-8 p-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Models"}),u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Manage LLM models on the inference server"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[u.jsx(Mw,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Token"}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(optional, for gated models)"})]}),u.jsx("input",{type:"password",value:n,onChange:j=>r(j.target.value),placeholder:"hf_...",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(jd,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Installed Models"})]}),y?u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"Loading..."}):x?.length?u.jsx("div",{className:"space-y-2",children:x.map(j=>u.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-3 py-2",children:[u.jsxs("div",{children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:j.name}),u.jsx("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:j.sizeFormatted})]}),u.jsx("button",{onClick:()=>M(j.name),disabled:p.isPending,className:"rounded p-1 text-[var(--color-text-muted)] hover:bg-red-500/10 hover:text-red-500",children:u.jsx(nN,{size:14})})]},j.name))}):u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No models installed yet"})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(Ww,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Suggested Models"})]}),u.jsx("div",{className:"space-y-3",children:er.map(j=>{const T=x?.some(z=>z.name===j.ggufFilename||z.name.includes(j.ggufFilename));return u.jsxs("div",{className:"flex items-center justify-between rounded-md border border-[var(--color-border)] px-4 py-3",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:j.displayName}),u.jsxs("span",{className:"rounded bg-[var(--color-surface-alt)] px-1.5 py-0.5 text-xs text-[var(--color-text-muted)]",children:["~",j.sizeGguf]}),T&&u.jsx("span",{className:"rounded bg-green-500/10 px-1.5 py-0.5 text-xs text-green-500",children:"installed"})]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[j.hfRepoGguf," / ",j.ggufFilename]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Prompt provider: ",u.jsx("code",{className:"text-[var(--color-primary)]",children:j.promptProvider})]})]}),u.jsxs("button",{onClick:()=>w(j.hfRepoGguf,j.ggufFilename),disabled:m!==null,className:le("ml-4 flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium transition-colors",T?"border border-[var(--color-border)] text-[var(--color-text-muted)] hover:bg-[var(--color-surface-alt)]":"bg-[var(--color-primary)] text-white hover:opacity-90"),children:[u.jsx(ds,{size:14}),m===`${j.hfRepoGguf}/${j.ggufFilename}`?"Downloading...":T?"Re-download":"Download"]})]},j.id)})})]}),u.jsxs("section",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[u.jsx(ds,{size:16,className:"text-[var(--color-text-muted)]"}),u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Download from HuggingFace"})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Repository (e.g. Qwen/Qwen3-14B-GGUF)"}),u.jsx("input",{value:s,onChange:j=>i(j.target.value),placeholder:"owner/repo-name",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Filename (optional — downloads specific file instead of full repo)"}),u.jsx("input",{value:d,onChange:j=>f(j.target.value),placeholder:"model-name.gguf",className:"w-full rounded-md border border-[var(--color-border)] bg-[var(--color-background)] px-3 py-2 text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]"})]}),u.jsxs("button",{onClick:N,disabled:!s||m!==null,className:"flex items-center gap-2 rounded-md bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white transition-colors hover:opacity-90 disabled:opacity-50",children:[u.jsx(ds,{size:14}),m===`${s}/${d}`?"Downloading...":"Download"]})]})]})]})}const Hu={preflight:"Checking prerequisites",download:"Downloading update",binary:"Updating binary",restarting:"Restarting admin server",compose:"Updating configuration",pull:"Pulling images",restart:"Restarting services",verify:"Verifying health",done:"Complete"};function sj(){const n=An(),{data:r,isLoading:s}=ax(),[i,d]=S.useState("idle"),[f,m]=S.useState([]),[g,x]=S.useState(null),y=S.useRef(null),v=S.useCallback(M=>{m(N=>[...N,M])},[]);S.useEffect(()=>{y.current&&(y.current.scrollTop=y.current.scrollHeight)},[f]);async function p(){d("preflight"),m([]),x(null);try{const M=localStorage.getItem("access_token"),N=await fetch("/api/update/apply",{method:"POST",headers:{Authorization:`Bearer ${M}`,"Content-Type":"application/json"}});if(!N.ok||!N.body){const _=await N.text();throw new Error(_||`HTTP ${N.status}`)}const j=N.body.getReader(),T=new TextDecoder;let z="";for(;;){const{done:_,value:Y}=await j.read();if(_)break;z+=T.decode(Y,{stream:!0});const L=z.split(`
|
|
17
|
+
`);z=L.pop()??"";for(const te of L)if(te.startsWith("data: "))try{const P=JSON.parse(te.slice(6));if(P.phase&&d(P.phase),P.message&&v({text:P.message,phase:P.phase}),P.stream&&P.text&&v({text:P.text.trim()}),P.restart){d("restarting"),v({text:"Admin server restarting with new version..."}),await ij(r?.latestVersion??""),d("done"),v({text:"Upgrade complete!"});return}if(P.done&&P.code!==0)throw new Error(P.error??"Upgrade failed");P.done&&P.code===0&&d("done")}catch(P){if(P instanceof SyntaxError)continue;throw P}}}catch(M){const N=M instanceof Error?M.message:String(M);x(N),d("error"),v({text:`Error: ${N}`})}}if(s)return u.jsx("div",{className:"flex min-h-[50vh] items-center justify-center",children:u.jsx(Ta,{size:24,className:"animate-spin text-[var(--color-primary)]"})});const w=Object.keys(Hu).filter(M=>{const N=Object.keys(Hu),j=N.indexOf(i);return N.indexOf(M)<j});return u.jsxs("div",{className:"mx-auto max-w-3xl space-y-6 p-6",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"Update Jarvis"}),r?.updateAvailable?u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["v",r.currentVersion," → v",r.latestVersion]}):u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:["You're running the latest version (v",r?.currentVersion??"?",")"]})]}),i!=="idle"&&u.jsx("div",{className:"space-y-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface)] p-4",children:Object.entries(Hu).map(([M,N])=>{const j=M===i,T=w.includes(M),z=M===i&&i==="error";return u.jsxs("div",{className:"flex items-center gap-2",children:[T?u.jsx($t,{size:16,className:"text-green-500"}):z?u.jsx(Ca,{size:16,className:"text-red-500"}):j?u.jsx(Ta,{size:16,className:"animate-spin text-[var(--color-primary)]"}):u.jsx("div",{className:"h-4 w-4 rounded-full border border-[var(--color-border)]"}),u.jsx("span",{className:le("text-sm",j?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]",T&&"text-green-500"),children:N})]},M)})}),f.length>0&&u.jsx("div",{ref:y,className:"max-h-64 overflow-y-auto rounded-lg border border-[var(--color-border)] bg-[#0d1117] p-3 font-mono text-xs text-gray-300",children:f.map((M,N)=>u.jsx("div",{children:M.text},N))}),g&&u.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[u.jsx(Ca,{size:14,className:"text-red-500"}),u.jsx("span",{className:"text-sm text-red-500",children:g})]}),u.jsxs("div",{className:"flex gap-3",children:[i==="idle"&&r?.updateAvailable&&u.jsxs("button",{onClick:p,className:"flex items-center gap-2 rounded-lg bg-green-600 px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[u.jsx(Dy,{size:16}),"Update to v",r.latestVersion]}),i==="done"&&u.jsxs("button",{onClick:()=>n("/dashboard"),className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[u.jsx($t,{size:16}),"Go to Dashboard"]}),i==="error"&&u.jsxs("button",{onClick:p,className:"flex items-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:opacity-90",children:[u.jsx(ga,{size:16}),"Retry"]})]})]})}async function ij(n,r=6e4){const s=Date.now()+r;for(;Date.now()<s;){await new Promise(i=>setTimeout(i,2e3));try{const i=await fetch("/health");if(i.ok){const d=await i.json();if(d.version&&d.version!=="0.0.0-dev")return}}catch{}}throw new Error("Admin server did not restart within 60 seconds")}function oj(){return u.jsxs("div",{className:"flex min-h-[60vh] flex-col items-center justify-center",children:[u.jsx("h1",{className:"mb-2 text-4xl font-bold text-[var(--color-text)]",children:"404"}),u.jsx("p",{className:"mb-4 text-[var(--color-text-muted)]",children:"Page not found"}),u.jsx(md,{to:"/settings",className:"text-[var(--color-primary)] underline hover:opacity-80",children:"Go to Settings"})]})}const cj=7,uj={currentStep:0,totalSteps:cj,enabledModules:[],portOverrides:{},infraPortOverrides:{},secrets:{},dbUser:"jarvis",whisperModel:"base.en",llmInterface:"Qwen25MediumUntrained",deploymentMode:"local",deploymentTarget:"standard",remoteLlmUrl:"",remoteWhisperUrl:"",platform:"linux",hardware:null,installRunning:!1,installComplete:!1};function dj(n,r,s){return Math.max(r,Math.min(s,n))}function fj(n,r){switch(r.type){case"SET_STEP":return{...n,currentStep:dj(r.step,0,n.totalSteps-1)};case"NEXT_STEP":return{...n,currentStep:Math.min(n.currentStep+1,n.totalSteps-1)};case"PREV_STEP":return{...n,currentStep:Math.max(n.currentStep-1,0)};case"SET_ENABLED_MODULES":return{...n,enabledModules:r.modules};case"TOGGLE_MODULE":{if(r.enabled){const s=n.enabledModules.includes(r.serviceId)?n.enabledModules:[...n.enabledModules,r.serviceId];return{...n,enabledModules:s}}return{...n,enabledModules:n.enabledModules.filter(s=>s!==r.serviceId)}}case"SET_PORT_OVERRIDE":return{...n,portOverrides:{...n.portOverrides,[r.serviceId]:r.port}};case"SET_INFRA_PORT_OVERRIDE":return{...n,infraPortOverrides:{...n.infraPortOverrides,[r.infraId]:r.port}};case"SET_SECRET":return{...n,secrets:{...n.secrets,[r.name]:r.value}};case"SET_SECRETS":return{...n,secrets:r.secrets};case"SET_DB_USER":return{...n,dbUser:r.user};case"SET_WHISPER_MODEL":return{...n,whisperModel:r.model};case"SET_LLM_INTERFACE":return{...n,llmInterface:r.interfaceId};case"SET_DEPLOYMENT_MODE":return{...n,deploymentMode:r.mode};case"SET_DEPLOYMENT_TARGET":return{...n,deploymentTarget:r.target};case"SET_REMOTE_LLM_URL":return{...n,remoteLlmUrl:r.url};case"SET_REMOTE_WHISPER_URL":return{...n,remoteWhisperUrl:r.url};case"SET_PLATFORM":return{...n,platform:r.platform};case"SET_HARDWARE":return{...n,hardware:r.hardware,platform:r.hardware.platform};case"SET_INSTALL_RUNNING":return{...n,installRunning:r.running};case"SET_INSTALL_COMPLETE":return{...n,installRunning:!1,installComplete:!0};default:return n}}const lx=S.createContext(null);function mj({children:n}){const[r,s]=S.useReducer(fj,uj);return u.jsx(lx.Provider,{value:{state:r,dispatch:s},children:n})}function ol(){const n=S.useContext(lx);if(!n)throw new Error("useWizard must be used within a WizardProvider");return n}function hj(){const{state:n,dispatch:r}=ol(),[s,i]=S.useState(null),[d,f]=S.useState(!0),[m,g]=S.useState(!1);function x(){f(!0),g(!1),_d().then(v=>{i(v);const p=v.reason==="docker_not_found";g(p),r(p?{type:"SET_INSTALL_RUNNING",running:!0}:{type:"SET_INSTALL_RUNNING",running:!1})}).catch(()=>{i({configured:!1,reason:"error"}),g(!0),r({type:"SET_INSTALL_RUNNING",running:!0})}).finally(()=>f(!1))}S.useEffect(()=>{x()},[]);const y=s&&s.reason!=="docker_not_found";return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Welcome to Jarvis"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Let's get your personal voice assistant up and running. This wizard will guide you through selecting services, configuring hardware, and starting everything up."})]}),u.jsx("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:u.jsxs("div",{className:"flex items-center gap-3",children:[d?u.jsx(Ta,{size:20,className:"animate-spin text-[var(--color-primary)]"}):y?u.jsx($t,{size:20,className:"text-green-500"}):u.jsx(ky,{size:20,className:"text-red-500"}),u.jsxs("div",{className:"flex-1",children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:d?"Checking Docker...":y?"Docker is running":"Docker not found"}),!d&&!y&&u.jsxs("div",{className:"mt-1 space-y-1",children:[u.jsx("p",{className:"text-xs text-red-400",children:"Docker is required to run Jarvis services."}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Install"," ",u.jsx("a",{href:"https://www.docker.com/products/docker-desktop/",target:"_blank",rel:"noopener noreferrer",className:"text-[var(--color-primary)] underline hover:no-underline",children:"Docker Desktop"})," ","for your platform, start it, then click Retry."]})]})]}),m&&!d&&u.jsxs("button",{type:"button",onClick:x,className:"flex items-center gap-1 rounded-md border border-[var(--color-border)] px-2 py-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[u.jsx(uo,{size:12}),"Retry"]})]})}),u.jsxs("div",{children:[u.jsx("label",{className:"mb-2 block text-sm font-medium text-[var(--color-text)]",children:"Deployment Mode"}),u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"local"}),className:le("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="local"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[u.jsx(Bw,{size:24,className:"text-[var(--color-primary)]"}),u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Local"}),u.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"Everything on this machine"})]}),u.jsxs("button",{type:"button",onClick:()=>r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"}),className:le("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",n.deploymentMode==="remote-llm"?"border-[var(--color-primary)] bg-[var(--color-primary)]/10":"border-[var(--color-border)] hover:border-[var(--color-primary)]/50"),children:[u.jsx(Td,{size:24,className:"text-[var(--color-primary)]"}),u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM"}),u.jsx("span",{className:"text-xs text-center text-[var(--color-text-muted)]",children:"LLM on separate GPU machine"})]})]})]})]})}const Yi=[{label:"None / CPU only",gpu:null,vramMb:null,backends:["gguf"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4090 (24 GB)",gpu:"NVIDIA RTX 4090",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4080 (16 GB)",gpu:"NVIDIA RTX 4080",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 4070 Ti (12 GB)",gpu:"NVIDIA RTX 4070 Ti",vramMb:12288,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3090 (24 GB)",gpu:"NVIDIA RTX 3090",vramMb:24576,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3080 (10 GB)",gpu:"NVIDIA RTX 3080",vramMb:10240,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA RTX 3070 (8 GB)",gpu:"NVIDIA RTX 3070",vramMb:8192,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"NVIDIA A100 (80 GB)",gpu:"NVIDIA A100",vramMb:81920,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA A100 (40 GB)",gpu:"NVIDIA A100",vramMb:40960,backends:["gguf","vllm"],defaultBackend:"vllm"},{label:"NVIDIA Tesla T4 (16 GB)",gpu:"NVIDIA Tesla T4",vramMb:16384,backends:["gguf","vllm"],defaultBackend:"gguf"},{label:"AMD RX 7900 XTX (24 GB)",gpu:"AMD RX 7900 XTX",vramMb:24576,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7900 XT (20 GB)",gpu:"AMD RX 7900 XT",vramMb:20480,backends:["gguf"],defaultBackend:"gguf"},{label:"AMD RX 7800 XT (16 GB)",gpu:"AMD RX 7800 XT",vramMb:16384,backends:["gguf"],defaultBackend:"gguf"},{label:"Apple M4 Max (128 GB unified)",gpu:"Apple M4 Max",vramMb:131072,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Max (64 GB unified)",gpu:"Apple M4 Max",vramMb:65536,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (48 GB unified)",gpu:"Apple M4 Pro",vramMb:49152,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M4 Pro (24 GB unified)",gpu:"Apple M4 Pro",vramMb:24576,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Max (32 GB unified)",gpu:"Apple M2 Max",vramMb:32768,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M2 Pro (16 GB unified)",gpu:"Apple M2 Pro",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (16 GB unified)",gpu:"Apple M1",vramMb:16384,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Apple M1 (8 GB unified)",gpu:"Apple M1",vramMb:8192,backends:["gguf","mlx"],defaultBackend:"gguf"},{label:"Other (enter VRAM manually)",gpu:"Other",vramMb:null,backends:["gguf"],defaultBackend:"gguf"}];function pj(){const{state:n,dispatch:r}=ol(),[s,i]=S.useState(!n.hardware),[d,f]=S.useState(!1),[m,g]=S.useState(0),[x,y]=S.useState("");S.useEffect(()=>{n.hardware||HE().then(w=>{r({type:"SET_HARDWARE",hardware:w}),w.recommendedBackend==="remote"&&n.deploymentMode==="local"&&r({type:"SET_DEPLOYMENT_MODE",mode:"remote-llm"})}).catch(()=>{}).finally(()=>i(!1))},[]);function v(w,M){const N=Yi[w];if(!n.hardware)return;const j=N.gpu==="Other"?(parseInt(M??x,10)||0)*1024:N.vramMb,T={...n.hardware,gpuName:N.gpu,gpuVramMb:j||null,recommendedBackends:N.backends,recommendedBackend:N.defaultBackend};r({type:"SET_HARDWARE",hardware:T})}const p=n.hardware;return s?u.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[u.jsx(Ta,{size:32,className:"animate-spin text-[var(--color-primary)]"}),u.jsx("p",{className:"mt-3 text-sm text-[var(--color-text-muted)]",children:"Detecting hardware..."})]}):u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Hardware Detection"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"We detected the following hardware. This determines which LLM backend to use."})]}),p&&u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(hs,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"Platform"})]}),u.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.platform==="darwin"?"macOS":"Linux"," (",p.arch,")"]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(jd,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"Memory"})]}),u.jsxs("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:[p.totalMemoryGb," GB RAM"]})]}),u.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2 text-[var(--color-text-muted)]",children:[u.jsx(hs,{size:16}),u.jsx("span",{className:"text-xs font-medium uppercase",children:"GPU"})]}),u.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:p.gpuName??"No GPU detected"}),p.gpuVramMb!=null&&p.gpuVramMb>0&&u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[Math.round(p.gpuVramMb/1024)," GB VRAM"]})]}),u.jsx("button",{type:"button",onClick:()=>f(!d),className:"text-xs font-medium text-[var(--color-primary)] hover:underline",children:d?"Cancel":"Override"})]}),d&&u.jsxs("div",{className:"mt-3 space-y-3 border-t border-[var(--color-border)] pt-3",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"gpu-select",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Select GPU"}),u.jsx("select",{id:"gpu-select",value:m,onChange:w=>{const M=parseInt(w.target.value,10);g(M),Yi[M].gpu!=="Other"&&(v(M),f(!1))},className:le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]"),children:Yi.map((w,M)=>u.jsx("option",{value:M,children:w.label},`${w.label}-${M}`))})]}),Yi[m].gpu==="Other"&&u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("label",{htmlFor:"custom-vram",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"VRAM (GB)"}),u.jsx("input",{id:"custom-vram",type:"number",min:1,max:512,value:x,onChange:w=>y(w.target.value),placeholder:"e.g. 24",className:le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),u.jsx("button",{type:"button",disabled:!x||parseInt(x,10)<=0,onClick:()=>{v(m,x),f(!1)},className:le("rounded-lg px-4 py-2 text-sm font-medium","bg-[var(--color-primary)] text-white","disabled:cursor-not-allowed disabled:opacity-50"),children:"Apply"})]})]})]}),u.jsxs("div",{className:"col-span-2 rounded-lg border border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5 p-4",children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Recommended: ",u.jsx("span",{className:"text-[var(--color-primary)]",children:p.recommendedBackend.toUpperCase()})]}),p.recommendedBackends.length>1&&u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["Available backends: ",p.recommendedBackends.join(", ")]})]})]}),n.deploymentMode==="remote-llm"&&u.jsxs("div",{className:"space-y-3",children:[u.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote Service URLs"}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"remote-llm",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"LLM Proxy URL"}),u.jsx("input",{id:"remote-llm",type:"url",value:n.remoteLlmUrl,onChange:w=>r({type:"SET_REMOTE_LLM_URL",url:w.target.value}),placeholder:"http://192.168.1.100:7704",className:le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"remote-whisper",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"Whisper URL (optional)"}),u.jsx("input",{id:"remote-whisper",type:"url",value:n.remoteWhisperUrl,onChange:w=>r({type:"SET_REMOTE_WHISPER_URL",url:w.target.value}),placeholder:"http://192.168.1.100:7706",className:le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]})]})]})}function gj(){const{state:n,dispatch:r}=ol(),[s,i]=S.useState(null),[d,f]=S.useState(!0);if(S.useEffect(()=>{Promise.all([tx(),qE()]).then(([y,v])=>{i(y),n.enabledModules.length===0&&r({type:"SET_ENABLED_MODULES",modules:v.enabledModules})}).catch(()=>{}).finally(()=>f(!1))},[]),d||!s)return u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx(Ta,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const{core:m,recommended:g,optional:x}=yj(s.services);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Select Services"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Core services are always included. Toggle recommended and optional services."})]}),u.jsx(qu,{title:"Core",subtitle:"Always included",services:m,enabled:m.map(y=>y.id),locked:!0}),u.jsx(qu,{title:"Recommended",subtitle:"Enabled by default",services:g,enabled:n.enabledModules,onToggle:(y,v)=>r({type:"TOGGLE_MODULE",serviceId:y,enabled:v}),platform:n.platform}),x.length>0&&u.jsx(qu,{title:"Optional",subtitle:"Off by default",services:x,enabled:n.enabledModules,onToggle:(y,v)=>r({type:"TOGGLE_MODULE",serviceId:y,enabled:v})})]})}function yj(n){return{core:n.filter(r=>r.category==="core"),recommended:n.filter(r=>r.category==="recommended"),optional:n.filter(r=>r.category==="optional")}}function qu({title:n,subtitle:r,services:s,enabled:i,locked:d,onToggle:f,platform:m}){return u.jsxs("div",{children:[u.jsxs("div",{className:"mb-2 flex items-baseline gap-2",children:[u.jsx("h3",{className:"text-sm font-medium text-[var(--color-text)]",children:n}),u.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:r})]}),u.jsx("div",{className:"space-y-1",children:s.map(g=>{const x=i.includes(g.id),y=g.nativeOnly&&m==="darwin";return u.jsxs("button",{type:"button",disabled:d,onClick:()=>f?.(g.id,!x),className:le("flex w-full items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",x?"border-[var(--color-primary)]/30 bg-[var(--color-primary)]/5":"border-[var(--color-border)] hover:border-[var(--color-primary)]/30",d&&"cursor-default"),children:[d?u.jsx(Rd,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}):x?u.jsx($t,{size:16,className:"shrink-0 text-[var(--color-primary)]"}):u.jsx(nd,{size:16,className:"shrink-0 text-[var(--color-text-muted)]"}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:g.name}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",g.port]}),y&&u.jsx("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-500",children:"Native"})]}),u.jsx("p",{className:"truncate text-xs text-[var(--color-text-muted)]",children:g.description})]})]},g.id)})})]})}function xj(){const{state:n}=ol(),[r,s]=S.useState(null);if(S.useEffect(()=>{tx().then(s).catch(()=>{})},[]),!r)return u.jsx("div",{className:"flex items-center justify-center py-12",children:u.jsx(Ta,{size:32,className:"animate-spin text-[var(--color-primary)]"})});const i=r.services.filter(p=>p.category==="core"),d=r.services.filter(p=>p.category!=="core"&&n.enabledModules.includes(p.id)),f=[...i,...d],m=new Map;for(const p of f){const w=n.portOverrides[p.id]??p.port,M=m.get(w)??[];m.set(w,[...M,p.name])}const g=[...m.entries()].filter(([,p])=>p.length>1),x=f.filter(p=>p.database).length,y=f.filter(p=>p.nativeOnly&&n.platform==="darwin"),v=f.filter(p=>!(p.nativeOnly&&n.platform==="darwin"));return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Review Configuration"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Review your selections before installing."})]}),u.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[u.jsx(Gu,{label:"Docker Services",value:v.length}),u.jsx(Gu,{label:"Native Services",value:y.length}),u.jsx(Gu,{label:"Databases",value:x})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-4",children:[u.jsx("p",{className:"text-xs font-medium uppercase text-[var(--color-text-muted)]",children:"Deployment Mode"}),u.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--color-text)]",children:n.deploymentMode==="local"?"Local (all services on this machine)":"Remote LLM"}),n.deploymentMode==="remote-llm"&&n.remoteLlmUrl&&u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:["LLM: ",n.remoteLlmUrl]})]}),u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsxs("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:["Services (",f.length,")"]})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:f.map(p=>u.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx($t,{size:14,className:"text-green-500"}),u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:p.name})]}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[":",n.portOverrides[p.id]??p.port]})]},p.id))})]}),g.length>0&&u.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Ca,{size:16,className:"text-amber-500"}),u.jsx("span",{className:"text-sm font-medium text-amber-500",children:"Port Conflicts"})]}),g.map(([p,w])=>u.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["Port ",p,": ",w.join(", ")]},p))]})]})}function Gu({label:n,value:r}){return u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] p-3 text-center",children:[u.jsx("p",{className:"text-2xl font-bold text-[var(--color-primary)]",children:r}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})}function jg(){const[n,r]=S.useState({lines:[],running:!1,done:!1,exitCode:null,error:null,redirect:null}),s=S.useRef(null),i=S.useCallback((f,m)=>(s.current?.close(),r({lines:[],running:!0,done:!1,exitCode:null,error:null,redirect:null}),new Promise((g,x)=>{const y=new EventSource(f);s.current=y,y.onmessage=v=>{try{const p=JSON.parse(v.data);if(m&&m(p),"done"in p){if(r(w=>({...w,running:!1,done:!0,exitCode:p.code,redirect:p.redirect??null})),y.close(),p.code===0)g(p.code);else{const w=p.error?String(p.error):`Process exited with code ${p.code}`;x(new Error(w))}return}if("stream"in p&&"text"in p){const w={stream:p.stream,text:p.text,timestamp:Date.now()};r(M=>({...M,lines:[...M.lines,w]}))}}catch{}},y.onerror=()=>{const v=s.current===null;r(p=>({...p,running:!1,error:p.done?null:"Connection lost"})),y.close(),v||x(new Error("Connection lost"))}})),[]),d=S.useCallback(()=>{s.current?.close(),s.current=null,r(f=>({...f,running:!1}))},[]);return{...n,run:i,stop:d}}function Rg({lines:n,running:r,title:s,className:i}){const d=S.useRef(null),f=S.useRef(!0);S.useEffect(()=>{const g=d.current;!g||!f.current||(g.scrollTop=g.scrollHeight)},[n]);function m(){const g=d.current;if(!g)return;const x=g.scrollHeight-g.scrollTop-g.clientHeight;f.current=x<50}return u.jsxs("div",{className:le("flex flex-col rounded-lg border border-[var(--color-border)] overflow-hidden",i),children:[s&&u.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--color-border)] bg-[var(--color-surface)] px-3 py-2",children:[u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:s}),r&&u.jsx("span",{className:"h-2 w-2 animate-pulse rounded-full bg-green-500"})]}),u.jsxs("div",{ref:d,onScroll:m,className:"h-64 overflow-y-auto bg-[#0d1117] p-3 font-mono text-xs leading-5",children:[n.length===0&&!r&&u.jsx("span",{className:"text-gray-500",children:"Waiting for output..."}),n.map((g,x)=>u.jsx("div",{className:le("whitespace-pre-wrap break-all",g.stream==="stderr"?"text-yellow-400":"text-gray-300"),children:g.text},x)),r&&u.jsx("span",{className:"inline-block h-4 w-1.5 animate-pulse bg-gray-400"})]})]})}function vj(){const{state:n,dispatch:r}=ol(),s=jg(),i=jg(),[d,f]=S.useState("idle"),[m,g]=S.useState(null),[x,y]=S.useState(null),[v,p]=S.useState(null),[w,M]=S.useState({}),[N,j]=S.useState({}),[T,z]=S.useState(null),[_,Y]=S.useState(null);S.useEffect(()=>{const ne=i.redirect;if(d!=="done"||!ne)return;Y(5);const Q=setInterval(()=>{Y(K=>K===null||K<=1?(clearInterval(Q),window.location.href=ne,0):K-1)},1e3);return()=>clearInterval(Q)},[d,i.redirect]);const L=S.useCallback(async()=>{f("preflight"),p(null),g(null);try{const ne=await BE(n.enabledModules);return p(ne),ne.canProceed?!0:(g("Pre-flight checks failed. Fix the issues above and retry."),f("error"),z("preflight"),!1)}catch(ne){return g(`Pre-flight check failed: ${ne instanceof Error?ne.message:String(ne)}`),f("error"),z("preflight"),!1}},[n.enabledModules]);async function te(){g(null),M({}),z(null),r({type:"SET_INSTALL_RUNNING",running:!0});try{if(!await L()){r({type:"SET_INSTALL_RUNNING",running:!1});return}f("generating"),await bg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",K=>{if(K.phase==="health"&&typeof K.service=="string"&&M(ce=>({...ce,[K.service]:{healthy:K.healthy,error:K.error}})),K.serviceHealth&&typeof K.serviceHealth=="object"){const ce=K.serviceHealth;M(he=>({...he,...ce}))}}),f("verifying"),await new Promise(K=>setTimeout(K,5e3));const Q=await Sg();y(Q),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(ne){g(ne instanceof Error?ne.message:String(ne)),f("error"),z(d),r({type:"SET_INSTALL_RUNNING",running:!1})}}async function P(){if(T==="preflight"){if(g(null),r({type:"SET_INSTALL_RUNNING",running:!0}),!await L()){r({type:"SET_INSTALL_RUNNING",running:!1});return}try{f("generating"),await bg(n),f("pulling"),await s.run("/api/install/pull"),f("starting"),await i.run("/api/install/start",K=>{if(K.phase==="health"&&typeof K.service=="string"&&M(ce=>({...ce,[K.service]:{healthy:K.healthy,error:K.error}})),K.serviceHealth&&typeof K.serviceHealth=="object"){const ce=K.serviceHealth;M(he=>({...he,...ce}))}}),f("verifying"),await new Promise(K=>setTimeout(K,5e3));const Q=await Sg();y(Q),f("done"),r({type:"SET_INSTALL_COMPLETE"})}catch(Q){g(Q instanceof Error?Q.message:String(Q)),f("error"),r({type:"SET_INSTALL_RUNNING",running:!1})}}else te()}async function W(ne){try{const Q=await fetch(`/api/containers/${ne}/logs`);if(Q.ok){const K=await Q.text();j(ce=>({...ce,[ne]:K}))}else j(K=>({...K,[ne]:`Failed to fetch logs: HTTP ${Q.status}`}))}catch(Q){j(K=>({...K,[ne]:`Failed to fetch logs: ${Q instanceof Error?Q.message:String(Q)}`}))}}const I=[{key:"preflight",label:"Pre-flight checks"},{key:"generating",label:"Generate configuration"},{key:"pulling",label:"Pull Docker images"},{key:"starting",label:"Start services"},{key:"verifying",label:"Verify health"}],Oe=I.map(ne=>ne.key).indexOf(d);return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Install"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="idle"?"Ready to install. This will pull Docker images and start all services.":d==="done"?i.redirect?`Installation complete! Redirecting to your admin dashboard in ${_??"..."}s...`:"Installation complete! All services are running.":d==="error"?"Installation encountered an error.":"Installing..."})]}),v&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Pre-flight Checks"})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:v.checks.map(ne=>u.jsx("div",{className:"flex items-center justify-between px-3 py-2",children:u.jsxs("div",{className:"flex items-center gap-2",children:[ne.status==="pass"?u.jsx($t,{size:14,className:"text-green-500"}):ne.status==="warn"?u.jsx(Ca,{size:14,className:"text-amber-500"}):u.jsx(us,{size:14,className:"text-red-500"}),u.jsxs("div",{children:[u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:ne.name}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:ne.message}),ne.details&&ne.status!=="pass"&&u.jsx("p",{className:"text-xs text-[var(--color-text-muted)] opacity-60",children:ne.details})]})]})},ne.name))})]}),u.jsx("div",{className:"space-y-2",children:I.map((ne,Q)=>{const K=ne.key===d,ce=Oe>Q||d==="done",he=d==="error"&&ne.key===T;return u.jsxs("div",{className:"flex items-center gap-3",children:[ce?u.jsx($t,{size:18,className:"text-green-500"}):he?u.jsx(us,{size:18,className:"text-red-500"}):K?u.jsx(Ta,{size:18,className:"animate-spin text-[var(--color-primary)]"}):u.jsx("div",{className:"h-[18px] w-[18px] rounded-full border-2 border-[var(--color-border)]"}),u.jsx("span",{className:le("text-sm",ce?"text-green-500":K?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:ne.label})]},ne.key)})}),(d==="starting"||d==="verifying"||d==="done"||d==="error")&&Object.keys(w).length>0&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Service Status"})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:Object.entries(w).map(([ne,Q])=>u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:ne}),u.jsxs("div",{className:"flex items-center gap-2",children:[!Q.healthy&&u.jsxs("button",{type:"button",onClick:()=>W(ne),className:"flex items-center gap-1 text-xs text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:[u.jsx(jw,{size:12}),"Logs"]}),Q.healthy?u.jsx($t,{size:14,className:"text-green-500"}):u.jsx(us,{size:14,className:"text-red-500"})]})]}),Q.error&&u.jsx("p",{className:"px-3 pb-2 text-xs text-red-400",children:Q.error}),N[ne]&&u.jsx("div",{className:"mx-3 mb-2 max-h-32 overflow-auto rounded bg-[var(--color-background)] p-2 text-xs font-mono text-[var(--color-text-muted)]",children:u.jsx("pre",{className:"whitespace-pre-wrap",children:N[ne]})})]},ne))})]}),(s.lines.length>0||s.running)&&u.jsx(Rg,{lines:s.lines,running:s.running,title:"docker compose pull"}),(i.lines.length>0||i.running)&&u.jsx(Rg,{lines:i.lines,running:i.running,title:"docker compose up -d"}),x&&u.jsxs("div",{className:"rounded-lg border border-[var(--color-border)] overflow-hidden",children:[u.jsx("div",{className:"border-b border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2",children:u.jsx("span",{className:"text-xs font-medium text-[var(--color-text-muted)]",children:"Service Health"})}),u.jsx("div",{className:"divide-y divide-[var(--color-border)]",children:Object.entries(x).map(([ne,Q])=>u.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[u.jsx("span",{className:"text-sm text-[var(--color-text)]",children:ne}),Q.healthy?u.jsx($t,{size:14,className:"text-green-500"}):u.jsx(us,{size:14,className:"text-red-500"})]},ne))})]}),m&&u.jsx("div",{className:"rounded-lg bg-red-500/10 px-3 py-2 text-sm text-red-500",children:m}),(d==="idle"||d==="error")&&u.jsxs("button",{type:"button",onClick:d==="error"?P:te,className:le("flex w-full items-center justify-center gap-2 rounded-lg bg-[var(--color-primary)] px-4 py-3 font-medium text-white","hover:opacity-90 transition-opacity"),children:[d==="error"?u.jsx(uo,{size:18}):u.jsx(Yw,{size:18}),d==="error"?"Retry Installation":"Start Installation"]})]})}function bj(){const{state:n,dispatch:r}=ol(),s=ex(),i=nx(),[d,f]=S.useState("select"),[m,g]=S.useState(null),[x,y]=S.useState("GGUF"),[v,p]=S.useState(""),[w,M]=S.useState(null);if(n.deploymentMode==="remote-llm")return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Your LLM is configured to use a remote server."})]}),u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx($t,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Remote LLM configured"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n.remoteLlmUrl})]})]})]});if(n.platform==="darwin")return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Configuration"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"On macOS, the LLM proxy runs natively to access Metal/MLX. Configure it from the dashboard after setup, or run it directly from the jarvis-llm-proxy-api directory."})]}),u.jsx("div",{className:"rounded-lg border border-amber-500/30 bg-amber-500/5 p-4 text-sm text-amber-500",children:"macOS native LLM proxy is not yet available as a pip package. Model download through this wizard requires the LLM proxy running in Docker."})]});const N=L=>{g(L),M(null),L.gated&&!v.trim()?f("token"):T(L,v.trim())},j=()=>{if(!v.trim()){M("HuggingFace token is required for gated models");return}m&&T(m,v)},T=async(L,te)=>{f("downloading"),M(null);const P=x==="GGUF"?L.hfRepoGguf:L.hfRepoVllm,W=x==="GGUF"?L.ggufFilename:void 0;try{await i.mutateAsync({repo:P,filename:W,token:te||void 0}),await z(L)}catch(I){M(`Download failed: ${I.message}`),f("select")}},z=async L=>{f("configuring");const P={"model.main.name":x==="GGUF"?`.models/${L.ggufFilename}`:`.models/${L.hfRepoVllm.split("/").pop()}`,"model.main.backend":x,"model.main.chat_format":L.chatFormat,"model.main.context_window":L.contextWindow,"llm.interface":L.promptProvider};x==="GGUF"&&(P["inference.gguf.n_gpu_layers"]=-1),x==="VLLM"&&L.quantization&&(P["inference.vllm.quantization"]=L.quantization);try{await s.mutateAsync(P),r({type:"SET_LLM_INTERFACE",interfaceId:L.promptProvider}),f("done")}catch(W){M(`Configuration failed: ${W.message}`),f("select")}},_=n.hardware?.gpuVramMb,Y=_?er.filter(L=>L.vramMb<=_):er;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:d==="done"?"Model configured. The LLM proxy is restarting with the new model.":"Select and download a language model for Jarvis."})]}),w&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-500",children:[u.jsx(Ca,{size:16,className:"mt-0.5 shrink-0"}),w]}),m&&u.jsxs("button",{type:"button",onClick:()=>T(m,v),className:le("flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors"),children:[u.jsx(uo,{size:14}),"Retry Download"]})]}),d==="select"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:"Backend"}),u.jsx("div",{className:"flex gap-2",children:["GGUF","VLLM"].map(L=>u.jsx("button",{type:"button",onClick:()=>y(L),className:le("rounded-md px-3 py-1 text-xs font-medium transition-colors",x===L?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:L==="VLLM"?"vLLM":L},L))})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"hf-token",className:"mb-1 block text-xs text-[var(--color-text-muted)]",children:"HuggingFace Token (optional — speeds up downloads, required for gated models)"}),u.jsx("input",{id:"hf-token",type:"password",value:v,onChange:L=>p(L.target.value),placeholder:"hf_...",className:le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")})]}),u.jsxs("div",{className:"space-y-2",children:[Y.map(L=>u.jsxs("button",{type:"button",onClick:()=>N(L),className:le("flex w-full items-center justify-between rounded-lg border border-[var(--color-border)] p-3 text-left transition-colors","hover:border-[var(--color-primary)] hover:bg-[var(--color-surface-alt)]"),children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-medium text-[var(--color-text)]",children:L.displayName}),L.gated&&u.jsxs("span",{className:"flex items-center gap-0.5 rounded bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-600 dark:text-yellow-400",children:[u.jsx(Rd,{size:10}),"Gated"]})]}),u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[L.promptProvider," · ",L.contextWindow.toLocaleString()," ctx"]})]}),u.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["~",x==="GGUF"?L.sizeGguf:L.sizeVllm]})]},L.id)),Y.length===0&&u.jsxs("p",{className:"py-4 text-center text-sm text-[var(--color-text-muted)]",children:["No models fit your available VRAM (",_?Math.round(_/1024)+" GB":"unknown","). Consider using Remote LLM mode."]}),_&&Y.length<er.length&&u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Showing ",Y.length," of ",er.length," models that fit your ",Math.round(_/1024)," GB VRAM."]})]})]}),d==="token"&&m&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[u.jsx("strong",{children:m.displayName})," is a gated model. Accept the license on HuggingFace and paste your access token below."]}),u.jsx("input",{type:"password",value:v,onChange:L=>p(L.target.value),placeholder:"hf_...",className:le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("button",{type:"button",onClick:()=>{f("select"),M(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),u.jsx("button",{type:"button",onClick:j,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Download"})]})]}),d==="downloading"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(ds,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:["Downloading ",m?.displayName,"..."]}),u.jsxs("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:["~",x==="GGUF"?m?.sizeGguf:m?.sizeVllm," · This may take several minutes"]})]}),d==="configuring"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(Ta,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Configuring model and prompt provider..."})]}),d==="done"&&m&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx($t,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsxs("p",{className:"text-sm font-medium text-[var(--color-text)]",children:[m.displayName," configured"]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["Backend: ",x," · Prompt provider: ",m.promptProvider]})]})]}),u.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["The LLM proxy is restarting with the new model. It may take a minute to load. Command Center will automatically use the ",u.jsx("strong",{children:m.promptProvider})," prompt provider for optimized command parsing."]})]})]})}function Sj(){const[n,r]=S.useState(""),[s,i]=S.useState(""),[d,f]=S.useState(""),[m,g]=S.useState(""),[x,y]=S.useState(!1),[v,p]=S.useState(!1),[w,M]=S.useState(null),N=s===d,j=n&&s&&d&&m&&N&&!x;async function T(){if(j){y(!0),M(null);try{const _=await _y(n,s,m);Wl(_.access_token),localStorage.setItem("access_token",_.access_token),localStorage.setItem("refresh_token",_.refresh_token),p(!0)}catch(_){const Y=_?.response?.data?.error??(_ instanceof Error?_.message:"Failed to create account");M(Y)}finally{y(!1)}}}if(v)return u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{children:u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Account Created"})}),u.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-green-500/30 bg-green-500/5 p-4",children:[u.jsx($t,{size:20,className:"text-green-500"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-[var(--color-text)]",children:"Superuser account created"}),u.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:n})]})]}),u.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:`You're logged in. Click "Next" to configure your LLM model.`})]});const z=le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-surface-alt)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]");return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-xl font-bold text-[var(--color-text)]",children:"Create Account"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Create your superuser account. This will be the admin for your Jarvis instance."})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"display-name",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Display Name"}),u.jsx("input",{id:"display-name",type:"text",value:m,onChange:_=>g(_.target.value),className:z,placeholder:"Alex"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Email"}),u.jsx("input",{id:"email",type:"email",value:n,onChange:_=>r(_.target.value),className:z,placeholder:"admin@example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Password"}),u.jsx("input",{id:"password",type:"password",value:s,onChange:_=>i(_.target.value),className:z,placeholder:"Choose a strong password"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"confirm-password",className:"mb-1 block text-sm text-[var(--color-text-muted)]",children:"Confirm Password"}),u.jsx("input",{id:"confirm-password",type:"password",value:d,onChange:_=>f(_.target.value),className:le(z,d&&!N&&"ring-2 ring-red-500"),placeholder:"Confirm password"}),d&&!N&&u.jsx("p",{className:"mt-1 text-xs text-red-500",children:"Passwords don't match"})]})]}),w&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-500/10 px-3 py-2",children:[u.jsx(ky,{size:14,className:"text-red-500 shrink-0"}),u.jsx("span",{className:"text-sm text-red-500",children:w})]}),u.jsxs("button",{type:"button",onClick:T,disabled:!j,className:le("flex w-full items-center justify-center gap-2 rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors","disabled:opacity-50"),children:[u.jsx(uo,{size:14}),"Retry"]})]}),!w&&u.jsx("button",{type:"button",onClick:T,disabled:!j,className:le("w-full rounded-lg bg-[var(--color-primary)] px-4 py-2 font-medium text-white","hover:opacity-90 disabled:opacity-50 transition-opacity"),children:x?"Creating...":"Create Superuser Account"})]})}const Xi=[{label:"Welcome",component:hj},{label:"Hardware",component:pj},{label:"Services",component:gj},{label:"Review",component:xj},{label:"Install",component:vj},{label:"Account",component:Sj},{label:"LLM",component:bj}],wj=5;function Nj({skipToAccount:n}){const{state:r,dispatch:s}=ol();S.useEffect(()=>{n&&s({type:"SET_STEP",step:wj})},[n,s]);const i=An(),d=Xi[r.currentStep].component,f=r.currentStep===0,m=r.currentStep===Xi.length-1,y=r.currentStep===4&&!r.installComplete,v=r.installRunning||y;function p(){m?i("/login"):s({type:"NEXT_STEP"})}function w(){s({type:"PREV_STEP"})}return u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)] p-4",children:u.jsxs("div",{className:"w-full max-w-2xl",children:[u.jsx("div",{className:"mb-6 flex items-center justify-center gap-1",children:Xi.map((M,N)=>u.jsxs("button",{type:"button",onClick:()=>!v&&s({type:"SET_STEP",step:N}),disabled:v,className:le("flex items-center gap-1",v&&"cursor-not-allowed"),children:[u.jsx("div",{className:le("flex h-7 w-7 items-center justify-center rounded-full text-xs font-medium transition-colors",N===r.currentStep?"bg-[var(--color-primary)] text-white":N<r.currentStep?"bg-[var(--color-primary)]/20 text-[var(--color-primary)]":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)]"),children:N+1}),u.jsx("span",{className:le("hidden text-xs sm:inline",N===r.currentStep?"font-medium text-[var(--color-text)]":"text-[var(--color-text-muted)]"),children:M.label}),N<Xi.length-1&&u.jsx("div",{className:le("mx-1 h-px w-4 sm:w-6",N<r.currentStep?"bg-[var(--color-primary)]/30":"bg-[var(--color-border)]")})]},M.label))}),u.jsx("div",{className:"rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-6 shadow-lg",children:u.jsx(d,{})}),u.jsxs("div",{className:"mt-4 flex justify-between",children:[u.jsx("button",{type:"button",onClick:w,disabled:f||v,className:le("rounded-lg border border-[var(--color-border)] px-4 py-2 text-sm","hover:bg-[var(--color-surface-alt)] transition-colors","disabled:invisible"),children:"Back"}),u.jsx("button",{type:"button",onClick:p,disabled:v,className:le("rounded-lg bg-[var(--color-primary)] px-6 py-2 text-sm font-medium text-white","hover:opacity-90 transition-opacity","disabled:opacity-50 disabled:cursor-not-allowed"),children:m?"Finish":"Next"})]})]})})}function Ej({skipToAccount:n}){return u.jsx(mj,{children:u.jsx(Nj,{skipToAccount:n})})}function jj(){const n=An(),r=ex(),s=LE(),[i,d]=S.useState("select"),[f,m]=S.useState(null),[g,x]=S.useState("GGUF"),[y,v]=S.useState(""),[p,w]=S.useState(null),M=_=>{m(_),_.gated?d("token"):j(_,"")},N=()=>{if(!y.trim()){w("HuggingFace token is required for gated models");return}w(null),f&&j(f,y)},j=async(_,Y)=>{d("download"),w(null);const L=g==="GGUF"?_.hfRepoGguf:_.hfRepoVllm,te=g==="GGUF"?_.ggufFilename:void 0;try{await s.mutateAsync({repo:L,filename:te,token:Y||void 0}),T(_)}catch(P){w(`Download failed: ${P.message}`),d("select")}},T=async _=>{d("configure"),w(null);const L={"model.main.name":g==="GGUF"?`.models/${_.ggufFilename}`:`.models/${_.hfRepoVllm.split("/").pop()}`,"model.main.backend":g,"model.main.chat_format":_.chatFormat,"model.main.context_window":_.contextWindow};g==="GGUF"&&(L["inference.gguf.n_gpu_layers"]=-1),g==="VLLM"&&_.quantization&&(L["inference.vllm.quantization"]=_.quantization);try{await r.mutateAsync(L),d("done"),We.success("LLM configured successfully")}catch(te){w(`Configuration failed: ${te.message}`),d("select")}},z=()=>{n("/dashboard")};return u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-bg)] p-4",children:u.jsxs("div",{className:"w-full max-w-2xl rounded-xl border border-[var(--color-border)] bg-[var(--color-surface)] p-8 shadow-lg",children:[u.jsxs("div",{className:"mb-8 text-center",children:[u.jsx(ad,{className:"mx-auto mb-3 text-[var(--color-primary)]",size:40}),u.jsx("h1",{className:"text-2xl font-bold text-[var(--color-text)]",children:"LLM Setup"}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Configure a local language model for Jarvis"})]}),u.jsx("div",{className:"mb-8 flex items-center justify-center gap-2",children:["select","download","configure","done"].map((_,Y)=>{const L=i==="token"?"select":i,te=["select","download","configure","done"];return u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:le("h-2 w-2 rounded-full",L===_?"bg-[var(--color-primary)]":te.indexOf(L)>Y?"bg-green-500":"bg-[var(--color-border)]")}),Y<3&&u.jsx("div",{className:"h-px w-8 bg-[var(--color-border)]"})]},_)})}),p&&u.jsxs("div",{className:"mb-6 flex items-start gap-2 rounded-lg border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-500",children:[u.jsx(Ca,{size:16,className:"mt-0.5 shrink-0"}),p]}),i==="select"&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"Select a model"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{onClick:()=>x("GGUF"),className:le("rounded-md px-3 py-1 text-xs font-medium transition-colors",g==="GGUF"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"GGUF"}),u.jsx("button",{onClick:()=>x("VLLM"),className:le("rounded-md px-3 py-1 text-xs font-medium transition-colors",g==="VLLM"?"bg-[var(--color-primary)] text-white":"bg-[var(--color-surface-alt)] text-[var(--color-text-muted)] hover:text-[var(--color-text)]"),children:"vLLM"})]})]}),u.jsx("div",{className:"grid gap-3",children:er.map(_=>u.jsxs("button",{onClick:()=>M(_),className:le("flex items-center justify-between rounded-lg border border-[var(--color-border)] p-4 text-left transition-colors","hover:border-[var(--color-primary)] hover:bg-[var(--color-surface-alt)]"),children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-medium text-[var(--color-text)]",children:_.displayName}),_.gated&&u.jsxs("span",{className:"flex items-center gap-1 rounded bg-yellow-500/15 px-1.5 py-0.5 text-[10px] font-medium text-yellow-600 dark:text-yellow-400",children:[u.jsx(Rd,{size:10}),"Gated"]})]}),u.jsxs("p",{className:"mt-0.5 text-xs text-[var(--color-text-muted)]",children:[_.quantization?`${_.quantization.toUpperCase()} 4-bit`:_.chatFormat," · ",_.contextWindow.toLocaleString()," ctx"]})]}),u.jsxs("span",{className:"text-sm text-[var(--color-text-muted)]",children:["~",g==="GGUF"?_.sizeGguf:_.sizeVllm]})]},_.id))}),u.jsx("div",{className:"flex justify-end pt-2",children:u.jsx("button",{onClick:z,className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Skip for now"})})]}),i==="token"&&f&&u.jsxs("div",{className:"space-y-4",children:[u.jsx("h2",{className:"text-sm font-semibold text-[var(--color-text)]",children:"HuggingFace Access Required"}),u.jsxs("p",{className:"text-sm text-[var(--color-text-muted)]",children:[u.jsx("strong",{children:f.displayName})," is a gated model. You need to:"]}),u.jsxs("ol",{className:"list-inside list-decimal space-y-1 text-sm text-[var(--color-text-muted)]",children:[u.jsx("li",{children:"Visit the model page on huggingface.co and accept the license agreement"}),u.jsx("li",{children:"Create an access token at huggingface.co/settings/tokens"}),u.jsx("li",{children:"Paste your token below"})]}),u.jsx("input",{type:"password",value:y,onChange:_=>v(_.target.value),placeholder:"hf_...",className:le("w-full rounded-lg border border-[var(--color-border)] bg-[var(--color-bg)] px-3 py-2","text-sm text-[var(--color-text)] placeholder:text-[var(--color-text-muted)]","outline-none focus:ring-2 focus:ring-[var(--color-primary)]")}),u.jsxs("div",{className:"flex justify-between",children:[u.jsx("button",{onClick:()=>{d("select"),w(null)},className:"text-sm text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"Back"}),u.jsx("button",{onClick:N,className:"rounded-lg bg-[var(--color-primary)] px-4 py-2 text-sm text-white hover:opacity-90",children:"Continue"})]})]}),i==="download"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(ds,{className:"mb-4 animate-bounce text-[var(--color-primary)]",size:32}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Downloading model..."}),u.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," ","(~",g==="GGUF"?f?.sizeGguf:f?.sizeVllm,")"]}),u.jsx("p",{className:"mt-4 text-xs text-[var(--color-text-muted)]",children:"This may take several minutes depending on your connection"})]}),i==="configure"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(By,{className:"mb-4 animate-spin text-[var(--color-primary)]",size:32}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"Configuring..."}),u.jsx("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:"Writing settings and restarting LLM proxy"})]}),i==="done"&&u.jsxs("div",{className:"flex flex-col items-center py-8",children:[u.jsx(mw,{className:"mb-4 text-green-500",size:40}),u.jsx("h2",{className:"text-lg font-semibold text-[var(--color-text)]",children:"LLM Ready"}),u.jsxs("p",{className:"mt-1 text-sm text-[var(--color-text-muted)]",children:[f?.displayName," configured on ",g]}),u.jsx("p",{className:"mt-1 text-xs text-[var(--color-text-muted)]",children:"The model service is restarting. It may take a minute to load the model."}),u.jsx("button",{onClick:()=>n("/dashboard"),className:"mt-6 rounded-lg bg-[var(--color-primary)] px-6 py-2 text-sm text-white hover:opacity-90",children:"Go to Dashboard"})]}),(s.isPending||r.isPending)&&i!=="download"&&i!=="configure"&&u.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:u.jsx(Ta,{className:"animate-spin text-white",size:32})})]})})}const Rj=new C1;function Tj(){const[n,r]=S.useState(!0),[s,i]=S.useState(!1),[d,f]=S.useState(!1);return S.useEffect(()=>{_d().then(m=>{m.state==="deployed-needs-account"?(f(!0),i(!0)):i(!m.configured)}).catch(()=>{i(!1)}).finally(()=>r(!1))},[]),n?u.jsx("div",{className:"flex min-h-screen items-center justify-center bg-[var(--color-background)]",children:u.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--color-primary)] border-t-transparent"})}):u.jsxs(Eb,{children:[u.jsx(Jt,{path:"/setup",element:u.jsx(Ej,{skipToAccount:d})}),u.jsx(Jt,{path:"/login",element:u.jsx(oE,{})}),u.jsx(Jt,{path:"/llm-setup",element:u.jsx(jj,{})}),u.jsxs(Jt,{element:u.jsx(iE,{}),children:[u.jsx(Jt,{path:"/dashboard",element:u.jsx(YE,{})}),u.jsx(Jt,{path:"/settings",element:u.jsx(SE,{})}),u.jsx(Jt,{path:"/services",element:u.jsx(AE,{})}),u.jsx(Jt,{path:"/models",element:u.jsx(rj,{})}),u.jsx(Jt,{path:"/update",element:u.jsx(sj,{})}),u.jsx(Jt,{path:"/nodes",element:u.jsx(WE,{})}),u.jsx(Jt,{path:"/",element:s?u.jsx(Pi,{to:"/setup",replace:!0}):u.jsx(Pi,{to:"/dashboard",replace:!0})}),u.jsx(Jt,{path:"*",element:u.jsx(oj,{})})]})]})}function Cj(){return u.jsx(p2,{children:u.jsx(_1,{client:Rj,children:u.jsxs(PS,{children:[u.jsx(Zb,{children:u.jsx(Tj,{})}),u.jsx(m2,{position:"bottom-right",richColors:!0})]})})})}E0.createRoot(document.getElementById("root")).render(u.jsx(S.StrictMode,{children:u.jsx(Cj,{})}));
|