@openparachute/hub 0.6.5-rc.7 → 0.7.0
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/src/__tests__/account-setup.test.ts +34 -0
- package/src/__tests__/account-vault-admin-token.test.ts +35 -3
- package/src/__tests__/admin-channel-token.test.ts +173 -0
- package/src/__tests__/admin-connections.test.ts +1154 -0
- package/src/__tests__/admin-csrf-belt.test.ts +346 -0
- package/src/__tests__/admin-module-token.test.ts +311 -0
- package/src/__tests__/admin-vaults.test.ts +590 -0
- package/src/__tests__/api-modules-ops.test.ts +70 -5
- package/src/__tests__/api-modules.test.ts +262 -79
- package/src/__tests__/hub-db-liveness.test.ts +12 -7
- package/src/__tests__/hub-server.test.ts +319 -21
- package/src/__tests__/invites.test.ts +27 -0
- package/src/__tests__/module-manifest.test.ts +305 -8
- package/src/__tests__/serve-boot.test.ts +133 -2
- package/src/__tests__/service-spec-discovery.test.ts +109 -0
- package/src/__tests__/setup-gate.test.ts +13 -7
- package/src/__tests__/setup-wizard.test.ts +228 -1
- package/src/__tests__/vault-name.test.ts +20 -5
- package/src/__tests__/well-known.test.ts +44 -8
- package/src/account-vault-admin-token.ts +43 -14
- package/src/admin-channel-token.ts +135 -0
- package/src/admin-connections.ts +980 -0
- package/src/admin-module-token.ts +197 -0
- package/src/admin-vaults.ts +390 -12
- package/src/api-hub-upgrade.ts +4 -3
- package/src/api-modules-ops.ts +41 -16
- package/src/api-modules.ts +238 -116
- package/src/api-tokens.ts +8 -5
- package/src/commands/serve-boot.ts +80 -3
- package/src/commands/setup.ts +4 -4
- package/src/connections-store.ts +161 -0
- package/src/grants.ts +50 -0
- package/src/hub-db-liveness.ts +33 -17
- package/src/hub-server.ts +354 -61
- package/src/invites.ts +22 -0
- package/src/jwt-sign.ts +41 -1
- package/src/module-manifest.ts +429 -23
- package/src/origin-check.ts +106 -0
- package/src/proxy-error-ui.ts +1 -1
- package/src/service-spec.ts +132 -41
- package/src/setup-wizard.ts +68 -6
- package/src/users.ts +11 -0
- package/src/vault-name.ts +27 -7
- package/src/well-known.ts +41 -33
- package/web/ui/dist/assets/index-C-XzMVqN.js +61 -0
- package/web/ui/dist/assets/index-E_9wqjEm.css +1 -0
- package/web/ui/dist/index.html +2 -2
- package/src/__tests__/api-modules-config.test.ts +0 -882
- package/src/api-modules-config.ts +0 -421
- package/web/ui/dist/assets/index-BYYUeLGA.css +0 -1
- package/web/ui/dist/assets/index-D3cDUOOj.js +0 -61
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function c(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(f){if(f.ep)return;f.ep=!0;const h=c(f);fetch(f.href,h)}})();var qr={exports:{}},Bl={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var vh;function V1(){if(vh)return Bl;vh=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(o,f,h){var g=null;if(h!==void 0&&(g=""+h),f.key!==void 0&&(g=""+f.key),"key"in f){h={};for(var j in f)j!=="key"&&(h[j]=f[j])}else h=f;return f=h.ref,{$$typeof:i,type:o,key:g,ref:f!==void 0?f:null,props:h}}return Bl.Fragment=r,Bl.jsx=c,Bl.jsxs=c,Bl}var gh;function Z1(){return gh||(gh=1,qr.exports=V1()),qr.exports}var u=Z1(),Yr={exports:{}},ue={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var yh;function X1(){if(yh)return ue;yh=1;var i=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),g=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),w=Symbol.iterator;function T(N){return N===null||typeof N!="object"?null:(N=w&&N[w]||N["@@iterator"],typeof N=="function"?N:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D=Object.assign,G={};function Z(N,q,F){this.props=N,this.context=q,this.refs=G,this.updater=F||M}Z.prototype.isReactComponent={},Z.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,q,"setState")},Z.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function V(){}V.prototype=Z.prototype;function $(N,q,F){this.props=N,this.context=q,this.refs=G,this.updater=F||M}var le=$.prototype=new V;le.constructor=$,D(le,Z.prototype),le.isPureReactComponent=!0;var J=Array.isArray;function Y(){}var C={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function X(N,q,F){var P=F.ref;return{$$typeof:i,type:N,key:q,ref:P!==void 0?P:null,props:F}}function ve(N,q){return X(N.type,q,N.props)}function te(N){return typeof N=="object"&&N!==null&&N.$$typeof===i}function he(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(F){return q[F]})}var Qe=/\/+/g;function St(N,q){return typeof N=="object"&&N!==null&&N.key!=null?he(""+N.key):q.toString(36)}function Ye(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(Y,Y):(N.status="pending",N.then(function(q){N.status==="pending"&&(N.status="fulfilled",N.value=q)},function(q){N.status==="pending"&&(N.status="rejected",N.reason=q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function H(N,q,F,P,se){var oe=typeof N;(oe==="undefined"||oe==="boolean")&&(N=null);var Se=!1;if(N===null)Se=!0;else switch(oe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(N.$$typeof){case i:case r:Se=!0;break;case b:return Se=N._init,H(Se(N._payload),q,F,P,se)}}if(Se)return se=se(N),Se=P===""?"."+St(N,0):P,J(se)?(F="",Se!=null&&(F=Se.replace(Qe,"$&/")+"/"),H(se,q,F,"",function(Xn){return Xn})):se!=null&&(te(se)&&(se=ve(se,F+(se.key==null||N&&N.key===se.key?"":(""+se.key).replace(Qe,"$&/")+"/")+Se)),q.push(se)),1;Se=0;var nt=P===""?".":P+":";if(J(N))for(var Be=0;Be<N.length;Be++)P=N[Be],oe=nt+St(P,Be),Se+=H(P,q,F,oe,se);else if(Be=T(N),typeof Be=="function")for(N=Be.call(N),Be=0;!(P=N.next()).done;)P=P.value,oe=nt+St(P,Be++),Se+=H(P,q,F,oe,se);else if(oe==="object"){if(typeof N.then=="function")return H(Ye(N),q,F,P,se);throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Se}function K(N,q,F){if(N==null)return N;var P=[],se=0;return H(N,P,"","",function(oe){return q.call(F,oe,se++)}),P}function ie(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(F){(N._status===0||N._status===-1)&&(N._status=1,N._result=F)},function(F){(N._status===0||N._status===-1)&&(N._status=2,N._result=F)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var we=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Ae={map:K,forEach:function(N,q,F){K(N,function(){q.apply(this,arguments)},F)},count:function(N){var q=0;return K(N,function(){q++}),q},toArray:function(N){return K(N,function(q){return q})||[]},only:function(N){if(!te(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return ue.Activity=y,ue.Children=Ae,ue.Component=Z,ue.Fragment=c,ue.Profiler=f,ue.PureComponent=$,ue.StrictMode=o,ue.Suspense=v,ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,ue.__COMPILER_RUNTIME={__proto__:null,c:function(N){return C.H.useMemoCache(N)}},ue.cache=function(N){return function(){return N.apply(null,arguments)}},ue.cacheSignal=function(){return null},ue.cloneElement=function(N,q,F){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=D({},N.props),se=N.key;if(q!=null)for(oe in q.key!==void 0&&(se=""+q.key),q)!k.call(q,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&q.ref===void 0||(P[oe]=q[oe]);var oe=arguments.length-2;if(oe===1)P.children=F;else if(1<oe){for(var Se=Array(oe),nt=0;nt<oe;nt++)Se[nt]=arguments[nt+2];P.children=Se}return X(N.type,se,P)},ue.createContext=function(N){return N={$$typeof:g,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},ue.createElement=function(N,q,F){var P,se={},oe=null;if(q!=null)for(P in q.key!==void 0&&(oe=""+q.key),q)k.call(q,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(se[P]=q[P]);var Se=arguments.length-2;if(Se===1)se.children=F;else if(1<Se){for(var nt=Array(Se),Be=0;Be<Se;Be++)nt[Be]=arguments[Be+2];se.children=nt}if(N&&N.defaultProps)for(P in Se=N.defaultProps,Se)se[P]===void 0&&(se[P]=Se[P]);return X(N,oe,se)},ue.createRef=function(){return{current:null}},ue.forwardRef=function(N){return{$$typeof:j,render:N}},ue.isValidElement=te,ue.lazy=function(N){return{$$typeof:b,_payload:{_status:-1,_result:N},_init:ie}},ue.memo=function(N,q){return{$$typeof:p,type:N,compare:q===void 0?null:q}},ue.startTransition=function(N){var q=C.T,F={};C.T=F;try{var P=N(),se=C.S;se!==null&&se(F,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(Y,we)}catch(oe){we(oe)}finally{q!==null&&F.types!==null&&(q.types=F.types),C.T=q}},ue.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},ue.use=function(N){return C.H.use(N)},ue.useActionState=function(N,q,F){return C.H.useActionState(N,q,F)},ue.useCallback=function(N,q){return C.H.useCallback(N,q)},ue.useContext=function(N){return C.H.useContext(N)},ue.useDebugValue=function(){},ue.useDeferredValue=function(N,q){return C.H.useDeferredValue(N,q)},ue.useEffect=function(N,q){return C.H.useEffect(N,q)},ue.useEffectEvent=function(N){return C.H.useEffectEvent(N)},ue.useId=function(){return C.H.useId()},ue.useImperativeHandle=function(N,q,F){return C.H.useImperativeHandle(N,q,F)},ue.useInsertionEffect=function(N,q){return C.H.useInsertionEffect(N,q)},ue.useLayoutEffect=function(N,q){return C.H.useLayoutEffect(N,q)},ue.useMemo=function(N,q){return C.H.useMemo(N,q)},ue.useOptimistic=function(N,q){return C.H.useOptimistic(N,q)},ue.useReducer=function(N,q,F){return C.H.useReducer(N,q,F)},ue.useRef=function(N){return C.H.useRef(N)},ue.useState=function(N){return C.H.useState(N)},ue.useSyncExternalStore=function(N,q,F){return C.H.useSyncExternalStore(N,q,F)},ue.useTransition=function(){return C.H.useTransition()},ue.version="19.2.5",ue}var bh;function nc(){return bh||(bh=1,Yr.exports=X1()),Yr.exports}var S=nc(),Gr={exports:{}},Ll={},Vr={exports:{}},Zr={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var xh;function Q1(){return xh||(xh=1,(function(i){function r(H,K){var ie=H.length;H.push(K);e:for(;0<ie;){var we=ie-1>>>1,Ae=H[we];if(0<f(Ae,K))H[we]=K,H[ie]=Ae,ie=we;else break e}}function c(H){return H.length===0?null:H[0]}function o(H){if(H.length===0)return null;var K=H[0],ie=H.pop();if(ie!==K){H[0]=ie;e:for(var we=0,Ae=H.length,N=Ae>>>1;we<N;){var q=2*(we+1)-1,F=H[q],P=q+1,se=H[P];if(0>f(F,ie))P<Ae&&0>f(se,F)?(H[we]=se,H[P]=ie,we=P):(H[we]=F,H[q]=ie,we=q);else if(P<Ae&&0>f(se,ie))H[we]=se,H[P]=ie,we=P;else break e}}return K}function f(H,K){var ie=H.sortIndex-K.sortIndex;return ie!==0?ie:H.id-K.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;i.unstable_now=function(){return h.now()}}else{var g=Date,j=g.now();i.unstable_now=function(){return g.now()-j}}var v=[],p=[],b=1,y=null,w=3,T=!1,M=!1,D=!1,G=!1,Z=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function le(H){for(var K=c(p);K!==null;){if(K.callback===null)o(p);else if(K.startTime<=H)o(p),K.sortIndex=K.expirationTime,r(v,K);else break;K=c(p)}}function J(H){if(D=!1,le(H),!M)if(c(v)!==null)M=!0,Y||(Y=!0,he());else{var K=c(p);K!==null&&Ye(J,K.startTime-H)}}var Y=!1,C=-1,k=5,X=-1;function ve(){return G?!0:!(i.unstable_now()-X<k)}function te(){if(G=!1,Y){var H=i.unstable_now();X=H;var K=!0;try{e:{M=!1,D&&(D=!1,V(C),C=-1),T=!0;var ie=w;try{t:{for(le(H),y=c(v);y!==null&&!(y.expirationTime>H&&ve());){var we=y.callback;if(typeof we=="function"){y.callback=null,w=y.priorityLevel;var Ae=we(y.expirationTime<=H);if(H=i.unstable_now(),typeof Ae=="function"){y.callback=Ae,le(H),K=!0;break t}y===c(v)&&o(v),le(H)}else o(v);y=c(v)}if(y!==null)K=!0;else{var N=c(p);N!==null&&Ye(J,N.startTime-H),K=!1}}break e}finally{y=null,w=ie,T=!1}K=void 0}}finally{K?he():Y=!1}}}var he;if(typeof $=="function")he=function(){$(te)};else if(typeof MessageChannel<"u"){var Qe=new MessageChannel,St=Qe.port2;Qe.port1.onmessage=te,he=function(){St.postMessage(null)}}else he=function(){Z(te,0)};function Ye(H,K){C=Z(function(){H(i.unstable_now())},K)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(H){H.callback=null},i.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<H?Math.floor(1e3/H):5},i.unstable_getCurrentPriorityLevel=function(){return w},i.unstable_next=function(H){switch(w){case 1:case 2:case 3:var K=3;break;default:K=w}var ie=w;w=K;try{return H()}finally{w=ie}},i.unstable_requestPaint=function(){G=!0},i.unstable_runWithPriority=function(H,K){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ie=w;w=H;try{return K()}finally{w=ie}},i.unstable_scheduleCallback=function(H,K,ie){var we=i.unstable_now();switch(typeof ie=="object"&&ie!==null?(ie=ie.delay,ie=typeof ie=="number"&&0<ie?we+ie:we):ie=we,H){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=ie+Ae,H={id:b++,callback:K,priorityLevel:H,startTime:ie,expirationTime:Ae,sortIndex:-1},ie>we?(H.sortIndex=ie,r(p,H),c(v)===null&&H===c(p)&&(D?(V(C),C=-1):D=!0,Ye(J,ie-we))):(H.sortIndex=Ae,r(v,H),M||T||(M=!0,Y||(Y=!0,he()))),H},i.unstable_shouldYield=ve,i.unstable_wrapCallback=function(H){var K=w;return function(){var ie=w;w=K;try{return H.apply(this,arguments)}finally{w=ie}}}})(Zr)),Zr}var jh;function $1(){return jh||(jh=1,Vr.exports=Q1()),Vr.exports}var Xr={exports:{}},at={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Sh;function J1(){if(Sh)return at;Sh=1;var i=nc();function r(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+v+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var o={d:{f:c,r:function(){throw Error(r(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(v,p,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:y==null?null:""+y,children:v,containerInfo:p,implementation:b}}var g=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(v,p){if(v==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,at.createPortal=function(v,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return h(v,p,null,b)},at.flushSync=function(v){var p=g.T,b=o.p;try{if(g.T=null,o.p=2,v)return v()}finally{g.T=p,o.p=b,o.d.f()}},at.preconnect=function(v,p){typeof v=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(v,p))},at.prefetchDNS=function(v){typeof v=="string"&&o.d.D(v)},at.preinit=function(v,p){if(typeof v=="string"&&p&&typeof p.as=="string"){var b=p.as,y=j(b,p.crossOrigin),w=typeof p.integrity=="string"?p.integrity:void 0,T=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?o.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:w,fetchPriority:T}):b==="script"&&o.d.X(v,{crossOrigin:y,integrity:w,fetchPriority:T,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},at.preinitModule=function(v,p){if(typeof v=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=j(p.as,p.crossOrigin);o.d.M(v,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(v)},at.preload=function(v,p){if(typeof v=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,y=j(b,p.crossOrigin);o.d.L(v,b,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},at.preloadModule=function(v,p){if(typeof v=="string")if(p){var b=j(p.as,p.crossOrigin);o.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(v)},at.requestFormReset=function(v){o.d.r(v)},at.unstable_batchedUpdates=function(v,p){return v(p)},at.useFormState=function(v,p,b){return g.H.useFormState(v,p,b)},at.useFormStatus=function(){return g.H.useHostTransitionStatus()},at.version="19.2.5",at}var Ch;function K1(){if(Ch)return Xr.exports;Ch=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),Xr.exports=J1(),Xr.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Eh;function F1(){if(Eh)return Ll;Eh=1;var i=$1(),r=nc(),c=K1();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(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 g(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 j(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 v(e){if(h(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var l=a.return;if(l===null)break;var s=l.alternate;if(s===null){if(n=l.return,n!==null){a=n;continue}break}if(l.child===s.child){for(s=l.child;s;){if(s===a)return v(l),e;if(s===n)return v(l),t;s=s.sibling}throw Error(o(188))}if(a.return!==n.return)a=l,n=s;else{for(var d=!1,m=l.child;m;){if(m===a){d=!0,a=l,n=s;break}if(m===n){d=!0,n=l,a=s;break}m=m.sibling}if(!d){for(m=s.child;m;){if(m===a){d=!0,a=s,n=l;break}if(m===n){d=!0,n=s,a=l;break}m=m.sibling}if(!d)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,w=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),$=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),ve=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function he(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var Qe=Symbol.for("react.client.reference");function St(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Qe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case D:return"Fragment";case Z:return"Profiler";case G:return"StrictMode";case J:return"Suspense";case Y:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case $:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case le:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case C:return t=e.displayName||null,t!==null?t:St(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return St(e(t))}catch{}}return null}var Ye=Array.isArray,H=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},we=[],Ae=-1;function N(e){return{current:e}}function q(e){0>Ae||(e.current=we[Ae],we[Ae]=null,Ae--)}function F(e,t){Ae++,we[Ae]=e.current,e.current=t}var P=N(null),se=N(null),oe=N(null),Se=N(null);function nt(e,t){switch(F(oe,t),F(se,e),F(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Lf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Lf(t),e=qf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(P),F(P,e)}function Be(){q(P),q(se),q(oe)}function Xn(e){e.memoizedState!==null&&F(Se,e);var t=P.current,a=qf(t,e.type);t!==a&&(F(se,e),F(P,a))}function $l(e){se.current===e&&(q(P),q(se)),Se.current===e&&(q(Se),kl._currentValue=ie)}var Su,hc;function Ha(e){if(Su===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Su=t&&t[1]||"",hc=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Su+e+hc}var Cu=!1;function Eu(e,t){if(!e||Cu)return"";Cu=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(O){var z=O}Reflect.construct(e,[],L)}else{try{L.call()}catch(O){z=O}e.call(L.prototype)}}else{try{throw Error()}catch(O){z=O}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(O){if(O&&z&&typeof O.stack=="string")return[O.stack,z.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=n.DetermineComponentFrameRoot(),d=s[0],m=s[1];if(d&&m){var x=d.split(`
|
|
44
|
-
`),A=m.split(`
|
|
45
|
-
`);for(l=n=0;n<x.length&&!x[n].includes("DetermineComponentFrameRoot");)n++;for(;l<A.length&&!A[l].includes("DetermineComponentFrameRoot");)l++;if(n===x.length||l===A.length)for(n=x.length-1,l=A.length-1;1<=n&&0<=l&&x[n]!==A[l];)l--;for(;1<=n&&0<=l;n--,l--)if(x[n]!==A[l]){if(n!==1||l!==1)do if(n--,l--,0>l||x[n]!==A[l]){var U=`
|
|
46
|
-
`+x[n].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=n&&0<=l);break}}}finally{Cu=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ha(a):""}function xm(e,t){switch(e.tag){case 26:case 27:case 5:return Ha(e.type);case 16:return Ha("Lazy");case 13:return e.child!==t&&t!==null?Ha("Suspense Fallback"):Ha("Suspense");case 19:return Ha("SuspenseList");case 0:case 15:return Eu(e.type,!1);case 11:return Eu(e.type.render,!1);case 1:return Eu(e.type,!0);case 31:return Ha("Activity");default:return""}}function mc(e){try{var t="",a=null;do t+=xm(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
-
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}var Nu=Object.prototype.hasOwnProperty,wu=i.unstable_scheduleCallback,Tu=i.unstable_cancelCallback,jm=i.unstable_shouldYield,Sm=i.unstable_requestPaint,ft=i.unstable_now,Cm=i.unstable_getCurrentPriorityLevel,pc=i.unstable_ImmediatePriority,vc=i.unstable_UserBlockingPriority,Jl=i.unstable_NormalPriority,Em=i.unstable_LowPriority,gc=i.unstable_IdlePriority,Nm=i.log,wm=i.unstable_setDisableYieldValue,Qn=null,ht=null;function da(e){if(typeof Nm=="function"&&wm(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Qn,e)}catch{}}var mt=Math.clz32?Math.clz32:Rm,Tm=Math.log,_m=Math.LN2;function Rm(e){return e>>>=0,e===0?32:31-(Tm(e)/_m|0)|0}var Kl=256,Fl=262144,Wl=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 Il(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var l=0,s=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=n&134217727;return m!==0?(n=m&~s,n!==0?l=Ba(n):(d&=m,d!==0?l=Ba(d):a||(a=m&~e,a!==0&&(l=Ba(a))))):(m=n&~s,m!==0?l=Ba(m):d!==0?l=Ba(d):a||(a=n&~e,a!==0&&(l=Ba(a)))),l===0?0:t!==0&&t!==l&&(t&s)===0&&(s=l&-l,a=t&-t,s>=a||s===32&&(a&4194048)!==0)?t:l}function $n(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Am(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yc(){var e=Wl;return Wl<<=1,(Wl&62914560)===0&&(Wl=4194304),e}function _u(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Jn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function zm(e,t,a,n,l,s){var d=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 m=e.entanglements,x=e.expirationTimes,A=e.hiddenUpdates;for(a=d&~a;0<a;){var U=31-mt(a),L=1<<U;m[U]=0,x[U]=-1;var z=A[U];if(z!==null)for(A[U]=null,U=0;U<z.length;U++){var O=z[U];O!==null&&(O.lane&=-536870913)}a&=~L}n!==0&&bc(e,n,0),s!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=s&~(d&~t))}function bc(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-mt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function xc(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-mt(a),l=1<<n;l&t|e[n]&t&&(e[n]|=t),a&=~l}}function jc(e,t){var a=t&-t;return a=(a&42)!==0?1:Ru(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ru(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 Au(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Sc(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:ch(e.type))}function Cc(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var fa=Math.random().toString(36).slice(2),We="__reactFiber$"+fa,it="__reactProps$"+fa,nn="__reactContainer$"+fa,zu="__reactEvents$"+fa,Mm="__reactListeners$"+fa,Om="__reactHandles$"+fa,Ec="__reactResources$"+fa,Kn="__reactMarker$"+fa;function Mu(e){delete e[We],delete e[it],delete e[zu],delete e[Mm],delete e[Om]}function ln(e){var t=e[We];if(t)return t;for(var a=e.parentNode;a;){if(t=a[nn]||a[We]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=$f(e);e!==null;){if(a=e[We])return a;e=$f(e)}return t}e=a,a=e.parentNode}return null}function un(e){if(e=e[We]||e[nn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function sn(e){var t=e[Ec];return t||(t=e[Ec]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[Kn]=!0}var Nc=new Set,wc={};function La(e,t){rn(e,t),rn(e+"Capture",t)}function rn(e,t){for(wc[e]=t,e=0;e<t.length;e++)Nc.add(t[e])}var km=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]*$"),Tc={},_c={};function Um(e){return Nu.call(_c,e)?!0:Nu.call(Tc,e)?!1:km.test(e)?_c[e]=!0:(Tc[e]=!0,!1)}function Pl(e,t,a){if(Um(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ei(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 Qt(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Dm(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(d){a=""+d,s.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(d){a=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ou(e){if(!e._valueTracker){var t=Rc(e)?"checked":"value";e._valueTracker=Dm(e,t,""+e[t])}}function Ac(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Rc(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function ti(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 Hm=/[\n"\\]/g;function Et(e){return e.replace(Hm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ku(e,t,a,n,l,s,d,m){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Uu(e,d,Ct(t)):a!=null?Uu(e,d,Ct(a)):n!=null&&e.removeAttribute("value"),l==null&&s!=null&&(e.defaultChecked=!!s),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Ct(m):e.removeAttribute("name")}function zc(e,t,a,n,l,s,d,m){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||a!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Ou(e);return}a=a!=null?""+Ct(a):"",t=t!=null?""+Ct(t):a,m||t===e.value||(e.value=t),e.defaultValue=t}n=n??l,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=m?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Ou(e)}function Uu(e,t,a){t==="number"&&ti(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function cn(e,t,a,n){if(e=e.options,t){t={};for(var l=0;l<a.length;l++)t["$"+a[l]]=!0;for(a=0;a<e.length;a++)l=t.hasOwnProperty("$"+e[a].value),e[a].selected!==l&&(e[a].selected=l),l&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),t=null,l=0;l<e.length;l++){if(e[l].value===a){e[l].selected=!0,n&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Mc(e,t,a){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ct(a):""}function Oc(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(Ye(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Ct(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Ou(e)}function on(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Bm=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 kc(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||Bm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Uc(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var l in t)n=t[l],t.hasOwnProperty(l)&&a[l]!==n&&kc(e,l,n)}else for(var s in t)t.hasOwnProperty(s)&&kc(e,s,t[s])}function Du(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 Lm=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"]]),qm=/^[\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 ai(e){return qm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $t(){}var Hu=null;function Bu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dn=null,fn=null;function Dc(e){var t=un(e);if(t&&(e=t.stateNode)){var a=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(ku(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="'+Et(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var l=n[it]||null;if(!l)throw Error(o(90));ku(n,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&Ac(n)}break e;case"textarea":Mc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&cn(e,!!a.multiple,t,!1)}}}var Lu=!1;function Hc(e,t,a){if(Lu)return e(t,a);Lu=!0;try{var n=e(t);return n}finally{if(Lu=!1,(dn!==null||fn!==null)&&(Vi(),dn&&(t=dn,e=fn,fn=dn=null,Dc(t),e)))for(t=0;t<e.length;t++)Dc(e[t])}}function Wn(e,t){var a=e.stateNode;if(a===null)return null;var n=a[it]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var Jt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qu=!1;if(Jt)try{var In={};Object.defineProperty(In,"passive",{get:function(){qu=!0}}),window.addEventListener("test",In,In),window.removeEventListener("test",In,In)}catch{qu=!1}var ha=null,Yu=null,ni=null;function Bc(){if(ni)return ni;var e,t=Yu,a=t.length,n,l="value"in ha?ha.value:ha.textContent,s=l.length;for(e=0;e<a&&t[e]===l[e];e++);var d=a-e;for(n=1;n<=d&&t[a-n]===l[s-n];n++);return ni=l.slice(e,1<n?1-n:void 0)}function li(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 ii(){return!0}function Lc(){return!1}function ut(e){function t(a,n,l,s,d){this._reactName=a,this._targetInst=l,this.type=n,this.nativeEvent=s,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(a=e[m],this[m]=a?a(s):s[m]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ii:Lc,this.isPropagationStopped=Lc,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ii)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ii)},persist:function(){},isPersistent:ii}),t}var qa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ui=ut(qa),Pn=y({},qa,{view:0,detail:0}),Ym=ut(Pn),Gu,Vu,el,si=y({},Pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xu,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!==el&&(el&&e.type==="mousemove"?(Gu=e.screenX-el.screenX,Vu=e.screenY-el.screenY):Vu=Gu=0,el=e),Gu)},movementY:function(e){return"movementY"in e?e.movementY:Vu}}),qc=ut(si),Gm=y({},si,{dataTransfer:0}),Vm=ut(Gm),Zm=y({},Pn,{relatedTarget:0}),Zu=ut(Zm),Xm=y({},qa,{animationName:0,elapsedTime:0,pseudoElement:0}),Qm=ut(Xm),$m=y({},qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jm=ut($m),Km=y({},qa,{data:0}),Yc=ut(Km),Fm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wm={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"},Im={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Im[e])?!!t[e]:!1}function Xu(){return Pm}var ep=y({},Pn,{key:function(e){if(e.key){var t=Fm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=li(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xu,charCode:function(e){return e.type==="keypress"?li(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?li(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tp=ut(ep),ap=y({},si,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gc=ut(ap),np=y({},Pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),lp=ut(np),ip=y({},qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),up=ut(ip),sp=y({},si,{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}),rp=ut(sp),cp=y({},qa,{newState:0,oldState:0}),op=ut(cp),dp=[9,13,27,32],Qu=Jt&&"CompositionEvent"in window,tl=null;Jt&&"documentMode"in document&&(tl=document.documentMode);var fp=Jt&&"TextEvent"in window&&!tl,Vc=Jt&&(!Qu||tl&&8<tl&&11>=tl),Zc=" ",Xc=!1;function Qc(e,t){switch(e){case"keyup":return dp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $c(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hn=!1;function hp(e,t){switch(e){case"compositionend":return $c(t);case"keypress":return t.which!==32?null:(Xc=!0,Zc);case"textInput":return e=t.data,e===Zc&&Xc?null:e;default:return null}}function mp(e,t){if(hn)return e==="compositionend"||!Qu&&Qc(e,t)?(e=Bc(),ni=Yu=ha=null,hn=!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 Vc&&t.locale!=="ko"?null:t.data;default:return null}}var pp={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 Jc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pp[e.type]:t==="textarea"}function Kc(e,t,a,n){dn?fn?fn.push(n):fn=[n]:dn=n,t=Fi(t,"onChange"),0<t.length&&(a=new ui("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var al=null,nl=null;function vp(e){Of(e,0)}function ri(e){var t=Fn(e);if(Ac(t))return e}function Fc(e,t){if(e==="change")return t}var Wc=!1;if(Jt){var $u;if(Jt){var Ju="oninput"in document;if(!Ju){var Ic=document.createElement("div");Ic.setAttribute("oninput","return;"),Ju=typeof Ic.oninput=="function"}$u=Ju}else $u=!1;Wc=$u&&(!document.documentMode||9<document.documentMode)}function Pc(){al&&(al.detachEvent("onpropertychange",eo),nl=al=null)}function eo(e){if(e.propertyName==="value"&&ri(nl)){var t=[];Kc(t,nl,e,Bu(e)),Hc(vp,t)}}function gp(e,t,a){e==="focusin"?(Pc(),al=t,nl=a,al.attachEvent("onpropertychange",eo)):e==="focusout"&&Pc()}function yp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ri(nl)}function bp(e,t){if(e==="click")return ri(t)}function xp(e,t){if(e==="input"||e==="change")return ri(t)}function jp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pt=typeof Object.is=="function"?Object.is:jp;function ll(e,t){if(pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var l=a[n];if(!Nu.call(t,l)||!pt(e[l],t[l]))return!1}return!0}function to(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ao(e,t){var a=to(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=to(a)}}function no(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?no(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ti(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=ti(e.document)}return t}function Ku(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 Sp=Jt&&"documentMode"in document&&11>=document.documentMode,mn=null,Fu=null,il=null,Wu=!1;function io(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Wu||mn==null||mn!==ti(n)||(n=mn,"selectionStart"in n&&Ku(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),il&&ll(il,n)||(il=n,n=Fi(Fu,"onSelect"),0<n.length&&(t=new ui("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=mn)))}function Ya(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var pn={animationend:Ya("Animation","AnimationEnd"),animationiteration:Ya("Animation","AnimationIteration"),animationstart:Ya("Animation","AnimationStart"),transitionrun:Ya("Transition","TransitionRun"),transitionstart:Ya("Transition","TransitionStart"),transitioncancel:Ya("Transition","TransitionCancel"),transitionend:Ya("Transition","TransitionEnd")},Iu={},uo={};Jt&&(uo=document.createElement("div").style,"AnimationEvent"in window||(delete pn.animationend.animation,delete pn.animationiteration.animation,delete pn.animationstart.animation),"TransitionEvent"in window||delete pn.transitionend.transition);function Ga(e){if(Iu[e])return Iu[e];if(!pn[e])return e;var t=pn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in uo)return Iu[e]=t[a];return e}var so=Ga("animationend"),ro=Ga("animationiteration"),co=Ga("animationstart"),Cp=Ga("transitionrun"),Ep=Ga("transitionstart"),Np=Ga("transitioncancel"),oo=Ga("transitionend"),fo=new Map,Pu="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(" ");Pu.push("scrollEnd");function Dt(e,t){fo.set(e,t),La(t,[e])}var ci=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)},Nt=[],vn=0,es=0;function oi(){for(var e=vn,t=es=vn=0;t<e;){var a=Nt[t];Nt[t++]=null;var n=Nt[t];Nt[t++]=null;var l=Nt[t];Nt[t++]=null;var s=Nt[t];if(Nt[t++]=null,n!==null&&l!==null){var d=n.pending;d===null?l.next=l:(l.next=d.next,d.next=l),n.pending=l}s!==0&&ho(a,l,s)}}function di(e,t,a,n){Nt[vn++]=e,Nt[vn++]=t,Nt[vn++]=a,Nt[vn++]=n,es|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function ts(e,t,a,n){return di(e,t,a,n),fi(e)}function Va(e,t){return di(e,null,null,t),fi(e)}function ho(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var l=!1,s=e.return;s!==null;)s.childLanes|=a,n=s.alternate,n!==null&&(n.childLanes|=a),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(l=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,l&&t!==null&&(l=31-mt(a),e=s.hiddenUpdates,n=e[l],n===null?e[l]=[t]:n.push(t),t.lane=a|536870912),s):null}function fi(e){if(50<Tl)throw Tl=0,or=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gn={};function wp(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(e,t,a,n){return new wp(e,t,a,n)}function as(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(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 mo(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 hi(e,t,a,n,l,s){var d=0;if(n=e,typeof e=="function")as(e)&&(d=1);else if(typeof e=="string")d=z1(e,a,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=vt(31,a,t,l),e.elementType=X,e.lanes=s,e;case D:return Za(a.children,l,s,t);case G:d=8,l|=24;break;case Z:return e=vt(12,a,t,l|2),e.elementType=Z,e.lanes=s,e;case J:return e=vt(13,a,t,l),e.elementType=J,e.lanes=s,e;case Y:return e=vt(19,a,t,l),e.elementType=Y,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:d=10;break e;case V:d=9;break e;case le:d=11;break e;case C:d=14;break e;case k:d=16,n=null;break e}d=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=vt(d,a,t,l),t.elementType=e,t.type=n,t.lanes=s,t}function Za(e,t,a,n){return e=vt(7,e,n,t),e.lanes=a,e}function ns(e,t,a){return e=vt(6,e,null,t),e.lanes=a,e}function po(e){var t=vt(18,null,null,0);return t.stateNode=e,t}function ls(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 vo=new WeakMap;function wt(e,t){if(typeof e=="object"&&e!==null){var a=vo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:mc(t)},vo.set(e,t),t)}return{value:e,source:t,stack:mc(t)}}var yn=[],bn=0,mi=null,ul=0,Tt=[],_t=0,ma=null,Yt=1,Gt="";function Ft(e,t){yn[bn++]=ul,yn[bn++]=mi,mi=e,ul=t}function go(e,t,a){Tt[_t++]=Yt,Tt[_t++]=Gt,Tt[_t++]=ma,ma=e;var n=Yt;e=Gt;var l=32-mt(n)-1;n&=~(1<<l),a+=1;var s=32-mt(t)+l;if(30<s){var d=l-l%5;s=(n&(1<<d)-1).toString(32),n>>=d,l-=d,Yt=1<<32-mt(t)+l|a<<l|n,Gt=s+e}else Yt=1<<s|a<<l|n,Gt=e}function is(e){e.return!==null&&(Ft(e,1),go(e,1,0))}function us(e){for(;e===mi;)mi=yn[--bn],yn[bn]=null,ul=yn[--bn],yn[bn]=null;for(;e===ma;)ma=Tt[--_t],Tt[_t]=null,Gt=Tt[--_t],Tt[_t]=null,Yt=Tt[--_t],Tt[_t]=null}function yo(e,t){Tt[_t++]=Yt,Tt[_t++]=Gt,Tt[_t++]=ma,Yt=t.id,Gt=t.overflow,ma=e}var Ie=null,Me=null,ge=!1,pa=null,Rt=!1,ss=Error(o(519));function va(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw sl(wt(t,e)),ss}function bo(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[We]=e,t[it]=n,a){case"dialog":fe("cancel",t),fe("close",t);break;case"iframe":case"object":case"embed":fe("load",t);break;case"video":case"audio":for(a=0;a<Rl.length;a++)fe(Rl[a],t);break;case"source":fe("error",t);break;case"img":case"image":case"link":fe("error",t),fe("load",t);break;case"details":fe("toggle",t);break;case"input":fe("invalid",t),zc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":fe("invalid",t);break;case"textarea":fe("invalid",t),Oc(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||Hf(t.textContent,a)?(n.popover!=null&&(fe("beforetoggle",t),fe("toggle",t)),n.onScroll!=null&&fe("scroll",t),n.onScrollEnd!=null&&fe("scrollend",t),n.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||va(e,!0)}function xo(e){for(Ie=e.return;Ie;)switch(Ie.tag){case 5:case 31:case 13:Rt=!1;return;case 27:case 3:Rt=!0;return;default:Ie=Ie.return}}function xn(e){if(e!==Ie)return!1;if(!ge)return xo(e),ge=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Nr(e.type,e.memoizedProps)),a=!a),a&&Me&&va(e),xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Me=Qf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Me=Qf(e)}else t===27?(t=Me,Aa(e.type)?(e=Ar,Ar=null,Me=e):Me=t):Me=Ie?zt(e.stateNode.nextSibling):null;return!0}function Xa(){Me=Ie=null,ge=!1}function rs(){var e=pa;return e!==null&&(ot===null?ot=e:ot.push.apply(ot,e),pa=null),e}function sl(e){pa===null?pa=[e]:pa.push(e)}var cs=N(null),Qa=null,Wt=null;function ga(e,t,a){F(cs,t._currentValue),t._currentValue=a}function It(e){e._currentValue=cs.current,q(cs)}function os(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function ds(e,t,a,n){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var s=l.dependencies;if(s!==null){var d=l.child;s=s.firstContext;e:for(;s!==null;){var m=s;s=l;for(var x=0;x<t.length;x++)if(m.context===t[x]){s.lanes|=a,m=s.alternate,m!==null&&(m.lanes|=a),os(s.return,a,e),n||(d=null);break e}s=m.next}}else if(l.tag===18){if(d=l.return,d===null)throw Error(o(341));d.lanes|=a,s=d.alternate,s!==null&&(s.lanes|=a),os(d,a,e),d=null}else d=l.child;if(d!==null)d.return=l;else for(d=l;d!==null;){if(d===e){d=null;break}if(l=d.sibling,l!==null){l.return=d.return,d=l;break}d=d.return}l=d}}function jn(e,t,a,n){e=null;for(var l=t,s=!1;l!==null;){if(!s){if((l.flags&524288)!==0)s=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var d=l.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var m=l.type;pt(l.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(l===Se.current){if(d=l.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(kl):e=[kl])}l=l.return}e!==null&&ds(t,e,a,n),t.flags|=262144}function pi(e){for(e=e.firstContext;e!==null;){if(!pt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Qa=e,Wt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Pe(e){return jo(Qa,e)}function vi(e,t){return Qa===null&&$a(e),jo(e,t)}function jo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wt===null){if(e===null)throw Error(o(308));Wt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wt=Wt.next=t;return a}var Tp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},_p=i.unstable_scheduleCallback,Rp=i.unstable_NormalPriority,Ge={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fs(){return{controller:new Tp,data:new Map,refCount:0}}function rl(e){e.refCount--,e.refCount===0&&_p(Rp,function(){e.controller.abort()})}var cl=null,hs=0,Sn=0,Cn=null;function Ap(e,t){if(cl===null){var a=cl=[];hs=0,Sn=vr(),Cn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return hs++,t.then(So,So),t}function So(){if(--hs===0&&cl!==null){Cn!==null&&(Cn.status="fulfilled");var e=cl;cl=null,Sn=0,Cn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function zp(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(l){a.push(l)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var l=0;l<a.length;l++)(0,a[l])(t)},function(l){for(n.status="rejected",n.reason=l,l=0;l<a.length;l++)(0,a[l])(void 0)}),n}var Co=H.S;H.S=function(e,t){sf=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ap(e,t),Co!==null&&Co(e,t)};var Ja=N(null);function ms(){var e=Ja.current;return e!==null?e:ze.pooledCache}function gi(e,t){t===null?F(Ja,Ja.current):F(Ja,t.pool)}function Eo(){var e=ms();return e===null?null:{parent:Ge._currentValue,pool:e}}var En=Error(o(460)),ps=Error(o(474)),yi=Error(o(542)),bi={then:function(){}};function No(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then($t,$t),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_o(e),e;default:if(typeof t.status=="string")t.then($t,$t);else{if(e=ze,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=n}},function(n){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,_o(e),e}throw Fa=t,En}}function Ka(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Fa=a,En):a}}var Fa=null;function To(){if(Fa===null)throw Error(o(459));var e=Fa;return Fa=null,e}function _o(e){if(e===En||e===yi)throw Error(o(483))}var Nn=null,ol=0;function xi(e){var t=ol;return ol+=1,Nn===null&&(Nn=[]),wo(Nn,e,t)}function dl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ji(e,t){throw t.$$typeof===w?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ro(e){function t(_,E){if(e){var R=_.deletions;R===null?(_.deletions=[E],_.flags|=16):R.push(E)}}function a(_,E){if(!e)return null;for(;E!==null;)t(_,E),E=E.sibling;return null}function n(_){for(var E=new Map;_!==null;)_.key!==null?E.set(_.key,_):E.set(_.index,_),_=_.sibling;return E}function l(_,E){return _=Kt(_,E),_.index=0,_.sibling=null,_}function s(_,E,R){return _.index=R,e?(R=_.alternate,R!==null?(R=R.index,R<E?(_.flags|=67108866,E):R):(_.flags|=67108866,E)):(_.flags|=1048576,E)}function d(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function m(_,E,R,B){return E===null||E.tag!==6?(E=ns(R,_.mode,B),E.return=_,E):(E=l(E,R),E.return=_,E)}function x(_,E,R,B){var ae=R.type;return ae===D?U(_,E,R.props.children,B,R.key):E!==null&&(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===k&&Ka(ae)===E.type)?(E=l(E,R.props),dl(E,R),E.return=_,E):(E=hi(R.type,R.key,R.props,null,_.mode,B),dl(E,R),E.return=_,E)}function A(_,E,R,B){return E===null||E.tag!==4||E.stateNode.containerInfo!==R.containerInfo||E.stateNode.implementation!==R.implementation?(E=ls(R,_.mode,B),E.return=_,E):(E=l(E,R.children||[]),E.return=_,E)}function U(_,E,R,B,ae){return E===null||E.tag!==7?(E=Za(R,_.mode,B,ae),E.return=_,E):(E=l(E,R),E.return=_,E)}function L(_,E,R){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=ns(""+E,_.mode,R),E.return=_,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case T:return R=hi(E.type,E.key,E.props,null,_.mode,R),dl(R,E),R.return=_,R;case M:return E=ls(E,_.mode,R),E.return=_,E;case k:return E=Ka(E),L(_,E,R)}if(Ye(E)||he(E))return E=Za(E,_.mode,R,null),E.return=_,E;if(typeof E.then=="function")return L(_,xi(E),R);if(E.$$typeof===$)return L(_,vi(_,E),R);ji(_,E)}return null}function z(_,E,R,B){var ae=E!==null?E.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ae!==null?null:m(_,E,""+R,B);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case T:return R.key===ae?x(_,E,R,B):null;case M:return R.key===ae?A(_,E,R,B):null;case k:return R=Ka(R),z(_,E,R,B)}if(Ye(R)||he(R))return ae!==null?null:U(_,E,R,B,null);if(typeof R.then=="function")return z(_,E,xi(R),B);if(R.$$typeof===$)return z(_,E,vi(_,R),B);ji(_,R)}return null}function O(_,E,R,B,ae){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return _=_.get(R)||null,m(E,_,""+B,ae);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case T:return _=_.get(B.key===null?R:B.key)||null,x(E,_,B,ae);case M:return _=_.get(B.key===null?R:B.key)||null,A(E,_,B,ae);case k:return B=Ka(B),O(_,E,R,B,ae)}if(Ye(B)||he(B))return _=_.get(R)||null,U(E,_,B,ae,null);if(typeof B.then=="function")return O(_,E,R,xi(B),ae);if(B.$$typeof===$)return O(_,E,R,vi(E,B),ae);ji(E,B)}return null}function I(_,E,R,B){for(var ae=null,ye=null,ee=E,ce=E=0,pe=null;ee!==null&&ce<R.length;ce++){ee.index>ce?(pe=ee,ee=null):pe=ee.sibling;var be=z(_,ee,R[ce],B);if(be===null){ee===null&&(ee=pe);break}e&&ee&&be.alternate===null&&t(_,ee),E=s(be,E,ce),ye===null?ae=be:ye.sibling=be,ye=be,ee=pe}if(ce===R.length)return a(_,ee),ge&&Ft(_,ce),ae;if(ee===null){for(;ce<R.length;ce++)ee=L(_,R[ce],B),ee!==null&&(E=s(ee,E,ce),ye===null?ae=ee:ye.sibling=ee,ye=ee);return ge&&Ft(_,ce),ae}for(ee=n(ee);ce<R.length;ce++)pe=O(ee,_,ce,R[ce],B),pe!==null&&(e&&pe.alternate!==null&&ee.delete(pe.key===null?ce:pe.key),E=s(pe,E,ce),ye===null?ae=pe:ye.sibling=pe,ye=pe);return e&&ee.forEach(function(Ua){return t(_,Ua)}),ge&&Ft(_,ce),ae}function ne(_,E,R,B){if(R==null)throw Error(o(151));for(var ae=null,ye=null,ee=E,ce=E=0,pe=null,be=R.next();ee!==null&&!be.done;ce++,be=R.next()){ee.index>ce?(pe=ee,ee=null):pe=ee.sibling;var Ua=z(_,ee,be.value,B);if(Ua===null){ee===null&&(ee=pe);break}e&&ee&&Ua.alternate===null&&t(_,ee),E=s(Ua,E,ce),ye===null?ae=Ua:ye.sibling=Ua,ye=Ua,ee=pe}if(be.done)return a(_,ee),ge&&Ft(_,ce),ae;if(ee===null){for(;!be.done;ce++,be=R.next())be=L(_,be.value,B),be!==null&&(E=s(be,E,ce),ye===null?ae=be:ye.sibling=be,ye=be);return ge&&Ft(_,ce),ae}for(ee=n(ee);!be.done;ce++,be=R.next())be=O(ee,_,ce,be.value,B),be!==null&&(e&&be.alternate!==null&&ee.delete(be.key===null?ce:be.key),E=s(be,E,ce),ye===null?ae=be:ye.sibling=be,ye=be);return e&&ee.forEach(function(G1){return t(_,G1)}),ge&&Ft(_,ce),ae}function Re(_,E,R,B){if(typeof R=="object"&&R!==null&&R.type===D&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case T:e:{for(var ae=R.key;E!==null;){if(E.key===ae){if(ae=R.type,ae===D){if(E.tag===7){a(_,E.sibling),B=l(E,R.props.children),B.return=_,_=B;break e}}else if(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===k&&Ka(ae)===E.type){a(_,E.sibling),B=l(E,R.props),dl(B,R),B.return=_,_=B;break e}a(_,E);break}else t(_,E);E=E.sibling}R.type===D?(B=Za(R.props.children,_.mode,B,R.key),B.return=_,_=B):(B=hi(R.type,R.key,R.props,null,_.mode,B),dl(B,R),B.return=_,_=B)}return d(_);case M:e:{for(ae=R.key;E!==null;){if(E.key===ae)if(E.tag===4&&E.stateNode.containerInfo===R.containerInfo&&E.stateNode.implementation===R.implementation){a(_,E.sibling),B=l(E,R.children||[]),B.return=_,_=B;break e}else{a(_,E);break}else t(_,E);E=E.sibling}B=ls(R,_.mode,B),B.return=_,_=B}return d(_);case k:return R=Ka(R),Re(_,E,R,B)}if(Ye(R))return I(_,E,R,B);if(he(R)){if(ae=he(R),typeof ae!="function")throw Error(o(150));return R=ae.call(R),ne(_,E,R,B)}if(typeof R.then=="function")return Re(_,E,xi(R),B);if(R.$$typeof===$)return Re(_,E,vi(_,R),B);ji(_,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,E!==null&&E.tag===6?(a(_,E.sibling),B=l(E,R),B.return=_,_=B):(a(_,E),B=ns(R,_.mode,B),B.return=_,_=B),d(_)):a(_,E)}return function(_,E,R,B){try{ol=0;var ae=Re(_,E,R,B);return Nn=null,ae}catch(ee){if(ee===En||ee===yi)throw ee;var ye=vt(29,ee,null,_.mode);return ye.lanes=B,ye.return=_,ye}finally{}}}var Wa=Ro(!0),Ao=Ro(!1),ya=!1;function vs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gs(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 ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xa(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(je&2)!==0){var l=n.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),n.pending=t,t=fi(e),ho(e,null,a),t}return di(e,n,t,a),fi(e)}function fl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,xc(e,a)}}function ys(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var l=null,s=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};s===null?l=s=d:s=s.next=d,a=a.next}while(a!==null);s===null?l=s=t:s=s.next=t}else l=s=t;a={baseState:n.baseState,firstBaseUpdate:l,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var bs=!1;function hl(){if(bs){var e=Cn;if(e!==null)throw e}}function ml(e,t,a,n){bs=!1;var l=e.updateQueue;ya=!1;var s=l.firstBaseUpdate,d=l.lastBaseUpdate,m=l.shared.pending;if(m!==null){l.shared.pending=null;var x=m,A=x.next;x.next=null,d===null?s=A:d.next=A,d=x;var U=e.alternate;U!==null&&(U=U.updateQueue,m=U.lastBaseUpdate,m!==d&&(m===null?U.firstBaseUpdate=A:m.next=A,U.lastBaseUpdate=x))}if(s!==null){var L=l.baseState;d=0,U=A=x=null,m=s;do{var z=m.lane&-536870913,O=z!==m.lane;if(O?(me&z)===z:(n&z)===z){z!==0&&z===Sn&&(bs=!0),U!==null&&(U=U.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var I=e,ne=m;z=t;var Re=a;switch(ne.tag){case 1:if(I=ne.payload,typeof I=="function"){L=I.call(Re,L,z);break e}L=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=ne.payload,z=typeof I=="function"?I.call(Re,L,z):I,z==null)break e;L=y({},L,z);break e;case 2:ya=!0}}z=m.callback,z!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[z]:O.push(z))}else O={lane:z,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(A=U=O,x=L):U=U.next=O,d|=z;if(m=m.next,m===null){if(m=l.shared.pending,m===null)break;O=m,m=O.next,O.next=null,l.lastBaseUpdate=O,l.shared.pending=null}}while(!0);U===null&&(x=L),l.baseState=x,l.firstBaseUpdate=A,l.lastBaseUpdate=U,s===null&&(l.shared.lanes=0),Na|=d,e.lanes=d,e.memoizedState=L}}function zo(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Mo(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)zo(a[e],t)}var wn=N(null),Si=N(0);function Oo(e,t){e=sa,F(Si,e),F(wn,t),sa=e|t.baseLanes}function xs(){F(Si,sa),F(wn,wn.current)}function js(){sa=Si.current,q(wn),q(Si)}var gt=N(null),At=null;function ja(e){var t=e.alternate;F(Le,Le.current&1),F(gt,e),At===null&&(t===null||wn.current!==null||t.memoizedState!==null)&&(At=e)}function Ss(e){F(Le,Le.current),F(gt,e),At===null&&(At=e)}function ko(e){e.tag===22?(F(Le,Le.current),F(gt,e),At===null&&(At=e)):Sa()}function Sa(){F(Le,Le.current),F(gt,gt.current)}function yt(e){q(gt),At===e&&(At=null),q(Le)}var Le=N(0);function Ci(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||_r(a)||Rr(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 Pt=0,re=null,Te=null,Ve=null,Ei=!1,Tn=!1,Ia=!1,Ni=0,pl=0,_n=null,Mp=0;function De(){throw Error(o(321))}function Cs(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!pt(e[a],t[a]))return!1;return!0}function Es(e,t,a,n,l,s){return Pt=s,re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?gd:Ls,Ia=!1,s=a(n,l),Ia=!1,Tn&&(s=Do(t,a,n,l)),Uo(e),s}function Uo(e){H.H=yl;var t=Te!==null&&Te.next!==null;if(Pt=0,Ve=Te=re=null,Ei=!1,pl=0,_n=null,t)throw Error(o(300));e===null||Ze||(e=e.dependencies,e!==null&&pi(e)&&(Ze=!0))}function Do(e,t,a,n){re=e;var l=0;do{if(Tn&&(_n=null),pl=0,Tn=!1,25<=l)throw Error(o(301));if(l+=1,Ve=Te=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}H.H=yd,s=t(a,n)}while(Tn);return s}function Op(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?vl(t):t,e=e.useState()[0],(Te!==null?Te.memoizedState:null)!==e&&(re.flags|=1024),t}function Ns(){var e=Ni!==0;return Ni=0,e}function ws(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ts(e){if(Ei){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ei=!1}Pt=0,Ve=Te=re=null,Tn=!1,pl=Ni=0,_n=null}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?re.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function qe(){if(Te===null){var e=re.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=Ve===null?re.memoizedState:Ve.next;if(t!==null)Ve=t,Te=e;else{if(e===null)throw re.alternate===null?Error(o(467)):Error(o(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},Ve===null?re.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vl(e){var t=pl;return pl+=1,_n===null&&(_n=[]),e=wo(_n,e,t),t=re,(Ve===null?t.memoizedState:Ve.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?gd:Ls),e}function Ti(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return vl(e);if(e.$$typeof===$)return Pe(e)}throw Error(o(438,String(e)))}function _s(e){var t=null,a=re.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=re.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=wi(),re.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=ve;return t.index++,a}function ea(e,t){return typeof t=="function"?t(e):t}function _i(e){var t=qe();return Rs(t,Te,e)}function Rs(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var l=e.baseQueue,s=n.pending;if(s!==null){if(l!==null){var d=l.next;l.next=s.next,s.next=d}t.baseQueue=l=s,n.pending=null}if(s=e.baseState,l===null)e.memoizedState=s;else{t=l.next;var m=d=null,x=null,A=t,U=!1;do{var L=A.lane&-536870913;if(L!==A.lane?(me&L)===L:(Pt&L)===L){var z=A.revertLane;if(z===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),L===Sn&&(U=!0);else if((Pt&z)===z){A=A.next,z===Sn&&(U=!0);continue}else L={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},x===null?(m=x=L,d=s):x=x.next=L,re.lanes|=z,Na|=z;L=A.action,Ia&&a(s,L),s=A.hasEagerState?A.eagerState:a(s,L)}else z={lane:L,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},x===null?(m=x=z,d=s):x=x.next=z,re.lanes|=L,Na|=L;A=A.next}while(A!==null&&A!==t);if(x===null?d=s:x.next=m,!pt(s,e.memoizedState)&&(Ze=!0,U&&(a=Cn,a!==null)))throw a;e.memoizedState=s,e.baseState=d,e.baseQueue=x,n.lastRenderedState=s}return l===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function As(e){var t=qe(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,l=a.pending,s=t.memoizedState;if(l!==null){a.pending=null;var d=l=l.next;do s=e(s,d.action),d=d.next;while(d!==l);pt(s,t.memoizedState)||(Ze=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),a.lastRenderedState=s}return[s,n]}function Ho(e,t,a){var n=re,l=qe(),s=ge;if(s){if(a===void 0)throw Error(o(407));a=a()}else a=t();var d=!pt((Te||l).memoizedState,a);if(d&&(l.memoizedState=a,Ze=!0),l=l.queue,Os(qo.bind(null,n,l,e),[e]),l.getSnapshot!==t||d||Ve!==null&&Ve.memoizedState.tag&1){if(n.flags|=2048,Rn(9,{destroy:void 0},Lo.bind(null,n,l,a,t),null),ze===null)throw Error(o(349));s||(Pt&127)!==0||Bo(n,t,a)}return a}function Bo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=re.updateQueue,t===null?(t=wi(),re.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Lo(e,t,a,n){t.value=a,t.getSnapshot=n,Yo(t)&&Go(e)}function qo(e,t,a){return a(function(){Yo(t)&&Go(e)})}function Yo(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!pt(e,a)}catch{return!0}}function Go(e){var t=Va(e,2);t!==null&&dt(t,e,2)}function zs(e){var t=lt();if(typeof e=="function"){var a=e;if(e=a(),Ia){da(!0);try{a()}finally{da(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:e},t}function Vo(e,t,a,n){return e.baseState=a,Rs(e,Te,typeof n=="function"?n:ea)}function kp(e,t,a,n,l){if(zi(e))throw Error(o(485));if(e=t.action,e!==null){var s={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){s.listeners.push(d)}};H.T!==null?a(!0):s.isTransition=!1,n(s),a=t.pending,a===null?(s.next=t.pending=s,Zo(t,s)):(s.next=a.next,t.pending=a.next=s)}}function Zo(e,t){var a=t.action,n=t.payload,l=e.state;if(t.isTransition){var s=H.T,d={};H.T=d;try{var m=a(l,n),x=H.S;x!==null&&x(d,m),Xo(e,t,m)}catch(A){Ms(e,t,A)}finally{s!==null&&d.types!==null&&(s.types=d.types),H.T=s}}else try{s=a(l,n),Xo(e,t,s)}catch(A){Ms(e,t,A)}}function Xo(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){Qo(e,t,n)},function(n){return Ms(e,t,n)}):Qo(e,t,a)}function Qo(e,t,a){t.status="fulfilled",t.value=a,$o(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Zo(e,a)))}function Ms(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,$o(t),t=t.next;while(t!==n)}e.action=null}function $o(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Jo(e,t){return t}function Ko(e,t){if(ge){var a=ze.formState;if(a!==null){e:{var n=re;if(ge){if(Me){t:{for(var l=Me,s=Rt;l.nodeType!==8;){if(!s){l=null;break t}if(l=zt(l.nextSibling),l===null){l=null;break t}}s=l.data,l=s==="F!"||s==="F"?l:null}if(l){Me=zt(l.nextSibling),n=l.data==="F!";break e}}va(n)}n=!1}n&&(t=a[0])}}return a=lt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:t},a.queue=n,a=md.bind(null,re,n),n.dispatch=a,n=zs(!1),s=Bs.bind(null,re,!1,n.queue),n=lt(),l={state:t,dispatch:null,action:e,pending:null},n.queue=l,a=kp.bind(null,re,l,s,a),l.dispatch=a,n.memoizedState=e,[t,a,!1]}function Fo(e){var t=qe();return Wo(t,Te,e)}function Wo(e,t,a){if(t=Rs(e,t,Jo)[0],e=_i(ea)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=vl(t)}catch(d){throw d===En?yi:d}else n=t;t=qe();var l=t.queue,s=l.dispatch;return a!==t.memoizedState&&(re.flags|=2048,Rn(9,{destroy:void 0},Up.bind(null,l,a),null)),[n,s,e]}function Up(e,t){e.action=t}function Io(e){var t=qe(),a=Te;if(a!==null)return Wo(t,a,e);qe(),t=t.memoizedState,a=qe();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Rn(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=re.updateQueue,t===null&&(t=wi(),re.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Po(){return qe().memoizedState}function Ri(e,t,a,n){var l=lt();re.flags|=e,l.memoizedState=Rn(1|t,{destroy:void 0},a,n===void 0?null:n)}function Ai(e,t,a,n){var l=qe();n=n===void 0?null:n;var s=l.memoizedState.inst;Te!==null&&n!==null&&Cs(n,Te.memoizedState.deps)?l.memoizedState=Rn(t,s,a,n):(re.flags|=e,l.memoizedState=Rn(1|t,s,a,n))}function ed(e,t){Ri(8390656,8,e,t)}function Os(e,t){Ai(2048,8,e,t)}function Dp(e){re.flags|=4;var t=re.updateQueue;if(t===null)t=wi(),re.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function td(e){var t=qe().memoizedState;return Dp({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function ad(e,t){return Ai(4,2,e,t)}function nd(e,t){return Ai(4,4,e,t)}function ld(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 id(e,t,a){a=a!=null?a.concat([e]):null,Ai(4,4,ld.bind(null,t,e),a)}function ks(){}function ud(e,t){var a=qe();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Cs(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function sd(e,t){var a=qe();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Cs(t,n[1]))return n[0];if(n=e(),Ia){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[n,t],n}function Us(e,t,a){return a===void 0||(Pt&1073741824)!==0&&(me&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=cf(),re.lanes|=e,Na|=e,a)}function rd(e,t,a,n){return pt(a,t)?a:wn.current!==null?(e=Us(e,a,n),pt(e,t)||(Ze=!0),e):(Pt&42)===0||(Pt&1073741824)!==0&&(me&261930)===0?(Ze=!0,e.memoizedState=a):(e=cf(),re.lanes|=e,Na|=e,t)}function cd(e,t,a,n,l){var s=K.p;K.p=s!==0&&8>s?s:8;var d=H.T,m={};H.T=m,Bs(e,!1,t,a);try{var x=l(),A=H.S;if(A!==null&&A(m,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var U=zp(x,n);gl(e,t,U,jt(e))}else gl(e,t,n,jt(e))}catch(L){gl(e,t,{then:function(){},status:"rejected",reason:L},jt())}finally{K.p=s,d!==null&&m.types!==null&&(d.types=m.types),H.T=d}}function Hp(){}function Ds(e,t,a,n){if(e.tag!==5)throw Error(o(476));var l=od(e).queue;cd(e,l,t,ie,a===null?Hp:function(){return dd(e),a(n)})}function od(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:ie},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function dd(e){var t=od(e);t.next===null&&(t=e.alternate.memoizedState),gl(e,t.next.queue,{},jt())}function Hs(){return Pe(kl)}function fd(){return qe().memoizedState}function hd(){return qe().memoizedState}function Bp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=jt();e=ba(a);var n=xa(t,e,a);n!==null&&(dt(n,t,a),fl(n,t,a)),t={cache:fs()},e.payload=t;return}t=t.return}}function Lp(e,t,a){var n=jt();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},zi(e)?pd(t,a):(a=ts(e,t,a,n),a!==null&&(dt(a,e,n),vd(a,t,n)))}function md(e,t,a){var n=jt();gl(e,t,a,n)}function gl(e,t,a,n){var l={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(zi(e))pd(t,l);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var d=t.lastRenderedState,m=s(d,a);if(l.hasEagerState=!0,l.eagerState=m,pt(m,d))return di(e,t,l,0),ze===null&&oi(),!1}catch{}finally{}if(a=ts(e,t,l,n),a!==null)return dt(a,e,n),vd(a,t,n),!0}return!1}function Bs(e,t,a,n){if(n={lane:2,revertLane:vr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zi(e)){if(t)throw Error(o(479))}else t=ts(e,a,n,2),t!==null&&dt(t,e,2)}function zi(e){var t=e.alternate;return e===re||t!==null&&t===re}function pd(e,t){Tn=Ei=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function vd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,xc(e,a)}}var yl={readContext:Pe,use:Ti,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};yl.useEffectEvent=De;var gd={readContext:Pe,use:Ti,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Pe,useEffect:ed,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ri(4194308,4,ld.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ri(4194308,4,e,t)},useInsertionEffect:function(e,t){Ri(4,2,e,t)},useMemo:function(e,t){var a=lt();t=t===void 0?null:t;var n=e();if(Ia){da(!0);try{e()}finally{da(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=lt();if(a!==void 0){var l=a(t);if(Ia){da(!0);try{a(t)}finally{da(!1)}}}else l=t;return n.memoizedState=n.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},n.queue=e,e=e.dispatch=Lp.bind(null,re,e),[n.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=zs(e);var t=e.queue,a=md.bind(null,re,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ks,useDeferredValue:function(e,t){var a=lt();return Us(a,e,t)},useTransition:function(){var e=zs(!1);return e=cd.bind(null,re,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=re,l=lt();if(ge){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),ze===null)throw Error(o(349));(me&127)!==0||Bo(n,t,a)}l.memoizedState=a;var s={value:a,getSnapshot:t};return l.queue=s,ed(qo.bind(null,n,s,e),[e]),n.flags|=2048,Rn(9,{destroy:void 0},Lo.bind(null,n,s,a,t),null),a},useId:function(){var e=lt(),t=ze.identifierPrefix;if(ge){var a=Gt,n=Yt;a=(n&~(1<<32-mt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ni++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Mp++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Hs,useFormState:Ko,useActionState:Ko,useOptimistic:function(e){var t=lt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Bs.bind(null,re,!0,a),a.dispatch=t,[e,t]},useMemoCache:_s,useCacheRefresh:function(){return lt().memoizedState=Bp.bind(null,re)},useEffectEvent:function(e){var t=lt(),a={impl:e};return t.memoizedState=a,function(){if((je&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Ls={readContext:Pe,use:Ti,useCallback:ud,useContext:Pe,useEffect:Os,useImperativeHandle:id,useInsertionEffect:ad,useLayoutEffect:nd,useMemo:sd,useReducer:_i,useRef:Po,useState:function(){return _i(ea)},useDebugValue:ks,useDeferredValue:function(e,t){var a=qe();return rd(a,Te.memoizedState,e,t)},useTransition:function(){var e=_i(ea)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Ho,useId:fd,useHostTransitionStatus:Hs,useFormState:Fo,useActionState:Fo,useOptimistic:function(e,t){var a=qe();return Vo(a,Te,e,t)},useMemoCache:_s,useCacheRefresh:hd};Ls.useEffectEvent=td;var yd={readContext:Pe,use:Ti,useCallback:ud,useContext:Pe,useEffect:Os,useImperativeHandle:id,useInsertionEffect:ad,useLayoutEffect:nd,useMemo:sd,useReducer:As,useRef:Po,useState:function(){return As(ea)},useDebugValue:ks,useDeferredValue:function(e,t){var a=qe();return Te===null?Us(a,e,t):rd(a,Te.memoizedState,e,t)},useTransition:function(){var e=As(ea)[0],t=qe().memoizedState;return[typeof e=="boolean"?e:vl(e),t]},useSyncExternalStore:Ho,useId:fd,useHostTransitionStatus:Hs,useFormState:Io,useActionState:Io,useOptimistic:function(e,t){var a=qe();return Te!==null?Vo(a,Te,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:_s,useCacheRefresh:hd};yd.useEffectEvent=td;function qs(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ys={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=jt(),l=ba(n);l.payload=t,a!=null&&(l.callback=a),t=xa(e,l,n),t!==null&&(dt(t,e,n),fl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=jt(),l=ba(n);l.tag=1,l.payload=t,a!=null&&(l.callback=a),t=xa(e,l,n),t!==null&&(dt(t,e,n),fl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=jt(),n=ba(a);n.tag=2,t!=null&&(n.callback=t),t=xa(e,n,a),t!==null&&(dt(t,e,a),fl(t,e,a))}};function bd(e,t,a,n,l,s,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,d):t.prototype&&t.prototype.isPureReactComponent?!ll(a,n)||!ll(l,s):!0}function xd(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&Ys.enqueueReplaceState(t,t.state,null)}function Pa(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var l in e)a[l]===void 0&&(a[l]=e[l])}return a}function jd(e){ci(e)}function Sd(e){console.error(e)}function Cd(e){ci(e)}function Mi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Ed(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Gs(e,t,a){return a=ba(a),a.tag=3,a.payload={element:null},a.callback=function(){Mi(e,t)},a}function Nd(e){return e=ba(e),e.tag=3,e}function wd(e,t,a,n){var l=a.type.getDerivedStateFromError;if(typeof l=="function"){var s=n.value;e.payload=function(){return l(s)},e.callback=function(){Ed(t,a,n)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Ed(t,a,n),typeof l!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})})}function qp(e,t,a,n,l){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&jn(t,a,l,!0),a=gt.current,a!==null){switch(a.tag){case 31:case 13:return At===null?Zi():a.alternate===null&&He===0&&(He=3),a.flags&=-257,a.flags|=65536,a.lanes=l,n===bi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),hr(e,n,l)),!1;case 22:return a.flags|=65536,n===bi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),hr(e,n,l)),!1}throw Error(o(435,a.tag))}return hr(e,n,l),Zi(),!1}if(ge)return t=gt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,n!==ss&&(e=Error(o(422),{cause:n}),sl(wt(e,a)))):(n!==ss&&(t=Error(o(423),{cause:n}),sl(wt(t,a))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,n=wt(n,a),l=Gs(e.stateNode,n,l),ys(e,l),He!==4&&(He=2)),!1;var s=Error(o(520),{cause:n});if(s=wt(s,a),wl===null?wl=[s]:wl.push(s),He!==4&&(He=2),t===null)return!0;n=wt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=l&-l,a.lanes|=e,e=Gs(a.stateNode,n,e),ys(a,e),!1;case 1:if(t=a.type,s=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(wa===null||!wa.has(s))))return a.flags|=65536,l&=-l,a.lanes|=l,l=Nd(l),wd(l,e,a,n),ys(a,l),!1}a=a.return}while(a!==null);return!1}var Vs=Error(o(461)),Ze=!1;function et(e,t,a,n){t.child=e===null?Ao(t,null,a,n):Wa(t,e.child,a,n)}function Td(e,t,a,n,l){a=a.render;var s=t.ref;if("ref"in n){var d={};for(var m in n)m!=="ref"&&(d[m]=n[m])}else d=n;return $a(t),n=Es(e,t,a,d,s,l),m=Ns(),e!==null&&!Ze?(ws(e,t,l),ta(e,t,l)):(ge&&m&&is(t),t.flags|=1,et(e,t,n,l),t.child)}function _d(e,t,a,n,l){if(e===null){var s=a.type;return typeof s=="function"&&!as(s)&&s.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=s,Rd(e,t,s,n,l)):(e=hi(a.type,null,n,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Ws(e,l)){var d=s.memoizedProps;if(a=a.compare,a=a!==null?a:ll,a(d,n)&&e.ref===t.ref)return ta(e,t,l)}return t.flags|=1,e=Kt(s,n),e.ref=t.ref,e.return=t,t.child=e}function Rd(e,t,a,n,l){if(e!==null){var s=e.memoizedProps;if(ll(s,n)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=n=s,Ws(e,l))(e.flags&131072)!==0&&(Ze=!0);else return t.lanes=e.lanes,ta(e,t,l)}return Zs(e,t,a,n,l)}function Ad(e,t,a,n){var l=n.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|a:a,e!==null){for(n=t.child=e.child,l=0;n!==null;)l=l|n.lanes|n.childLanes,n=n.sibling;n=l&~s}else n=0,t.child=null;return zd(e,t,s,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&gi(t,s!==null?s.cachePool:null),s!==null?Oo(t,s):xs(),ko(t);else return n=t.lanes=536870912,zd(e,t,s!==null?s.baseLanes|a:a,a,n)}else s!==null?(gi(t,s.cachePool),Oo(t,s),Sa(),t.memoizedState=null):(e!==null&&gi(t,null),xs(),Sa());return et(e,t,l,a),t.child}function bl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zd(e,t,a,n,l){var s=ms();return s=s===null?null:{parent:Ge._currentValue,pool:s},t.memoizedState={baseLanes:a,cachePool:s},e!==null&&gi(t,null),xs(),ko(t),e!==null&&jn(e,t,n,!0),t.childLanes=l,null}function Oi(e,t){return t=Ui({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Md(e,t,a){return Wa(t,e.child,null,a),e=Oi(t,t.pendingProps),e.flags|=2,yt(t),t.memoizedState=null,e}function Yp(e,t,a){var n=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ge){if(n.mode==="hidden")return e=Oi(t,n),t.lanes=536870912,bl(null,e);if(Ss(t),(e=Me)?(e=Xf(e,Rt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Yt,overflow:Gt}:null,retryLane:536870912,hydrationErrors:null},a=po(e),a.return=t,t.child=a,Ie=t,Me=null)):e=null,e===null)throw va(t);return t.lanes=536870912,null}return Oi(t,n)}var s=e.memoizedState;if(s!==null){var d=s.dehydrated;if(Ss(t),l)if(t.flags&256)t.flags&=-257,t=Md(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ze||jn(e,t,a,!1),l=(a&e.childLanes)!==0,Ze||l){if(n=ze,n!==null&&(d=jc(n,a),d!==0&&d!==s.retryLane))throw s.retryLane=d,Va(e,d),dt(n,e,d),Vs;Zi(),t=Md(e,t,a)}else e=s.treeContext,Me=zt(d.nextSibling),Ie=t,ge=!0,pa=null,Rt=!1,e!==null&&yo(t,e),t=Oi(t,n),t.flags|=4096;return t}return e=Kt(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ki(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Zs(e,t,a,n,l){return $a(t),a=Es(e,t,a,n,void 0,l),n=Ns(),e!==null&&!Ze?(ws(e,t,l),ta(e,t,l)):(ge&&n&&is(t),t.flags|=1,et(e,t,a,l),t.child)}function Od(e,t,a,n,l,s){return $a(t),t.updateQueue=null,a=Do(t,n,a,l),Uo(e),n=Ns(),e!==null&&!Ze?(ws(e,t,s),ta(e,t,s)):(ge&&n&&is(t),t.flags|=1,et(e,t,a,s),t.child)}function kd(e,t,a,n,l){if($a(t),t.stateNode===null){var s=gn,d=a.contextType;typeof d=="object"&&d!==null&&(s=Pe(d)),s=new a(n,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Ys,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=n,s.state=t.memoizedState,s.refs={},vs(t),d=a.contextType,s.context=typeof d=="object"&&d!==null?Pe(d):gn,s.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(qs(t,a,d,n),s.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(d=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),d!==s.state&&Ys.enqueueReplaceState(s,s.state,null),ml(t,n,s,l),hl(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){s=t.stateNode;var m=t.memoizedProps,x=Pa(a,m);s.props=x;var A=s.context,U=a.contextType;d=gn,typeof U=="object"&&U!==null&&(d=Pe(U));var L=a.getDerivedStateFromProps;U=typeof L=="function"||typeof s.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,U||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(m||A!==d)&&xd(t,s,n,d),ya=!1;var z=t.memoizedState;s.state=z,ml(t,n,s,l),hl(),A=t.memoizedState,m||z!==A||ya?(typeof L=="function"&&(qs(t,a,L,n),A=t.memoizedState),(x=ya||bd(t,a,x,n,z,A,d))?(U||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=A),s.props=n,s.state=A,s.context=d,n=x):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,gs(e,t),d=t.memoizedProps,U=Pa(a,d),s.props=U,L=t.pendingProps,z=s.context,A=a.contextType,x=gn,typeof A=="object"&&A!==null&&(x=Pe(A)),m=a.getDerivedStateFromProps,(A=typeof m=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d!==L||z!==x)&&xd(t,s,n,x),ya=!1,z=t.memoizedState,s.state=z,ml(t,n,s,l),hl();var O=t.memoizedState;d!==L||z!==O||ya||e!==null&&e.dependencies!==null&&pi(e.dependencies)?(typeof m=="function"&&(qs(t,a,m,n),O=t.memoizedState),(U=ya||bd(t,a,U,n,z,O,x)||e!==null&&e.dependencies!==null&&pi(e.dependencies))?(A||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,O,x),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,O,x)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=O),s.props=n,s.state=O,s.context=x,n=U):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),n=!1)}return s=n,ki(e,t),n=(t.flags&128)!==0,s||n?(s=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&n?(t.child=Wa(t,e.child,null,l),t.child=Wa(t,null,a,l)):et(e,t,a,l),t.memoizedState=s.state,e=t.child):e=ta(e,t,l),e}function Ud(e,t,a,n){return Xa(),t.flags|=256,et(e,t,a,n),t.child}var Xs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qs(e){return{baseLanes:e,cachePool:Eo()}}function $s(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=xt),e}function Dd(e,t,a){var n=t.pendingProps,l=!1,s=(t.flags&128)!==0,d;if((d=s)||(d=e!==null&&e.memoizedState===null?!1:(Le.current&2)!==0),d&&(l=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(ge){if(l?ja(t):Sa(),(e=Me)?(e=Xf(e,Rt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ma!==null?{id:Yt,overflow:Gt}:null,retryLane:536870912,hydrationErrors:null},a=po(e),a.return=t,t.child=a,Ie=t,Me=null)):e=null,e===null)throw va(t);return Rr(e)?t.lanes=32:t.lanes=536870912,null}var m=n.children;return n=n.fallback,l?(Sa(),l=t.mode,m=Ui({mode:"hidden",children:m},l),n=Za(n,l,a,null),m.return=t,n.return=t,m.sibling=n,t.child=m,n=t.child,n.memoizedState=Qs(a),n.childLanes=$s(e,d,a),t.memoizedState=Xs,bl(null,n)):(ja(t),Js(t,m))}var x=e.memoizedState;if(x!==null&&(m=x.dehydrated,m!==null)){if(s)t.flags&256?(ja(t),t.flags&=-257,t=Ks(e,t,a)):t.memoizedState!==null?(Sa(),t.child=e.child,t.flags|=128,t=null):(Sa(),m=n.fallback,l=t.mode,n=Ui({mode:"visible",children:n.children},l),m=Za(m,l,a,null),m.flags|=2,n.return=t,m.return=t,n.sibling=m,t.child=n,Wa(t,e.child,null,a),n=t.child,n.memoizedState=Qs(a),n.childLanes=$s(e,d,a),t.memoizedState=Xs,t=bl(null,n));else if(ja(t),Rr(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var A=d.dgst;d=A,n=Error(o(419)),n.stack="",n.digest=d,sl({value:n,source:null,stack:null}),t=Ks(e,t,a)}else if(Ze||jn(e,t,a,!1),d=(a&e.childLanes)!==0,Ze||d){if(d=ze,d!==null&&(n=jc(d,a),n!==0&&n!==x.retryLane))throw x.retryLane=n,Va(e,n),dt(d,e,n),Vs;_r(m)||Zi(),t=Ks(e,t,a)}else _r(m)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,Me=zt(m.nextSibling),Ie=t,ge=!0,pa=null,Rt=!1,e!==null&&yo(t,e),t=Js(t,n.children),t.flags|=4096);return t}return l?(Sa(),m=n.fallback,l=t.mode,x=e.child,A=x.sibling,n=Kt(x,{mode:"hidden",children:n.children}),n.subtreeFlags=x.subtreeFlags&65011712,A!==null?m=Kt(A,m):(m=Za(m,l,a,null),m.flags|=2),m.return=t,n.return=t,n.sibling=m,t.child=n,bl(null,n),n=t.child,m=e.child.memoizedState,m===null?m=Qs(a):(l=m.cachePool,l!==null?(x=Ge._currentValue,l=l.parent!==x?{parent:x,pool:x}:l):l=Eo(),m={baseLanes:m.baseLanes|a,cachePool:l}),n.memoizedState=m,n.childLanes=$s(e,d,a),t.memoizedState=Xs,bl(e.child,n)):(ja(t),a=e.child,e=a.sibling,a=Kt(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=a,t.memoizedState=null,a)}function Js(e,t){return t=Ui({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ui(e,t){return e=vt(22,e,null,t),e.lanes=0,e}function Ks(e,t,a){return Wa(t,e.child,null,a),e=Js(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Hd(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),os(e.return,t,a)}function Fs(e,t,a,n,l,s){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:l,treeForkCount:s}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=a,d.tailMode=l,d.treeForkCount=s)}function Bd(e,t,a){var n=t.pendingProps,l=n.revealOrder,s=n.tail;n=n.children;var d=Le.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,F(Le,d),et(e,t,n,a),n=ge?ul:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hd(e,a,t);else if(e.tag===19)Hd(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(l){case"forwards":for(a=t.child,l=null;a!==null;)e=a.alternate,e!==null&&Ci(e)===null&&(l=a),a=a.sibling;a=l,a===null?(l=t.child,t.child=null):(l=a.sibling,a.sibling=null),Fs(t,!1,l,a,s,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ci(e)===null){t.child=l;break}e=l.sibling,l.sibling=a,a=l,l=e}Fs(t,!0,a,null,s,n);break;case"together":Fs(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function ta(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Na|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(jn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Kt(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kt(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ws(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pi(e)))}function Gp(e,t,a){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),ga(t,Ge,e.memoizedState.cache),Xa();break;case 27:case 5:Xn(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ss(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(ja(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Dd(e,t,a):(ja(t),e=ta(e,t,a),e!==null?e.sibling:null);ja(t);break;case 19:var l=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(jn(e,t,a,!1),n=(a&t.childLanes)!==0),l){if(n)return Bd(e,t,a);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),F(Le,Le.current),n)break;return null;case 22:return t.lanes=0,Ad(e,t,a,t.pendingProps);case 24:ga(t,Ge,e.memoizedState.cache)}return ta(e,t,a)}function Ld(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ze=!0;else{if(!Ws(e,a)&&(t.flags&128)===0)return Ze=!1,Gp(e,t,a);Ze=(e.flags&131072)!==0}else Ze=!1,ge&&(t.flags&1048576)!==0&&go(t,ul,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=Ka(t.elementType),t.type=e,typeof e=="function")as(e)?(n=Pa(e,n),t.tag=1,t=kd(null,t,e,n,a)):(t.tag=0,t=Zs(null,t,e,n,a));else{if(e!=null){var l=e.$$typeof;if(l===le){t.tag=11,t=Td(null,t,e,n,a);break e}else if(l===C){t.tag=14,t=_d(null,t,e,n,a);break e}}throw t=St(e)||e,Error(o(306,t,""))}}return t;case 0:return Zs(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,l=Pa(n,t.pendingProps),kd(e,t,n,l,a);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var s=t.memoizedState;l=s.element,gs(e,t),ml(t,n,null,a);var d=t.memoizedState;if(n=d.cache,ga(t,Ge,n),n!==s.cache&&ds(t,[Ge],a,!0),hl(),n=d.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Ud(e,t,n,a);break e}else if(n!==l){l=wt(Error(o(424)),t),sl(l),t=Ud(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Me=zt(e.firstChild),Ie=t,ge=!0,pa=null,Rt=!0,a=Ao(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Xa(),n===l){t=ta(e,t,a);break e}et(e,t,n,a)}t=t.child}return t;case 26:return ki(e,t),e===null?(a=Wf(t.type,null,t.pendingProps,null))?t.memoizedState=a:ge||(a=t.type,e=t.pendingProps,n=Wi(oe.current).createElement(a),n[We]=t,n[it]=e,tt(n,a,e),Ke(n),t.stateNode=n):t.memoizedState=Wf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xn(t),e===null&&ge&&(n=t.stateNode=Jf(t.type,t.pendingProps,oe.current),Ie=t,Rt=!0,l=Me,Aa(t.type)?(Ar=l,Me=zt(n.firstChild)):Me=l),et(e,t,t.pendingProps.children,a),ki(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ge&&((l=n=Me)&&(n=y1(n,t.type,t.pendingProps,Rt),n!==null?(t.stateNode=n,Ie=t,Me=zt(n.firstChild),Rt=!1,l=!0):l=!1),l||va(t)),Xn(t),l=t.type,s=t.pendingProps,d=e!==null?e.memoizedProps:null,n=s.children,Nr(l,s)?n=null:d!==null&&Nr(l,d)&&(t.flags|=32),t.memoizedState!==null&&(l=Es(e,t,Op,null,null,a),kl._currentValue=l),ki(e,t),et(e,t,n,a),t.child;case 6:return e===null&&ge&&((e=a=Me)&&(a=b1(a,t.pendingProps,Rt),a!==null?(t.stateNode=a,Ie=t,Me=null,e=!0):e=!1),e||va(t)),null;case 13:return Dd(e,t,a);case 4:return nt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Wa(t,null,n,a):et(e,t,n,a),t.child;case 11:return Td(e,t,t.type,t.pendingProps,a);case 7:return et(e,t,t.pendingProps,a),t.child;case 8:return et(e,t,t.pendingProps.children,a),t.child;case 12:return et(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,ga(t,t.type,n.value),et(e,t,n.children,a),t.child;case 9:return l=t.type._context,n=t.pendingProps.children,$a(t),l=Pe(l),n=n(l),t.flags|=1,et(e,t,n,a),t.child;case 14:return _d(e,t,t.type,t.pendingProps,a);case 15:return Rd(e,t,t.type,t.pendingProps,a);case 19:return Bd(e,t,a);case 31:return Yp(e,t,a);case 22:return Ad(e,t,a,t.pendingProps);case 24:return $a(t),n=Pe(Ge),e===null?(l=ms(),l===null&&(l=ze,s=fs(),l.pooledCache=s,s.refCount++,s!==null&&(l.pooledCacheLanes|=a),l=s),t.memoizedState={parent:n,cache:l},vs(t),ga(t,Ge,l)):((e.lanes&a)!==0&&(gs(e,t),ml(t,null,null,a),hl()),l=e.memoizedState,s=t.memoizedState,l.parent!==n?(l={parent:n,cache:n},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),ga(t,Ge,n)):(n=s.cache,ga(t,Ge,n),n!==l.cache&&ds(t,[Ge],a,!0))),et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function aa(e){e.flags|=4}function Is(e,t,a,n,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(hf())e.flags|=8192;else throw Fa=bi,ps}else e.flags&=-16777217}function qd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ah(t))if(hf())e.flags|=8192;else throw Fa=bi,ps}function Di(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yc():536870912,e.lanes|=t,On|=t)}function xl(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var l=e.child;l!==null;)a|=l.lanes|l.childLanes,n|=l.subtreeFlags&65011712,n|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)a|=l.lanes|l.childLanes,n|=l.subtreeFlags,n|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Vp(e,t,a){var n=t.pendingProps;switch(us(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Oe(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),It(Ge),Be(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(xn(t)?aa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rs())),Oe(t),null;case 26:var l=t.type,s=t.memoizedState;return e===null?(aa(t),s!==null?(Oe(t),qd(t,s)):(Oe(t),Is(t,l,null,n,a))):s?s!==e.memoizedState?(aa(t),Oe(t),qd(t,s)):(Oe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&aa(t),Oe(t),Is(t,l,e,n,a)),null;case 27:if($l(t),a=oe.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Oe(t),null}e=P.current,xn(t)?bo(t):(e=Jf(l,n,a),t.stateNode=e,aa(t))}return Oe(t),null;case 5:if($l(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Oe(t),null}if(s=P.current,xn(t))bo(t);else{var d=Wi(oe.current);switch(s){case 1:s=d.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:s=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":s=d.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":s=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":s=d.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?s.multiple=!0:n.size&&(s.size=n.size);break;default:s=typeof n.is=="string"?d.createElement(l,{is:n.is}):d.createElement(l)}}s[We]=t,s[it]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)s.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=s;e:switch(tt(s,l,n),l){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&aa(t)}}return Oe(t),Is(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&aa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=oe.current,xn(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,l=Ie,l!==null)switch(l.tag){case 27:case 5:n=l.memoizedProps}e[We]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||Hf(e.nodeValue,a)),e||va(t,!0)}else e=Wi(e).createTextNode(n),e[We]=t,t.stateNode=e}return Oe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=xn(t),a!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[We]=t}else Xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),e=!1}else a=rs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(yt(t),t):(yt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Oe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=xn(t),n!==null&&n.dehydrated!==null){if(e===null){if(!l)throw Error(o(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));l[We]=t}else Xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),l=!1}else l=rs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(yt(t),t):(yt(t),null)}return yt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,l=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(l=n.alternate.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==l&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Di(t,t.updateQueue),Oe(t),null);case 4:return Be(),e===null&&xr(t.stateNode.containerInfo),Oe(t),null;case 10:return It(t.type),Oe(t),null;case 19:if(q(Le),n=t.memoizedState,n===null)return Oe(t),null;if(l=(t.flags&128)!==0,s=n.rendering,s===null)if(l)xl(n,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Ci(e),s!==null){for(t.flags|=128,xl(n,!1),e=s.updateQueue,t.updateQueue=e,Di(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)mo(a,e),a=a.sibling;return F(Le,Le.current&1|2),ge&&Ft(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&ft()>Yi&&(t.flags|=128,l=!0,xl(n,!1),t.lanes=4194304)}else{if(!l)if(e=Ci(s),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Di(t,e),xl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!s.alternate&&!ge)return Oe(t),null}else 2*ft()-n.renderingStartTime>Yi&&a!==536870912&&(t.flags|=128,l=!0,xl(n,!1),t.lanes=4194304);n.isBackwards?(s.sibling=t.child,t.child=s):(e=n.last,e!==null?e.sibling=s:t.child=s,n.last=s)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=ft(),e.sibling=null,a=Le.current,F(Le,l?a&1|2:a&1),ge&&Ft(t,n.treeForkCount),e):(Oe(t),null);case 22:case 23:return yt(t),js(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),a=t.updateQueue,a!==null&&Di(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&q(Ja),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),It(Ge),Oe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Zp(e,t){switch(us(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return It(Ge),Be(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $l(t),null;case 31:if(t.memoizedState!==null){if(yt(t),t.alternate===null)throw Error(o(340));Xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(yt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(Le),null;case 4:return Be(),null;case 10:return It(t.type),null;case 22:case 23:return yt(t),js(),e!==null&&q(Ja),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return It(Ge),null;case 25:return null;default:return null}}function Yd(e,t){switch(us(t),t.tag){case 3:It(Ge),Be();break;case 26:case 27:case 5:$l(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&yt(t);break;case 13:yt(t);break;case 19:q(Le);break;case 10:It(t.type);break;case 22:case 23:yt(t),js(),e!==null&&q(Ja);break;case 24:It(Ge)}}function jl(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var l=n.next;a=l;do{if((a.tag&e)===e){n=void 0;var s=a.create,d=a.inst;n=s(),d.destroy=n}a=a.next}while(a!==l)}}catch(m){Ee(t,t.return,m)}}function Ca(e,t,a){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var s=l.next;n=s;do{if((n.tag&e)===e){var d=n.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,l=t;var x=a,A=m;try{A()}catch(U){Ee(l,x,U)}}}n=n.next}while(n!==s)}}catch(U){Ee(t,t.return,U)}}function Gd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Mo(t,a)}catch(n){Ee(e,e.return,n)}}}function Vd(e,t,a){a.props=Pa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ee(e,t,n)}}function Sl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(l){Ee(e,t,l)}}function Vt(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(l){Ee(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(l){Ee(e,t,l)}else a.current=null}function Zd(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(l){Ee(e,e.return,l)}}function Ps(e,t,a){try{var n=e.stateNode;f1(n,e.type,a,t),n[it]=t}catch(l){Ee(e,e.return,l)}}function Xd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Aa(e.type)||e.tag===4}function er(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xd(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&&Aa(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 tr(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=$t));else if(n!==4&&(n===27&&Aa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(tr(e,t,a),e=e.sibling;e!==null;)tr(e,t,a),e=e.sibling}function Hi(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Aa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Hi(e,t,a),e=e.sibling;e!==null;)Hi(e,t,a),e=e.sibling}function Qd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);tt(t,n,a),t[We]=e,t[it]=a}catch(s){Ee(e,e.return,s)}}var na=!1,Xe=!1,ar=!1,$d=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function Xp(e,t){if(e=e.containerInfo,Cr=lu,e=lo(e),Ku(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var l=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{a.nodeType,s.nodeType}catch{a=null;break e}var d=0,m=-1,x=-1,A=0,U=0,L=e,z=null;t:for(;;){for(var O;L!==a||l!==0&&L.nodeType!==3||(m=d+l),L!==s||n!==0&&L.nodeType!==3||(x=d+n),L.nodeType===3&&(d+=L.nodeValue.length),(O=L.firstChild)!==null;)z=L,L=O;for(;;){if(L===e)break t;if(z===a&&++A===l&&(m=d),z===s&&++U===n&&(x=d),(O=L.nextSibling)!==null)break;L=z,z=L.parentNode}L=O}a=m===-1||x===-1?null:{start:m,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Er={focusedElem:e,selectionRange:a},lu=!1,Fe=t;Fe!==null;)if(t=Fe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Fe=e;else for(;Fe!==null;){switch(t=Fe,s=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++)l=e[a],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,a=t,l=s.memoizedProps,s=s.memoizedState,n=a.stateNode;try{var I=Pa(a.type,l);e=n.getSnapshotBeforeUpdate(I,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(ne){Ee(a,a.return,ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Tr(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Fe=e;break}Fe=t.return}}function Jd(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:ia(e,a),n&4&&jl(5,a);break;case 1:if(ia(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){Ee(a,a.return,d)}else{var l=Pa(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Ee(a,a.return,d)}}n&64&&Gd(a),n&512&&Sl(a,a.return);break;case 3:if(ia(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Mo(e,t)}catch(d){Ee(a,a.return,d)}}break;case 27:t===null&&n&4&&Qd(a);case 26:case 5:ia(e,a),t===null&&n&4&&Zd(a),n&512&&Sl(a,a.return);break;case 12:ia(e,a);break;case 31:ia(e,a),n&4&&Wd(e,a);break;case 13:ia(e,a),n&4&&Id(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=e1.bind(null,a),x1(e,a))));break;case 22:if(n=a.memoizedState!==null||na,!n){t=t!==null&&t.memoizedState!==null||Xe,l=na;var s=Xe;na=n,(Xe=t)&&!s?ua(e,a,(a.subtreeFlags&8772)!==0):ia(e,a),na=l,Xe=s}break;case 30:break;default:ia(e,a)}}function Kd(e){var t=e.alternate;t!==null&&(e.alternate=null,Kd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Mu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ke=null,st=!1;function la(e,t,a){for(a=a.child;a!==null;)Fd(e,t,a),a=a.sibling}function Fd(e,t,a){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Qn,a)}catch{}switch(a.tag){case 26:Xe||Vt(a,t),la(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Xe||Vt(a,t);var n=ke,l=st;Aa(a.type)&&(ke=a.stateNode,st=!1),la(e,t,a),zl(a.stateNode),ke=n,st=l;break;case 5:Xe||Vt(a,t);case 6:if(n=ke,l=st,ke=null,la(e,t,a),ke=n,st=l,ke!==null)if(st)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(a.stateNode)}catch(s){Ee(a,t,s)}else try{ke.removeChild(a.stateNode)}catch(s){Ee(a,t,s)}break;case 18:ke!==null&&(st?(e=ke,Vf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yn(e)):Vf(ke,a.stateNode));break;case 4:n=ke,l=st,ke=a.stateNode.containerInfo,st=!0,la(e,t,a),ke=n,st=l;break;case 0:case 11:case 14:case 15:Ca(2,a,t),Xe||Ca(4,a,t),la(e,t,a);break;case 1:Xe||(Vt(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Vd(a,t,n)),la(e,t,a);break;case 21:la(e,t,a);break;case 22:Xe=(n=Xe)||a.memoizedState!==null,la(e,t,a),Xe=n;break;default:la(e,t,a)}}function Wd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Yn(e)}catch(a){Ee(t,t.return,a)}}}function Id(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Yn(e)}catch(a){Ee(t,t.return,a)}}function Qp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new $d),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new $d),t;default:throw Error(o(435,e.tag))}}function Bi(e,t){var a=Qp(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var l=t1.bind(null,e,n);n.then(l,l)}})}function rt(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var l=a[n],s=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(Aa(m.type)){ke=m.stateNode,st=!1;break e}break;case 5:ke=m.stateNode,st=!1;break e;case 3:case 4:ke=m.stateNode.containerInfo,st=!0;break e}m=m.return}if(ke===null)throw Error(o(160));Fd(s,d,l),ke=null,st=!1,s=l.alternate,s!==null&&(s.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Pd(t,e),t=t.sibling}var Ht=null;function Pd(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),ct(e),n&4&&(Ca(3,e,e.return),jl(3,e),Ca(5,e,e.return));break;case 1:rt(t,e),ct(e),n&512&&(Xe||a===null||Vt(a,a.return)),n&64&&na&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var l=Ht;if(rt(t,e),ct(e),n&512&&(Xe||a===null||Vt(a,a.return)),n&4){var s=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,l=l.ownerDocument||l;t:switch(n){case"title":s=l.getElementsByTagName("title")[0],(!s||s[Kn]||s[We]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=l.createElement(n),l.head.insertBefore(s,l.querySelector("head > title"))),tt(s,n,a),s[We]=e,Ke(s),n=s;break e;case"link":var d=eh("link","href",l).get(n+(a.href||""));if(d){for(var m=0;m<d.length;m++)if(s=d[m],s.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&s.getAttribute("rel")===(a.rel==null?null:a.rel)&&s.getAttribute("title")===(a.title==null?null:a.title)&&s.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){d.splice(m,1);break t}}s=l.createElement(n),tt(s,n,a),l.head.appendChild(s);break;case"meta":if(d=eh("meta","content",l).get(n+(a.content||""))){for(m=0;m<d.length;m++)if(s=d[m],s.getAttribute("content")===(a.content==null?null:""+a.content)&&s.getAttribute("name")===(a.name==null?null:a.name)&&s.getAttribute("property")===(a.property==null?null:a.property)&&s.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&s.getAttribute("charset")===(a.charSet==null?null:a.charSet)){d.splice(m,1);break t}}s=l.createElement(n),tt(s,n,a),l.head.appendChild(s);break;default:throw Error(o(468,n))}s[We]=e,Ke(s),n=s}e.stateNode=n}else th(l,e.type,e.stateNode);else e.stateNode=Pf(l,n,e.memoizedProps);else s!==n?(s===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):s.count--,n===null?th(l,e.type,e.stateNode):Pf(l,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Ps(e,e.memoizedProps,a.memoizedProps)}break;case 27:rt(t,e),ct(e),n&512&&(Xe||a===null||Vt(a,a.return)),a!==null&&n&4&&Ps(e,e.memoizedProps,a.memoizedProps);break;case 5:if(rt(t,e),ct(e),n&512&&(Xe||a===null||Vt(a,a.return)),e.flags&32){l=e.stateNode;try{on(l,"")}catch(I){Ee(e,e.return,I)}}n&4&&e.stateNode!=null&&(l=e.memoizedProps,Ps(e,l,a!==null?a.memoizedProps:l)),n&1024&&(ar=!0);break;case 6:if(rt(t,e),ct(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(I){Ee(e,e.return,I)}}break;case 3:if(eu=null,l=Ht,Ht=Ii(t.containerInfo),rt(t,e),Ht=l,ct(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Yn(t.containerInfo)}catch(I){Ee(e,e.return,I)}ar&&(ar=!1,ef(e));break;case 4:n=Ht,Ht=Ii(e.stateNode.containerInfo),rt(t,e),ct(e),Ht=n;break;case 12:rt(t,e),ct(e);break;case 31:rt(t,e),ct(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 13:rt(t,e),ct(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(qi=ft()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 22:l=e.memoizedState!==null;var x=a!==null&&a.memoizedState!==null,A=na,U=Xe;if(na=A||l,Xe=U||x,rt(t,e),Xe=U,na=A,ct(e),n&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(a===null||x||na||Xe||en(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){x=a=t;try{if(s=x.stateNode,l)d=s.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=x.stateNode;var L=x.memoizedProps.style,z=L!=null&&L.hasOwnProperty("display")?L.display:null;m.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(I){Ee(x,x.return,I)}}}else if(t.tag===6){if(a===null){x=t;try{x.stateNode.nodeValue=l?"":x.memoizedProps}catch(I){Ee(x,x.return,I)}}}else if(t.tag===18){if(a===null){x=t;try{var O=x.stateNode;l?Zf(O,!0):Zf(x.stateNode,!1)}catch(I){Ee(x,x.return,I)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,Bi(e,a))));break;case 19:rt(t,e),ct(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 30:break;case 21:break;default:rt(t,e),ct(e)}}function ct(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Xd(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var l=a.stateNode,s=er(e);Hi(e,s,l);break;case 5:var d=a.stateNode;a.flags&32&&(on(d,""),a.flags&=-33);var m=er(e);Hi(e,m,d);break;case 3:case 4:var x=a.stateNode.containerInfo,A=er(e);tr(e,A,x);break;default:throw Error(o(161))}}catch(U){Ee(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ef(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ef(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Jd(e,t.alternate,t),t=t.sibling}function en(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ca(4,t,t.return),en(t);break;case 1:Vt(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Vd(t,t.return,a),en(t);break;case 27:zl(t.stateNode);case 26:case 5:Vt(t,t.return),en(t);break;case 22:t.memoizedState===null&&en(t);break;case 30:en(t);break;default:en(t)}e=e.sibling}}function ua(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,l=e,s=t,d=s.flags;switch(s.tag){case 0:case 11:case 15:ua(l,s,a),jl(4,s);break;case 1:if(ua(l,s,a),n=s,l=n.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(A){Ee(n,n.return,A)}if(n=s,l=n.updateQueue,l!==null){var m=n.stateNode;try{var x=l.shared.hiddenCallbacks;if(x!==null)for(l.shared.hiddenCallbacks=null,l=0;l<x.length;l++)zo(x[l],m)}catch(A){Ee(n,n.return,A)}}a&&d&64&&Gd(s),Sl(s,s.return);break;case 27:Qd(s);case 26:case 5:ua(l,s,a),a&&n===null&&d&4&&Zd(s),Sl(s,s.return);break;case 12:ua(l,s,a);break;case 31:ua(l,s,a),a&&d&4&&Wd(l,s);break;case 13:ua(l,s,a),a&&d&4&&Id(l,s);break;case 22:s.memoizedState===null&&ua(l,s,a),Sl(s,s.return);break;case 30:break;default:ua(l,s,a)}t=t.sibling}}function nr(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&&rl(a))}function lr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rl(e))}function Bt(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)tf(e,t,a,n),t=t.sibling}function tf(e,t,a,n){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Bt(e,t,a,n),l&2048&&jl(9,t);break;case 1:Bt(e,t,a,n);break;case 3:Bt(e,t,a,n),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&rl(e)));break;case 12:if(l&2048){Bt(e,t,a,n),e=t.stateNode;try{var s=t.memoizedProps,d=s.id,m=s.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){Ee(t,t.return,x)}}else Bt(e,t,a,n);break;case 31:Bt(e,t,a,n);break;case 13:Bt(e,t,a,n);break;case 23:break;case 22:s=t.stateNode,d=t.alternate,t.memoizedState!==null?s._visibility&2?Bt(e,t,a,n):Cl(e,t):s._visibility&2?Bt(e,t,a,n):(s._visibility|=2,An(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),l&2048&&nr(d,t);break;case 24:Bt(e,t,a,n),l&2048&&lr(t.alternate,t);break;default:Bt(e,t,a,n)}}function An(e,t,a,n,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,d=t,m=a,x=n,A=d.flags;switch(d.tag){case 0:case 11:case 15:An(s,d,m,x,l),jl(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?An(s,d,m,x,l):Cl(s,d):(U._visibility|=2,An(s,d,m,x,l)),l&&A&2048&&nr(d.alternate,d);break;case 24:An(s,d,m,x,l),l&&A&2048&&lr(d.alternate,d);break;default:An(s,d,m,x,l)}t=t.sibling}}function Cl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,l=n.flags;switch(n.tag){case 22:Cl(a,n),l&2048&&nr(n.alternate,n);break;case 24:Cl(a,n),l&2048&&lr(n.alternate,n);break;default:Cl(a,n)}t=t.sibling}}var El=8192;function zn(e,t,a){if(e.subtreeFlags&El)for(e=e.child;e!==null;)af(e,t,a),e=e.sibling}function af(e,t,a){switch(e.tag){case 26:zn(e,t,a),e.flags&El&&e.memoizedState!==null&&M1(a,Ht,e.memoizedState,e.memoizedProps);break;case 5:zn(e,t,a);break;case 3:case 4:var n=Ht;Ht=Ii(e.stateNode.containerInfo),zn(e,t,a),Ht=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=El,El=16777216,zn(e,t,a),El=n):zn(e,t,a));break;default:zn(e,t,a)}}function nf(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 Nl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Fe=n,uf(n,e)}nf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)lf(e),e=e.sibling}function lf(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Ca(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Li(e)):Nl(e);break;default:Nl(e)}}function Li(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];Fe=n,uf(n,e)}nf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ca(8,t,t.return),Li(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Li(t));break;default:Li(t)}e=e.sibling}}function uf(e,t){for(;Fe!==null;){var a=Fe;switch(a.tag){case 0:case 11:case 15:Ca(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:rl(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Fe=n;else e:for(a=e;Fe!==null;){n=Fe;var l=n.sibling,s=n.return;if(Kd(n),n===a){Fe=null;break e}if(l!==null){l.return=s,Fe=l;break e}Fe=s}}}var $p={getCacheForType:function(e){var t=Pe(Ge),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Pe(Ge).controller.signal}},Jp=typeof WeakMap=="function"?WeakMap:Map,je=0,ze=null,de=null,me=0,Ce=0,bt=null,Ea=!1,Mn=!1,ir=!1,sa=0,He=0,Na=0,tn=0,ur=0,xt=0,On=0,wl=null,ot=null,sr=!1,qi=0,sf=0,Yi=1/0,Gi=null,wa=null,$e=0,Ta=null,kn=null,ra=0,rr=0,cr=null,rf=null,Tl=0,or=null;function jt(){return(je&2)!==0&&me!==0?me&-me:H.T!==null?vr():Sc()}function cf(){if(xt===0)if((me&536870912)===0||ge){var e=Fl;Fl<<=1,(Fl&3932160)===0&&(Fl=262144),xt=e}else xt=536870912;return e=gt.current,e!==null&&(e.flags|=32),xt}function dt(e,t,a){(e===ze&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Un(e,0),_a(e,me,xt,!1)),Jn(e,a),((je&2)===0||e!==ze)&&(e===ze&&((je&2)===0&&(tn|=a),He===4&&_a(e,me,xt,!1)),Zt(e))}function of(e,t,a){if((je&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||$n(e,t),l=n?Wp(e,t):fr(e,t,!0),s=n;do{if(l===0){Mn&&!n&&_a(e,t,0,!1);break}else{if(a=e.current.alternate,s&&!Kp(a)){l=fr(e,t,!1),s=!1;continue}if(l===2){if(s=t,e.errorRecoveryDisabledLanes&s)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var m=e;l=wl;var x=m.current.memoizedState.isDehydrated;if(x&&(Un(m,d).flags|=256),d=fr(m,d,!1),d!==2){if(ir&&!x){m.errorRecoveryDisabledLanes|=s,tn|=s,l=4;break e}s=ot,ot=l,s!==null&&(ot===null?ot=s:ot.push.apply(ot,s))}l=d}if(s=!1,l!==2)continue}}if(l===1){Un(e,0),_a(e,t,0,!0);break}e:{switch(n=e,s=l,s){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:_a(n,t,xt,!Ea);break e;case 2:ot=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(l=qi+300-ft(),10<l)){if(_a(n,t,xt,!Ea),Il(n,0,!0)!==0)break e;ra=t,n.timeoutHandle=Yf(df.bind(null,n,a,ot,Gi,sr,t,xt,tn,On,Ea,s,"Throttled",-0,0),l);break e}df(n,a,ot,Gi,sr,t,xt,tn,On,Ea,s,null,-0,0)}}break}while(!0);Zt(e)}function df(e,t,a,n,l,s,d,m,x,A,U,L,z,O){if(e.timeoutHandle=-1,L=t.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},af(t,s,L);var I=(s&62914560)===s?qi-ft():(s&4194048)===s?sf-ft():0;if(I=O1(L,I),I!==null){ra=s,e.cancelPendingCommit=I(bf.bind(null,e,t,s,a,n,l,d,m,x,U,L,null,z,O)),_a(e,s,d,!A);return}}bf(e,t,s,a,n,l,d,m,x)}function Kp(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var l=a[n],s=l.getSnapshot;l=l.value;try{if(!pt(s(),l))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _a(e,t,a,n){t&=~ur,t&=~tn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var l=t;0<l;){var s=31-mt(l),d=1<<s;n[s]=-1,l&=~d}a!==0&&bc(e,a,t)}function Vi(){return(je&6)===0?(_l(0),!1):!0}function dr(){if(de!==null){if(Ce===0)var e=de.return;else e=de,Wt=Qa=null,Ts(e),Nn=null,ol=0,e=de;for(;e!==null;)Yd(e.alternate,e),e=e.return;de=null}}function Un(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,p1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ra=0,dr(),ze=e,de=a=Kt(e.current,null),me=t,Ce=0,bt=null,Ea=!1,Mn=$n(e,t),ir=!1,On=xt=ur=tn=Na=He=0,ot=wl=null,sr=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var l=31-mt(n),s=1<<l;t|=e[l],n&=~s}return sa=t,oi(),a}function ff(e,t){re=null,H.H=yl,t===En||t===yi?(t=To(),Ce=3):t===ps?(t=To(),Ce=4):Ce=t===Vs?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,de===null&&(He=1,Mi(e,wt(t,e.current)))}function hf(){var e=gt.current;return e===null?!0:(me&4194048)===me?At===null:(me&62914560)===me||(me&536870912)!==0?e===At:!1}function mf(){var e=H.H;return H.H=yl,e===null?yl:e}function pf(){var e=H.A;return H.A=$p,e}function Zi(){He=4,Ea||(me&4194048)!==me&>.current!==null||(Mn=!0),(Na&134217727)===0&&(tn&134217727)===0||ze===null||_a(ze,me,xt,!1)}function fr(e,t,a){var n=je;je|=2;var l=mf(),s=pf();(ze!==e||me!==t)&&(Gi=null,Un(e,t)),t=!1;var d=He;e:do try{if(Ce!==0&&de!==null){var m=de,x=bt;switch(Ce){case 8:dr(),d=6;break e;case 3:case 2:case 9:case 6:gt.current===null&&(t=!0);var A=Ce;if(Ce=0,bt=null,Dn(e,m,x,A),a&&Mn){d=0;break e}break;default:A=Ce,Ce=0,bt=null,Dn(e,m,x,A)}}Fp(),d=He;break}catch(U){ff(e,U)}while(!0);return t&&e.shellSuspendCounter++,Wt=Qa=null,je=n,H.H=l,H.A=s,de===null&&(ze=null,me=0,oi()),d}function Fp(){for(;de!==null;)vf(de)}function Wp(e,t){var a=je;je|=2;var n=mf(),l=pf();ze!==e||me!==t?(Gi=null,Yi=ft()+500,Un(e,t)):Mn=$n(e,t);e:do try{if(Ce!==0&&de!==null){t=de;var s=bt;t:switch(Ce){case 1:Ce=0,bt=null,Dn(e,t,s,1);break;case 2:case 9:if(No(s)){Ce=0,bt=null,gf(t);break}t=function(){Ce!==2&&Ce!==9||ze!==e||(Ce=7),Zt(e)},s.then(t,t);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:No(s)?(Ce=0,bt=null,gf(t)):(Ce=0,bt=null,Dn(e,t,s,7));break;case 5:var d=null;switch(de.tag){case 26:d=de.memoizedState;case 5:case 27:var m=de;if(d?ah(d):m.stateNode.complete){Ce=0,bt=null;var x=m.sibling;if(x!==null)de=x;else{var A=m.return;A!==null?(de=A,Xi(A)):de=null}break t}}Ce=0,bt=null,Dn(e,t,s,5);break;case 6:Ce=0,bt=null,Dn(e,t,s,6);break;case 8:dr(),He=6;break e;default:throw Error(o(462))}}Ip();break}catch(U){ff(e,U)}while(!0);return Wt=Qa=null,H.H=n,H.A=l,je=a,de!==null?0:(ze=null,me=0,oi(),He)}function Ip(){for(;de!==null&&!jm();)vf(de)}function vf(e){var t=Ld(e.alternate,e,sa);e.memoizedProps=e.pendingProps,t===null?Xi(e):de=t}function gf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Od(a,t,t.pendingProps,t.type,void 0,me);break;case 11:t=Od(a,t,t.pendingProps,t.type.render,t.ref,me);break;case 5:Ts(t);default:Yd(a,t),t=de=mo(t,sa),t=Ld(a,t,sa)}e.memoizedProps=e.pendingProps,t===null?Xi(e):de=t}function Dn(e,t,a,n){Wt=Qa=null,Ts(t),Nn=null,ol=0;var l=t.return;try{if(qp(e,l,t,a,me)){He=1,Mi(e,wt(a,e.current)),de=null;return}}catch(s){if(l!==null)throw de=l,s;He=1,Mi(e,wt(a,e.current)),de=null;return}t.flags&32768?(ge||n===1?e=!0:Mn||(me&536870912)!==0?e=!1:(Ea=e=!0,(n===2||n===9||n===3||n===6)&&(n=gt.current,n!==null&&n.tag===13&&(n.flags|=16384))),yf(t,e)):Xi(t)}function Xi(e){var t=e;do{if((t.flags&32768)!==0){yf(t,Ea);return}e=t.return;var a=Vp(t.alternate,t,sa);if(a!==null){de=a;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);He===0&&(He=5)}function yf(e,t){do{var a=Zp(e.alternate,e);if(a!==null){a.flags&=32767,de=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=a}while(e!==null);He=6,de=null}function bf(e,t,a,n,l,s,d,m,x){e.cancelPendingCommit=null;do Qi();while($e!==0);if((je&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(s=t.lanes|t.childLanes,s|=es,zm(e,a,s,d,m,x),e===ze&&(de=ze=null,me=0),kn=t,Ta=e,ra=a,rr=s,cr=l,rf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,a1(Jl,function(){return Ef(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=H.T,H.T=null,l=K.p,K.p=2,d=je,je|=4;try{Xp(e,t,a)}finally{je=d,K.p=l,H.T=n}}$e=1,xf(),jf(),Sf()}}function xf(){if($e===1){$e=0;var e=Ta,t=kn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var n=K.p;K.p=2;var l=je;je|=4;try{Pd(t,e);var s=Er,d=lo(e.containerInfo),m=s.focusedElem,x=s.selectionRange;if(d!==m&&m&&m.ownerDocument&&no(m.ownerDocument.documentElement,m)){if(x!==null&&Ku(m)){var A=x.start,U=x.end;if(U===void 0&&(U=A),"selectionStart"in m)m.selectionStart=A,m.selectionEnd=Math.min(U,m.value.length);else{var L=m.ownerDocument||document,z=L&&L.defaultView||window;if(z.getSelection){var O=z.getSelection(),I=m.textContent.length,ne=Math.min(x.start,I),Re=x.end===void 0?ne:Math.min(x.end,I);!O.extend&&ne>Re&&(d=Re,Re=ne,ne=d);var _=ao(m,ne),E=ao(m,Re);if(_&&E&&(O.rangeCount!==1||O.anchorNode!==_.node||O.anchorOffset!==_.offset||O.focusNode!==E.node||O.focusOffset!==E.offset)){var R=L.createRange();R.setStart(_.node,_.offset),O.removeAllRanges(),ne>Re?(O.addRange(R),O.extend(E.node,E.offset)):(R.setEnd(E.node,E.offset),O.addRange(R))}}}}for(L=[],O=m;O=O.parentNode;)O.nodeType===1&&L.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<L.length;m++){var B=L[m];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}lu=!!Cr,Er=Cr=null}finally{je=l,K.p=n,H.T=a}}e.current=t,$e=2}}function jf(){if($e===2){$e=0;var e=Ta,t=kn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var n=K.p;K.p=2;var l=je;je|=4;try{Jd(e,t.alternate,t)}finally{je=l,K.p=n,H.T=a}}$e=3}}function Sf(){if($e===4||$e===3){$e=0,Sm();var e=Ta,t=kn,a=ra,n=rf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?$e=5:($e=0,kn=Ta=null,Cf(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(wa=null),Au(a),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Qn,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=H.T,l=K.p,K.p=2,H.T=null;try{for(var s=e.onRecoverableError,d=0;d<n.length;d++){var m=n[d];s(m.value,{componentStack:m.stack})}}finally{H.T=t,K.p=l}}(ra&3)!==0&&Qi(),Zt(e),l=e.pendingLanes,(a&261930)!==0&&(l&42)!==0?e===or?Tl++:(Tl=0,or=e):Tl=0,_l(0)}}function Cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,rl(t)))}function Qi(){return xf(),jf(),Sf(),Ef()}function Ef(){if($e!==5)return!1;var e=Ta,t=rr;rr=0;var a=Au(ra),n=H.T,l=K.p;try{K.p=32>a?32:a,H.T=null,a=cr,cr=null;var s=Ta,d=ra;if($e=0,kn=Ta=null,ra=0,(je&6)!==0)throw Error(o(331));var m=je;if(je|=4,lf(s.current),tf(s,s.current,d,a),je=m,_l(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Qn,s)}catch{}return!0}finally{K.p=l,H.T=n,Cf(e,t)}}function Nf(e,t,a){t=wt(a,t),t=Gs(e.stateNode,t,2),e=xa(e,t,2),e!==null&&(Jn(e,2),Zt(e))}function Ee(e,t,a){if(e.tag===3)Nf(e,e,a);else for(;t!==null;){if(t.tag===3){Nf(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(wa===null||!wa.has(n))){e=wt(a,e),a=Nd(2),n=xa(t,a,2),n!==null&&(wd(a,n,t,e),Jn(n,2),Zt(n));break}}t=t.return}}function hr(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Jp;var l=new Set;n.set(t,l)}else l=n.get(t),l===void 0&&(l=new Set,n.set(t,l));l.has(a)||(ir=!0,l.add(a),e=Pp.bind(null,e,t,a),t.then(e,e))}function Pp(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ze===e&&(me&a)===a&&(He===4||He===3&&(me&62914560)===me&&300>ft()-qi?(je&2)===0&&Un(e,0):ur|=a,On===me&&(On=0)),Zt(e)}function wf(e,t){t===0&&(t=yc()),e=Va(e,t),e!==null&&(Jn(e,t),Zt(e))}function e1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),wf(e,a)}function t1(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,l=e.memoizedState;l!==null&&(a=l.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),wf(e,a)}function a1(e,t){return wu(e,t)}var $i=null,Hn=null,mr=!1,Ji=!1,pr=!1,Ra=0;function Zt(e){e!==Hn&&e.next===null&&(Hn===null?$i=Hn=e:Hn=Hn.next=e),Ji=!0,mr||(mr=!0,l1())}function _l(e,t){if(!pr&&Ji){pr=!0;do for(var a=!1,n=$i;n!==null;){if(e!==0){var l=n.pendingLanes;if(l===0)var s=0;else{var d=n.suspendedLanes,m=n.pingedLanes;s=(1<<31-mt(42|e)+1)-1,s&=l&~(d&~m),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,Af(n,s))}else s=me,s=Il(n,n===ze?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(s&3)===0||$n(n,s)||(a=!0,Af(n,s));n=n.next}while(a);pr=!1}}function n1(){Tf()}function Tf(){Ji=mr=!1;var e=0;Ra!==0&&m1()&&(e=Ra);for(var t=ft(),a=null,n=$i;n!==null;){var l=n.next,s=_f(n,t);s===0?(n.next=null,a===null?$i=l:a.next=l,l===null&&(Hn=a)):(a=n,(e!==0||(s&3)!==0)&&(Ji=!0)),n=l}$e!==0&&$e!==5||_l(e),Ra!==0&&(Ra=0)}function _f(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,l=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var d=31-mt(s),m=1<<d,x=l[d];x===-1?((m&a)===0||(m&n)!==0)&&(l[d]=Am(m,t)):x<=t&&(e.expiredLanes|=m),s&=~m}if(t=ze,a=me,a=Il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Tu(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||$n(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Tu(n),Au(a)){case 2:case 8:a=vc;break;case 32:a=Jl;break;case 268435456:a=gc;break;default:a=Jl}return n=Rf.bind(null,e),a=wu(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Tu(n),e.callbackPriority=2,e.callbackNode=null,2}function Rf(e,t){if($e!==0&&$e!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Qi()&&e.callbackNode!==a)return null;var n=me;return n=Il(e,e===ze?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(of(e,n,t),_f(e,ft()),e.callbackNode!=null&&e.callbackNode===a?Rf.bind(null,e):null)}function Af(e,t){if(Qi())return null;of(e,t,!0)}function l1(){v1(function(){(je&6)!==0?wu(pc,n1):Tf()})}function vr(){if(Ra===0){var e=Sn;e===0&&(e=Kl,Kl<<=1,(Kl&261888)===0&&(Kl=256)),Ra=e}return Ra}function zf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ai(""+e)}function Mf(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 i1(e,t,a,n,l){if(t==="submit"&&a&&a.stateNode===l){var s=zf((l[it]||null).action),d=n.submitter;d&&(t=(t=d[it]||null)?zf(t.formAction):d.getAttribute("formAction"),t!==null&&(s=t,d=null));var m=new ui("action","action",null,n,l);e.push({event:m,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ra!==0){var x=d?Mf(l,d):new FormData(l);Ds(a,{pending:!0,data:x,method:l.method,action:s},null,x)}}else typeof s=="function"&&(m.preventDefault(),x=d?Mf(l,d):new FormData(l),Ds(a,{pending:!0,data:x,method:l.method,action:s},s,x))},currentTarget:l}]})}}for(var gr=0;gr<Pu.length;gr++){var yr=Pu[gr],u1=yr.toLowerCase(),s1=yr[0].toUpperCase()+yr.slice(1);Dt(u1,"on"+s1)}Dt(so,"onAnimationEnd"),Dt(ro,"onAnimationIteration"),Dt(co,"onAnimationStart"),Dt("dblclick","onDoubleClick"),Dt("focusin","onFocus"),Dt("focusout","onBlur"),Dt(Cp,"onTransitionRun"),Dt(Ep,"onTransitionStart"),Dt(Np,"onTransitionCancel"),Dt(oo,"onTransitionEnd"),rn("onMouseEnter",["mouseout","mouseover"]),rn("onMouseLeave",["mouseout","mouseover"]),rn("onPointerEnter",["pointerout","pointerover"]),rn("onPointerLeave",["pointerout","pointerover"]),La("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),La("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),La("onBeforeInput",["compositionend","keypress","textInput","paste"]),La("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),La("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rl="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(" "),r1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rl));function Of(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],l=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var d=n.length-1;0<=d;d--){var m=n[d],x=m.instance,A=m.currentTarget;if(m=m.listener,x!==s&&l.isPropagationStopped())break e;s=m,l.currentTarget=A;try{s(l)}catch(U){ci(U)}l.currentTarget=null,s=x}else for(d=0;d<n.length;d++){if(m=n[d],x=m.instance,A=m.currentTarget,m=m.listener,x!==s&&l.isPropagationStopped())break e;s=m,l.currentTarget=A;try{s(l)}catch(U){ci(U)}l.currentTarget=null,s=x}}}}function fe(e,t){var a=t[zu];a===void 0&&(a=t[zu]=new Set);var n=e+"__bubble";a.has(n)||(kf(t,e,2,!1),a.add(n))}function br(e,t,a){var n=0;t&&(n|=4),kf(a,e,n,t)}var Ki="_reactListening"+Math.random().toString(36).slice(2);function xr(e){if(!e[Ki]){e[Ki]=!0,Nc.forEach(function(a){a!=="selectionchange"&&(r1.has(a)||br(a,!1,e),br(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ki]||(t[Ki]=!0,br("selectionchange",!1,t))}}function kf(e,t,a,n){switch(ch(t)){case 2:var l=D1;break;case 8:l=H1;break;default:l=Ur}a=l.bind(null,t,a,e),l=void 0,!qu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),n?l!==void 0?e.addEventListener(t,a,{capture:!0,passive:l}):e.addEventListener(t,a,!0):l!==void 0?e.addEventListener(t,a,{passive:l}):e.addEventListener(t,a,!1)}function jr(e,t,a,n,l){var s=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var m=n.stateNode.containerInfo;if(m===l)break;if(d===4)for(d=n.return;d!==null;){var x=d.tag;if((x===3||x===4)&&d.stateNode.containerInfo===l)return;d=d.return}for(;m!==null;){if(d=ln(m),d===null)return;if(x=d.tag,x===5||x===6||x===26||x===27){n=s=d;continue e}m=m.parentNode}}n=n.return}Hc(function(){var A=s,U=Bu(a),L=[];e:{var z=fo.get(e);if(z!==void 0){var O=ui,I=e;switch(e){case"keypress":if(li(a)===0)break e;case"keydown":case"keyup":O=tp;break;case"focusin":I="focus",O=Zu;break;case"focusout":I="blur",O=Zu;break;case"beforeblur":case"afterblur":O=Zu;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":O=qc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Vm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=lp;break;case so:case ro:case co:O=Qm;break;case oo:O=up;break;case"scroll":case"scrollend":O=Ym;break;case"wheel":O=rp;break;case"copy":case"cut":case"paste":O=Jm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Gc;break;case"toggle":case"beforetoggle":O=op}var ne=(t&4)!==0,Re=!ne&&(e==="scroll"||e==="scrollend"),_=ne?z!==null?z+"Capture":null:z;ne=[];for(var E=A,R;E!==null;){var B=E;if(R=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||R===null||_===null||(B=Wn(E,_),B!=null&&ne.push(Al(E,B,R))),Re)break;E=E.return}0<ne.length&&(z=new O(z,I,null,a,U),L.push({event:z,listeners:ne}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",z&&a!==Hu&&(I=a.relatedTarget||a.fromElement)&&(ln(I)||I[nn]))break e;if((O||z)&&(z=U.window===U?U:(z=U.ownerDocument)?z.defaultView||z.parentWindow:window,O?(I=a.relatedTarget||a.toElement,O=A,I=I?ln(I):null,I!==null&&(Re=h(I),ne=I.tag,I!==Re||ne!==5&&ne!==27&&ne!==6)&&(I=null)):(O=null,I=A),O!==I)){if(ne=qc,B="onMouseLeave",_="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ne=Gc,B="onPointerLeave",_="onPointerEnter",E="pointer"),Re=O==null?z:Fn(O),R=I==null?z:Fn(I),z=new ne(B,E+"leave",O,a,U),z.target=Re,z.relatedTarget=R,B=null,ln(U)===A&&(ne=new ne(_,E+"enter",I,a,U),ne.target=R,ne.relatedTarget=Re,B=ne),Re=B,O&&I)t:{for(ne=c1,_=O,E=I,R=0,B=_;B;B=ne(B))R++;B=0;for(var ae=E;ae;ae=ne(ae))B++;for(;0<R-B;)_=ne(_),R--;for(;0<B-R;)E=ne(E),B--;for(;R--;){if(_===E||E!==null&&_===E.alternate){ne=_;break t}_=ne(_),E=ne(E)}ne=null}else ne=null;O!==null&&Uf(L,z,O,ne,!1),I!==null&&Re!==null&&Uf(L,Re,I,ne,!0)}}e:{if(z=A?Fn(A):window,O=z.nodeName&&z.nodeName.toLowerCase(),O==="select"||O==="input"&&z.type==="file")var ye=Fc;else if(Jc(z))if(Wc)ye=xp;else{ye=yp;var ee=gp}else O=z.nodeName,!O||O.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?A&&Du(A.elementType)&&(ye=Fc):ye=bp;if(ye&&(ye=ye(e,A))){Kc(L,ye,a,U);break e}ee&&ee(e,z,A),e==="focusout"&&A&&z.type==="number"&&A.memoizedProps.value!=null&&Uu(z,"number",z.value)}switch(ee=A?Fn(A):window,e){case"focusin":(Jc(ee)||ee.contentEditable==="true")&&(mn=ee,Fu=A,il=null);break;case"focusout":il=Fu=mn=null;break;case"mousedown":Wu=!0;break;case"contextmenu":case"mouseup":case"dragend":Wu=!1,io(L,a,U);break;case"selectionchange":if(Sp)break;case"keydown":case"keyup":io(L,a,U)}var ce;if(Qu)e:{switch(e){case"compositionstart":var pe="onCompositionStart";break e;case"compositionend":pe="onCompositionEnd";break e;case"compositionupdate":pe="onCompositionUpdate";break e}pe=void 0}else hn?Qc(e,a)&&(pe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(pe="onCompositionStart");pe&&(Vc&&a.locale!=="ko"&&(hn||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&hn&&(ce=Bc()):(ha=U,Yu="value"in ha?ha.value:ha.textContent,hn=!0)),ee=Fi(A,pe),0<ee.length&&(pe=new Yc(pe,e,null,a,U),L.push({event:pe,listeners:ee}),ce?pe.data=ce:(ce=$c(a),ce!==null&&(pe.data=ce)))),(ce=fp?hp(e,a):mp(e,a))&&(pe=Fi(A,"onBeforeInput"),0<pe.length&&(ee=new Yc("onBeforeInput","beforeinput",null,a,U),L.push({event:ee,listeners:pe}),ee.data=ce)),i1(L,e,A,a,U)}Of(L,t)})}function Al(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Fi(e,t){for(var a=t+"Capture",n=[];e!==null;){var l=e,s=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||s===null||(l=Wn(e,a),l!=null&&n.unshift(Al(e,l,s)),l=Wn(e,t),l!=null&&n.push(Al(e,l,s))),e.tag===3)return n;e=e.return}return[]}function c1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Uf(e,t,a,n,l){for(var s=t._reactName,d=[];a!==null&&a!==n;){var m=a,x=m.alternate,A=m.stateNode;if(m=m.tag,x!==null&&x===n)break;m!==5&&m!==26&&m!==27||A===null||(x=A,l?(A=Wn(a,s),A!=null&&d.unshift(Al(a,A,x))):l||(A=Wn(a,s),A!=null&&d.push(Al(a,A,x)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var o1=/\r\n?/g,d1=/\u0000|\uFFFD/g;function Df(e){return(typeof e=="string"?e:""+e).replace(o1,`
|
|
49
|
-
`).replace(d1,"")}function Hf(e,t){return t=Df(t),Df(e)===t}function _e(e,t,a,n,l,s){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||on(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&on(e,""+n);break;case"className":ei(e,"class",n);break;case"tabIndex":ei(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":ei(e,a,n);break;case"style":Uc(e,n,s);break;case"data":if(t!=="object"){ei(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ai(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(a==="formAction"?(t!=="input"&&_e(e,t,"name",l.name,l,null),_e(e,t,"formEncType",l.formEncType,l,null),_e(e,t,"formMethod",l.formMethod,l,null),_e(e,t,"formTarget",l.formTarget,l,null)):(_e(e,t,"encType",l.encType,l,null),_e(e,t,"method",l.method,l,null),_e(e,t,"target",l.target,l,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ai(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=$t);break;case"onScroll":n!=null&&fe("scroll",e);break;case"onScrollEnd":n!=null&&fe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=ai(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":fe("beforetoggle",e),fe("toggle",e),Pl(e,"popover",n);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Pl(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Lm.get(a)||a,Pl(e,a,n))}}function Sr(e,t,a,n,l,s){switch(a){case"style":Uc(e,n,s);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?on(e,n):(typeof n=="number"||typeof n=="bigint")&&on(e,""+n);break;case"onScroll":n!=null&&fe("scroll",e);break;case"onScrollEnd":n!=null&&fe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=$t);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(l=a.endsWith("Capture"),t=a.slice(2,l?a.length-7:void 0),s=e[it]||null,s=s!=null?s[a]:null,typeof s=="function"&&e.removeEventListener(t,s,l),typeof n=="function")){typeof s!="function"&&s!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,l);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Pl(e,a,n)}}}function tt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":fe("error",e),fe("load",e);var n=!1,l=!1,s;for(s in a)if(a.hasOwnProperty(s)){var d=a[s];if(d!=null)switch(s){case"src":n=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:_e(e,t,s,d,a,null)}}l&&_e(e,t,"srcSet",a.srcSet,a,null),n&&_e(e,t,"src",a.src,a,null);return;case"input":fe("invalid",e);var m=s=d=l=null,x=null,A=null;for(n in a)if(a.hasOwnProperty(n)){var U=a[n];if(U!=null)switch(n){case"name":l=U;break;case"type":d=U;break;case"checked":x=U;break;case"defaultChecked":A=U;break;case"value":s=U;break;case"defaultValue":m=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:_e(e,t,n,U,a,null)}}zc(e,s,m,x,A,d,l,!1);return;case"select":fe("invalid",e),n=d=s=null;for(l in a)if(a.hasOwnProperty(l)&&(m=a[l],m!=null))switch(l){case"value":s=m;break;case"defaultValue":d=m;break;case"multiple":n=m;default:_e(e,t,l,m,a,null)}t=s,a=d,e.multiple=!!n,t!=null?cn(e,!!n,t,!1):a!=null&&cn(e,!!n,a,!0);return;case"textarea":fe("invalid",e),s=l=n=null;for(d in a)if(a.hasOwnProperty(d)&&(m=a[d],m!=null))switch(d){case"value":n=m;break;case"defaultValue":l=m;break;case"children":s=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:_e(e,t,d,m,a,null)}Oc(e,n,l,s);return;case"option":for(x in a)if(a.hasOwnProperty(x)&&(n=a[x],n!=null))switch(x){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:_e(e,t,x,n,a,null)}return;case"dialog":fe("beforetoggle",e),fe("toggle",e),fe("cancel",e),fe("close",e);break;case"iframe":case"object":fe("load",e);break;case"video":case"audio":for(n=0;n<Rl.length;n++)fe(Rl[n],e);break;case"image":fe("error",e),fe("load",e);break;case"details":fe("toggle",e);break;case"embed":case"source":case"link":fe("error",e),fe("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(A in a)if(a.hasOwnProperty(A)&&(n=a[A],n!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:_e(e,t,A,n,a,null)}return;default:if(Du(t)){for(U in a)a.hasOwnProperty(U)&&(n=a[U],n!==void 0&&Sr(e,t,U,n,a,void 0));return}}for(m in a)a.hasOwnProperty(m)&&(n=a[m],n!=null&&_e(e,t,m,n,a,null))}function f1(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,s=null,d=null,m=null,x=null,A=null,U=null;for(O in a){var L=a[O];if(a.hasOwnProperty(O)&&L!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":x=L;default:n.hasOwnProperty(O)||_e(e,t,O,null,n,L)}}for(var z in n){var O=n[z];if(L=a[z],n.hasOwnProperty(z)&&(O!=null||L!=null))switch(z){case"type":s=O;break;case"name":l=O;break;case"checked":A=O;break;case"defaultChecked":U=O;break;case"value":d=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(o(137,t));break;default:O!==L&&_e(e,t,z,O,n,L)}}ku(e,d,m,x,A,U,s,l);return;case"select":O=d=m=z=null;for(s in a)if(x=a[s],a.hasOwnProperty(s)&&x!=null)switch(s){case"value":break;case"multiple":O=x;default:n.hasOwnProperty(s)||_e(e,t,s,null,n,x)}for(l in n)if(s=n[l],x=a[l],n.hasOwnProperty(l)&&(s!=null||x!=null))switch(l){case"value":z=s;break;case"defaultValue":m=s;break;case"multiple":d=s;default:s!==x&&_e(e,t,l,s,n,x)}t=m,a=d,n=O,z!=null?cn(e,!!a,z,!1):!!n!=!!a&&(t!=null?cn(e,!!a,t,!0):cn(e,!!a,a?[]:"",!1));return;case"textarea":O=z=null;for(m in a)if(l=a[m],a.hasOwnProperty(m)&&l!=null&&!n.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:_e(e,t,m,null,n,l)}for(d in n)if(l=n[d],s=a[d],n.hasOwnProperty(d)&&(l!=null||s!=null))switch(d){case"value":z=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(o(91));break;default:l!==s&&_e(e,t,d,l,n,s)}Mc(e,z,O);return;case"option":for(var I in a)if(z=a[I],a.hasOwnProperty(I)&&z!=null&&!n.hasOwnProperty(I))switch(I){case"selected":e.selected=!1;break;default:_e(e,t,I,null,n,z)}for(x in n)if(z=n[x],O=a[x],n.hasOwnProperty(x)&&z!==O&&(z!=null||O!=null))switch(x){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:_e(e,t,x,z,n,O)}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 ne in a)z=a[ne],a.hasOwnProperty(ne)&&z!=null&&!n.hasOwnProperty(ne)&&_e(e,t,ne,null,n,z);for(A in n)if(z=n[A],O=a[A],n.hasOwnProperty(A)&&z!==O&&(z!=null||O!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:_e(e,t,A,z,n,O)}return;default:if(Du(t)){for(var Re in a)z=a[Re],a.hasOwnProperty(Re)&&z!==void 0&&!n.hasOwnProperty(Re)&&Sr(e,t,Re,void 0,n,z);for(U in n)z=n[U],O=a[U],!n.hasOwnProperty(U)||z===O||z===void 0&&O===void 0||Sr(e,t,U,z,n,O);return}}for(var _ in a)z=a[_],a.hasOwnProperty(_)&&z!=null&&!n.hasOwnProperty(_)&&_e(e,t,_,null,n,z);for(L in n)z=n[L],O=a[L],!n.hasOwnProperty(L)||z===O||z==null&&O==null||_e(e,t,L,z,n,O)}function Bf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function h1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var l=a[n],s=l.transferSize,d=l.initiatorType,m=l.duration;if(s&&m&&Bf(d)){for(d=0,m=l.responseEnd,n+=1;n<a.length;n++){var x=a[n],A=x.startTime;if(A>m)break;var U=x.transferSize,L=x.initiatorType;U&&Bf(L)&&(x=x.responseEnd,d+=U*(x<m?1:(m-A)/(x-A)))}if(--n,t+=8*(s+d)/(l.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 Cr=null,Er=null;function Wi(e){return e.nodeType===9?e:e.ownerDocument}function Lf(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 qf(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 Nr(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 wr=null;function m1(){var e=window.event;return e&&e.type==="popstate"?e===wr?!1:(wr=e,!0):(wr=null,!1)}var Yf=typeof setTimeout=="function"?setTimeout:void 0,p1=typeof clearTimeout=="function"?clearTimeout:void 0,Gf=typeof Promise=="function"?Promise:void 0,v1=typeof queueMicrotask=="function"?queueMicrotask:typeof Gf<"u"?function(e){return Gf.resolve(null).then(e).catch(g1)}:Yf;function g1(e){setTimeout(function(){throw e})}function Aa(e){return e==="head"}function Vf(e,t){var a=t,n=0;do{var l=a.nextSibling;if(e.removeChild(a),l&&l.nodeType===8)if(a=l.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(l),Yn(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")zl(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,zl(a);for(var s=a.firstChild;s;){var d=s.nextSibling,m=s.nodeName;s[Kn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&s.rel.toLowerCase()==="stylesheet"||a.removeChild(s),s=d}}else a==="body"&&zl(e.ownerDocument.body);a=l}while(a);Yn(t)}function Zf(e,t){var a=e;e=0;do{var n=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||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Tr(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":Tr(a),Mu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function y1(e,t,a,n){for(;e.nodeType===1;){var l=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Kn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=zt(e.nextSibling),e===null)break}return null}function b1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=zt(e.nextSibling),e===null))return null;return e}function Xf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=zt(e.nextSibling),e===null))return null;return e}function _r(e){return e.data==="$?"||e.data==="$~"}function Rr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function x1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function zt(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 Ar=null;function Qf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return zt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function $f(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 Jf(e,t,a){switch(t=Wi(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function zl(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Mu(e)}var Mt=new Map,Kf=new Set;function Ii(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ca=K.d;K.d={f:j1,r:S1,D:C1,C:E1,L:N1,m:w1,X:_1,S:T1,M:R1};function j1(){var e=ca.f(),t=Vi();return e||t}function S1(e){var t=un(e);t!==null&&t.tag===5&&t.type==="form"?dd(t):ca.r(e)}var Bn=typeof document>"u"?null:document;function Ff(e,t,a){var n=Bn;if(n&&typeof t=="string"&&t){var l=Et(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof a=="string"&&(l+='[crossorigin="'+a+'"]'),Kf.has(l)||(Kf.add(l),e={rel:e,crossOrigin:a,href:t},n.querySelector(l)===null&&(t=n.createElement("link"),tt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function C1(e){ca.D(e),Ff("dns-prefetch",e,null)}function E1(e,t){ca.C(e,t),Ff("preconnect",e,t)}function N1(e,t,a){ca.L(e,t,a);var n=Bn;if(n&&e&&t){var l='link[rel="preload"][as="'+Et(t)+'"]';t==="image"&&a&&a.imageSrcSet?(l+='[imagesrcset="'+Et(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(l+='[imagesizes="'+Et(a.imageSizes)+'"]')):l+='[href="'+Et(e)+'"]';var s=l;switch(t){case"style":s=Ln(e);break;case"script":s=qn(e)}Mt.has(s)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Mt.set(s,e),n.querySelector(l)!==null||t==="style"&&n.querySelector(Ml(s))||t==="script"&&n.querySelector(Ol(s))||(t=n.createElement("link"),tt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function w1(e,t){ca.m(e,t);var a=Bn;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Et(n)+'"][href="'+Et(e)+'"]',s=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=qn(e)}if(!Mt.has(s)&&(e=y({rel:"modulepreload",href:e},t),Mt.set(s,e),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ol(s)))return}n=a.createElement("link"),tt(n,"link",e),Ke(n),a.head.appendChild(n)}}}function T1(e,t,a){ca.S(e,t,a);var n=Bn;if(n&&e){var l=sn(n).hoistableStyles,s=Ln(e);t=t||"default";var d=l.get(s);if(!d){var m={loading:0,preload:null};if(d=n.querySelector(Ml(s)))m.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Mt.get(s))&&zr(e,a);var x=d=n.createElement("link");Ke(x),tt(x,"link",e),x._p=new Promise(function(A,U){x.onload=A,x.onerror=U}),x.addEventListener("load",function(){m.loading|=1}),x.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Pi(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:m},l.set(s,d)}}}function _1(e,t){ca.X(e,t);var a=Bn;if(a&&e){var n=sn(a).hoistableScripts,l=qn(e),s=n.get(l);s||(s=a.querySelector(Ol(l)),s||(e=y({src:e,async:!0},t),(t=Mt.get(l))&&Mr(e,t),s=a.createElement("script"),Ke(s),tt(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(l,s))}}function R1(e,t){ca.M(e,t);var a=Bn;if(a&&e){var n=sn(a).hoistableScripts,l=qn(e),s=n.get(l);s||(s=a.querySelector(Ol(l)),s||(e=y({src:e,async:!0,type:"module"},t),(t=Mt.get(l))&&Mr(e,t),s=a.createElement("script"),Ke(s),tt(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(l,s))}}function Wf(e,t,a,n){var l=(l=oe.current)?Ii(l):null;if(!l)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ln(a.href),a=sn(l).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ln(a.href);var s=sn(l).hoistableStyles,d=s.get(e);if(d||(l=l.ownerDocument||l,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,d),(s=l.querySelector(Ml(e)))&&!s._p&&(d.instance=s,d.state.loading=5),Mt.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},Mt.set(e,a),s||A1(l,e,a,d.state))),t&&n===null)throw Error(o(528,""));return d}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=qn(a),a=sn(l).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ln(e){return'href="'+Et(e)+'"'}function Ml(e){return'link[rel="stylesheet"]['+e+"]"}function If(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function A1(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),tt(t,"link",a),Ke(t),e.head.appendChild(t))}function qn(e){return'[src="'+Et(e)+'"]'}function Ol(e){return"script[async]"+e}function Pf(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Et(a.href)+'"]');if(n)return t.instance=n,Ke(n),n;var l=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ke(n),tt(n,"style",l),Pi(n,a.precedence,e),t.instance=n;case"stylesheet":l=Ln(a.href);var s=e.querySelector(Ml(l));if(s)return t.state.loading|=4,t.instance=s,Ke(s),s;n=If(a),(l=Mt.get(l))&&zr(n,l),s=(e.ownerDocument||e).createElement("link"),Ke(s);var d=s;return d._p=new Promise(function(m,x){d.onload=m,d.onerror=x}),tt(s,"link",n),t.state.loading|=4,Pi(s,a.precedence,e),t.instance=s;case"script":return s=qn(a.src),(l=e.querySelector(Ol(s)))?(t.instance=l,Ke(l),l):(n=a,(l=Mt.get(s))&&(n=y({},a),Mr(n,l)),e=e.ownerDocument||e,l=e.createElement("script"),Ke(l),tt(l,"link",n),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Pi(n,a.precedence,e));return t.instance}function Pi(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=n.length?n[n.length-1]:null,s=l,d=0;d<n.length;d++){var m=n[d];if(m.dataset.precedence===t)s=m;else if(s!==l)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function zr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Mr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var eu=null;function eh(e,t,a){if(eu===null){var n=new Map,l=eu=new Map;l.set(a,n)}else l=eu,n=l.get(a),n||(n=new Map,l.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),l=0;l<a.length;l++){var s=a[l];if(!(s[Kn]||s[We]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var d=s.getAttribute(t)||"";d=e+d;var m=n.get(d);m?m.push(s):n.set(d,[s])}}return n}function th(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function z1(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ah(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function M1(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var l=Ln(n.href),s=t.querySelector(Ml(l));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=tu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=s,Ke(s);return}s=t.ownerDocument||t,n=If(n),(l=Mt.get(l))&&zr(n,l),s=s.createElement("link"),Ke(s);var d=s;d._p=new Promise(function(m,x){d.onload=m,d.onerror=x}),tt(s,"link",n),a.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=tu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Or=0;function O1(e,t){return e.stylesheets&&e.count===0&&nu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&nu(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Or===0&&(Or=62500*h1());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&nu(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Or?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(l)}}:null}function tu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)nu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var au=null;function nu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,au=new Map,t.forEach(k1,e),au=null,tu.call(e))}function k1(e,t){if(!(t.state.loading&4)){var a=au.get(e);if(a)var n=a.get(null);else{a=new Map,au.set(e,a);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<l.length;s++){var d=l[s];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),n=d)}n&&a.set(null,n)}l=t.instance,d=l.getAttribute("data-precedence"),s=a.get(d)||n,s===n&&a.set(null,l),a.set(d,l),this.count++,n=tu.bind(this),l.addEventListener("load",n),l.addEventListener("error",n),s?s.parentNode.insertBefore(l,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var kl={$$typeof:$,Provider:null,Consumer:null,_currentValue:ie,_currentValue2:ie,_threadCount:0};function U1(e,t,a,n,l,s,d,m,x){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=_u(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_u(0),this.hiddenUpdates=_u(null),this.identifierPrefix=n,this.onUncaughtError=l,this.onCaughtError=s,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function nh(e,t,a,n,l,s,d,m,x,A,U,L){return e=new U1(e,t,a,d,x,A,U,L,m),t=1,s===!0&&(t|=24),s=vt(3,null,null,t),e.current=s,s.stateNode=e,t=fs(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:n,isDehydrated:a,cache:t},vs(s),e}function lh(e){return e?(e=gn,e):gn}function ih(e,t,a,n,l,s){l=lh(l),n.context===null?n.context=l:n.pendingContext=l,n=ba(t),n.payload={element:a},s=s===void 0?null:s,s!==null&&(n.callback=s),a=xa(e,n,t),a!==null&&(dt(a,e,t),fl(a,e,t))}function uh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function kr(e,t){uh(e,t),(e=e.alternate)&&uh(e,t)}function sh(e){if(e.tag===13||e.tag===31){var t=Va(e,67108864);t!==null&&dt(t,e,67108864),kr(e,67108864)}}function rh(e){if(e.tag===13||e.tag===31){var t=jt();t=Ru(t);var a=Va(e,t);a!==null&&dt(a,e,t),kr(e,t)}}var lu=!0;function D1(e,t,a,n){var l=H.T;H.T=null;var s=K.p;try{K.p=2,Ur(e,t,a,n)}finally{K.p=s,H.T=l}}function H1(e,t,a,n){var l=H.T;H.T=null;var s=K.p;try{K.p=8,Ur(e,t,a,n)}finally{K.p=s,H.T=l}}function Ur(e,t,a,n){if(lu){var l=Dr(n);if(l===null)jr(e,t,n,iu,a),oh(e,n);else if(L1(l,e,t,a,n))n.stopPropagation();else if(oh(e,n),t&4&&-1<B1.indexOf(e)){for(;l!==null;){var s=un(l);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var d=Ba(s.pendingLanes);if(d!==0){var m=s;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var x=1<<31-mt(d);m.entanglements[1]|=x,d&=~x}Zt(s),(je&6)===0&&(Yi=ft()+500,_l(0))}}break;case 31:case 13:m=Va(s,2),m!==null&&dt(m,s,2),Vi(),kr(s,2)}if(s=Dr(n),s===null&&jr(e,t,n,iu,a),s===l)break;l=s}l!==null&&n.stopPropagation()}else jr(e,t,n,null,a)}}function Dr(e){return e=Bu(e),Hr(e)}var iu=null;function Hr(e){if(iu=null,e=ln(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=j(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 iu=e,null}function ch(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(Cm()){case pc:return 2;case vc:return 8;case Jl:case Em:return 32;case gc:return 268435456;default:return 32}default:return 32}}var Br=!1,za=null,Ma=null,Oa=null,Ul=new Map,Dl=new Map,ka=[],B1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function oh(e,t){switch(e){case"focusin":case"focusout":za=null;break;case"dragenter":case"dragleave":Ma=null;break;case"mouseover":case"mouseout":Oa=null;break;case"pointerover":case"pointerout":Ul.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dl.delete(t.pointerId)}}function Hl(e,t,a,n,l,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:s,targetContainers:[l]},t!==null&&(t=un(t),t!==null&&sh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function L1(e,t,a,n,l){switch(t){case"focusin":return za=Hl(za,e,t,a,n,l),!0;case"dragenter":return Ma=Hl(Ma,e,t,a,n,l),!0;case"mouseover":return Oa=Hl(Oa,e,t,a,n,l),!0;case"pointerover":var s=l.pointerId;return Ul.set(s,Hl(Ul.get(s)||null,e,t,a,n,l)),!0;case"gotpointercapture":return s=l.pointerId,Dl.set(s,Hl(Dl.get(s)||null,e,t,a,n,l)),!0}return!1}function dh(e){var t=ln(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,Cc(e.priority,function(){rh(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Cc(e.priority,function(){rh(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 uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Dr(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Hu=n,a.target.dispatchEvent(n),Hu=null}else return t=un(a),t!==null&&sh(t),e.blockedOn=a,!1;t.shift()}return!0}function fh(e,t,a){uu(e)&&a.delete(t)}function q1(){Br=!1,za!==null&&uu(za)&&(za=null),Ma!==null&&uu(Ma)&&(Ma=null),Oa!==null&&uu(Oa)&&(Oa=null),Ul.forEach(fh),Dl.forEach(fh)}function su(e,t){e.blockedOn===t&&(e.blockedOn=null,Br||(Br=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,q1)))}var ru=null;function hh(e){ru!==e&&(ru=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){ru===e&&(ru=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],l=e[t+2];if(typeof n!="function"){if(Hr(n||a)===null)continue;break}var s=un(a);s!==null&&(e.splice(t,3),t-=3,Ds(s,{pending:!0,data:l,method:a.method,action:n},n,l))}}))}function Yn(e){function t(x){return su(x,e)}za!==null&&su(za,e),Ma!==null&&su(Ma,e),Oa!==null&&su(Oa,e),Ul.forEach(t),Dl.forEach(t);for(var a=0;a<ka.length;a++){var n=ka[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<ka.length&&(a=ka[0],a.blockedOn===null);)dh(a),a.blockedOn===null&&ka.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var l=a[n],s=a[n+1],d=l[it]||null;if(typeof s=="function")d||hh(a);else if(d){var m=null;if(s&&s.hasAttribute("formAction")){if(l=s,d=s[it]||null)m=d.formAction;else if(Hr(l)!==null)continue}else m=d.action;typeof m=="function"?a[n+1]=m:(a.splice(n,3),n-=3),hh(a)}}}function mh(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(d){return l=d})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Lr(e){this._internalRoot=e}cu.prototype.render=Lr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=jt();ih(a,n,e,t,null,null)},cu.prototype.unmount=Lr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ih(e.current,2,null,e,null,null),Vi(),t[nn]=null}};function cu(e){this._internalRoot=e}cu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sc();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ka.length&&t!==0&&t<ka[a].priority;a++);ka.splice(a,0,e),a===0&&dh(e)}};var ph=r.version;if(ph!=="19.2.5")throw Error(o(527,ph,"19.2.5"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Y1={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ou=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ou.isDisabled&&ou.supportsFiber)try{Qn=ou.inject(Y1),ht=ou}catch{}}return Ll.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,n="",l=jd,s=Sd,d=Cd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=nh(e,1,!1,null,null,a,n,null,l,s,d,mh),e[nn]=t.current,xr(e),new Lr(t)},Ll.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var n=!1,l="",s=jd,d=Sd,m=Cd,x=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(l=a.identifierPrefix),a.onUncaughtError!==void 0&&(s=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(m=a.onRecoverableError),a.formState!==void 0&&(x=a.formState)),t=nh(e,1,!0,t,a??null,n,l,x,s,d,m,mh),t.context=lh(null),a=t.current,n=jt(),n=Ru(n),l=ba(n),l.callback=null,xa(a,l,n),a=n,t.current.lanes=a,Jn(t,a),Zt(t),e[nn]=t.current,xr(e),new cu(t)},Ll.version="19.2.5",Ll}var Nh;function W1(){if(Nh)return Gr.exports;Nh=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(r){console.error(r)}}return i(),Gr.exports=F1(),Gr.exports}var I1=W1();/**
|
|
50
|
-
* react-router v7.14.2
|
|
51
|
-
*
|
|
52
|
-
* Copyright (c) Remix Software Inc.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
-
*
|
|
57
|
-
* @license MIT
|
|
58
|
-
*/var wh="popstate";function Th(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function P1(i={}){function r(o,f){var p;let h=(p=f.state)==null?void 0:p.masked,{pathname:g,search:j,hash:v}=h||o.location;return Pr("",{pathname:g,search:j,hash:v},f.state&&f.state.usr||null,f.state&&f.state.key||"default",h?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function c(o,f){return typeof f=="string"?f:Gl(f)}return tv(r,c,null,i)}function Ue(i,r){if(i===!1||i===null||typeof i>"u")throw new Error(r)}function qt(i,r){if(!i){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function ev(){return Math.random().toString(36).substring(2,10)}function _h(i,r){return{usr:i.state,key:i.key,idx:r,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function Pr(i,r,c=null,o,f){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof r=="string"?Vn(r):r,state:c,key:r&&r.key||o||ev(),unstable_mask:f}}function Gl({pathname:i="/",search:r="",hash:c=""}){return r&&r!=="?"&&(i+=r.charAt(0)==="?"?r:"?"+r),c&&c!=="#"&&(i+=c.charAt(0)==="#"?c:"#"+c),i}function Vn(i){let r={};if(i){let c=i.indexOf("#");c>=0&&(r.hash=i.substring(c),i=i.substring(0,c));let o=i.indexOf("?");o>=0&&(r.search=i.substring(o),i=i.substring(0,o)),i&&(r.pathname=i)}return r}function tv(i,r,c,o={}){let{window:f=document.defaultView,v5Compat:h=!1}=o,g=f.history,j="POP",v=null,p=b();p==null&&(p=0,g.replaceState({...g.state,idx:p},""));function b(){return(g.state||{idx:null}).idx}function y(){j="POP";let G=b(),Z=G==null?null:G-p;p=G,v&&v({action:j,location:D.location,delta:Z})}function w(G,Z){j="PUSH";let V=Th(G)?G:Pr(D.location,G,Z);p=b()+1;let $=_h(V,p),le=D.createHref(V.unstable_mask||V);try{g.pushState($,"",le)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;f.location.assign(le)}h&&v&&v({action:j,location:D.location,delta:1})}function T(G,Z){j="REPLACE";let V=Th(G)?G:Pr(D.location,G,Z);p=b();let $=_h(V,p),le=D.createHref(V.unstable_mask||V);g.replaceState($,"",le),h&&v&&v({action:j,location:D.location,delta:0})}function M(G){return av(G)}let D={get action(){return j},get location(){return i(f,g)},listen(G){if(v)throw new Error("A history only accepts one active listener");return f.addEventListener(wh,y),v=G,()=>{f.removeEventListener(wh,y),v=null}},createHref(G){return r(f,G)},createURL:M,encodeLocation(G){let Z=M(G);return{pathname:Z.pathname,search:Z.search,hash:Z.hash}},push:w,replace:T,go(G){return g.go(G)}};return D}function av(i,r=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Ue(c,"No window.location.(origin|href) available to create URL");let o=typeof i=="string"?i:Gl(i);return o=o.replace(/ $/,"%20"),!r&&o.startsWith("//")&&(o=c+o),new URL(o,c)}function Lh(i,r,c="/"){return nv(i,r,c,!1)}function nv(i,r,c,o){let f=typeof r=="string"?Vn(r):r,h=oa(f.pathname||"/",c);if(h==null)return null;let g=qh(i);lv(g);let j=null;for(let v=0;j==null&&v<g.length;++v){let p=pv(h);j=hv(g[v],p,o)}return j}function qh(i,r=[],c=[],o="",f=!1){let h=(g,j,v=f,p)=>{let b={relativePath:p===void 0?g.path||"":p,caseSensitive:g.caseSensitive===!0,childrenIndex:j,route:g};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(o)&&v)return;Ue(b.relativePath.startsWith(o),`Absolute route path "${b.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(o.length)}let y=Lt([o,b.relativePath]),w=c.concat(b);g.children&&g.children.length>0&&(Ue(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),qh(g.children,r,w,y,v)),!(g.path==null&&!g.index)&&r.push({path:y,score:dv(y,g.index),routesMeta:w})};return i.forEach((g,j)=>{var v;if(g.path===""||!((v=g.path)!=null&&v.includes("?")))h(g,j);else for(let p of Yh(g.path))h(g,j,!0,p)}),r}function Yh(i){let r=i.split("/");if(r.length===0)return[];let[c,...o]=r,f=c.endsWith("?"),h=c.replace(/\?$/,"");if(o.length===0)return f?[h,""]:[h];let g=Yh(o.join("/")),j=[];return j.push(...g.map(v=>v===""?h:[h,v].join("/"))),f&&j.push(...g),j.map(v=>i.startsWith("/")&&v===""?"/":v)}function lv(i){i.sort((r,c)=>r.score!==c.score?c.score-r.score:fv(r.routesMeta.map(o=>o.childrenIndex),c.routesMeta.map(o=>o.childrenIndex)))}var iv=/^:[\w-]+$/,uv=3,sv=2,rv=1,cv=10,ov=-2,Rh=i=>i==="*";function dv(i,r){let c=i.split("/"),o=c.length;return c.some(Rh)&&(o+=ov),r&&(o+=sv),c.filter(f=>!Rh(f)).reduce((f,h)=>f+(iv.test(h)?uv:h===""?rv:cv),o)}function fv(i,r){return i.length===r.length&&i.slice(0,-1).every((o,f)=>o===r[f])?i[i.length-1]-r[r.length-1]:0}function hv(i,r,c=!1){let{routesMeta:o}=i,f={},h="/",g=[];for(let j=0;j<o.length;++j){let v=o[j],p=j===o.length-1,b=h==="/"?r:r.slice(h.length)||"/",y=pu({path:v.relativePath,caseSensitive:v.caseSensitive,end:p},b),w=v.route;if(!y&&p&&c&&!o[o.length-1].route.index&&(y=pu({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},b)),!y)return null;Object.assign(f,y.params),g.push({params:f,pathname:Lt([h,y.pathname]),pathnameBase:bv(Lt([h,y.pathnameBase])),route:w}),y.pathnameBase!=="/"&&(h=Lt([h,y.pathnameBase]))}return g}function pu(i,r){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[c,o]=mv(i.path,i.caseSensitive,i.end),f=r.match(c);if(!f)return null;let h=f[0],g=h.replace(/(.)\/+$/,"$1"),j=f.slice(1);return{params:o.reduce((p,{paramName:b,isOptional:y},w)=>{if(b==="*"){let M=j[w]||"";g=h.slice(0,h.length-M.length).replace(/(.)\/+$/,"$1")}const T=j[w];return y&&!T?p[b]=void 0:p[b]=(T||"").replace(/%2F/g,"/"),p},{}),pathname:h,pathnameBase:g,pattern:i}}function mv(i,r=!1,c=!0){qt(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let o=[],f="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,j,v,p,b)=>{if(o.push({paramName:j,isOptional:v!=null}),v){let y=b.charAt(p+g.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(o.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,r?void 0:"i"),o]}function pv(i){try{return i.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return qt(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),i}}function oa(i,r){if(r==="/")return i;if(!i.toLowerCase().startsWith(r.toLowerCase()))return null;let c=r.endsWith("/")?r.length-1:r.length,o=i.charAt(c);return o&&o!=="/"?null:i.slice(c)||"/"}var vv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function gv(i,r="/"){let{pathname:c,search:o="",hash:f=""}=typeof i=="string"?Vn(i):i,h;return c?(c=Vh(c),c.startsWith("/")?h=Ah(c.substring(1),"/"):h=Ah(c,r)):h=r,{pathname:h,search:xv(o),hash:jv(f)}}function Ah(i,r){let c=vu(r).split("/");return i.split("/").forEach(f=>{f===".."?c.length>1&&c.pop():f!=="."&&c.push(f)}),c.length>1?c.join("/"):"/"}function Qr(i,r,c,o){return`Cannot include a '${i}' character in a manually specified \`to.${r}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function yv(i){return i.filter((r,c)=>c===0||r.route.path&&r.route.path.length>0)}function Gh(i){let r=yv(i);return r.map((c,o)=>o===r.length-1?c.pathname:c.pathnameBase)}function lc(i,r,c,o=!1){let f;typeof i=="string"?f=Vn(i):(f={...i},Ue(!f.pathname||!f.pathname.includes("?"),Qr("?","pathname","search",f)),Ue(!f.pathname||!f.pathname.includes("#"),Qr("#","pathname","hash",f)),Ue(!f.search||!f.search.includes("#"),Qr("#","search","hash",f)));let h=i===""||f.pathname==="",g=h?"/":f.pathname,j;if(g==null)j=c;else{let y=r.length-1;if(!o&&g.startsWith("..")){let w=g.split("/");for(;w[0]==="..";)w.shift(),y-=1;f.pathname=w.join("/")}j=y>=0?r[y]:"/"}let v=gv(f,j),p=g&&g!=="/"&&g.endsWith("/"),b=(h||g===".")&&c.endsWith("/");return!v.pathname.endsWith("/")&&(p||b)&&(v.pathname+="/"),v}var Vh=i=>i.replace(/\/\/+/g,"/"),Lt=i=>Vh(i.join("/")),vu=i=>i.replace(/\/+$/,""),bv=i=>vu(i).replace(/^\/*/,"/"),xv=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,jv=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,Sv=class{constructor(i,r,c,o=!1){this.status=i,this.statusText=r||"",this.internal=o,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function Cv(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function Ev(i){let r=i.map(c=>c.route.path).filter(Boolean);return Lt(r)||"/"}var Zh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Xh(i,r){let c=i;if(typeof c!="string"||!vv.test(c))return{absoluteURL:void 0,isExternal:!1,to:c};let o=c,f=!1;if(Zh)try{let h=new URL(window.location.href),g=c.startsWith("//")?new URL(h.protocol+c):new URL(c),j=oa(g.pathname,r);g.origin===h.origin&&j!=null?c=j+g.search+g.hash:f=!0}catch{qt(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Qh=["POST","PUT","PATCH","DELETE"];new Set(Qh);var Nv=["GET",...Qh];new Set(Nv);var Zn=S.createContext(null);Zn.displayName="DataRouter";var bu=S.createContext(null);bu.displayName="DataRouterState";var $h=S.createContext(!1);function wv(){return S.useContext($h)}var Jh=S.createContext({isTransitioning:!1});Jh.displayName="ViewTransition";var Tv=S.createContext(new Map);Tv.displayName="Fetchers";var _v=S.createContext(null);_v.displayName="Await";var kt=S.createContext(null);kt.displayName="Navigation";var Zl=S.createContext(null);Zl.displayName="Location";var Xt=S.createContext({outlet:null,matches:[],isDataRoute:!1});Xt.displayName="Route";var ic=S.createContext(null);ic.displayName="RouteError";var Kh="REACT_ROUTER_ERROR",Rv="REDIRECT",Av="ROUTE_ERROR_RESPONSE";function zv(i){if(i.startsWith(`${Kh}:${Rv}:{`))try{let r=JSON.parse(i.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 Mv(i){if(i.startsWith(`${Kh}:${Av}:{`))try{let r=JSON.parse(i.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Sv(r.status,r.statusText,r.data)}catch{}}function Ov(i,{relative:r}={}){Ue(Xl(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:o}=S.useContext(kt),{hash:f,pathname:h,search:g}=Ql(i,{relative:r}),j=h;return c!=="/"&&(j=h==="/"?c:Lt([c,h])),o.createHref({pathname:j,search:g,hash:f})}function Xl(){return S.useContext(Zl)!=null}function Ut(){return Ue(Xl(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Zl).location}var Fh="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Wh(i){S.useContext(kt).static||S.useLayoutEffect(i)}function uc(){let{isDataRoute:i}=S.useContext(Xt);return i?Qv():kv()}function kv(){Ue(Xl(),"useNavigate() may be used only in the context of a <Router> component.");let i=S.useContext(Zn),{basename:r,navigator:c}=S.useContext(kt),{matches:o}=S.useContext(Xt),{pathname:f}=Ut(),h=JSON.stringify(Gh(o)),g=S.useRef(!1);return Wh(()=>{g.current=!0}),S.useCallback((v,p={})=>{if(qt(g.current,Fh),!g.current)return;if(typeof v=="number"){c.go(v);return}let b=lc(v,JSON.parse(h),f,p.relative==="path");i==null&&r!=="/"&&(b.pathname=b.pathname==="/"?r:Lt([r,b.pathname])),(p.replace?c.replace:c.push)(b,p.state,p)},[r,c,h,f,i])}S.createContext(null);function Ih(){let{matches:i}=S.useContext(Xt),r=i[i.length-1];return(r==null?void 0:r.params)??{}}function Ql(i,{relative:r}={}){let{matches:c}=S.useContext(Xt),{pathname:o}=Ut(),f=JSON.stringify(Gh(c));return S.useMemo(()=>lc(i,JSON.parse(f),o,r==="path"),[i,f,o,r])}function Uv(i,r){return Ph(i,r)}function Ph(i,r,c){var G;Ue(Xl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(kt),{matches:f}=S.useContext(Xt),h=f[f.length-1],g=h?h.params:{},j=h?h.pathname:"/",v=h?h.pathnameBase:"/",p=h&&h.route;{let Z=p&&p.path||"";tm(j,!p||Z.endsWith("*")||Z.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${j}" (under <Route path="${Z}">) 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.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${Z}"> to <Route path="${Z==="/"?"*":`${Z}/*`}">.`)}let b=Ut(),y;if(r){let Z=typeof r=="string"?Vn(r):r;Ue(v==="/"||((G=Z.pathname)==null?void 0:G.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 "${Z.pathname}" was given in the \`location\` prop.`),y=Z}else y=b;let w=y.pathname||"/",T=w;if(v!=="/"){let Z=v.replace(/^\//,"").split("/");T="/"+w.replace(/^\//,"").split("/").slice(Z.length).join("/")}let M=Lh(i,{pathname:T});qt(p||M!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),qt(M==null||M[M.length-1].route.element!==void 0||M[M.length-1].route.Component!==void 0||M[M.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let D=qv(M&&M.map(Z=>Object.assign({},Z,{params:Object.assign({},g,Z.params),pathname:Lt([v,o.encodeLocation?o.encodeLocation(Z.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Z.pathname]),pathnameBase:Z.pathnameBase==="/"?v:Lt([v,o.encodeLocation?o.encodeLocation(Z.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:Z.pathnameBase])})),f,c);return r&&D?S.createElement(Zl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},D):D}function Dv(){let i=Xv(),r=Cv(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),c=i instanceof Error?i.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},h={padding:"2px 4px",backgroundColor:o},g=null;return console.error("Error handled by React Router default ErrorBoundary:",i),g=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:h},"ErrorBoundary")," or"," ",S.createElement("code",{style:h},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},r),c?S.createElement("pre",{style:f},c):null,g)}var Hv=S.createElement(Dv,null),em=class extends S.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,r){return r.location!==i.location||r.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:r.error,location:r.location,revalidation:i.revalidation||r.revalidation}}componentDidCatch(i,r){this.props.onError?this.props.onError(i,r):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const c=Mv(i.digest);c&&(i=c)}let r=i!==void 0?S.createElement(Xt.Provider,{value:this.props.routeContext},S.createElement(ic.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?S.createElement(Bv,{error:i},r):r}};em.contextType=$h;var $r=new WeakMap;function Bv({children:i,error:r}){let{basename:c}=S.useContext(kt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let o=zv(r.digest);if(o){let f=$r.get(r);if(f)throw f;let h=Xh(o.location,c);if(Zh&&!$r.get(r))if(h.isExternal||o.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:o.replace}));throw $r.set(r,g),g}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return i}function Lv({routeContext:i,match:r,children:c}){let o=S.useContext(Zn);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),S.createElement(Xt.Provider,{value:i},c)}function qv(i,r=[],c){let o=c==null?void 0:c.state;if(i==null){if(!o)return null;if(o.errors)i=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)i=o.matches;else return null}let f=i,h=o==null?void 0:o.errors;if(h!=null){let b=f.findIndex(y=>y.route.id&&(h==null?void 0:h[y.route.id])!==void 0);Ue(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,b+1))}let g=!1,j=-1;if(c&&o){g=o.renderFallback;for(let b=0;b<f.length;b++){let y=f[b];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(j=b),y.route.id){let{loaderData:w,errors:T}=o,M=y.route.loader&&!w.hasOwnProperty(y.route.id)&&(!T||T[y.route.id]===void 0);if(y.route.lazy||M){c.isStatic&&(g=!0),j>=0?f=f.slice(0,j+1):f=[f[0]];break}}}}let v=c==null?void 0:c.onError,p=o&&v?(b,y)=>{var w,T;v(b,{location:o.location,params:((T=(w=o.matches)==null?void 0:w[0])==null?void 0:T.params)??{},unstable_pattern:Ev(o.matches),errorInfo:y})}:void 0;return f.reduceRight((b,y,w)=>{let T,M=!1,D=null,G=null;o&&(T=h&&y.route.id?h[y.route.id]:void 0,D=y.route.errorElement||Hv,g&&(j<0&&w===0?(tm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,G=null):j===w&&(M=!0,G=y.route.hydrateFallbackElement||null)));let Z=r.concat(f.slice(0,w+1)),V=()=>{let $;return T?$=D:M?$=G:y.route.Component?$=S.createElement(y.route.Component,null):y.route.element?$=y.route.element:$=b,S.createElement(Lv,{match:y,routeContext:{outlet:b,matches:Z,isDataRoute:o!=null},children:$})};return o&&(y.route.ErrorBoundary||y.route.errorElement||w===0)?S.createElement(em,{location:o.location,revalidation:o.revalidation,component:D,error:T,children:V(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:p}):V()},null)}function sc(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Yv(i){let r=S.useContext(Zn);return Ue(r,sc(i)),r}function Gv(i){let r=S.useContext(bu);return Ue(r,sc(i)),r}function Vv(i){let r=S.useContext(Xt);return Ue(r,sc(i)),r}function rc(i){let r=Vv(i),c=r.matches[r.matches.length-1];return Ue(c.route.id,`${i} can only be used on routes that contain a unique "id"`),c.route.id}function Zv(){return rc("useRouteId")}function Xv(){var o;let i=S.useContext(ic),r=Gv("useRouteError"),c=rc("useRouteError");return i!==void 0?i:(o=r.errors)==null?void 0:o[c]}function Qv(){let{router:i}=Yv("useNavigate"),r=rc("useNavigate"),c=S.useRef(!1);return Wh(()=>{c.current=!0}),S.useCallback(async(f,h={})=>{qt(c.current,Fh),c.current&&(typeof f=="number"?await i.navigate(f):await i.navigate(f,{fromRouteId:r,...h}))},[i,r])}var zh={};function tm(i,r,c){!r&&!zh[i]&&(zh[i]=!0,qt(!1,c))}S.memo($v);function $v({routes:i,future:r,state:c,isStatic:o,onError:f}){return Ph(i,void 0,{state:c,isStatic:o,onError:f})}function Ot(i){Ue(!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 Jv({basename:i="/",children:r=null,location:c,navigationType:o="POP",navigator:f,static:h=!1,unstable_useTransitions:g}){Ue(!Xl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=i.replace(/^\/*/,"/"),v=S.useMemo(()=>({basename:j,navigator:f,static:h,unstable_useTransitions:g,future:{}}),[j,f,h,g]);typeof c=="string"&&(c=Vn(c));let{pathname:p="/",search:b="",hash:y="",state:w=null,key:T="default",unstable_mask:M}=c,D=S.useMemo(()=>{let G=oa(p,j);return G==null?null:{location:{pathname:G,search:b,hash:y,state:w,key:T,unstable_mask:M},navigationType:o}},[j,p,b,y,w,T,o,M]);return qt(D!=null,`<Router basename="${j}"> is not able to match the URL "${p}${b}${y}" because it does not start with the basename, so the <Router> won't render anything.`),D==null?null:S.createElement(kt.Provider,{value:v},S.createElement(Zl.Provider,{children:r,value:D}))}function Kv({children:i,location:r}){return Uv(ec(i),r)}function ec(i,r=[]){let c=[];return S.Children.forEach(i,(o,f)=>{if(!S.isValidElement(o))return;let h=[...r,f];if(o.type===S.Fragment){c.push.apply(c,ec(o.props.children,h));return}Ue(o.type===Ot,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ue(!o.props.index||!o.props.children,"An index route cannot have child routes.");let g={id:o.props.id||h.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(g.children=ec(o.props.children,h)),c.push(g)}),c}var hu="get",mu="application/x-www-form-urlencoded";function xu(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function Fv(i){return xu(i)&&i.tagName.toLowerCase()==="button"}function Wv(i){return xu(i)&&i.tagName.toLowerCase()==="form"}function Iv(i){return xu(i)&&i.tagName.toLowerCase()==="input"}function Pv(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function eg(i,r){return i.button===0&&(!r||r==="_self")&&!Pv(i)}function tc(i=""){return new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((r,c)=>{let o=i[c];return r.concat(Array.isArray(o)?o.map(f=>[c,f]):[[c,o]])},[]))}function tg(i,r){let c=tc(i);return r&&r.forEach((o,f)=>{c.has(f)||r.getAll(f).forEach(h=>{c.append(f,h)})}),c}var du=null;function ag(){if(du===null)try{new FormData(document.createElement("form"),0),du=!1}catch{du=!0}return du}var ng=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jr(i){return i!=null&&!ng.has(i)?(qt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mu}"`),null):i}function lg(i,r){let c,o,f,h,g;if(Wv(i)){let j=i.getAttribute("action");o=j?oa(j,r):null,c=i.getAttribute("method")||hu,f=Jr(i.getAttribute("enctype"))||mu,h=new FormData(i)}else if(Fv(i)||Iv(i)&&(i.type==="submit"||i.type==="image")){let j=i.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let v=i.getAttribute("formaction")||j.getAttribute("action");if(o=v?oa(v,r):null,c=i.getAttribute("formmethod")||j.getAttribute("method")||hu,f=Jr(i.getAttribute("formenctype"))||Jr(j.getAttribute("enctype"))||mu,h=new FormData(j,i),!ag()){let{name:p,type:b,value:y}=i;if(b==="image"){let w=p?`${p}.`:"";h.append(`${w}x`,"0"),h.append(`${w}y`,"0")}else p&&h.append(p,y)}}else{if(xu(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=hu,o=null,f=mu,g=i}return h&&f==="text/plain"&&(g=h,h=void 0),{action:o,method:c.toLowerCase(),encType:f,formData:h,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function cc(i,r){if(i===!1||i===null||typeof i>"u")throw new Error(r)}function am(i,r,c,o){let f=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return c?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:r&&oa(f.pathname,r)==="/"?f.pathname=`${vu(r)}/_root.${o}`:f.pathname=`${vu(f.pathname)}.${o}`,f}async function ig(i,r){if(i.id in r)return r[i.id];try{let c=await import(i.module);return r[i.id]=c,c}catch(c){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ug(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function sg(i,r,c){let o=await Promise.all(i.map(async f=>{let h=r.routes[f.route.id];if(h){let g=await ig(h,c);return g.links?g.links():[]}return[]}));return dg(o.flat(1).filter(ug).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Mh(i,r,c,o,f,h){let g=(v,p)=>c[p]?v.route.id!==c[p].route.id:!0,j=(v,p)=>{var b;return c[p].pathname!==v.pathname||((b=c[p].route.path)==null?void 0:b.endsWith("*"))&&c[p].params["*"]!==v.params["*"]};return h==="assets"?r.filter((v,p)=>g(v,p)||j(v,p)):h==="data"?r.filter((v,p)=>{var y;let b=o.routes[v.route.id];if(!b||!b.hasLoader)return!1;if(g(v,p)||j(v,p))return!0;if(v.route.shouldRevalidate){let w=v.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((y=c[0])==null?void 0:y.params)||{},nextUrl:new URL(i,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function rg(i,r,{includeHydrateFallback:c}={}){return cg(i.map(o=>{let f=r.routes[o.route.id];if(!f)return[];let h=[f.module];return f.clientActionModule&&(h=h.concat(f.clientActionModule)),f.clientLoaderModule&&(h=h.concat(f.clientLoaderModule)),c&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function cg(i){return[...new Set(i)]}function og(i){let r={},c=Object.keys(i).sort();for(let o of c)r[o]=i[o];return r}function dg(i,r){let c=new Set;return new Set(r),i.reduce((o,f)=>{let h=JSON.stringify(og(f));return c.has(h)||(c.add(h),o.push({key:h,link:f})),o},[])}function oc(){let i=S.useContext(Zn);return cc(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function fg(){let i=S.useContext(bu);return cc(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var dc=S.createContext(void 0);dc.displayName="FrameworkContext";function fc(){let i=S.useContext(dc);return cc(i,"You must render this element inside a <HydratedRouter> element"),i}function hg(i,r){let c=S.useContext(dc),[o,f]=S.useState(!1),[h,g]=S.useState(!1),{onFocus:j,onBlur:v,onMouseEnter:p,onMouseLeave:b,onTouchStart:y}=r,w=S.useRef(null);S.useEffect(()=>{if(i==="render"&&g(!0),i==="viewport"){let D=Z=>{Z.forEach(V=>{g(V.isIntersecting)})},G=new IntersectionObserver(D,{threshold:.5});return w.current&&G.observe(w.current),()=>{G.disconnect()}}},[i]),S.useEffect(()=>{if(o){let D=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(D)}}},[o]);let T=()=>{f(!0)},M=()=>{f(!1),g(!1)};return c?i!=="intent"?[h,w,{}]:[h,w,{onFocus:ql(j,T),onBlur:ql(v,M),onMouseEnter:ql(p,T),onMouseLeave:ql(b,M),onTouchStart:ql(y,T)}]:[!1,w,{}]}function ql(i,r){return c=>{i&&i(c),c.defaultPrevented||r(c)}}function mg({page:i,...r}){let c=wv(),{router:o}=oc(),f=S.useMemo(()=>Lh(o.routes,i,o.basename),[o.routes,i,o.basename]);return f?c?S.createElement(vg,{page:i,matches:f,...r}):S.createElement(gg,{page:i,matches:f,...r}):null}function pg(i){let{manifest:r,routeModules:c}=fc(),[o,f]=S.useState([]);return S.useEffect(()=>{let h=!1;return sg(i,r,c).then(g=>{h||f(g)}),()=>{h=!0}},[i,r,c]),o}function vg({page:i,matches:r,...c}){let o=Ut(),{future:f}=fc(),{basename:h}=oc(),g=S.useMemo(()=>{if(i===o.pathname+o.search+o.hash)return[];let j=am(i,h,f.unstable_trailingSlashAwareDataRequests,"rsc"),v=!1,p=[];for(let b of r)typeof b.route.shouldRevalidate=="function"?v=!0:p.push(b.route.id);return v&&p.length>0&&j.searchParams.set("_routes",p.join(",")),[j.pathname+j.search]},[h,f.unstable_trailingSlashAwareDataRequests,i,o,r]);return S.createElement(S.Fragment,null,g.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...c})))}function gg({page:i,matches:r,...c}){let o=Ut(),{future:f,manifest:h,routeModules:g}=fc(),{basename:j}=oc(),{loaderData:v,matches:p}=fg(),b=S.useMemo(()=>Mh(i,r,p,h,o,"data"),[i,r,p,h,o]),y=S.useMemo(()=>Mh(i,r,p,h,o,"assets"),[i,r,p,h,o]),w=S.useMemo(()=>{if(i===o.pathname+o.search+o.hash)return[];let D=new Set,G=!1;if(r.forEach(V=>{var le;let $=h.routes[V.route.id];!$||!$.hasLoader||(!b.some(J=>J.route.id===V.route.id)&&V.route.id in v&&((le=g[V.route.id])!=null&&le.shouldRevalidate)||$.hasClientLoader?G=!0:D.add(V.route.id))}),D.size===0)return[];let Z=am(i,j,f.unstable_trailingSlashAwareDataRequests,"data");return G&&D.size>0&&Z.searchParams.set("_routes",r.filter(V=>D.has(V.route.id)).map(V=>V.route.id).join(",")),[Z.pathname+Z.search]},[j,f.unstable_trailingSlashAwareDataRequests,v,o,h,b,r,i,g]),T=S.useMemo(()=>rg(y,h),[y,h]),M=pg(y);return S.createElement(S.Fragment,null,w.map(D=>S.createElement("link",{key:D,rel:"prefetch",as:"fetch",href:D,...c})),T.map(D=>S.createElement("link",{key:D,rel:"modulepreload",href:D,...c})),M.map(({key:D,link:G})=>S.createElement("link",{key:D,nonce:c.nonce,...G,crossOrigin:G.crossOrigin??c.crossOrigin})))}function yg(...i){return r=>{i.forEach(c=>{typeof c=="function"?c(r):c!=null&&(c.current=r)})}}var bg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{bg&&(window.__reactRouterVersion="7.14.2")}catch{}function xg({basename:i,children:r,unstable_useTransitions:c,window:o}){let f=S.useRef();f.current==null&&(f.current=P1({window:o,v5Compat:!0}));let h=f.current,[g,j]=S.useState({action:h.action,location:h.location}),v=S.useCallback(p=>{c===!1?j(p):S.startTransition(()=>j(p))},[c]);return S.useLayoutEffect(()=>h.listen(v),[h,v]),S.createElement(Jv,{basename:i,children:r,location:g.location,navigationType:g.action,navigator:h,unstable_useTransitions:c})}var nm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Je=S.forwardRef(function({onClick:r,discover:c="render",prefetch:o="none",relative:f,reloadDocument:h,replace:g,unstable_mask:j,state:v,target:p,to:b,preventScrollReset:y,viewTransition:w,unstable_defaultShouldRevalidate:T,...M},D){let{basename:G,navigator:Z,unstable_useTransitions:V}=S.useContext(kt),$=typeof b=="string"&&nm.test(b),le=Xh(b,G);b=le.to;let J=Ov(b,{relative:f}),Y=Ut(),C=null;if(j){let Ye=lc(j,[],Y.unstable_mask?Y.unstable_mask.pathname:"/",!0);G!=="/"&&(Ye.pathname=Ye.pathname==="/"?G:Lt([G,Ye.pathname])),C=Z.createHref(Ye)}let[k,X,ve]=hg(o,M),te=Eg(b,{replace:g,unstable_mask:j,state:v,target:p,preventScrollReset:y,relative:f,viewTransition:w,unstable_defaultShouldRevalidate:T,unstable_useTransitions:V});function he(Ye){r&&r(Ye),Ye.defaultPrevented||te(Ye)}let Qe=!(le.isExternal||h),St=S.createElement("a",{...M,...ve,href:(Qe?C:void 0)||le.absoluteURL||J,onClick:Qe?he:r,ref:yg(D,X),target:p,"data-discover":!$&&c==="render"?"true":void 0});return k&&!$?S.createElement(S.Fragment,null,St,S.createElement(mg,{page:J})):St});Je.displayName="Link";var jg=S.forwardRef(function({"aria-current":r="page",caseSensitive:c=!1,className:o="",end:f=!1,style:h,to:g,viewTransition:j,children:v,...p},b){let y=Ql(g,{relative:p.relative}),w=Ut(),T=S.useContext(bu),{navigator:M,basename:D}=S.useContext(kt),G=T!=null&&Rg(y)&&j===!0,Z=M.encodeLocation?M.encodeLocation(y).pathname:y.pathname,V=w.pathname,$=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;c||(V=V.toLowerCase(),$=$?$.toLowerCase():null,Z=Z.toLowerCase()),$&&D&&($=oa($,D)||$);const le=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let J=V===Z||!f&&V.startsWith(Z)&&V.charAt(le)==="/",Y=$!=null&&($===Z||!f&&$.startsWith(Z)&&$.charAt(Z.length)==="/"),C={isActive:J,isPending:Y,isTransitioning:G},k=J?r:void 0,X;typeof o=="function"?X=o(C):X=[o,J?"active":null,Y?"pending":null,G?"transitioning":null].filter(Boolean).join(" ");let ve=typeof h=="function"?h(C):h;return S.createElement(Je,{...p,"aria-current":k,className:X,ref:b,style:ve,to:g,viewTransition:j},typeof v=="function"?v(C):v)});jg.displayName="NavLink";var Sg=S.forwardRef(({discover:i="render",fetcherKey:r,navigate:c,reloadDocument:o,replace:f,state:h,method:g=hu,action:j,onSubmit:v,relative:p,preventScrollReset:b,viewTransition:y,unstable_defaultShouldRevalidate:w,...T},M)=>{let{unstable_useTransitions:D}=S.useContext(kt),G=Tg(),Z=_g(j,{relative:p}),V=g.toLowerCase()==="get"?"get":"post",$=typeof j=="string"&&nm.test(j),le=J=>{if(v&&v(J),J.defaultPrevented)return;J.preventDefault();let Y=J.nativeEvent.submitter,C=(Y==null?void 0:Y.getAttribute("formmethod"))||g,k=()=>G(Y||J.currentTarget,{fetcherKey:r,method:C,navigate:c,replace:f,state:h,relative:p,preventScrollReset:b,viewTransition:y,unstable_defaultShouldRevalidate:w});D&&c!==!1?S.startTransition(()=>k()):k()};return S.createElement("form",{ref:M,method:V,action:Z,onSubmit:o?v:le,...T,"data-discover":!$&&i==="render"?"true":void 0})});Sg.displayName="Form";function Cg(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lm(i){let r=S.useContext(Zn);return Ue(r,Cg(i)),r}function Eg(i,{target:r,replace:c,unstable_mask:o,state:f,preventScrollReset:h,relative:g,viewTransition:j,unstable_defaultShouldRevalidate:v,unstable_useTransitions:p}={}){let b=uc(),y=Ut(),w=Ql(i,{relative:g});return S.useCallback(T=>{if(eg(T,r)){T.preventDefault();let M=c!==void 0?c:Gl(y)===Gl(w),D=()=>b(i,{replace:M,unstable_mask:o,state:f,preventScrollReset:h,relative:g,viewTransition:j,unstable_defaultShouldRevalidate:v});p?S.startTransition(()=>D()):D()}},[y,b,w,c,o,f,r,i,h,g,j,v,p])}function im(i){qt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let r=S.useRef(tc(i)),c=S.useRef(!1),o=Ut(),f=S.useMemo(()=>tg(o.search,c.current?null:r.current),[o.search]),h=uc(),g=S.useCallback((j,v)=>{const p=tc(typeof j=="function"?j(new URLSearchParams(f)):j);c.current=!0,h("?"+p,v)},[h,f]);return[f,g]}var Ng=0,wg=()=>`__${String(++Ng)}__`;function Tg(){let{router:i}=lm("useSubmit"),{basename:r}=S.useContext(kt),c=Zv(),o=i.fetch,f=i.navigate;return S.useCallback(async(h,g={})=>{let{action:j,method:v,encType:p,formData:b,body:y}=lg(h,r);if(g.navigate===!1){let w=g.fetcherKey||wg();await o(w,c,g.action||j,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:b,body:y,formMethod:g.method||v,formEncType:g.encType||p,flushSync:g.flushSync})}else await f(g.action||j,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:b,body:y,formMethod:g.method||v,formEncType:g.encType||p,replace:g.replace,state:g.state,fromRouteId:c,flushSync:g.flushSync,viewTransition:g.viewTransition})},[o,f,r,c])}function _g(i,{relative:r}={}){let{basename:c}=S.useContext(kt),o=S.useContext(Xt);Ue(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),h={...Ql(i||".",{relative:r})},g=Ut();if(i==null){h.search=g.search;let j=new URLSearchParams(h.search),v=j.getAll("index");if(v.some(b=>b==="")){j.delete("index"),v.filter(y=>y).forEach(y=>j.append("index",y));let b=j.toString();h.search=b?`?${b}`:""}}return(!i||i===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(h.pathname=h.pathname==="/"?c:Lt([c,h.pathname])),Gl(h)}function Rg(i,{relative:r}={}){let c=S.useContext(Jh);Ue(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=lm("useViewTransitionState"),f=Ql(i,{relative:r});if(!c.isTransitioning)return!1;let h=oa(c.currentLocation.pathname,o)||c.currentLocation.pathname,g=oa(c.nextLocation.pathname,o)||c.nextLocation.pathname;return pu(f.pathname,g)!=null||pu(f.pathname,h)!=null}const Ag='<path d="M23.1599 14.9453C22.7429 14.9429 22.3775 15.2985 22.375 15.7204C22.3726 16.1374 22.7282 16.5028 23.1501 16.5053C23.567 16.5077 23.9325 16.1521 23.935 15.7302C23.9374 15.3108 23.5793 14.9478 23.1599 14.9453Z" fill="currentColor"/><path d="M15.758 22.3758C15.3435 22.3562 14.9657 22.702 14.9461 23.1214C14.9265 23.5359 15.2723 23.9137 15.6917 23.9333C16.1063 23.9529 16.484 23.6071 16.5036 23.1877C16.5232 22.7731 16.1774 22.3954 15.758 22.3758Z" fill="currentColor"/><path d="M23.1208 9.08552C23.5721 9.10024 23.9375 8.76176 23.9473 8.31291C23.9571 7.86161 23.6137 7.50351 23.1649 7.49615C22.7308 7.49124 22.3825 7.81746 22.3604 8.24668C22.3383 8.70044 22.6744 9.06835 23.1208 9.08307V9.08552Z" fill="currentColor"/><path d="M8.32678 22.3598C7.87547 22.3451 7.51002 22.6836 7.50021 23.1324C7.49039 23.5837 7.83378 23.9418 8.28263 23.9492C8.73393 23.9541 9.08712 23.6058 9.08712 23.1545C9.08712 22.7032 8.75601 22.3746 8.32678 22.3598Z" fill="currentColor"/><path d="M23.1502 12.8994C23.6113 12.9019 24.0135 12.4947 24.0013 12.0361C23.9914 11.5897 23.6039 11.2095 23.16 11.207C22.6989 11.2046 22.2966 11.6117 22.3089 12.0704C22.3187 12.5143 22.7062 12.897 23.1502 12.8994Z" fill="currentColor"/><path d="M12.9002 23.1849C12.9198 22.7459 12.5568 22.3436 12.1079 22.3068C11.6542 22.2725 11.2299 22.6551 11.2078 23.1162C11.1882 23.5553 11.5512 23.9575 12 23.9943C12.4538 24.0287 12.8781 23.646 12.9002 23.1849Z" fill="currentColor"/><path d="M19.4899 20.3568C19.9829 20.3544 20.368 19.9595 20.3582 19.464C20.3508 18.9882 19.9755 18.6129 19.4997 18.6056C19.0067 18.5982 18.6118 18.9833 18.6094 19.4763C18.6094 19.9693 18.9969 20.3593 19.4899 20.3544V20.3568Z" fill="currentColor"/><path d="M0.946568 14.8555C0.483002 14.8555 0.0881117 15.243 0.0783008 15.7066C0.0684898 16.1873 0.470738 16.5994 0.951474 16.5969C1.41504 16.5969 1.80993 16.2094 1.81974 15.7458C1.82955 15.2651 1.4273 14.853 0.946568 14.8555Z" fill="currentColor"/><path d="M15.6895 1.82027C16.1678 1.83989 16.5872 1.445 16.597 0.964263C16.6044 0.500696 16.2267 0.0984479 15.7631 0.0788261C15.2848 0.0592042 14.8654 0.454094 14.8556 0.93483C14.8482 1.3984 15.2259 1.80065 15.6895 1.82027Z" fill="currentColor"/><path d="M0.928315 9.18321C1.44829 9.19302 1.84073 8.81285 1.84073 8.29532C1.84073 7.79742 1.47037 7.41479 0.974917 7.40253C0.454937 7.39272 0.0625 7.77289 0.0625 8.29042C0.0625 8.79078 0.432863 9.17095 0.928315 9.18321Z" fill="currentColor"/><path d="M8.33104 0.0630625C7.81106 0.0458934 7.41126 0.423614 7.40636 0.938689C7.399 1.43905 7.76691 1.82658 8.25991 1.84129C8.76272 1.85601 9.15761 1.50036 9.18459 1.00982C9.21157 0.489838 8.84121 0.0777789 8.33349 0.0630625H8.33104Z" fill="currentColor"/><path d="M19.483 3.67042C18.9728 3.67042 18.5362 4.1021 18.5313 4.61227C18.524 5.11999 18.9532 5.56148 19.4634 5.57374C19.9858 5.58846 20.4445 5.1347 20.4371 4.60982C20.4298 4.09965 19.9932 3.66797 19.483 3.66797V3.67042Z" fill="currentColor"/><path d="M0.976227 11.102C0.456247 11.0849 -0.00486668 11.5411 3.87869e-05 12.0611C0.00494425 12.5663 0.441531 13.0029 0.946794 13.0029C1.45206 13.0029 1.8911 12.5737 1.90091 12.066C1.91072 11.5631 1.48394 11.1192 0.976227 11.102Z" fill="currentColor"/><path d="M12.0584 4.16361e-05C11.5531 -0.00486383 11.1116 0.424365 11.1018 0.93208C11.0895 1.45206 11.5457 1.91072 12.0657 1.90091C12.571 1.8911 13.0051 1.45206 13.0002 0.946797C12.9978 0.441534 12.5636 0.0049471 12.0584 4.16361e-05Z" fill="currentColor"/><path d="M4.65891 18.5322C4.13894 18.5077 3.67046 18.9516 3.66801 19.479C3.6631 19.9867 4.09233 20.4257 4.6025 20.438C5.11022 20.4478 5.55416 20.0259 5.57133 19.5133C5.59095 19.0081 5.16908 18.5567 4.65891 18.5322Z" fill="currentColor"/><path d="M4.58641 5.65236C5.13337 5.67443 5.62637 5.21332 5.64845 4.65654C5.67052 4.10959 5.20941 3.61659 4.65264 3.59451C4.10568 3.57244 3.61268 4.03355 3.5906 4.59032C3.56853 5.13728 4.02964 5.63028 4.58641 5.65236Z" fill="currentColor"/><path d="M19.5008 16.8099C20.1017 16.8 20.5726 16.3169 20.5677 15.7159C20.5628 15.115 20.087 14.6392 19.4836 14.6367C18.8803 14.6343 18.402 15.1077 18.3946 15.7086C18.3873 16.3267 18.8803 16.8197 19.5008 16.8074V16.8099Z" fill="currentColor"/><path d="M15.7209 20.5694C16.3218 20.5694 16.8025 20.0985 16.8099 19.4976C16.8172 18.8967 16.3488 18.411 15.7478 18.3988C15.1298 18.384 14.6318 18.8746 14.6368 19.4927C14.6417 20.0936 15.1199 20.5694 15.7209 20.5719V20.5694Z" fill="currentColor"/><path d="M9.42652 19.4702C9.41916 18.8644 8.9188 18.364 8.31298 18.3518C7.69243 18.3395 7.1651 18.8546 7.16019 19.4751C7.15529 20.0981 7.67281 20.6157 8.29581 20.6157C8.9188 20.6157 9.43388 20.0908 9.42652 19.4702Z" fill="currentColor"/><path d="M19.4553 7.16016C18.8495 7.17487 18.354 7.68259 18.3516 8.28841C18.3491 8.91141 18.8666 9.42893 19.4896 9.42403C20.1126 9.41912 20.6253 8.89669 20.6154 8.27615C20.6056 7.65316 20.0734 7.14544 19.4553 7.16261V7.16016Z" fill="currentColor"/><path d="M15.7219 5.79748C16.3817 5.79748 16.9115 5.26034 16.8993 4.60055C16.887 3.95793 16.3695 3.44531 15.7244 3.44531C15.0793 3.44531 14.5348 3.98246 14.5471 4.64225C14.5593 5.28732 15.0793 5.79748 15.7219 5.79748Z" fill="currentColor"/><path d="M4.63052 16.9006C5.27559 16.8957 5.78821 16.3806 5.79557 15.738C5.80292 15.0782 5.27068 14.5435 4.6109 14.5509C3.94866 14.5582 3.42623 15.0978 3.44585 15.7576C3.46302 16.4002 3.9879 16.9055 4.63052 16.9006Z" fill="currentColor"/><path d="M12.0637 20.6756C12.7088 20.6683 13.2533 20.1115 13.246 19.4714C13.2386 18.8263 12.6818 18.2818 12.0417 18.2891C11.3966 18.2965 10.8521 18.8533 10.8594 19.4934C10.8668 20.1385 11.4211 20.683 12.0637 20.6756Z" fill="currentColor"/><path d="M19.4762 10.8594C18.8312 10.8618 18.2842 11.4137 18.2891 12.0563C18.2915 12.7014 18.8434 13.2483 19.486 13.2434C20.1311 13.241 20.6781 12.6891 20.6732 12.0465C20.6682 11.4039 20.1188 10.8569 19.4762 10.8594Z" fill="currentColor"/><path d="M8.31147 5.84627C8.98106 5.83645 9.52067 5.28459 9.51576 4.61499C9.51085 3.9454 8.9639 3.40089 8.29675 3.39844C7.62716 3.39844 7.07774 3.93804 7.07038 4.60764C7.06303 5.2944 7.6247 5.85362 8.31147 5.84627Z" fill="currentColor"/><path d="M4.64934 7.0706C3.96257 7.05588 3.39599 7.6102 3.39845 8.29942C3.39845 8.96902 3.94541 9.51597 4.615 9.51843C5.2846 9.52088 5.83646 8.98128 5.84382 8.31168C5.85118 7.64209 5.31648 7.08532 4.64689 7.0706H4.64934Z" fill="currentColor"/><path d="M12.0484 5.91679C12.7376 5.92169 13.3312 5.34285 13.3508 4.64873C13.3704 3.94479 12.7671 3.32916 12.0607 3.32425C11.3715 3.31934 10.7779 3.89819 10.7583 4.59231C10.7387 5.29625 11.3396 5.91434 12.0484 5.91679Z" fill="currentColor"/><path d="M4.58021 13.3473C5.28169 13.3743 5.90469 12.7783 5.91695 12.0695C5.92921 11.3827 5.35528 10.7818 4.66115 10.7548C3.95967 10.7278 3.33668 11.3238 3.32441 12.0327C3.31215 12.7194 3.88609 13.3203 4.58021 13.3473Z" fill="currentColor"/><path d="M15.7193 14.3359C14.9687 14.3359 14.3335 14.9761 14.3359 15.7266C14.3359 16.4772 14.9761 17.1124 15.7266 17.11C16.4772 17.11 17.1124 16.4698 17.11 15.7193C17.1075 14.9687 16.4698 14.3335 15.7193 14.3359Z" fill="currentColor"/><path d="M15.7407 9.73609C16.5428 9.72628 17.1756 9.0763 17.1658 8.27671C17.156 7.47712 16.506 6.84186 15.7064 6.85167C14.9068 6.86149 14.2716 7.51146 14.2814 8.31105C14.2912 9.11064 14.9411 9.7459 15.7407 9.73609Z" fill="currentColor"/><path d="M8.2987 14.2813C7.50156 14.2764 6.8565 14.9165 6.85159 15.7161C6.84669 16.5133 7.48685 17.1583 8.28644 17.1632C9.08358 17.1681 9.72865 16.528 9.73355 15.7284C9.73601 14.9313 9.09584 14.2862 8.2987 14.2813Z" fill="currentColor"/><path d="M8.2854 9.79467C9.12669 9.79712 9.78647 9.15696 9.79874 8.32057C9.811 7.45967 9.15857 6.79007 8.30257 6.78516C7.46128 6.78271 6.8015 7.42533 6.78923 8.25926C6.77697 9.12017 7.4294 9.78976 8.2854 9.79467Z" fill="currentColor"/><path d="M15.7268 10.5156C14.8757 10.5156 14.1644 11.2343 14.184 12.0829C14.2036 12.9242 14.9075 13.6061 15.7415 13.5914C16.5803 13.5766 17.2671 12.8801 17.2622 12.0461C17.2573 11.2097 16.5631 10.5181 15.7268 10.5156Z" fill="currentColor"/><path d="M12.0588 14.1836C11.2077 14.1787 10.4964 14.8998 10.516 15.7485C10.5356 16.5897 11.2371 17.2716 12.0686 17.2593C12.9074 17.2471 13.5942 16.553 13.5917 15.7166C13.5893 14.8802 12.8976 14.1885 12.0612 14.1836H12.0588Z" fill="currentColor"/><path d="M12.0397 6.66802C11.1568 6.67538 10.4356 7.39894 10.4258 8.28192C10.4185 9.17717 11.1666 9.92525 12.0618 9.91789C12.9448 9.91054 13.6659 9.18698 13.6757 8.304C13.6831 7.40875 12.935 6.66066 12.0397 6.66802Z" fill="currentColor"/><path d="M8.29197 13.6757C9.1725 13.6757 9.90096 12.9619 9.91813 12.074C9.9353 11.1812 9.19212 10.4282 8.29442 10.4258C7.41389 10.4258 6.68543 11.1395 6.66826 12.0274C6.65109 12.9202 7.39427 13.6732 8.29197 13.6757Z" fill="currentColor"/><path d="M12.0638 10.2891C11.068 10.2842 10.2905 11.0568 10.293 12.0526C10.293 13.0288 11.0533 13.8014 12.0222 13.8137C13.0204 13.8259 13.8077 13.0631 13.8151 12.0722C13.8225 11.074 13.0548 10.294 12.0638 10.2891Z" fill="currentColor"/>';function zg({size:i=20,idSuffix:r,className:c}){const o=`pc-brand-mark-clip-${r}`;return u.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:c,dangerouslySetInnerHTML:{__html:`<g clip-path="url(#${o})">${Ag}</g><defs><clipPath id="${o}"><rect width="24" height="24" fill="white"/></clipPath></defs>`}})}const um="Parachute";let an=null,Yl=null;const Mg=3e4;function Og(){return"/admin/host-admin-token"}function kg(){const i=`${window.location.pathname}${window.location.search}`;return`/login?next=${encodeURIComponent(i)}`}function sm(){return window.location.replace(kg()),new Promise(()=>{})}function Ug(){return window.location.replace("/account/"),new Promise(()=>{})}async function Ne(){const i=Date.now();return an&&an.expiresAt-i>Mg?an.token:Yl||(Yl=Dg().finally(()=>{Yl=null}),Yl)}async function Dg(){const i=await fetch(Og(),{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(i.status===401)return an=null,sm();if(i.status===403)return an=null,Ug();if(!i.ok)throw new Error(`/admin/host-admin-token failed: ${i.status} ${await i.text()}`);const r=await i.json();if(!r.token||!r.expires_at)throw new Error("/admin/host-admin-token returned malformed body");return an={token:r.token,expiresAt:new Date(r.expires_at).getTime()},r.token}function xe(){an=null}class Q extends Error{constructor(r,c){super(c),this.status=r,this.name="HttpError"}}async function Hg(){const i=await fetch("/.well-known/parachute.json",{headers:{accept:"application/json"}});if(!i.ok)throw new Q(i.status,`well-known fetch failed: ${i.status}`);const r=await i.json(),c=r.vaults??[],o=r.services??[];return{moduleInstalled:o.some(h=>h.name==="parachute-vault"||h.name.startsWith("parachute-vault-")),vaults:c.map(h=>{const g={name:h.name,url:h.url,version:h.version,path:Bg(h.name,h.url,o)};return h.managementUrl&&(g.managementUrl=h.managementUrl),g})}}function Bg(i,r,c){const o=c.find(f=>f.name===`parachute-vault-${i}`||f.path===`/vault/${i}`);if(o)return o.path;try{return new URL(r).pathname}catch{return`/vault/${i}`}}async function Lg(i){const r=await Ne(),c=await fetch("/vaults",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(i)});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));const o=c.status===201,f=await c.json(),h={name:f.name,url:f.url,version:f.version,created:o};return f.token&&(h.token=f.token),f.token_guidance&&(h.tokenGuidance=f.token_guidance),f.paths&&(h.paths=f.paths),h}async function rm(i){const r=await fetch(`/admin/vault-admin-token/${encodeURIComponent(i)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(r.status===401)return sm();if(!r.ok)throw new Q(r.status,await W(r));const c=await r.json();if(!c.token||!c.expires_at)throw new Q(500,"/admin/vault-admin-token returned malformed body");return{token:c.token,expiresAt:c.expires_at,scopes:c.scopes??[]}}async function qg(i){var g,j;const r=await rm(i),c=await fetch(`/vault/${encodeURIComponent(i)}/.parachute/usage`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r.token}`}});if(!c.ok)throw new Q(c.status,await W(c));const o=await c.json(),f=(g=o.counts)==null?void 0:g.notes,h=(j=o.bytes)==null?void 0:j.total;if(typeof f!="number"||typeof h!="number")throw new Q(500,"/.parachute/usage returned malformed body");return{notes:f,totalBytes:h}}function Yg(i){if(!Number.isFinite(i)||i<0)return"0 B";if(i<1024)return`${Math.round(i)} B`;const r=i/1024;if(r<1024)return`${Math.round(r)} KB`;const c=r/1024;return c<1024?`${c.toFixed(1)} MB`:`${(c/1024).toFixed(1)} GB`}async function Gg(i={}){const r=await Ne(),c=i.vault?`?vault=${encodeURIComponent(i.vault)}`:"",o=await fetch(`/api/grants${c}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(o.status===401||o.status===403)throw xe(),new Q(o.status,await W(o));if(!o.ok)throw new Q(o.status,await W(o));return(await o.json()).grants??[]}async function Vg(i){const r=await Ne(),c=await fetch(`/api/grants/${encodeURIComponent(i)}`,{method:"DELETE",headers:{authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c))}async function Zg(){const i=await fetch("/api/me",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!i.ok)throw new Q(i.status,await W(i));return await i.json()}async function Xg(i){const r=new URLSearchParams({__csrf:i}),c=await fetch("/logout",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"text/html, application/json"},credentials:"same-origin",body:r,redirect:"manual"});if(!(c.status===0||c.ok||c.status===302))throw new Q(c.status,await W(c))}function Qg(i,r){if(/^https?:\/\//i.test(r))return r;const c=i.replace(/\/+$/,""),o=r.startsWith("/")?r:`/${r}`;return`${c}${o}`}async function Oh(i={}){const r=new URLSearchParams;i.revoked&&r.set("revoked",i.revoked),i.subject&&r.set("subject",i.subject),i.createdVia&&r.set("created_via",i.createdVia),i.cursor&&r.set("cursor",i.cursor);const c=r.toString(),o=c?`/api/auth/tokens?${c}`:"/api/auth/tokens",f=await Ne(),h=await fetch(o,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${f}`}});if(h.status===401||h.status===403)throw xe(),new Q(h.status,await W(h));if(!h.ok)throw new Q(h.status,await W(h));return await h.json()}async function cm(i){const r=await Ne(),c=await fetch("/api/auth/mint-token",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(i)});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return await c.json()}async function $g(i){const r=await Ne(),c=await fetch("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({jti:i})});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return await c.json()}async function Jg(i){const r=await Ne(),c=await fetch(`/api/oauth/clients/${encodeURIComponent(i)}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return await c.json()}async function Kg(i,r){const o={method:"POST",headers:{accept:"application/json",authorization:`Bearer ${await Ne()}`}};r!==void 0&&(o.headers={...o.headers,"content-type":"application/json"},o.body=JSON.stringify({return_to:r}));const f=await fetch(`/api/oauth/clients/${encodeURIComponent(i)}/approve`,o);if(f.status===401||f.status===403)throw xe(),new Q(f.status,await W(f));if(!f.ok)throw new Q(f.status,await W(f));return await f.json()}async function om(){const i=await Ne(),r=await fetch("/api/modules",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return await r.json()}async function ju(i,r){const c=await Ne();return await fetch(`/api/modules/${encodeURIComponent(i)}/${r}`,{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${c}`}})}async function Fg(i){const r=await ju(i,"install");if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return(await r.json()).operation_id}async function Wg(i){const r=await ju(i,"upgrade");if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return(await r.json()).operation_id}async function Ig(i){const r=await ju(i,"restart");if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return await r.json()}async function Pg(i){const r=await ju(i,"uninstall");if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return await r.json()}async function ey(i){const r=await Ne(),c=await fetch("/api/modules/channel",{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({channel:i})});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return(await c.json()).channel}async function dm(){const i=await Ne(),r=await fetch("/api/settings/hub-origin",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return await r.json()}async function kh(i){const r=await Ne(),c=await fetch("/api/settings/hub-origin",{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({hub_origin:i})});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return(await c.json()).hub_origin}async function ty(i){const r=await Ne(),c=await fetch(`/api/modules/${encodeURIComponent(i)}/config/schema`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(c.status===404){let o;try{o=(await c.clone().json()).error}catch{}if(o==="no_config_schema")return null;throw new Q(404,await W(c))}if(!c.ok)throw new Q(c.status,await W(c));return await c.json()}async function ay(i){const r=await Ne(),c=await fetch(`/api/modules/${encodeURIComponent(i)}/config`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(c.status===404)return{};if(!c.ok)throw new Q(c.status,await W(c));return await c.json()}async function ny(i,r){const c=await Ne(),o=await fetch(`/api/modules/${encodeURIComponent(i)}/config`,{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify(r)});if(o.status===401||o.status===403)throw xe(),new Q(o.status,await W(o));if(!o.ok)throw new Q(o.status,await W(o));return await o.json()}async function ly(i){const r=await Ne(),c=await fetch(`/api/modules/operations/${encodeURIComponent(i)}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return await c.json()}async function iy(){const i=await Ne(),r=await fetch("/api/users",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return(await r.json()).users??[]}async function uy(i){const r=await Ne(),c=await fetch("/api/users",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(i)});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return(await c.json()).user}async function sy(i){const r=await Ne(),c=await fetch(`/api/users/${encodeURIComponent(i)}`,{method:"DELETE",headers:{authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw c.status===401&&xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));const o=await c.json().catch(()=>({}));return{revocationLagSeconds:typeof o.revocation_lag_seconds=="number"?o.revocation_lag_seconds:60}}async function ry(i,r){const c=await Ne(),o=await fetch(`/api/users/${encodeURIComponent(i)}/reset-password`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({new_password:r})});if(o.status===401||o.status===403)throw o.status===401&&xe(),new Q(o.status,await W(o));if(!o.ok)throw new Q(o.status,await W(o));const f=await o.json().catch(()=>({}));return{revocationLagSeconds:typeof f.revocation_lag_seconds=="number"?f.revocation_lag_seconds:60}}async function cy(i,r){const c=await Ne(),o=await fetch(`/api/users/${encodeURIComponent(i)}/vaults`,{method:"PATCH",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({assigned_vaults:r})});if(o.status===401||o.status===403)throw o.status===401&&xe(),new Q(o.status,await W(o));if(!o.ok)throw new Q(o.status,await W(o))}async function oy(){const i=await Ne(),r=await fetch("/api/users/vaults",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return(await r.json()).vaults??[]}async function dy(){const i=await Ne(),r=await fetch("/api/invites",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return(await r.json()).invites??[]}async function fy(i){const r=await Ne(),c=await fetch("/api/invites",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(i)});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return await c.json()}async function hy(i){const r=await Ne(),c=await fetch(`/api/invites/${encodeURIComponent(i)}`,{method:"DELETE",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c))}async function ac(){const i=await Ne(),r=await fetch("/api/hub",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return await r.json()}async function my(i){const r=await Ne(),c=await fetch("/api/hub/upgrade",{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${r}`}});if(c.status===401||c.status===403)throw xe(),new Q(c.status,await W(c));if(!c.ok)throw new Q(c.status,await W(c));return await c.json()}async function py(){const i=await Ne(),r=await fetch("/api/hub/upgrade/status",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(r.status===404)return null;if(r.status===401||r.status===403)throw xe(),new Q(r.status,await W(r));if(!r.ok)throw new Q(r.status,await W(r));return await r.json()}async function W(i){try{const r=await i.text(),c=JSON.parse(r);if(c.error_description)return c.error_description;if(c.error)return c.error;if(r)return r}catch{}return`${i.status} ${i.statusText}`}const vy=3e4;function Uh(i){const r=Math.max(0,i),c=Math.floor(r/1e3);if(c<60)return`${c}s`;const o=Math.floor(c/60);if(o<60)return`${o}m`;const f=Math.floor(o/60);return f<24?`${f}h ${o%60}m`:`${Math.floor(f/24)}d ${f%24}h`}function Kr(i){const r=new Date(i);if(Number.isNaN(r.getTime()))return i;const c=o=>String(o).padStart(2,"0");return`${r.getUTCFullYear()}-${c(r.getUTCMonth()+1)}-${c(r.getUTCDate())} ${c(r.getUTCHours())}:${c(r.getUTCMinutes())}:${c(r.getUTCSeconds())} UTC`}function gy(i){var r;if(i.source==="container")return"container";if(i.source==="npm")return"npm";if(i.source==="bun-linked"){const c=(r=i.bun_linked_path)==null?void 0:r.split("/").filter(Boolean).pop();return c&&i.git_head?`bun-linked → ${c} @ ${i.git_head}`:c?`bun-linked → ${c}`:"bun-linked"}return"unknown"}function yy(){const[i,r]=S.useState(null),[c,o]=S.useState(!1),[f,h]=S.useState(!1),[g,j]=S.useState(null),v=S.useCallback(async()=>{h(!0);try{const p=await ac();r(p),j(new Date)}catch{}finally{h(!1)}},[]);return S.useEffect(()=>{v()},[v]),S.useEffect(()=>{const p=()=>{v()};window.addEventListener("focus",p);const b=window.setInterval(()=>{v()},vy);return()=>{window.removeEventListener("focus",p),window.clearInterval(b)}},[v]),i?u.jsxs("footer",{className:"hub-version-badge","data-testid":"hub-version-badge",children:[u.jsxs("button",{type:"button",className:"hub-version-badge-summary",onClick:()=>o(p=>!p),"aria-expanded":c,"data-testid":"hub-version-badge-summary",children:["Hub ",u.jsx("strong",{children:i.version})," · running"," ",u.jsx("span",{"data-testid":"hub-version-badge-uptime",children:Uh(i.uptime_ms)})," ·"," ",u.jsx("span",{className:"hub-version-badge-source","data-testid":"hub-version-badge-source",children:i.source})]}),c?u.jsxs("div",{className:"hub-version-badge-panel","data-testid":"hub-version-badge-panel",children:[u.jsxs("dl",{children:[u.jsx("dt",{children:"Hub"}),u.jsx("dd",{children:u.jsxs("code",{children:["@openparachute/hub ",i.version]})}),u.jsx("dt",{children:"Source"}),u.jsx("dd",{children:gy(i)}),u.jsx("dt",{children:"Started"}),u.jsxs("dd",{children:[Kr(i.started_at)," (",Uh(i.uptime_ms)," ago)"]}),i.container_build_time?u.jsxs(u.Fragment,{children:[u.jsx("dt",{children:"Built"}),u.jsx("dd",{children:Kr(i.container_build_time)})]}):null,i.render_commit?u.jsxs(u.Fragment,{children:[u.jsx("dt",{children:"Commit"}),u.jsxs("dd",{children:[u.jsx("code",{children:i.render_commit.slice(0,8)}),i.render_branch?u.jsxs(u.Fragment,{children:[" on ",u.jsx("code",{children:i.render_branch})]}):null]})]}):null,g?u.jsxs(u.Fragment,{children:[u.jsx("dt",{children:"Last checked"}),u.jsx("dd",{children:Kr(g.toISOString())})]}):null]}),u.jsx("button",{type:"button",className:"hub-version-badge-refresh secondary",onClick:()=>void v(),disabled:f,"data-testid":"hub-version-badge-refresh",children:f?"Refreshing…":"Refresh"})]}):null]}):null}function by(){const{clientId:i}=Ih(),r=i??"",[c]=im(),o=xy(c.get("return_to")),[f,h]=S.useState({kind:"loading"}),[g,j]=S.useState({kind:"idle"}),[v,p]=S.useState(0);S.useEffect(()=>{if(!r){h({kind:"error",message:"missing client id in URL"});return}let y=!1;return h({kind:"loading"}),Jg(r).then(w=>{y||(h({kind:"ok",client:w}),w.status==="approved"&&(j({kind:"approved",alreadyApproved:!0}),o&&window.location.assign(o)))}).catch(w=>{if(y)return;if(w instanceof Q&&w.status===404){h({kind:"not_found"});return}const T=w instanceof Error?w.message:String(w);h({kind:"error",message:T})}),()=>{y=!0}},[r,v,o]);async function b(){j({kind:"approving"});try{const y=await Kg(r,o||void 0);if(y.redirect_to&&fm(y.redirect_to)){window.location.assign(y.redirect_to);return}j({kind:"approved",alreadyApproved:y.already_approved})}catch(y){const w=y instanceof Q?`approve failed (${y.status}): ${y.message}`:y instanceof Error?y.message:String(y);j({kind:"error",message:w})}}return u.jsxs("div",{children:[u.jsx("div",{className:"list-header",children:u.jsx("h2",{children:"Approve app"})}),jy({loadState:f,action:g,onApprove:b,onRetry:()=>p(y=>y+1)})]})}function fm(i){return!(!i||!i.startsWith("/")||i.startsWith("//"))}function xy(i){return i===null?null:fm(i)?i:null}function jy({loadState:i,action:r,onApprove:c,onRetry:o}){if(i.kind==="loading")return u.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"});if(i.kind==="not_found")return u.jsxs("div",{className:"empty empty-rich",children:[u.jsx("p",{className:"empty-headline",children:"Unknown client."}),u.jsxs("p",{className:"muted",children:["This client_id isn't registered with this hub. The deep link may be stale, or the requesting app may have been registered against a different hub."," ",u.jsx(Je,{to:"/permissions",children:"Back to permissions"}),"."]})]});if(i.kind==="error")return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"error-banner",children:["Couldn't load the client: ",u.jsx("code",{children:i.message})]}),u.jsx("button",{type:"button",onClick:o,className:"secondary",children:"Retry"})]});const{client:f}=i,h=f.client_name??f.client_id;if(r.kind==="approved")return u.jsxs("div",{className:"empty empty-rich",children:[u.jsx("p",{className:"empty-headline",children:r.alreadyApproved?"Already approved.":"Approved."}),u.jsxs("p",{className:"muted",children:[u.jsx("code",{children:h})," ",r.alreadyApproved?"was already on this hub's approved list.":"can now run an OAuth flow with this hub."," ","Return to the app that sent you here and retry the action — the request will go through now."]}),u.jsx("p",{className:"muted",style:{marginTop:"1rem"},children:u.jsx(Je,{to:"/permissions",children:"View permissions"})})]});const g=r.kind==="approving",j=r.kind==="error"?r.message:null;return u.jsxs("div",{children:[u.jsx("p",{className:"muted",children:"An app is asking this hub to issue OAuth tokens. Review the details below and approve only if you recognize the app."}),u.jsx("div",{className:"vault-row",style:{marginTop:"1rem"},children:u.jsxs("div",{className:"body",children:[u.jsx("div",{className:"name",children:u.jsx("code",{children:h})}),u.jsxs("div",{className:"dim",children:[u.jsx("span",{className:"muted",children:"client_id: "}),u.jsx("code",{children:f.client_id})]}),u.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[u.jsx("span",{className:"muted",children:"redirect_uris: "}),f.redirect_uris.map((v,p)=>u.jsxs("span",{children:[u.jsx("code",{children:v}),p<f.redirect_uris.length-1?" ":null]},v))]}),f.scopes.length>0?u.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[u.jsx("span",{className:"muted",children:"requested scopes: "}),f.scopes.map((v,p)=>u.jsxs("span",{children:[u.jsx("code",{children:Sy(v)}),p<f.scopes.length-1?" ":null]},v)),f.scopes.some(hm)?u.jsxs("p",{className:"muted",style:{marginTop:"0.4rem",fontStyle:"italic",fontSize:"0.85rem"},children:[u.jsx("code",{children:"*"})," — a specific vault is selected during sign-in via the consent picker (or the user's assigned vault for multi-user setups)."]}):null]}):null,u.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[u.jsx("span",{className:"muted",children:"registered: "}),u.jsx("code",{title:f.registered_at,children:f.registered_at})]}),j?u.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:u.jsx("code",{children:j})}):null]})}),u.jsxs("div",{style:{marginTop:"1rem",display:"flex",gap:"0.5rem"},children:[u.jsx("button",{type:"button",onClick:()=>{c()},disabled:g,children:g?"Approving…":`Approve ${h}`}),u.jsx(Je,{to:"/permissions",className:"secondary",style:{alignSelf:"center"},children:"Cancel"})]})]})}function Sy(i){return hm(i)?`vault:*:${i.split(":")[1]}`:i}function hm(i){const r=i.split(":");if(r.length!==2||r[0]!=="vault")return!1;const c=r[1];return c==="read"||c==="write"}function Cy(i,r){return Vl(i,i,new Set)}function Vl(i,r,c){if(Array.isArray(i))return i.map(h=>Vl(h,r,c));if(i===null||typeof i!="object")return i;const o=i;if(typeof o.$ref=="string")return Ey(o,r,c);const f={};for(const[h,g]of Object.entries(o))f[h]=Vl(g,r,c);return f}function Ey(i,r,c){const o=i.$ref;if(typeof o!="string")throw new Error(`Invalid $ref: expected string, got ${typeof o}`);if(!o.startsWith("#"))throw new Error(`Unsupported $ref "${o}": external refs (URLs / file paths) are not supported`);if(c.has(o))throw new Error(`Circular $ref detected: "${o}" already on resolution path`);const f=Ny(o,r);if(f===void 0)throw new Error(`Unknown $ref "${o}": no definition at that path`);if(f===null||typeof f!="object"||Array.isArray(f))throw new Error(`Invalid $ref target at "${o}": expected object, got ${typeof f}`);const h=new Set(c);h.add(o);const g=Vl(f,r,h),j={};for(const[v,p]of Object.entries(i))v!=="$ref"&&(j[v]=Vl(p,r,h));return{...g,...j}}function Ny(i,r){const c=i.slice(1);if(c==="")return r;if(!c.startsWith("/"))throw new Error(`Unsupported $ref "${i}": fragment must start with "/"`);const o=c.slice(1).split("/").map(h=>decodeURIComponent(h).replace(/~1/g,"/").replace(/~0/g,"~"));let f=r;for(const h of o)if(f===null||typeof f!="object"||(f=f[h],f===void 0))return;return f}function wy(){const{short:i=""}=Ih(),[r,c]=S.useState({kind:"loading"}),[o,f]=S.useState({}),[h,g]=S.useState({}),[j,v]=S.useState({}),[p,b]=S.useState(!1),[y,w]=S.useState(null),[T,M]=S.useState({}),D=S.useCallback(async()=>{c({kind:"loading"}),f({}),g({}),v({}),w(null),M({});try{const Y=await ty(i);if(Y===null){c({kind:"no_schema"});return}let C;try{C=Cy(Y)}catch(X){const ve=X instanceof Error?X.message:String(X);c({kind:"error",message:`Schema $ref resolution failed — ${ve}`});return}const k=await ay(i);c({kind:"ok",schema:C,values:k}),f({...k}),v({...k})}catch(Y){if(Y instanceof Q&&Y.status===404){c({kind:"not_installed"});return}const C=Y instanceof Error?Y.message:String(Y);c({kind:"error",message:C})}},[i]);S.useEffect(()=>{D()},[D]);function G(Y,C){var ve;f(te=>({...te,[Y]:C}));const k=r.kind==="ok"?(ve=r.schema.properties)==null?void 0:ve[Y]:void 0;if((k==null?void 0:k.writeOnly)===!0){const te=C!==""&&C!==void 0&&C!==null;g(he=>({...he,[Y]:te}))}else g(te=>({...te,[Y]:C!==j[Y]}));M(te=>{if(!(Y in te))return te;const he={...te};return delete he[Y],he})}async function Z(Y){if(Y.preventDefault(),p||r.kind!=="ok")return;b(!0),w(null),M({});const C={};for(const[k,X]of Object.entries(h))X&&(C[k]=o[k]);if(Object.keys(C).length===0){b(!1),w({kind:"error",message:"No changes to save. Edit a field first."});return}try{const k=await ny(i,C);w({kind:"success",message:"Configuration saved.",restartRequired:Array.isArray(k.restart_required)?k.restart_required:[]}),g({})}catch(k){if(k instanceof Q&&k.status===400)try{const ve=JSON.parse(k.message),te=Array.isArray(ve.errors)?ve.errors:[];if(te.length>0){const he={};for(const Qe of te)typeof(Qe==null?void 0:Qe.path)=="string"&&typeof(Qe==null?void 0:Qe.message)=="string"&&(he[Qe.path]=Qe.message);M(he),w({kind:"error",message:ve.message??ve.error_description??"Validation failed."});return}w({kind:"error",message:ve.message??ve.error_description??"Validation failed."});return}catch{}const X=k instanceof Error?k.message:String(k);w({kind:"error",message:`Save failed — ${X}`})}finally{b(!1)}}if(r.kind==="loading")return u.jsx("div",{className:"empty",children:"Loading configuration…"});if(r.kind==="not_installed")return u.jsxs("section",{className:"module-config",children:[u.jsxs("h1",{children:["Configure ",i]}),u.jsxs("div",{className:"empty",children:[u.jsxs("p",{children:[u.jsx("code",{children:i})," is not installed on this hub."]}),u.jsxs("p",{children:["Visit ",u.jsx(Je,{to:"/modules",children:"Modules"})," to install it first."]})]})]});if(r.kind==="no_schema")return u.jsxs("section",{className:"module-config",children:[u.jsxs("h1",{children:["Configure ",i]}),u.jsxs("div",{className:"empty",children:[u.jsxs("p",{children:[u.jsx("code",{children:i})," does not expose an operator-editable configuration schema."]}),u.jsxs("p",{children:["Some modules are configured entirely through environment variables or files on disk — check the module's documentation, or visit ",u.jsx(Je,{to:"/modules",children:"Modules"}),"."]})]})]});if(r.kind==="error")return u.jsxs("section",{className:"module-config",children:[u.jsxs("h1",{children:["Configure ",i]}),u.jsxs("div",{className:"empty",children:["Failed to load configuration: ",r.message,"."," ",u.jsx("button",{type:"button",onClick:()=>void D(),children:"Retry"})]})]});const{schema:V}=r,$=V.properties??{},le=new Set(V.required??[]),J=Object.entries($);return u.jsxs("section",{className:"module-config",children:[u.jsxs("header",{className:"module-config-header",children:[u.jsxs("h1",{children:["Configure ",i]}),u.jsxs("p",{className:"muted",children:["Edit values and save. Some changes apply immediately; others (provider, port) require restarting the module to take effect. ",u.jsx(Je,{to:"/modules",children:"Back to modules"}),"."]})]}),J.length===0&&u.jsx("div",{className:"empty",children:u.jsx("p",{children:"This module's schema defines no editable properties."})}),u.jsxs("form",{onSubmit:Y=>void Z(Y),className:"module-config-form","data-testid":"config-form",children:[u.jsx("fieldset",{children:J.map(([Y,C])=>u.jsx(Ty,{name:Y,property:C,value:o[Y],required:le.has(Y),writeOnlyStored:C.writeOnly===!0&&!(Y in r.values),error:T[Y],dirty:!!h[Y],onChange:k=>G(Y,k)},Y))}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"submit",disabled:p||J.length===0,children:p?"Saving…":"Save"}),u.jsx("button",{type:"button",className:"destructive",disabled:p,onClick:()=>void D(),children:"Discard changes"})]}),(y==null?void 0:y.kind)==="success"&&u.jsxs("div",{className:"banner banner-success","data-testid":"save-success",children:[u.jsx("strong",{children:y.message}),y.restartRequired.length>0&&u.jsxs(u.Fragment,{children:[u.jsxs("p",{className:"muted",children:["Restart ",i," to apply these field changes:"]}),u.jsx("ul",{children:y.restartRequired.map(Y=>u.jsx("li",{children:u.jsx("code",{children:Y})},Y))})]})]}),(y==null?void 0:y.kind)==="error"&&u.jsx("div",{className:"banner banner-error error","data-testid":"save-error",children:y.message})]})]})}function Ty({name:i,property:r,value:c,required:o,writeOnlyStored:f,error:h,dirty:g,onChange:j}){const v=`config-field-${i}`,p=r.title??i,b=r.description,y=Array.isArray(r.enum)&&r.enum.length>0;if(r.type==="boolean")return u.jsxs("div",{className:`field field-inline ${h?"field-invalid":""}`,"data-field":i,children:[u.jsxs("label",{htmlFor:v,children:[u.jsx("input",{id:v,type:"checkbox",checked:!!c,onChange:w=>j(w.target.checked)}),u.jsx("span",{className:"field-label-inline",children:p})]}),b&&u.jsx("p",{className:"muted field-hint",children:b}),h&&u.jsx("p",{className:"error field-error",children:h})]});if(y){const w=r.enum;return u.jsxs("div",{className:`field ${h?"field-invalid":""}`,"data-field":i,children:[u.jsxs("label",{htmlFor:v,children:[u.jsxs("span",{className:"field-label",children:[p,o&&u.jsx("span",{className:"muted",children:" (required)"})]}),u.jsxs("select",{id:v,value:c==null?"":String(c),onChange:T=>{const M=T.target.value;r.type==="number"||r.type==="integer"?j(M===""?void 0:Number(M)):j(M===""?void 0:M)},children:[!o&&u.jsx("option",{value:"",children:"(unset)"}),w.map(T=>u.jsx("option",{value:String(T),children:String(T)},String(T)))]})]}),b&&u.jsx("p",{className:"muted field-hint",children:b}),h&&u.jsx("p",{className:"error field-error",children:h})]})}return r.type==="string"&&r.writeOnly===!0?u.jsxs("div",{className:`field ${h?"field-invalid":""}`,"data-field":i,children:[u.jsxs("label",{htmlFor:v,children:[u.jsxs("span",{className:"field-label",children:[p,o&&u.jsx("span",{className:"muted",children:" (required)"})]}),u.jsx("input",{id:v,type:"password",autoComplete:"new-password",placeholder:f&&!g?"••••••••":"",value:typeof c=="string"?c:"",onChange:w=>j(w.target.value)})]}),u.jsxs("p",{className:"muted field-hint",children:[b&&u.jsxs(u.Fragment,{children:[b," "]}),f?u.jsx("em",{children:"Leave blank to keep the current value."}):u.jsx("em",{children:"Secret — sent only when saved."})]}),h&&u.jsx("p",{className:"error field-error",children:h})]}):r.type==="string"?u.jsxs("div",{className:`field ${h?"field-invalid":""}`,"data-field":i,children:[u.jsxs("label",{htmlFor:v,children:[u.jsxs("span",{className:"field-label",children:[p,o&&u.jsx("span",{className:"muted",children:" (required)"})]}),u.jsx("input",{id:v,type:"text",value:typeof c=="string"?c:"",onChange:w=>j(w.target.value)})]}),b&&u.jsx("p",{className:"muted field-hint",children:b}),h&&u.jsx("p",{className:"error field-error",children:h})]}):r.type==="number"||r.type==="integer"?u.jsxs("div",{className:`field ${h?"field-invalid":""}`,"data-field":i,children:[u.jsxs("label",{htmlFor:v,children:[u.jsxs("span",{className:"field-label",children:[p,o&&u.jsx("span",{className:"muted",children:" (required)"})]}),u.jsx("input",{id:v,type:"number",step:r.type==="integer"?1:"any",min:r.minimum,max:r.maximum,value:typeof c=="number"?c:"",onChange:w=>{const T=w.target.value;j(T===""?void 0:Number(T))}})]}),b&&u.jsx("p",{className:"muted field-hint",children:b}),h&&u.jsx("p",{className:"error field-error",children:h})]}):u.jsxs("div",{className:"field","data-field":i,children:[u.jsxs("span",{className:"field-label",children:[p," ",u.jsx("span",{className:"muted",children:"(unsupported type)"})]}),u.jsx("pre",{className:"muted",children:JSON.stringify(r,null,2)}),b&&u.jsx("p",{className:"muted field-hint",children:b})]})}const _y=2e3,Ry=12e4;function Ay(){const[i,r]=S.useState(null),[c,o]=S.useState({kind:"idle"}),f=S.useRef(null),h=S.useRef(0),g=S.useCallback(async()=>{try{r(await ac())}catch{}},[]);S.useEffect(()=>{g()},[g]),S.useEffect(()=>()=>{f.current&&clearInterval(f.current)},[]);const j=S.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null)},[]),v=S.useCallback((b,y)=>{h.current=Date.now()+Ry,j(),f.current=setInterval(()=>{(async()=>{let w=null,T=null;try{w=await ac()}catch{}try{T=await py()}catch{}if(w){const M=w.version!==b,D=y!==null&&w.version===y;if(M||D){j(),r(w),o({kind:"succeeded",newVersion:w.version});return}}if((T==null?void 0:T.phase)==="failed"){j(),o({kind:"error",message:T.error??"the hub upgrade failed — check the platform log"});return}if(Date.now()>=h.current){j();const M=(T==null?void 0:T.log.at(-1))??null;o({kind:"timeout",lastLog:M})}})()},_y)},[j]);async function p(){if(!i)return;const b=i.version;o({kind:"starting"});try{const y=await my();if(y.mode==="redeploy-required"){o({kind:"redeploy-required",targetVersion:y.target_version});return}o({kind:"upgrading",previousVersion:b,targetVersion:y.target_version}),v(b,y.target_version)}catch(y){o({kind:"error",message:y instanceof Error?y.message:String(y)})}}return i?u.jsxs("section",{className:"hub-upgrade-card install-card","data-testid":"hub-upgrade-card",children:[u.jsxs("div",{className:"install-card-body",children:[u.jsxs("h3",{children:["Hub ",u.jsx("span",{className:"muted",children:"(@openparachute/hub)"})]}),u.jsxs("p",{className:"install-card-meta muted",children:["Installed ",u.jsxs("code",{"data-testid":"hub-current-version",children:["v",i.version]})," · source"," ",u.jsx("code",{children:i.source})]}),u.jsx(My,{state:c})]}),u.jsx("div",{className:"install-card-actions",children:u.jsx(zy,{state:c,onUpgrade:()=>void p()})})]}):null}function zy({state:i,onUpgrade:r}){if(i.kind==="redeploy-required")return u.jsx("span",{className:"muted","data-testid":"hub-redeploy-hint",children:"Redeploy from your platform dashboard"});const c=i.kind==="starting"||i.kind==="upgrading";return u.jsx("button",{type:"button",onClick:r,disabled:c,"data-testid":"hub-upgrade-button",children:c?"Upgrading…":"Upgrade hub"})}function My({state:i}){switch(i.kind){case"idle":return null;case"starting":return u.jsx("p",{className:"muted","data-testid":"hub-upgrade-state-starting",children:"Starting the hub upgrade…"});case"upgrading":return u.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-upgrading",children:["Upgrading",i.targetVersion?` to v${i.targetVersion}`:"","… the hub will restart; this page reconnects automatically."]});case"succeeded":return u.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-success",children:["Upgraded — the hub is now running ",u.jsxs("code",{children:["v",i.newVersion]}),"."]});case"timeout":return u.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-timeout",children:["The hub may still be coming up — refresh shortly.",i.lastLog?u.jsxs(u.Fragment,{children:[" ",u.jsxs("span",{className:"dim",children:["Last status: ",i.lastLog]})]}):null]});case"redeploy-required":return u.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-redeploy",children:["This hub is baked into its container image, so an in-place upgrade wouldn't survive a restart."," ",i.targetVersion?u.jsxs(u.Fragment,{children:["Redeploy from your platform dashboard to move to ",u.jsxs("code",{children:["v",i.targetVersion]}),"."]}):u.jsx(u.Fragment,{children:"Redeploy from your platform dashboard to pick up the latest hub."})]});case"error":return u.jsxs("p",{className:"error-banner","data-testid":"hub-upgrade-state-error",children:["Upgrade failed: ",i.message]})}}function Oy(){if(typeof navigator>"u")return"other";const i=(navigator.platform||"").toLowerCase();return i.includes("mac")?"darwin":i.includes("linux")?"linux":"other"}function ky(i,r){const c=[];if(i.darwin&&c.push({label:"macOS",command:i.darwin,preferred:r==="darwin"}),i.linux&&c.push({label:"Linux",command:i.linux,preferred:r==="linux"}),i.generic){const o=c.some(f=>f.preferred);c.push({label:"Any platform",command:i.generic,preferred:!o})}return c.sort((o,f)=>Number(f.preferred)-Number(o.preferred))}function Uy({command:i}){const[r,c]=S.useState(!1);async function o(){try{await navigator.clipboard.writeText(i),c(!0),setTimeout(()=>c(!1),1500)}catch{}}return u.jsxs("div",{className:"depcard-cmd",children:[u.jsx("pre",{className:"depcard-cmd-text",children:i}),u.jsx("button",{type:"button",className:"btn btn-secondary depcard-copy",onClick:()=>void o(),"aria-label":"Copy install command",children:r?"Copied":"Copy"})]})}function Dy({wire:i}){const r=Oy(),c=ky(i.install,r);return u.jsxs("div",{className:"depcard","data-testid":"missing-dependency-card",children:[u.jsxs("h3",{className:"depcard-heading",children:[i.binary," isn't installed"]}),i.why?u.jsxs("p",{className:"depcard-why muted",children:["It's needed to ",i.why,"."]}):null,c.length>0?u.jsxs("div",{className:"depcard-installs",children:[u.jsx("p",{className:"depcard-installs-label",children:"Install it:"}),c.map(o=>u.jsxs("div",{className:o.preferred?"depcard-install preferred":"depcard-install",children:[u.jsx("span",{className:"depcard-os",children:o.label}),u.jsx(Uy,{command:o.command})]},o.label))]}):null,i.docs_url?u.jsx("p",{className:"depcard-docs",children:u.jsx("a",{href:i.docs_url,target:"_blank",rel:"noreferrer noopener",children:"Documentation"})}):null,i.sysadmin_hint?u.jsx("p",{className:"depcard-hint muted",children:i.sysadmin_hint}):null]})}function Hy(i){const{error:r,errorDetail:c}=i;return(c==null?void 0:c.error_type)==="missing_dependency"?u.jsx(Dy,{wire:c}):c!=null&&c.error_description?u.jsx("span",{className:"depcard-fallback",children:c.error_description}):r?u.jsx("span",{className:"depcard-fallback",children:r}):null}function By(i){switch(i){case"running":return"active";case"starting":case"restarting":return"pending";case"crashed":return"failing";case"stopped":case null:case void 0:return"inactive";default:return"inactive"}}function Ly(i){if(i==null)return"active";switch(i){case"active":case"pending":case"inactive":case"failing":return i;case"pending-oauth":return"pending";case"disabled":return"inactive";default:return"active"}}const qy=1e3;function Yy(){const[i,r]=S.useState({kind:"loading"}),[c,o]=S.useState([]),[f,h]=S.useState({}),[g,j]=S.useState({}),v=S.useCallback(async()=>{try{const C=await om();r({kind:"ok",catalog:C})}catch(C){const k=C instanceof Error?C.message:String(C);r({kind:"error",message:k})}},[]);S.useEffect(()=>{v()},[v]);const p=S.useRef(null);S.useEffect(()=>{if(c.length===0){p.current&&(clearInterval(p.current),p.current=null);return}if(!p.current)return p.current=setInterval(()=>{Promise.all(c.map(async C=>{var k;try{const X=await ly(C.operationId);o(ve=>ve.map(te=>te.operationId===X.id?{...te,log:X.log,status:X.status,error:X.error,errorDetail:X.error_detail}:te)),(X.status==="succeeded"||X.status==="failed")&&(X.status==="failed"&&((k=X.error_detail)==null?void 0:k.error_type)==="missing_dependency"?v():setTimeout(()=>{o(te=>te.filter(he=>he.operationId!==X.id)),v()},1500))}catch(X){const ve=X instanceof Error?X.message:String(X);o(te=>te.map(he=>he.operationId===C.operationId?{...he,status:"failed",error:ve}:he))}}))},qy),()=>{p.current&&(clearInterval(p.current),p.current=null)}},[c,v]);async function b(C){j(k=>{const X={...k};return delete X[C],X});try{const k=await Fg(C);o(X=>[...X,{kind:"install",operationId:k,short:C,log:[],status:"pending"}])}catch(k){j(X=>({...X,[C]:k instanceof Error?k.message:String(k)}))}}async function y(C){j(k=>{const X={...k};return delete X[C],X});try{const k=await Wg(C);o(X=>[...X,{kind:"upgrade",operationId:k,short:C,log:[],status:"pending"}])}catch(k){j(X=>({...X,[C]:k instanceof Error?k.message:String(k)}))}}async function w(C){if(!f[C]){h(k=>({...k,[C]:!0})),j(k=>{const X={...k};return delete X[C],X});try{await Ig(C),await v()}catch(k){j(X=>({...X,[C]:k instanceof Error?k.message:String(k)}))}finally{h(k=>({...k,[C]:!1}))}}}async function T(C){if(!f[C]&&window.confirm(`Uninstall ${C}? The container will stop the service, remove the package, and drop its services.json entry. The persistent disk's data dir is left intact.`)){h(k=>({...k,[C]:!0})),j(k=>{const X={...k};return delete X[C],X});try{await Pg(C),await v()}catch(k){j(X=>({...X,[C]:k instanceof Error?k.message:String(k)}))}finally{h(k=>({...k,[C]:!1}))}}}if(i.kind==="loading")return u.jsx("div",{className:"empty",children:"Loading modules…"});if(i.kind==="error")return i.message.includes("setup_required")?u.jsxs("div",{className:"empty",children:["Hub not yet configured. ",u.jsx("a",{href:"/admin/setup",children:"Finish first-boot setup"})," first."]}):u.jsxs("div",{className:"empty",children:["Failed to load modules: ",i.message,"."," ",u.jsx("button",{type:"button",onClick:()=>void v(),children:"Retry"})]});const M=i.catalog,{modules:D,supervisor_available:G,module_install_channel:Z}=M,V=D.filter(C=>C.installed),$=D.filter(C=>!C.installed&&C.available),le=new Set(c.filter(C=>C.kind==="install").map(C=>C.short)),J=$.filter(C=>!le.has(C.short));async function Y(C){if(C!==Z){r({kind:"ok",catalog:{...M,module_install_channel:C}});try{const k=await ey(C);r(X=>X.kind==="ok"?{kind:"ok",catalog:{...X.catalog,module_install_channel:k}}:X)}catch(k){const X=k instanceof Error?k.message:String(k);r({kind:"error",message:`Failed to update channel — ${X}`})}}}return u.jsxs("section",{className:"modules",children:[u.jsx("h1",{children:"Modules"}),u.jsx("p",{className:"muted",children:"Install, upgrade, and manage Parachute modules. Available modules are pinned for the v0.6 release; the marketplace is on the roadmap."}),u.jsx(Ay,{}),u.jsx($y,{channel:Z,disabled:!G,onChange:C=>void Y(C)}),!G&&u.jsxs("div",{className:"banner banner-info",children:["This hub is running outside container mode (no supervisor wired). Module install / restart / upgrade is available only under ",u.jsx("code",{children:"parachute serve"}),". On-box installs use"," ",u.jsx("code",{children:"parachute install vault"})," etc. from a shell instead."]}),c.length>0&&u.jsxs("div",{className:"banner","data-testid":"pending-ops-banner",children:[u.jsx("strong",{children:"In progress:"}),u.jsx("ul",{children:c.map(C=>u.jsxs("li",{children:[u.jsx("code",{children:C.short})," · ",C.kind," · status: ",C.status,C.status==="failed"&&(C.errorDetail||C.error)?u.jsx("div",{className:"depcard-wrap",children:Hy({error:C.error,errorDetail:C.errorDetail})}):null,C.log.length>0&&u.jsxs("details",{children:[u.jsxs("summary",{children:[C.log.length," log line(s)"]}),u.jsx("pre",{children:C.log.join(`
|
|
61
|
-
`)})]})]},C.operationId))})]}),u.jsxs("section",{className:"modules-installed","data-testid":"installed-section",children:[u.jsx("h2",{children:"Installed modules"}),V.length===0?u.jsxs("p",{className:"muted","data-testid":"installed-empty",children:["No modules installed yet. Pick one from ",u.jsx("strong",{children:"Install a module"})," below to get started."]}):u.jsx("ul",{className:"module-list",children:V.map(C=>u.jsx(Vy,{module:C,supervisorAvailable:G,syncBusy:!!f[C.short],errorMessage:g[C.short],onUpgrade:()=>void y(C.short),onRestart:()=>void w(C.short),onUninstall:()=>void T(C.short)},C.short))})]}),u.jsxs("section",{className:"modules-installable","data-testid":"installable-section",children:[u.jsx("h2",{children:"Install a module"}),J.length===0?u.jsx("p",{className:"muted","data-testid":"installable-empty",children:le.size>0?"Install in progress — see In progress above.":"All available modules are installed."}):u.jsx("ul",{className:"install-list",children:J.map(C=>u.jsx(Zy,{module:C,supervisorAvailable:G,installing:le.has(C.short),errorMessage:g[C.short],onInstall:()=>void b(C.short)},C.short))})]})]})}const Gy={scribe:"Scribe admin SPA tracked at scribe#53",runner:"Runner admin SPA tracked at runner#8"};function Vy({module:i,supervisorAvailable:r,syncBusy:c,errorMessage:o,onUpgrade:f,onRestart:h,onUninstall:g}){const j=r&&!c,v=i.installed_version!==i.latest_version&&i.latest_version!==null,p=i.management_url,b=Gy[i.short];return u.jsxs("li",{className:"module-row","data-short":i.short,children:[u.jsxs("header",{children:[u.jsxs("h2",{children:[i.display_name," ",u.jsxs("span",{className:"muted",children:["(",i.short,")"]})]}),(()=>{const y=Xy(i);return u.jsx("span",{className:`status status-${y.cssState}`,"data-state":y.cssState,"data-testid":`module-status-${i.short}`,children:y.label})})()]}),i.tagline?u.jsx("p",{className:"tagline",children:i.tagline}):null,u.jsxs("dl",{className:"meta",children:[u.jsx("dt",{children:"Package"}),u.jsx("dd",{children:u.jsx("code",{children:i.package})}),u.jsx("dt",{children:"Installed"}),u.jsxs("dd",{children:["v",i.installed_version??"unknown",v&&u.jsxs("span",{className:"badge",children:["v",i.latest_version," available"]})]}),i.pid&&u.jsxs(u.Fragment,{children:[u.jsx("dt",{children:"PID"}),u.jsx("dd",{children:i.pid})]})]}),i.uis.length>0&&u.jsx(Qy,{uis:i.uis}),u.jsxs("div",{className:"actions",children:[p?u.jsx("a",{className:"btn",href:p,"data-testid":`open-${i.short}`,children:"Open"}):u.jsx("button",{type:"button",className:"btn",disabled:!0,title:b??"This module hasn't shipped an admin UI yet.","data-testid":`open-${i.short}`,children:"Open"}),u.jsx("button",{type:"button",disabled:!j,onClick:h,children:"Restart"}),u.jsx("button",{type:"button",disabled:!j||!v,onClick:f,children:v?`Upgrade to v${i.latest_version}`:"Up to date"}),u.jsx("button",{type:"button",className:"destructive",disabled:!j,onClick:g,children:"Uninstall"})]}),o&&u.jsx("div",{className:"error",children:o})]})}function Zy({module:i,supervisorAvailable:r,installing:c,errorMessage:o,onInstall:f}){const h=r&&!c;return u.jsxs("li",{className:"install-card","data-short":i.short,children:[u.jsxs("div",{className:"install-card-body",children:[u.jsxs("h3",{children:[i.display_name," ",u.jsxs("span",{className:"muted",children:["(",i.short,")"]})]}),i.tagline?u.jsx("p",{className:"tagline",children:i.tagline}):null,u.jsxs("p",{className:"muted install-card-meta",children:[u.jsx("code",{children:i.package}),i.latest_version?u.jsxs(u.Fragment,{children:[" · ","latest ",u.jsxs("code",{children:["v",i.latest_version]})]}):null]})]}),u.jsx("div",{className:"install-card-actions",children:u.jsx("button",{type:"button",disabled:!h,onClick:f,children:c?"Installing…":"Install"})}),o&&u.jsx("div",{className:"error",children:o})]})}function Xy(i){if(!i.installed)return{cssState:"absent",label:"not installed"};if(!i.supervisor_status)return{cssState:"absent",label:"not supervised"};const r=By(i.supervisor_status);return{cssState:r,label:r}}function Qy({uis:i}){return u.jsxs("details",{className:"module-uis","data-testid":"module-uis",open:!0,children:[u.jsxs("summary",{children:["Hosted UIs ",u.jsxs("span",{className:"muted",children:["(",i.length,")"]})]}),u.jsx("ul",{className:"ui-sub-units",children:i.map(r=>{const c=Ly(r.status);return u.jsxs("li",{className:"ui-sub-unit","data-name":r.name,children:[r.icon_url&&u.jsx("img",{src:r.icon_url,alt:"",className:"ui-icon",width:20,height:20,loading:"lazy"}),u.jsxs("div",{className:"ui-sub-unit-body",children:[u.jsxs("a",{href:r.path,className:"ui-sub-unit-link",children:[u.jsx("strong",{children:r.display_name}),u.jsxs("span",{className:"muted",children:[" · ",r.path]})]}),r.tagline?u.jsx("p",{className:"tagline",children:r.tagline}):null]}),u.jsx("span",{className:`status status-${c}`,"data-state":c,"data-testid":`ui-status-${r.name}`,children:c})]},r.name)})})]})}function $y({channel:i,disabled:r,onChange:c}){return u.jsxs("fieldset",{className:"channel-toggle","data-testid":"channel-toggle",children:[u.jsx("legend",{children:"Install channel"}),u.jsxs("label",{children:[u.jsx("input",{type:"radio",name:"module-install-channel",value:"latest",checked:i==="latest",disabled:r,onChange:()=>c("latest")}),"Stable (",u.jsx("code",{children:"latest"}),")"]}),u.jsxs("label",{children:[u.jsx("input",{type:"radio",name:"module-install-channel",value:"rc",checked:i==="rc",disabled:r,onChange:()=>c("rc")}),"Release candidates (",u.jsx("code",{children:"rc"}),")"]}),u.jsxs("p",{className:"muted",children:["All future module installs and upgrades use this channel. Existing installed modules are unaffected — use ",u.jsx("strong",{children:"Upgrade"})," to pull a newer version."]}),u.jsxs("p",{className:"muted",children:["More hub settings (canonical URL, etc.) at ",u.jsx(Je,{to:"/settings",children:"Settings"}),"."]})]})}const Jy="https://parachute.computer/install#connect-mcp-clients";function mm(i){return`${i.replace(/\/+$/,"")}/mcp`}function pm(i,r){return`claude mcp add --transport http parachute-${i} ${mm(r)}`}function Ky(i,r,c){return`${pm(i,r)} --header "Authorization: Bearer ${c}"`}function Fr({value:i,label:r="Copy"}){const[c,o]=S.useState(!1);return u.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(i).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},children:c?"Copied ✓":r})}function vm({vaultName:i,vaultUrl:r,embedded:c=!1}){const o=mm(r),f=pm(i,r),[h,g]=S.useState(!1),[j,v]=S.useState({kind:"idle"});async function p(){if(j.kind!=="submitting"){v({kind:"submitting"});try{const w=await cm({scope:`vault:${i}:read vault:${i}:write`});v({kind:"minted",token:w})}catch(w){const T=w instanceof Q?`mint failed (${w.status}): ${w.message}`:w instanceof Error?w.message:String(w);v({kind:"error",message:T})}}}const b=j.kind==="minted"?Ky(i,r,j.token.token):null,y=u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:"Connect an MCP client (or connector)"}),u.jsxs("p",{className:"muted",children:["Connect an MCP client — Claude Code, Claude.ai, etc. (sometimes called a connector in ChatGPT and other web UIs) — to the ",u.jsx("code",{children:i})," vault. The client signs in to this hub and reads/writes vault data over MCP."]}),u.jsxs("div",{className:"mcp-field",children:[u.jsx("span",{className:"mcp-field-label",children:"Endpoint"}),u.jsxs("div",{className:"token-box",children:[u.jsx("code",{"data-testid":"mcp-endpoint",children:o}),u.jsx(Fr,{value:o})]})]}),u.jsxs("div",{className:"mcp-field",children:[u.jsx("span",{className:"mcp-field-label",children:"Claude Code"}),u.jsxs("div",{className:"token-box",children:[u.jsx("code",{"data-testid":"mcp-add-command",children:f}),u.jsx(Fr,{value:f})]}),u.jsx("p",{className:"dim",children:"No token needed — the command triggers browser OAuth on first use (you sign in to this hub and approve access). For other clients, point them at the endpoint above."})]}),u.jsxs("details",{className:"mcp-token-path",open:h,onToggle:w=>g(w.currentTarget.open),children:[u.jsx("summary",{children:"Use a token instead (headless / CI clients)"}),u.jsxs("p",{className:"dim",children:["For clients that can't do browser OAuth, mint a scope-narrow hub token (",u.jsxs("code",{children:["vault:",i,":read vault:",i,":write"]})," ","— not admin) and pass it as a header. Revealed once; copy it now."]}),j.kind==="minted"&&b?u.jsxs("div",{className:"mint-banner","data-testid":"mcp-header-banner",children:[u.jsx("h3",{children:"Token minted"}),u.jsxs("p",{className:"muted",children:["This is the only time the hub shows this token. Copy the command below — it embeds the live token in the ",u.jsx("code",{children:"Authorization"})," header."]}),u.jsxs("div",{className:"token-box",children:[u.jsx("code",{"data-testid":"mcp-header-command",children:b}),u.jsx(Fr,{value:b})]}),u.jsxs("p",{className:"warn",children:["⚠ Manage and revoke this token at ",u.jsx("code",{children:"/admin/tokens"}),"."]})]}):u.jsx("div",{className:"actions",children:u.jsx("button",{type:"button",className:"secondary",onClick:()=>{p()},disabled:j.kind==="submitting",children:j.kind==="submitting"?"Minting…":"Mint a token"})}),j.kind==="error"?u.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:u.jsx("code",{children:j.message})}):null]}),u.jsx("p",{className:"dim mcp-docs-link",children:u.jsx("a",{href:Jy,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]});return c?u.jsx("div",{className:"mcp-connect-card mcp-connect-card-embedded",children:y}):u.jsx("div",{className:"mcp-connect-card",children:y})}const Fy=/^[a-zA-Z0-9_-]+$/,Wy=new Set(["list"]);function Iy(){const i=uc(),[r,c]=S.useState(""),[o,f]=S.useState({kind:"idle"}),h=o.kind==="created"&&!!o.result.token;S.useEffect(()=>{if(!h)return;const v=p=>{p.preventDefault(),p.returnValue=""};return window.addEventListener("beforeunload",v),()=>window.removeEventListener("beforeunload",v)},[h]);const g=e0(r),j=async v=>{if(v.preventDefault(),!g){f({kind:"submitting"});try{const p=await Lg({name:r});f({kind:"created",result:p})}catch(p){const b=p instanceof Q?`${p.status}: ${p.message}`:p instanceof Error?p.message:String(p);f({kind:"error",message:b})}}};return o.kind==="created"?u.jsx(Py,{result:o.result,onDone:()=>i("/vaults")}):u.jsxs("div",{children:[u.jsx("h2",{children:"Create a vault"}),u.jsxs("p",{className:"muted",children:["A vault stores tokens, secrets, and notes scoped to this hub. The hub provisions it via"," ",u.jsx("code",{children:"parachute-vault create"})," on the host filesystem and registers it in"," ",u.jsx("code",{children:"services.json"}),"."]}),o.kind==="error"&&u.jsxs("div",{className:"error-banner",children:["Couldn't create vault: ",u.jsx("code",{children:o.message})]}),u.jsxs("form",{onSubmit:j,className:"section",children:[u.jsxs("div",{className:"row",children:[u.jsx("label",{htmlFor:"vault-name",children:"Vault name"}),u.jsx("input",{id:"vault-name",type:"text",value:r,onChange:v=>c(v.target.value),placeholder:"e.g. work, home, scratch",disabled:o.kind==="submitting"}),g?u.jsx("div",{className:"field-error",children:g}):u.jsxs("div",{className:"field-hint",children:["Letters, numbers, hyphens, and underscores. Becomes the path under"," ",u.jsx("code",{children:"/vault/<name>"}),"."]})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"submit",disabled:r.length===0||!!g||o.kind==="submitting",children:o.kind==="submitting"?"Creating…":"Create vault"}),u.jsx(Je,{to:"/vaults",className:"muted",children:"Cancel"})]})]})]})}function Py({result:i,onDone:r}){const[c,o]=S.useState(!1),f=async()=>{if(i.token)try{await navigator.clipboard.writeText(i.token),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return u.jsxs("div",{children:[u.jsx("h2",{children:"Vault created"}),i.token?u.jsxs("div",{className:"mint-banner",children:[u.jsx("h3",{children:"Your access token (shown once)"}),u.jsxs("p",{className:"muted",children:["This is a hub-issued access token (a JWT scoped ",u.jsxs("code",{children:["vault:",i.name,":admin"]}),") — not a vault password. It's the only time the hub will show it. Copy it and store it somewhere safe — a password manager, the operator's notes. If you lose it, you don't need it for the OAuth connect path below; for a header-auth token, mint a fresh scope-narrow one with"," ",u.jsxs("code",{children:["parachute auth mint-token --scope vault:",i.name,":read"]}),` (or the connect card's "Use a token instead" option).`]}),u.jsxs("div",{className:"token-box",children:[u.jsx("code",{children:i.token}),u.jsx("button",{type:"button",onClick:f,className:"secondary",children:c?"Copied":"Copy"})]}),u.jsx("p",{className:"warn",children:"⚠ Don't navigate away until you've saved this token."}),u.jsx("div",{className:"actions",children:u.jsx("button",{type:"button",onClick:r,children:"Done — I've saved the token"})})]}):i.created?u.jsxs("div",{className:"section",children:[u.jsxs("p",{children:["Vault ",u.jsx("code",{children:i.name})," was created, but no access token was minted",i.tokenGuidance?u.jsxs(u.Fragment,{children:[" ","— ",u.jsx("span",{className:"muted",children:i.tokenGuidance})]}):u.jsxs("span",{className:"muted",children:[" ","(the hub couldn't mint one at create time — common on a loopback origin)"]}),". You don't need a token for the OAuth connect command below. For a header-auth token, mint a scope-narrow one with"," ",u.jsxs("code",{children:["parachute auth mint-token --scope vault:",i.name,":read"]}),"."]}),u.jsx("div",{className:"actions",children:u.jsx("button",{type:"button",onClick:r,children:"Done"})})]}):u.jsxs("div",{className:"section",children:[u.jsxs("p",{children:["Vault ",u.jsx("code",{children:i.name})," already existed; nothing new was created. Connect to it with the command below (OAuth, no token needed), or mint a scope-narrow header-auth token with ",u.jsxs("code",{children:["parachute auth mint-token --scope vault:",i.name,":read"]}),"."]}),u.jsx("div",{className:"actions",children:u.jsx(Je,{to:"/vaults",children:u.jsx("button",{type:"button",children:"Continue"})})})]}),u.jsx("div",{className:"section",children:u.jsx(vm,{vaultName:i.name,vaultUrl:i.url})}),u.jsxs("div",{className:"kv section",children:[u.jsx("div",{children:"Name"}),u.jsx("div",{children:u.jsx("code",{children:i.name})}),u.jsx("div",{children:"URL"}),u.jsx("div",{children:u.jsx("code",{children:i.url})}),u.jsx("div",{children:"Version"}),u.jsx("div",{children:u.jsx("code",{children:i.version})}),i.paths&&u.jsxs(u.Fragment,{children:[u.jsx("div",{children:"Vault dir"}),u.jsx("div",{children:u.jsx("code",{children:i.paths.vault_dir})}),u.jsx("div",{children:"Database"}),u.jsx("div",{children:u.jsx("code",{children:i.paths.vault_db})}),u.jsx("div",{children:"Config"}),u.jsx("div",{children:u.jsx("code",{children:i.paths.vault_config})})]})]})]})}function e0(i){return i.length===0?null:Fy.test(i)?Wy.has(i)?`"${i}" is a reserved name.`:null:"Letters, numbers, hyphens, and underscores only."}function t0(){const[i,r]=S.useState({kind:"loading"}),[c,o]=S.useState(""),[f,h]=S.useState(""),[g,j]=S.useState(0),[v,p]=S.useState({kind:"idle"});S.useEffect(()=>{let T=!1;return r({kind:"loading"}),Gg(f?{vault:f}:{}).then(D=>{T||r({kind:"ok",grants:D})}).catch(D=>{if(T)return;const G=D instanceof Error?D.message:String(D);r({kind:"error",message:G})}),()=>{T=!0}},[g,f]);function b(T){T.preventDefault(),h(c.trim())}function y(){o(""),h("")}async function w(T){p({kind:"revoking",clientId:T.client_id});try{await Vg(T.client_id),p({kind:"idle"}),j(M=>M+1)}catch(M){const D=M instanceof Q?`revoke failed (${M.status}): ${M.message}`:M instanceof Error?M.message:String(M);p({kind:"error",clientId:T.client_id,message:D})}}return u.jsxs("div",{"data-route-content":"true",children:[u.jsx("div",{className:"list-header",children:u.jsx("h1",{children:"Permissions"})}),u.jsxs("p",{className:"muted",children:["Apps you've granted OAuth scopes to. Revoking a grant forces the consent screen on the next authorize flow — it does ",u.jsx("em",{children:"not"})," invalidate tokens already issued."]}),u.jsxs("form",{onSubmit:b,style:{marginTop:"1rem",marginBottom:"1rem"},children:[u.jsx("label",{htmlFor:"vault-filter",className:"muted",style:{marginRight:"0.5rem"},children:"Filter by vault:"}),u.jsx("input",{id:"vault-filter",type:"text",value:c,onChange:T=>o(T.target.value),placeholder:"e.g. work",style:{marginRight:"0.5rem"}}),u.jsx("button",{type:"submit",children:"Apply"}),f?u.jsx("button",{type:"button",onClick:y,className:"secondary",style:{marginLeft:"0.5rem"},children:"Clear"}):null]}),a0({state:i,revoke:v,setRevoke:p,onConfirm:w,onRetry:()=>j(T=>T+1)})]})}function a0({state:i,revoke:r,setRevoke:c,onConfirm:o,onRetry:f}){return i.kind==="loading"?u.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):i.kind==="error"?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"error-banner",children:["Couldn't load grants: ",u.jsx("code",{children:i.message})]}),u.jsx("button",{type:"button",onClick:f,className:"secondary",children:"Retry"})]}):i.grants.length===0?u.jsxs("div",{className:"empty empty-rich",children:[u.jsx("p",{className:"empty-headline",children:"No grants."}),u.jsx("p",{className:"muted",children:"When an app asks for OAuth scopes and you approve them, the grant lands here. Revoking it forces the consent screen on the next authorize flow."})]}):u.jsx("div",{style:{marginTop:"1rem"},children:i.grants.map(h=>{const g=r.kind==="revoking"&&r.clientId===h.client_id,j=r.kind==="error"&&r.clientId===h.client_id?r:null,v=r.kind==="confirming"&&r.grant.client_id===h.client_id;return u.jsxs("div",{className:"vault-row",children:[u.jsxs("div",{className:"body",children:[u.jsx("div",{className:"name",children:u.jsx("code",{children:h.client_name??h.client_id})}),u.jsxs("div",{className:"dim",children:[u.jsx("span",{className:"muted",children:"granted "}),u.jsx("code",{title:h.granted_at,children:n0(h.granted_at)})]}),u.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[u.jsx("span",{className:"muted",children:"scopes: "}),h.scopes.map((p,b)=>u.jsxs("span",{children:[u.jsx("code",{children:p}),b<h.scopes.length-1?" ":null]},p))]}),j?u.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:u.jsx("code",{children:j.message})}):null,v?u.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${h.client_name??h.client_id}`,children:[u.jsxs("p",{children:["Revoke ",u.jsx("code",{children:h.client_name??h.client_id}),"? Next OAuth flow for this app will prompt you to consent again."]}),u.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[u.jsx("button",{type:"button",onClick:()=>{o(h)},disabled:g,children:g?"Revoking…":"Revoke"}),u.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:g,children:"Cancel"})]})]}):null]}),v?null:u.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"confirming",grant:h}),"aria-label":`Revoke ${h.client_name??h.client_id}`,children:"Revoke"})]},h.client_id)})})}function n0(i){const r=new Date(i);return Number.isNaN(r.getTime())?i:r.toLocaleString()}function l0(){const[i,r]=S.useState({kind:"loading"}),[c,o]=S.useState(""),[f,h]=S.useState(!1),[g,j]=S.useState(null),v=S.useCallback(async()=>{try{const M=await dm();r({kind:"ok",setting:M}),o(M.hub_origin??""),j(null)}catch(M){const D=M instanceof Error?M.message:String(M);r({kind:"error",message:D})}},[]);S.useEffect(()=>{v()},[v]);async function p(M){if(M.preventDefault(),f||i.kind!=="ok")return;const D=c.trim(),G=D.length===0?null:D;h(!0),j(null);try{await kh(G),await v()}catch(Z){const V=Z instanceof Error?Z.message:String(Z);j(V)}finally{h(!1)}}async function b(){if(!f&&i.kind==="ok"){h(!0),j(null);try{await kh(null),await v()}catch(M){const D=M instanceof Error?M.message:String(M);j(D)}finally{h(!1)}}}if(i.kind==="loading")return u.jsx("div",{className:"empty",children:"Loading settings…"});if(i.kind==="error")return u.jsxs("div",{className:"empty",children:["Failed to load settings: ",i.message,"."," ",u.jsx("button",{type:"button",onClick:()=>void v(),children:"Retry"})]});const{setting:y}=i,w=y.hub_origin!==null,T=c.trim()!==(y.hub_origin??"");return u.jsxs("section",{className:"settings",children:[u.jsx("h1",{children:"Hub settings"}),u.jsx("p",{className:"muted",children:"Hub-wide operator controls. Settings here apply to every module + every minted token."}),u.jsxs("section",{className:"settings-block","aria-labelledby":"canonical-hub-url-heading",children:[u.jsx("h2",{id:"canonical-hub-url-heading",children:"Canonical hub URL"}),u.jsxs("dl",{className:"meta","data-testid":"hub-origin-current",children:[u.jsx("dt",{children:"Current value"}),u.jsxs("dd",{children:[u.jsx("code",{children:y.resolved_issuer})," ",u.jsx(i0,{source:y.source,hasStored:w})]})]}),u.jsxs("form",{onSubmit:M=>void p(M),className:"settings-form","data-testid":"hub-origin-form",children:[u.jsxs("label",{htmlFor:"hub-origin-input",children:[u.jsx("span",{children:"Canonical URL"}),u.jsx("input",{id:"hub-origin-input",type:"url",inputMode:"url",placeholder:"https://hub.example.com",value:c,disabled:f,onChange:M=>o(M.target.value),autoComplete:"off",spellCheck:!1})]}),u.jsxs("p",{className:"muted",children:["Set this when you've attached a custom domain. Tokens are minted against this URL — changing it invalidates any tokens already in circulation (the ",u.jsx("code",{children:"iss"})," claim won't match the new issuer on verification). Leave blank to use the request origin (default for Render-assigned URLs)."]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"submit",disabled:f||!T,children:f?"Saving…":"Save"}),u.jsx("button",{type:"button",className:"destructive",disabled:f||!w,onClick:()=>void b(),children:"Reset to default"})]}),g&&u.jsx("div",{className:"error","data-testid":"hub-origin-save-error",children:g})]})]})]})}function i0({source:i,hasStored:r}){return i==="settings"?u.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from settings"}):i==="env"?u.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from env var ",u.jsx("code",{children:"PARACHUTE_HUB_ORIGIN"})]}):i==="expose"?u.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from your ",u.jsx("code",{children:"parachute expose"})," config"]}):u.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from request origin"})}const Wr={scope:"",audience:"",expiresIn:"",subject:"",permissions:""};function u0(){const[i,r]=im(),c=c0(i.get("status")),o=o0(i.get("source")),[f,h]=S.useState({kind:"loading"}),[g,j]=S.useState(0),[v,p]=S.useState({kind:"idle"}),[b,y]=S.useState(Wr),[w,T]=S.useState({kind:"idle"}),[M,D]=S.useState(!1),[G,Z]=S.useState(!1);function V(C,k){r(X=>{const ve=new URLSearchParams(X);return k==="all"?ve.delete(C):ve.set(C,k),ve},{replace:!0})}S.useEffect(()=>{let C=!1;return h({kind:"loading"}),Oh(Dh(c,o)).then(k=>{C||h({kind:"ok",tokens:k.tokens,nextCursor:k.next_cursor})}).catch(k=>{if(C)return;const X=k instanceof Error?k.message:String(k);h({kind:"error",message:X})}),()=>{C=!0}},[g,c,o]);async function $(){if(f.kind!=="ok"||!f.nextCursor||G)return;const C={...Dh(c,o),cursor:f.nextCursor};Z(!0);try{const k=await Oh(C);h({kind:"ok",tokens:[...f.tokens,...k.tokens],nextCursor:k.next_cursor})}catch(k){const X=k instanceof Error?k.message:String(k);h({kind:"error",message:X})}finally{Z(!1)}}async function le(C){C.preventDefault();const k=b.scope.trim();if(k.length===0){p({kind:"error",message:"scope is required"});return}let X;if(b.permissions.trim().length>0)try{const te=JSON.parse(b.permissions);if(te===null||typeof te!="object"||Array.isArray(te)){p({kind:"error",message:'permissions must be a JSON object (e.g. {"vault":{"default":...}})'});return}X=te}catch(te){const he=te instanceof Error?te.message:String(te);p({kind:"error",message:`permissions is not valid JSON — ${he}`});return}let ve;if(b.expiresIn.trim().length>0){const te=Number(b.expiresIn);if(!Number.isInteger(te)||te<=0){p({kind:"error",message:"expires_in must be a positive integer (seconds)"});return}ve=te}p({kind:"submitting"});try{const te=await cm({scope:k,...b.audience.trim()?{audience:b.audience.trim()}:{},...ve!==void 0?{expires_in:ve}:{},...b.subject.trim()?{subject:b.subject.trim()}:{},...X?{permissions:X}:{}});p({kind:"minted",token:te}),y(Wr),D(!1),j(he=>he+1)}catch(te){const he=te instanceof Q?`mint failed (${te.status}): ${te.message}`:te instanceof Error?te.message:String(te);p({kind:"error",message:he})}}async function J(C){T({kind:"revoking",jti:C});try{await $g(C),T({kind:"idle"}),j(k=>k+1)}catch(k){const X=k instanceof Q?`revoke failed (${k.status}): ${k.message}`:k instanceof Error?k.message:String(k);T({kind:"error",jti:C,message:X})}}function Y(C){typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(C)}return u.jsxs("div",{children:[u.jsxs("div",{className:"list-header",children:[u.jsx("h1",{children:"Tokens"}),u.jsx("button",{type:"button",onClick:()=>D(C=>!C),children:M?"Hide form":"Mint new token"})]}),u.jsxs("p",{className:"muted",children:["The hub's token registry. Every CLI / OAuth / operator-mint writes a row here. Revoking flips ",u.jsx("code",{children:"revoked_at"}),"; resource servers on"," ",u.jsx("code",{children:"@openparachute/scope-guard@^0.2.0"})," reject within ~60s of the next poll."]}),v.kind==="minted"?u.jsxs("div",{className:"mint-banner",children:[u.jsx("h3",{children:"Minted"}),u.jsxs("p",{children:["Your new access token (jti: ",u.jsx("code",{children:v.token.jti}),"):"]}),u.jsx("div",{className:"token-box",children:u.jsx("code",{children:v.token.token})}),u.jsx("p",{className:"warn",children:"This is the only time the JWT is shown. Copy it now — there is no DB-side recovery."}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",onClick:()=>Y(v.token.token),children:"Copy"}),u.jsx("button",{type:"button",className:"secondary",onClick:()=>p({kind:"idle"}),children:"Dismiss"})]})]}):null,M?u.jsx("div",{className:"section",children:u.jsxs("form",{onSubmit:le,children:[u.jsxs("div",{className:"row",children:[u.jsx("label",{htmlFor:"mint-scope",children:"Scope (space-separated)"}),u.jsx("input",{id:"mint-scope",type:"text",value:b.scope,onChange:C=>y({...b,scope:C.target.value}),placeholder:"e.g. scribe:transcribe vault:default:read",required:!0}),u.jsxs("div",{className:"field-hint",children:["Space-separated ",u.jsx("code",{children:"resource:verb"})," or ",u.jsx("code",{children:"resource:name:verb"})," ","tuples. The hub rejects non-requestable scopes (admin, host:*) per the privilege-diffusion guard."]})]}),u.jsxs("div",{className:"row",children:[u.jsx("label",{htmlFor:"mint-audience",children:"Audience (optional)"}),u.jsx("input",{id:"mint-audience",type:"text",value:b.audience,onChange:C=>y({...b,audience:C.target.value}),placeholder:"inferred from scope when blank"}),u.jsxs("div",{className:"field-hint",children:["Inferred from scope if omitted. ",u.jsx("code",{children:"vault:<name>:<verb>"})," →"," ",u.jsx("code",{children:"vault.<name>"}),"; otherwise the first colon-prefixed scope's namespace; fallback ",u.jsx("code",{children:"hub"}),"."]})]}),u.jsxs("div",{className:"row",children:[u.jsx("label",{htmlFor:"mint-expires-in",children:"Expires in (seconds, optional)"}),u.jsx("input",{id:"mint-expires-in",type:"text",inputMode:"numeric",value:b.expiresIn,onChange:C=>y({...b,expiresIn:C.target.value}),placeholder:"default 90d (7776000)"})]}),u.jsxs("div",{className:"row",children:[u.jsx("label",{htmlFor:"mint-subject",children:"Subject (optional)"}),u.jsx("input",{id:"mint-subject",type:"text",value:b.subject,onChange:C=>y({...b,subject:C.target.value}),placeholder:"defaults to operator's sub"})]}),u.jsxs("div",{className:"row",children:[u.jsx("label",{htmlFor:"mint-permissions",children:"Permissions (JSON object, optional)"}),u.jsx("textarea",{id:"mint-permissions",value:b.permissions,onChange:C=>y({...b,permissions:C.target.value}),placeholder:'e.g. {"vault":{"default":{"write_tags":["health"]}}}',rows:3,style:{width:"100%",fontFamily:"monospace",fontSize:"0.9rem"}})]}),v.kind==="error"?u.jsx("div",{className:"field-error",children:u.jsx("code",{children:v.message})}):null,u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"submit",disabled:v.kind==="submitting",children:v.kind==="submitting"?"Minting…":"Mint"}),u.jsx("button",{type:"button",className:"secondary",onClick:()=>{D(!1),y(Wr),p({kind:"idle"})},children:"Cancel"})]})]})}):null,u.jsxs("div",{style:{marginTop:"1rem",marginBottom:"0.5rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[u.jsx("span",{className:"muted",style:{marginRight:"0.5rem",minWidth:"4rem"},children:"Status:"}),[{value:"all",label:"Show all"},{value:"live",label:"Live only"},{value:"revoked",label:"Revoked only"}].map(C=>u.jsx("button",{type:"button",onClick:()=>V("status",C.value),className:c===C.value?void 0:"secondary","aria-pressed":c===C.value,children:C.label},C.value))]}),u.jsxs("div",{style:{marginBottom:"1rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[u.jsx("span",{className:"muted",style:{marginRight:"0.5rem",minWidth:"4rem"},children:"Source:"}),[{value:"all",label:"All sources"},{value:"oauth_refresh",label:"OAuth"},{value:"operator_mint",label:"Operator"},{value:"cli_mint",label:"CLI mint"}].map(C=>u.jsx("button",{type:"button",onClick:()=>V("source",C.value),className:o===C.value?void 0:"secondary","aria-pressed":o===C.value,children:C.label},C.value))]}),s0({list:f,revoke:w,setRevoke:T,onConfirm:J,onLoadMore:$,onRetry:()=>j(C=>C+1),loadingMore:G,filtersActive:c!=="all"||o!=="all"})]})}function s0({list:i,revoke:r,setRevoke:c,onConfirm:o,onLoadMore:f,onRetry:h,loadingMore:g,filtersActive:j}){return i.kind==="loading"?u.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):i.kind==="error"?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"error-banner",children:["Couldn't load tokens: ",u.jsx("code",{children:i.message})]}),u.jsx("button",{type:"button",onClick:h,className:"secondary",children:"Retry"})]}):i.tokens.length===0?j?u.jsxs("div",{className:"empty empty-rich",children:[u.jsx("p",{className:"empty-headline",children:"No tokens match the current filter."}),u.jsx("p",{className:"muted",children:'Try widening the Status or Source pills above. The default "Show all / All sources" view shows every registry row.'})]}):u.jsxs("div",{className:"empty empty-rich",children:[u.jsx("p",{className:"empty-headline",children:"No tokens."}),u.jsxs("p",{className:"muted",children:["Every CLI mint, OAuth grant, and operator-token rotation lands here. Mint one with the form above, or via ",u.jsx("code",{children:"parachute auth mint-token"}),"."]})]}):u.jsxs("div",{"data-route-content":"true",children:[i.tokens.map(v=>{const p=r0(v),b=r.kind==="revoking"&&r.jti===v.jti,y=r.kind==="confirming"&&r.jti===v.jti,w=r.kind==="error"&&r.jti===v.jti?r:null,T=v.user_id??v.subject??"(unknown)";return u.jsxs("div",{className:"vault-row",children:[u.jsxs("div",{className:"body",children:[u.jsxs("div",{className:"name",children:[u.jsx("code",{title:v.jti,children:fu(v.jti)}),u.jsx("span",{className:`tag${p==="live"?"":" muted"}`,children:p}),u.jsx("span",{className:`tag source-${f0(v.created_via)}`,title:`created_via: ${v.created_via}`,children:d0(v.created_via)})]}),u.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[u.jsx("span",{className:"muted",children:"identity: "}),u.jsx("code",{children:T}),v.client_id?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"muted",children:" · client: "}),u.jsx("code",{children:v.client_id})]}):null]}),u.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[u.jsx("span",{className:"muted",children:"scope: "}),v.scopes.map((M,D)=>u.jsxs("span",{children:[u.jsx("code",{children:M}),D<v.scopes.length-1?" ":null]},M))]}),u.jsxs("div",{className:"dim",style:{marginTop:"0.25rem",fontSize:"0.82rem"},children:[u.jsx("span",{className:"muted",children:"created "}),u.jsx("code",{title:v.created_at,children:Ir(v.created_at)}),u.jsx("span",{className:"muted",children:" · expires "}),u.jsx("code",{title:v.expires_at,children:Ir(v.expires_at)}),v.revoked_at?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"muted",children:" · revoked "}),u.jsx("code",{title:v.revoked_at,children:Ir(v.revoked_at)})]}):null]}),v.permissions?u.jsxs("details",{style:{marginTop:"0.35rem"},children:[u.jsx("summary",{className:"muted",style:{cursor:"pointer",fontSize:"0.85rem"},children:"permissions"}),u.jsx("pre",{style:{fontSize:"0.82rem",marginTop:"0.25rem"},children:JSON.stringify(v.permissions,null,2)})]}):null,w?u.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:u.jsx("code",{children:w.message})}):null,y?u.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${fu(v.jti)}`,children:[u.jsxs("p",{children:["Revoke ",u.jsx("code",{children:fu(v.jti)}),"? Resource servers reject within ~60s of the next revocation-list poll. This cannot be undone."]}),u.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[u.jsx("button",{type:"button",onClick:()=>{o(v.jti)},disabled:b,children:b?"Revoking…":"Revoke"}),u.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"idle"}),disabled:b,children:"Cancel"})]})]}):null]}),!y&&p==="live"?u.jsx("button",{type:"button",className:"secondary",onClick:()=>c({kind:"confirming",jti:v.jti}),"aria-label":`Revoke ${fu(v.jti)}`,children:"Revoke"}):null]},v.jti)}),i.nextCursor?u.jsx("div",{style:{marginTop:"1rem"},children:u.jsx("button",{type:"button",className:"secondary",disabled:g,onClick:()=>{f()},children:g?"Loading…":"Load more"})}):null]})}function r0(i){if(i.revoked_at)return"revoked";const r=new Date(i.expires_at).getTime();return!Number.isNaN(r)&&r<Date.now()?"expired":"live"}function c0(i){return i==="live"||i==="revoked"||i==="all"?i:"all"}function o0(i){return i==="oauth_refresh"||i==="operator_mint"||i==="cli_mint"||i==="all"?i:"all"}function Dh(i,r){const c={};return i==="live"?c.revoked="false":i==="revoked"?c.revoked="true":c.revoked="all",r!=="all"&&(c.createdVia=r),c}function d0(i){switch(i){case"oauth_refresh":return"OAuth";case"operator_mint":return"Operator";case"cli_mint":return"CLI";default:return i}}function f0(i){switch(i){case"oauth_refresh":return"oauth";case"operator_mint":return"operator";case"cli_mint":return"cli";default:return"unknown"}}function fu(i){return i.length<=14?i:`${i.slice(0,8)}…${i.slice(-4)}`}function Ir(i){const r=new Date(i);return Number.isNaN(r.getTime())?i:r.toLocaleString()}const h0=1440*60;function m0({hubOrigin:i}){const[r,c]=S.useState({kind:"loading"}),[o,f]=S.useState(0),[h,g]=S.useState(""),[j,v]=S.useState("7"),[p,b]=S.useState({kind:"idle"}),[y,w]=S.useState(!1),[T,M]=S.useState(null);S.useEffect(()=>{let V=!1;return c({kind:"loading"}),dy().then($=>{V||c({kind:"ok",invites:$})}).catch($=>{V||c({kind:"error",message:$ instanceof Error?$.message:String($)})}),()=>{V=!0}},[o]);async function D(V){if(V.preventDefault(),p.kind==="submitting")return;b({kind:"submitting"}),w(!1);const $=Number.parseInt(j,10);try{const le=await fy({...h.trim()!==""?{vault_name:h.trim()}:{},provision_vault:!0,...Number.isFinite($)&&$>0?{expires_in:$*h0}:{}});b({kind:"created",result:le}),g(""),f(J=>J+1)}catch(le){b({kind:"error",message:le instanceof Error?le.message:String(le)})}}async function G(V){if(!T){M(V);try{await hy(V),f($=>$+1)}catch($){c({kind:"error",message:$ instanceof Error?$.message:String($)})}finally{M(null)}}}function Z(V){var $;($=navigator.clipboard)==null||$.writeText(V).then(()=>{w(!0),setTimeout(()=>w(!1),2e3)})}return u.jsxs("section",{style:{marginTop:"2rem"},"data-testid":"invites-section",children:[u.jsx("div",{className:"list-header",children:u.jsx("h2",{children:"Invite links"})}),u.jsx("p",{className:"muted",children:"Generate a one-time, expiring link. The recipient opens it, picks a username and password, and gets their own newly-provisioned vault (they become its owner). No admin-typed default password. Leave the vault name blank to let them name it themselves."}),u.jsx("form",{onSubmit:V=>void D(V),style:{marginBottom:"1rem"},children:u.jsxs("div",{style:{display:"flex",gap:"0.75rem",flexWrap:"wrap",alignItems:"flex-end"},children:[u.jsxs("label",{className:"field",style:{flex:"1 1 14rem"},children:[u.jsx("span",{className:"field-label",children:"Vault name (optional)"}),u.jsx("input",{type:"text",value:h,onChange:V=>g(V.target.value),placeholder:"leave blank → they choose",pattern:"[a-z0-9_-]*",autoComplete:"off",spellCheck:!1})]}),u.jsxs("label",{className:"field",style:{flex:"0 0 8rem"},children:[u.jsx("span",{className:"field-label",children:"Expires (days)"}),u.jsx("input",{type:"number",min:1,max:90,value:j,onChange:V=>v(V.target.value)})]}),u.jsx("button",{type:"submit",disabled:p.kind==="submitting",children:p.kind==="submitting"?"Creating…":"Create invite"})]})}),p.kind==="error"&&u.jsx("div",{className:"error-banner",style:{marginBottom:"1rem"},children:p.message}),p.kind==="created"&&u.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"1rem"},children:[u.jsx("strong",{children:"Invite created."})," Copy this link now — it's shown only once and can't be retrieved later. The hub stores only a hash.",u.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem",alignItems:"center",flexWrap:"wrap"},children:[u.jsx("code",{style:{wordBreak:"break-all",flex:"1 1 16rem"},children:p.result.url}),u.jsx("button",{type:"button",className:"secondary",onClick:()=>Z(p.result.url),children:y?"Copied!":"Copy link"}),u.jsx("button",{type:"button",className:"secondary",onClick:()=>b({kind:"idle"}),children:"Dismiss"})]})]}),r.kind==="loading"&&u.jsx("p",{className:"muted",children:"Loading invites…"}),r.kind==="error"&&u.jsxs("div",{className:"error-banner",children:[r.message,u.jsx("div",{style:{marginTop:"0.5rem"},children:u.jsx("button",{type:"button",className:"secondary",onClick:()=>f(V=>V+1),children:"Retry"})})]}),r.kind==="ok"&&r.invites.length===0&&u.jsx("p",{className:"muted",children:"No invites yet."}),r.kind==="ok"&&r.invites.length>0&&u.jsx("div",{className:"table-scroll",children:u.jsxs("table",{className:"user-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Vault"}),u.jsx("th",{children:"Role"}),u.jsx("th",{children:"Status"}),u.jsx("th",{children:"Expires"}),u.jsx("th",{children:"Created"}),u.jsx("th",{})]})}),u.jsx("tbody",{children:r.invites.map(V=>u.jsxs("tr",{children:[u.jsx("td",{children:V.vault_name??u.jsx("span",{className:"muted",children:"redeemer chooses"})}),u.jsx("td",{children:V.role==="write"?"owner":V.role}),u.jsx("td",{children:u.jsx("span",{className:`status status-${V.status}`,children:V.status})}),u.jsx("td",{className:"muted",children:new Date(V.expires_at).toLocaleDateString()}),u.jsx("td",{className:"muted",children:new Date(V.created_at).toLocaleDateString()}),u.jsx("td",{children:V.status==="pending"?u.jsx("button",{type:"button",className:"secondary",disabled:T===V.id,onClick:()=>void G(V.id),children:T===V.id?"Revoking…":"Revoke"}):null})]},V.id))})]})}),i?u.jsxs("p",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.85em"},children:["Redemption links are served from ",u.jsxs("code",{children:[i,"/account/setup/<token>"]}),"."]}):null]})}const Da=12,p0=/^[a-z0-9_-]+$/,gu=2,yu=32,Hh={username:"",password:"",assignedVaults:[]};function gm({username:i,hubOrigin:r}){const c=`${r||""}/login`;return u.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.9em"},children:["Send them to ",u.jsx("code",{children:c})," with username ",u.jsx("code",{children:i})," and this password — they'll be prompted to set a new one on first sign-in."]})}function v0(){const[i,r]=S.useState({kind:"loading"}),[c,o]=S.useState(0),[f,h]=S.useState(!1),[g,j]=S.useState(Hh),[v,p]=S.useState({kind:"idle"}),[b,y]=S.useState({kind:"idle"}),[w,T]=S.useState({kind:"idle"}),[M,D]=S.useState({kind:"idle"});S.useEffect(()=>{let J=!1;return r({kind:"loading"}),Promise.all([iy(),oy(),dm()]).then(([Y,C,k])=>{if(J)return;const X=k.resolved_issuer.replace(/\/+$/,"");r({kind:"ok",data:{users:Y,vaults:C,hubOrigin:X}})}).catch(Y=>{if(J)return;const C=Y instanceof Error?Y.message:String(Y);r({kind:"error",message:C})}),()=>{J=!0}},[c]);function G(J){return J.username.length<gu||J.username.length>yu?`Username must be ${gu}-${yu} characters.`:p0.test(J.username)?J.password.length<Da?`Password must be at least ${Da} characters.`:null:"Username may only contain lowercase letters, digits, hyphens, and underscores."}async function Z(J){J.preventDefault();const Y=G(g);if(Y){p({kind:"error",message:Y});return}p({kind:"submitting"});const C={username:g.username,password:g.password,assignedVaults:g.assignedVaults};try{const k=await uy(C);j(Hh),p({kind:"created",username:k.username}),o(X=>X+1)}catch(k){const X=k instanceof Q?`Create failed (${k.status}): ${k.message}`:k instanceof Error?k.message:String(k);p({kind:"error",message:X})}}async function V(J){y({kind:"deleting",userId:J.id});try{const{revocationLagSeconds:Y}=await sy(J.id);y({kind:"done",username:J.username,revocationLagSeconds:Y}),o(C=>C+1)}catch(Y){const C=Y instanceof Q?`Delete failed (${Y.status}): ${Y.message}`:Y instanceof Error?Y.message:String(Y);y({kind:"error",userId:J.id,message:C})}}async function $(J,Y){D({kind:"submitting",userId:J.id,selected:Y});try{await cy(J.id,Y),D({kind:"done",userId:J.id,username:J.username}),o(C=>C+1)}catch(C){const k=C instanceof Q?`Edit vaults failed (${C.status}): ${C.message}`:C instanceof Error?C.message:String(C);D({kind:"error",userId:J.id,selected:Y,message:k})}}async function le(J,Y){if(Y.length<Da){T({kind:"error",userId:J.id,password:Y,message:`Password must be at least ${Da} characters.`});return}T({kind:"submitting",userId:J.id,password:Y});try{const{revocationLagSeconds:C}=await ry(J.id,Y);T({kind:"done",userId:J.id,username:J.username,revocationLagSeconds:C}),o(k=>k+1)}catch(C){const k=C instanceof Q?`Reset failed (${C.status}): ${C.message}`:C instanceof Error?C.message:String(C);T({kind:"error",userId:J.id,password:Y,message:k})}}return u.jsxs("div",{"data-route-content":"true",children:[u.jsx("div",{className:"list-header",children:u.jsx("h1",{children:"Users"})}),u.jsxs("p",{className:"muted",children:["Hub user accounts. Each user can be a member of one or more vaults — the OAuth issuer narrows their tokens to ",u.jsx("code",{children:"vault:<assigned>:*"})," scopes for any vault in their list. Users with no assignments can't authorize any vault yet — assign at least one above. The first admin is unrestricted (admin posture). Admin-created users land with a default password and are prompted to change it on first sign-in",i.kind==="ok"?u.jsxs(u.Fragment,{children:[" ","at ",u.jsxs("code",{children:[i.data.hubOrigin,"/login"]})]}):null,"."]}),b.kind==="done"&&u.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"0.75rem"},"data-testid":"delete-done-banner",children:["Deleted ",u.jsx("code",{children:b.username}),". Their tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",b.revocationLagSeconds," ","seconds — if you're deleting because of a suspected compromise, also restart the affected services (e.g. ",u.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately.",u.jsx("div",{style:{marginTop:"0.5rem"},children:u.jsx("button",{type:"button",className:"secondary",onClick:()=>y({kind:"idle"}),children:"Dismiss"})})]}),g0(i,b,y,V,w,T,le,M,D,$,i.kind==="ok"?i.data.vaults:[],i.kind==="ok"?i.data.hubOrigin:"",()=>o(J=>J+1)),i.kind==="ok"&&u.jsx(j0,{show:f,setShow:h,form:g,setForm:j,vaults:i.data.vaults,hubOrigin:i.data.hubOrigin,createState:v,setCreateState:p,onSubmit:Z}),i.kind==="ok"&&u.jsx(m0,{hubOrigin:i.data.hubOrigin})]})}function g0(i,r,c,o,f,h,g,j,v,p,b,y,w){var D;if(i.kind==="loading")return u.jsx("p",{className:"muted",children:"Loading users…"});if(i.kind==="error")return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"error-banner",children:["Couldn't load users: ",u.jsx("code",{children:i.message})]}),u.jsx("button",{type:"button",onClick:w,className:"secondary",children:"Retry"})]});const{users:T}=i.data;if(T.length===0)return u.jsxs("div",{className:"empty empty-rich",children:[u.jsx("p",{className:"empty-headline",children:"No users yet."}),u.jsx("p",{className:"muted",children:"Click Create User below to invite someone."})]});const M=(D=T[0])==null?void 0:D.id;return u.jsx(y0,{users:T,firstAdminId:M,deleteSt:r,setDeleteSt:c,onConfirmDelete:o,resetSt:f,setResetSt:h,onSubmitReset:g,editVaultsSt:j,setEditVaultsSt:v,onSubmitEditVaults:p,availableVaults:b,hubOrigin:y})}function y0({users:i,firstAdminId:r,deleteSt:c,setDeleteSt:o,onConfirmDelete:f,resetSt:h,setResetSt:g,onSubmitReset:j,editVaultsSt:v,setEditVaultsSt:p,onSubmitEditVaults:b,availableVaults:y,hubOrigin:w}){return u.jsx("div",{className:"user-list",style:{marginTop:"1rem"},children:u.jsx("div",{className:"table-scroll",children:u.jsxs("table",{className:"user-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{scope:"col",children:"Username"}),u.jsx("th",{scope:"col",children:"Assigned vaults"}),u.jsx("th",{scope:"col",children:"Password set"}),u.jsx("th",{scope:"col",children:"Created"}),u.jsx("th",{scope:"col",children:"Actions"})]})}),u.jsx("tbody",{children:i.map(T=>{const M=T.id===r,D=c.kind==="deleting"&&c.userId===T.id,G=c.kind==="confirming"&&c.user.id===T.id,Z=c.kind==="error"&&c.userId===T.id?c:null,V=(h.kind==="open"||h.kind==="submitting"||h.kind==="error")&&h.userId===T.id?h:null,$=h.kind==="done"&&h.userId===T.id?h:null,le=(v.kind==="open"||v.kind==="submitting"||v.kind==="error")&&v.userId===T.id?v:null,J=v.kind==="done"&&v.userId===T.id?v:null;return u.jsxs("tr",{"data-user-id":T.id,children:[u.jsxs("td",{children:[u.jsx("code",{children:T.username}),M&&u.jsx("span",{className:"badge",style:{marginLeft:"0.5rem"},children:"first admin"})]}),u.jsx("td",{children:T.assigned_vaults.length>0?u.jsx("span",{style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem"},children:T.assigned_vaults.map(Y=>u.jsx("code",{children:Y},Y))}):u.jsx("span",{className:"muted",title:M?"First admin is unrestricted (admin posture)":"No vaults assigned — user can't authorize any vault yet",children:"—"})}),u.jsx("td",{children:T.password_changed?u.jsx("span",{"aria-label":"changed",children:"✓"}):u.jsx("span",{className:"status status-pending",title:"User hasn't completed first-sign-in change-password yet",children:"pending first login"})}),u.jsx("td",{children:u.jsx("span",{title:T.created_at,children:S0(T.created_at)})}),u.jsxs("td",{children:[G?null:u.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[M&&u.jsxs(u.Fragment,{children:[u.jsx("span",{id:`first-admin-tooltip-${T.id}`,className:"sr-only",children:"First admin can't be deleted (would self-lock the hub)"}),u.jsx("span",{id:`first-admin-reset-tooltip-${T.id}`,className:"sr-only",children:"First admin uses /account/change-password directly"}),u.jsx("span",{id:`first-admin-vaults-tooltip-${T.id}`,className:"sr-only",children:"First admin's vault membership is unrestricted by design"})]}),u.jsx("button",{type:"button",className:"secondary",disabled:M||le!==null||v.kind==="submitting"&&v.userId===T.id,title:M?"First admin's vault membership is unrestricted by design":void 0,"aria-describedby":M?`first-admin-vaults-tooltip-${T.id}`:void 0,onClick:()=>p({kind:"open",userId:T.id,selected:[...T.assigned_vaults]}),"aria-label":`Edit vaults for ${T.username}`,children:"Edit vaults"}),u.jsx("button",{type:"button",className:"secondary",disabled:M||V!==null||h.kind==="submitting"&&h.userId===T.id,title:M?"First admin uses /account/change-password directly":void 0,"aria-describedby":M?`first-admin-reset-tooltip-${T.id}`:void 0,onClick:()=>g({kind:"open",userId:T.id,password:""}),"aria-label":`Reset password for ${T.username}`,children:"Reset password"}),u.jsx("button",{type:"button",className:"secondary",disabled:M||D,title:M?"First admin can't be deleted (would self-lock the hub)":void 0,"aria-describedby":M?`first-admin-tooltip-${T.id}`:void 0,onClick:()=>o({kind:"confirming",user:T}),"aria-label":`Delete ${T.username}`,children:D?"Deleting…":"Delete"})]}),G&&u.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm delete ${T.username}`,children:[u.jsxs("p",{children:["Delete ",u.jsx("code",{children:T.username}),"? This revokes their tokens, drops their sessions and grants, and removes the account. The audit trail is preserved — tokens stay with ",u.jsx("code",{children:"revoked_at"})," set, anonymised."]}),u.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[u.jsx("button",{type:"button",className:"destructive",onClick:()=>{f(T)},disabled:D,children:D?"Deleting…":"Delete"}),u.jsx("button",{type:"button",className:"secondary",onClick:()=>o({kind:"idle"}),disabled:D,children:"Cancel"})]})]}),Z&&u.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:u.jsx("code",{children:Z.message})}),V&&u.jsx(b0,{user:T,state:V,onCancel:()=>g({kind:"idle"}),onPasswordChange:Y=>g({kind:"open",userId:T.id,password:Y}),onSubmit:Y=>{j(T,Y)}}),$&&u.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Password reset for ",u.jsx("code",{children:$.username}),". Hand them the new password and tell them they'll be prompted to change it on first sign-in.",u.jsx(gm,{username:$.username,hubOrigin:w}),u.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.85em"},children:["Their existing tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",$.revocationLagSeconds," ","seconds — if you're resetting because of a suspected compromise, also restart the affected services (e.g. ",u.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately."]}),u.jsx("div",{style:{marginTop:"0.5rem"},children:u.jsx("button",{type:"button",className:"secondary",onClick:()=>g({kind:"idle"}),children:"Dismiss"})})]}),le&&u.jsx(x0,{user:T,state:le,availableVaults:y,onCancel:()=>p({kind:"idle"}),onSelectedChange:Y=>p({kind:"open",userId:T.id,selected:Y}),onSubmit:Y=>{b(T,Y)}}),J&&u.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Vault assignments updated for ",u.jsx("code",{children:J.username}),".",u.jsx("div",{style:{marginTop:"0.5rem"},children:u.jsx("button",{type:"button",className:"secondary",onClick:()=>p({kind:"idle"}),children:"Dismiss"})})]})]})]},T.id)})})]})})})}function b0({user:i,state:r,onCancel:c,onPasswordChange:o,onSubmit:f}){const h=r.kind==="submitting",g=r.kind==="error"?r.message:null,j=`reset-password-input-${i.id}`;return u.jsxs("form",{onSubmit:v=>{v.preventDefault(),f(r.password)},"aria-label":`Reset password for ${i.username}`,style:{marginTop:"0.5rem",padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[u.jsxs("p",{style:{margin:0},children:[u.jsxs("label",{htmlFor:j,children:["New temporary password for ",u.jsx("code",{children:i.username})," ",u.jsxs("span",{className:"muted",children:["(min ",Da," chars)"]})]}),u.jsx("br",{}),u.jsx("input",{id:j,type:"password",required:!0,autoComplete:"new-password",minLength:Da,value:r.password,disabled:h,onChange:v=>o(v.target.value)})]}),g&&u.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:u.jsx("code",{children:g})}),u.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[u.jsx("button",{type:"submit",disabled:h,children:h?"Setting…":"Set new password"}),u.jsx("button",{type:"button",className:"secondary",onClick:c,disabled:h,children:"Cancel"})]})]})}function x0({user:i,state:r,availableVaults:c,onCancel:o,onSelectedChange:f,onSubmit:h}){const g=r.kind==="submitting",j=r.kind==="error"?r.message:null,v=`edit-vaults-select-${i.id}`;function p(b){const y=Array.from(b.target.selectedOptions).map(w=>w.value);f(y)}return u.jsxs("form",{onSubmit:b=>{b.preventDefault(),h(r.selected)},"aria-label":`Edit vaults for ${i.username}`,style:{marginTop:"0.5rem",padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[u.jsx("p",{style:{margin:0},children:u.jsxs("label",{htmlFor:v,children:["Vault assignments for ",u.jsx("code",{children:i.username})," ",u.jsx("span",{className:"muted",children:"(empty = no narrowing; shift-click to multi-select)"})]})}),r.selected.length>0&&u.jsx("div",{"data-testid":`edit-vaults-chips-${i.id}`,style:{marginTop:"0.4rem",display:"flex",flexWrap:"wrap",gap:"0.25rem"},children:r.selected.map(b=>u.jsx("code",{style:{padding:"0.1rem 0.4rem",borderRadius:"4px"},children:b},b))}),u.jsx("select",{id:v,multiple:!0,value:r.selected,onChange:p,disabled:g,size:Math.min(Math.max(c.length,3),8),style:{marginTop:"0.4rem",minWidth:"12rem"},children:c.map(b=>u.jsx("option",{value:b,children:b},b))}),c.length===0&&u.jsx("p",{className:"muted",style:{marginTop:"0.25rem"},children:"No vaults registered on this hub yet."}),j&&u.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:u.jsx("code",{children:j})}),u.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[u.jsx("button",{type:"submit",disabled:g,children:g?"Saving…":"Save vault assignments"}),u.jsx("button",{type:"button",className:"secondary",onClick:o,disabled:g,children:"Cancel"})]})]})}function j0({show:i,setShow:r,form:c,setForm:o,vaults:f,hubOrigin:h,createState:g,setCreateState:j,onSubmit:v}){const p=g.kind==="submitting";return u.jsx("section",{style:{marginTop:"1.5rem"},children:i?u.jsxs("form",{onSubmit:b=>void v(b),"aria-label":"Create user",children:[u.jsx("h3",{children:"Create user"}),u.jsxs("p",{children:[u.jsxs("label",{htmlFor:"new-user-username",children:["Username"," ",u.jsxs("span",{className:"muted",children:["(",gu,"-",yu," chars, lowercase letters/digits/hyphens/ underscores)"]})]}),u.jsx("br",{}),u.jsx("input",{id:"new-user-username",type:"text",required:!0,autoComplete:"off",value:c.username,minLength:gu,maxLength:yu,pattern:"[a-z0-9_\\-]+",onChange:b=>o({...c,username:b.target.value})})]}),u.jsxs("p",{children:[u.jsxs("label",{htmlFor:"new-user-password",children:["Password ",u.jsxs("span",{className:"muted",children:["(min ",Da," chars)"]})]}),u.jsx("br",{}),u.jsx("input",{id:"new-user-password",type:"password",required:!0,autoComplete:"new-password",value:c.password,minLength:Da,onChange:b=>o({...c,password:b.target.value})})]}),u.jsxs("p",{children:[u.jsxs("label",{htmlFor:"new-user-vaults",children:["Assigned vaults"," ",u.jsx("span",{className:"muted",children:"(empty = no restriction; shift-click to select multiple)"})]}),u.jsx("br",{}),c.assignedVaults.length>0&&u.jsx("span",{"data-testid":"new-user-vault-chips",style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem",marginBottom:"0.25rem"},children:c.assignedVaults.map(b=>u.jsx("code",{children:b},b))}),u.jsx("br",{}),u.jsx("select",{id:"new-user-vaults",multiple:!0,value:c.assignedVaults,onChange:b=>o({...c,assignedVaults:Array.from(b.target.selectedOptions).map(y=>y.value)}),size:Math.min(Math.max(f.length,3),8),style:{minWidth:"12rem"},children:f.map(b=>u.jsx("option",{value:b,children:b},b))}),f.length===0&&u.jsx("span",{className:"muted",style:{marginLeft:"0.5rem"},children:"No vaults registered on this hub yet."})]}),g.kind==="error"&&u.jsx("div",{className:"error-banner",children:u.jsx("code",{children:g.message})}),g.kind==="created"&&u.jsxs("output",{className:"success-banner",children:["User ",u.jsx("code",{children:g.username})," created. They'll be prompted to change their password on first sign-in.",u.jsx(gm,{username:g.username,hubOrigin:h})]}),u.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[u.jsx("button",{type:"submit",disabled:p,children:p?"Creating…":"Create user"}),u.jsx("button",{type:"button",className:"secondary",disabled:p,onClick:()=>{r(!1),j({kind:"idle"})},children:"Close"})]})]}):u.jsx("button",{type:"button",onClick:()=>r(!0),children:"Create User"})})}function S0(i){const r=new Date(i);return Number.isNaN(r.getTime())?i:r.toLocaleString()}function Bh(){const[i,r]=S.useState({kind:"loading"}),[c,o]=S.useState(0),[f,h]=S.useState({kind:"idle"}),[g,j]=S.useState(null),[v,p]=S.useState({});async function b(w){if(w.managementUrl){h({kind:"minting",name:w.name});try{const T=await rm(w.name),M=Qg(w.url,w.managementUrl),D=M.includes("#")?"&":"#";window.location.assign(`${M}${D}token=${T.token}`)}catch(T){const M=T instanceof Q?`mint failed (${T.status}): ${T.message}`:T instanceof Error?T.message:String(T);h({kind:"error",name:w.name,message:M})}}}if(S.useEffect(()=>{let w=!1;return Hg().then(T=>{w||r({kind:"ok",vaults:T.vaults,moduleInstalled:T.moduleInstalled})}).catch(T=>{if(w)return;const M=T instanceof Error?T.message:String(T);r({kind:"error",message:M})}),()=>{w=!0}},[c]),S.useEffect(()=>{if(i.kind!=="ok")return;const w=i.vaults.map(M=>M.name);if(w.length===0)return;let T=!1;p(M=>{const D={...M};for(const G of w)D[G]||(D[G]={kind:"loading"});return D});for(const M of w)qg(M).then(D=>{T||p(G=>({...G,[M]:{kind:"ok",usage:D}}))}).catch(()=>{T||p(D=>({...D,[M]:{kind:"error"}}))});return()=>{T=!0}},[i]),i.kind==="loading")return u.jsxs("div",{children:[u.jsx("div",{className:"list-header",children:u.jsx("h1",{children:"Vaults"})}),u.jsx("p",{className:"muted",children:"Loading…"})]});if(i.kind==="error")return u.jsxs("div",{children:[u.jsxs("div",{className:"list-header",children:[u.jsx("h1",{children:"Vaults"}),u.jsx(Je,{to:"/vaults/new",children:u.jsx("button",{type:"button",children:"New vault"})})]}),u.jsxs("div",{className:"error-banner",children:["Couldn't load vaults: ",u.jsx("code",{children:i.message})]}),u.jsx("button",{type:"button",onClick:()=>o(w=>w+1),className:"secondary",children:"Retry"})]});const y=i.vaults.length===0&&!i.moduleInstalled;return u.jsxs("div",{"data-route-content":"true",children:[u.jsxs("div",{className:"list-header",children:[u.jsxs("h1",{children:["Vaults (",i.vaults.length,")"]}),y?u.jsx(Je,{to:"/modules",children:u.jsx("button",{type:"button",children:"Install vault module"})}):u.jsx(Je,{to:"/vaults/new",children:u.jsx("button",{type:"button",children:"New vault"})})]}),u.jsxs("p",{className:"muted",children:["Vaults registered with this hub at ",u.jsx("code",{children:"/.well-known/parachute.json"}),"."]}),i.vaults.length===0?y?u.jsxs("div",{className:"empty empty-rich",children:[u.jsx("p",{className:"empty-headline",children:"No vault module installed."}),u.jsx("p",{className:"muted",children:"The vault backend isn't installed on this hub yet, so there's nothing to provision a vault against. Install it from the Modules page first, then come back here to create your first vault."}),u.jsx("p",{style:{marginTop:"0.75rem"},children:u.jsx(Je,{to:"/modules",children:"Install vault module →"})})]}):u.jsxs("div",{className:"empty empty-rich",children:[u.jsx("p",{className:"empty-headline",children:"No vaults yet."}),u.jsx("p",{className:"muted",children:"Create your first vault to start storing tokens, secrets, and notes scoped to this hub."}),u.jsx("p",{style:{marginTop:"0.75rem"},children:u.jsx(Je,{to:"/vaults/new",children:"Create a vault →"})})]}):u.jsx("div",{style:{marginTop:"1rem"},children:i.vaults.map(w=>{const T=f.kind==="minting"&&f.name===w.name,M=f.kind==="error"&&f.name===w.name?f:null,D=g===w.name,G=v[w.name],Z=(G==null?void 0:G.kind)==="ok"?`${G.usage.notes} ${G.usage.notes===1?"note":"notes"} · ${Yg(G.usage.totalBytes)}`:(G==null?void 0:G.kind)==="loading"?"…":"—";return u.jsxs("div",{className:"vault-row-group",children:[u.jsxs("div",{className:"vault-row",children:[u.jsxs("div",{className:"body",children:[u.jsxs("div",{className:"name",children:[u.jsx("code",{children:w.name}),u.jsxs("span",{className:"tag muted",title:"Vault version",children:["v",w.version]})]}),u.jsx("div",{className:"dim url",children:u.jsx("code",{children:w.url})}),u.jsx("div",{className:"dim vault-usage","data-testid":`vault-usage-${w.name}`,children:Z}),M?u.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:u.jsx("code",{children:M.message})}):null]}),u.jsxs("div",{className:"vault-row-actions",children:[u.jsx("button",{type:"button",className:D?void 0:"secondary","aria-expanded":D,"aria-label":`Connect an MCP client to vault ${w.name}`,onClick:()=>j(V=>V===w.name?null:w.name),children:D?"Hide connect":"Connect"}),w.managementUrl?u.jsx("button",{type:"button",onClick:()=>{b(w)},disabled:T,"aria-label":`Manage vault ${w.name}`,children:T?"Opening…":"Manage"}):u.jsx("span",{className:"muted",title:"This vault has no admin SPA — manage with parachute-vault on the host.",children:"CLI only"})]})]}),D?u.jsx(vm,{vaultName:w.name,vaultUrl:w.url}):null]},w.name)})})]})}function ym(i){return i==="/permissions"||i.startsWith("/permissions/")?"permissions":i==="/tokens"||i.startsWith("/tokens/")?"tokens":i==="/modules"||i.startsWith("/modules/")?/^\/modules\/[a-z][a-z0-9-]*\/config$/.test(i)?"module config":"modules":i==="/users"||i.startsWith("/users/")?"users":i==="/settings"||i.startsWith("/settings/")?"settings":i.startsWith("/approve-client/")?"approve app":"vaults"}function C0(i){return`${ym(i).split(" ").map(c=>c.length>0?c[0].toUpperCase()+c.slice(1):c).join(" ")} · ${um}`}function E0(){const{pathname:i}=Ut(),r=ym(i),[c,o]=S.useState(null);S.useEffect(()=>{document.title=C0(i)},[i]);const[f,h]=S.useState(!1),[g,j]=S.useState([]);S.useEffect(()=>{let p=!1;return Zg().then(b=>{p||o(b)}).catch(()=>{p||o({hasSession:!1})}),()=>{p=!0}},[]),S.useEffect(()=>{if(!c||!c.hasSession)return;let p=!1;return om().then(b=>{p||j(b.modules.filter(y=>y.installed))}).catch(()=>{p||j([])}),()=>{p=!0}},[c]);async function v(p){h(!0);try{await Xg(p),window.location.href="/"}catch{h(!1)}}return u.jsxs("div",{className:"page",children:[u.jsxs("nav",{className:"nav",children:[u.jsxs(Je,{to:"/vaults",className:"brand",children:[u.jsx(zg,{size:18,idSuffix:"spa-nav",className:"brand-mark-icon"}),u.jsx("span",{className:"brand-wordmark",children:um}),u.jsx("span",{className:"sub",children:r})]}),u.jsx(w0,{me:c,signingOut:f,onSignOut:v}),u.jsx(Gn,{to:"/vaults",label:"Vaults",alsoActiveAt:"/"}),u.jsx(Gn,{to:"/modules",label:"Modules"}),u.jsx(N0,{services:g}),u.jsx(Gn,{to:"/users",label:"Users"}),u.jsx(Gn,{to:"/permissions",label:"Permissions"}),u.jsx(Gn,{to:"/tokens",label:"Tokens"}),u.jsx(Gn,{to:"/settings",label:"Settings"}),u.jsx("span",{className:"nav-divider","aria-hidden":"true"}),u.jsx("a",{href:"/",title:"Hub discovery page (top-level)",children:"Discovery"})]}),u.jsxs(Kv,{children:[u.jsx(Ot,{path:"/",element:u.jsx(Bh,{})}),u.jsx(Ot,{path:"/vaults",element:u.jsx(Bh,{})}),u.jsx(Ot,{path:"/vaults/new",element:u.jsx(Iy,{})}),u.jsx(Ot,{path:"/modules",element:u.jsx(Yy,{})}),u.jsx(Ot,{path:"/modules/:short/config",element:u.jsx(wy,{})}),u.jsx(Ot,{path:"/users",element:u.jsx(v0,{})}),u.jsx(Ot,{path:"/permissions",element:u.jsx(t0,{})}),u.jsx(Ot,{path:"/tokens",element:u.jsx(u0,{})}),u.jsx(Ot,{path:"/settings",element:u.jsx(l0,{})}),u.jsx(Ot,{path:"/approve-client/:clientId",element:u.jsx(by,{})}),u.jsx(Ot,{path:"*",element:u.jsxs("div",{className:"empty",children:["404 — back to ",u.jsx(Je,{to:"/vaults",children:"vaults"}),"."]})})]}),c!=null&&c.hasSession?u.jsx(yy,{}):null]})}function Gn({to:i,label:r,alsoActiveAt:c}){const{pathname:o}=Ut(),g=o===i||o.startsWith(`${i}/`)||c!==void 0&&o===c;return u.jsx(Je,{to:i,className:g?"nav-link nav-link-active":"nav-link","aria-current":g?"page":void 0,children:r})}function N0({services:i}){return i.length===0?null:u.jsxs("details",{className:"nav-dropdown","data-testid":"installed-services-dropdown",children:[u.jsx("summary",{className:"nav-dropdown-summary",children:"Services"}),u.jsx("div",{className:"nav-dropdown-panel",role:"menu",children:i.map(r=>{const c=r.management_url;return c?u.jsx("a",{className:"nav-dropdown-item",href:c,role:"menuitem","data-testid":`nav-service-${r.short}`,children:r.display_name},r.short):u.jsx("span",{className:"nav-dropdown-item nav-dropdown-item-disabled",role:"menuitem","aria-disabled":"true",title:"This module hasn't shipped an admin UI yet.","data-testid":`nav-service-${r.short}`,children:r.display_name},r.short)})})]})}function w0({me:i,signingOut:r,onSignOut:c}){return i===null?null:i.hasSession?u.jsxs("span",{className:"auth-spa",children:[u.jsxs("span",{className:"muted",children:["Signed in as ",u.jsx("strong",{children:i.user.displayName})]})," ","·"," ",u.jsx("button",{type:"button",className:"auth-spa-signout",disabled:r,onClick:()=>{c(i.csrf)},children:r?"Signing out…":"Sign out"})]}):u.jsx("a",{href:`/login?next=${encodeURIComponent(window.location.pathname)}`,className:"auth-spa",children:"Sign in"})}const bm=document.getElementById("root");if(!bm)throw new Error("#root not found");function T0(){const i=window.location.pathname;return i==="/admin"||i.startsWith("/admin/")?"/admin":""}I1.createRoot(bm).render(u.jsx(S.StrictMode,{children:u.jsx(xg,{basename:T0(),children:u.jsx(E0,{})})}));
|