@openparachute/hub 0.6.3 → 0.6.4-rc.10
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 -2
- package/src/__tests__/account-home-ui.test.ts +344 -110
- package/src/__tests__/account-mirror.test.ts +156 -0
- package/src/__tests__/account-setup.test.ts +880 -0
- package/src/__tests__/account-usage.test.ts +137 -0
- package/src/__tests__/account-vault-admin-token.test.ts +301 -0
- package/src/__tests__/account-vault-token.test.ts +53 -1
- package/src/__tests__/admin-vault-admin-token.test.ts +17 -0
- package/src/__tests__/admin-vaults.test.ts +20 -0
- package/src/__tests__/api-account.test.ts +236 -4
- package/src/__tests__/api-invites.test.ts +217 -0
- package/src/__tests__/api-mint-token.test.ts +259 -10
- package/src/__tests__/api-modules-ops.test.ts +195 -3
- package/src/__tests__/api-modules.test.ts +40 -4
- package/src/__tests__/api-settings-hub-origin.test.ts +13 -8
- package/src/__tests__/auto-wire.test.ts +101 -1
- package/src/__tests__/cli.test.ts +188 -2
- package/src/__tests__/cloudflare-state.test.ts +104 -0
- package/src/__tests__/expose-2fa-warning.test.ts +11 -8
- package/src/__tests__/expose-cloudflare.test.ts +135 -9
- package/src/__tests__/expose-interactive.test.ts +234 -7
- package/src/__tests__/expose-supervisor-version.test.ts +104 -0
- package/src/__tests__/expose.test.ts +10 -5
- package/src/__tests__/grants.test.ts +197 -8
- package/src/__tests__/hub-origin-resolution.test.ts +179 -25
- package/src/__tests__/hub-server.test.ts +761 -13
- package/src/__tests__/hub-unit.test.ts +185 -0
- package/src/__tests__/init.test.ts +579 -3
- package/src/__tests__/install.test.ts +448 -2
- package/src/__tests__/invites.test.ts +220 -0
- package/src/__tests__/launchctl-guard.test.ts +185 -0
- package/src/__tests__/migrate-cutover.test.ts +33 -0
- package/src/__tests__/module-ops-client.test.ts +68 -0
- package/src/__tests__/scope-explanations.test.ts +16 -0
- package/src/__tests__/serve-boot.test.ts +74 -1
- package/src/__tests__/serve.test.ts +121 -7
- package/src/__tests__/setup-wizard.test.ts +110 -0
- package/src/__tests__/spawn-path.test.ts +191 -0
- package/src/__tests__/status.test.ts +64 -0
- package/src/__tests__/supervisor.test.ts +374 -0
- package/src/__tests__/users.test.ts +66 -0
- package/src/__tests__/well-known.test.ts +25 -0
- package/src/__tests__/wizard.test.ts +72 -1
- package/src/account-home-ui.ts +481 -235
- package/src/account-mirror.ts +126 -0
- package/src/account-setup.ts +381 -0
- package/src/account-usage.ts +118 -0
- package/src/account-vault-admin-token.ts +242 -0
- package/src/account-vault-token.ts +36 -2
- package/src/admin-login-ui.ts +121 -0
- package/src/admin-vault-admin-token.ts +8 -2
- package/src/admin-vaults.ts +137 -29
- package/src/api-account.ts +118 -1
- package/src/api-invites.ts +345 -0
- package/src/api-mint-token.ts +81 -0
- package/src/api-modules-ops.ts +168 -53
- package/src/api-modules.ts +36 -0
- package/src/auto-wire.ts +87 -0
- package/src/cli.ts +128 -34
- package/src/cloudflare/detect.ts +1 -1
- package/src/cloudflare/state.ts +104 -8
- package/src/commands/expose-2fa-warning.ts +17 -13
- package/src/commands/expose-cloudflare.ts +103 -36
- package/src/commands/expose-interactive.ts +163 -17
- package/src/commands/expose-supervisor.ts +45 -0
- package/src/commands/init.ts +183 -4
- package/src/commands/install.ts +321 -3
- package/src/commands/migrate-cutover.ts +12 -5
- package/src/commands/serve-boot.ts +33 -3
- package/src/commands/serve.ts +158 -37
- package/src/commands/status.ts +9 -1
- package/src/commands/wizard.ts +36 -2
- package/src/grants.ts +113 -0
- package/src/help.ts +18 -5
- package/src/hub-db.ts +70 -2
- package/src/hub-server.ts +438 -41
- package/src/hub-settings.ts +3 -3
- package/src/hub-unit.ts +259 -9
- package/src/invites.ts +291 -0
- package/src/launchctl-guard.ts +131 -0
- package/src/managed-unit.ts +13 -3
- package/src/migrate-offer.ts +15 -6
- package/src/module-ops-client.ts +47 -22
- package/src/scope-attenuation.ts +19 -0
- package/src/scope-explanations.ts +9 -1
- package/src/service-spec.ts +17 -4
- package/src/setup-wizard.ts +34 -2
- package/src/spawn-path.ts +148 -0
- package/src/supervisor.ts +232 -7
- package/src/users.ts +54 -8
- package/src/vault-hub-origin-env.ts +28 -0
- package/src/vault-name.ts +13 -1
- package/src/well-known.ts +13 -0
- package/web/ui/dist/assets/{index-mz8XcVPP.css → index-BYYUeLGA.css} +1 -1
- package/web/ui/dist/assets/index-D3cDUOOj.js +61 -0
- package/web/ui/dist/index.html +2 -2
- package/web/ui/dist/assets/index-D_0TRjeo.js +0 -61
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.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 b of h.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&o(b)}).observe(document,{childList:!0,subtree:!0});function r(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=r(f);fetch(f.href,h)}})();var qc={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 G1(){if(vh)return Bl;vh=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function r(o,f,h){var b=null;if(h!==void 0&&(b=""+h),f.key!==void 0&&(b=""+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:b,ref:f!==void 0?f:null,props:h}}return Bl.Fragment=c,Bl.jsx=r,Bl.jsxs=r,Bl}var gh;function V1(){return gh||(gh=1,qc.exports=G1()),qc.exports}var s=V1(),Yc={exports:{}},ie={};/**
|
|
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 Z1(){if(yh)return ie;yh=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),b=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),A=Symbol.iterator;function T(N){return N===null||typeof N!="object"?null:(N=A&&N[A]||N["@@iterator"],typeof N=="function"?N:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,Z={};function V(N,L,J){this.props=N,this.context=L,this.refs=Z,this.updater=J||D}V.prototype.isReactComponent={},V.prototype.setState=function(N,L){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,L,"setState")},V.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function ee(){}ee.prototype=V.prototype;function I(N,L,J){this.props=N,this.context=L,this.refs=Z,this.updater=J||D}var ue=I.prototype=new ee;ue.constructor=I,q(ue,V.prototype),ue.isPureReactComponent=!0;var K=Array.isArray;function Y(){}var C={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function G(N,L,J){var F=J.ref;return{$$typeof:i,type:N,key:L,ref:F!==void 0?F:null,props:J}}function ve(N,L){return G(N.type,L,N.props)}function te(N){return typeof N=="object"&&N!==null&&N.$$typeof===i}function he(N){var L={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(J){return L[J]})}var Qe=/\/+/g;function St(N,L){return typeof N=="object"&&N!==null&&N.key!=null?he(""+N.key):L.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(L){N.status==="pending"&&(N.status="fulfilled",N.value=L)},function(L){N.status==="pending"&&(N.status="rejected",N.reason=L)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function k(N,L,J,F,se){var oe=typeof N;(oe==="undefined"||oe==="boolean")&&(N=null);var je=!1;if(N===null)je=!0;else switch(oe){case"bigint":case"string":case"number":je=!0;break;case"object":switch(N.$$typeof){case i:case c:je=!0;break;case g:return je=N._init,k(je(N._payload),L,J,F,se)}}if(je)return se=se(N),je=F===""?"."+St(N,0):F,K(se)?(J="",je!=null&&(J=je.replace(Qe,"$&/")+"/"),k(se,L,J,"",function(Xn){return Xn})):se!=null&&(te(se)&&(se=ve(se,J+(se.key==null||N&&N.key===se.key?"":(""+se.key).replace(Qe,"$&/")+"/")+je)),L.push(se)),1;je=0;var nt=F===""?".":F+":";if(K(N))for(var Be=0;Be<N.length;Be++)F=N[Be],oe=nt+St(F,Be),je+=k(F,L,J,oe,se);else if(Be=T(N),typeof Be=="function")for(N=Be.call(N),Be=0;!(F=N.next()).done;)F=F.value,oe=nt+St(F,Be++),je+=k(F,L,J,oe,se);else if(oe==="object"){if(typeof N.then=="function")return k(Ye(N),L,J,F,se);throw L=String(N),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return je}function Q(N,L,J){if(N==null)return N;var F=[],se=0;return k(N,F,"","",function(oe){return L.call(J,oe,se++)}),F}function le(N){if(N._status===-1){var L=N._result;L=L(),L.then(function(J){(N._status===0||N._status===-1)&&(N._status=1,N._result=J)},function(J){(N._status===0||N._status===-1)&&(N._status=2,N._result=J)}),N._status===-1&&(N._status=0,N._result=L)}if(N._status===1)return N._result.default;throw N._result}var Ne=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Re={map:Q,forEach:function(N,L,J){Q(N,function(){L.apply(this,arguments)},J)},count:function(N){var L=0;return Q(N,function(){L++}),L},toArray:function(N){return Q(N,function(L){return L})||[]},only:function(N){if(!te(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return ie.Activity=y,ie.Children=Re,ie.Component=V,ie.Fragment=r,ie.Profiler=f,ie.PureComponent=I,ie.StrictMode=o,ie.Suspense=v,ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,ie.__COMPILER_RUNTIME={__proto__:null,c:function(N){return C.H.useMemoCache(N)}},ie.cache=function(N){return function(){return N.apply(null,arguments)}},ie.cacheSignal=function(){return null},ie.cloneElement=function(N,L,J){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var F=q({},N.props),se=N.key;if(L!=null)for(oe in L.key!==void 0&&(se=""+L.key),L)!O.call(L,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&L.ref===void 0||(F[oe]=L[oe]);var oe=arguments.length-2;if(oe===1)F.children=J;else if(1<oe){for(var je=Array(oe),nt=0;nt<oe;nt++)je[nt]=arguments[nt+2];F.children=je}return G(N.type,se,F)},ie.createContext=function(N){return N={$$typeof:b,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},ie.createElement=function(N,L,J){var F,se={},oe=null;if(L!=null)for(F in L.key!==void 0&&(oe=""+L.key),L)O.call(L,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(se[F]=L[F]);var je=arguments.length-2;if(je===1)se.children=J;else if(1<je){for(var nt=Array(je),Be=0;Be<je;Be++)nt[Be]=arguments[Be+2];se.children=nt}if(N&&N.defaultProps)for(F in je=N.defaultProps,je)se[F]===void 0&&(se[F]=je[F]);return G(N,oe,se)},ie.createRef=function(){return{current:null}},ie.forwardRef=function(N){return{$$typeof:j,render:N}},ie.isValidElement=te,ie.lazy=function(N){return{$$typeof:g,_payload:{_status:-1,_result:N},_init:le}},ie.memo=function(N,L){return{$$typeof:p,type:N,compare:L===void 0?null:L}},ie.startTransition=function(N){var L=C.T,J={};C.T=J;try{var F=N(),se=C.S;se!==null&&se(J,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(Y,Ne)}catch(oe){Ne(oe)}finally{L!==null&&J.types!==null&&(L.types=J.types),C.T=L}},ie.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},ie.use=function(N){return C.H.use(N)},ie.useActionState=function(N,L,J){return C.H.useActionState(N,L,J)},ie.useCallback=function(N,L){return C.H.useCallback(N,L)},ie.useContext=function(N){return C.H.useContext(N)},ie.useDebugValue=function(){},ie.useDeferredValue=function(N,L){return C.H.useDeferredValue(N,L)},ie.useEffect=function(N,L){return C.H.useEffect(N,L)},ie.useEffectEvent=function(N){return C.H.useEffectEvent(N)},ie.useId=function(){return C.H.useId()},ie.useImperativeHandle=function(N,L,J){return C.H.useImperativeHandle(N,L,J)},ie.useInsertionEffect=function(N,L){return C.H.useInsertionEffect(N,L)},ie.useLayoutEffect=function(N,L){return C.H.useLayoutEffect(N,L)},ie.useMemo=function(N,L){return C.H.useMemo(N,L)},ie.useOptimistic=function(N,L){return C.H.useOptimistic(N,L)},ie.useReducer=function(N,L,J){return C.H.useReducer(N,L,J)},ie.useRef=function(N){return C.H.useRef(N)},ie.useState=function(N){return C.H.useState(N)},ie.useSyncExternalStore=function(N,L,J){return C.H.useSyncExternalStore(N,L,J)},ie.useTransition=function(){return C.H.useTransition()},ie.version="19.2.5",ie}var bh;function nr(){return bh||(bh=1,Yc.exports=Z1()),Yc.exports}var S=nr(),Gc={exports:{}},Ll={},Vc={exports:{}},Zc={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var xh;function X1(){return xh||(xh=1,(function(i){function c(k,Q){var le=k.length;k.push(Q);e:for(;0<le;){var Ne=le-1>>>1,Re=k[Ne];if(0<f(Re,Q))k[Ne]=Q,k[le]=Re,le=Ne;else break e}}function r(k){return k.length===0?null:k[0]}function o(k){if(k.length===0)return null;var Q=k[0],le=k.pop();if(le!==Q){k[0]=le;e:for(var Ne=0,Re=k.length,N=Re>>>1;Ne<N;){var L=2*(Ne+1)-1,J=k[L],F=L+1,se=k[F];if(0>f(J,le))F<Re&&0>f(se,J)?(k[Ne]=se,k[F]=le,Ne=F):(k[Ne]=J,k[L]=le,Ne=L);else if(F<Re&&0>f(se,le))k[Ne]=se,k[F]=le,Ne=F;else break e}}return Q}function f(k,Q){var le=k.sortIndex-Q.sortIndex;return le!==0?le:k.id-Q.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 b=Date,j=b.now();i.unstable_now=function(){return b.now()-j}}var v=[],p=[],g=1,y=null,A=3,T=!1,D=!1,q=!1,Z=!1,V=typeof setTimeout=="function"?setTimeout:null,ee=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;function ue(k){for(var Q=r(p);Q!==null;){if(Q.callback===null)o(p);else if(Q.startTime<=k)o(p),Q.sortIndex=Q.expirationTime,c(v,Q);else break;Q=r(p)}}function K(k){if(q=!1,ue(k),!D)if(r(v)!==null)D=!0,Y||(Y=!0,he());else{var Q=r(p);Q!==null&&Ye(K,Q.startTime-k)}}var Y=!1,C=-1,O=5,G=-1;function ve(){return Z?!0:!(i.unstable_now()-G<O)}function te(){if(Z=!1,Y){var k=i.unstable_now();G=k;var Q=!0;try{e:{D=!1,q&&(q=!1,ee(C),C=-1),T=!0;var le=A;try{t:{for(ue(k),y=r(v);y!==null&&!(y.expirationTime>k&&ve());){var Ne=y.callback;if(typeof Ne=="function"){y.callback=null,A=y.priorityLevel;var Re=Ne(y.expirationTime<=k);if(k=i.unstable_now(),typeof Re=="function"){y.callback=Re,ue(k),Q=!0;break t}y===r(v)&&o(v),ue(k)}else o(v);y=r(v)}if(y!==null)Q=!0;else{var N=r(p);N!==null&&Ye(K,N.startTime-k),Q=!1}}break e}finally{y=null,A=le,T=!1}Q=void 0}}finally{Q?he():Y=!1}}}var he;if(typeof I=="function")he=function(){I(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(){V(te,0)};function Ye(k,Q){C=V(function(){k(i.unstable_now())},Q)}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(k){k.callback=null},i.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<k?Math.floor(1e3/k):5},i.unstable_getCurrentPriorityLevel=function(){return A},i.unstable_next=function(k){switch(A){case 1:case 2:case 3:var Q=3;break;default:Q=A}var le=A;A=Q;try{return k()}finally{A=le}},i.unstable_requestPaint=function(){Z=!0},i.unstable_runWithPriority=function(k,Q){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var le=A;A=k;try{return Q()}finally{A=le}},i.unstable_scheduleCallback=function(k,Q,le){var Ne=i.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?Ne+le:Ne):le=Ne,k){case 1:var Re=-1;break;case 2:Re=250;break;case 5:Re=1073741823;break;case 4:Re=1e4;break;default:Re=5e3}return Re=le+Re,k={id:g++,callback:Q,priorityLevel:k,startTime:le,expirationTime:Re,sortIndex:-1},le>Ne?(k.sortIndex=le,c(p,k),r(v)===null&&k===r(p)&&(q?(ee(C),C=-1):q=!0,Ye(K,le-Ne))):(k.sortIndex=Re,c(v,k),D||T||(D=!0,Y||(Y=!0,he()))),k},i.unstable_shouldYield=ve,i.unstable_wrapCallback=function(k){var Q=A;return function(){var le=A;A=Q;try{return k.apply(this,arguments)}finally{A=le}}}})(Zc)),Zc}var jh;function Q1(){return jh||(jh=1,Vc.exports=X1()),Vc.exports}var Xc={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=nr();function c(v){var p="https://react.dev/errors/"+v;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}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 r(){}var o={d:{f:r,r:function(){throw Error(c(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(v,p,g){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:g}}var b=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 g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(c(299));return h(v,p,null,g)},at.flushSync=function(v){var p=b.T,g=o.p;try{if(b.T=null,o.p=2,v)return v()}finally{b.T=p,o.p=g,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 g=p.as,y=j(g,p.crossOrigin),A=typeof p.integrity=="string"?p.integrity:void 0,T=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?o.d.S(v,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:A,fetchPriority:T}):g==="script"&&o.d.X(v,{crossOrigin:y,integrity:A,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 g=j(p.as,p.crossOrigin);o.d.M(v,{crossOrigin:g,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 g=p.as,y=j(g,p.crossOrigin);o.d.L(v,g,{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 g=j(p.as,p.crossOrigin);o.d.m(v,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,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,g){return b.H.useFormState(v,p,g)},at.useFormStatus=function(){return b.H.useHostTransitionStatus()},at.version="19.2.5",at}var Ch;function K1(){if(Ch)return Xc.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(c){console.error(c)}}return i(),Xc.exports=J1(),Xc.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 $1(){if(Eh)return Ll;Eh=1;var i=Q1(),c=nr(),r=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 b(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 u=l.alternate;if(u===null){if(n=l.return,n!==null){a=n;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===a)return v(l),e;if(u===n)return v(l),t;u=u.sibling}throw Error(o(188))}if(a.return!==n.return)a=l,n=u;else{for(var d=!1,m=l.child;m;){if(m===a){d=!0,a=l,n=u;break}if(m===n){d=!0,n=l,a=u;break}m=m.sibling}if(!d){for(m=u.child;m;){if(m===a){d=!0,a=u,n=l;break}if(m===n){d=!0,n=u,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 g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,A=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),ee=Symbol.for("react.consumer"),I=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),G=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 q:return"Fragment";case V:return"Profiler";case Z:return"StrictMode";case K:return"Suspense";case Y:return"SuspenseList";case G:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case I:return e.displayName||"Context";case ee:return(e._context.displayName||"Context")+".Consumer";case ue: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 O:t=e._payload,e=e._init;try{return St(e(t))}catch{}}return null}var Ye=Array.isArray,k=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},Ne=[],Re=-1;function N(e){return{current:e}}function L(e){0>Re||(e.current=Ne[Re],Ne[Re]=null,Re--)}function J(e,t){Re++,Ne[Re]=e.current,e.current=t}var F=N(null),se=N(null),oe=N(null),je=N(null);function nt(e,t){switch(J(oe,t),J(se,e),J(F,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}}L(F),J(F,e)}function Be(){L(F),L(se),L(oe)}function Xn(e){e.memoizedState!==null&&J(je,e);var t=F.current,a=qf(t,e.type);t!==a&&(J(se,e),J(F,a))}function Jl(e){se.current===e&&(L(F),L(se)),je.current===e&&(L(je),Ul._currentValue=le)}var Su,hr;function Ha(e){if(Su===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Su=t&&t[1]||"",hr=-1<a.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Su+e+hr}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 B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(M){var z=M}Reflect.construct(e,[],B)}else{try{B.call()}catch(M){z=M}e.call(B.prototype)}}else{try{throw Error()}catch(M){z=M}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(M){if(M&&z&&typeof M.stack=="string")return[M.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 u=n.DetermineComponentFrameRoot(),d=u[0],m=u[1];if(d&&m){var x=d.split(`
|
|
44
|
-
`),R=m.split(`
|
|
45
|
-
`);for(l=n=0;n<x.length&&!x[n].includes("DetermineComponentFrameRoot");)n++;for(;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;if(n===x.length||l===R.length)for(n=x.length-1,l=R.length-1;1<=n&&0<=l&&x[n]!==R[l];)l--;for(;1<=n&&0<=l;n--,l--)if(x[n]!==R[l]){if(n!==1||l!==1)do if(n--,l--,0>l||x[n]!==R[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 bm(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 mr(e){try{var t="",a=null;do t+=bm(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,xm=i.unstable_shouldYield,jm=i.unstable_requestPaint,ft=i.unstable_now,Sm=i.unstable_getCurrentPriorityLevel,pr=i.unstable_ImmediatePriority,vr=i.unstable_UserBlockingPriority,Kl=i.unstable_NormalPriority,Cm=i.unstable_LowPriority,gr=i.unstable_IdlePriority,Em=i.log,Nm=i.unstable_setDisableYieldValue,Qn=null,ht=null;function da(e){if(typeof Em=="function"&&Nm(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Qn,e)}catch{}}var mt=Math.clz32?Math.clz32:_m,wm=Math.log,Tm=Math.LN2;function _m(e){return e>>>=0,e===0?32:31-(wm(e)/Tm|0)|0}var $l=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,u=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=n&134217727;return m!==0?(n=m&~u,n!==0?l=Ba(n):(d&=m,d!==0?l=Ba(d):a||(a=m&~e,a!==0&&(l=Ba(a))))):(m=n&~u,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&u)===0&&(u=l&-l,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:l}function Jn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Rm(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 yr(){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 Kn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Am(e,t,a,n,l,u){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,R=e.hiddenUpdates;for(a=d&~a;0<a;){var U=31-mt(a),B=1<<U;m[U]=0,x[U]=-1;var z=R[U];if(z!==null)for(R[U]=null,U=0;U<z.length;U++){var M=z[U];M!==null&&(M.lane&=-536870913)}a&=~B}n!==0&&br(e,n,0),u!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=u&~(d&~t))}function br(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 xr(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 jr(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 Sr(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:rh(e.type))}function Cr(e,t){var a=Q.p;try{return Q.p=e,t()}finally{Q.p=a}}var fa=Math.random().toString(36).slice(2),We="__reactFiber$"+fa,it="__reactProps$"+fa,nn="__reactContainer$"+fa,zu="__reactEvents$"+fa,zm="__reactListeners$"+fa,Mm="__reactHandles$"+fa,Er="__reactResources$"+fa,$n="__reactMarker$"+fa;function Mu(e){delete e[We],delete e[it],delete e[zu],delete e[zm],delete e[Mm]}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=Jf(e);e!==null;){if(a=e[We])return a;e=Jf(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[Er];return t||(t=e[Er]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function $e(e){e[$n]=!0}var Nr=new Set,wr={};function La(e,t){cn(e,t),cn(e+"Capture",t)}function cn(e,t){for(wr[e]=t,e=0;e<t.length;e++)Nr.add(t[e])}var Om=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]*$"),Tr={},_r={};function Um(e){return Nu.call(_r,e)?!0:Nu.call(Tr,e)?!1:Om.test(e)?_r[e]=!0:(Tr[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 Rr(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,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(d){a=""+d,u.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=Rr(e)?"checked":"value";e._valueTracker=Dm(e,t,""+e[t])}}function Ar(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Rr(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 km=/[\n"\\]/g;function Et(e){return e.replace(km,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uu(e,t,a,n,l,u,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?Du(e,d,Ct(t)):a!=null?Du(e,d,Ct(a)):n!=null&&e.removeAttribute("value"),l==null&&u!=null&&(e.defaultChecked=!!u),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 zr(e,t,a,n,l,u,d,m){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){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 Du(e,t,a){t==="number"&&ti(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function rn(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 Mr(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 Or(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 Hm=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 Ur(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||Hm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Dr(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&&Ur(e,l,n)}else for(var u in t)t.hasOwnProperty(u)&&Ur(e,u,t[u])}function ku(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 Bm=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"]]),Lm=/^[\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 Lm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Jt(){}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 kr(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(Uu(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));Uu(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&&Ar(n)}break e;case"textarea":Mr(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&rn(e,!!a.multiple,t,!1)}}}var Lu=!1;function Hr(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,kr(t),e)))for(t=0;t<e.length;t++)kr(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 Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qu=!1;if(Kt)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 Br(){if(ni)return ni;var e,t=Yu,a=t.length,n,l="value"in ha?ha.value:ha.textContent,u=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[u-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 Lr(){return!1}function ut(e){function t(a,n,l,u,d){this._reactName=a,this._targetInst=l,this.type=n,this.nativeEvent=u,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(a=e[m],this[m]=a?a(u):u[m]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ii:Lr,this.isPropagationStopped=Lr,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}),qm=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}}),qr=ut(si),Ym=y({},si,{dataTransfer:0}),Gm=ut(Ym),Vm=y({},Pn,{relatedTarget:0}),Zu=ut(Vm),Zm=y({},qa,{animationName:0,elapsedTime:0,pseudoElement:0}),Xm=ut(Zm),Qm=y({},qa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jm=ut(Qm),Km=y({},qa,{data:0}),Yr=ut(Km),$m={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Fm={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"},Wm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Im(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Wm[e])?!!t[e]:!1}function Xu(){return Im}var Pm=y({},Pn,{key:function(e){if(e.key){var t=$m[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"?Fm[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}}),ep=ut(Pm),tp=y({},si,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gr=ut(tp),ap=y({},Pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xu}),np=ut(ap),lp=y({},qa,{propertyName:0,elapsedTime:0,pseudoElement:0}),ip=ut(lp),up=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}),sp=ut(up),cp=y({},qa,{newState:0,oldState:0}),rp=ut(cp),op=[9,13,27,32],Qu=Kt&&"CompositionEvent"in window,tl=null;Kt&&"documentMode"in document&&(tl=document.documentMode);var dp=Kt&&"TextEvent"in window&&!tl,Vr=Kt&&(!Qu||tl&&8<tl&&11>=tl),Zr=" ",Xr=!1;function Qr(e,t){switch(e){case"keyup":return op.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hn=!1;function fp(e,t){switch(e){case"compositionend":return Jr(t);case"keypress":return t.which!==32?null:(Xr=!0,Zr);case"textInput":return e=t.data,e===Zr&&Xr?null:e;default:return null}}function hp(e,t){if(hn)return e==="compositionend"||!Qu&&Qr(e,t)?(e=Br(),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 Vr&&t.locale!=="ko"?null:t.data;default:return null}}var mp={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 Kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mp[e.type]:t==="textarea"}function $r(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 pp(e){Of(e,0)}function ci(e){var t=Fn(e);if(Ar(t))return e}function Fr(e,t){if(e==="change")return t}var Wr=!1;if(Kt){var Ju;if(Kt){var Ku="oninput"in document;if(!Ku){var Ir=document.createElement("div");Ir.setAttribute("oninput","return;"),Ku=typeof Ir.oninput=="function"}Ju=Ku}else Ju=!1;Wr=Ju&&(!document.documentMode||9<document.documentMode)}function Pr(){al&&(al.detachEvent("onpropertychange",eo),nl=al=null)}function eo(e){if(e.propertyName==="value"&&ci(nl)){var t=[];$r(t,nl,e,Bu(e)),Hr(pp,t)}}function vp(e,t,a){e==="focusin"?(Pr(),al=t,nl=a,al.attachEvent("onpropertychange",eo)):e==="focusout"&&Pr()}function gp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ci(nl)}function yp(e,t){if(e==="click")return ci(t)}function bp(e,t){if(e==="input"||e==="change")return ci(t)}function xp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pt=typeof Object.is=="function"?Object.is:xp;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 $u(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 jp=Kt&&"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&&$u(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={};Kt&&(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"),co=Ga("animationiteration"),ro=Ga("animationstart"),Sp=Ga("transitionrun"),Cp=Ga("transitionstart"),Ep=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 kt(e,t){fo.set(e,t),La(t,[e])}var ri=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 u=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}u!==0&&ho(a,l,u)}}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,u=e.return;u!==null;)u.childLanes|=a,n=u.alternate,n!==null&&(n.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(l=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,l&&t!==null&&(l=31-mt(a),e=u.hiddenUpdates,n=e[l],n===null?e[l]=[t]:n.push(t),t.lane=a|536870912),u):null}function fi(e){if(50<Tl)throw Tl=0,oc=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 Np(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 Np(e,t,a,n)}function as(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $t(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,u){var d=0;if(n=e,typeof e=="function")as(e)&&(d=1);else if(typeof e=="string")d=A1(e,a,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case G:return e=vt(31,a,t,l),e.elementType=G,e.lanes=u,e;case q:return Za(a.children,l,u,t);case Z:d=8,l|=24;break;case V:return e=vt(12,a,t,l|2),e.elementType=V,e.lanes=u,e;case K:return e=vt(13,a,t,l),e.elementType=K,e.lanes=u,e;case Y:return e=vt(19,a,t,l),e.elementType=Y,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case I:d=10;break e;case ee:d=9;break e;case ue:d=11;break e;case C:d=14;break e;case O: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=u,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:mr(t)},vo.set(e,t),t)}return{value:e,source:t,stack:mr(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 u=32-mt(t)+l;if(30<u){var d=l-l%5;u=(n&(1<<d)-1).toString(32),n>>=d,l-=d,Yt=1<<32-mt(t)+l|a<<l|n,Gt=u+e}else Yt=1<<u|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),zr(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),Or(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=Jt),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")||Nc(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=Ac,Ac=null,Me=e):Me=t):Me=Ie?zt(e.stateNode.nextSibling):null;return!0}function Xa(){Me=Ie=null,ge=!1}function cs(){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 rs=N(null),Qa=null,Wt=null;function ga(e,t,a){J(rs,t._currentValue),t._currentValue=a}function It(e){e._currentValue=rs.current,L(rs)}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 u=l.dependencies;if(u!==null){var d=l.child;u=u.firstContext;e:for(;u!==null;){var m=u;u=l;for(var x=0;x<t.length;x++)if(m.context===t[x]){u.lanes|=a,m=u.alternate,m!==null&&(m.lanes|=a),os(u.return,a,e),n||(d=null);break e}u=m.next}}else if(l.tag===18){if(d=l.return,d===null)throw Error(o(341));d.lanes|=a,u=d.alternate,u!==null&&(u.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,u=!1;l!==null;){if(!u){if((l.flags&524288)!==0)u=!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===je.current){if(d=l.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Ul):e=[Ul])}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 Ja(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&&Ja(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 wp=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()})}},Tp=i.unstable_scheduleCallback,_p=i.unstable_NormalPriority,Ge={$$typeof:I,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function fs(){return{controller:new wp,data:new Map,refCount:0}}function cl(e){e.refCount--,e.refCount===0&&Tp(_p,function(){e.controller.abort()})}var rl=null,hs=0,Sn=0,Cn=null;function Rp(e,t){if(rl===null){var a=rl=[];hs=0,Sn=vc(),Cn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return hs++,t.then(So,So),t}function So(){if(--hs===0&&rl!==null){Cn!==null&&(Cn.status="fulfilled");var e=rl;rl=null,Sn=0,Cn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ap(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=k.S;k.S=function(e,t){sf=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Rp(e,t),Co!==null&&Co(e,t)};var Ka=N(null);function ms(){var e=Ka.current;return e!==null?e:Ae.pooledCache}function gi(e,t){t===null?J(Ka,Ka.current):J(Ka,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(Jt,Jt),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(Jt,Jt);else{if(e=Ae,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 $a(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===A?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(w,E){if(e){var _=w.deletions;_===null?(w.deletions=[E],w.flags|=16):_.push(E)}}function a(w,E){if(!e)return null;for(;E!==null;)t(w,E),E=E.sibling;return null}function n(w){for(var E=new Map;w!==null;)w.key!==null?E.set(w.key,w):E.set(w.index,w),w=w.sibling;return E}function l(w,E){return w=$t(w,E),w.index=0,w.sibling=null,w}function u(w,E,_){return w.index=_,e?(_=w.alternate,_!==null?(_=_.index,_<E?(w.flags|=67108866,E):_):(w.flags|=67108866,E)):(w.flags|=1048576,E)}function d(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function m(w,E,_,H){return E===null||E.tag!==6?(E=ns(_,w.mode,H),E.return=w,E):(E=l(E,_),E.return=w,E)}function x(w,E,_,H){var ae=_.type;return ae===q?U(w,E,_.props.children,H,_.key):E!==null&&(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===O&&$a(ae)===E.type)?(E=l(E,_.props),dl(E,_),E.return=w,E):(E=hi(_.type,_.key,_.props,null,w.mode,H),dl(E,_),E.return=w,E)}function R(w,E,_,H){return E===null||E.tag!==4||E.stateNode.containerInfo!==_.containerInfo||E.stateNode.implementation!==_.implementation?(E=ls(_,w.mode,H),E.return=w,E):(E=l(E,_.children||[]),E.return=w,E)}function U(w,E,_,H,ae){return E===null||E.tag!==7?(E=Za(_,w.mode,H,ae),E.return=w,E):(E=l(E,_),E.return=w,E)}function B(w,E,_){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=ns(""+E,w.mode,_),E.return=w,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case T:return _=hi(E.type,E.key,E.props,null,w.mode,_),dl(_,E),_.return=w,_;case D:return E=ls(E,w.mode,_),E.return=w,E;case O:return E=$a(E),B(w,E,_)}if(Ye(E)||he(E))return E=Za(E,w.mode,_,null),E.return=w,E;if(typeof E.then=="function")return B(w,xi(E),_);if(E.$$typeof===I)return B(w,vi(w,E),_);ji(w,E)}return null}function z(w,E,_,H){var ae=E!==null?E.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return ae!==null?null:m(w,E,""+_,H);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case T:return _.key===ae?x(w,E,_,H):null;case D:return _.key===ae?R(w,E,_,H):null;case O:return _=$a(_),z(w,E,_,H)}if(Ye(_)||he(_))return ae!==null?null:U(w,E,_,H,null);if(typeof _.then=="function")return z(w,E,xi(_),H);if(_.$$typeof===I)return z(w,E,vi(w,_),H);ji(w,_)}return null}function M(w,E,_,H,ae){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return w=w.get(_)||null,m(E,w,""+H,ae);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case T:return w=w.get(H.key===null?_:H.key)||null,x(E,w,H,ae);case D:return w=w.get(H.key===null?_:H.key)||null,R(E,w,H,ae);case O:return H=$a(H),M(w,E,_,H,ae)}if(Ye(H)||he(H))return w=w.get(_)||null,U(E,w,H,ae,null);if(typeof H.then=="function")return M(w,E,_,xi(H),ae);if(H.$$typeof===I)return M(w,E,_,vi(E,H),ae);ji(E,H)}return null}function $(w,E,_,H){for(var ae=null,ye=null,P=E,re=E=0,pe=null;P!==null&&re<_.length;re++){P.index>re?(pe=P,P=null):pe=P.sibling;var be=z(w,P,_[re],H);if(be===null){P===null&&(P=pe);break}e&&P&&be.alternate===null&&t(w,P),E=u(be,E,re),ye===null?ae=be:ye.sibling=be,ye=be,P=pe}if(re===_.length)return a(w,P),ge&&Ft(w,re),ae;if(P===null){for(;re<_.length;re++)P=B(w,_[re],H),P!==null&&(E=u(P,E,re),ye===null?ae=P:ye.sibling=P,ye=P);return ge&&Ft(w,re),ae}for(P=n(P);re<_.length;re++)pe=M(P,w,re,_[re],H),pe!==null&&(e&&pe.alternate!==null&&P.delete(pe.key===null?re:pe.key),E=u(pe,E,re),ye===null?ae=pe:ye.sibling=pe,ye=pe);return e&&P.forEach(function(Da){return t(w,Da)}),ge&&Ft(w,re),ae}function ne(w,E,_,H){if(_==null)throw Error(o(151));for(var ae=null,ye=null,P=E,re=E=0,pe=null,be=_.next();P!==null&&!be.done;re++,be=_.next()){P.index>re?(pe=P,P=null):pe=P.sibling;var Da=z(w,P,be.value,H);if(Da===null){P===null&&(P=pe);break}e&&P&&Da.alternate===null&&t(w,P),E=u(Da,E,re),ye===null?ae=Da:ye.sibling=Da,ye=Da,P=pe}if(be.done)return a(w,P),ge&&Ft(w,re),ae;if(P===null){for(;!be.done;re++,be=_.next())be=B(w,be.value,H),be!==null&&(E=u(be,E,re),ye===null?ae=be:ye.sibling=be,ye=be);return ge&&Ft(w,re),ae}for(P=n(P);!be.done;re++,be=_.next())be=M(P,w,re,be.value,H),be!==null&&(e&&be.alternate!==null&&P.delete(be.key===null?re:be.key),E=u(be,E,re),ye===null?ae=be:ye.sibling=be,ye=be);return e&&P.forEach(function(Y1){return t(w,Y1)}),ge&&Ft(w,re),ae}function _e(w,E,_,H){if(typeof _=="object"&&_!==null&&_.type===q&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case T:e:{for(var ae=_.key;E!==null;){if(E.key===ae){if(ae=_.type,ae===q){if(E.tag===7){a(w,E.sibling),H=l(E,_.props.children),H.return=w,w=H;break e}}else if(E.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===O&&$a(ae)===E.type){a(w,E.sibling),H=l(E,_.props),dl(H,_),H.return=w,w=H;break e}a(w,E);break}else t(w,E);E=E.sibling}_.type===q?(H=Za(_.props.children,w.mode,H,_.key),H.return=w,w=H):(H=hi(_.type,_.key,_.props,null,w.mode,H),dl(H,_),H.return=w,w=H)}return d(w);case D:e:{for(ae=_.key;E!==null;){if(E.key===ae)if(E.tag===4&&E.stateNode.containerInfo===_.containerInfo&&E.stateNode.implementation===_.implementation){a(w,E.sibling),H=l(E,_.children||[]),H.return=w,w=H;break e}else{a(w,E);break}else t(w,E);E=E.sibling}H=ls(_,w.mode,H),H.return=w,w=H}return d(w);case O:return _=$a(_),_e(w,E,_,H)}if(Ye(_))return $(w,E,_,H);if(he(_)){if(ae=he(_),typeof ae!="function")throw Error(o(150));return _=ae.call(_),ne(w,E,_,H)}if(typeof _.then=="function")return _e(w,E,xi(_),H);if(_.$$typeof===I)return _e(w,E,vi(w,_),H);ji(w,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,E!==null&&E.tag===6?(a(w,E.sibling),H=l(E,_),H.return=w,w=H):(a(w,E),H=ns(_,w.mode,H),H.return=w,w=H),d(w)):a(w,E)}return function(w,E,_,H){try{ol=0;var ae=_e(w,E,_,H);return Nn=null,ae}catch(P){if(P===En||P===yi)throw P;var ye=vt(29,P,null,w.mode);return ye.lanes=H,ye.return=w,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,(xe&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,xr(e,a)}}function ys(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var l=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?l=u=d:u=u.next=d,a=a.next}while(a!==null);u===null?l=u=t:u=u.next=t}else l=u=t;a={baseState:n.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var 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 u=l.firstBaseUpdate,d=l.lastBaseUpdate,m=l.shared.pending;if(m!==null){l.shared.pending=null;var x=m,R=x.next;x.next=null,d===null?u=R:d.next=R,d=x;var U=e.alternate;U!==null&&(U=U.updateQueue,m=U.lastBaseUpdate,m!==d&&(m===null?U.firstBaseUpdate=R:m.next=R,U.lastBaseUpdate=x))}if(u!==null){var B=l.baseState;d=0,U=R=x=null,m=u;do{var z=m.lane&-536870913,M=z!==m.lane;if(M?(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 $=e,ne=m;z=t;var _e=a;switch(ne.tag){case 1:if($=ne.payload,typeof $=="function"){B=$.call(_e,B,z);break e}B=$;break e;case 3:$.flags=$.flags&-65537|128;case 0:if($=ne.payload,z=typeof $=="function"?$.call(_e,B,z):$,z==null)break e;B=y({},B,z);break e;case 2:ya=!0}}z=m.callback,z!==null&&(e.flags|=64,M&&(e.flags|=8192),M=l.callbacks,M===null?l.callbacks=[z]:M.push(z))}else M={lane:z,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(R=U=M,x=B):U=U.next=M,d|=z;if(m=m.next,m===null){if(m=l.shared.pending,m===null)break;M=m,m=M.next,M.next=null,l.lastBaseUpdate=M,l.shared.pending=null}}while(!0);U===null&&(x=B),l.baseState=x,l.firstBaseUpdate=R,l.lastBaseUpdate=U,u===null&&(l.shared.lanes=0),Na|=d,e.lanes=d,e.memoizedState=B}}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,J(Si,e),J(wn,t),sa=e|t.baseLanes}function xs(){J(Si,sa),J(wn,wn.current)}function js(){sa=Si.current,L(wn),L(Si)}var gt=N(null),At=null;function ja(e){var t=e.alternate;J(Le,Le.current&1),J(gt,e),At===null&&(t===null||wn.current!==null||t.memoizedState!==null)&&(At=e)}function Ss(e){J(Le,Le.current),J(gt,e),At===null&&(At=e)}function Uo(e){e.tag===22?(J(Le,Le.current),J(gt,e),At===null&&(At=e)):Sa()}function Sa(){J(Le,Le.current),J(gt,gt.current)}function yt(e){L(gt),At===e&&(At=null),L(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||_c(a)||Rc(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,ce=null,we=null,Ve=null,Ei=!1,Tn=!1,Ia=!1,Ni=0,pl=0,_n=null,zp=0;function ke(){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,u){return Pt=u,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?gd:Ls,Ia=!1,u=a(n,l),Ia=!1,Tn&&(u=ko(t,a,n,l)),Do(e),u}function Do(e){k.H=yl;var t=we!==null&&we.next!==null;if(Pt=0,Ve=we=ce=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 ko(e,t,a,n){ce=e;var l=0;do{if(Tn&&(_n=null),pl=0,Tn=!1,25<=l)throw Error(o(301));if(l+=1,Ve=we=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}k.H=yd,u=t(a,n)}while(Tn);return u}function Mp(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?vl(t):t,e=e.useState()[0],(we!==null?we.memoizedState:null)!==e&&(ce.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=we=ce=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?ce.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function qe(){if(we===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=we.next;var t=Ve===null?ce.memoizedState:Ve.next;if(t!==null)Ve=t,we=e;else{if(e===null)throw ce.alternate===null?Error(o(467)):Error(o(310));we=e,e={memoizedState:we.memoizedState,baseState:we.baseState,baseQueue:we.baseQueue,queue:we.queue,next:null},Ve===null?ce.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=ce,(Ve===null?t.memoizedState:Ve.next)===null&&(t=t.alternate,k.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===I)return Pe(e)}throw Error(o(438,String(e)))}function _s(e){var t=null,a=ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=ce.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(),ce.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,we,e)}function Rs(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var l=e.baseQueue,u=n.pending;if(u!==null){if(l!==null){var d=l.next;l.next=u.next,u.next=d}t.baseQueue=l=u,n.pending=null}if(u=e.baseState,l===null)e.memoizedState=u;else{t=l.next;var m=d=null,x=null,R=t,U=!1;do{var B=R.lane&-536870913;if(B!==R.lane?(me&B)===B:(Pt&B)===B){var z=R.revertLane;if(z===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),B===Sn&&(U=!0);else if((Pt&z)===z){R=R.next,z===Sn&&(U=!0);continue}else B={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(m=x=B,d=u):x=x.next=B,ce.lanes|=z,Na|=z;B=R.action,Ia&&a(u,B),u=R.hasEagerState?R.eagerState:a(u,B)}else z={lane:B,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(m=x=z,d=u):x=x.next=z,ce.lanes|=B,Na|=B;R=R.next}while(R!==null&&R!==t);if(x===null?d=u:x.next=m,!pt(u,e.memoizedState)&&(Ze=!0,U&&(a=Cn,a!==null)))throw a;e.memoizedState=u,e.baseState=d,e.baseQueue=x,n.lastRenderedState=u}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,u=t.memoizedState;if(l!==null){a.pending=null;var d=l=l.next;do u=e(u,d.action),d=d.next;while(d!==l);pt(u,t.memoizedState)||(Ze=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,n]}function Ho(e,t,a){var n=ce,l=qe(),u=ge;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var d=!pt((we||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),Ae===null)throw Error(o(349));u||(Pt&127)!==0||Bo(n,t,a)}return a}function Bo(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ce.updateQueue,t===null?(t=wi(),ce.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,we,typeof n=="function"?n:ea)}function Op(e,t,a,n,l){if(zi(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){u.listeners.push(d)}};k.T!==null?a(!0):u.isTransition=!1,n(u),a=t.pending,a===null?(u.next=t.pending=u,Zo(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Zo(e,t){var a=t.action,n=t.payload,l=e.state;if(t.isTransition){var u=k.T,d={};k.T=d;try{var m=a(l,n),x=k.S;x!==null&&x(d,m),Xo(e,t,m)}catch(R){Ms(e,t,R)}finally{u!==null&&d.types!==null&&(u.types=d.types),k.T=u}}else try{u=a(l,n),Xo(e,t,u)}catch(R){Ms(e,t,R)}}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,Jo(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,Jo(t),t=t.next;while(t!==n)}e.action=null}function Jo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ko(e,t){return t}function $o(e,t){if(ge){var a=Ae.formState;if(a!==null){e:{var n=ce;if(ge){if(Me){t:{for(var l=Me,u=Rt;l.nodeType!==8;){if(!u){l=null;break t}if(l=zt(l.nextSibling),l===null){l=null;break t}}u=l.data,l=u==="F!"||u==="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:Ko,lastRenderedState:t},a.queue=n,a=md.bind(null,ce,n),n.dispatch=a,n=zs(!1),u=Bs.bind(null,ce,!1,n.queue),n=lt(),l={state:t,dispatch:null,action:e,pending:null},n.queue=l,a=Op.bind(null,ce,l,u,a),l.dispatch=a,n.memoizedState=e,[t,a,!1]}function Fo(e){var t=qe();return Wo(t,we,e)}function Wo(e,t,a){if(t=Rs(e,t,Ko)[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,u=l.dispatch;return a!==t.memoizedState&&(ce.flags|=2048,Rn(9,{destroy:void 0},Up.bind(null,l,a),null)),[n,u,e]}function Up(e,t){e.action=t}function Io(e){var t=qe(),a=we;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=ce.updateQueue,t===null&&(t=wi(),ce.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();ce.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 u=l.memoizedState.inst;we!==null&&n!==null&&Cs(n,we.memoizedState.deps)?l.memoizedState=Rn(t,u,a,n):(ce.flags|=e,l.memoizedState=Rn(1|t,u,a,n))}function ed(e,t){Ri(8390656,8,e,t)}function Os(e,t){Ai(2048,8,e,t)}function Dp(e){ce.flags|=4;var t=ce.updateQueue;if(t===null)t=wi(),ce.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((xe&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 Us(){}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 Ds(e,t,a){return a===void 0||(Pt&1073741824)!==0&&(me&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=rf(),ce.lanes|=e,Na|=e,a)}function cd(e,t,a,n){return pt(a,t)?a:wn.current!==null?(e=Ds(e,a,n),pt(e,t)||(Ze=!0),e):(Pt&42)===0||(Pt&1073741824)!==0&&(me&261930)===0?(Ze=!0,e.memoizedState=a):(e=rf(),ce.lanes|=e,Na|=e,t)}function rd(e,t,a,n,l){var u=Q.p;Q.p=u!==0&&8>u?u:8;var d=k.T,m={};k.T=m,Bs(e,!1,t,a);try{var x=l(),R=k.S;if(R!==null&&R(m,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var U=Ap(x,n);gl(e,t,U,jt(e))}else gl(e,t,n,jt(e))}catch(B){gl(e,t,{then:function(){},status:"rejected",reason:B},jt())}finally{Q.p=u,d!==null&&m.types!==null&&(d.types=m.types),k.T=d}}function kp(){}function ks(e,t,a,n){if(e.tag!==5)throw Error(o(476));var l=od(e).queue;rd(e,l,t,le,a===null?kp:function(){return dd(e),a(n)})}function od(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:le},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(Ul)}function fd(){return qe().memoizedState}function hd(){return qe().memoizedState}function Hp(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 Bp(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 u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var d=t.lastRenderedState,m=u(d,a);if(l.hasEagerState=!0,l.eagerState=m,pt(m,d))return di(e,t,l,0),Ae===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:vc(),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===ce||t!==null&&t===ce}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,xr(e,a)}}var yl={readContext:Pe,use:Ti,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useLayoutEffect:ke,useInsertionEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useSyncExternalStore:ke,useId:ke,useHostTransitionStatus:ke,useFormState:ke,useActionState:ke,useOptimistic:ke,useMemoCache:ke,useCacheRefresh:ke};yl.useEffectEvent=ke;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=Bp.bind(null,ce,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,ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Us,useDeferredValue:function(e,t){var a=lt();return Ds(a,e,t)},useTransition:function(){var e=zs(!1);return e=rd.bind(null,ce,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=ce,l=lt();if(ge){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Ae===null)throw Error(o(349));(me&127)!==0||Bo(n,t,a)}l.memoizedState=a;var u={value:a,getSnapshot:t};return l.queue=u,ed(qo.bind(null,n,u,e),[e]),n.flags|=2048,Rn(9,{destroy:void 0},Lo.bind(null,n,u,a,t),null),a},useId:function(){var e=lt(),t=Ae.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=zp++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Hs,useFormState:$o,useActionState:$o,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,ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:_s,useCacheRefresh:function(){return lt().memoizedState=Hp.bind(null,ce)},useEffectEvent:function(e){var t=lt(),a={impl:e};return t.memoizedState=a,function(){if((xe&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:Us,useDeferredValue:function(e,t){var a=qe();return cd(a,we.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,we,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:Us,useDeferredValue:function(e,t){var a=qe();return we===null?Ds(a,e,t):cd(a,we.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 we!==null?Vo(a,we,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,u,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,u,d):t.prototype&&t.prototype.isPureReactComponent?!ll(a,n)||!ll(l,u):!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){ri(e)}function Sd(e){console.error(e)}function Cd(e){ri(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 u=n.value;e.payload=function(){return l(u)},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 Lp(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),hc(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)),hc(e,n,l)),!1}throw Error(o(435,a.tag))}return hc(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 u=Error(o(520),{cause:n});if(u=wt(u,a),wl===null?wl=[u]:wl.push(u),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,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(wa===null||!wa.has(u))))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 u=t.ref;if("ref"in n){var d={};for(var m in n)m!=="ref"&&(d[m]=n[m])}else d=n;return Ja(t),n=Es(e,t,a,d,u,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 u=a.type;return typeof u=="function"&&!as(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Rd(e,t,u,n,l)):(e=hi(a.type,null,n,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Ws(e,l)){var d=u.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=$t(u,n),e.ref=t.ref,e.return=t,t.child=e}function Rd(e,t,a,n,l){if(e!==null){var u=e.memoizedProps;if(ll(u,n)&&e.ref===t.ref)if(Ze=!1,t.pendingProps=n=u,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,u=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(u=u!==null?u.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&~u}else n=0,t.child=null;return zd(e,t,u,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&gi(t,u!==null?u.cachePool:null),u!==null?Oo(t,u):xs(),Uo(t);else return n=t.lanes=536870912,zd(e,t,u!==null?u.baseLanes|a:a,a,n)}else u!==null?(gi(t,u.cachePool),Oo(t,u),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 u=ms();return u=u===null?null:{parent:Ge._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&gi(t,null),xs(),Uo(t),e!==null&&jn(e,t,n,!0),t.childLanes=l,null}function Oi(e,t){return t=Di({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 qp(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 u=e.memoizedState;if(u!==null){var d=u.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=Ae,n!==null&&(d=jr(n,a),d!==0&&d!==u.retryLane))throw u.retryLane=d,Va(e,d),dt(n,e,d),Vs;Zi(),t=Md(e,t,a)}else e=u.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=$t(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ui(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 Ja(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,u){return Ja(t),t.updateQueue=null,a=ko(t,n,a,l),Do(e),n=Ns(),e!==null&&!Ze?(ws(e,t,u),ta(e,t,u)):(ge&&n&&is(t),t.flags|=1,et(e,t,a,u),t.child)}function Ud(e,t,a,n,l){if(Ja(t),t.stateNode===null){var u=gn,d=a.contextType;typeof d=="object"&&d!==null&&(u=Pe(d)),u=new a(n,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Ys,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=n,u.state=t.memoizedState,u.refs={},vs(t),d=a.contextType,u.context=typeof d=="object"&&d!==null?Pe(d):gn,u.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(qs(t,a,d,n),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(d=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),d!==u.state&&Ys.enqueueReplaceState(u,u.state,null),ml(t,n,u,l),hl(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){u=t.stateNode;var m=t.memoizedProps,x=Pa(a,m);u.props=x;var R=u.context,U=a.contextType;d=gn,typeof U=="object"&&U!==null&&(d=Pe(U));var B=a.getDerivedStateFromProps;U=typeof B=="function"||typeof u.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,U||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m||R!==d)&&xd(t,u,n,d),ya=!1;var z=t.memoizedState;u.state=z,ml(t,n,u,l),hl(),R=t.memoizedState,m||z!==R||ya?(typeof B=="function"&&(qs(t,a,B,n),R=t.memoizedState),(x=ya||bd(t,a,x,n,z,R,d))?(U||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=R),u.props=n,u.state=R,u.context=d,n=x):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{u=t.stateNode,gs(e,t),d=t.memoizedProps,U=Pa(a,d),u.props=U,B=t.pendingProps,z=u.context,R=a.contextType,x=gn,typeof R=="object"&&R!==null&&(x=Pe(R)),m=a.getDerivedStateFromProps,(R=typeof m=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(d!==B||z!==x)&&xd(t,u,n,x),ya=!1,z=t.memoizedState,u.state=z,ml(t,n,u,l),hl();var M=t.memoizedState;d!==B||z!==M||ya||e!==null&&e.dependencies!==null&&pi(e.dependencies)?(typeof m=="function"&&(qs(t,a,m,n),M=t.memoizedState),(U=ya||bd(t,a,U,n,z,M,x)||e!==null&&e.dependencies!==null&&pi(e.dependencies))?(R||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(n,M,x),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(n,M,x)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=M),u.props=n,u.state=M,u.context=x,n=U):(typeof u.componentDidUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),n=!1)}return u=n,Ui(e,t),n=(t.flags&128)!==0,u||n?(u=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&n?(t.child=Wa(t,e.child,null,l),t.child=Wa(t,null,a,l)):et(e,t,a,l),t.memoizedState=u.state,e=t.child):e=ta(e,t,l),e}function Dd(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 Js(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=xt),e}function kd(e,t,a){var n=t.pendingProps,l=!1,u=(t.flags&128)!==0,d;if((d=u)||(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 Rc(e)?t.lanes=32:t.lanes=536870912,null}var m=n.children;return n=n.fallback,l?(Sa(),l=t.mode,m=Di({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=Js(e,d,a),t.memoizedState=Xs,bl(null,n)):(ja(t),Ks(t,m))}var x=e.memoizedState;if(x!==null&&(m=x.dehydrated,m!==null)){if(u)t.flags&256?(ja(t),t.flags&=-257,t=$s(e,t,a)):t.memoizedState!==null?(Sa(),t.child=e.child,t.flags|=128,t=null):(Sa(),m=n.fallback,l=t.mode,n=Di({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=Js(e,d,a),t.memoizedState=Xs,t=bl(null,n));else if(ja(t),Rc(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var R=d.dgst;d=R,n=Error(o(419)),n.stack="",n.digest=d,sl({value:n,source:null,stack:null}),t=$s(e,t,a)}else if(Ze||jn(e,t,a,!1),d=(a&e.childLanes)!==0,Ze||d){if(d=Ae,d!==null&&(n=jr(d,a),n!==0&&n!==x.retryLane))throw x.retryLane=n,Va(e,n),dt(d,e,n),Vs;_c(m)||Zi(),t=$s(e,t,a)}else _c(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=Ks(t,n.children),t.flags|=4096);return t}return l?(Sa(),m=n.fallback,l=t.mode,x=e.child,R=x.sibling,n=$t(x,{mode:"hidden",children:n.children}),n.subtreeFlags=x.subtreeFlags&65011712,R!==null?m=$t(R,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=Js(e,d,a),t.memoizedState=Xs,bl(e.child,n)):(ja(t),a=e.child,e=a.sibling,a=$t(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 Ks(e,t){return t=Di({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Di(e,t){return e=vt(22,e,null,t),e.lanes=0,e}function $s(e,t,a){return Wa(t,e.child,null,a),e=Ks(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,u){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:l,treeForkCount:u}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=a,d.tailMode=l,d.treeForkCount=u)}function Bd(e,t,a){var n=t.pendingProps,l=n.revealOrder,u=n.tail;n=n.children;var d=Le.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,J(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,u,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,u,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=$t(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=$t(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 Yp(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?kd(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),J(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,Yp(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=$a(t.elementType),t.type=e,typeof e=="function")as(e)?(n=Pa(e,n),t.tag=1,t=Ud(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===ue){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),Ud(e,t,n,l,a);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var u=t.memoizedState;l=u.element,gs(e,t),ml(t,n,null,a);var d=t.memoizedState;if(n=d.cache,ga(t,Ge,n),n!==u.cache&&ds(t,[Ge],a,!0),hl(),n=d.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Dd(e,t,n,a);break e}else if(n!==l){l=wt(Error(o(424)),t),sl(l),t=Dd(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 Ui(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),$e(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=Kf(t.type,t.pendingProps,oe.current),Ie=t,Rt=!0,l=Me,Aa(t.type)?(Ac=l,Me=zt(n.firstChild)):Me=l),et(e,t,t.pendingProps.children,a),Ui(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ge&&((l=n=Me)&&(n=g1(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,u=t.pendingProps,d=e!==null?e.memoizedProps:null,n=u.children,Nc(l,u)?n=null:d!==null&&Nc(l,d)&&(t.flags|=32),t.memoizedState!==null&&(l=Es(e,t,Mp,null,null,a),Ul._currentValue=l),Ui(e,t),et(e,t,n,a),t.child;case 6:return e===null&&ge&&((e=a=Me)&&(a=y1(a,t.pendingProps,Rt),a!==null?(t.stateNode=a,Ie=t,Me=null,e=!0):e=!1),e||va(t)),null;case 13:return kd(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,Ja(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 qp(e,t,a);case 22:return Ad(e,t,a,t.pendingProps);case 24:return Ja(t),n=Pe(Ge),e===null?(l=ms(),l===null&&(l=Ae,u=fs(),l.pooledCache=u,u.refCount++,u!==null&&(l.pooledCacheLanes|=a),l=u),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,u=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=u.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 ki(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yr():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 Gp(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,cs())),Oe(t),null;case 26:var l=t.type,u=t.memoizedState;return e===null?(aa(t),u!==null?(Oe(t),qd(t,u)):(Oe(t),Is(t,l,null,n,a))):u?u!==e.memoizedState?(aa(t),Oe(t),qd(t,u)):(Oe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&aa(t),Oe(t),Is(t,l,e,n,a)),null;case 27:if(Jl(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=F.current,xn(t)?bo(t):(e=Kf(l,n,a),t.stateNode=e,aa(t))}return Oe(t),null;case 5:if(Jl(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(u=F.current,xn(t))bo(t);else{var d=Wi(oe.current);switch(u){case 1:u=d.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:u=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":u=d.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":u=d.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":u=d.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?u.multiple=!0:n.size&&(u.size=n.size);break;default:u=typeof n.is=="string"?d.createElement(l,{is:n.is}):d.createElement(l)}}u[We]=t,u[it]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)u.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=u;e:switch(tt(u,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=cs(),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=cs(),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),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==l&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ki(t,t.updateQueue),Oe(t),null);case 4:return Be(),e===null&&xc(t.stateNode.containerInfo),Oe(t),null;case 10:return It(t.type),Oe(t),null;case 19:if(L(Le),n=t.memoizedState,n===null)return Oe(t),null;if(l=(t.flags&128)!==0,u=n.rendering,u===null)if(l)xl(n,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ci(e),u!==null){for(t.flags|=128,xl(n,!1),e=u.updateQueue,t.updateQueue=e,ki(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)mo(a,e),a=a.sibling;return J(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(u),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,ki(t,e),xl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.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?(u.sibling=t.child,t.child=u):(e=n.last,e!==null?e.sibling=u:t.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=ft(),e.sibling=null,a=Le.current,J(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&&ki(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&&L(Ka),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 Vp(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 Jl(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 L(Le),null;case 4:return Be(),null;case 10:return It(t.type),null;case 22:case 23:return yt(t),js(),e!==null&&L(Ka),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:Jl(t);break;case 4:Be();break;case 31:t.memoizedState!==null&&yt(t);break;case 13:yt(t);break;case 19:L(Le);break;case 10:It(t.type);break;case 22:case 23:yt(t),js(),e!==null&&L(Ka);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 u=a.create,d=a.inst;n=u(),d.destroy=n}a=a.next}while(a!==l)}}catch(m){Ce(t,t.return,m)}}function Ca(e,t,a){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var u=l.next;n=u;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,R=m;try{R()}catch(U){Ce(l,x,U)}}}n=n.next}while(n!==u)}}catch(U){Ce(t,t.return,U)}}function Gd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Mo(t,a)}catch(n){Ce(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){Ce(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){Ce(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){Ce(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){Ce(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){Ce(e,e.return,l)}}function Ps(e,t,a){try{var n=e.stateNode;d1(n,e.type,a,t),n[it]=t}catch(l){Ce(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 ec(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 tc(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=Jt));else if(n!==4&&(n===27&&Aa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(tc(e,t,a),e=e.sibling;e!==null;)tc(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(u){Ce(e,e.return,u)}}var na=!1,Xe=!1,ac=!1,Jd=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function Zp(e,t){if(e=e.containerInfo,Cc=lu,e=lo(e),$u(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,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var d=0,m=-1,x=-1,R=0,U=0,B=e,z=null;t:for(;;){for(var M;B!==a||l!==0&&B.nodeType!==3||(m=d+l),B!==u||n!==0&&B.nodeType!==3||(x=d+n),B.nodeType===3&&(d+=B.nodeValue.length),(M=B.firstChild)!==null;)z=B,B=M;for(;;){if(B===e)break t;if(z===a&&++R===l&&(m=d),z===u&&++U===n&&(x=d),(M=B.nextSibling)!==null)break;B=z,z=B.parentNode}B=M}a=m===-1||x===-1?null:{start:m,end:x}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ec={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,u=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&&u!==null){e=void 0,a=t,l=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var $=Pa(a.type,l);e=n.getSnapshotBeforeUpdate($,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(ne){Ce(a,a.return,ne)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Tc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tc(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 Kd(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){Ce(a,a.return,d)}else{var l=Pa(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Ce(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){Ce(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=Pp.bind(null,a),b1(e,a))));break;case 22:if(n=a.memoizedState!==null||na,!n){t=t!==null&&t.memoizedState!==null||Xe,l=na;var u=Xe;na=n,(Xe=t)&&!u?ua(e,a,(a.subtreeFlags&8772)!==0):ia(e,a),na=l,Xe=u}break;case 30:break;default:ia(e,a)}}function $d(e){var t=e.alternate;t!==null&&(e.alternate=null,$d(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 Ue=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=Ue,l=st;Aa(a.type)&&(Ue=a.stateNode,st=!1),la(e,t,a),zl(a.stateNode),Ue=n,st=l;break;case 5:Xe||Vt(a,t);case 6:if(n=Ue,l=st,Ue=null,la(e,t,a),Ue=n,st=l,Ue!==null)if(st)try{(Ue.nodeType===9?Ue.body:Ue.nodeName==="HTML"?Ue.ownerDocument.body:Ue).removeChild(a.stateNode)}catch(u){Ce(a,t,u)}else try{Ue.removeChild(a.stateNode)}catch(u){Ce(a,t,u)}break;case 18:Ue!==null&&(st?(e=Ue,Vf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Yn(e)):Vf(Ue,a.stateNode));break;case 4:n=Ue,l=st,Ue=a.stateNode.containerInfo,st=!0,la(e,t,a),Ue=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){Ce(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){Ce(t,t.return,a)}}function Xp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jd),t;default:throw Error(o(435,e.tag))}}function Bi(e,t){var a=Xp(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var l=e1.bind(null,e,n);n.then(l,l)}})}function ct(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var l=a[n],u=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(Aa(m.type)){Ue=m.stateNode,st=!1;break e}break;case 5:Ue=m.stateNode,st=!1;break e;case 3:case 4:Ue=m.stateNode.containerInfo,st=!0;break e}m=m.return}if(Ue===null)throw Error(o(160));Fd(u,d,l),Ue=null,st=!1,u=l.alternate,u!==null&&(u.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:ct(t,e),rt(e),n&4&&(Ca(3,e,e.return),jl(3,e),Ca(5,e,e.return));break;case 1:ct(t,e),rt(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(ct(t,e),rt(e),n&512&&(Xe||a===null||Vt(a,a.return)),n&4){var u=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,l=l.ownerDocument||l;t:switch(n){case"title":u=l.getElementsByTagName("title")[0],(!u||u[$n]||u[We]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=l.createElement(n),l.head.insertBefore(u,l.querySelector("head > title"))),tt(u,n,a),u[We]=e,$e(u),n=u;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(u=d[m],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){d.splice(m,1);break t}}u=l.createElement(n),tt(u,n,a),l.head.appendChild(u);break;case"meta":if(d=eh("meta","content",l).get(n+(a.content||""))){for(m=0;m<d.length;m++)if(u=d[m],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){d.splice(m,1);break t}}u=l.createElement(n),tt(u,n,a),l.head.appendChild(u);break;default:throw Error(o(468,n))}u[We]=e,$e(u),n=u}e.stateNode=n}else th(l,e.type,e.stateNode);else e.stateNode=Pf(l,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.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:ct(t,e),rt(e),n&512&&(Xe||a===null||Vt(a,a.return)),a!==null&&n&4&&Ps(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ct(t,e),rt(e),n&512&&(Xe||a===null||Vt(a,a.return)),e.flags&32){l=e.stateNode;try{on(l,"")}catch($){Ce(e,e.return,$)}}n&4&&e.stateNode!=null&&(l=e.memoizedProps,Ps(e,l,a!==null?a.memoizedProps:l)),n&1024&&(ac=!0);break;case 6:if(ct(t,e),rt(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch($){Ce(e,e.return,$)}}break;case 3:if(eu=null,l=Ht,Ht=Ii(t.containerInfo),ct(t,e),Ht=l,rt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Yn(t.containerInfo)}catch($){Ce(e,e.return,$)}ac&&(ac=!1,ef(e));break;case 4:n=Ht,Ht=Ii(e.stateNode.containerInfo),ct(t,e),rt(e),Ht=n;break;case 12:ct(t,e),rt(e);break;case 31:ct(t,e),rt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 13:ct(t,e),rt(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,R=na,U=Xe;if(na=R||l,Xe=U||x,ct(t,e),Xe=U,na=R,rt(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(u=x.stateNode,l)d=u.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=x.stateNode;var B=x.memoizedProps.style,z=B!=null&&B.hasOwnProperty("display")?B.display:null;m.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch($){Ce(x,x.return,$)}}}else if(t.tag===6){if(a===null){x=t;try{x.stateNode.nodeValue=l?"":x.memoizedProps}catch($){Ce(x,x.return,$)}}}else if(t.tag===18){if(a===null){x=t;try{var M=x.stateNode;l?Zf(M,!0):Zf(x.stateNode,!1)}catch($){Ce(x,x.return,$)}}}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:ct(t,e),rt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Bi(e,n)));break;case 30:break;case 21:break;default:ct(t,e),rt(e)}}function rt(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,u=ec(e);Hi(e,u,l);break;case 5:var d=a.stateNode;a.flags&32&&(on(d,""),a.flags&=-33);var m=ec(e);Hi(e,m,d);break;case 3:case 4:var x=a.stateNode.containerInfo,R=ec(e);tc(e,R,x);break;default:throw Error(o(161))}}catch(U){Ce(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;)Kd(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,u=t,d=u.flags;switch(u.tag){case 0:case 11:case 15:ua(l,u,a),jl(4,u);break;case 1:if(ua(l,u,a),n=u,l=n.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){Ce(n,n.return,R)}if(n=u,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(R){Ce(n,n.return,R)}}a&&d&64&&Gd(u),Sl(u,u.return);break;case 27:Qd(u);case 26:case 5:ua(l,u,a),a&&n===null&&d&4&&Zd(u),Sl(u,u.return);break;case 12:ua(l,u,a);break;case 31:ua(l,u,a),a&&d&4&&Wd(l,u);break;case 13:ua(l,u,a),a&&d&4&&Id(l,u);break;case 22:u.memoizedState===null&&ua(l,u,a),Sl(u,u.return);break;case 30:break;default:ua(l,u,a)}t=t.sibling}}function nc(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&&cl(a))}function lc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&cl(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&&cl(e)));break;case 12:if(l&2048){Bt(e,t,a,n),e=t.stateNode;try{var u=t.memoizedProps,d=u.id,m=u.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){Ce(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:u=t.stateNode,d=t.alternate,t.memoizedState!==null?u._visibility&2?Bt(e,t,a,n):Cl(e,t):u._visibility&2?Bt(e,t,a,n):(u._visibility|=2,An(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),l&2048&&nc(d,t);break;case 24:Bt(e,t,a,n),l&2048&&lc(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 u=e,d=t,m=a,x=n,R=d.flags;switch(d.tag){case 0:case 11:case 15:An(u,d,m,x,l),jl(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?An(u,d,m,x,l):Cl(u,d):(U._visibility|=2,An(u,d,m,x,l)),l&&R&2048&&nc(d.alternate,d);break;case 24:An(u,d,m,x,l),l&&R&2048&&lc(d.alternate,d);break;default:An(u,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&&nc(n.alternate,n);break;case 24:Cl(a,n),l&2048&&lc(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&&z1(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:cl(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,u=n.return;if($d(n),n===a){Fe=null;break e}if(l!==null){l.return=u,Fe=l;break e}Fe=u}}}var Qp={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,xe=0,Ae=null,de=null,me=0,Se=0,bt=null,Ea=!1,Mn=!1,ic=!1,sa=0,He=0,Na=0,tn=0,uc=0,xt=0,On=0,wl=null,ot=null,sc=!1,qi=0,sf=0,Yi=1/0,Gi=null,wa=null,Je=0,Ta=null,Un=null,ca=0,cc=0,rc=null,cf=null,Tl=0,oc=null;function jt(){return(xe&2)!==0&&me!==0?me&-me:k.T!==null?vc():Sr()}function rf(){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===Ae&&(Se===2||Se===9)||e.cancelPendingCommit!==null)&&(Dn(e,0),_a(e,me,xt,!1)),Kn(e,a),((xe&2)===0||e!==Ae)&&(e===Ae&&((xe&2)===0&&(tn|=a),He===4&&_a(e,me,xt,!1)),Zt(e))}function of(e,t,a){if((xe&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Jn(e,t),l=n?Fp(e,t):fc(e,t,!0),u=n;do{if(l===0){Mn&&!n&&_a(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Kp(a)){l=fc(e,t,!1),u=!1;continue}if(l===2){if(u=t,e.errorRecoveryDisabledLanes&u)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&&(Dn(m,d).flags|=256),d=fc(m,d,!1),d!==2){if(ic&&!x){m.errorRecoveryDisabledLanes|=u,tn|=u,l=4;break e}u=ot,ot=l,u!==null&&(ot===null?ot=u:ot.push.apply(ot,u))}l=d}if(u=!1,l!==2)continue}}if(l===1){Dn(e,0),_a(e,t,0,!0);break}e:{switch(n=e,u=l,u){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;ca=t,n.timeoutHandle=Yf(df.bind(null,n,a,ot,Gi,sc,t,xt,tn,On,Ea,u,"Throttled",-0,0),l);break e}df(n,a,ot,Gi,sc,t,xt,tn,On,Ea,u,null,-0,0)}}break}while(!0);Zt(e)}function df(e,t,a,n,l,u,d,m,x,R,U,B,z,M){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jt},af(t,u,B);var $=(u&62914560)===u?qi-ft():(u&4194048)===u?sf-ft():0;if($=M1(B,$),$!==null){ca=u,e.cancelPendingCommit=$(bf.bind(null,e,t,u,a,n,l,d,m,x,U,B,null,z,M)),_a(e,u,d,!R);return}}bf(e,t,u,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],u=l.getSnapshot;l=l.value;try{if(!pt(u(),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&=~uc,t&=~tn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var l=t;0<l;){var u=31-mt(l),d=1<<u;n[u]=-1,l&=~d}a!==0&&br(e,a,t)}function Vi(){return(xe&6)===0?(_l(0),!1):!0}function dc(){if(de!==null){if(Se===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 Dn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,m1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ca=0,dc(),Ae=e,de=a=$t(e.current,null),me=t,Se=0,bt=null,Ea=!1,Mn=Jn(e,t),ic=!1,On=xt=uc=tn=Na=He=0,ot=wl=null,sc=!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),u=1<<l;t|=e[l],n&=~u}return sa=t,oi(),a}function ff(e,t){ce=null,k.H=yl,t===En||t===yi?(t=To(),Se=3):t===ps?(t=To(),Se=4):Se=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=k.H;return k.H=yl,e===null?yl:e}function pf(){var e=k.A;return k.A=Qp,e}function Zi(){He=4,Ea||(me&4194048)!==me&>.current!==null||(Mn=!0),(Na&134217727)===0&&(tn&134217727)===0||Ae===null||_a(Ae,me,xt,!1)}function fc(e,t,a){var n=xe;xe|=2;var l=mf(),u=pf();(Ae!==e||me!==t)&&(Gi=null,Dn(e,t)),t=!1;var d=He;e:do try{if(Se!==0&&de!==null){var m=de,x=bt;switch(Se){case 8:dc(),d=6;break e;case 3:case 2:case 9:case 6:gt.current===null&&(t=!0);var R=Se;if(Se=0,bt=null,kn(e,m,x,R),a&&Mn){d=0;break e}break;default:R=Se,Se=0,bt=null,kn(e,m,x,R)}}$p(),d=He;break}catch(U){ff(e,U)}while(!0);return t&&e.shellSuspendCounter++,Wt=Qa=null,xe=n,k.H=l,k.A=u,de===null&&(Ae=null,me=0,oi()),d}function $p(){for(;de!==null;)vf(de)}function Fp(e,t){var a=xe;xe|=2;var n=mf(),l=pf();Ae!==e||me!==t?(Gi=null,Yi=ft()+500,Dn(e,t)):Mn=Jn(e,t);e:do try{if(Se!==0&&de!==null){t=de;var u=bt;t:switch(Se){case 1:Se=0,bt=null,kn(e,t,u,1);break;case 2:case 9:if(No(u)){Se=0,bt=null,gf(t);break}t=function(){Se!==2&&Se!==9||Ae!==e||(Se=7),Zt(e)},u.then(t,t);break e;case 3:Se=7;break e;case 4:Se=5;break e;case 7:No(u)?(Se=0,bt=null,gf(t)):(Se=0,bt=null,kn(e,t,u,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){Se=0,bt=null;var x=m.sibling;if(x!==null)de=x;else{var R=m.return;R!==null?(de=R,Xi(R)):de=null}break t}}Se=0,bt=null,kn(e,t,u,5);break;case 6:Se=0,bt=null,kn(e,t,u,6);break;case 8:dc(),He=6;break e;default:throw Error(o(462))}}Wp();break}catch(U){ff(e,U)}while(!0);return Wt=Qa=null,k.H=n,k.A=l,xe=a,de!==null?0:(Ae=null,me=0,oi(),He)}function Wp(){for(;de!==null&&!xm();)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 kn(e,t,a,n){Wt=Qa=null,Ts(t),Nn=null,ol=0;var l=t.return;try{if(Lp(e,l,t,a,me)){He=1,Mi(e,wt(a,e.current)),de=null;return}}catch(u){if(l!==null)throw de=l,u;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=Gp(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=Vp(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,u,d,m,x){e.cancelPendingCommit=null;do Qi();while(Je!==0);if((xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=es,Am(e,a,u,d,m,x),e===Ae&&(de=Ae=null,me=0),Un=t,Ta=e,ca=a,cc=u,rc=l,cf=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,t1(Kl,function(){return Ef(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=k.T,k.T=null,l=Q.p,Q.p=2,d=xe,xe|=4;try{Zp(e,t,a)}finally{xe=d,Q.p=l,k.T=n}}Je=1,xf(),jf(),Sf()}}function xf(){if(Je===1){Je=0;var e=Ta,t=Un,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null;var n=Q.p;Q.p=2;var l=xe;xe|=4;try{Pd(t,e);var u=Ec,d=lo(e.containerInfo),m=u.focusedElem,x=u.selectionRange;if(d!==m&&m&&m.ownerDocument&&no(m.ownerDocument.documentElement,m)){if(x!==null&&$u(m)){var R=x.start,U=x.end;if(U===void 0&&(U=R),"selectionStart"in m)m.selectionStart=R,m.selectionEnd=Math.min(U,m.value.length);else{var B=m.ownerDocument||document,z=B&&B.defaultView||window;if(z.getSelection){var M=z.getSelection(),$=m.textContent.length,ne=Math.min(x.start,$),_e=x.end===void 0?ne:Math.min(x.end,$);!M.extend&&ne>_e&&(d=_e,_e=ne,ne=d);var w=ao(m,ne),E=ao(m,_e);if(w&&E&&(M.rangeCount!==1||M.anchorNode!==w.node||M.anchorOffset!==w.offset||M.focusNode!==E.node||M.focusOffset!==E.offset)){var _=B.createRange();_.setStart(w.node,w.offset),M.removeAllRanges(),ne>_e?(M.addRange(_),M.extend(E.node,E.offset)):(_.setEnd(E.node,E.offset),M.addRange(_))}}}}for(B=[],M=m;M=M.parentNode;)M.nodeType===1&&B.push({element:M,left:M.scrollLeft,top:M.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<B.length;m++){var H=B[m];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}lu=!!Cc,Ec=Cc=null}finally{xe=l,Q.p=n,k.T=a}}e.current=t,Je=2}}function jf(){if(Je===2){Je=0;var e=Ta,t=Un,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=k.T,k.T=null;var n=Q.p;Q.p=2;var l=xe;xe|=4;try{Kd(e,t.alternate,t)}finally{xe=l,Q.p=n,k.T=a}}Je=3}}function Sf(){if(Je===4||Je===3){Je=0,jm();var e=Ta,t=Un,a=ca,n=cf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Je=5:(Je=0,Un=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=k.T,l=Q.p,Q.p=2,k.T=null;try{for(var u=e.onRecoverableError,d=0;d<n.length;d++){var m=n[d];u(m.value,{componentStack:m.stack})}}finally{k.T=t,Q.p=l}}(ca&3)!==0&&Qi(),Zt(e),l=e.pendingLanes,(a&261930)!==0&&(l&42)!==0?e===oc?Tl++:(Tl=0,oc=e):Tl=0,_l(0)}}function Cf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,cl(t)))}function Qi(){return xf(),jf(),Sf(),Ef()}function Ef(){if(Je!==5)return!1;var e=Ta,t=cc;cc=0;var a=Au(ca),n=k.T,l=Q.p;try{Q.p=32>a?32:a,k.T=null,a=rc,rc=null;var u=Ta,d=ca;if(Je=0,Un=Ta=null,ca=0,(xe&6)!==0)throw Error(o(331));var m=xe;if(xe|=4,lf(u.current),tf(u,u.current,d,a),xe=m,_l(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Qn,u)}catch{}return!0}finally{Q.p=l,k.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&&(Kn(e,2),Zt(e))}function Ce(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),Kn(n,2),Zt(n));break}}t=t.return}}function hc(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)||(ic=!0,l.add(a),e=Ip.bind(null,e,t,a),t.then(e,e))}function Ip(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ae===e&&(me&a)===a&&(He===4||He===3&&(me&62914560)===me&&300>ft()-qi?(xe&2)===0&&Dn(e,0):uc|=a,On===me&&(On=0)),Zt(e)}function wf(e,t){t===0&&(t=yr()),e=Va(e,t),e!==null&&(Kn(e,t),Zt(e))}function Pp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),wf(e,a)}function e1(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 t1(e,t){return wu(e,t)}var Ji=null,Hn=null,mc=!1,Ki=!1,pc=!1,Ra=0;function Zt(e){e!==Hn&&e.next===null&&(Hn===null?Ji=Hn=e:Hn=Hn.next=e),Ki=!0,mc||(mc=!0,n1())}function _l(e,t){if(!pc&&Ki){pc=!0;do for(var a=!1,n=Ji;n!==null;){if(e!==0){var l=n.pendingLanes;if(l===0)var u=0;else{var d=n.suspendedLanes,m=n.pingedLanes;u=(1<<31-mt(42|e)+1)-1,u&=l&~(d&~m),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,Af(n,u))}else u=me,u=Il(n,n===Ae?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&3)===0||Jn(n,u)||(a=!0,Af(n,u));n=n.next}while(a);pc=!1}}function a1(){Tf()}function Tf(){Ki=mc=!1;var e=0;Ra!==0&&h1()&&(e=Ra);for(var t=ft(),a=null,n=Ji;n!==null;){var l=n.next,u=_f(n,t);u===0?(n.next=null,a===null?Ji=l:a.next=l,l===null&&(Hn=a)):(a=n,(e!==0||(u&3)!==0)&&(Ki=!0)),n=l}Je!==0&&Je!==5||_l(e),Ra!==0&&(Ra=0)}function _f(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,l=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var d=31-mt(u),m=1<<d,x=l[d];x===-1?((m&a)===0||(m&n)!==0)&&(l[d]=Rm(m,t)):x<=t&&(e.expiredLanes|=m),u&=~m}if(t=Ae,a=me,a=Il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Se===2||Se===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Tu(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Jn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Tu(n),Au(a)){case 2:case 8:a=vr;break;case 32:a=Kl;break;case 268435456:a=gr;break;default:a=Kl}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(Je!==0&&Je!==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===Ae?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 n1(){p1(function(){(xe&6)!==0?wu(pr,a1):Tf()})}function vc(){if(Ra===0){var e=Sn;e===0&&(e=$l,$l<<=1,($l&261888)===0&&($l=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 l1(e,t,a,n,l){if(t==="submit"&&a&&a.stateNode===l){var u=zf((l[it]||null).action),d=n.submitter;d&&(t=(t=d[it]||null)?zf(t.formAction):d.getAttribute("formAction"),t!==null&&(u=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);ks(a,{pending:!0,data:x,method:l.method,action:u},null,x)}}else typeof u=="function"&&(m.preventDefault(),x=d?Mf(l,d):new FormData(l),ks(a,{pending:!0,data:x,method:l.method,action:u},u,x))},currentTarget:l}]})}}for(var gc=0;gc<Pu.length;gc++){var yc=Pu[gc],i1=yc.toLowerCase(),u1=yc[0].toUpperCase()+yc.slice(1);kt(i1,"on"+u1)}kt(so,"onAnimationEnd"),kt(co,"onAnimationIteration"),kt(ro,"onAnimationStart"),kt("dblclick","onDoubleClick"),kt("focusin","onFocus"),kt("focusout","onBlur"),kt(Sp,"onTransitionRun"),kt(Cp,"onTransitionStart"),kt(Ep,"onTransitionCancel"),kt(oo,"onTransitionEnd"),cn("onMouseEnter",["mouseout","mouseover"]),cn("onMouseLeave",["mouseout","mouseover"]),cn("onPointerEnter",["pointerout","pointerover"]),cn("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(" "),s1=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 u=void 0;if(t)for(var d=n.length-1;0<=d;d--){var m=n[d],x=m.instance,R=m.currentTarget;if(m=m.listener,x!==u&&l.isPropagationStopped())break e;u=m,l.currentTarget=R;try{u(l)}catch(U){ri(U)}l.currentTarget=null,u=x}else for(d=0;d<n.length;d++){if(m=n[d],x=m.instance,R=m.currentTarget,m=m.listener,x!==u&&l.isPropagationStopped())break e;u=m,l.currentTarget=R;try{u(l)}catch(U){ri(U)}l.currentTarget=null,u=x}}}}function fe(e,t){var a=t[zu];a===void 0&&(a=t[zu]=new Set);var n=e+"__bubble";a.has(n)||(Uf(t,e,2,!1),a.add(n))}function bc(e,t,a){var n=0;t&&(n|=4),Uf(a,e,n,t)}var $i="_reactListening"+Math.random().toString(36).slice(2);function xc(e){if(!e[$i]){e[$i]=!0,Nr.forEach(function(a){a!=="selectionchange"&&(s1.has(a)||bc(a,!1,e),bc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$i]||(t[$i]=!0,bc("selectionchange",!1,t))}}function Uf(e,t,a,n){switch(rh(t)){case 2:var l=D1;break;case 8:l=k1;break;default:l=Dc}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 jc(e,t,a,n,l){var u=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=u=d;continue e}m=m.parentNode}}n=n.return}Hr(function(){var R=u,U=Bu(a),B=[];e:{var z=fo.get(e);if(z!==void 0){var M=ui,$=e;switch(e){case"keypress":if(li(a)===0)break e;case"keydown":case"keyup":M=ep;break;case"focusin":$="focus",M=Zu;break;case"focusout":$="blur",M=Zu;break;case"beforeblur":case"afterblur":M=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":M=qr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":M=Gm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":M=np;break;case so:case co:case ro:M=Xm;break;case oo:M=ip;break;case"scroll":case"scrollend":M=qm;break;case"wheel":M=sp;break;case"copy":case"cut":case"paste":M=Jm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":M=Gr;break;case"toggle":case"beforetoggle":M=rp}var ne=(t&4)!==0,_e=!ne&&(e==="scroll"||e==="scrollend"),w=ne?z!==null?z+"Capture":null:z;ne=[];for(var E=R,_;E!==null;){var H=E;if(_=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||_===null||w===null||(H=Wn(E,w),H!=null&&ne.push(Al(E,H,_))),_e)break;E=E.return}0<ne.length&&(z=new M(z,$,null,a,U),B.push({event:z,listeners:ne}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",M=e==="mouseout"||e==="pointerout",z&&a!==Hu&&($=a.relatedTarget||a.fromElement)&&(ln($)||$[nn]))break e;if((M||z)&&(z=U.window===U?U:(z=U.ownerDocument)?z.defaultView||z.parentWindow:window,M?($=a.relatedTarget||a.toElement,M=R,$=$?ln($):null,$!==null&&(_e=h($),ne=$.tag,$!==_e||ne!==5&&ne!==27&&ne!==6)&&($=null)):(M=null,$=R),M!==$)){if(ne=qr,H="onMouseLeave",w="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(ne=Gr,H="onPointerLeave",w="onPointerEnter",E="pointer"),_e=M==null?z:Fn(M),_=$==null?z:Fn($),z=new ne(H,E+"leave",M,a,U),z.target=_e,z.relatedTarget=_,H=null,ln(U)===R&&(ne=new ne(w,E+"enter",$,a,U),ne.target=_,ne.relatedTarget=_e,H=ne),_e=H,M&&$)t:{for(ne=c1,w=M,E=$,_=0,H=w;H;H=ne(H))_++;H=0;for(var ae=E;ae;ae=ne(ae))H++;for(;0<_-H;)w=ne(w),_--;for(;0<H-_;)E=ne(E),H--;for(;_--;){if(w===E||E!==null&&w===E.alternate){ne=w;break t}w=ne(w),E=ne(E)}ne=null}else ne=null;M!==null&&Df(B,z,M,ne,!1),$!==null&&_e!==null&&Df(B,_e,$,ne,!0)}}e:{if(z=R?Fn(R):window,M=z.nodeName&&z.nodeName.toLowerCase(),M==="select"||M==="input"&&z.type==="file")var ye=Fr;else if(Kr(z))if(Wr)ye=bp;else{ye=gp;var P=vp}else M=z.nodeName,!M||M.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?R&&ku(R.elementType)&&(ye=Fr):ye=yp;if(ye&&(ye=ye(e,R))){$r(B,ye,a,U);break e}P&&P(e,z,R),e==="focusout"&&R&&z.type==="number"&&R.memoizedProps.value!=null&&Du(z,"number",z.value)}switch(P=R?Fn(R):window,e){case"focusin":(Kr(P)||P.contentEditable==="true")&&(mn=P,Fu=R,il=null);break;case"focusout":il=Fu=mn=null;break;case"mousedown":Wu=!0;break;case"contextmenu":case"mouseup":case"dragend":Wu=!1,io(B,a,U);break;case"selectionchange":if(jp)break;case"keydown":case"keyup":io(B,a,U)}var re;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?Qr(e,a)&&(pe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(pe="onCompositionStart");pe&&(Vr&&a.locale!=="ko"&&(hn||pe!=="onCompositionStart"?pe==="onCompositionEnd"&&hn&&(re=Br()):(ha=U,Yu="value"in ha?ha.value:ha.textContent,hn=!0)),P=Fi(R,pe),0<P.length&&(pe=new Yr(pe,e,null,a,U),B.push({event:pe,listeners:P}),re?pe.data=re:(re=Jr(a),re!==null&&(pe.data=re)))),(re=dp?fp(e,a):hp(e,a))&&(pe=Fi(R,"onBeforeInput"),0<pe.length&&(P=new Yr("onBeforeInput","beforeinput",null,a,U),B.push({event:P,listeners:pe}),P.data=re)),l1(B,e,R,a,U)}Of(B,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,u=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||u===null||(l=Wn(e,a),l!=null&&n.unshift(Al(e,l,u)),l=Wn(e,t),l!=null&&n.push(Al(e,l,u))),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 Df(e,t,a,n,l){for(var u=t._reactName,d=[];a!==null&&a!==n;){var m=a,x=m.alternate,R=m.stateNode;if(m=m.tag,x!==null&&x===n)break;m!==5&&m!==26&&m!==27||R===null||(x=R,l?(R=Wn(a,u),R!=null&&d.unshift(Al(a,R,x))):l||(R=Wn(a,u),R!=null&&d.push(Al(a,R,x)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var r1=/\r\n?/g,o1=/\u0000|\uFFFD/g;function kf(e){return(typeof e=="string"?e:""+e).replace(r1,`
|
|
49
|
-
`).replace(o1,"")}function Hf(e,t){return t=kf(t),kf(e)===t}function Te(e,t,a,n,l,u){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":Dr(e,n,u);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 u=="function"&&(a==="formAction"?(t!=="input"&&Te(e,t,"name",l.name,l,null),Te(e,t,"formEncType",l.formEncType,l,null),Te(e,t,"formMethod",l.formMethod,l,null),Te(e,t,"formTarget",l.formTarget,l,null)):(Te(e,t,"encType",l.encType,l,null),Te(e,t,"method",l.method,l,null),Te(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=Jt);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=Bm.get(a)||a,Pl(e,a,n))}}function Sc(e,t,a,n,l,u){switch(a){case"style":Dr(e,n,u);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=Jt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(l=a.endsWith("Capture"),t=a.slice(2,l?a.length-7:void 0),u=e[it]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,l),typeof n=="function")){typeof u!="function"&&u!==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,u;for(u in a)if(a.hasOwnProperty(u)){var d=a[u];if(d!=null)switch(u){case"src":n=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Te(e,t,u,d,a,null)}}l&&Te(e,t,"srcSet",a.srcSet,a,null),n&&Te(e,t,"src",a.src,a,null);return;case"input":fe("invalid",e);var m=u=d=l=null,x=null,R=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":R=U;break;case"value":u=U;break;case"defaultValue":m=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:Te(e,t,n,U,a,null)}}zr(e,u,m,x,R,d,l,!1);return;case"select":fe("invalid",e),n=d=u=null;for(l in a)if(a.hasOwnProperty(l)&&(m=a[l],m!=null))switch(l){case"value":u=m;break;case"defaultValue":d=m;break;case"multiple":n=m;default:Te(e,t,l,m,a,null)}t=u,a=d,e.multiple=!!n,t!=null?rn(e,!!n,t,!1):a!=null&&rn(e,!!n,a,!0);return;case"textarea":fe("invalid",e),u=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":u=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(o(91));break;default:Te(e,t,d,m,a,null)}Or(e,n,l,u);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:Te(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(R in a)if(a.hasOwnProperty(R)&&(n=a[R],n!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Te(e,t,R,n,a,null)}return;default:if(ku(t)){for(U in a)a.hasOwnProperty(U)&&(n=a[U],n!==void 0&&Sc(e,t,U,n,a,void 0));return}}for(m in a)a.hasOwnProperty(m)&&(n=a[m],n!=null&&Te(e,t,m,n,a,null))}function d1(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,u=null,d=null,m=null,x=null,R=null,U=null;for(M in a){var B=a[M];if(a.hasOwnProperty(M)&&B!=null)switch(M){case"checked":break;case"value":break;case"defaultValue":x=B;default:n.hasOwnProperty(M)||Te(e,t,M,null,n,B)}}for(var z in n){var M=n[z];if(B=a[z],n.hasOwnProperty(z)&&(M!=null||B!=null))switch(z){case"type":u=M;break;case"name":l=M;break;case"checked":R=M;break;case"defaultChecked":U=M;break;case"value":d=M;break;case"defaultValue":m=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:M!==B&&Te(e,t,z,M,n,B)}}Uu(e,d,m,x,R,U,u,l);return;case"select":M=d=m=z=null;for(u in a)if(x=a[u],a.hasOwnProperty(u)&&x!=null)switch(u){case"value":break;case"multiple":M=x;default:n.hasOwnProperty(u)||Te(e,t,u,null,n,x)}for(l in n)if(u=n[l],x=a[l],n.hasOwnProperty(l)&&(u!=null||x!=null))switch(l){case"value":z=u;break;case"defaultValue":m=u;break;case"multiple":d=u;default:u!==x&&Te(e,t,l,u,n,x)}t=m,a=d,n=M,z!=null?rn(e,!!a,z,!1):!!n!=!!a&&(t!=null?rn(e,!!a,t,!0):rn(e,!!a,a?[]:"",!1));return;case"textarea":M=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:Te(e,t,m,null,n,l)}for(d in n)if(l=n[d],u=a[d],n.hasOwnProperty(d)&&(l!=null||u!=null))switch(d){case"value":z=l;break;case"defaultValue":M=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(o(91));break;default:l!==u&&Te(e,t,d,l,n,u)}Mr(e,z,M);return;case"option":for(var $ in a)if(z=a[$],a.hasOwnProperty($)&&z!=null&&!n.hasOwnProperty($))switch($){case"selected":e.selected=!1;break;default:Te(e,t,$,null,n,z)}for(x in n)if(z=n[x],M=a[x],n.hasOwnProperty(x)&&z!==M&&(z!=null||M!=null))switch(x){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:Te(e,t,x,z,n,M)}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)&&Te(e,t,ne,null,n,z);for(R in n)if(z=n[R],M=a[R],n.hasOwnProperty(R)&&z!==M&&(z!=null||M!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:Te(e,t,R,z,n,M)}return;default:if(ku(t)){for(var _e in a)z=a[_e],a.hasOwnProperty(_e)&&z!==void 0&&!n.hasOwnProperty(_e)&&Sc(e,t,_e,void 0,n,z);for(U in n)z=n[U],M=a[U],!n.hasOwnProperty(U)||z===M||z===void 0&&M===void 0||Sc(e,t,U,z,n,M);return}}for(var w in a)z=a[w],a.hasOwnProperty(w)&&z!=null&&!n.hasOwnProperty(w)&&Te(e,t,w,null,n,z);for(B in n)z=n[B],M=a[B],!n.hasOwnProperty(B)||z===M||z==null&&M==null||Te(e,t,B,z,n,M)}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 f1(){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],u=l.transferSize,d=l.initiatorType,m=l.duration;if(u&&m&&Bf(d)){for(d=0,m=l.responseEnd,n+=1;n<a.length;n++){var x=a[n],R=x.startTime;if(R>m)break;var U=x.transferSize,B=x.initiatorType;U&&Bf(B)&&(x=x.responseEnd,d+=U*(x<m?1:(m-R)/(x-R)))}if(--n,t+=8*(u+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 Cc=null,Ec=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 Nc(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 wc=null;function h1(){var e=window.event;return e&&e.type==="popstate"?e===wc?!1:(wc=e,!0):(wc=null,!1)}var Yf=typeof setTimeout=="function"?setTimeout:void 0,m1=typeof clearTimeout=="function"?clearTimeout:void 0,Gf=typeof Promise=="function"?Promise:void 0,p1=typeof queueMicrotask=="function"?queueMicrotask:typeof Gf<"u"?function(e){return Gf.resolve(null).then(e).catch(v1)}:Yf;function v1(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 u=a.firstChild;u;){var d=u.nextSibling,m=u.nodeName;u[$n]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=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 Tc(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":Tc(a),Mu(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function g1(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[$n])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==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(u=e.getAttribute("src"),(u!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=zt(e.nextSibling),e===null)break}return null}function y1(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 _c(e){return e.data==="$?"||e.data==="$~"}function Rc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function b1(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 Ac=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 Jf(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 Kf(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,$f=new Set;function Ii(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ra=Q.d;Q.d={f:x1,r:j1,D:S1,C:C1,L:E1,m:N1,X:T1,S:w1,M:_1};function x1(){var e=ra.f(),t=Vi();return e||t}function j1(e){var t=un(e);t!==null&&t.tag===5&&t.type==="form"?dd(t):ra.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+'"]'),$f.has(l)||($f.add(l),e={rel:e,crossOrigin:a,href:t},n.querySelector(l)===null&&(t=n.createElement("link"),tt(t,"link",e),$e(t),n.head.appendChild(t)))}}function S1(e){ra.D(e),Ff("dns-prefetch",e,null)}function C1(e,t){ra.C(e,t),Ff("preconnect",e,t)}function E1(e,t,a){ra.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 u=l;switch(t){case"style":u=Ln(e);break;case"script":u=qn(e)}Mt.has(u)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Mt.set(u,e),n.querySelector(l)!==null||t==="style"&&n.querySelector(Ml(u))||t==="script"&&n.querySelector(Ol(u))||(t=n.createElement("link"),tt(t,"link",e),$e(t),n.head.appendChild(t)))}}function N1(e,t){ra.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)+'"]',u=l;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=qn(e)}if(!Mt.has(u)&&(e=y({rel:"modulepreload",href:e},t),Mt.set(u,e),a.querySelector(l)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ol(u)))return}n=a.createElement("link"),tt(n,"link",e),$e(n),a.head.appendChild(n)}}}function w1(e,t,a){ra.S(e,t,a);var n=Bn;if(n&&e){var l=sn(n).hoistableStyles,u=Ln(e);t=t||"default";var d=l.get(u);if(!d){var m={loading:0,preload:null};if(d=n.querySelector(Ml(u)))m.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Mt.get(u))&&zc(e,a);var x=d=n.createElement("link");$e(x),tt(x,"link",e),x._p=new Promise(function(R,U){x.onload=R,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(u,d)}}}function T1(e,t){ra.X(e,t);var a=Bn;if(a&&e){var n=sn(a).hoistableScripts,l=qn(e),u=n.get(l);u||(u=a.querySelector(Ol(l)),u||(e=y({src:e,async:!0},t),(t=Mt.get(l))&&Mc(e,t),u=a.createElement("script"),$e(u),tt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(l,u))}}function _1(e,t){ra.M(e,t);var a=Bn;if(a&&e){var n=sn(a).hoistableScripts,l=qn(e),u=n.get(l);u||(u=a.querySelector(Ol(l)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Mt.get(l))&&Mc(e,t),u=a.createElement("script"),$e(u),tt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},n.set(l,u))}}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 u=sn(l).hoistableStyles,d=u.get(e);if(d||(l=l.ownerDocument||l,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=l.querySelector(Ml(e)))&&!u._p&&(d.instance=u,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),u||R1(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 R1(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),$e(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,$e(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"),$e(n),tt(n,"style",l),Pi(n,a.precedence,e),t.instance=n;case"stylesheet":l=Ln(a.href);var u=e.querySelector(Ml(l));if(u)return t.state.loading|=4,t.instance=u,$e(u),u;n=If(a),(l=Mt.get(l))&&zc(n,l),u=(e.ownerDocument||e).createElement("link"),$e(u);var d=u;return d._p=new Promise(function(m,x){d.onload=m,d.onerror=x}),tt(u,"link",n),t.state.loading|=4,Pi(u,a.precedence,e),t.instance=u;case"script":return u=qn(a.src),(l=e.querySelector(Ol(u)))?(t.instance=l,$e(l),l):(n=a,(l=Mt.get(u))&&(n=y({},a),Mc(n,l)),e=e.ownerDocument||e,l=e.createElement("script"),$e(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,u=l,d=0;d<n.length;d++){var m=n[d];if(m.dataset.precedence===t)u=m;else if(u!==l)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function zc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Mc(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 u=a[l];if(!(u[$n]||u[We]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var d=u.getAttribute(t)||"";d=e+d;var m=n.get(d);m?m.push(u):n.set(d,[u])}}return n}function th(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function A1(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 z1(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),u=t.querySelector(Ml(l));if(u){t=u._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=u,$e(u);return}u=t.ownerDocument||t,n=If(n),(l=Mt.get(l))&&zc(n,l),u=u.createElement("link"),$e(u);var d=u;d._p=new Promise(function(m,x){d.onload=m,d.onerror=x}),tt(u,"link",n),a.instance=u}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 Oc=0;function M1(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 u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Oc===0&&(Oc=62500*f1());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&nu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Oc?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(O1,e),au=null,tu.call(e))}function O1(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]"),u=0;u<l.length;u++){var d=l[u];(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"),u=a.get(d)||n,u===n&&a.set(null,l),a.set(d,l),this.count++,n=tu.bind(this),l.addEventListener("load",n),l.addEventListener("error",n),u?u.parentNode.insertBefore(l,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Ul={$$typeof:I,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function U1(e,t,a,n,l,u,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=u,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function nh(e,t,a,n,l,u,d,m,x,R,U,B){return e=new U1(e,t,a,d,x,R,U,B,m),t=1,u===!0&&(t|=24),u=vt(3,null,null,t),e.current=u,u.stateNode=e,t=fs(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:t},vs(u),e}function lh(e){return e?(e=gn,e):gn}function ih(e,t,a,n,l,u){l=lh(l),n.context===null?n.context=l:n.pendingContext=l,n=ba(t),n.payload={element:a},u=u===void 0?null:u,u!==null&&(n.callback=u),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 Uc(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),Uc(e,67108864)}}function ch(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),Uc(e,t)}}var lu=!0;function D1(e,t,a,n){var l=k.T;k.T=null;var u=Q.p;try{Q.p=2,Dc(e,t,a,n)}finally{Q.p=u,k.T=l}}function k1(e,t,a,n){var l=k.T;k.T=null;var u=Q.p;try{Q.p=8,Dc(e,t,a,n)}finally{Q.p=u,k.T=l}}function Dc(e,t,a,n){if(lu){var l=kc(n);if(l===null)jc(e,t,n,iu,a),oh(e,n);else if(B1(l,e,t,a,n))n.stopPropagation();else if(oh(e,n),t&4&&-1<H1.indexOf(e)){for(;l!==null;){var u=un(l);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var d=Ba(u.pendingLanes);if(d!==0){var m=u;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var x=1<<31-mt(d);m.entanglements[1]|=x,d&=~x}Zt(u),(xe&6)===0&&(Yi=ft()+500,_l(0))}}break;case 31:case 13:m=Va(u,2),m!==null&&dt(m,u,2),Vi(),Uc(u,2)}if(u=kc(n),u===null&&jc(e,t,n,iu,a),u===l)break;l=u}l!==null&&n.stopPropagation()}else jc(e,t,n,null,a)}}function kc(e){return e=Bu(e),Hc(e)}var iu=null;function Hc(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=b(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 rh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Sm()){case pr:return 2;case vr:return 8;case Kl:case Cm:return 32;case gr:return 268435456;default:return 32}default:return 32}}var Bc=!1,za=null,Ma=null,Oa=null,Dl=new Map,kl=new Map,Ua=[],H1="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":Dl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kl.delete(t.pointerId)}}function Hl(e,t,a,n,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:u,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 B1(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 u=l.pointerId;return Dl.set(u,Hl(Dl.get(u)||null,e,t,a,n,l)),!0;case"gotpointercapture":return u=l.pointerId,kl.set(u,Hl(kl.get(u)||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=b(a),t!==null){e.blockedOn=t,Cr(e.priority,function(){ch(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Cr(e.priority,function(){ch(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=kc(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 L1(){Bc=!1,za!==null&&uu(za)&&(za=null),Ma!==null&&uu(Ma)&&(Ma=null),Oa!==null&&uu(Oa)&&(Oa=null),Dl.forEach(fh),kl.forEach(fh)}function su(e,t){e.blockedOn===t&&(e.blockedOn=null,Bc||(Bc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,L1)))}var cu=null;function hh(e){cu!==e&&(cu=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){cu===e&&(cu=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(Hc(n||a)===null)continue;break}var u=un(a);u!==null&&(e.splice(t,3),t-=3,ks(u,{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),Dl.forEach(t),kl.forEach(t);for(var a=0;a<Ua.length;a++){var n=Ua[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Ua.length&&(a=Ua[0],a.blockedOn===null);)dh(a),a.blockedOn===null&&Ua.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var l=a[n],u=a[n+1],d=l[it]||null;if(typeof u=="function")d||hh(a);else if(d){var m=null;if(u&&u.hasAttribute("formAction")){if(l=u,d=u[it]||null)m=d.formAction;else if(Hc(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(u){u.canIntercept&&u.info==="react-transition"&&u.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 u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.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 Lc(e){this._internalRoot=e}ru.prototype.render=Lc.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)},ru.prototype.unmount=Lc.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 ru(e){this._internalRoot=e}ru.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sr();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ua.length&&t!==0&&t<Ua[a].priority;a++);Ua.splice(a,0,e),a===0&&dh(e)}};var ph=c.version;if(ph!=="19.2.5")throw Error(o(527,ph,"19.2.5"));Q.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?g(e):null,e=e===null?null:e.stateNode,e};var q1={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:k,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(q1),ht=ou}catch{}}return Ll.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,n="",l=jd,u=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&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=nh(e,1,!1,null,null,a,n,null,l,u,d,mh),e[nn]=t.current,xc(e),new Lc(t)},Ll.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var n=!1,l="",u=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&&(u=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,u,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,Kn(t,a),Zt(t),e[nn]=t.current,xc(e),new ru(t)},Ll.version="19.2.5",Ll}var Nh;function F1(){if(Nh)return Gc.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(c){console.error(c)}}return i(),Gc.exports=$1(),Gc.exports}var W1=F1();/**
|
|
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 I1(i={}){function c(o,f){var p;let h=(p=f.state)==null?void 0:p.masked,{pathname:b,search:j,hash:v}=h||o.location;return Pc("",{pathname:b,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 r(o,f){return typeof f=="string"?f:Gl(f)}return ev(c,r,null,i)}function De(i,c){if(i===!1||i===null||typeof i>"u")throw new Error(c)}function qt(i,c){if(!i){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function P1(){return Math.random().toString(36).substring(2,10)}function _h(i,c){return{usr:i.state,key:i.key,idx:c,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function Pc(i,c,r=null,o,f){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof c=="string"?Vn(c):c,state:r,key:c&&c.key||o||P1(),unstable_mask:f}}function Gl({pathname:i="/",search:c="",hash:r=""}){return c&&c!=="?"&&(i+=c.charAt(0)==="?"?c:"?"+c),r&&r!=="#"&&(i+=r.charAt(0)==="#"?r:"#"+r),i}function Vn(i){let c={};if(i){let r=i.indexOf("#");r>=0&&(c.hash=i.substring(r),i=i.substring(0,r));let o=i.indexOf("?");o>=0&&(c.search=i.substring(o),i=i.substring(0,o)),i&&(c.pathname=i)}return c}function ev(i,c,r,o={}){let{window:f=document.defaultView,v5Compat:h=!1}=o,b=f.history,j="POP",v=null,p=g();p==null&&(p=0,b.replaceState({...b.state,idx:p},""));function g(){return(b.state||{idx:null}).idx}function y(){j="POP";let Z=g(),V=Z==null?null:Z-p;p=Z,v&&v({action:j,location:q.location,delta:V})}function A(Z,V){j="PUSH";let ee=Th(Z)?Z:Pc(q.location,Z,V);p=g()+1;let I=_h(ee,p),ue=q.createHref(ee.unstable_mask||ee);try{b.pushState(I,"",ue)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;f.location.assign(ue)}h&&v&&v({action:j,location:q.location,delta:1})}function T(Z,V){j="REPLACE";let ee=Th(Z)?Z:Pc(q.location,Z,V);p=g();let I=_h(ee,p),ue=q.createHref(ee.unstable_mask||ee);b.replaceState(I,"",ue),h&&v&&v({action:j,location:q.location,delta:0})}function D(Z){return tv(Z)}let q={get action(){return j},get location(){return i(f,b)},listen(Z){if(v)throw new Error("A history only accepts one active listener");return f.addEventListener(wh,y),v=Z,()=>{f.removeEventListener(wh,y),v=null}},createHref(Z){return c(f,Z)},createURL:D,encodeLocation(Z){let V=D(Z);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:A,replace:T,go(Z){return b.go(Z)}};return q}function tv(i,c=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),De(r,"No window.location.(origin|href) available to create URL");let o=typeof i=="string"?i:Gl(i);return o=o.replace(/ $/,"%20"),!c&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Lh(i,c,r="/"){return av(i,c,r,!1)}function av(i,c,r,o){let f=typeof c=="string"?Vn(c):c,h=oa(f.pathname||"/",r);if(h==null)return null;let b=qh(i);nv(b);let j=null;for(let v=0;j==null&&v<b.length;++v){let p=mv(h);j=fv(b[v],p,o)}return j}function qh(i,c=[],r=[],o="",f=!1){let h=(b,j,v=f,p)=>{let g={relativePath:p===void 0?b.path||"":p,caseSensitive:b.caseSensitive===!0,childrenIndex:j,route:b};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(o)&&v)return;De(g.relativePath.startsWith(o),`Absolute route path "${g.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(o.length)}let y=Lt([o,g.relativePath]),A=r.concat(g);b.children&&b.children.length>0&&(De(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),qh(b.children,c,A,y,v)),!(b.path==null&&!b.index)&&c.push({path:y,score:ov(y,b.index),routesMeta:A})};return i.forEach((b,j)=>{var v;if(b.path===""||!((v=b.path)!=null&&v.includes("?")))h(b,j);else for(let p of Yh(b.path))h(b,j,!0,p)}),c}function Yh(i){let c=i.split("/");if(c.length===0)return[];let[r,...o]=c,f=r.endsWith("?"),h=r.replace(/\?$/,"");if(o.length===0)return f?[h,""]:[h];let b=Yh(o.join("/")),j=[];return j.push(...b.map(v=>v===""?h:[h,v].join("/"))),f&&j.push(...b),j.map(v=>i.startsWith("/")&&v===""?"/":v)}function nv(i){i.sort((c,r)=>c.score!==r.score?r.score-c.score:dv(c.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}var lv=/^:[\w-]+$/,iv=3,uv=2,sv=1,cv=10,rv=-2,Rh=i=>i==="*";function ov(i,c){let r=i.split("/"),o=r.length;return r.some(Rh)&&(o+=rv),c&&(o+=uv),r.filter(f=>!Rh(f)).reduce((f,h)=>f+(lv.test(h)?iv:h===""?sv:cv),o)}function dv(i,c){return i.length===c.length&&i.slice(0,-1).every((o,f)=>o===c[f])?i[i.length-1]-c[c.length-1]:0}function fv(i,c,r=!1){let{routesMeta:o}=i,f={},h="/",b=[];for(let j=0;j<o.length;++j){let v=o[j],p=j===o.length-1,g=h==="/"?c:c.slice(h.length)||"/",y=pu({path:v.relativePath,caseSensitive:v.caseSensitive,end:p},g),A=v.route;if(!y&&p&&r&&!o[o.length-1].route.index&&(y=pu({path:v.relativePath,caseSensitive:v.caseSensitive,end:!1},g)),!y)return null;Object.assign(f,y.params),b.push({params:f,pathname:Lt([h,y.pathname]),pathnameBase:yv(Lt([h,y.pathnameBase])),route:A}),y.pathnameBase!=="/"&&(h=Lt([h,y.pathnameBase]))}return b}function pu(i,c){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[r,o]=hv(i.path,i.caseSensitive,i.end),f=c.match(r);if(!f)return null;let h=f[0],b=h.replace(/(.)\/+$/,"$1"),j=f.slice(1);return{params:o.reduce((p,{paramName:g,isOptional:y},A)=>{if(g==="*"){let D=j[A]||"";b=h.slice(0,h.length-D.length).replace(/(.)\/+$/,"$1")}const T=j[A];return y&&!T?p[g]=void 0:p[g]=(T||"").replace(/%2F/g,"/"),p},{}),pathname:h,pathnameBase:b,pattern:i}}function hv(i,c=!1,r=!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,(b,j,v,p,g)=>{if(o.push({paramName:j,isOptional:v!=null}),v){let y=g.charAt(p+b.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(o.push({paramName:"*"}),f+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?f+="\\/*$":i!==""&&i!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),o]}function mv(i){try{return i.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){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 (${c}).`),i}}function oa(i,c){if(c==="/")return i;if(!i.toLowerCase().startsWith(c.toLowerCase()))return null;let r=c.endsWith("/")?c.length-1:c.length,o=i.charAt(r);return o&&o!=="/"?null:i.slice(r)||"/"}var pv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function vv(i,c="/"){let{pathname:r,search:o="",hash:f=""}=typeof i=="string"?Vn(i):i,h;return r?(r=Vh(r),r.startsWith("/")?h=Ah(r.substring(1),"/"):h=Ah(r,c)):h=c,{pathname:h,search:bv(o),hash:xv(f)}}function Ah(i,c){let r=vu(c).split("/");return i.split("/").forEach(f=>{f===".."?r.length>1&&r.pop():f!=="."&&r.push(f)}),r.length>1?r.join("/"):"/"}function Qc(i,c,r,o){return`Cannot include a '${i}' character in a manually specified \`to.${c}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gv(i){return i.filter((c,r)=>r===0||c.route.path&&c.route.path.length>0)}function Gh(i){let c=gv(i);return c.map((r,o)=>o===c.length-1?r.pathname:r.pathnameBase)}function lr(i,c,r,o=!1){let f;typeof i=="string"?f=Vn(i):(f={...i},De(!f.pathname||!f.pathname.includes("?"),Qc("?","pathname","search",f)),De(!f.pathname||!f.pathname.includes("#"),Qc("#","pathname","hash",f)),De(!f.search||!f.search.includes("#"),Qc("#","search","hash",f)));let h=i===""||f.pathname==="",b=h?"/":f.pathname,j;if(b==null)j=r;else{let y=c.length-1;if(!o&&b.startsWith("..")){let A=b.split("/");for(;A[0]==="..";)A.shift(),y-=1;f.pathname=A.join("/")}j=y>=0?c[y]:"/"}let v=vv(f,j),p=b&&b!=="/"&&b.endsWith("/"),g=(h||b===".")&&r.endsWith("/");return!v.pathname.endsWith("/")&&(p||g)&&(v.pathname+="/"),v}var Vh=i=>i.replace(/\/\/+/g,"/"),Lt=i=>Vh(i.join("/")),vu=i=>i.replace(/\/+$/,""),yv=i=>vu(i).replace(/^\/*/,"/"),bv=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,xv=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,jv=class{constructor(i,c,r,o=!1){this.status=i,this.statusText=c||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Sv(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function Cv(i){let c=i.map(r=>r.route.path).filter(Boolean);return Lt(c)||"/"}var Zh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Xh(i,c){let r=i;if(typeof r!="string"||!pv.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let o=r,f=!1;if(Zh)try{let h=new URL(window.location.href),b=r.startsWith("//")?new URL(h.protocol+r):new URL(r),j=oa(b.pathname,c);b.origin===h.origin&&j!=null?r=j+b.search+b.hash:f=!0}catch{qt(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Qh=["POST","PUT","PATCH","DELETE"];new Set(Qh);var Ev=["GET",...Qh];new Set(Ev);var Zn=S.createContext(null);Zn.displayName="DataRouter";var bu=S.createContext(null);bu.displayName="DataRouterState";var Jh=S.createContext(!1);function Nv(){return S.useContext(Jh)}var Kh=S.createContext({isTransitioning:!1});Kh.displayName="ViewTransition";var wv=S.createContext(new Map);wv.displayName="Fetchers";var Tv=S.createContext(null);Tv.displayName="Await";var Ut=S.createContext(null);Ut.displayName="Navigation";var Zl=S.createContext(null);Zl.displayName="Location";var Xt=S.createContext({outlet:null,matches:[],isDataRoute:!1});Xt.displayName="Route";var ir=S.createContext(null);ir.displayName="RouteError";var $h="REACT_ROUTER_ERROR",_v="REDIRECT",Rv="ROUTE_ERROR_RESPONSE";function Av(i){if(i.startsWith(`${$h}:${_v}:{`))try{let c=JSON.parse(i.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function zv(i){if(i.startsWith(`${$h}:${Rv}:{`))try{let c=JSON.parse(i.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new jv(c.status,c.statusText,c.data)}catch{}}function Mv(i,{relative:c}={}){De(Xl(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:o}=S.useContext(Ut),{hash:f,pathname:h,search:b}=Ql(i,{relative:c}),j=h;return r!=="/"&&(j=h==="/"?r:Lt([r,h])),o.createHref({pathname:j,search:b,hash:f})}function Xl(){return S.useContext(Zl)!=null}function Dt(){return De(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(Ut).static||S.useLayoutEffect(i)}function ur(){let{isDataRoute:i}=S.useContext(Xt);return i?Xv():Ov()}function Ov(){De(Xl(),"useNavigate() may be used only in the context of a <Router> component.");let i=S.useContext(Zn),{basename:c,navigator:r}=S.useContext(Ut),{matches:o}=S.useContext(Xt),{pathname:f}=Dt(),h=JSON.stringify(Gh(o)),b=S.useRef(!1);return Wh(()=>{b.current=!0}),S.useCallback((v,p={})=>{if(qt(b.current,Fh),!b.current)return;if(typeof v=="number"){r.go(v);return}let g=lr(v,JSON.parse(h),f,p.relative==="path");i==null&&c!=="/"&&(g.pathname=g.pathname==="/"?c:Lt([c,g.pathname])),(p.replace?r.replace:r.push)(g,p.state,p)},[c,r,h,f,i])}S.createContext(null);function Ih(){let{matches:i}=S.useContext(Xt),c=i[i.length-1];return(c==null?void 0:c.params)??{}}function Ql(i,{relative:c}={}){let{matches:r}=S.useContext(Xt),{pathname:o}=Dt(),f=JSON.stringify(Gh(r));return S.useMemo(()=>lr(i,JSON.parse(f),o,c==="path"),[i,f,o,c])}function Uv(i,c){return Ph(i,c)}function Ph(i,c,r){var Z;De(Xl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(Ut),{matches:f}=S.useContext(Xt),h=f[f.length-1],b=h?h.params:{},j=h?h.pathname:"/",v=h?h.pathnameBase:"/",p=h&&h.route;{let V=p&&p.path||"";tm(j,!p||V.endsWith("*")||V.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${j}" (under <Route path="${V}">) 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="${V}"> to <Route path="${V==="/"?"*":`${V}/*`}">.`)}let g=Dt(),y;if(c){let V=typeof c=="string"?Vn(c):c;De(v==="/"||((Z=V.pathname)==null?void 0:Z.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 "${V.pathname}" was given in the \`location\` prop.`),y=V}else y=g;let A=y.pathname||"/",T=A;if(v!=="/"){let V=v.replace(/^\//,"").split("/");T="/"+A.replace(/^\//,"").split("/").slice(V.length).join("/")}let D=Lh(i,{pathname:T});qt(p||D!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),qt(D==null||D[D.length-1].route.element!==void 0||D[D.length-1].route.Component!==void 0||D[D.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 q=Lv(D&&D.map(V=>Object.assign({},V,{params:Object.assign({},b,V.params),pathname:Lt([v,o.encodeLocation?o.encodeLocation(V.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:V.pathname]),pathnameBase:V.pathnameBase==="/"?v:Lt([v,o.encodeLocation?o.encodeLocation(V.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:V.pathnameBase])})),f,r);return c&&q?S.createElement(Zl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...y},navigationType:"POP"}},q):q}function Dv(){let i=Zv(),c=Sv(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),r=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},b=null;return console.error("Error handled by React Router default ErrorBoundary:",i),b=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"}},c),r?S.createElement("pre",{style:f},r):null,b)}var kv=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,c){return c.location!==i.location||c.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:c.error,location:c.location,revalidation:i.revalidation||c.revalidation}}componentDidCatch(i,c){this.props.onError?this.props.onError(i,c):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 r=zv(i.digest);r&&(i=r)}let c=i!==void 0?S.createElement(Xt.Provider,{value:this.props.routeContext},S.createElement(ir.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?S.createElement(Hv,{error:i},c):c}};em.contextType=Jh;var Jc=new WeakMap;function Hv({children:i,error:c}){let{basename:r}=S.useContext(Ut);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let o=Av(c.digest);if(o){let f=Jc.get(c);if(f)throw f;let h=Xh(o.location,r);if(Zh&&!Jc.get(c))if(h.isExternal||o.reloadDocument)window.location.href=h.absoluteURL||h.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(h.to,{replace:o.replace}));throw Jc.set(c,b),b}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h.absoluteURL||h.to}`})}}return i}function Bv({routeContext:i,match:c,children:r}){let o=S.useContext(Zn);return o&&o.static&&o.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=c.route.id),S.createElement(Xt.Provider,{value:i},r)}function Lv(i,c=[],r){let o=r==null?void 0:r.state;if(i==null){if(!o)return null;if(o.errors)i=o.matches;else if(c.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 g=f.findIndex(y=>y.route.id&&(h==null?void 0:h[y.route.id])!==void 0);De(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,g+1))}let b=!1,j=-1;if(r&&o){b=o.renderFallback;for(let g=0;g<f.length;g++){let y=f[g];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(j=g),y.route.id){let{loaderData:A,errors:T}=o,D=y.route.loader&&!A.hasOwnProperty(y.route.id)&&(!T||T[y.route.id]===void 0);if(y.route.lazy||D){r.isStatic&&(b=!0),j>=0?f=f.slice(0,j+1):f=[f[0]];break}}}}let v=r==null?void 0:r.onError,p=o&&v?(g,y)=>{var A,T;v(g,{location:o.location,params:((T=(A=o.matches)==null?void 0:A[0])==null?void 0:T.params)??{},unstable_pattern:Cv(o.matches),errorInfo:y})}:void 0;return f.reduceRight((g,y,A)=>{let T,D=!1,q=null,Z=null;o&&(T=h&&y.route.id?h[y.route.id]:void 0,q=y.route.errorElement||kv,b&&(j<0&&A===0?(tm("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,Z=null):j===A&&(D=!0,Z=y.route.hydrateFallbackElement||null)));let V=c.concat(f.slice(0,A+1)),ee=()=>{let I;return T?I=q:D?I=Z:y.route.Component?I=S.createElement(y.route.Component,null):y.route.element?I=y.route.element:I=g,S.createElement(Bv,{match:y,routeContext:{outlet:g,matches:V,isDataRoute:o!=null},children:I})};return o&&(y.route.ErrorBoundary||y.route.errorElement||A===0)?S.createElement(em,{location:o.location,revalidation:o.revalidation,component:q,error:T,children:ee(),routeContext:{outlet:null,matches:V,isDataRoute:!0},onError:p}):ee()},null)}function sr(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function qv(i){let c=S.useContext(Zn);return De(c,sr(i)),c}function Yv(i){let c=S.useContext(bu);return De(c,sr(i)),c}function Gv(i){let c=S.useContext(Xt);return De(c,sr(i)),c}function cr(i){let c=Gv(i),r=c.matches[c.matches.length-1];return De(r.route.id,`${i} can only be used on routes that contain a unique "id"`),r.route.id}function Vv(){return cr("useRouteId")}function Zv(){var o;let i=S.useContext(ir),c=Yv("useRouteError"),r=cr("useRouteError");return i!==void 0?i:(o=c.errors)==null?void 0:o[r]}function Xv(){let{router:i}=qv("useNavigate"),c=cr("useNavigate"),r=S.useRef(!1);return Wh(()=>{r.current=!0}),S.useCallback(async(f,h={})=>{qt(r.current,Fh),r.current&&(typeof f=="number"?await i.navigate(f):await i.navigate(f,{fromRouteId:c,...h}))},[i,c])}var zh={};function tm(i,c,r){!c&&!zh[i]&&(zh[i]=!0,qt(!1,r))}S.memo(Qv);function Qv({routes:i,future:c,state:r,isStatic:o,onError:f}){return Ph(i,void 0,{state:r,isStatic:o,onError:f})}function Ot(i){De(!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:c=null,location:r,navigationType:o="POP",navigator:f,static:h=!1,unstable_useTransitions:b}){De(!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:b,future:{}}),[j,f,h,b]);typeof r=="string"&&(r=Vn(r));let{pathname:p="/",search:g="",hash:y="",state:A=null,key:T="default",unstable_mask:D}=r,q=S.useMemo(()=>{let Z=oa(p,j);return Z==null?null:{location:{pathname:Z,search:g,hash:y,state:A,key:T,unstable_mask:D},navigationType:o}},[j,p,g,y,A,T,o,D]);return qt(q!=null,`<Router basename="${j}"> is not able to match the URL "${p}${g}${y}" because it does not start with the basename, so the <Router> won't render anything.`),q==null?null:S.createElement(Ut.Provider,{value:v},S.createElement(Zl.Provider,{children:c,value:q}))}function Kv({children:i,location:c}){return Uv(er(i),c)}function er(i,c=[]){let r=[];return S.Children.forEach(i,(o,f)=>{if(!S.isValidElement(o))return;let h=[...c,f];if(o.type===S.Fragment){r.push.apply(r,er(o.props.children,h));return}De(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>`),De(!o.props.index||!o.props.children,"An index route cannot have child routes.");let b={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&&(b.children=er(o.props.children,h)),r.push(b)}),r}var hu="get",mu="application/x-www-form-urlencoded";function xu(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function $v(i){return xu(i)&&i.tagName.toLowerCase()==="button"}function Fv(i){return xu(i)&&i.tagName.toLowerCase()==="form"}function Wv(i){return xu(i)&&i.tagName.toLowerCase()==="input"}function Iv(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function Pv(i,c){return i.button===0&&(!c||c==="_self")&&!Iv(i)}function tr(i=""){return new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((c,r)=>{let o=i[r];return c.concat(Array.isArray(o)?o.map(f=>[r,f]):[[r,o]])},[]))}function e0(i,c){let r=tr(i);return c&&c.forEach((o,f)=>{r.has(f)||c.getAll(f).forEach(h=>{r.append(f,h)})}),r}var du=null;function t0(){if(du===null)try{new FormData(document.createElement("form"),0),du=!1}catch{du=!0}return du}var a0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kc(i){return i!=null&&!a0.has(i)?(qt(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${mu}"`),null):i}function n0(i,c){let r,o,f,h,b;if(Fv(i)){let j=i.getAttribute("action");o=j?oa(j,c):null,r=i.getAttribute("method")||hu,f=Kc(i.getAttribute("enctype"))||mu,h=new FormData(i)}else if($v(i)||Wv(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,c):null,r=i.getAttribute("formmethod")||j.getAttribute("method")||hu,f=Kc(i.getAttribute("formenctype"))||Kc(j.getAttribute("enctype"))||mu,h=new FormData(j,i),!t0()){let{name:p,type:g,value:y}=i;if(g==="image"){let A=p?`${p}.`:"";h.append(`${A}x`,"0"),h.append(`${A}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">');r=hu,o=null,f=mu,b=i}return h&&f==="text/plain"&&(b=h,h=void 0),{action:o,method:r.toLowerCase(),encType:f,formData:h,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rr(i,c){if(i===!1||i===null||typeof i>"u")throw new Error(c)}function am(i,c,r,o){let f=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return r?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:c&&oa(f.pathname,c)==="/"?f.pathname=`${vu(c)}/_root.${o}`:f.pathname=`${vu(f.pathname)}.${o}`,f}async function l0(i,c){if(i.id in c)return c[i.id];try{let r=await import(i.module);return c[i.id]=r,r}catch(r){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function i0(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 u0(i,c,r){let o=await Promise.all(i.map(async f=>{let h=c.routes[f.route.id];if(h){let b=await l0(h,r);return b.links?b.links():[]}return[]}));return o0(o.flat(1).filter(i0).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Mh(i,c,r,o,f,h){let b=(v,p)=>r[p]?v.route.id!==r[p].route.id:!0,j=(v,p)=>{var g;return r[p].pathname!==v.pathname||((g=r[p].route.path)==null?void 0:g.endsWith("*"))&&r[p].params["*"]!==v.params["*"]};return h==="assets"?c.filter((v,p)=>b(v,p)||j(v,p)):h==="data"?c.filter((v,p)=>{var y;let g=o.routes[v.route.id];if(!g||!g.hasLoader)return!1;if(b(v,p)||j(v,p))return!0;if(v.route.shouldRevalidate){let A=v.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((y=r[0])==null?void 0:y.params)||{},nextUrl:new URL(i,window.origin),nextParams:v.params,defaultShouldRevalidate:!0});if(typeof A=="boolean")return A}return!0}):[]}function s0(i,c,{includeHydrateFallback:r}={}){return c0(i.map(o=>{let f=c.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)),r&&f.hydrateFallbackModule&&(h=h.concat(f.hydrateFallbackModule)),f.imports&&(h=h.concat(f.imports)),h}).flat(1))}function c0(i){return[...new Set(i)]}function r0(i){let c={},r=Object.keys(i).sort();for(let o of r)c[o]=i[o];return c}function o0(i,c){let r=new Set;return new Set(c),i.reduce((o,f)=>{let h=JSON.stringify(r0(f));return r.has(h)||(r.add(h),o.push({key:h,link:f})),o},[])}function or(){let i=S.useContext(Zn);return rr(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function d0(){let i=S.useContext(bu);return rr(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var dr=S.createContext(void 0);dr.displayName="FrameworkContext";function fr(){let i=S.useContext(dr);return rr(i,"You must render this element inside a <HydratedRouter> element"),i}function f0(i,c){let r=S.useContext(dr),[o,f]=S.useState(!1),[h,b]=S.useState(!1),{onFocus:j,onBlur:v,onMouseEnter:p,onMouseLeave:g,onTouchStart:y}=c,A=S.useRef(null);S.useEffect(()=>{if(i==="render"&&b(!0),i==="viewport"){let q=V=>{V.forEach(ee=>{b(ee.isIntersecting)})},Z=new IntersectionObserver(q,{threshold:.5});return A.current&&Z.observe(A.current),()=>{Z.disconnect()}}},[i]),S.useEffect(()=>{if(o){let q=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(q)}}},[o]);let T=()=>{f(!0)},D=()=>{f(!1),b(!1)};return r?i!=="intent"?[h,A,{}]:[h,A,{onFocus:ql(j,T),onBlur:ql(v,D),onMouseEnter:ql(p,T),onMouseLeave:ql(g,D),onTouchStart:ql(y,T)}]:[!1,A,{}]}function ql(i,c){return r=>{i&&i(r),r.defaultPrevented||c(r)}}function h0({page:i,...c}){let r=Nv(),{router:o}=or(),f=S.useMemo(()=>Lh(o.routes,i,o.basename),[o.routes,i,o.basename]);return f?r?S.createElement(p0,{page:i,matches:f,...c}):S.createElement(v0,{page:i,matches:f,...c}):null}function m0(i){let{manifest:c,routeModules:r}=fr(),[o,f]=S.useState([]);return S.useEffect(()=>{let h=!1;return u0(i,c,r).then(b=>{h||f(b)}),()=>{h=!0}},[i,c,r]),o}function p0({page:i,matches:c,...r}){let o=Dt(),{future:f}=fr(),{basename:h}=or(),b=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 g of c)typeof g.route.shouldRevalidate=="function"?v=!0:p.push(g.route.id);return v&&p.length>0&&j.searchParams.set("_routes",p.join(",")),[j.pathname+j.search]},[h,f.unstable_trailingSlashAwareDataRequests,i,o,c]);return S.createElement(S.Fragment,null,b.map(j=>S.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...r})))}function v0({page:i,matches:c,...r}){let o=Dt(),{future:f,manifest:h,routeModules:b}=fr(),{basename:j}=or(),{loaderData:v,matches:p}=d0(),g=S.useMemo(()=>Mh(i,c,p,h,o,"data"),[i,c,p,h,o]),y=S.useMemo(()=>Mh(i,c,p,h,o,"assets"),[i,c,p,h,o]),A=S.useMemo(()=>{if(i===o.pathname+o.search+o.hash)return[];let q=new Set,Z=!1;if(c.forEach(ee=>{var ue;let I=h.routes[ee.route.id];!I||!I.hasLoader||(!g.some(K=>K.route.id===ee.route.id)&&ee.route.id in v&&((ue=b[ee.route.id])!=null&&ue.shouldRevalidate)||I.hasClientLoader?Z=!0:q.add(ee.route.id))}),q.size===0)return[];let V=am(i,j,f.unstable_trailingSlashAwareDataRequests,"data");return Z&&q.size>0&&V.searchParams.set("_routes",c.filter(ee=>q.has(ee.route.id)).map(ee=>ee.route.id).join(",")),[V.pathname+V.search]},[j,f.unstable_trailingSlashAwareDataRequests,v,o,h,g,c,i,b]),T=S.useMemo(()=>s0(y,h),[y,h]),D=m0(y);return S.createElement(S.Fragment,null,A.map(q=>S.createElement("link",{key:q,rel:"prefetch",as:"fetch",href:q,...r})),T.map(q=>S.createElement("link",{key:q,rel:"modulepreload",href:q,...r})),D.map(({key:q,link:Z})=>S.createElement("link",{key:q,nonce:r.nonce,...Z,crossOrigin:Z.crossOrigin??r.crossOrigin})))}function g0(...i){return c=>{i.forEach(r=>{typeof r=="function"?r(c):r!=null&&(r.current=c)})}}var y0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{y0&&(window.__reactRouterVersion="7.14.2")}catch{}function b0({basename:i,children:c,unstable_useTransitions:r,window:o}){let f=S.useRef();f.current==null&&(f.current=I1({window:o,v5Compat:!0}));let h=f.current,[b,j]=S.useState({action:h.action,location:h.location}),v=S.useCallback(p=>{r===!1?j(p):S.startTransition(()=>j(p))},[r]);return S.useLayoutEffect(()=>h.listen(v),[h,v]),S.createElement(Jv,{basename:i,children:c,location:b.location,navigationType:b.action,navigator:h,unstable_useTransitions:r})}var nm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ke=S.forwardRef(function({onClick:c,discover:r="render",prefetch:o="none",relative:f,reloadDocument:h,replace:b,unstable_mask:j,state:v,target:p,to:g,preventScrollReset:y,viewTransition:A,unstable_defaultShouldRevalidate:T,...D},q){let{basename:Z,navigator:V,unstable_useTransitions:ee}=S.useContext(Ut),I=typeof g=="string"&&nm.test(g),ue=Xh(g,Z);g=ue.to;let K=Mv(g,{relative:f}),Y=Dt(),C=null;if(j){let Ye=lr(j,[],Y.unstable_mask?Y.unstable_mask.pathname:"/",!0);Z!=="/"&&(Ye.pathname=Ye.pathname==="/"?Z:Lt([Z,Ye.pathname])),C=V.createHref(Ye)}let[O,G,ve]=f0(o,D),te=C0(g,{replace:b,unstable_mask:j,state:v,target:p,preventScrollReset:y,relative:f,viewTransition:A,unstable_defaultShouldRevalidate:T,unstable_useTransitions:ee});function he(Ye){c&&c(Ye),Ye.defaultPrevented||te(Ye)}let Qe=!(ue.isExternal||h),St=S.createElement("a",{...D,...ve,href:(Qe?C:void 0)||ue.absoluteURL||K,onClick:Qe?he:c,ref:g0(q,G),target:p,"data-discover":!I&&r==="render"?"true":void 0});return O&&!I?S.createElement(S.Fragment,null,St,S.createElement(h0,{page:K})):St});Ke.displayName="Link";var x0=S.forwardRef(function({"aria-current":c="page",caseSensitive:r=!1,className:o="",end:f=!1,style:h,to:b,viewTransition:j,children:v,...p},g){let y=Ql(b,{relative:p.relative}),A=Dt(),T=S.useContext(bu),{navigator:D,basename:q}=S.useContext(Ut),Z=T!=null&&_0(y)&&j===!0,V=D.encodeLocation?D.encodeLocation(y).pathname:y.pathname,ee=A.pathname,I=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;r||(ee=ee.toLowerCase(),I=I?I.toLowerCase():null,V=V.toLowerCase()),I&&q&&(I=oa(I,q)||I);const ue=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let K=ee===V||!f&&ee.startsWith(V)&&ee.charAt(ue)==="/",Y=I!=null&&(I===V||!f&&I.startsWith(V)&&I.charAt(V.length)==="/"),C={isActive:K,isPending:Y,isTransitioning:Z},O=K?c:void 0,G;typeof o=="function"?G=o(C):G=[o,K?"active":null,Y?"pending":null,Z?"transitioning":null].filter(Boolean).join(" ");let ve=typeof h=="function"?h(C):h;return S.createElement(Ke,{...p,"aria-current":O,className:G,ref:g,style:ve,to:b,viewTransition:j},typeof v=="function"?v(C):v)});x0.displayName="NavLink";var j0=S.forwardRef(({discover:i="render",fetcherKey:c,navigate:r,reloadDocument:o,replace:f,state:h,method:b=hu,action:j,onSubmit:v,relative:p,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:A,...T},D)=>{let{unstable_useTransitions:q}=S.useContext(Ut),Z=w0(),V=T0(j,{relative:p}),ee=b.toLowerCase()==="get"?"get":"post",I=typeof j=="string"&&nm.test(j),ue=K=>{if(v&&v(K),K.defaultPrevented)return;K.preventDefault();let Y=K.nativeEvent.submitter,C=(Y==null?void 0:Y.getAttribute("formmethod"))||b,O=()=>Z(Y||K.currentTarget,{fetcherKey:c,method:C,navigate:r,replace:f,state:h,relative:p,preventScrollReset:g,viewTransition:y,unstable_defaultShouldRevalidate:A});q&&r!==!1?S.startTransition(()=>O()):O()};return S.createElement("form",{ref:D,method:ee,action:V,onSubmit:o?v:ue,...T,"data-discover":!I&&i==="render"?"true":void 0})});j0.displayName="Form";function S0(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lm(i){let c=S.useContext(Zn);return De(c,S0(i)),c}function C0(i,{target:c,replace:r,unstable_mask:o,state:f,preventScrollReset:h,relative:b,viewTransition:j,unstable_defaultShouldRevalidate:v,unstable_useTransitions:p}={}){let g=ur(),y=Dt(),A=Ql(i,{relative:b});return S.useCallback(T=>{if(Pv(T,c)){T.preventDefault();let D=r!==void 0?r:Gl(y)===Gl(A),q=()=>g(i,{replace:D,unstable_mask:o,state:f,preventScrollReset:h,relative:b,viewTransition:j,unstable_defaultShouldRevalidate:v});p?S.startTransition(()=>q()):q()}},[y,g,A,r,o,f,c,i,h,b,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 c=S.useRef(tr(i)),r=S.useRef(!1),o=Dt(),f=S.useMemo(()=>e0(o.search,r.current?null:c.current),[o.search]),h=ur(),b=S.useCallback((j,v)=>{const p=tr(typeof j=="function"?j(new URLSearchParams(f)):j);r.current=!0,h("?"+p,v)},[h,f]);return[f,b]}var E0=0,N0=()=>`__${String(++E0)}__`;function w0(){let{router:i}=lm("useSubmit"),{basename:c}=S.useContext(Ut),r=Vv(),o=i.fetch,f=i.navigate;return S.useCallback(async(h,b={})=>{let{action:j,method:v,encType:p,formData:g,body:y}=n0(h,c);if(b.navigate===!1){let A=b.fetcherKey||N0();await o(A,r,b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:g,body:y,formMethod:b.method||v,formEncType:b.encType||p,flushSync:b.flushSync})}else await f(b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:g,body:y,formMethod:b.method||v,formEncType:b.encType||p,replace:b.replace,state:b.state,fromRouteId:r,flushSync:b.flushSync,viewTransition:b.viewTransition})},[o,f,c,r])}function T0(i,{relative:c}={}){let{basename:r}=S.useContext(Ut),o=S.useContext(Xt);De(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),h={...Ql(i||".",{relative:c})},b=Dt();if(i==null){h.search=b.search;let j=new URLSearchParams(h.search),v=j.getAll("index");if(v.some(g=>g==="")){j.delete("index"),v.filter(y=>y).forEach(y=>j.append("index",y));let g=j.toString();h.search=g?`?${g}`:""}}return(!i||i===".")&&f.route.index&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(h.pathname=h.pathname==="/"?r:Lt([r,h.pathname])),Gl(h)}function _0(i,{relative:c}={}){let r=S.useContext(Kh);De(r!=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:c});if(!r.isTransitioning)return!1;let h=oa(r.currentLocation.pathname,o)||r.currentLocation.pathname,b=oa(r.nextLocation.pathname,o)||r.nextLocation.pathname;return pu(f.pathname,b)!=null||pu(f.pathname,h)!=null}const R0='<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 A0({size:i=20,idSuffix:c,className:r}){const o=`pc-brand-mark-clip-${c}`;return s.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:r,dangerouslySetInnerHTML:{__html:`<g clip-path="url(#${o})">${R0}</g><defs><clipPath id="${o}"><rect width="24" height="24" fill="white"/></clipPath></defs>`}})}const um="Parachute";let an=null,Yl=null;const z0=3e4;function M0(){return"/admin/host-admin-token"}function O0(){const i=`${window.location.pathname}${window.location.search}`;return`/login?next=${encodeURIComponent(i)}`}function sm(){return window.location.replace(O0()),new Promise(()=>{})}function U0(){return window.location.replace("/account/"),new Promise(()=>{})}async function ze(){const i=Date.now();return an&&an.expiresAt-i>z0?an.token:Yl||(Yl=D0().finally(()=>{Yl=null}),Yl)}async function D0(){const i=await fetch(M0(),{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(i.status===401)return an=null,sm();if(i.status===403)return an=null,U0();if(!i.ok)throw new Error(`/admin/host-admin-token failed: ${i.status} ${await i.text()}`);const c=await i.json();if(!c.token||!c.expires_at)throw new Error("/admin/host-admin-token returned malformed body");return an={token:c.token,expiresAt:new Date(c.expires_at).getTime()},c.token}function Ee(){an=null}class X extends Error{constructor(c,r){super(r),this.status=c,this.name="HttpError"}}async function k0(){const i=await fetch("/.well-known/parachute.json",{headers:{accept:"application/json"}});if(!i.ok)throw new X(i.status,`well-known fetch failed: ${i.status}`);const c=await i.json(),r=c.vaults??[],o=c.services??[];return{moduleInstalled:o.some(h=>h.name==="parachute-vault"||h.name.startsWith("parachute-vault-")),vaults:r.map(h=>{const b={name:h.name,url:h.url,version:h.version,path:H0(h.name,h.url,o)};return h.managementUrl&&(b.managementUrl=h.managementUrl),b})}}function H0(i,c,r){const o=r.find(f=>f.name===`parachute-vault-${i}`||f.path===`/vault/${i}`);if(o)return o.path;try{return new URL(c).pathname}catch{return`/vault/${i}`}}async function B0(i){const c=await ze(),r=await fetch("/vaults",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify(i)});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));const o=r.status===201,f=await r.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 L0(i){const c=await fetch(`/admin/vault-admin-token/${encodeURIComponent(i)}`,{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(c.status===401)return sm();if(!c.ok)throw new X(c.status,await W(c));const r=await c.json();if(!r.token||!r.expires_at)throw new X(500,"/admin/vault-admin-token returned malformed body");return{token:r.token,expiresAt:r.expires_at,scopes:r.scopes??[]}}async function q0(i={}){const c=await ze(),r=i.vault?`?vault=${encodeURIComponent(i.vault)}`:"",o=await fetch(`/api/grants${r}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${c}`}});if(o.status===401||o.status===403)throw Ee(),new X(o.status,await W(o));if(!o.ok)throw new X(o.status,await W(o));return(await o.json()).grants??[]}async function Y0(i){const c=await ze(),r=await fetch(`/api/grants/${encodeURIComponent(i)}`,{method:"DELETE",headers:{authorization:`Bearer ${c}`}});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r))}async function G0(){const i=await fetch("/api/me",{method:"GET",headers:{accept:"application/json"},credentials:"same-origin"});if(!i.ok)throw new X(i.status,await W(i));return await i.json()}async function V0(i){const c=new URLSearchParams({__csrf:i}),r=await fetch("/logout",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded",accept:"text/html, application/json"},credentials:"same-origin",body:c,redirect:"manual"});if(!(r.status===0||r.ok||r.status===302))throw new X(r.status,await W(r))}function Z0(i,c){if(/^https?:\/\//i.test(c))return c;const r=i.replace(/\/+$/,""),o=c.startsWith("/")?c:`/${c}`;return`${r}${o}`}async function Oh(i={}){const c=new URLSearchParams;i.revoked&&c.set("revoked",i.revoked),i.subject&&c.set("subject",i.subject),i.createdVia&&c.set("created_via",i.createdVia),i.cursor&&c.set("cursor",i.cursor);const r=c.toString(),o=r?`/api/auth/tokens?${r}`:"/api/auth/tokens",f=await ze(),h=await fetch(o,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${f}`}});if(h.status===401||h.status===403)throw Ee(),new X(h.status,await W(h));if(!h.ok)throw new X(h.status,await W(h));return await h.json()}async function cm(i){const c=await ze(),r=await fetch("/api/auth/mint-token",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify(i)});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));return await r.json()}async function X0(i){const c=await ze(),r=await fetch("/api/auth/revoke-token",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({jti:i})});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));return await r.json()}async function Q0(i){const c=await ze(),r=await fetch(`/api/oauth/clients/${encodeURIComponent(i)}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${c}`}});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));return await r.json()}async function J0(i,c){const o={method:"POST",headers:{accept:"application/json",authorization:`Bearer ${await ze()}`}};c!==void 0&&(o.headers={...o.headers,"content-type":"application/json"},o.body=JSON.stringify({return_to:c}));const f=await fetch(`/api/oauth/clients/${encodeURIComponent(i)}/approve`,o);if(f.status===401||f.status===403)throw Ee(),new X(f.status,await W(f));if(!f.ok)throw new X(f.status,await W(f));return await f.json()}async function rm(){const i=await ze(),c=await fetch("/api/modules",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return await c.json()}async function ju(i,c){const r=await ze();return await fetch(`/api/modules/${encodeURIComponent(i)}/${c}`,{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${r}`}})}async function K0(i){const c=await ju(i,"install");if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return(await c.json()).operation_id}async function $0(i){const c=await ju(i,"upgrade");if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return(await c.json()).operation_id}async function F0(i){const c=await ju(i,"restart");if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return await c.json()}async function W0(i){const c=await ju(i,"uninstall");if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return await c.json()}async function I0(i){const c=await ze(),r=await fetch("/api/modules/channel",{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({channel:i})});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));return(await r.json()).channel}async function om(){const i=await ze(),c=await fetch("/api/settings/hub-origin",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return await c.json()}async function Uh(i){const c=await ze(),r=await fetch("/api/settings/hub-origin",{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify({hub_origin:i})});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));return(await r.json()).hub_origin}async function P0(i){const c=await ze(),r=await fetch(`/api/modules/${encodeURIComponent(i)}/config/schema`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${c}`}});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(r.status===404){let o;try{o=(await r.clone().json()).error}catch{}if(o==="no_config_schema")return null;throw new X(404,await W(r))}if(!r.ok)throw new X(r.status,await W(r));return await r.json()}async function eg(i){const c=await ze(),r=await fetch(`/api/modules/${encodeURIComponent(i)}/config`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${c}`}});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(r.status===404)return{};if(!r.ok)throw new X(r.status,await W(r));return await r.json()}async function tg(i,c){const r=await ze(),o=await fetch(`/api/modules/${encodeURIComponent(i)}/config`,{method:"PUT",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify(c)});if(o.status===401||o.status===403)throw Ee(),new X(o.status,await W(o));if(!o.ok)throw new X(o.status,await W(o));return await o.json()}async function ag(i){const c=await ze(),r=await fetch(`/api/modules/operations/${encodeURIComponent(i)}`,{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${c}`}});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));return await r.json()}async function ng(){const i=await ze(),c=await fetch("/api/users",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return(await c.json()).users??[]}async function lg(i){const c=await ze(),r=await fetch("/api/users",{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${c}`},body:JSON.stringify(i)});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));return(await r.json()).user}async function ig(i){const c=await ze(),r=await fetch(`/api/users/${encodeURIComponent(i)}`,{method:"DELETE",headers:{authorization:`Bearer ${c}`}});if(r.status===401||r.status===403)throw r.status===401&&Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));const o=await r.json().catch(()=>({}));return{revocationLagSeconds:typeof o.revocation_lag_seconds=="number"?o.revocation_lag_seconds:60}}async function ug(i,c){const r=await ze(),o=await fetch(`/api/users/${encodeURIComponent(i)}/reset-password`,{method:"POST",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({new_password:c})});if(o.status===401||o.status===403)throw o.status===401&&Ee(),new X(o.status,await W(o));if(!o.ok)throw new X(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 sg(i,c){const r=await ze(),o=await fetch(`/api/users/${encodeURIComponent(i)}/vaults`,{method:"PATCH",headers:{"content-type":"application/json",accept:"application/json",authorization:`Bearer ${r}`},body:JSON.stringify({assigned_vaults:c})});if(o.status===401||o.status===403)throw o.status===401&&Ee(),new X(o.status,await W(o));if(!o.ok)throw new X(o.status,await W(o))}async function cg(){const i=await ze(),c=await fetch("/api/users/vaults",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return(await c.json()).vaults??[]}async function ar(){const i=await ze(),c=await fetch("/api/hub",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return await c.json()}async function rg(i){const c=await ze(),r=await fetch("/api/hub/upgrade",{method:"POST",headers:{accept:"application/json",authorization:`Bearer ${c}`}});if(r.status===401||r.status===403)throw Ee(),new X(r.status,await W(r));if(!r.ok)throw new X(r.status,await W(r));return await r.json()}async function og(){const i=await ze(),c=await fetch("/api/hub/upgrade/status",{method:"GET",headers:{accept:"application/json",authorization:`Bearer ${i}`}});if(c.status===404)return null;if(c.status===401||c.status===403)throw Ee(),new X(c.status,await W(c));if(!c.ok)throw new X(c.status,await W(c));return await c.json()}async function W(i){try{const c=await i.text(),r=JSON.parse(c);if(r.error_description)return r.error_description;if(r.error)return r.error;if(c)return c}catch{}return`${i.status} ${i.statusText}`}const dg=3e4;function Dh(i){const c=Math.max(0,i),r=Math.floor(c/1e3);if(r<60)return`${r}s`;const o=Math.floor(r/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 $c(i){const c=new Date(i);if(Number.isNaN(c.getTime()))return i;const r=o=>String(o).padStart(2,"0");return`${c.getUTCFullYear()}-${r(c.getUTCMonth()+1)}-${r(c.getUTCDate())} ${r(c.getUTCHours())}:${r(c.getUTCMinutes())}:${r(c.getUTCSeconds())} UTC`}function fg(i){var c;if(i.source==="container")return"container";if(i.source==="npm")return"npm";if(i.source==="bun-linked"){const r=(c=i.bun_linked_path)==null?void 0:c.split("/").filter(Boolean).pop();return r&&i.git_head?`bun-linked → ${r} @ ${i.git_head}`:r?`bun-linked → ${r}`:"bun-linked"}return"unknown"}function hg(){const[i,c]=S.useState(null),[r,o]=S.useState(!1),[f,h]=S.useState(!1),[b,j]=S.useState(null),v=S.useCallback(async()=>{h(!0);try{const p=await ar();c(p),j(new Date)}catch{}finally{h(!1)}},[]);return S.useEffect(()=>{v()},[v]),S.useEffect(()=>{const p=()=>{v()};window.addEventListener("focus",p);const g=window.setInterval(()=>{v()},dg);return()=>{window.removeEventListener("focus",p),window.clearInterval(g)}},[v]),i?s.jsxs("footer",{className:"hub-version-badge","data-testid":"hub-version-badge",children:[s.jsxs("button",{type:"button",className:"hub-version-badge-summary",onClick:()=>o(p=>!p),"aria-expanded":r,"data-testid":"hub-version-badge-summary",children:["Hub ",s.jsx("strong",{children:i.version})," · running"," ",s.jsx("span",{"data-testid":"hub-version-badge-uptime",children:Dh(i.uptime_ms)})," ·"," ",s.jsx("span",{className:"hub-version-badge-source","data-testid":"hub-version-badge-source",children:i.source})]}),r?s.jsxs("div",{className:"hub-version-badge-panel","data-testid":"hub-version-badge-panel",children:[s.jsxs("dl",{children:[s.jsx("dt",{children:"Hub"}),s.jsx("dd",{children:s.jsxs("code",{children:["@openparachute/hub ",i.version]})}),s.jsx("dt",{children:"Source"}),s.jsx("dd",{children:fg(i)}),s.jsx("dt",{children:"Started"}),s.jsxs("dd",{children:[$c(i.started_at)," (",Dh(i.uptime_ms)," ago)"]}),i.container_build_time?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Built"}),s.jsx("dd",{children:$c(i.container_build_time)})]}):null,i.render_commit?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Commit"}),s.jsxs("dd",{children:[s.jsx("code",{children:i.render_commit.slice(0,8)}),i.render_branch?s.jsxs(s.Fragment,{children:[" on ",s.jsx("code",{children:i.render_branch})]}):null]})]}):null,b?s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"Last checked"}),s.jsx("dd",{children:$c(b.toISOString())})]}):null]}),s.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 mg(){const{clientId:i}=Ih(),c=i??"",[r]=im(),o=pg(r.get("return_to")),[f,h]=S.useState({kind:"loading"}),[b,j]=S.useState({kind:"idle"}),[v,p]=S.useState(0);S.useEffect(()=>{if(!c){h({kind:"error",message:"missing client id in URL"});return}let y=!1;return h({kind:"loading"}),Q0(c).then(A=>{y||(h({kind:"ok",client:A}),A.status==="approved"&&(j({kind:"approved",alreadyApproved:!0}),o&&window.location.assign(o)))}).catch(A=>{if(y)return;if(A instanceof X&&A.status===404){h({kind:"not_found"});return}const T=A instanceof Error?A.message:String(A);h({kind:"error",message:T})}),()=>{y=!0}},[c,v,o]);async function g(){j({kind:"approving"});try{const y=await J0(c,o||void 0);if(y.redirect_to&&dm(y.redirect_to)){window.location.assign(y.redirect_to);return}j({kind:"approved",alreadyApproved:y.already_approved})}catch(y){const A=y instanceof X?`approve failed (${y.status}): ${y.message}`:y instanceof Error?y.message:String(y);j({kind:"error",message:A})}}return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h2",{children:"Approve app"})}),vg({loadState:f,action:b,onApprove:g,onRetry:()=>p(y=>y+1)})]})}function dm(i){return!(!i||!i.startsWith("/")||i.startsWith("//"))}function pg(i){return i===null?null:dm(i)?i:null}function vg({loadState:i,action:c,onApprove:r,onRetry:o}){if(i.kind==="loading")return s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"});if(i.kind==="not_found")return s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"Unknown client."}),s.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."," ",s.jsx(Ke,{to:"/permissions",children:"Back to permissions"}),"."]})]});if(i.kind==="error")return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load the client: ",s.jsx("code",{children:i.message})]}),s.jsx("button",{type:"button",onClick:o,className:"secondary",children:"Retry"})]});const{client:f}=i,h=f.client_name??f.client_id;if(c.kind==="approved")return s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:c.alreadyApproved?"Already approved.":"Approved."}),s.jsxs("p",{className:"muted",children:[s.jsx("code",{children:h})," ",c.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."]}),s.jsx("p",{className:"muted",style:{marginTop:"1rem"},children:s.jsx(Ke,{to:"/permissions",children:"View permissions"})})]});const b=c.kind==="approving",j=c.kind==="error"?c.message:null;return s.jsxs("div",{children:[s.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."}),s.jsx("div",{className:"vault-row",style:{marginTop:"1rem"},children:s.jsxs("div",{className:"body",children:[s.jsx("div",{className:"name",children:s.jsx("code",{children:h})}),s.jsxs("div",{className:"dim",children:[s.jsx("span",{className:"muted",children:"client_id: "}),s.jsx("code",{children:f.client_id})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"redirect_uris: "}),f.redirect_uris.map((v,p)=>s.jsxs("span",{children:[s.jsx("code",{children:v}),p<f.redirect_uris.length-1?" ":null]},v))]}),f.scopes.length>0?s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"requested scopes: "}),f.scopes.map((v,p)=>s.jsxs("span",{children:[s.jsx("code",{children:gg(v)}),p<f.scopes.length-1?" ":null]},v)),f.scopes.some(fm)?s.jsxs("p",{className:"muted",style:{marginTop:"0.4rem",fontStyle:"italic",fontSize:"0.85rem"},children:[s.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,s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"registered: "}),s.jsx("code",{title:f.registered_at,children:f.registered_at})]}),j?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:j})}):null]})}),s.jsxs("div",{style:{marginTop:"1rem",display:"flex",gap:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{r()},disabled:b,children:b?"Approving…":`Approve ${h}`}),s.jsx(Ke,{to:"/permissions",className:"secondary",style:{alignSelf:"center"},children:"Cancel"})]})]})}function gg(i){return fm(i)?`vault:*:${i.split(":")[1]}`:i}function fm(i){const c=i.split(":");if(c.length!==2||c[0]!=="vault")return!1;const r=c[1];return r==="read"||r==="write"}function yg(i,c){return Vl(i,i,new Set)}function Vl(i,c,r){if(Array.isArray(i))return i.map(h=>Vl(h,c,r));if(i===null||typeof i!="object")return i;const o=i;if(typeof o.$ref=="string")return bg(o,c,r);const f={};for(const[h,b]of Object.entries(o))f[h]=Vl(b,c,r);return f}function bg(i,c,r){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(r.has(o))throw new Error(`Circular $ref detected: "${o}" already on resolution path`);const f=xg(o,c);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(r);h.add(o);const b=Vl(f,c,h),j={};for(const[v,p]of Object.entries(i))v!=="$ref"&&(j[v]=Vl(p,c,h));return{...b,...j}}function xg(i,c){const r=i.slice(1);if(r==="")return c;if(!r.startsWith("/"))throw new Error(`Unsupported $ref "${i}": fragment must start with "/"`);const o=r.slice(1).split("/").map(h=>decodeURIComponent(h).replace(/~1/g,"/").replace(/~0/g,"~"));let f=c;for(const h of o)if(f===null||typeof f!="object"||(f=f[h],f===void 0))return;return f}function jg(){const{short:i=""}=Ih(),[c,r]=S.useState({kind:"loading"}),[o,f]=S.useState({}),[h,b]=S.useState({}),[j,v]=S.useState({}),[p,g]=S.useState(!1),[y,A]=S.useState(null),[T,D]=S.useState({}),q=S.useCallback(async()=>{r({kind:"loading"}),f({}),b({}),v({}),A(null),D({});try{const Y=await P0(i);if(Y===null){r({kind:"no_schema"});return}let C;try{C=yg(Y)}catch(G){const ve=G instanceof Error?G.message:String(G);r({kind:"error",message:`Schema $ref resolution failed — ${ve}`});return}const O=await eg(i);r({kind:"ok",schema:C,values:O}),f({...O}),v({...O})}catch(Y){if(Y instanceof X&&Y.status===404){r({kind:"not_installed"});return}const C=Y instanceof Error?Y.message:String(Y);r({kind:"error",message:C})}},[i]);S.useEffect(()=>{q()},[q]);function Z(Y,C){var ve;f(te=>({...te,[Y]:C}));const O=c.kind==="ok"?(ve=c.schema.properties)==null?void 0:ve[Y]:void 0;if((O==null?void 0:O.writeOnly)===!0){const te=C!==""&&C!==void 0&&C!==null;b(he=>({...he,[Y]:te}))}else b(te=>({...te,[Y]:C!==j[Y]}));D(te=>{if(!(Y in te))return te;const he={...te};return delete he[Y],he})}async function V(Y){if(Y.preventDefault(),p||c.kind!=="ok")return;g(!0),A(null),D({});const C={};for(const[O,G]of Object.entries(h))G&&(C[O]=o[O]);if(Object.keys(C).length===0){g(!1),A({kind:"error",message:"No changes to save. Edit a field first."});return}try{const O=await tg(i,C);A({kind:"success",message:"Configuration saved.",restartRequired:Array.isArray(O.restart_required)?O.restart_required:[]}),b({})}catch(O){if(O instanceof X&&O.status===400)try{const ve=JSON.parse(O.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);D(he),A({kind:"error",message:ve.message??ve.error_description??"Validation failed."});return}A({kind:"error",message:ve.message??ve.error_description??"Validation failed."});return}catch{}const G=O instanceof Error?O.message:String(O);A({kind:"error",message:`Save failed — ${G}`})}finally{g(!1)}}if(c.kind==="loading")return s.jsx("div",{className:"empty",children:"Loading configuration…"});if(c.kind==="not_installed")return s.jsxs("section",{className:"module-config",children:[s.jsxs("h1",{children:["Configure ",i]}),s.jsxs("div",{className:"empty",children:[s.jsxs("p",{children:[s.jsx("code",{children:i})," is not installed on this hub."]}),s.jsxs("p",{children:["Visit ",s.jsx(Ke,{to:"/modules",children:"Modules"})," to install it first."]})]})]});if(c.kind==="no_schema")return s.jsxs("section",{className:"module-config",children:[s.jsxs("h1",{children:["Configure ",i]}),s.jsxs("div",{className:"empty",children:[s.jsxs("p",{children:[s.jsx("code",{children:i})," does not expose an operator-editable configuration schema."]}),s.jsxs("p",{children:["Some modules are configured entirely through environment variables or files on disk — check the module's documentation, or visit ",s.jsx(Ke,{to:"/modules",children:"Modules"}),"."]})]})]});if(c.kind==="error")return s.jsxs("section",{className:"module-config",children:[s.jsxs("h1",{children:["Configure ",i]}),s.jsxs("div",{className:"empty",children:["Failed to load configuration: ",c.message,"."," ",s.jsx("button",{type:"button",onClick:()=>void q(),children:"Retry"})]})]});const{schema:ee}=c,I=ee.properties??{},ue=new Set(ee.required??[]),K=Object.entries(I);return s.jsxs("section",{className:"module-config",children:[s.jsxs("header",{className:"module-config-header",children:[s.jsxs("h1",{children:["Configure ",i]}),s.jsxs("p",{className:"muted",children:["Edit values and save. Some changes apply immediately; others (provider, port) require restarting the module to take effect. ",s.jsx(Ke,{to:"/modules",children:"Back to modules"}),"."]})]}),K.length===0&&s.jsx("div",{className:"empty",children:s.jsx("p",{children:"This module's schema defines no editable properties."})}),s.jsxs("form",{onSubmit:Y=>void V(Y),className:"module-config-form","data-testid":"config-form",children:[s.jsx("fieldset",{children:K.map(([Y,C])=>s.jsx(Sg,{name:Y,property:C,value:o[Y],required:ue.has(Y),writeOnlyStored:C.writeOnly===!0&&!(Y in c.values),error:T[Y],dirty:!!h[Y],onChange:O=>Z(Y,O)},Y))}),s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"submit",disabled:p||K.length===0,children:p?"Saving…":"Save"}),s.jsx("button",{type:"button",className:"destructive",disabled:p,onClick:()=>void q(),children:"Discard changes"})]}),(y==null?void 0:y.kind)==="success"&&s.jsxs("div",{className:"banner banner-success","data-testid":"save-success",children:[s.jsx("strong",{children:y.message}),y.restartRequired.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("p",{className:"muted",children:["Restart ",i," to apply these field changes:"]}),s.jsx("ul",{children:y.restartRequired.map(Y=>s.jsx("li",{children:s.jsx("code",{children:Y})},Y))})]})]}),(y==null?void 0:y.kind)==="error"&&s.jsx("div",{className:"banner banner-error error","data-testid":"save-error",children:y.message})]})]})}function Sg({name:i,property:c,value:r,required:o,writeOnlyStored:f,error:h,dirty:b,onChange:j}){const v=`config-field-${i}`,p=c.title??i,g=c.description,y=Array.isArray(c.enum)&&c.enum.length>0;if(c.type==="boolean")return s.jsxs("div",{className:`field field-inline ${h?"field-invalid":""}`,"data-field":i,children:[s.jsxs("label",{htmlFor:v,children:[s.jsx("input",{id:v,type:"checkbox",checked:!!r,onChange:A=>j(A.target.checked)}),s.jsx("span",{className:"field-label-inline",children:p})]}),g&&s.jsx("p",{className:"muted field-hint",children:g}),h&&s.jsx("p",{className:"error field-error",children:h})]});if(y){const A=c.enum;return s.jsxs("div",{className:`field ${h?"field-invalid":""}`,"data-field":i,children:[s.jsxs("label",{htmlFor:v,children:[s.jsxs("span",{className:"field-label",children:[p,o&&s.jsx("span",{className:"muted",children:" (required)"})]}),s.jsxs("select",{id:v,value:r==null?"":String(r),onChange:T=>{const D=T.target.value;c.type==="number"||c.type==="integer"?j(D===""?void 0:Number(D)):j(D===""?void 0:D)},children:[!o&&s.jsx("option",{value:"",children:"(unset)"}),A.map(T=>s.jsx("option",{value:String(T),children:String(T)},String(T)))]})]}),g&&s.jsx("p",{className:"muted field-hint",children:g}),h&&s.jsx("p",{className:"error field-error",children:h})]})}return c.type==="string"&&c.writeOnly===!0?s.jsxs("div",{className:`field ${h?"field-invalid":""}`,"data-field":i,children:[s.jsxs("label",{htmlFor:v,children:[s.jsxs("span",{className:"field-label",children:[p,o&&s.jsx("span",{className:"muted",children:" (required)"})]}),s.jsx("input",{id:v,type:"password",autoComplete:"new-password",placeholder:f&&!b?"••••••••":"",value:typeof r=="string"?r:"",onChange:A=>j(A.target.value)})]}),s.jsxs("p",{className:"muted field-hint",children:[g&&s.jsxs(s.Fragment,{children:[g," "]}),f?s.jsx("em",{children:"Leave blank to keep the current value."}):s.jsx("em",{children:"Secret — sent only when saved."})]}),h&&s.jsx("p",{className:"error field-error",children:h})]}):c.type==="string"?s.jsxs("div",{className:`field ${h?"field-invalid":""}`,"data-field":i,children:[s.jsxs("label",{htmlFor:v,children:[s.jsxs("span",{className:"field-label",children:[p,o&&s.jsx("span",{className:"muted",children:" (required)"})]}),s.jsx("input",{id:v,type:"text",value:typeof r=="string"?r:"",onChange:A=>j(A.target.value)})]}),g&&s.jsx("p",{className:"muted field-hint",children:g}),h&&s.jsx("p",{className:"error field-error",children:h})]}):c.type==="number"||c.type==="integer"?s.jsxs("div",{className:`field ${h?"field-invalid":""}`,"data-field":i,children:[s.jsxs("label",{htmlFor:v,children:[s.jsxs("span",{className:"field-label",children:[p,o&&s.jsx("span",{className:"muted",children:" (required)"})]}),s.jsx("input",{id:v,type:"number",step:c.type==="integer"?1:"any",min:c.minimum,max:c.maximum,value:typeof r=="number"?r:"",onChange:A=>{const T=A.target.value;j(T===""?void 0:Number(T))}})]}),g&&s.jsx("p",{className:"muted field-hint",children:g}),h&&s.jsx("p",{className:"error field-error",children:h})]}):s.jsxs("div",{className:"field","data-field":i,children:[s.jsxs("span",{className:"field-label",children:[p," ",s.jsx("span",{className:"muted",children:"(unsupported type)"})]}),s.jsx("pre",{className:"muted",children:JSON.stringify(c,null,2)}),g&&s.jsx("p",{className:"muted field-hint",children:g})]})}const Cg=2e3,Eg=12e4;function Ng(){const[i,c]=S.useState(null),[r,o]=S.useState({kind:"idle"}),f=S.useRef(null),h=S.useRef(0),b=S.useCallback(async()=>{try{c(await ar())}catch{}},[]);S.useEffect(()=>{b()},[b]),S.useEffect(()=>()=>{f.current&&clearInterval(f.current)},[]);const j=S.useCallback(()=>{f.current&&(clearInterval(f.current),f.current=null)},[]),v=S.useCallback((g,y)=>{h.current=Date.now()+Eg,j(),f.current=setInterval(()=>{(async()=>{let A=null,T=null;try{A=await ar()}catch{}try{T=await og()}catch{}if(A){const D=A.version!==g,q=y!==null&&A.version===y;if(D||q){j(),c(A),o({kind:"succeeded",newVersion:A.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 D=(T==null?void 0:T.log.at(-1))??null;o({kind:"timeout",lastLog:D})}})()},Cg)},[j]);async function p(){if(!i)return;const g=i.version;o({kind:"starting"});try{const y=await rg();if(y.mode==="redeploy-required"){o({kind:"redeploy-required",targetVersion:y.target_version});return}o({kind:"upgrading",previousVersion:g,targetVersion:y.target_version}),v(g,y.target_version)}catch(y){o({kind:"error",message:y instanceof Error?y.message:String(y)})}}return i?s.jsxs("section",{className:"hub-upgrade-card install-card","data-testid":"hub-upgrade-card",children:[s.jsxs("div",{className:"install-card-body",children:[s.jsxs("h3",{children:["Hub ",s.jsx("span",{className:"muted",children:"(@openparachute/hub)"})]}),s.jsxs("p",{className:"install-card-meta muted",children:["Installed ",s.jsxs("code",{"data-testid":"hub-current-version",children:["v",i.version]})," · source"," ",s.jsx("code",{children:i.source})]}),s.jsx(Tg,{state:r})]}),s.jsx("div",{className:"install-card-actions",children:s.jsx(wg,{state:r,onUpgrade:()=>void p()})})]}):null}function wg({state:i,onUpgrade:c}){if(i.kind==="redeploy-required")return s.jsx("span",{className:"muted","data-testid":"hub-redeploy-hint",children:"Redeploy from your platform dashboard"});const r=i.kind==="starting"||i.kind==="upgrading";return s.jsx("button",{type:"button",onClick:c,disabled:r,"data-testid":"hub-upgrade-button",children:r?"Upgrading…":"Upgrade hub"})}function Tg({state:i}){switch(i.kind){case"idle":return null;case"starting":return s.jsx("p",{className:"muted","data-testid":"hub-upgrade-state-starting",children:"Starting the hub upgrade…"});case"upgrading":return s.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 s.jsxs("p",{className:"muted","data-testid":"hub-upgrade-state-success",children:["Upgraded — the hub is now running ",s.jsxs("code",{children:["v",i.newVersion]}),"."]});case"timeout":return s.jsxs("p",{className:"warn-banner","data-testid":"hub-upgrade-state-timeout",children:["The hub may still be coming up — refresh shortly.",i.lastLog?s.jsxs(s.Fragment,{children:[" ",s.jsxs("span",{className:"dim",children:["Last status: ",i.lastLog]})]}):null]});case"redeploy-required":return s.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?s.jsxs(s.Fragment,{children:["Redeploy from your platform dashboard to move to ",s.jsxs("code",{children:["v",i.targetVersion]}),"."]}):s.jsx(s.Fragment,{children:"Redeploy from your platform dashboard to pick up the latest hub."})]});case"error":return s.jsxs("p",{className:"error-banner","data-testid":"hub-upgrade-state-error",children:["Upgrade failed: ",i.message]})}}function _g(){if(typeof navigator>"u")return"other";const i=(navigator.platform||"").toLowerCase();return i.includes("mac")?"darwin":i.includes("linux")?"linux":"other"}function Rg(i,c){const r=[];if(i.darwin&&r.push({label:"macOS",command:i.darwin,preferred:c==="darwin"}),i.linux&&r.push({label:"Linux",command:i.linux,preferred:c==="linux"}),i.generic){const o=r.some(f=>f.preferred);r.push({label:"Any platform",command:i.generic,preferred:!o})}return r.sort((o,f)=>Number(f.preferred)-Number(o.preferred))}function Ag({command:i}){const[c,r]=S.useState(!1);async function o(){try{await navigator.clipboard.writeText(i),r(!0),setTimeout(()=>r(!1),1500)}catch{}}return s.jsxs("div",{className:"depcard-cmd",children:[s.jsx("pre",{className:"depcard-cmd-text",children:i}),s.jsx("button",{type:"button",className:"btn btn-secondary depcard-copy",onClick:()=>void o(),"aria-label":"Copy install command",children:c?"Copied":"Copy"})]})}function zg({wire:i}){const c=_g(),r=Rg(i.install,c);return s.jsxs("div",{className:"depcard","data-testid":"missing-dependency-card",children:[s.jsxs("h3",{className:"depcard-heading",children:[i.binary," isn't installed"]}),i.why?s.jsxs("p",{className:"depcard-why muted",children:["It's needed to ",i.why,"."]}):null,r.length>0?s.jsxs("div",{className:"depcard-installs",children:[s.jsx("p",{className:"depcard-installs-label",children:"Install it:"}),r.map(o=>s.jsxs("div",{className:o.preferred?"depcard-install preferred":"depcard-install",children:[s.jsx("span",{className:"depcard-os",children:o.label}),s.jsx(Ag,{command:o.command})]},o.label))]}):null,i.docs_url?s.jsx("p",{className:"depcard-docs",children:s.jsx("a",{href:i.docs_url,target:"_blank",rel:"noreferrer noopener",children:"Documentation"})}):null,i.sysadmin_hint?s.jsx("p",{className:"depcard-hint muted",children:i.sysadmin_hint}):null]})}function Mg(i){const{error:c,errorDetail:r}=i;return(r==null?void 0:r.error_type)==="missing_dependency"?s.jsx(zg,{wire:r}):r!=null&&r.error_description?s.jsx("span",{className:"depcard-fallback",children:r.error_description}):c?s.jsx("span",{className:"depcard-fallback",children:c}):null}function Og(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 Ug(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 Dg=1e3;function kg(){const[i,c]=S.useState({kind:"loading"}),[r,o]=S.useState([]),[f,h]=S.useState({}),[b,j]=S.useState({}),v=S.useCallback(async()=>{try{const C=await rm();c({kind:"ok",catalog:C})}catch(C){const O=C instanceof Error?C.message:String(C);c({kind:"error",message:O})}},[]);S.useEffect(()=>{v()},[v]);const p=S.useRef(null);S.useEffect(()=>{if(r.length===0){p.current&&(clearInterval(p.current),p.current=null);return}if(!p.current)return p.current=setInterval(()=>{Promise.all(r.map(async C=>{var O;try{const G=await ag(C.operationId);o(ve=>ve.map(te=>te.operationId===G.id?{...te,log:G.log,status:G.status,error:G.error,errorDetail:G.error_detail}:te)),(G.status==="succeeded"||G.status==="failed")&&(G.status==="failed"&&((O=G.error_detail)==null?void 0:O.error_type)==="missing_dependency"?v():setTimeout(()=>{o(te=>te.filter(he=>he.operationId!==G.id)),v()},1500))}catch(G){const ve=G instanceof Error?G.message:String(G);o(te=>te.map(he=>he.operationId===C.operationId?{...he,status:"failed",error:ve}:he))}}))},Dg),()=>{p.current&&(clearInterval(p.current),p.current=null)}},[r,v]);async function g(C){j(O=>{const G={...O};return delete G[C],G});try{const O=await K0(C);o(G=>[...G,{kind:"install",operationId:O,short:C,log:[],status:"pending"}])}catch(O){j(G=>({...G,[C]:O instanceof Error?O.message:String(O)}))}}async function y(C){j(O=>{const G={...O};return delete G[C],G});try{const O=await $0(C);o(G=>[...G,{kind:"upgrade",operationId:O,short:C,log:[],status:"pending"}])}catch(O){j(G=>({...G,[C]:O instanceof Error?O.message:String(O)}))}}async function A(C){if(!f[C]){h(O=>({...O,[C]:!0})),j(O=>{const G={...O};return delete G[C],G});try{await F0(C),await v()}catch(O){j(G=>({...G,[C]:O instanceof Error?O.message:String(O)}))}finally{h(O=>({...O,[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(O=>({...O,[C]:!0})),j(O=>{const G={...O};return delete G[C],G});try{await W0(C),await v()}catch(O){j(G=>({...G,[C]:O instanceof Error?O.message:String(O)}))}finally{h(O=>({...O,[C]:!1}))}}}if(i.kind==="loading")return s.jsx("div",{className:"empty",children:"Loading modules…"});if(i.kind==="error")return i.message.includes("setup_required")?s.jsxs("div",{className:"empty",children:["Hub not yet configured. ",s.jsx("a",{href:"/admin/setup",children:"Finish first-boot setup"})," first."]}):s.jsxs("div",{className:"empty",children:["Failed to load modules: ",i.message,"."," ",s.jsx("button",{type:"button",onClick:()=>void v(),children:"Retry"})]});const D=i.catalog,{modules:q,supervisor_available:Z,module_install_channel:V}=D,ee=q.filter(C=>C.installed),I=q.filter(C=>!C.installed&&C.available),ue=new Set(r.filter(C=>C.kind==="install").map(C=>C.short)),K=I.filter(C=>!ue.has(C.short));async function Y(C){if(C!==V){c({kind:"ok",catalog:{...D,module_install_channel:C}});try{const O=await I0(C);c(G=>G.kind==="ok"?{kind:"ok",catalog:{...G.catalog,module_install_channel:O}}:G)}catch(O){const G=O instanceof Error?O.message:String(O);c({kind:"error",message:`Failed to update channel — ${G}`})}}}return s.jsxs("section",{className:"modules",children:[s.jsx("h1",{children:"Modules"}),s.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."}),s.jsx(Ng,{}),s.jsx(Gg,{channel:V,disabled:!Z,onChange:C=>void Y(C)}),!Z&&s.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 ",s.jsx("code",{children:"parachute serve"}),". On-box installs use"," ",s.jsx("code",{children:"parachute install vault"})," etc. from a shell instead."]}),r.length>0&&s.jsxs("div",{className:"banner","data-testid":"pending-ops-banner",children:[s.jsx("strong",{children:"In progress:"}),s.jsx("ul",{children:r.map(C=>s.jsxs("li",{children:[s.jsx("code",{children:C.short})," · ",C.kind," · status: ",C.status,C.status==="failed"&&(C.errorDetail||C.error)?s.jsx("div",{className:"depcard-wrap",children:Mg({error:C.error,errorDetail:C.errorDetail})}):null,C.log.length>0&&s.jsxs("details",{children:[s.jsxs("summary",{children:[C.log.length," log line(s)"]}),s.jsx("pre",{children:C.log.join(`
|
|
61
|
-
`)})]})]},C.operationId))})]}),s.jsxs("section",{className:"modules-installed","data-testid":"installed-section",children:[s.jsx("h2",{children:"Installed modules"}),ee.length===0?s.jsxs("p",{className:"muted","data-testid":"installed-empty",children:["No modules installed yet. Pick one from ",s.jsx("strong",{children:"Install a module"})," below to get started."]}):s.jsx("ul",{className:"module-list",children:ee.map(C=>s.jsx(Bg,{module:C,supervisorAvailable:Z,syncBusy:!!f[C.short],errorMessage:b[C.short],onUpgrade:()=>void y(C.short),onRestart:()=>void A(C.short),onUninstall:()=>void T(C.short)},C.short))})]}),s.jsxs("section",{className:"modules-installable","data-testid":"installable-section",children:[s.jsx("h2",{children:"Install a module"}),K.length===0?s.jsx("p",{className:"muted","data-testid":"installable-empty",children:ue.size>0?"Install in progress — see In progress above.":"All available modules are installed."}):s.jsx("ul",{className:"install-list",children:K.map(C=>s.jsx(Lg,{module:C,supervisorAvailable:Z,installing:ue.has(C.short),errorMessage:b[C.short],onInstall:()=>void g(C.short)},C.short))})]})]})}const Hg={scribe:"Scribe admin SPA tracked at scribe#53",runner:"Runner admin SPA tracked at runner#8"};function Bg({module:i,supervisorAvailable:c,syncBusy:r,errorMessage:o,onUpgrade:f,onRestart:h,onUninstall:b}){const j=c&&!r,v=i.installed_version!==i.latest_version&&i.latest_version!==null,p=i.management_url,g=Hg[i.short];return s.jsxs("li",{className:"module-row","data-short":i.short,children:[s.jsxs("header",{children:[s.jsxs("h2",{children:[i.display_name," ",s.jsxs("span",{className:"muted",children:["(",i.short,")"]})]}),(()=>{const y=qg(i);return s.jsx("span",{className:`status status-${y.cssState}`,"data-state":y.cssState,"data-testid":`module-status-${i.short}`,children:y.label})})()]}),i.tagline?s.jsx("p",{className:"tagline",children:i.tagline}):null,s.jsxs("dl",{className:"meta",children:[s.jsx("dt",{children:"Package"}),s.jsx("dd",{children:s.jsx("code",{children:i.package})}),s.jsx("dt",{children:"Installed"}),s.jsxs("dd",{children:["v",i.installed_version??"unknown",v&&s.jsxs("span",{className:"badge",children:["v",i.latest_version," available"]})]}),i.pid&&s.jsxs(s.Fragment,{children:[s.jsx("dt",{children:"PID"}),s.jsx("dd",{children:i.pid})]})]}),i.uis.length>0&&s.jsx(Yg,{uis:i.uis}),s.jsxs("div",{className:"actions",children:[p?s.jsx("a",{className:"btn",href:p,"data-testid":`open-${i.short}`,children:"Open"}):s.jsx("button",{type:"button",className:"btn",disabled:!0,title:g??"This module hasn't shipped an admin UI yet.","data-testid":`open-${i.short}`,children:"Open"}),s.jsx("button",{type:"button",disabled:!j,onClick:h,children:"Restart"}),s.jsx("button",{type:"button",disabled:!j||!v,onClick:f,children:v?`Upgrade to v${i.latest_version}`:"Up to date"}),s.jsx("button",{type:"button",className:"destructive",disabled:!j,onClick:b,children:"Uninstall"})]}),o&&s.jsx("div",{className:"error",children:o})]})}function Lg({module:i,supervisorAvailable:c,installing:r,errorMessage:o,onInstall:f}){const h=c&&!r;return s.jsxs("li",{className:"install-card","data-short":i.short,children:[s.jsxs("div",{className:"install-card-body",children:[s.jsxs("h3",{children:[i.display_name," ",s.jsxs("span",{className:"muted",children:["(",i.short,")"]})]}),i.tagline?s.jsx("p",{className:"tagline",children:i.tagline}):null,s.jsxs("p",{className:"muted install-card-meta",children:[s.jsx("code",{children:i.package}),i.latest_version?s.jsxs(s.Fragment,{children:[" · ","latest ",s.jsxs("code",{children:["v",i.latest_version]})]}):null]})]}),s.jsx("div",{className:"install-card-actions",children:s.jsx("button",{type:"button",disabled:!h,onClick:f,children:r?"Installing…":"Install"})}),o&&s.jsx("div",{className:"error",children:o})]})}function qg(i){if(!i.installed)return{cssState:"absent",label:"not installed"};if(!i.supervisor_status)return{cssState:"absent",label:"not supervised"};const c=Og(i.supervisor_status);return{cssState:c,label:c}}function Yg({uis:i}){return s.jsxs("details",{className:"module-uis","data-testid":"module-uis",open:!0,children:[s.jsxs("summary",{children:["Hosted UIs ",s.jsxs("span",{className:"muted",children:["(",i.length,")"]})]}),s.jsx("ul",{className:"ui-sub-units",children:i.map(c=>{const r=Ug(c.status);return s.jsxs("li",{className:"ui-sub-unit","data-name":c.name,children:[c.icon_url&&s.jsx("img",{src:c.icon_url,alt:"",className:"ui-icon",width:20,height:20,loading:"lazy"}),s.jsxs("div",{className:"ui-sub-unit-body",children:[s.jsxs("a",{href:c.path,className:"ui-sub-unit-link",children:[s.jsx("strong",{children:c.display_name}),s.jsxs("span",{className:"muted",children:[" · ",c.path]})]}),c.tagline?s.jsx("p",{className:"tagline",children:c.tagline}):null]}),s.jsx("span",{className:`status status-${r}`,"data-state":r,"data-testid":`ui-status-${c.name}`,children:r})]},c.name)})})]})}function Gg({channel:i,disabled:c,onChange:r}){return s.jsxs("fieldset",{className:"channel-toggle","data-testid":"channel-toggle",children:[s.jsx("legend",{children:"Install channel"}),s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"module-install-channel",value:"latest",checked:i==="latest",disabled:c,onChange:()=>r("latest")}),"Stable (",s.jsx("code",{children:"latest"}),")"]}),s.jsxs("label",{children:[s.jsx("input",{type:"radio",name:"module-install-channel",value:"rc",checked:i==="rc",disabled:c,onChange:()=>r("rc")}),"Release candidates (",s.jsx("code",{children:"rc"}),")"]}),s.jsxs("p",{className:"muted",children:["All future module installs and upgrades use this channel. Existing installed modules are unaffected — use ",s.jsx("strong",{children:"Upgrade"})," to pull a newer version."]}),s.jsxs("p",{className:"muted",children:["More hub settings (canonical URL, etc.) at ",s.jsx(Ke,{to:"/settings",children:"Settings"}),"."]})]})}const Vg="https://parachute.computer/install#connect-mcp-clients";function hm(i){return`${i.replace(/\/+$/,"")}/mcp`}function mm(i,c){return`claude mcp add --transport http parachute-${i} ${hm(c)}`}function Zg(i,c,r){return`${mm(i,c)} --header "Authorization: Bearer ${r}"`}function Fc({value:i,label:c="Copy"}){const[r,o]=S.useState(!1);return s.jsx("button",{type:"button",className:"secondary",onClick:()=>{typeof navigator>"u"||!navigator.clipboard||navigator.clipboard.writeText(i).then(()=>{o(!0),setTimeout(()=>o(!1),2e3)})},children:r?"Copied ✓":c})}function pm({vaultName:i,vaultUrl:c,embedded:r=!1}){const o=hm(c),f=mm(i,c),[h,b]=S.useState(!1),[j,v]=S.useState({kind:"idle"});async function p(){if(j.kind!=="submitting"){v({kind:"submitting"});try{const A=await cm({scope:`vault:${i}:read vault:${i}:write`});v({kind:"minted",token:A})}catch(A){const T=A instanceof X?`mint failed (${A.status}): ${A.message}`:A instanceof Error?A.message:String(A);v({kind:"error",message:T})}}}const g=j.kind==="minted"?Zg(i,c,j.token.token):null,y=s.jsxs(s.Fragment,{children:[s.jsx("h3",{children:"Connect an MCP client (or connector)"}),s.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 ",s.jsx("code",{children:i})," vault. The client signs in to this hub and reads/writes vault data over MCP."]}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"Endpoint"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-endpoint",children:o}),s.jsx(Fc,{value:o})]})]}),s.jsxs("div",{className:"mcp-field",children:[s.jsx("span",{className:"mcp-field-label",children:"Claude Code"}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-add-command",children:f}),s.jsx(Fc,{value:f})]}),s.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."})]}),s.jsxs("details",{className:"mcp-token-path",open:h,onToggle:A=>b(A.currentTarget.open),children:[s.jsx("summary",{children:"Use a token instead (headless / CI clients)"}),s.jsxs("p",{className:"dim",children:["For clients that can't do browser OAuth, mint a scope-narrow hub token (",s.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"&&g?s.jsxs("div",{className:"mint-banner","data-testid":"mcp-header-banner",children:[s.jsx("h3",{children:"Token minted"}),s.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 ",s.jsx("code",{children:"Authorization"})," header."]}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{"data-testid":"mcp-header-command",children:g}),s.jsx(Fc,{value:g})]}),s.jsxs("p",{className:"warn",children:["⚠ Manage and revoke this token at ",s.jsx("code",{children:"/admin/tokens"}),"."]})]}):s.jsx("div",{className:"actions",children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>{p()},disabled:j.kind==="submitting",children:j.kind==="submitting"?"Minting…":"Mint a token"})}),j.kind==="error"?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:j.message})}):null]}),s.jsx("p",{className:"dim mcp-docs-link",children:s.jsx("a",{href:Vg,target:"_blank",rel:"noreferrer",children:"Full connect docs →"})})]});return r?s.jsx("div",{className:"mcp-connect-card mcp-connect-card-embedded",children:y}):s.jsx("div",{className:"mcp-connect-card",children:y})}const Xg=/^[a-zA-Z0-9_-]+$/,Qg=new Set(["list"]);function Jg(){const i=ur(),[c,r]=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 b=$g(c),j=async v=>{if(v.preventDefault(),!b){f({kind:"submitting"});try{const p=await B0({name:c});f({kind:"created",result:p})}catch(p){const g=p instanceof X?`${p.status}: ${p.message}`:p instanceof Error?p.message:String(p);f({kind:"error",message:g})}}};return o.kind==="created"?s.jsx(Kg,{result:o.result,onDone:()=>i("/vaults")}):s.jsxs("div",{children:[s.jsx("h2",{children:"Create a vault"}),s.jsxs("p",{className:"muted",children:["A vault stores tokens, secrets, and notes scoped to this hub. The hub provisions it via"," ",s.jsx("code",{children:"parachute-vault create"})," on the host filesystem and registers it in"," ",s.jsx("code",{children:"services.json"}),"."]}),o.kind==="error"&&s.jsxs("div",{className:"error-banner",children:["Couldn't create vault: ",s.jsx("code",{children:o.message})]}),s.jsxs("form",{onSubmit:j,className:"section",children:[s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"vault-name",children:"Vault name"}),s.jsx("input",{id:"vault-name",type:"text",value:c,onChange:v=>r(v.target.value),placeholder:"e.g. work, home, scratch",disabled:o.kind==="submitting"}),b?s.jsx("div",{className:"field-error",children:b}):s.jsxs("div",{className:"field-hint",children:["Letters, numbers, hyphens, and underscores. Becomes the path under"," ",s.jsx("code",{children:"/vault/<name>"}),"."]})]}),s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"submit",disabled:c.length===0||!!b||o.kind==="submitting",children:o.kind==="submitting"?"Creating…":"Create vault"}),s.jsx(Ke,{to:"/vaults",className:"muted",children:"Cancel"})]})]})]})}function Kg({result:i,onDone:c}){const[r,o]=S.useState(!1),f=async()=>{if(i.token)try{await navigator.clipboard.writeText(i.token),o(!0),setTimeout(()=>o(!1),2e3)}catch{}};return s.jsxs("div",{children:[s.jsx("h2",{children:"Vault created"}),i.token?s.jsxs("div",{className:"mint-banner",children:[s.jsx("h3",{children:"Your access token (shown once)"}),s.jsxs("p",{className:"muted",children:["This is a hub-issued access token (a JWT scoped ",s.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"," ",s.jsxs("code",{children:["parachute auth mint-token --scope vault:",i.name,":read"]}),` (or the connect card's "Use a token instead" option).`]}),s.jsxs("div",{className:"token-box",children:[s.jsx("code",{children:i.token}),s.jsx("button",{type:"button",onClick:f,className:"secondary",children:r?"Copied":"Copy"})]}),s.jsx("p",{className:"warn",children:"⚠ Don't navigate away until you've saved this token."}),s.jsx("div",{className:"actions",children:s.jsx("button",{type:"button",onClick:c,children:"Done — I've saved the token"})})]}):i.created?s.jsxs("div",{className:"section",children:[s.jsxs("p",{children:["Vault ",s.jsx("code",{children:i.name})," was created, but no access token was minted",i.tokenGuidance?s.jsxs(s.Fragment,{children:[" ","— ",s.jsx("span",{className:"muted",children:i.tokenGuidance})]}):s.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"," ",s.jsxs("code",{children:["parachute auth mint-token --scope vault:",i.name,":read"]}),"."]}),s.jsx("div",{className:"actions",children:s.jsx("button",{type:"button",onClick:c,children:"Done"})})]}):s.jsxs("div",{className:"section",children:[s.jsxs("p",{children:["Vault ",s.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 ",s.jsxs("code",{children:["parachute auth mint-token --scope vault:",i.name,":read"]}),"."]}),s.jsx("div",{className:"actions",children:s.jsx(Ke,{to:"/vaults",children:s.jsx("button",{type:"button",children:"Continue"})})})]}),s.jsx("div",{className:"section",children:s.jsx(pm,{vaultName:i.name,vaultUrl:i.url})}),s.jsxs("div",{className:"kv section",children:[s.jsx("div",{children:"Name"}),s.jsx("div",{children:s.jsx("code",{children:i.name})}),s.jsx("div",{children:"URL"}),s.jsx("div",{children:s.jsx("code",{children:i.url})}),s.jsx("div",{children:"Version"}),s.jsx("div",{children:s.jsx("code",{children:i.version})}),i.paths&&s.jsxs(s.Fragment,{children:[s.jsx("div",{children:"Vault dir"}),s.jsx("div",{children:s.jsx("code",{children:i.paths.vault_dir})}),s.jsx("div",{children:"Database"}),s.jsx("div",{children:s.jsx("code",{children:i.paths.vault_db})}),s.jsx("div",{children:"Config"}),s.jsx("div",{children:s.jsx("code",{children:i.paths.vault_config})})]})]})]})}function $g(i){return i.length===0?null:Xg.test(i)?Qg.has(i)?`"${i}" is a reserved name.`:null:"Letters, numbers, hyphens, and underscores only."}function Fg(){const[i,c]=S.useState({kind:"loading"}),[r,o]=S.useState(""),[f,h]=S.useState(""),[b,j]=S.useState(0),[v,p]=S.useState({kind:"idle"});S.useEffect(()=>{let T=!1;return c({kind:"loading"}),q0(f?{vault:f}:{}).then(q=>{T||c({kind:"ok",grants:q})}).catch(q=>{if(T)return;const Z=q instanceof Error?q.message:String(q);c({kind:"error",message:Z})}),()=>{T=!0}},[b,f]);function g(T){T.preventDefault(),h(r.trim())}function y(){o(""),h("")}async function A(T){p({kind:"revoking",clientId:T.client_id});try{await Y0(T.client_id),p({kind:"idle"}),j(D=>D+1)}catch(D){const q=D instanceof X?`revoke failed (${D.status}): ${D.message}`:D instanceof Error?D.message:String(D);p({kind:"error",clientId:T.client_id,message:q})}}return s.jsxs("div",{"data-route-content":"true",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Permissions"})}),s.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 ",s.jsx("em",{children:"not"})," invalidate tokens already issued."]}),s.jsxs("form",{onSubmit:g,style:{marginTop:"1rem",marginBottom:"1rem"},children:[s.jsx("label",{htmlFor:"vault-filter",className:"muted",style:{marginRight:"0.5rem"},children:"Filter by vault:"}),s.jsx("input",{id:"vault-filter",type:"text",value:r,onChange:T=>o(T.target.value),placeholder:"e.g. work",style:{marginRight:"0.5rem"}}),s.jsx("button",{type:"submit",children:"Apply"}),f?s.jsx("button",{type:"button",onClick:y,className:"secondary",style:{marginLeft:"0.5rem"},children:"Clear"}):null]}),Wg({state:i,revoke:v,setRevoke:p,onConfirm:A,onRetry:()=>j(T=>T+1)})]})}function Wg({state:i,revoke:c,setRevoke:r,onConfirm:o,onRetry:f}){return i.kind==="loading"?s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):i.kind==="error"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load grants: ",s.jsx("code",{children:i.message})]}),s.jsx("button",{type:"button",onClick:f,className:"secondary",children:"Retry"})]}):i.grants.length===0?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No grants."}),s.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."})]}):s.jsx("div",{style:{marginTop:"1rem"},children:i.grants.map(h=>{const b=c.kind==="revoking"&&c.clientId===h.client_id,j=c.kind==="error"&&c.clientId===h.client_id?c:null,v=c.kind==="confirming"&&c.grant.client_id===h.client_id;return s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsx("div",{className:"name",children:s.jsx("code",{children:h.client_name??h.client_id})}),s.jsxs("div",{className:"dim",children:[s.jsx("span",{className:"muted",children:"granted "}),s.jsx("code",{title:h.granted_at,children:Ig(h.granted_at)})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"scopes: "}),h.scopes.map((p,g)=>s.jsxs("span",{children:[s.jsx("code",{children:p}),g<h.scopes.length-1?" ":null]},p))]}),j?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:j.message})}):null,v?s.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:[s.jsxs("p",{children:["Revoke ",s.jsx("code",{children:h.client_name??h.client_id}),"? Next OAuth flow for this app will prompt you to consent again."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{o(h)},disabled:b,children:b?"Revoking…":"Revoke"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>r({kind:"idle"}),disabled:b,children:"Cancel"})]})]}):null]}),v?null:s.jsx("button",{type:"button",className:"secondary",onClick:()=>r({kind:"confirming",grant:h}),"aria-label":`Revoke ${h.client_name??h.client_id}`,children:"Revoke"})]},h.client_id)})})}function Ig(i){const c=new Date(i);return Number.isNaN(c.getTime())?i:c.toLocaleString()}function Pg(){const[i,c]=S.useState({kind:"loading"}),[r,o]=S.useState(""),[f,h]=S.useState(!1),[b,j]=S.useState(null),v=S.useCallback(async()=>{try{const D=await om();c({kind:"ok",setting:D}),o(D.hub_origin??""),j(null)}catch(D){const q=D instanceof Error?D.message:String(D);c({kind:"error",message:q})}},[]);S.useEffect(()=>{v()},[v]);async function p(D){if(D.preventDefault(),f||i.kind!=="ok")return;const q=r.trim(),Z=q.length===0?null:q;h(!0),j(null);try{await Uh(Z),await v()}catch(V){const ee=V instanceof Error?V.message:String(V);j(ee)}finally{h(!1)}}async function g(){if(!f&&i.kind==="ok"){h(!0),j(null);try{await Uh(null),await v()}catch(D){const q=D instanceof Error?D.message:String(D);j(q)}finally{h(!1)}}}if(i.kind==="loading")return s.jsx("div",{className:"empty",children:"Loading settings…"});if(i.kind==="error")return s.jsxs("div",{className:"empty",children:["Failed to load settings: ",i.message,"."," ",s.jsx("button",{type:"button",onClick:()=>void v(),children:"Retry"})]});const{setting:y}=i,A=y.hub_origin!==null,T=r.trim()!==(y.hub_origin??"");return s.jsxs("section",{className:"settings",children:[s.jsx("h1",{children:"Hub settings"}),s.jsx("p",{className:"muted",children:"Hub-wide operator controls. Settings here apply to every module + every minted token."}),s.jsxs("section",{className:"settings-block","aria-labelledby":"canonical-hub-url-heading",children:[s.jsx("h2",{id:"canonical-hub-url-heading",children:"Canonical hub URL"}),s.jsxs("dl",{className:"meta","data-testid":"hub-origin-current",children:[s.jsx("dt",{children:"Current value"}),s.jsxs("dd",{children:[s.jsx("code",{children:y.resolved_issuer})," ",s.jsx(ey,{source:y.source,hasStored:A})]})]}),s.jsxs("form",{onSubmit:D=>void p(D),className:"settings-form","data-testid":"hub-origin-form",children:[s.jsxs("label",{htmlFor:"hub-origin-input",children:[s.jsx("span",{children:"Canonical URL"}),s.jsx("input",{id:"hub-origin-input",type:"url",inputMode:"url",placeholder:"https://hub.example.com",value:r,disabled:f,onChange:D=>o(D.target.value),autoComplete:"off",spellCheck:!1})]}),s.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 ",s.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)."]}),s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"submit",disabled:f||!T,children:f?"Saving…":"Save"}),s.jsx("button",{type:"button",className:"destructive",disabled:f||!A,onClick:()=>void g(),children:"Reset to default"})]}),b&&s.jsx("div",{className:"error","data-testid":"hub-origin-save-error",children:b})]})]})]})}function ey({source:i,hasStored:c}){return i==="settings"?s.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from settings"}):i==="env"?s.jsxs("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:["from env var ",s.jsx("code",{children:"PARACHUTE_HUB_ORIGIN"})]}):s.jsx("span",{className:"badge badge-info","data-testid":"hub-origin-source",children:"from request origin"})}const Wc={scope:"",audience:"",expiresIn:"",subject:"",permissions:""};function ty(){const[i,c]=im(),r=ly(i.get("status")),o=iy(i.get("source")),[f,h]=S.useState({kind:"loading"}),[b,j]=S.useState(0),[v,p]=S.useState({kind:"idle"}),[g,y]=S.useState(Wc),[A,T]=S.useState({kind:"idle"}),[D,q]=S.useState(!1),[Z,V]=S.useState(!1);function ee(C,O){c(G=>{const ve=new URLSearchParams(G);return O==="all"?ve.delete(C):ve.set(C,O),ve},{replace:!0})}S.useEffect(()=>{let C=!1;return h({kind:"loading"}),Oh(kh(r,o)).then(O=>{C||h({kind:"ok",tokens:O.tokens,nextCursor:O.next_cursor})}).catch(O=>{if(C)return;const G=O instanceof Error?O.message:String(O);h({kind:"error",message:G})}),()=>{C=!0}},[b,r,o]);async function I(){if(f.kind!=="ok"||!f.nextCursor||Z)return;const C={...kh(r,o),cursor:f.nextCursor};V(!0);try{const O=await Oh(C);h({kind:"ok",tokens:[...f.tokens,...O.tokens],nextCursor:O.next_cursor})}catch(O){const G=O instanceof Error?O.message:String(O);h({kind:"error",message:G})}finally{V(!1)}}async function ue(C){C.preventDefault();const O=g.scope.trim();if(O.length===0){p({kind:"error",message:"scope is required"});return}let G;if(g.permissions.trim().length>0)try{const te=JSON.parse(g.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}G=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(g.expiresIn.trim().length>0){const te=Number(g.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:O,...g.audience.trim()?{audience:g.audience.trim()}:{},...ve!==void 0?{expires_in:ve}:{},...g.subject.trim()?{subject:g.subject.trim()}:{},...G?{permissions:G}:{}});p({kind:"minted",token:te}),y(Wc),q(!1),j(he=>he+1)}catch(te){const he=te instanceof X?`mint failed (${te.status}): ${te.message}`:te instanceof Error?te.message:String(te);p({kind:"error",message:he})}}async function K(C){T({kind:"revoking",jti:C});try{await X0(C),T({kind:"idle"}),j(O=>O+1)}catch(O){const G=O instanceof X?`revoke failed (${O.status}): ${O.message}`:O instanceof Error?O.message:String(O);T({kind:"error",jti:C,message:G})}}function Y(C){typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(C)}return s.jsxs("div",{children:[s.jsxs("div",{className:"list-header",children:[s.jsx("h1",{children:"Tokens"}),s.jsx("button",{type:"button",onClick:()=>q(C=>!C),children:D?"Hide form":"Mint new token"})]}),s.jsxs("p",{className:"muted",children:["The hub's token registry. Every CLI / OAuth / operator-mint writes a row here. Revoking flips ",s.jsx("code",{children:"revoked_at"}),"; resource servers on"," ",s.jsx("code",{children:"@openparachute/scope-guard@^0.2.0"})," reject within ~60s of the next poll."]}),v.kind==="minted"?s.jsxs("div",{className:"mint-banner",children:[s.jsx("h3",{children:"Minted"}),s.jsxs("p",{children:["Your new access token (jti: ",s.jsx("code",{children:v.token.jti}),"):"]}),s.jsx("div",{className:"token-box",children:s.jsx("code",{children:v.token.token})}),s.jsx("p",{className:"warn",children:"This is the only time the JWT is shown. Copy it now — there is no DB-side recovery."}),s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"button",onClick:()=>Y(v.token.token),children:"Copy"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>p({kind:"idle"}),children:"Dismiss"})]})]}):null,D?s.jsx("div",{className:"section",children:s.jsxs("form",{onSubmit:ue,children:[s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-scope",children:"Scope (space-separated)"}),s.jsx("input",{id:"mint-scope",type:"text",value:g.scope,onChange:C=>y({...g,scope:C.target.value}),placeholder:"e.g. scribe:transcribe vault:default:read",required:!0}),s.jsxs("div",{className:"field-hint",children:["Space-separated ",s.jsx("code",{children:"resource:verb"})," or ",s.jsx("code",{children:"resource:name:verb"})," ","tuples. The hub rejects non-requestable scopes (admin, host:*) per the privilege-diffusion guard."]})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-audience",children:"Audience (optional)"}),s.jsx("input",{id:"mint-audience",type:"text",value:g.audience,onChange:C=>y({...g,audience:C.target.value}),placeholder:"inferred from scope when blank"}),s.jsxs("div",{className:"field-hint",children:["Inferred from scope if omitted. ",s.jsx("code",{children:"vault:<name>:<verb>"})," →"," ",s.jsx("code",{children:"vault.<name>"}),"; otherwise the first colon-prefixed scope's namespace; fallback ",s.jsx("code",{children:"hub"}),"."]})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-expires-in",children:"Expires in (seconds, optional)"}),s.jsx("input",{id:"mint-expires-in",type:"text",inputMode:"numeric",value:g.expiresIn,onChange:C=>y({...g,expiresIn:C.target.value}),placeholder:"default 90d (7776000)"})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-subject",children:"Subject (optional)"}),s.jsx("input",{id:"mint-subject",type:"text",value:g.subject,onChange:C=>y({...g,subject:C.target.value}),placeholder:"defaults to operator's sub"})]}),s.jsxs("div",{className:"row",children:[s.jsx("label",{htmlFor:"mint-permissions",children:"Permissions (JSON object, optional)"}),s.jsx("textarea",{id:"mint-permissions",value:g.permissions,onChange:C=>y({...g,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"?s.jsx("div",{className:"field-error",children:s.jsx("code",{children:v.message})}):null,s.jsxs("div",{className:"actions",children:[s.jsx("button",{type:"submit",disabled:v.kind==="submitting",children:v.kind==="submitting"?"Minting…":"Mint"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>{q(!1),y(Wc),p({kind:"idle"})},children:"Cancel"})]})]})}):null,s.jsxs("div",{style:{marginTop:"1rem",marginBottom:"0.5rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[s.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=>s.jsx("button",{type:"button",onClick:()=>ee("status",C.value),className:r===C.value?void 0:"secondary","aria-pressed":r===C.value,children:C.label},C.value))]}),s.jsxs("div",{style:{marginBottom:"1rem",display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[s.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=>s.jsx("button",{type:"button",onClick:()=>ee("source",C.value),className:o===C.value?void 0:"secondary","aria-pressed":o===C.value,children:C.label},C.value))]}),ay({list:f,revoke:A,setRevoke:T,onConfirm:K,onLoadMore:I,onRetry:()=>j(C=>C+1),loadingMore:Z,filtersActive:r!=="all"||o!=="all"})]})}function ay({list:i,revoke:c,setRevoke:r,onConfirm:o,onLoadMore:f,onRetry:h,loadingMore:b,filtersActive:j}){return i.kind==="loading"?s.jsx("p",{className:"muted","data-loading":"true",children:"Loading…"}):i.kind==="error"?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load tokens: ",s.jsx("code",{children:i.message})]}),s.jsx("button",{type:"button",onClick:h,className:"secondary",children:"Retry"})]}):i.tokens.length===0?j?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No tokens match the current filter."}),s.jsx("p",{className:"muted",children:'Try widening the Status or Source pills above. The default "Show all / All sources" view shows every registry row.'})]}):s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No tokens."}),s.jsxs("p",{className:"muted",children:["Every CLI mint, OAuth grant, and operator-token rotation lands here. Mint one with the form above, or via ",s.jsx("code",{children:"parachute auth mint-token"}),"."]})]}):s.jsxs("div",{"data-route-content":"true",children:[i.tokens.map(v=>{const p=ny(v),g=c.kind==="revoking"&&c.jti===v.jti,y=c.kind==="confirming"&&c.jti===v.jti,A=c.kind==="error"&&c.jti===v.jti?c:null,T=v.user_id??v.subject??"(unknown)";return s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsxs("div",{className:"name",children:[s.jsx("code",{title:v.jti,children:fu(v.jti)}),s.jsx("span",{className:`tag${p==="live"?"":" muted"}`,children:p}),s.jsx("span",{className:`tag source-${sy(v.created_via)}`,title:`created_via: ${v.created_via}`,children:uy(v.created_via)})]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"identity: "}),s.jsx("code",{children:T}),v.client_id?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"muted",children:" · client: "}),s.jsx("code",{children:v.client_id})]}):null]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem"},children:[s.jsx("span",{className:"muted",children:"scope: "}),v.scopes.map((D,q)=>s.jsxs("span",{children:[s.jsx("code",{children:D}),q<v.scopes.length-1?" ":null]},D))]}),s.jsxs("div",{className:"dim",style:{marginTop:"0.25rem",fontSize:"0.82rem"},children:[s.jsx("span",{className:"muted",children:"created "}),s.jsx("code",{title:v.created_at,children:Ic(v.created_at)}),s.jsx("span",{className:"muted",children:" · expires "}),s.jsx("code",{title:v.expires_at,children:Ic(v.expires_at)}),v.revoked_at?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"muted",children:" · revoked "}),s.jsx("code",{title:v.revoked_at,children:Ic(v.revoked_at)})]}):null]}),v.permissions?s.jsxs("details",{style:{marginTop:"0.35rem"},children:[s.jsx("summary",{className:"muted",style:{cursor:"pointer",fontSize:"0.85rem"},children:"permissions"}),s.jsx("pre",{style:{fontSize:"0.82rem",marginTop:"0.25rem"},children:JSON.stringify(v.permissions,null,2)})]}):null,A?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:A.message})}):null,y?s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.5rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm revoke ${fu(v.jti)}`,children:[s.jsxs("p",{children:["Revoke ",s.jsx("code",{children:fu(v.jti)}),"? Resource servers reject within ~60s of the next revocation-list poll. This cannot be undone."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",onClick:()=>{o(v.jti)},disabled:g,children:g?"Revoking…":"Revoke"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>r({kind:"idle"}),disabled:g,children:"Cancel"})]})]}):null]}),!y&&p==="live"?s.jsx("button",{type:"button",className:"secondary",onClick:()=>r({kind:"confirming",jti:v.jti}),"aria-label":`Revoke ${fu(v.jti)}`,children:"Revoke"}):null]},v.jti)}),i.nextCursor?s.jsx("div",{style:{marginTop:"1rem"},children:s.jsx("button",{type:"button",className:"secondary",disabled:b,onClick:()=>{f()},children:b?"Loading…":"Load more"})}):null]})}function ny(i){if(i.revoked_at)return"revoked";const c=new Date(i.expires_at).getTime();return!Number.isNaN(c)&&c<Date.now()?"expired":"live"}function ly(i){return i==="live"||i==="revoked"||i==="all"?i:"all"}function iy(i){return i==="oauth_refresh"||i==="operator_mint"||i==="cli_mint"||i==="all"?i:"all"}function kh(i,c){const r={};return i==="live"?r.revoked="false":i==="revoked"?r.revoked="true":r.revoked="all",c!=="all"&&(r.createdVia=c),r}function uy(i){switch(i){case"oauth_refresh":return"OAuth";case"operator_mint":return"Operator";case"cli_mint":return"CLI";default:return i}}function sy(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 Ic(i){const c=new Date(i);return Number.isNaN(c.getTime())?i:c.toLocaleString()}const ka=12,cy=/^[a-z0-9_-]+$/,gu=2,yu=32,Hh={username:"",password:"",assignedVaults:[]};function vm({username:i,hubOrigin:c}){const r=`${c||""}/login`;return s.jsxs("div",{className:"muted",style:{marginTop:"0.5rem",fontSize:"0.9em"},children:["Send them to ",s.jsx("code",{children:r})," with username ",s.jsx("code",{children:i})," and this password — they'll be prompted to set a new one on first sign-in."]})}function ry(){const[i,c]=S.useState({kind:"loading"}),[r,o]=S.useState(0),[f,h]=S.useState(!1),[b,j]=S.useState(Hh),[v,p]=S.useState({kind:"idle"}),[g,y]=S.useState({kind:"idle"}),[A,T]=S.useState({kind:"idle"}),[D,q]=S.useState({kind:"idle"});S.useEffect(()=>{let K=!1;return c({kind:"loading"}),Promise.all([ng(),cg(),om()]).then(([Y,C,O])=>{if(K)return;const G=O.resolved_issuer.replace(/\/+$/,"");c({kind:"ok",data:{users:Y,vaults:C,hubOrigin:G}})}).catch(Y=>{if(K)return;const C=Y instanceof Error?Y.message:String(Y);c({kind:"error",message:C})}),()=>{K=!0}},[r]);function Z(K){return K.username.length<gu||K.username.length>yu?`Username must be ${gu}-${yu} characters.`:cy.test(K.username)?K.password.length<ka?`Password must be at least ${ka} characters.`:null:"Username may only contain lowercase letters, digits, hyphens, and underscores."}async function V(K){K.preventDefault();const Y=Z(b);if(Y){p({kind:"error",message:Y});return}p({kind:"submitting"});const C={username:b.username,password:b.password,assignedVaults:b.assignedVaults};try{const O=await lg(C);j(Hh),p({kind:"created",username:O.username}),o(G=>G+1)}catch(O){const G=O instanceof X?`Create failed (${O.status}): ${O.message}`:O instanceof Error?O.message:String(O);p({kind:"error",message:G})}}async function ee(K){y({kind:"deleting",userId:K.id});try{const{revocationLagSeconds:Y}=await ig(K.id);y({kind:"done",username:K.username,revocationLagSeconds:Y}),o(C=>C+1)}catch(Y){const C=Y instanceof X?`Delete failed (${Y.status}): ${Y.message}`:Y instanceof Error?Y.message:String(Y);y({kind:"error",userId:K.id,message:C})}}async function I(K,Y){q({kind:"submitting",userId:K.id,selected:Y});try{await sg(K.id,Y),q({kind:"done",userId:K.id,username:K.username}),o(C=>C+1)}catch(C){const O=C instanceof X?`Edit vaults failed (${C.status}): ${C.message}`:C instanceof Error?C.message:String(C);q({kind:"error",userId:K.id,selected:Y,message:O})}}async function ue(K,Y){if(Y.length<ka){T({kind:"error",userId:K.id,password:Y,message:`Password must be at least ${ka} characters.`});return}T({kind:"submitting",userId:K.id,password:Y});try{const{revocationLagSeconds:C}=await ug(K.id,Y);T({kind:"done",userId:K.id,username:K.username,revocationLagSeconds:C}),o(O=>O+1)}catch(C){const O=C instanceof X?`Reset failed (${C.status}): ${C.message}`:C instanceof Error?C.message:String(C);T({kind:"error",userId:K.id,password:Y,message:O})}}return s.jsxs("div",{"data-route-content":"true",children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Users"})}),s.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 ",s.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"?s.jsxs(s.Fragment,{children:[" ","at ",s.jsxs("code",{children:[i.data.hubOrigin,"/login"]})]}):null,"."]}),g.kind==="done"&&s.jsxs("output",{className:"success-banner",style:{display:"block",marginBottom:"0.75rem"},"data-testid":"delete-done-banner",children:["Deleted ",s.jsx("code",{children:g.username}),". Their tokens are revoked. Resource servers (vault, scribe, etc.) cache the revocation list for up to ",g.revocationLagSeconds," ","seconds — if you're deleting because of a suspected compromise, also restart the affected services (e.g. ",s.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately.",s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>y({kind:"idle"}),children:"Dismiss"})})]}),oy(i,g,y,ee,A,T,ue,D,q,I,i.kind==="ok"?i.data.vaults:[],i.kind==="ok"?i.data.hubOrigin:"",()=>o(K=>K+1)),i.kind==="ok"&&s.jsx(my,{show:f,setShow:h,form:b,setForm:j,vaults:i.data.vaults,hubOrigin:i.data.hubOrigin,createState:v,setCreateState:p,onSubmit:V})]})}function oy(i,c,r,o,f,h,b,j,v,p,g,y,A){var q;if(i.kind==="loading")return s.jsx("p",{className:"muted",children:"Loading users…"});if(i.kind==="error")return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"error-banner",children:["Couldn't load users: ",s.jsx("code",{children:i.message})]}),s.jsx("button",{type:"button",onClick:A,className:"secondary",children:"Retry"})]});const{users:T}=i.data;if(T.length===0)return s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No users yet."}),s.jsx("p",{className:"muted",children:"Click Create User below to invite someone."})]});const D=(q=T[0])==null?void 0:q.id;return s.jsx(dy,{users:T,firstAdminId:D,deleteSt:c,setDeleteSt:r,onConfirmDelete:o,resetSt:f,setResetSt:h,onSubmitReset:b,editVaultsSt:j,setEditVaultsSt:v,onSubmitEditVaults:p,availableVaults:g,hubOrigin:y})}function dy({users:i,firstAdminId:c,deleteSt:r,setDeleteSt:o,onConfirmDelete:f,resetSt:h,setResetSt:b,onSubmitReset:j,editVaultsSt:v,setEditVaultsSt:p,onSubmitEditVaults:g,availableVaults:y,hubOrigin:A}){return s.jsx("div",{className:"user-list",style:{marginTop:"1rem"},children:s.jsx("div",{className:"table-scroll",children:s.jsxs("table",{className:"user-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{scope:"col",children:"Username"}),s.jsx("th",{scope:"col",children:"Assigned vaults"}),s.jsx("th",{scope:"col",children:"Password set"}),s.jsx("th",{scope:"col",children:"Created"}),s.jsx("th",{scope:"col",children:"Actions"})]})}),s.jsx("tbody",{children:i.map(T=>{const D=T.id===c,q=r.kind==="deleting"&&r.userId===T.id,Z=r.kind==="confirming"&&r.user.id===T.id,V=r.kind==="error"&&r.userId===T.id?r:null,ee=(h.kind==="open"||h.kind==="submitting"||h.kind==="error")&&h.userId===T.id?h:null,I=h.kind==="done"&&h.userId===T.id?h:null,ue=(v.kind==="open"||v.kind==="submitting"||v.kind==="error")&&v.userId===T.id?v:null,K=v.kind==="done"&&v.userId===T.id?v:null;return s.jsxs("tr",{"data-user-id":T.id,children:[s.jsxs("td",{children:[s.jsx("code",{children:T.username}),D&&s.jsx("span",{className:"badge",style:{marginLeft:"0.5rem"},children:"first admin"})]}),s.jsx("td",{children:T.assigned_vaults.length>0?s.jsx("span",{style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem"},children:T.assigned_vaults.map(Y=>s.jsx("code",{children:Y},Y))}):s.jsx("span",{className:"muted",title:D?"First admin is unrestricted (admin posture)":"No vaults assigned — user can't authorize any vault yet",children:"—"})}),s.jsx("td",{children:T.password_changed?s.jsx("span",{"aria-label":"changed",children:"✓"}):s.jsx("span",{className:"status status-pending",title:"User hasn't completed first-sign-in change-password yet",children:"pending first login"})}),s.jsx("td",{children:s.jsx("span",{title:T.created_at,children:py(T.created_at)})}),s.jsxs("td",{children:[Z?null:s.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"0.5rem",alignItems:"center"},children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{id:`first-admin-tooltip-${T.id}`,className:"sr-only",children:"First admin can't be deleted (would self-lock the hub)"}),s.jsx("span",{id:`first-admin-reset-tooltip-${T.id}`,className:"sr-only",children:"First admin uses /account/change-password directly"}),s.jsx("span",{id:`first-admin-vaults-tooltip-${T.id}`,className:"sr-only",children:"First admin's vault membership is unrestricted by design"})]}),s.jsx("button",{type:"button",className:"secondary",disabled:D||ue!==null||v.kind==="submitting"&&v.userId===T.id,title:D?"First admin's vault membership is unrestricted by design":void 0,"aria-describedby":D?`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"}),s.jsx("button",{type:"button",className:"secondary",disabled:D||ee!==null||h.kind==="submitting"&&h.userId===T.id,title:D?"First admin uses /account/change-password directly":void 0,"aria-describedby":D?`first-admin-reset-tooltip-${T.id}`:void 0,onClick:()=>b({kind:"open",userId:T.id,password:""}),"aria-label":`Reset password for ${T.username}`,children:"Reset password"}),s.jsx("button",{type:"button",className:"secondary",disabled:D||q,title:D?"First admin can't be deleted (would self-lock the hub)":void 0,"aria-describedby":D?`first-admin-tooltip-${T.id}`:void 0,onClick:()=>o({kind:"confirming",user:T}),"aria-label":`Delete ${T.username}`,children:q?"Deleting…":"Delete"})]}),Z&&s.jsxs("dialog",{open:!0,className:"error-banner",style:{marginTop:"0.25rem",background:"var(--bg-warn, #fffbe6)"},"aria-label":`Confirm delete ${T.username}`,children:[s.jsxs("p",{children:["Delete ",s.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 ",s.jsx("code",{children:"revoked_at"})," set, anonymised."]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"button",className:"destructive",onClick:()=>{f(T)},disabled:q,children:q?"Deleting…":"Delete"}),s.jsx("button",{type:"button",className:"secondary",onClick:()=>o({kind:"idle"}),disabled:q,children:"Cancel"})]})]}),V&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:V.message})}),ee&&s.jsx(fy,{user:T,state:ee,onCancel:()=>b({kind:"idle"}),onPasswordChange:Y=>b({kind:"open",userId:T.id,password:Y}),onSubmit:Y=>{j(T,Y)}}),I&&s.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Password reset for ",s.jsx("code",{children:I.username}),". Hand them the new password and tell them they'll be prompted to change it on first sign-in.",s.jsx(vm,{username:I.username,hubOrigin:A}),s.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 ",I.revocationLagSeconds," ","seconds — if you're resetting because of a suspected compromise, also restart the affected services (e.g. ",s.jsx("code",{children:"parachute restart vault"}),") to flush their cache immediately."]}),s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>b({kind:"idle"}),children:"Dismiss"})})]}),ue&&s.jsx(hy,{user:T,state:ue,availableVaults:y,onCancel:()=>p({kind:"idle"}),onSelectedChange:Y=>p({kind:"open",userId:T.id,selected:Y}),onSubmit:Y=>{g(T,Y)}}),K&&s.jsxs("output",{className:"success-banner",style:{marginTop:"0.25rem",display:"block"},children:["Vault assignments updated for ",s.jsx("code",{children:K.username}),".",s.jsx("div",{style:{marginTop:"0.5rem"},children:s.jsx("button",{type:"button",className:"secondary",onClick:()=>p({kind:"idle"}),children:"Dismiss"})})]})]})]},T.id)})})]})})})}function fy({user:i,state:c,onCancel:r,onPasswordChange:o,onSubmit:f}){const h=c.kind==="submitting",b=c.kind==="error"?c.message:null,j=`reset-password-input-${i.id}`;return s.jsxs("form",{onSubmit:v=>{v.preventDefault(),f(c.password)},"aria-label":`Reset password for ${i.username}`,style:{marginTop:"0.5rem",padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[s.jsxs("p",{style:{margin:0},children:[s.jsxs("label",{htmlFor:j,children:["New temporary password for ",s.jsx("code",{children:i.username})," ",s.jsxs("span",{className:"muted",children:["(min ",ka," chars)"]})]}),s.jsx("br",{}),s.jsx("input",{id:j,type:"password",required:!0,autoComplete:"new-password",minLength:ka,value:c.password,disabled:h,onChange:v=>o(v.target.value)})]}),b&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:b})}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:h,children:h?"Setting…":"Set new password"}),s.jsx("button",{type:"button",className:"secondary",onClick:r,disabled:h,children:"Cancel"})]})]})}function hy({user:i,state:c,availableVaults:r,onCancel:o,onSelectedChange:f,onSubmit:h}){const b=c.kind==="submitting",j=c.kind==="error"?c.message:null,v=`edit-vaults-select-${i.id}`;function p(g){const y=Array.from(g.target.selectedOptions).map(A=>A.value);f(y)}return s.jsxs("form",{onSubmit:g=>{g.preventDefault(),h(c.selected)},"aria-label":`Edit vaults for ${i.username}`,style:{marginTop:"0.5rem",padding:"0.5rem",background:"var(--bg-soft, #f5f5f5)",borderRadius:"4px"},children:[s.jsx("p",{style:{margin:0},children:s.jsxs("label",{htmlFor:v,children:["Vault assignments for ",s.jsx("code",{children:i.username})," ",s.jsx("span",{className:"muted",children:"(empty = no narrowing; shift-click to multi-select)"})]})}),c.selected.length>0&&s.jsx("div",{"data-testid":`edit-vaults-chips-${i.id}`,style:{marginTop:"0.4rem",display:"flex",flexWrap:"wrap",gap:"0.25rem"},children:c.selected.map(g=>s.jsx("code",{style:{padding:"0.1rem 0.4rem",borderRadius:"4px"},children:g},g))}),s.jsx("select",{id:v,multiple:!0,value:c.selected,onChange:p,disabled:b,size:Math.min(Math.max(r.length,3),8),style:{marginTop:"0.4rem",minWidth:"12rem"},children:r.map(g=>s.jsx("option",{value:g,children:g},g))}),r.length===0&&s.jsx("p",{className:"muted",style:{marginTop:"0.25rem"},children:"No vaults registered on this hub yet."}),j&&s.jsx("div",{className:"error-banner",style:{marginTop:"0.25rem"},children:s.jsx("code",{children:j})}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:b,children:b?"Saving…":"Save vault assignments"}),s.jsx("button",{type:"button",className:"secondary",onClick:o,disabled:b,children:"Cancel"})]})]})}function my({show:i,setShow:c,form:r,setForm:o,vaults:f,hubOrigin:h,createState:b,setCreateState:j,onSubmit:v}){const p=b.kind==="submitting";return s.jsx("section",{style:{marginTop:"1.5rem"},children:i?s.jsxs("form",{onSubmit:g=>void v(g),"aria-label":"Create user",children:[s.jsx("h3",{children:"Create user"}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-username",children:["Username"," ",s.jsxs("span",{className:"muted",children:["(",gu,"-",yu," chars, lowercase letters/digits/hyphens/ underscores)"]})]}),s.jsx("br",{}),s.jsx("input",{id:"new-user-username",type:"text",required:!0,autoComplete:"off",value:r.username,minLength:gu,maxLength:yu,pattern:"[a-z0-9_\\-]+",onChange:g=>o({...r,username:g.target.value})})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-password",children:["Password ",s.jsxs("span",{className:"muted",children:["(min ",ka," chars)"]})]}),s.jsx("br",{}),s.jsx("input",{id:"new-user-password",type:"password",required:!0,autoComplete:"new-password",value:r.password,minLength:ka,onChange:g=>o({...r,password:g.target.value})})]}),s.jsxs("p",{children:[s.jsxs("label",{htmlFor:"new-user-vaults",children:["Assigned vaults"," ",s.jsx("span",{className:"muted",children:"(empty = no restriction; shift-click to select multiple)"})]}),s.jsx("br",{}),r.assignedVaults.length>0&&s.jsx("span",{"data-testid":"new-user-vault-chips",style:{display:"inline-flex",flexWrap:"wrap",gap:"0.25rem",marginBottom:"0.25rem"},children:r.assignedVaults.map(g=>s.jsx("code",{children:g},g))}),s.jsx("br",{}),s.jsx("select",{id:"new-user-vaults",multiple:!0,value:r.assignedVaults,onChange:g=>o({...r,assignedVaults:Array.from(g.target.selectedOptions).map(y=>y.value)}),size:Math.min(Math.max(f.length,3),8),style:{minWidth:"12rem"},children:f.map(g=>s.jsx("option",{value:g,children:g},g))}),f.length===0&&s.jsx("span",{className:"muted",style:{marginLeft:"0.5rem"},children:"No vaults registered on this hub yet."})]}),b.kind==="error"&&s.jsx("div",{className:"error-banner",children:s.jsx("code",{children:b.message})}),b.kind==="created"&&s.jsxs("output",{className:"success-banner",children:["User ",s.jsx("code",{children:b.username})," created. They'll be prompted to change their password on first sign-in.",s.jsx(vm,{username:b.username,hubOrigin:h})]}),s.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"0.5rem"},children:[s.jsx("button",{type:"submit",disabled:p,children:p?"Creating…":"Create user"}),s.jsx("button",{type:"button",className:"secondary",disabled:p,onClick:()=>{c(!1),j({kind:"idle"})},children:"Close"})]})]}):s.jsx("button",{type:"button",onClick:()=>c(!0),children:"Create User"})})}function py(i){const c=new Date(i);return Number.isNaN(c.getTime())?i:c.toLocaleString()}function Bh(){const[i,c]=S.useState({kind:"loading"}),[r,o]=S.useState(0),[f,h]=S.useState({kind:"idle"}),[b,j]=S.useState(null);async function v(g){if(g.managementUrl){h({kind:"minting",name:g.name});try{const y=await L0(g.name),A=Z0(g.url,g.managementUrl),T=A.includes("#")?"&":"#";window.location.assign(`${A}${T}token=${y.token}`)}catch(y){const A=y instanceof X?`mint failed (${y.status}): ${y.message}`:y instanceof Error?y.message:String(y);h({kind:"error",name:g.name,message:A})}}}if(S.useEffect(()=>{let g=!1;return k0().then(y=>{g||c({kind:"ok",vaults:y.vaults,moduleInstalled:y.moduleInstalled})}).catch(y=>{if(g)return;const A=y instanceof Error?y.message:String(y);c({kind:"error",message:A})}),()=>{g=!0}},[r]),i.kind==="loading")return s.jsxs("div",{children:[s.jsx("div",{className:"list-header",children:s.jsx("h1",{children:"Vaults"})}),s.jsx("p",{className:"muted",children:"Loading…"})]});if(i.kind==="error")return s.jsxs("div",{children:[s.jsxs("div",{className:"list-header",children:[s.jsx("h1",{children:"Vaults"}),s.jsx(Ke,{to:"/vaults/new",children:s.jsx("button",{type:"button",children:"New vault"})})]}),s.jsxs("div",{className:"error-banner",children:["Couldn't load vaults: ",s.jsx("code",{children:i.message})]}),s.jsx("button",{type:"button",onClick:()=>o(g=>g+1),className:"secondary",children:"Retry"})]});const p=i.vaults.length===0&&!i.moduleInstalled;return s.jsxs("div",{"data-route-content":"true",children:[s.jsxs("div",{className:"list-header",children:[s.jsxs("h1",{children:["Vaults (",i.vaults.length,")"]}),p?s.jsx(Ke,{to:"/modules",children:s.jsx("button",{type:"button",children:"Install vault module"})}):s.jsx(Ke,{to:"/vaults/new",children:s.jsx("button",{type:"button",children:"New vault"})})]}),s.jsxs("p",{className:"muted",children:["Vaults registered with this hub at ",s.jsx("code",{children:"/.well-known/parachute.json"}),"."]}),i.vaults.length===0?p?s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No vault module installed."}),s.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."}),s.jsx("p",{style:{marginTop:"0.75rem"},children:s.jsx(Ke,{to:"/modules",children:"Install vault module →"})})]}):s.jsxs("div",{className:"empty empty-rich",children:[s.jsx("p",{className:"empty-headline",children:"No vaults yet."}),s.jsx("p",{className:"muted",children:"Create your first vault to start storing tokens, secrets, and notes scoped to this hub."}),s.jsx("p",{style:{marginTop:"0.75rem"},children:s.jsx(Ke,{to:"/vaults/new",children:"Create a vault →"})})]}):s.jsx("div",{style:{marginTop:"1rem"},children:i.vaults.map(g=>{const y=f.kind==="minting"&&f.name===g.name,A=f.kind==="error"&&f.name===g.name?f:null,T=b===g.name;return s.jsxs("div",{className:"vault-row-group",children:[s.jsxs("div",{className:"vault-row",children:[s.jsxs("div",{className:"body",children:[s.jsxs("div",{className:"name",children:[s.jsx("code",{children:g.name}),s.jsxs("span",{className:"tag muted",title:"Vault version",children:["v",g.version]})]}),s.jsx("div",{className:"dim url",children:s.jsx("code",{children:g.url})}),A?s.jsx("div",{className:"error-banner",style:{marginTop:"0.5rem"},children:s.jsx("code",{children:A.message})}):null]}),s.jsxs("div",{className:"vault-row-actions",children:[s.jsx("button",{type:"button",className:T?void 0:"secondary","aria-expanded":T,"aria-label":`Connect an MCP client to vault ${g.name}`,onClick:()=>j(D=>D===g.name?null:g.name),children:T?"Hide connect":"Connect"}),g.managementUrl?s.jsx("button",{type:"button",onClick:()=>{v(g)},disabled:y,"aria-label":`Manage vault ${g.name}`,children:y?"Opening…":"Manage"}):s.jsx("span",{className:"muted",title:"This vault has no admin SPA — manage with parachute-vault on the host.",children:"CLI only"})]})]}),T?s.jsx(pm,{vaultName:g.name,vaultUrl:g.url}):null]},g.name)})})]})}function gm(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 vy(i){return`${gm(i).split(" ").map(r=>r.length>0?r[0].toUpperCase()+r.slice(1):r).join(" ")} · ${um}`}function gy(){const{pathname:i}=Dt(),c=gm(i),[r,o]=S.useState(null);S.useEffect(()=>{document.title=vy(i)},[i]);const[f,h]=S.useState(!1),[b,j]=S.useState([]);S.useEffect(()=>{let p=!1;return G0().then(g=>{p||o(g)}).catch(()=>{p||o({hasSession:!1})}),()=>{p=!0}},[]),S.useEffect(()=>{if(!r||!r.hasSession)return;let p=!1;return rm().then(g=>{p||j(g.modules.filter(y=>y.installed))}).catch(()=>{p||j([])}),()=>{p=!0}},[r]);async function v(p){h(!0);try{await V0(p),window.location.href="/"}catch{h(!1)}}return s.jsxs("div",{className:"page",children:[s.jsxs("nav",{className:"nav",children:[s.jsxs(Ke,{to:"/vaults",className:"brand",children:[s.jsx(A0,{size:18,idSuffix:"spa-nav",className:"brand-mark-icon"}),s.jsx("span",{className:"brand-wordmark",children:um}),s.jsx("span",{className:"sub",children:c})]}),s.jsx(by,{me:r,signingOut:f,onSignOut:v}),s.jsx(Gn,{to:"/vaults",label:"Vaults",alsoActiveAt:"/"}),s.jsx(Gn,{to:"/modules",label:"Modules"}),s.jsx(yy,{services:b}),s.jsx(Gn,{to:"/users",label:"Users"}),s.jsx(Gn,{to:"/permissions",label:"Permissions"}),s.jsx(Gn,{to:"/tokens",label:"Tokens"}),s.jsx(Gn,{to:"/settings",label:"Settings"}),s.jsx("span",{className:"nav-divider","aria-hidden":"true"}),s.jsx("a",{href:"/",title:"Hub discovery page (top-level)",children:"Discovery"})]}),s.jsxs(Kv,{children:[s.jsx(Ot,{path:"/",element:s.jsx(Bh,{})}),s.jsx(Ot,{path:"/vaults",element:s.jsx(Bh,{})}),s.jsx(Ot,{path:"/vaults/new",element:s.jsx(Jg,{})}),s.jsx(Ot,{path:"/modules",element:s.jsx(kg,{})}),s.jsx(Ot,{path:"/modules/:short/config",element:s.jsx(jg,{})}),s.jsx(Ot,{path:"/users",element:s.jsx(ry,{})}),s.jsx(Ot,{path:"/permissions",element:s.jsx(Fg,{})}),s.jsx(Ot,{path:"/tokens",element:s.jsx(ty,{})}),s.jsx(Ot,{path:"/settings",element:s.jsx(Pg,{})}),s.jsx(Ot,{path:"/approve-client/:clientId",element:s.jsx(mg,{})}),s.jsx(Ot,{path:"*",element:s.jsxs("div",{className:"empty",children:["404 — back to ",s.jsx(Ke,{to:"/vaults",children:"vaults"}),"."]})})]}),r!=null&&r.hasSession?s.jsx(hg,{}):null]})}function Gn({to:i,label:c,alsoActiveAt:r}){const{pathname:o}=Dt(),b=o===i||o.startsWith(`${i}/`)||r!==void 0&&o===r;return s.jsx(Ke,{to:i,className:b?"nav-link nav-link-active":"nav-link","aria-current":b?"page":void 0,children:c})}function yy({services:i}){return i.length===0?null:s.jsxs("details",{className:"nav-dropdown","data-testid":"installed-services-dropdown",children:[s.jsx("summary",{className:"nav-dropdown-summary",children:"Services"}),s.jsx("div",{className:"nav-dropdown-panel",role:"menu",children:i.map(c=>{const r=c.management_url;return r?s.jsx("a",{className:"nav-dropdown-item",href:r,role:"menuitem","data-testid":`nav-service-${c.short}`,children:c.display_name},c.short):s.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-${c.short}`,children:c.display_name},c.short)})})]})}function by({me:i,signingOut:c,onSignOut:r}){return i===null?null:i.hasSession?s.jsxs("span",{className:"auth-spa",children:[s.jsxs("span",{className:"muted",children:["Signed in as ",s.jsx("strong",{children:i.user.displayName})]})," ","·"," ",s.jsx("button",{type:"button",className:"auth-spa-signout",disabled:c,onClick:()=>{r(i.csrf)},children:c?"Signing out…":"Sign out"})]}):s.jsx("a",{href:`/login?next=${encodeURIComponent(window.location.pathname)}`,className:"auth-spa",children:"Sign in"})}const ym=document.getElementById("root");if(!ym)throw new Error("#root not found");function xy(){const i=window.location.pathname;return i==="/admin"||i.startsWith("/admin/")?"/admin":""}W1.createRoot(ym).render(s.jsx(S.StrictMode,{children:s.jsx(b0,{basename:xy(),children:s.jsx(gy,{})})}));
|