night-orch 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/agent-session.d.ts +88 -0
- package/dist/web/agent-session.d.ts.map +1 -0
- package/dist/web/agent-session.js +567 -0
- package/dist/web/agent-session.js.map +1 -0
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/server.js +177 -7
- package/dist/web/server.js.map +1 -1
- package/package.json +1 -1
- package/web/dist/assets/index-k6kgdnzy.js +9 -0
- package/web/dist/assets/index-xm9qPlYB.css +1 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-B4Njl41Z.css +0 -1
- package/web/dist/assets/index-Clvndlnd.js +0 -9
|
@@ -0,0 +1,9 @@
|
|
|
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 g of h.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function i(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=i(f);fetch(f.href,h)}})();function d0(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var xo={exports:{}},ri={};var Bm;function h0(){if(Bm)return ri;Bm=1;var l=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function i(o,f,h){var g=null;if(h!==void 0&&(g=""+h),f.key!==void 0&&(g=""+f.key),"key"in f){h={};for(var v in f)v!=="key"&&(h[v]=f[v])}else h=f;return f=h.ref,{$$typeof:l,type:o,key:g,ref:f!==void 0?f:null,props:h}}return ri.Fragment=c,ri.jsx=i,ri.jsxs=i,ri}var Hm;function m0(){return Hm||(Hm=1,xo.exports=h0()),xo.exports}var u=m0(),So={exports:{}},fe={};var km;function p0(){if(km)return fe;km=1;var l=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function j(R){return R===null||typeof R!="object"?null:(R=x&&R[x]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,w={};function A(R,Y,X){this.props=R,this.context=Y,this.refs=w,this.updater=X||T}A.prototype.isReactComponent={},A.prototype.setState=function(R,Y){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,Y,"setState")},A.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function K(){}K.prototype=A.prototype;function J(R,Y,X){this.props=R,this.context=Y,this.refs=w,this.updater=X||T}var I=J.prototype=new K;I.constructor=J,E(I,A.prototype),I.isPureReactComponent=!0;var P=Array.isArray;function W(){}var Q={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function q(R,Y,X){var F=X.ref;return{$$typeof:l,type:R,key:Y,ref:F!==void 0?F:null,props:X}}function ie(R,Y){return q(R.type,Y,R.props)}function ee(R){return typeof R=="object"&&R!==null&&R.$$typeof===l}function ne(R){var Y={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(X){return Y[X]})}var ge=/\/+/g;function Ge(R,Y){return typeof R=="object"&&R!==null&&R.key!=null?ne(""+R.key):Y.toString(36)}function Re(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(W,W):(R.status="pending",R.then(function(Y){R.status==="pending"&&(R.status="fulfilled",R.value=Y)},function(Y){R.status==="pending"&&(R.status="rejected",R.reason=Y)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function B(R,Y,X,F,re){var oe=typeof R;(oe==="undefined"||oe==="boolean")&&(R=null);var pe=!1;if(R===null)pe=!0;else switch(oe){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(R.$$typeof){case l:case c:pe=!0;break;case S:return pe=R._init,B(pe(R._payload),Y,X,F,re)}}if(pe)return re=re(R),pe=F===""?"."+Ge(R,0):F,P(re)?(X="",pe!=null&&(X=pe.replace(ge,"$&/")+"/"),B(re,Y,X,"",function(dt){return dt})):re!=null&&(ee(re)&&(re=ie(re,X+(re.key==null||R&&R.key===re.key?"":(""+re.key).replace(ge,"$&/")+"/")+pe)),Y.push(re)),1;pe=0;var Ze=F===""?".":F+":";if(P(R))for(var De=0;De<R.length;De++)F=R[De],oe=Ze+Ge(F,De),pe+=B(F,Y,X,oe,re);else if(De=j(R),typeof De=="function")for(R=De.call(R),De=0;!(F=R.next()).done;)F=F.value,oe=Ze+Ge(F,De++),pe+=B(F,Y,X,oe,re);else if(oe==="object"){if(typeof R.then=="function")return B(Re(R),Y,X,F,re);throw Y=String(R),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return pe}function $(R,Y,X){if(R==null)return R;var F=[],re=0;return B(R,F,"","",function(oe){return Y.call(X,oe,re++)}),F}function se(R){if(R._status===-1){var Y=R._result;Y=Y(),Y.then(function(X){(R._status===0||R._status===-1)&&(R._status=1,R._result=X)},function(X){(R._status===0||R._status===-1)&&(R._status=2,R._result=X)}),R._status===-1&&(R._status=0,R._result=Y)}if(R._status===1)return R._result.default;throw R._result}var Te=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},ve={map:$,forEach:function(R,Y,X){$(R,function(){Y.apply(this,arguments)},X)},count:function(R){var Y=0;return $(R,function(){Y++}),Y},toArray:function(R){return $(R,function(Y){return Y})||[]},only:function(R){if(!ee(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return fe.Activity=y,fe.Children=ve,fe.Component=A,fe.Fragment=i,fe.Profiler=f,fe.PureComponent=J,fe.StrictMode=o,fe.Suspense=p,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,fe.__COMPILER_RUNTIME={__proto__:null,c:function(R){return Q.H.useMemoCache(R)}},fe.cache=function(R){return function(){return R.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(R,Y,X){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var F=E({},R.props),re=R.key;if(Y!=null)for(oe in Y.key!==void 0&&(re=""+Y.key),Y)!k.call(Y,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&Y.ref===void 0||(F[oe]=Y[oe]);var oe=arguments.length-2;if(oe===1)F.children=X;else if(1<oe){for(var pe=Array(oe),Ze=0;Ze<oe;Ze++)pe[Ze]=arguments[Ze+2];F.children=pe}return q(R.type,re,F)},fe.createContext=function(R){return R={$$typeof:g,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:h,_context:R},R},fe.createElement=function(R,Y,X){var F,re={},oe=null;if(Y!=null)for(F in Y.key!==void 0&&(oe=""+Y.key),Y)k.call(Y,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(re[F]=Y[F]);var pe=arguments.length-2;if(pe===1)re.children=X;else if(1<pe){for(var Ze=Array(pe),De=0;De<pe;De++)Ze[De]=arguments[De+2];re.children=Ze}if(R&&R.defaultProps)for(F in pe=R.defaultProps,pe)re[F]===void 0&&(re[F]=pe[F]);return q(R,oe,re)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(R){return{$$typeof:v,render:R}},fe.isValidElement=ee,fe.lazy=function(R){return{$$typeof:S,_payload:{_status:-1,_result:R},_init:se}},fe.memo=function(R,Y){return{$$typeof:m,type:R,compare:Y===void 0?null:Y}},fe.startTransition=function(R){var Y=Q.T,X={};Q.T=X;try{var F=R(),re=Q.S;re!==null&&re(X,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(W,Te)}catch(oe){Te(oe)}finally{Y!==null&&X.types!==null&&(Y.types=X.types),Q.T=Y}},fe.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},fe.use=function(R){return Q.H.use(R)},fe.useActionState=function(R,Y,X){return Q.H.useActionState(R,Y,X)},fe.useCallback=function(R,Y){return Q.H.useCallback(R,Y)},fe.useContext=function(R){return Q.H.useContext(R)},fe.useDebugValue=function(){},fe.useDeferredValue=function(R,Y){return Q.H.useDeferredValue(R,Y)},fe.useEffect=function(R,Y){return Q.H.useEffect(R,Y)},fe.useEffectEvent=function(R){return Q.H.useEffectEvent(R)},fe.useId=function(){return Q.H.useId()},fe.useImperativeHandle=function(R,Y,X){return Q.H.useImperativeHandle(R,Y,X)},fe.useInsertionEffect=function(R,Y){return Q.H.useInsertionEffect(R,Y)},fe.useLayoutEffect=function(R,Y){return Q.H.useLayoutEffect(R,Y)},fe.useMemo=function(R,Y){return Q.H.useMemo(R,Y)},fe.useOptimistic=function(R,Y){return Q.H.useOptimistic(R,Y)},fe.useReducer=function(R,Y,X){return Q.H.useReducer(R,Y,X)},fe.useRef=function(R){return Q.H.useRef(R)},fe.useState=function(R){return Q.H.useState(R)},fe.useSyncExternalStore=function(R,Y,X){return Q.H.useSyncExternalStore(R,Y,X)},fe.useTransition=function(){return Q.H.useTransition()},fe.version="19.2.4",fe}var qm;function Ri(){return qm||(qm=1,So.exports=p0()),So.exports}var D=Ri();const os=d0(D);var jo={exports:{}},ui={},No={exports:{}},Ro={};var Ym;function b0(){return Ym||(Ym=1,(function(l){function c(B,$){var se=B.length;B.push($);e:for(;0<se;){var Te=se-1>>>1,ve=B[Te];if(0<f(ve,$))B[Te]=$,B[se]=ve,se=Te;else break e}}function i(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var $=B[0],se=B.pop();if(se!==$){B[0]=se;e:for(var Te=0,ve=B.length,R=ve>>>1;Te<R;){var Y=2*(Te+1)-1,X=B[Y],F=Y+1,re=B[F];if(0>f(X,se))F<ve&&0>f(re,X)?(B[Te]=re,B[F]=se,Te=F):(B[Te]=X,B[Y]=se,Te=Y);else if(F<ve&&0>f(re,se))B[Te]=re,B[F]=se,Te=F;else break e}}return $}function f(B,$){var se=B.sortIndex-$.sortIndex;return se!==0?se:B.id-$.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;l.unstable_now=function(){return h.now()}}else{var g=Date,v=g.now();l.unstable_now=function(){return g.now()-v}}var p=[],m=[],S=1,y=null,x=3,j=!1,T=!1,E=!1,w=!1,A=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,J=typeof setImmediate<"u"?setImmediate:null;function I(B){for(var $=i(m);$!==null;){if($.callback===null)o(m);else if($.startTime<=B)o(m),$.sortIndex=$.expirationTime,c(p,$);else break;$=i(m)}}function P(B){if(E=!1,I(B),!T)if(i(p)!==null)T=!0,W||(W=!0,ne());else{var $=i(m);$!==null&&Re(P,$.startTime-B)}}var W=!1,Q=-1,k=5,q=-1;function ie(){return w?!0:!(l.unstable_now()-q<k)}function ee(){if(w=!1,W){var B=l.unstable_now();q=B;var $=!0;try{e:{T=!1,E&&(E=!1,K(Q),Q=-1),j=!0;var se=x;try{t:{for(I(B),y=i(p);y!==null&&!(y.expirationTime>B&&ie());){var Te=y.callback;if(typeof Te=="function"){y.callback=null,x=y.priorityLevel;var ve=Te(y.expirationTime<=B);if(B=l.unstable_now(),typeof ve=="function"){y.callback=ve,I(B),$=!0;break t}y===i(p)&&o(p),I(B)}else o(p);y=i(p)}if(y!==null)$=!0;else{var R=i(m);R!==null&&Re(P,R.startTime-B),$=!1}}break e}finally{y=null,x=se,j=!1}$=void 0}}finally{$?ne():W=!1}}}var ne;if(typeof J=="function")ne=function(){J(ee)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,Ge=ge.port2;ge.port1.onmessage=ee,ne=function(){Ge.postMessage(null)}}else ne=function(){A(ee,0)};function Re(B,$){Q=A(function(){B(l.unstable_now())},$)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(B){B.callback=null},l.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<B?Math.floor(1e3/B):5},l.unstable_getCurrentPriorityLevel=function(){return x},l.unstable_next=function(B){switch(x){case 1:case 2:case 3:var $=3;break;default:$=x}var se=x;x=$;try{return B()}finally{x=se}},l.unstable_requestPaint=function(){w=!0},l.unstable_runWithPriority=function(B,$){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var se=x;x=B;try{return $()}finally{x=se}},l.unstable_scheduleCallback=function(B,$,se){var Te=l.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Te+se:Te):se=Te,B){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=se+ve,B={id:S++,callback:$,priorityLevel:B,startTime:se,expirationTime:ve,sortIndex:-1},se>Te?(B.sortIndex=se,c(m,B),i(p)===null&&B===i(m)&&(E?(K(Q),Q=-1):E=!0,Re(P,se-Te))):(B.sortIndex=ve,c(p,B),T||j||(T=!0,W||(W=!0,ne()))),B},l.unstable_shouldYield=ie,l.unstable_wrapCallback=function(B){var $=x;return function(){var se=x;x=$;try{return B.apply(this,arguments)}finally{x=se}}}})(Ro)),Ro}var Gm;function g0(){return Gm||(Gm=1,No.exports=b0()),No.exports}var To={exports:{}},yt={};var Vm;function v0(){if(Vm)return yt;Vm=1;var l=Ri();function c(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)m+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(c(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(p,m,S){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:y==null?null:""+y,children:p,containerInfo:m,implementation:S}}var g=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,yt.createPortal=function(p,m){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(c(299));return h(p,m,null,S)},yt.flushSync=function(p){var m=g.T,S=o.p;try{if(g.T=null,o.p=2,p)return p()}finally{g.T=m,o.p=S,o.d.f()}},yt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,o.d.C(p,m))},yt.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},yt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var S=m.as,y=v(S,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,j=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;S==="style"?o.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:j}):S==="script"&&o.d.X(p,{crossOrigin:y,integrity:x,fetchPriority:j,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},yt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var S=v(m.as,m.crossOrigin);o.d.M(p,{crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&o.d.M(p)},yt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var S=m.as,y=v(S,m.crossOrigin);o.d.L(p,S,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},yt.preloadModule=function(p,m){if(typeof p=="string")if(m){var S=v(m.as,m.crossOrigin);o.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:S,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(p)},yt.requestFormReset=function(p){o.d.r(p)},yt.unstable_batchedUpdates=function(p,m){return p(m)},yt.useFormState=function(p,m,S){return g.H.useFormState(p,m,S)},yt.useFormStatus=function(){return g.H.useHostTransitionStatus()},yt.version="19.2.4",yt}var Qm;function wp(){if(Qm)return To.exports;Qm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(c){console.error(c)}}return l(),To.exports=v0(),To.exports}var Xm;function y0(){if(Xm)return ui;Xm=1;var l=g0(),c=Ri(),i=wp();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function v(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 p(e){if(h(e)!==e)throw Error(o(188))}function m(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 s=a.return;if(s===null)break;var r=s.alternate;if(r===null){if(n=s.return,n!==null){a=n;continue}break}if(s.child===r.child){for(r=s.child;r;){if(r===a)return p(s),e;if(r===n)return p(s),t;r=r.sibling}throw Error(o(188))}if(a.return!==n.return)a=s,n=r;else{for(var d=!1,b=s.child;b;){if(b===a){d=!0,a=s,n=r;break}if(b===n){d=!0,n=s,a=r;break}b=b.sibling}if(!d){for(b=r.child;b;){if(b===a){d=!0,a=r,n=s;break}if(b===n){d=!0,n=r,a=s;break}b=b.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 S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),J=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function Ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case A:return"Profiler";case w:return"StrictMode";case P:return"Suspense";case W:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case J:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case I:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:Ge(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return Ge(e(t))}catch{}}return null}var Re=Array.isArray,B=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},Te=[],ve=-1;function R(e){return{current:e}}function Y(e){0>ve||(e.current=Te[ve],Te[ve]=null,ve--)}function X(e,t){ve++,Te[ve]=e.current,e.current=t}var F=R(null),re=R(null),oe=R(null),pe=R(null);function Ze(e,t){switch(X(oe,t),X(re,e),X(F,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?im(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=im(t),e=cm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(F),X(F,e)}function De(){Y(F),Y(re),Y(oe)}function dt(e){e.memoizedState!==null&&X(pe,e);var t=F.current,a=cm(t,e.type);t!==a&&(X(re,e),X(F,a))}function aa(e){re.current===e&&(Y(F),Y(re)),pe.current===e&&(Y(pe),li._currentValue=se)}var na,Vn;function zt(e){if(na===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);na=t&&t[1]||"",Vn=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+na+e+Vn}var Ca=!1;function ha(e,t){if(!e||Ca)return"";Ca=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(U){var L=U}Reflect.construct(e,[],V)}else{try{V.call()}catch(U){L=U}e.call(V.prototype)}}else{try{throw Error()}catch(U){L=U}(V=e())&&typeof V.catch=="function"&&V.catch(function(){})}}catch(U){if(U&&L&&typeof U.stack=="string")return[U.stack,L.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=n.DetermineComponentFrameRoot(),d=r[0],b=r[1];if(d&&b){var N=d.split(`
|
|
4
|
+
`),z=b.split(`
|
|
5
|
+
`);for(s=n=0;n<N.length&&!N[n].includes("DetermineComponentFrameRoot");)n++;for(;s<z.length&&!z[s].includes("DetermineComponentFrameRoot");)s++;if(n===N.length||s===z.length)for(n=N.length-1,s=z.length-1;1<=n&&0<=s&&N[n]!==z[s];)s--;for(;1<=n&&0<=s;n--,s--)if(N[n]!==z[s]){if(n!==1||s!==1)do if(n--,s--,0>s||N[n]!==z[s]){var H=`
|
|
6
|
+
`+N[n].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=n&&0<=s);break}}}finally{Ca=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?zt(a):""}function ma(e,t){switch(e.tag){case 26:case 27:case 5:return zt(e.type);case 16:return zt("Lazy");case 13:return e.child!==t&&t!==null?zt("Suspense Fallback"):zt("Suspense");case 19:return zt("SuspenseList");case 0:case 15:return ha(e.type,!1);case 11:return ha(e.type.render,!1);case 1:return ha(e.type,!0);case 31:return zt("Activity");default:return""}}function st(e){try{var t="",a=null;do t+=ma(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
|
+
Error generating stack: `+n.message+`
|
|
8
|
+
`+n.stack}}var Dt=Object.prototype.hasOwnProperty,la=l.unstable_scheduleCallback,pa=l.unstable_cancelCallback,Qn=l.unstable_shouldYield,vl=l.unstable_requestPaint,he=l.unstable_now,ot=l.unstable_getCurrentPriorityLevel,Nt=l.unstable_ImmediatePriority,yl=l.unstable_UserBlockingPriority,ba=l.unstable_NormalPriority,hs=l.unstable_LowPriority,xl=l.unstable_IdlePriority,hr=l.log,Xn=l.unstable_setDisableYieldValue,Ea=null,ht=null;function ga(e){if(typeof hr=="function"&&Xn(e),ht&&typeof ht.setStrictMode=="function")try{ht.setStrictMode(Ea,e)}catch{}}var it=Math.clz32?Math.clz32:ps,ms=Math.log,Zn=Math.LN2;function ps(e){return e>>>=0,e===0?32:31-(ms(e)/Zn|0)|0}var nn=256,Sl=262144,ln=4194304;function Ma(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 sa(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var s=0,r=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~r,n!==0?s=Ma(n):(d&=b,d!==0?s=Ma(d):a||(a=b&~e,a!==0&&(s=Ma(a))))):(b=n&~r,b!==0?s=Ma(b):d!==0?s=Ma(d):a||(a=n&~e,a!==0&&(s=Ma(a)))),s===0?0:t!==0&&t!==s&&(t&r)===0&&(r=s&-s,a=t&-t,r>=a||r===32&&(a&4194048)!==0)?t:s}function ia(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ca(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 jl(){var e=ln;return ln<<=1,(ln&62914560)===0&&(ln=4194304),e}function Kn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Aa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bs(e,t,a,n,s,r){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 b=e.entanglements,N=e.expirationTimes,z=e.hiddenUpdates;for(a=d&~a;0<a;){var H=31-it(a),V=1<<H;b[H]=0,N[H]=-1;var L=z[H];if(L!==null)for(z[H]=null,H=0;H<L.length;H++){var U=L[H];U!==null&&(U.lane&=-536870913)}a&=~V}n!==0&&Nl(e,n,0),r!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=r&~(d&~t))}function Nl(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-it(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function va(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-it(a),s=1<<n;s&t|e[n]&t&&(e[n]|=t),a&=~s}}function et(e,t){var a=t&-t;return a=(a&42)!==0?1:wa(a),(a&(e.suspendedLanes|t))!==0?0:a}function wa(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 sn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Rl(){var e=$.p;return e!==0?e:(e=window.event,e===void 0?32:Am(e.type))}function Oa(e,t){var a=$.p;try{return $.p=e,t()}finally{$.p=a}}var ya=Math.random().toString(36).slice(2),ke="__reactFiber$"+ya,mt="__reactProps$"+ya,xa="__reactContainer$"+ya,ra="__reactEvents$"+ya,Ci="__reactListeners$"+ya,cn="__reactHandles$"+ya,za="__reactResources$"+ya,rn="__reactMarker$"+ya;function un(e){delete e[ke],delete e[mt],delete e[ra],delete e[Ci],delete e[cn]}function Lt(e){var t=e[ke];if(t)return t;for(var a=e.parentNode;a;){if(t=a[xa]||a[ke]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=mm(e);e!==null;){if(a=e[ke])return a;e=mm(e)}return t}e=a,a=e.parentNode}return null}function xt(e){if(e=e[ke]||e[xa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Qt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function on(e){var t=e[za];return t||(t=e[za]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[rn]=!0}var Ce=new Set,Da={};function La(e,t){Ua(e,t),Ua(e+"Capture",t)}function Ua(e,t){for(Da[e]=t,e=0;e<t.length;e++)Ce.add(t[e])}var Ei=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]*$"),Mi={},gs={};function mr(e){return Dt.call(gs,e)?!0:Dt.call(Mi,e)?!1:Ei.test(e)?gs[e]=!0:(Mi[e]=!0,!1)}function Tl(e,t,a){if(mr(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 _l(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 ua(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 Rt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ai(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pr(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 s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){a=""+d,r.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 vs(e){if(!e._valueTracker){var t=Ai(e)?"checked":"value";e._valueTracker=pr(e,t,""+e[t])}}function wi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=Ai(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Cl(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 br=/[\n"\\]/g;function Tt(e){return e.replace(br,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ys(e,t,a,n,s,r,d,b){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=""+Rt(t)):e.value!==""+Rt(t)&&(e.value=""+Rt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?xs(e,d,Rt(t)):a!=null?xs(e,d,Rt(a)):n!=null&&e.removeAttribute("value"),s==null&&r!=null&&(e.defaultChecked=!!r),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+Rt(b):e.removeAttribute("name")}function Oi(e,t,a,n,s,r,d,b){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||a!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){vs(e);return}a=a!=null?""+Rt(a):"",t=t!=null?""+Rt(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}n=n??s,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=b?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),vs(e)}function xs(e,t,a){t==="number"&&Cl(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function fn(e,t,a,n){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Rt(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function zi(e,t,a){if(t!=null&&(t=""+Rt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Rt(a):""}function Di(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(Re(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Rt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),vs(e)}function dn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var gr=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 Li(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||gr.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function _(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 s in t)n=t[s],t.hasOwnProperty(s)&&a[s]!==n&&Li(e,s,n)}else for(var r in t)t.hasOwnProperty(r)&&Li(e,r,t[r])}function Z(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 _e=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"]]),ct=/^[\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 we(e){return ct.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function de(){}var Fe=null;function rt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xt=null,El=null;function lf(e){var t=xt(e);if(t&&(e=t.stateNode)){var a=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ys(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="'+Tt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var s=n[mt]||null;if(!s)throw Error(o(90));ys(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&wi(n)}break e;case"textarea":zi(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&fn(e,!!a.multiple,t,!1)}}}var vr=!1;function sf(e,t,a){if(vr)return e(t,a);vr=!0;try{var n=e(t);return n}finally{if(vr=!1,(Xt!==null||El!==null)&&(jc(),Xt&&(t=Xt,e=El,El=Xt=null,lf(t),e)))for(t=0;t<e.length;t++)lf(e[t])}}function Ss(e,t){var a=e.stateNode;if(a===null)return null;var n=a[mt]||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 Ba=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yr=!1;if(Ba)try{var js={};Object.defineProperty(js,"passive",{get:function(){yr=!0}}),window.addEventListener("test",js,js),window.removeEventListener("test",js,js)}catch{yr=!1}var hn=null,xr=null,Ui=null;function cf(){if(Ui)return Ui;var e,t=xr,a=t.length,n,s="value"in hn?hn.value:hn.textContent,r=s.length;for(e=0;e<a&&t[e]===s[e];e++);var d=a-e;for(n=1;n<=d&&t[a-n]===s[r-n];n++);return Ui=s.slice(e,1<n?1-n:void 0)}function Bi(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 Hi(){return!0}function rf(){return!1}function _t(e){function t(a,n,s,r,d){this._reactName=a,this._targetInst=s,this.type=n,this.nativeEvent=r,this.target=d,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(a=e[b],this[b]=a?a(r):r[b]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Hi:rf,this.isPropagationStopped=rf,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=Hi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Hi)},persist:function(){},isPersistent:Hi}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ki=_t(Jn),Ns=y({},Jn,{view:0,detail:0}),ob=_t(Ns),Sr,jr,Rs,qi=y({},Ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rr,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!==Rs&&(Rs&&e.type==="mousemove"?(Sr=e.screenX-Rs.screenX,jr=e.screenY-Rs.screenY):jr=Sr=0,Rs=e),Sr)},movementY:function(e){return"movementY"in e?e.movementY:jr}}),uf=_t(qi),fb=y({},qi,{dataTransfer:0}),db=_t(fb),hb=y({},Ns,{relatedTarget:0}),Nr=_t(hb),mb=y({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),pb=_t(mb),bb=y({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gb=_t(bb),vb=y({},Jn,{data:0}),of=_t(vb),yb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xb={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"},Sb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sb[e])?!!t[e]:!1}function Rr(){return jb}var Nb=y({},Ns,{key:function(e){if(e.key){var t=yb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rr,charCode:function(e){return e.type==="keypress"?Bi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Rb=_t(Nb),Tb=y({},qi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ff=_t(Tb),_b=y({},Ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rr}),Cb=_t(_b),Eb=y({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Mb=_t(Eb),Ab=y({},qi,{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}),wb=_t(Ab),Ob=y({},Jn,{newState:0,oldState:0}),zb=_t(Ob),Db=[9,13,27,32],Tr=Ba&&"CompositionEvent"in window,Ts=null;Ba&&"documentMode"in document&&(Ts=document.documentMode);var Lb=Ba&&"TextEvent"in window&&!Ts,df=Ba&&(!Tr||Ts&&8<Ts&&11>=Ts),hf=" ",mf=!1;function pf(e,t){switch(e){case"keyup":return Db.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ml=!1;function Ub(e,t){switch(e){case"compositionend":return bf(t);case"keypress":return t.which!==32?null:(mf=!0,hf);case"textInput":return e=t.data,e===hf&&mf?null:e;default:return null}}function Bb(e,t){if(Ml)return e==="compositionend"||!Tr&&pf(e,t)?(e=cf(),Ui=xr=hn=null,Ml=!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 df&&t.locale!=="ko"?null:t.data;default:return null}}var Hb={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 gf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hb[e.type]:t==="textarea"}function vf(e,t,a,n){Xt?El?El.push(n):El=[n]:Xt=n,t=Mc(t,"onChange"),0<t.length&&(a=new ki("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var _s=null,Cs=null;function kb(e){em(e,0)}function Yi(e){var t=Qt(e);if(wi(t))return e}function yf(e,t){if(e==="change")return t}var xf=!1;if(Ba){var _r;if(Ba){var Cr="oninput"in document;if(!Cr){var Sf=document.createElement("div");Sf.setAttribute("oninput","return;"),Cr=typeof Sf.oninput=="function"}_r=Cr}else _r=!1;xf=_r&&(!document.documentMode||9<document.documentMode)}function jf(){_s&&(_s.detachEvent("onpropertychange",Nf),Cs=_s=null)}function Nf(e){if(e.propertyName==="value"&&Yi(Cs)){var t=[];vf(t,Cs,e,rt(e)),sf(kb,t)}}function qb(e,t,a){e==="focusin"?(jf(),_s=t,Cs=a,_s.attachEvent("onpropertychange",Nf)):e==="focusout"&&jf()}function Yb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Yi(Cs)}function Gb(e,t){if(e==="click")return Yi(t)}function Vb(e,t){if(e==="input"||e==="change")return Yi(t)}function Qb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ut=typeof Object.is=="function"?Object.is:Qb;function Es(e,t){if(Ut(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 s=a[n];if(!Dt.call(t,s)||!Ut(e[s],t[s]))return!1}return!0}function Rf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tf(e,t){var a=Rf(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=Rf(a)}}function _f(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_f(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Cl(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=Cl(e.document)}return t}function Er(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 Xb=Ba&&"documentMode"in document&&11>=document.documentMode,Al=null,Mr=null,Ms=null,Ar=!1;function Ef(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ar||Al==null||Al!==Cl(n)||(n=Al,"selectionStart"in n&&Er(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}),Ms&&Es(Ms,n)||(Ms=n,n=Mc(Mr,"onSelect"),0<n.length&&(t=new ki("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Al)))}function $n(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var wl={animationend:$n("Animation","AnimationEnd"),animationiteration:$n("Animation","AnimationIteration"),animationstart:$n("Animation","AnimationStart"),transitionrun:$n("Transition","TransitionRun"),transitionstart:$n("Transition","TransitionStart"),transitioncancel:$n("Transition","TransitionCancel"),transitionend:$n("Transition","TransitionEnd")},wr={},Mf={};Ba&&(Mf=document.createElement("div").style,"AnimationEvent"in window||(delete wl.animationend.animation,delete wl.animationiteration.animation,delete wl.animationstart.animation),"TransitionEvent"in window||delete wl.transitionend.transition);function In(e){if(wr[e])return wr[e];if(!wl[e])return e;var t=wl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Mf)return wr[e]=t[a];return e}var Af=In("animationend"),wf=In("animationiteration"),Of=In("animationstart"),Zb=In("transitionrun"),Kb=In("transitionstart"),Jb=In("transitioncancel"),zf=In("transitionend"),Df=new Map,Or="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(" ");Or.push("scrollEnd");function oa(e,t){Df.set(e,t),La(t,[e])}var Gi=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)},Zt=[],Ol=0,zr=0;function Vi(){for(var e=Ol,t=zr=Ol=0;t<e;){var a=Zt[t];Zt[t++]=null;var n=Zt[t];Zt[t++]=null;var s=Zt[t];Zt[t++]=null;var r=Zt[t];if(Zt[t++]=null,n!==null&&s!==null){var d=n.pending;d===null?s.next=s:(s.next=d.next,d.next=s),n.pending=s}r!==0&&Lf(a,s,r)}}function Qi(e,t,a,n){Zt[Ol++]=e,Zt[Ol++]=t,Zt[Ol++]=a,Zt[Ol++]=n,zr|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Dr(e,t,a,n){return Qi(e,t,a,n),Xi(e)}function Fn(e,t){return Qi(e,null,null,t),Xi(e)}function Lf(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var s=!1,r=e.return;r!==null;)r.childLanes|=a,n=r.alternate,n!==null&&(n.childLanes|=a),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(s=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,s&&t!==null&&(s=31-it(a),e=r.hiddenUpdates,n=e[s],n===null?e[s]=[t]:n.push(t),t.lane=a|536870912),r):null}function Xi(e){if(50<Fs)throw Fs=0,Vu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zl={};function $b(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 Bt(e,t,a,n){return new $b(e,t,a,n)}function Lr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ha(e,t){var a=e.alternate;return a===null?(a=Bt(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 Uf(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 Zi(e,t,a,n,s,r){var d=0;if(n=e,typeof e=="function")Lr(e)&&(d=1);else if(typeof e=="string")d=e0(e,a,F.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=Bt(31,a,t,s),e.elementType=q,e.lanes=r,e;case E:return Pn(a.children,s,r,t);case w:d=8,s|=24;break;case A:return e=Bt(12,a,t,s|2),e.elementType=A,e.lanes=r,e;case P:return e=Bt(13,a,t,s),e.elementType=P,e.lanes=r,e;case W:return e=Bt(19,a,t,s),e.elementType=W,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J:d=10;break e;case K:d=9;break e;case I:d=11;break e;case Q:d=14;break e;case k:d=16,n=null;break e}d=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=Bt(d,a,t,s),t.elementType=e,t.type=n,t.lanes=r,t}function Pn(e,t,a,n){return e=Bt(7,e,n,t),e.lanes=a,e}function Ur(e,t,a){return e=Bt(6,e,null,t),e.lanes=a,e}function Bf(e){var t=Bt(18,null,null,0);return t.stateNode=e,t}function Br(e,t,a){return t=Bt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Hf=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var a=Hf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:st(t)},Hf.set(e,t),t)}return{value:e,source:t,stack:st(t)}}var Dl=[],Ll=0,Ki=null,As=0,Jt=[],$t=0,mn=null,Sa=1,ja="";function ka(e,t){Dl[Ll++]=As,Dl[Ll++]=Ki,Ki=e,As=t}function kf(e,t,a){Jt[$t++]=Sa,Jt[$t++]=ja,Jt[$t++]=mn,mn=e;var n=Sa;e=ja;var s=32-it(n)-1;n&=~(1<<s),a+=1;var r=32-it(t)+s;if(30<r){var d=s-s%5;r=(n&(1<<d)-1).toString(32),n>>=d,s-=d,Sa=1<<32-it(t)+s|a<<s|n,ja=r+e}else Sa=1<<r|a<<s|n,ja=e}function Hr(e){e.return!==null&&(ka(e,1),kf(e,1,0))}function kr(e){for(;e===Ki;)Ki=Dl[--Ll],Dl[Ll]=null,As=Dl[--Ll],Dl[Ll]=null;for(;e===mn;)mn=Jt[--$t],Jt[$t]=null,ja=Jt[--$t],Jt[$t]=null,Sa=Jt[--$t],Jt[$t]=null}function qf(e,t){Jt[$t++]=Sa,Jt[$t++]=ja,Jt[$t++]=mn,Sa=t.id,ja=t.overflow,mn=e}var pt=null,qe=null,Ne=!1,pn=null,It=!1,qr=Error(o(519));function bn(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ws(Kt(t,e)),qr}function Yf(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[ke]=e,t[mt]=n,a){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(a=0;a<Ws.length;a++)xe(Ws[a],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Oi(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Di(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||lm(t.textContent,a)?(n.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),n.onScroll!=null&&xe("scroll",t),n.onScrollEnd!=null&&xe("scrollend",t),n.onClick!=null&&(t.onclick=de),t=!0):t=!1,t||bn(e,!0)}function Gf(e){for(pt=e.return;pt;)switch(pt.tag){case 5:case 31:case 13:It=!1;return;case 27:case 3:It=!0;return;default:pt=pt.return}}function Ul(e){if(e!==pt)return!1;if(!Ne)return Gf(e),Ne=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||lo(e.type,e.memoizedProps)),a=!a),a&&qe&&bn(e),Gf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));qe=hm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));qe=hm(e)}else t===27?(t=qe,An(e.type)?(e=uo,uo=null,qe=e):qe=t):qe=pt?Pt(e.stateNode.nextSibling):null;return!0}function Wn(){qe=pt=null,Ne=!1}function Yr(){var e=pn;return e!==null&&(At===null?At=e:At.push.apply(At,e),pn=null),e}function ws(e){pn===null?pn=[e]:pn.push(e)}var Gr=R(null),el=null,qa=null;function gn(e,t,a){X(Gr,t._currentValue),t._currentValue=a}function Ya(e){e._currentValue=Gr.current,Y(Gr)}function Vr(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 Qr(e,t,a,n){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var r=s.dependencies;if(r!==null){var d=s.child;r=r.firstContext;e:for(;r!==null;){var b=r;r=s;for(var N=0;N<t.length;N++)if(b.context===t[N]){r.lanes|=a,b=r.alternate,b!==null&&(b.lanes|=a),Vr(r.return,a,e),n||(d=null);break e}r=b.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(o(341));d.lanes|=a,r=d.alternate,r!==null&&(r.lanes|=a),Vr(d,a,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function Bl(e,t,a,n){e=null;for(var s=t,r=!1;s!==null;){if(!r){if((s.flags&524288)!==0)r=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var b=s.type;Ut(s.pendingProps.value,d.value)||(e!==null?e.push(b):e=[b])}}else if(s===pe.current){if(d=s.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(li):e=[li])}s=s.return}e!==null&&Qr(t,e,a,n),t.flags|=262144}function Ji(e){for(e=e.firstContext;e!==null;){if(!Ut(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function tl(e){el=e,qa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function bt(e){return Vf(el,e)}function $i(e,t){return el===null&&tl(e),Vf(e,t)}function Vf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},qa===null){if(e===null)throw Error(o(308));qa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qa=qa.next=t;return a}var Ib=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()})}},Fb=l.unstable_scheduleCallback,Pb=l.unstable_NormalPriority,tt={$$typeof:J,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xr(){return{controller:new Ib,data:new Map,refCount:0}}function Os(e){e.refCount--,e.refCount===0&&Fb(Pb,function(){e.controller.abort()})}var zs=null,Zr=0,Hl=0,kl=null;function Wb(e,t){if(zs===null){var a=zs=[];Zr=0,Hl=$u(),kl={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Zr++,t.then(Qf,Qf),t}function Qf(){if(--Zr===0&&zs!==null){kl!==null&&(kl.status="fulfilled");var e=zs;zs=null,Hl=0,kl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function eg(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(n.status="rejected",n.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),n}var Xf=B.S;B.S=function(e,t){Eh=he(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Wb(e,t),Xf!==null&&Xf(e,t)};var al=R(null);function Kr(){var e=al.current;return e!==null?e:He.pooledCache}function Ii(e,t){t===null?X(al,al.current):X(al,t.pool)}function Zf(){var e=Kr();return e===null?null:{parent:tt._currentValue,pool:e}}var ql=Error(o(460)),Jr=Error(o(474)),Fi=Error(o(542)),Pi={then:function(){}};function Kf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(de,de),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,If(e),e;default:if(typeof t.status=="string")t.then(de,de);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=n}},function(n){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,If(e),e}throw ll=t,ql}}function nl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ll=a,ql):a}}var ll=null;function $f(){if(ll===null)throw Error(o(459));var e=ll;return ll=null,e}function If(e){if(e===ql||e===Fi)throw Error(o(483))}var Yl=null,Ds=0;function Wi(e){var t=Ds;return Ds+=1,Yl===null&&(Yl=[]),Jf(Yl,e,t)}function Ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ec(e,t){throw t.$$typeof===x?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ff(e){function t(M,C){if(e){var O=M.deletions;O===null?(M.deletions=[C],M.flags|=16):O.push(C)}}function a(M,C){if(!e)return null;for(;C!==null;)t(M,C),C=C.sibling;return null}function n(M){for(var C=new Map;M!==null;)M.key!==null?C.set(M.key,M):C.set(M.index,M),M=M.sibling;return C}function s(M,C){return M=Ha(M,C),M.index=0,M.sibling=null,M}function r(M,C,O){return M.index=O,e?(O=M.alternate,O!==null?(O=O.index,O<C?(M.flags|=67108866,C):O):(M.flags|=67108866,C)):(M.flags|=1048576,C)}function d(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function b(M,C,O,G){return C===null||C.tag!==6?(C=Ur(O,M.mode,G),C.return=M,C):(C=s(C,O),C.return=M,C)}function N(M,C,O,G){var ce=O.type;return ce===E?H(M,C,O.props.children,G,O.key):C!==null&&(C.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===k&&nl(ce)===C.type)?(C=s(C,O.props),Ls(C,O),C.return=M,C):(C=Zi(O.type,O.key,O.props,null,M.mode,G),Ls(C,O),C.return=M,C)}function z(M,C,O,G){return C===null||C.tag!==4||C.stateNode.containerInfo!==O.containerInfo||C.stateNode.implementation!==O.implementation?(C=Br(O,M.mode,G),C.return=M,C):(C=s(C,O.children||[]),C.return=M,C)}function H(M,C,O,G,ce){return C===null||C.tag!==7?(C=Pn(O,M.mode,G,ce),C.return=M,C):(C=s(C,O),C.return=M,C)}function V(M,C,O){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=Ur(""+C,M.mode,O),C.return=M,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case j:return O=Zi(C.type,C.key,C.props,null,M.mode,O),Ls(O,C),O.return=M,O;case T:return C=Br(C,M.mode,O),C.return=M,C;case k:return C=nl(C),V(M,C,O)}if(Re(C)||ne(C))return C=Pn(C,M.mode,O,null),C.return=M,C;if(typeof C.then=="function")return V(M,Wi(C),O);if(C.$$typeof===J)return V(M,$i(M,C),O);ec(M,C)}return null}function L(M,C,O,G){var ce=C!==null?C.key:null;if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return ce!==null?null:b(M,C,""+O,G);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case j:return O.key===ce?N(M,C,O,G):null;case T:return O.key===ce?z(M,C,O,G):null;case k:return O=nl(O),L(M,C,O,G)}if(Re(O)||ne(O))return ce!==null?null:H(M,C,O,G,null);if(typeof O.then=="function")return L(M,C,Wi(O),G);if(O.$$typeof===J)return L(M,C,$i(M,O),G);ec(M,O)}return null}function U(M,C,O,G,ce){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return M=M.get(O)||null,b(C,M,""+G,ce);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case j:return M=M.get(G.key===null?O:G.key)||null,N(C,M,G,ce);case T:return M=M.get(G.key===null?O:G.key)||null,z(C,M,G,ce);case k:return G=nl(G),U(M,C,O,G,ce)}if(Re(G)||ne(G))return M=M.get(O)||null,H(C,M,G,ce,null);if(typeof G.then=="function")return U(M,C,O,Wi(G),ce);if(G.$$typeof===J)return U(M,C,O,$i(C,G),ce);ec(C,G)}return null}function te(M,C,O,G){for(var ce=null,Ee=null,ae=C,be=C=0,je=null;ae!==null&&be<O.length;be++){ae.index>be?(je=ae,ae=null):je=ae.sibling;var Me=L(M,ae,O[be],G);if(Me===null){ae===null&&(ae=je);break}e&&ae&&Me.alternate===null&&t(M,ae),C=r(Me,C,be),Ee===null?ce=Me:Ee.sibling=Me,Ee=Me,ae=je}if(be===O.length)return a(M,ae),Ne&&ka(M,be),ce;if(ae===null){for(;be<O.length;be++)ae=V(M,O[be],G),ae!==null&&(C=r(ae,C,be),Ee===null?ce=ae:Ee.sibling=ae,Ee=ae);return Ne&&ka(M,be),ce}for(ae=n(ae);be<O.length;be++)je=U(ae,M,be,O[be],G),je!==null&&(e&&je.alternate!==null&&ae.delete(je.key===null?be:je.key),C=r(je,C,be),Ee===null?ce=je:Ee.sibling=je,Ee=je);return e&&ae.forEach(function(Ln){return t(M,Ln)}),Ne&&ka(M,be),ce}function ue(M,C,O,G){if(O==null)throw Error(o(151));for(var ce=null,Ee=null,ae=C,be=C=0,je=null,Me=O.next();ae!==null&&!Me.done;be++,Me=O.next()){ae.index>be?(je=ae,ae=null):je=ae.sibling;var Ln=L(M,ae,Me.value,G);if(Ln===null){ae===null&&(ae=je);break}e&&ae&&Ln.alternate===null&&t(M,ae),C=r(Ln,C,be),Ee===null?ce=Ln:Ee.sibling=Ln,Ee=Ln,ae=je}if(Me.done)return a(M,ae),Ne&&ka(M,be),ce;if(ae===null){for(;!Me.done;be++,Me=O.next())Me=V(M,Me.value,G),Me!==null&&(C=r(Me,C,be),Ee===null?ce=Me:Ee.sibling=Me,Ee=Me);return Ne&&ka(M,be),ce}for(ae=n(ae);!Me.done;be++,Me=O.next())Me=U(ae,M,be,Me.value,G),Me!==null&&(e&&Me.alternate!==null&&ae.delete(Me.key===null?be:Me.key),C=r(Me,C,be),Ee===null?ce=Me:Ee.sibling=Me,Ee=Me);return e&&ae.forEach(function(f0){return t(M,f0)}),Ne&&ka(M,be),ce}function Be(M,C,O,G){if(typeof O=="object"&&O!==null&&O.type===E&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case j:e:{for(var ce=O.key;C!==null;){if(C.key===ce){if(ce=O.type,ce===E){if(C.tag===7){a(M,C.sibling),G=s(C,O.props.children),G.return=M,M=G;break e}}else if(C.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===k&&nl(ce)===C.type){a(M,C.sibling),G=s(C,O.props),Ls(G,O),G.return=M,M=G;break e}a(M,C);break}else t(M,C);C=C.sibling}O.type===E?(G=Pn(O.props.children,M.mode,G,O.key),G.return=M,M=G):(G=Zi(O.type,O.key,O.props,null,M.mode,G),Ls(G,O),G.return=M,M=G)}return d(M);case T:e:{for(ce=O.key;C!==null;){if(C.key===ce)if(C.tag===4&&C.stateNode.containerInfo===O.containerInfo&&C.stateNode.implementation===O.implementation){a(M,C.sibling),G=s(C,O.children||[]),G.return=M,M=G;break e}else{a(M,C);break}else t(M,C);C=C.sibling}G=Br(O,M.mode,G),G.return=M,M=G}return d(M);case k:return O=nl(O),Be(M,C,O,G)}if(Re(O))return te(M,C,O,G);if(ne(O)){if(ce=ne(O),typeof ce!="function")throw Error(o(150));return O=ce.call(O),ue(M,C,O,G)}if(typeof O.then=="function")return Be(M,C,Wi(O),G);if(O.$$typeof===J)return Be(M,C,$i(M,O),G);ec(M,O)}return typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint"?(O=""+O,C!==null&&C.tag===6?(a(M,C.sibling),G=s(C,O),G.return=M,M=G):(a(M,C),G=Ur(O,M.mode,G),G.return=M,M=G),d(M)):a(M,C)}return function(M,C,O,G){try{Ds=0;var ce=Be(M,C,O,G);return Yl=null,ce}catch(ae){if(ae===ql||ae===Fi)throw ae;var Ee=Bt(29,ae,null,M.mode);return Ee.lanes=G,Ee.return=M,Ee}finally{}}}var sl=Ff(!0),Pf=Ff(!1),vn=!1;function $r(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ir(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 yn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xn(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ae&2)!==0){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,t=Xi(e),Lf(e,null,a),t}return Qi(e,n,t,a),Xi(e)}function Us(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,va(e,a)}}function Fr(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var s=null,r=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};r===null?s=r=d:r=r.next=d,a=a.next}while(a!==null);r===null?s=r=t:r=r.next=t}else s=r=t;a={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:r,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 Pr=!1;function Bs(){if(Pr){var e=kl;if(e!==null)throw e}}function Hs(e,t,a,n){Pr=!1;var s=e.updateQueue;vn=!1;var r=s.firstBaseUpdate,d=s.lastBaseUpdate,b=s.shared.pending;if(b!==null){s.shared.pending=null;var N=b,z=N.next;N.next=null,d===null?r=z:d.next=z,d=N;var H=e.alternate;H!==null&&(H=H.updateQueue,b=H.lastBaseUpdate,b!==d&&(b===null?H.firstBaseUpdate=z:b.next=z,H.lastBaseUpdate=N))}if(r!==null){var V=s.baseState;d=0,H=z=N=null,b=r;do{var L=b.lane&-536870913,U=L!==b.lane;if(U?(Se&L)===L:(n&L)===L){L!==0&&L===Hl&&(Pr=!0),H!==null&&(H=H.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var te=e,ue=b;L=t;var Be=a;switch(ue.tag){case 1:if(te=ue.payload,typeof te=="function"){V=te.call(Be,V,L);break e}V=te;break e;case 3:te.flags=te.flags&-65537|128;case 0:if(te=ue.payload,L=typeof te=="function"?te.call(Be,V,L):te,L==null)break e;V=y({},V,L);break e;case 2:vn=!0}}L=b.callback,L!==null&&(e.flags|=64,U&&(e.flags|=8192),U=s.callbacks,U===null?s.callbacks=[L]:U.push(L))}else U={lane:L,tag:b.tag,payload:b.payload,callback:b.callback,next:null},H===null?(z=H=U,N=V):H=H.next=U,d|=L;if(b=b.next,b===null){if(b=s.shared.pending,b===null)break;U=b,b=U.next,U.next=null,s.lastBaseUpdate=U,s.shared.pending=null}}while(!0);H===null&&(N=V),s.baseState=N,s.firstBaseUpdate=z,s.lastBaseUpdate=H,r===null&&(s.shared.lanes=0),Tn|=d,e.lanes=d,e.memoizedState=V}}function Wf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function ed(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Wf(a[e],t)}var Gl=R(null),tc=R(0);function td(e,t){e=Ia,X(tc,e),X(Gl,t),Ia=e|t.baseLanes}function Wr(){X(tc,Ia),X(Gl,Gl.current)}function eu(){Ia=tc.current,Y(Gl),Y(tc)}var Ht=R(null),Ft=null;function Sn(e){var t=e.alternate;X(Pe,Pe.current&1),X(Ht,e),Ft===null&&(t===null||Gl.current!==null||t.memoizedState!==null)&&(Ft=e)}function tu(e){X(Pe,Pe.current),X(Ht,e),Ft===null&&(Ft=e)}function ad(e){e.tag===22?(X(Pe,Pe.current),X(Ht,e),Ft===null&&(Ft=e)):jn()}function jn(){X(Pe,Pe.current),X(Ht,Ht.current)}function kt(e){Y(Ht),Ft===e&&(Ft=null),Y(Pe)}var Pe=R(0);function ac(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||co(a)||ro(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 Ga=0,me=null,Le=null,at=null,nc=!1,Vl=!1,il=!1,lc=0,ks=0,Ql=null,tg=0;function Je(){throw Error(o(321))}function au(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Ut(e[a],t[a]))return!1;return!0}function nu(e,t,a,n,s,r){return Ga=r,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?kd:vu,il=!1,r=a(n,s),il=!1,Vl&&(r=ld(t,a,n,s)),nd(e),r}function nd(e){B.H=Gs;var t=Le!==null&&Le.next!==null;if(Ga=0,at=Le=me=null,nc=!1,ks=0,Ql=null,t)throw Error(o(300));e===null||nt||(e=e.dependencies,e!==null&&Ji(e)&&(nt=!0))}function ld(e,t,a,n){me=e;var s=0;do{if(Vl&&(Ql=null),ks=0,Vl=!1,25<=s)throw Error(o(301));if(s+=1,at=Le=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}B.H=qd,r=t(a,n)}while(Vl);return r}function ag(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?qs(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(me.flags|=1024),t}function lu(){var e=lc!==0;return lc=0,e}function su(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function iu(e){if(nc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}nc=!1}Ga=0,at=Le=me=null,Vl=!1,ks=lc=0,Ql=null}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?me.memoizedState=at=e:at=at.next=e,at}function We(){if(Le===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=at===null?me.memoizedState:at.next;if(t!==null)at=t,Le=e;else{if(e===null)throw me.alternate===null?Error(o(467)):Error(o(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},at===null?me.memoizedState=at=e:at=at.next=e}return at}function sc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qs(e){var t=ks;return ks+=1,Ql===null&&(Ql=[]),e=Jf(Ql,e,t),t=me,(at===null?t.memoizedState:at.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?kd:vu),e}function ic(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qs(e);if(e.$$typeof===J)return bt(e)}throw Error(o(438,String(e)))}function cu(e){var t=null,a=me.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=me.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=sc(),me.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]=ie;return t.index++,a}function Va(e,t){return typeof t=="function"?t(e):t}function cc(e){var t=We();return ru(t,Le,e)}function ru(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var s=e.baseQueue,r=n.pending;if(r!==null){if(s!==null){var d=s.next;s.next=r.next,r.next=d}t.baseQueue=s=r,n.pending=null}if(r=e.baseState,s===null)e.memoizedState=r;else{t=s.next;var b=d=null,N=null,z=t,H=!1;do{var V=z.lane&-536870913;if(V!==z.lane?(Se&V)===V:(Ga&V)===V){var L=z.revertLane;if(L===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),V===Hl&&(H=!0);else if((Ga&L)===L){z=z.next,L===Hl&&(H=!0);continue}else V={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},N===null?(b=N=V,d=r):N=N.next=V,me.lanes|=L,Tn|=L;V=z.action,il&&a(r,V),r=z.hasEagerState?z.eagerState:a(r,V)}else L={lane:V,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},N===null?(b=N=L,d=r):N=N.next=L,me.lanes|=V,Tn|=V;z=z.next}while(z!==null&&z!==t);if(N===null?d=r:N.next=b,!Ut(r,e.memoizedState)&&(nt=!0,H&&(a=kl,a!==null)))throw a;e.memoizedState=r,e.baseState=d,e.baseQueue=N,n.lastRenderedState=r}return s===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function uu(e){var t=We(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,s=a.pending,r=t.memoizedState;if(s!==null){a.pending=null;var d=s=s.next;do r=e(r,d.action),d=d.next;while(d!==s);Ut(r,t.memoizedState)||(nt=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),a.lastRenderedState=r}return[r,n]}function sd(e,t,a){var n=me,s=We(),r=Ne;if(r){if(a===void 0)throw Error(o(407));a=a()}else a=t();var d=!Ut((Le||s).memoizedState,a);if(d&&(s.memoizedState=a,nt=!0),s=s.queue,du(rd.bind(null,n,s,e),[e]),s.getSnapshot!==t||d||at!==null&&at.memoizedState.tag&1){if(n.flags|=2048,Xl(9,{destroy:void 0},cd.bind(null,n,s,a,t),null),He===null)throw Error(o(349));r||(Ga&127)!==0||id(n,t,a)}return a}function id(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=me.updateQueue,t===null?(t=sc(),me.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function cd(e,t,a,n){t.value=a,t.getSnapshot=n,ud(t)&&od(e)}function rd(e,t,a){return a(function(){ud(t)&&od(e)})}function ud(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Ut(e,a)}catch{return!0}}function od(e){var t=Fn(e,2);t!==null&&wt(t,e,2)}function ou(e){var t=St();if(typeof e=="function"){var a=e;if(e=a(),il){ga(!0);try{a()}finally{ga(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:e},t}function fd(e,t,a,n){return e.baseState=a,ru(e,Le,typeof n=="function"?n:Va)}function ng(e,t,a,n,s){if(oc(e))throw Error(o(485));if(e=t.action,e!==null){var r={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){r.listeners.push(d)}};B.T!==null?a(!0):r.isTransition=!1,n(r),a=t.pending,a===null?(r.next=t.pending=r,dd(t,r)):(r.next=a.next,t.pending=a.next=r)}}function dd(e,t){var a=t.action,n=t.payload,s=e.state;if(t.isTransition){var r=B.T,d={};B.T=d;try{var b=a(s,n),N=B.S;N!==null&&N(d,b),hd(e,t,b)}catch(z){fu(e,t,z)}finally{r!==null&&d.types!==null&&(r.types=d.types),B.T=r}}else try{r=a(s,n),hd(e,t,r)}catch(z){fu(e,t,z)}}function hd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){md(e,t,n)},function(n){return fu(e,t,n)}):md(e,t,a)}function md(e,t,a){t.status="fulfilled",t.value=a,pd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,dd(e,a)))}function fu(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,pd(t),t=t.next;while(t!==n)}e.action=null}function pd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bd(e,t){return t}function gd(e,t){if(Ne){var a=He.formState;if(a!==null){e:{var n=me;if(Ne){if(qe){t:{for(var s=qe,r=It;s.nodeType!==8;){if(!r){s=null;break t}if(s=Pt(s.nextSibling),s===null){s=null;break t}}r=s.data,s=r==="F!"||r==="F"?s:null}if(s){qe=Pt(s.nextSibling),n=s.data==="F!";break e}}bn(n)}n=!1}n&&(t=a[0])}}return a=St(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bd,lastRenderedState:t},a.queue=n,a=Ud.bind(null,me,n),n.dispatch=a,n=ou(!1),r=gu.bind(null,me,!1,n.queue),n=St(),s={state:t,dispatch:null,action:e,pending:null},n.queue=s,a=ng.bind(null,me,s,r,a),s.dispatch=a,n.memoizedState=e,[t,a,!1]}function vd(e){var t=We();return yd(t,Le,e)}function yd(e,t,a){if(t=ru(e,t,bd)[0],e=cc(Va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=qs(t)}catch(d){throw d===ql?Fi:d}else n=t;t=We();var s=t.queue,r=s.dispatch;return a!==t.memoizedState&&(me.flags|=2048,Xl(9,{destroy:void 0},lg.bind(null,s,a),null)),[n,r,e]}function lg(e,t){e.action=t}function xd(e){var t=We(),a=Le;if(a!==null)return yd(t,a,e);We(),t=t.memoizedState,a=We();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function Xl(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=me.updateQueue,t===null&&(t=sc(),me.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 Sd(){return We().memoizedState}function rc(e,t,a,n){var s=St();me.flags|=e,s.memoizedState=Xl(1|t,{destroy:void 0},a,n===void 0?null:n)}function uc(e,t,a,n){var s=We();n=n===void 0?null:n;var r=s.memoizedState.inst;Le!==null&&n!==null&&au(n,Le.memoizedState.deps)?s.memoizedState=Xl(t,r,a,n):(me.flags|=e,s.memoizedState=Xl(1|t,r,a,n))}function jd(e,t){rc(8390656,8,e,t)}function du(e,t){uc(2048,8,e,t)}function sg(e){me.flags|=4;var t=me.updateQueue;if(t===null)t=sc(),me.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Nd(e){var t=We().memoizedState;return sg({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Rd(e,t){return uc(4,2,e,t)}function Td(e,t){return uc(4,4,e,t)}function _d(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 Cd(e,t,a){a=a!=null?a.concat([e]):null,uc(4,4,_d.bind(null,t,e),a)}function hu(){}function Ed(e,t){var a=We();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&au(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Md(e,t){var a=We();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&au(t,n[1]))return n[0];if(n=e(),il){ga(!0);try{e()}finally{ga(!1)}}return a.memoizedState=[n,t],n}function mu(e,t,a){return a===void 0||(Ga&1073741824)!==0&&(Se&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Ah(),me.lanes|=e,Tn|=e,a)}function Ad(e,t,a,n){return Ut(a,t)?a:Gl.current!==null?(e=mu(e,a,n),Ut(e,t)||(nt=!0),e):(Ga&42)===0||(Ga&1073741824)!==0&&(Se&261930)===0?(nt=!0,e.memoizedState=a):(e=Ah(),me.lanes|=e,Tn|=e,t)}function wd(e,t,a,n,s){var r=$.p;$.p=r!==0&&8>r?r:8;var d=B.T,b={};B.T=b,gu(e,!1,t,a);try{var N=s(),z=B.S;if(z!==null&&z(b,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var H=eg(N,n);Ys(e,t,H,Gt(e))}else Ys(e,t,n,Gt(e))}catch(V){Ys(e,t,{then:function(){},status:"rejected",reason:V},Gt())}finally{$.p=r,d!==null&&b.types!==null&&(d.types=b.types),B.T=d}}function ig(){}function pu(e,t,a,n){if(e.tag!==5)throw Error(o(476));var s=Od(e).queue;wd(e,s,t,se,a===null?ig:function(){return zd(e),a(n)})}function Od(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:se},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Va,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function zd(e){var t=Od(e);t.next===null&&(t=e.alternate.memoizedState),Ys(e,t.next.queue,{},Gt())}function bu(){return bt(li)}function Dd(){return We().memoizedState}function Ld(){return We().memoizedState}function cg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Gt();e=yn(a);var n=xn(t,e,a);n!==null&&(wt(n,t,a),Us(n,t,a)),t={cache:Xr()},e.payload=t;return}t=t.return}}function rg(e,t,a){var n=Gt();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},oc(e)?Bd(t,a):(a=Dr(e,t,a,n),a!==null&&(wt(a,e,n),Hd(a,t,n)))}function Ud(e,t,a){var n=Gt();Ys(e,t,a,n)}function Ys(e,t,a,n){var s={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(oc(e))Bd(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var d=t.lastRenderedState,b=r(d,a);if(s.hasEagerState=!0,s.eagerState=b,Ut(b,d))return Qi(e,t,s,0),He===null&&Vi(),!1}catch{}finally{}if(a=Dr(e,t,s,n),a!==null)return wt(a,e,n),Hd(a,t,n),!0}return!1}function gu(e,t,a,n){if(n={lane:2,revertLane:$u(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},oc(e)){if(t)throw Error(o(479))}else t=Dr(e,a,n,2),t!==null&&wt(t,e,2)}function oc(e){var t=e.alternate;return e===me||t!==null&&t===me}function Bd(e,t){Vl=nc=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Hd(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,va(e,a)}}var Gs={readContext:bt,use:ic,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};Gs.useEffectEvent=Je;var kd={readContext:bt,use:ic,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:bt,useEffect:jd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,rc(4194308,4,_d.bind(null,t,e),a)},useLayoutEffect:function(e,t){return rc(4194308,4,e,t)},useInsertionEffect:function(e,t){rc(4,2,e,t)},useMemo:function(e,t){var a=St();t=t===void 0?null:t;var n=e();if(il){ga(!0);try{e()}finally{ga(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=St();if(a!==void 0){var s=a(t);if(il){ga(!0);try{a(t)}finally{ga(!1)}}}else s=t;return n.memoizedState=n.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},n.queue=e,e=e.dispatch=rg.bind(null,me,e),[n.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:function(e){e=ou(e);var t=e.queue,a=Ud.bind(null,me,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:hu,useDeferredValue:function(e,t){var a=St();return mu(a,e,t)},useTransition:function(){var e=ou(!1);return e=wd.bind(null,me,e.queue,!0,!1),St().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=me,s=St();if(Ne){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),He===null)throw Error(o(349));(Se&127)!==0||id(n,t,a)}s.memoizedState=a;var r={value:a,getSnapshot:t};return s.queue=r,jd(rd.bind(null,n,r,e),[e]),n.flags|=2048,Xl(9,{destroy:void 0},cd.bind(null,n,r,a,t),null),a},useId:function(){var e=St(),t=He.identifierPrefix;if(Ne){var a=ja,n=Sa;a=(n&~(1<<32-it(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=lc++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=tg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:bu,useFormState:gd,useActionState:gd,useOptimistic:function(e){var t=St();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=gu.bind(null,me,!0,a),a.dispatch=t,[e,t]},useMemoCache:cu,useCacheRefresh:function(){return St().memoizedState=cg.bind(null,me)},useEffectEvent:function(e){var t=St(),a={impl:e};return t.memoizedState=a,function(){if((Ae&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},vu={readContext:bt,use:ic,useCallback:Ed,useContext:bt,useEffect:du,useImperativeHandle:Cd,useInsertionEffect:Rd,useLayoutEffect:Td,useMemo:Md,useReducer:cc,useRef:Sd,useState:function(){return cc(Va)},useDebugValue:hu,useDeferredValue:function(e,t){var a=We();return Ad(a,Le.memoizedState,e,t)},useTransition:function(){var e=cc(Va)[0],t=We().memoizedState;return[typeof e=="boolean"?e:qs(e),t]},useSyncExternalStore:sd,useId:Dd,useHostTransitionStatus:bu,useFormState:vd,useActionState:vd,useOptimistic:function(e,t){var a=We();return fd(a,Le,e,t)},useMemoCache:cu,useCacheRefresh:Ld};vu.useEffectEvent=Nd;var qd={readContext:bt,use:ic,useCallback:Ed,useContext:bt,useEffect:du,useImperativeHandle:Cd,useInsertionEffect:Rd,useLayoutEffect:Td,useMemo:Md,useReducer:uu,useRef:Sd,useState:function(){return uu(Va)},useDebugValue:hu,useDeferredValue:function(e,t){var a=We();return Le===null?mu(a,e,t):Ad(a,Le.memoizedState,e,t)},useTransition:function(){var e=uu(Va)[0],t=We().memoizedState;return[typeof e=="boolean"?e:qs(e),t]},useSyncExternalStore:sd,useId:Dd,useHostTransitionStatus:bu,useFormState:xd,useActionState:xd,useOptimistic:function(e,t){var a=We();return Le!==null?fd(a,Le,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:cu,useCacheRefresh:Ld};qd.useEffectEvent=Nd;function yu(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 xu={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Gt(),s=yn(n);s.payload=t,a!=null&&(s.callback=a),t=xn(e,s,n),t!==null&&(wt(t,e,n),Us(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Gt(),s=yn(n);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=xn(e,s,n),t!==null&&(wt(t,e,n),Us(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Gt(),n=yn(a);n.tag=2,t!=null&&(n.callback=t),t=xn(e,n,a),t!==null&&(wt(t,e,a),Us(t,e,a))}};function Yd(e,t,a,n,s,r,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,r,d):t.prototype&&t.prototype.isPureReactComponent?!Es(a,n)||!Es(s,r):!0}function Gd(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&&xu.enqueueReplaceState(t,t.state,null)}function cl(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 s in e)a[s]===void 0&&(a[s]=e[s])}return a}function Vd(e){Gi(e)}function Qd(e){console.error(e)}function Xd(e){Gi(e)}function fc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Zd(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Su(e,t,a){return a=yn(a),a.tag=3,a.payload={element:null},a.callback=function(){fc(e,t)},a}function Kd(e){return e=yn(e),e.tag=3,e}function Jd(e,t,a,n){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var r=n.value;e.payload=function(){return s(r)},e.callback=function(){Zd(t,a,n)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Zd(t,a,n),typeof s!="function"&&(_n===null?_n=new Set([this]):_n.add(this));var b=n.stack;this.componentDidCatch(n.value,{componentStack:b!==null?b:""})})}function ug(e,t,a,n,s){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Bl(t,a,s,!0),a=Ht.current,a!==null){switch(a.tag){case 31:case 13:return Ft===null?Nc():a.alternate===null&&$e===0&&($e=3),a.flags&=-257,a.flags|=65536,a.lanes=s,n===Pi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Zu(e,n,s)),!1;case 22:return a.flags|=65536,n===Pi?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)),Zu(e,n,s)),!1}throw Error(o(435,a.tag))}return Zu(e,n,s),Nc(),!1}if(Ne)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,n!==qr&&(e=Error(o(422),{cause:n}),ws(Kt(e,a)))):(n!==qr&&(t=Error(o(423),{cause:n}),ws(Kt(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,n=Kt(n,a),s=Su(e.stateNode,n,s),Fr(e,s),$e!==4&&($e=2)),!1;var r=Error(o(520),{cause:n});if(r=Kt(r,a),Is===null?Is=[r]:Is.push(r),$e!==4&&($e=2),t===null)return!0;n=Kt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Su(a.stateNode,n,e),Fr(a,e),!1;case 1:if(t=a.type,r=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(_n===null||!_n.has(r))))return a.flags|=65536,s&=-s,a.lanes|=s,s=Kd(s),Jd(s,e,a,n),Fr(a,s),!1}a=a.return}while(a!==null);return!1}var ju=Error(o(461)),nt=!1;function gt(e,t,a,n){t.child=e===null?Pf(t,null,a,n):sl(t,e.child,a,n)}function $d(e,t,a,n,s){a=a.render;var r=t.ref;if("ref"in n){var d={};for(var b in n)b!=="ref"&&(d[b]=n[b])}else d=n;return tl(t),n=nu(e,t,a,d,r,s),b=lu(),e!==null&&!nt?(su(e,t,s),Qa(e,t,s)):(Ne&&b&&Hr(t),t.flags|=1,gt(e,t,n,s),t.child)}function Id(e,t,a,n,s){if(e===null){var r=a.type;return typeof r=="function"&&!Lr(r)&&r.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=r,Fd(e,t,r,n,s)):(e=Zi(a.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!Au(e,s)){var d=r.memoizedProps;if(a=a.compare,a=a!==null?a:Es,a(d,n)&&e.ref===t.ref)return Qa(e,t,s)}return t.flags|=1,e=Ha(r,n),e.ref=t.ref,e.return=t,t.child=e}function Fd(e,t,a,n,s){if(e!==null){var r=e.memoizedProps;if(Es(r,n)&&e.ref===t.ref)if(nt=!1,t.pendingProps=n=r,Au(e,s))(e.flags&131072)!==0&&(nt=!0);else return t.lanes=e.lanes,Qa(e,t,s)}return Nu(e,t,a,n,s)}function Pd(e,t,a,n){var s=n.children,r=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(r=r!==null?r.baseLanes|a:a,e!==null){for(n=t.child=e.child,s=0;n!==null;)s=s|n.lanes|n.childLanes,n=n.sibling;n=s&~r}else n=0,t.child=null;return Wd(e,t,r,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ii(t,r!==null?r.cachePool:null),r!==null?td(t,r):Wr(),ad(t);else return n=t.lanes=536870912,Wd(e,t,r!==null?r.baseLanes|a:a,a,n)}else r!==null?(Ii(t,r.cachePool),td(t,r),jn(),t.memoizedState=null):(e!==null&&Ii(t,null),Wr(),jn());return gt(e,t,s,a),t.child}function Vs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Wd(e,t,a,n,s){var r=Kr();return r=r===null?null:{parent:tt._currentValue,pool:r},t.memoizedState={baseLanes:a,cachePool:r},e!==null&&Ii(t,null),Wr(),ad(t),e!==null&&Bl(e,t,n,!0),t.childLanes=s,null}function dc(e,t){return t=mc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function eh(e,t,a){return sl(t,e.child,null,a),e=dc(t,t.pendingProps),e.flags|=2,kt(t),t.memoizedState=null,e}function og(e,t,a){var n=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(n.mode==="hidden")return e=dc(t,n),t.lanes=536870912,Vs(null,e);if(tu(t),(e=qe)?(e=dm(e,It),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mn!==null?{id:Sa,overflow:ja}:null,retryLane:536870912,hydrationErrors:null},a=Bf(e),a.return=t,t.child=a,pt=t,qe=null)):e=null,e===null)throw bn(t);return t.lanes=536870912,null}return dc(t,n)}var r=e.memoizedState;if(r!==null){var d=r.dehydrated;if(tu(t),s)if(t.flags&256)t.flags&=-257,t=eh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(nt||Bl(e,t,a,!1),s=(a&e.childLanes)!==0,nt||s){if(n=He,n!==null&&(d=et(n,a),d!==0&&d!==r.retryLane))throw r.retryLane=d,Fn(e,d),wt(n,e,d),ju;Nc(),t=eh(e,t,a)}else e=r.treeContext,qe=Pt(d.nextSibling),pt=t,Ne=!0,pn=null,It=!1,e!==null&&qf(t,e),t=dc(t,n),t.flags|=4096;return t}return e=Ha(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function hc(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 Nu(e,t,a,n,s){return tl(t),a=nu(e,t,a,n,void 0,s),n=lu(),e!==null&&!nt?(su(e,t,s),Qa(e,t,s)):(Ne&&n&&Hr(t),t.flags|=1,gt(e,t,a,s),t.child)}function th(e,t,a,n,s,r){return tl(t),t.updateQueue=null,a=ld(t,n,a,s),nd(e),n=lu(),e!==null&&!nt?(su(e,t,r),Qa(e,t,r)):(Ne&&n&&Hr(t),t.flags|=1,gt(e,t,a,r),t.child)}function ah(e,t,a,n,s){if(tl(t),t.stateNode===null){var r=zl,d=a.contextType;typeof d=="object"&&d!==null&&(r=bt(d)),r=new a(n,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=xu,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=n,r.state=t.memoizedState,r.refs={},$r(t),d=a.contextType,r.context=typeof d=="object"&&d!==null?bt(d):zl,r.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(yu(t,a,d,n),r.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(d=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),d!==r.state&&xu.enqueueReplaceState(r,r.state,null),Hs(t,n,r,s),Bs(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){r=t.stateNode;var b=t.memoizedProps,N=cl(a,b);r.props=N;var z=r.context,H=a.contextType;d=zl,typeof H=="object"&&H!==null&&(d=bt(H));var V=a.getDerivedStateFromProps;H=typeof V=="function"||typeof r.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,H||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(b||z!==d)&&Gd(t,r,n,d),vn=!1;var L=t.memoizedState;r.state=L,Hs(t,n,r,s),Bs(),z=t.memoizedState,b||L!==z||vn?(typeof V=="function"&&(yu(t,a,V,n),z=t.memoizedState),(N=vn||Yd(t,a,N,n,L,z,d))?(H||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=z),r.props=n,r.state=z,r.context=d,n=N):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{r=t.stateNode,Ir(e,t),d=t.memoizedProps,H=cl(a,d),r.props=H,V=t.pendingProps,L=r.context,z=a.contextType,N=zl,typeof z=="object"&&z!==null&&(N=bt(z)),b=a.getDerivedStateFromProps,(z=typeof b=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(d!==V||L!==N)&&Gd(t,r,n,N),vn=!1,L=t.memoizedState,r.state=L,Hs(t,n,r,s),Bs();var U=t.memoizedState;d!==V||L!==U||vn||e!==null&&e.dependencies!==null&&Ji(e.dependencies)?(typeof b=="function"&&(yu(t,a,b,n),U=t.memoizedState),(H=vn||Yd(t,a,H,n,L,U,N)||e!==null&&e.dependencies!==null&&Ji(e.dependencies))?(z||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(n,U,N),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(n,U,N)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=U),r.props=n,r.state=U,r.context=N,n=H):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),n=!1)}return r=n,hc(e,t),n=(t.flags&128)!==0,r||n?(r=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&n?(t.child=sl(t,e.child,null,s),t.child=sl(t,null,a,s)):gt(e,t,a,s),t.memoizedState=r.state,e=t.child):e=Qa(e,t,s),e}function nh(e,t,a,n){return Wn(),t.flags|=256,gt(e,t,a,n),t.child}var Ru={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tu(e){return{baseLanes:e,cachePool:Zf()}}function _u(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Yt),e}function lh(e,t,a){var n=t.pendingProps,s=!1,r=(t.flags&128)!==0,d;if((d=r)||(d=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(s?Sn(t):jn(),(e=qe)?(e=dm(e,It),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:mn!==null?{id:Sa,overflow:ja}:null,retryLane:536870912,hydrationErrors:null},a=Bf(e),a.return=t,t.child=a,pt=t,qe=null)):e=null,e===null)throw bn(t);return ro(e)?t.lanes=32:t.lanes=536870912,null}var b=n.children;return n=n.fallback,s?(jn(),s=t.mode,b=mc({mode:"hidden",children:b},s),n=Pn(n,s,a,null),b.return=t,n.return=t,b.sibling=n,t.child=b,n=t.child,n.memoizedState=Tu(a),n.childLanes=_u(e,d,a),t.memoizedState=Ru,Vs(null,n)):(Sn(t),Cu(t,b))}var N=e.memoizedState;if(N!==null&&(b=N.dehydrated,b!==null)){if(r)t.flags&256?(Sn(t),t.flags&=-257,t=Eu(e,t,a)):t.memoizedState!==null?(jn(),t.child=e.child,t.flags|=128,t=null):(jn(),b=n.fallback,s=t.mode,n=mc({mode:"visible",children:n.children},s),b=Pn(b,s,a,null),b.flags|=2,n.return=t,b.return=t,n.sibling=b,t.child=n,sl(t,e.child,null,a),n=t.child,n.memoizedState=Tu(a),n.childLanes=_u(e,d,a),t.memoizedState=Ru,t=Vs(null,n));else if(Sn(t),ro(b)){if(d=b.nextSibling&&b.nextSibling.dataset,d)var z=d.dgst;d=z,n=Error(o(419)),n.stack="",n.digest=d,ws({value:n,source:null,stack:null}),t=Eu(e,t,a)}else if(nt||Bl(e,t,a,!1),d=(a&e.childLanes)!==0,nt||d){if(d=He,d!==null&&(n=et(d,a),n!==0&&n!==N.retryLane))throw N.retryLane=n,Fn(e,n),wt(d,e,n),ju;co(b)||Nc(),t=Eu(e,t,a)}else co(b)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,qe=Pt(b.nextSibling),pt=t,Ne=!0,pn=null,It=!1,e!==null&&qf(t,e),t=Cu(t,n.children),t.flags|=4096);return t}return s?(jn(),b=n.fallback,s=t.mode,N=e.child,z=N.sibling,n=Ha(N,{mode:"hidden",children:n.children}),n.subtreeFlags=N.subtreeFlags&65011712,z!==null?b=Ha(z,b):(b=Pn(b,s,a,null),b.flags|=2),b.return=t,n.return=t,n.sibling=b,t.child=n,Vs(null,n),n=t.child,b=e.child.memoizedState,b===null?b=Tu(a):(s=b.cachePool,s!==null?(N=tt._currentValue,s=s.parent!==N?{parent:N,pool:N}:s):s=Zf(),b={baseLanes:b.baseLanes|a,cachePool:s}),n.memoizedState=b,n.childLanes=_u(e,d,a),t.memoizedState=Ru,Vs(e.child,n)):(Sn(t),a=e.child,e=a.sibling,a=Ha(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 Cu(e,t){return t=mc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function mc(e,t){return e=Bt(22,e,null,t),e.lanes=0,e}function Eu(e,t,a){return sl(t,e.child,null,a),e=Cu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sh(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Vr(e.return,t,a)}function Mu(e,t,a,n,s,r){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:s,treeForkCount:r}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=a,d.tailMode=s,d.treeForkCount=r)}function ih(e,t,a){var n=t.pendingProps,s=n.revealOrder,r=n.tail;n=n.children;var d=Pe.current,b=(d&2)!==0;if(b?(d=d&1|2,t.flags|=128):d&=1,X(Pe,d),gt(e,t,n,a),n=Ne?As:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sh(e,a,t);else if(e.tag===19)sh(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(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&ac(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Mu(t,!1,s,a,r,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ac(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Mu(t,!0,a,null,r,n);break;case"together":Mu(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Qa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Tn|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Bl(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=Ha(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ha(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Au(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ji(e)))}function fg(e,t,a){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),gn(t,tt,e.memoizedState.cache),Wn();break;case 27:case 5:dt(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:gn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,tu(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Sn(t),t.flags|=128,null):(a&t.child.childLanes)!==0?lh(e,t,a):(Sn(t),e=Qa(e,t,a),e!==null?e.sibling:null);Sn(t);break;case 19:var s=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Bl(e,t,a,!1),n=(a&t.childLanes)!==0),s){if(n)return ih(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),X(Pe,Pe.current),n)break;return null;case 22:return t.lanes=0,Pd(e,t,a,t.pendingProps);case 24:gn(t,tt,e.memoizedState.cache)}return Qa(e,t,a)}function ch(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)nt=!0;else{if(!Au(e,a)&&(t.flags&128)===0)return nt=!1,fg(e,t,a);nt=(e.flags&131072)!==0}else nt=!1,Ne&&(t.flags&1048576)!==0&&kf(t,As,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=nl(t.elementType),t.type=e,typeof e=="function")Lr(e)?(n=cl(e,n),t.tag=1,t=ah(null,t,e,n,a)):(t.tag=0,t=Nu(null,t,e,n,a));else{if(e!=null){var s=e.$$typeof;if(s===I){t.tag=11,t=$d(null,t,e,n,a);break e}else if(s===Q){t.tag=14,t=Id(null,t,e,n,a);break e}}throw t=Ge(e)||e,Error(o(306,t,""))}}return t;case 0:return Nu(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,s=cl(n,t.pendingProps),ah(e,t,n,s,a);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var r=t.memoizedState;s=r.element,Ir(e,t),Hs(t,n,null,a);var d=t.memoizedState;if(n=d.cache,gn(t,tt,n),n!==r.cache&&Qr(t,[tt],a,!0),Bs(),n=d.element,r.isDehydrated)if(r={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=nh(e,t,n,a);break e}else if(n!==s){s=Kt(Error(o(424)),t),ws(s),t=nh(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(qe=Pt(e.firstChild),pt=t,Ne=!0,pn=null,It=!0,a=Pf(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Wn(),n===s){t=Qa(e,t,a);break e}gt(e,t,n,a)}t=t.child}return t;case 26:return hc(e,t),e===null?(a=vm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ne||(a=t.type,e=t.pendingProps,n=Ac(oe.current).createElement(a),n[ke]=t,n[mt]=e,vt(n,a,e),Ke(n),t.stateNode=n):t.memoizedState=vm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return dt(t),e===null&&Ne&&(n=t.stateNode=pm(t.type,t.pendingProps,oe.current),pt=t,It=!0,s=qe,An(t.type)?(uo=s,qe=Pt(n.firstChild)):qe=s),gt(e,t,t.pendingProps.children,a),hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((s=n=qe)&&(n=Yg(n,t.type,t.pendingProps,It),n!==null?(t.stateNode=n,pt=t,qe=Pt(n.firstChild),It=!1,s=!0):s=!1),s||bn(t)),dt(t),s=t.type,r=t.pendingProps,d=e!==null?e.memoizedProps:null,n=r.children,lo(s,r)?n=null:d!==null&&lo(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=nu(e,t,ag,null,null,a),li._currentValue=s),hc(e,t),gt(e,t,n,a),t.child;case 6:return e===null&&Ne&&((e=a=qe)&&(a=Gg(a,t.pendingProps,It),a!==null?(t.stateNode=a,pt=t,qe=null,e=!0):e=!1),e||bn(t)),null;case 13:return lh(e,t,a);case 4:return Ze(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=sl(t,null,n,a):gt(e,t,n,a),t.child;case 11:return $d(e,t,t.type,t.pendingProps,a);case 7:return gt(e,t,t.pendingProps,a),t.child;case 8:return gt(e,t,t.pendingProps.children,a),t.child;case 12:return gt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,gn(t,t.type,n.value),gt(e,t,n.children,a),t.child;case 9:return s=t.type._context,n=t.pendingProps.children,tl(t),s=bt(s),n=n(s),t.flags|=1,gt(e,t,n,a),t.child;case 14:return Id(e,t,t.type,t.pendingProps,a);case 15:return Fd(e,t,t.type,t.pendingProps,a);case 19:return ih(e,t,a);case 31:return og(e,t,a);case 22:return Pd(e,t,a,t.pendingProps);case 24:return tl(t),n=bt(tt),e===null?(s=Kr(),s===null&&(s=He,r=Xr(),s.pooledCache=r,r.refCount++,r!==null&&(s.pooledCacheLanes|=a),s=r),t.memoizedState={parent:n,cache:s},$r(t),gn(t,tt,s)):((e.lanes&a)!==0&&(Ir(e,t),Hs(t,null,null,a),Bs()),s=e.memoizedState,r=t.memoizedState,s.parent!==n?(s={parent:n,cache:n},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),gn(t,tt,n)):(n=r.cache,gn(t,tt,n),n!==s.cache&&Qr(t,[tt],a,!0))),gt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Xa(e){e.flags|=4}function wu(e,t,a,n,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Dh())e.flags|=8192;else throw ll=Pi,Jr}else e.flags&=-16777217}function rh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Nm(t))if(Dh())e.flags|=8192;else throw ll=Pi,Jr}function pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jl():536870912,e.lanes|=t,$l|=t)}function Qs(e,t){if(!Ne)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 Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags&65011712,n|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function dg(e,t,a){var n=t.pendingProps;switch(kr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ya(tt),De(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ul(t)?Xa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Yr())),Ye(t),null;case 26:var s=t.type,r=t.memoizedState;return e===null?(Xa(t),r!==null?(Ye(t),rh(t,r)):(Ye(t),wu(t,s,null,n,a))):r?r!==e.memoizedState?(Xa(t),Ye(t),rh(t,r)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Xa(t),Ye(t),wu(t,s,e,n,a)),null;case 27:if(aa(t),a=oe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Xa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ye(t),null}e=F.current,Ul(t)?Yf(t):(e=pm(s,n,a),t.stateNode=e,Xa(t))}return Ye(t),null;case 5:if(aa(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Xa(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ye(t),null}if(r=F.current,Ul(t))Yf(t);else{var d=Ac(oe.current);switch(r){case 1:r=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:r=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":r=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":r=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":r=d.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?r.multiple=!0:n.size&&(r.size=n.size);break;default:r=typeof n.is=="string"?d.createElement(s,{is:n.is}):d.createElement(s)}}r[ke]=t,r[mt]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)r.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=r;e:switch(vt(r,s,n),s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Xa(t)}}return Ye(t),wu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Xa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=oe.current,Ul(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,s=pt,s!==null)switch(s.tag){case 27:case 5:n=s.memoizedProps}e[ke]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||lm(e.nodeValue,a)),e||bn(t,!0)}else e=Ac(e).createTextNode(n),e[ke]=t,t.stateNode=e}return Ye(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Ul(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[ke]=t}else Wn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else a=Yr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(kt(t),t):(kt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ye(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ul(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(o(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));s[ke]=t}else Wn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),s=!1}else s=Yr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(kt(t),t):(kt(t),null)}return kt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,s=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(s=n.alternate.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==s&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),pc(t,t.updateQueue),Ye(t),null);case 4:return De(),e===null&&Wu(t.stateNode.containerInfo),Ye(t),null;case 10:return Ya(t.type),Ye(t),null;case 19:if(Y(Pe),n=t.memoizedState,n===null)return Ye(t),null;if(s=(t.flags&128)!==0,r=n.rendering,r===null)if(s)Qs(n,!1);else{if($e!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=ac(e),r!==null){for(t.flags|=128,Qs(n,!1),e=r.updateQueue,t.updateQueue=e,pc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Uf(a,e),a=a.sibling;return X(Pe,Pe.current&1|2),Ne&&ka(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&he()>xc&&(t.flags|=128,s=!0,Qs(n,!1),t.lanes=4194304)}else{if(!s)if(e=ac(r),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,pc(t,e),Qs(n,!0),n.tail===null&&n.tailMode==="hidden"&&!r.alternate&&!Ne)return Ye(t),null}else 2*he()-n.renderingStartTime>xc&&a!==536870912&&(t.flags|=128,s=!0,Qs(n,!1),t.lanes=4194304);n.isBackwards?(r.sibling=t.child,t.child=r):(e=n.last,e!==null?e.sibling=r:t.child=r,n.last=r)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=he(),e.sibling=null,a=Pe.current,X(Pe,s?a&1|2:a&1),Ne&&ka(t,n.treeForkCount),e):(Ye(t),null);case 22:case 23:return kt(t),eu(),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&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),a=t.updateQueue,a!==null&&pc(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&&Y(al),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ya(tt),Ye(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function hg(e,t){switch(kr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ya(tt),De(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return aa(t),null;case 31:if(t.memoizedState!==null){if(kt(t),t.alternate===null)throw Error(o(340));Wn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Wn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Pe),null;case 4:return De(),null;case 10:return Ya(t.type),null;case 22:case 23:return kt(t),eu(),e!==null&&Y(al),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ya(tt),null;case 25:return null;default:return null}}function uh(e,t){switch(kr(t),t.tag){case 3:Ya(tt),De();break;case 26:case 27:case 5:aa(t);break;case 4:De();break;case 31:t.memoizedState!==null&&kt(t);break;case 13:kt(t);break;case 19:Y(Pe);break;case 10:Ya(t.type);break;case 22:case 23:kt(t),eu(),e!==null&&Y(al);break;case 24:Ya(tt)}}function Xs(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var s=n.next;a=s;do{if((a.tag&e)===e){n=void 0;var r=a.create,d=a.inst;n=r(),d.destroy=n}a=a.next}while(a!==s)}}catch(b){ze(t,t.return,b)}}function Nn(e,t,a){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var r=s.next;n=r;do{if((n.tag&e)===e){var d=n.inst,b=d.destroy;if(b!==void 0){d.destroy=void 0,s=t;var N=a,z=b;try{z()}catch(H){ze(s,N,H)}}}n=n.next}while(n!==r)}}catch(H){ze(t,t.return,H)}}function oh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{ed(t,a)}catch(n){ze(e,e.return,n)}}}function fh(e,t,a){a.props=cl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ze(e,t,n)}}function Zs(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(s){ze(e,t,s)}}function Na(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(s){ze(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){ze(e,t,s)}else a.current=null}function dh(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(s){ze(e,e.return,s)}}function Ou(e,t,a){try{var n=e.stateNode;Lg(n,e.type,a,t),n[mt]=t}catch(s){ze(e,e.return,s)}}function hh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&An(e.type)||e.tag===4}function zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hh(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&&An(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 Du(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=de));else if(n!==4&&(n===27&&An(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Du(e,t,a),e=e.sibling;e!==null;)Du(e,t,a),e=e.sibling}function bc(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&&An(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(bc(e,t,a),e=e.sibling;e!==null;)bc(e,t,a),e=e.sibling}function mh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);vt(t,n,a),t[ke]=e,t[mt]=a}catch(r){ze(e,e.return,r)}}var Za=!1,lt=!1,Lu=!1,ph=typeof WeakSet=="function"?WeakSet:Set,ft=null;function mg(e,t){if(e=e.containerInfo,ao=Bc,e=Cf(e),Er(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 s=n.anchorOffset,r=n.focusNode;n=n.focusOffset;try{a.nodeType,r.nodeType}catch{a=null;break e}var d=0,b=-1,N=-1,z=0,H=0,V=e,L=null;t:for(;;){for(var U;V!==a||s!==0&&V.nodeType!==3||(b=d+s),V!==r||n!==0&&V.nodeType!==3||(N=d+n),V.nodeType===3&&(d+=V.nodeValue.length),(U=V.firstChild)!==null;)L=V,V=U;for(;;){if(V===e)break t;if(L===a&&++z===s&&(b=d),L===r&&++H===n&&(N=d),(U=V.nextSibling)!==null)break;V=L,L=V.parentNode}V=U}a=b===-1||N===-1?null:{start:b,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(no={focusedElem:e,selectionRange:a},Bc=!1,ft=t;ft!==null;)if(t=ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ft=e;else for(;ft!==null;){switch(t=ft,r=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++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,a=t,s=r.memoizedProps,r=r.memoizedState,n=a.stateNode;try{var te=cl(a.type,s);e=n.getSnapshotBeforeUpdate(te,r),n.__reactInternalSnapshotBeforeUpdate=e}catch(ue){ze(a,a.return,ue)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)io(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":io(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,ft=e;break}ft=t.return}}function bh(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ja(e,a),n&4&&Xs(5,a);break;case 1:if(Ja(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){ze(a,a.return,d)}else{var s=cl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){ze(a,a.return,d)}}n&64&&oh(a),n&512&&Zs(a,a.return);break;case 3:if(Ja(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{ed(e,t)}catch(d){ze(a,a.return,d)}}break;case 27:t===null&&n&4&&mh(a);case 26:case 5:Ja(e,a),t===null&&n&4&&dh(a),n&512&&Zs(a,a.return);break;case 12:Ja(e,a);break;case 31:Ja(e,a),n&4&&yh(e,a);break;case 13:Ja(e,a),n&4&&xh(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ng.bind(null,a),Vg(e,a))));break;case 22:if(n=a.memoizedState!==null||Za,!n){t=t!==null&&t.memoizedState!==null||lt,s=Za;var r=lt;Za=n,(lt=t)&&!r?$a(e,a,(a.subtreeFlags&8772)!==0):Ja(e,a),Za=s,lt=r}break;case 30:break;default:Ja(e,a)}}function gh(e){var t=e.alternate;t!==null&&(e.alternate=null,gh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&un(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 Ve=null,Ct=!1;function Ka(e,t,a){for(a=a.child;a!==null;)vh(e,t,a),a=a.sibling}function vh(e,t,a){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Ea,a)}catch{}switch(a.tag){case 26:lt||Na(a,t),Ka(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:lt||Na(a,t);var n=Ve,s=Ct;An(a.type)&&(Ve=a.stateNode,Ct=!1),Ka(e,t,a),ti(a.stateNode),Ve=n,Ct=s;break;case 5:lt||Na(a,t);case 6:if(n=Ve,s=Ct,Ve=null,Ka(e,t,a),Ve=n,Ct=s,Ve!==null)if(Ct)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(a.stateNode)}catch(r){ze(a,t,r)}else try{Ve.removeChild(a.stateNode)}catch(r){ze(a,t,r)}break;case 18:Ve!==null&&(Ct?(e=Ve,om(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ns(e)):om(Ve,a.stateNode));break;case 4:n=Ve,s=Ct,Ve=a.stateNode.containerInfo,Ct=!0,Ka(e,t,a),Ve=n,Ct=s;break;case 0:case 11:case 14:case 15:Nn(2,a,t),lt||Nn(4,a,t),Ka(e,t,a);break;case 1:lt||(Na(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&fh(a,t,n)),Ka(e,t,a);break;case 21:Ka(e,t,a);break;case 22:lt=(n=lt)||a.memoizedState!==null,Ka(e,t,a),lt=n;break;default:Ka(e,t,a)}}function yh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ns(e)}catch(a){ze(t,t.return,a)}}}function xh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ns(e)}catch(a){ze(t,t.return,a)}}function pg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ph),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ph),t;default:throw Error(o(435,e.tag))}}function gc(e,t){var a=pg(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var s=Rg.bind(null,e,n);n.then(s,s)}})}function Et(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var s=a[n],r=e,d=t,b=d;e:for(;b!==null;){switch(b.tag){case 27:if(An(b.type)){Ve=b.stateNode,Ct=!1;break e}break;case 5:Ve=b.stateNode,Ct=!1;break e;case 3:case 4:Ve=b.stateNode.containerInfo,Ct=!0;break e}b=b.return}if(Ve===null)throw Error(o(160));vh(r,d,s),Ve=null,Ct=!1,r=s.alternate,r!==null&&(r.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sh(t,e),t=t.sibling}var fa=null;function Sh(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(t,e),Mt(e),n&4&&(Nn(3,e,e.return),Xs(3,e),Nn(5,e,e.return));break;case 1:Et(t,e),Mt(e),n&512&&(lt||a===null||Na(a,a.return)),n&64&&Za&&(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 s=fa;if(Et(t,e),Mt(e),n&512&&(lt||a===null||Na(a,a.return)),n&4){var r=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,s=s.ownerDocument||s;t:switch(n){case"title":r=s.getElementsByTagName("title")[0],(!r||r[rn]||r[ke]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=s.createElement(n),s.head.insertBefore(r,s.querySelector("head > title"))),vt(r,n,a),r[ke]=e,Ke(r),n=r;break e;case"link":var d=Sm("link","href",s).get(n+(a.href||""));if(d){for(var b=0;b<d.length;b++)if(r=d[b],r.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&r.getAttribute("rel")===(a.rel==null?null:a.rel)&&r.getAttribute("title")===(a.title==null?null:a.title)&&r.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){d.splice(b,1);break t}}r=s.createElement(n),vt(r,n,a),s.head.appendChild(r);break;case"meta":if(d=Sm("meta","content",s).get(n+(a.content||""))){for(b=0;b<d.length;b++)if(r=d[b],r.getAttribute("content")===(a.content==null?null:""+a.content)&&r.getAttribute("name")===(a.name==null?null:a.name)&&r.getAttribute("property")===(a.property==null?null:a.property)&&r.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&r.getAttribute("charset")===(a.charSet==null?null:a.charSet)){d.splice(b,1);break t}}r=s.createElement(n),vt(r,n,a),s.head.appendChild(r);break;default:throw Error(o(468,n))}r[ke]=e,Ke(r),n=r}e.stateNode=n}else jm(s,e.type,e.stateNode);else e.stateNode=xm(s,n,e.memoizedProps);else r!==n?(r===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):r.count--,n===null?jm(s,e.type,e.stateNode):xm(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Ou(e,e.memoizedProps,a.memoizedProps)}break;case 27:Et(t,e),Mt(e),n&512&&(lt||a===null||Na(a,a.return)),a!==null&&n&4&&Ou(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Et(t,e),Mt(e),n&512&&(lt||a===null||Na(a,a.return)),e.flags&32){s=e.stateNode;try{dn(s,"")}catch(te){ze(e,e.return,te)}}n&4&&e.stateNode!=null&&(s=e.memoizedProps,Ou(e,s,a!==null?a.memoizedProps:s)),n&1024&&(Lu=!0);break;case 6:if(Et(t,e),Mt(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(te){ze(e,e.return,te)}}break;case 3:if(zc=null,s=fa,fa=wc(t.containerInfo),Et(t,e),fa=s,Mt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{ns(t.containerInfo)}catch(te){ze(e,e.return,te)}Lu&&(Lu=!1,jh(e));break;case 4:n=fa,fa=wc(e.stateNode.containerInfo),Et(t,e),Mt(e),fa=n;break;case 12:Et(t,e),Mt(e);break;case 31:Et(t,e),Mt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,gc(e,n)));break;case 13:Et(t,e),Mt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(yc=he()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,gc(e,n)));break;case 22:s=e.memoizedState!==null;var N=a!==null&&a.memoizedState!==null,z=Za,H=lt;if(Za=z||s,lt=H||N,Et(t,e),lt=H,Za=z,Mt(e),n&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||N||Za||lt||rl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){N=a=t;try{if(r=N.stateNode,s)d=r.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{b=N.stateNode;var V=N.memoizedProps.style,L=V!=null&&V.hasOwnProperty("display")?V.display:null;b.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(te){ze(N,N.return,te)}}}else if(t.tag===6){if(a===null){N=t;try{N.stateNode.nodeValue=s?"":N.memoizedProps}catch(te){ze(N,N.return,te)}}}else if(t.tag===18){if(a===null){N=t;try{var U=N.stateNode;s?fm(U,!0):fm(N.stateNode,!1)}catch(te){ze(N,N.return,te)}}}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,gc(e,a))));break;case 19:Et(t,e),Mt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,gc(e,n)));break;case 30:break;case 21:break;default:Et(t,e),Mt(e)}}function Mt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(hh(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var s=a.stateNode,r=zu(e);bc(e,r,s);break;case 5:var d=a.stateNode;a.flags&32&&(dn(d,""),a.flags&=-33);var b=zu(e);bc(e,b,d);break;case 3:case 4:var N=a.stateNode.containerInfo,z=zu(e);Du(e,z,N);break;default:throw Error(o(161))}}catch(H){ze(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ja(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bh(e,t.alternate,t),t=t.sibling}function rl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Nn(4,t,t.return),rl(t);break;case 1:Na(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&fh(t,t.return,a),rl(t);break;case 27:ti(t.stateNode);case 26:case 5:Na(t,t.return),rl(t);break;case 22:t.memoizedState===null&&rl(t);break;case 30:rl(t);break;default:rl(t)}e=e.sibling}}function $a(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,s=e,r=t,d=r.flags;switch(r.tag){case 0:case 11:case 15:$a(s,r,a),Xs(4,r);break;case 1:if($a(s,r,a),n=r,s=n.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(z){ze(n,n.return,z)}if(n=r,s=n.updateQueue,s!==null){var b=n.stateNode;try{var N=s.shared.hiddenCallbacks;if(N!==null)for(s.shared.hiddenCallbacks=null,s=0;s<N.length;s++)Wf(N[s],b)}catch(z){ze(n,n.return,z)}}a&&d&64&&oh(r),Zs(r,r.return);break;case 27:mh(r);case 26:case 5:$a(s,r,a),a&&n===null&&d&4&&dh(r),Zs(r,r.return);break;case 12:$a(s,r,a);break;case 31:$a(s,r,a),a&&d&4&&yh(s,r);break;case 13:$a(s,r,a),a&&d&4&&xh(s,r);break;case 22:r.memoizedState===null&&$a(s,r,a),Zs(r,r.return);break;case 30:break;default:$a(s,r,a)}t=t.sibling}}function Uu(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&&Os(a))}function Bu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Os(e))}function da(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nh(e,t,a,n),t=t.sibling}function Nh(e,t,a,n){var s=t.flags;switch(t.tag){case 0:case 11:case 15:da(e,t,a,n),s&2048&&Xs(9,t);break;case 1:da(e,t,a,n);break;case 3:da(e,t,a,n),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Os(e)));break;case 12:if(s&2048){da(e,t,a,n),e=t.stateNode;try{var r=t.memoizedProps,d=r.id,b=r.onPostCommit;typeof b=="function"&&b(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){ze(t,t.return,N)}}else da(e,t,a,n);break;case 31:da(e,t,a,n);break;case 13:da(e,t,a,n);break;case 23:break;case 22:r=t.stateNode,d=t.alternate,t.memoizedState!==null?r._visibility&2?da(e,t,a,n):Ks(e,t):r._visibility&2?da(e,t,a,n):(r._visibility|=2,Zl(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Uu(d,t);break;case 24:da(e,t,a,n),s&2048&&Bu(t.alternate,t);break;default:da(e,t,a,n)}}function Zl(e,t,a,n,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,d=t,b=a,N=n,z=d.flags;switch(d.tag){case 0:case 11:case 15:Zl(r,d,b,N,s),Xs(8,d);break;case 23:break;case 22:var H=d.stateNode;d.memoizedState!==null?H._visibility&2?Zl(r,d,b,N,s):Ks(r,d):(H._visibility|=2,Zl(r,d,b,N,s)),s&&z&2048&&Uu(d.alternate,d);break;case 24:Zl(r,d,b,N,s),s&&z&2048&&Bu(d.alternate,d);break;default:Zl(r,d,b,N,s)}t=t.sibling}}function Ks(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,s=n.flags;switch(n.tag){case 22:Ks(a,n),s&2048&&Uu(n.alternate,n);break;case 24:Ks(a,n),s&2048&&Bu(n.alternate,n);break;default:Ks(a,n)}t=t.sibling}}var Js=8192;function Kl(e,t,a){if(e.subtreeFlags&Js)for(e=e.child;e!==null;)Rh(e,t,a),e=e.sibling}function Rh(e,t,a){switch(e.tag){case 26:Kl(e,t,a),e.flags&Js&&e.memoizedState!==null&&t0(a,fa,e.memoizedState,e.memoizedProps);break;case 5:Kl(e,t,a);break;case 3:case 4:var n=fa;fa=wc(e.stateNode.containerInfo),Kl(e,t,a),fa=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Js,Js=16777216,Kl(e,t,a),Js=n):Kl(e,t,a));break;default:Kl(e,t,a)}}function Th(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 $s(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];ft=n,Ch(n,e)}Th(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_h(e),e=e.sibling}function _h(e){switch(e.tag){case 0:case 11:case 15:$s(e),e.flags&2048&&Nn(9,e,e.return);break;case 3:$s(e);break;case 12:$s(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vc(e)):$s(e);break;default:$s(e)}}function vc(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];ft=n,Ch(n,e)}Th(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Nn(8,t,t.return),vc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,vc(t));break;default:vc(t)}e=e.sibling}}function Ch(e,t){for(;ft!==null;){var a=ft;switch(a.tag){case 0:case 11:case 15:Nn(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:Os(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,ft=n;else e:for(a=e;ft!==null;){n=ft;var s=n.sibling,r=n.return;if(gh(n),n===a){ft=null;break e}if(s!==null){s.return=r,ft=s;break e}ft=r}}}var bg={getCacheForType:function(e){var t=bt(tt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return bt(tt).controller.signal}},gg=typeof WeakMap=="function"?WeakMap:Map,Ae=0,He=null,ye=null,Se=0,Oe=0,qt=null,Rn=!1,Jl=!1,Hu=!1,Ia=0,$e=0,Tn=0,ul=0,ku=0,Yt=0,$l=0,Is=null,At=null,qu=!1,yc=0,Eh=0,xc=1/0,Sc=null,_n=null,ut=0,Cn=null,Il=null,Fa=0,Yu=0,Gu=null,Mh=null,Fs=0,Vu=null;function Gt(){return(Ae&2)!==0&&Se!==0?Se&-Se:B.T!==null?$u():Rl()}function Ah(){if(Yt===0)if((Se&536870912)===0||Ne){var e=Sl;Sl<<=1,(Sl&3932160)===0&&(Sl=262144),Yt=e}else Yt=536870912;return e=Ht.current,e!==null&&(e.flags|=32),Yt}function wt(e,t,a){(e===He&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(Fl(e,0),En(e,Se,Yt,!1)),Aa(e,a),((Ae&2)===0||e!==He)&&(e===He&&((Ae&2)===0&&(ul|=a),$e===4&&En(e,Se,Yt,!1)),Ra(e))}function wh(e,t,a){if((Ae&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ia(e,t),s=n?xg(e,t):Xu(e,t,!0),r=n;do{if(s===0){Jl&&!n&&En(e,t,0,!1);break}else{if(a=e.current.alternate,r&&!vg(a)){s=Xu(e,t,!1),r=!1;continue}if(s===2){if(r=t,e.errorRecoveryDisabledLanes&r)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var b=e;s=Is;var N=b.current.memoizedState.isDehydrated;if(N&&(Fl(b,d).flags|=256),d=Xu(b,d,!1),d!==2){if(Hu&&!N){b.errorRecoveryDisabledLanes|=r,ul|=r,s=4;break e}r=At,At=s,r!==null&&(At===null?At=r:At.push.apply(At,r))}s=d}if(r=!1,s!==2)continue}}if(s===1){Fl(e,0),En(e,t,0,!0);break}e:{switch(n=e,r=s,r){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:En(n,t,Yt,!Rn);break e;case 2:At=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(s=yc+300-he(),10<s)){if(En(n,t,Yt,!Rn),sa(n,0,!0)!==0)break e;Fa=t,n.timeoutHandle=rm(Oh.bind(null,n,a,At,Sc,qu,t,Yt,ul,$l,Rn,r,"Throttled",-0,0),s);break e}Oh(n,a,At,Sc,qu,t,Yt,ul,$l,Rn,r,null,-0,0)}}break}while(!0);Ra(e)}function Oh(e,t,a,n,s,r,d,b,N,z,H,V,L,U){if(e.timeoutHandle=-1,V=t.subtreeFlags,V&8192||(V&16785408)===16785408){V={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:de},Rh(t,r,V);var te=(r&62914560)===r?yc-he():(r&4194048)===r?Eh-he():0;if(te=a0(V,te),te!==null){Fa=r,e.cancelPendingCommit=te(qh.bind(null,e,t,r,a,n,s,d,b,N,H,V,null,L,U)),En(e,r,d,!z);return}}qh(e,t,r,a,n,s,d,b,N)}function vg(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 s=a[n],r=s.getSnapshot;s=s.value;try{if(!Ut(r(),s))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 En(e,t,a,n){t&=~ku,t&=~ul,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var s=t;0<s;){var r=31-it(s),d=1<<r;n[r]=-1,s&=~d}a!==0&&Nl(e,a,t)}function jc(){return(Ae&6)===0?(Ps(0),!1):!0}function Qu(){if(ye!==null){if(Oe===0)var e=ye.return;else e=ye,qa=el=null,iu(e),Yl=null,Ds=0,e=ye;for(;e!==null;)uh(e.alternate,e),e=e.return;ye=null}}function Fl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Hg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Fa=0,Qu(),He=e,ye=a=Ha(e.current,null),Se=t,Oe=0,qt=null,Rn=!1,Jl=ia(e,t),Hu=!1,$l=Yt=ku=ul=Tn=$e=0,At=Is=null,qu=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-it(n),r=1<<s;t|=e[s],n&=~r}return Ia=t,Vi(),a}function zh(e,t){me=null,B.H=Gs,t===ql||t===Fi?(t=$f(),Oe=3):t===Jr?(t=$f(),Oe=4):Oe=t===ju?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,qt=t,ye===null&&($e=1,fc(e,Kt(t,e.current)))}function Dh(){var e=Ht.current;return e===null?!0:(Se&4194048)===Se?Ft===null:(Se&62914560)===Se||(Se&536870912)!==0?e===Ft:!1}function Lh(){var e=B.H;return B.H=Gs,e===null?Gs:e}function Uh(){var e=B.A;return B.A=bg,e}function Nc(){$e=4,Rn||(Se&4194048)!==Se&&Ht.current!==null||(Jl=!0),(Tn&134217727)===0&&(ul&134217727)===0||He===null||En(He,Se,Yt,!1)}function Xu(e,t,a){var n=Ae;Ae|=2;var s=Lh(),r=Uh();(He!==e||Se!==t)&&(Sc=null,Fl(e,t)),t=!1;var d=$e;e:do try{if(Oe!==0&&ye!==null){var b=ye,N=qt;switch(Oe){case 8:Qu(),d=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var z=Oe;if(Oe=0,qt=null,Pl(e,b,N,z),a&&Jl){d=0;break e}break;default:z=Oe,Oe=0,qt=null,Pl(e,b,N,z)}}yg(),d=$e;break}catch(H){zh(e,H)}while(!0);return t&&e.shellSuspendCounter++,qa=el=null,Ae=n,B.H=s,B.A=r,ye===null&&(He=null,Se=0,Vi()),d}function yg(){for(;ye!==null;)Bh(ye)}function xg(e,t){var a=Ae;Ae|=2;var n=Lh(),s=Uh();He!==e||Se!==t?(Sc=null,xc=he()+500,Fl(e,t)):Jl=ia(e,t);e:do try{if(Oe!==0&&ye!==null){t=ye;var r=qt;t:switch(Oe){case 1:Oe=0,qt=null,Pl(e,t,r,1);break;case 2:case 9:if(Kf(r)){Oe=0,qt=null,Hh(t);break}t=function(){Oe!==2&&Oe!==9||He!==e||(Oe=7),Ra(e)},r.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:Kf(r)?(Oe=0,qt=null,Hh(t)):(Oe=0,qt=null,Pl(e,t,r,7));break;case 5:var d=null;switch(ye.tag){case 26:d=ye.memoizedState;case 5:case 27:var b=ye;if(d?Nm(d):b.stateNode.complete){Oe=0,qt=null;var N=b.sibling;if(N!==null)ye=N;else{var z=b.return;z!==null?(ye=z,Rc(z)):ye=null}break t}}Oe=0,qt=null,Pl(e,t,r,5);break;case 6:Oe=0,qt=null,Pl(e,t,r,6);break;case 8:Qu(),$e=6;break e;default:throw Error(o(462))}}Sg();break}catch(H){zh(e,H)}while(!0);return qa=el=null,B.H=n,B.A=s,Ae=a,ye!==null?0:(He=null,Se=0,Vi(),$e)}function Sg(){for(;ye!==null&&!Qn();)Bh(ye)}function Bh(e){var t=ch(e.alternate,e,Ia);e.memoizedProps=e.pendingProps,t===null?Rc(e):ye=t}function Hh(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=th(a,t,t.pendingProps,t.type,void 0,Se);break;case 11:t=th(a,t,t.pendingProps,t.type.render,t.ref,Se);break;case 5:iu(t);default:uh(a,t),t=ye=Uf(t,Ia),t=ch(a,t,Ia)}e.memoizedProps=e.pendingProps,t===null?Rc(e):ye=t}function Pl(e,t,a,n){qa=el=null,iu(t),Yl=null,Ds=0;var s=t.return;try{if(ug(e,s,t,a,Se)){$e=1,fc(e,Kt(a,e.current)),ye=null;return}}catch(r){if(s!==null)throw ye=s,r;$e=1,fc(e,Kt(a,e.current)),ye=null;return}t.flags&32768?(Ne||n===1?e=!0:Jl||(Se&536870912)!==0?e=!1:(Rn=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ht.current,n!==null&&n.tag===13&&(n.flags|=16384))),kh(t,e)):Rc(t)}function Rc(e){var t=e;do{if((t.flags&32768)!==0){kh(t,Rn);return}e=t.return;var a=dg(t.alternate,t,Ia);if(a!==null){ye=a;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);$e===0&&($e=5)}function kh(e,t){do{var a=hg(e.alternate,e);if(a!==null){a.flags&=32767,ye=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){ye=e;return}ye=e=a}while(e!==null);$e=6,ye=null}function qh(e,t,a,n,s,r,d,b,N){e.cancelPendingCommit=null;do Tc();while(ut!==0);if((Ae&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(r=t.lanes|t.childLanes,r|=zr,bs(e,a,r,d,b,N),e===He&&(ye=He=null,Se=0),Il=t,Cn=e,Fa=a,Yu=r,Gu=s,Mh=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tg(ba,function(){return Xh(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=B.T,B.T=null,s=$.p,$.p=2,d=Ae,Ae|=4;try{mg(e,t,a)}finally{Ae=d,$.p=s,B.T=n}}ut=1,Yh(),Gh(),Vh()}}function Yh(){if(ut===1){ut=0;var e=Cn,t=Il,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var n=$.p;$.p=2;var s=Ae;Ae|=4;try{Sh(t,e);var r=no,d=Cf(e.containerInfo),b=r.focusedElem,N=r.selectionRange;if(d!==b&&b&&b.ownerDocument&&_f(b.ownerDocument.documentElement,b)){if(N!==null&&Er(b)){var z=N.start,H=N.end;if(H===void 0&&(H=z),"selectionStart"in b)b.selectionStart=z,b.selectionEnd=Math.min(H,b.value.length);else{var V=b.ownerDocument||document,L=V&&V.defaultView||window;if(L.getSelection){var U=L.getSelection(),te=b.textContent.length,ue=Math.min(N.start,te),Be=N.end===void 0?ue:Math.min(N.end,te);!U.extend&&ue>Be&&(d=Be,Be=ue,ue=d);var M=Tf(b,ue),C=Tf(b,Be);if(M&&C&&(U.rangeCount!==1||U.anchorNode!==M.node||U.anchorOffset!==M.offset||U.focusNode!==C.node||U.focusOffset!==C.offset)){var O=V.createRange();O.setStart(M.node,M.offset),U.removeAllRanges(),ue>Be?(U.addRange(O),U.extend(C.node,C.offset)):(O.setEnd(C.node,C.offset),U.addRange(O))}}}}for(V=[],U=b;U=U.parentNode;)U.nodeType===1&&V.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<V.length;b++){var G=V[b];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Bc=!!ao,no=ao=null}finally{Ae=s,$.p=n,B.T=a}}e.current=t,ut=2}}function Gh(){if(ut===2){ut=0;var e=Cn,t=Il,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var n=$.p;$.p=2;var s=Ae;Ae|=4;try{bh(e,t.alternate,t)}finally{Ae=s,$.p=n,B.T=a}}ut=3}}function Vh(){if(ut===4||ut===3){ut=0,vl();var e=Cn,t=Il,a=Fa,n=Mh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,Il=Cn=null,Qh(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(_n=null),sn(a),t=t.stateNode,ht&&typeof ht.onCommitFiberRoot=="function")try{ht.onCommitFiberRoot(Ea,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=B.T,s=$.p,$.p=2,B.T=null;try{for(var r=e.onRecoverableError,d=0;d<n.length;d++){var b=n[d];r(b.value,{componentStack:b.stack})}}finally{B.T=t,$.p=s}}(Fa&3)!==0&&Tc(),Ra(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===Vu?Fs++:(Fs=0,Vu=e):Fs=0,Ps(0)}}function Qh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Os(t)))}function Tc(){return Yh(),Gh(),Vh(),Xh()}function Xh(){if(ut!==5)return!1;var e=Cn,t=Yu;Yu=0;var a=sn(Fa),n=B.T,s=$.p;try{$.p=32>a?32:a,B.T=null,a=Gu,Gu=null;var r=Cn,d=Fa;if(ut=0,Il=Cn=null,Fa=0,(Ae&6)!==0)throw Error(o(331));var b=Ae;if(Ae|=4,_h(r.current),Nh(r,r.current,d,a),Ae=b,Ps(0,!1),ht&&typeof ht.onPostCommitFiberRoot=="function")try{ht.onPostCommitFiberRoot(Ea,r)}catch{}return!0}finally{$.p=s,B.T=n,Qh(e,t)}}function Zh(e,t,a){t=Kt(a,t),t=Su(e.stateNode,t,2),e=xn(e,t,2),e!==null&&(Aa(e,2),Ra(e))}function ze(e,t,a){if(e.tag===3)Zh(e,e,a);else for(;t!==null;){if(t.tag===3){Zh(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(_n===null||!_n.has(n))){e=Kt(a,e),a=Kd(2),n=xn(t,a,2),n!==null&&(Jd(a,n,t,e),Aa(n,2),Ra(n));break}}t=t.return}}function Zu(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new gg;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(a)||(Hu=!0,s.add(a),e=jg.bind(null,e,t,a),t.then(e,e))}function jg(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,He===e&&(Se&a)===a&&($e===4||$e===3&&(Se&62914560)===Se&&300>he()-yc?(Ae&2)===0&&Fl(e,0):ku|=a,$l===Se&&($l=0)),Ra(e)}function Kh(e,t){t===0&&(t=jl()),e=Fn(e,t),e!==null&&(Aa(e,t),Ra(e))}function Ng(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Kh(e,a)}function Rg(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(a=s.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),Kh(e,a)}function Tg(e,t){return la(e,t)}var _c=null,Wl=null,Ku=!1,Cc=!1,Ju=!1,Mn=0;function Ra(e){e!==Wl&&e.next===null&&(Wl===null?_c=Wl=e:Wl=Wl.next=e),Cc=!0,Ku||(Ku=!0,Cg())}function Ps(e,t){if(!Ju&&Cc){Ju=!0;do for(var a=!1,n=_c;n!==null;){if(e!==0){var s=n.pendingLanes;if(s===0)var r=0;else{var d=n.suspendedLanes,b=n.pingedLanes;r=(1<<31-it(42|e)+1)-1,r&=s&~(d&~b),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(a=!0,Fh(n,r))}else r=Se,r=sa(n,n===He?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(r&3)===0||ia(n,r)||(a=!0,Fh(n,r));n=n.next}while(a);Ju=!1}}function _g(){Jh()}function Jh(){Cc=Ku=!1;var e=0;Mn!==0&&Bg()&&(e=Mn);for(var t=he(),a=null,n=_c;n!==null;){var s=n.next,r=$h(n,t);r===0?(n.next=null,a===null?_c=s:a.next=s,s===null&&(Wl=a)):(a=n,(e!==0||(r&3)!==0)&&(Cc=!0)),n=s}ut!==0&&ut!==5||Ps(e),Mn!==0&&(Mn=0)}function $h(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var d=31-it(r),b=1<<d,N=s[d];N===-1?((b&a)===0||(b&n)!==0)&&(s[d]=ca(b,t)):N<=t&&(e.expiredLanes|=b),r&=~b}if(t=He,a=Se,a=sa(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&pa(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ia(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&pa(n),sn(a)){case 2:case 8:a=yl;break;case 32:a=ba;break;case 268435456:a=xl;break;default:a=ba}return n=Ih.bind(null,e),a=la(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&pa(n),e.callbackPriority=2,e.callbackNode=null,2}function Ih(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Tc()&&e.callbackNode!==a)return null;var n=Se;return n=sa(e,e===He?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(wh(e,n,t),$h(e,he()),e.callbackNode!=null&&e.callbackNode===a?Ih.bind(null,e):null)}function Fh(e,t){if(Tc())return null;wh(e,t,!0)}function Cg(){kg(function(){(Ae&6)!==0?la(Nt,_g):Jh()})}function $u(){if(Mn===0){var e=Hl;e===0&&(e=nn,nn<<=1,(nn&261888)===0&&(nn=256)),Mn=e}return Mn}function Ph(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:we(""+e)}function Wh(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 Eg(e,t,a,n,s){if(t==="submit"&&a&&a.stateNode===s){var r=Ph((s[mt]||null).action),d=n.submitter;d&&(t=(t=d[mt]||null)?Ph(t.formAction):d.getAttribute("formAction"),t!==null&&(r=t,d=null));var b=new ki("action","action",null,n,s);e.push({event:b,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Mn!==0){var N=d?Wh(s,d):new FormData(s);pu(a,{pending:!0,data:N,method:s.method,action:r},null,N)}}else typeof r=="function"&&(b.preventDefault(),N=d?Wh(s,d):new FormData(s),pu(a,{pending:!0,data:N,method:s.method,action:r},r,N))},currentTarget:s}]})}}for(var Iu=0;Iu<Or.length;Iu++){var Fu=Or[Iu],Mg=Fu.toLowerCase(),Ag=Fu[0].toUpperCase()+Fu.slice(1);oa(Mg,"on"+Ag)}oa(Af,"onAnimationEnd"),oa(wf,"onAnimationIteration"),oa(Of,"onAnimationStart"),oa("dblclick","onDoubleClick"),oa("focusin","onFocus"),oa("focusout","onBlur"),oa(Zb,"onTransitionRun"),oa(Kb,"onTransitionStart"),oa(Jb,"onTransitionCancel"),oa(zf,"onTransitionEnd"),Ua("onMouseEnter",["mouseout","mouseover"]),Ua("onMouseLeave",["mouseout","mouseover"]),Ua("onPointerEnter",["pointerout","pointerover"]),Ua("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 Ws="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(" "),wg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ws));function em(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],s=n.event;n=n.listeners;e:{var r=void 0;if(t)for(var d=n.length-1;0<=d;d--){var b=n[d],N=b.instance,z=b.currentTarget;if(b=b.listener,N!==r&&s.isPropagationStopped())break e;r=b,s.currentTarget=z;try{r(s)}catch(H){Gi(H)}s.currentTarget=null,r=N}else for(d=0;d<n.length;d++){if(b=n[d],N=b.instance,z=b.currentTarget,b=b.listener,N!==r&&s.isPropagationStopped())break e;r=b,s.currentTarget=z;try{r(s)}catch(H){Gi(H)}s.currentTarget=null,r=N}}}}function xe(e,t){var a=t[ra];a===void 0&&(a=t[ra]=new Set);var n=e+"__bubble";a.has(n)||(tm(t,e,2,!1),a.add(n))}function Pu(e,t,a){var n=0;t&&(n|=4),tm(a,e,n,t)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function Wu(e){if(!e[Ec]){e[Ec]=!0,Ce.forEach(function(a){a!=="selectionchange"&&(wg.has(a)||Pu(a,!1,e),Pu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ec]||(t[Ec]=!0,Pu("selectionchange",!1,t))}}function tm(e,t,a,n){switch(Am(t)){case 2:var s=s0;break;case 8:s=i0;break;default:s=po}a=s.bind(null,t,a,e),s=void 0,!yr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function eo(e,t,a,n,s){var r=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 b=n.stateNode.containerInfo;if(b===s)break;if(d===4)for(d=n.return;d!==null;){var N=d.tag;if((N===3||N===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;b!==null;){if(d=Lt(b),d===null)return;if(N=d.tag,N===5||N===6||N===26||N===27){n=r=d;continue e}b=b.parentNode}}n=n.return}sf(function(){var z=r,H=rt(a),V=[];e:{var L=Df.get(e);if(L!==void 0){var U=ki,te=e;switch(e){case"keypress":if(Bi(a)===0)break e;case"keydown":case"keyup":U=Rb;break;case"focusin":te="focus",U=Nr;break;case"focusout":te="blur",U=Nr;break;case"beforeblur":case"afterblur":U=Nr;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":U=uf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=db;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=Cb;break;case Af:case wf:case Of:U=pb;break;case zf:U=Mb;break;case"scroll":case"scrollend":U=ob;break;case"wheel":U=wb;break;case"copy":case"cut":case"paste":U=gb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=ff;break;case"toggle":case"beforetoggle":U=zb}var ue=(t&4)!==0,Be=!ue&&(e==="scroll"||e==="scrollend"),M=ue?L!==null?L+"Capture":null:L;ue=[];for(var C=z,O;C!==null;){var G=C;if(O=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||O===null||M===null||(G=Ss(C,M),G!=null&&ue.push(ei(C,G,O))),Be)break;C=C.return}0<ue.length&&(L=new U(L,te,null,a,H),V.push({event:L,listeners:ue}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",L&&a!==Fe&&(te=a.relatedTarget||a.fromElement)&&(Lt(te)||te[xa]))break e;if((U||L)&&(L=H.window===H?H:(L=H.ownerDocument)?L.defaultView||L.parentWindow:window,U?(te=a.relatedTarget||a.toElement,U=z,te=te?Lt(te):null,te!==null&&(Be=h(te),ue=te.tag,te!==Be||ue!==5&&ue!==27&&ue!==6)&&(te=null)):(U=null,te=z),U!==te)){if(ue=uf,G="onMouseLeave",M="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ue=ff,G="onPointerLeave",M="onPointerEnter",C="pointer"),Be=U==null?L:Qt(U),O=te==null?L:Qt(te),L=new ue(G,C+"leave",U,a,H),L.target=Be,L.relatedTarget=O,G=null,Lt(H)===z&&(ue=new ue(M,C+"enter",te,a,H),ue.target=O,ue.relatedTarget=Be,G=ue),Be=G,U&&te)t:{for(ue=Og,M=U,C=te,O=0,G=M;G;G=ue(G))O++;G=0;for(var ce=C;ce;ce=ue(ce))G++;for(;0<O-G;)M=ue(M),O--;for(;0<G-O;)C=ue(C),G--;for(;O--;){if(M===C||C!==null&&M===C.alternate){ue=M;break t}M=ue(M),C=ue(C)}ue=null}else ue=null;U!==null&&am(V,L,U,ue,!1),te!==null&&Be!==null&&am(V,Be,te,ue,!0)}}e:{if(L=z?Qt(z):window,U=L.nodeName&&L.nodeName.toLowerCase(),U==="select"||U==="input"&&L.type==="file")var Ee=yf;else if(gf(L))if(xf)Ee=Vb;else{Ee=Yb;var ae=qb}else U=L.nodeName,!U||U.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?z&&Z(z.elementType)&&(Ee=yf):Ee=Gb;if(Ee&&(Ee=Ee(e,z))){vf(V,Ee,a,H);break e}ae&&ae(e,L,z),e==="focusout"&&z&&L.type==="number"&&z.memoizedProps.value!=null&&xs(L,"number",L.value)}switch(ae=z?Qt(z):window,e){case"focusin":(gf(ae)||ae.contentEditable==="true")&&(Al=ae,Mr=z,Ms=null);break;case"focusout":Ms=Mr=Al=null;break;case"mousedown":Ar=!0;break;case"contextmenu":case"mouseup":case"dragend":Ar=!1,Ef(V,a,H);break;case"selectionchange":if(Xb)break;case"keydown":case"keyup":Ef(V,a,H)}var be;if(Tr)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else Ml?pf(e,a)&&(je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(je="onCompositionStart");je&&(df&&a.locale!=="ko"&&(Ml||je!=="onCompositionStart"?je==="onCompositionEnd"&&Ml&&(be=cf()):(hn=H,xr="value"in hn?hn.value:hn.textContent,Ml=!0)),ae=Mc(z,je),0<ae.length&&(je=new of(je,e,null,a,H),V.push({event:je,listeners:ae}),be?je.data=be:(be=bf(a),be!==null&&(je.data=be)))),(be=Lb?Ub(e,a):Bb(e,a))&&(je=Mc(z,"onBeforeInput"),0<je.length&&(ae=new of("onBeforeInput","beforeinput",null,a,H),V.push({event:ae,listeners:je}),ae.data=be)),Eg(V,e,z,a,H)}em(V,t)})}function ei(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Mc(e,t){for(var a=t+"Capture",n=[];e!==null;){var s=e,r=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||r===null||(s=Ss(e,a),s!=null&&n.unshift(ei(e,s,r)),s=Ss(e,t),s!=null&&n.push(ei(e,s,r))),e.tag===3)return n;e=e.return}return[]}function Og(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function am(e,t,a,n,s){for(var r=t._reactName,d=[];a!==null&&a!==n;){var b=a,N=b.alternate,z=b.stateNode;if(b=b.tag,N!==null&&N===n)break;b!==5&&b!==26&&b!==27||z===null||(N=z,s?(z=Ss(a,r),z!=null&&d.unshift(ei(a,z,N))):s||(z=Ss(a,r),z!=null&&d.push(ei(a,z,N)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var zg=/\r\n?/g,Dg=/\u0000|\uFFFD/g;function nm(e){return(typeof e=="string"?e:""+e).replace(zg,`
|
|
9
|
+
`).replace(Dg,"")}function lm(e,t){return t=nm(t),nm(e)===t}function Ue(e,t,a,n,s,r){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||dn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&dn(e,""+n);break;case"className":_l(e,"class",n);break;case"tabIndex":_l(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":_l(e,a,n);break;case"style":_(e,n,r);break;case"data":if(t!=="object"){_l(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=we(""+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 r=="function"&&(a==="formAction"?(t!=="input"&&Ue(e,t,"name",s.name,s,null),Ue(e,t,"formEncType",s.formEncType,s,null),Ue(e,t,"formMethod",s.formMethod,s,null),Ue(e,t,"formTarget",s.formTarget,s,null)):(Ue(e,t,"encType",s.encType,s,null),Ue(e,t,"method",s.method,s,null),Ue(e,t,"target",s.target,s,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=we(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=de);break;case"onScroll":n!=null&&xe("scroll",e);break;case"onScrollEnd":n!=null&&xe("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(s.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=we(""+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":xe("beforetoggle",e),xe("toggle",e),Tl(e,"popover",n);break;case"xlinkActuate":ua(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":ua(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":ua(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":ua(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":ua(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":ua(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":ua(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":ua(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":ua(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Tl(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=_e.get(a)||a,Tl(e,a,n))}}function to(e,t,a,n,s,r){switch(a){case"style":_(e,n,r);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(s.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?dn(e,n):(typeof n=="number"||typeof n=="bigint")&&dn(e,""+n);break;case"onScroll":n!=null&&xe("scroll",e);break;case"onScrollEnd":n!=null&&xe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=de);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Da.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),r=e[mt]||null,r=r!=null?r[a]:null,typeof r=="function"&&e.removeEventListener(t,r,s),typeof n=="function")){typeof r!="function"&&r!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,s);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Tl(e,a,n)}}}function vt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var n=!1,s=!1,r;for(r in a)if(a.hasOwnProperty(r)){var d=a[r];if(d!=null)switch(r){case"src":n=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ue(e,t,r,d,a,null)}}s&&Ue(e,t,"srcSet",a.srcSet,a,null),n&&Ue(e,t,"src",a.src,a,null);return;case"input":xe("invalid",e);var b=r=d=s=null,N=null,z=null;for(n in a)if(a.hasOwnProperty(n)){var H=a[n];if(H!=null)switch(n){case"name":s=H;break;case"type":d=H;break;case"checked":N=H;break;case"defaultChecked":z=H;break;case"value":r=H;break;case"defaultValue":b=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(o(137,t));break;default:Ue(e,t,n,H,a,null)}}Oi(e,r,b,N,z,d,s,!1);return;case"select":xe("invalid",e),n=d=r=null;for(s in a)if(a.hasOwnProperty(s)&&(b=a[s],b!=null))switch(s){case"value":r=b;break;case"defaultValue":d=b;break;case"multiple":n=b;default:Ue(e,t,s,b,a,null)}t=r,a=d,e.multiple=!!n,t!=null?fn(e,!!n,t,!1):a!=null&&fn(e,!!n,a,!0);return;case"textarea":xe("invalid",e),r=s=n=null;for(d in a)if(a.hasOwnProperty(d)&&(b=a[d],b!=null))switch(d){case"value":n=b;break;case"defaultValue":s=b;break;case"children":r=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:Ue(e,t,d,b,a,null)}Di(e,n,s,r);return;case"option":for(N in a)if(a.hasOwnProperty(N)&&(n=a[N],n!=null))switch(N){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:Ue(e,t,N,n,a,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(n=0;n<Ws.length;n++)xe(Ws[n],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("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(z in a)if(a.hasOwnProperty(z)&&(n=a[z],n!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:Ue(e,t,z,n,a,null)}return;default:if(Z(t)){for(H in a)a.hasOwnProperty(H)&&(n=a[H],n!==void 0&&to(e,t,H,n,a,void 0));return}}for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null&&Ue(e,t,b,n,a,null))}function Lg(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 s=null,r=null,d=null,b=null,N=null,z=null,H=null;for(U in a){var V=a[U];if(a.hasOwnProperty(U)&&V!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":N=V;default:n.hasOwnProperty(U)||Ue(e,t,U,null,n,V)}}for(var L in n){var U=n[L];if(V=a[L],n.hasOwnProperty(L)&&(U!=null||V!=null))switch(L){case"type":r=U;break;case"name":s=U;break;case"checked":z=U;break;case"defaultChecked":H=U;break;case"value":d=U;break;case"defaultValue":b=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:U!==V&&Ue(e,t,L,U,n,V)}}ys(e,d,b,N,z,H,r,s);return;case"select":U=d=b=L=null;for(r in a)if(N=a[r],a.hasOwnProperty(r)&&N!=null)switch(r){case"value":break;case"multiple":U=N;default:n.hasOwnProperty(r)||Ue(e,t,r,null,n,N)}for(s in n)if(r=n[s],N=a[s],n.hasOwnProperty(s)&&(r!=null||N!=null))switch(s){case"value":L=r;break;case"defaultValue":b=r;break;case"multiple":d=r;default:r!==N&&Ue(e,t,s,r,n,N)}t=b,a=d,n=U,L!=null?fn(e,!!a,L,!1):!!n!=!!a&&(t!=null?fn(e,!!a,t,!0):fn(e,!!a,a?[]:"",!1));return;case"textarea":U=L=null;for(b in a)if(s=a[b],a.hasOwnProperty(b)&&s!=null&&!n.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Ue(e,t,b,null,n,s)}for(d in n)if(s=n[d],r=a[d],n.hasOwnProperty(d)&&(s!=null||r!=null))switch(d){case"value":L=s;break;case"defaultValue":U=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(o(91));break;default:s!==r&&Ue(e,t,d,s,n,r)}zi(e,L,U);return;case"option":for(var te in a)if(L=a[te],a.hasOwnProperty(te)&&L!=null&&!n.hasOwnProperty(te))switch(te){case"selected":e.selected=!1;break;default:Ue(e,t,te,null,n,L)}for(N in n)if(L=n[N],U=a[N],n.hasOwnProperty(N)&&L!==U&&(L!=null||U!=null))switch(N){case"selected":e.selected=L&&typeof L!="function"&&typeof L!="symbol";break;default:Ue(e,t,N,L,n,U)}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 ue in a)L=a[ue],a.hasOwnProperty(ue)&&L!=null&&!n.hasOwnProperty(ue)&&Ue(e,t,ue,null,n,L);for(z in n)if(L=n[z],U=a[z],n.hasOwnProperty(z)&&L!==U&&(L!=null||U!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:Ue(e,t,z,L,n,U)}return;default:if(Z(t)){for(var Be in a)L=a[Be],a.hasOwnProperty(Be)&&L!==void 0&&!n.hasOwnProperty(Be)&&to(e,t,Be,void 0,n,L);for(H in n)L=n[H],U=a[H],!n.hasOwnProperty(H)||L===U||L===void 0&&U===void 0||to(e,t,H,L,n,U);return}}for(var M in a)L=a[M],a.hasOwnProperty(M)&&L!=null&&!n.hasOwnProperty(M)&&Ue(e,t,M,null,n,L);for(V in n)L=n[V],U=a[V],!n.hasOwnProperty(V)||L===U||L==null&&U==null||Ue(e,t,V,L,n,U)}function sm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ug(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var s=a[n],r=s.transferSize,d=s.initiatorType,b=s.duration;if(r&&b&&sm(d)){for(d=0,b=s.responseEnd,n+=1;n<a.length;n++){var N=a[n],z=N.startTime;if(z>b)break;var H=N.transferSize,V=N.initiatorType;H&&sm(V)&&(N=N.responseEnd,d+=H*(N<b?1:(b-z)/(N-z)))}if(--n,t+=8*(r+d)/(s.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 ao=null,no=null;function Ac(e){return e.nodeType===9?e:e.ownerDocument}function im(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 cm(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 lo(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 so=null;function Bg(){var e=window.event;return e&&e.type==="popstate"?e===so?!1:(so=e,!0):(so=null,!1)}var rm=typeof setTimeout=="function"?setTimeout:void 0,Hg=typeof clearTimeout=="function"?clearTimeout:void 0,um=typeof Promise=="function"?Promise:void 0,kg=typeof queueMicrotask=="function"?queueMicrotask:typeof um<"u"?function(e){return um.resolve(null).then(e).catch(qg)}:rm;function qg(e){setTimeout(function(){throw e})}function An(e){return e==="head"}function om(e,t){var a=t,n=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(s),ns(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")ti(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,ti(a);for(var r=a.firstChild;r;){var d=r.nextSibling,b=r.nodeName;r[rn]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&r.rel.toLowerCase()==="stylesheet"||a.removeChild(r),r=d}}else a==="body"&&ti(e.ownerDocument.body);a=s}while(a);ns(t)}function fm(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 io(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":io(a),un(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Yg(e,t,a,n){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[rn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=Pt(e.nextSibling),e===null)break}return null}function Gg(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Pt(e.nextSibling),e===null))return null;return e}function dm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Pt(e.nextSibling),e===null))return null;return e}function co(e){return e.data==="$?"||e.data==="$~"}function ro(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Vg(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 Pt(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 uo=null;function hm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Pt(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function mm(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 pm(e,t,a){switch(t=Ac(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 ti(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);un(e)}var Wt=new Map,bm=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Pa=$.d;$.d={f:Qg,r:Xg,D:Zg,C:Kg,L:Jg,m:$g,X:Fg,S:Ig,M:Pg};function Qg(){var e=Pa.f(),t=jc();return e||t}function Xg(e){var t=xt(e);t!==null&&t.tag===5&&t.type==="form"?zd(t):Pa.r(e)}var es=typeof document>"u"?null:document;function gm(e,t,a){var n=es;if(n&&typeof t=="string"&&t){var s=Tt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),bm.has(s)||(bm.add(s),e={rel:e,crossOrigin:a,href:t},n.querySelector(s)===null&&(t=n.createElement("link"),vt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function Zg(e){Pa.D(e),gm("dns-prefetch",e,null)}function Kg(e,t){Pa.C(e,t),gm("preconnect",e,t)}function Jg(e,t,a){Pa.L(e,t,a);var n=es;if(n&&e&&t){var s='link[rel="preload"][as="'+Tt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Tt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Tt(a.imageSizes)+'"]')):s+='[href="'+Tt(e)+'"]';var r=s;switch(t){case"style":r=ts(e);break;case"script":r=as(e)}Wt.has(r)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Wt.set(r,e),n.querySelector(s)!==null||t==="style"&&n.querySelector(ai(r))||t==="script"&&n.querySelector(ni(r))||(t=n.createElement("link"),vt(t,"link",e),Ke(t),n.head.appendChild(t)))}}function $g(e,t){Pa.m(e,t);var a=es;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Tt(n)+'"][href="'+Tt(e)+'"]',r=s;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=as(e)}if(!Wt.has(r)&&(e=y({rel:"modulepreload",href:e},t),Wt.set(r,e),a.querySelector(s)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ni(r)))return}n=a.createElement("link"),vt(n,"link",e),Ke(n),a.head.appendChild(n)}}}function Ig(e,t,a){Pa.S(e,t,a);var n=es;if(n&&e){var s=on(n).hoistableStyles,r=ts(e);t=t||"default";var d=s.get(r);if(!d){var b={loading:0,preload:null};if(d=n.querySelector(ai(r)))b.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Wt.get(r))&&oo(e,a);var N=d=n.createElement("link");Ke(N),vt(N,"link",e),N._p=new Promise(function(z,H){N.onload=z,N.onerror=H}),N.addEventListener("load",function(){b.loading|=1}),N.addEventListener("error",function(){b.loading|=2}),b.loading|=4,Oc(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:b},s.set(r,d)}}}function Fg(e,t){Pa.X(e,t);var a=es;if(a&&e){var n=on(a).hoistableScripts,s=as(e),r=n.get(s);r||(r=a.querySelector(ni(s)),r||(e=y({src:e,async:!0},t),(t=Wt.get(s))&&fo(e,t),r=a.createElement("script"),Ke(r),vt(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(s,r))}}function Pg(e,t){Pa.M(e,t);var a=es;if(a&&e){var n=on(a).hoistableScripts,s=as(e),r=n.get(s);r||(r=a.querySelector(ni(s)),r||(e=y({src:e,async:!0,type:"module"},t),(t=Wt.get(s))&&fo(e,t),r=a.createElement("script"),Ke(r),vt(r,"link",e),a.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},n.set(s,r))}}function vm(e,t,a,n){var s=(s=oe.current)?wc(s):null;if(!s)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=ts(a.href),a=on(s).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=ts(a.href);var r=on(s).hoistableStyles,d=r.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,d),(r=s.querySelector(ai(e)))&&!r._p&&(d.instance=r,d.state.loading=5),Wt.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},Wt.set(e,a),r||Wg(s,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=as(a),a=on(s).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 ts(e){return'href="'+Tt(e)+'"'}function ai(e){return'link[rel="stylesheet"]['+e+"]"}function ym(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Wg(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}),vt(t,"link",a),Ke(t),e.head.appendChild(t))}function as(e){return'[src="'+Tt(e)+'"]'}function ni(e){return"script[async]"+e}function xm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Tt(a.href)+'"]');if(n)return t.instance=n,Ke(n),n;var s=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ke(n),vt(n,"style",s),Oc(n,a.precedence,e),t.instance=n;case"stylesheet":s=ts(a.href);var r=e.querySelector(ai(s));if(r)return t.state.loading|=4,t.instance=r,Ke(r),r;n=ym(a),(s=Wt.get(s))&&oo(n,s),r=(e.ownerDocument||e).createElement("link"),Ke(r);var d=r;return d._p=new Promise(function(b,N){d.onload=b,d.onerror=N}),vt(r,"link",n),t.state.loading|=4,Oc(r,a.precedence,e),t.instance=r;case"script":return r=as(a.src),(s=e.querySelector(ni(r)))?(t.instance=s,Ke(s),s):(n=a,(s=Wt.get(r))&&(n=y({},a),fo(n,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ke(s),vt(s,"link",n),e.head.appendChild(s),t.instance=s);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,Oc(n,a.precedence,e));return t.instance}function Oc(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=n.length?n[n.length-1]:null,r=s,d=0;d<n.length;d++){var b=n[d];if(b.dataset.precedence===t)r=b;else if(r!==s)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function oo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function fo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var zc=null;function Sm(e,t,a){if(zc===null){var n=new Map,s=zc=new Map;s.set(a,n)}else s=zc,n=s.get(a),n||(n=new Map,s.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var r=a[s];if(!(r[rn]||r[ke]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var d=r.getAttribute(t)||"";d=e+d;var b=n.get(d);b?b.push(r):n.set(d,[r])}}return n}function jm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function e0(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 Nm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function t0(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 s=ts(n.href),r=t.querySelector(ai(s));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Dc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=r,Ke(r);return}r=t.ownerDocument||t,n=ym(n),(s=Wt.get(s))&&oo(n,s),r=r.createElement("link"),Ke(r);var d=r;d._p=new Promise(function(b,N){d.onload=b,d.onerror=N}),vt(r,"link",n),a.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Dc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var ho=0;function a0(e,t){return e.stylesheets&&e.count===0&&Uc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Uc(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&ho===0&&(ho=62500*Ug());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Uc(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>ho?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(s)}}:null}function Dc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Lc=null;function Uc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Lc=new Map,t.forEach(n0,e),Lc=null,Dc.call(e))}function n0(e,t){if(!(t.state.loading&4)){var a=Lc.get(e);if(a)var n=a.get(null);else{a=new Map,Lc.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<s.length;r++){var d=s[r];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),n=d)}n&&a.set(null,n)}s=t.instance,d=s.getAttribute("data-precedence"),r=a.get(d)||n,r===n&&a.set(null,s),a.set(d,s),this.count++,n=Dc.bind(this),s.addEventListener("load",n),s.addEventListener("error",n),r?r.parentNode.insertBefore(s,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var li={$$typeof:J,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function l0(e,t,a,n,s,r,d,b,N){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=Kn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kn(0),this.hiddenUpdates=Kn(null),this.identifierPrefix=n,this.onUncaughtError=s,this.onCaughtError=r,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Rm(e,t,a,n,s,r,d,b,N,z,H,V){return e=new l0(e,t,a,d,N,z,H,V,b),t=1,r===!0&&(t|=24),r=Bt(3,null,null,t),e.current=r,r.stateNode=e,t=Xr(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:n,isDehydrated:a,cache:t},$r(r),e}function Tm(e){return e?(e=zl,e):zl}function _m(e,t,a,n,s,r){s=Tm(s),n.context===null?n.context=s:n.pendingContext=s,n=yn(t),n.payload={element:a},r=r===void 0?null:r,r!==null&&(n.callback=r),a=xn(e,n,t),a!==null&&(wt(a,e,t),Us(a,e,t))}function Cm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function mo(e,t){Cm(e,t),(e=e.alternate)&&Cm(e,t)}function Em(e){if(e.tag===13||e.tag===31){var t=Fn(e,67108864);t!==null&&wt(t,e,67108864),mo(e,67108864)}}function Mm(e){if(e.tag===13||e.tag===31){var t=Gt();t=wa(t);var a=Fn(e,t);a!==null&&wt(a,e,t),mo(e,t)}}var Bc=!0;function s0(e,t,a,n){var s=B.T;B.T=null;var r=$.p;try{$.p=2,po(e,t,a,n)}finally{$.p=r,B.T=s}}function i0(e,t,a,n){var s=B.T;B.T=null;var r=$.p;try{$.p=8,po(e,t,a,n)}finally{$.p=r,B.T=s}}function po(e,t,a,n){if(Bc){var s=bo(n);if(s===null)eo(e,t,n,Hc,a),wm(e,n);else if(r0(s,e,t,a,n))n.stopPropagation();else if(wm(e,n),t&4&&-1<c0.indexOf(e)){for(;s!==null;){var r=xt(s);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var d=Ma(r.pendingLanes);if(d!==0){var b=r;for(b.pendingLanes|=2,b.entangledLanes|=2;d;){var N=1<<31-it(d);b.entanglements[1]|=N,d&=~N}Ra(r),(Ae&6)===0&&(xc=he()+500,Ps(0))}}break;case 31:case 13:b=Fn(r,2),b!==null&&wt(b,r,2),jc(),mo(r,2)}if(r=bo(n),r===null&&eo(e,t,n,Hc,a),r===s)break;s=r}s!==null&&n.stopPropagation()}else eo(e,t,n,null,a)}}function bo(e){return e=rt(e),go(e)}var Hc=null;function go(e){if(Hc=null,e=Lt(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=v(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 Hc=e,null}function Am(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(ot()){case Nt:return 2;case yl:return 8;case ba:case hs:return 32;case xl:return 268435456;default:return 32}default:return 32}}var vo=!1,wn=null,On=null,zn=null,si=new Map,ii=new Map,Dn=[],c0="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 wm(e,t){switch(e){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":On=null;break;case"mouseover":case"mouseout":zn=null;break;case"pointerover":case"pointerout":si.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ii.delete(t.pointerId)}}function ci(e,t,a,n,s,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:r,targetContainers:[s]},t!==null&&(t=xt(t),t!==null&&Em(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function r0(e,t,a,n,s){switch(t){case"focusin":return wn=ci(wn,e,t,a,n,s),!0;case"dragenter":return On=ci(On,e,t,a,n,s),!0;case"mouseover":return zn=ci(zn,e,t,a,n,s),!0;case"pointerover":var r=s.pointerId;return si.set(r,ci(si.get(r)||null,e,t,a,n,s)),!0;case"gotpointercapture":return r=s.pointerId,ii.set(r,ci(ii.get(r)||null,e,t,a,n,s)),!0}return!1}function Om(e){var t=Lt(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,Oa(e.priority,function(){Mm(a)});return}}else if(t===31){if(t=v(a),t!==null){e.blockedOn=t,Oa(e.priority,function(){Mm(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 kc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=bo(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Fe=n,a.target.dispatchEvent(n),Fe=null}else return t=xt(a),t!==null&&Em(t),e.blockedOn=a,!1;t.shift()}return!0}function zm(e,t,a){kc(e)&&a.delete(t)}function u0(){vo=!1,wn!==null&&kc(wn)&&(wn=null),On!==null&&kc(On)&&(On=null),zn!==null&&kc(zn)&&(zn=null),si.forEach(zm),ii.forEach(zm)}function qc(e,t){e.blockedOn===t&&(e.blockedOn=null,vo||(vo=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,u0)))}var Yc=null;function Dm(e){Yc!==e&&(Yc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Yc===e&&(Yc=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],s=e[t+2];if(typeof n!="function"){if(go(n||a)===null)continue;break}var r=xt(a);r!==null&&(e.splice(t,3),t-=3,pu(r,{pending:!0,data:s,method:a.method,action:n},n,s))}}))}function ns(e){function t(N){return qc(N,e)}wn!==null&&qc(wn,e),On!==null&&qc(On,e),zn!==null&&qc(zn,e),si.forEach(t),ii.forEach(t);for(var a=0;a<Dn.length;a++){var n=Dn[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Dn.length&&(a=Dn[0],a.blockedOn===null);)Om(a),a.blockedOn===null&&Dn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var s=a[n],r=a[n+1],d=s[mt]||null;if(typeof r=="function")d||Dm(a);else if(d){var b=null;if(r&&r.hasAttribute("formAction")){if(s=r,d=r[mt]||null)b=d.formAction;else if(go(s)!==null)continue}else b=d.action;typeof b=="function"?a[n+1]=b:(a.splice(n,3),n-=3),Dm(a)}}}function Lm(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,s=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),s!==null&&(s(),s=null)}}}function yo(e){this._internalRoot=e}Gc.prototype.render=yo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Gt();_m(a,n,e,t,null,null)},Gc.prototype.unmount=yo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_m(e.current,2,null,e,null,null),jc(),t[xa]=null}};function Gc(e){this._internalRoot=e}Gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Rl();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Dn.length&&t!==0&&t<Dn[a].priority;a++);Dn.splice(a,0,e),a===0&&Om(e)}};var Um=c.version;if(Um!=="19.2.4")throw Error(o(527,Um,"19.2.4"));$.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var o0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vc.isDisabled&&Vc.supportsFiber)try{Ea=Vc.inject(o0),ht=Vc}catch{}}return ui.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,n="",s=Vd,r=Qd,d=Xd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Rm(e,1,!1,null,null,a,n,null,s,r,d,Lm),e[xa]=t.current,Wu(e),new yo(t)},ui.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var n=!1,s="",r=Vd,d=Qd,b=Xd,N=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(r=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(b=a.onRecoverableError),a.formState!==void 0&&(N=a.formState)),t=Rm(e,1,!0,t,a??null,n,s,N,r,d,b,Lm),t.context=Tm(null),a=t.current,n=Gt(),n=wa(n),s=yn(n),s.callback=null,xn(a,s,n),a=n,t.current.lanes=a,Aa(t,a),Ra(t),e[xa]=t.current,Wu(e),new Gc(t)},ui.version="19.2.4",ui}var Zm;function x0(){if(Zm)return jo.exports;Zm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(c){console.error(c)}}return l(),jo.exports=y0(),jo.exports}var S0=x0(),gi=typeof window<"u"?D.useLayoutEffect:D.useEffect;function _o(l){const c=D.useRef({value:l,prev:null}),i=c.current.value;return l!==i&&(c.current={value:l,prev:i}),c.current.prev}function j0(l,c,i={},o={}){D.useEffect(()=>{if(!l.current||o.disabled||typeof IntersectionObserver!="function")return;const f=new IntersectionObserver(([h])=>{c(h)},i);return f.observe(l.current),()=>{f.disconnect()}},[c,i,o.disabled,l])}function N0(l){const c=D.useRef(null);return D.useImperativeHandle(l,()=>c.current,[]),c}var Op=!1;function vi(l){return l[l.length-1]}function R0(l){return typeof l=="function"}function Hn(l,c){return R0(l)?l(c):l}var T0=Object.prototype.hasOwnProperty,Km=Object.prototype.propertyIsEnumerable,_0=()=>Object.create(null),ol=(l,c)=>fl(l,c,_0);function fl(l,c,i=()=>({}),o=0){if(l===c)return l;if(o>500)return c;const f=c,h=Im(l)&&Im(f);if(!h&&!(fs(l)&&fs(f)))return f;const g=h?l:Jm(l);if(!g)return f;const v=h?f:Jm(f);if(!v)return f;const p=g.length,m=v.length,S=h?new Array(m):i();let y=0;for(let x=0;x<m;x++){const j=h?x:v[x],T=l[j],E=f[j];if(T===E){S[j]=T,(h?x<p:T0.call(l,j))&&y++;continue}if(T===null||E===null||typeof T!="object"||typeof E!="object"){S[j]=E;continue}const w=fl(T,E,i,o+1);S[j]=w,w===T&&y++}return p===m&&y===p?l:S}function Jm(l){const c=Object.getOwnPropertyNames(l);for(const f of c)if(!Km.call(l,f))return!1;const i=Object.getOwnPropertySymbols(l);if(i.length===0)return c;const o=c;for(const f of i){if(!Km.call(l,f))return!1;o.push(f)}return o}function fs(l){if(!$m(l))return!1;const c=l.constructor;if(typeof c>"u")return!0;const i=c.prototype;return!(!$m(i)||!i.hasOwnProperty("isPrototypeOf"))}function $m(l){return Object.prototype.toString.call(l)==="[object Object]"}function Im(l){return Array.isArray(l)&&l.length===Object.keys(l).length}function ml(l,c,i){if(l===c)return!0;if(typeof l!=typeof c)return!1;if(Array.isArray(l)&&Array.isArray(c)){if(l.length!==c.length)return!1;for(let o=0,f=l.length;o<f;o++)if(!ml(l[o],c[o],i))return!1;return!0}if(fs(l)&&fs(c)){const o=i?.ignoreUndefined??!0;if(i?.partial){for(const g in c)if((!o||c[g]!==void 0)&&!ml(l[g],c[g],i))return!1;return!0}let f=0;if(!o)f=Object.keys(l).length;else for(const g in l)l[g]!==void 0&&f++;let h=0;for(const g in c)if((!o||c[g]!==void 0)&&(h++,h>f||!ml(l[g],c[g],i)))return!1;return f===h}return!1}function ds(l){let c,i;const o=new Promise((f,h)=>{c=f,i=h});return o.status="pending",o.resolve=f=>{o.status="resolved",o.value=f,c(f),l?.(f)},o.reject=f=>{o.status="rejected",i(f)},o}function yi(l){return!!(l&&typeof l=="object"&&typeof l.then=="function")}function C0(l){return l.replace(/[\x00-\x1f\x7f]/g,"")}function Fm(l){let c;try{c=decodeURI(l)}catch{c=l.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return C0(c)}var E0=["http:","https:","mailto:","tel:"];function er(l,c){if(!l)return!1;try{const i=new URL(l);return!c.has(i.protocol)}catch{return!1}}function oi(l){if(!l)return{path:l,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(l)&&!l.startsWith("//"))return{path:l,handledProtocolRelativeURL:!1};const c=/%25|%5C/gi;let i=0,o="",f;for(;(f=c.exec(l))!==null;)o+=Fm(l.slice(i,f.index))+f[0],i=c.lastIndex;o=o+Fm(i?l.slice(i):l);let h=!1;return o.startsWith("//")&&(h=!0,o="/"+o.replace(/^\/+/,"")),{path:o,handledProtocolRelativeURL:h}}function M0(l){return/\s|[^\u0000-\u007F]/.test(l)?l.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):l}function A0(l,c){if(l===c)return!0;if(l.length!==c.length)return!1;for(let i=0;i<l.length;i++)if(l[i]!==c[i])return!1;return!0}function tn(){throw new Error("Invariant failed")}function xi(l){const c=new Map;let i,o;const f=h=>{h.next&&(h.prev?(h.prev.next=h.next,h.next.prev=h.prev,h.next=void 0,o&&(o.next=h,h.prev=o)):(h.next.prev=void 0,i=h.next,h.next=void 0,o&&(h.prev=o,o.next=h)),o=h)};return{get(h){const g=c.get(h);if(g)return f(g),g.value},set(h,g){if(c.size>=l&&i){const p=i;c.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===o&&(o=void 0)}const v=c.get(h);if(v)v.value=g,f(v);else{const p={key:h,value:g,prev:o};o&&(o.next=p),o=p,i||(i=p),c.set(h,p)}},clear(){c.clear(),i=void 0,o=void 0}}}var dl=4,zp=5;function w0(l){const c=l.indexOf("{");if(c===-1)return null;const i=l.indexOf("}",c);return i===-1||c+1>=l.length?null:[c,i]}function $o(l,c,i=new Uint16Array(6)){const o=l.indexOf("/",c),f=o===-1?l.length:o,h=l.substring(c,f);if(!h||!h.includes("$"))return i[0]=0,i[1]=c,i[2]=c,i[3]=f,i[4]=f,i[5]=f,i;if(h==="$"){const v=l.length;return i[0]=2,i[1]=c,i[2]=c,i[3]=v,i[4]=v,i[5]=v,i}if(h.charCodeAt(0)===36)return i[0]=1,i[1]=c,i[2]=c+1,i[3]=f,i[4]=f,i[5]=f,i;const g=w0(h);if(g){const[v,p]=g,m=h.charCodeAt(v+1);if(m===45){if(v+2<h.length&&h.charCodeAt(v+2)===36){const S=v+3,y=p;if(S<y)return i[0]=3,i[1]=c+v,i[2]=c+S,i[3]=c+y,i[4]=c+p+1,i[5]=f,i}}else if(m===36){const S=v+1,y=v+2;return y===p?(i[0]=2,i[1]=c+v,i[2]=c+S,i[3]=c+y,i[4]=c+p+1,i[5]=l.length,i):(i[0]=1,i[1]=c+v,i[2]=c+y,i[3]=c+p,i[4]=c+p+1,i[5]=f,i)}}return i[0]=0,i[1]=c,i[2]=c,i[3]=f,i[4]=f,i[5]=f,i}function ir(l,c,i,o,f,h,g){g?.(i);let v=o;{const p=i.fullPath??i.from,m=p.length,S=i.options?.caseSensitive??l,y=!!(i.options?.params?.parse&&i.options?.skipRouteOnParseError?.params);for(;v<m;){const j=$o(p,v,c);let T;const E=v,w=j[5];switch(v=w+1,h++,j[0]){case 0:{const A=p.substring(j[2],j[3]);if(S){const K=f.static?.get(A);if(K)T=K;else{f.static??=new Map;const J=hl(i.fullPath??i.from);J.parent=f,J.depth=h,T=J,f.static.set(A,J)}}else{const K=A.toLowerCase(),J=f.staticInsensitive?.get(K);if(J)T=J;else{f.staticInsensitive??=new Map;const I=hl(i.fullPath??i.from);I.parent=f,I.depth=h,T=I,f.staticInsensitive.set(K,I)}}break}case 1:{const A=p.substring(E,j[1]),K=p.substring(j[4],w),J=S&&!!(A||K),I=A?J?A:A.toLowerCase():void 0,P=K?J?K:K.toLowerCase():void 0,W=!y&&f.dynamic?.find(Q=>!Q.skipOnParamError&&Q.caseSensitive===J&&Q.prefix===I&&Q.suffix===P);if(W)T=W;else{const Q=Eo(1,i.fullPath??i.from,J,I,P);T=Q,Q.depth=h,Q.parent=f,f.dynamic??=[],f.dynamic.push(Q)}break}case 3:{const A=p.substring(E,j[1]),K=p.substring(j[4],w),J=S&&!!(A||K),I=A?J?A:A.toLowerCase():void 0,P=K?J?K:K.toLowerCase():void 0,W=!y&&f.optional?.find(Q=>!Q.skipOnParamError&&Q.caseSensitive===J&&Q.prefix===I&&Q.suffix===P);if(W)T=W;else{const Q=Eo(3,i.fullPath??i.from,J,I,P);T=Q,Q.parent=f,Q.depth=h,f.optional??=[],f.optional.push(Q)}break}case 2:{const A=p.substring(E,j[1]),K=p.substring(j[4],w),J=S&&!!(A||K),I=A?J?A:A.toLowerCase():void 0,P=K?J?K:K.toLowerCase():void 0,W=Eo(2,i.fullPath??i.from,J,I,P);T=W,W.parent=f,W.depth=h,f.wildcard??=[],f.wildcard.push(W)}}f=T}if(y&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const j=hl(i.fullPath??i.from);j.kind=zp,j.parent=f,h++,j.depth=h,f.pathless??=[],f.pathless.push(j),f=j}const x=(i.path||!i.children)&&!i.isRoot;if(x&&p.endsWith("/")){const j=hl(i.fullPath??i.from);j.kind=dl,j.parent=f,h++,j.depth=h,f.index=j,f=j}f.parse=i.options?.params?.parse??null,f.skipOnParamError=y,f.parsingPriority=i.options?.skipRouteOnParseError?.priority??0,x&&!f.route&&(f.route=i,f.fullPath=i.fullPath??i.from)}if(i.children)for(const p of i.children)ir(l,c,p,v,f,h,g)}function Co(l,c){if(l.skipOnParamError&&!c.skipOnParamError)return-1;if(!l.skipOnParamError&&c.skipOnParamError)return 1;if(l.skipOnParamError&&c.skipOnParamError&&(l.parsingPriority||c.parsingPriority))return c.parsingPriority-l.parsingPriority;if(l.prefix&&c.prefix&&l.prefix!==c.prefix){if(l.prefix.startsWith(c.prefix))return-1;if(c.prefix.startsWith(l.prefix))return 1}if(l.suffix&&c.suffix&&l.suffix!==c.suffix){if(l.suffix.endsWith(c.suffix))return-1;if(c.suffix.endsWith(l.suffix))return 1}return l.prefix&&!c.prefix?-1:!l.prefix&&c.prefix?1:l.suffix&&!c.suffix?-1:!l.suffix&&c.suffix?1:l.caseSensitive&&!c.caseSensitive?-1:!l.caseSensitive&&c.caseSensitive?1:0}function Bn(l){if(l.pathless)for(const c of l.pathless)Bn(c);if(l.static)for(const c of l.static.values())Bn(c);if(l.staticInsensitive)for(const c of l.staticInsensitive.values())Bn(c);if(l.dynamic?.length){l.dynamic.sort(Co);for(const c of l.dynamic)Bn(c)}if(l.optional?.length){l.optional.sort(Co);for(const c of l.optional)Bn(c)}if(l.wildcard?.length){l.wildcard.sort(Co);for(const c of l.wildcard)Bn(c)}}function hl(l){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:l,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Eo(l,c,i,o,f){return{kind:l,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:c,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:i,prefix:o,suffix:f}}function O0(l,c){const i=hl("/"),o=new Uint16Array(6);for(const f of l)ir(!1,o,f,1,i,0);Bn(i),c.masksTree=i,c.flatCache=xi(1e3)}function z0(l,c){l||="/";const i=c.flatCache.get(l);if(i)return i;const o=Io(l,c.masksTree);return c.flatCache.set(l,o),o}function D0(l,c,i,o,f){l||="/",o||="/";const h=c?`case\0${l}`:l;let g=f.singleCache.get(h);return g||(g=hl("/"),ir(c,new Uint16Array(6),{from:l},1,g,0),f.singleCache.set(h,g)),Io(o,g,i)}function L0(l,c,i=!1){const o=i?l:`nofuzz\0${l}`,f=c.matchCache.get(o);if(f!==void 0)return f;l||="/";let h;try{h=Io(l,c.segmentTree,i)}catch(g){if(g instanceof URIError)h=null;else throw g}return h&&(h.branch=H0(h.route)),c.matchCache.set(o,h),h}function U0(l){return l==="/"?l:l.replace(/\/{1,}$/,"")}function B0(l,c=!1,i){const o=hl(l.fullPath),f=new Uint16Array(6),h={},g={};let v=0;return ir(c,f,l,1,o,0,p=>{if(i?.(p,v),p.id in h&&tn(),h[p.id]=p,v!==0&&p.path){const m=U0(p.fullPath);(!g[m]||p.fullPath.endsWith("/"))&&(g[m]=p)}v++}),Bn(o),{processedTree:{segmentTree:o,singleCache:xi(1e3),matchCache:xi(1e3),flatCache:null,masksTree:null},routesById:h,routesByPath:g}}function Io(l,c,i=!1){const o=l.split("/"),f=q0(l,o,c,i);if(!f)return null;const[h]=Dp(l,o,f);return{route:f.node.route,rawParams:h,parsedParams:f.parsedParams}}function Dp(l,c,i){const o=k0(i.node);let f=null;const h=Object.create(null);let g=i.extract?.part??0,v=i.extract?.node??0,p=i.extract?.path??0,m=i.extract?.segment??0;for(;v<o.length;g++,v++,p++,m++){const S=o[v];if(S.kind===dl)break;if(S.kind===zp){m--,g--,p--;continue}const y=c[g],x=p;if(y&&(p+=y.length),S.kind===1){f??=i.node.fullPath.split("/");const j=f[m],T=S.prefix?.length??0;if(j.charCodeAt(T)===123){const E=S.suffix?.length??0,w=j.substring(T+2,j.length-E-1),A=y.substring(T,y.length-E);h[w]=decodeURIComponent(A)}else{const E=j.substring(1);h[E]=decodeURIComponent(y)}}else if(S.kind===3){if(i.skipped&1<<v){g--,p=x-1;continue}f??=i.node.fullPath.split("/");const j=f[m],T=S.prefix?.length??0,E=S.suffix?.length??0,w=j.substring(T+3,j.length-E-1),A=S.suffix||S.prefix?y.substring(T,y.length-E):y;A&&(h[w]=decodeURIComponent(A))}else if(S.kind===2){const j=S,T=l.substring(x+(j.prefix?.length??0),l.length-(j.suffix?.length??0)),E=decodeURIComponent(T);h["*"]=E,h._splat=E;break}}return i.rawParams&&Object.assign(h,i.rawParams),[h,{part:g,node:v,path:p,segment:m}]}function H0(l){const c=[l];for(;l.parentRoute;)l=l.parentRoute,c.push(l);return c.reverse(),c}function k0(l){const c=Array(l.depth+1);do c[l.depth]=l,l=l.parent;while(l);return c}function q0(l,c,i,o){if(l==="/"&&i.index)return{node:i.index,skipped:0};const f=!vi(c),h=f&&l!=="/",g=c.length-(f?1:0),v=[{node:i,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let p=null,m=null,S=null;for(;v.length;){const y=v.pop(),{node:x,index:j,skipped:T,depth:E,statics:w,dynamics:A,optionals:K}=y;let{extract:J,rawParams:I,parsedParams:P}=y;if(x.skipOnParamError){if(!Mo(l,c,y))continue;I=y.rawParams,J=y.extract,P=y.parsedParams}o&&x.route&&x.kind!==dl&&fi(m,y)&&(m=y);const W=j===g;if(W&&(x.route&&!h&&fi(S,y)&&(S=y),!x.optional&&!x.wildcard&&!x.index&&!x.pathless))continue;const Q=W?void 0:c[j];let k;if(W&&x.index){const q={node:x.index,index:j,skipped:T,depth:E+1,statics:w,dynamics:A,optionals:K,extract:J,rawParams:I,parsedParams:P};let ie=!0;if(x.index.skipOnParamError&&(Mo(l,c,q)||(ie=!1)),ie){if(w===g&&!A&&!K&&!T)return q;fi(S,q)&&(S=q)}}if(x.wildcard&&fi(p,y))for(const q of x.wildcard){const{prefix:ie,suffix:ee}=q;if(ie&&(W||!(q.caseSensitive?Q:k??=Q.toLowerCase()).startsWith(ie)))continue;if(ee){if(W)continue;const ge=c.slice(j).join("/").slice(-ee.length);if((q.caseSensitive?ge:ge.toLowerCase())!==ee)continue}const ne={node:q,index:g,skipped:T,depth:E,statics:w,dynamics:A,optionals:K,extract:J,rawParams:I,parsedParams:P};if(!(q.skipOnParamError&&!Mo(l,c,ne))){p=ne;break}}if(x.optional){const q=T|1<<E,ie=E+1;for(let ee=x.optional.length-1;ee>=0;ee--){const ne=x.optional[ee];v.push({node:ne,index:j,skipped:q,depth:ie,statics:w,dynamics:A,optionals:K,extract:J,rawParams:I,parsedParams:P})}if(!W)for(let ee=x.optional.length-1;ee>=0;ee--){const ne=x.optional[ee],{prefix:ge,suffix:Ge}=ne;if(ge||Ge){const Re=ne.caseSensitive?Q:k??=Q.toLowerCase();if(ge&&!Re.startsWith(ge)||Ge&&!Re.endsWith(Ge))continue}v.push({node:ne,index:j+1,skipped:T,depth:ie,statics:w,dynamics:A,optionals:K+1,extract:J,rawParams:I,parsedParams:P})}}if(!W&&x.dynamic&&Q)for(let q=x.dynamic.length-1;q>=0;q--){const ie=x.dynamic[q],{prefix:ee,suffix:ne}=ie;if(ee||ne){const ge=ie.caseSensitive?Q:k??=Q.toLowerCase();if(ee&&!ge.startsWith(ee)||ne&&!ge.endsWith(ne))continue}v.push({node:ie,index:j+1,skipped:T,depth:E+1,statics:w,dynamics:A+1,optionals:K,extract:J,rawParams:I,parsedParams:P})}if(!W&&x.staticInsensitive){const q=x.staticInsensitive.get(k??=Q.toLowerCase());q&&v.push({node:q,index:j+1,skipped:T,depth:E+1,statics:w+1,dynamics:A,optionals:K,extract:J,rawParams:I,parsedParams:P})}if(!W&&x.static){const q=x.static.get(Q);q&&v.push({node:q,index:j+1,skipped:T,depth:E+1,statics:w+1,dynamics:A,optionals:K,extract:J,rawParams:I,parsedParams:P})}if(x.pathless){const q=E+1;for(let ie=x.pathless.length-1;ie>=0;ie--){const ee=x.pathless[ie];v.push({node:ee,index:j,skipped:T,depth:q,statics:w,dynamics:A,optionals:K,extract:J,rawParams:I,parsedParams:P})}}}if(S&&p)return fi(p,S)?S:p;if(S)return S;if(p)return p;if(o&&m){let y=m.index;for(let j=0;j<m.index;j++)y+=c[j].length;const x=y===l.length?"/":l.slice(y);return m.rawParams??=Object.create(null),m.rawParams["**"]=decodeURIComponent(x),m}return null}function Mo(l,c,i){try{const[o,f]=Dp(l,c,i);i.rawParams=o,i.extract=f;const h=i.node.parse(o);return i.parsedParams=Object.assign(Object.create(null),i.parsedParams,h),!0}catch{return null}}function fi(l,c){return l?c.statics>l.statics||c.statics===l.statics&&(c.dynamics>l.dynamics||c.dynamics===l.dynamics&&(c.optionals>l.optionals||c.optionals===l.optionals&&((c.node.kind===dl)>(l.node.kind===dl)||c.node.kind===dl==(l.node.kind===dl)&&c.depth>l.depth))):!0}function $c(l){return Fo(l.filter(c=>c!==void 0).join("/"))}function Fo(l){return l.replace(/\/{2,}/g,"/")}function Lp(l){return l==="/"?l:l.replace(/^\/{1,}/,"")}function Yn(l){const c=l.length;return c>1&&l[c-1]==="/"?l.replace(/\/{1,}$/,""):l}function Up(l){return Yn(Lp(l))}function tr(l,c){return l?.endsWith("/")&&l!=="/"&&l!==`${c}/`?l.slice(0,-1):l}function Y0(l,c,i){return tr(l,i)===tr(c,i)}function G0({base:l,to:c,trailingSlash:i="never",cache:o}){const f=c.startsWith("/"),h=!f&&c===".";let g;if(o){g=f?c:h?l:l+"\0"+c;const y=o.get(g);if(y)return y}let v;if(h)v=l.split("/");else if(f)v=c.split("/");else{for(v=l.split("/");v.length>1&&vi(v)==="";)v.pop();const y=c.split("/");for(let x=0,j=y.length;x<j;x++){const T=y[x];T===""?x?x===j-1&&v.push(T):v=[T]:T===".."?v.pop():T==="."||v.push(T)}}v.length>1&&(vi(v)===""?i==="never"&&v.pop():i==="always"&&v.push(""));let p,m="";for(let y=0;y<v.length;y++){y>0&&(m+="/");const x=v[y];if(!x)continue;p=$o(x,0,p);const j=p[0];if(j===0){m+=x;continue}const T=p[5],E=x.substring(0,p[1]),w=x.substring(p[4],T),A=x.substring(p[2],p[3]);j===1?m+=E||w?`${E}{$${A}}${w}`:`$${A}`:j===2?m+=E||w?`${E}{$}${w}`:"$":m+=`${E}{-$${A}}${w}`}m=Fo(m);const S=m||"/";return g&&o&&o.set(g,S),S}function V0(l){const c=new Map(l.map(f=>[encodeURIComponent(f),f])),i=Array.from(c.keys()).map(f=>f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),o=new RegExp(i,"g");return f=>f.replace(o,h=>c.get(h)??h)}function Ao(l,c,i){const o=c[l];return typeof o!="string"?o:l==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(o)?o:o.split("/").map(f=>Wm(f,i)).join("/"):Wm(o,i)}function Pm({path:l,params:c,decoder:i,...o}){let f=!1;const h=Object.create(null);if(!l||l==="/")return{interpolatedPath:"/",usedParams:h,isMissingParams:f};if(!l.includes("$"))return{interpolatedPath:l,usedParams:h,isMissingParams:f};const g=l.length;let v=0,p,m="";for(;v<g;){const S=v;p=$o(l,S,p);const y=p[5];if(v=y+1,S===y)continue;const x=p[0];if(x===0){m+="/"+l.substring(S,y);continue}if(x===2){const j=c._splat;h._splat=j,h["*"]=j;const T=l.substring(S,p[1]),E=l.substring(p[4],y);if(!j){f=!0,(T||E)&&(m+="/"+T+E);continue}const w=Ao("_splat",c,i);m+="/"+T+w+E;continue}if(x===1){const j=l.substring(p[2],p[3]);!f&&!(j in c)&&(f=!0),h[j]=c[j];const T=l.substring(S,p[1]),E=l.substring(p[4],y),w=Ao(j,c,i)??"undefined";m+="/"+T+w+E;continue}if(x===3){const j=l.substring(p[2],p[3]),T=c[j];if(T==null)continue;h[j]=T;const E=l.substring(S,p[1]),w=l.substring(p[4],y),A=Ao(j,c,i)??"";m+="/"+E+A+w;continue}}return l.endsWith("/")&&(m+="/"),{usedParams:h,interpolatedPath:m||"/",isMissingParams:f}}function Wm(l,c){const i=encodeURIComponent(l);return c?.(i)??i}function jt(l){return!!l?.isNotFound}function Q0(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var X0="tsr-scroll-restoration-v1_3";function Z0(){const l=Q0();if(!l)return null;let c={};try{const o=JSON.parse(l.getItem("tsr-scroll-restoration-v1_3")||"{}");fs(o)&&(c=o)}catch{}return{get state(){return c},set:o=>{c=Hn(o,c)||c},persist:()=>{try{l.setItem(X0,JSON.stringify(c))}catch{}}}}var ep=Z0(),K0=l=>l.state.__TSR_key||l.href;function J0(l){const c=[];let i;for(;i=l.parentNode;)c.push(`${l.tagName}:nth-child(${Array.prototype.indexOf.call(i.children,l)+1})`),l=i;return`${c.reverse().join(" > ")}`.toLowerCase()}var Qc=!1,di="window",tp="data-scroll-restoration-id";function $0(l,c){if(!ep)return;const i=ep;if((l.options.scrollRestoration??!1)&&(l.isScrollRestoring=!0),l.isScrollRestorationSetup||!i)return;l.isScrollRestorationSetup=!0,Qc=!1;const o=l.options.getScrollRestorationKey||K0,f=new Map;window.history.scrollRestoration="manual";const h=v=>{if(!(Qc||!l.isScrollRestoring))if(v.target===document||v.target===window)f.set(di,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const p=v.target;f.set(p,{scrollX:p.scrollLeft||0,scrollY:p.scrollTop||0})}},g=v=>{if(!l.isScrollRestoring||!v||f.size===0||!i)return;const p=i.state[v]||={};for(const[m,S]of f){let y;if(m===di)y=di;else if(m.isConnected){const x=m.getAttribute(tp);y=x?`[${tp}="${x}"]`:J0(m)}y&&(p[y]=S)}};document.addEventListener("scroll",h,!0),l.subscribe("onBeforeLoad",v=>{g(v.fromLocation?o(v.fromLocation):void 0),f.clear()}),window.addEventListener("pagehide",()=>{g(o(l.stores.resolvedLocation.state??l.stores.location.state)),i.persist()}),l.subscribe("onRendered",v=>{const p=o(v.toLocation),m=l.options.scrollRestorationBehavior,S=l.options.scrollToTopSelectors;if(f.clear(),!l.resetNextScroll){l.resetNextScroll=!0;return}if(!(typeof l.options.scrollRestoration=="function"&&!l.options.scrollRestoration({location:l.latestLocation}))){Qc=!0;try{const y=l.isScrollRestoring?i.state[p]:void 0;let x=!1;if(y)for(const j in y){const T=y[j];if(!fs(T))continue;const{scrollX:E,scrollY:w}=T;if(!(!Number.isFinite(E)||!Number.isFinite(w))){if(j===di)window.scrollTo({top:w,left:E,behavior:m}),x=!0;else if(j){let A;try{A=document.querySelector(j)}catch{continue}A&&(A.scrollLeft=E,A.scrollTop=w,x=!0)}}}if(!x){const j=l.history.location.hash.slice(1);if(j){const T=window.history.state?.__hashScrollIntoViewOptions??!0;if(T){const E=document.getElementById(j);E&&E.scrollIntoView(T)}}else{const T={top:0,left:0,behavior:m};if(window.scrollTo(T),S)for(const E of S){if(E===di)continue;const w=typeof E=="function"?E():document.querySelector(E);w&&w.scrollTo(T)}}}}finally{Qc=!1}l.isScrollRestoring&&i.set(y=>(y[p]||={},y))}})}function I0(l,c=String){const i=new URLSearchParams;for(const o in l){const f=l[o];f!==void 0&&i.set(o,c(f))}return i.toString()}function wo(l){return l?l==="false"?!1:l==="true"?!0:+l*0===0&&+l+""===l?+l:l:""}function F0(l){const c=new URLSearchParams(l),i=Object.create(null);for(const[o,f]of c.entries()){const h=i[o];h==null?i[o]=wo(f):Array.isArray(h)?h.push(wo(f)):i[o]=[h,wo(f)]}return i}var P0=ev(JSON.parse),W0=tv(JSON.stringify,JSON.parse);function ev(l){return c=>{c[0]==="?"&&(c=c.substring(1));const i=F0(c);for(const o in i){const f=i[o];if(typeof f=="string")try{i[o]=l(f)}catch{}}return i}}function tv(l,c){const i=typeof c=="function";function o(f){if(typeof f=="object"&&f!==null)try{return l(f)}catch{}else if(i&&typeof f=="string")try{return c(f),l(f)}catch{}return f}return f=>{const h=I0(f,o);return h?`?${h}`:""}}var pl="__root__";function Si(l){if(l.statusCode=l.statusCode||l.code||307,!l._builtLocation&&!l.reloadDocument&&typeof l.href=="string")try{new URL(l.href),l.reloadDocument=!0}catch{}const c=new Headers(l.headers);l.href&&c.get("Location")===null&&c.set("Location",l.href);const i=new Response(null,{status:l.statusCode,headers:c});if(i.options=l,l.throw)throw i;return i}function Ot(l){return l instanceof Response&&!!l.options}function av(l){return{input:({url:c})=>{for(const i of l)c=Yo(i,c);return c},output:({url:c})=>{for(let i=l.length-1;i>=0;i--)c=Bp(l[i],c);return c}}}function nv(l){const c=Up(l.basepath),i=`/${c}`,o=`${i}/`,f=l.caseSensitive?i:i.toLowerCase(),h=l.caseSensitive?o:o.toLowerCase();return{input:({url:g})=>{const v=l.caseSensitive?g.pathname:g.pathname.toLowerCase();return v===f?g.pathname="/":v.startsWith(h)&&(g.pathname=g.pathname.slice(i.length)),g},output:({url:g})=>(g.pathname=$c(["/",c,g.pathname]),g)}}function Yo(l,c){const i=l?.input?.({url:c});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return c}function Bp(l,c){const i=l?.output?.({url:c});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return c}function lv(l,c){const{createMutableStore:i,createReadonlyStore:o,batch:f,init:h}=c,g=new Map,v=new Map,p=new Map,m=i(l.status),S=i(l.loadedAt),y=i(l.isLoading),x=i(l.isTransitioning),j=i(l.location),T=i(l.resolvedLocation),E=i(l.statusCode),w=i(l.redirect),A=i([]),K=i([]),J=i([]),I=o(()=>Oo(g,A.state)),P=o(()=>Oo(v,K.state)),W=o(()=>Oo(p,J.state)),Q=o(()=>A.state[0]),k=o(()=>A.state.some($=>g.get($)?.state.status==="pending")),q=o(()=>({locationHref:j.state.href,resolvedLocationHref:T.state?.href,status:m.state})),ie=o(()=>({status:m.state,loadedAt:S.state,isLoading:y.state,isTransitioning:x.state,matches:I.state,location:j.state,resolvedLocation:T.state,statusCode:E.state,redirect:w.state})),ee=xi(64);function ne($){let se=ee.get($);return se||(se=o(()=>{const Te=A.state;for(const ve of Te){const R=g.get(ve);if(R&&R.routeId===$)return R.state}}),ee.set($,se)),se}const ge={status:m,loadedAt:S,isLoading:y,isTransitioning:x,location:j,resolvedLocation:T,statusCode:E,redirect:w,matchesId:A,pendingMatchesId:K,cachedMatchesId:J,activeMatchesSnapshot:I,pendingMatchesSnapshot:P,cachedMatchesSnapshot:W,firstMatchId:Q,hasPendingMatches:k,matchRouteReactivity:q,activeMatchStoresById:g,pendingMatchStoresById:v,cachedMatchStoresById:p,__store:ie,getMatchStoreByRouteId:ne,setActiveMatches:Ge,setPendingMatches:Re,setCachedMatches:B};Ge(l.matches),h?.(ge);function Ge($){zo($,g,A,i,f)}function Re($){zo($,v,K,i,f)}function B($){zo($,p,J,i,f)}return ge}function Oo(l,c){const i=[];for(const o of c){const f=l.get(o);f&&i.push(f.state)}return i}function zo(l,c,i,o,f){const h=l.map(v=>v.id),g=new Set(h);f(()=>{for(const v of c.keys())g.has(v)||c.delete(v);for(const v of l){const p=c.get(v.id);if(!p){const m=o(v);m.routeId=v.routeId,c.set(v.id,m);continue}p.routeId=v.routeId,p.state!==v&&p.setState(()=>v)}A0(i.state,h)||i.setState(()=>h)})}var Go=l=>{if(!l.rendered)return l.rendered=!0,l.onReady?.()},sv=l=>l.stores.matchesId.state.some(c=>l.stores.activeMatchStoresById.get(c)?.state._forcePending),cr=(l,c)=>!!(l.preload&&!l.router.stores.activeMatchStoresById.has(c)),bl=(l,c,i=!0)=>{const o={...l.router.options.context??{}},f=i?c:c-1;for(let h=0;h<=f;h++){const g=l.matches[h];if(!g)continue;const v=l.router.getMatch(g.id);v&&Object.assign(o,v.__routeContext,v.__beforeLoadContext)}return o},ap=(l,c)=>{if(!l.matches.length)return;const i=c.routeId,o=l.matches.findIndex(g=>g.routeId===l.router.routeTree.id),f=o>=0?o:0;let h=i?l.matches.findIndex(g=>g.routeId===i):l.firstBadMatchIndex??l.matches.length-1;h<0&&(h=f);for(let g=h;g>=0;g--){const v=l.matches[g];if(l.router.looseRoutesById[v.routeId].options.notFoundComponent)return g}return i?h:f},kn=(l,c,i)=>{if(!(!Ot(i)&&!jt(i)))throw Ot(i)&&i.redirectHandled&&!i.options.reloadDocument||(c&&(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.loaderPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loaderPromise=void 0,c._nonReactive.error=i,l.updateMatch(c.id,o=>({...o,status:Ot(i)?"redirected":o.status==="pending"?"success":o.status,context:bl(l,c.index),isFetching:!1,error:i})),jt(i)&&!i.routeId&&(i.routeId=c.routeId),c._nonReactive.loadPromise?.resolve()),Ot(i)&&(l.rendered=!0,i.options._fromLocation=l.location,i.redirectHandled=!0,i=l.router.resolveRedirect(i))),i},Hp=(l,c)=>{const i=l.router.getMatch(c);return!!(!i||i._nonReactive.dehydrated)},np=(l,c,i)=>{const o=bl(l,i);l.updateMatch(c,f=>({...f,context:o}))},hi=(l,c,i,o)=>{const{id:f,routeId:h}=l.matches[c],g=l.router.looseRoutesById[h];if(i instanceof Promise)throw i;i.routerCode=o,l.firstBadMatchIndex??=c,kn(l,l.router.getMatch(f),i);try{g.options.onError?.(i)}catch(v){i=v,kn(l,l.router.getMatch(f),i)}l.updateMatch(f,v=>(v._nonReactive.beforeLoadPromise?.resolve(),v._nonReactive.beforeLoadPromise=void 0,v._nonReactive.loadPromise?.resolve(),{...v,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!l.preload&&!Ot(i)&&!jt(i)&&(l.serialError??=i)},kp=(l,c,i,o)=>{if(o._nonReactive.pendingTimeout!==void 0)return;const f=i.options.pendingMs??l.router.options.defaultPendingMs;if(l.onReady&&!cr(l,c)&&(i.options.loader||i.options.beforeLoad||Yp(i))&&typeof f=="number"&&f!==1/0&&(i.options.pendingComponent??l.router.options?.defaultPendingComponent)){const h=setTimeout(()=>{Go(l)},f);o._nonReactive.pendingTimeout=h}},iv=(l,c,i)=>{const o=l.router.getMatch(c);if(!o._nonReactive.beforeLoadPromise&&!o._nonReactive.loaderPromise)return;kp(l,c,i,o);const f=()=>{const h=l.router.getMatch(c);h.preload&&(h.status==="redirected"||h.status==="notFound")&&kn(l,h,h.error)};return o._nonReactive.beforeLoadPromise?o._nonReactive.beforeLoadPromise.then(f):f()},cv=(l,c,i,o)=>{const f=l.router.getMatch(c);let h=f._nonReactive.loadPromise;f._nonReactive.loadPromise=ds(()=>{h?.resolve(),h=void 0});const{paramsError:g,searchError:v}=f;g&&hi(l,i,g,"PARSE_PARAMS"),v&&hi(l,i,v,"VALIDATE_SEARCH"),kp(l,c,o,f);const p=new AbortController;let m=!1;const S=()=>{m||(m=!0,l.updateMatch(c,I=>({...I,isFetching:"beforeLoad",fetchCount:I.fetchCount+1,abortController:p})))},y=()=>{f._nonReactive.beforeLoadPromise?.resolve(),f._nonReactive.beforeLoadPromise=void 0,l.updateMatch(c,I=>({...I,isFetching:!1}))};if(!o.options.beforeLoad){l.router.batch(()=>{S(),y()});return}f._nonReactive.beforeLoadPromise=ds();const x={...bl(l,i,!1),...f.__routeContext},{search:j,params:T,cause:E}=f,w=cr(l,c),A={search:j,abortController:p,params:T,preload:w,context:x,location:l.location,navigate:I=>l.router.navigate({...I,_fromLocation:l.location}),buildLocation:l.router.buildLocation,cause:w?"preload":E,matches:l.matches,routeId:o.id,...l.router.options.additionalContext},K=I=>{if(I===void 0){l.router.batch(()=>{S(),y()});return}(Ot(I)||jt(I))&&(S(),hi(l,i,I,"BEFORE_LOAD")),l.router.batch(()=>{S(),l.updateMatch(c,P=>({...P,__beforeLoadContext:I})),y()})};let J;try{if(J=o.options.beforeLoad(A),yi(J))return S(),J.catch(I=>{hi(l,i,I,"BEFORE_LOAD")}).then(K)}catch(I){S(),hi(l,i,I,"BEFORE_LOAD")}K(J)},rv=(l,c)=>{const{id:i,routeId:o}=l.matches[c],f=l.router.looseRoutesById[o],h=()=>v(),g=()=>cv(l,i,c,f),v=()=>{if(Hp(l,i))return;const p=iv(l,i,f);return yi(p)?p.then(g):g()};return h()},uv=(l,c,i)=>{const o=l.router.getMatch(c);if(!o||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const f={ssr:l.router.options.ssr,matches:l.matches,match:o,params:o.params,loaderData:o.loaderData};return Promise.all([i.options.head?.(f),i.options.scripts?.(f),i.options.headers?.(f)]).then(([h,g,v])=>({meta:h?.meta,links:h?.links,headScripts:h?.scripts,headers:v,scripts:g,styles:h?.styles}))},qp=(l,c,i,o,f)=>{const h=c[o-1],{params:g,loaderDeps:v,abortController:p,cause:m}=l.router.getMatch(i),S=bl(l,o),y=cr(l,i);return{params:g,deps:v,preload:!!y,parentMatchPromise:h,abortController:p,context:S,location:l.location,navigate:x=>l.router.navigate({...x,_fromLocation:l.location}),cause:y?"preload":m,route:f,...l.router.options.additionalContext}},lp=async(l,c,i,o,f)=>{try{const h=l.router.getMatch(i);try{(!(Op??l.router.isServer)||h.ssr===!0)&&ji(f);const g=f.options.loader,v=typeof g=="function"?g:g?.handler,p=v?.(qp(l,c,i,o,f)),m=!!v&&yi(p);if((m||f._lazyPromise||f._componentsPromise||f.options.head||f.options.scripts||f.options.headers||h._nonReactive.minPendingPromise)&&l.updateMatch(i,y=>({...y,isFetching:"loader"})),v){const y=m?await p:p;kn(l,l.router.getMatch(i),y),y!==void 0&&l.updateMatch(i,x=>({...x,loaderData:y}))}f._lazyPromise&&await f._lazyPromise;const S=h._nonReactive.minPendingPromise;S&&await S,f._componentsPromise&&await f._componentsPromise,l.updateMatch(i,y=>({...y,error:void 0,context:bl(l,o),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(g){let v=g;if(v?.name==="AbortError"){if(h.abortController.signal.aborted){h._nonReactive.loaderPromise?.resolve(),h._nonReactive.loaderPromise=void 0;return}l.updateMatch(i,m=>({...m,status:m.status==="pending"?"success":m.status,isFetching:!1,context:bl(l,o)}));return}const p=h._nonReactive.minPendingPromise;p&&await p,jt(g)&&await f.options.notFoundComponent?.preload?.(),kn(l,l.router.getMatch(i),g);try{f.options.onError?.(g)}catch(m){v=m,kn(l,l.router.getMatch(i),m)}!Ot(v)&&!jt(v)&&await ji(f,["errorComponent"]),l.updateMatch(i,m=>({...m,error:v,context:bl(l,o),status:"error",isFetching:!1}))}}catch(h){const g=l.router.getMatch(i);g&&(g._nonReactive.loaderPromise=void 0),kn(l,g,h)}},ov=async(l,c,i)=>{async function o(j,T,E,w,A){const K=Date.now()-T.updatedAt,J=j?A.options.preloadStaleTime??l.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??l.router.options.defaultStaleTime??0,I=A.options.shouldReload,P=typeof I=="function"?I(qp(l,c,f,i,A)):I,{status:W,invalid:Q}=w,k=K>=J&&(!!l.forceStaleReload||w.cause==="enter"||E!==void 0&&E!==w.id);g=W==="success"&&(Q||(P??k)),j&&A.options.preload===!1||(g&&!l.sync&&S?(v=!0,(async()=>{try{await lp(l,c,f,i,A);const q=l.router.getMatch(f);q._nonReactive.loaderPromise?.resolve(),q._nonReactive.loadPromise?.resolve(),q._nonReactive.loaderPromise=void 0,q._nonReactive.loadPromise=void 0}catch(q){Ot(q)&&await l.router.navigate(q.options)}})()):W!=="success"||g?await lp(l,c,f,i,A):np(l,f,i))}const{id:f,routeId:h}=l.matches[i];let g=!1,v=!1;const p=l.router.looseRoutesById[h],m=p.options.loader,S=((typeof m=="function"?void 0:m?.staleReloadMode)??l.router.options.defaultStaleReloadMode)!=="blocking";if(Hp(l,f)){if(!l.router.getMatch(f))return l.matches[i];np(l,f,i)}else{const j=l.router.getMatch(f),T=l.router.stores.matchesId.state[i],E=(T&&l.router.stores.activeMatchStoresById.get(T)||null)?.routeId===h?T:l.router.stores.activeMatchesSnapshot.state.find(A=>A.routeId===h)?.id,w=cr(l,f);if(j._nonReactive.loaderPromise){if(j.status==="success"&&!l.sync&&!j.preload&&S)return j;await j._nonReactive.loaderPromise;const A=l.router.getMatch(f),K=A._nonReactive.error||A.error;K&&kn(l,A,K),A.status==="pending"&&await o(w,j,E,A,p)}else{const A=w&&!l.router.stores.activeMatchStoresById.has(f),K=l.router.getMatch(f);K._nonReactive.loaderPromise=ds(),A!==K.preload&&l.updateMatch(f,J=>({...J,preload:A})),await o(w,j,E,K,p)}}const y=l.router.getMatch(f);v||(y._nonReactive.loaderPromise?.resolve(),y._nonReactive.loadPromise?.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,v||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const x=v?y.isFetching:!1;return x!==y.isFetching||y.invalid!==!1?(l.updateMatch(f,j=>({...j,isFetching:x,invalid:!1})),l.router.getMatch(f)):y};async function sp(l){const c=l,i=[];sv(c.router)&&Go(c);let o;for(let x=0;x<c.matches.length;x++){try{const j=rv(c,x);yi(j)&&await j}catch(j){if(Ot(j))throw j;if(jt(j))o=j;else if(!c.preload)throw j;break}if(c.serialError||c.firstBadMatchIndex!=null)break}const f=c.firstBadMatchIndex??c.matches.length,h=o&&!c.preload?ap(c,o):void 0,g=o&&c.preload?0:h!==void 0?Math.min(h+1,f):f;let v,p;for(let x=0;x<g;x++)i.push(ov(c,i,x));try{await Promise.all(i)}catch{const x=await Promise.allSettled(i);for(const j of x){if(j.status!=="rejected")continue;const T=j.reason;if(Ot(T))throw T;jt(T)?v??=T:p??=T}if(p!==void 0)throw p}const m=v??(o&&!c.preload?o:void 0);let S=c.firstBadMatchIndex!==void 0?c.firstBadMatchIndex:c.matches.length-1;if(!m&&o&&c.preload)return c.matches;if(m){const x=ap(c,m);x===void 0&&tn();const j=c.matches[x],T=c.router.looseRoutesById[j.routeId],E=c.router.options?.defaultNotFoundComponent;!T.options.notFoundComponent&&E&&(T.options.notFoundComponent=E),m.routeId=j.routeId;const w=j.routeId===c.router.routeTree.id;c.updateMatch(j.id,A=>({...A,...w?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),S=x,await ji(T,["notFoundComponent"])}else if(!c.preload){const x=c.matches[0];x.globalNotFound||c.router.getMatch(x.id)?.globalNotFound&&c.updateMatch(x.id,j=>({...j,globalNotFound:!1,error:void 0}))}if(c.serialError&&c.firstBadMatchIndex!==void 0){const x=c.router.looseRoutesById[c.matches[c.firstBadMatchIndex].routeId];await ji(x,["errorComponent"])}for(let x=0;x<=S;x++){const{id:j,routeId:T}=c.matches[x],E=c.router.looseRoutesById[T];try{const w=uv(c,j,E);if(w){const A=await w;c.updateMatch(j,K=>({...K,...A}))}}catch(w){console.error(`Error executing head for route ${T}:`,w)}}const y=Go(c);if(yi(y)&&await y,m)throw m;if(c.serialError&&!c.preload&&!c.onReady)throw c.serialError;return c.matches}function ip(l,c){const i=c.map(o=>l.options[o]?.preload?.()).filter(Boolean);if(i.length!==0)return Promise.all(i)}function ji(l,c=Ic){!l._lazyLoaded&&l._lazyPromise===void 0&&(l.lazyFn?l._lazyPromise=l.lazyFn().then(o=>{const{id:f,...h}=o.options;Object.assign(l.options,h),l._lazyLoaded=!0,l._lazyPromise=void 0}):l._lazyLoaded=!0);const i=()=>l._componentsLoaded?void 0:c===Ic?(()=>{if(l._componentsPromise===void 0){const o=ip(l,Ic);o?l._componentsPromise=o.then(()=>{l._componentsLoaded=!0,l._componentsPromise=void 0}):l._componentsLoaded=!0}return l._componentsPromise})():ip(l,c);return l._lazyPromise?l._lazyPromise.then(i):i()}function Yp(l){for(const c of Ic)if(l.options[c]?.preload)return!0;return!1}var Ic=["component","errorComponent","pendingComponent","notFoundComponent"],Gn="__TSR_index",cp="popstate",rp="beforeunload";function Gp(l){let c=l.getLocation();const i=new Set,o=g=>{c=l.getLocation(),i.forEach(v=>v({location:c,action:g}))},f=g=>{l.notifyOnIndexChange??!0?o(g):c=l.getLocation()},h=async({task:g,navigateOpts:v,...p})=>{if(v?.ignoreBlocker??!1){g();return}const m=l.getBlockers?.()??[],S=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&S)for(const y of m){const x=Ni(p.path,p.state);if(await y.blockerFn({currentLocation:c,nextLocation:x,action:p.type})){l.onBlocked?.();return}}g()};return{get location(){return c},get length(){return l.getLength()},subscribers:i,subscribe:g=>(i.add(g),()=>{i.delete(g)}),push:(g,v,p)=>{const m=c.state[Gn];v=Vo(m+1,v),h({task:()=>{l.pushState(g,v),o({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:g,state:v})},replace:(g,v,p)=>{const m=c.state[Gn];v=Vo(m,v),h({task:()=>{l.replaceState(g,v),o({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:g,state:v})},go:(g,v)=>{h({task:()=>{l.go(g),f({type:"GO",index:g})},navigateOpts:v,type:"GO"})},back:g=>{h({task:()=>{l.back(g?.ignoreBlocker??!1),f({type:"BACK"})},navigateOpts:g,type:"BACK"})},forward:g=>{h({task:()=>{l.forward(g?.ignoreBlocker??!1),f({type:"FORWARD"})},navigateOpts:g,type:"FORWARD"})},canGoBack:()=>c.state[Gn]!==0,createHref:g=>l.createHref(g),block:g=>{if(!l.setBlockers)return()=>{};const v=l.getBlockers?.()??[];return l.setBlockers([...v,g]),()=>{const p=l.getBlockers?.()??[];l.setBlockers?.(p.filter(m=>m!==g))}},flush:()=>l.flush?.(),destroy:()=>l.destroy?.(),notify:o}}function Vo(l,c){c||(c={});const i=Po();return{...c,key:i,__TSR_key:i,[Gn]:l}}function Vp(l){const c=typeof document<"u"?window:void 0,i=c.history.pushState,o=c.history.replaceState;let f=[];const h=()=>f,g=k=>f=k,v=(k=>k),p=(()=>Ni(`${c.location.pathname}${c.location.search}${c.location.hash}`,c.history.state));if(!c.history.state?.__TSR_key&&!c.history.state?.key){const k=Po();c.history.replaceState({[Gn]:0,key:k,__TSR_key:k},"")}let m=p(),S,y=!1,x=!1,j=!1,T=!1;const E=()=>m;let w,A;const K=()=>{w&&(Q._ignoreSubscribers=!0,(w.isPush?c.history.pushState:c.history.replaceState)(w.state,"",w.href),Q._ignoreSubscribers=!1,w=void 0,A=void 0,S=void 0)},J=(k,q,ie)=>{const ee=v(q);A||(S=m),m=Ni(q,ie),w={href:ee,state:ie,isPush:w?.isPush||k==="push"},A||(A=Promise.resolve().then(()=>K()))},I=k=>{m=p(),Q.notify({type:k})},P=async()=>{if(x){x=!1;return}const k=p(),q=k.state[Gn]-m.state[Gn],ie=q===1,ee=q===-1,ne=!ie&&!ee||y;y=!1;const ge=ne?"GO":ee?"BACK":"FORWARD",Ge=ne?{type:"GO",index:q}:{type:ee?"BACK":"FORWARD"};if(j)j=!1;else{const Re=h();if(typeof document<"u"&&Re.length){for(const B of Re)if(await B.blockerFn({currentLocation:m,nextLocation:k,action:ge})){x=!0,c.history.go(1),Q.notify(Ge);return}}}m=p(),Q.notify(Ge)},W=k=>{if(T){T=!1;return}let q=!1;const ie=h();if(typeof document<"u"&&ie.length)for(const ee of ie){const ne=ee.enableBeforeUnload??!0;if(ne===!0){q=!0;break}if(typeof ne=="function"&&ne()===!0){q=!0;break}}if(q)return k.preventDefault(),k.returnValue=""},Q=Gp({getLocation:E,getLength:()=>c.history.length,pushState:(k,q)=>J("push",k,q),replaceState:(k,q)=>J("replace",k,q),back:k=>(k&&(j=!0),T=!0,c.history.back()),forward:k=>{k&&(j=!0),T=!0,c.history.forward()},go:k=>{y=!0,c.history.go(k)},createHref:k=>v(k),flush:K,destroy:()=>{c.history.pushState=i,c.history.replaceState=o,c.removeEventListener(rp,W,{capture:!0}),c.removeEventListener(cp,P)},onBlocked:()=>{S&&m!==S&&(m=S)},getBlockers:h,setBlockers:g,notifyOnIndexChange:!1});return c.addEventListener(rp,W,{capture:!0}),c.addEventListener(cp,P),c.history.pushState=function(...k){const q=i.apply(c.history,k);return Q._ignoreSubscribers||I("PUSH"),q},c.history.replaceState=function(...k){const q=o.apply(c.history,k);return Q._ignoreSubscribers||I("REPLACE"),q},Q}function fv(l={initialEntries:["/"]}){const c=l.initialEntries;let i=l.initialIndex?Math.min(Math.max(l.initialIndex,0),c.length-1):c.length-1;const o=c.map((p,m)=>Vo(m,void 0)),f=()=>Ni(c[i],o[i]);let h=[];return Gp({getLocation:f,getLength:()=>c.length,pushState:(p,m)=>{i<c.length-1&&(c.splice(i+1),o.splice(i+1)),o.push(m),c.push(p),i=Math.max(c.length-1,0)},replaceState:(p,m)=>{o[i]=m,c[i]=p},back:()=>{i=Math.max(i-1,0)},forward:()=>{i=Math.min(i+1,c.length-1)},go:p=>{i=Math.min(Math.max(i+p,0),c.length-1)},createHref:p=>p,getBlockers:()=>h,setBlockers:p=>h=p})}function dv(l){let c=l.replace(/[\x00-\x1f\x7f]/g,"");return c.startsWith("//")&&(c="/"+c.replace(/^\/+/,"")),c}function Ni(l,c){const i=dv(l),o=i.indexOf("#"),f=i.indexOf("?"),h=Po();return{href:i,pathname:i.substring(0,o>0?f>0?Math.min(o,f):o:f>0?f:i.length),hash:o>-1?i.substring(o):"",search:f>-1?i.slice(f,o===-1?void 0:o):"",state:c||{[Gn]:0,key:h,__TSR_key:h}}}function Po(){return(Math.random()+1).toString(36).substring(7)}function us(l,c){const i=c,o=l;return{fromLocation:i,toLocation:o,pathChanged:i?.pathname!==o.pathname,hrefChanged:i?.href!==o.href,hashChanged:i?.hash!==o.hash}}var hv=class{constructor(l,c){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=i=>i(),this.update=i=>{const o=this.options,f=this.basepath??o?.basepath??"/",h=this.basepath===void 0,g=o?.rewrite;if(this.options={...o,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=V0(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Vp()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let S;this.resolvePathCache=xi(1e3),S=this.buildRouteTree(),this.setRoutes(S)}if(!this.stores&&this.latestLocation){const S=this.getStoreConfig(this);this.batch=S.batch,this.stores=lv(pv(this.latestLocation),S),$0(this)}let v=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(h||f!==p||g!==m){this.basepath=p;const S=[],y=Up(p);y&&y!=="/"&&S.push(nv({basepath:p})),m&&S.push(m),this.rewrite=S.length===0?void 0:S.length===1?S[0]:av(S),this.history&&this.updateLatestLocation(),v=!0}v&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=B0(this.routeTree,this.options.caseSensitive,(o,f)=>{o.init({originalIndex:f})});return this.options.routeMasks&&O0(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,o)=>{const f={eventType:i,fn:o};return this.subscribers.add(f),()=>{this.subscribers.delete(f)}},this.emit=i=>{this.subscribers.forEach(o=>{o.eventType===i.type&&o.fn(i)})},this.parseLocation=(i,o)=>{const f=({pathname:p,search:m,hash:S,href:y,state:x})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const A=this.options.parseSearch(m),K=this.options.stringifySearch(A);return{href:p+K+S,publicHref:p+K+S,pathname:oi(p).path,external:!1,searchStr:K,search:ol(o?.search,A),hash:oi(S.slice(1)).path,state:fl(o?.state,x)}}const j=new URL(y,this.origin),T=Yo(this.rewrite,j),E=this.options.parseSearch(T.search),w=this.options.stringifySearch(E);return T.search=w,{href:T.href.replace(T.origin,""),publicHref:y,pathname:oi(T.pathname).path,external:!!this.rewrite&&T.origin!==this.origin,searchStr:w,search:ol(o?.search,E),hash:oi(T.hash.slice(1)).path,state:fl(o?.state,x)}},h=f(i),{__tempLocation:g,__tempKey:v}=h.state;if(g&&(!v||v===this.tempLocationKey)){const p=f(g);return p.state.key=h.state.key,p.state.__TSR_key=h.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:h}}return h},this.resolvePathWithBase=(i,o)=>G0({base:i,to:Fo(o),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,o,f)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:o},f):this.matchRoutesInternal(i,o),this.getMatchedRoutes=i=>bv({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const o=this.getMatch(i);o&&(o.abortController.abort(),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.state.forEach(i=>{if(this.stores.pendingMatchStoresById.has(i))return;const o=this.stores.activeMatchStoresById.get(i)?.state;o&&(o.status==="pending"||o.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const o=(h={})=>{const g=h._fromLocation||this.pendingBuiltLocation||this.latestLocation,v=this.matchRoutesLightweight(g);h.from;const p=h.unsafeRelative==="path"?g.pathname:h.from??v.fullPath,m=this.resolvePathWithBase(p,"."),S=v.search,y=Object.assign(Object.create(null),v.params),x=h.to?this.resolvePathWithBase(m,`${h.to}`):this.resolvePathWithBase(m,"."),j=h.params===!1||h.params===null?Object.create(null):(h.params??!0)===!0?y:Object.assign(y,Hn(h.params,y)),T=this.getMatchedRoutes(x);let E=T.matchedRoutes;if((!T.foundRoute||T.foundRoute.path!=="/"&&T.routeParams["**"])&&this.options.notFoundRoute&&(E=[...E,this.options.notFoundRoute]),Object.keys(j).length>0)for(const ie of E){const ee=ie.options.params?.stringify??ie.options.stringifyParams;if(ee)try{Object.assign(j,ee(j))}catch{}}const w=i.leaveParams?x:oi(Pm({path:x,params:j,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=S;if(i._includeValidateSearch&&this.options.search?.strict){const ie={};E.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(ie,Fc(ee.options.validateSearch,{...ie,...A}))}catch{}}),A=ie}A=gv({search:A,dest:h,destRoutes:E,_includeValidateSearch:i._includeValidateSearch}),A=ol(S,A);const K=this.options.stringifySearch(A),J=h.hash===!0?g.hash:h.hash?Hn(h.hash,g.hash):void 0,I=J?`#${J}`:"";let P=h.state===!0?g.state:h.state?Hn(h.state,g.state):{};P=fl(g.state,P);const W=`${w}${K}${I}`;let Q,k,q=!1;if(this.rewrite){const ie=new URL(W,this.origin),ee=Bp(this.rewrite,ie);Q=ie.href.replace(ie.origin,""),ee.origin!==this.origin?(k=ee.href,q=!0):k=ee.pathname+ee.search+ee.hash}else Q=M0(W),k=Q;return{publicHref:k,href:Q,pathname:w,search:A,searchStr:K,state:P,hash:J??"",external:q,unmaskOnReload:h.unmaskOnReload}},f=(h={},g)=>{const v=o(h);let p=g?o(g):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const S=z0(v.pathname,this.processedTree);if(S){Object.assign(m,S.rawParams);const{from:y,params:x,...j}=S.route,T=x===!1||x===null?Object.create(null):(x??!0)===!0?m:Object.assign(m,Hn(x,m));g={from:i.from,...j,params:T},p=o(g)}}}return p&&(v.maskedLocation=p),v};return i.mask?f(i,{from:i.from,...i.mask}):f(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:o,...f})=>{const h=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(S=>{f.state[S]=this.latestLocation.state[S]});const m=ml(f.state,this.latestLocation.state);return p.forEach(S=>{delete f.state[S]}),m},g=Yn(this.latestLocation.href)===Yn(f.href);let v=this.commitLocationPromise;if(this.commitLocationPromise=ds(()=>{v?.resolve(),v=void 0}),g&&h())this.load();else{let{maskedLocation:p,hashScrollIntoView:m,...S}=f;p&&(S={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...S,search:S.searchStr,state:{...S.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(S.unmaskOnReload??this.options.unmaskOnReload??!1)&&(S.state.__tempKey=this.tempLocationKey)),S.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,this.history[f.replace?"replace":"push"](S.publicHref,S.state,{ignoreBlocker:o})}return this.resetNextScroll=f.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:o,hashScrollIntoView:f,viewTransition:h,ignoreBlocker:g,href:v,...p}={})=>{if(v){const y=this.history.location.state.__TSR_index,x=Ni(v,{__TSR_index:i?y:y+1}),j=new URL(x.pathname,this.origin);p.to=Yo(this.rewrite,j).pathname,p.search=this.options.parseSearch(x.search),p.hash=x.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const S=this.commitLocation({...m,viewTransition:h,replace:i,resetScroll:o,hashScrollIntoView:f,ignoreBlocker:g});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),S},this.navigate=async({to:i,reloadDocument:o,href:f,publicHref:h,...g})=>{let v=!1;if(f)try{new URL(`${f}`),v=!0}catch{}if(v&&!o&&(o=!0),o){if(i!==void 0||!f){const m=this.buildLocation({to:i,...g});f=f??m.publicHref,h=h??m.publicHref}const p=!v&&h?h:f;if(er(p,this.protocolAllowlist))return Promise.resolve();if(!g.ignoreBlocker){const m=this.history.getBlockers?.()??[];for(const S of m)if(S?.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return g.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...g,href:f,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),o=this.stores.cachedMatchesSnapshot.state.filter(f=>!i.some(h=>h.id===f.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(i),this.stores.setCachedMatches(o)})},this.load=async i=>{let o,f,h;const g=this.stores.resolvedLocation.state??this.stores.location.state;for(h=new Promise(p=>{this.startTransition(async()=>{try{this.beforeLoad();const m=this.latestLocation,S=this.stores.resolvedLocation.state,y=us(m,S);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await sp({router:this,sync:i?.sync,forceStaleReload:g.href===m.href,matches:this.stores.pendingMatchesSnapshot.state,location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let x=null,j=null,T=null,E=null;this.batch(()=>{const w=this.stores.pendingMatchesSnapshot.state,A=w.length,K=this.stores.activeMatchesSnapshot.state;x=A?K.filter(P=>!this.stores.pendingMatchStoresById.has(P.id)):null;const J=new Set;for(const P of this.stores.pendingMatchStoresById.values())P.routeId&&J.add(P.routeId);const I=new Set;for(const P of this.stores.activeMatchStoresById.values())P.routeId&&I.add(P.routeId);j=A?K.filter(P=>!J.has(P.routeId)):null,T=A?w.filter(P=>!I.has(P.routeId)):null,E=A?w.filter(P=>I.has(P.routeId)):K,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),A&&(this.stores.setActiveMatches(w),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[w,A]of[[j,"onLeave"],[T,"onEnter"],[E,"onStay"]])if(w)for(const K of w)this.looseRoutesById[K.routeId].options[A]?.(K)})})}})}catch(m){Ot(m)?(o=m,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):jt(m)&&(f=m);const S=o?o.status:f?404:this.stores.activeMatchesSnapshot.state.some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>S),this.stores.redirect.setState(()=>o)})}this.latestLoadPromise===h&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),p()})}),this.latestLoadPromise=h,await h;this.latestLoadPromise&&h!==this.latestLoadPromise;)await this.latestLoadPromise;let v;this.hasNotFoundMatch()?v=404:this.stores.activeMatchesSnapshot.state.some(p=>p.status==="error")&&(v=500),v!==void 0&&this.stores.statusCode.setState(()=>v)},this.startViewTransition=i=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let f;if(typeof o=="object"&&this.isViewTransitionTypesSupported){const h=this.latestLocation,g=this.stores.resolvedLocation.state,v=typeof o.types=="function"?o.types(us(h,g)):o.types;if(v===!1){i();return}f={update:i,types:v}}else f=i;document.startViewTransition(f)}else i()},this.updateMatch=(i,o)=>{this.startTransition(()=>{const f=this.stores.pendingMatchStoresById.get(i);if(f){f.setState(o);return}const h=this.stores.activeMatchStoresById.get(i);if(h){h.setState(o);return}const g=this.stores.cachedMatchStoresById.get(i);if(g){const v=o(g.state);v.status==="redirected"?this.stores.cachedMatchStoresById.delete(i)&&this.stores.cachedMatchesId.setState(p=>p.filter(m=>m!==i)):g.setState(()=>v)}})},this.getMatch=i=>this.stores.cachedMatchStoresById.get(i)?.state??this.stores.pendingMatchStoresById.get(i)?.state??this.stores.activeMatchStoresById.get(i)?.state,this.invalidate=i=>{const o=f=>i?.filter?.(f)??!0?{...f,invalid:!0,...i?.forcePending||f.status==="error"||f.status==="notFound"?{status:"pending",error:void 0}:void 0}:f;return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(o)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(o)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(o))}),this.shouldViewTransition=!1,this.load({sync:i?.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const o=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const f=i.options._builtLocation??this.buildLocation(i.options),h=this.getParsedLocationHref(f);i.options.href=h,i.headers.set("Location",h)}else if(o)try{const f=new URL(o);if(this.origin&&f.origin===this.origin){const h=f.pathname+f.search+f.hash;i.options.href=h,i.headers.set("Location",h)}}catch{}if(i.options.href&&!i.options._builtLocation&&er(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const o=i?.filter;o!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(f=>!o(f))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const i=Date.now(),o=f=>{const h=this.looseRoutesById[f.routeId];if(!h.options.loader)return!0;const g=(f.preload?h.options.preloadGcTime??this.options.defaultPreloadGcTime:h.options.gcTime??this.options.defaultGcTime)??300*1e3;return f.status==="error"?!0:i-f.updatedAt>=g};this.clearCache({filter:o})},this.loadRouteChunk=ji,this.preloadRoute=async i=>{const o=i._builtLocation??this.buildLocation(i);let f=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:i});const h=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),g=new Set([...h,...this.stores.cachedMatchesId.state]),v=f.filter(p=>!g.has(p.id));if(v.length){const p=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...p,...v])}try{return f=await sp({router:this,matches:f,location:o,preload:!0,updateMatch:(p,m)=>{h.has(p)?f=f.map(S=>S.id===p?m(S):S):this.updateMatch(p,m)}}),f}catch(p){if(Ot(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:o});jt(p)||console.error(p);return}},this.matchRoute=(i,o)=>{const f={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},h=this.buildLocation(f);if(o?.pending&&this.stores.status.state!=="pending")return!1;const g=(o?.pending===void 0?!this.stores.isLoading.state:o.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,v=D0(h.pathname,o?.caseSensitive??!1,o?.fuzzy??!1,g.pathname,this.processedTree);return!v||i.params&&!ml(v.rawParams,i.params,{partial:!0})?!1:o?.includeSearch??!0?ml(g.search,h.search,{partial:!0})?v.rawParams:!1:v.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=c,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...l,caseSensitive:l.caseSensitive??!1,notFoundMode:l.notFoundMode??"fuzzy",stringifySearch:l.stringifySearch??W0,parseSearch:l.parseSearch??P0,protocolAllowlist:l.protocolAllowlist??E0}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:l,routesByPath:c,processedTree:i}){this.routesById=l,this.routesByPath=c,this.processedTree=i;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)}get looseRoutesById(){return this.routesById}getParentContext(l){return l?.id?l.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(l,c){const i=this.getMatchedRoutes(l.pathname),{foundRoute:o,routeParams:f,parsedParams:h}=i;let{matchedRoutes:g}=i,v=!1;(o?o.path!=="/"&&f["**"]:Yn(l.pathname))&&(this.options.notFoundRoute?g=[...g,this.options.notFoundRoute]:v=!0);const p=v?yv(this.options.notFoundMode,g):void 0,m=new Array(g.length),S=new Map;for(const y of this.stores.activeMatchStoresById.values())y.routeId&&S.set(y.routeId,y.state);for(let y=0;y<g.length;y++){const x=g[y],j=m[y-1];let T,E,w;{const ge=j?.search??l.search,Ge=j?._strictSearch??void 0;try{const Re=Fc(x.options.validateSearch,{...ge})??void 0;T={...ge,...Re},E={...Ge,...Re},w=void 0}catch(Re){let B=Re;if(Re instanceof ar||(B=new ar(Re.message,{cause:Re})),c?.throwOnError)throw B;T=ge,E={},w=B}}const A=x.options.loaderDeps?.({search:T})??"",K=A?JSON.stringify(A):"",{interpolatedPath:J,usedParams:I}=Pm({path:x.fullPath,params:f,decoder:this.pathParamsDecoder,server:this.isServer}),P=x.id+J+K,W=this.getMatch(P),Q=S.get(x.id),k=W?._strictParams??I;let q;if(!W)try{up(x,I,h,k)}catch(ge){if(jt(ge)||Ot(ge)?q=ge:q=new mv(ge.message,{cause:ge}),c?.throwOnError)throw q}Object.assign(f,k);const ie=Q?"stay":"enter";let ee;if(W)ee={...W,cause:ie,params:Q?.params??f,_strictParams:k,search:ol(Q?Q.search:W.search,T),_strictSearch:E};else{const ge=x.options.loader||x.options.beforeLoad||x.lazyFn||Yp(x)?"pending":"success";ee={id:P,ssr:x.options.ssr,index:y,routeId:x.id,params:Q?.params??f,_strictParams:k,pathname:J,updatedAt:Date.now(),search:Q?ol(Q.search,T):T,_strictSearch:E,searchError:void 0,status:ge,isFetching:!1,error:void 0,paramsError:q,__routeContext:void 0,_nonReactive:{loadPromise:ds()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:ie,loaderDeps:Q?fl(Q.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:x.options.staticData||{},fullPath:x.fullPath}}c?.preload||(ee.globalNotFound=p===x.id),ee.searchError=w;const ne=this.getParentContext(j);ee.context={...ne,...ee.__routeContext,...ee.__beforeLoadContext},m[y]=ee}for(let y=0;y<m.length;y++){const x=m[y],j=this.looseRoutesById[x.routeId],T=this.getMatch(x.id),E=S.get(x.routeId);if(x.params=E?ol(E.params,f):f,!T){const w=m[y-1],A=this.getParentContext(w);if(j.options.context){const K={deps:x.loaderDeps,params:x.params,context:A??{},location:l,navigate:J=>this.navigate({...J,_fromLocation:l}),buildLocation:this.buildLocation,cause:x.cause,abortController:x.abortController,preload:!!x.preload,matches:m,routeId:j.id};x.__routeContext=j.options.context(K)??void 0}x.context={...A,...x.__routeContext,...x.__beforeLoadContext}}}return m}matchRoutesLightweight(l){const{matchedRoutes:c,routeParams:i,parsedParams:o}=this.getMatchedRoutes(l.pathname),f=vi(c),h={...l.search};for(const S of c)try{Object.assign(h,Fc(S.options.validateSearch,h))}catch{}const g=vi(this.stores.matchesId.state),v=g&&this.stores.activeMatchStoresById.get(g)?.state,p=v&&v.routeId===f.id&&v.pathname===l.pathname;let m;if(p)m=v.params;else{const S=Object.assign(Object.create(null),i);for(const y of c)try{up(y,i,o??{},S)}catch{}m=S}return{matchedRoutes:c,fullPath:f.fullPath,search:h,params:m}}},ar=class extends Error{},mv=class extends Error{};function pv(l){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:l,matches:[],statusCode:200}}function Fc(l,c){if(l==null)return{};if("~standard"in l){const i=l["~standard"].validate(c);if(i instanceof Promise)throw new ar("Async validation not supported");if(i.issues)throw new ar(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in l?l.parse(c):typeof l=="function"?l(c):{}}function bv({pathname:l,routesById:c,processedTree:i}){const o=Object.create(null),f=Yn(l);let h,g;const v=L0(f,i,!0);return v&&(h=v.route,Object.assign(o,v.rawParams),g=Object.assign(Object.create(null),v.parsedParams)),{matchedRoutes:v?.branch||[c.__root__],routeParams:o,foundRoute:h,parsedParams:g}}function gv({search:l,dest:c,destRoutes:i,_includeValidateSearch:o}){return vv(i)(l,c,o??!1)}function vv(l){const c={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const f of l){if("search"in f.options)f.options.search?.middlewares&&c.middlewares.push(...f.options.search.middlewares);else if(f.options.preSearchFilters||f.options.postSearchFilters){const h=({search:g,next:v})=>{let p=g;"preSearchFilters"in f.options&&f.options.preSearchFilters&&(p=f.options.preSearchFilters.reduce((S,y)=>y(S),g));const m=v(p);return"postSearchFilters"in f.options&&f.options.postSearchFilters?f.options.postSearchFilters.reduce((S,y)=>y(S),m):m};c.middlewares.push(h)}if(f.options.validateSearch){const h=({search:g,next:v})=>{const p=v(g);if(!c._includeValidateSearch)return p;try{return{...p,...Fc(f.options.validateSearch,p)??void 0}}catch{return p}};c.middlewares.push(h)}}const i=({search:f})=>{const h=c.dest;return h.search?h.search===!0?f:Hn(h.search,f):{}};c.middlewares.push(i);const o=(f,h,g)=>{if(f>=g.length)return h;const v=g[f];return v({search:h,next:m=>o(f+1,m,g)})};return function(h,g,v){return c.dest=g,c._includeValidateSearch=v,o(0,h,c.middlewares)}}function yv(l,c){if(l!=="root")for(let i=c.length-1;i>=0;i--){const o=c[i];if(o.children)return o.id}return pl}function up(l,c,i,o){const f=l.options.params?.parse??l.options.parseParams;if(f)if(l.options.skipRouteOnParseError)for(const h in c)h in i&&(o[h]=i[h]);else{const h=f(o);Object.assign(o,h)}}var xv="Error preloading route! ☝️",Qp=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(l){if(this.init=c=>{this.originalIndex=c.originalIndex;const i=this.options,o=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=pl:this.parentRoute||tn();let f=o?pl:i?.path;f&&f!=="/"&&(f=Lp(f));const h=i?.id||f;let g=o?pl:$c([this.parentRoute.id==="__root__"?"":this.parentRoute.id,h]);f==="__root__"&&(f="/"),g!=="__root__"&&(g=$c(["/",g]));const v=g==="__root__"?"/":$c([this.parentRoute.fullPath,f]);this._path=f,this._id=g,this._fullPath=v,this._to=Yn(v)},this.addChildren=c=>this._addFileChildren(c),this._addFileChildren=c=>(Array.isArray(c)&&(this.children=c),typeof c=="object"&&c!==null&&(this.children=Object.values(c)),this),this._addFileTypes=()=>this,this.updateLoader=c=>(Object.assign(this.options,c),this),this.update=c=>(Object.assign(this.options,c),this),this.lazy=c=>(this.lazyFn=c,this),this.redirect=c=>Si({from:this.fullPath,...c}),this.options=l||{},this.isRoot=!l?.getParentRoute,l?.id&&l?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Sv=class extends Qp{constructor(l){super(l)}};function jv(l){if(typeof document<"u"&&document.querySelector){const c=l.stores.location.state,i=c.state.__hashScrollIntoViewOptions??!0;if(i&&c.hash!==""){const o=document.getElementById(c.hash);o&&o.scrollIntoView(i)}}}function Wo(l){const c=l.errorComponent??ef;return u.jsx(Nv,{getResetKey:l.getResetKey,onCatch:l.onCatch,children:({error:i,reset:o})=>i?D.createElement(c,{error:i,reset:o}):l.children})}var Nv=class extends D.Component{constructor(...l){super(...l),this.state={error:null}}static getDerivedStateFromProps(l){return{resetKey:l.getResetKey()}}static getDerivedStateFromError(l){return{error:l}}reset(){this.setState({error:null})}componentDidUpdate(l,c){c.error&&c.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(l,c){this.props.onCatch&&this.props.onCatch(l,c)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function ef({error:l}){const[c,i]=D.useState(!1);return u.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[u.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),u.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(o=>!o),children:c?"Hide Error":"Show Error"})]}),u.jsx("div",{style:{height:".25rem"}}),c?u.jsx("div",{children:u.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:l.message?u.jsx("code",{children:l.message}):null})}):null]})}function Rv({children:l,fallback:c=null}){return Xp()?u.jsx(os.Fragment,{children:l}):u.jsx(os.Fragment,{children:c})}function Xp(){return os.useSyncExternalStore(Tv,()=>!0,()=>!1)}function Tv(){return()=>{}}var Zp=D.createContext(null);function ta(l){return D.useContext(Zp)}var rr=D.createContext(void 0),_v=D.createContext(void 0),Xe=(l=>(l[l.None=0]="None",l[l.Mutable=1]="Mutable",l[l.Watching=2]="Watching",l[l.RecursedCheck=4]="RecursedCheck",l[l.Recursed=8]="Recursed",l[l.Dirty=16]="Dirty",l[l.Pending=32]="Pending",l))(Xe||{});function Cv({update:l,notify:c,unwatched:i}){return{link:o,unlink:f,propagate:h,checkDirty:g,shallowPropagate:v};function o(m,S,y){const x=S.depsTail;if(x!==void 0&&x.dep===m)return;const j=x!==void 0?x.nextDep:S.deps;if(j!==void 0&&j.dep===m){j.version=y,S.depsTail=j;return}const T=m.subsTail;if(T!==void 0&&T.version===y&&T.sub===S)return;const E=S.depsTail=m.subsTail={version:y,dep:m,sub:S,prevDep:x,nextDep:j,prevSub:T,nextSub:void 0};j!==void 0&&(j.prevDep=E),x!==void 0?x.nextDep=E:S.deps=E,T!==void 0?T.nextSub=E:m.subs=E}function f(m,S=m.sub){const y=m.dep,x=m.prevDep,j=m.nextDep,T=m.nextSub,E=m.prevSub;return j!==void 0?j.prevDep=x:S.depsTail=x,x!==void 0?x.nextDep=j:S.deps=j,T!==void 0?T.prevSub=E:y.subsTail=E,E!==void 0?E.nextSub=T:(y.subs=T)===void 0&&i(y),j}function h(m){let S=m.nextSub,y;e:do{const x=m.sub;let j=x.flags;if(j&60?j&12?j&4?!(j&48)&&p(m,x)?(x.flags=j|40,j&=1):j=0:x.flags=j&-9|32:j=0:x.flags=j|32,j&2&&c(x),j&1){const T=x.subs;if(T!==void 0){const E=(m=T).nextSub;E!==void 0&&(y={value:S,prev:y},S=E);continue}}if((m=S)!==void 0){S=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){S=m.nextSub;continue e}break}while(!0)}function g(m,S){let y,x=0,j=!1;e:do{const T=m.dep,E=T.flags;if(S.flags&16)j=!0;else if((E&17)===17){if(l(T)){const w=T.subs;w.nextSub!==void 0&&v(w),j=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=T.deps,S=T,++x;continue}if(!j){const w=m.nextDep;if(w!==void 0){m=w;continue}}for(;x--;){const w=S.subs,A=w.nextSub!==void 0;if(A?(m=y.value,y=y.prev):m=w,j){if(l(S)){A&&v(w),S=m.sub;continue}j=!1}else S.flags&=-33;S=m.sub;const K=m.nextDep;if(K!==void 0){m=K;continue e}}return j}while(!0)}function v(m){do{const S=m.sub,y=S.flags;(y&48)===32&&(S.flags=y|16,(y&6)===2&&c(S))}while((m=m.nextSub)!==void 0)}function p(m,S){let y=S.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}function tf(l,c,i){const o=typeof l=="object",f=o?l:void 0;return{next:(o?l.next:l)?.bind(f),error:(o?l.error:c)?.bind(f),complete:(o?l.complete:i)?.bind(f)}}const Qo=[];let Pc=0;const{link:op,unlink:Ev,propagate:Mv,checkDirty:Kp,shallowPropagate:fp}=Cv({update(l){return l._update()},notify(l){Qo[Xo++]=l,l.flags&=~Xe.Watching},unwatched(l){l.depsTail!==void 0&&(l.depsTail=void 0,l.flags=Xe.Mutable|Xe.Dirty,nr(l))}});let Xc=0,Xo=0,_a,Zo=0;function Jp(l){try{++Zo,l()}finally{--Zo||$p()}}function nr(l){const c=l.depsTail;let i=c!==void 0?c.nextDep:l.deps;for(;i!==void 0;)i=Ev(i,l)}function $p(){if(!(Zo>0)){for(;Xc<Xo;){const l=Qo[Xc];Qo[Xc++]=void 0,l.notify()}Xc=0,Xo=0}}function Ip(l,c){const i=typeof l=="function",o=l,f={_snapshot:i?void 0:l,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?Xe.None:Xe.Mutable,get(){return _a!==void 0&&op(f,_a,Pc),f._snapshot},subscribe(h){const g=tf(h),v={current:!1},p=Av(()=>{f.get(),v.current?g.next?.(f._snapshot):v.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(h){const g=_a,v=Object.is;if(i)_a=f,++Pc,f.depsTail=void 0;else if(h===void 0)return!1;i&&(f.flags=Xe.Mutable|Xe.RecursedCheck);try{const p=f._snapshot,m=typeof h=="function"?h(p):h===void 0&&i?o(p):h;return p===void 0||!v(p,m)?(f._snapshot=m,!0):!1}finally{_a=g,i&&(f.flags&=~Xe.RecursedCheck),nr(f)}}};return i?(f.flags=Xe.Mutable|Xe.Dirty,f.get=function(){const h=f.flags;if(h&Xe.Dirty||h&Xe.Pending&&Kp(f.deps,f)){if(f._update()){const g=f.subs;g!==void 0&&fp(g)}}else h&Xe.Pending&&(f.flags=h&~Xe.Pending);return _a!==void 0&&op(f,_a,Pc),f._snapshot}):f.set=function(h){if(f._update(h)){const g=f.subs;g!==void 0&&(Mv(g),fp(g),$p())}},f}function Av(l){const c=()=>{const o=_a;_a=i,++Pc,i.depsTail=void 0,i.flags=Xe.Watching|Xe.RecursedCheck;try{return l()}finally{_a=o,i.flags&=~Xe.RecursedCheck,nr(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Xe.Watching|Xe.RecursedCheck,notify(){const o=this.flags;o&Xe.Dirty||o&Xe.Pending&&Kp(this.deps,this)?c():this.flags=Xe.Watching},stop(){this.flags=Xe.None,this.depsTail=void 0,nr(this)}};return c(),i}class wv{constructor(c){this.atom=Ip(c)}setState(c){this.atom.set(c)}get state(){return this.atom.get()}get(){return this.state}subscribe(c){return this.atom.subscribe(tf(c))}}class Ov{constructor(c){this.atom=Ip(c)}get state(){return this.atom.get()}get(){return this.state}subscribe(c){return this.atom.subscribe(tf(c))}}function dp(l){return typeof l=="function"?new Ov(l):new wv(l)}var Do={exports:{}},Lo={},Uo={exports:{}},Bo={};var hp;function zv(){if(hp)return Bo;hp=1;var l=Ri();function c(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var i=typeof Object.is=="function"?Object.is:c,o=l.useState,f=l.useEffect,h=l.useLayoutEffect,g=l.useDebugValue;function v(y,x){var j=x(),T=o({inst:{value:j,getSnapshot:x}}),E=T[0].inst,w=T[1];return h(function(){E.value=j,E.getSnapshot=x,p(E)&&w({inst:E})},[y,j,x]),f(function(){return p(E)&&w({inst:E}),y(function(){p(E)&&w({inst:E})})},[y]),g(j),j}function p(y){var x=y.getSnapshot;y=y.value;try{var j=x();return!i(y,j)}catch{return!0}}function m(y,x){return x()}var S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:v;return Bo.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:S,Bo}var mp;function Dv(){return mp||(mp=1,Uo.exports=zv()),Uo.exports}var pp;function Lv(){if(pp)return Lo;pp=1;var l=Ri(),c=Dv();function i(m,S){return m===S&&(m!==0||1/m===1/S)||m!==m&&S!==S}var o=typeof Object.is=="function"?Object.is:i,f=c.useSyncExternalStore,h=l.useRef,g=l.useEffect,v=l.useMemo,p=l.useDebugValue;return Lo.useSyncExternalStoreWithSelector=function(m,S,y,x,j){var T=h(null);if(T.current===null){var E={hasValue:!1,value:null};T.current=E}else E=T.current;T=v(function(){function A(W){if(!K){if(K=!0,J=W,W=x(W),j!==void 0&&E.hasValue){var Q=E.value;if(j(Q,W))return I=Q}return I=W}if(Q=I,o(J,W))return Q;var k=x(W);return j!==void 0&&j(Q,k)?(J=W,Q):(J=W,I=k)}var K=!1,J,I,P=y===void 0?null:y;return[function(){return A(S())},P===null?void 0:function(){return A(P())}]},[S,y,x,j]);var w=f(m,T[0],T[1]);return g(function(){E.hasValue=!0,E.value=w},[w]),p(w),w},Lo}var bp;function Uv(){return bp||(bp=1,Do.exports=Lv()),Do.exports}var Bv=Uv();function Hv(l,c){return l===c}function Vt(l,c,i=Hv){const o=D.useCallback(g=>{if(!l)return()=>{};const{unsubscribe:v}=l.subscribe(g);return v},[l]),f=D.useCallback(()=>l?.get(),[l]);return Bv.useSyncExternalStoreWithSelector(o,f,f,c,i)}var kv={state:void 0,get:()=>{},subscribe:()=>()=>{}};function gl(l){const c=ta(),i=D.useContext(l.from?_v:rr),o=l.from??i,f=o?l.from?c.stores.getMatchStoreByRouteId(o):c.stores.activeMatchStoresById.get(o):void 0,h=D.useRef(void 0);return Vt(f??kv,g=>{if((l.shouldThrow??!0)&&!g&&tn(),g===void 0)return;const v=l.select?l.select(g):g;if(l.structuralSharing??c.options.defaultStructuralSharing){const p=fl(h.current,v);return h.current=p,p}return v})}function Fp(l){return gl({from:l.from,strict:l.strict,structuralSharing:l.structuralSharing,select:c=>l.select?l.select(c.loaderData):c.loaderData})}function Pp(l){const{select:c,...i}=l;return gl({...i,select:o=>c?c(o.loaderDeps):o.loaderDeps})}function ur(l){return gl({from:l.from,shouldThrow:l.shouldThrow,structuralSharing:l.structuralSharing,strict:l.strict,select:c=>{const i=l.strict===!1?c.params:c._strictParams;return l.select?l.select(i):i}})}function Wp(l){return gl({from:l.from,strict:l.strict,shouldThrow:l.shouldThrow,structuralSharing:l.structuralSharing,select:c=>l.select?l.select(c.search):c.search})}function af(l){const c=ta();return D.useCallback(i=>c.navigate({...i,from:i.from??l?.from}),[l?.from,c])}function eb(l){return gl({...l,select:c=>l.select?l.select(c.context):c.context})}var tb=wp();function qv(l,c){const i=ta(),o=N0(c),{activeProps:f,inactiveProps:h,activeOptions:g,to:v,preload:p,preloadDelay:m,hashScrollIntoView:S,replace:y,startTransition:x,resetScroll:j,viewTransition:T,children:E,target:w,disabled:A,style:K,className:J,onClick:I,onBlur:P,onFocus:W,onMouseEnter:Q,onMouseLeave:k,onTouchStart:q,ignoreBlocker:ie,params:ee,search:ne,hash:ge,state:Ge,mask:Re,reloadDocument:B,unsafeRelative:$,from:se,_fromLocation:Te,...ve}=l,R=Xp(),Y=D.useMemo(()=>l,[i,l.from,l._fromLocation,l.hash,l.to,l.search,l.params,l.state,l.mask,l.unsafeRelative]),X=Vt(i.stores.location,he=>he,(he,ot)=>he.href===ot.href),F=D.useMemo(()=>{const he={_fromLocation:X,...Y};return i.buildLocation(he)},[i,X,Y]),re=F.maskedLocation?F.maskedLocation.publicHref:F.publicHref,oe=F.maskedLocation?F.maskedLocation.external:F.external,pe=D.useMemo(()=>Zv(re,oe,i.history,A),[A,oe,re,i.history]),Ze=D.useMemo(()=>{if(pe?.external)return er(pe.href,i.protocolAllowlist)?void 0:pe.href;if(!Kv(v)&&!(typeof v!="string"||v.indexOf(":")===-1))try{return new URL(v),er(v,i.protocolAllowlist)?void 0:v}catch{}},[v,pe,i.protocolAllowlist]),De=D.useMemo(()=>{if(Ze)return!1;if(g?.exact){if(!Y0(X.pathname,F.pathname,i.basepath))return!1}else{const he=tr(X.pathname,i.basepath),ot=tr(F.pathname,i.basepath);if(!(he.startsWith(ot)&&(he.length===ot.length||he[ot.length]==="/")))return!1}return(g?.includeSearch??!0)&&!ml(X.search,F.search,{partial:!g?.exact,ignoreUndefined:!g?.explicitUndefined})?!1:g?.includeHash?R&&X.hash===F.hash:!0},[g?.exact,g?.explicitUndefined,g?.includeHash,g?.includeSearch,X,Ze,R,F.hash,F.pathname,F.search,i.basepath]),dt=De?Hn(f,{})??Yv:Ho,aa=De?Ho:Hn(h,{})??Ho,na=[J,dt.className,aa.className].filter(Boolean).join(" "),Vn=(K||dt.style||aa.style)&&{...K,...dt.style,...aa.style},[zt,Ca]=D.useState(!1),ha=D.useRef(!1),ma=l.reloadDocument||Ze?!1:p??i.options.defaultPreload,st=m??i.options.defaultPreloadDelay??0,Dt=D.useCallback(()=>{i.preloadRoute({...Y,_builtLocation:F}).catch(he=>{console.warn(he),console.warn(xv)})},[i,Y,F]);j0(o,D.useCallback(he=>{he?.isIntersecting&&Dt()},[Dt]),Xv,{disabled:!!A||ma!=="viewport"}),D.useEffect(()=>{ha.current||!A&&ma==="render"&&(Dt(),ha.current=!0)},[A,Dt,ma]);const la=he=>{const ot=he.currentTarget.getAttribute("target"),Nt=w!==void 0?w:ot;if(!A&&!Jv(he)&&!he.defaultPrevented&&(!Nt||Nt==="_self")&&he.button===0){he.preventDefault(),tb.flushSync(()=>{Ca(!0)});const yl=i.subscribe("onResolved",()=>{yl(),Ca(!1)});i.navigate({...Y,replace:y,resetScroll:j,hashScrollIntoView:S,startTransition:x,viewTransition:T,ignoreBlocker:ie})}};if(Ze)return{...ve,ref:o,href:Ze,...E&&{children:E},...w&&{target:w},...A&&{disabled:A},...K&&{style:K},...J&&{className:J},...I&&{onClick:I},...P&&{onBlur:P},...W&&{onFocus:W},...Q&&{onMouseEnter:Q},...k&&{onMouseLeave:k},...q&&{onTouchStart:q}};const pa=he=>{if(A||ma!=="intent")return;if(!st){Dt();return}const ot=he.currentTarget;if(mi.has(ot))return;const Nt=setTimeout(()=>{mi.delete(ot),Dt()},st);mi.set(ot,Nt)},Qn=he=>{A||ma!=="intent"||Dt()},vl=he=>{if(A||!ma||!st)return;const ot=he.currentTarget,Nt=mi.get(ot);Nt&&(clearTimeout(Nt),mi.delete(ot))};return{...ve,...dt,...aa,href:pe?.href,ref:o,onClick:ls([I,la]),onBlur:ls([P,vl]),onFocus:ls([W,pa]),onMouseEnter:ls([Q,pa]),onMouseLeave:ls([k,vl]),onTouchStart:ls([q,Qn]),disabled:!!A,target:w,...Vn&&{style:Vn},...na&&{className:na},...A&&Gv,...De&&Vv,...R&&zt&&Qv}}var Ho={},Yv={className:"active"},Gv={role:"link","aria-disabled":!0},Vv={"data-status":"active","aria-current":"page"},Qv={"data-transitioning":"transitioning"},mi=new WeakMap,Xv={rootMargin:"100px"},ls=l=>c=>{for(const i of l)if(i){if(c.defaultPrevented)return;i(c)}};function Zv(l,c,i,o){if(!o)return c?{href:l,external:!0}:{href:i.createHref(l)||"/",external:!1}}function Kv(l){if(typeof l!="string")return!1;const c=l.charCodeAt(0);return c===47?l.charCodeAt(1)!==47:c===46}var ab=D.forwardRef((l,c)=>{const{_asChild:i,...o}=l,{type:f,...h}=qv(o,c),g=typeof o.children=="function"?o.children({isActive:h["data-status"]==="active"}):o.children;if(!i){const{disabled:v,...p}=h;return D.createElement("a",p,g)}return D.createElement(i,h,g)});function Jv(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}var $v=class extends Qp{constructor(l){super(l),this.useMatch=c=>gl({select:c?.select,from:this.id,structuralSharing:c?.structuralSharing}),this.useRouteContext=c=>eb({...c,from:this.id}),this.useSearch=c=>Wp({select:c?.select,structuralSharing:c?.structuralSharing,from:this.id}),this.useParams=c=>ur({select:c?.select,structuralSharing:c?.structuralSharing,from:this.id}),this.useLoaderDeps=c=>Pp({...c,from:this.id}),this.useLoaderData=c=>Fp({...c,from:this.id}),this.useNavigate=()=>af({from:this.fullPath}),this.Link=os.forwardRef((c,i)=>u.jsx(ab,{ref:i,from:this.fullPath,...c}))}};function nf(l){return new $v(l)}var Iv=class extends Sv{constructor(l){super(l),this.useMatch=c=>gl({select:c?.select,from:this.id,structuralSharing:c?.structuralSharing}),this.useRouteContext=c=>eb({...c,from:this.id}),this.useSearch=c=>Wp({select:c?.select,structuralSharing:c?.structuralSharing,from:this.id}),this.useParams=c=>ur({select:c?.select,structuralSharing:c?.structuralSharing,from:this.id}),this.useLoaderDeps=c=>Pp({...c,from:this.id}),this.useLoaderData=c=>Fp({...c,from:this.id}),this.useNavigate=()=>af({from:this.fullPath}),this.Link=os.forwardRef((c,i)=>u.jsx(ab,{ref:i,from:this.fullPath,...c}))}};function Fv(l){return new Iv(l)}function Pv(l){const c=ta(),i=`not-found-${Vt(c.stores.location,o=>o.pathname)}-${Vt(c.stores.status,o=>o)}`;return u.jsx(Wo,{getResetKey:()=>i,onCatch:(o,f)=>{if(jt(o))l.onCatch?.(o,f);else throw o},errorComponent:({error:o})=>{if(jt(o))return l.fallback?.(o);throw o},children:l.children})}function Wv(){return u.jsx("p",{children:"Not Found"})}function rs(l){return u.jsx(u.Fragment,{children:l.children})}function nb(l,c,i){return c.options.notFoundComponent?u.jsx(c.options.notFoundComponent,{...i}):l.options.defaultNotFoundComponent?u.jsx(l.options.defaultNotFoundComponent,{...i}):u.jsx(Wv,{})}function ey(l){return null}function ty(){return ey(ta()),null}var lb=D.memo(function({matchId:c}){const i=ta(),o=i.stores.activeMatchStoresById.get(c);o||tn();const f=Vt(i.stores.loadedAt,g=>g),h=Vt(o,g=>g);return u.jsx(ay,{router:i,matchId:c,resetKey:f,matchState:D.useMemo(()=>{const g=h.routeId,v=i.routesById[g].parentRoute?.id;return{routeId:g,ssr:h.ssr,_displayPending:h._displayPending,parentRouteId:v}},[h._displayPending,h.routeId,h.ssr,i.routesById])})});function ay({router:l,matchId:c,resetKey:i,matchState:o}){const f=l.routesById[o.routeId],h=f.options.pendingComponent??l.options.defaultPendingComponent,g=h?u.jsx(h,{}):null,v=f.options.errorComponent??l.options.defaultErrorComponent,p=f.options.onCatch??l.options.defaultOnCatch,m=f.isRoot?f.options.notFoundComponent??l.options.notFoundRoute?.options.component:f.options.notFoundComponent,S=o.ssr===!1||o.ssr==="data-only",y=(!f.isRoot||f.options.wrapInSuspense||S)&&(f.options.wrapInSuspense??h??(f.options.errorComponent?.preload||S))?D.Suspense:rs,x=v?Wo:rs,j=m?Pv:rs;return u.jsxs(f.isRoot?f.options.shellComponent??rs:rs,{children:[u.jsx(rr.Provider,{value:c,children:u.jsx(y,{fallback:g,children:u.jsx(x,{getResetKey:()=>i,errorComponent:v||ef,onCatch:(T,E)=>{if(jt(T))throw T.routeId??=o.routeId,T;p?.(T,E)},children:u.jsx(j,{fallback:T=>{if(T.routeId??=o.routeId,!m||T.routeId&&T.routeId!==o.routeId||!T.routeId&&!f.isRoot)throw T;return D.createElement(m,T)},children:S||o._displayPending?u.jsx(Rv,{fallback:g,children:u.jsx(gp,{matchId:c})}):u.jsx(gp,{matchId:c})})})})}),o.parentRouteId===pl?u.jsxs(u.Fragment,{children:[u.jsx(ny,{resetKey:i}),l.options.scrollRestoration&&Op?u.jsx(ty,{}):null]}):null]})}function ny({resetKey:l}){const c=ta(),i=D.useRef(void 0);return gi(()=>{const o=c.latestLocation.href;(i.current===void 0||i.current!==o)&&(c.emit({type:"onRendered",...us(c.stores.location.state,c.stores.resolvedLocation.state)}),i.current=o)},[c.latestLocation.state.__TSR_key,l,c]),null}var gp=D.memo(function({matchId:c}){const i=ta(),o=i.stores.activeMatchStoresById.get(c);o||tn();const f=Vt(o,m=>m),h=f.routeId,g=i.routesById[h],v=D.useMemo(()=>{const m=(i.routesById[h].options.remountDeps??i.options.defaultRemountDeps)?.({routeId:h,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return m?JSON.stringify(m):void 0},[h,f.loaderDeps,f._strictParams,f._strictSearch,i.options.defaultRemountDeps,i.routesById]),p=D.useMemo(()=>{const m=g.options.component??i.options.defaultComponent;return m?u.jsx(m,{},v):u.jsx(sb,{})},[v,g.options.component,i.options.defaultComponent]);if(f._displayPending)throw i.getMatch(f.id)?._nonReactive.displayPendingPromise;if(f._forcePending)throw i.getMatch(f.id)?._nonReactive.minPendingPromise;if(f.status==="pending"){const m=g.options.pendingMinMs??i.options.defaultPendingMinMs;if(m){const S=i.getMatch(f.id);if(S&&!S._nonReactive.minPendingPromise){const y=ds();S._nonReactive.minPendingPromise=y,setTimeout(()=>{y.resolve(),S._nonReactive.minPendingPromise=void 0},m)}}throw i.getMatch(f.id)?._nonReactive.loadPromise}if(f.status==="notFound")return jt(f.error)||tn(),nb(i,g,f.error);if(f.status==="redirected")throw Ot(f.error)||tn(),i.getMatch(f.id)?._nonReactive.loadPromise;if(f.status==="error")throw f.error;return p}),sb=D.memo(function(){const c=ta(),i=D.useContext(rr);let o,f=!1,h;{const m=i?c.stores.activeMatchStoresById.get(i):void 0;[o,f]=Vt(m,S=>[S?.routeId,S?.globalNotFound??!1]),h=Vt(c.stores.matchesId,S=>S[S.findIndex(y=>y===i)+1])}const g=o?c.routesById[o]:void 0,v=c.options.defaultPendingComponent?u.jsx(c.options.defaultPendingComponent,{}):null;if(f)return g||tn(),nb(c,g,void 0);if(!h)return null;const p=u.jsx(lb,{matchId:h});return o===pl?u.jsx(D.Suspense,{fallback:v,children:p}):p});function ly(){const l=ta(),c=D.useRef({router:l,mounted:!1}),[i,o]=D.useState(!1),f=Vt(l.stores.isLoading,y=>y),h=Vt(l.stores.hasPendingMatches,y=>y),g=_o(f),v=f||i||h,p=_o(v),m=f||h,S=_o(m);return l.startTransition=y=>{o(!0),D.startTransition(()=>{y(),o(!1)})},D.useEffect(()=>{const y=l.history.subscribe(l.load),x=l.buildLocation({to:l.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Yn(l.latestLocation.publicHref)!==Yn(x.publicHref)&&l.commitLocation({...x,replace:!0}),()=>{y()}},[l,l.history]),gi(()=>{if(typeof window<"u"&&l.ssr||c.current.router===l&&c.current.mounted)return;c.current={router:l,mounted:!0},(async()=>{try{await l.load()}catch(x){console.error(x)}})()},[l]),gi(()=>{g&&!f&&l.emit({type:"onLoad",...us(l.stores.location.state,l.stores.resolvedLocation.state)})},[g,l,f]),gi(()=>{S&&!m&&l.emit({type:"onBeforeRouteMount",...us(l.stores.location.state,l.stores.resolvedLocation.state)})},[m,S,l]),gi(()=>{if(p&&!v){const y=us(l.stores.location.state,l.stores.resolvedLocation.state);l.emit({type:"onResolved",...y}),Jp(()=>{l.stores.status.setState(()=>"idle"),l.stores.resolvedLocation.setState(()=>l.stores.location.state)}),y.hrefChanged&&jv(l)}},[v,p,l]),null}function sy(){const l=ta(),c=l.routesById[pl].options.pendingComponent??l.options.defaultPendingComponent,i=c?u.jsx(c,{}):null,o=u.jsxs(typeof document<"u"&&l.ssr?rs:D.Suspense,{fallback:i,children:[u.jsx(ly,{}),u.jsx(iy,{})]});return l.options.InnerWrap?u.jsx(l.options.InnerWrap,{children:o}):o}function iy(){const l=ta(),c=Vt(l.stores.firstMatchId,f=>f),i=Vt(l.stores.loadedAt,f=>f),o=c?u.jsx(lb,{matchId:c}):null;return u.jsx(rr.Provider,{value:c,children:l.options.disableGlobalCatchBoundary?o:u.jsx(Wo,{getResetKey:()=>i,errorComponent:ef,onCatch:void 0,children:o})})}var cy=l=>({createMutableStore:dp,createReadonlyStore:dp,batch:Jp}),ry=l=>new uy(l),uy=class extends hv{constructor(l){super(l,cy)}};function oy({router:l,children:c,...i}){Object.keys(i).length>0&&l.update({...l.options,...i,context:{...l.options.context,...i.context}});const o=u.jsx(Zp.Provider,{value:l,children:c});return l.options.Wrap?u.jsx(l.options.Wrap,{children:o}):o}function fy({router:l,...c}){return u.jsx(oy,{router:l,...c,children:u.jsx(sy,{})})}const dy={neutral:"btn-neutral",primary:"btn-primary",info:"btn-info",error:"btn-error",ghost:"btn-ghost"},hy={xs:"btn-xs",sm:"btn-sm",md:null},my={default:null,circle:"btn-circle"},py={neutral:"white",primary:"blue",info:"cyan",error:"red",ghost:"gray"};function by(l){const c=l.tone??"neutral",i=l.variant??"solid",o=l.size??"md",f=l.shape??"default",h=["btn",dy[c],hy[o],my[f]];return i==="outline"&&c!=="ghost"&&h.push("btn-outline"),l.fullWidth&&h.push("w-full"),l.className!==void 0&&l.className.trim().length>0&&h.push(l.className.trim()),{tone:c,variant:i,size:o,shape:f,webClassName:h.filter(g=>g!==null).join(" "),tuiColor:py[c]}}function qn(l){const c=by(l);return u.jsx("button",{type:l.type??"button",className:c.webClassName,disabled:l.disabled,"aria-label":l.ariaLabel,onClick:l.onClick,children:l.children})}function gy(l){const c=l.message;if(typeof c=="string"&&c.trim())return c;const i=l.reason;return typeof i=="string"&&i.trim()?i:null}function Ie(l){return Number.isFinite(l)?l.toFixed(2):"0.00"}function an(l){const c=new Date(l);return Number.isNaN(c.getTime())?l:c.toLocaleString()}function vy(l){return l.endedAt?`Ended ${an(l.endedAt)}`:l.startedAt?`Started ${an(l.startedAt)}`:"Not started"}function yy(l){if(!l)return"No payload";if(typeof l.text=="string"&&l.text.trim())return ea(l.text,220);if(typeof l.toolName=="string")return`Tool: ${l.toolName}`;if(typeof l.error=="string")return ea(l.error,220);try{return ea(JSON.stringify(l),220)}catch{return"Unserializable event payload"}}function ea(l,c){return l.length<=c?l:`${l.slice(0,c-3)}...`}function xy({baseDailyBudgetUsd:l,dailyBudgetOverrideUsd:c,effectiveDailyBudgetUsd:i,todayCostUsd:o,activeOperation:f,dailyDraft:h,onDailyDraftChange:g,onDailySubmit:v,onDailyClear:p,issueDraft:m,repos:S,onIssueDraftChange:y,onIssueSubmit:x,onIssueClear:j}){const T=f==="daily-cost-override:set"||f==="daily-cost-override:clear",E=f==="cost-override:set"||f==="cost-override:clear",w=c!==null;return u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-6 sm:p-8",children:[u.jsx("h2",{className:"card-title text-2xl font-semibold capitalize text-base-content",children:"budget overrides"}),u.jsx("p",{className:"max-w-3xl text-sm text-base-content/75",children:"Unblock runs that were stopped by a cost cap without changing your saved limits. The daily override auto-expires at 00:00 UTC."}),u.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[u.jsxs("div",{className:"rounded-box border border-base-300/60 bg-base-100/40 p-4",children:[u.jsx("h3",{className:"font-semibold text-base-content",children:"Today's daily cap"}),u.jsxs("dl",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-1 text-xs text-base-content/75",children:[u.jsx("dt",{children:"Spent today"}),u.jsxs("dd",{className:"font-mono text-base-content",children:["$",Ie(o)]}),u.jsx("dt",{children:"Base cap"}),u.jsxs("dd",{className:"font-mono text-base-content",children:["$",Ie(l)]}),u.jsx("dt",{children:"Effective cap"}),u.jsxs("dd",{className:"font-mono text-base-content",children:["$",Ie(i),w&&u.jsx("span",{className:"ml-2 badge badge-warning badge-xs",children:"override"})]})]}),u.jsxs("form",{className:"mt-3 flex flex-wrap items-end gap-2",onSubmit:v,children:[u.jsxs("label",{className:"form-control",children:[u.jsx("span",{className:"label label-text text-xs",children:"New cap (USD)"}),u.jsx("input",{className:"input input-bordered input-xs w-32 font-mono",type:"number",min:1,max:1e4,step:1,value:h,onChange:A=>g(A.target.value),disabled:T,required:!0})]}),u.jsx(qn,{type:"submit",tone:"info",size:"xs",disabled:T,children:"raise cap"}),u.jsx(qn,{type:"button",tone:"ghost",size:"xs",onClick:p,disabled:T||!w,children:"clear"})]}),u.jsx("p",{className:"mt-2 text-xs text-base-content/60",children:"Scoped to the current UTC day. Blocks every queued run until today's spend hits the new cap."})]}),u.jsxs("div",{className:"rounded-box border border-base-300/60 bg-base-100/40 p-4",children:[u.jsx("h3",{className:"font-semibold text-base-content",children:"Per-issue override"}),u.jsxs("p",{className:"mt-2 text-xs text-base-content/75",children:["Grant a single stuck run extra headroom. Replaces the per-run cap ",u.jsx("em",{children:"and"})," exempts the run from the daily cap."]}),u.jsxs("form",{className:"mt-3 flex flex-wrap items-end gap-2",onSubmit:x,children:[u.jsxs("label",{className:"form-control",children:[u.jsx("span",{className:"label label-text text-xs",children:"Repo"}),u.jsxs("select",{className:"select select-bordered select-xs w-48",value:m.repo,onChange:A=>y({repo:A.target.value}),disabled:E,required:!0,children:[u.jsx("option",{value:"",children:"(select)"}),S.map(A=>u.jsx("option",{value:A,children:A},A))]})]}),u.jsxs("label",{className:"form-control",children:[u.jsx("span",{className:"label label-text text-xs",children:"Issue #"}),u.jsx("input",{className:"input input-bordered input-xs w-24 font-mono",type:"number",min:1,step:1,value:m.issueNumber,onChange:A=>y({issueNumber:A.target.value}),disabled:E,required:!0})]}),u.jsxs("label",{className:"form-control",children:[u.jsx("span",{className:"label label-text text-xs",children:"Amount (USD)"}),u.jsx("input",{className:"input input-bordered input-xs w-28 font-mono",type:"number",min:.1,step:.5,value:m.amount,onChange:A=>y({amount:A.target.value}),disabled:E,required:!0})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(qn,{type:"submit",tone:"info",size:"xs",disabled:E,children:"set"}),u.jsx(qn,{type:"button",tone:"ghost",size:"xs",onClick:A=>{A.preventDefault(),j(A)},disabled:E,children:"clear"})]})]})]})]})]})})}const vp={idle:"badge-neutral",running:"badge-info",failed:"badge-error",closed:"badge-ghost"};function Sy({snapshot:l,selectedSessionId:c,selectedSession:i,events:o,promptDraft:f,createDraft:h,isLoading:g,isMutating:v,onSelectSession:p,onCreateDraftChange:m,onPromptDraftChange:S,onCreateSession:y,onSendPrompt:x,onCloseSession:j}){const T=(l?.profiles??[]).filter(E=>E.type===h.agent);return u.jsxs("div",{className:"grid gap-5 xl:grid-cols-[320px_minmax(0,1fr)]",children:[u.jsx("section",{className:"card border border-base-300/70 bg-base-100/70 shadow-panel",children:u.jsxs("div",{className:"card-body gap-4 p-4",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"card-title text-lg",children:"Interactive Agent"}),u.jsxs("p",{className:"text-xs text-base-content/65",children:["Runs in ",u.jsx("code",{children:l?.workspacePath??"workspace"})]})]}),u.jsxs("form",{className:"grid gap-3",onSubmit:y,children:[u.jsxs("label",{className:"form-control gap-1.5",children:[u.jsx("span",{className:"label-text text-xs uppercase tracking-wide text-base-content/65",children:"Agent"}),u.jsxs("select",{className:"select select-bordered select-sm w-full",value:h.agent,onChange:E=>{m({agent:E.target.value,profileName:""})},disabled:v,children:[u.jsx("option",{value:"claude",children:"Claude"}),u.jsx("option",{value:"codex",children:"Codex"})]})]}),u.jsxs("label",{className:"form-control gap-1.5",children:[u.jsx("span",{className:"label-text text-xs uppercase tracking-wide text-base-content/65",children:"Profile (optional)"}),u.jsxs("select",{className:"select select-bordered select-sm w-full",value:h.profileName,onChange:E=>{m({profileName:E.target.value})},disabled:v,children:[u.jsx("option",{value:"",children:"Auto-select by type"}),T.map(E=>u.jsx("option",{value:E.name,children:E.name},E.name))]})]}),u.jsx("button",{className:"btn btn-primary btn-sm",type:"submit",disabled:v,children:"Create Session"})]}),u.jsx("div",{className:"divider my-1"}),u.jsx("div",{className:"min-h-0 space-y-2 overflow-y-auto pr-1",children:g?u.jsx("p",{className:"text-sm text-base-content/65",children:"Loading sessions..."}):(l?.sessions.length??0)===0?u.jsx("p",{className:"text-sm text-base-content/65",children:"No sessions yet."}):l?.sessions.map(E=>u.jsxs("button",{type:"button",className:`w-full rounded-lg border px-3 py-2 text-left ${c===E.id?"border-primary/60 bg-primary/10":"border-base-300/70 bg-base-100/45 hover:bg-base-100/70"}`,onClick:()=>{p(E.id)},children:[u.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[u.jsx("span",{className:"font-medium capitalize",children:E.agent}),u.jsx("span",{className:`badge badge-xs ${vp[E.status]}`,children:E.status})]}),u.jsx("p",{className:"truncate text-xs text-base-content/65",children:E.id}),u.jsxs("p",{className:"text-[11px] text-base-content/55",children:["turns: ",E.turnCount]})]},E.id))})]})}),u.jsx("section",{className:"card border border-base-300/70 bg-base-100/70 shadow-panel",children:u.jsx("div",{className:"card-body gap-4 p-4",children:i?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsxs("h2",{className:"card-title text-lg capitalize",children:[i.agent," Session"]}),u.jsx("span",{className:`badge badge-sm ${vp[i.status]}`,children:i.status}),u.jsxs("span",{className:"badge badge-outline badge-sm",children:["turns ",i.turnCount]}),u.jsx("button",{type:"button",className:"btn btn-outline btn-xs ml-auto",onClick:j,disabled:i.status==="running"||v,children:"Close Session"})]}),i.lastError&&u.jsx("div",{className:"alert alert-error py-2 text-sm",children:u.jsx("span",{children:i.lastError})}),u.jsx("div",{className:"rounded-lg border border-base-300/70 bg-base-100/60 p-2",children:u.jsx("div",{className:"h-[360px] space-y-2 overflow-y-auto rounded-md bg-base-100/70 p-2",children:o.length===0?u.jsx("p",{className:"text-sm text-base-content/60",children:"No output yet. Send a prompt to start streaming."}):o.map(E=>u.jsxs("div",{className:"text-xs leading-relaxed",children:[u.jsx("span",{className:"mr-2 text-base-content/45",children:jy(E.timestamp)}),u.jsx("span",{className:`mr-2 font-semibold ${Ny(E.type)}`,children:E.type}),u.jsx("span",{className:"whitespace-pre-wrap break-words text-base-content/85",children:Ry(E)})]},E.id))})}),u.jsxs("form",{className:"grid gap-2",onSubmit:x,children:[u.jsx("textarea",{className:"textarea textarea-bordered min-h-[96px] w-full text-sm",placeholder:"Ask the agent to inspect files, run diagnostics, or call MCP tools...",value:f,onChange:E=>{S(E.target.value)},disabled:i.status==="running"||i.status==="closed"||v}),u.jsx("div",{className:"flex justify-end",children:u.jsx("button",{type:"submit",className:"btn btn-primary btn-sm",disabled:i.status==="running"||i.status==="closed"||v,children:"Send Prompt"})})]})]}):u.jsx("div",{className:"flex h-[520px] items-center justify-center text-sm text-base-content/60",children:"Select or create a session to begin."})})})]})}function jy(l){const c=new Date(l);return Number.isNaN(c.getTime())?l:c.toLocaleTimeString(void 0,{hour12:!1})}function Ny(l){switch(l){case"status":return"text-info";case"stderr":return"text-error";case"tool_call":return"text-secondary";case"text":return"text-success";default:return"text-base-content/65"}}function Ry(l){if(typeof l.data.message=="string")return l.data.message;if(typeof l.data.text=="string")return l.data.text;if(typeof l.data.toolName=="string"){const c=typeof l.data.toolArgs=="string"?` ${l.data.toolArgs}`:"";return`${l.data.toolName}${c}`}return JSON.stringify(l.data)}function yp(l){const c=(l??"unknown").trim().toLowerCase();return c.length>0?c:"unknown"}function Ty(l,c){const i=yp(l),o=yp(c);return i==="unknown"||o==="unknown"?i===o:i===o||i.startsWith(o)||o.startsWith(i)}function xp(l){const c=(l??"unknown").trim();return c.length===0||c.toLowerCase()==="unknown"?"unknown":c.slice(0,12)}function _y({currentStateLabel:l,currentStateToneClass:c,isWorking:i,socketConnected:o,lastRefreshAt:f,pollIntervalSeconds:h,reposCount:g,activeRuns:v,runningRuns:p,queuedRuns:m,frontendVersion:S,frontendGitSha:y,backendVersion:x,backendGitSha:j,operationsEnabled:T,activeOperation:E,isRefreshing:w,onRefresh:A,onPoll:K,onSync:J,onGoToSettings:I}){const P=xp(y),W=xp(j),Q=Ty(y,j),q=T&&!(E!==null),ie=Cy(f),ee=Q?`v${x} · ${W}`:`fe ${P} / be ${W}`;return u.jsx("header",{className:"sticky top-0 z-50 border-b border-base-300/60 bg-base-300/88 backdrop-blur",children:u.jsx("div",{className:"mx-auto w-full max-w-[1500px] px-4 sm:px-6 lg:px-8",children:u.jsxs("div",{className:"flex flex-col gap-3 py-3 lg:flex-row lg:items-start lg:justify-between",children:[u.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[u.jsx("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:u.jsx("p",{className:"text-lg font-semibold tracking-wide text-base-content sm:text-xl",children:"night-orch"})}),u.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-base-content/75",children:[u.jsx("span",{className:"text-[10px] uppercase tracking-[0.22em] text-base-content/65",children:"State"}),u.jsx("span",{className:`badge badge-sm capitalize ${c} ${i?"orch-working-pulse":""}`,children:l}),u.jsx("span",{className:o?"text-success":"text-warning",children:o?"stream online":"stream reconnecting"}),u.jsxs("span",{children:["Last refresh ",ie]}),u.jsxs("span",{children:["Poll ",h??"--","s"]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 text-[10px]",children:[u.jsx(pi,{label:"active",value:v}),u.jsx(pi,{label:"running",value:p}),u.jsx(pi,{label:"queued",value:m}),u.jsx(pi,{label:"repos",value:g}),u.jsx(pi,{label:"git",value:ee,monospace:!0})]})]}),u.jsxs("div",{className:"flex items-center gap-2 self-end lg:self-start",children:[u.jsx(Zc,{label:w?"Refreshing...":"Refresh data",onClick:A,disabled:w,busy:w,children:u.jsx(Ey,{})}),u.jsx(Zc,{label:E==="poll"?"Polling...":"Trigger poll",onClick:K,disabled:!q,busy:E==="poll",children:u.jsx(My,{})}),u.jsx(Zc,{label:E==="sync"?"Syncing...":"Run sync",onClick:J,disabled:!q,busy:E==="sync",children:u.jsx(Ay,{})}),u.jsx(Zc,{label:"Open settings",onClick:I,children:u.jsx(wy,{})})]})]})})})}function Cy(l){if(!l)return"--";const c=new Date(l);return Number.isNaN(c.getTime())?l:c.toLocaleTimeString()}function pi({label:l,value:c,monospace:i=!1}){return u.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-base-100/45 bg-base-100/35 px-1.5 py-0.5",children:[u.jsx("span",{className:"text-[9px] uppercase tracking-[0.16em] text-base-content/65",children:l}),u.jsx("span",{className:i?"font-mono text-base-content":"font-semibold text-base-content",children:c})]})}function Zc({label:l,onClick:c,disabled:i=!1,busy:o=!1,children:f}){return u.jsx("button",{type:"button",className:"btn btn-ghost btn-sm btn-circle border border-base-100/45 bg-base-100/30 hover:bg-base-100/50",onClick:c,disabled:i,title:l,"aria-label":l,children:o?u.jsx("span",{className:"loading loading-spinner loading-xs","aria-hidden":"true"}):f})}function or(l){return u.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4","aria-hidden":"true",children:l})}function Ey(){return or(u.jsxs(u.Fragment,{children:[u.jsx("path",{d:"M20 11a8 8 0 0 0-13.8-5.4"}),u.jsx("path",{d:"M4 4v4h4"}),u.jsx("path",{d:"M4 13a8 8 0 0 0 13.8 5.4"}),u.jsx("path",{d:"M20 20v-4h-4"})]}))}function My(){return or(u.jsxs(u.Fragment,{children:[u.jsx("circle",{cx:"12",cy:"12",r:"7.25"}),u.jsx("circle",{cx:"12",cy:"12",r:"2.25"}),u.jsx("path",{d:"m20 4-3.4 3.4"}),u.jsx("path",{d:"M20 7V4h-3"})]}))}function Ay(){return or(u.jsxs(u.Fragment,{children:[u.jsx("path",{d:"M10.2 6.2a4.4 4.4 0 1 0-2.8 6.5"}),u.jsx("path",{d:"M10.4 8.8V5.7H7.3"}),u.jsx("path",{d:"M13.8 17.8a4.4 4.4 0 1 0 2.8-6.5"}),u.jsx("path",{d:"M13.6 15.2v3.1h3.1"})]}))}function wy(){return or(u.jsxs(u.Fragment,{children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M19 12a1.3 1.3 0 0 0 .9 1.25l.12.03a1.9 1.9 0 0 1 0 3.44l-.12.04A1.3 1.3 0 0 0 19 18a1.3 1.3 0 0 0-.23.75l.01.12a1.9 1.9 0 0 1-2.98 1.72l-.1-.07a1.3 1.3 0 0 0-1.5 0l-.1.07a1.9 1.9 0 0 1-2.98-1.72l.01-.12a1.3 1.3 0 0 0-.23-.75 1.3 1.3 0 0 0-.9-.56l-.12-.04a1.9 1.9 0 0 1 0-3.44l.12-.03A1.3 1.3 0 0 0 9 12a1.3 1.3 0 0 0-.23-.75l-.01-.12a1.9 1.9 0 0 1 2.98-1.72l.1.07a1.3 1.3 0 0 0 1.5 0l.1-.07a1.9 1.9 0 0 1 2.98 1.72l-.01.12c0 .27.08.53.23.75.2.28.51.48.86.56l.12.03A1.3 1.3 0 0 0 19 12Z"})]}))}function Kc({label:l,value:c,accent:i,subValue:o}){const f=i==="amber"?"border-warning/50 bg-warning/10":i==="emerald"?"border-success/50 bg-success/10":i==="sky"?"border-accent/50 bg-accent/10":"border-info/50 bg-info/10";return u.jsxs("article",{className:`stat min-h-0 gap-1 rounded-box border px-3 py-2 shadow-panel ${f}`,children:[u.jsx("div",{className:"stat-title text-[10px] uppercase tracking-[0.12em] text-base-content/70",children:l}),u.jsx("div",{className:"stat-value text-xl leading-tight text-base-content",children:c}),o&&u.jsx("div",{className:"stat-desc text-[10px] text-base-content/70",children:o})]})}function Ko({snapshot:l}){const c=l?.stats.cost.model==="subscription",i=l?.cost.dailyBudgetOverrideUsd??null,o=l?.cost.effectiveDailyBudgetUsd??l?.cost.dailyBudgetUsd??0,f=l?.status.dailyCostUsd??0,h=o-f,g=i!==null?`Budget $${Ie(o)} (override)`:`Budget $${Ie(l?.cost.dailyBudgetUsd??0)}`;return u.jsxs("section",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-4",children:[u.jsx(Kc,{label:c?"Daily Usage":"Daily Cost",value:c?Oy(l?.stats.usage.todayTotalTokens??0):`$${Ie(f)}`,accent:"emerald",subValue:c?`Est. $${Ie(f)} today`:g}),u.jsx(Kc,{label:"Budget Headroom",value:zy(h),accent:h>=0?"cyan":"amber",subValue:`Daily cap $${Ie(o)}`}),u.jsx(Kc,{label:"24h Throughput",value:l?.stats.throughput.runs24h??0,accent:"cyan",subValue:`${(l?.stats.throughput.successRate7d??0).toFixed(1)}% success (7d)`}),u.jsx(Kc,{label:"Review Ready",value:l?.stats.overview.reviewReadyRuns??0,accent:"sky",subValue:`${l?.stats.overview.completedRuns??0} completed`})]})}function Oy(l){return!Number.isFinite(l)||l<=0?"0":l>=1e9?`${(l/1e9).toFixed(2)}B`:l>=1e6?`${(l/1e6).toFixed(2)}M`:l>=1e3?`${(l/1e3).toFixed(1)}k`:String(Math.round(l))}function zy(l){const c=`$${Ie(Math.abs(l))}`;return l>=0?`+${c}`:`-${c}`}const Sp=[{id:"issues",label:"issues",shortLabel:"issues",Icon:Ly},{id:"stats",label:"stats",shortLabel:"stats",Icon:Uy},{id:"projects",label:"projects",shortLabel:"projects",Icon:By},{id:"agent",label:"agent",shortLabel:"agent",Icon:Hy},{id:"settings",label:"settings",shortLabel:"settings",Icon:ky}];function Dy({activePage:l,onPageChange:c}){return u.jsxs(u.Fragment,{children:[u.jsx("aside",{className:"hidden md:block md:min-h-0",children:u.jsx("nav",{className:"sticky top-[4.55rem] flex h-[calc(100dvh-4.9rem)] min-h-[560px] w-20 flex-col gap-1 border-r border-base-300/70 bg-base-200/45 px-2 py-4 lg:w-56 lg:px-3","aria-label":"Dashboard pages",children:Sp.map(i=>{const o=l===i.id;return u.jsxs("button",{type:"button",onClick:()=>c(i.id),"aria-current":o?"page":void 0,"aria-label":i.label,title:i.label,className:`btn btn-sm h-11 w-full rounded-lg border border-transparent px-2 ${o?"btn-primary text-primary-content":"btn-ghost bg-base-100/25 text-base-content/75 hover:bg-base-100/45 hover:text-base-content"} justify-center lg:justify-start lg:gap-3 lg:px-3`,children:[u.jsx(i.Icon,{className:"size-4 shrink-0"}),u.jsx("span",{className:"hidden text-sm capitalize lg:inline",children:i.label})]},i.id)})})}),u.jsx("nav",{className:"dock dock-sm shadow-nav-dock z-40 border-t border-base-300/70 bg-base-200/95 backdrop-blur md:hidden","aria-label":"Dashboard pages",children:Sp.map(i=>{const o=l===i.id;return u.jsxs("button",{type:"button",onClick:()=>c(i.id),"aria-label":i.label,title:i.label,className:o?"dock-active text-primary":"text-base-content/70","aria-current":o?"page":void 0,children:[u.jsx(i.Icon,{className:"size-[1.1rem]"}),u.jsx("span",{className:"dock-label text-[11px] capitalize",children:i.shortLabel})]},i.id)})})]})}function Ti({className:l,children:c}){return u.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:l??"size-4","aria-hidden":"true",children:c})}function Ly({className:l}){return Ti({className:l,children:u.jsxs(u.Fragment,{children:[u.jsx("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2.5"}),u.jsx("path",{d:"M7 9h10"}),u.jsx("path",{d:"M7 13h6.5"})]})})}function Uy({className:l}){return Ti({className:l,children:u.jsxs(u.Fragment,{children:[u.jsx("path",{d:"M4 19.5h16"}),u.jsx("rect",{x:"6.25",y:"11.25",width:"2.5",height:"6.25",rx:"1"}),u.jsx("rect",{x:"10.75",y:"8.25",width:"2.5",height:"9.25",rx:"1"}),u.jsx("rect",{x:"15.25",y:"5.25",width:"2.5",height:"12.25",rx:"1"})]})})}function By({className:l}){return Ti({className:l,children:u.jsxs(u.Fragment,{children:[u.jsx("rect",{x:"3.5",y:"5",width:"17",height:"14",rx:"2.5"}),u.jsx("path",{d:"M3.75 9.5h16.5"}),u.jsx("path",{d:"M8.25 5v4.5"})]})})}function Hy({className:l}){return Ti({className:l,children:u.jsxs(u.Fragment,{children:[u.jsx("rect",{x:"4",y:"4.5",width:"16",height:"15",rx:"3"}),u.jsx("circle",{cx:"9",cy:"10",r:"1"}),u.jsx("circle",{cx:"15",cy:"10",r:"1"}),u.jsx("path",{d:"M8 14h8"})]})})}function ky({className:l}){return Ti({className:l,children:u.jsxs(u.Fragment,{children:[u.jsx("circle",{cx:"12",cy:"12",r:"3"}),u.jsx("path",{d:"M19 12a1.3 1.3 0 0 0 .9 1.25l.12.03a1.9 1.9 0 0 1 0 3.44l-.12.04A1.3 1.3 0 0 0 19 18a1.3 1.3 0 0 0-.23.75l.01.12a1.9 1.9 0 0 1-2.98 1.72l-.1-.07a1.3 1.3 0 0 0-1.5 0l-.1.07a1.9 1.9 0 0 1-2.98-1.72l.01-.12a1.3 1.3 0 0 0-.23-.75 1.3 1.3 0 0 0-.9-.56l-.12-.04a1.9 1.9 0 0 1 0-3.44l.12-.03A1.3 1.3 0 0 0 9 12a1.3 1.3 0 0 0-.23-.75l-.01-.12a1.9 1.9 0 0 1 2.98-1.72l.1.07a1.3 1.3 0 0 0 1.5 0l.1-.07a1.9 1.9 0 0 1 2.98 1.72l-.01.12c0 .27.08.53.23.75.2.28.51.48.86.56l.12.03A1.3 1.3 0 0 0 19 12Z"})]})})}const qy=20;function Yy({run:l,runId:c,runEvents:i,onBack:o}){const[f,h]=D.useState(!0),g=D.useRef(null),v=D.useMemo(()=>i.slice(-400),[i]);return D.useEffect(()=>{const p=g.current;!p||!f||(p.scrollTop=p.scrollHeight)},[f,v.length]),D.useEffect(()=>{h(!0)},[c]),u.jsx("section",{className:"card min-w-0 overflow-hidden border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("h2",{className:"card-title text-lg",children:"Issue Detail"}),u.jsx("p",{className:"break-all text-xs text-base-content/70",children:l?`${l.repo} #${l.issue}`:`Run ${c}`})]}),u.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[u.jsxs("button",{type:"button",className:`btn btn-sm ${f?"btn-primary":"btn-ghost"}`,onClick:()=>h(p=>!p),children:["Auto-scroll ",f?"on":"off"]}),u.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:o,children:"Back to issues"})]})]}),l?u.jsxs("div",{className:"mt-4 space-y-4",children:[u.jsxs("section",{className:"min-w-0 rounded-box border border-base-300/70 bg-base-100/70 px-3 py-3",children:[u.jsx("p",{className:"break-words text-sm font-semibold text-base-content",children:ea(Gy(l.issueTitle),200)}),u.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-xs text-base-content/80",children:[u.jsx("span",{className:"badge badge-sm",children:l.status.replaceAll("_"," ")}),u.jsxs("span",{className:"badge badge-sm",children:["phase ",ea(l.phase?.trim()||"-",28)]}),u.jsxs("span",{className:"badge badge-sm",children:["iter ",l.iterations]}),u.jsxs("span",{className:"badge badge-sm",children:["$",l.costUsd.toFixed(2)]}),u.jsx("span",{className:"badge badge-sm",children:l.prNumber!==null?`PR #${l.prNumber}`:"no PR"})]}),l.lastError&&u.jsx("p",{className:"mt-2 whitespace-pre-wrap break-words rounded-md border border-error/30 bg-error/10 px-2 py-1 text-xs text-error",children:ea(l.lastError,2e3)}),u.jsxs("p",{className:"mt-2 text-[11px] text-base-content/65",children:["started ",l.startedAt?an(l.startedAt):"-"," · ","ended ",l.endedAt?an(l.endedAt):"-"]})]}),l.hasRun?v.length===0?u.jsx("div",{className:"alert border border-base-300/60 bg-base-100/70 text-sm",children:u.jsx("span",{children:"No events yet for this run."})}):u.jsxs("section",{className:"min-w-0 rounded-box border border-base-300/70 bg-base-100/70 px-3 py-3",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[u.jsx("h3",{className:"text-sm font-semibold text-base-content",children:"Event Stream"}),u.jsxs("p",{className:"text-xs text-base-content/65",children:["Showing ",v.length," events",i.length>v.length?` (latest ${v.length})`:""]})]}),u.jsx("div",{ref:g,onScroll:()=>{const p=g.current;if(!p)return;const m=p.scrollHeight-p.scrollTop-p.clientHeight;h(m<=qy)},className:"mt-3 max-h-[70vh] min-w-0 space-y-2 overflow-x-hidden overflow-y-auto pr-1",children:v.map(p=>u.jsxs("div",{className:"min-w-0 rounded-box border border-base-300/70 bg-base-200/70 px-3 py-2",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 text-xs text-base-content/70",children:[u.jsx("span",{children:an(p.timestamp)}),u.jsxs("span",{className:"break-all",children:[p.phase," / ",p.role]})]}),u.jsx("p",{className:"mt-1 break-words text-sm font-semibold text-info",children:p.type}),u.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs text-base-content/85",children:yy(p.data)})]},p.id))})]}):u.jsx("div",{className:"alert border border-base-300/60 bg-base-100/70 text-sm",children:u.jsx("span",{children:"This issue is tracked but has no run yet."})})]}):u.jsx("div",{className:"alert mt-4 border border-base-300/60 bg-base-100/70 text-sm",children:u.jsxs("span",{children:['Run "',c,'" is not in the current dashboard snapshot.']})})]})})}function Gy(l){const c=l?.trim();return c&&c.length>0?c:"(title unavailable)"}function Wa({label:l,busy:c,onClick:i,submit:o=!1}){return u.jsx(qn,{type:o?"submit":"button",onClick:i,tone:"info",size:"sm",variant:o?"solid":"outline",fullWidth:!0,className:"justify-between",disabled:c,children:c?"Working...":l})}function Vy({operationsEnabled:l,activeOperation:c,updateStatus:i,repos:o,retryForm:f,rebaseForm:h,continueForm:g,deleteEntryForm:v,labelsInitForm:p,onRetryFormChange:m,onRebaseFormChange:S,onContinueFormChange:y,onDeleteEntryFormChange:x,onLabelsInitFormChange:j,onPoll:T,onSync:E,onCleanup:w,onLabelsInitSubmit:A,onRetrySubmit:K,onRebaseSubmit:J,onContinueSubmit:I,onDeleteEntrySubmit:P,onUpdate:W}){const Q=c==="update"||i!=null&&i.state!=="idle"&&i.state!=="failed";return u.jsx("div",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Operations"}),!l&&u.jsx("div",{className:"alert alert-warning mt-1 text-xs",children:u.jsx("span",{children:"Operations are disabled by server policy for this web instance."})}),u.jsxs("fieldset",{disabled:!l,className:`space-y-4 ${l?"":"opacity-60"}`,children:[u.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[u.jsx(Wa,{busy:c==="poll",onClick:T,label:"Trigger Poll"}),u.jsx(Wa,{busy:c==="sync",onClick:E,label:"Run Sync"}),u.jsx(Wa,{busy:c==="cleanup",onClick:w,label:"Run Cleanup"})]}),u.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:A,children:[u.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Labels Init"}),u.jsxs("div",{className:"mt-2 space-y-2",children:[u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Repo"})}),u.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:p.repo,onChange:k=>j({repo:k.target.value}),children:o.map(k=>u.jsx("option",{value:k,children:k},k))})]}),u.jsx(Wa,{busy:c==="labels-init",label:"Bootstrap Labels",submit:!0})]})]}),u.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:K,children:[u.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Retry"}),u.jsxs("div",{className:"mt-2 space-y-2",children:[u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Repo"})}),u.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:f.repo,onChange:k=>m({repo:k.target.value}),children:o.map(k=>u.jsx("option",{value:k,children:k},k))})]}),u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Issue Number"})}),u.jsx("input",{className:"input input-bordered input-sm w-full bg-base-100/90",value:f.issueNumber,onChange:k=>m({issueNumber:k.target.value}),inputMode:"numeric",placeholder:"123"})]}),u.jsxs("label",{className:"label cursor-pointer justify-start gap-2 py-0",children:[u.jsx("input",{type:"checkbox",className:"checkbox checkbox-info checkbox-sm",checked:f.resetPlan,onChange:k=>m({resetPlan:k.target.checked})}),u.jsx("span",{className:"label-text text-xs",children:"Reset saved plan"})]}),u.jsxs("label",{className:"label cursor-pointer justify-start gap-2 py-0",children:[u.jsx("input",{type:"checkbox",className:"checkbox checkbox-info checkbox-sm",checked:f.fresh,onChange:k=>m({fresh:k.target.checked})}),u.jsx("span",{className:"label-text text-xs",children:"Fresh branch reset"})]}),u.jsx(Wa,{busy:c==="retry",label:"Queue Retry",submit:!0})]})]}),u.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:J,children:[u.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Rebase"}),u.jsxs("div",{className:"mt-2 space-y-2",children:[u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Repo"})}),u.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:h.repo,onChange:k=>S({repo:k.target.value}),children:o.map(k=>u.jsx("option",{value:k,children:k},k))})]}),u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Issue Number"})}),u.jsx("input",{className:"input input-bordered input-sm w-full bg-base-100/90",value:h.issueNumber,onChange:k=>S({issueNumber:k.target.value}),inputMode:"numeric",placeholder:"123"})]}),u.jsx(Wa,{busy:c==="rebase",label:"Queue Rebase",submit:!0})]})]}),u.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:I,children:[u.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Continue"}),u.jsxs("div",{className:"mt-2 space-y-2",children:[u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Repo"})}),u.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:g.repo,onChange:k=>y({repo:k.target.value}),children:o.map(k=>u.jsx("option",{value:k,children:k},k))})]}),u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Issue Number"})}),u.jsx("input",{className:"input input-bordered input-sm w-full bg-base-100/90",value:g.issueNumber,onChange:k=>y({issueNumber:k.target.value}),inputMode:"numeric",placeholder:"123"})]}),u.jsx(Wa,{busy:c==="continue",label:"Queue Continue Pass",submit:!0})]})]}),u.jsxs("form",{className:"rounded-box border border-base-300/70 bg-base-100/60 p-3",onSubmit:P,children:[u.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Delete Entry"}),u.jsxs("div",{className:"mt-2 space-y-2",children:[u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Repo"})}),u.jsx("select",{className:"select select-bordered select-sm w-full bg-base-100/90",value:v.repo,onChange:k=>x({repo:k.target.value}),children:o.map(k=>u.jsx("option",{value:k,children:k},k))})]}),u.jsxs("label",{className:"form-control",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs",children:"Issue Number"})}),u.jsx("input",{className:"input input-bordered input-sm w-full bg-base-100/90",value:v.issueNumber,onChange:k=>x({issueNumber:k.target.value}),inputMode:"numeric",placeholder:"123"})]}),u.jsxs("label",{className:"label cursor-pointer justify-start gap-2 py-0",children:[u.jsx("input",{type:"checkbox",className:"checkbox checkbox-warning checkbox-sm",checked:v.force,onChange:k=>x({force:k.target.checked})}),u.jsx("span",{className:"label-text text-xs",children:"Force delete if running"})]}),u.jsx(Wa,{busy:c==="delete-entry",label:"Delete Local Entry",submit:!0})]})]})]}),u.jsxs("div",{className:"mt-4 rounded-box border border-base-300/70 bg-base-100/60 p-3",children:[u.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-info",children:"Deploy"}),u.jsxs("div",{className:"mt-2 space-y-2",children:[u.jsx(Wa,{busy:Q,onClick:W,label:i&&i.state!=="idle"&&i.state!=="failed"?`Updating (${i.state})...`:"Pull & Restart"}),i&&i.state==="failed"&&u.jsx("div",{className:"text-xs text-error",children:i.error})]})]})]})})}function Qy(l,c){return l.forge==="forgejo"?{tokenEnv:l.tokenEnv??"FORGEJO_TOKEN (default)",apiBaseUrl:l.apiBaseUrl??"(missing: required for forgejo)",apiMissing:!l.apiBaseUrl}:{tokenEnv:l.tokenEnv??`${c?.githubDefaults.tokenEnv??"GITHUB_TOKEN"} (global github.tokenEnv)`,apiBaseUrl:l.apiBaseUrl??`${c?.githubDefaults.apiBaseUrl??"https://api.github.com"} (global github.apiBaseUrl)`,apiMissing:!1}}function ko(l,c,i){const o=l.defaults[c],f=l.agents[o],h=f?i[f]:void 0,g=Object.values(i).find(m=>m.type===o),v=h??g;if(!v)return`${o} (no worker profile found)`;const p=f||`type:${v.type}`;return`${o} -> ${p} (${Xy(v)})`}function Xy(l){const c=l.args.map(ib).join(" ");return c?`${l.command} ${c}`:l.command}function Zy(l){const c=new Set;for(const i of l.labels.ready)c.add(i);c.add(l.labels.running),c.add(l.labels.blocked),c.add(l.labels.needsHuman),c.add(l.labels.reviewReady),c.add(l.labels.error),c.add(l.labels.retry),c.add(l.labels.planning),c.add(l.labels.mergeQueued),c.add(l.labels.merging),c.add(l.labels.mergeFailed);for(const i of l.selectors.includeLabelsAny)c.add(i);for(const i of l.selectors.excludeLabelsAny)c.add(i);return[...c]}function Ky(l){return l.length===0?"(none)":l.map((c,i)=>`${i+1}:${_i(c)}`).join(" | ")}function _i(l){return typeof l=="string"?l:l.map(ib).join(" ")}function Jy(l){const c=l.environment?.bootstrap??[];return c.length===0?"(none)":c.map(i=>`${i.when}:${_i(i.command)}`).join(" | ")}function $y(l){const c=l.environment?.cleanup??[];return c.length===0?"(none)":c.map(i=>`${i.when}:${_i(i.command)}`).join(" | ")}function Iy(l){const c=l.environment?.shared;if(!c)return"(not configured)";const i=c.healthcheck?_i(c.healthcheck):"(none)";return`requireRunning=${c.requireRunning?"yes":"no"} healthcheck=${i}`}function Fy(l){const c=l.environment?.dedicated;if(!c)return"(not configured)";const i=c.compose.services.length>0?c.compose.services.join(","):"(all)",o=c.healthcheck?_i(c.healthcheck):"(none)";return`compose=${c.compose.file} services=${i} project=${c.compose.projectName} copyFrom=${c.env.copyFrom} overrideKeys=${c.env.overrideKeys.length} overrideFiles=${c.env.overrideFiles.length} healthcheck=${o} teardown=${c.teardownOnComplete?"yes":"no"}`}function Py(l){const c=Object.entries(l.labelConfig);return c.length===0?"(none)":c.map(([i,o])=>{const f=[];return o.color&&f.push(`color:${o.color}`),o.description&&f.push(`desc:${o.description}`),`${i}[${f.join(",")}]`}).join(" | ")}function ss(l){return l.length===0?"(none)":l.join(", ")}function qo(l){return l?"custom":"default"}function ib(l){return/^[A-Za-z0-9_./:@=-]+$/.test(l)?l:JSON.stringify(l)}function Wy({snapshot:l,repo:c,isLoading:i,onBack:o}){const f=l?.repos.find(g=>g.repo===c)??null,h=f?Qy(f,l):null;return i&&!l?u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("div",{className:"skeleton h-5 w-44"}),u.jsxs("div",{className:"mt-4 grid gap-3",children:[u.jsx("div",{className:"skeleton h-16 w-full"}),u.jsx("div",{className:"skeleton h-16 w-full"}),u.jsx("div",{className:"skeleton h-16 w-full"})]})]})}):l?u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"card-title text-lg",children:"Project Details"}),u.jsxs("p",{className:"text-xs text-base-content/60",children:["Updated ",an(l.generatedAt)]})]}),u.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:o,children:"Back to projects"})]}),f?u.jsx(ex,{selectedProject:f,workerProfiles:l.workerProfiles,authDisplay:h}):u.jsx("div",{className:"alert mt-4 border border-base-300/60 bg-base-100/70 text-sm",children:u.jsxs("span",{children:['Repository "',c,'" is not configured.']})})]})}):u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-6",children:[u.jsx("h2",{className:"card-title text-2xl font-semibold text-base-content",children:"Project Details"}),u.jsx("div",{className:"alert mt-3 border border-base-300/60 bg-base-100/70 text-sm",children:u.jsx("span",{children:"Project configuration is currently unavailable."})}),u.jsx("div",{className:"mt-4",children:u.jsx("button",{type:"button",className:"btn btn-sm btn-ghost",onClick:o,children:"Back to projects"})})]})})}function ex({selectedProject:l,workerProfiles:c,authDisplay:i}){return i?u.jsxs("div",{className:"mt-4 space-y-4",children:[u.jsxs("section",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[u.jsx("h3",{className:"text-sm font-semibold text-base-content",children:l.repo}),u.jsxs("p",{className:"mt-1 text-xs text-base-content/65",children:["path ",ea(l.localPath,140)]}),u.jsxs("div",{className:"mt-3 grid gap-2 text-xs text-base-content/80 sm:grid-cols-2",children:[u.jsxs("p",{children:["forge ",l.forge]}),u.jsxs("p",{children:["base branch ",l.baseBranch]}),u.jsxs("p",{children:["branch prefix ",l.branchPrefix]}),u.jsxs("p",{children:["workflow ",l.workflow??"default"]}),u.jsxs("p",{children:["max concurrency ",l.maxConcurrentRuns]}),u.jsxs("p",{children:["linked projects ",ss(l.linkedProjects)]})]})]}),u.jsxs("section",{className:"grid gap-3 lg:grid-cols-2",children:[u.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Auth"}),u.jsxs("p",{className:"mt-2 text-xs text-base-content/85",children:["token ",i.tokenEnv]}),u.jsxs("p",{className:"mt-1 text-xs text-base-content/85",children:["api ",i.apiBaseUrl]}),i.apiMissing&&u.jsx("p",{className:"mt-2 rounded-md border border-warning/40 bg-warning/10 px-2 py-1 text-xs text-warning",children:"apiBaseUrl is required for Forgejo repositories."})]}),u.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Tools"}),u.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[u.jsxs("p",{children:["planner ",ko(l,"planner",c)]}),u.jsxs("p",{children:["coder ",ko(l,"coder",c)]}),u.jsxs("p",{children:["reviewer ",ko(l,"reviewer",c)]}),u.jsxs("p",{children:["mentions ",ss(l.defaults.prMentions)]})]})]}),u.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Labels"}),u.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[u.jsxs("p",{children:["all tags ",ss(Zy(l))]}),u.jsxs("p",{children:["include ",ss(l.selectors.includeLabelsAny)]}),u.jsxs("p",{children:["exclude ",ss(l.selectors.excludeLabelsAny)]}),u.jsxs("p",{children:["lanes ready:",ss(l.labels.ready)," ","running:",l.labels.running," ","review:",l.labels.reviewReady," ","blocked:",l.labels.blocked]}),l.kanban&&u.jsxs("p",{children:["kanban trigger:",l.kanban.triggerLabel," ","blocked:",l.kanban.labels.blocked]})]})]}),u.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Execution"}),u.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[u.jsxs("p",{children:["verify ",Ky(l.verify)]}),u.jsxs("p",{children:["planning PRD dir ",l.planning.prdDirectory]}),u.jsxs("p",{children:["prompts planner:",qo(l.prompts.plannerSystem)," ","coder:",qo(l.prompts.coderSystem)," ","reviewer:",qo(l.prompts.reviewerSystem)]})]})]})]}),u.jsxs("section",{className:"grid gap-3 lg:grid-cols-2",children:[u.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Environment"}),u.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[u.jsxs("p",{children:["mode ",l.environment?.defaultMode??"shared (implicit default)"]}),u.jsxs("p",{children:["bootstrap ",Jy(l)]}),u.jsxs("p",{children:["cleanup ",$y(l)]}),u.jsxs("p",{children:["shared ",Iy(l)]}),u.jsxs("p",{children:["dedicated ",Fy(l)]})]})]}),u.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/65 px-3 py-3",children:[u.jsx("h3",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-base-content/65",children:"Merge Queue"}),u.jsxs("div",{className:"mt-2 space-y-1 text-xs text-base-content/85",children:[u.jsxs("p",{children:["merge queue ",l.mergeQueue.enabled?"enabled":"disabled"," ","batch ",l.mergeQueue.batchSize," ","method ",l.mergeQueue.mergeMethod," ","approval ",l.mergeQueue.requireApproval?"required":"optional"," ","retryFlakyOnce ",l.mergeQueue.retryFlakyOnce?"yes":"no"]}),u.jsxs("p",{children:["staging branch ",l.mergeQueue.stagingBranchPrefix]}),u.jsxs("p",{children:["label presentation ",Py(l)]})]})]})]}),u.jsxs("details",{className:"collapse collapse-arrow rounded-box border border-base-300/70 bg-base-100/65",children:[u.jsx("summary",{className:"collapse-title py-3 text-sm font-semibold text-base-content",children:"Raw Sanitized Config"}),u.jsx("div",{className:"collapse-content pt-0",children:u.jsx("pre",{className:"overflow-x-auto rounded-md border border-base-300/70 bg-base-300/30 p-3 text-[11px] leading-relaxed text-base-content/85",children:JSON.stringify(l,null,2)})})]})]}):u.jsx(u.Fragment,{})}function tx({snapshot:l,isLoading:c,onOpenRepo:i}){const o=l?.repos??[];return c&&!l?u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("div",{className:"skeleton h-5 w-36"}),u.jsxs("div",{className:"mt-4 space-y-2",children:[u.jsx("div",{className:"skeleton h-14 w-full"}),u.jsx("div",{className:"skeleton h-14 w-full"}),u.jsx("div",{className:"skeleton h-14 w-full"})]})]})}):l?u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u.jsxs("h2",{className:"card-title text-lg",children:["Projects (",o.length,")"]}),u.jsxs("span",{className:"text-[11px] text-base-content/60",children:["Updated ",an(l.generatedAt)]})]}),o.length===0?u.jsx("div",{className:"alert mt-4 border border-base-300/60 bg-base-100/70 text-sm",children:u.jsx("span",{children:"No repositories are configured."})}):u.jsx("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 2xl:grid-cols-3",children:o.map(f=>u.jsxs("button",{type:"button",onClick:()=>i(f.repo),className:"rounded-box border border-base-300/70 bg-base-100/55 px-3 py-3 text-left transition-colors hover:border-info/45 hover:bg-base-100/80",children:[u.jsx("p",{className:"text-sm font-semibold text-base-content",children:f.repo}),u.jsxs("p",{className:"mt-0.5 text-xs text-base-content/70",children:[f.forge," · ","base ",f.baseBranch]}),u.jsxs("p",{className:"mt-0.5 text-xs text-base-content/55",children:["workflow ",f.workflow??"default"," · ","coder ",f.defaults.coder]}),u.jsx("p",{className:"mt-2 text-[11px] text-info/85",children:"Open project details"})]},f.repo))})]})}):u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-6",children:[u.jsx("h2",{className:"card-title text-2xl font-semibold text-base-content",children:"Projects"}),u.jsx("div",{className:"alert mt-3 border border-base-300/60 bg-base-100/70 text-sm",children:u.jsx("span",{children:"Project configuration is currently unavailable."})})]})})}const jp={queued:"cyan",plan:"cyan",planner:"cyan",planning:"cyan",code:"yellow",coder:"yellow",review:"magenta",reviewer:"magenta",verify:"green",verification:"green",publish:"green",merge:"green",merged:"green"},ax={running:"badge-warning",queued:"badge-info",review_ready:"badge-secondary",completed:"badge-success",blocked:"badge-error",error:"badge-error"};function nx(l){return fr(cx(l))}function lx(l){return fr(ux(l))}function sx(l){return fr(ox(l))}function ix(l){return fr(rx(l))}function cx(l){const c=fx(l);if(!c)return"gray";const i=jp[c];if(i)return i;const o=c.split(/[\s:_-]+/);for(const f of o){const h=jp[f];if(h)return h}return o.some(f=>f.includes("error")||f.includes("fail")||f.includes("block"))?"red":o.some(f=>f.includes("queue")||f.includes("wait")||f.includes("pending"))?"cyan":o.some(f=>f.includes("review"))?"magenta":o.some(f=>f.includes("plan"))?"cyan":o.some(f=>f.includes("code")||f.includes("implement")||f.includes("fix"))?"yellow":o.some(f=>f.includes("verify")||f.includes("test")||f.includes("check"))||o.some(f=>f.includes("publish")||f.includes("merge")||f.includes("release"))?"green":"white"}function rx(l){return typeof l=="number"?"cyan":"gray"}function ux(l){const c=l??0;return c<=1?"green":c<=2?"yellow":"red"}function ox(l){const c=l??0;return c<=0?"gray":c<.5?"green":c<2?"yellow":"red"}function fx(l){return l?.trim().toLowerCase()??""}function fr(l){switch(l){case"red":return"badge-error";case"yellow":return"badge-warning";case"cyan":return"badge-info";case"magenta":return"badge-secondary";case"green":return"badge-success";case"gray":return"badge-neutral";default:return"badge-ghost"}}function dx({isLoading:l,repos:c,selectedRepo:i,onSelectedRepoChange:o,filteredRuns:f,selectedRunId:h,onOpenRun:g,statusTone:v}){return u.jsx("div",{className:"card min-w-0 overflow-hidden border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"card-title text-lg",children:"Runs"}),u.jsx("p",{className:"text-xs text-base-content/70",children:"Live and recent execution history."})]}),u.jsxs("label",{className:"form-control max-w-sm",children:[u.jsx("div",{className:"label py-0 pb-1",children:u.jsx("span",{className:"label-text text-xs uppercase tracking-wide text-base-content/70",children:"Repo Filter"})}),u.jsxs("select",{className:"select select-bordered select-sm w-full bg-base-100/80",value:i,onChange:p=>o(p.target.value),children:[u.jsx("option",{value:"all",children:"All repos"}),c.map(p=>u.jsx("option",{value:p,children:p},p))]})]})]}),l?u.jsxs("div",{className:"mt-4 space-y-2",children:[u.jsx("div",{className:"skeleton h-20 w-full"}),u.jsx("div",{className:"skeleton h-20 w-full"})]}):f.length===0?u.jsx("div",{className:"alert mt-4 border border-base-300/60 bg-base-100/70 text-sm",children:u.jsx("span",{children:"No runs for the current filter."})}):u.jsx("div",{className:"mt-4 grid max-h-[540px] min-w-0 gap-3 overflow-x-hidden overflow-y-auto pr-1",children:f.map(p=>{const m=p.status==="running";return u.jsx("button",{type:"button",onClick:()=>g(p.runId),className:`card w-full min-w-0 overflow-hidden border text-left transition-all ${h===p.runId?"border-primary/65 bg-primary/10 shadow-md":"border-base-300/70 bg-base-100/50 hover:border-primary/40 hover:bg-base-100/80"} ${m?"orch-running-card":""}`,children:u.jsxs("div",{className:"card-body min-w-0 gap-2.5 p-3",children:[u.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsxs("p",{className:"break-all text-xs font-medium uppercase tracking-wide text-base-content/70",children:[p.repo," #",p.issue]}),u.jsx("p",{className:"mt-0.5 break-words text-sm font-semibold text-base-content",children:ea(hx(p.issueTitle),110)}),u.jsx("p",{className:"mt-0.5 break-all text-xs text-base-content/55",children:p.hasRun?p.runId:"Tracked issue (no run yet)"})]}),u.jsx("span",{className:`badge badge-sm capitalize ${v[p.status]} ${m?"orch-working-pulse":""}`,children:p.status.replaceAll("_"," ")})]}),u.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5 text-xs",children:[u.jsxs("span",{className:`badge badge-xs ${nx(p.phase)}`,children:["phase ",ea(mx(p.phase),18)]}),u.jsxs("span",{className:`badge badge-xs ${lx(p.iterations)}`,children:["iter ",p.iterations]}),u.jsxs("span",{className:`badge badge-xs ${sx(p.costUsd)}`,children:["$",Ie(p.costUsd)]}),u.jsx("span",{className:`badge badge-xs ${ix(p.prNumber)}`,children:p.prNumber!==null?`PR #${p.prNumber}`:"no PR"}),u.jsx("span",{className:"max-w-full text-[11px] text-base-content/65 sm:ml-auto",children:vy(p)})]}),p.lastError&&u.jsx("p",{className:"whitespace-pre-wrap break-words rounded-md border border-error/30 bg-error/10 px-2 py-1 text-xs text-error",children:ea(p.lastError,500)})]})},p.runId)})})]})})}function hx(l){const c=l?.trim();return c&&c.length>0?c:"(title unavailable)"}function mx(l){const c=l?.trim();return c&&c.length>0?c:"-"}const px="max-w-xl";function bx(l){const c=D.useId(),i=D.useId(),o=vx(l),f=l.widthClassName??px,h=gx(l.actions),g=l.closeButtonLabel??"Close dialog",v=xx(l),p=l.ariaLabel!==void 0?void 0:l.title?c:void 0,m=D.useCallback(()=>{cb(o.canRequestClose,l.onClose)},[o.canRequestClose,l.onClose]);return D.useEffect(()=>{if(!l.open||!o.canRequestClose)return;const S=jx();if(S===null)return;const y=x=>{Sx(x)&&yx(x,o.canRequestClose,l.onClose)};return S.addEventListener("keydown",y),()=>{S.removeEventListener("keydown",y)}},[l.open,o.canRequestClose,l.onClose]),l.open?u.jsxs("div",{className:"modal modal-open bg-slate-950/78 px-4 backdrop-blur-sm",role:"dialog","aria-modal":"true","aria-labelledby":p,"aria-describedby":l.description?i:void 0,"aria-label":v,children:[u.jsxs("section",{className:`modal-box relative w-full ${f} rounded-box border border-base-300/80 bg-base-100/95 p-5 shadow-2xl`,children:[o.canRequestClose?u.jsx(qn,{type:"button",tone:"ghost",size:"sm",shape:"circle",className:"absolute right-3 top-3",onClick:m,ariaLabel:g,children:"x"}):null,l.title?u.jsx("h2",{id:c,className:"pr-10 text-lg font-semibold",children:l.title}):null,l.description?u.jsx("p",{id:i,className:"mt-1 text-sm text-base-content/75",children:l.description}):null,l.children,h?u.jsx("footer",{className:"mt-5 flex justify-end gap-2",children:l.actions}):null]}),o.shouldCloseOnBackdropClick?u.jsx("button",{type:"button",className:"modal-backdrop","aria-label":g,onClick:m,children:"close"}):u.jsx("div",{className:"modal-backdrop cursor-default","aria-hidden":"true"})]}):null}function gx(l){return l!=null&&typeof l!="boolean"}function vx(l){const c=typeof l.onClose=="function"&&!l.blocking,i=c&&(l.closeOnBackdropClick??!0);return{canRequestClose:c,shouldCloseOnBackdropClick:i}}function cb(l,c){return!l||c===void 0?!1:(c(),!0)}function yx(l,c,i){return!c||l.key!=="Escape"?!1:(l.preventDefault(),cb(c,i))}function xx(l){if(l.ariaLabel!==void 0)return l.ariaLabel;if(l.title===void 0)return"Modal dialog"}function Sx(l){if(typeof l!="object"||l===null)return!1;const c=l;return typeof c.key=="string"&&typeof c.preventDefault=="function"}function jx(){const l=globalThis;return typeof l.addEventListener!="function"||typeof l.removeEventListener!="function"?null:l}function Nx({settings:l,generatedAt:c,isLoading:i,activeOperation:o,drafts:f,onDraftChange:h,onApply:g,onClear:v}){const[p,m]=D.useState(null),[S,y]=D.useState({}),x=D.useMemo(()=>l.find(w=>w.key===p)??null,[p,l]),j=x?f[x.key]??is(x.effectiveValue):"",T=x?S[x.key]??x.overrideValue!==null:!1,E=x?Rx(o,x.key):!1;return D.useEffect(()=>{y(Object.fromEntries(l.map(w=>[w.key,w.overrideValue!==null]))),p&&!l.some(w=>w.key===p)&&m(null)},[p,l]),u.jsxs("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:[u.jsxs("div",{className:"card-body p-5 sm:p-8",children:[u.jsx("h2",{className:"card-title text-2xl font-semibold capitalize text-base-content",children:"settings"}),u.jsx("p",{className:"max-w-3xl text-sm text-base-content/75",children:"Runtime overrides are stored in SQLite and applied on top of YAML/default values."}),u.jsxs("p",{className:"text-xs text-base-content/60",children:["Last refresh: ",c??"-"]}),i?u.jsx("p",{className:"text-sm text-base-content/70",children:"Loading settings…"}):l.length===0?u.jsx("p",{className:"text-sm text-base-content/70",children:"No curated settings available."}):u.jsx("ul",{className:"mt-2 grid gap-3",children:l.map(w=>u.jsx("li",{children:u.jsx("button",{type:"button",className:"group w-full rounded-box border border-base-300/80 bg-base-100/60 p-4 text-left transition hover:border-info/40 hover:bg-base-100/85 focus:outline-none focus-visible:ring-2 focus-visible:ring-info/70",onClick:()=>{m(w.key)},children:u.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u.jsx("span",{className:"font-semibold text-base-content",children:w.label}),u.jsx("span",{className:`badge badge-xs ${w.source==="override"?"badge-info":"badge-ghost"}`,children:w.source==="override"?"overwritten":"default/yaml"})]}),u.jsx("p",{className:"mt-1 break-all font-mono text-[11px] text-base-content/55",children:w.key}),u.jsx("p",{className:"mt-2 text-sm text-base-content/75",children:w.description})]}),u.jsxs("div",{className:"shrink-0 rounded-lg border border-base-300/80 bg-base-100/60 px-3 py-2 sm:min-w-[150px] sm:text-right",children:[u.jsx("p",{className:"text-[11px] uppercase tracking-wide text-base-content/55",children:"Applied"}),u.jsx("p",{className:"mt-1 font-mono text-sm font-semibold text-base-content",children:is(w.effectiveValue)})]})]})})},w.key))})]}),u.jsx(bx,{open:x!==null,title:x?.label,description:x?.details,widthClassName:"max-w-2xl",onClose:()=>{m(null)},actions:x?u.jsxs(u.Fragment,{children:[u.jsx(qn,{type:"button",tone:"ghost",onClick:()=>{m(null)},children:"close"}),u.jsx(qn,{type:"button",tone:T?"info":"neutral",onClick:()=>{if(x){if(T){g(x.key);return}v(x.key)}},disabled:E,children:E?"saving...":T?"apply override":"clear override"})]}):null,children:x?u.jsxs("div",{className:"mt-4 space-y-4",children:[u.jsxs("dl",{className:"grid gap-2 rounded-box border border-base-300/70 bg-base-200/50 p-3 text-sm sm:grid-cols-2",children:[u.jsx(Jc,{label:"Night-orch default",value:is(x.defaultValue)}),u.jsx(Jc,{label:"YAML value",value:x.hasYamlValue&&x.yamlValue!==null?is(x.yamlValue):"Not set"}),u.jsx(Jc,{label:"Effective value",value:is(x.effectiveValue)}),u.jsx(Jc,{label:"Current override",value:x.overrideValue===null?"None":is(x.overrideValue)})]}),u.jsxs("label",{className:"flex items-center gap-3 rounded-box border border-base-300/70 bg-base-200/45 p-3",children:[u.jsx("input",{type:"checkbox",className:"checkbox checkbox-sm checkbox-info",checked:T,disabled:E,onChange:w=>{y(A=>({...A,[x.key]:w.target.checked}))}}),u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-medium text-base-content",children:"Overwrite this value"}),u.jsx("p",{className:"text-xs text-base-content/65",children:"Disable to use YAML/default value. Enable to set a DB runtime override."})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-base-content/60",children:"Override value"}),x.type==="boolean"?u.jsxs("select",{className:"select select-bordered w-full max-w-xs font-mono",value:Tx(j),onChange:w=>{h(x.key,w.target.value)},disabled:!T||E,children:[u.jsx("option",{value:"true",children:"true"}),u.jsx("option",{value:"false",children:"false"})]}):u.jsx("input",{className:"input input-bordered w-full max-w-xs font-mono",type:"number",value:j,min:x.min,max:x.max,step:x.step,onChange:w=>{h(x.key,w.target.value)},disabled:!T||E})]})]}):null})]})}function Jc({label:l,value:c}){return u.jsxs("div",{children:[u.jsx("dt",{className:"text-[11px] uppercase tracking-wide text-base-content/55",children:l}),u.jsx("dd",{className:"mt-1 font-mono text-sm text-base-content",children:c})]})}function Rx(l,c){return l===`setting:set:${c}`||l===`setting:clear:${c}`}function is(l){return typeof l=="boolean"?l?"true":"false":String(l)}function Tx(l){return l.trim().toLowerCase()==="false"?"false":"true"}function _x({snapshot:l,socketConnected:c}){if(!l)return u.jsxs("div",{className:"flex flex-col gap-5",children:[u.jsx(Ko,{snapshot:l}),u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-6",children:[u.jsx("h2",{className:"card-title text-lg",children:"Stats"}),u.jsx("p",{className:"text-sm text-base-content/75",children:"Stats snapshot is loading."}),u.jsxs("div",{className:"mt-2 space-y-2",children:[u.jsx("div",{className:"skeleton h-16 w-full"}),u.jsx("div",{className:"skeleton h-16 w-full"}),u.jsx("div",{className:"skeleton h-16 w-full"})]})]})})]});const{stats:i}=l,o=Rp(i.throughput.successRate7d,80,60),f=cs(i.reliability.failureRate7d,10,25),h=en(i.overview.blockedRuns,1,2),g=en(i.overview.errorRuns,1,2),v=en(i.throughput.blocked7d,1,2),p=en(i.throughput.error7d,1,2),m=Tp(i.cost.todayCostUsd,i.cost.avgDailyCost7d,1.05,1.35),S=Tp(i.usage.todayTotalTokens,i.usage.avgDailyTokens7d,1.05,1.35),y=cs(i.efficiency.avgCostPerRun7d,1.5,3),x=cs(i.efficiency.avgCostPerSuccess7d,3,6),j=cs(i.efficiency.avgTokensPerRun7d,8e3,16e3),T=cs(i.efficiency.avgTokensPerSuccess7d,16e3,32e3),E=en(i.resources.expiringLeases,1,3),w=en(i.resources.expiredLeases,1,2),A=en(i.resources.missingWorktrees,1,2),K=en(i.resources.staleWorktrees,1,2),J=i.cost.model==="subscription",I=i.timing.sampleSize30d>0&&i.timing.p50Minutes>0,P=I?i.timing.p90Minutes/i.timing.p50Minutes:0,W=cs(P,2.5,4.5),Q=_p(i.cost.dailyHistory.slice().reverse().map(q=>q.totalCostUsd)),k=_p(i.usage.dailyHistory.slice().reverse().map(q=>q.totalTokens));return u.jsxs("div",{className:"flex flex-col gap-5",children:[u.jsx(Ko,{snapshot:l}),u.jsxs("section",{className:"grid gap-5 xl:grid-cols-2",children:[u.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"System Signals"}),u.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[u.jsx(le,{label:"Stats Updated",value:an(i.updatedAt)}),u.jsx(le,{label:"Dashboard Generated",value:an(l.generatedAt)}),u.jsx(le,{label:"Poll Interval",value:`${l.config.pollIntervalSeconds}s`}),u.jsx(le,{label:"Tracked Repositories",value:l.config.repos.length}),u.jsx(le,{label:"Websocket",value:c?"Connected":"Reconnecting"})]})]})}),u.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Run Health"}),u.jsxs("div",{className:"mt-2 grid gap-3 sm:grid-cols-2",children:[u.jsx(Un,{label:"Total Runs",value:i.overview.totalRuns}),u.jsx(Un,{label:"Active Runs",value:i.overview.activeRuns}),u.jsx(Un,{label:"Running Runs",value:i.overview.runningRuns}),u.jsx(Un,{label:"Queued Runs",value:i.overview.queuedRuns}),u.jsx(Un,{label:"Review Ready",value:i.overview.reviewReadyRuns}),u.jsx(Un,{label:"Completed Runs",value:i.overview.completedRuns}),u.jsx(Un,{label:"Blocked Runs",value:i.overview.blockedRuns,toneClass:Qe(h)}),u.jsx(Un,{label:"Error Runs",value:i.overview.errorRuns,toneClass:Qe(g)})]}),u.jsxs("p",{className:"mt-3 text-xs text-base-content/65",children:["Status mix ",Np(i.statusCounts)]})]})})]}),u.jsxs("section",{className:"grid gap-5 xl:grid-cols-2",children:[u.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Throughput"}),u.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[u.jsx(le,{label:"Runs (24h / 7d / 30d)",value:`${i.throughput.runs24h} / ${i.throughput.runs7d} / ${i.throughput.runs30d}`}),u.jsx(le,{label:"Completed (7d)",value:i.throughput.completed7d}),u.jsx(le,{label:"Blocked (7d)",value:i.throughput.blocked7d,valueClassName:Qe(v)}),u.jsx(le,{label:"Errors (7d)",value:i.throughput.error7d,valueClassName:Qe(p)}),u.jsx(le,{label:"Success Rate (7d)",value:`${i.throughput.successRate7d.toFixed(1)}%`,valueClassName:Qe(o)}),u.jsx(le,{label:"Failure Rate (7d)",value:`${i.reliability.failureRate7d.toFixed(1)}%`,valueClassName:Qe(f)}),u.jsx(le,{label:"Average Duration (7d)",value:bi(i.throughput.avgDurationMinutes7d)}),u.jsx(le,{label:"Average Iterations (7d)",value:i.throughput.avgIterations7d.toFixed(2)}),u.jsx(le,{label:"Latency (p50 / p90 / p99)",value:`${bi(i.timing.p50Minutes)} / ${bi(i.timing.p90Minutes)} / ${bi(i.timing.p99Minutes)}`}),u.jsx(le,{label:"Tail Ratio (p90 / p50)",value:I?`${P.toFixed(2)}x`:"-",valueClassName:Qe(W)}),u.jsx(le,{label:"Timing Sample Size (30d)",value:i.timing.sampleSize30d})]})]})}),u.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Cost & Usage"}),J?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[u.jsx(le,{label:"Cost Model",value:"subscription"}),u.jsx(le,{label:"Today Tokens",value:`${Ta(i.usage.todayTotalTokens)} (${i.cost.todayRunCount} runs)`,valueClassName:Qe(S)}),u.jsx(le,{label:"Tokens (7d)",value:Ta(i.usage.tokens7d)}),u.jsx(le,{label:"Tokens (30d)",value:Ta(i.usage.tokens30d)}),u.jsx(le,{label:"Average Daily Tokens (7d)",value:Ta(i.usage.avgDailyTokens7d)}),u.jsx(le,{label:"Tokens Per Run (7d)",value:Ta(i.efficiency.avgTokensPerRun7d),valueClassName:Qe(j)}),u.jsx(le,{label:"Tokens Per Success (7d)",value:Ta(i.efficiency.avgTokensPerSuccess7d),valueClassName:Qe(T)}),u.jsx(le,{label:"Tokens Per Iteration (7d)",value:Ta(i.efficiency.avgTokensPerIteration7d)}),u.jsx(le,{label:"Est. Cost Today",value:`$${Ie(i.cost.todayCostUsd)}`,valueClassName:Qe(m)}),u.jsx(le,{label:"Est. Cost (7d)",value:`$${Ie(i.cost.cost7d)}`}),u.jsx(le,{label:"Usage Trend (7d)",value:k})]}),u.jsxs("div",{className:"mt-3 space-y-1",children:[i.usage.dailyHistory.length===0&&u.jsx("p",{className:"text-xs text-base-content/60",children:"No daily usage rows in the last 7 days."}),i.usage.dailyHistory.map(q=>u.jsxs("p",{className:"text-xs text-base-content/70",children:[q.date," ",Ta(q.totalTokens)," (",q.runCount,")"]},q.date))]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[u.jsx(le,{label:"Cost Model",value:"pay-per-use"}),u.jsx(le,{label:"Today",value:`$${Ie(i.cost.todayCostUsd)} (${i.cost.todayRunCount} runs)`,valueClassName:Qe(m)}),u.jsx(le,{label:"Cost (7d)",value:`$${Ie(i.cost.cost7d)}`}),u.jsx(le,{label:"Cost (30d)",value:`$${Ie(i.cost.cost30d)}`}),u.jsx(le,{label:"Average Daily Cost (7d)",value:`$${Ie(i.cost.avgDailyCost7d)}`}),u.jsx(le,{label:"Total Cost (7d)",value:`$${Ie(i.efficiency.totalCostUsd7d)}`}),u.jsx(le,{label:"Cost Per Run (7d)",value:`$${Ie(i.efficiency.avgCostPerRun7d)}`,valueClassName:Qe(y)}),u.jsx(le,{label:"Cost Per Success (7d)",value:`$${Ie(i.efficiency.avgCostPerSuccess7d)}`,valueClassName:Qe(x)}),u.jsx(le,{label:"Cost Per Iteration (7d)",value:`$${Ie(i.efficiency.avgCostPerIteration7d)}`}),u.jsx(le,{label:"Completed Per Dollar (7d)",value:i.efficiency.completedPerDollar7d.toFixed(2)}),u.jsx(le,{label:"Today Tokens",value:Ta(i.usage.todayTotalTokens),valueClassName:Qe(S)}),u.jsx(le,{label:"Tokens (7d)",value:Ta(i.usage.tokens7d)}),u.jsx(le,{label:"Cost Trend (7d)",value:Q})]}),u.jsxs("div",{className:"mt-3 space-y-1",children:[i.cost.dailyHistory.length===0&&u.jsx("p",{className:"text-xs text-base-content/60",children:"No daily cost rows in the last 7 days."}),i.cost.dailyHistory.map(q=>u.jsxs("p",{className:"text-xs text-base-content/70",children:[q.date," $",Ie(q.totalCostUsd)," (",q.runCount,")"]},q.date))]})]})]})})]}),u.jsxs("section",{className:"grid gap-5 xl:grid-cols-2",children:[u.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Agent Activity"}),u.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[u.jsx(le,{label:"Events Total",value:i.agents.eventsTotal}),u.jsx(le,{label:"Events (24h)",value:i.agents.events24h}),u.jsx(le,{label:"Events (7d)",value:i.agents.events7d}),u.jsx(le,{label:"Tool Calls (24h)",value:i.agents.toolCalls24h}),u.jsx(le,{label:"Thinking Events (24h)",value:i.agents.thinking24h}),u.jsx(le,{label:"Unique Runs (7d)",value:i.agents.uniqueRuns7d})]}),u.jsxs("div",{className:"mt-3 space-y-1",children:[u.jsx("p",{className:"text-xs uppercase tracking-wide text-base-content/60",children:"Role breakdown (7d)"}),i.agents.roleBreakdown7d.length===0&&u.jsx("p",{className:"text-xs text-base-content/60",children:"No agent activity in the last 7 days."}),i.agents.roleBreakdown7d.map(q=>u.jsxs("p",{className:"text-xs text-base-content/80",children:[q.role,": ",q.events," events, ",q.toolCalls," tool calls"]},q.role))]})]})}),u.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Reliability"}),u.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[u.jsx(le,{label:"Failures (7d)",value:i.reliability.failureCount7d,valueClassName:Qe(f)}),u.jsx(le,{label:"Failure Rate (7d)",value:`${i.reliability.failureRate7d.toFixed(1)}%`,valueClassName:Qe(f)}),u.jsx(le,{label:"Median Duration",value:bi(i.timing.p50Minutes)}),u.jsx(le,{label:"Tail Latency (p90 / p50)",value:I?`${P.toFixed(2)}x`:"-",valueClassName:Qe(W)})]}),u.jsxs("div",{className:"mt-3 space-y-1",children:[u.jsx("p",{className:"text-xs uppercase tracking-wide text-base-content/60",children:"Top error patterns (7d)"}),i.reliability.topErrorPatterns7d.length===0&&u.jsx("p",{className:"text-xs text-base-content/60",children:"None in the last 7 days."}),i.reliability.topErrorPatterns7d.map(q=>u.jsxs("p",{className:"text-xs text-base-content/80",children:[u.jsxs("span",{className:Qe(en(q.count,2,4)),children:[q.count,"x"]})," ",ea(q.pattern,120)]},`${q.pattern}-${q.count}`))]})]})})]}),u.jsxs("section",{className:"grid gap-5 xl:grid-cols-2",children:[u.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Resources"}),u.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[u.jsx(le,{label:"Active Leases",value:i.resources.activeLeases}),u.jsx(le,{label:"Leased Repositories",value:i.resources.leasedRepos}),u.jsx(le,{label:"Expiring Leases",value:i.resources.expiringLeases,valueClassName:Qe(E)}),u.jsx(le,{label:"Expired Leases",value:i.resources.expiredLeases,valueClassName:Qe(w)}),u.jsx(le,{label:"Active Worktrees",value:i.resources.activeWorktrees}),u.jsx(le,{label:"Missing Worktrees",value:i.resources.missingWorktrees,valueClassName:Qe(A)}),u.jsx(le,{label:"Stale Completed Worktrees",value:i.resources.staleWorktrees,valueClassName:Qe(K)})]})]})}),u.jsx("article",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Merge Queue"}),u.jsxs("div",{className:"mt-2 space-y-2 text-sm",children:[u.jsx(le,{label:"Active Batches",value:i.queue.activeBatches}),u.jsx(le,{label:"Batch Statuses",value:Np(i.queue.statuses)}),u.jsx(le,{label:"Active Phases",value:i.phaseCounts.length>0?i.phaseCounts.map(q=>`${q.phase}:${q.count}`).join(" | "):"-"})]})]})})]}),u.jsx("section",{className:"card border border-base-300/60 bg-base-200/60 shadow-panel backdrop-blur",children:u.jsxs("div",{className:"card-body p-4 sm:p-5",children:[u.jsx("h2",{className:"card-title text-lg",children:"Top Repositories (30d)"}),i.topRepos30d.length===0?u.jsx("p",{className:"mt-2 text-sm text-base-content/70",children:"No repository run history in the last 30 days."}):u.jsx("div",{className:"mt-3 grid gap-2",children:i.topRepos30d.map(q=>{const ie=q.completedRuns+q.blockedRuns+q.errorRuns,ee=ie>0?q.completedRuns/ie*100:0,ne=Qe(Rp(ee,80,60));return u.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/70 px-3 py-2 text-sm",children:[u.jsx("p",{className:"font-semibold text-base-content",children:ea(q.repo,96)}),u.jsxs("p",{className:"mt-1 text-xs text-base-content/80",children:["runs ",q.totalRuns," | completed ",q.completedRuns," | blocked ",q.blockedRuns," | error ",q.errorRuns]}),u.jsxs("p",{className:"mt-1 text-xs text-base-content/80",children:["success ",u.jsxs("span",{className:ne,children:[ee.toFixed(0),"%"]})," | ","cost $",Ie(q.totalCostUsd)," | ","avg iterations ",q.avgIterations.toFixed(1)]})]},q.repo)})})]})})]})}function Un({label:l,value:c,toneClass:i}){return u.jsxs("div",{className:"rounded-box border border-base-300/70 bg-base-100/70 px-3 py-2",children:[u.jsx("p",{className:"text-xs uppercase tracking-wide text-base-content/60",children:l}),u.jsx("p",{className:`mt-1 text-2xl font-semibold ${i??"text-base-content"}`,children:c})]})}function le({label:l,value:c,valueClassName:i}){return u.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-box border border-base-300/70 bg-base-100/70 px-3 py-2",children:[u.jsx("span",{className:"text-base-content/70",children:l}),u.jsx("span",{className:`text-right font-medium ${i??"text-base-content"}`,children:c})]})}function Np(l){return l.length===0?"-":l.map(c=>`${c.status}:${c.count}`).join(" | ")}function bi(l){if(l<=0)return"-";if(l<1)return`${Math.round(l*60)}s`;if(l<60)return`${l.toFixed(1)}m`;const c=Math.floor(l/60),i=Math.round(l%60);return`${c}h${String(i).padStart(2,"0")}m`}function Ta(l){return!Number.isFinite(l)||l<=0?"0":l>=1e9?`${(l/1e9).toFixed(2)}B`:l>=1e6?`${(l/1e6).toFixed(2)}M`:l>=1e3?`${(l/1e3).toFixed(1)}k`:String(Math.round(l))}function Rp(l,c,i){return l>=c?"success":l>=i?"warning":"error"}function cs(l,c,i){return l<=c?"success":l<=i?"warning":"error"}function en(l,c=1,i=3){return l<c?"success":l<i?"warning":"error"}function Tp(l,c,i,o){if(c<=0)return l<=0?"success":"warning";const f=l/c;return f<=i?"success":f<=o?"warning":"error"}function Qe(l){switch(l){case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return"text-base-content"}}function _p(l){if(l.length===0)return"-";const c=Math.max(...l,0);if(c<=0)return".".repeat(l.length);const i=".:-=+*#%@";return l.map(o=>{const f=Math.max(0,Math.min(1,o/c)),h=Math.round(f*(i.length-1));return i[h]??"."}).join("")}const Jo=[{id:"draining",label:"Draining running services"},{id:"pulling",label:"Pulling latest code"},{id:"building",label:"Installing and building"},{id:"restarting",label:"Restarting supervisor children"},{id:"health-checking",label:"Running health checks"}];function Cx(l){return l.replace(/-/g," ").replace(/\b\w/g,c=>c.toUpperCase())}function Ex(l,c){const i=Jo.findIndex(f=>f.id===c);if(i<0)return"pending";const o=Jo.findIndex(f=>f.id===l);return o<i?"done":o===i?"active":"pending"}function Mx({status:l,serverUnreachable:c=!1}){return u.jsx("div",{"data-theme":"black",style:{position:"fixed",inset:0,zIndex:9999,display:"grid",placeItems:"center",backgroundColor:"rgba(0, 0, 0, 0.78)",backdropFilter:"blur(4px)",padding:"1rem"},role:"dialog","aria-modal":"true","aria-label":"Self update in progress",children:u.jsxs("section",{className:"w-full max-w-xl rounded-box border border-base-300/80 bg-base-100/95 p-5 shadow-2xl",children:[u.jsx("h2",{className:"text-lg font-semibold",children:"Applying self-update"}),u.jsxs("p",{className:"mt-1 text-sm text-base-content/75",children:["Current stage: ",Cx(l.state)]}),u.jsxs("div",{className:"mt-3 flex items-center gap-3 text-sm text-base-content/80",children:[u.jsx("span",{className:"loading loading-spinner loading-md text-info"}),u.jsx("span",{children:"Update workflow is running and cannot be interrupted."})]}),u.jsx("ul",{className:"mt-4 space-y-2",children:Jo.map(i=>{const o=Ex(i.id,l.state),f=o==="active"?"badge-info":o==="done"?"badge-success":"badge-ghost",h=o==="active"?"live":o==="done"?"done":"pending";return u.jsxs("li",{className:"flex items-center justify-between gap-3 text-sm",children:[u.jsx("span",{className:o==="pending"?"text-base-content/65":void 0,children:i.label}),u.jsx("span",{className:`badge badge-sm ${f}`,children:h})]},i.id)})}),c&&u.jsx("div",{className:"mt-4 rounded border border-info/35 bg-info/10 p-2 text-xs text-info-content",children:"Server is restarting — status will refresh automatically when it comes back."}),l.state==="rolling-back"&&u.jsx("div",{className:"mt-4 rounded border border-warning/35 bg-warning/10 p-2 text-xs text-warning-content",children:"Health checks failed. Rolling back to the previous known-good build."}),u.jsx("p",{className:"mt-4 text-xs text-base-content/70",children:"Dashboard controls are temporarily blocked. This page refreshes automatically after a healthy restart."})]})})}function Ax(l){return tb.createPortal(u.jsx(Mx,{...l}),document.body)}function wx(l){if(!l||typeof l!="object")return null;const c=l.runId,i=l.events,o=l.lastEventId;return typeof c!="string"||!Array.isArray(i)||typeof o!="number"?null:{runId:c,events:i.filter(f=>!f||typeof f!="object"?!1:typeof f.id=="number"),lastEventId:o}}function Ox(l,c){const i=new Set(l.map(f=>f.id)),o=[...l];for(const f of c)i.has(f.id)||(i.add(f.id),o.push(f));return o.sort((f,h)=>f.id-h.id),o}function zx(l){if(!l||typeof l!="object")return null;const c=l.sessionId,i=l.status,o=l.events,f=l.lastEventId;return typeof c!="string"||i!=="idle"&&i!=="running"&&i!=="failed"&&i!=="closed"||!Array.isArray(o)||typeof f!="number"?null:{sessionId:c,status:i,events:o.filter(h=>!h||typeof h!="object"?!1:typeof h.id=="number"),lastEventId:f}}function Dx(l,c){const i=new Set(l.map(f=>f.id)),o=[...l];for(const f of c)i.has(f.id)||(i.add(f.id),o.push(f));return o.sort((f,h)=>f.id-h.id),o}const Lx="Start self-update now? This pulls latest code, rebuilds, and restarts Night-Orch services.";function Ux(l){return l(Lx)}const Bx=6e3;function Hx(l){return{startedAtMs:l,sawActiveState:!1}}function lr(){return{startedAtMs:null,sawActiveState:!1}}function sr(l){return l!=null&&l.state!=="idle"&&l.state!=="failed"}function kx(l){return sr(l)?l:null}function qx(l,c,i){return l.startedAtMs==null||l.sawActiveState?!0:c-l.startedAtMs>=i}function Yx(l,c,i,o){return sr(l)?{nextTransition:{startedAtMs:c.startedAtMs,sawActiveState:!0},nextStatus:l,errorMessage:null,shouldReload:!1}:qx(c,i,o)?l.state==="failed"?{nextTransition:lr(),nextStatus:l,errorMessage:`Update failed: ${l.error??"unknown error"}`,shouldReload:!1}:{nextTransition:lr(),nextStatus:l,errorMessage:null,shouldReload:l.state==="idle"}:{nextTransition:c,nextStatus:null,errorMessage:null,shouldReload:!1}}async function Gx(l){const c=await l.fetchUpdateStatus();if(!c)return l.transition;const i=Yx(c,l.transition,l.nowMs?l.nowMs():Date.now(),l.graceMs??Bx);return i.nextStatus&&l.onStatus(i.nextStatus),i.errorMessage&&l.onError(i.errorMessage),i.shouldReload&&l.onReload(),i.nextTransition}const Cp="x-night-orch-intent",Ep="mutate",Mp="x-night-orch-web-token",Vx="0.3.2",Qx="f26d9309bb588ac9ffefe87fe5791bebda1d4ee2";function Ap(l){if(!l)return null;try{return decodeURIComponent(l)}catch{return l}}function Wc({activePage:l,issueDetailRunId:c=null,projectDetailRepo:i=null}){const o=af(),[f,h]=D.useState(null),[g,v]=D.useState(null),[p,m]=D.useState(null),[S,y]=D.useState(!0),[x,j]=D.useState(!0),[T,E]=D.useState(!0),[w,A]=D.useState(!1),[K,J]=D.useState("all"),[I,P]=D.useState(""),[W,Q]=D.useState([]),[k,q]=D.useState(null),[ie,ee]=D.useState(!1),[ne,ge]=D.useState(""),[Ge,Re]=D.useState(null),[B,$]=D.useState([]),[se,Te]=D.useState(""),[ve,R]=D.useState({agent:"codex",profileName:""}),[Y,X]=D.useState(null),[F,re]=D.useState(null),[oe,pe]=D.useState(null),[Ze,De]=D.useState(!1),[dt,aa]=D.useState(null),[na,Vn]=D.useState(!0),[zt,Ca]=D.useState({}),[ha,ma]=D.useState(""),[st,Dt]=D.useState({repo:"",issueNumber:"",amount:""}),[la,pa]=D.useState(""),[Qn,vl]=D.useState(""),[he,ot]=D.useState(!1),[Nt,yl]=D.useState(!1),[ba,hs]=D.useState(""),[xl,hr]=D.useState(""),[Xn,Ea]=D.useState(""),[ht,ga]=D.useState(""),[it,ms]=D.useState(""),[Zn,ps]=D.useState(""),[nn,Sl]=D.useState(""),[ln,Ma]=D.useState(!1),[sa,ia]=D.useState(null),ca=D.useRef(null),jl=D.useRef(null),Kn=D.useRef(""),Aa=D.useRef(""),bs=D.useRef(""),Nl=D.useRef(""),va=D.useRef(lr()),et=f?.config.repos??[],wa=f?.runs.runs??[],sn=f?.stats.overview.runningRuns??0,Rl=f?.stats.overview.queuedRuns??0,Oa=sr(sa),ya=D.useMemo(()=>K==="all"?wa:wa.filter(_=>_.repo===K),[wa,K]),ke=D.useMemo(()=>Ap(c),[c]),mt=D.useMemo(()=>Ap(i),[i]),xa=D.useMemo(()=>ke?wa.find(_=>_.runId===ke)??null:null,[wa,ke]),ra=xa?.hasRun?xa.runId:"",Ci=D.useMemo(()=>Oa?{label:`updating ${sa?.state??"starting"}`,toneClass:"badge-warning"}:w?sn>0?{label:"processing",toneClass:"badge-success"}:Rl>0?{label:"queued",toneClass:"badge-info"}:{label:"idle",toneClass:"badge-neutral"}:{label:"reconnecting",toneClass:"badge-error"},[Rl,sn,w,Oa,sa?.state]),cn=D.useCallback(async()=>{const _=await fetch("/api/dashboard");if(!_.ok)throw new Error(`Failed to load dashboard (${_.status})`);const Z=await _.json();h(Z)},[]),za=D.useCallback(async()=>{const _=await fetch("/api/update-status");return _.ok?await _.json():null},[]),rn=D.useCallback(async()=>{const _=await fetch("/api/session");if(!_.ok)throw new Error(`Failed to initialize web session (${_.status})`);const Z=await _.json();if(!Z.mutationToken)throw new Error("Missing mutation token in session response");aa(Z.mutationToken),Vn(Z.operationsEnabled??!0)},[]),un=D.useCallback(async()=>{const _=await fetch("/api/projects");if(!_.ok)throw new Error(`Failed to load projects (${_.status})`);const Z=await _.json();v(Z)},[]),Lt=D.useCallback(async()=>{const _=await fetch("/api/settings");if(!_.ok)throw new Error(`Failed to load settings (${_.status})`);const Z=await _.json();m(Z),Ca(Object.fromEntries(Z.settings.map(_e=>[_e.key,String(_e.effectiveValue)])))},[]),xt=D.useCallback(async()=>{const _=await fetch("/api/agent/sessions");if(!_.ok)throw new Error(`Failed to load agent sessions (${_.status})`);const Z=await _.json();q(Z)},[]),Qt=D.useCallback(async _=>{if(!_){Re(null);return}const Z=await fetch(`/api/agent/sessions/${encodeURIComponent(_)}`);if(Z.status===404){Re(null);return}if(!Z.ok)throw new Error(`Failed to load agent session (${Z.status})`);const _e=await Z.json();if(!_e.session)throw new Error("Malformed agent session response");Re(_e.session)},[]);D.useEffect(()=>{(async()=>{try{y(!0),j(!0),E(!0),await Promise.all([cn(),rn(),un(),Lt()])}catch(_){X(_.message)}finally{y(!1),j(!1),E(!1)}})()},[cn,un,rn,Lt]),D.useEffect(()=>{let _=!1;return(async()=>{try{const Z=await za();if(!Z||_)return;sr(Z)?va.current={startedAtMs:null,sawActiveState:!0}:va.current=lr(),ia(Z)}catch{}})(),()=>{_=!0}},[za]),D.useEffect(()=>{if(et.length===0){pa(""),hs(""),Ea(""),ms(""),ps("");return}pa(_=>_&&et.includes(_)?_:et[0]??""),hs(_=>_&&et.includes(_)?_:et[0]??""),Ea(_=>_&&et.includes(_)?_:et[0]??""),ms(_=>_&&et.includes(_)?_:et[0]??""),ps(_=>_&&et.includes(_)?_:et[0]??""),J(_=>_==="all"||et.includes(_)?_:"all")},[et]),D.useEffect(()=>{ke&&P(ke)},[ke]),D.useEffect(()=>{if(l!=="agent")return;let _=!1;return ee(!0),X(null),(async()=>{try{await xt()}catch(Z){_||X(Z.message)}finally{_||ee(!1)}})(),()=>{_=!0}},[l,xt]),D.useEffect(()=>{if(l!=="agent")return;const _=k?.sessions??[];ge(Z=>Z&&_.some(_e=>_e.id===Z)?Z:_[0]?.id??"")},[l,k]),D.useEffect(()=>{if(l!=="agent")return;let _=!1;return(async()=>{try{await Qt(ne)}catch(Z){_||X(Z.message)}})(),()=>{_=!0}},[l,Qt,ne]),D.useEffect(()=>{let _=!1;const Z=()=>{const _e=window.location.protocol==="https:"?"wss":"ws",ct=new WebSocket(`${_e}://${window.location.host}/ws`);ca.current=ct,ct.onopen=()=>{if(_)return;A(!0),ct.send(JSON.stringify({type:"refresh"}));const we=Kn.current;we&&ct.send(JSON.stringify({type:"subscribe-run-events",runId:we,since:0}));const de=Aa.current;de&&ct.send(JSON.stringify({type:"subscribe-agent-session-events",sessionId:de,since:0}))},ct.onmessage=we=>{try{const de=JSON.parse(we.data);if(de.type==="snapshot"&&de.payload){h(de.payload);return}if(de.type==="run-events"&&de.payload){const Fe=wx(de.payload);if(!Fe||Fe.runId!==Kn.current)return;Q(rt=>Ox(rt,Fe.events));return}if(de.type==="agent-session-events"&&de.payload){const Fe=zx(de.payload);if(!Fe||(q(rt=>rt&&{...rt,sessions:rt.sessions.map(Xt=>Xt.id===Fe.sessionId?{...Xt,status:Fe.status}:Xt)}),Fe.sessionId!==Aa.current))return;$(rt=>Dx(rt,Fe.events)),Re(rt=>rt&&rt.id===Fe.sessionId?{...rt,status:Fe.status}:rt);return}de.type==="error"&&de.error&&re(de.error)}catch{}},ct.onclose=()=>{ca.current===ct&&(ca.current=null),A(!1),!_&&(jl.current=window.setTimeout(Z,2e3))},ct.onerror=()=>{ct.close()}};return Z(),()=>{_=!0,jl.current!==null&&window.clearTimeout(jl.current),ca.current?.close(),ca.current=null}},[]),D.useEffect(()=>{Kn.current=ra,Q([]);const _=ca.current;if(!_||_.readyState!==WebSocket.OPEN){bs.current=ra;return}const Z=bs.current;Z&&Z!==ra&&_.send(JSON.stringify({type:"unsubscribe-run-events",runId:Z})),ra&&_.send(JSON.stringify({type:"subscribe-run-events",runId:ra,since:0})),bs.current=ra},[ra,w]),D.useEffect(()=>{Aa.current=ne,$([]);const _=ca.current;if(!_||_.readyState!==WebSocket.OPEN){Nl.current=ne;return}const Z=Nl.current;Z&&Z!==ne&&_.send(JSON.stringify({type:"unsubscribe-agent-session-events",sessionId:Z})),ne&&_.send(JSON.stringify({type:"subscribe-agent-session-events",sessionId:ne,since:0})),Nl.current=ne},[ne,w]);const[on,Ke]=D.useState(!1);D.useEffect(()=>{if(!Oa)return;let _=!1,Z=0;const _e=async()=>{try{const we=await Gx({fetchUpdateStatus:za,transition:va.current,onStatus:de=>{_||(Z=0,Ke(!1),ia(de))},onError:de=>{_||(Z=0,Ke(!1),X(de))},onReload:()=>{_||window.location.reload()}});_||(va.current=we)}catch{Z++,!_&&Z>=2&&(Ke(!0),ia(we=>{if(!we)return we;const de=Z*2;return de>=12&&we.state==="draining"?{...we,state:"restarting"}:de>=8&&we.state==="draining"?{...we,state:"building"}:de>=4&&we.state==="draining"?{...we,state:"pulling"}:we}))}};_e();const ct=window.setInterval(()=>{_e()},2e3);return()=>{_=!0,window.clearInterval(ct)}},[za,Oa]);const Ce=D.useCallback(async(_,Z,_e,ct,we)=>{try{if(pe(_),X(null),!dt)throw new Error("Web session is not initialized yet. Refresh the page and try again.");if(!na)throw new Error("Web operations are disabled by server policy.");const de=await fetch(Z,{method:"POST",headers:{"Content-Type":"application/json",[Cp]:Ep,[Mp]:dt},body:JSON.stringify(_e)}),Fe=await de.json();if(!de.ok){const Xt=typeof Fe.error=="string"?Fe.error:`Operation failed (${de.status})`;throw new Error(Xt)}const rt=gy(Fe)??ct;return re(rt),(we?.refreshAfterSuccess??!0)&&await Promise.all([cn(),Lt()]),!0}catch(de){return X(de.message),!1}finally{pe(null)}},[cn,Lt,na,dt]),Da=D.useCallback(async(_,Z,_e,ct="POST")=>{try{if(pe(_),X(null),!dt)throw new Error("Web session is not initialized yet. Refresh the page and try again.");const we=await fetch(Z,{method:ct,headers:{"Content-Type":"application/json",[Cp]:Ep,[Mp]:dt},body:ct==="DELETE"?void 0:JSON.stringify(_e)}),de=await we.json();if(!we.ok){const Fe=typeof de.error=="string"?de.error:`Operation failed (${we.status})`;throw new Error(Fe)}return de}catch(we){return X(we.message),null}finally{pe(null)}},[dt]),La=D.useCallback(async()=>{try{De(!0),X(null);const _=[cn(),un(),Lt()];l==="agent"&&_.push(xt()),await Promise.all(_),ca.current?.readyState===WebSocket.OPEN&&ca.current.send(JSON.stringify({type:"refresh"}))}catch(_){X(_.message)}finally{De(!1)}},[l,xt,cn,un,Lt]),Ua=D.useCallback(()=>{Ce("poll","/api/operations/poll",{},"Manual poll requested")},[Ce]),Ei=D.useCallback(()=>{Ce("sync","/api/operations/sync",{},"Sync completed")},[Ce]),Mi=D.useCallback(()=>{Ce("cleanup","/api/operations/cleanup",{},"Cleanup completed")},[Ce]),gs=D.useCallback(_=>{o({to:"/$page",params:{page:_}})},[o]),mr=D.useCallback(_=>{P(_),o({to:"/$page/$detailId",params:{page:"issues",detailId:_}})},[o]),Tl=D.useCallback(()=>{o({to:"/$page",params:{page:"issues"}})},[o]),_l=D.useCallback(_=>{o({to:"/$page/$detailId",params:{page:"projects",detailId:_}})},[o]),ua=D.useCallback(()=>{o({to:"/$page",params:{page:"projects"}})},[o]),Rt=D.useCallback(async()=>{if(!(!Ux(Z=>window.confirm(Z))||!await Ce("update","/api/operations/update",{},"Update initiated - pulling and rebuilding...",{refreshAfterSuccess:!1}))){va.current=Hx(Date.now()),ia({state:"draining"});try{const Z=await za();if(!Z)return;const _e=kx(Z);_e&&(va.current={startedAtMs:va.current.startedAtMs,sawActiveState:!0},ia(_e))}catch{}}},[za,Ce]),Ai=D.useCallback(async _=>{_.preventDefault();const Z=Number.parseInt(Qn,10);if(!la||!Number.isFinite(Z)||Z<=0){X("Retry requires a repo and a positive issue number");return}await Ce("retry","/api/operations/retry",{repo:la,issueNumber:Z,resetPlan:he,fresh:Nt},`Retry queued for ${la}#${Z}`)},[Nt,Qn,la,he,Ce]),pr=D.useCallback(async _=>{_.preventDefault();const Z=Number.parseInt(xl,10);if(!ba||!Number.isFinite(Z)||Z<=0){X("Rebase requires a repo and a positive issue number");return}await Ce("rebase","/api/operations/rebase",{repo:ba,issueNumber:Z},`Rebase queued for ${ba}#${Z}`)},[xl,ba,Ce]),vs=D.useCallback(async _=>{_.preventDefault();const Z=Number.parseInt(nn,10);if(!Zn||!Number.isFinite(Z)||Z<=0){X("Delete entry requires a repo and a positive issue number");return}await Ce("delete-entry","/api/operations/delete-entry",{repo:Zn,issueNumber:Z,force:ln},`Deleted local entry for ${Zn}#${Z}`)},[ln,nn,Zn,Ce]),wi=D.useCallback(async _=>{if(_.preventDefault(),!it){X("Labels init requires a repo");return}await Ce("labels-init","/api/operations/labels-init",{repo:it},`Labels initialized for ${it}`)},[it,Ce]),Cl=D.useCallback(async _=>{_.preventDefault();const Z=Number.parseInt(ht,10);if(!Xn||!Number.isFinite(Z)||Z<=0){X("Continue requires a repo and a positive issue number");return}await Ce("continue","/api/operations/continue",{repo:Xn,issueNumber:Z},`Continue pass queued for ${Xn}#${Z}`)},[ht,Xn,Ce]),br=D.useCallback(async _=>{const Z=zt[_];if(Z===void 0){X(`No draft value found for ${_}`);return}await Ce(`setting:set:${_}`,"/api/operations/settings/set",{key:_,value:Z},`Updated ${_}`)},[Ce,zt]),Tt=D.useCallback(async _=>{await Ce(`setting:clear:${_}`,"/api/operations/settings/clear",{key:_},`Cleared override for ${_}`)},[Ce]),ys=D.useCallback(async _=>{_.preventDefault();const Z=Number.parseFloat(ha);if(!Number.isFinite(Z)||Z<=0){X("Daily override requires a positive number (USD)");return}await Ce("daily-cost-override:set","/api/operations/daily-cost-override/set",{amountUsd:Z},`Raised today's daily cap to $${Z.toFixed(2)}`)},[ha,Ce]),Oi=D.useCallback(async()=>{await Ce("daily-cost-override:clear","/api/operations/daily-cost-override/clear",{},"Cleared today's daily cap override")},[Ce]),xs=D.useCallback(async _=>{_.preventDefault();const Z=Number.parseInt(st.issueNumber,10),_e=Number.parseFloat(st.amount);if(!st.repo||!Number.isFinite(Z)||Z<=0){X("Per-issue override requires a repo and a positive issue number");return}if(!Number.isFinite(_e)||_e<=0){X("Per-issue override requires a positive amount (USD)");return}await Ce("cost-override:set","/api/operations/cost-override/set",{repo:st.repo,issueNumber:Z,amountUsd:_e},`Set cost override for ${st.repo}#${Z} to $${_e.toFixed(2)}`)},[st,Ce]),fn=D.useCallback(async()=>{const _=Number.parseInt(st.issueNumber,10);if(!st.repo||!Number.isFinite(_)||_<=0){X("Clearing a per-issue override requires a repo and a positive issue number");return}await Ce("cost-override:clear","/api/operations/cost-override/clear",{repo:st.repo,issueNumber:_},`Cleared cost override for ${st.repo}#${_}`)},[st,Ce]),zi=D.useCallback(async _=>{_.preventDefault();const Z=await Da("agent:create-session","/api/agent/sessions",{agent:ve.agent,profileName:ve.profileName||void 0});if(!Z)return;const _e=Z.session;await xt(),_e?.id&&(ge(_e.id),Re(_e),$([]),re(`Created ${_e.agent} session`))},[ve.agent,ve.profileName,xt,Da]),Di=D.useCallback(async _=>{if(_.preventDefault(),!ne){X("Select a session before sending a prompt");return}const Z=se.trim();if(!Z){X("Prompt cannot be empty");return}await Da("agent:send-prompt",`/api/agent/sessions/${encodeURIComponent(ne)}/messages`,{prompt:Z})&&(Te(""),re("Prompt sent"),await Qt(ne))},[se,Qt,Da,ne]),dn=D.useCallback(async()=>{!ne||!await Da("agent:close-session",`/api/agent/sessions/${encodeURIComponent(ne)}`,{},"DELETE")||(await xt(),await Qt(ne),re("Session closed"))},[Qt,xt,Da,ne]),gr=l==="issues"&&ke!==null,Li=l==="projects"&&mt!==null;return u.jsxs("main",{"data-theme":"black",className:"min-h-screen bg-orch-admin",children:[u.jsx(_y,{currentStateLabel:Ci.label,currentStateToneClass:Ci.toneClass,isWorking:sn>0||oe!==null||Oa,socketConnected:w,lastRefreshAt:f?.generatedAt??null,pollIntervalSeconds:f?.config.pollIntervalSeconds??null,reposCount:et.length,activeRuns:f?.status.activeRuns??0,runningRuns:sn,queuedRuns:Rl,frontendVersion:Vx,frontendGitSha:Qx,backendVersion:f?.build?.version??"unknown",backendGitSha:f?.build?.gitSha??null,operationsEnabled:na,activeOperation:oe,isRefreshing:Ze,onRefresh:()=>{La()},onPoll:Ua,onSync:Ei,onGoToSettings:()=>{gs("settings")}}),u.jsxs("div",{className:"mx-auto flex w-full max-w-[1550px] flex-col gap-5 px-4 pb-24 pt-5 sm:px-6 md:pb-6 lg:px-8",children:[Y&&u.jsx("div",{className:"alert alert-error shadow-sm",children:u.jsx("span",{children:Y})}),F&&u.jsx("div",{className:"alert alert-info shadow-sm",children:u.jsx("span",{children:F})}),u.jsxs("div",{className:"grid gap-5 md:grid-cols-[auto_minmax(0,1fr)] md:items-stretch md:gap-0",children:[u.jsx(Dy,{activePage:l,onPageChange:gs}),u.jsxs("div",{className:"flex min-w-0 flex-col gap-5 md:pl-6",children:[l==="issues"&&(gr?u.jsx(Yy,{run:xa,runId:ke??"",runEvents:W,onBack:Tl}):u.jsxs("div",{className:"flex flex-col gap-5",children:[u.jsx(Ko,{snapshot:f}),u.jsxs("section",{className:"grid gap-5 xl:grid-cols-[1.65fr_1fr]",children:[u.jsx(dx,{isLoading:S,repos:et,selectedRepo:K,onSelectedRepoChange:J,filteredRuns:ya,selectedRunId:I,onOpenRun:mr,statusTone:ax}),u.jsx(Vy,{operationsEnabled:na,activeOperation:oe,updateStatus:sa,repos:et,retryForm:{repo:la,issueNumber:Qn,resetPlan:he,fresh:Nt},rebaseForm:{repo:ba,issueNumber:xl},continueForm:{repo:Xn,issueNumber:ht},deleteEntryForm:{repo:Zn,issueNumber:nn,force:ln},labelsInitForm:{repo:it},onRetryFormChange:_=>{_.repo!==void 0&&pa(_.repo),_.issueNumber!==void 0&&vl(_.issueNumber),_.resetPlan!==void 0&&ot(_.resetPlan),_.fresh!==void 0&&yl(_.fresh)},onRebaseFormChange:_=>{_.repo!==void 0&&hs(_.repo),_.issueNumber!==void 0&&hr(_.issueNumber)},onContinueFormChange:_=>{_.repo!==void 0&&Ea(_.repo),_.issueNumber!==void 0&&ga(_.issueNumber)},onDeleteEntryFormChange:_=>{_.repo!==void 0&&ps(_.repo),_.issueNumber!==void 0&&Sl(_.issueNumber),_.force!==void 0&&Ma(_.force)},onLabelsInitFormChange:_=>{_.repo!==void 0&&ms(_.repo)},onPoll:Ua,onSync:Ei,onCleanup:Mi,onLabelsInitSubmit:_=>{wi(_)},onRetrySubmit:_=>{Ai(_)},onRebaseSubmit:_=>{pr(_)},onContinueSubmit:_=>{Cl(_)},onDeleteEntrySubmit:_=>{vs(_)},onUpdate:()=>{Rt()}})]})]})),l==="stats"&&u.jsx(_x,{snapshot:f,socketConnected:w}),l==="projects"&&(Li?u.jsx(Wy,{snapshot:g,repo:mt??"",isLoading:x,onBack:ua}):u.jsx(tx,{snapshot:g,isLoading:x,onOpenRepo:_l})),l==="agent"&&u.jsx(Sy,{snapshot:k,selectedSessionId:ne,selectedSession:Ge,events:B,promptDraft:se,createDraft:ve,isLoading:ie,isMutating:oe!==null,onSelectSession:_=>{ge(_)},onCreateDraftChange:_=>{R(Z=>({...Z,..._}))},onPromptDraftChange:Te,onCreateSession:_=>{zi(_)},onSendPrompt:_=>{Di(_)},onCloseSession:()=>{dn()}}),l==="settings"&&u.jsxs("div",{className:"flex flex-col gap-5",children:[u.jsx(xy,{baseDailyBudgetUsd:f?.cost.dailyBudgetUsd??0,dailyBudgetOverrideUsd:f?.cost.dailyBudgetOverrideUsd??null,effectiveDailyBudgetUsd:f?.cost.effectiveDailyBudgetUsd??f?.cost.dailyBudgetUsd??0,todayCostUsd:f?.status.dailyCostUsd??0,activeOperation:oe,dailyDraft:ha,onDailyDraftChange:ma,onDailySubmit:_=>{ys(_)},onDailyClear:()=>{Oi()},issueDraft:st,repos:et,onIssueDraftChange:_=>{Dt(Z=>({...Z,..._}))},onIssueSubmit:_=>{xs(_)},onIssueClear:()=>{fn()}}),u.jsx(Nx,{settings:p?.settings??[],generatedAt:p?.generatedAt??null,isLoading:T,activeOperation:oe,drafts:zt,onDraftChange:(_,Z)=>{Ca(_e=>({..._e,[_]:Z}))},onApply:_=>{br(_)},onClear:_=>{Tt(_)}})]})]})]}),u.jsx("div",{className:"flex justify-center pb-16 pt-1 md:pb-2",children:u.jsx("button",{type:"button",className:"btn btn-outline btn-sm border-primary/55 bg-base-200/45 text-primary hover:bg-primary/15",onClick:()=>{window.location.reload()},children:"UI reload"})})]}),Oa&&sa&&u.jsx(Ax,{status:sa,serverUnreachable:on})]})}const Xx=["issues","stats","projects","agent","settings"];function rb(l){return Xx.some(c=>c===l)}function Zx(){return u.jsx(sb,{})}function Kx(){const{page:l}=ur({from:"/$page"});return u.jsx(Wc,{activePage:l})}function Jx(){const{page:l,detailId:c}=ur({from:"/$page/$detailId"});return l==="issues"?u.jsx(Wc,{activePage:"issues",issueDetailRunId:c}):l==="projects"?u.jsx(Wc,{activePage:"projects",projectDetailRepo:c}):u.jsx(Wc,{activePage:l})}const dr=Fv({component:Zx}),$x=nf({getParentRoute:()=>dr,path:"/",loader:()=>Si({to:"/$page",params:{page:"issues"},replace:!0,throw:!0}),component:()=>null}),Ix=nf({getParentRoute:()=>dr,path:"$page",loader:({params:l})=>{if(!rb(l.page))return Si({to:"/$page",params:{page:"issues"},replace:!0,throw:!0})},component:Kx}),Fx=nf({getParentRoute:()=>dr,path:"$page/$detailId",loader:({params:l})=>{if(!rb(l.page))return Si({to:"/$page",params:{page:"issues"},replace:!0,throw:!0});if(l.page!=="issues"&&l.page!=="projects")return Si({to:"/$page",params:{page:l.page},replace:!0,throw:!0})},component:Jx}),Px=dr.addChildren([$x,Ix,Fx]);function Wx(){return typeof window>"u"?fv({initialEntries:["/issues"]}):Vp()}function e1(l={}){return ry({routeTree:Px,history:l.history??Wx(),isServer:l.isServer})}const t1=e1(),ub=document.getElementById("root");if(!ub)throw new Error("Root container not found");S0.createRoot(ub).render(u.jsx(os.StrictMode,{children:u.jsx(fy,{router:t1})}));"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js").catch(()=>{})});
|