@agent-plan/server 0.2.9 → 0.2.11

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.
@@ -0,0 +1,191 @@
1
+ function Ey(n,i){for(var s=0;s<i.length;s++){const o=i[s];if(typeof o!="string"&&!Array.isArray(o)){for(const f in o)if(f!=="default"&&!(f in n)){const d=Object.getOwnPropertyDescriptor(o,f);d&&Object.defineProperty(n,f,d.get?d:{enumerable:!0,get:()=>o[f]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))o(f);new MutationObserver(f=>{for(const d of f)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function s(f){const d={};return f.integrity&&(d.integrity=f.integrity),f.referrerPolicy&&(d.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?d.credentials="include":f.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(f){if(f.ep)return;f.ep=!0;const d=s(f);fetch(f.href,d)}})();function Ry(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ko={exports:{}},Rr={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Rp;function Ty(){if(Rp)return Rr;Rp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(o,f,d){var h=null;if(d!==void 0&&(h=""+d),f.key!==void 0&&(h=""+f.key),"key"in f){d={};for(var v in f)v!=="key"&&(d[v]=f[v])}else d=f;return f=d.ref,{$$typeof:n,type:o,key:h,ref:f!==void 0?f:null,props:d}}return Rr.Fragment=i,Rr.jsx=s,Rr.jsxs=s,Rr}var Tp;function Dy(){return Tp||(Tp=1,Ko.exports=Ty()),Ko.exports}var c=Dy(),Fo={exports:{}},we={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Dp;function Cy(){if(Dp)return we;Dp=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),j=Symbol.iterator;function N(R){return R===null||typeof R!="object"?null:(R=j&&R[j]||R["@@iterator"],typeof R=="function"?R:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B=Object.assign,k={};function Z(R,q,K){this.props=R,this.context=q,this.refs=k,this.updater=K||A}Z.prototype.isReactComponent={},Z.prototype.setState=function(R,q){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,q,"setState")},Z.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function F(){}F.prototype=Z.prototype;function W(R,q,K){this.props=R,this.context=q,this.refs=k,this.updater=K||A}var ee=W.prototype=new F;ee.constructor=W,B(ee,Z.prototype),ee.isPureReactComponent=!0;var re=Array.isArray;function se(){}var le={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function Re(R,q,K){var J=K.ref;return{$$typeof:n,type:R,key:q,ref:J!==void 0?J:null,props:K}}function xe(R,q){return Re(R.type,q,R.props)}function Ke(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function pe(R){var q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(K){return q[K]})}var st=/\/+/g;function Te(R,q){return typeof R=="object"&&R!==null&&R.key!=null?pe(""+R.key):q.toString(36)}function ke(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(se,se):(R.status="pending",R.then(function(q){R.status==="pending"&&(R.status="fulfilled",R.value=q)},function(q){R.status==="pending"&&(R.status="rejected",R.reason=q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function H(R,q,K,J,he){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var Se=!1;if(R===null)Se=!0;else switch(fe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(R.$$typeof){case n:case i:Se=!0;break;case b:return Se=R._init,H(Se(R._payload),q,K,J,he)}}if(Se)return he=he(R),Se=J===""?"."+Te(R,0):J,re(he)?(K="",Se!=null&&(K=Se.replace(st,"$&/")+"/"),H(he,q,K,"",function(nl){return nl})):he!=null&&(Ke(he)&&(he=xe(he,K+(he.key==null||R&&R.key===he.key?"":(""+he.key).replace(st,"$&/")+"/")+Se)),q.push(he)),1;Se=0;var We=J===""?".":J+":";if(re(R))for(var Qe=0;Qe<R.length;Qe++)J=R[Qe],fe=We+Te(J,Qe),Se+=H(J,q,K,fe,he);else if(Qe=N(R),typeof Qe=="function")for(R=Qe.call(R),Qe=0;!(J=R.next()).done;)J=J.value,fe=We+Te(J,Qe++),Se+=H(J,q,K,fe,he);else if(fe==="object"){if(typeof R.then=="function")return H(ke(R),q,K,J,he);throw q=String(R),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Se}function X(R,q,K){if(R==null)return R;var J=[],he=0;return H(R,J,"","",function(fe){return q.call(K,fe,he++)}),J}function te(R){if(R._status===-1){var q=R._result;q=q(),q.then(function(K){(R._status===0||R._status===-1)&&(R._status=1,R._result=K)},function(K){(R._status===0||R._status===-1)&&(R._status=2,R._result=K)}),R._status===-1&&(R._status=0,R._result=q)}if(R._status===1)return R._result.default;throw R._result}var me=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},be={map:X,forEach:function(R,q,K){X(R,function(){q.apply(this,arguments)},K)},count:function(R){var q=0;return X(R,function(){q++}),q},toArray:function(R){return X(R,function(q){return q})||[]},only:function(R){if(!Ke(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return we.Activity=y,we.Children=be,we.Component=Z,we.Fragment=s,we.Profiler=f,we.PureComponent=W,we.StrictMode=o,we.Suspense=x,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=le,we.__COMPILER_RUNTIME={__proto__:null,c:function(R){return le.H.useMemoCache(R)}},we.cache=function(R){return function(){return R.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(R,q,K){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var J=B({},R.props),he=R.key;if(q!=null)for(fe in q.key!==void 0&&(he=""+q.key),q)!M.call(q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&q.ref===void 0||(J[fe]=q[fe]);var fe=arguments.length-2;if(fe===1)J.children=K;else if(1<fe){for(var Se=Array(fe),We=0;We<fe;We++)Se[We]=arguments[We+2];J.children=Se}return Re(R.type,he,J)},we.createContext=function(R){return R={$$typeof:h,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:d,_context:R},R},we.createElement=function(R,q,K){var J,he={},fe=null;if(q!=null)for(J in q.key!==void 0&&(fe=""+q.key),q)M.call(q,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(he[J]=q[J]);var Se=arguments.length-2;if(Se===1)he.children=K;else if(1<Se){for(var We=Array(Se),Qe=0;Qe<Se;Qe++)We[Qe]=arguments[Qe+2];he.children=We}if(R&&R.defaultProps)for(J in Se=R.defaultProps,Se)he[J]===void 0&&(he[J]=Se[J]);return Re(R,fe,he)},we.createRef=function(){return{current:null}},we.forwardRef=function(R){return{$$typeof:v,render:R}},we.isValidElement=Ke,we.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:te}},we.memo=function(R,q){return{$$typeof:p,type:R,compare:q===void 0?null:q}},we.startTransition=function(R){var q=le.T,K={};le.T=K;try{var J=R(),he=le.S;he!==null&&he(K,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(se,me)}catch(fe){me(fe)}finally{q!==null&&K.types!==null&&(q.types=K.types),le.T=q}},we.unstable_useCacheRefresh=function(){return le.H.useCacheRefresh()},we.use=function(R){return le.H.use(R)},we.useActionState=function(R,q,K){return le.H.useActionState(R,q,K)},we.useCallback=function(R,q){return le.H.useCallback(R,q)},we.useContext=function(R){return le.H.useContext(R)},we.useDebugValue=function(){},we.useDeferredValue=function(R,q){return le.H.useDeferredValue(R,q)},we.useEffect=function(R,q){return le.H.useEffect(R,q)},we.useEffectEvent=function(R){return le.H.useEffectEvent(R)},we.useId=function(){return le.H.useId()},we.useImperativeHandle=function(R,q,K){return le.H.useImperativeHandle(R,q,K)},we.useInsertionEffect=function(R,q){return le.H.useInsertionEffect(R,q)},we.useLayoutEffect=function(R,q){return le.H.useLayoutEffect(R,q)},we.useMemo=function(R,q){return le.H.useMemo(R,q)},we.useOptimistic=function(R,q){return le.H.useOptimistic(R,q)},we.useReducer=function(R,q,K){return le.H.useReducer(R,q,K)},we.useRef=function(R){return le.H.useRef(R)},we.useState=function(R){return le.H.useState(R)},we.useSyncExternalStore=function(R,q,K){return le.H.useSyncExternalStore(R,q,K)},we.useTransition=function(){return le.H.useTransition()},we.version="19.2.7",we}var Cp;function gf(){return Cp||(Cp=1,Fo.exports=Cy()),Fo.exports}var S=gf();const My=Ry(S),Ay=Ey({__proto__:null,default:My},[S]);var Jo={exports:{}},Tr={},Wo={exports:{}},Io={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Mp;function zy(){return Mp||(Mp=1,(function(n){function i(H,X){var te=H.length;H.push(X);e:for(;0<te;){var me=te-1>>>1,be=H[me];if(0<f(be,X))H[me]=X,H[te]=be,te=me;else break e}}function s(H){return H.length===0?null:H[0]}function o(H){if(H.length===0)return null;var X=H[0],te=H.pop();if(te!==X){H[0]=te;e:for(var me=0,be=H.length,R=be>>>1;me<R;){var q=2*(me+1)-1,K=H[q],J=q+1,he=H[J];if(0>f(K,te))J<be&&0>f(he,K)?(H[me]=he,H[J]=te,me=J):(H[me]=K,H[q]=te,me=q);else if(J<be&&0>f(he,te))H[me]=he,H[J]=te,me=J;else break e}}return X}function f(H,X){var te=H.sortIndex-X.sortIndex;return te!==0?te:H.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,v=h.now();n.unstable_now=function(){return h.now()-v}}var x=[],p=[],b=1,y=null,j=3,N=!1,A=!1,B=!1,k=!1,Z=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function ee(H){for(var X=s(p);X!==null;){if(X.callback===null)o(p);else if(X.startTime<=H)o(p),X.sortIndex=X.expirationTime,i(x,X);else break;X=s(p)}}function re(H){if(B=!1,ee(H),!A)if(s(x)!==null)A=!0,se||(se=!0,pe());else{var X=s(p);X!==null&&ke(re,X.startTime-H)}}var se=!1,le=-1,M=5,Re=-1;function xe(){return k?!0:!(n.unstable_now()-Re<M)}function Ke(){if(k=!1,se){var H=n.unstable_now();Re=H;var X=!0;try{e:{A=!1,B&&(B=!1,F(le),le=-1),N=!0;var te=j;try{t:{for(ee(H),y=s(x);y!==null&&!(y.expirationTime>H&&xe());){var me=y.callback;if(typeof me=="function"){y.callback=null,j=y.priorityLevel;var be=me(y.expirationTime<=H);if(H=n.unstable_now(),typeof be=="function"){y.callback=be,ee(H),X=!0;break t}y===s(x)&&o(x),ee(H)}else o(x);y=s(x)}if(y!==null)X=!0;else{var R=s(p);R!==null&&ke(re,R.startTime-H),X=!1}}break e}finally{y=null,j=te,N=!1}X=void 0}}finally{X?pe():se=!1}}}var pe;if(typeof W=="function")pe=function(){W(Ke)};else if(typeof MessageChannel<"u"){var st=new MessageChannel,Te=st.port2;st.port1.onmessage=Ke,pe=function(){Te.postMessage(null)}}else pe=function(){Z(Ke,0)};function ke(H,X){le=Z(function(){H(n.unstable_now())},X)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(H){H.callback=null},n.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<H?Math.floor(1e3/H):5},n.unstable_getCurrentPriorityLevel=function(){return j},n.unstable_next=function(H){switch(j){case 1:case 2:case 3:var X=3;break;default:X=j}var te=j;j=X;try{return H()}finally{j=te}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(H,X){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var te=j;j=H;try{return X()}finally{j=te}},n.unstable_scheduleCallback=function(H,X,te){var me=n.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?me+te:me):te=me,H){case 1:var be=-1;break;case 2:be=250;break;case 5:be=1073741823;break;case 4:be=1e4;break;default:be=5e3}return be=te+be,H={id:b++,callback:X,priorityLevel:H,startTime:te,expirationTime:be,sortIndex:-1},te>me?(H.sortIndex=te,i(p,H),s(x)===null&&H===s(p)&&(B?(F(le),le=-1):B=!0,ke(re,te-me))):(H.sortIndex=be,i(x,H),A||N||(A=!0,se||(se=!0,pe()))),H},n.unstable_shouldYield=xe,n.unstable_wrapCallback=function(H){var X=j;return function(){var te=j;j=X;try{return H.apply(this,arguments)}finally{j=te}}}})(Io)),Io}var Ap;function _y(){return Ap||(Ap=1,Wo.exports=zy()),Wo.exports}var Po={exports:{}},Yt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var zp;function Oy(){if(zp)return Yt;zp=1;var n=gf();function i(x){var p="https://react.dev/errors/"+x;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+x+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},f=Symbol.for("react.portal");function d(x,p,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:y==null?null:""+y,children:x,containerInfo:p,implementation:b}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(x,p){if(x==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Yt.createPortal=function(x,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return d(x,p,null,b)},Yt.flushSync=function(x){var p=h.T,b=o.p;try{if(h.T=null,o.p=2,x)return x()}finally{h.T=p,o.p=b,o.d.f()}},Yt.preconnect=function(x,p){typeof x=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(x,p))},Yt.prefetchDNS=function(x){typeof x=="string"&&o.d.D(x)},Yt.preinit=function(x,p){if(typeof x=="string"&&p&&typeof p.as=="string"){var b=p.as,y=v(b,p.crossOrigin),j=typeof p.integrity=="string"?p.integrity:void 0,N=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?o.d.S(x,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:j,fetchPriority:N}):b==="script"&&o.d.X(x,{crossOrigin:y,integrity:j,fetchPriority:N,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Yt.preinitModule=function(x,p){if(typeof x=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=v(p.as,p.crossOrigin);o.d.M(x,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(x)},Yt.preload=function(x,p){if(typeof x=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,y=v(b,p.crossOrigin);o.d.L(x,b,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Yt.preloadModule=function(x,p){if(typeof x=="string")if(p){var b=v(p.as,p.crossOrigin);o.d.m(x,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(x)},Yt.requestFormReset=function(x){o.d.r(x)},Yt.unstable_batchedUpdates=function(x,p){return x(p)},Yt.useFormState=function(x,p,b){return h.H.useFormState(x,p,b)},Yt.useFormStatus=function(){return h.H.useHostTransitionStatus()},Yt.version="19.2.7",Yt}var _p;function gv(){if(_p)return Po.exports;_p=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Po.exports=Oy(),Po.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Op;function ky(){if(Op)return Tr;Op=1;var n=_y(),i=gf(),s=gv();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 d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function 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 x(e){if(d(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,l=t;;){var r=a.return;if(r===null)break;var u=r.alternate;if(u===null){if(l=r.return,l!==null){a=l;continue}break}if(r.child===u.child){for(u=r.child;u;){if(u===a)return x(r),e;if(u===l)return x(r),t;u=u.sibling}throw Error(o(188))}if(a.return!==l.return)a=r,l=u;else{for(var m=!1,g=r.child;g;){if(g===a){m=!0,a=r,l=u;break}if(g===l){m=!0,l=r,a=u;break}g=g.sibling}if(!m){for(g=u.child;g;){if(g===a){m=!0,a=u,l=r;break}if(g===l){m=!0,l=u,a=r;break}g=g.sibling}if(!m)throw Error(o(189))}}if(a.alternate!==l)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,j=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),W=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),le=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),Re=Symbol.for("react.activity"),xe=Symbol.for("react.memo_cache_sentinel"),Ke=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=Ke&&e[Ke]||e["@@iterator"],typeof e=="function"?e:null)}var st=Symbol.for("react.client.reference");function Te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===st?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case Z:return"Profiler";case k:return"StrictMode";case re:return"Suspense";case se:return"SuspenseList";case Re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case W:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case le:return t=e.displayName||null,t!==null?t:Te(e.type)||"Memo";case M:t=e._payload,e=e._init;try{return Te(e(t))}catch{}}return null}var ke=Array.isArray,H=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},me=[],be=-1;function R(e){return{current:e}}function q(e){0>be||(e.current=me[be],me[be]=null,be--)}function K(e,t){be++,me[be]=e.current,e.current=t}var J=R(null),he=R(null),fe=R(null),Se=R(null);function We(e,t){switch(K(fe,t),K(he,e),K(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Fh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Fh(t),e=Jh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(J),K(J,e)}function Qe(){q(J),q(he),q(fe)}function nl(e){e.memoizedState!==null&&K(Se,e);var t=J.current,a=Jh(t,e.type);t!==a&&(K(he,e),K(J,a))}function Cl(e){he.current===e&&(q(J),q(he)),Se.current===e&&(q(Se),jr._currentValue=te)}var kn,Nt;function Xt(e){if(kn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);kn=t&&t[1]||"",Nt=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+kn+e+Nt}var un=!1;function ae(e,t){if(!e||un)return"";un=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(L){var U=L}Reflect.construct(e,[],G)}else{try{G.call()}catch(L){U=L}e.call(G.prototype)}}else{try{throw Error()}catch(L){U=L}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(L){if(L&&U&&typeof L.stack=="string")return[L.stack,U.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),m=u[0],g=u[1];if(m&&g){var w=m.split(`
44
+ `),O=g.split(`
45
+ `);for(r=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;r<O.length&&!O[r].includes("DetermineComponentFrameRoot");)r++;if(l===w.length||r===O.length)for(l=w.length-1,r=O.length-1;1<=l&&0<=r&&w[l]!==O[r];)r--;for(;1<=l&&0<=r;l--,r--)if(w[l]!==O[r]){if(l!==1||r!==1)do if(l--,r--,0>r||w[l]!==O[r]){var $=`
46
+ `+w[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=r);break}}}finally{un=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Xt(a):""}function je(e,t){switch(e.tag){case 26:case 27:case 5:return Xt(e.type);case 16:return Xt("Lazy");case 13:return e.child!==t&&t!==null?Xt("Suspense Fallback"):Xt("Suspense");case 19:return Xt("SuspenseList");case 0:case 15:return ae(e.type,!1);case 11:return ae(e.type.render,!1);case 1:return ae(e.type,!0);case 31:return Xt("Activity");default:return""}}function ze(e){try{var t="",a=null;do t+=je(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var tt=Object.prototype.hasOwnProperty,ut=n.unstable_scheduleCallback,Qt=n.unstable_cancelCallback,_a=n.unstable_shouldYield,il=n.unstable_requestPaint,dt=n.unstable_now,Pt=n.unstable_getCurrentPriorityLevel,Oa=n.unstable_ImmediatePriority,Zt=n.unstable_UserBlockingPriority,kt=n.unstable_NormalPriority,Dt=n.unstable_LowPriority,ga=n.unstable_IdlePriority,Hu=n.log,Bu=n.unstable_setDisableYieldValue,rl=null,Kt=null;function Mt(e){if(typeof Hu=="function"&&Bu(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(rl,e)}catch{}}var $t=Math.clz32?Math.clz32:qu,Pr=Math.log,es=Math.LN2;function qu(e){return e>>>=0,e===0?32:31-(Pr(e)/es|0)|0}var cn=256,sl=262144,on=4194304;function ka(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 Un(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var r=0,u=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var g=l&134217727;return g!==0?(l=g&~u,l!==0?r=ka(l):(m&=g,m!==0?r=ka(m):a||(a=g&~e,a!==0&&(r=ka(a))))):(g=l&~u,g!==0?r=ka(g):m!==0?r=ka(m):a||(a=l&~e,a!==0&&(r=ka(a)))),r===0?0:t!==0&&t!==r&&(t&u)===0&&(u=r&-r,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:r}function Ml(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $u(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 Li(){var e=on;return on<<=1,(on&62914560)===0&&(on=4194304),e}function Al(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Va(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ts(e,t,a,l,r,u){var m=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 g=e.entanglements,w=e.expirationTimes,O=e.hiddenUpdates;for(a=m&~a;0<a;){var $=31-$t(a),G=1<<$;g[$]=0,w[$]=-1;var U=O[$];if(U!==null)for(O[$]=null,$=0;$<U.length;$++){var L=U[$];L!==null&&(L.lane&=-536870913)}a&=~G}l!==0&&as(e,l,0),u!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=u&~(m&~t))}function as(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-$t(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function ls(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-$t(a),r=1<<l;r&t|e[l]&t&&(e[l]|=t),a&=~r}}function E(e,t){var a=t&-t;return a=(a&42)!==0?1:D(a),(a&(e.suspendedLanes|t))!==0?0:a}function D(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 z(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function V(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:yp(e.type))}function Q(e,t){var a=X.p;try{return X.p=e,t()}finally{X.p=a}}var ne=Math.random().toString(36).slice(2),P="__reactFiber$"+ne,oe="__reactProps$"+ne,I="__reactContainer$"+ne,ce="__reactEvents$"+ne,ye="__reactListeners$"+ne,De="__reactHandles$"+ne,de="__reactResources$"+ne,Ae="__reactMarker$"+ne;function Ge(e){delete e[P],delete e[oe],delete e[ce],delete e[ye],delete e[De]}function ct(e){var t=e[P];if(t)return t;for(var a=e.parentNode;a;){if(t=a[I]||a[P]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=lp(e);e!==null;){if(a=e[P])return a;e=lp(e)}return t}e=a,a=e.parentNode}return null}function Fe(e){if(e=e[P]||e[I]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function qe(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function xt(e){var t=e[de];return t||(t=e[de]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function $e(e){e[Ae]=!0}var zl=new Set,Ua={};function ea(e,t){Ft(e,t),Ft(e+"Capture",t)}function Ft(e,t){for(Ua[e]=t,e=0;e<t.length;e++)zl.add(t[e])}var ya=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]*$"),Ln={},La={};function Hn(e){return tt.call(La,e)?!0:tt.call(Ln,e)?!1:ya.test(e)?La[e]=!0:(Ln[e]=!0,!1)}function ul(e,t,a){if(Hn(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function cl(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 Ne(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function it(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ha(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var r=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(m){a=""+m,u.call(this,m)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(m){a=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Bn(e){if(!e._valueTracker){var t=sa(e)?"checked":"value";e._valueTracker=Ha(e,t,""+e[t])}}function qn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=sa(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Ie(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 ol=/[\n"\\]/g;function Jt(e){return e.replace(ol,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Hi(e,t,a,l,r,u,m,g){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+it(t)):e.value!==""+it(t)&&(e.value=""+it(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?Yu(e,m,it(t)):a!=null?Yu(e,m,it(a)):l!=null&&e.removeAttribute("value"),r==null&&u!=null&&(e.defaultChecked=!!u),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.name=""+it(g):e.removeAttribute("name")}function Gf(e,t,a,l,r,u,m,g){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){Bn(e);return}a=a!=null?""+it(a):"",t=t!=null?""+it(t):a,g||t===e.value||(e.value=t),e.defaultValue=t}l=l??r,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=g?e.checked:!!l,e.defaultChecked=!!l,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),Bn(e)}function Yu(e,t,a){t==="number"&&Ie(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function $n(e,t,a,l){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&l&&(e[a].defaultSelected=!0)}else{for(a=""+it(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,l&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Vf(e,t,a){if(t!=null&&(t=""+it(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+it(a):""}function Xf(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(o(92));if(ke(l)){if(1<l.length)throw Error(o(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=it(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Bn(e)}function Yn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var bx=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 Qf(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||bx.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Zf(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var r in t)l=t[r],t.hasOwnProperty(r)&&a[r]!==l&&Qf(e,r,l)}else for(var u in t)t.hasOwnProperty(u)&&Qf(e,u,t[u])}function Gu(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 Sx=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"]]),jx=/^[\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 ns(e){return jx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fl(){}var Vu=null;function Xu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Gn=null,Vn=null;function Kf(e){var t=Fe(e);if(t&&(e=t.stateNode)){var a=e[oe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Hi(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="'+Jt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var r=l[oe]||null;if(!r)throw Error(o(90));Hi(l,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&qn(l)}break e;case"textarea":Vf(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&$n(e,!!a.multiple,t,!1)}}}var Qu=!1;function Ff(e,t,a){if(Qu)return e(t,a);Qu=!0;try{var l=e(t);return l}finally{if(Qu=!1,(Gn!==null||Vn!==null)&&(Xs(),Gn&&(t=Gn,e=Vn,Vn=Gn=null,Kf(t),e)))for(t=0;t<e.length;t++)Kf(e[t])}}function Bi(e,t){var a=e.stateNode;if(a===null)return null;var l=a[oe]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var dl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zu=!1;if(dl)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){Zu=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{Zu=!1}var _l=null,Ku=null,is=null;function Jf(){if(is)return is;var e,t=Ku,a=t.length,l,r="value"in _l?_l.value:_l.textContent,u=r.length;for(e=0;e<a&&t[e]===r[e];e++);var m=a-e;for(l=1;l<=m&&t[a-l]===r[u-l];l++);return is=r.slice(e,1<l?1-l:void 0)}function rs(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 ss(){return!0}function Wf(){return!1}function ta(e){function t(a,l,r,u,m){this._reactName=a,this._targetInst=r,this.type=l,this.nativeEvent=u,this.target=m,this.currentTarget=null;for(var g in e)e.hasOwnProperty(g)&&(a=e[g],this[g]=a?a(u):u[g]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ss:Wf,this.isPropagationStopped=Wf,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=ss)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ss)},persist:function(){},isPersistent:ss}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},us=ta(fn),$i=y({},fn,{view:0,detail:0}),Nx=ta($i),Fu,Ju,Yi,cs=y({},$i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,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!==Yi&&(Yi&&e.type==="mousemove"?(Fu=e.screenX-Yi.screenX,Ju=e.screenY-Yi.screenY):Ju=Fu=0,Yi=e),Fu)},movementY:function(e){return"movementY"in e?e.movementY:Ju}}),If=ta(cs),wx=y({},cs,{dataTransfer:0}),Ex=ta(wx),Rx=y({},$i,{relatedTarget:0}),Wu=ta(Rx),Tx=y({},fn,{animationName:0,elapsedTime:0,pseudoElement:0}),Dx=ta(Tx),Cx=y({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Mx=ta(Cx),Ax=y({},fn,{data:0}),Pf=ta(Ax),zx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_x={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"},Ox={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ox[e])?!!t[e]:!1}function Iu(){return kx}var Ux=y({},$i,{key:function(e){if(e.key){var t=zx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?_x[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(e){return e.type==="keypress"?rs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lx=ta(Ux),Hx=y({},cs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ed=ta(Hx),Bx=y({},$i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),qx=ta(Bx),$x=y({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yx=ta($x),Gx=y({},cs,{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}),Vx=ta(Gx),Xx=y({},fn,{newState:0,oldState:0}),Qx=ta(Xx),Zx=[9,13,27,32],Pu=dl&&"CompositionEvent"in window,Gi=null;dl&&"documentMode"in document&&(Gi=document.documentMode);var Kx=dl&&"TextEvent"in window&&!Gi,td=dl&&(!Pu||Gi&&8<Gi&&11>=Gi),ad=" ",ld=!1;function nd(e,t){switch(e){case"keyup":return Zx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function id(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xn=!1;function Fx(e,t){switch(e){case"compositionend":return id(t);case"keypress":return t.which!==32?null:(ld=!0,ad);case"textInput":return e=t.data,e===ad&&ld?null:e;default:return null}}function Jx(e,t){if(Xn)return e==="compositionend"||!Pu&&nd(e,t)?(e=Jf(),is=Ku=_l=null,Xn=!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 td&&t.locale!=="ko"?null:t.data;default:return null}}var Wx={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 rd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Wx[e.type]:t==="textarea"}function sd(e,t,a,l){Gn?Vn?Vn.push(l):Vn=[l]:Gn=l,t=Is(t,"onChange"),0<t.length&&(a=new us("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Vi=null,Xi=null;function Ix(e){Gh(e,0)}function os(e){var t=qe(e);if(qn(t))return e}function ud(e,t){if(e==="change")return t}var cd=!1;if(dl){var ec;if(dl){var tc="oninput"in document;if(!tc){var od=document.createElement("div");od.setAttribute("oninput","return;"),tc=typeof od.oninput=="function"}ec=tc}else ec=!1;cd=ec&&(!document.documentMode||9<document.documentMode)}function fd(){Vi&&(Vi.detachEvent("onpropertychange",dd),Xi=Vi=null)}function dd(e){if(e.propertyName==="value"&&os(Xi)){var t=[];sd(t,Xi,e,Xu(e)),Ff(Ix,t)}}function Px(e,t,a){e==="focusin"?(fd(),Vi=t,Xi=a,Vi.attachEvent("onpropertychange",dd)):e==="focusout"&&fd()}function eg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return os(Xi)}function tg(e,t){if(e==="click")return os(t)}function ag(e,t){if(e==="input"||e==="change")return os(t)}function lg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ua=typeof Object.is=="function"?Object.is:lg;function Qi(e,t){if(ua(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var r=a[l];if(!tt.call(t,r)||!ua(e[r],t[r]))return!1}return!0}function md(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hd(e,t){var a=md(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=md(a)}}function pd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ie(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=Ie(e.document)}return t}function ac(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 ng=dl&&"documentMode"in document&&11>=document.documentMode,Qn=null,lc=null,Zi=null,nc=!1;function xd(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;nc||Qn==null||Qn!==Ie(l)||(l=Qn,"selectionStart"in l&&ac(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Zi&&Qi(Zi,l)||(Zi=l,l=Is(lc,"onSelect"),0<l.length&&(t=new us("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Qn)))}function dn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Zn={animationend:dn("Animation","AnimationEnd"),animationiteration:dn("Animation","AnimationIteration"),animationstart:dn("Animation","AnimationStart"),transitionrun:dn("Transition","TransitionRun"),transitionstart:dn("Transition","TransitionStart"),transitioncancel:dn("Transition","TransitionCancel"),transitionend:dn("Transition","TransitionEnd")},ic={},gd={};dl&&(gd=document.createElement("div").style,"AnimationEvent"in window||(delete Zn.animationend.animation,delete Zn.animationiteration.animation,delete Zn.animationstart.animation),"TransitionEvent"in window||delete Zn.transitionend.transition);function mn(e){if(ic[e])return ic[e];if(!Zn[e])return e;var t=Zn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in gd)return ic[e]=t[a];return e}var yd=mn("animationend"),bd=mn("animationiteration"),Sd=mn("animationstart"),ig=mn("transitionrun"),rg=mn("transitionstart"),sg=mn("transitioncancel"),jd=mn("transitionend"),Nd=new Map,rc="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(" ");rc.push("scrollEnd");function Ba(e,t){Nd.set(e,t),ea(t,[e])}var fs=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)},ba=[],Kn=0,sc=0;function ds(){for(var e=Kn,t=sc=Kn=0;t<e;){var a=ba[t];ba[t++]=null;var l=ba[t];ba[t++]=null;var r=ba[t];ba[t++]=null;var u=ba[t];if(ba[t++]=null,l!==null&&r!==null){var m=l.pending;m===null?r.next=r:(r.next=m.next,m.next=r),l.pending=r}u!==0&&wd(a,r,u)}}function ms(e,t,a,l){ba[Kn++]=e,ba[Kn++]=t,ba[Kn++]=a,ba[Kn++]=l,sc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function uc(e,t,a,l){return ms(e,t,a,l),hs(e)}function hn(e,t){return ms(e,null,null,t),hs(e)}function wd(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var r=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(r=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,r&&t!==null&&(r=31-$t(a),e=u.hiddenUpdates,l=e[r],l===null?e[r]=[t]:l.push(t),t.lane=a|536870912),u):null}function hs(e){if(50<pr)throw pr=0,go=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fn={};function ug(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ca(e,t,a,l){return new ug(e,t,a,l)}function cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ml(e,t){var a=e.alternate;return a===null?(a=ca(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 Ed(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 ps(e,t,a,l,r,u){var m=0;if(l=e,typeof e=="function")cc(e)&&(m=1);else if(typeof e=="string")m=my(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Re:return e=ca(31,a,t,r),e.elementType=Re,e.lanes=u,e;case B:return pn(a.children,r,u,t);case k:m=8,r|=24;break;case Z:return e=ca(12,a,t,r|2),e.elementType=Z,e.lanes=u,e;case re:return e=ca(13,a,t,r),e.elementType=re,e.lanes=u,e;case se:return e=ca(19,a,t,r),e.elementType=se,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:m=10;break e;case F:m=9;break e;case ee:m=11;break e;case le:m=14;break e;case M:m=16,l=null;break e}m=29,a=Error(o(130,e===null?"null":typeof e,"")),l=null}return t=ca(m,a,t,r),t.elementType=e,t.type=l,t.lanes=u,t}function pn(e,t,a,l){return e=ca(7,e,l,t),e.lanes=a,e}function oc(e,t,a){return e=ca(6,e,null,t),e.lanes=a,e}function Rd(e){var t=ca(18,null,null,0);return t.stateNode=e,t}function fc(e,t,a){return t=ca(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Td=new WeakMap;function Sa(e,t){if(typeof e=="object"&&e!==null){var a=Td.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ze(t)},Td.set(e,t),t)}return{value:e,source:t,stack:ze(t)}}var Jn=[],Wn=0,vs=null,Ki=0,ja=[],Na=0,Ol=null,Xa=1,Qa="";function hl(e,t){Jn[Wn++]=Ki,Jn[Wn++]=vs,vs=e,Ki=t}function Dd(e,t,a){ja[Na++]=Xa,ja[Na++]=Qa,ja[Na++]=Ol,Ol=e;var l=Xa;e=Qa;var r=32-$t(l)-1;l&=~(1<<r),a+=1;var u=32-$t(t)+r;if(30<u){var m=r-r%5;u=(l&(1<<m)-1).toString(32),l>>=m,r-=m,Xa=1<<32-$t(t)+r|a<<r|l,Qa=u+e}else Xa=1<<u|a<<r|l,Qa=e}function dc(e){e.return!==null&&(hl(e,1),Dd(e,1,0))}function mc(e){for(;e===vs;)vs=Jn[--Wn],Jn[Wn]=null,Ki=Jn[--Wn],Jn[Wn]=null;for(;e===Ol;)Ol=ja[--Na],ja[Na]=null,Qa=ja[--Na],ja[Na]=null,Xa=ja[--Na],ja[Na]=null}function Cd(e,t){ja[Na++]=Xa,ja[Na++]=Qa,ja[Na++]=Ol,Xa=t.id,Qa=t.overflow,Ol=e}var Ut=null,ot=null,Be=!1,kl=null,wa=!1,hc=Error(o(519));function Ul(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fi(Sa(t,e)),hc}function Md(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[P]=e,t[oe]=l,a){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(a=0;a<xr.length;a++)Oe(xr[a],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),Gf(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),Xf(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Zh(t.textContent,a)?(l.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),l.onScroll!=null&&Oe("scroll",t),l.onScrollEnd!=null&&Oe("scrollend",t),l.onClick!=null&&(t.onclick=fl),t=!0):t=!1,t||Ul(e,!0)}function Ad(e){for(Ut=e.return;Ut;)switch(Ut.tag){case 5:case 31:case 13:wa=!1;return;case 27:case 3:wa=!0;return;default:Ut=Ut.return}}function In(e){if(e!==Ut)return!1;if(!Be)return Ad(e),Be=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||_o(e.type,e.memoizedProps)),a=!a),a&&ot&&Ul(e),Ad(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ot=ap(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ot=ap(e)}else t===27?(t=ot,Jl(e.type)?(e=Ho,Ho=null,ot=e):ot=t):ot=Ut?Ra(e.stateNode.nextSibling):null;return!0}function vn(){ot=Ut=null,Be=!1}function pc(){var e=kl;return e!==null&&(ia===null?ia=e:ia.push.apply(ia,e),kl=null),e}function Fi(e){kl===null?kl=[e]:kl.push(e)}var vc=R(null),xn=null,pl=null;function Ll(e,t,a){K(vc,t._currentValue),t._currentValue=a}function vl(e){e._currentValue=vc.current,q(vc)}function xc(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function gc(e,t,a,l){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var u=r.dependencies;if(u!==null){var m=r.child;u=u.firstContext;e:for(;u!==null;){var g=u;u=r;for(var w=0;w<t.length;w++)if(g.context===t[w]){u.lanes|=a,g=u.alternate,g!==null&&(g.lanes|=a),xc(u.return,a,e),l||(m=null);break e}u=g.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(o(341));m.lanes|=a,u=m.alternate,u!==null&&(u.lanes|=a),xc(m,a,e),m=null}else m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===e){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function Pn(e,t,a,l){e=null;for(var r=t,u=!1;r!==null;){if(!u){if((r.flags&524288)!==0)u=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error(o(387));if(m=m.memoizedProps,m!==null){var g=r.type;ua(r.pendingProps.value,m.value)||(e!==null?e.push(g):e=[g])}}else if(r===Se.current){if(m=r.alternate,m===null)throw Error(o(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(jr):e=[jr])}r=r.return}e!==null&&gc(t,e,a,l),t.flags|=262144}function xs(e){for(e=e.firstContext;e!==null;){if(!ua(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gn(e){xn=e,pl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return zd(xn,e)}function gs(e,t){return xn===null&&gn(e),zd(e,t)}function zd(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},pl===null){if(e===null)throw Error(o(308));pl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pl=pl.next=t;return a}var cg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},og=n.unstable_scheduleCallback,fg=n.unstable_NormalPriority,wt={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function yc(){return{controller:new cg,data:new Map,refCount:0}}function Ji(e){e.refCount--,e.refCount===0&&og(fg,function(){e.controller.abort()})}var Wi=null,bc=0,ei=0,ti=null;function dg(e,t){if(Wi===null){var a=Wi=[];bc=0,ei=wo(),ti={status:"pending",value:void 0,then:function(l){a.push(l)}}}return bc++,t.then(_d,_d),t}function _d(){if(--bc===0&&Wi!==null){ti!==null&&(ti.status="fulfilled");var e=Wi;Wi=null,ei=0,ti=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function mg(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(l.status="rejected",l.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),l}var Od=H.S;H.S=function(e,t){xh=dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&dg(e,t),Od!==null&&Od(e,t)};var yn=R(null);function Sc(){var e=yn.current;return e!==null?e:rt.pooledCache}function ys(e,t){t===null?K(yn,yn.current):K(yn,t.pool)}function kd(){var e=Sc();return e===null?null:{parent:wt._currentValue,pool:e}}var ai=Error(o(460)),jc=Error(o(474)),bs=Error(o(542)),Ss={then:function(){}};function Ud(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ld(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(fl,fl),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Bd(e),e;default:if(typeof t.status=="string")t.then(fl,fl);else{if(e=rt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=l}},function(l){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Bd(e),e}throw Sn=t,ai}}function bn(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Sn=a,ai):a}}var Sn=null;function Hd(){if(Sn===null)throw Error(o(459));var e=Sn;return Sn=null,e}function Bd(e){if(e===ai||e===bs)throw Error(o(483))}var li=null,Ii=0;function js(e){var t=Ii;return Ii+=1,li===null&&(li=[]),Ld(li,e,t)}function Pi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ns(e,t){throw t.$$typeof===j?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qd(e){function t(C,T){if(e){var _=C.deletions;_===null?(C.deletions=[T],C.flags|=16):_.push(T)}}function a(C,T){if(!e)return null;for(;T!==null;)t(C,T),T=T.sibling;return null}function l(C){for(var T=new Map;C!==null;)C.key!==null?T.set(C.key,C):T.set(C.index,C),C=C.sibling;return T}function r(C,T){return C=ml(C,T),C.index=0,C.sibling=null,C}function u(C,T,_){return C.index=_,e?(_=C.alternate,_!==null?(_=_.index,_<T?(C.flags|=67108866,T):_):(C.flags|=67108866,T)):(C.flags|=1048576,T)}function m(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function g(C,T,_,Y){return T===null||T.tag!==6?(T=oc(_,C.mode,Y),T.return=C,T):(T=r(T,_),T.return=C,T)}function w(C,T,_,Y){var ve=_.type;return ve===B?$(C,T,_.props.children,Y,_.key):T!==null&&(T.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===M&&bn(ve)===T.type)?(T=r(T,_.props),Pi(T,_),T.return=C,T):(T=ps(_.type,_.key,_.props,null,C.mode,Y),Pi(T,_),T.return=C,T)}function O(C,T,_,Y){return T===null||T.tag!==4||T.stateNode.containerInfo!==_.containerInfo||T.stateNode.implementation!==_.implementation?(T=fc(_,C.mode,Y),T.return=C,T):(T=r(T,_.children||[]),T.return=C,T)}function $(C,T,_,Y,ve){return T===null||T.tag!==7?(T=pn(_,C.mode,Y,ve),T.return=C,T):(T=r(T,_),T.return=C,T)}function G(C,T,_){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=oc(""+T,C.mode,_),T.return=C,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case N:return _=ps(T.type,T.key,T.props,null,C.mode,_),Pi(_,T),_.return=C,_;case A:return T=fc(T,C.mode,_),T.return=C,T;case M:return T=bn(T),G(C,T,_)}if(ke(T)||pe(T))return T=pn(T,C.mode,_,null),T.return=C,T;if(typeof T.then=="function")return G(C,js(T),_);if(T.$$typeof===W)return G(C,gs(C,T),_);Ns(C,T)}return null}function U(C,T,_,Y){var ve=T!==null?T.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return ve!==null?null:g(C,T,""+_,Y);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case N:return _.key===ve?w(C,T,_,Y):null;case A:return _.key===ve?O(C,T,_,Y):null;case M:return _=bn(_),U(C,T,_,Y)}if(ke(_)||pe(_))return ve!==null?null:$(C,T,_,Y,null);if(typeof _.then=="function")return U(C,T,js(_),Y);if(_.$$typeof===W)return U(C,T,gs(C,_),Y);Ns(C,_)}return null}function L(C,T,_,Y,ve){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return C=C.get(_)||null,g(T,C,""+Y,ve);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case N:return C=C.get(Y.key===null?_:Y.key)||null,w(T,C,Y,ve);case A:return C=C.get(Y.key===null?_:Y.key)||null,O(T,C,Y,ve);case M:return Y=bn(Y),L(C,T,_,Y,ve)}if(ke(Y)||pe(Y))return C=C.get(_)||null,$(T,C,Y,ve,null);if(typeof Y.then=="function")return L(C,T,_,js(Y),ve);if(Y.$$typeof===W)return L(C,T,_,gs(T,Y),ve);Ns(T,Y)}return null}function ie(C,T,_,Y){for(var ve=null,Ve=null,ue=T,Me=T=0,Le=null;ue!==null&&Me<_.length;Me++){ue.index>Me?(Le=ue,ue=null):Le=ue.sibling;var Xe=U(C,ue,_[Me],Y);if(Xe===null){ue===null&&(ue=Le);break}e&&ue&&Xe.alternate===null&&t(C,ue),T=u(Xe,T,Me),Ve===null?ve=Xe:Ve.sibling=Xe,Ve=Xe,ue=Le}if(Me===_.length)return a(C,ue),Be&&hl(C,Me),ve;if(ue===null){for(;Me<_.length;Me++)ue=G(C,_[Me],Y),ue!==null&&(T=u(ue,T,Me),Ve===null?ve=ue:Ve.sibling=ue,Ve=ue);return Be&&hl(C,Me),ve}for(ue=l(ue);Me<_.length;Me++)Le=L(ue,C,Me,_[Me],Y),Le!==null&&(e&&Le.alternate!==null&&ue.delete(Le.key===null?Me:Le.key),T=u(Le,T,Me),Ve===null?ve=Le:Ve.sibling=Le,Ve=Le);return e&&ue.forEach(function(tn){return t(C,tn)}),Be&&hl(C,Me),ve}function ge(C,T,_,Y){if(_==null)throw Error(o(151));for(var ve=null,Ve=null,ue=T,Me=T=0,Le=null,Xe=_.next();ue!==null&&!Xe.done;Me++,Xe=_.next()){ue.index>Me?(Le=ue,ue=null):Le=ue.sibling;var tn=U(C,ue,Xe.value,Y);if(tn===null){ue===null&&(ue=Le);break}e&&ue&&tn.alternate===null&&t(C,ue),T=u(tn,T,Me),Ve===null?ve=tn:Ve.sibling=tn,Ve=tn,ue=Le}if(Xe.done)return a(C,ue),Be&&hl(C,Me),ve;if(ue===null){for(;!Xe.done;Me++,Xe=_.next())Xe=G(C,Xe.value,Y),Xe!==null&&(T=u(Xe,T,Me),Ve===null?ve=Xe:Ve.sibling=Xe,Ve=Xe);return Be&&hl(C,Me),ve}for(ue=l(ue);!Xe.done;Me++,Xe=_.next())Xe=L(ue,C,Me,Xe.value,Y),Xe!==null&&(e&&Xe.alternate!==null&&ue.delete(Xe.key===null?Me:Xe.key),T=u(Xe,T,Me),Ve===null?ve=Xe:Ve.sibling=Xe,Ve=Xe);return e&&ue.forEach(function(wy){return t(C,wy)}),Be&&hl(C,Me),ve}function nt(C,T,_,Y){if(typeof _=="object"&&_!==null&&_.type===B&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case N:e:{for(var ve=_.key;T!==null;){if(T.key===ve){if(ve=_.type,ve===B){if(T.tag===7){a(C,T.sibling),Y=r(T,_.props.children),Y.return=C,C=Y;break e}}else if(T.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===M&&bn(ve)===T.type){a(C,T.sibling),Y=r(T,_.props),Pi(Y,_),Y.return=C,C=Y;break e}a(C,T);break}else t(C,T);T=T.sibling}_.type===B?(Y=pn(_.props.children,C.mode,Y,_.key),Y.return=C,C=Y):(Y=ps(_.type,_.key,_.props,null,C.mode,Y),Pi(Y,_),Y.return=C,C=Y)}return m(C);case A:e:{for(ve=_.key;T!==null;){if(T.key===ve)if(T.tag===4&&T.stateNode.containerInfo===_.containerInfo&&T.stateNode.implementation===_.implementation){a(C,T.sibling),Y=r(T,_.children||[]),Y.return=C,C=Y;break e}else{a(C,T);break}else t(C,T);T=T.sibling}Y=fc(_,C.mode,Y),Y.return=C,C=Y}return m(C);case M:return _=bn(_),nt(C,T,_,Y)}if(ke(_))return ie(C,T,_,Y);if(pe(_)){if(ve=pe(_),typeof ve!="function")throw Error(o(150));return _=ve.call(_),ge(C,T,_,Y)}if(typeof _.then=="function")return nt(C,T,js(_),Y);if(_.$$typeof===W)return nt(C,T,gs(C,_),Y);Ns(C,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,T!==null&&T.tag===6?(a(C,T.sibling),Y=r(T,_),Y.return=C,C=Y):(a(C,T),Y=oc(_,C.mode,Y),Y.return=C,C=Y),m(C)):a(C,T)}return function(C,T,_,Y){try{Ii=0;var ve=nt(C,T,_,Y);return li=null,ve}catch(ue){if(ue===ai||ue===bs)throw ue;var Ve=ca(29,ue,null,C.mode);return Ve.lanes=Y,Ve.return=C,Ve}finally{}}}var jn=qd(!0),$d=qd(!1),Hl=!1;function Nc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wc(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 Bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ql(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var r=l.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),l.pending=t,t=hs(e),wd(e,null,a),t}return ms(e,l,t,a),hs(e)}function er(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ls(e,a)}}function Ec(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var r=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var m={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?r=u=m:u=u.next=m,a=a.next}while(a!==null);u===null?r=u=t:u=u.next=t}else r=u=t;a={baseState:l.baseState,firstBaseUpdate:r,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Rc=!1;function tr(){if(Rc){var e=ti;if(e!==null)throw e}}function ar(e,t,a,l){Rc=!1;var r=e.updateQueue;Hl=!1;var u=r.firstBaseUpdate,m=r.lastBaseUpdate,g=r.shared.pending;if(g!==null){r.shared.pending=null;var w=g,O=w.next;w.next=null,m===null?u=O:m.next=O,m=w;var $=e.alternate;$!==null&&($=$.updateQueue,g=$.lastBaseUpdate,g!==m&&(g===null?$.firstBaseUpdate=O:g.next=O,$.lastBaseUpdate=w))}if(u!==null){var G=r.baseState;m=0,$=O=w=null,g=u;do{var U=g.lane&-536870913,L=U!==g.lane;if(L?(Ue&U)===U:(l&U)===U){U!==0&&U===ei&&(Rc=!0),$!==null&&($=$.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});e:{var ie=e,ge=g;U=t;var nt=a;switch(ge.tag){case 1:if(ie=ge.payload,typeof ie=="function"){G=ie.call(nt,G,U);break e}G=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ge.payload,U=typeof ie=="function"?ie.call(nt,G,U):ie,U==null)break e;G=y({},G,U);break e;case 2:Hl=!0}}U=g.callback,U!==null&&(e.flags|=64,L&&(e.flags|=8192),L=r.callbacks,L===null?r.callbacks=[U]:L.push(U))}else L={lane:U,tag:g.tag,payload:g.payload,callback:g.callback,next:null},$===null?(O=$=L,w=G):$=$.next=L,m|=U;if(g=g.next,g===null){if(g=r.shared.pending,g===null)break;L=g,g=L.next,L.next=null,r.lastBaseUpdate=L,r.shared.pending=null}}while(!0);$===null&&(w=G),r.baseState=w,r.firstBaseUpdate=O,r.lastBaseUpdate=$,u===null&&(r.shared.lanes=0),Xl|=m,e.lanes=m,e.memoizedState=G}}function Yd(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Gd(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Yd(a[e],t)}var ni=R(null),ws=R(0);function Vd(e,t){e=El,K(ws,e),K(ni,t),El=e|t.baseLanes}function Tc(){K(ws,El),K(ni,ni.current)}function Dc(){El=ws.current,q(ni),q(ws)}var oa=R(null),Ea=null;function $l(e){var t=e.alternate;K(gt,gt.current&1),K(oa,e),Ea===null&&(t===null||ni.current!==null||t.memoizedState!==null)&&(Ea=e)}function Cc(e){K(gt,gt.current),K(oa,e),Ea===null&&(Ea=e)}function Xd(e){e.tag===22?(K(gt,gt.current),K(oa,e),Ea===null&&(Ea=e)):Yl()}function Yl(){K(gt,gt.current),K(oa,oa.current)}function fa(e){q(oa),Ea===e&&(Ea=null),q(gt)}var gt=R(0);function Es(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Uo(a)||Lo(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 xl=0,Ce=null,at=null,Et=null,Rs=!1,ii=!1,Nn=!1,Ts=0,lr=0,ri=null,hg=0;function pt(){throw Error(o(321))}function Mc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ua(e[a],t[a]))return!1;return!0}function Ac(e,t,a,l,r,u){return xl=u,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,H.H=e===null||e.memoizedState===null?Dm:Qc,Nn=!1,u=a(l,r),Nn=!1,ii&&(u=Zd(t,a,l,r)),Qd(e),u}function Qd(e){H.H=rr;var t=at!==null&&at.next!==null;if(xl=0,Et=at=Ce=null,Rs=!1,lr=0,ri=null,t)throw Error(o(300));e===null||Rt||(e=e.dependencies,e!==null&&xs(e)&&(Rt=!0))}function Zd(e,t,a,l){Ce=e;var r=0;do{if(ii&&(ri=null),lr=0,ii=!1,25<=r)throw Error(o(301));if(r+=1,Et=at=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}H.H=Cm,u=t(a,l)}while(ii);return u}function pg(){var e=H.H,t=e.useState()[0];return t=typeof t.then=="function"?nr(t):t,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Ce.flags|=1024),t}function zc(){var e=Ts!==0;return Ts=0,e}function _c(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Oc(e){if(Rs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Rs=!1}xl=0,Et=at=Ce=null,ii=!1,lr=Ts=0,ri=null}function Wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?Ce.memoizedState=Et=e:Et=Et.next=e,Et}function yt(){if(at===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var t=Et===null?Ce.memoizedState:Et.next;if(t!==null)Et=t,at=e;else{if(e===null)throw Ce.alternate===null?Error(o(467)):Error(o(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Et===null?Ce.memoizedState=Et=e:Et=Et.next=e}return Et}function Ds(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function nr(e){var t=lr;return lr+=1,ri===null&&(ri=[]),e=Ld(ri,e,t),t=Ce,(Et===null?t.memoizedState:Et.next)===null&&(t=t.alternate,H.H=t===null||t.memoizedState===null?Dm:Qc),e}function Cs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return nr(e);if(e.$$typeof===W)return Lt(e)}throw Error(o(438,String(e)))}function kc(e){var t=null,a=Ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Ce.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ds(),Ce.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=xe;return t.index++,a}function gl(e,t){return typeof t=="function"?t(e):t}function Ms(e){var t=yt();return Uc(t,at,e)}function Uc(e,t,a){var l=e.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=a;var r=e.baseQueue,u=l.pending;if(u!==null){if(r!==null){var m=r.next;r.next=u.next,u.next=m}t.baseQueue=r=u,l.pending=null}if(u=e.baseState,r===null)e.memoizedState=u;else{t=r.next;var g=m=null,w=null,O=t,$=!1;do{var G=O.lane&-536870913;if(G!==O.lane?(Ue&G)===G:(xl&G)===G){var U=O.revertLane;if(U===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),G===ei&&($=!0);else if((xl&U)===U){O=O.next,U===ei&&($=!0);continue}else G={lane:0,revertLane:O.revertLane,gesture:null,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},w===null?(g=w=G,m=u):w=w.next=G,Ce.lanes|=U,Xl|=U;G=O.action,Nn&&a(u,G),u=O.hasEagerState?O.eagerState:a(u,G)}else U={lane:G,revertLane:O.revertLane,gesture:O.gesture,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null},w===null?(g=w=U,m=u):w=w.next=U,Ce.lanes|=G,Xl|=G;O=O.next}while(O!==null&&O!==t);if(w===null?m=u:w.next=g,!ua(u,e.memoizedState)&&(Rt=!0,$&&(a=ti,a!==null)))throw a;e.memoizedState=u,e.baseState=m,e.baseQueue=w,l.lastRenderedState=u}return r===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Lc(e){var t=yt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var l=a.dispatch,r=a.pending,u=t.memoizedState;if(r!==null){a.pending=null;var m=r=r.next;do u=e(u,m.action),m=m.next;while(m!==r);ua(u,t.memoizedState)||(Rt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function Kd(e,t,a){var l=Ce,r=yt(),u=Be;if(u){if(a===void 0)throw Error(o(407));a=a()}else a=t();var m=!ua((at||r).memoizedState,a);if(m&&(r.memoizedState=a,Rt=!0),r=r.queue,qc(Wd.bind(null,l,r,e),[e]),r.getSnapshot!==t||m||Et!==null&&Et.memoizedState.tag&1){if(l.flags|=2048,si(9,{destroy:void 0},Jd.bind(null,l,r,a,t),null),rt===null)throw Error(o(349));u||(xl&127)!==0||Fd(l,t,a)}return a}function Fd(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ce.updateQueue,t===null?(t=Ds(),Ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Jd(e,t,a,l){t.value=a,t.getSnapshot=l,Id(t)&&Pd(e)}function Wd(e,t,a){return a(function(){Id(t)&&Pd(e)})}function Id(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ua(e,a)}catch{return!0}}function Pd(e){var t=hn(e,2);t!==null&&ra(t,e,2)}function Hc(e){var t=Wt();if(typeof e=="function"){var a=e;if(e=a(),Nn){Mt(!0);try{a()}finally{Mt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:e},t}function em(e,t,a,l){return e.baseState=a,Uc(e,at,typeof l=="function"?l:gl)}function vg(e,t,a,l,r){if(_s(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){u.listeners.push(m)}};H.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,tm(t,u)):(u.next=a.next,t.pending=a.next=u)}}function tm(e,t){var a=t.action,l=t.payload,r=e.state;if(t.isTransition){var u=H.T,m={};H.T=m;try{var g=a(r,l),w=H.S;w!==null&&w(m,g),am(e,t,g)}catch(O){Bc(e,t,O)}finally{u!==null&&m.types!==null&&(u.types=m.types),H.T=u}}else try{u=a(r,l),am(e,t,u)}catch(O){Bc(e,t,O)}}function am(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){lm(e,t,l)},function(l){return Bc(e,t,l)}):lm(e,t,a)}function lm(e,t,a){t.status="fulfilled",t.value=a,nm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,tm(e,a)))}function Bc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,nm(t),t=t.next;while(t!==l)}e.action=null}function nm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function im(e,t){return t}function rm(e,t){if(Be){var a=rt.formState;if(a!==null){e:{var l=Ce;if(Be){if(ot){t:{for(var r=ot,u=wa;r.nodeType!==8;){if(!u){r=null;break t}if(r=Ra(r.nextSibling),r===null){r=null;break t}}u=r.data,r=u==="F!"||u==="F"?r:null}if(r){ot=Ra(r.nextSibling),l=r.data==="F!";break e}}Ul(l)}l=!1}l&&(t=a[0])}}return a=Wt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:im,lastRenderedState:t},a.queue=l,a=Em.bind(null,Ce,l),l.dispatch=a,l=Hc(!1),u=Xc.bind(null,Ce,!1,l.queue),l=Wt(),r={state:t,dispatch:null,action:e,pending:null},l.queue=r,a=vg.bind(null,Ce,r,u,a),r.dispatch=a,l.memoizedState=e,[t,a,!1]}function sm(e){var t=yt();return um(t,at,e)}function um(e,t,a){if(t=Uc(e,t,im)[0],e=Ms(gl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=nr(t)}catch(m){throw m===ai?bs:m}else l=t;t=yt();var r=t.queue,u=r.dispatch;return a!==t.memoizedState&&(Ce.flags|=2048,si(9,{destroy:void 0},xg.bind(null,r,a),null)),[l,u,e]}function xg(e,t){e.action=t}function cm(e){var t=yt(),a=at;if(a!==null)return um(t,a,e);yt(),t=t.memoizedState,a=yt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function si(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=Ds(),Ce.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function om(){return yt().memoizedState}function As(e,t,a,l){var r=Wt();Ce.flags|=e,r.memoizedState=si(1|t,{destroy:void 0},a,l===void 0?null:l)}function zs(e,t,a,l){var r=yt();l=l===void 0?null:l;var u=r.memoizedState.inst;at!==null&&l!==null&&Mc(l,at.memoizedState.deps)?r.memoizedState=si(t,u,a,l):(Ce.flags|=e,r.memoizedState=si(1|t,u,a,l))}function fm(e,t){As(8390656,8,e,t)}function qc(e,t){zs(2048,8,e,t)}function gg(e){Ce.flags|=4;var t=Ce.updateQueue;if(t===null)t=Ds(),Ce.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function dm(e){var t=yt().memoizedState;return gg({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function mm(e,t){return zs(4,2,e,t)}function hm(e,t){return zs(4,4,e,t)}function pm(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 vm(e,t,a){a=a!=null?a.concat([e]):null,zs(4,4,pm.bind(null,t,e),a)}function $c(){}function xm(e,t){var a=yt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Mc(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function gm(e,t){var a=yt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Mc(t,l[1]))return l[0];if(l=e(),Nn){Mt(!0);try{e()}finally{Mt(!1)}}return a.memoizedState=[l,t],l}function Yc(e,t,a){return a===void 0||(xl&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=yh(),Ce.lanes|=e,Xl|=e,a)}function ym(e,t,a,l){return ua(a,t)?a:ni.current!==null?(e=Yc(e,a,l),ua(e,t)||(Rt=!0),e):(xl&42)===0||(xl&1073741824)!==0&&(Ue&261930)===0?(Rt=!0,e.memoizedState=a):(e=yh(),Ce.lanes|=e,Xl|=e,t)}function bm(e,t,a,l,r){var u=X.p;X.p=u!==0&&8>u?u:8;var m=H.T,g={};H.T=g,Xc(e,!1,t,a);try{var w=r(),O=H.S;if(O!==null&&O(g,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var $=mg(w,l);ir(e,t,$,ha(e))}else ir(e,t,l,ha(e))}catch(G){ir(e,t,{then:function(){},status:"rejected",reason:G},ha())}finally{X.p=u,m!==null&&g.types!==null&&(m.types=g.types),H.T=m}}function yg(){}function Gc(e,t,a,l){if(e.tag!==5)throw Error(o(476));var r=Sm(e).queue;bm(e,r,t,te,a===null?yg:function(){return jm(e),a(l)})}function Sm(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:te},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jm(e){var t=Sm(e);t.next===null&&(t=e.alternate.memoizedState),ir(e,t.next.queue,{},ha())}function Vc(){return Lt(jr)}function Nm(){return yt().memoizedState}function wm(){return yt().memoizedState}function bg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ha();e=Bl(a);var l=ql(t,e,a);l!==null&&(ra(l,t,a),er(l,t,a)),t={cache:yc()},e.payload=t;return}t=t.return}}function Sg(e,t,a){var l=ha();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},_s(e)?Rm(t,a):(a=uc(e,t,a,l),a!==null&&(ra(a,e,l),Tm(a,t,l)))}function Em(e,t,a){var l=ha();ir(e,t,a,l)}function ir(e,t,a,l){var r={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(_s(e))Rm(t,r);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var m=t.lastRenderedState,g=u(m,a);if(r.hasEagerState=!0,r.eagerState=g,ua(g,m))return ms(e,t,r,0),rt===null&&ds(),!1}catch{}finally{}if(a=uc(e,t,r,l),a!==null)return ra(a,e,l),Tm(a,t,l),!0}return!1}function Xc(e,t,a,l){if(l={lane:2,revertLane:wo(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},_s(e)){if(t)throw Error(o(479))}else t=uc(e,a,l,2),t!==null&&ra(t,e,2)}function _s(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function Rm(e,t){ii=Rs=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Tm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,ls(e,a)}}var rr={readContext:Lt,use:Cs,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};rr.useEffectEvent=pt;var Dm={readContext:Lt,use:Cs,useCallback:function(e,t){return Wt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:fm,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,As(4194308,4,pm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){As(4,2,e,t)},useMemo:function(e,t){var a=Wt();t=t===void 0?null:t;var l=e();if(Nn){Mt(!0);try{e()}finally{Mt(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Wt();if(a!==void 0){var r=a(t);if(Nn){Mt(!0);try{a(t)}finally{Mt(!1)}}}else r=t;return l.memoizedState=l.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=Sg.bind(null,Ce,e),[l.memoizedState,e]},useRef:function(e){var t=Wt();return e={current:e},t.memoizedState=e},useState:function(e){e=Hc(e);var t=e.queue,a=Em.bind(null,Ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:$c,useDeferredValue:function(e,t){var a=Wt();return Yc(a,e,t)},useTransition:function(){var e=Hc(!1);return e=bm.bind(null,Ce,e.queue,!0,!1),Wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Ce,r=Wt();if(Be){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),rt===null)throw Error(o(349));(Ue&127)!==0||Fd(l,t,a)}r.memoizedState=a;var u={value:a,getSnapshot:t};return r.queue=u,fm(Wd.bind(null,l,u,e),[e]),l.flags|=2048,si(9,{destroy:void 0},Jd.bind(null,l,u,a,t),null),a},useId:function(){var e=Wt(),t=rt.identifierPrefix;if(Be){var a=Qa,l=Xa;a=(l&~(1<<32-$t(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ts++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=hg++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vc,useFormState:rm,useActionState:rm,useOptimistic:function(e){var t=Wt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Xc.bind(null,Ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:kc,useCacheRefresh:function(){return Wt().memoizedState=bg.bind(null,Ce)},useEffectEvent:function(e){var t=Wt(),a={impl:e};return t.memoizedState=a,function(){if((Ze&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Qc={readContext:Lt,use:Cs,useCallback:xm,useContext:Lt,useEffect:qc,useImperativeHandle:vm,useInsertionEffect:mm,useLayoutEffect:hm,useMemo:gm,useReducer:Ms,useRef:om,useState:function(){return Ms(gl)},useDebugValue:$c,useDeferredValue:function(e,t){var a=yt();return ym(a,at.memoizedState,e,t)},useTransition:function(){var e=Ms(gl)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:nr(e),t]},useSyncExternalStore:Kd,useId:Nm,useHostTransitionStatus:Vc,useFormState:sm,useActionState:sm,useOptimistic:function(e,t){var a=yt();return em(a,at,e,t)},useMemoCache:kc,useCacheRefresh:wm};Qc.useEffectEvent=dm;var Cm={readContext:Lt,use:Cs,useCallback:xm,useContext:Lt,useEffect:qc,useImperativeHandle:vm,useInsertionEffect:mm,useLayoutEffect:hm,useMemo:gm,useReducer:Lc,useRef:om,useState:function(){return Lc(gl)},useDebugValue:$c,useDeferredValue:function(e,t){var a=yt();return at===null?Yc(a,e,t):ym(a,at.memoizedState,e,t)},useTransition:function(){var e=Lc(gl)[0],t=yt().memoizedState;return[typeof e=="boolean"?e:nr(e),t]},useSyncExternalStore:Kd,useId:Nm,useHostTransitionStatus:Vc,useFormState:cm,useActionState:cm,useOptimistic:function(e,t){var a=yt();return at!==null?em(a,at,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:kc,useCacheRefresh:wm};Cm.useEffectEvent=dm;function Zc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:y({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Kc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=ha(),r=Bl(l);r.payload=t,a!=null&&(r.callback=a),t=ql(e,r,l),t!==null&&(ra(t,e,l),er(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=ha(),r=Bl(l);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=ql(e,r,l),t!==null&&(ra(t,e,l),er(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=ha(),l=Bl(a);l.tag=2,t!=null&&(l.callback=t),t=ql(e,l,a),t!==null&&(ra(t,e,a),er(t,e,a))}};function Mm(e,t,a,l,r,u,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,m):t.prototype&&t.prototype.isPureReactComponent?!Qi(a,l)||!Qi(r,u):!0}function Am(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Kc.enqueueReplaceState(t,t.state,null)}function wn(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=y({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function zm(e){fs(e)}function _m(e){console.error(e)}function Om(e){fs(e)}function Os(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function km(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Fc(e,t,a){return a=Bl(a),a.tag=3,a.payload={element:null},a.callback=function(){Os(e,t)},a}function Um(e){return e=Bl(e),e.tag=3,e}function Lm(e,t,a,l){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var u=l.value;e.payload=function(){return r(u)},e.callback=function(){km(t,a,l)}}var m=a.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){km(t,a,l),typeof r!="function"&&(Ql===null?Ql=new Set([this]):Ql.add(this));var g=l.stack;this.componentDidCatch(l.value,{componentStack:g!==null?g:""})})}function jg(e,t,a,l,r){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Pn(t,a,r,!0),a=oa.current,a!==null){switch(a.tag){case 31:case 13:return Ea===null?Qs():a.alternate===null&&vt===0&&(vt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,l===Ss?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),So(e,l,r)),!1;case 22:return a.flags|=65536,l===Ss?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),So(e,l,r)),!1}throw Error(o(435,a.tag))}return So(e,l,r),Qs(),!1}if(Be)return t=oa.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,l!==hc&&(e=Error(o(422),{cause:l}),Fi(Sa(e,a)))):(l!==hc&&(t=Error(o(423),{cause:l}),Fi(Sa(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,l=Sa(l,a),r=Fc(e.stateNode,l,r),Ec(e,r),vt!==4&&(vt=2)),!1;var u=Error(o(520),{cause:l});if(u=Sa(u,a),hr===null?hr=[u]:hr.push(u),vt!==4&&(vt=2),t===null)return!0;l=Sa(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Fc(a.stateNode,l,e),Ec(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ql===null||!Ql.has(u))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Um(r),Lm(r,e,a,l),Ec(a,r),!1}a=a.return}while(a!==null);return!1}var Jc=Error(o(461)),Rt=!1;function Ht(e,t,a,l){t.child=e===null?$d(t,null,a,l):jn(t,e.child,a,l)}function Hm(e,t,a,l,r){a=a.render;var u=t.ref;if("ref"in l){var m={};for(var g in l)g!=="ref"&&(m[g]=l[g])}else m=l;return gn(t),l=Ac(e,t,a,m,u,r),g=zc(),e!==null&&!Rt?(_c(e,t,r),yl(e,t,r)):(Be&&g&&dc(t),t.flags|=1,Ht(e,t,l,r),t.child)}function Bm(e,t,a,l,r){if(e===null){var u=a.type;return typeof u=="function"&&!cc(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,qm(e,t,u,l,r)):(e=ps(a.type,null,l,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!no(e,r)){var m=u.memoizedProps;if(a=a.compare,a=a!==null?a:Qi,a(m,l)&&e.ref===t.ref)return yl(e,t,r)}return t.flags|=1,e=ml(u,l),e.ref=t.ref,e.return=t,t.child=e}function qm(e,t,a,l,r){if(e!==null){var u=e.memoizedProps;if(Qi(u,l)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=l=u,no(e,r))(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,yl(e,t,r)}return Wc(e,t,a,l,r)}function $m(e,t,a,l){var r=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,r=0;l!==null;)r=r|l.lanes|l.childLanes,l=l.sibling;l=r&~u}else l=0,t.child=null;return Ym(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ys(t,u!==null?u.cachePool:null),u!==null?Vd(t,u):Tc(),Xd(t);else return l=t.lanes=536870912,Ym(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(ys(t,u.cachePool),Vd(t,u),Yl(),t.memoizedState=null):(e!==null&&ys(t,null),Tc(),Yl());return Ht(e,t,r,a),t.child}function sr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ym(e,t,a,l,r){var u=Sc();return u=u===null?null:{parent:wt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&ys(t,null),Tc(),Xd(t),e!==null&&Pn(e,t,l,!0),t.childLanes=r,null}function ks(e,t){return t=Ls({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Gm(e,t,a){return jn(t,e.child,null,a),e=ks(t,t.pendingProps),e.flags|=2,fa(t),t.memoizedState=null,e}function Ng(e,t,a){var l=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(l.mode==="hidden")return e=ks(t,l),t.lanes=536870912,sr(null,e);if(Cc(t),(e=ot)?(e=tp(e,wa),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ol!==null?{id:Xa,overflow:Qa}:null,retryLane:536870912,hydrationErrors:null},a=Rd(e),a.return=t,t.child=a,Ut=t,ot=null)):e=null,e===null)throw Ul(t);return t.lanes=536870912,null}return ks(t,l)}var u=e.memoizedState;if(u!==null){var m=u.dehydrated;if(Cc(t),r)if(t.flags&256)t.flags&=-257,t=Gm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Rt||Pn(e,t,a,!1),r=(a&e.childLanes)!==0,Rt||r){if(l=rt,l!==null&&(m=E(l,a),m!==0&&m!==u.retryLane))throw u.retryLane=m,hn(e,m),ra(l,e,m),Jc;Qs(),t=Gm(e,t,a)}else e=u.treeContext,ot=Ra(m.nextSibling),Ut=t,Be=!0,kl=null,wa=!1,e!==null&&Cd(t,e),t=ks(t,l),t.flags|=4096;return t}return e=ml(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Us(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 Wc(e,t,a,l,r){return gn(t),a=Ac(e,t,a,l,void 0,r),l=zc(),e!==null&&!Rt?(_c(e,t,r),yl(e,t,r)):(Be&&l&&dc(t),t.flags|=1,Ht(e,t,a,r),t.child)}function Vm(e,t,a,l,r,u){return gn(t),t.updateQueue=null,a=Zd(t,l,a,r),Qd(e),l=zc(),e!==null&&!Rt?(_c(e,t,u),yl(e,t,u)):(Be&&l&&dc(t),t.flags|=1,Ht(e,t,a,u),t.child)}function Xm(e,t,a,l,r){if(gn(t),t.stateNode===null){var u=Fn,m=a.contextType;typeof m=="object"&&m!==null&&(u=Lt(m)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Kc,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Nc(t),m=a.contextType,u.context=typeof m=="object"&&m!==null?Lt(m):Fn,u.state=t.memoizedState,m=a.getDerivedStateFromProps,typeof m=="function"&&(Zc(t,a,m,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(m=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),m!==u.state&&Kc.enqueueReplaceState(u,u.state,null),ar(t,l,u,r),tr(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var g=t.memoizedProps,w=wn(a,g);u.props=w;var O=u.context,$=a.contextType;m=Fn,typeof $=="object"&&$!==null&&(m=Lt($));var G=a.getDerivedStateFromProps;$=typeof G=="function"||typeof u.getSnapshotBeforeUpdate=="function",g=t.pendingProps!==g,$||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g||O!==m)&&Am(t,u,l,m),Hl=!1;var U=t.memoizedState;u.state=U,ar(t,l,u,r),tr(),O=t.memoizedState,g||U!==O||Hl?(typeof G=="function"&&(Zc(t,a,G,l),O=t.memoizedState),(w=Hl||Mm(t,a,w,l,U,O,m))?($||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=O),u.props=l,u.state=O,u.context=m,l=w):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,wc(e,t),m=t.memoizedProps,$=wn(a,m),u.props=$,G=t.pendingProps,U=u.context,O=a.contextType,w=Fn,typeof O=="object"&&O!==null&&(w=Lt(O)),g=a.getDerivedStateFromProps,(O=typeof g=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(m!==G||U!==w)&&Am(t,u,l,w),Hl=!1,U=t.memoizedState,u.state=U,ar(t,l,u,r),tr();var L=t.memoizedState;m!==G||U!==L||Hl||e!==null&&e.dependencies!==null&&xs(e.dependencies)?(typeof g=="function"&&(Zc(t,a,g,l),L=t.memoizedState),($=Hl||Mm(t,a,$,l,U,L,w)||e!==null&&e.dependencies!==null&&xs(e.dependencies))?(O||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,L,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,L,w)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||m===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=L),u.props=l,u.state=L,u.context=w,l=$):(typeof u.componentDidUpdate!="function"||m===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,Us(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=jn(t,e.child,null,r),t.child=jn(t,null,a,r)):Ht(e,t,a,r),t.memoizedState=u.state,e=t.child):e=yl(e,t,r),e}function Qm(e,t,a,l){return vn(),t.flags|=256,Ht(e,t,a,l),t.child}var Ic={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(e){return{baseLanes:e,cachePool:kd()}}function eo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=ma),e}function Zm(e,t,a){var l=t.pendingProps,r=!1,u=(t.flags&128)!==0,m;if((m=u)||(m=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),m&&(r=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(r?$l(t):Yl(),(e=ot)?(e=tp(e,wa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ol!==null?{id:Xa,overflow:Qa}:null,retryLane:536870912,hydrationErrors:null},a=Rd(e),a.return=t,t.child=a,Ut=t,ot=null)):e=null,e===null)throw Ul(t);return Lo(e)?t.lanes=32:t.lanes=536870912,null}var g=l.children;return l=l.fallback,r?(Yl(),r=t.mode,g=Ls({mode:"hidden",children:g},r),l=pn(l,r,a,null),g.return=t,l.return=t,g.sibling=l,t.child=g,l=t.child,l.memoizedState=Pc(a),l.childLanes=eo(e,m,a),t.memoizedState=Ic,sr(null,l)):($l(t),to(t,g))}var w=e.memoizedState;if(w!==null&&(g=w.dehydrated,g!==null)){if(u)t.flags&256?($l(t),t.flags&=-257,t=ao(e,t,a)):t.memoizedState!==null?(Yl(),t.child=e.child,t.flags|=128,t=null):(Yl(),g=l.fallback,r=t.mode,l=Ls({mode:"visible",children:l.children},r),g=pn(g,r,a,null),g.flags|=2,l.return=t,g.return=t,l.sibling=g,t.child=l,jn(t,e.child,null,a),l=t.child,l.memoizedState=Pc(a),l.childLanes=eo(e,m,a),t.memoizedState=Ic,t=sr(null,l));else if($l(t),Lo(g)){if(m=g.nextSibling&&g.nextSibling.dataset,m)var O=m.dgst;m=O,l=Error(o(419)),l.stack="",l.digest=m,Fi({value:l,source:null,stack:null}),t=ao(e,t,a)}else if(Rt||Pn(e,t,a,!1),m=(a&e.childLanes)!==0,Rt||m){if(m=rt,m!==null&&(l=E(m,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,hn(e,l),ra(m,e,l),Jc;Uo(g)||Qs(),t=ao(e,t,a)}else Uo(g)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,ot=Ra(g.nextSibling),Ut=t,Be=!0,kl=null,wa=!1,e!==null&&Cd(t,e),t=to(t,l.children),t.flags|=4096);return t}return r?(Yl(),g=l.fallback,r=t.mode,w=e.child,O=w.sibling,l=ml(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,O!==null?g=ml(O,g):(g=pn(g,r,a,null),g.flags|=2),g.return=t,l.return=t,l.sibling=g,t.child=l,sr(null,l),l=t.child,g=e.child.memoizedState,g===null?g=Pc(a):(r=g.cachePool,r!==null?(w=wt._currentValue,r=r.parent!==w?{parent:w,pool:w}:r):r=kd(),g={baseLanes:g.baseLanes|a,cachePool:r}),l.memoizedState=g,l.childLanes=eo(e,m,a),t.memoizedState=Ic,sr(e.child,l)):($l(t),a=e.child,e=a.sibling,a=ml(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=a,t.memoizedState=null,a)}function to(e,t){return t=Ls({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ls(e,t){return e=ca(22,e,null,t),e.lanes=0,e}function ao(e,t,a){return jn(t,e.child,null,a),e=to(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Km(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),xc(e.return,t,a)}function lo(e,t,a,l,r,u){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:r,treeForkCount:u}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=a,m.tailMode=r,m.treeForkCount=u)}function Fm(e,t,a){var l=t.pendingProps,r=l.revealOrder,u=l.tail;l=l.children;var m=gt.current,g=(m&2)!==0;if(g?(m=m&1|2,t.flags|=128):m&=1,K(gt,m),Ht(e,t,l,a),l=Be?Ki:0,!g&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Km(e,a,t);else if(e.tag===19)Km(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(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Es(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),lo(t,!1,r,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Es(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}lo(t,!0,a,null,u,l);break;case"together":lo(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function yl(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Xl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Pn(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=ml(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ml(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function no(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&xs(e)))}function wg(e,t,a){switch(t.tag){case 3:We(t,t.stateNode.containerInfo),Ll(t,wt,e.memoizedState.cache),vn();break;case 27:case 5:nl(t);break;case 4:We(t,t.stateNode.containerInfo);break;case 10:Ll(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Cc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?($l(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Zm(e,t,a):($l(t),e=yl(e,t,a),e!==null?e.sibling:null);$l(t);break;case 19:var r=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Pn(e,t,a,!1),l=(a&t.childLanes)!==0),r){if(l)return Fm(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),K(gt,gt.current),l)break;return null;case 22:return t.lanes=0,$m(e,t,a,t.pendingProps);case 24:Ll(t,wt,e.memoizedState.cache)}return yl(e,t,a)}function Jm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Rt=!0;else{if(!no(e,a)&&(t.flags&128)===0)return Rt=!1,wg(e,t,a);Rt=(e.flags&131072)!==0}else Rt=!1,Be&&(t.flags&1048576)!==0&&Dd(t,Ki,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=bn(t.elementType),t.type=e,typeof e=="function")cc(e)?(l=wn(e,l),t.tag=1,t=Xm(null,t,e,l,a)):(t.tag=0,t=Wc(null,t,e,l,a));else{if(e!=null){var r=e.$$typeof;if(r===ee){t.tag=11,t=Hm(null,t,e,l,a);break e}else if(r===le){t.tag=14,t=Bm(null,t,e,l,a);break e}}throw t=Te(e)||e,Error(o(306,t,""))}}return t;case 0:return Wc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,r=wn(l,t.pendingProps),Xm(e,t,l,r,a);case 3:e:{if(We(t,t.stateNode.containerInfo),e===null)throw Error(o(387));l=t.pendingProps;var u=t.memoizedState;r=u.element,wc(e,t),ar(t,l,null,a);var m=t.memoizedState;if(l=m.cache,Ll(t,wt,l),l!==u.cache&&gc(t,[wt],a,!0),tr(),l=m.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Qm(e,t,l,a);break e}else if(l!==r){r=Sa(Error(o(424)),t),Fi(r),t=Qm(e,t,l,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(ot=Ra(e.firstChild),Ut=t,Be=!0,kl=null,wa=!0,a=$d(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(vn(),l===r){t=yl(e,t,a);break e}Ht(e,t,l,a)}t=t.child}return t;case 26:return Us(e,t),e===null?(a=sp(t.type,null,t.pendingProps,null))?t.memoizedState=a:Be||(a=t.type,e=t.pendingProps,l=Ps(fe.current).createElement(a),l[P]=t,l[oe]=e,Bt(l,a,e),$e(l),t.stateNode=l):t.memoizedState=sp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return nl(t),e===null&&Be&&(l=t.stateNode=np(t.type,t.pendingProps,fe.current),Ut=t,wa=!0,r=ot,Jl(t.type)?(Ho=r,ot=Ra(l.firstChild)):ot=r),Ht(e,t,t.pendingProps.children,a),Us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((r=l=ot)&&(l=ey(l,t.type,t.pendingProps,wa),l!==null?(t.stateNode=l,Ut=t,ot=Ra(l.firstChild),wa=!1,r=!0):r=!1),r||Ul(t)),nl(t),r=t.type,u=t.pendingProps,m=e!==null?e.memoizedProps:null,l=u.children,_o(r,u)?l=null:m!==null&&_o(r,m)&&(t.flags|=32),t.memoizedState!==null&&(r=Ac(e,t,pg,null,null,a),jr._currentValue=r),Us(e,t),Ht(e,t,l,a),t.child;case 6:return e===null&&Be&&((e=a=ot)&&(a=ty(a,t.pendingProps,wa),a!==null?(t.stateNode=a,Ut=t,ot=null,e=!0):e=!1),e||Ul(t)),null;case 13:return Zm(e,t,a);case 4:return We(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=jn(t,null,l,a):Ht(e,t,l,a),t.child;case 11:return Hm(e,t,t.type,t.pendingProps,a);case 7:return Ht(e,t,t.pendingProps,a),t.child;case 8:return Ht(e,t,t.pendingProps.children,a),t.child;case 12:return Ht(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Ll(t,t.type,l.value),Ht(e,t,l.children,a),t.child;case 9:return r=t.type._context,l=t.pendingProps.children,gn(t),r=Lt(r),l=l(r),t.flags|=1,Ht(e,t,l,a),t.child;case 14:return Bm(e,t,t.type,t.pendingProps,a);case 15:return qm(e,t,t.type,t.pendingProps,a);case 19:return Fm(e,t,a);case 31:return Ng(e,t,a);case 22:return $m(e,t,a,t.pendingProps);case 24:return gn(t),l=Lt(wt),e===null?(r=Sc(),r===null&&(r=rt,u=yc(),r.pooledCache=u,u.refCount++,u!==null&&(r.pooledCacheLanes|=a),r=u),t.memoizedState={parent:l,cache:r},Nc(t),Ll(t,wt,r)):((e.lanes&a)!==0&&(wc(e,t),ar(t,null,null,a),tr()),r=e.memoizedState,u=t.memoizedState,r.parent!==l?(r={parent:l,cache:l},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Ll(t,wt,l)):(l=u.cache,Ll(t,wt,l),l!==r.cache&&gc(t,[wt],a,!0))),Ht(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function bl(e){e.flags|=4}function io(e,t,a,l,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Nh())e.flags|=8192;else throw Sn=Ss,jc}else e.flags&=-16777217}function Wm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!dp(t))if(Nh())e.flags|=8192;else throw Sn=Ss,jc}function Hs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Li():536870912,e.lanes|=t,fi|=t)}function ur(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ft(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags&65011712,l|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,l|=r.subtreeFlags,l|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Eg(e,t,a){var l=t.pendingProps;switch(mc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return ft(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),vl(wt),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(In(t)?bl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,pc())),ft(t),null;case 26:var r=t.type,u=t.memoizedState;return e===null?(bl(t),u!==null?(ft(t),Wm(t,u)):(ft(t),io(t,r,null,l,a))):u?u!==e.memoizedState?(bl(t),ft(t),Wm(t,u)):(ft(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&bl(t),ft(t),io(t,r,e,l,a)),null;case 27:if(Cl(t),a=fe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&bl(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ft(t),null}e=J.current,In(t)?Md(t):(e=np(r,l,a),t.stateNode=e,bl(t))}return ft(t),null;case 5:if(Cl(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&bl(t);else{if(!l){if(t.stateNode===null)throw Error(o(166));return ft(t),null}if(u=J.current,In(t))Md(t);else{var m=Ps(fe.current);switch(u){case 1:u=m.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:u=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":u=m.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":u=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":u=m.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?m.createElement("select",{is:l.is}):m.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?m.createElement(r,{is:l.is}):m.createElement(r)}}u[P]=t,u[oe]=l;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)u.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=u;e:switch(Bt(u,r,l),r){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&bl(t)}}return ft(t),io(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&bl(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=fe.current,In(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,r=Ut,r!==null)switch(r.tag){case 27:case 5:l=r.memoizedProps}e[P]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Zh(e.nodeValue,a)),e||Ul(t,!0)}else e=Ps(e).createTextNode(l),e[P]=t,t.stateNode=e}return ft(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=In(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[P]=t}else vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),e=!1}else a=pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(fa(t),t):(fa(t),null);if((t.flags&128)!==0)throw Error(o(558))}return ft(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=In(t),l!==null&&l.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[P]=t}else vn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),r=!1}else r=pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(fa(t),t):(fa(t),null)}return fa(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,r=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(r=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==r&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Hs(t,t.updateQueue),ft(t),null);case 4:return Qe(),e===null&&Do(t.stateNode.containerInfo),ft(t),null;case 10:return vl(t.type),ft(t),null;case 19:if(q(gt),l=t.memoizedState,l===null)return ft(t),null;if(r=(t.flags&128)!==0,u=l.rendering,u===null)if(r)ur(l,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Es(e),u!==null){for(t.flags|=128,ur(l,!1),e=u.updateQueue,t.updateQueue=e,Hs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Ed(a,e),a=a.sibling;return K(gt,gt.current&1|2),Be&&hl(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&dt()>Gs&&(t.flags|=128,r=!0,ur(l,!1),t.lanes=4194304)}else{if(!r)if(e=Es(u),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Hs(t,e),ur(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Be)return ft(t),null}else 2*dt()-l.renderingStartTime>Gs&&a!==536870912&&(t.flags|=128,r=!0,ur(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=dt(),e.sibling=null,a=gt.current,K(gt,r?a&1|2:a&1),Be&&hl(t,l.treeForkCount),e):(ft(t),null);case 22:case 23:return fa(t),Dc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),a=t.updateQueue,a!==null&&Hs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&q(yn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),vl(wt),ft(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Rg(e,t){switch(mc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vl(wt),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Cl(t),null;case 31:if(t.memoizedState!==null){if(fa(t),t.alternate===null)throw Error(o(340));vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(gt),null;case 4:return Qe(),null;case 10:return vl(t.type),null;case 22:case 23:return fa(t),Dc(),e!==null&&q(yn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return vl(wt),null;case 25:return null;default:return null}}function Im(e,t){switch(mc(t),t.tag){case 3:vl(wt),Qe();break;case 26:case 27:case 5:Cl(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&fa(t);break;case 13:fa(t);break;case 19:q(gt);break;case 10:vl(t.type);break;case 22:case 23:fa(t),Dc(),e!==null&&q(yn);break;case 24:vl(wt)}}function cr(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var r=l.next;a=r;do{if((a.tag&e)===e){l=void 0;var u=a.create,m=a.inst;l=u(),m.destroy=l}a=a.next}while(a!==r)}}catch(g){et(t,t.return,g)}}function Gl(e,t,a){try{var l=t.updateQueue,r=l!==null?l.lastEffect:null;if(r!==null){var u=r.next;l=u;do{if((l.tag&e)===e){var m=l.inst,g=m.destroy;if(g!==void 0){m.destroy=void 0,r=t;var w=a,O=g;try{O()}catch($){et(r,w,$)}}}l=l.next}while(l!==u)}}catch($){et(t,t.return,$)}}function Pm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Gd(t,a)}catch(l){et(e,e.return,l)}}}function eh(e,t,a){a.props=wn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){et(e,t,l)}}function or(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(r){et(e,t,r)}}function Za(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(r){et(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){et(e,t,r)}else a.current=null}function th(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(r){et(e,e.return,r)}}function ro(e,t,a){try{var l=e.stateNode;Kg(l,e.type,a,t),l[oe]=t}catch(r){et(e,e.return,r)}}function ah(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Jl(e.type)||e.tag===4}function so(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ah(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&&Jl(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 uo(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=fl));else if(l!==4&&(l===27&&Jl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(uo(e,t,a),e=e.sibling;e!==null;)uo(e,t,a),e=e.sibling}function Bs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Jl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Bs(e,t,a),e=e.sibling;e!==null;)Bs(e,t,a),e=e.sibling}function lh(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Bt(t,l,a),t[P]=e,t[oe]=a}catch(u){et(e,e.return,u)}}var Sl=!1,Tt=!1,co=!1,nh=typeof WeakSet=="function"?WeakSet:Set,At=null;function Tg(e,t){if(e=e.containerInfo,Ao=ru,e=vd(e),ac(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var r=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var m=0,g=-1,w=-1,O=0,$=0,G=e,U=null;t:for(;;){for(var L;G!==a||r!==0&&G.nodeType!==3||(g=m+r),G!==u||l!==0&&G.nodeType!==3||(w=m+l),G.nodeType===3&&(m+=G.nodeValue.length),(L=G.firstChild)!==null;)U=G,G=L;for(;;){if(G===e)break t;if(U===a&&++O===r&&(g=m),U===u&&++$===l&&(w=m),(L=G.nextSibling)!==null)break;G=U,U=G.parentNode}G=L}a=g===-1||w===-1?null:{start:g,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(zo={focusedElem:e,selectionRange:a},ru=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,r=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var ie=wn(a.type,r);e=l.getSnapshotBeforeUpdate(ie,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(ge){et(a,a.return,ge)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)ko(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ko(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,At=e;break}At=t.return}}function ih(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Nl(e,a),l&4&&cr(5,a);break;case 1:if(Nl(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(m){et(a,a.return,m)}else{var r=wn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){et(a,a.return,m)}}l&64&&Pm(a),l&512&&or(a,a.return);break;case 3:if(Nl(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Gd(e,t)}catch(m){et(a,a.return,m)}}break;case 27:t===null&&l&4&&lh(a);case 26:case 5:Nl(e,a),t===null&&l&4&&th(a),l&512&&or(a,a.return);break;case 12:Nl(e,a);break;case 31:Nl(e,a),l&4&&uh(e,a);break;case 13:Nl(e,a),l&4&&ch(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ug.bind(null,a),ay(e,a))));break;case 22:if(l=a.memoizedState!==null||Sl,!l){t=t!==null&&t.memoizedState!==null||Tt,r=Sl;var u=Tt;Sl=l,(Tt=t)&&!u?wl(e,a,(a.subtreeFlags&8772)!==0):Nl(e,a),Sl=r,Tt=u}break;case 30:break;default:Nl(e,a)}}function rh(e){var t=e.alternate;t!==null&&(e.alternate=null,rh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ge(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 mt=null,aa=!1;function jl(e,t,a){for(a=a.child;a!==null;)sh(e,t,a),a=a.sibling}function sh(e,t,a){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(rl,a)}catch{}switch(a.tag){case 26:Tt||Za(a,t),jl(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Tt||Za(a,t);var l=mt,r=aa;Jl(a.type)&&(mt=a.stateNode,aa=!1),jl(e,t,a),yr(a.stateNode),mt=l,aa=r;break;case 5:Tt||Za(a,t);case 6:if(l=mt,r=aa,mt=null,jl(e,t,a),mt=l,aa=r,mt!==null)if(aa)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(u){et(a,t,u)}else try{mt.removeChild(a.stateNode)}catch(u){et(a,t,u)}break;case 18:mt!==null&&(aa?(e=mt,Ph(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),yi(e)):Ph(mt,a.stateNode));break;case 4:l=mt,r=aa,mt=a.stateNode.containerInfo,aa=!0,jl(e,t,a),mt=l,aa=r;break;case 0:case 11:case 14:case 15:Gl(2,a,t),Tt||Gl(4,a,t),jl(e,t,a);break;case 1:Tt||(Za(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&eh(a,t,l)),jl(e,t,a);break;case 21:jl(e,t,a);break;case 22:Tt=(l=Tt)||a.memoizedState!==null,jl(e,t,a),Tt=l;break;default:jl(e,t,a)}}function uh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yi(e)}catch(a){et(t,t.return,a)}}}function ch(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yi(e)}catch(a){et(t,t.return,a)}}function Dg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nh),t;default:throw Error(o(435,e.tag))}}function qs(e,t){var a=Dg(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var r=Lg.bind(null,e,l);l.then(r,r)}})}function la(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var r=a[l],u=e,m=t,g=m;e:for(;g!==null;){switch(g.tag){case 27:if(Jl(g.type)){mt=g.stateNode,aa=!1;break e}break;case 5:mt=g.stateNode,aa=!1;break e;case 3:case 4:mt=g.stateNode.containerInfo,aa=!0;break e}g=g.return}if(mt===null)throw Error(o(160));sh(u,m,r),mt=null,aa=!1,u=r.alternate,u!==null&&(u.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)oh(t,e),t=t.sibling}var qa=null;function oh(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:la(t,e),na(e),l&4&&(Gl(3,e,e.return),cr(3,e),Gl(5,e,e.return));break;case 1:la(t,e),na(e),l&512&&(Tt||a===null||Za(a,a.return)),l&64&&Sl&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var r=qa;if(la(t,e),na(e),l&512&&(Tt||a===null||Za(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(l){case"title":u=r.getElementsByTagName("title")[0],(!u||u[Ae]||u[P]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=r.createElement(l),r.head.insertBefore(u,r.querySelector("head > title"))),Bt(u,l,a),u[P]=e,$e(u),l=u;break e;case"link":var m=op("link","href",r).get(l+(a.href||""));if(m){for(var g=0;g<m.length;g++)if(u=m[g],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){m.splice(g,1);break t}}u=r.createElement(l),Bt(u,l,a),r.head.appendChild(u);break;case"meta":if(m=op("meta","content",r).get(l+(a.content||""))){for(g=0;g<m.length;g++)if(u=m[g],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){m.splice(g,1);break t}}u=r.createElement(l),Bt(u,l,a),r.head.appendChild(u);break;default:throw Error(o(468,l))}u[P]=e,$e(u),l=u}e.stateNode=l}else fp(r,e.type,e.stateNode);else e.stateNode=cp(r,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?fp(r,e.type,e.stateNode):cp(r,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ro(e,e.memoizedProps,a.memoizedProps)}break;case 27:la(t,e),na(e),l&512&&(Tt||a===null||Za(a,a.return)),a!==null&&l&4&&ro(e,e.memoizedProps,a.memoizedProps);break;case 5:if(la(t,e),na(e),l&512&&(Tt||a===null||Za(a,a.return)),e.flags&32){r=e.stateNode;try{Yn(r,"")}catch(ie){et(e,e.return,ie)}}l&4&&e.stateNode!=null&&(r=e.memoizedProps,ro(e,r,a!==null?a.memoizedProps:r)),l&1024&&(co=!0);break;case 6:if(la(t,e),na(e),l&4){if(e.stateNode===null)throw Error(o(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ie){et(e,e.return,ie)}}break;case 3:if(au=null,r=qa,qa=eu(t.containerInfo),la(t,e),qa=r,na(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{yi(t.containerInfo)}catch(ie){et(e,e.return,ie)}co&&(co=!1,fh(e));break;case 4:l=qa,qa=eu(e.stateNode.containerInfo),la(t,e),na(e),qa=l;break;case 12:la(t,e),na(e);break;case 31:la(t,e),na(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,qs(e,l)));break;case 13:la(t,e),na(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ys=dt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,qs(e,l)));break;case 22:r=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,O=Sl,$=Tt;if(Sl=O||r,Tt=$||w,la(t,e),Tt=$,Sl=O,na(e),l&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||w||Sl||Tt||En(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(u=w.stateNode,r)m=u.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{g=w.stateNode;var G=w.memoizedProps.style,U=G!=null&&G.hasOwnProperty("display")?G.display:null;g.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ie){et(w,w.return,ie)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=r?"":w.memoizedProps}catch(ie){et(w,w.return,ie)}}}else if(t.tag===18){if(a===null){w=t;try{var L=w.stateNode;r?ep(L,!0):ep(w.stateNode,!1)}catch(ie){et(w,w.return,ie)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,qs(e,a))));break;case 19:la(t,e),na(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,qs(e,l)));break;case 30:break;case 21:break;default:la(t,e),na(e)}}function na(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(ah(l)){a=l;break}l=l.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var r=a.stateNode,u=so(e);Bs(e,u,r);break;case 5:var m=a.stateNode;a.flags&32&&(Yn(m,""),a.flags&=-33);var g=so(e);Bs(e,g,m);break;case 3:case 4:var w=a.stateNode.containerInfo,O=so(e);uo(e,O,w);break;default:throw Error(o(161))}}catch($){et(e,e.return,$)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ih(e,t.alternate,t),t=t.sibling}function En(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Gl(4,t,t.return),En(t);break;case 1:Za(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&eh(t,t.return,a),En(t);break;case 27:yr(t.stateNode);case 26:case 5:Za(t,t.return),En(t);break;case 22:t.memoizedState===null&&En(t);break;case 30:En(t);break;default:En(t)}e=e.sibling}}function wl(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,r=e,u=t,m=u.flags;switch(u.tag){case 0:case 11:case 15:wl(r,u,a),cr(4,u);break;case 1:if(wl(r,u,a),l=u,r=l.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(O){et(l,l.return,O)}if(l=u,r=l.updateQueue,r!==null){var g=l.stateNode;try{var w=r.shared.hiddenCallbacks;if(w!==null)for(r.shared.hiddenCallbacks=null,r=0;r<w.length;r++)Yd(w[r],g)}catch(O){et(l,l.return,O)}}a&&m&64&&Pm(u),or(u,u.return);break;case 27:lh(u);case 26:case 5:wl(r,u,a),a&&l===null&&m&4&&th(u),or(u,u.return);break;case 12:wl(r,u,a);break;case 31:wl(r,u,a),a&&m&4&&uh(r,u);break;case 13:wl(r,u,a),a&&m&4&&ch(r,u);break;case 22:u.memoizedState===null&&wl(r,u,a),or(u,u.return);break;case 30:break;default:wl(r,u,a)}t=t.sibling}}function oo(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&&Ji(a))}function fo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ji(e))}function $a(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)dh(e,t,a,l),t=t.sibling}function dh(e,t,a,l){var r=t.flags;switch(t.tag){case 0:case 11:case 15:$a(e,t,a,l),r&2048&&cr(9,t);break;case 1:$a(e,t,a,l);break;case 3:$a(e,t,a,l),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ji(e)));break;case 12:if(r&2048){$a(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,m=u.id,g=u.onPostCommit;typeof g=="function"&&g(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){et(t,t.return,w)}}else $a(e,t,a,l);break;case 31:$a(e,t,a,l);break;case 13:$a(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,m=t.alternate,t.memoizedState!==null?u._visibility&2?$a(e,t,a,l):fr(e,t):u._visibility&2?$a(e,t,a,l):(u._visibility|=2,ui(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),r&2048&&oo(m,t);break;case 24:$a(e,t,a,l),r&2048&&fo(t.alternate,t);break;default:$a(e,t,a,l)}}function ui(e,t,a,l,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,m=t,g=a,w=l,O=m.flags;switch(m.tag){case 0:case 11:case 15:ui(u,m,g,w,r),cr(8,m);break;case 23:break;case 22:var $=m.stateNode;m.memoizedState!==null?$._visibility&2?ui(u,m,g,w,r):fr(u,m):($._visibility|=2,ui(u,m,g,w,r)),r&&O&2048&&oo(m.alternate,m);break;case 24:ui(u,m,g,w,r),r&&O&2048&&fo(m.alternate,m);break;default:ui(u,m,g,w,r)}t=t.sibling}}function fr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,r=l.flags;switch(l.tag){case 22:fr(a,l),r&2048&&oo(l.alternate,l);break;case 24:fr(a,l),r&2048&&fo(l.alternate,l);break;default:fr(a,l)}t=t.sibling}}var dr=8192;function ci(e,t,a){if(e.subtreeFlags&dr)for(e=e.child;e!==null;)mh(e,t,a),e=e.sibling}function mh(e,t,a){switch(e.tag){case 26:ci(e,t,a),e.flags&dr&&e.memoizedState!==null&&hy(a,qa,e.memoizedState,e.memoizedProps);break;case 5:ci(e,t,a);break;case 3:case 4:var l=qa;qa=eu(e.stateNode.containerInfo),ci(e,t,a),qa=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=dr,dr=16777216,ci(e,t,a),dr=l):ci(e,t,a));break;default:ci(e,t,a)}}function hh(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 mr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];At=l,vh(l,e)}hh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ph(e),e=e.sibling}function ph(e){switch(e.tag){case 0:case 11:case 15:mr(e),e.flags&2048&&Gl(9,e,e.return);break;case 3:mr(e);break;case 12:mr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,$s(e)):mr(e);break;default:mr(e)}}function $s(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];At=l,vh(l,e)}hh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Gl(8,t,t.return),$s(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,$s(t));break;default:$s(t)}e=e.sibling}}function vh(e,t){for(;At!==null;){var a=At;switch(a.tag){case 0:case 11:case 15:Gl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ji(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,At=l;else e:for(a=e;At!==null;){l=At;var r=l.sibling,u=l.return;if(rh(l),l===a){At=null;break e}if(r!==null){r.return=u,At=r;break e}At=u}}}var Cg={getCacheForType:function(e){var t=Lt(wt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Lt(wt).controller.signal}},Mg=typeof WeakMap=="function"?WeakMap:Map,Ze=0,rt=null,_e=null,Ue=0,Pe=0,da=null,Vl=!1,oi=!1,mo=!1,El=0,vt=0,Xl=0,Rn=0,ho=0,ma=0,fi=0,hr=null,ia=null,po=!1,Ys=0,xh=0,Gs=1/0,Vs=null,Ql=null,Ct=0,Zl=null,di=null,Rl=0,vo=0,xo=null,gh=null,pr=0,go=null;function ha(){return(Ze&2)!==0&&Ue!==0?Ue&-Ue:H.T!==null?wo():V()}function yh(){if(ma===0)if((Ue&536870912)===0||Be){var e=sl;sl<<=1,(sl&3932160)===0&&(sl=262144),ma=e}else ma=536870912;return e=oa.current,e!==null&&(e.flags|=32),ma}function ra(e,t,a){(e===rt&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)&&(mi(e,0),Kl(e,Ue,ma,!1)),Va(e,a),((Ze&2)===0||e!==rt)&&(e===rt&&((Ze&2)===0&&(Rn|=a),vt===4&&Kl(e,Ue,ma,!1)),Ka(e))}function bh(e,t,a){if((Ze&6)!==0)throw Error(o(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ml(e,t),r=l?_g(e,t):bo(e,t,!0),u=l;do{if(r===0){oi&&!l&&Kl(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Ag(a)){r=bo(e,t,!1),u=!1;continue}if(r===2){if(u=t,e.errorRecoveryDisabledLanes&u)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var g=e;r=hr;var w=g.current.memoizedState.isDehydrated;if(w&&(mi(g,m).flags|=256),m=bo(g,m,!1),m!==2){if(mo&&!w){g.errorRecoveryDisabledLanes|=u,Rn|=u,r=4;break e}u=ia,ia=r,u!==null&&(ia===null?ia=u:ia.push.apply(ia,u))}r=m}if(u=!1,r!==2)continue}}if(r===1){mi(e,0),Kl(e,t,0,!0);break}e:{switch(l=e,u=r,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Kl(l,t,ma,!Vl);break e;case 2:ia=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=Ys+300-dt(),10<r)){if(Kl(l,t,ma,!Vl),Un(l,0,!0)!==0)break e;Rl=t,l.timeoutHandle=Wh(Sh.bind(null,l,a,ia,Vs,po,t,ma,Rn,fi,Vl,u,"Throttled",-0,0),r);break e}Sh(l,a,ia,Vs,po,t,ma,Rn,fi,Vl,u,null,-0,0)}}break}while(!0);Ka(e)}function Sh(e,t,a,l,r,u,m,g,w,O,$,G,U,L){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fl},mh(t,u,G);var ie=(u&62914560)===u?Ys-dt():(u&4194048)===u?xh-dt():0;if(ie=py(G,ie),ie!==null){Rl=u,e.cancelPendingCommit=ie(Ch.bind(null,e,t,u,a,l,r,m,g,w,$,G,null,U,L)),Kl(e,u,m,!O);return}}Ch(e,t,u,a,l,r,m,g,w)}function Ag(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var r=a[l],u=r.getSnapshot;r=r.value;try{if(!ua(u(),r))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 Kl(e,t,a,l){t&=~ho,t&=~Rn,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var r=t;0<r;){var u=31-$t(r),m=1<<u;l[u]=-1,r&=~m}a!==0&&as(e,a,t)}function Xs(){return(Ze&6)===0?(vr(0),!1):!0}function yo(){if(_e!==null){if(Pe===0)var e=_e.return;else e=_e,pl=xn=null,Oc(e),li=null,Ii=0,e=_e;for(;e!==null;)Im(e.alternate,e),e=e.return;_e=null}}function mi(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Wg(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Rl=0,yo(),rt=e,_e=a=ml(e.current,null),Ue=t,Pe=0,da=null,Vl=!1,oi=Ml(e,t),mo=!1,fi=ma=ho=Rn=Xl=vt=0,ia=hr=null,po=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var r=31-$t(l),u=1<<r;t|=e[r],l&=~u}return El=t,ds(),a}function jh(e,t){Ce=null,H.H=rr,t===ai||t===bs?(t=Hd(),Pe=3):t===jc?(t=Hd(),Pe=4):Pe=t===Jc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,da=t,_e===null&&(vt=1,Os(e,Sa(t,e.current)))}function Nh(){var e=oa.current;return e===null?!0:(Ue&4194048)===Ue?Ea===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===Ea:!1}function wh(){var e=H.H;return H.H=rr,e===null?rr:e}function Eh(){var e=H.A;return H.A=Cg,e}function Qs(){vt=4,Vl||(Ue&4194048)!==Ue&&oa.current!==null||(oi=!0),(Xl&134217727)===0&&(Rn&134217727)===0||rt===null||Kl(rt,Ue,ma,!1)}function bo(e,t,a){var l=Ze;Ze|=2;var r=wh(),u=Eh();(rt!==e||Ue!==t)&&(Vs=null,mi(e,t)),t=!1;var m=vt;e:do try{if(Pe!==0&&_e!==null){var g=_e,w=da;switch(Pe){case 8:yo(),m=6;break e;case 3:case 2:case 9:case 6:oa.current===null&&(t=!0);var O=Pe;if(Pe=0,da=null,hi(e,g,w,O),a&&oi){m=0;break e}break;default:O=Pe,Pe=0,da=null,hi(e,g,w,O)}}zg(),m=vt;break}catch($){jh(e,$)}while(!0);return t&&e.shellSuspendCounter++,pl=xn=null,Ze=l,H.H=r,H.A=u,_e===null&&(rt=null,Ue=0,ds()),m}function zg(){for(;_e!==null;)Rh(_e)}function _g(e,t){var a=Ze;Ze|=2;var l=wh(),r=Eh();rt!==e||Ue!==t?(Vs=null,Gs=dt()+500,mi(e,t)):oi=Ml(e,t);e:do try{if(Pe!==0&&_e!==null){t=_e;var u=da;t:switch(Pe){case 1:Pe=0,da=null,hi(e,t,u,1);break;case 2:case 9:if(Ud(u)){Pe=0,da=null,Th(t);break}t=function(){Pe!==2&&Pe!==9||rt!==e||(Pe=7),Ka(e)},u.then(t,t);break e;case 3:Pe=7;break e;case 4:Pe=5;break e;case 7:Ud(u)?(Pe=0,da=null,Th(t)):(Pe=0,da=null,hi(e,t,u,7));break;case 5:var m=null;switch(_e.tag){case 26:m=_e.memoizedState;case 5:case 27:var g=_e;if(m?dp(m):g.stateNode.complete){Pe=0,da=null;var w=g.sibling;if(w!==null)_e=w;else{var O=g.return;O!==null?(_e=O,Zs(O)):_e=null}break t}}Pe=0,da=null,hi(e,t,u,5);break;case 6:Pe=0,da=null,hi(e,t,u,6);break;case 8:yo(),vt=6;break e;default:throw Error(o(462))}}Og();break}catch($){jh(e,$)}while(!0);return pl=xn=null,H.H=l,H.A=r,Ze=a,_e!==null?0:(rt=null,Ue=0,ds(),vt)}function Og(){for(;_e!==null&&!_a();)Rh(_e)}function Rh(e){var t=Jm(e.alternate,e,El);e.memoizedProps=e.pendingProps,t===null?Zs(e):_e=t}function Th(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Vm(a,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=Vm(a,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Oc(t);default:Im(a,t),t=_e=Ed(t,El),t=Jm(a,t,El)}e.memoizedProps=e.pendingProps,t===null?Zs(e):_e=t}function hi(e,t,a,l){pl=xn=null,Oc(t),li=null,Ii=0;var r=t.return;try{if(jg(e,r,t,a,Ue)){vt=1,Os(e,Sa(a,e.current)),_e=null;return}}catch(u){if(r!==null)throw _e=r,u;vt=1,Os(e,Sa(a,e.current)),_e=null;return}t.flags&32768?(Be||l===1?e=!0:oi||(Ue&536870912)!==0?e=!1:(Vl=e=!0,(l===2||l===9||l===3||l===6)&&(l=oa.current,l!==null&&l.tag===13&&(l.flags|=16384))),Dh(t,e)):Zs(t)}function Zs(e){var t=e;do{if((t.flags&32768)!==0){Dh(t,Vl);return}e=t.return;var a=Eg(t.alternate,t,El);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);vt===0&&(vt=5)}function Dh(e,t){do{var a=Rg(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);vt=6,_e=null}function Ch(e,t,a,l,r,u,m,g,w){e.cancelPendingCommit=null;do Ks();while(Ct!==0);if((Ze&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=sc,ts(e,a,u,m,g,w),e===rt&&(_e=rt=null,Ue=0),di=t,Zl=e,Rl=a,vo=u,xo=r,gh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Hg(kt,function(){return Oh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=H.T,H.T=null,r=X.p,X.p=2,m=Ze,Ze|=4;try{Tg(e,t,a)}finally{Ze=m,X.p=r,H.T=l}}Ct=1,Mh(),Ah(),zh()}}function Mh(){if(Ct===1){Ct=0;var e=Zl,t=di,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var l=X.p;X.p=2;var r=Ze;Ze|=4;try{oh(t,e);var u=zo,m=vd(e.containerInfo),g=u.focusedElem,w=u.selectionRange;if(m!==g&&g&&g.ownerDocument&&pd(g.ownerDocument.documentElement,g)){if(w!==null&&ac(g)){var O=w.start,$=w.end;if($===void 0&&($=O),"selectionStart"in g)g.selectionStart=O,g.selectionEnd=Math.min($,g.value.length);else{var G=g.ownerDocument||document,U=G&&G.defaultView||window;if(U.getSelection){var L=U.getSelection(),ie=g.textContent.length,ge=Math.min(w.start,ie),nt=w.end===void 0?ge:Math.min(w.end,ie);!L.extend&&ge>nt&&(m=nt,nt=ge,ge=m);var C=hd(g,ge),T=hd(g,nt);if(C&&T&&(L.rangeCount!==1||L.anchorNode!==C.node||L.anchorOffset!==C.offset||L.focusNode!==T.node||L.focusOffset!==T.offset)){var _=G.createRange();_.setStart(C.node,C.offset),L.removeAllRanges(),ge>nt?(L.addRange(_),L.extend(T.node,T.offset)):(_.setEnd(T.node,T.offset),L.addRange(_))}}}}for(G=[],L=g;L=L.parentNode;)L.nodeType===1&&G.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<G.length;g++){var Y=G[g];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}ru=!!Ao,zo=Ao=null}finally{Ze=r,X.p=l,H.T=a}}e.current=t,Ct=2}}function Ah(){if(Ct===2){Ct=0;var e=Zl,t=di,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var l=X.p;X.p=2;var r=Ze;Ze|=4;try{ih(e,t.alternate,t)}finally{Ze=r,X.p=l,H.T=a}}Ct=3}}function zh(){if(Ct===4||Ct===3){Ct=0,il();var e=Zl,t=di,a=Rl,l=gh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ct=5:(Ct=0,di=Zl=null,_h(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Ql=null),z(a),t=t.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(rl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=H.T,r=X.p,X.p=2,H.T=null;try{for(var u=e.onRecoverableError,m=0;m<l.length;m++){var g=l[m];u(g.value,{componentStack:g.stack})}}finally{H.T=t,X.p=r}}(Rl&3)!==0&&Ks(),Ka(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===go?pr++:(pr=0,go=e):pr=0,vr(0)}}function _h(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ji(t)))}function Ks(){return Mh(),Ah(),zh(),Oh()}function Oh(){if(Ct!==5)return!1;var e=Zl,t=vo;vo=0;var a=z(Rl),l=H.T,r=X.p;try{X.p=32>a?32:a,H.T=null,a=xo,xo=null;var u=Zl,m=Rl;if(Ct=0,di=Zl=null,Rl=0,(Ze&6)!==0)throw Error(o(331));var g=Ze;if(Ze|=4,ph(u.current),dh(u,u.current,m,a),Ze=g,vr(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(rl,u)}catch{}return!0}finally{X.p=r,H.T=l,_h(e,t)}}function kh(e,t,a){t=Sa(a,t),t=Fc(e.stateNode,t,2),e=ql(e,t,2),e!==null&&(Va(e,2),Ka(e))}function et(e,t,a){if(e.tag===3)kh(e,e,a);else for(;t!==null;){if(t.tag===3){kh(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ql===null||!Ql.has(l))){e=Sa(a,e),a=Um(2),l=ql(t,a,2),l!==null&&(Lm(a,l,t,e),Va(l,2),Ka(l));break}}t=t.return}}function So(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Mg;var r=new Set;l.set(t,r)}else r=l.get(t),r===void 0&&(r=new Set,l.set(t,r));r.has(a)||(mo=!0,r.add(a),e=kg.bind(null,e,t,a),t.then(e,e))}function kg(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,rt===e&&(Ue&a)===a&&(vt===4||vt===3&&(Ue&62914560)===Ue&&300>dt()-Ys?(Ze&2)===0&&mi(e,0):ho|=a,fi===Ue&&(fi=0)),Ka(e)}function Uh(e,t){t===0&&(t=Li()),e=hn(e,t),e!==null&&(Va(e,t),Ka(e))}function Ug(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Uh(e,a)}function Lg(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),Uh(e,a)}function Hg(e,t){return ut(e,t)}var Fs=null,pi=null,jo=!1,Js=!1,No=!1,Fl=0;function Ka(e){e!==pi&&e.next===null&&(pi===null?Fs=pi=e:pi=pi.next=e),Js=!0,jo||(jo=!0,qg())}function vr(e,t){if(!No&&Js){No=!0;do for(var a=!1,l=Fs;l!==null;){if(e!==0){var r=l.pendingLanes;if(r===0)var u=0;else{var m=l.suspendedLanes,g=l.pingedLanes;u=(1<<31-$t(42|e)+1)-1,u&=r&~(m&~g),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,qh(l,u))}else u=Ue,u=Un(l,l===rt?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||Ml(l,u)||(a=!0,qh(l,u));l=l.next}while(a);No=!1}}function Bg(){Lh()}function Lh(){Js=jo=!1;var e=0;Fl!==0&&Jg()&&(e=Fl);for(var t=dt(),a=null,l=Fs;l!==null;){var r=l.next,u=Hh(l,t);u===0?(l.next=null,a===null?Fs=r:a.next=r,r===null&&(pi=a)):(a=l,(e!==0||(u&3)!==0)&&(Js=!0)),l=r}Ct!==0&&Ct!==5||vr(e),Fl!==0&&(Fl=0)}function Hh(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,r=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var m=31-$t(u),g=1<<m,w=r[m];w===-1?((g&a)===0||(g&l)!==0)&&(r[m]=$u(g,t)):w<=t&&(e.expiredLanes|=g),u&=~g}if(t=rt,a=Ue,a=Un(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Pe===2||Pe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Qt(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ml(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Qt(l),z(a)){case 2:case 8:a=Zt;break;case 32:a=kt;break;case 268435456:a=ga;break;default:a=kt}return l=Bh.bind(null,e),a=ut(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Qt(l),e.callbackPriority=2,e.callbackNode=null,2}function Bh(e,t){if(Ct!==0&&Ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ks()&&e.callbackNode!==a)return null;var l=Ue;return l=Un(e,e===rt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(bh(e,l,t),Hh(e,dt()),e.callbackNode!=null&&e.callbackNode===a?Bh.bind(null,e):null)}function qh(e,t){if(Ks())return null;bh(e,t,!0)}function qg(){Ig(function(){(Ze&6)!==0?ut(Oa,Bg):Lh()})}function wo(){if(Fl===0){var e=ei;e===0&&(e=cn,cn<<=1,(cn&261888)===0&&(cn=256)),Fl=e}return Fl}function $h(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ns(""+e)}function Yh(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 $g(e,t,a,l,r){if(t==="submit"&&a&&a.stateNode===r){var u=$h((r[oe]||null).action),m=l.submitter;m&&(t=(t=m[oe]||null)?$h(t.formAction):m.getAttribute("formAction"),t!==null&&(u=t,m=null));var g=new us("action","action",null,l,r);e.push({event:g,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Fl!==0){var w=m?Yh(r,m):new FormData(r);Gc(a,{pending:!0,data:w,method:r.method,action:u},null,w)}}else typeof u=="function"&&(g.preventDefault(),w=m?Yh(r,m):new FormData(r),Gc(a,{pending:!0,data:w,method:r.method,action:u},u,w))},currentTarget:r}]})}}for(var Eo=0;Eo<rc.length;Eo++){var Ro=rc[Eo],Yg=Ro.toLowerCase(),Gg=Ro[0].toUpperCase()+Ro.slice(1);Ba(Yg,"on"+Gg)}Ba(yd,"onAnimationEnd"),Ba(bd,"onAnimationIteration"),Ba(Sd,"onAnimationStart"),Ba("dblclick","onDoubleClick"),Ba("focusin","onFocus"),Ba("focusout","onBlur"),Ba(ig,"onTransitionRun"),Ba(rg,"onTransitionStart"),Ba(sg,"onTransitionCancel"),Ba(jd,"onTransitionEnd"),Ft("onMouseEnter",["mouseout","mouseover"]),Ft("onMouseLeave",["mouseout","mouseover"]),Ft("onPointerEnter",["pointerout","pointerover"]),Ft("onPointerLeave",["pointerout","pointerover"]),ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xr="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(" "),Vg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xr));function Gh(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],r=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var m=l.length-1;0<=m;m--){var g=l[m],w=g.instance,O=g.currentTarget;if(g=g.listener,w!==u&&r.isPropagationStopped())break e;u=g,r.currentTarget=O;try{u(r)}catch($){fs($)}r.currentTarget=null,u=w}else for(m=0;m<l.length;m++){if(g=l[m],w=g.instance,O=g.currentTarget,g=g.listener,w!==u&&r.isPropagationStopped())break e;u=g,r.currentTarget=O;try{u(r)}catch($){fs($)}r.currentTarget=null,u=w}}}}function Oe(e,t){var a=t[ce];a===void 0&&(a=t[ce]=new Set);var l=e+"__bubble";a.has(l)||(Vh(t,e,2,!1),a.add(l))}function To(e,t,a){var l=0;t&&(l|=4),Vh(a,e,l,t)}var Ws="_reactListening"+Math.random().toString(36).slice(2);function Do(e){if(!e[Ws]){e[Ws]=!0,zl.forEach(function(a){a!=="selectionchange"&&(Vg.has(a)||To(a,!1,e),To(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ws]||(t[Ws]=!0,To("selectionchange",!1,t))}}function Vh(e,t,a,l){switch(yp(t)){case 2:var r=gy;break;case 8:r=yy;break;default:r=Go}a=r.bind(null,t,a,e),r=void 0,!Zu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),l?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function Co(e,t,a,l,r){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var m=l.tag;if(m===3||m===4){var g=l.stateNode.containerInfo;if(g===r)break;if(m===4)for(m=l.return;m!==null;){var w=m.tag;if((w===3||w===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;g!==null;){if(m=ct(g),m===null)return;if(w=m.tag,w===5||w===6||w===26||w===27){l=u=m;continue e}g=g.parentNode}}l=l.return}Ff(function(){var O=u,$=Xu(a),G=[];e:{var U=Nd.get(e);if(U!==void 0){var L=us,ie=e;switch(e){case"keypress":if(rs(a)===0)break e;case"keydown":case"keyup":L=Lx;break;case"focusin":ie="focus",L=Wu;break;case"focusout":ie="blur",L=Wu;break;case"beforeblur":case"afterblur":L=Wu;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":L=If;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=Ex;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=qx;break;case yd:case bd:case Sd:L=Dx;break;case jd:L=Yx;break;case"scroll":case"scrollend":L=Nx;break;case"wheel":L=Vx;break;case"copy":case"cut":case"paste":L=Mx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=ed;break;case"toggle":case"beforetoggle":L=Qx}var ge=(t&4)!==0,nt=!ge&&(e==="scroll"||e==="scrollend"),C=ge?U!==null?U+"Capture":null:U;ge=[];for(var T=O,_;T!==null;){var Y=T;if(_=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||_===null||C===null||(Y=Bi(T,C),Y!=null&&ge.push(gr(T,Y,_))),nt)break;T=T.return}0<ge.length&&(U=new L(U,ie,null,a,$),G.push({event:U,listeners:ge}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",U&&a!==Vu&&(ie=a.relatedTarget||a.fromElement)&&(ct(ie)||ie[I]))break e;if((L||U)&&(U=$.window===$?$:(U=$.ownerDocument)?U.defaultView||U.parentWindow:window,L?(ie=a.relatedTarget||a.toElement,L=O,ie=ie?ct(ie):null,ie!==null&&(nt=d(ie),ge=ie.tag,ie!==nt||ge!==5&&ge!==27&&ge!==6)&&(ie=null)):(L=null,ie=O),L!==ie)){if(ge=If,Y="onMouseLeave",C="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(ge=ed,Y="onPointerLeave",C="onPointerEnter",T="pointer"),nt=L==null?U:qe(L),_=ie==null?U:qe(ie),U=new ge(Y,T+"leave",L,a,$),U.target=nt,U.relatedTarget=_,Y=null,ct($)===O&&(ge=new ge(C,T+"enter",ie,a,$),ge.target=_,ge.relatedTarget=nt,Y=ge),nt=Y,L&&ie)t:{for(ge=Xg,C=L,T=ie,_=0,Y=C;Y;Y=ge(Y))_++;Y=0;for(var ve=T;ve;ve=ge(ve))Y++;for(;0<_-Y;)C=ge(C),_--;for(;0<Y-_;)T=ge(T),Y--;for(;_--;){if(C===T||T!==null&&C===T.alternate){ge=C;break t}C=ge(C),T=ge(T)}ge=null}else ge=null;L!==null&&Xh(G,U,L,ge,!1),ie!==null&&nt!==null&&Xh(G,nt,ie,ge,!0)}}e:{if(U=O?qe(O):window,L=U.nodeName&&U.nodeName.toLowerCase(),L==="select"||L==="input"&&U.type==="file")var Ve=ud;else if(rd(U))if(cd)Ve=ag;else{Ve=eg;var ue=Px}else L=U.nodeName,!L||L.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?O&&Gu(O.elementType)&&(Ve=ud):Ve=tg;if(Ve&&(Ve=Ve(e,O))){sd(G,Ve,a,$);break e}ue&&ue(e,U,O),e==="focusout"&&O&&U.type==="number"&&O.memoizedProps.value!=null&&Yu(U,"number",U.value)}switch(ue=O?qe(O):window,e){case"focusin":(rd(ue)||ue.contentEditable==="true")&&(Qn=ue,lc=O,Zi=null);break;case"focusout":Zi=lc=Qn=null;break;case"mousedown":nc=!0;break;case"contextmenu":case"mouseup":case"dragend":nc=!1,xd(G,a,$);break;case"selectionchange":if(ng)break;case"keydown":case"keyup":xd(G,a,$)}var Me;if(Pu)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Xn?nd(e,a)&&(Le="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Le="onCompositionStart");Le&&(td&&a.locale!=="ko"&&(Xn||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Xn&&(Me=Jf()):(_l=$,Ku="value"in _l?_l.value:_l.textContent,Xn=!0)),ue=Is(O,Le),0<ue.length&&(Le=new Pf(Le,e,null,a,$),G.push({event:Le,listeners:ue}),Me?Le.data=Me:(Me=id(a),Me!==null&&(Le.data=Me)))),(Me=Kx?Fx(e,a):Jx(e,a))&&(Le=Is(O,"onBeforeInput"),0<Le.length&&(ue=new Pf("onBeforeInput","beforeinput",null,a,$),G.push({event:ue,listeners:Le}),ue.data=Me)),$g(G,e,O,a,$)}Gh(G,t)})}function gr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Is(e,t){for(var a=t+"Capture",l=[];e!==null;){var r=e,u=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||u===null||(r=Bi(e,a),r!=null&&l.unshift(gr(e,r,u)),r=Bi(e,t),r!=null&&l.push(gr(e,r,u))),e.tag===3)return l;e=e.return}return[]}function Xg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xh(e,t,a,l,r){for(var u=t._reactName,m=[];a!==null&&a!==l;){var g=a,w=g.alternate,O=g.stateNode;if(g=g.tag,w!==null&&w===l)break;g!==5&&g!==26&&g!==27||O===null||(w=O,r?(O=Bi(a,u),O!=null&&m.unshift(gr(a,O,w))):r||(O=Bi(a,u),O!=null&&m.push(gr(a,O,w)))),a=a.return}m.length!==0&&e.push({event:t,listeners:m})}var Qg=/\r\n?/g,Zg=/\u0000|\uFFFD/g;function Qh(e){return(typeof e=="string"?e:""+e).replace(Qg,`
49
+ `).replace(Zg,"")}function Zh(e,t){return t=Qh(t),Qh(e)===t}function lt(e,t,a,l,r,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Yn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Yn(e,""+l);break;case"className":cl(e,"class",l);break;case"tabIndex":cl(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":cl(e,a,l);break;case"style":Zf(e,l,u);break;case"data":if(t!=="object"){cl(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ns(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&lt(e,t,"name",r.name,r,null),lt(e,t,"formEncType",r.formEncType,r,null),lt(e,t,"formMethod",r.formMethod,r,null),lt(e,t,"formTarget",r.formTarget,r,null)):(lt(e,t,"encType",r.encType,r,null),lt(e,t,"method",r.method,r,null),lt(e,t,"target",r.target,r,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=ns(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=fl);break;case"onScroll":l!=null&&Oe("scroll",e);break;case"onScrollEnd":l!=null&&Oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=ns(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Oe("beforetoggle",e),Oe("toggle",e),ul(e,"popover",l);break;case"xlinkActuate":Ne(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ne(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ne(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ne(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ne(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ne(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ne(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ne(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ne(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ul(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Sx.get(a)||a,ul(e,a,l))}}function Mo(e,t,a,l,r,u){switch(a){case"style":Zf(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(o(61));if(a=l.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Yn(e,l):(typeof l=="number"||typeof l=="bigint")&&Yn(e,""+l);break;case"onScroll":l!=null&&Oe("scroll",e);break;case"onScrollEnd":l!=null&&Oe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=fl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ua.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),u=e[oe]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,r),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,r);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):ul(e,a,l)}}}function Bt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var l=!1,r=!1,u;for(u in a)if(a.hasOwnProperty(u)){var m=a[u];if(m!=null)switch(u){case"src":l=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:lt(e,t,u,m,a,null)}}r&&lt(e,t,"srcSet",a.srcSet,a,null),l&&lt(e,t,"src",a.src,a,null);return;case"input":Oe("invalid",e);var g=u=m=r=null,w=null,O=null;for(l in a)if(a.hasOwnProperty(l)){var $=a[l];if($!=null)switch(l){case"name":r=$;break;case"type":m=$;break;case"checked":w=$;break;case"defaultChecked":O=$;break;case"value":u=$;break;case"defaultValue":g=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(o(137,t));break;default:lt(e,t,l,$,a,null)}}Gf(e,u,g,w,O,m,r,!1);return;case"select":Oe("invalid",e),l=m=u=null;for(r in a)if(a.hasOwnProperty(r)&&(g=a[r],g!=null))switch(r){case"value":u=g;break;case"defaultValue":m=g;break;case"multiple":l=g;default:lt(e,t,r,g,a,null)}t=u,a=m,e.multiple=!!l,t!=null?$n(e,!!l,t,!1):a!=null&&$n(e,!!l,a,!0);return;case"textarea":Oe("invalid",e),u=r=l=null;for(m in a)if(a.hasOwnProperty(m)&&(g=a[m],g!=null))switch(m){case"value":l=g;break;case"defaultValue":r=g;break;case"children":u=g;break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(o(91));break;default:lt(e,t,m,g,a,null)}Xf(e,l,r,u);return;case"option":for(w in a)if(a.hasOwnProperty(w)&&(l=a[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:lt(e,t,w,l,a,null)}return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(l=0;l<xr.length;l++)Oe(xr[l],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("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(O in a)if(a.hasOwnProperty(O)&&(l=a[O],l!=null))switch(O){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:lt(e,t,O,l,a,null)}return;default:if(Gu(t)){for($ in a)a.hasOwnProperty($)&&(l=a[$],l!==void 0&&Mo(e,t,$,l,a,void 0));return}}for(g in a)a.hasOwnProperty(g)&&(l=a[g],l!=null&&lt(e,t,g,l,a,null))}function Kg(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,u=null,m=null,g=null,w=null,O=null,$=null;for(L in a){var G=a[L];if(a.hasOwnProperty(L)&&G!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":w=G;default:l.hasOwnProperty(L)||lt(e,t,L,null,l,G)}}for(var U in l){var L=l[U];if(G=a[U],l.hasOwnProperty(U)&&(L!=null||G!=null))switch(U){case"type":u=L;break;case"name":r=L;break;case"checked":O=L;break;case"defaultChecked":$=L;break;case"value":m=L;break;case"defaultValue":g=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:L!==G&&lt(e,t,U,L,l,G)}}Hi(e,m,g,w,O,$,u,r);return;case"select":L=m=g=U=null;for(u in a)if(w=a[u],a.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":L=w;default:l.hasOwnProperty(u)||lt(e,t,u,null,l,w)}for(r in l)if(u=l[r],w=a[r],l.hasOwnProperty(r)&&(u!=null||w!=null))switch(r){case"value":U=u;break;case"defaultValue":g=u;break;case"multiple":m=u;default:u!==w&&lt(e,t,r,u,l,w)}t=g,a=m,l=L,U!=null?$n(e,!!a,U,!1):!!l!=!!a&&(t!=null?$n(e,!!a,t,!0):$n(e,!!a,a?[]:"",!1));return;case"textarea":L=U=null;for(g in a)if(r=a[g],a.hasOwnProperty(g)&&r!=null&&!l.hasOwnProperty(g))switch(g){case"value":break;case"children":break;default:lt(e,t,g,null,l,r)}for(m in l)if(r=l[m],u=a[m],l.hasOwnProperty(m)&&(r!=null||u!=null))switch(m){case"value":U=r;break;case"defaultValue":L=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==u&&lt(e,t,m,r,l,u)}Vf(e,U,L);return;case"option":for(var ie in a)if(U=a[ie],a.hasOwnProperty(ie)&&U!=null&&!l.hasOwnProperty(ie))switch(ie){case"selected":e.selected=!1;break;default:lt(e,t,ie,null,l,U)}for(w in l)if(U=l[w],L=a[w],l.hasOwnProperty(w)&&U!==L&&(U!=null||L!=null))switch(w){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:lt(e,t,w,U,l,L)}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 ge in a)U=a[ge],a.hasOwnProperty(ge)&&U!=null&&!l.hasOwnProperty(ge)&&lt(e,t,ge,null,l,U);for(O in l)if(U=l[O],L=a[O],l.hasOwnProperty(O)&&U!==L&&(U!=null||L!=null))switch(O){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:lt(e,t,O,U,l,L)}return;default:if(Gu(t)){for(var nt in a)U=a[nt],a.hasOwnProperty(nt)&&U!==void 0&&!l.hasOwnProperty(nt)&&Mo(e,t,nt,void 0,l,U);for($ in l)U=l[$],L=a[$],!l.hasOwnProperty($)||U===L||U===void 0&&L===void 0||Mo(e,t,$,U,l,L);return}}for(var C in a)U=a[C],a.hasOwnProperty(C)&&U!=null&&!l.hasOwnProperty(C)&&lt(e,t,C,null,l,U);for(G in l)U=l[G],L=a[G],!l.hasOwnProperty(G)||U===L||U==null&&L==null||lt(e,t,G,U,l,L)}function Kh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var r=a[l],u=r.transferSize,m=r.initiatorType,g=r.duration;if(u&&g&&Kh(m)){for(m=0,g=r.responseEnd,l+=1;l<a.length;l++){var w=a[l],O=w.startTime;if(O>g)break;var $=w.transferSize,G=w.initiatorType;$&&Kh(G)&&(w=w.responseEnd,m+=$*(w<g?1:(g-O)/(w-O)))}if(--l,t+=8*(u+m)/(r.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,zo=null;function Ps(e){return e.nodeType===9?e:e.ownerDocument}function Fh(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 Jh(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 _o(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 Oo=null;function Jg(){var e=window.event;return e&&e.type==="popstate"?e===Oo?!1:(Oo=e,!0):(Oo=null,!1)}var Wh=typeof setTimeout=="function"?setTimeout:void 0,Wg=typeof clearTimeout=="function"?clearTimeout:void 0,Ih=typeof Promise=="function"?Promise:void 0,Ig=typeof queueMicrotask=="function"?queueMicrotask:typeof Ih<"u"?function(e){return Ih.resolve(null).then(e).catch(Pg)}:Wh;function Pg(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function Ph(e,t){var a=t,l=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(r),yi(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")yr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,yr(a);for(var u=a.firstChild;u;){var m=u.nextSibling,g=u.nodeName;u[Ae]||g==="SCRIPT"||g==="STYLE"||g==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=m}}else a==="body"&&yr(e.ownerDocument.body);a=r}while(a);yi(t)}function ep(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function ko(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":ko(a),Ge(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function ey(e,t,a,l){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ae])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Ra(e.nextSibling),e===null)break}return null}function ty(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ra(e.nextSibling),e===null))return null;return e}function tp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ra(e.nextSibling),e===null))return null;return e}function Uo(e){return e.data==="$?"||e.data==="$~"}function Lo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ay(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ra(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 Ho=null;function ap(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ra(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function lp(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 np(e,t,a){switch(t=Ps(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 yr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ge(e)}var Ta=new Map,ip=new Set;function eu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tl=X.d;X.d={f:ly,r:ny,D:iy,C:ry,L:sy,m:uy,X:oy,S:cy,M:fy};function ly(){var e=Tl.f(),t=Xs();return e||t}function ny(e){var t=Fe(e);t!==null&&t.tag===5&&t.type==="form"?jm(t):Tl.r(e)}var vi=typeof document>"u"?null:document;function rp(e,t,a){var l=vi;if(l&&typeof t=="string"&&t){var r=Jt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),ip.has(r)||(ip.add(r),e={rel:e,crossOrigin:a,href:t},l.querySelector(r)===null&&(t=l.createElement("link"),Bt(t,"link",e),$e(t),l.head.appendChild(t)))}}function iy(e){Tl.D(e),rp("dns-prefetch",e,null)}function ry(e,t){Tl.C(e,t),rp("preconnect",e,t)}function sy(e,t,a){Tl.L(e,t,a);var l=vi;if(l&&e&&t){var r='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+Jt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+Jt(a.imageSizes)+'"]')):r+='[href="'+Jt(e)+'"]';var u=r;switch(t){case"style":u=xi(e);break;case"script":u=gi(e)}Ta.has(u)||(e=y({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ta.set(u,e),l.querySelector(r)!==null||t==="style"&&l.querySelector(br(u))||t==="script"&&l.querySelector(Sr(u))||(t=l.createElement("link"),Bt(t,"link",e),$e(t),l.head.appendChild(t)))}}function uy(e,t){Tl.m(e,t);var a=vi;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Jt(l)+'"][href="'+Jt(e)+'"]',u=r;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=gi(e)}if(!Ta.has(u)&&(e=y({rel:"modulepreload",href:e},t),Ta.set(u,e),a.querySelector(r)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Sr(u)))return}l=a.createElement("link"),Bt(l,"link",e),$e(l),a.head.appendChild(l)}}}function cy(e,t,a){Tl.S(e,t,a);var l=vi;if(l&&e){var r=xt(l).hoistableStyles,u=xi(e);t=t||"default";var m=r.get(u);if(!m){var g={loading:0,preload:null};if(m=l.querySelector(br(u)))g.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ta.get(u))&&Bo(e,a);var w=m=l.createElement("link");$e(w),Bt(w,"link",e),w._p=new Promise(function(O,$){w.onload=O,w.onerror=$}),w.addEventListener("load",function(){g.loading|=1}),w.addEventListener("error",function(){g.loading|=2}),g.loading|=4,tu(m,t,l)}m={type:"stylesheet",instance:m,count:1,state:g},r.set(u,m)}}}function oy(e,t){Tl.X(e,t);var a=vi;if(a&&e){var l=xt(a).hoistableScripts,r=gi(e),u=l.get(r);u||(u=a.querySelector(Sr(r)),u||(e=y({src:e,async:!0},t),(t=Ta.get(r))&&qo(e,t),u=a.createElement("script"),$e(u),Bt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(r,u))}}function fy(e,t){Tl.M(e,t);var a=vi;if(a&&e){var l=xt(a).hoistableScripts,r=gi(e),u=l.get(r);u||(u=a.querySelector(Sr(r)),u||(e=y({src:e,async:!0,type:"module"},t),(t=Ta.get(r))&&qo(e,t),u=a.createElement("script"),$e(u),Bt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(r,u))}}function sp(e,t,a,l){var r=(r=fe.current)?eu(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=xi(a.href),a=xt(r).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=xi(a.href);var u=xt(r).hoistableStyles,m=u.get(e);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,m),(u=r.querySelector(br(e)))&&!u._p&&(m.instance=u,m.state.loading=5),Ta.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},Ta.set(e,a),u||dy(r,e,a,m.state))),t&&l===null)throw Error(o(528,""));return m}if(t&&l!==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=gi(a),a=xt(r).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function xi(e){return'href="'+Jt(e)+'"'}function br(e){return'link[rel="stylesheet"]['+e+"]"}function up(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function dy(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Bt(t,"link",a),$e(t),e.head.appendChild(t))}function gi(e){return'[src="'+Jt(e)+'"]'}function Sr(e){return"script[async]"+e}function cp(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Jt(a.href)+'"]');if(l)return t.instance=l,$e(l),l;var r=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),$e(l),Bt(l,"style",r),tu(l,a.precedence,e),t.instance=l;case"stylesheet":r=xi(a.href);var u=e.querySelector(br(r));if(u)return t.state.loading|=4,t.instance=u,$e(u),u;l=up(a),(r=Ta.get(r))&&Bo(l,r),u=(e.ownerDocument||e).createElement("link"),$e(u);var m=u;return m._p=new Promise(function(g,w){m.onload=g,m.onerror=w}),Bt(u,"link",l),t.state.loading|=4,tu(u,a.precedence,e),t.instance=u;case"script":return u=gi(a.src),(r=e.querySelector(Sr(u)))?(t.instance=r,$e(r),r):(l=a,(r=Ta.get(u))&&(l=y({},a),qo(l,r)),e=e.ownerDocument||e,r=e.createElement("script"),$e(r),Bt(r,"link",l),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,tu(l,a.precedence,e));return t.instance}function tu(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=l.length?l[l.length-1]:null,u=r,m=0;m<l.length;m++){var g=l[m];if(g.dataset.precedence===t)u=g;else if(u!==r)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Bo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var au=null;function op(e,t,a){if(au===null){var l=new Map,r=au=new Map;r.set(a,l)}else r=au,l=r.get(a),l||(l=new Map,r.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var u=a[r];if(!(u[Ae]||u[P]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var m=u.getAttribute(t)||"";m=e+m;var g=l.get(m);g?g.push(u):l.set(m,[u])}}return l}function fp(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function my(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 dp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function hy(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=xi(l.href),u=t.querySelector(br(r));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=lu.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,$e(u);return}u=t.ownerDocument||t,l=up(l),(r=Ta.get(r))&&Bo(l,r),u=u.createElement("link"),$e(u);var m=u;m._p=new Promise(function(g,w){m.onload=g,m.onerror=w}),Bt(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=lu.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var $o=0;function py(e,t){return e.stylesheets&&e.count===0&&iu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&iu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&$o===0&&($o=62500*Fg());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&iu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>$o?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(r)}}:null}function lu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)iu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var nu=null;function iu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,nu=new Map,t.forEach(vy,e),nu=null,lu.call(e))}function vy(e,t){if(!(t.state.loading&4)){var a=nu.get(e);if(a)var l=a.get(null);else{a=new Map,nu.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<r.length;u++){var m=r[u];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(a.set(m.dataset.precedence,m),l=m)}l&&a.set(null,l)}r=t.instance,m=r.getAttribute("data-precedence"),u=a.get(m)||l,u===l&&a.set(null,r),a.set(m,r),this.count++,l=lu.bind(this),r.addEventListener("load",l),r.addEventListener("error",l),u?u.parentNode.insertBefore(r,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var jr={$$typeof:W,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function xy(e,t,a,l,r,u,m,g,w){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=Al(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Al(0),this.hiddenUpdates=Al(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=u,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function mp(e,t,a,l,r,u,m,g,w,O,$,G){return e=new xy(e,t,a,m,w,O,$,G,g),t=1,u===!0&&(t|=24),u=ca(3,null,null,t),e.current=u,u.stateNode=e,t=yc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},Nc(u),e}function hp(e){return e?(e=Fn,e):Fn}function pp(e,t,a,l,r,u){r=hp(r),l.context===null?l.context=r:l.pendingContext=r,l=Bl(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=ql(e,l,t),a!==null&&(ra(a,e,t),er(a,e,t))}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Yo(e,t){vp(e,t),(e=e.alternate)&&vp(e,t)}function xp(e){if(e.tag===13||e.tag===31){var t=hn(e,67108864);t!==null&&ra(t,e,67108864),Yo(e,67108864)}}function gp(e){if(e.tag===13||e.tag===31){var t=ha();t=D(t);var a=hn(e,t);a!==null&&ra(a,e,t),Yo(e,t)}}var ru=!0;function gy(e,t,a,l){var r=H.T;H.T=null;var u=X.p;try{X.p=2,Go(e,t,a,l)}finally{X.p=u,H.T=r}}function yy(e,t,a,l){var r=H.T;H.T=null;var u=X.p;try{X.p=8,Go(e,t,a,l)}finally{X.p=u,H.T=r}}function Go(e,t,a,l){if(ru){var r=Vo(l);if(r===null)Co(e,t,l,su,a),bp(e,l);else if(Sy(r,e,t,a,l))l.stopPropagation();else if(bp(e,l),t&4&&-1<by.indexOf(e)){for(;r!==null;){var u=Fe(r);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var m=ka(u.pendingLanes);if(m!==0){var g=u;for(g.pendingLanes|=2,g.entangledLanes|=2;m;){var w=1<<31-$t(m);g.entanglements[1]|=w,m&=~w}Ka(u),(Ze&6)===0&&(Gs=dt()+500,vr(0))}}break;case 31:case 13:g=hn(u,2),g!==null&&ra(g,u,2),Xs(),Yo(u,2)}if(u=Vo(l),u===null&&Co(e,t,l,su,a),u===r)break;r=u}r!==null&&l.stopPropagation()}else Co(e,t,l,null,a)}}function Vo(e){return e=Xu(e),Xo(e)}var su=null;function Xo(e){if(su=null,e=ct(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===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 su=e,null}function yp(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(Pt()){case Oa:return 2;case Zt:return 8;case kt:case Dt:return 32;case ga:return 268435456;default:return 32}default:return 32}}var Qo=!1,Wl=null,Il=null,Pl=null,Nr=new Map,wr=new Map,en=[],by="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 bp(e,t){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":Il=null;break;case"mouseover":case"mouseout":Pl=null;break;case"pointerover":case"pointerout":Nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wr.delete(t.pointerId)}}function Er(e,t,a,l,r,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[r]},t!==null&&(t=Fe(t),t!==null&&xp(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Sy(e,t,a,l,r){switch(t){case"focusin":return Wl=Er(Wl,e,t,a,l,r),!0;case"dragenter":return Il=Er(Il,e,t,a,l,r),!0;case"mouseover":return Pl=Er(Pl,e,t,a,l,r),!0;case"pointerover":var u=r.pointerId;return Nr.set(u,Er(Nr.get(u)||null,e,t,a,l,r)),!0;case"gotpointercapture":return u=r.pointerId,wr.set(u,Er(wr.get(u)||null,e,t,a,l,r)),!0}return!1}function Sp(e){var t=ct(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Q(e.priority,function(){gp(a)});return}}else if(t===31){if(t=v(a),t!==null){e.blockedOn=t,Q(e.priority,function(){gp(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Vo(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Vu=l,a.target.dispatchEvent(l),Vu=null}else return t=Fe(a),t!==null&&xp(t),e.blockedOn=a,!1;t.shift()}return!0}function jp(e,t,a){uu(e)&&a.delete(t)}function jy(){Qo=!1,Wl!==null&&uu(Wl)&&(Wl=null),Il!==null&&uu(Il)&&(Il=null),Pl!==null&&uu(Pl)&&(Pl=null),Nr.forEach(jp),wr.forEach(jp)}function cu(e,t){e.blockedOn===t&&(e.blockedOn=null,Qo||(Qo=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,jy)))}var ou=null;function Np(e){ou!==e&&(ou=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ou===e&&(ou=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],r=e[t+2];if(typeof l!="function"){if(Xo(l||a)===null)continue;break}var u=Fe(a);u!==null&&(e.splice(t,3),t-=3,Gc(u,{pending:!0,data:r,method:a.method,action:l},l,r))}}))}function yi(e){function t(w){return cu(w,e)}Wl!==null&&cu(Wl,e),Il!==null&&cu(Il,e),Pl!==null&&cu(Pl,e),Nr.forEach(t),wr.forEach(t);for(var a=0;a<en.length;a++){var l=en[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<en.length&&(a=en[0],a.blockedOn===null);)Sp(a),a.blockedOn===null&&en.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var r=a[l],u=a[l+1],m=r[oe]||null;if(typeof u=="function")m||Np(a);else if(m){var g=null;if(u&&u.hasAttribute("formAction")){if(r=u,m=u[oe]||null)g=m.formAction;else if(Xo(r)!==null)continue}else g=m.action;typeof g=="function"?a[l+1]=g:(a.splice(l,3),l-=3),Np(a)}}}function wp(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Zo(e){this._internalRoot=e}fu.prototype.render=Zo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,l=ha();pp(a,l,e,t,null,null)},fu.prototype.unmount=Zo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pp(e.current,2,null,e,null,null),Xs(),t[I]=null}};function fu(e){this._internalRoot=e}fu.prototype.unstable_scheduleHydration=function(e){if(e){var t=V();e={blockedOn:null,target:e,priority:t};for(var a=0;a<en.length&&t!==0&&t<en[a].priority;a++);en.splice(a,0,e),a===0&&Sp(e)}};var Ep=i.version;if(Ep!=="19.2.7")throw Error(o(527,Ep,"19.2.7"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Ny={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!du.isDisabled&&du.supportsFiber)try{rl=du.inject(Ny),Kt=du}catch{}}return Tr.createRoot=function(e,t){if(!f(e))throw Error(o(299));var a=!1,l="",r=zm,u=_m,m=Om;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=mp(e,1,!1,null,null,a,l,null,r,u,m,wp),e[I]=t.current,Do(e),new Zo(t)},Tr.hydrateRoot=function(e,t,a){if(!f(e))throw Error(o(299));var l=!1,r="",u=zm,m=_m,g=Om,w=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(g=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=mp(e,1,!0,t,a??null,l,r,w,u,m,g,wp),t.context=hp(null),a=t.current,l=ha(),l=D(l),r=Bl(l),r.callback=null,ql(a,r,l),a=l,t.current.lanes=a,Va(t,a),Ka(t),e[I]=t.current,Do(e),new fu(t)},Tr.version="19.2.7",Tr}var kp;function Uy(){if(kp)return Jo.exports;kp=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Jo.exports=ky(),Jo.exports}var Ly=Uy();/**
50
+ * react-router v7.18.0
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var yv=n=>{throw TypeError(n)},bv=(n,i,s)=>i.has(n)||yv("Cannot "+s),Da=(n,i,s)=>(bv(n,i,"read from private field"),s?s.call(n):i.get(n)),kr=(n,i,s)=>i.has(n)?yv("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,s),Fa=(n,i,s,o)=>(bv(n,i,"write to private field"),i.set(n,s),s),Ru=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,yf=/^[\\/]{2}/;function Sv(n,i){return i+n.replace(/\\/g,"/")}var Up="popstate";function Lp(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Hy(n={}){function i(o,f){var p;let d=(p=f.state)==null?void 0:p.masked,{pathname:h,search:v,hash:x}=d||o.location;return Br("",{pathname:h,search:v,hash:x},f.state&&f.state.usr||null,f.state&&f.state.key||"default",d?{pathname:o.location.pathname,search:o.location.search,hash:o.location.hash}:void 0)}function s(o,f){return typeof f=="string"?f:Pa(f)}return qy(i,s,null,n)}function Ee(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function St(n,i){if(!n){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function By(){return Math.random().toString(36).substring(2,10)}function Hp(n,i){return{usr:n.state,key:n.key,idx:i,masked:n.mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function Br(n,i,s=null,o,f){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof i=="string"?tl(i):i,state:s,key:i&&i.key||o||By(),mask:f}}function Pa({pathname:n="/",search:i="",hash:s=""}){return i&&i!=="?"&&(n+=i.charAt(0)==="?"?i:"?"+i),s&&s!=="#"&&(n+=s.charAt(0)==="#"?s:"#"+s),n}function tl(n){let i={};if(n){let s=n.indexOf("#");s>=0&&(i.hash=n.substring(s),n=n.substring(0,s));let o=n.indexOf("?");o>=0&&(i.search=n.substring(o),n=n.substring(0,o)),n&&(i.pathname=n)}return i}function qy(n,i,s,o={}){let{window:f=document.defaultView,v5Compat:d=!1}=o,h=f.history,v="POP",x=null,p=b();p==null&&(p=0,h.replaceState({...h.state,idx:p},""));function b(){return(h.state||{idx:null}).idx}function y(){v="POP";let k=b(),Z=k==null?null:k-p;p=k,x&&x({action:v,location:B.location,delta:Z})}function j(k,Z){v="PUSH";let F=Lp(k)?k:Br(B.location,k,Z);p=b()+1;let W=Hp(F,p),ee=B.createHref(F.mask||F);try{h.pushState(W,"",ee)}catch(re){if(re instanceof DOMException&&re.name==="DataCloneError")throw re;f.location.assign(ee)}d&&x&&x({action:v,location:B.location,delta:1})}function N(k,Z){v="REPLACE";let F=Lp(k)?k:Br(B.location,k,Z);p=b();let W=Hp(F,p),ee=B.createHref(F.mask||F);h.replaceState(W,"",ee),d&&x&&x({action:v,location:B.location,delta:0})}function A(k){return jv(f,k)}let B={get action(){return v},get location(){return n(f,h)},listen(k){if(x)throw new Error("A history only accepts one active listener");return f.addEventListener(Up,y),x=k,()=>{f.removeEventListener(Up,y),x=null}},createHref(k){return i(f,k)},createURL:A,encodeLocation(k){let Z=A(k);return{pathname:Z.pathname,search:Z.search,hash:Z.hash}},push:j,replace:N,go(k){return h.go(k)}};return B}function jv(n,i,s=!1){let o="http://localhost";n&&(o=n.location.origin!=="null"?n.location.origin:n.location.href),Ee(o,"No window.location.(origin|href) available to create URL");let f=typeof i=="string"?i:Pa(i);return f=f.replace(/ $/,"%20"),!s&&yf.test(f)&&(f=o+f),new URL(f,o)}var Ur,Bp=class{constructor(n){if(kr(this,Ur,new Map),n)for(let[i,s]of n)this.set(i,s)}get(n){if(Da(this,Ur).has(n))return Da(this,Ur).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,i){Da(this,Ur).set(n,i)}};Ur=new WeakMap;var $y=new Set(["lazy","caseSensitive","path","id","index","children"]);function Yy(n){return $y.has(n)}var Gy=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Vy(n){return Gy.has(n)}function Xy(n){return n.index===!0}function qr(n,i,s=[],o={},f=!1){return n.map((d,h)=>{let v=[...s,String(h)],x=typeof d.id=="string"?d.id:v.join("-");if(Ee(d.index!==!0||!d.children,"Cannot specify children on an index route"),Ee(f||!o[x],`Found a route id collision on id "${x}". Route id's must be globally unique within Data Router usages`),Xy(d)){let p={...d,id:x};return o[x]=qp(p,i(p)),p}else{let p={...d,id:x,children:void 0};return o[x]=qp(p,i(p)),d.children&&(p.children=qr(d.children,i,v,o,f)),p}})}function qp(n,i){return Object.assign(n,{...i,...typeof i.lazy=="object"&&i.lazy!=null?{lazy:{...n.lazy,...i.lazy}}:{}})}function Nv(n,i,s="/"){return Ya(n,i,s,!1)}function Ya(n,i,s,o,f){let d=typeof i=="string"?tl(i):i,h=Aa(d.pathname||"/",s);if(h==null)return null;let v=f??xu(n),x=null,p=lb(h);for(let b=0;x==null&&b<v.length;++b)x=ab(v[b],p,o);return x}function Qy(n,i){let{route:s,pathname:o,params:f}=n;return{id:s.id,pathname:o,params:f,data:i[s.id],loaderData:i[s.id],handle:s.handle}}function xu(n){let i=wv(n);return Zy(i),i}function wv(n,i=[],s=[],o="",f=!1){let d=(h,v,x=f,p)=>{let b={relativePath:p===void 0?h.path||"":p,caseSensitive:h.caseSensitive===!0,childrenIndex:v,route:h};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(o)&&x)return;Ee(b.relativePath.startsWith(o),`Absolute route path "${b.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(o.length)}let y=Ma([o,b.relativePath]),j=s.concat(b);h.children&&h.children.length>0&&(Ee(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),wv(h.children,i,j,y,x)),!(h.path==null&&!h.index)&&i.push({path:y,score:eb(y,h.index),routesMeta:j.map((N,A)=>{let[B,k]=Tv(N.relativePath,N.caseSensitive,A===j.length-1);return{...N,matcher:B,compiledParams:k}})})};return n.forEach((h,v)=>{var x;if(h.path===""||!((x=h.path)!=null&&x.includes("?")))d(h,v);else for(let p of Ev(h.path))d(h,v,!0,p)}),i}function Ev(n){let i=n.split("/");if(i.length===0)return[];let[s,...o]=i,f=s.endsWith("?"),d=s.replace(/\?$/,"");if(o.length===0)return f?[d,""]:[d];let h=Ev(o.join("/")),v=[];return v.push(...h.map(x=>x===""?d:[d,x].join("/"))),f&&v.push(...h),v.map(x=>n.startsWith("/")&&x===""?"/":x)}function Zy(n){n.sort((i,s)=>i.score!==s.score?s.score-i.score:tb(i.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}var Ky=/^:[\w-]+$/,Fy=3,Jy=2,Wy=1,Iy=10,Py=-2,$p=n=>n==="*";function eb(n,i){let s=n.split("/"),o=s.length;return s.some($p)&&(o+=Py),i&&(o+=Jy),s.filter(f=>!$p(f)).reduce((f,d)=>f+(Ky.test(d)?Fy:d===""?Wy:Iy),o)}function tb(n,i){return n.length===i.length&&n.slice(0,-1).every((o,f)=>o===i[f])?n[n.length-1]-i[i.length-1]:0}function ab(n,i,s=!1){let{routesMeta:o}=n,f={},d="/",h=[];for(let v=0;v<o.length;++v){let x=o[v],p=v===o.length-1,b=d==="/"?i:i.slice(d.length)||"/",y={path:x.relativePath,caseSensitive:x.caseSensitive,end:p},j=x.matcher&&x.compiledParams?Rv(y,b,x.matcher,x.compiledParams):Su(y,b),N=x.route;if(!j&&p&&s&&!o[o.length-1].route.index&&(j=Su({path:x.relativePath,caseSensitive:x.caseSensitive,end:!1},b)),!j)return null;Object.assign(f,j.params),h.push({params:f,pathname:Ma([d,j.pathname]),pathnameBase:rb(Ma([d,j.pathnameBase])),route:N}),j.pathnameBase!=="/"&&(d=Ma([d,j.pathnameBase]))}return h}function Su(n,i){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[s,o]=Tv(n.path,n.caseSensitive,n.end);return Rv(n,i,s,o)}function Rv(n,i,s,o){let f=i.match(s);if(!f)return null;let d=f[0],h=d.replace(/(.)\/+$/,"$1"),v=f.slice(1);return{params:o.reduce((p,{paramName:b,isOptional:y},j)=>{if(b==="*"){let A=v[j]||"";h=d.slice(0,d.length-A.length).replace(/(.)\/+$/,"$1")}const N=v[j];return y&&!N?p[b]=void 0:p[b]=(N||"").replace(/%2F/g,"/"),p},{}),pathname:d,pathnameBase:h,pattern:n}}function Tv(n,i=!1,s=!0){St(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let o=[],f="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,v,x,p,b)=>{if(o.push({paramName:v,isOptional:x!=null}),x){let y=b.charAt(p+h.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(o.push({paramName:"*"}),f+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?f+="\\/*$":n!==""&&n!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,i?void 0:"i"),o]}function lb(n){try{return n.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return St(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),n}}function Aa(n,i){if(i==="/")return n;if(!n.toLowerCase().startsWith(i.toLowerCase()))return null;let s=i.endsWith("/")?i.length-1:i.length,o=n.charAt(s);return o&&o!=="/"?null:n.slice(s)||"/"}function nb({basename:n,pathname:i}){return i==="/"?n:Ma([n,i])}var bf=n=>Ru.test(n);function ib(n,i="/"){let{pathname:s,search:o="",hash:f=""}=typeof n=="string"?tl(n):n,d;return s?(s=jf(s),s.startsWith("/")?d=Yp(s.substring(1),"/"):d=Yp(s,i)):d=i,{pathname:d,search:sb(o),hash:ub(f)}}function Yp(n,i){let s=ju(i).split("/");return n.split("/").forEach(f=>{f===".."?s.length>1&&s.pop():f!=="."&&s.push(f)}),s.length>1?s.join("/"):"/"}function ef(n,i,s,o){return`Cannot include a '${n}' character in a manually specified \`to.${i}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Dv(n){return n.filter((i,s)=>s===0||i.route.path&&i.route.path.length>0)}function Sf(n){let i=Dv(n);return i.map((s,o)=>o===i.length-1?s.pathname:s.pathnameBase)}function Tu(n,i,s,o=!1){let f;typeof n=="string"?f=tl(n):(f={...n},Ee(!f.pathname||!f.pathname.includes("?"),ef("?","pathname","search",f)),Ee(!f.pathname||!f.pathname.includes("#"),ef("#","pathname","hash",f)),Ee(!f.search||!f.search.includes("#"),ef("#","search","hash",f)));let d=n===""||f.pathname==="",h=d?"/":f.pathname,v;if(h==null)v=s;else{let y=i.length-1;if(!o&&h.startsWith("..")){let j=h.split("/");for(;j[0]==="..";)j.shift(),y-=1;f.pathname=j.join("/")}v=y>=0?i[y]:"/"}let x=ib(f,v),p=h&&h!=="/"&&h.endsWith("/"),b=(d||h===".")&&s.endsWith("/");return!x.pathname.endsWith("/")&&(p||b)&&(x.pathname+="/"),x}var jf=n=>n.replace(/[\\/]{2,}/g,"/"),Ma=n=>jf(n.join("/")),ju=n=>n.replace(/\/+$/,""),rb=n=>ju(n).replace(/^\/*/,"/"),sb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,ub=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,al=(n,i=302)=>{let s=i;typeof s=="number"?s={status:s}:typeof s.status>"u"&&(s.status=302);let o=new Headers(s.headers);return o.set("Location",n),new Response(null,{...s,headers:o})},cb=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Yr=class{constructor(n,i,s,o=!1){this.status=n,this.statusText=i||"",this.internal=o,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function Ri(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function Gr(n){let i=n.map(s=>s.route.path).filter(Boolean);return Ma(i)||"/"}var Cv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Mv(n,i){let s=n;if(typeof s!="string"||!Ru.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let o=s,f=!1;if(Cv)try{let d=new URL(window.location.href),h=yf.test(s)?new URL(Sv(s,d.protocol)):new URL(s),v=Aa(h.pathname,i);h.origin===d.origin&&v!=null?s=v+h.search+h.hash:f=!0}catch{St(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:f,to:s}}var nn=Symbol("Uninstrumented");function ob(n,i){let s={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(f=>f({id:i.id,index:i.index,path:i.path,instrument(d){let h=Object.keys(s);for(let v of h)d[v]&&s[v].push(d[v])}}));let o={};if(typeof i.lazy=="function"&&s.lazy.length>0){let f=wi(s.lazy,i.lazy,()=>{});f&&(o.lazy=f)}if(typeof i.lazy=="object"){let f=i.lazy;["middleware","loader","action"].forEach(d=>{let h=f[d],v=s[`lazy.${d}`];if(typeof h=="function"&&v.length>0){let x=wi(v,h,()=>{});x&&(o.lazy=Object.assign(o.lazy||{},{[d]:x}))}})}return["loader","action"].forEach(f=>{let d=i[f];if(typeof d=="function"&&s[f].length>0){let h=d[nn]??d,v=wi(s[f],h,(...x)=>Gp(x[0]));v&&(f==="loader"&&h.hydrate===!0&&(v.hydrate=!0),v[nn]=h,o[f]=v)}}),i.middleware&&i.middleware.length>0&&s.middleware.length>0&&(o.middleware=i.middleware.map(f=>{let d=f[nn]??f,h=wi(s.middleware,d,(...v)=>Gp(v[0]));return h?(h[nn]=d,h):f})),o}function fb(n,i){let s={navigate:[],fetch:[]};if(i.forEach(o=>o({instrument(f){let d=Object.keys(f);for(let h of d)f[h]&&s[h].push(f[h])}})),s.navigate.length>0){let o=n.navigate[nn]??n.navigate,f=wi(s.navigate,o,(...d)=>{let[h,v]=d;return{to:typeof h=="number"||typeof h=="string"?h:h?Pa(h):".",...Vp(n,v??{})}});f&&(f[nn]=o,n.navigate=f)}if(s.fetch.length>0){let o=n.fetch[nn]??n.fetch,f=wi(s.fetch,o,(...d)=>{let[h,,v,x]=d;return{href:v??".",fetcherKey:h,...Vp(n,x??{})}});f&&(f[nn]=o,n.fetch=f)}return n}function wi(n,i,s){return n.length===0?null:async(...o)=>{let f=await Av(n,s(...o),()=>i(...o),n.length-1);if(f.type==="error")throw f.value;return f.value}}async function Av(n,i,s,o){let f=n[o],d;if(f){let h,v=async()=>(h?console.error("You cannot call instrumented handlers more than once"):h=Av(n,i,s,o-1),d=await h,Ee(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await f(v,i)}catch(x){console.error("An instrumentation function threw an error:",x)}h||await v(),await h}else try{d={type:"success",value:await s()}}catch(h){d={type:"error",value:h}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Gp(n){let{request:i,context:s,params:o,pattern:f}=n;return{request:db(i),params:{...o},pattern:f,context:mb(s)}}function Vp(n,i){return{currentUrl:Pa(n.state.location),..."formMethod"in i?{formMethod:i.formMethod}:{},..."formEncType"in i?{formEncType:i.formEncType}:{},..."formData"in i?{formData:i.formData}:{},..."body"in i?{body:i.body}:{}}}function db(n){return{method:n.method,url:n.url,headers:{get:(...i)=>n.headers.get(...i)}}}function mb(n){if(pb(n)){let i={...n};return Object.freeze(i),i}else return{get:i=>n.get(i)}}var hb=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function pb(n){if(n===null||typeof n!="object")return!1;const i=Object.getPrototypeOf(n);return i===Object.prototype||i===null||Object.getOwnPropertyNames(i).sort().join("\0")===hb}var zv=["POST","PUT","PATCH","DELETE"],vb=new Set(zv),xb=["GET",...zv],gb=new Set(xb),_v=new Set([301,302,303,307,308]),yb=new Set([307,308]),tf={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ov={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Dr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},bb=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),kv="remix-router-transitions",Uv=Symbol("ResetLoaderData"),Tn,Si,an,ji,Sb=class{constructor(n){kr(this,Tn),kr(this,Si),kr(this,an),kr(this,ji),Fa(this,Tn,n),Fa(this,Si,xu(n))}get stableRoutes(){return Da(this,Tn)}get activeRoutes(){return Da(this,an)??Da(this,Tn)}get branches(){return Da(this,ji)??Da(this,Si)}get hasHMRRoutes(){return Da(this,an)!=null}setRoutes(n){Fa(this,Tn,n),Fa(this,Si,xu(n))}setHmrRoutes(n){Fa(this,an,n),Fa(this,ji,xu(n))}commitHmrRoutes(){Da(this,an)&&(Fa(this,Tn,Da(this,an)),Fa(this,Si,Da(this,ji)),Fa(this,an,void 0),Fa(this,ji,void 0))}};Tn=new WeakMap;Si=new WeakMap;an=new WeakMap;ji=new WeakMap;function jb(n){const i=n.window?n.window:typeof window<"u"?window:void 0,s=typeof i<"u"&&typeof i.document<"u"&&typeof i.document.createElement<"u";Ee(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let o=n.hydrationRouteProperties||[],f=n.mapRouteProperties||bb,d=f;if(n.instrumentations){let E=n.instrumentations;d=D=>({...f(D),...ob(E.map(z=>z.route).filter(Boolean),D)})}let h={},v=new Sb(qr(n.routes,d,void 0,h)),x=n.basename||"/";x.startsWith("/")||(x=`/${x}`);let p=n.dataStrategy||Tb,b={...n.future},y=null,j=new Set,N=null,A=null,B=null,k=null,Z=n.hydrationData!=null,F=Ya(v.activeRoutes,n.history.location,x,!1,v.branches),W=!1,ee=null,re,se;if(F==null&&!n.patchRoutesOnNavigation){let E=Ca(404,{pathname:n.history.location.pathname}),{matches:D,route:z}=mu(v.activeRoutes);re=!0,se=!re,F=D,ee={[z.id]:E}}else if(F&&!n.hydrationData&&Al(F,v.activeRoutes,n.history.location.pathname).active&&(F=null),F)if(F.some(E=>E.route.lazy))re=!1,se=!re;else if(!F.some(E=>Nf(E.route)))re=!0,se=!re;else{let E=n.hydrationData?n.hydrationData.loaderData:null,D=n.hydrationData?n.hydrationData.errors:null,z=F;if(D){let V=F.findIndex(Q=>D[Q.route.id]!==void 0);z=z.slice(0,V+1)}se=!1,re=!0,z.forEach(V=>{let Q=Lv(V.route,E,D);se=se||Q.renderFallback,re=re&&!Q.shouldLoad})}else{re=!1,se=!re,F=[];let E=Al(null,v.activeRoutes,n.history.location.pathname);E.active&&E.matches&&(W=!0,F=E.matches)}let le,M={historyAction:n.history.action,location:n.history.location,matches:F,initialized:re,renderFallback:se,navigation:tf,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||ee,fetchers:new Map,blockers:new Map},Re="POP",xe=null,Ke=!1,pe,st=!1,Te=new Map,ke=null,H=!1,X=!1,te=new Set,me=new Map,be=0,R=-1,q=new Map,K=new Set,J=new Map,he=new Map,fe=new Set,Se=new Map,We,Qe=null;function nl(){if(y=n.history.listen(({action:E,location:D,delta:z})=>{if(We){We(),We=void 0;return}St(Se.size===0||z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let V=on({currentLocation:M.location,nextLocation:D,historyAction:E});if(V&&z!=null){let Q=new Promise(ne=>{We=ne});n.history.go(z*-1),sl(V,{state:"blocked",location:D,proceed(){sl(V,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),Q.then(()=>n.history.go(z))},reset(){let ne=new Map(M.blockers);ne.set(V,Dr),Nt({blockers:ne})}}),xe==null||xe.resolve(),xe=null;return}return je(E,D)}),s){Qb(i,Te);let E=()=>Zb(i,Te);i.addEventListener("pagehide",E),ke=()=>i.removeEventListener("pagehide",E)}return M.initialized||je("POP",M.location,{initialHydration:!0}),le}function Cl(){y&&y(),ke&&ke(),j.clear(),pe&&pe.abort(),M.fetchers.forEach((E,D)=>rl(M.fetchers,D)),M.blockers.forEach((E,D)=>cn(D))}function kn(E){if(j.add(E),N){let{newErrors:D}=N;N=null,E(M,{deletedFetchers:[],newErrors:D,viewTransitionOpts:void 0,flushSync:!1})}return()=>j.delete(E)}function Nt(E,D={}){E.matches&&(E.matches=E.matches.map(Q=>{let ne=h[Q.route.id],P=Q.route;return P.element!==ne.element||P.errorElement!==ne.errorElement||P.hydrateFallbackElement!==ne.hydrateFallbackElement?{...Q,route:ne}:Q})),M={...M,...E};let z=[],V=[];M.fetchers.forEach((Q,ne)=>{Q.state==="idle"&&(fe.has(ne)?z.push(ne):V.push(ne))}),fe.forEach(Q=>{!M.fetchers.has(Q)&&!me.has(Q)&&z.push(Q)}),j.size===0&&(N={newErrors:E.errors??null}),[...j].forEach(Q=>Q(M,{deletedFetchers:z,newErrors:E.errors??null,viewTransitionOpts:D.viewTransitionOpts,flushSync:D.flushSync===!0})),z.forEach(Q=>rl(M.fetchers,Q)),V.forEach(Q=>M.fetchers.delete(Q))}function Xt(E,D,{flushSync:z}={}){var ye,De;let V=M.actionData!=null&&M.navigation.formMethod!=null&&Gt(M.navigation.formMethod)&&M.navigation.state==="loading"&&((ye=E.state)==null?void 0:ye._isRedirect)!==!0,Q;D.actionData?Object.keys(D.actionData).length>0?Q=D.actionData:Q=null:V?Q=M.actionData:Q=null;let ne=D.loaderData?ev(M.loaderData,D.loaderData,D.matches||[],D.errors):M.loaderData,P=M.blockers;P.size>0&&(P=new Map(P),P.forEach((de,Ae)=>P.set(Ae,Dr)));let oe=H?!1:Li(E,D.matches||M.matches),I=Ke===!0||M.navigation.formMethod!=null&&Gt(M.navigation.formMethod)&&((De=E.state)==null?void 0:De._isRedirect)!==!0;v.commitHmrRoutes(),H||Re==="POP"||(Re==="PUSH"?n.history.push(E,E.state):Re==="REPLACE"&&n.history.replace(E,E.state));let ce;if(Re==="POP"){let de=Te.get(M.location.pathname);de&&de.has(E.pathname)?ce={currentLocation:M.location,nextLocation:E}:Te.has(E.pathname)&&(ce={currentLocation:E,nextLocation:M.location})}else if(st){let de=Te.get(M.location.pathname);de?de.add(E.pathname):(de=new Set([E.pathname]),Te.set(M.location.pathname,de)),ce={currentLocation:M.location,nextLocation:E}}Nt({...D,actionData:Q,loaderData:ne,historyAction:Re,location:E,initialized:!0,renderFallback:!1,navigation:tf,revalidation:"idle",restoreScrollPosition:oe,preventScrollReset:I,blockers:P},{viewTransitionOpts:ce,flushSync:z===!0}),Re="POP",Ke=!1,st=!1,H=!1,X=!1,xe==null||xe.resolve(),xe=null,Qe==null||Qe.resolve(),Qe=null}async function un(E,D){if(xe==null||xe.resolve(),xe=null,typeof E=="number"){xe||(xe=nv());let Ge=xe.promise;return n.history.go(E),Ge}let z=mf(M.location,M.matches,x,E,D==null?void 0:D.fromRouteId,D==null?void 0:D.relative),{path:V,submission:Q,error:ne}=Xp(!1,z,D),P;D!=null&&D.mask&&(P={pathname:"",search:"",hash:"",...typeof D.mask=="string"?tl(D.mask):{...M.location.mask,...D.mask}});let oe=M.location,I=Br(oe,V,D&&D.state,void 0,P);I={...I,...n.history.encodeLocation(I)};let ce=D&&D.replace!=null?D.replace:void 0,ye="PUSH";ce===!0?ye="REPLACE":ce===!1||Q!=null&&Gt(Q.formMethod)&&Q.formAction===M.location.pathname+M.location.search&&(ye="REPLACE");let De=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,de=(D&&D.flushSync)===!0,Ae=on({currentLocation:oe,nextLocation:I,historyAction:ye});if(Ae){sl(Ae,{state:"blocked",location:I,proceed(){sl(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:I}),un(E,D)},reset(){let Ge=new Map(M.blockers);Ge.set(Ae,Dr),Nt({blockers:Ge})}});return}await je(ye,I,{submission:Q,pendingError:ne,preventScrollReset:De,replace:D&&D.replace,enableViewTransition:D&&D.viewTransition,flushSync:de,callSiteDefaultShouldRevalidate:D&&D.defaultShouldRevalidate})}function ae(){Qe||(Qe=nv()),kt(),Nt({revalidation:"loading"});let E=Qe.promise;return M.navigation.state==="submitting"?E:M.navigation.state==="idle"?(je(M.historyAction,M.location,{startUninterruptedRevalidation:!0}),E):(je(Re||M.historyAction,M.navigation.location,{overrideNavigation:M.navigation,enableViewTransition:st===!0}),E)}async function je(E,D,z){pe&&pe.abort(),pe=null,Re=E,H=(z&&z.startUninterruptedRevalidation)===!0,$u(M.location,M.matches),Ke=(z&&z.preventScrollReset)===!0,st=(z&&z.enableViewTransition)===!0;let V=v.activeRoutes,Q=z!=null&&z.initialHydration&&M.matches&&M.matches.length>0&&!W?M.matches:Ya(V,D,x,!1,v.branches),ne=(z&&z.flushSync)===!0;if(Q&&M.initialized&&!X&&Ub(M.location,D)&&!(z&&z.submission&&Gt(z.submission.formMethod))){Xt(D,{matches:Q},{flushSync:ne});return}let P=Al(Q,V,D.pathname);if(P.active&&P.matches&&(Q=P.matches),!Q){let{error:Fe,notFoundMatches:qe,route:xt}=ka(D.pathname);Xt(D,{matches:qe,loaderData:{},errors:{[xt.id]:Fe}},{flushSync:ne});return}let oe=z&&z.overrideNavigation?{...z.overrideNavigation,matches:Q,historyAction:E}:void 0;pe=new AbortController;let I=Ni(n.history,D,pe.signal,z&&z.submission),ce=n.getContext?await n.getContext():new Bp,ye;if(z&&z.pendingError)ye=[ln(Q).route.id,{type:"error",error:z.pendingError}];else if(z&&z.submission&&Gt(z.submission.formMethod)){let Fe=await ze(I,D,z.submission,Q,E,ce,P.active,z&&z.initialHydration===!0,{replace:z.replace,flushSync:ne});if(Fe.shortCircuited)return;if(Fe.pendingActionResult){let[qe,xt]=Fe.pendingActionResult;if(pa(xt)&&Ri(xt.error)&&xt.error.status===404){pe=null,Xt(D,{matches:Fe.matches,loaderData:{},errors:{[qe]:xt.error}});return}}Q=Fe.matches||Q,ye=Fe.pendingActionResult,oe=af(D,Q,E,z.submission),ne=!1,P.active=!1,I=Ni(n.history,I.url,I.signal)}let{shortCircuited:De,matches:de,loaderData:Ae,errors:Ge,workingFetchers:ct}=await tt(I,D,Q,E,ce,P.active,oe,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,z&&z.initialHydration===!0,ne,ye,z&&z.callSiteDefaultShouldRevalidate);De||(pe=null,Xt(D,{matches:de||Q,...tv(ye),loaderData:Ae,errors:Ge,...ct?{fetchers:ct}:{}}))}async function ze(E,D,z,V,Q,ne,P,oe,I={}){kt();let ce=Vb(D,V,Q,z);if(Nt({navigation:ce},{flushSync:I.flushSync===!0}),P){let de=await Va(V,D.pathname,E.signal);if(de.type==="aborted")return{shortCircuited:!0};if(de.type==="error"){if(de.partialMatches.length===0){let{matches:Ge,route:ct}=mu(v.activeRoutes);return{matches:Ge,pendingActionResult:[ct.id,{type:"error",error:de.error}]}}let Ae=ln(de.partialMatches).route.id;return{matches:de.partialMatches,pendingActionResult:[Ae,{type:"error",error:de.error}]}}else if(de.matches)V=de.matches;else{let{notFoundMatches:Ae,error:Ge,route:ct}=ka(D.pathname);return{matches:Ae,pendingActionResult:[ct.id,{type:"error",error:Ge}]}}}let ye,De=gu(V,D);if(!De.route.action&&!De.route.lazy)ye={type:"error",error:Ca(405,{method:E.method,pathname:D.pathname,routeId:De.route.id})};else{let de=Ei(d,h,E,D,V,De,oe?[]:o,ne),Ae=await Oa(E,D,de,ne,null);if(ye=Ae[De.route.id],!ye){for(let Ge of V)if(Ae[Ge.route.id]){ye=Ae[Ge.route.id];break}}if(E.signal.aborted)return{shortCircuited:!0}}if(Cn(ye)){let de;return I&&I.replace!=null?de=I.replace:de=Wp(ye.response.headers.get("Location"),new URL(E.url),x,n.history)===M.location.pathname+M.location.search,await Pt(E,ye,!0,{submission:z,replace:de}),{shortCircuited:!0}}if(pa(ye)){let de=ln(V,De.route.id);return(I&&I.replace)!==!0&&(Re="PUSH"),{matches:V,pendingActionResult:[de.route.id,ye,De.route.id]}}return{matches:V,pendingActionResult:[De.route.id,ye]}}async function tt(E,D,z,V,Q,ne,P,oe,I,ce,ye,De,de,Ae){let Ge=P||af(D,z,V,oe),ct=oe||I||lv(Ge),Fe=!H&&!ye;if(ne){if(Fe){let it=ut(de);Nt({navigation:Ge,...it!==void 0?{actionData:it}:{}},{flushSync:De})}let Ne=await Va(z,D.pathname,E.signal);if(Ne.type==="aborted")return{shortCircuited:!0};if(Ne.type==="error"){if(Ne.partialMatches.length===0){let{matches:sa,route:Ha}=mu(v.activeRoutes);return{matches:sa,loaderData:{},errors:{[Ha.id]:Ne.error}}}let it=ln(Ne.partialMatches).route.id;return{matches:Ne.partialMatches,loaderData:{},errors:{[it]:Ne.error}}}else if(Ne.matches)z=Ne.matches;else{let{error:it,notFoundMatches:sa,route:Ha}=ka(D.pathname);return{matches:sa,loaderData:{},errors:{[Ha.id]:it}}}}let qe=v.activeRoutes,{dsMatches:xt,revalidatingFetchers:$e}=Qp(E,Q,d,h,n.history,M,z,ct,D,ye?[]:o,ye===!0,X,te,fe,J,K,qe,x,n.patchRoutesOnNavigation!=null,v.branches,de,Ae);if(R=++be,!n.dataStrategy&&!xt.some(Ne=>Ne.shouldLoad)&&!xt.some(Ne=>Ne.route.middleware&&Ne.route.middleware.length>0)&&$e.length===0){let Ne=new Map(M.fetchers),it=Pr(Ne);return Xt(D,{matches:z,loaderData:{},errors:de&&pa(de[1])?{[de[0]]:de[1].error}:null,...tv(de),...it?{fetchers:Ne}:{}},{flushSync:De}),{shortCircuited:!0}}if(Fe){let Ne={};if(!ne){Ne.navigation=Ge;let it=ut(de);it!==void 0&&(Ne.actionData=it)}$e.length>0&&(Ne.fetchers=Qt($e)),Nt(Ne,{flushSync:De})}$e.forEach(Ne=>{Mt(Ne.key),Ne.controller&&me.set(Ne.key,Ne.controller)});let zl=()=>$e.forEach(Ne=>Mt(Ne.key));pe&&pe.signal.addEventListener("abort",zl);let{loaderResults:Ua,fetcherResults:ea}=await Zt(xt,$e,E,D,Q);if(E.signal.aborted)return{shortCircuited:!0};pe&&pe.signal.removeEventListener("abort",zl),$e.forEach(Ne=>me.delete(Ne.key));let Ft=hu(Ua);if(Ft)return await Pt(E,Ft.result,!0,{replace:ce}),{shortCircuited:!0};if(Ft=hu(ea),Ft)return K.add(Ft.key),await Pt(E,Ft.result,!0,{replace:ce}),{shortCircuited:!0};let ya=new Map(M.fetchers),{loaderData:Ln,errors:La}=Pp(M,z,Ua,de,$e,ea,ya);ye&&M.errors&&(La={...M.errors,...La});let Hn=Pr(ya),ul=es(R,ya),cl=Hn||ul||$e.length>0;return{matches:z,loaderData:Ln,errors:La,...cl?{workingFetchers:ya}:{}}}function ut(E){if(E&&!pa(E[1]))return{[E[0]]:E[1].data};if(M.actionData)return Object.keys(M.actionData).length===0?null:M.actionData}function Qt(E){let D=new Map(M.fetchers);return E.forEach(z=>{let V=D.get(z.key),Q=Cr(void 0,V?V.data:void 0);D.set(z.key,Q)}),D}async function _a(E,D,z,V){Mt(E);let Q=(V&&V.flushSync)===!0,ne=v.activeRoutes,P=mf(M.location,M.matches,x,z,D,V==null?void 0:V.relative),oe=Ya(ne,P,x,!1,v.branches),I=Al(oe,ne,P);if(I.active&&I.matches&&(oe=I.matches),!oe){ga(E,D,Ca(404,{pathname:P}),{flushSync:Q});return}let{path:ce,submission:ye,error:De}=Xp(!0,P,V);if(De){ga(E,D,De,{flushSync:Q});return}let de=n.getContext?await n.getContext():new Bp,Ae=(V&&V.preventScrollReset)===!0;if(ye&&Gt(ye.formMethod)){await il(E,D,ce,oe,de,I.active,Q,Ae,ye,V&&V.defaultShouldRevalidate);return}J.set(E,{routeId:D,path:ce}),await dt(E,D,ce,oe,de,I.active,Q,Ae,ye)}async function il(E,D,z,V,Q,ne,P,oe,I,ce){kt(),J.delete(E);let ye=M.fetchers.get(E);Dt(E,Xb(I,ye),{flushSync:P});let De=new AbortController,de=Ni(n.history,z,De.signal,I);if(ne){let Ie=await Va(V,new URL(de.url).pathname,de.signal,E);if(Ie.type==="aborted")return;if(Ie.type==="error"){ga(E,D,Ie.error,{flushSync:P});return}else if(Ie.matches)V=Ie.matches;else{ga(E,D,Ca(404,{pathname:z}),{flushSync:P});return}}let Ae=gu(V,z);if(!Ae.route.action&&!Ae.route.lazy){let Ie=Ca(405,{method:I.formMethod,pathname:z,routeId:D});ga(E,D,Ie,{flushSync:P});return}me.set(E,De);let Ge=be,ct=Ei(d,h,de,z,V,Ae,o,Q),Fe=await Oa(de,z,ct,Q,E),qe=Fe[Ae.route.id];if(!qe){for(let Ie of ct)if(Fe[Ie.route.id]){qe=Fe[Ie.route.id];break}}if(de.signal.aborted){me.get(E)===De&&me.delete(E);return}if(fe.has(E)){if(Cn(qe)||pa(qe)){Dt(E,Wa(void 0));return}}else{if(Cn(qe))if(me.delete(E),R>Ge){Dt(E,Wa(void 0));return}else return K.add(E),Dt(E,Cr(I)),Pt(de,qe,!1,{fetcherSubmission:I,preventScrollReset:oe});if(pa(qe)){ga(E,D,qe.error);return}}let xt=M.navigation.location||M.location,$e=Ni(n.history,xt,De.signal),zl=v.activeRoutes,Ua=M.navigation.state!=="idle"?Ya(zl,M.navigation.location,x,!1,v.branches):M.matches;Ee(Ua,"Didn't find any matches after fetcher action");let ea=++be;q.set(E,ea);let{dsMatches:Ft,revalidatingFetchers:ya}=Qp($e,Q,d,h,n.history,M,Ua,I,xt,o,!1,X,te,fe,J,K,zl,x,n.patchRoutesOnNavigation!=null,v.branches,[Ae.route.id,qe],ce),Ln=Cr(I,qe.data),La=new Map(M.fetchers);La.set(E,Ln),ya.filter(Ie=>Ie.key!==E).forEach(Ie=>{let ol=Ie.key,Jt=La.get(ol),Hi=Cr(void 0,Jt?Jt.data:void 0);La.set(ol,Hi),Mt(ol),Ie.controller&&me.set(ol,Ie.controller)}),Nt({fetchers:La});let Hn=()=>ya.forEach(Ie=>Mt(Ie.key));De.signal.addEventListener("abort",Hn);let{loaderResults:ul,fetcherResults:cl}=await Zt(Ft,ya,$e,xt,Q);if(De.signal.aborted)return;De.signal.removeEventListener("abort",Hn),q.delete(E),me.delete(E),ya.forEach(Ie=>me.delete(Ie.key));let Ne=M.fetchers.has(E),it=Ie=>{if(!Ne)return Ie;let ol=new Map(Ie.fetchers);return ol.set(E,Wa(qe.data)),{...Ie,fetchers:ol}},sa=hu(ul);if(sa)return M=it(M),Pt($e,sa.result,!1,{preventScrollReset:oe});if(sa=hu(cl),sa)return K.add(sa.key),M=it(M),Pt($e,sa.result,!1,{preventScrollReset:oe});let Ha=new Map(M.fetchers);Ne&&Ha.set(E,Wa(qe.data));let{loaderData:Bn,errors:qn}=Pp(M,Ua,ul,void 0,ya,cl,Ha);es(ea,Ha),M.navigation.state==="loading"&&ea>R?(Ee(Re,"Expected pending action"),pe&&pe.abort(),Xt(M.navigation.location,{matches:Ua,loaderData:Bn,errors:qn,fetchers:Ha})):(Nt({errors:qn,loaderData:ev(M.loaderData,Bn,Ua,qn),fetchers:Ha}),X=!1)}async function dt(E,D,z,V,Q,ne,P,oe,I){let ce=M.fetchers.get(E);Dt(E,Cr(I,ce?ce.data:void 0),{flushSync:P});let ye=new AbortController,De=Ni(n.history,z,ye.signal);if(ne){let qe=await Va(V,new URL(De.url).pathname,De.signal,E);if(qe.type==="aborted")return;if(qe.type==="error"){ga(E,D,qe.error,{flushSync:P});return}else if(qe.matches)V=qe.matches;else{ga(E,D,Ca(404,{pathname:z}),{flushSync:P});return}}let de=gu(V,z);me.set(E,ye);let Ae=be,Ge=Ei(d,h,De,z,V,de,o,Q),ct=await Oa(De,z,Ge,Q,E),Fe=ct[de.route.id];if(!Fe){for(let qe of V)if(ct[qe.route.id]){Fe=ct[qe.route.id];break}}if(me.get(E)===ye&&me.delete(E),!De.signal.aborted){if(fe.has(E)){Dt(E,Wa(void 0));return}if(Cn(Fe))if(R>Ae){Dt(E,Wa(void 0));return}else{K.add(E),await Pt(De,Fe,!1,{preventScrollReset:oe});return}if(pa(Fe)){ga(E,D,Fe.error);return}Dt(E,Wa(Fe.data))}}async function Pt(E,D,z,{submission:V,fetcherSubmission:Q,preventScrollReset:ne,replace:P}={}){z||(xe==null||xe.resolve(),xe=null),D.response.headers.has("X-Remix-Revalidate")&&(X=!0);let oe=D.response.headers.get("Location");Ee(oe,"Expected a Location header on the redirect Response"),oe=Wp(oe,new URL(E.url),x,n.history);let I=Br(M.location,oe,{_isRedirect:!0});if(s){let Ge=!1;if(D.response.headers.has("X-Remix-Reload-Document"))Ge=!0;else if(bf(oe)){const ct=jv(i,oe,!0);Ge=ct.origin!==i.location.origin||Aa(ct.pathname,x)==null}if(Ge){P?i.location.replace(oe):i.location.assign(oe);return}}pe=null;let ce=P===!0||D.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ye,formAction:De,formEncType:de}=M.navigation;!V&&!Q&&ye&&De&&de&&(V=lv(M.navigation));let Ae=V||Q;if(yb.has(D.response.status)&&Ae&&Gt(Ae.formMethod))await je(ce,I,{submission:{...Ae,formAction:oe},preventScrollReset:ne||Ke,enableViewTransition:z?st:void 0});else{let Ge=af(I,[],ce,V);await je(ce,I,{overrideNavigation:Ge,fetcherSubmission:Q,preventScrollReset:ne||Ke,enableViewTransition:z?st:void 0})}}async function Oa(E,D,z,V,Q){var oe;let ne,P={};try{ne=await Cb(p,E,D,z,Q,V,!1)}catch(I){return z.filter(ce=>ce.shouldLoad).forEach(ce=>{P[ce.route.id]={type:"error",error:I}}),P}if(E.signal.aborted)return P;if(!Gt(E.method))for(let I of z){if(((oe=ne[I.route.id])==null?void 0:oe.type)==="error")break;!ne.hasOwnProperty(I.route.id)&&!M.loaderData.hasOwnProperty(I.route.id)&&(!M.errors||!M.errors.hasOwnProperty(I.route.id))&&I.shouldCallHandler()&&(ne[I.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${I.route.id}`)})}for(let[I,ce]of Object.entries(ne))if(qb(ce)){let ye=ce.result;P[I]={type:"redirect",response:_b(ye,E,I,z,x)}}else P[I]=await zb(ce);return P}async function Zt(E,D,z,V,Q){let ne=Oa(z,V,E,Q,null),P=Promise.all(D.map(async ce=>{if(ce.matches&&ce.match&&ce.request&&ce.controller){let De=(await Oa(ce.request,ce.path,ce.matches,Q,ce.key))[ce.match.route.id];return{[ce.key]:De}}else return Promise.resolve({[ce.key]:{type:"error",error:Ca(404,{pathname:ce.path})}})})),oe=await ne,I=(await P).reduce((ce,ye)=>Object.assign(ce,ye),{});return{loaderResults:oe,fetcherResults:I}}function kt(){X=!0,J.forEach((E,D)=>{me.has(D)&&te.add(D),Mt(D)})}function Dt(E,D,z={}){let V=new Map(M.fetchers);V.set(E,D),Nt({fetchers:V},{flushSync:(z&&z.flushSync)===!0})}function ga(E,D,z,V={}){let Q=ln(M.matches,D),ne=new Map(M.fetchers);rl(ne,E),Nt({errors:{[Q.route.id]:z},fetchers:ne},{flushSync:(V&&V.flushSync)===!0})}function Hu(E){return he.set(E,(he.get(E)||0)+1),fe.has(E)&&fe.delete(E),M.fetchers.get(E)||Ov}function Bu(E,D){Mt(E,D==null?void 0:D.reason),Dt(E,Wa(null))}function rl(E,D){let z=M.fetchers.get(D);me.has(D)&&!(z&&z.state==="loading"&&q.has(D))&&Mt(D),J.delete(D),q.delete(D),K.delete(D),fe.delete(D),te.delete(D),E.delete(D)}function Kt(E){let D=(he.get(E)||0)-1;D<=0?(he.delete(E),fe.add(E)):he.set(E,D),Nt({fetchers:new Map(M.fetchers)})}function Mt(E,D){let z=me.get(E);z&&(z.abort(D),me.delete(E))}function $t(E,D){for(let z of E){let V=D.get(z);Ee(V,`Expected fetcher: ${z}`);let Q=Wa(V.data);D.set(z,Q)}}function Pr(E){let D=[],z=!1;for(let V of K){let Q=E.get(V);Ee(Q,`Expected fetcher: ${V}`),Q.state==="loading"&&(K.delete(V),D.push(V),z=!0)}return $t(D,E),z}function es(E,D){let z=[];for(let[V,Q]of q)if(Q<E){let ne=D.get(V);Ee(ne,`Expected fetcher: ${V}`),ne.state==="loading"&&(Mt(V),q.delete(V),z.push(V))}return $t(z,D),z.length>0}function qu(E,D){let z=M.blockers.get(E)||Dr;return Se.get(E)!==D&&Se.set(E,D),z}function cn(E){M.blockers.delete(E),Se.delete(E)}function sl(E,D){let z=M.blockers.get(E)||Dr;Ee(z.state==="unblocked"&&D.state==="blocked"||z.state==="blocked"&&D.state==="blocked"||z.state==="blocked"&&D.state==="proceeding"||z.state==="blocked"&&D.state==="unblocked"||z.state==="proceeding"&&D.state==="unblocked",`Invalid blocker state transition: ${z.state} -> ${D.state}`);let V=new Map(M.blockers);V.set(E,D),Nt({blockers:V})}function on({currentLocation:E,nextLocation:D,historyAction:z}){if(Se.size===0)return;Se.size>1&&St(!1,"A router only supports one blocker at a time");let V=Array.from(Se.entries()),[Q,ne]=V[V.length-1],P=M.blockers.get(Q);if(!(P&&P.state==="proceeding")&&ne({currentLocation:E,nextLocation:D,historyAction:z}))return Q}function ka(E){let D=Ca(404,{pathname:E}),z=v.activeRoutes,{matches:V,route:Q}=mu(z);return{notFoundMatches:V,route:Q,error:D}}function Un(E,D,z){if(A=E,k=D,B=z||null,!Z&&M.navigation===tf){Z=!0;let V=Li(M.location,M.matches);V!=null&&Nt({restoreScrollPosition:V})}return()=>{A=null,k=null,B=null}}function Ml(E,D){return B&&B(E,D.map(V=>Qy(V,M.loaderData)))||E.key}function $u(E,D){if(A&&k){let z=Ml(E,D);A[z]=k()}}function Li(E,D){if(A){let z=Ml(E,D),V=A[z];if(typeof V=="number")return V}return null}function Al(E,D,z){if(n.patchRoutesOnNavigation){let V=v.branches;if(E){if(Object.keys(E[0].params).length>0)return{active:!0,matches:Ya(D,z,x,!0,V)}}else return{active:!0,matches:Ya(D,z,x,!0,V)||[]}}return{active:!1,matches:null}}async function Va(E,D,z,V){if(!n.patchRoutesOnNavigation)return{type:"success",matches:E};let Q=E;for(;;){let ne=h;try{await n.patchRoutesOnNavigation({signal:z,path:D,matches:Q,fetcherKey:V,patch:(ce,ye)=>{z.aborted||Zp(ce,ye,v,ne,d,!1)}})}catch(ce){return{type:"error",error:ce,partialMatches:Q}}if(z.aborted)return{type:"aborted"};let P=v.branches,oe=Ya(v.activeRoutes,D,x,!1,P),I=null;if(oe){if(Object.keys(oe[0].params).length===0)return{type:"success",matches:oe};if(I=Ya(v.activeRoutes,D,x,!0,P),!(I&&Q.length<I.length&&ts(Q,I.slice(0,Q.length))))return{type:"success",matches:oe}}if(I||(I=Ya(v.activeRoutes,D,x,!0,P)),!I||ts(Q,I))return{type:"success",matches:null};Q=I}}function ts(E,D){return E.length===D.length&&E.every((z,V)=>z.route.id===D[V].route.id)}function as(E){h={},v.setHmrRoutes(qr(E,d,void 0,h))}function ls(E,D,z=!1){Zp(E,D,v,h,d,z),v.hasHMRRoutes||Nt({})}return le={get basename(){return x},get future(){return b},get state(){return M},get routes(){return v.stableRoutes},get branches(){return v.branches},get manifest(){return h},get window(){return i},initialize:nl,subscribe:kn,enableScrollRestoration:Un,navigate:un,fetch:_a,revalidate:ae,createHref:E=>n.history.createHref(E),encodeLocation:E=>n.history.encodeLocation(E),getFetcher:Hu,resetFetcher:Bu,deleteFetcher:Kt,dispose:Cl,getBlocker:qu,deleteBlocker:cn,patchRoutes:ls,_internalFetchControllers:me,_internalSetRoutes:as,_internalSetStateDoNotUseOrYouWillBreakYourApp(E){Nt(E)}},n.instrumentations&&(le=fb(le,n.instrumentations.map(E=>E.router).filter(Boolean))),le}function Nb(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function mf(n,i,s,o,f,d){let h,v;if(f){h=[];for(let p of i)if(h.push(p),p.route.id===f){v=p;break}}else h=i,v=i[i.length-1];let x=Tu(o||".",Sf(h),Aa(n.pathname,s)||n.pathname,d==="path");if(o==null&&(x.search=n.search,x.hash=n.hash),(o==null||o===""||o===".")&&v){let p=Ef(x.search);if(v.route.index&&!p)x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index";else if(!v.route.index&&p){let b=new URLSearchParams(x.search),y=b.getAll("index");b.delete("index"),y.filter(N=>N).forEach(N=>b.append("index",N));let j=b.toString();x.search=j?`?${j}`:""}}return s!=="/"&&(x.pathname=nb({basename:s,pathname:x.pathname})),Pa(x)}function Xp(n,i,s){if(!s||!Nb(s))return{path:i};if(s.formMethod&&!Gb(s.formMethod))return{path:i,error:Ca(405,{method:s.formMethod})};let o=()=>({path:i,error:Ca(400,{type:"invalid-body"})}),d=(s.formMethod||"get").toUpperCase(),h=Vv(i);if(s.body!==void 0){if(s.formEncType==="text/plain"){if(!Gt(d))return o();let y=typeof s.body=="string"?s.body:s.body instanceof FormData||s.body instanceof URLSearchParams?Array.from(s.body.entries()).reduce((j,[N,A])=>`${j}${N}=${A}
59
+ `,""):String(s.body);return{path:i,submission:{formMethod:d,formAction:h,formEncType:s.formEncType,formData:void 0,json:void 0,text:y}}}else if(s.formEncType==="application/json"){if(!Gt(d))return o();try{let y=typeof s.body=="string"?JSON.parse(s.body):s.body;return{path:i,submission:{formMethod:d,formAction:h,formEncType:s.formEncType,formData:void 0,json:y,text:void 0}}}catch{return o()}}}Ee(typeof FormData=="function","FormData is not available in this environment");let v,x;if(s.formData)v=vf(s.formData),x=s.formData;else if(s.body instanceof FormData)v=vf(s.body),x=s.body;else if(s.body instanceof URLSearchParams)v=s.body,x=Ip(v);else if(s.body==null)v=new URLSearchParams,x=new FormData;else try{v=new URLSearchParams(s.body),x=Ip(v)}catch{return o()}let p={formMethod:d,formAction:h,formEncType:s&&s.formEncType||"application/x-www-form-urlencoded",formData:x,json:void 0,text:void 0};if(Gt(p.formMethod))return{path:i,submission:p};let b=tl(i);return n&&b.search&&Ef(b.search)&&v.append("index",""),b.search=`?${v}`,{path:Pa(b),submission:p}}function Qp(n,i,s,o,f,d,h,v,x,p,b,y,j,N,A,B,k,Z,F,W,ee,re){var H;let se=ee?pa(ee[1])?ee[1].error:ee[1].data:void 0,le=f.createURL(d.location),M=f.createURL(x),Re;if(b&&d.errors){let X=Object.keys(d.errors)[0];Re=h.findIndex(te=>te.route.id===X)}else if(ee&&pa(ee[1])){let X=ee[0];Re=h.findIndex(te=>te.route.id===X)-1}let xe=ee?ee[1].statusCode:void 0,Ke=xe&&xe>=400,pe={currentUrl:le,currentParams:((H=d.matches[0])==null?void 0:H.params)||{},nextUrl:M,nextParams:h[0].params,...v,actionResult:se,actionStatus:xe},st=Gr(h),Te=h.map((X,te)=>{let{route:me}=X,be=null;if(Re!=null&&te>Re)be=!1;else if(me.lazy)be=!0;else if(!Nf(me))be=!1;else if(b){let{shouldLoad:J}=Lv(me,d.loaderData,d.errors);be=J}else wb(d.loaderData,d.matches[te],X)&&(be=!0);if(be!==null)return hf(s,o,n,x,st,X,p,i,be);let R=!1;typeof re=="boolean"?R=re:Ke?R=!1:(y||le.pathname+le.search===M.pathname+M.search||le.search!==M.search||Eb(d.matches[te],X))&&(R=!0);let q={...pe,defaultShouldRevalidate:R},K=Hr(X,q);return hf(s,o,n,x,st,X,p,i,K,q,re)}),ke=[];return A.forEach((X,te)=>{if(b||!h.some(fe=>fe.route.id===X.routeId)||N.has(te))return;let me=d.fetchers.get(te),be=me&&me.state!=="idle"&&me.data===void 0,R=Ya(k,X.path,Z??"/",!1,W);if(!R){if(F&&be)return;ke.push({key:te,routeId:X.routeId,path:X.path,matches:null,match:null,request:null,controller:null});return}if(B.has(te))return;let q=gu(R,X.path),K=new AbortController,J=Ni(f,X.path,K.signal),he=null;if(j.has(te))j.delete(te),he=Ei(s,o,J,X.path,R,q,p,i);else if(be)y&&(he=Ei(s,o,J,X.path,R,q,p,i));else{let fe;typeof re=="boolean"?fe=re:Ke?fe=!1:fe=y;let Se={...pe,defaultShouldRevalidate:fe};Hr(q,Se)&&(he=Ei(s,o,J,X.path,R,q,p,i,Se))}he&&ke.push({key:te,routeId:X.routeId,path:X.path,matches:he,match:q,request:J,controller:K})}),{dsMatches:Te,revalidatingFetchers:ke}}function Nf(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function Lv(n,i,s){if(n.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Nf(n))return{shouldLoad:!1,renderFallback:!1};let o=i!=null&&n.id in i,f=s!=null&&s[n.id]!==void 0;if(!o&&f)return{shouldLoad:!1,renderFallback:!1};if(typeof n.loader=="function"&&n.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!o};let d=!o&&!f;return{shouldLoad:d,renderFallback:d}}function wb(n,i,s){let o=!i||s.route.id!==i.route.id,f=!n.hasOwnProperty(s.route.id);return o||f}function Eb(n,i){let s=n.route.path;return n.pathname!==i.pathname||s!=null&&s.endsWith("*")&&n.params["*"]!==i.params["*"]}function Hr(n,i){if(n.route.shouldRevalidate){let s=n.route.shouldRevalidate(i);if(typeof s=="boolean")return s}return i.defaultShouldRevalidate}function Zp(n,i,s,o,f,d){let h;if(n){let p=o[n];Ee(p,`No route found to patch children into: routeId = ${n}`),p.children||(p.children=[]),h=p.children}else h=s.activeRoutes;let v=[],x=[];if(i.forEach(p=>{let b=h.find(y=>Hv(p,y));b?x.push({existingRoute:b,newRoute:p}):v.push(p)}),v.length>0){let p=qr(v,f,[n||"_","patch",String((h==null?void 0:h.length)||"0")],o);h.push(...p)}if(d&&x.length>0)for(let p=0;p<x.length;p++){let{existingRoute:b,newRoute:y}=x[p],j=b,[N]=qr([y],f,[],{},!0);Object.assign(j,{element:N.element?N.element:j.element,errorElement:N.errorElement?N.errorElement:j.errorElement,hydrateFallbackElement:N.hydrateFallbackElement?N.hydrateFallbackElement:j.hydrateFallbackElement})}s.hasHMRRoutes||s.setRoutes([...s.activeRoutes])}function Hv(n,i){var s;return"id"in n&&"id"in i&&n.id===i.id?!0:n.index===i.index&&n.path===i.path&&n.caseSensitive===i.caseSensitive?(!n.children||n.children.length===0)&&(!i.children||i.children.length===0)?!0:((s=n.children)==null?void 0:s.every((o,f)=>{var d;return(d=i.children)==null?void 0:d.some(h=>Hv(o,h))}))??!1:!1}var Kp=new WeakMap,Bv=({key:n,route:i,manifest:s,mapRouteProperties:o})=>{let f=s[i.id];if(Ee(f,"No route found in manifest"),!f.lazy||typeof f.lazy!="object")return;let d=f.lazy[n];if(!d)return;let h=Kp.get(f);h||(h={},Kp.set(f,h));let v=h[n];if(v)return v;let x=(async()=>{let p=Yy(n),y=f[n]!==void 0&&n!=="hasErrorBoundary";if(p)St(!p,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),h[n]=Promise.resolve();else if(y)St(!1,`Route "${f.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let j=await d();j!=null&&(Object.assign(f,{[n]:j}),Object.assign(f,o(f)))}typeof f.lazy=="object"&&(f.lazy[n]=void 0,Object.values(f.lazy).every(j=>j===void 0)&&(f.lazy=void 0))})();return h[n]=x,x},Fp=new WeakMap;function Rb(n,i,s,o,f){let d=s[n.id];if(Ee(d,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let b=Fp.get(d);if(b)return{lazyRoutePromise:b,lazyHandlerPromise:b};let y=(async()=>{Ee(typeof n.lazy=="function","No lazy route function found");let j=await n.lazy(),N={};for(let A in j){let B=j[A];if(B===void 0)continue;let k=Vy(A),F=d[A]!==void 0&&A!=="hasErrorBoundary";k?St(!k,"Route property "+A+" is not a supported property to be returned from a lazy route function. This property will be ignored."):F?St(!F,`Route "${d.id}" has a static property "${A}" defined but its lazy function is also returning a value for this property. The lazy route property "${A}" will be ignored.`):N[A]=B}Object.assign(d,N),Object.assign(d,{...o(d),lazy:void 0})})();return Fp.set(d,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let h=Object.keys(n.lazy),v=[],x;for(let b of h){if(f&&f.includes(b))continue;let y=Bv({key:b,route:n,manifest:s,mapRouteProperties:o});y&&(v.push(y),b===i&&(x=y))}let p=v.length>0?Promise.all(v).then(()=>{}):void 0;return p==null||p.catch(()=>{}),x==null||x.catch(()=>{}),{lazyRoutePromise:p,lazyHandlerPromise:x}}async function Jp(n){let i=n.matches.filter(f=>f.shouldLoad),s={};return(await Promise.all(i.map(f=>f.resolve()))).forEach((f,d)=>{s[i[d].route.id]=f}),s}async function Tb(n){return n.matches.some(i=>i.route.middleware)?qv(n,()=>Jp(n)):Jp(n)}function qv(n,i){return Db(n,i,o=>{if(Yb(o))throw o;return o},Hb,s);function s(o,f,d){if(d)return Promise.resolve(Object.assign(d.value,{[f]:{type:"error",result:o}}));{let{matches:h}=n,v=Math.min(Math.max(h.findIndex(p=>p.route.id===f),0),Math.max(h.findIndex(p=>p.shouldCallHandler()),0)),x=ln(h,h[v].route.id).route.id;return Promise.resolve({[x]:{type:"error",result:o}})}}}async function Db(n,i,s,o,f){let{matches:d,...h}=n,v=d.flatMap(p=>p.route.middleware?p.route.middleware.map(b=>[p.route.id,b]):[]);return await $v(h,v,i,s,o,f)}async function $v(n,i,s,o,f,d,h=0){let{request:v}=n;if(v.signal.aborted)throw v.signal.reason??new Error(`Request aborted: ${v.method} ${v.url}`);let x=i[h];if(!x)return await s();let[p,b]=x,y,j=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await $v(n,i,s,o,f,d,h+1)},y.value}catch(N){return y={value:await d(N,p,y)},y.value}};try{let N=await b(n,j),A=N!=null?o(N):void 0;return f(A)?A:y?A??y.value:(y={value:await j()},y.value)}catch(N){return await d(N,p,y)}}function Yv(n,i,s,o,f){let d=Bv({key:"middleware",route:o.route,manifest:i,mapRouteProperties:n}),h=Rb(o.route,Gt(s.method)?"action":"loader",i,n,f);return{middleware:d,route:h.lazyRoutePromise,handler:h.lazyHandlerPromise}}function hf(n,i,s,o,f,d,h,v,x,p=null,b){let y=!1,j=Yv(n,i,s,d,h);return{...d,_lazyPromises:j,shouldLoad:x,shouldRevalidateArgs:p,shouldCallHandler(N){return y=!0,p?typeof b=="boolean"?Hr(d,{...p,defaultShouldRevalidate:b}):typeof N=="boolean"?Hr(d,{...p,defaultShouldRevalidate:N}):Hr(d,p):x},resolve(N){let{lazy:A,loader:B,middleware:k}=d.route,Z=y||x||N&&!Gt(s.method)&&(A||B),F=k&&k.length>0&&!B&&!A;return Z&&(Gt(s.method)||!F)?Mb({request:s,path:o,pattern:f,match:d,lazyHandlerPromise:j==null?void 0:j.handler,lazyRoutePromise:j==null?void 0:j.route,handlerOverride:N,scopedContext:v}):Promise.resolve({type:"data",result:void 0})}}}function Ei(n,i,s,o,f,d,h,v,x=null){return f.map(p=>p.route.id!==d.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:x,shouldCallHandler:()=>!1,_lazyPromises:Yv(n,i,s,p,h),resolve:()=>Promise.resolve({type:"data",result:void 0})}:hf(n,i,s,o,Gr(f),p,h,v,!0,x))}async function Cb(n,i,s,o,f,d,h){o.some(b=>{var y;return(y=b._lazyPromises)==null?void 0:y.middleware})&&await Promise.all(o.map(b=>{var y;return(y=b._lazyPromises)==null?void 0:y.middleware}));let v={request:i,url:Gv(i,s),pattern:Gr(o),params:o[0].params,context:d,matches:o},p=await n({...v,fetcherKey:f,runClientMiddleware:b=>{let y=v;return qv(y,()=>b({...y,fetcherKey:f,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(o.flatMap(b=>{var y,j;return[(y=b._lazyPromises)==null?void 0:y.handler,(j=b._lazyPromises)==null?void 0:j.route]}))}catch{}return p}async function Mb({request:n,path:i,pattern:s,match:o,lazyHandlerPromise:f,lazyRoutePromise:d,handlerOverride:h,scopedContext:v}){let x,p,b=Gt(n.method),y=b?"action":"loader",j=N=>{let A,B=new Promise((F,W)=>A=W);p=()=>A(),n.signal.addEventListener("abort",p);let k=F=>typeof N!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${o.route.id}]`)):N({request:n,url:Gv(n,i),pattern:s,params:o.params,context:v},...F!==void 0?[F]:[]),Z=(async()=>{try{return{type:"data",result:await(h?h(W=>k(W)):k())}}catch(F){return{type:"error",result:F}}})();return Promise.race([Z,B])};try{let N=b?o.route.action:o.route.loader;if(f||d)if(N){let A,[B]=await Promise.all([j(N).catch(k=>{A=k}),f,d]);if(A!==void 0)throw A;x=B}else{await f;let A=b?o.route.action:o.route.loader;if(A)[x]=await Promise.all([j(A),d]);else if(y==="action"){let B=new URL(n.url),k=B.pathname+B.search;throw Ca(405,{method:n.method,pathname:k,routeId:o.route.id})}else return{type:"data",result:void 0}}else if(N)x=await j(N);else{let A=new URL(n.url),B=A.pathname+A.search;throw Ca(404,{pathname:B})}}catch(N){return{type:"error",result:N}}finally{p&&n.signal.removeEventListener("abort",p)}return x}async function Ab(n){let i=n.headers.get("Content-Type");return i&&/\bapplication\/json\b/.test(i)?n.body==null?null:n.json():n.text()}async function zb(n){var o,f,d,h,v;let{result:i,type:s}=n;if(wf(i)){let x;try{x=await Ab(i)}catch(p){return{type:"error",error:p}}return s==="error"?{type:"error",error:new Yr(i.status,i.statusText,x),statusCode:i.status,headers:i.headers}:{type:"data",data:x,statusCode:i.status,headers:i.headers}}return s==="error"?av(i)?i.data instanceof Error?{type:"error",error:i.data,statusCode:(o=i.init)==null?void 0:o.status,headers:(f=i.init)!=null&&f.headers?new Headers(i.init.headers):void 0}:{type:"error",error:Lb(i),statusCode:Ri(i)?i.status:void 0,headers:(d=i.init)!=null&&d.headers?new Headers(i.init.headers):void 0}:{type:"error",error:i,statusCode:Ri(i)?i.status:void 0}:av(i)?{type:"data",data:i.data,statusCode:(h=i.init)==null?void 0:h.status,headers:(v=i.init)!=null&&v.headers?new Headers(i.init.headers):void 0}:{type:"data",data:i}}function _b(n,i,s,o,f){let d=n.headers.get("Location");if(Ee(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!bf(d)){let h=o.slice(0,o.findIndex(v=>v.route.id===s)+1);d=mf(new URL(i.url),h,f,d),n.headers.set("Location",d)}return n}var Ob=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function pf(n){try{return Ob.includes(new URL(n).protocol)}catch{return!1}}function Wp(n,i,s,o){if(bf(n)){let f=n,d=yf.test(f)?new URL(Sv(f,i.protocol)):new URL(f);if(pf(d.toString()))throw new Error("Invalid redirect location");let h=Aa(d.pathname,s)!=null;if(d.origin===i.origin&&h)return jf(d.pathname)+d.search+d.hash}try{let f=o.createURL(n);if(pf(f.toString()))throw new Error("Invalid redirect location")}catch{}return n}function Ni(n,i,s,o){let f=n.createURL(Vv(i)).toString(),d={signal:s};if(o&&Gt(o.formMethod)){let{formMethod:h,formEncType:v}=o;d.method=h.toUpperCase(),v==="application/json"?(d.headers=new Headers({"Content-Type":v}),d.body=JSON.stringify(o.json)):v==="text/plain"?d.body=o.text:v==="application/x-www-form-urlencoded"&&o.formData?d.body=vf(o.formData):d.body=o.formData}return new Request(f,d)}function Gv(n,i){let s=new URL(n.url),o=typeof i=="string"?tl(i):i;if(s.pathname=o.pathname||"/",o.search){let f=new URLSearchParams(o.search),d=f.getAll("index");f.delete("index");for(let h of d.filter(Boolean))f.append("index",h);s.search=f.size?`?${f.toString()}`:""}else s.search="";return s.hash=o.hash||"",s}function vf(n){let i=new URLSearchParams;for(let[s,o]of n.entries())i.append(s,typeof o=="string"?o:o.name);return i}function Ip(n){let i=new FormData;for(let[s,o]of n.entries())i.append(s,o);return i}function kb(n,i,s,o=!1,f=!1){let d={},h=null,v,x=!1,p={},b=s&&pa(s[1])?s[1].error:void 0;return n.forEach(y=>{if(!(y.route.id in i))return;let j=y.route.id,N=i[j];if(Ee(!Cn(N),"Cannot handle redirect results in processLoaderData"),pa(N)){let A=N.error;if(b!==void 0&&(A=b,b=void 0),h=h||{},f)h[j]=A;else{let B=ln(n,j);h[B.route.id]==null&&(h[B.route.id]=A)}o||(d[j]=Uv),x||(x=!0,v=Ri(N.error)?N.error.status:500),N.headers&&(p[j]=N.headers)}else d[j]=N.data,N.statusCode&&N.statusCode!==200&&!x&&(v=N.statusCode),N.headers&&(p[j]=N.headers)}),b!==void 0&&s&&(h={[s[0]]:b},s[2]&&(d[s[2]]=void 0)),{loaderData:d,errors:h,statusCode:v||200,loaderHeaders:p}}function Pp(n,i,s,o,f,d,h){let{loaderData:v,errors:x}=kb(i,s,o);return f.filter(p=>!p.matches||p.matches.some(b=>b.shouldLoad)).forEach(p=>{let{key:b,match:y,controller:j}=p;if(j&&j.signal.aborted)return;let N=d[b];if(Ee(N,"Did not find corresponding fetcher result"),pa(N)){let A=ln(n.matches,y==null?void 0:y.route.id);x&&x[A.route.id]||(x={...x,[A.route.id]:N.error}),h.delete(b)}else if(Cn(N))Ee(!1,"Unhandled fetcher revalidation redirect");else{let A=Wa(N.data);h.set(b,A)}}),{loaderData:v,errors:x}}function ev(n,i,s,o){let f=Object.entries(i).filter(([,d])=>d!==Uv).reduce((d,[h,v])=>(d[h]=v,d),{});for(let d of s){let h=d.route.id;if(!i.hasOwnProperty(h)&&n.hasOwnProperty(h)&&d.route.loader&&(f[h]=n[h]),o&&o.hasOwnProperty(h))break}return f}function tv(n){return n?pa(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function ln(n,i){return(i?n.slice(0,n.findIndex(o=>o.route.id===i)+1):[...n]).reverse().find(o=>o.route.hasErrorBoundary===!0)||n[0]}function mu(n){let i=n.length===1?n[0]:n.find(s=>s.index||!s.path||s.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:i}],route:i}}function Ca(n,{pathname:i,routeId:s,method:o,type:f,message:d}={}){let h="Unknown Server Error",v="Unknown @remix-run/router error";return n===400?(h="Bad Request",o&&i&&s?v=`You made a ${o} request to "${i}" but did not provide a \`loader\` for route "${s}", so there is no way to handle the request.`:f==="invalid-body"&&(v="Unable to encode submission body")):n===403?(h="Forbidden",v=`Route "${s}" does not match URL "${i}"`):n===404?(h="Not Found",v=`No route matches URL "${i}"`):n===405&&(h="Method Not Allowed",o&&i&&s?v=`You made a ${o.toUpperCase()} request to "${i}" but did not provide an \`action\` for route "${s}", so there is no way to handle the request.`:o&&(v=`Invalid request method "${o.toUpperCase()}"`)),new Yr(n||500,h,new Error(v),!0)}function hu(n){let i=Object.entries(n);for(let s=i.length-1;s>=0;s--){let[o,f]=i[s];if(Cn(f))return{key:o,result:f}}}function Vv(n){let i=typeof n=="string"?tl(n):n;return Pa({...i,hash:""})}function Ub(n,i){return n.pathname!==i.pathname||n.search!==i.search?!1:n.hash===""?i.hash!=="":n.hash===i.hash?!0:i.hash!==""}function Lb(n){var i,s;return new Yr(((i=n.init)==null?void 0:i.status)??500,((s=n.init)==null?void 0:s.statusText)??"Internal Server Error",n.data)}function Hb(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([i,s])=>typeof i=="string"&&Bb(s))}function Bb(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function qb(n){return wf(n.result)&&_v.has(n.result.status)}function pa(n){return n.type==="error"}function Cn(n){return(n&&n.type)==="redirect"}function av(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function wf(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function $b(n){return _v.has(n)}function Yb(n){return wf(n)&&$b(n.status)&&n.headers.has("Location")}function Gb(n){return gb.has(n.toUpperCase())}function Gt(n){return vb.has(n.toUpperCase())}function Ef(n){return new URLSearchParams(n).getAll("index").some(i=>i==="")}function gu(n,i){let s=typeof i=="string"?tl(i).search:i.search;if(n[n.length-1].route.index&&Ef(s||""))return n[n.length-1];let o=Dv(n);return o[o.length-1]}function lv(n){let{formMethod:i,formAction:s,formEncType:o,text:f,formData:d,json:h}=n;if(!(!i||!s||!o)){if(f!=null)return{formMethod:i,formAction:s,formEncType:o,formData:void 0,json:void 0,text:f};if(d!=null)return{formMethod:i,formAction:s,formEncType:o,formData:d,json:void 0,text:void 0};if(h!==void 0)return{formMethod:i,formAction:s,formEncType:o,formData:void 0,json:h,text:void 0}}}function af(n,i,s,o){return o?{state:"loading",location:n,matches:i,historyAction:s,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:n,matches:i,historyAction:s,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Vb(n,i,s,o){return{state:"submitting",location:n,matches:i,historyAction:s,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function Cr(n,i){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:i}}function Xb(n,i){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:i?i.data:void 0}}function Wa(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function Qb(n,i){try{let s=n.sessionStorage.getItem(kv);if(s){let o=JSON.parse(s);for(let[f,d]of Object.entries(o||{}))d&&Array.isArray(d)&&i.set(f,new Set(d||[]))}}catch{}}function Zb(n,i){if(i.size>0){let s={};for(let[o,f]of i)s[o]=[...f];try{n.sessionStorage.setItem(kv,JSON.stringify(s))}catch(o){St(!1,`Failed to save applied view transitions in sessionStorage (${o}).`)}}}function nv(){let n,i,s=new Promise((o,f)=>{n=async d=>{o(d);try{await s}catch{}},i=async d=>{f(d);try{await s}catch{}}});return{promise:s,resolve:n,reject:i}}var zn=S.createContext(null);zn.displayName="DataRouter";var Mi=S.createContext(null);Mi.displayName="DataRouterState";var Xv=S.createContext(!1);function Qv(){return S.useContext(Xv)}var Rf=S.createContext({isTransitioning:!1});Rf.displayName="ViewTransition";var Tf=S.createContext(new Map);Tf.displayName="Fetchers";var Kb=S.createContext(null);Kb.displayName="Await";var za=S.createContext(null);za.displayName="Navigation";var Du=S.createContext(null);Du.displayName="Location";var Ga=S.createContext({outlet:null,matches:[],isDataRoute:!1});Ga.displayName="Route";var Df=S.createContext(null);Df.displayName="RouteError";var Zv="REACT_ROUTER_ERROR",Fb="REDIRECT",Jb="ROUTE_ERROR_RESPONSE";function Wb(n){if(n.startsWith(`${Zv}:${Fb}:{`))try{let i=JSON.parse(n.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function Ib(n){if(n.startsWith(`${Zv}:${Jb}:{`))try{let i=JSON.parse(n.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new Yr(i.status,i.statusText,i.data)}catch{}}function Pb(n,{relative:i}={}){Ee(Vr(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:o}=S.useContext(za),{hash:f,pathname:d,search:h}=Xr(n,{relative:i}),v=d;return s!=="/"&&(v=d==="/"?s:Ma([s,d])),o.createHref({pathname:v,search:h,hash:f})}function Vr(){return S.useContext(Du)!=null}function ll(){return Ee(Vr(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Du).location}var Kv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fv(n){S.useContext(za).static||S.useLayoutEffect(n)}function rn(){let{isDataRoute:n}=S.useContext(Ga);return n?d0():e0()}function e0(){Ee(Vr(),"useNavigate() may be used only in the context of a <Router> component.");let n=S.useContext(zn),{basename:i,navigator:s}=S.useContext(za),{matches:o}=S.useContext(Ga),{pathname:f}=ll(),d=JSON.stringify(Sf(o)),h=S.useRef(!1);return Fv(()=>{h.current=!0}),S.useCallback((x,p={})=>{if(St(h.current,Kv),!h.current)return;if(typeof x=="number"){s.go(x);return}let b=Tu(x,JSON.parse(d),f,p.relative==="path");n==null&&i!=="/"&&(b.pathname=b.pathname==="/"?i:Ma([i,b.pathname])),(p.replace?s.replace:s.push)(b,p.state,p)},[i,s,d,f,n])}var t0=S.createContext(null);function a0(n){let i=S.useContext(Ga).outlet;return S.useMemo(()=>i&&S.createElement(t0.Provider,{value:n},i),[i,n])}function Xr(n,{relative:i}={}){let{matches:s}=S.useContext(Ga),{pathname:o}=ll(),f=JSON.stringify(Sf(s));return S.useMemo(()=>Tu(n,JSON.parse(f),o,i==="path"),[n,f,o,i])}function l0(n,i,s){Ee(Vr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=S.useContext(za),{matches:f}=S.useContext(Ga),d=f[f.length-1],h=d?d.params:{},v=d?d.pathname:"/",x=d?d.pathnameBase:"/",p=d&&d.route;{let k=p&&p.path||"";Pv(v,!p||k.endsWith("*")||k.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${v}" (under <Route path="${k}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
60
+
61
+ Please change the parent <Route path="${k}"> to <Route path="${k==="/"?"*":`${k}/*`}">.`)}let b=ll(),y;y=b;let j=y.pathname||"/",N=j;if(x!=="/"){let k=x.replace(/^\//,"").split("/");N="/"+j.replace(/^\//,"").split("/").slice(k.length).join("/")}let A=s&&s.state.matches.length?s.state.matches.map(k=>Object.assign(k,{route:s.manifest[k.route.id]||k.route})):Nv(n,{pathname:N});return St(p||A!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),St(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),u0(A&&A.map(k=>Object.assign({},k,{params:Object.assign({},h,k.params),pathname:Ma([x,o.encodeLocation?o.encodeLocation(k.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?x:Ma([x,o.encodeLocation?o.encodeLocation(k.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:k.pathnameBase])})),f,s)}function n0(){let n=Iv(),i=Ri(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,o="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:o},d={padding:"2px 4px",backgroundColor:o},h=null;return console.error("Error handled by React Router default ErrorBoundary:",n),h=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:d},"ErrorBoundary")," or"," ",S.createElement("code",{style:d},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},i),s?S.createElement("pre",{style:f},s):null,h)}var i0=S.createElement(n0,null),Jv=class extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,i){return i.location!==n.location||i.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:i.error,location:i.location,revalidation:n.revalidation||i.revalidation}}componentDidCatch(n,i){this.props.onError?this.props.onError(n,i):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const s=Ib(n.digest);s&&(n=s)}let i=n!==void 0?S.createElement(Ga.Provider,{value:this.props.routeContext},S.createElement(Df.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?S.createElement(r0,{error:n},i):i}};Jv.contextType=Xv;var lf=new WeakMap;function r0({children:n,error:i}){let{basename:s}=S.useContext(za);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let o=Wb(i.digest);if(o){let f=lf.get(i);if(f)throw f;let d=Mv(o.location,s),h=d.absoluteURL||d.to;if(pf(h))throw new Error("Invalid redirect location");if(Cv&&!lf.get(i))if(d.isExternal||o.reloadDocument)window.location.href=h;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:o.replace}));throw lf.set(i,v),v}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${h}`})}}return n}function s0({routeContext:n,match:i,children:s}){let o=S.useContext(zn);return o&&o.static&&o.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=i.route.id),S.createElement(Ga.Provider,{value:n},s)}function u0(n,i=[],s){let o=s==null?void 0:s.state;if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(i.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let f=n,d=o==null?void 0:o.errors;if(d!=null){let b=f.findIndex(y=>y.route.id&&(d==null?void 0:d[y.route.id])!==void 0);Ee(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,b+1))}let h=!1,v=-1;if(s&&o){h=o.renderFallback;for(let b=0;b<f.length;b++){let y=f[b];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(v=b),y.route.id){let{loaderData:j,errors:N}=o,A=y.route.loader&&!j.hasOwnProperty(y.route.id)&&(!N||N[y.route.id]===void 0);if(y.route.lazy||A){s.isStatic&&(h=!0),v>=0?f=f.slice(0,v+1):f=[f[0]];break}}}}let x=s==null?void 0:s.onError,p=o&&x?(b,y)=>{var j,N;x(b,{location:o.location,params:((N=(j=o.matches)==null?void 0:j[0])==null?void 0:N.params)??{},pattern:Gr(o.matches),errorInfo:y})}:void 0;return f.reduceRight((b,y,j)=>{let N,A=!1,B=null,k=null;o&&(N=d&&y.route.id?d[y.route.id]:void 0,B=y.route.errorElement||i0,h&&(v<0&&j===0?(Pv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,k=null):v===j&&(A=!0,k=y.route.hydrateFallbackElement||null)));let Z=i.concat(f.slice(0,j+1)),F=()=>{let W;return N?W=B:A?W=k:y.route.Component?W=S.createElement(y.route.Component,null):y.route.element?W=y.route.element:W=b,S.createElement(s0,{match:y,routeContext:{outlet:b,matches:Z,isDataRoute:o!=null},children:W})};return o&&(y.route.ErrorBoundary||y.route.errorElement||j===0)?S.createElement(Jv,{location:o.location,revalidation:o.revalidation,component:B,error:N,children:F(),routeContext:{outlet:null,matches:Z,isDataRoute:!0},onError:p}):F()},null)}function Cf(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wv(n){let i=S.useContext(zn);return Ee(i,Cf(n)),i}function Qr(n){let i=S.useContext(Mi);return Ee(i,Cf(n)),i}function c0(n){let i=S.useContext(Ga);return Ee(i,Cf(n)),i}function Cu(n){let i=c0(n),s=i.matches[i.matches.length-1];return Ee(s.route.id,`${n} can only be used on routes that contain a unique "id"`),s.route.id}function o0(){return Cu("useRouteId")}function sn(){let n=Qr("useNavigation");return S.useMemo(()=>{let{matches:i,historyAction:s,...o}=n.navigation;return o},[n.navigation])}function f0(){let n=Wv("useRevalidator"),i=Qr("useRevalidator"),s=S.useCallback(async()=>{await n.router.revalidate()},[n.router]);return S.useMemo(()=>({revalidate:s,state:i.revalidation}),[s,i.revalidation])}function _n(){let n=Qr("useLoaderData"),i=Cu("useLoaderData");return n.loaderData[i]}function Zr(n){return Qr("useRouteLoaderData").loaderData[n]}function Iv(){var o;let n=S.useContext(Df),i=Qr("useRouteError"),s=Cu("useRouteError");return n!==void 0?n:(o=i.errors)==null?void 0:o[s]}function d0(){let{router:n}=Wv("useNavigate"),i=Cu("useNavigate"),s=S.useRef(!1);return Fv(()=>{s.current=!0}),S.useCallback(async(f,d={})=>{St(s.current,Kv),s.current&&(typeof f=="number"?await n.navigate(f):await n.navigate(f,{fromRouteId:i,...d}))},[n,i])}var iv={};function Pv(n,i,s){!i&&!iv[n]&&(iv[n]=!0,St(!1,s))}var rv={};function sv(n,i){!n&&!rv[i]&&(rv[i]=!0,console.warn(i))}var m0="useOptimistic",uv=Ay[m0],h0=()=>{};function p0(n){return uv?uv(n):[n,h0]}function v0(n){let i={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&St(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(i,{element:S.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&St(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(i,{hydrateFallbackElement:S.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&St(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(i,{errorElement:S.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),i}var x0=["HydrateFallback","hydrateFallbackElement"],g0=class{constructor(){this.status="pending",this.promise=new Promise((n,i)=>{this.resolve=s=>{this.status==="pending"&&(this.status="resolved",n(s))},this.reject=s=>{this.status==="pending"&&(this.status="rejected",i(s))}})}};function y0({router:n,flushSync:i,onError:s,useTransitions:o}){o=Qv()||o;let[d,h]=S.useState(n.state),[v,x]=p0(d),[p,b]=S.useState(),[y,j]=S.useState({isTransitioning:!1}),[N,A]=S.useState(),[B,k]=S.useState(),[Z,F]=S.useState(),W=S.useRef(new Map),ee=S.useCallback((M,{deletedFetchers:Re,newErrors:xe,flushSync:Ke,viewTransitionOpts:pe})=>{xe&&s&&Object.values(xe).forEach(Te=>{var ke;return s(Te,{location:M.location,params:((ke=M.matches[0])==null?void 0:ke.params)??{},pattern:Gr(M.matches)})}),M.fetchers.forEach((Te,ke)=>{Te.data!==void 0&&W.current.set(ke,Te.data)}),Re.forEach(Te=>W.current.delete(Te)),sv(Ke===!1||i!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let st=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(sv(pe==null||st,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!pe||!st){i&&Ke?i(()=>h(M)):o===!1?h(M):S.startTransition(()=>{o===!0&&x(Te=>cv(Te,M)),h(M)});return}if(i&&Ke){i(()=>{B&&(N==null||N.resolve(),B.skipTransition()),j({isTransitioning:!0,flushSync:!0,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation})});let Te=n.window.document.startViewTransition(()=>{i(()=>h(M))});Te.finished.finally(()=>{i(()=>{A(void 0),k(void 0),b(void 0),j({isTransitioning:!1})})}),i(()=>k(Te));return}B?(N==null||N.resolve(),B.skipTransition(),F({state:M,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation})):(b(M),j({isTransitioning:!0,flushSync:!1,currentLocation:pe.currentLocation,nextLocation:pe.nextLocation}))},[n.window,i,B,N,o,x,s]);S.useLayoutEffect(()=>n.subscribe(ee),[n,ee]),S.useEffect(()=>{y.isTransitioning&&!y.flushSync&&A(new g0)},[y]),S.useEffect(()=>{if(N&&p&&n.window){let M=p,Re=N.promise,xe=n.window.document.startViewTransition(async()=>{o===!1?h(M):S.startTransition(()=>{o===!0&&x(Ke=>cv(Ke,M)),h(M)}),await Re});xe.finished.finally(()=>{A(void 0),k(void 0),b(void 0),j({isTransitioning:!1})}),k(xe)}},[p,N,n.window,o,x]),S.useEffect(()=>{N&&p&&v.location.key===p.location.key&&N.resolve()},[N,B,v.location,p]),S.useEffect(()=>{!y.isTransitioning&&Z&&(b(Z.state),j({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}),F(void 0))},[y.isTransitioning,Z]);let re=S.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,Re,xe)=>n.navigate(M,{state:Re,preventScrollReset:xe==null?void 0:xe.preventScrollReset}),replace:(M,Re,xe)=>n.navigate(M,{replace:!0,state:Re,preventScrollReset:xe==null?void 0:xe.preventScrollReset})}),[n]),se=n.basename||"/",le=S.useMemo(()=>({router:n,navigator:re,static:!1,basename:se,onError:s}),[n,re,se,s]);return S.createElement(S.Fragment,null,S.createElement(zn.Provider,{value:le},S.createElement(Mi.Provider,{value:v},S.createElement(Tf.Provider,{value:W.current},S.createElement(Rf.Provider,{value:y},S.createElement(j0,{basename:se,location:v.location,navigationType:v.historyAction,navigator:re,useTransitions:o},S.createElement(b0,{routes:n.routes,manifest:n.manifest,future:n.future,state:v,isStatic:!1,onError:s})))))),null)}function cv(n,i){return{...n,navigation:i.navigation.state!=="idle"?i.navigation:n.navigation,revalidation:i.revalidation!=="idle"?i.revalidation:n.revalidation,actionData:i.navigation.state!=="submitting"?i.actionData:n.actionData,fetchers:i.fetchers}}var b0=S.memo(S0);function S0({routes:n,manifest:i,future:s,state:o,isStatic:f,onError:d}){return l0(n,void 0,{manifest:i,state:o,isStatic:f,onError:d})}function Kr(n){return a0(n.context)}function j0({basename:n="/",children:i=null,location:s,navigationType:o="POP",navigator:f,static:d=!1,useTransitions:h}){Ee(!Vr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=n.replace(/^\/*/,"/"),x=S.useMemo(()=>({basename:v,navigator:f,static:d,useTransitions:h,future:{}}),[v,f,d,h]);typeof s=="string"&&(s=tl(s));let{pathname:p="/",search:b="",hash:y="",state:j=null,key:N="default",mask:A}=s,B=S.useMemo(()=>{let k=Aa(p,v);return k==null?null:{location:{pathname:k,search:b,hash:y,state:j,key:N,mask:A},navigationType:o}},[v,p,b,y,j,N,o,A]);return St(B!=null,`<Router basename="${v}"> is not able to match the URL "${p}${b}${y}" because it does not start with the basename, so the <Router> won't render anything.`),B==null?null:S.createElement(za.Provider,{value:x},S.createElement(Du.Provider,{children:i,value:B}))}var yu="get",bu="application/x-www-form-urlencoded";function Mu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function N0(n){return Mu(n)&&n.tagName.toLowerCase()==="button"}function w0(n){return Mu(n)&&n.tagName.toLowerCase()==="form"}function E0(n){return Mu(n)&&n.tagName.toLowerCase()==="input"}function R0(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function T0(n,i){return n.button===0&&(!i||i==="_self")&&!R0(n)}function xf(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((i,s)=>{let o=n[s];return i.concat(Array.isArray(o)?o.map(f=>[s,f]):[[s,o]])},[]))}function D0(n,i){let s=xf(n);return i&&i.forEach((o,f)=>{s.has(f)||i.getAll(f).forEach(d=>{s.append(f,d)})}),s}var pu=null;function C0(){if(pu===null)try{new FormData(document.createElement("form"),0),pu=!1}catch{pu=!0}return pu}var M0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function nf(n){return n!=null&&!M0.has(n)?(St(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bu}"`),null):n}function A0(n,i){let s,o,f,d,h;if(w0(n)){let v=n.getAttribute("action");o=v?Aa(v,i):null,s=n.getAttribute("method")||yu,f=nf(n.getAttribute("enctype"))||bu,d=new FormData(n)}else if(N0(n)||E0(n)&&(n.type==="submit"||n.type==="image")){let v=n.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let x=n.getAttribute("formaction")||v.getAttribute("action");if(o=x?Aa(x,i):null,s=n.getAttribute("formmethod")||v.getAttribute("method")||yu,f=nf(n.getAttribute("formenctype"))||nf(v.getAttribute("enctype"))||bu,d=new FormData(v,n),!C0()){let{name:p,type:b,value:y}=n;if(b==="image"){let j=p?`${p}.`:"";d.append(`${j}x`,"0"),d.append(`${j}y`,"0")}else p&&d.append(p,y)}}else{if(Mu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=yu,o=null,f=bu,h=n}return d&&f==="text/plain"&&(h=d,d=void 0),{action:o,method:s.toLowerCase(),encType:f,formData:d,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Mf(n,i){if(n===!1||n===null||typeof n>"u")throw new Error(i)}function ex(n,i,s,o){let f=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return s?f.pathname.endsWith("/")?f.pathname=`${f.pathname}_.${o}`:f.pathname=`${f.pathname}.${o}`:f.pathname==="/"?f.pathname=`_root.${o}`:i&&Aa(f.pathname,i)==="/"?f.pathname=`${ju(i)}/_root.${o}`:f.pathname=`${ju(f.pathname)}.${o}`,f}async function z0(n,i){if(n.id in i)return i[n.id];try{let s=await import(n.module);return i[n.id]=s,s}catch(s){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _0(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function O0(n,i,s){let o=await Promise.all(n.map(async f=>{let d=i.routes[f.route.id];if(d){let h=await z0(d,s);return h.links?h.links():[]}return[]}));return H0(o.flat(1).filter(_0).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function ov(n,i,s,o,f,d){let h=(x,p)=>s[p]?x.route.id!==s[p].route.id:!0,v=(x,p)=>{var b;return s[p].pathname!==x.pathname||((b=s[p].route.path)==null?void 0:b.endsWith("*"))&&s[p].params["*"]!==x.params["*"]};return d==="assets"?i.filter((x,p)=>h(x,p)||v(x,p)):d==="data"?i.filter((x,p)=>{var y;let b=o.routes[x.route.id];if(!b||!b.hasLoader)return!1;if(h(x,p)||v(x,p))return!0;if(x.route.shouldRevalidate){let j=x.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:((y=s[0])==null?void 0:y.params)||{},nextUrl:new URL(n,window.origin),nextParams:x.params,defaultShouldRevalidate:!0});if(typeof j=="boolean")return j}return!0}):[]}function k0(n,i,{includeHydrateFallback:s}={}){return U0(n.map(o=>{let f=i.routes[o.route.id];if(!f)return[];let d=[f.module];return f.clientActionModule&&(d=d.concat(f.clientActionModule)),f.clientLoaderModule&&(d=d.concat(f.clientLoaderModule)),s&&f.hydrateFallbackModule&&(d=d.concat(f.hydrateFallbackModule)),f.imports&&(d=d.concat(f.imports)),d}).flat(1))}function U0(n){return[...new Set(n)]}function L0(n){let i={},s=Object.keys(n).sort();for(let o of s)i[o]=n[o];return i}function H0(n,i){let s=new Set;return new Set(i),n.reduce((o,f)=>{let d=JSON.stringify(L0(f));return s.has(d)||(s.add(d),o.push({key:d,link:f})),o},[])}function Af(){let n=S.useContext(zn);return Mf(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function B0(){let n=S.useContext(Mi);return Mf(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var zf=S.createContext(void 0);zf.displayName="FrameworkContext";function Au(){let n=S.useContext(zf);return Mf(n,"You must render this element inside a <HydratedRouter> element"),n}function q0(n,i){let s=S.useContext(zf),[o,f]=S.useState(!1),[d,h]=S.useState(!1),{onFocus:v,onBlur:x,onMouseEnter:p,onMouseLeave:b,onTouchStart:y}=i,j=S.useRef(null);S.useEffect(()=>{if(n==="render"&&h(!0),n==="viewport"){let B=Z=>{Z.forEach(F=>{h(F.isIntersecting)})},k=new IntersectionObserver(B,{threshold:.5});return j.current&&k.observe(j.current),()=>{k.disconnect()}}},[n]),S.useEffect(()=>{if(o){let B=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(B)}}},[o]);let N=()=>{f(!0)},A=()=>{f(!1),h(!1)};return s?n!=="intent"?[d,j,{}]:[d,j,{onFocus:Mr(v,N),onBlur:Mr(x,A),onMouseEnter:Mr(p,N),onMouseLeave:Mr(b,A),onTouchStart:Mr(y,N)}]:[!1,j,{}]}function Mr(n,i){return s=>{n&&n(s),s.defaultPrevented||i(s)}}function $0({page:n,...i}){let s=Qv(),{nonce:o}=Au(),{router:f}=Af(),d=S.useMemo(()=>Nv(f.routes,n,f.basename),[f.routes,n,f.basename]);return d?(i.nonce==null&&o&&(i={...i,nonce:o}),s?S.createElement(G0,{page:n,matches:d,...i}):S.createElement(V0,{page:n,matches:d,...i})):null}function Y0(n){let{manifest:i,routeModules:s}=Au(),[o,f]=S.useState([]);return S.useEffect(()=>{let d=!1;return O0(n,i,s).then(h=>{d||f(h)}),()=>{d=!0}},[n,i,s]),o}function G0({page:n,matches:i,...s}){let o=ll(),{future:f}=Au(),{basename:d}=Af(),h=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let v=ex(n,d,f.v8_trailingSlashAwareDataRequests,"rsc"),x=!1,p=[];for(let b of i)typeof b.route.shouldRevalidate=="function"?x=!0:p.push(b.route.id);return x&&p.length>0&&v.searchParams.set("_routes",p.join(",")),[v.pathname+v.search]},[d,f.v8_trailingSlashAwareDataRequests,n,o,i]);return S.createElement(S.Fragment,null,h.map(v=>S.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...s})))}function V0({page:n,matches:i,...s}){let o=ll(),{future:f,manifest:d,routeModules:h}=Au(),{basename:v}=Af(),{loaderData:x,matches:p}=B0(),b=S.useMemo(()=>ov(n,i,p,d,o,"data"),[n,i,p,d,o]),y=S.useMemo(()=>ov(n,i,p,d,o,"assets"),[n,i,p,d,o]),j=S.useMemo(()=>{if(n===o.pathname+o.search+o.hash)return[];let B=new Set,k=!1;if(i.forEach(F=>{var ee;let W=d.routes[F.route.id];!W||!W.hasLoader||(!b.some(re=>re.route.id===F.route.id)&&F.route.id in x&&((ee=h[F.route.id])!=null&&ee.shouldRevalidate)||W.hasClientLoader?k=!0:B.add(F.route.id))}),B.size===0)return[];let Z=ex(n,v,f.v8_trailingSlashAwareDataRequests,"data");return k&&B.size>0&&Z.searchParams.set("_routes",i.filter(F=>B.has(F.route.id)).map(F=>F.route.id).join(",")),[Z.pathname+Z.search]},[v,f.v8_trailingSlashAwareDataRequests,x,o,d,b,i,n,h]),N=S.useMemo(()=>k0(y,d),[y,d]),A=Y0(y);return S.createElement(S.Fragment,null,j.map(B=>S.createElement("link",{key:B,rel:"prefetch",as:"fetch",href:B,...s})),N.map(B=>S.createElement("link",{key:B,rel:"modulepreload",href:B,...s})),A.map(({key:B,link:k})=>S.createElement("link",{key:B,nonce:s.nonce,...k,crossOrigin:k.crossOrigin??s.crossOrigin})))}function X0(...n){return i=>{n.forEach(s=>{typeof s=="function"?s(i):s!=null&&(s.current=i)})}}var Q0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Q0&&(window.__reactRouterVersion="7.18.0")}catch{}function Z0(n,i){return jb({basename:i==null?void 0:i.basename,getContext:i==null?void 0:i.getContext,future:i==null?void 0:i.future,history:Hy({window:i==null?void 0:i.window}),hydrationData:K0(),routes:n,mapRouteProperties:v0,hydrationRouteProperties:x0,dataStrategy:i==null?void 0:i.dataStrategy,patchRoutesOnNavigation:i==null?void 0:i.patchRoutesOnNavigation,window:i==null?void 0:i.window,instrumentations:i==null?void 0:i.instrumentations}).initialize()}function K0(){let n=window==null?void 0:window.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:F0(n.errors)}),n}function F0(n){if(!n)return null;let i=Object.entries(n),s={};for(let[o,f]of i)if(f&&f.__type==="RouteErrorResponse")s[o]=new Yr(f.status,f.statusText,f.data,f.internal===!0);else if(f&&f.__type==="Error"){if(typeof f.__subType=="string"&&cb.includes(f.__subType)){let d=window[f.__subType];if(typeof d=="function")try{let h=new d(f.message);h.stack="",s[o]=h}catch{}}if(s[o]==null){let d=new Error(f.message);d.stack="",s[o]=d}}else s[o]=f;return s}var Ye=S.forwardRef(function({onClick:i,discover:s="render",prefetch:o="none",relative:f,reloadDocument:d,replace:h,mask:v,state:x,target:p,to:b,preventScrollReset:y,viewTransition:j,defaultShouldRevalidate:N,...A},B){let{basename:k,navigator:Z,useTransitions:F}=S.useContext(za),W=typeof b=="string"&&Ru.test(b),ee=Mv(b,k);b=ee.to;let re=Pb(b,{relative:f}),se=ll(),le=null;if(v){let ke=Tu(v,[],se.mask?se.mask.pathname:"/",!0);k!=="/"&&(ke.pathname=ke.pathname==="/"?k:Ma([k,ke.pathname])),le=Z.createHref(ke)}let[M,Re,xe]=q0(o,A),Ke=W0(b,{replace:h,mask:v,state:x,target:p,preventScrollReset:y,relative:f,viewTransition:j,defaultShouldRevalidate:N,useTransitions:F});function pe(ke){i&&i(ke),ke.defaultPrevented||Ke(ke)}let st=!(ee.isExternal||d),Te=S.createElement("a",{...A,...xe,href:(st?le:void 0)||ee.absoluteURL||re,onClick:st?pe:i,ref:X0(B,Re),target:p,"data-discover":!W&&s==="render"?"true":void 0});return M&&!W?S.createElement(S.Fragment,null,Te,S.createElement($0,{page:re})):Te});Ye.displayName="Link";var tx=S.forwardRef(function({"aria-current":i="page",caseSensitive:s=!1,className:o="",end:f=!1,style:d,to:h,viewTransition:v,children:x,...p},b){let y=Xr(h,{relative:p.relative}),j=ll(),N=S.useContext(Mi),{navigator:A,basename:B}=S.useContext(za),k=N!=null&&t1(y)&&v===!0,Z=A.encodeLocation?A.encodeLocation(y).pathname:y.pathname,F=j.pathname,W=N&&N.navigation&&N.navigation.location?N.navigation.location.pathname:null;s||(F=F.toLowerCase(),W=W?W.toLowerCase():null,Z=Z.toLowerCase()),W&&B&&(W=Aa(W,B)||W);const ee=Z!=="/"&&Z.endsWith("/")?Z.length-1:Z.length;let re=F===Z||!f&&F.startsWith(Z)&&F.charAt(ee)==="/",se=W!=null&&(W===Z||!f&&W.startsWith(Z)&&W.charAt(Z.length)==="/"),le={isActive:re,isPending:se,isTransitioning:k},M=re?i:void 0,Re;typeof o=="function"?Re=o(le):Re=[o,re?"active":null,se?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let xe=typeof d=="function"?d(le):d;return S.createElement(Ye,{...p,"aria-current":M,className:Re,ref:b,style:xe,to:h,viewTransition:v},typeof x=="function"?x(le):x)});tx.displayName="NavLink";var xa=S.forwardRef(({discover:n="render",fetcherKey:i,navigate:s,reloadDocument:o,replace:f,state:d,method:h=yu,action:v,onSubmit:x,relative:p,preventScrollReset:b,viewTransition:y,defaultShouldRevalidate:j,...N},A)=>{let{useTransitions:B}=S.useContext(za),k=kf(),Z=e1(v,{relative:p}),F=h.toLowerCase()==="get"?"get":"post",W=typeof v=="string"&&Ru.test(v),ee=re=>{if(x&&x(re),re.defaultPrevented)return;re.preventDefault();let se=re.nativeEvent.submitter,le=(se==null?void 0:se.getAttribute("formmethod"))||h,M=()=>k(se||re.currentTarget,{fetcherKey:i,method:le,navigate:s,replace:f,state:d,relative:p,preventScrollReset:b,viewTransition:y,defaultShouldRevalidate:j});B&&s!==!1?S.startTransition(()=>M()):M()};return S.createElement("form",{ref:A,method:F,action:Z,onSubmit:o?x:ee,...N,"data-discover":!W&&n==="render"?"true":void 0})});xa.displayName="Form";function ax(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _f(n){let i=S.useContext(zn);return Ee(i,ax(n)),i}function J0(n){let i=S.useContext(Mi);return Ee(i,ax(n)),i}function W0(n,{target:i,replace:s,mask:o,state:f,preventScrollReset:d,relative:h,viewTransition:v,defaultShouldRevalidate:x,useTransitions:p}={}){let b=rn(),y=ll(),j=Xr(n,{relative:h});return S.useCallback(N=>{if(T0(N,i)){N.preventDefault();let A=s!==void 0?s:Pa(y)===Pa(j),B=()=>b(n,{replace:A,mask:o,state:f,preventScrollReset:d,relative:h,viewTransition:v,defaultShouldRevalidate:x});p?S.startTransition(()=>B()):B()}},[y,b,j,s,o,f,i,n,d,h,v,x,p])}function Of(n){St(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let i=S.useRef(xf(n)),s=S.useRef(!1),o=ll(),f=S.useMemo(()=>D0(o.search,s.current?null:i.current),[o.search]),d=rn(),h=S.useCallback((v,x)=>{const p=xf(typeof v=="function"?v(new URLSearchParams(f)):v);s.current=!0,d("?"+p,x)},[d,f]);return[f,h]}var I0=0,P0=()=>`__${String(++I0)}__`;function kf(){let{router:n}=_f("useSubmit"),{basename:i}=S.useContext(za),s=o0(),o=n.fetch,f=n.navigate;return S.useCallback(async(d,h={})=>{let{action:v,method:x,encType:p,formData:b,body:y}=A0(d,i);if(h.navigate===!1){let j=h.fetcherKey||P0();await o(j,s,h.action||v,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:y,formMethod:h.method||x,formEncType:h.encType||p,flushSync:h.flushSync})}else await f(h.action||v,{defaultShouldRevalidate:h.defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:b,body:y,formMethod:h.method||x,formEncType:h.encType||p,replace:h.replace,state:h.state,fromRouteId:s,flushSync:h.flushSync,viewTransition:h.viewTransition})},[o,f,i,s])}function e1(n,{relative:i}={}){let{basename:s}=S.useContext(za),o=S.useContext(Ga);Ee(o,"useFormAction must be used inside a RouteContext");let[f]=o.matches.slice(-1),d={...Xr(n||".",{relative:i})},h=ll();if(n==null){d.search=h.search;let v=new URLSearchParams(d.search),x=v.getAll("index");if(x.some(b=>b==="")){v.delete("index"),x.filter(y=>y).forEach(y=>v.append("index",y));let b=v.toString();d.search=b?`?${b}`:""}}return(!n||n===".")&&f.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(d.pathname=d.pathname==="/"?s:Ma([s,d.pathname])),Pa(d)}function Mn({key:n}={}){var re;let{router:i}=_f("useFetcher"),s=J0("useFetcher"),o=S.useContext(Tf),f=S.useContext(Ga),d=(re=f.matches[f.matches.length-1])==null?void 0:re.route.id;Ee(o,"useFetcher must be used inside a FetchersContext"),Ee(f,"useFetcher must be used inside a RouteContext"),Ee(d!=null,'useFetcher can only be used on routes that contain a unique "id"');let h=S.useId(),[v,x]=S.useState(n||h);n&&n!==v&&x(n);let{deleteFetcher:p,getFetcher:b,resetFetcher:y,fetch:j}=i;S.useEffect(()=>(b(v),()=>p(v)),[p,b,v]);let N=S.useCallback(async(se,le)=>{Ee(d,"No routeId available for fetcher.load()"),await j(v,d,se,le)},[v,d,j]),A=kf(),B=S.useCallback(async(se,le)=>{await A(se,{...le,navigate:!1,fetcherKey:v})},[v,A]),k=S.useCallback(se=>y(v,se),[y,v]),Z=S.useMemo(()=>{let se=S.forwardRef((le,M)=>S.createElement(xa,{...le,navigate:!1,fetcherKey:v,ref:M}));return se.displayName="fetcher.Form",se},[v]),F=s.fetchers.get(v)||Ov,W=o.get(v);return S.useMemo(()=>({Form:Z,submit:B,load:N,reset:k,...F,data:W}),[Z,B,N,k,F,W])}function t1(n,{relative:i}={}){let s=S.useContext(Rf);Ee(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=_f("useViewTransitionState"),f=Xr(n,{relative:i});if(!s.isTransitioning)return!1;let d=Aa(s.currentLocation.pathname,o)||s.currentLocation.pathname,h=Aa(s.nextLocation.pathname,o)||s.nextLocation.pathname;return Su(f.pathname,h)!=null||Su(f.pathname,d)!=null}var a1=gv();function l1(n){return S.createElement(y0,{flushSync:a1.flushSync,...n})}/**
62
+ * @license lucide-react v1.21.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const lx=(...n)=>n.filter((i,s,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===s).join(" ").trim();/**
67
+ * @license lucide-react v1.21.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const n1=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
72
+ * @license lucide-react v1.21.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const i1=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,s,o)=>o?o.toUpperCase():s.toLowerCase());/**
77
+ * @license lucide-react v1.21.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const fv=n=>{const i=i1(n);return i.charAt(0).toUpperCase()+i.slice(1)};/**
82
+ * @license lucide-react v1.21.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */var rf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
87
+ * @license lucide-react v1.21.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const r1=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},s1=S.createContext({}),u1=()=>S.useContext(s1),c1=S.forwardRef(({color:n,size:i,strokeWidth:s,absoluteStrokeWidth:o,className:f="",children:d,iconNode:h,...v},x)=>{const{size:p=24,strokeWidth:b=2,absoluteStrokeWidth:y=!1,color:j="currentColor",className:N=""}=u1()??{},A=o??y?Number(s??b)*24/Number(i??p):s??b;return S.createElement("svg",{ref:x,...rf,width:i??p??rf.width,height:i??p??rf.height,stroke:n??j,strokeWidth:A,className:lx("lucide",N,f),...!d&&!r1(v)&&{"aria-hidden":"true"},...v},[...h.map(([B,k])=>S.createElement(B,k)),...Array.isArray(d)?d:[d]])});/**
92
+ * @license lucide-react v1.21.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const Ot=(n,i)=>{const s=S.forwardRef(({className:o,...f},d)=>S.createElement(c1,{ref:d,iconNode:i,className:lx(`lucide-${n1(fv(n))}`,`lucide-${n}`,o),...f}));return s.displayName=fv(n),s};/**
97
+ * @license lucide-react v1.21.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const o1=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],zu=Ot("arrow-left",o1);/**
102
+ * @license lucide-react v1.21.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const f1=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],d1=Ot("chart-column",f1);/**
107
+ * @license lucide-react v1.21.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const m1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],nx=Ot("check",m1);/**
112
+ * @license lucide-react v1.21.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const h1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],An=Ot("chevron-down",h1);/**
117
+ * @license lucide-react v1.21.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const p1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ix=Ot("chevron-right",p1);/**
122
+ * @license lucide-react v1.21.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const v1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],x1=Ot("circle-check",v1);/**
127
+ * @license lucide-react v1.21.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const g1=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],rx=Ot("copy",g1);/**
132
+ * @license lucide-react v1.21.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const y1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],b1=Ot("download",y1);/**
137
+ * @license lucide-react v1.21.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const S1=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],j1=Ot("file-text",S1);/**
142
+ * @license lucide-react v1.21.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const N1=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],w1=Ot("git-branch",N1);/**
147
+ * @license lucide-react v1.21.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const E1=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],R1=Ot("house",E1);/**
152
+ * @license lucide-react v1.21.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const T1=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Nu=Ot("layers",T1);/**
157
+ * @license lucide-react v1.21.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const D1=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],sx=Ot("list-todo",D1);/**
162
+ * @license lucide-react v1.21.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const C1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],M1=Ot("moon",C1);/**
167
+ * @license lucide-react v1.21.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const A1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ti=Ot("pencil",A1);/**
172
+ * @license lucide-react v1.21.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const z1=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],_1=Ot("sun",z1);/**
177
+ * @license lucide-react v1.21.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const O1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Di=Ot("trash-2",O1);/**
182
+ * @license lucide-react v1.21.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const k1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],U1=Ot("x",k1),L1="/api",H1=120,B1=40;function _u(n){return{...n,number:n.number??0,decisions:n.decisions??[],acceptedDecisions:n.acceptedDecisions??[],checklist:n.checklist??[],subtasks:n.subtasks??[],startedAt:n.startedAt??"",completedAt:n.completedAt??""}}function Ou(n){return{...n,discussedAt:n.discussedAt??"",contextReady:n.contextReady??!1,contextReadyReason:n.contextReadyReason??"",notes:n.notes??"",goals:n.goals??[],nonGoals:n.nonGoals??[],dependencies:n.dependencies??[],risks:n.risks??[],openQuestions:n.openQuestions??[],decisions:n.decisions??[],acceptedDecisions:n.acceptedDecisions??[],completionCriteria:n.completionCriteria??[],taskIds:n.taskIds??[],tasks:(n.tasks??[]).map(_u)}}function ku(n){return{...n,number:n.number??0,discussedAt:n.discussedAt??"",contextReady:n.contextReady??!1,contextReadyReason:n.contextReadyReason??"",acceptedDecisions:n.acceptedDecisions??[],phaseIds:n.phaseIds??[]}}function ux(n){var i,s,o;return{...n,scope:n.scope??[],outOfScope:n.outOfScope??[],decisions:n.decisions??[],globalRules:n.globalRules??[],technologies:n.technologies??[],tools:n.tools??[],acceptedDecisions:n.acceptedDecisions??[],planRoot:n.planRoot??"",projectRoot:n.projectRoot??"",workflowRules:{beforePhaseStart:((i=n.workflowRules)==null?void 0:i.beforePhaseStart)??[],beforeTaskStart:((s=n.workflowRules)==null?void 0:s.beforeTaskStart)??[],afterPhaseComplete:((o=n.workflowRules)==null?void 0:o.afterPhaseComplete)??[]}}}async function dv(n,i){try{return await fetch(`${L1}${n}`,{headers:{"Content-Type":"application/json"},...i})}catch{throw new Response("Planner web server unavailable. Pi or planner-web may have stopped. Restart the planner web UI or Pi, then reload this page.",{status:503,statusText:"Planner web server unavailable"})}}async function jt(n,i){let s=await dv(n,i),o=0;for(;s.status===503&&o<B1;)await new Promise(f=>setTimeout(f,H1)),o+=1,s=await dv(n,i);if(!s.ok){const f=await s.text().catch(()=>s.statusText);throw new Response(f||s.statusText,{status:s.status,statusText:s.statusText})}return s.json()}async function cx(){return ux(await jt("/project"))}async function q1(n){return ux(await jt("/project",{method:"PUT",body:JSON.stringify(n)}))}async function $1(){return jt("/ui-config")}async function ox(){return(await jt("/features")).map(ku)}async function Fr(n){return ku(await jt(`/features/${n}`))}async function Y1(n){return ku(await jt("/features",{method:"POST",body:JSON.stringify(n)}))}async function fx(n){return ku(await jt(`/features/${n.id}`,{method:"PUT",body:JSON.stringify(n)}))}async function G1(n){return jt(`/features/${n}`,{method:"DELETE"})}async function Uf(n){const i=n?`?featureId=${encodeURIComponent(n)}`:"";return(await jt(`/phases${i}`)).map(Ou)}async function Uu(n){return Ou(await jt(`/phases/${n}`))}async function V1(n){return Ou(await jt("/phases",{method:"POST",body:JSON.stringify(n)}))}async function dx(n){return Ou(await jt(`/phases/${n.id}`,{method:"PUT",body:JSON.stringify(n)}))}async function X1(n){return jt(`/phases/${n}`,{method:"DELETE"})}async function Q1(n,i){return _u(await jt(`/phases/${n}/tasks`,{method:"POST",body:JSON.stringify(i)}))}async function Lu(n){return _u(await jt(`/tasks/${n}`))}async function Lf(n){return _u(await jt(`/tasks/${n.id}`,{method:"PUT",body:JSON.stringify(n)}))}async function Z1(n){return jt(`/tasks/${n}`,{method:"DELETE"})}async function mx(){return jt("/tasks/active")}async function hx(){return jt("/handoff")}async function K1(n=!1){return jt(`/export?full=${n?"true":"false"}`)}async function F1(){return jt("/repair",{method:"POST"})}function J1(){const[n,i]=S.useState(()=>{if(typeof window>"u")return"dark";const s=window.localStorage.getItem("plan-ui-theme");return s||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")});return S.useEffect(()=>{document.documentElement.setAttribute("data-theme",n),window.localStorage.setItem("plan-ui-theme",n)},[n]),{theme:n,toggleTheme:()=>i(s=>s==="dark"?"light":"dark")}}function W1({liveStatus:n}){const i=n==="live"?{label:"Live",className:"border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400",dotClassName:"bg-emerald-500"}:n==="reconnecting"?{label:"Reconnecting…",className:"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-400",dotClassName:"bg-amber-500 animate-pulse"}:n==="disconnected"?{label:"Disconnected",className:"border-rose-500/30 bg-rose-500/10 text-rose-700 dark:text-rose-400",dotClassName:"bg-rose-500"}:{label:"Connecting…",className:"border-sky-500/30 bg-sky-500/10 text-sky-700 dark:text-sky-400",dotClassName:"bg-sky-500 animate-pulse"};return c.jsxs("span",{className:`inline-flex min-h-11 items-center gap-2 rounded-[14px] border px-3 py-2 text-sm font-semibold ${i.className}`,children:[c.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${i.dotClassName}`}),c.jsx("span",{className:"hidden sm:inline",children:i.label})]})}function I1({projectName:n,projectRoot:i,planRoot:s,handoffExists:o,liveStatus:f}){const{theme:d,toggleTheme:h}=J1(),[v,x]=S.useState(!1),[p,b]=S.useState(!1),[y,j]=S.useState(null),N=[{to:"/",label:"Dashboard",icon:R1},{to:"/features",label:"Features",icon:Nu},...o?[{to:"/handoff",label:"Handoff",icon:j1}]:[]];async function A(B){j(B?"full":"summary");try{const Z=await K1(B),F=new Blob([Z.markdown],{type:"text/markdown;charset=utf-8"}),W=URL.createObjectURL(F),ee=document.createElement("a");ee.href=W,ee.download=B?"EXPORT-full.md":Z.filePath||"EXPORT.md",document.body.appendChild(ee),ee.click(),ee.remove(),URL.revokeObjectURL(W),b(!1)}catch(Z){window.alert(`Export failed: ${Z instanceof Error?Z.message:String(Z)}`)}finally{j(null)}}return c.jsx("div",{className:"border-b border-[var(--border)] bg-[var(--surface-elevated)] backdrop-blur-xl backdrop-saturate-150",children:c.jsxs("div",{className:"page-container flex flex-col gap-3 py-2.5 md:flex-row md:items-center md:justify-between sm:gap-4 sm:py-3",children:[c.jsxs(Ye,{to:"/",className:"flex min-w-0 items-center gap-3",children:[c.jsx("div",{className:"surface-card flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl border border-[var(--border)] text-[var(--accent)]",children:c.jsx(Nu,{className:"h-4 w-4"})}),c.jsxs("div",{className:"min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"truncate text-sm font-black tracking-tight",children:n??"Agent Plan"}),s?c.jsx("span",{className:"shrink-0 rounded-full border border-[var(--border)] bg-[var(--surface-elevated)] px-2 py-0.5 text-[10px] font-semibold text-[var(--text-subtle)]",children:".planner/"}):null]}),i?c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"truncate text-[11px] text-[var(--text-subtle)]",title:i,children:i}),c.jsx("button",{type:"button",onClick:async B=>{B.preventDefault(),B.stopPropagation(),i&&(await navigator.clipboard.writeText(i).catch(()=>{}),x(!0),window.setTimeout(()=>x(!1),1200))},className:"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-[var(--text-subtle)] transition hover:text-[var(--text)]",title:v?"Copied":"Copy project path","aria-label":v?"Copied":"Copy project path",children:v?c.jsx(nx,{className:"h-3.5 w-3.5"}):c.jsx(rx,{className:"h-3.5 w-3.5"})})]}):null]})]}),c.jsxs("div",{className:"flex items-center justify-end gap-2 sm:gap-3",children:[c.jsx("div",{className:"flex flex-wrap items-center gap-2",children:c.jsx(W1,{liveStatus:f})}),c.jsx("nav",{className:"flex items-center gap-1.5 sm:gap-2",children:N.map(B=>c.jsxs(tx,{to:B.to,end:B.to==="/",className:({isActive:k})=>`inline-flex min-h-11 items-center gap-2 rounded-[14px] border px-3 py-2 text-sm font-semibold transition sm:px-4 ${k?"border-transparent bg-[var(--accent-soft)] text-[var(--accent)]":"border-transparent text-[var(--text-muted)] hover:bg-[var(--accent-soft)] hover:text-[var(--text)]"}`,children:[c.jsx(B.icon,{className:"h-4 w-4"}),c.jsx("span",{className:"hidden sm:inline",children:B.label})]},B.to))}),c.jsxs("div",{className:"relative",children:[c.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":p,onClick:()=>b(B=>!B),className:"inline-flex min-h-11 items-center gap-2 rounded-[14px] border border-[var(--border-strong)] bg-[var(--surface-elevated)] px-3 py-2 text-sm font-semibold text-[var(--text-muted)] transition hover:text-[var(--text)] sm:px-4",children:[c.jsx(b1,{className:"h-4 w-4"}),c.jsx("span",{className:"hidden sm:inline",children:"Export"}),c.jsx(An,{className:`h-4 w-4 transition-transform ${p?"rotate-180":""}`})]}),p?c.jsxs("div",{role:"menu",className:"absolute right-0 z-50 mt-2 min-w-44 overflow-hidden rounded-[14px] border border-[var(--border)] bg-[var(--surface-elevated)] p-1 shadow-xl",children:[c.jsxs("button",{type:"button",role:"menuitem",disabled:y!==null,onClick:()=>void A(!1),className:"flex w-full items-center justify-between rounded-[10px] px-3 py-2 text-left text-sm font-semibold text-[var(--text)] transition hover:bg-[var(--accent-soft)] disabled:cursor-wait disabled:opacity-60",children:["Summary",y==="summary"?c.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"…"}):null]}),c.jsxs("button",{type:"button",role:"menuitem",disabled:y!==null,onClick:()=>void A(!0),className:"flex w-full items-center justify-between rounded-[10px] px-3 py-2 text-left text-sm font-semibold text-[var(--text)] transition hover:bg-[var(--accent-soft)] disabled:cursor-wait disabled:opacity-60",children:["Full",y==="full"?c.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"…"}):null]})]}):null]}),c.jsx("button",{type:"button",onClick:h,className:"inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-[14px] border border-[var(--border-strong)] bg-[var(--surface-elevated)] text-[var(--text-muted)] transition hover:text-[var(--text)]",children:d==="dark"?c.jsx(_1,{className:"h-4 w-4"}):c.jsx(M1,{className:"h-4 w-4"})})]})]})})}function mv(n,i,s){n.split(`
187
+ `).forEach((f,d)=>{d>0&&i.push(c.jsx("br",{},`${s}-br-${d}`)),f&&i.push(f)})}function Ar(n,i){const s=[],o=/(\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*)/g;let f=0,d=null,h=0;for(;(d=o.exec(n))!==null;)d.index>f&&mv(n.slice(f,d.index),s,`${i}-${h}`),d[2]&&d[3]?s.push(c.jsx("a",{href:d[3],target:"_blank",rel:"noreferrer",className:"font-semibold text-[var(--accent)] underline-offset-4 hover:underline",children:d[2]},`${i}-link-${h}`)):d[4]?s.push(c.jsx("strong",{className:"font-semibold text-[var(--text)]",children:d[4]},`${i}-strong-${h}`)):d[5]?s.push(c.jsx("code",{className:"rounded-md border border-[var(--border)] px-1.5 py-0.5 font-mono text-[0.95em] text-[var(--text)]",children:d[5]},`${i}-code-${h}`)):d[6]&&s.push(c.jsx("em",{className:"italic",children:d[6]},`${i}-em-${h}`)),f=o.lastIndex,h+=1;return f<n.length&&mv(n.slice(f),s,`${i}-tail`),s}function P1(n,i){var f;const s=n.split(`
188
+ `);if(n.startsWith("```")){const d=n.replace(/^```[a-zA-Z]*\n?/,"").replace(/```\s*$/,"");return c.jsx("pre",{className:"overflow-x-auto rounded-lg border border-[var(--border)] bg-[var(--surface-elevated)] p-3 text-sm font-mono text-[var(--text)]",children:c.jsx("code",{children:d})},`code-${i}`)}const o=n.match(/^(#{1,6})\s+(.+)$/);if(o&&o[2]){const d=((f=o[1])==null?void 0:f.length)??1,h=o[2],v=d<=2?"text-base font-bold text-[var(--text)]":"text-sm font-bold text-[var(--text)]";return c.jsx("p",{className:v,children:Ar(h,`h-${i}`)},`h-${i}`)}return s.every(d=>/^\s*>\s?/.test(d))?c.jsx("blockquote",{className:"border-l-2 border-[var(--accent)] pl-4 text-sm italic text-[var(--text-muted)]",children:s.map((d,h)=>c.jsx("div",{children:Ar(d.replace(/^\s*>\s?/,""),`bq-${i}-${h}`)},`bq-${i}-${h}`))},`bq-${i}`):/^\s*([-*_])\1{2,}\s*$/.test(n.trim())?c.jsx("hr",{className:"border-[var(--border)]"},`hr-${i}`):s.every(d=>/^\s*[-*]\s+/.test(d))?c.jsx("ul",{className:"grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:s.map((d,h)=>c.jsx("li",{className:"list-disc",children:Ar(d.replace(/^\s*[-*]\s+/,""),`ul-${i}-${h}`)},`ul-${i}-${h}`))},`ul-${i}`):s.every(d=>/^\s*\d+\.\s+/.test(d))?c.jsx("ol",{className:"grid gap-2 pl-5 text-sm text-[var(--text-muted)] list-decimal",children:s.map((d,h)=>c.jsx("li",{children:Ar(d.replace(/^\s*\d+\.\s+/,""),`ol-${i}-${h}`)},`ol-${i}-${h}`))},`ol-${i}`):c.jsx("p",{className:"text-sm leading-6 text-[var(--text-muted)] whitespace-pre-wrap",children:Ar(n,`p-${i}`)},`p-${i}`)}function _t({text:n,className:i=""}){if(!(n!=null&&n.trim()))return null;const s=n.trim().split(/\n\s*\n/).filter(Boolean);return c.jsx("div",{className:`formatted-text grid grid-cols-1 gap-3 ${i}`,children:s.map((o,f)=>P1(o,f))})}const hv={feature:{soft:"rgba(139, 92, 246, 0.16)",strong:"var(--color-entity-feature)"},phase:{soft:"rgba(6, 182, 212, 0.16)",strong:"var(--color-entity-phase)"},task:{soft:"rgba(16, 185, 129, 0.16)",strong:"var(--color-entity-task)"}};function Ia(n){return String(n&&n>0?n:0).padStart(3,"0")}function Ai({featureNum:n,phaseNum:i,taskNum:s}){const o=[];return n!==void 0&&o.push(`F${Ia(n)}`),i!==void 0&&o.push(`P${Ia(i)}`),s!==void 0&&o.push(`T${Ia(s)}`),o.join("/")}async function eS(n){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(n),!0}catch{}try{const i=document.createElement("textarea");i.value=n,i.style.position="fixed",i.style.top="-1000px",i.style.opacity="0",document.body.appendChild(i),i.focus(),i.select();const s=document.execCommand("copy");return i.remove(),s}catch{return!1}}function On({type:n,number:i}){const s=hv[n]||hv.task,o=(s==null?void 0:s.soft)||"transparent",f=(s==null?void 0:s.strong)||"inherit";return c.jsxs("span",{className:"shrink-0 inline-flex items-center justify-center font-mono text-[11px] font-bold leading-none px-2 py-1 rounded-md transition-colors",style:{backgroundColor:o,color:f},children:[n?n.charAt(0).toUpperCase():"?",Ia(i)]})}function wu({type:n,phaseNum:i,featureNum:s}){return n==="feature"?null:n==="phase"?s===void 0?null:c.jsx("div",{className:"shrink-0 inline-flex items-stretch font-mono text-[10.5px] font-semibold rounded-md overflow-hidden border border-[var(--border)] bg-[var(--surface-elevated)]",children:c.jsxs("span",{className:"px-2 py-1 text-[var(--text-muted)]",children:["F",Ia(s)]})}):n==="task"?i===void 0?null:c.jsxs("div",{className:"shrink-0 inline-flex items-stretch font-mono text-[10.5px] font-semibold rounded-md overflow-hidden border border-[var(--border)] bg-[var(--surface-elevated)]",children:[c.jsxs("span",{className:"px-2 py-1 text-[var(--text-muted)]",children:["P",Ia(i)]}),s!==void 0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"w-[1px] bg-[var(--border)]"}),c.jsxs("span",{className:"px-2 py-1 text-[var(--text-subtle)]",children:["F",Ia(s)]})]})]}):null}function zi({featureNum:n,phaseNum:i,taskNum:s}){return c.jsxs("span",{className:"entity-path-badge",children:[n!==void 0?c.jsxs("span",{className:"entity-path-seg entity-path-seg--feature",children:["F",Ia(n)]}):null,i!==void 0?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"entity-path-sep","aria-hidden":"true",children:"/"}),c.jsxs("span",{className:"entity-path-seg entity-path-seg--phase",children:["P",Ia(i)]})]}):null,s!==void 0?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"entity-path-sep","aria-hidden":"true",children:"/"}),c.jsxs("span",{className:"entity-path-seg entity-path-seg--task",children:["T",Ia(s)]})]}):null]})}function _i({id:n,children:i}){const[s,o]=S.useState(!1);return c.jsxs("button",{type:"button",onClick:async f=>{f.preventDefault(),f.stopPropagation(),await eS(n)&&(o(!0),window.setTimeout(()=>o(!1),1200))},title:s?"Copied":`Copy ${n}`,"aria-label":s?"Copied":`Copy ${n}`,className:"copyable-id group inline-flex items-center gap-1.5",children:[i,c.jsx("span",{className:"copyable-id__icon","aria-hidden":"true",children:s?c.jsx(nx,{className:"h-3 w-3 text-emerald-500"}):c.jsx(rx,{className:"h-3 w-3"})})]})}function tS({activeTasks:n}){const i=S.useMemo(()=>{const s=new Set;return n.filter(o=>{const f=`${o.id}-${o.title}-${o.phaseId}`;return s.has(f)?!1:(s.add(f),!0)})},[n]);return i.length===0?null:c.jsx("div",{className:"border-t border-[var(--border)] bg-[var(--surface-elevated)]/95 backdrop-blur-xl",children:c.jsx("div",{className:"page-container py-2.5",children:c.jsxs("div",{className:"grid gap-2",children:[c.jsxs("span",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:["In-progress tasks (",i.length,")"]}),c.jsx("div",{className:"grid grid-cols-1 max-h-[35vh] gap-1.5 overflow-y-auto pr-1",children:i.map(s=>{const o=s.featureId?`/features/${s.featureId}/phases/${s.phaseId}/tasks/${s.id}`:"/features";return c.jsx(Ye,{to:o,className:"flex min-w-0 items-center gap-2 rounded-[10px] border border-[var(--border)] bg-[var(--surface-card)] px-3 py-2 text-sm text-[var(--text)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--accent-soft)] hover:text-[var(--accent)]",children:c.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[s.status==="in-progress"?c.jsx("span",{"aria-hidden":"true",className:"inline-block h-2 w-2 rounded-full bg-[var(--accent)]","aria-label":"In progress"}):null,c.jsx(On,{type:"task",number:s.number}),c.jsx(wu,{type:"task",phaseNum:s.phaseNumber,featureNum:s.featureNumber}),c.jsx("span",{className:"min-w-0 truncate font-medium",children:s.title})]})},s.id)})})]})})})}function aS({project:n,activeTasks:i,handoffExists:s,serverInfo:o}){const f=sn(),[d,h]=S.useState("connecting");return S.useEffect(()=>{const v=x=>{var b;const p=(b=x.detail)==null?void 0:b.status;p&&h(p)};return window.addEventListener("agent-plan:ws-status",v),()=>window.removeEventListener("agent-plan:ws-status",v)},[]),c.jsxs("div",{className:"page-shell",children:[c.jsxs("header",{className:"sticky top-0 z-30",children:[c.jsx(I1,{projectName:n==null?void 0:n.name,projectRoot:n==null?void 0:n.projectRoot,planRoot:n==null?void 0:n.planRoot,handoffExists:s,liveStatus:d}),c.jsx(tS,{activeTasks:i})]}),c.jsxs("div",{className:"page-container py-8",children:[c.jsxs("div",{className:"mb-8 flex flex-col gap-3 md:flex-row md:items-end md:justify-between md:gap-6",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-sm font-semibold uppercase tracking-[0.24em] text-[var(--text-subtle)]",children:"Current project"}),c.jsx("h1",{className:"text-2xl font-black tracking-tight text-[var(--text)] md:text-3xl",children:c.jsx(Ye,{to:"/",className:"hover:text-[var(--accent)]",children:(n==null?void 0:n.name)??"Agent Plan"})}),n!=null&&n.projectRoot?c.jsx("p",{className:"mt-2 truncate font-mono text-xs text-[var(--text-subtle)]",title:n.projectRoot,children:n.projectRoot}):null,o?c.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs",children:[c.jsxs("span",{className:`inline-flex items-center gap-1.5 rounded-full px-2.5 py-1 font-semibold uppercase tracking-[0.12em] ${o.mode==="lan"?"bg-[color:color-mix(in_srgb,var(--accent)_16%,transparent)] text-[var(--accent)]":"bg-[var(--surface-elevated)] text-[var(--text-muted)]"}`,children:[c.jsx("span",{"aria-hidden":"true",className:"inline-block h-1.5 w-1.5 rounded-full bg-current"}),o.mode==="lan"?"LAN visible":"Local only"]}),c.jsx("a",{href:o.localUrl,target:"_blank",rel:"noreferrer",className:"font-mono text-[var(--text-subtle)] underline-offset-2 hover:text-[var(--accent)] hover:underline",children:o.localUrl}),o.lanUrl?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-[var(--text-subtle)]",children:"·"}),c.jsx("a",{href:o.lanUrl,target:"_blank",rel:"noreferrer",className:"font-mono text-[var(--text-subtle)] underline-offset-2 hover:text-[var(--accent)] hover:underline",children:o.lanUrl})]}):null]}):null,n!=null&&n.description?c.jsx(_t,{text:n.description,className:"mt-2 max-w-3xl"}):null]}),f.state!=="idle"?c.jsx("div",{className:"text-sm font-semibold text-[var(--accent)]",children:"Updating…"}):null]}),c.jsx(Kr,{})]})]})}const Lr={create:{key:"n",meta:!0,ctrl:!0},edit:{key:"e",meta:!0,ctrl:!0},delete:{key:"d",meta:!0,ctrl:!0},submit:{key:"Enter",primary:!0}},px=S.createContext(Lr);function vx(){return typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform)}function lS(n){return typeof n!="string"}function nS(n){return{create:(n==null?void 0:n.create)??Lr.create,edit:(n==null?void 0:n.edit)??Lr.edit,delete:(n==null?void 0:n.delete)??Lr.delete,submit:(n==null?void 0:n.submit)??Lr.submit}}function iS(n){const i=[],s=vx();n.primary&&i.push(s?"⌘":"Ctrl"),n.meta&&i.push(s?"⌘":"Meta"),n.ctrl&&i.push(s?"⌃":"Ctrl"),n.shift&&i.push(s?"⇧":"Shift"),n.alt&&i.push(s?"⌥":"Alt");const o=n.key==="Backspace"?s?"⌫":"Backspace":n.key==="Enter"?s?"↩":"Enter":n.key.length===1?n.key.toUpperCase():n.key;return i.push(o),s?i.join(""):i.join("+")}function rS(n){return n instanceof HTMLElement?!!n.closest("input, textarea, select, [contenteditable='true']"):!1}function sS(n,i){const s=i.key.length===1?i.key.toLowerCase():i.key,o=n.key.length===1?n.key.toLowerCase():n.key,f=vx(),d=i.meta??(i.primary?f:!1),h=i.ctrl??(i.primary?!f:!1);return o===s&&!!d===n.metaKey&&!!h===n.ctrlKey&&!!i.shift===n.shiftKey&&!!i.alt===n.altKey}function uS({shortcuts:n,children:i}){return S.createElement(px.Provider,{value:nS(n)},i)}function xx(n){const i=S.useContext(px);if(n)return lS(n)?n:i[n]}function qt(n,i,s){const o=xx(n);S.useEffect(()=>{if(!o||(s==null?void 0:s.enabled)===!1)return;const f=d=>{!(s!=null&&s.allowInEditable)&&rS(d.target)||sS(d,o)&&(d.preventDefault(),i())};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[i,s==null?void 0:s.allowInEditable,s==null?void 0:s.enabled,o])}const cS=1500,oS=80,fS=12e3,dS=5e3;function mS(){const{revalidate:n}=f0(),i=S.useRef(null),s=S.useRef(null),o=S.useRef(null),f=S.useRef(null),d=S.useRef(null);return S.useEffect(()=>{let h=!0;const v=ee=>{window.dispatchEvent(new CustomEvent("agent-plan:ws-status",{detail:{status:ee}}))},x=()=>{s.current!==null&&(window.clearTimeout(s.current),s.current=null)},p=()=>{o.current!==null&&(window.clearTimeout(o.current),o.current=null)},b=()=>{d.current!==null&&(window.clearTimeout(d.current),d.current=null)},y=()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},j=()=>{p(),o.current=window.setTimeout(()=>{n()},oS)},N=()=>{!h||s.current!==null||(v("reconnecting"),s.current=window.setTimeout(()=>{s.current=null,k()},cS))},A=()=>{y(),b();const ee=i.current;if(i.current=null,ee&&(ee.readyState===WebSocket.OPEN||ee.readyState===WebSocket.CONNECTING))try{ee.close()}catch{}},B=()=>{y(),b(),f.current=window.setInterval(()=>{const ee=i.current;if(!(!ee||ee.readyState!==WebSocket.OPEN)){try{ee.send(JSON.stringify({type:"ping"}))}catch{A(),N();return}b(),d.current=window.setTimeout(()=>{A(),N()},dS)}},fS)},k=()=>{if(!h)return;const ee=i.current;if(ee&&(ee.readyState===WebSocket.OPEN||ee.readyState===WebSocket.CONNECTING))return;v(s.current!==null?"reconnecting":"connecting"),x();const re=window.location.protocol==="https:"?"wss":"ws",se=new WebSocket(`${re}://${window.location.host}/ws`);i.current=se,se.onopen=()=>{x(),v("live"),B()},se.onmessage=le=>{b();try{const M=JSON.parse(le.data);if(!M.type||M.type==="pong"||M.type==="connected")return;switch(window.dispatchEvent(new CustomEvent("agent-plan:ws-event",{detail:M})),M.type){case"project-updated":case"features-updated":case"phases-updated":case"requirements-updated":case"plan-rendered":case"file-changed":j();break;default:break}}catch{}},se.onclose=()=>{y(),b(),i.current===se&&(i.current=null),h&&N()},se.onerror=()=>{try{se.close()}catch{}}},Z=()=>{const ee=i.current;(!ee||ee.readyState===WebSocket.CLOSED||ee.readyState===WebSocket.CLOSING)&&k()},F=()=>{document.visibilityState==="visible"&&Z()},W=()=>{Z()};return v("connecting"),k(),window.addEventListener("online",W),document.addEventListener("visibilitychange",F),()=>{h=!1,v("disconnected"),window.removeEventListener("online",W),document.removeEventListener("visibilitychange",F),x(),p(),y(),b(),A()}},[n]),null}async function hS(){const[n,i,s,o]=await Promise.all([cx(),$1(),mx(),hx()]);return{project:n,uiConfig:i,activeTasks:s,handoff:o}}function pS(){const{project:n,uiConfig:i,activeTasks:s,handoff:o}=_n();return S.useEffect(()=>{var f;document.title=(f=n==null?void 0:n.name)!=null&&f.trim()?`${n.name} · Agent Plan`:"Agent Plan"},[n==null?void 0:n.name]),c.jsxs(uS,{shortcuts:i.shortcuts,children:[c.jsx(mS,{}),c.jsx(aS,{project:n,activeTasks:s,handoffExists:o.exists,serverInfo:i.server})]})}function vS(){const n=Iv(),i=Ri(n),s=i&&n.status===503,o=i?s?"Planner web UI disconnected":`Request failed (${n.status})`:"Planner web UI unavailable",f=i?n.data||n.statusText:n instanceof Error?n.message:"The planner web UI could not reach its local server.";return S.useEffect(()=>{document.title="Agent Plan"},[]),c.jsx("div",{className:"page-shell min-h-screen",children:c.jsx("div",{className:"page-container flex min-h-screen items-center justify-center py-12",children:c.jsxs("div",{className:"surface-card max-w-2xl rounded-[24px] px-8 py-8",children:[c.jsx("p",{className:"text-sm font-semibold uppercase tracking-[0.24em] text-[var(--text-subtle)]",children:"Agent Plan"}),c.jsx("h1",{className:"mt-2 text-2xl font-black tracking-tight text-[var(--text)] md:text-3xl",children:o}),c.jsx("p",{className:"mt-4 text-sm text-[var(--text-muted)]",children:String(f)}),c.jsx("div",{className:"mt-6 grid gap-2 text-sm text-[var(--text-muted)]",children:s?c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"Possible cause: Pi was closed or the local planner web server stopped."}),c.jsx("p",{children:"What to do:"}),c.jsxs("ul",{className:"grid gap-1 pl-5",children:[c.jsxs("li",{className:"list-disc",children:["restart Pi or run ",c.jsx("code",{children:"planner-web start"})]}),c.jsx("li",{className:"list-disc",children:"reopen this planner UI from the new session if needed"}),c.jsx("li",{className:"list-disc",children:"then reload this page"})]})]}):c.jsxs(c.Fragment,{children:[c.jsx("p",{children:"The request reached the planner server, but the server rejected it."}),c.jsx("p",{children:"Fix the validation issue above, then try again."})]})}),c.jsx("div",{className:"mt-6 flex flex-wrap gap-3",children:c.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"inline-flex min-h-11 items-center rounded-[14px] bg-[var(--accent)] px-4 py-2 text-sm font-semibold text-white transition hover:opacity-90",children:"Reload page"})})]})})})}async function xS(){const[n,i,s]=await Promise.all([ox(),Uf(),mx()]);return{features:n,phases:i,activeTasks:s}}function gS({shortcut:n}){const i=xx(n);return i?c.jsx("span",{className:"rounded-md border border-[var(--border-strong)] bg-[var(--surface-elevated)] px-2 py-0.5 text-[11px] font-bold tracking-wide text-[var(--text-muted)]",children:iS(i)}):null}const yS={primary:"border-transparent bg-[var(--accent)] text-white hover:bg-[var(--accent-hover)]",secondary:"border-[var(--border-strong)] bg-[var(--surface-elevated)] text-[var(--text)] hover:bg-[var(--accent-soft)] hover:text-[var(--text)]",ghost:"border-transparent bg-transparent text-[var(--text-muted)] hover:bg-[var(--accent-soft)] hover:text-[var(--text)]",danger:"border-transparent bg-[var(--danger-soft)] text-[var(--color-status-blocked)] hover:bg-[color-mix(in_srgb,var(--danger-soft)_88%,black_12%)]"};function He({variant:n="secondary",className:i="",children:s,shortcut:o,...f}){return c.jsxs("button",{className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-[14px] border px-4 py-2 text-sm font-semibold transition-colors motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--surface)] disabled:cursor-not-allowed disabled:opacity-60 ${yS[n]} ${i}`,...f,children:[c.jsx("span",{children:s}),o?c.jsx(gS,{shortcut:o}):null]})}function Vt({className:n="",children:i,...s}){return c.jsx("div",{className:`surface-card p-6 ${n}`,...s,children:i})}function bS({decisions:n}){return n.length===0?null:c.jsxs("details",{className:"group rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-4 py-4",children:[c.jsxs("summary",{className:"cursor-pointer select-none font-semibold text-[var(--text)]",children:["Accepted decisions (",n.length,")"]}),c.jsx("div",{className:"mt-4 grid gap-3",children:n.map(i=>c.jsxs("div",{className:"rounded-[14px] border border-[var(--border)] bg-[var(--surface-elevated)] px-4 py-3",children:[c.jsx("p",{className:"text-sm font-semibold text-[var(--text)]",children:i.title}),i.decision?c.jsxs("div",{className:"mt-2 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Decision:"})," ",c.jsx(_t,{text:i.decision})]}):null,i.rationale?c.jsxs("div",{className:"mt-1 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Rationale:"})," ",c.jsx(_t,{text:i.rationale})]}):null,i.implementationNotes?c.jsxs("div",{className:"mt-1 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Implementation:"})," ",c.jsx(_t,{text:i.implementationNotes})]}):null]},i.id))})]})}function SS({project:n}){var b,y,j;const i=n.scope??[],s=n.outOfScope??[],o=n.technologies??[],f=n.tools??[],d=n.globalRules??[],h=n.decisions??[],v=n.acceptedDecisions??[],x={beforePhaseStart:((b=n.workflowRules)==null?void 0:b.beforePhaseStart)??[],beforeTaskStart:((y=n.workflowRules)==null?void 0:y.beforeTaskStart)??[],afterPhaseComplete:((j=n.workflowRules)==null?void 0:j.afterPhaseComplete)??[]};return i.length>0||s.length>0||o.length>0||f.length>0||d.length>0||h.length>0||v.length>0||x.beforePhaseStart.length>0||x.beforeTaskStart.length>0||x.afterPhaseComplete.length>0?c.jsx(Vt,{className:"grid gap-4",children:c.jsxs("details",{className:"group",children:[c.jsx("summary",{className:"cursor-pointer select-none text-lg font-bold text-[var(--text)]",children:"AI Consolidated Context"}),c.jsxs("div",{className:"mt-4 grid gap-4",children:[i.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"In scope"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:i.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,s.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Out of scope"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:s.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,o.length>0||f.length>0?c.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[o.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Technologies"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:o.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,f.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Tools"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:f.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null]}):null,d.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Global rules"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:d.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,x.beforePhaseStart.length>0||x.beforeTaskStart.length>0||x.afterPhaseComplete.length>0?c.jsxs("details",{className:"group rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-4 py-4",children:[c.jsx("summary",{className:"cursor-pointer select-none font-semibold text-[var(--text)]",children:"Workflow rules"}),c.jsxs("div",{className:"mt-4 grid gap-4 text-sm text-[var(--text-muted)]",children:[x.beforePhaseStart.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-[var(--text)]",children:"Before phase start"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5",children:x.beforePhaseStart.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,x.beforeTaskStart.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-[var(--text)]",children:"Before task start"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5",children:x.beforeTaskStart.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,x.afterPhaseComplete.length>0?c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-[var(--text)]",children:"After phase complete"}),c.jsx("ul",{className:"mt-2 grid gap-2 pl-5",children:x.afterPhaseComplete.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null]})]}):null,h.length>0?c.jsxs("details",{className:"group rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-4 py-4",children:[c.jsxs("summary",{className:"cursor-pointer select-none font-semibold text-[var(--text)]",children:["Legacy decisions (",h.length,")"]}),c.jsx("ul",{className:"mt-4 grid gap-2 pl-5 text-sm text-[var(--text-muted)]",children:h.map(N=>c.jsx("li",{className:"list-disc",children:N},N))})]}):null,c.jsx(bS,{decisions:v})]})]})}):null}function el({status:n}){return c.jsx("span",{className:`status-chip status-${n}`,children:n})}function jS(n){try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(n))}catch{return n}}function NS({features:n,phases:i}){const s=S.useMemo(()=>{const o=new Map(n.map(f=>[f.id,f.name]));return i.flatMap(f=>f.tasks.filter(d=>d.status==="done").map(d=>({task:d,phase:f,feature:n.find(h=>h.id===f.featureId),featureName:f.featureId?o.get(f.featureId)??f.featureId:"Unlinked feature",completedAt:d.completedAt||d.updatedAt}))).sort((f,d)=>d.completedAt.localeCompare(f.completedAt)).slice(0,3)},[n,i]);return c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-bold text-[var(--text)]",children:"Latest completed tasks"}),c.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Most recently completed tasks, ordered by completion timestamp."})]}),c.jsx("div",{className:"grid gap-3",children:s.length>0?s.map(({task:o,phase:f,feature:d,featureName:h,completedAt:v})=>c.jsxs(Ye,{to:f.featureId?`/features/${f.featureId}/phases/${f.id}/tasks/${o.id}`:"/features",className:"surface-card grid min-w-0 grid-cols-1 gap-1 px-4 py-3 transition hover:border-[var(--accent)] hover:bg-[var(--accent-soft)]",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(On,{type:"task",number:o.number}),c.jsx(wu,{type:"task",phaseNum:f.number,featureNum:d==null?void 0:d.number}),c.jsx("span",{className:"shrink-0",children:c.jsx(el,{status:o.status})})]}),c.jsx("span",{className:"entity-link--task min-w-0 break-words text-sm font-semibold underline-offset-4 [overflow-wrap:anywhere]",children:o.title}),c.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-xs text-[var(--text-muted)]",children:[c.jsx(wu,{type:"phase",featureNum:d==null?void 0:d.number}),c.jsxs("span",{className:"min-w-0 truncate",children:[h," · ",f.title]})]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-subtle)]",children:["Completed ",jS(v)]})]},o.id)):c.jsx("p",{className:"py-4 text-center text-sm text-[var(--text-muted)]",children:"No completed tasks yet."})})]})}const wS=4200;function ES(n){return n.reduce((i,s)=>i+s.tasks.length,0)}function RS(n){return n.reduce((i,s)=>i+s.tasks.filter(o=>o.status==="done").length,0)}function TS(n){return String(n&&n>0?n:0).padStart(3,"0")}function DS(n,i){const s=new Map;for(const o of i){if(!o.featureId)continue;const f=s.get(o.featureId)??[];f.push(o),s.set(o.featureId,f)}return n.map(o=>{const f=s.get(o.id)??[],d=f.reduce((p,b)=>p+b.tasks.length,0),h=f.reduce((p,b)=>p+b.tasks.filter(y=>y.status==="done").length,0),v=f.map(p=>{const b=[...p.tasks].sort((j,N)=>j.number-N.number||j.createdAt.localeCompare(N.createdAt)||j.title.localeCompare(N.title)),y=b.some(j=>j.status==="in-progress");return{phase:p,totalTasks:p.tasks.length,doneTasks:p.tasks.filter(j=>j.status==="done").length,allTasks:b,hasActiveTask:y}}),x=v.some(({phase:p,allTasks:b})=>p.status==="in-progress"||p.status==="discovery"||b.some(y=>y.status==="in-progress"));return{feature:o,totalTasks:d,doneTasks:h,allPhases:v.sort((p,b)=>p.phase.number-b.phase.number),hasActiveTask:v.some(p=>p.hasActiveTask),isActive:x}}).sort((o,f)=>o.feature.number-f.feature.number||o.feature.name.localeCompare(f.feature.name))}function vu({title:n,value:i,valueSuffix:s,subtitle:o,icon:f,valueClassName:d,iconClassName:h}){return c.jsxs(Vt,{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:n}),c.jsxs("div",{className:"mt-2 flex items-end gap-2",children:[c.jsx("p",{className:`text-3xl font-black tracking-tight ${d??"text-[var(--text)]"}`,children:i}),s?c.jsx("span",{className:"pb-1 text-sm font-semibold text-[var(--text-muted)]",children:s}):null]}),c.jsx("p",{className:"mt-1 text-sm text-[var(--text-muted)]",children:o})]}),c.jsx("div",{className:`surface-card flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl border border-[var(--border)] bg-[var(--accent-soft)] ${h??"text-[var(--accent)]"}`,children:f})]})}function pv(n){return n>=80?"text-emerald-600 dark:text-emerald-400":n>=30?"text-amber-600 dark:text-amber-400":"text-rose-600 dark:text-rose-400"}function CS({features:n,phases:i}){const s=n.filter(b=>b.status==="done").length,o=Math.max(n.length-s,0),f=i.filter(b=>b.status==="done").length,d=Math.max(i.length-f,0),h=ES(i),v=RS(i),x=Math.max(h-v,0),p=h>0?Math.round(v/h*100):0;return c.jsxs("div",{className:"grid gap-4 lg:grid-cols-4",children:[c.jsx(vu,{title:"Features",value:String(n.length),valueSuffix:"total",subtitle:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"font-semibold text-emerald-600 dark:text-emerald-400",children:[s," done"]}),c.jsx("span",{children:" · "}),c.jsxs("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:[o," left"]})]}),icon:c.jsx(Nu,{className:"h-4 w-4"})}),c.jsx(vu,{title:"Phases",value:String(i.length),valueSuffix:"total",subtitle:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"font-semibold text-emerald-600 dark:text-emerald-400",children:[f," done"]}),c.jsx("span",{children:" · "}),c.jsxs("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:[d," left"]})]}),icon:c.jsx(d1,{className:"h-4 w-4"})}),c.jsx(vu,{title:"Tasks",value:String(h),valueSuffix:"total",subtitle:c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"font-semibold text-emerald-600 dark:text-emerald-400",children:[v," done"]}),c.jsx("span",{children:" · "}),c.jsxs("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:[x," left"]})]}),icon:c.jsx(sx,{className:"h-4 w-4"})}),c.jsx(vu,{title:"Completion",value:`${p}%`,subtitle:"Task completion rate",valueClassName:pv(p),iconClassName:pv(p),icon:c.jsx(x1,{className:"h-4 w-4"})})]})}const Jr=[{value:"planned",label:"Planned"},{value:"in-progress",label:"In progress"},{value:"done",label:"Done"},{value:"blocked",label:"Blocked"},{value:"canceled",label:"Canceled"},{value:"rejected",label:"Rejected"},{value:"deferred",label:"Deferred"},{value:"waiting",label:"Waiting"}],Wr=[{value:"draft",label:"Draft"},{value:"discovery",label:"Discovery"},{value:"planned",label:"Planned"},{value:"in-progress",label:"In progress"},{value:"done",label:"Done"},{value:"blocked",label:"Blocked"},{value:"canceled",label:"Canceled"},{value:"rejected",label:"Rejected"},{value:"deferred",label:"Deferred"},{value:"waiting",label:"Waiting"}],Oi=[{value:"planned",label:"Planned"},{value:"in-progress",label:"In progress"},{value:"done",label:"Done"},{value:"blocked",label:"Blocked"},{value:"canceled",label:"Canceled"},{value:"rejected",label:"Rejected"},{value:"deferred",label:"Deferred"},{value:"waiting",label:"Waiting"}],zr=Jr.map(n=>n.value),_r=Wr.map(n=>n.value),Or=Oi.map(n=>n.value);function sf(n,i,s){if(n.includes(i)){const o=n.filter(f=>f!==i);return o.length===0?[...s]:o}return[...n,i]}function uf(n,i){return i.includes(n)}function Ja(n,i){return`agent-plan:dashboard:${n}:${i}`}function cf(n,i,s){if(typeof window>"u")return i;try{const o=window.localStorage.getItem(n);if(!o)return i;const f=JSON.parse(o);if(!Array.isArray(f))return i;const d=`${n}-schema`,h=s.slice().sort().join(",");if(window.localStorage.getItem(d)!==h)return window.localStorage.setItem(d,h),i;const x=f.filter(p=>typeof p=="string"&&s.includes(p));return x.length>0?x:i}catch{return i}}function of(n,i,s){typeof window>"u"||(window.localStorage.setItem(n,JSON.stringify(i)),window.localStorage.setItem(`${n}-schema`,s.slice().sort().join(",")))}function ff(n,i){if(typeof window>"u")return i;const s=window.localStorage.getItem(n);return s===null?i:s==="true"}function MS({features:n,phases:i,projectStorageScope:s}){const o=Ja(s,"show-all-features"),f=Ja(s,"tree-open-mode"),d=Ja(s,"expanded-features"),h=Ja(s,"expanded-phases"),v=Ja(s,"feature-status-filters"),x=Ja(s,"phase-status-filters"),p=Ja(s,"task-status-filters"),b=Ja(s,"hide-done"),y=Ja(s,"hide-planned"),j=Ja(s,"only-active-branches"),N=S.useMemo(()=>DS(n,i),[n,i]),[A,B]=S.useState(()=>{if(typeof window>"u")return!0;const ae=window.localStorage.getItem(o);return ae===null?!0:ae==="true"}),[k,Z]=S.useState(()=>{if(typeof window>"u")return"all";const ae=window.localStorage.getItem(f);return ae==="smart"||ae==="none"||ae==="all"?ae:"all"}),[F,W]=S.useState(()=>{if(typeof window>"u")return[];try{const ae=window.localStorage.getItem(d);return ae?JSON.parse(ae):[]}catch{return[]}}),[ee,re]=S.useState(()=>{if(typeof window>"u")return[];try{const ae=window.localStorage.getItem(h);return ae?JSON.parse(ae):[]}catch{return[]}}),[se,le]=S.useState(()=>cf(v,zr,zr)),[M,Re]=S.useState(()=>cf(x,_r,_r)),[xe,Ke]=S.useState(()=>cf(p,Or,Or)),[pe,st]=S.useState(()=>ff(b,!1)),[Te,ke]=S.useState(()=>ff(y,!1)),[H,X]=S.useState(()=>ff(j,!1)),[te,me]=S.useState([]),[be,R]=S.useState([]),[q,K]=S.useState([]),J=S.useRef({});S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(o,String(A))},[A,o]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(f,k)},[k,f]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(d,JSON.stringify(F))},[F,d]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(h,JSON.stringify(ee))},[ee,h]),S.useEffect(()=>{typeof window>"u"||of(v,se,zr)},[se,v]),S.useEffect(()=>{typeof window>"u"||of(x,M,_r)},[M,x]),S.useEffect(()=>{typeof window>"u"||of(p,xe,Or)},[xe,p]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(b,String(pe))},[pe,b]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(y,String(Te))},[Te,y]),S.useEffect(()=>{typeof window>"u"||window.localStorage.setItem(j,String(H))},[H,j]),S.useEffect(()=>()=>{Object.values(J.current).forEach(ae=>window.clearTimeout(ae)),J.current={}},[]);const he=S.useMemo(()=>{let ae=[...se];return pe&&(ae=ae.filter(je=>je!=="done")),Te&&(ae=ae.filter(je=>je!=="planned")),ae},[se,pe,Te]),fe=S.useMemo(()=>{let ae=[...M];return pe&&(ae=ae.filter(je=>je!=="done")),Te&&(ae=ae.filter(je=>je!=="planned"&&je!=="draft")),ae},[M,pe,Te]),Se=S.useMemo(()=>{let ae=[...xe];return pe&&(ae=ae.filter(je=>je!=="done")),Te&&(ae=ae.filter(je=>je!=="planned")),ae},[xe,pe,Te]),We=S.useMemo(()=>{const ae=!A||H;return(A?N:N.filter(ze=>ze.isActive)).filter(({feature:ze})=>uf(ze.status,he)).map(ze=>({...ze,allPhases:ze.allPhases.filter(({phase:tt,hasActiveTask:ut})=>uf(tt.status,fe)?ae?tt.status==="in-progress"||tt.status==="discovery"||ut:!0:!1).map(tt=>({...tt,allTasks:tt.allTasks.filter(ut=>!!uf(ut.status,Se))})).filter(tt=>tt.allTasks.length>0||A||!ae)})).filter(({hasActiveTask:ze,allPhases:tt})=>ae?ze||tt.some(ut=>ut.hasActiveTask):tt.length>0||A)},[he,fe,Se,H,A,N]);S.useEffect(()=>{if(k==="none"){W([]),re([]);return}if(k==="all"){W(We.filter(({feature:ze})=>ze.status!=="done").map(({feature:ze})=>ze.id)),re(We.flatMap(({allPhases:ze})=>ze.map(({phase:tt})=>tt.id)));return}const ae=new Set(We.map(({feature:ze})=>ze.id)),je=new Set(We.flatMap(({allPhases:ze})=>ze.map(({phase:tt})=>tt.id)));W(ze=>ze.filter(tt=>ae.has(tt))),re(ze=>ze.filter(tt=>je.has(tt)))},[We,k]);const Qe=ae=>{Z("smart"),W(je=>je.includes(ae)?je.filter(ze=>ze!==ae):[...je,ae])},nl=ae=>{Z("smart"),re(je=>je.includes(ae)?je.filter(ze=>ze!==ae):[...je,ae])},Cl=()=>{Z("smart"),W(We.map(({feature:ae})=>ae.id)),re(We.flatMap(({allPhases:ae})=>ae.map(({phase:je})=>je.id)))};return S.useEffect(()=>{const ae=(ze,tt)=>{const ut=tt.filter(Qt=>!!Qt);for(const Qt of ut){const _a=`${ze}:${Qt}`,il=ze==="feature"?me:ze==="phase"?R:K;il(dt=>dt.includes(Qt)?dt:[...dt,Qt]),J.current[_a]!==void 0&&window.clearTimeout(J.current[_a]),J.current[_a]=window.setTimeout(()=>{il(dt=>dt.filter(Pt=>Pt!==Qt)),delete J.current[_a]},wS)}},je=ze=>{var Qt,_a,il,dt,Pt,Oa;const ut=ze.detail;if(ut!=null&&ut.type){if(ut.type==="features-updated"){const Zt=((Qt=ut.data)==null?void 0:Qt.featureId)??((_a=ut.data)==null?void 0:_a.id);ae("feature",[Zt]),Zt&&(Z("smart"),W(kt=>kt.includes(Zt)?kt:[...kt,Zt]));return}if(ut.type==="phases-updated"){const Zt=(il=ut.data)==null?void 0:il.featureId,kt=((dt=ut.data)==null?void 0:dt.phaseId)??((Pt=ut.data)==null?void 0:Pt.id);ae("phase",[kt]),ae("feature",[Zt]),ae("task",[(Oa=ut.data)==null?void 0:Oa.taskId]),Z("smart"),Zt&&W(Dt=>Dt.includes(Zt)?Dt:[...Dt,Zt]),kt&&re(Dt=>Dt.includes(kt)?Dt:[...Dt,kt])}}};return window.addEventListener("agent-plan:ws-event",je),()=>{window.removeEventListener("agent-plan:ws-event",je)}},[]),{workTree:N,displayedWorkTree:We,treeOpenMode:k,setTreeOpenMode:Z,expandAll:Cl,expandedFeatureIds:F,expandedPhaseIds:ee,toggleExpandedFeature:Qe,toggleExpandedPhase:nl,recentFeatureIds:te,recentPhaseIds:be,recentTaskIds:q,showAllFeatures:A,setShowAllFeatures:B,featureStatusFilters:se,phaseStatusFilters:M,taskStatusFilters:xe,hideDone:pe,setHideDone:st,hidePlanned:Te,setHidePlanned:ke,onlyActiveBranches:H,setOnlyActiveBranches:X,resetFilters:()=>{B(!0),st(!1),ke(!1),le(zr),Re(_r),Ke(Or),X(!1),Z("all")},toggleFeatureStatusFilter:ae=>le(je=>sf(je,ae,zr)),togglePhaseStatusFilter:ae=>Re(je=>sf(je,ae,_r)),toggleTaskStatusFilter:ae=>Ke(je=>sf(je,ae,Or))}}const Hf="mt-1 block min-w-0 break-words font-mono text-sm font-semibold leading-snug [overflow-wrap:anywhere]";function AS(){return c.jsx("span",{className:"rounded-full bg-[color:color-mix(in_srgb,var(--accent)_16%,transparent)] px-2 py-0.5 text-[10px] font-semibold uppercase tracking-[0.12em] text-[var(--accent)]",children:"Updated"})}function Ci({status:n,doneTasks:i,totalTasks:s,recentlyChanged:o,className:f}){const d=i!=null&&s!=null;return c.jsxs("div",{className:f,children:[o?c.jsx(AS,{}):null,d?c.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["(",i,"/",s||0,")"]}):null,c.jsx("span",{className:"shrink-0",children:c.jsx(el,{status:n})})]})}function zS({entry:n,expanded:i,recentlyChanged:s,onToggle:o,isPhaseExpanded:f,onTogglePhase:d,isPhaseRecentlyChanged:h,isTaskRecentlyChanged:v}){const{feature:x,totalTasks:p,doneTasks:b,allPhases:y,hasActiveTask:j}=n;return c.jsxs("div",{className:`surface-card min-w-0 px-3 py-3 transition-colors sm:px-4 ${x.status==="in-progress"?"ap-in-progress":j?"border-[color:var(--color-status-in-progress)]/40 bg-[color:color-mix(in_srgb,var(--color-status-in-progress)_7%,transparent)]":""} ${x.status==="done"?"!opacity-70 !bg-[color:color-mix(in_srgb,var(--color-status-done)_10%,transparent)] !border-[color:color-mix(in_srgb,var(--color-status-done)_35%,transparent)]":""} ${s?"ring-1 ring-[color:color-mix(in_srgb,var(--accent)_55%,transparent)] bg-[color:color-mix(in_srgb,var(--accent)_12%,transparent)]":""}`,children:[c.jsxs("div",{className:`flex min-w-0 flex-col gap-1.5 rounded-[12px] px-1 py-1 transition-colors hover:bg-[var(--accent-soft)] sm:flex-row sm:items-start sm:justify-between sm:gap-3 ${s?"bg-[color:color-mix(in_srgb,var(--accent)_10%,transparent)]":""}`,children:[c.jsxs("div",{className:"flex min-w-0 items-start gap-2 sm:flex-1",children:[c.jsx("button",{type:"button",onClick:o,className:"mt-0.5 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-[var(--text-subtle)] hover:bg-[var(--surface-elevated)] hover:text-[var(--text)]","aria-label":i?`Collapse feature ${x.name}`:`Expand feature ${x.name}`,"aria-expanded":i,children:c.jsx(ix,{className:`h-4 w-4 transition ${i?"rotate-90":"rotate-0"}`})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(_i,{id:Ai({featureNum:x.number}),children:c.jsx(zi,{featureNum:x.number})}),j?c.jsx("span",{"aria-hidden":"true",className:"ap-progress-dot"}):null]}),c.jsx(Ci,{status:x.status,doneTasks:b,totalTasks:p,recentlyChanged:s,className:"mt-1 flex flex-wrap items-center gap-2 sm:hidden"}),c.jsx(Ye,{to:`/features/${x.id}`,className:`entity-link--feature ${Hf} underline-offset-4 hover:underline`,children:x.name})]})]}),c.jsx(Ci,{status:x.status,doneTasks:b,totalTasks:p,recentlyChanged:s,className:"hidden shrink-0 items-center gap-2 sm:flex"})]}),i&&y.length>0?c.jsx("div",{className:"mt-2 ml-1.5 grid grid-cols-1 gap-2 border-l border-[var(--border)] pl-3 sm:ml-4 sm:pl-4",children:y.map(N=>c.jsx(_S,{feature:x,phaseEntry:N,expanded:f(N.phase.id),recentlyChanged:h(N.phase.id),onToggle:()=>d(N.phase.id),isTaskRecentlyChanged:v},N.phase.id))}):null]})}function _S({feature:n,phaseEntry:i,expanded:s,recentlyChanged:o,onToggle:f,isTaskRecentlyChanged:d}){const{phase:h,totalTasks:v,doneTasks:x,allTasks:p,hasActiveTask:b}=i;return c.jsxs("div",{className:`work-tree-row grid min-w-0 grid-cols-1 gap-2 rounded-[12px] p-3 transition-colors ${h.status==="in-progress"?"ap-in-progress":b?"border border-[color:color-mix(in_srgb,var(--color-status-in-progress)_35%,transparent)] bg-[color:color-mix(in_srgb,var(--color-status-in-progress)_6%,transparent)]":""} ${h.status==="done"?"opacity-70 bg-[color:color-mix(in_srgb,var(--color-status-done)_6%,transparent)]":""} ${o?"ring-1 ring-[color:color-mix(in_srgb,var(--accent)_55%,transparent)] bg-[color:color-mix(in_srgb,var(--accent)_12%,transparent)]":""}`,children:[c.jsxs("div",{className:`flex min-w-0 flex-col gap-1.5 rounded-[10px] px-1 py-1 transition-colors hover:bg-[var(--accent-soft)] sm:flex-row sm:items-start sm:justify-between sm:gap-3 ${o?"bg-[color:color-mix(in_srgb,var(--accent)_8%,transparent)]":""}`,children:[c.jsxs("div",{className:"flex min-w-0 items-start gap-2 sm:flex-1",children:[c.jsx("button",{type:"button",onClick:f,className:"mt-0.5 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-[var(--text-subtle)] hover:bg-[var(--surface-elevated)] hover:text-[var(--text)]","aria-label":s?`Collapse phase ${h.title}`:`Expand phase ${h.title}`,"aria-expanded":s,children:c.jsx(ix,{className:`h-4 w-4 transition ${s?"rotate-90":"rotate-0"}`})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(_i,{id:Ai({featureNum:n==null?void 0:n.number,phaseNum:h.number}),children:c.jsx(zi,{featureNum:n==null?void 0:n.number,phaseNum:h.number})}),b?c.jsx("span",{"aria-hidden":"true",className:"ap-progress-dot"}):null]}),c.jsx(Ci,{status:h.status,doneTasks:x,totalTasks:v,recentlyChanged:o,className:"mt-1 flex flex-wrap items-center gap-2 sm:hidden"}),c.jsx(Ye,{to:`/features/${n.id}/phases/${h.id}`,className:`entity-link--phase ${Hf} underline-offset-4 hover:underline`,children:h.title})]})]}),c.jsx(Ci,{status:h.status,doneTasks:x,totalTasks:v,recentlyChanged:o,className:"hidden shrink-0 items-center gap-2 sm:flex"})]}),s?p.length>0?c.jsx("div",{className:"ml-1.5 grid grid-cols-1 gap-1 border-l border-[var(--border)] pl-3 sm:ml-4 sm:pl-4",children:p.map(y=>c.jsx(OS,{feature:n,phase:h,task:y,recentlyChanged:d(y.id)},y.id))}):c.jsx("p",{className:"ml-1.5 text-xs italic text-[var(--text-subtle)] sm:ml-4",children:"No tasks"}):null]})}function OS({feature:n,phase:i,task:s,recentlyChanged:o}){return c.jsxs("div",{className:`flex min-w-0 flex-col gap-1.5 rounded-[10px] px-2 py-2 transition-colors hover:bg-[var(--accent-soft)] sm:flex-row sm:items-start sm:justify-between sm:gap-3 ${s.status==="in-progress"?"ap-in-progress":""} ${s.status==="done"?"opacity-60 bg-[color:color-mix(in_srgb,var(--color-status-done)_6%,transparent)] text-[var(--text-muted)]":""} ${o?"ring-1 ring-[color:color-mix(in_srgb,var(--accent)_55%,transparent)] bg-[color:color-mix(in_srgb,var(--accent)_12%,transparent)]":""}`,children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(_i,{id:Ai({featureNum:n==null?void 0:n.number,phaseNum:i.number,taskNum:s.number}),children:c.jsx(zi,{featureNum:n==null?void 0:n.number,phaseNum:i.number,taskNum:s.number})}),s.status==="in-progress"?c.jsx("span",{"aria-hidden":"true",className:"ap-progress-dot"}):null]}),c.jsx(Ci,{status:s.status,recentlyChanged:o,className:"mt-1 flex flex-wrap items-center gap-2 sm:hidden"}),c.jsx(Ye,{to:`/features/${n.id}/phases/${i.id}/tasks/${s.id}`,className:`entity-link--task ${Hf} underline-offset-4 hover:underline`,children:s.title})]}),c.jsx(Ci,{status:s.status,recentlyChanged:o,className:"hidden shrink-0 items-center gap-2 sm:flex"})]})}function kS({features:n,phases:i,activeTasks:s,projectStorageScope:o}){const f=MS({features:n,phases:i,projectStorageScope:o}),[d,h]=S.useState(!1),[v,x]=S.useState(null),p=j=>f.expandedPhaseIds.includes(j),b=j=>f.recentPhaseIds.includes(j),y=j=>f.recentTaskIds.includes(j);return c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-bold text-[var(--text)]",children:"Work Tree"}),c.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:"Collapsible feature → phase → task tree. Click a feature or phase row to collapse/expand."})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(He,{type:"button",variant:"secondary",onClick:()=>f.expandAll(),children:"Expand all"}),c.jsx(He,{type:"button",variant:"secondary",onClick:()=>f.setTreeOpenMode("none"),children:"Collapse all"}),c.jsx(He,{type:"button",variant:"secondary",onClick:()=>f.setShowAllFeatures(j=>!j),children:f.showAllFeatures?"Show active only":"Show all features"})]})]}),c.jsxs("div",{className:"grid grid-cols-1 gap-3 rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-4 py-4",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx("button",{type:"button",onClick:()=>f.setHideDone(j=>!j),className:`status-chip transition ${f.hideDone?"status-done":"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:"Hide done"}),c.jsx("button",{type:"button",onClick:()=>f.setHidePlanned(j=>!j),className:`status-chip transition ${f.hidePlanned?"status-planned":"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:"Hide planned"}),c.jsx("button",{type:"button",onClick:()=>f.setOnlyActiveBranches(j=>!j),className:`status-chip transition ${f.onlyActiveBranches?"status-in-progress":"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:"Only active branches"}),c.jsx(He,{type:"button",variant:"secondary",onClick:f.resetFilters,children:"Reset filters"}),c.jsx(He,{type:"button",variant:"secondary",disabled:d,onClick:async()=>{h(!0),x(null);try{const j=await F1(),N=j.migrated,A=j.integrity.duplicatePhaseIds.length,B=j.integrity.danglingPhaseIds.length;x(`Repair done: renamed ${N.renamed}, repaired ${N.repaired} refs, inferred ${N.inferred}. Integrity: ${A} duplicate, ${B} dangling.`)}catch(j){x(`Repair failed: ${j instanceof Error?j.message:String(j)}`)}finally{h(!1)}},children:d?"Repairing…":"Repair plan"}),v?c.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:v}):null]}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-3",children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-[var(--text-subtle)]",children:"Feature status"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:Jr.map(j=>{const N=f.featureStatusFilters.includes(j.value);return c.jsx("button",{type:"button",onClick:()=>f.toggleFeatureStatusFilter(j.value),className:`status-chip transition ${N?`status-${j.value}`:"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:j.label},j.value)})})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-[var(--text-subtle)]",children:"Phase status"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:Wr.map(j=>{const N=f.phaseStatusFilters.includes(j.value);return c.jsx("button",{type:"button",onClick:()=>f.togglePhaseStatusFilter(j.value),className:`status-chip transition ${N?`status-${j.value}`:"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:j.label},j.value)})})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.14em] text-[var(--text-subtle)]",children:"Task status"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:Oi.map(j=>{const N=f.taskStatusFilters.includes(j.value);return c.jsx("button",{type:"button",onClick:()=>f.toggleTaskStatusFilter(j.value),className:`status-chip transition ${N?`status-${j.value}`:"border border-[var(--border)] bg-transparent text-[var(--text-muted)]"}`,children:j.label},j.value)})})]})]})]}),c.jsx("div",{className:"grid gap-3",children:f.displayedWorkTree.length>0?f.displayedWorkTree.map(j=>c.jsx(zS,{entry:j,expanded:f.expandedFeatureIds.includes(j.feature.id),recentlyChanged:f.recentFeatureIds.includes(j.feature.id),onToggle:()=>f.toggleExpandedFeature(j.feature.id),isPhaseExpanded:p,onTogglePhase:f.toggleExpandedPhase,isPhaseRecentlyChanged:b,isTaskRecentlyChanged:y},j.feature.id)):s.length>0?s.map(j=>{const N=j.featureId?`/features/${j.featureId}/phases/${j.phaseId}/tasks/${j.id}`:"/features";return c.jsxs(Ye,{to:N,className:"surface-card grid gap-1 px-4 py-3 transition hover:border-[var(--accent)] hover:bg-[var(--accent-soft)]",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2 truncate text-sm font-semibold text-[var(--text)]",children:[j.status==="in-progress"?c.jsx("span",{"aria-hidden":"true",className:"ap-progress-dot"}):null,c.jsxs("span",{className:"truncate",children:["T",TS(j.number)," — ",j.title]})]}),c.jsx(el,{status:j.status})]}),c.jsx("div",{className:"text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:j.phaseId})]},j.id)}):c.jsx("p",{className:"py-4 text-center text-sm text-[var(--text-muted)]",children:"No work items match the current filters."})})]})}function US(){const{features:n,phases:i,activeTasks:s}=_n(),{project:o}=Zr("root"),f=rn();qt("edit",()=>f("/project/edit"));const h=o.projectRoot||o.planRoot||o.name||"default";return c.jsxs("div",{className:"grid grid-cols-1 gap-8",children:[c.jsx(Vt,{className:"grid grid-cols-1 gap-4",children:c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-bold text-[var(--text)]",children:"Project Goal"}),o.goal?c.jsx(_t,{text:o.goal,className:"mt-2 max-w-4xl"}):c.jsx("p",{className:"mt-2 max-w-4xl text-sm text-[var(--text-muted)]",children:"Add a project goal to define the main objective."})]}),c.jsx(Ye,{to:"/project/edit",children:c.jsx(He,{type:"button",shortcut:"edit",children:"Edit project"})})]})}),c.jsx(SS,{project:o}),c.jsx(CS,{features:n,phases:i}),c.jsx(kS,{features:n,phases:i,activeTasks:s,projectStorageScope:h}),c.jsx(NS,{features:n,phases:i})]})}async function LS(){const[n,i]=await Promise.all([ox(),Uf()]);return{features:n,phases:i}}function $r(){return{active:0,planned:0,done:0,blocked:0,canceled:0}}function Eu(n){const i=[];return n.active&&i.push(`${n.active} active`),n.planned&&i.push(`${n.planned} planned`),n.done&&i.push(`${n.done} done`),n.blocked&&i.push(`${n.blocked} blocked`),n.canceled&&i.push(`${n.canceled} canceled`),i.join(" · ")}function HS(n){const i=$r();for(const s of n){if(s.status==="in-progress"||s.status==="discovery"){i.active+=1;continue}if(s.status==="planned"||s.status==="draft"){i.planned+=1;continue}if(s.status==="done"){i.done+=1;continue}if(s.status==="blocked"){i.blocked+=1;continue}s.status==="canceled"&&(i.canceled+=1)}return i}function gx(n){const i=$r();for(const s of n){if(s.status==="in-progress"){i.active+=1;continue}if(s.status==="planned"){i.planned+=1;continue}if(s.status==="done"){i.done+=1;continue}if(s.status==="blocked"){i.blocked+=1;continue}s.status==="canceled"&&(i.canceled+=1)}return i}function BS(n){const i=$r();for(const s of n){if(s.status==="in-progress"){i.active+=1;continue}if(s.status==="planned"){i.planned+=1;continue}if(s.status==="done"){i.done+=1;continue}if(s.status==="blocked"){i.blocked+=1;continue}s.status==="canceled"&&(i.canceled+=1)}return i}function qS({feature:n,phasesCount:i,tasksCount:s,phaseSummary:o,taskSummary:f,activity:d}){var B;const h=Mn(),v=Mn(),p=((B=h.formData)==null?void 0:B.get("status"))??n.status,b=h.state!=="idle",y=v.state!=="idle",j=Eu(o),N=Eu(f),A=n.description||(d?`${d.doneTasks}/${s} done · ${d.remainingTasks} left${d.blockedTasks?` · ${d.blockedTasks} blocked`:""}`:"");return c.jsxs("div",{className:"surface-card px-4 py-2",children:[c.jsxs("div",{className:"grid gap-2 xl:grid-cols-[minmax(0,1fr)_minmax(0,132px)_minmax(0,152px)_124px_44px_44px] xl:items-center",children:[c.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1 xl:contents",children:[c.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1 lg:flex-row lg:items-center lg:gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(On,{type:"feature",number:n.number}),c.jsx("span",{className:"shrink-0",children:c.jsx(el,{status:p})})]}),c.jsx(Ye,{to:`/features/${n.id}`,className:"entity-link--feature min-w-0 w-full break-words text-sm font-semibold underline-offset-4 hover:underline lg:w-auto lg:truncate",children:n.name})]}),c.jsxs("div",{className:"flex items-center gap-2 self-end xl:hidden",children:[c.jsx(Ye,{to:`/features/${n.id}/edit`,"aria-label":`Edit feature ${n.name}`,children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Ti,{className:"h-3.5 w-3.5"})})}),c.jsx(v.Form,{method:"post",action:`/features/${n.id}/delete`,onSubmit:k=>{window.confirm(`Delete feature “${n.name}”? This cannot be undone.`)||k.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:y||b,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete feature ${n.name}`,children:c.jsx(Di,{className:"h-4 w-4"})})})]})]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-muted)]",children:[c.jsxs("div",{className:"font-semibold text-[var(--text)]",children:[i," phases"]}),j?c.jsx("div",{className:"mt-0.5 break-words",children:j}):null]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-muted)]",children:[c.jsxs("div",{className:"font-semibold text-[var(--text)]",children:[s," tasks"]}),N?c.jsx("div",{className:"mt-0.5 break-words",children:N}):null]}),c.jsx(h.Form,{method:"post",action:`/features/${n.id}/status`,className:"w-full xl:w-auto",children:c.jsxs("div",{className:"relative",children:[c.jsx("select",{name:"status",value:p,disabled:b||y,"aria-busy":b,className:"field-control min-h-8 appearance-none py-1 pr-8 text-[11px]",onChange:k=>h.submit(k.currentTarget.form),children:Jr.map(k=>c.jsx("option",{value:k.value,children:k.label},k.value))}),c.jsx(An,{className:"pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-[var(--text-muted)]"})]})}),c.jsx(Ye,{to:`/features/${n.id}/edit`,"aria-label":`Edit feature ${n.name}`,className:"hidden xl:block",children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Ti,{className:"h-3.5 w-3.5"})})}),c.jsx(v.Form,{method:"post",action:`/features/${n.id}/delete`,className:"hidden xl:block",onSubmit:k=>{window.confirm(`Delete feature “${n.name}”? This cannot be undone.`)||k.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:y||b,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete feature ${n.name}`,children:c.jsx(Di,{className:"h-4 w-4"})})})]}),A?c.jsx("div",{className:"mt-1 min-w-0 break-words line-clamp-2 text-[11px] text-[var(--text-muted)]",children:A}):null]})}const $S={feature:{label:"Feature",Icon:Nu},phase:{label:"Phase",Icon:w1},task:{label:"Task",Icon:sx}};function YS({kind:n,label:i}){const{Icon:s,label:o}=$S[n];return c.jsxs("span",{className:`entity-badge entity-badge--${n}`,children:[c.jsx(s,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:i??o})]})}function Dl({className:n="",...i}){return c.jsx("input",{className:`field-control ${n}`,...i})}function Ir({className:n="",...i}){return c.jsx("select",{className:`field-control ${n}`,...i})}function Bf({query:n,status:i,statusOptions:s,placeholder:o,clearTo:f,resultsLabel:d}){const h=kf();return c.jsxs(xa,{method:"get",className:"surface-card grid gap-3 p-3 md:grid-cols-[minmax(0,1fr)_200px_auto_auto] md:items-end sm:p-4",children:[c.jsxs("div",{children:[c.jsx("label",{htmlFor:"list-filter-query",className:"mb-1 block text-xs font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Name"}),c.jsx(Dl,{id:"list-filter-query",name:"q",defaultValue:n,placeholder:o,className:"min-h-11 py-2.5",onChange:v=>h(v.currentTarget.form)})]}),c.jsxs("div",{children:[c.jsx("label",{htmlFor:"list-filter-status",className:"mb-1 block text-xs font-semibold uppercase tracking-[0.18em] text-[var(--text-subtle)]",children:"Status"}),c.jsxs("div",{className:"relative",children:[c.jsxs(Ir,{id:"list-filter-status",name:"status",defaultValue:i,className:"min-h-11 appearance-none py-2.5 pr-8",children:[c.jsx("option",{value:"",children:"All statuses"}),s.map(v=>c.jsx("option",{value:v.value,children:v.label},v.value))]}),c.jsx(An,{className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-[var(--text-muted)]"})]})]}),c.jsx(He,{type:"submit",variant:"secondary",className:"min-h-11",children:"Apply filters"}),c.jsx(Ye,{to:f,className:"inline-flex min-h-11 items-center justify-center rounded-[14px] px-3 text-sm font-semibold text-[var(--text-muted)] transition hover:bg-[var(--accent-soft)] hover:text-[var(--text)]",children:"Clear"}),c.jsx("div",{className:"text-sm text-[var(--text-muted)] md:col-span-4",children:d})]})}function qf(n,i){const s=n.trim().toLowerCase();return s?i.some(o=>o==null?void 0:o.toLowerCase().includes(s)):!0}function GS(n){const i=new Map,s=new Map,o=new Map,f=new Map,d=new Map;for(const h of n)h.featureId&&d.set(h.featureId,[...d.get(h.featureId)??[],h]);for(const[h,v]of d)i.set(h,v.length),s.set(h,v.reduce((x,p)=>x+p.tasks.length,0)),o.set(h,HS(v)),f.set(h,gx(v.flatMap(x=>x.tasks)));return{phasesByFeature:i,tasksByFeature:s,phaseSummaryByFeature:o,taskSummaryByFeature:f}}function VS(){var j,N;const{features:n,phases:i}=_n(),{phasesByFeature:s,tasksByFeature:o,phaseSummaryByFeature:f,taskSummaryByFeature:d}=GS(i),h=rn(),[v]=Of(),x=((j=v.get("q"))==null?void 0:j.trim())??"",p=((N=v.get("status"))==null?void 0:N.trim())??"",b=S.useCallback(()=>h("new"),[h]);qt("create",b);const y=S.useMemo(()=>n.filter(A=>(!p||A.status===p)&&qf(x,[A.name,A.id,A.description])),[n,x,p]);return c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Vt,{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[c.jsxs("div",{children:[c.jsx(YS,{kind:"feature",label:"Features"}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Filter by name or status, then inspect child phases and tasks directly from the rows."})]}),c.jsx(Ye,{to:"new",children:c.jsx(He,{type:"button",variant:"primary",shortcut:"create",children:"Create feature"})})]}),c.jsx(Bf,{query:x,status:p,statusOptions:Jr,placeholder:"Search feature name, id, or description",clearTo:"/features",resultsLabel:y.length===n.length?`${n.length} features`:`${y.length} of ${n.length} features`}),c.jsx("div",{className:"grid gap-3",children:y.length>0?y.map(A=>c.jsx(qS,{feature:A,phasesCount:s.get(A.id)??0,tasksCount:o.get(A.id)??0,phaseSummary:f.get(A.id)??$r(),taskSummary:d.get(A.id)??$r()},A.id)):c.jsx(Vt,{className:"p-4 text-sm text-[var(--text-muted)]",children:"No features match the current filters."})})]}),c.jsx(Kr,{})]})}async function XS({params:n}){const i=n.featureId;if(!i)throw new Response("featureId required",{status:400});const[s,o]=await Promise.all([Fr(i),Uf(i)]);return{feature:s,phases:o}}function QS({featureId:n,feature:i,phase:s}){var b;const o=Mn(),f=Mn(),h=((b=o.formData)==null?void 0:b.get("status"))??s.status,v=o.state!=="idle",x=f.state!=="idle",p=Eu(gx(s.tasks));return c.jsxs("div",{className:"surface-card px-4 py-2",children:[c.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(0,1fr)_minmax(0,150px)_124px_44px_44px] lg:items-center",children:[c.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1 lg:contents",children:[c.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1 lg:flex-row lg:items-center lg:gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(On,{type:"phase",number:s.number}),c.jsx(wu,{type:"phase",featureNum:i.number}),c.jsx("span",{className:"shrink-0",children:c.jsx(el,{status:h})})]}),c.jsx(Ye,{to:`/features/${n}/phases/${s.id}`,className:"entity-link--phase min-w-0 w-full break-words text-sm font-semibold underline-offset-4 hover:underline lg:w-auto lg:truncate",children:s.title})]}),c.jsxs("div",{className:"flex items-center gap-2 self-end lg:hidden",children:[c.jsx(Ye,{to:`/features/${n}/phases/${s.id}/edit`,"aria-label":`Edit phase ${s.title}`,children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Ti,{className:"h-3.5 w-3.5"})})}),c.jsx(f.Form,{method:"post",action:`/features/${n}/phases/${s.id}/delete`,onSubmit:y=>{window.confirm(`Delete phase “${s.title}”? This cannot be undone.`)||y.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:x||v,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete phase ${s.title}`,children:c.jsx(Di,{className:"h-4 w-4"})})})]})]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-muted)]",children:[c.jsxs("div",{className:"font-semibold text-[var(--text)]",children:[s.tasks.length," tasks"]}),p?c.jsx("div",{className:"mt-0.5 break-words",children:p}):null]}),c.jsx(o.Form,{method:"post",action:`/features/${n}/phases/${s.id}/status`,className:"w-full lg:w-auto",children:c.jsxs("div",{className:"relative",children:[c.jsx("select",{name:"status",value:h,disabled:v||x,"aria-busy":v,className:"field-control min-h-8 appearance-none py-1 pr-8 text-[11px]",onChange:y=>o.submit(y.currentTarget.form),children:Wr.map(y=>c.jsx("option",{value:y.value,children:y.label},y.value))}),c.jsx(An,{className:"pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-[var(--text-muted)]"})]})}),c.jsx(Ye,{to:`/features/${n}/phases/${s.id}/edit`,"aria-label":`Edit phase ${s.title}`,className:"hidden lg:block",children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Ti,{className:"h-3.5 w-3.5"})})}),c.jsx(f.Form,{method:"post",action:`/features/${n}/phases/${s.id}/delete`,className:"hidden lg:block",onSubmit:y=>{window.confirm(`Delete phase “${s.title}”? This cannot be undone.`)||y.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:x||v,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete phase ${s.title}`,children:c.jsx(Di,{className:"h-4 w-4"})})})]}),s.summary?c.jsx("div",{className:"mt-1 min-w-0 break-words line-clamp-2 text-[11px] text-[var(--text-muted)]",children:s.summary}):null]})}function $f({items:n,className:i=""}){return c.jsx("nav",{"aria-label":"Breadcrumb",className:`flex flex-wrap items-center gap-2 text-sm ${i}`,children:n.map((s,o)=>{const f=o===n.length-1,d=s.to&&!f?c.jsx(Ye,{to:s.to,className:"font-semibold text-[var(--accent)] hover:underline",children:s.label}):c.jsx("span",{className:f?"text-[var(--text)]":"text-[var(--text-muted)]",children:s.label});return c.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[o>0?c.jsx("span",{className:"text-[var(--text-subtle)]",children:"/"}):null,c.jsx("span",{className:"min-w-0 break-words",children:d})]},`${s.label}-${o}`)})})}function bt({className:n="",children:i,...s}){return c.jsx("div",{className:`surface-card p-4 ${n}`,...s,children:i})}function Yf({decisions:n}){return n.length===0?null:c.jsxs("details",{className:"group mt-4",children:[c.jsx("summary",{className:"flex cursor-pointer select-none items-center gap-2 font-semibold text-[var(--text)]",children:c.jsxs("span",{children:["Accepted decisions (",n.length,")"]})}),c.jsx("div",{className:"mt-2 grid gap-3",children:n.map(i=>c.jsxs("div",{className:"surface-card px-4 py-3",children:[c.jsx("p",{className:"text-sm font-semibold text-[var(--text)]",children:i.title}),i.decision?c.jsxs("div",{className:"mt-2 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Decision:"}),c.jsx(_t,{text:i.decision,className:"mt-1"})]}):null,i.rationale?c.jsxs("div",{className:"mt-1 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Rationale:"}),c.jsx(_t,{text:i.rationale,className:"mt-1"})]}):null,i.implementationNotes?c.jsxs("div",{className:"mt-1 text-sm text-[var(--text-muted)]",children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Implementation:"}),c.jsx(_t,{text:i.implementationNotes,className:"mt-1"})]}):null]},i.id))})]})}function ZS(n){return n.reduce((i,s)=>i+s.tasks.length,0)}function KS(n){let i=0,s=0,o=0,f=0;for(const d of n)for(const h of d.tasks)h.status==="in-progress"&&(i+=1),h.status==="done"&&(s+=1),h.status==="blocked"&&(o+=1),["done","canceled"].includes(h.status)||(f+=1);return{inProgress:i,done:s,blocked:o,remaining:f}}function FS(n){return n.find(i=>["in-progress","discovery","planned","draft"].includes(i.status))}function JS(){var B,k;const{feature:n,phases:i}=_n(),s=n.acceptedDecisions??[],o=ZS(i),f=KS(i),d=FS(i),[h]=Of(),v=((B=h.get("q"))==null?void 0:B.trim())??"",x=((k=h.get("status"))==null?void 0:k.trim())??"",p=S.useMemo(()=>i.filter(Z=>(!x||Z.status===x)&&qf(v,[Z.title,Z.id,Z.summary,Z.description])),[i,v,x]),b=rn(),y=S.useRef(null),j=S.useCallback(()=>b("edit"),[b]),N=S.useCallback(()=>b("phases/new"),[b]),A=S.useCallback(()=>{var Z;(Z=y.current)==null||Z.requestSubmit()},[]);return qt("edit",j),qt("create",N),qt("delete",A),c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Ye,{to:"/features",className:"inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] hover:underline",children:[c.jsx(zu,{className:"h-4 w-4"})," Back to features"]}),c.jsxs("div",{className:"min-w-0",children:[c.jsx($f,{items:[{label:"Features",to:"/features"},{label:n.name}]}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[c.jsx(_i,{id:Ai({featureNum:n.number}),children:c.jsx(zi,{featureNum:n.number})}),c.jsx(el,{status:n.status})]}),c.jsx("h2",{className:"mt-2 text-2xl font-black tracking-tight text-[var(--text)] min-w-0 break-words [overflow-wrap:anywhere] sm:text-3xl",children:n.name}),n.description?c.jsx(_t,{text:n.description,className:"plan-description mt-3 max-w-4xl"}):null,c.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[c.jsx(Ye,{to:"edit",children:c.jsx(He,{type:"button",shortcut:"edit",children:"Edit feature"})}),c.jsx(xa,{ref:y,method:"post",action:`/features/${n.id}/delete`,className:"inline-flex",onSubmit:Z=>{window.confirm(`Delete feature "${n.name}"?`)||Z.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",shortcut:"delete",children:"Delete feature"})})]})]}),c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Current phase"}),c.jsx("p",{className:"mt-2 text-sm font-semibold text-[var(--text)] break-words",children:(d==null?void 0:d.title)||"No active phase"})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Phases"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:i.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Tasks"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:o})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Window"}),c.jsxs("p",{className:"mt-2 text-sm font-semibold text-[var(--text)]",children:[n.startDate||"Not set"," → ",n.endDate||"Not set"]})]})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"In progress"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.inProgress})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Remaining"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.remaining})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Done"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.done})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Blocked"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.blocked})]})]}),n.workDone||n.workRemaining?c.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[n.workDone?c.jsxs("div",{children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Work done:"}),c.jsx(_t,{text:n.workDone,className:"mt-2"})]}):null,n.workRemaining?c.jsxs("div",{children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Work remaining:"}),c.jsx(_t,{text:n.workRemaining,className:"mt-2"})]}):null]}):null,s.length>0?c.jsx(Yf,{decisions:s}):null]}),c.jsxs(Vt,{className:"grid gap-5",children:[c.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[c.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[c.jsx(On,{type:"phase",number:0}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Filter this feature's phases by name or status."})]}),c.jsx(Ye,{to:"phases/new",children:c.jsx(He,{type:"button",variant:"primary",shortcut:"create",children:"Create phase"})})]}),c.jsx(Bf,{query:v,status:x,statusOptions:Wr,placeholder:"Search phase title, id, or summary",clearTo:`/features/${n.id}`,resultsLabel:p.length===i.length?`${i.length} phases`:`${p.length} of ${i.length} phases`}),c.jsx("div",{className:"grid gap-3",children:p.length>0?p.map(Z=>c.jsx(QS,{featureId:n.id,feature:n,phase:Z},Z.id)):c.jsx(Vt,{className:"p-4 text-sm text-[var(--text-muted)]",children:"No phases match the current filters."})})]}),c.jsx(Kr,{})]})}async function WS({params:n}){const{featureId:i,phaseId:s}=n;if(!i||!s)throw new Response("featureId and phaseId required",{status:400});const[o,f]=await Promise.all([Fr(i),Uu(s)]);return{feature:o,phase:f}}function vv(n){try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(n))}catch{return n}}function IS({featureId:n,phaseId:i,task:s}){var b;const o=Mn(),f=Mn(),h=((b=o.formData)==null?void 0:b.get("status"))??s.status,v=o.state!=="idle",x=f.state!=="idle",p=Eu(BS(s.subtasks));return c.jsxs("div",{className:"surface-card px-4 py-2",children:[c.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(0,1fr)_minmax(0,168px)_124px_44px_44px] lg:items-center",children:[c.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1 lg:contents",children:[c.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-1 lg:flex-row lg:items-center lg:gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(On,{type:"task",number:s.number}),c.jsx("span",{className:"shrink-0",children:c.jsx(el,{status:h})})]}),c.jsx(Ye,{to:`/features/${n}/phases/${i}/tasks/${s.id}`,className:"entity-link--task min-w-0 w-full break-words text-sm font-semibold underline-offset-4 hover:underline lg:w-auto lg:truncate",children:s.title})]}),c.jsxs("div",{className:"flex items-center gap-2 self-end lg:hidden",children:[c.jsx(Ye,{to:`/features/${n}/phases/${i}/tasks/${s.id}/edit`,"aria-label":`Edit task ${s.title}`,children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Ti,{className:"h-3.5 w-3.5"})})}),c.jsx(f.Form,{method:"post",action:`/features/${n}/phases/${i}/tasks/${s.id}/delete`,onSubmit:y=>{window.confirm(`Delete task “${s.title}”? This cannot be undone.`)||y.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:x||v,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete task ${s.title}`,children:c.jsx(Di,{className:"h-4 w-4"})})})]})]}),c.jsxs("div",{className:"text-[11px] text-[var(--text-muted)]",children:[c.jsxs("div",{className:"font-semibold text-[var(--text)]",children:[s.subtasks.length," subtasks · ",s.checklist.length," checklist"]}),p?c.jsx("div",{className:"mt-0.5 break-words",children:p}):c.jsx("div",{className:"mt-0.5 break-words",children:"No subtask statuses yet"})]}),c.jsx(o.Form,{method:"post",action:`/features/${n}/phases/${i}/tasks/${s.id}/status`,className:"w-full lg:w-auto",children:c.jsxs("div",{className:"relative",children:[c.jsx("select",{name:"status",value:h,disabled:v||x,"aria-busy":v,className:"field-control min-h-8 appearance-none py-1 pr-8 text-[11px]",onChange:y=>o.submit(y.currentTarget.form),children:Oi.map(y=>c.jsx("option",{value:y.value,children:y.label},y.value))}),c.jsx(An,{className:"pointer-events-none absolute right-2.5 top-1/2 h-3 w-3 -translate-y-1/2 text-[var(--text-muted)]"})]})}),c.jsx(Ye,{to:`/features/${n}/phases/${i}/tasks/${s.id}/edit`,"aria-label":`Edit task ${s.title}`,className:"hidden lg:block",children:c.jsx(He,{type:"button",variant:"secondary",className:"min-h-8 w-8 rounded-[10px] px-0 text-[var(--text-muted)] hover:text-[var(--text)]",children:c.jsx(Ti,{className:"h-3.5 w-3.5"})})}),c.jsx(f.Form,{method:"post",action:`/features/${n}/phases/${i}/tasks/${s.id}/delete`,className:"hidden lg:block",onSubmit:y=>{window.confirm(`Delete task “${s.title}”? This cannot be undone.`)||y.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",disabled:x||v,className:"min-h-8 w-8 rounded-[10px] px-0","aria-label":`Delete task ${s.title}`,children:c.jsx(Di,{className:"h-4 w-4"})})})]}),c.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-[var(--text-subtle)]",children:[s.startedAt?c.jsxs("span",{children:["Started ",vv(s.startedAt)]}):null,s.completedAt?c.jsxs("span",{children:["Completed ",vv(s.completedAt)]}):null]}),s.description?c.jsx("div",{className:"mt-1 min-w-0 break-words line-clamp-2 text-[11px] text-[var(--text-muted)]",children:s.description}):null]})}function PS(n){let i=0,s=0,o=0,f=0;for(const d of n.tasks)d.status==="in-progress"&&(i+=1),d.status==="done"&&(s+=1),d.status==="blocked"&&(o+=1),["done","canceled"].includes(d.status)||(f+=1);return{inProgress:i,done:s,blocked:o,remaining:f}}function e2(){var A,B;const{feature:n,phase:i}=_n(),s=i.decisions??[],o=i.acceptedDecisions??[],f=PS(i),[d]=Of(),h=((A=d.get("q"))==null?void 0:A.trim())??"",v=((B=d.get("status"))==null?void 0:B.trim())??"",x=S.useMemo(()=>i.tasks.filter(k=>(!v||k.status===v)&&qf(h,[k.title,k.id,k.description,k.shortName])),[i.tasks,h,v]),p=rn(),b=S.useRef(null),y=S.useCallback(()=>p("edit"),[p]),j=S.useCallback(()=>p("tasks/new"),[p]),N=S.useCallback(()=>{var k;(k=b.current)==null||k.requestSubmit()},[]);return qt("edit",y),qt("create",j),qt("delete",N),c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Ye,{to:`/features/${n.id}`,className:"inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] hover:underline",children:[c.jsx(zu,{className:"h-4 w-4"})," Back to feature"]}),c.jsxs("div",{className:"min-w-0",children:[c.jsx($f,{items:[{label:"Features",to:"/features"},{label:n.name,to:`/features/${n.id}`},{label:i.title}]}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[c.jsx(_i,{id:Ai({featureNum:n.number,phaseNum:i.number}),children:c.jsx(zi,{featureNum:n.number,phaseNum:i.number})}),c.jsx(el,{status:i.status})]}),c.jsx("h2",{className:"mt-2 text-2xl font-black tracking-tight text-[var(--text)] min-w-0 break-words [overflow-wrap:anywhere] sm:text-3xl",children:i.title}),i.summary?c.jsx(_t,{text:i.summary,className:"mt-3 max-w-4xl"}):null,c.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[c.jsx(Ye,{to:"edit",children:c.jsx(He,{type:"button",shortcut:"edit",children:"Edit phase"})}),c.jsx(Ye,{to:"tasks/new",children:c.jsx(He,{type:"button",variant:"primary",shortcut:"create",children:"Create task"})}),c.jsx(xa,{ref:b,method:"post",action:`/features/${n.id}/phases/${i.id}/delete`,className:"inline-flex",onSubmit:k=>{window.confirm(`Delete phase "${i.title}"?`)||k.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",shortcut:"delete",children:"Delete phase"})})]})]}),c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Tasks"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:i.tasks.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"In progress"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.inProgress})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Remaining"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.remaining})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Done"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.done})]})]}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Blocked"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:f.blocked})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Goals"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:i.goals.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Dependencies"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:i.dependencies.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Completion criteria"}),c.jsx("p",{className:"mt-2 text-2xl font-black text-[var(--text)]",children:i.completionCriteria.length})]})]}),i.description?c.jsxs("div",{children:[c.jsx("span",{className:"font-semibold text-[var(--text)]",children:"Description:"}),c.jsx(_t,{text:i.description,className:"plan-description mt-2"})]}):null,s.length>0?c.jsxs("details",{className:"group mt-4",children:[c.jsx("summary",{className:"flex items-center gap-2 cursor-pointer font-semibold text-[var(--text)] select-none",children:c.jsxs("span",{children:["Decisions (",s.length,")"]})}),c.jsx("div",{className:"mt-2 ml-4 space-y-2 border-l-2 border-[var(--border)] pl-4",children:s.map((k,Z)=>c.jsx("div",{className:"text-sm text-[var(--text-muted)]",children:c.jsx(_t,{text:k})},Z))})]}):null,o.length>0?c.jsx(Yf,{decisions:o}):null]}),c.jsxs(Vt,{className:"grid gap-5",children:[c.jsxs("div",{children:[c.jsx(On,{type:"task",number:0}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Filter this phase's tasks by name or status."})]}),c.jsx(Bf,{query:h,status:v,statusOptions:Oi,placeholder:"Search task title, id, or description",clearTo:`/features/${n.id}/phases/${i.id}`,resultsLabel:x.length===i.tasks.length?`${i.tasks.length} tasks`:`${x.length} of ${i.tasks.length} tasks`}),c.jsx("div",{className:"grid gap-3",children:x.length>0?x.map(k=>c.jsx(IS,{featureId:n.id,phaseId:i.id,task:k},k.id)):c.jsx(Vt,{className:"p-4 text-sm text-[var(--text-muted)]",children:"No tasks match the current filters."})})]}),c.jsx(Kr,{})]})}async function t2({params:n}){const{featureId:i,phaseId:s,taskId:o}=n;if(!i||!s||!o)throw new Response("featureId, phaseId and taskId required",{status:400});const[f,d,h]=await Promise.all([Fr(i),Uu(s),Lu(o)]);return{feature:f,phase:d,task:h}}function df(n){try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(n))}catch{return n}}function a2({featureId:n,phaseId:i,taskId:s,item:o}){const f=Mn(),d=f.formData?f.formData.get("checked")==="true":o.checked,h=f.state!=="idle";return c.jsxs("div",{className:"surface-card flex items-start gap-3 px-4 py-3",children:[c.jsx("input",{type:"checkbox",checked:d,onChange:()=>f.submit({checked:o.checked?"false":"true"},{method:"post",action:`/features/${n}/phases/${i}/tasks/${s}/checklist/${o.id}/toggle`}),disabled:h,className:"mt-0.5 h-4 w-4 shrink-0 accent-[var(--accent)]","aria-label":`Toggle checklist item ${o.title}`}),c.jsx("div",{className:"min-w-0",children:c.jsx("p",{className:`text-sm ${d?"text-[var(--text-muted)] line-through":"font-medium text-[var(--text)]"}`,children:o.title})})]})}function l2(){var b,y,j;const{feature:n,phase:i,task:s}=_n(),o=s.decisions??[],f=s.acceptedDecisions??[],d=s.checklist??[],h=rn(),v=S.useRef(null),x=S.useCallback(()=>h("edit"),[h]),p=S.useCallback(()=>{var N;(N=v.current)==null||N.requestSubmit()},[]);return qt("edit",x),qt("delete",p),c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Ye,{to:`/features/${n.id}/phases/${i.id}`,className:"inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] hover:underline",children:[c.jsx(zu,{className:"h-4 w-4"})," Back to phase"]}),c.jsxs("div",{className:"min-w-0",children:[c.jsx($f,{items:[{label:"Features",to:"/features"},{label:n.name,to:`/features/${n.id}`},{label:i.title,to:`/features/${n.id}/phases/${i.id}`},{label:s.title}]}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[c.jsx(_i,{id:Ai({featureNum:n.number,phaseNum:i.number,taskNum:s.number}),children:c.jsx(zi,{featureNum:n.number,phaseNum:i.number,taskNum:s.number})}),c.jsx(el,{status:s.status})]}),c.jsx("h2",{className:"mt-2 text-2xl font-black tracking-tight text-[var(--text)] min-w-0 break-words [overflow-wrap:anywhere] sm:text-3xl",children:s.title}),c.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[c.jsx(Ye,{to:"edit",children:c.jsx(He,{type:"button",shortcut:"edit",children:"Edit task"})}),c.jsx(xa,{ref:v,method:"post",action:`/features/${n.id}/phases/${i.id}/tasks/${s.id}/delete`,className:"inline-flex",onSubmit:N=>{window.confirm(`Delete task "${s.title}"?`)||N.preventDefault()},children:c.jsx(He,{type:"submit",variant:"danger",shortcut:"delete",children:"Delete task"})})]})]}),c.jsxs(Vt,{className:"grid gap-4",children:[s.description?c.jsx(_t,{text:s.description,className:"plan-description"}):null,s.notes?c.jsxs("details",{className:"group mt-4 border border-[var(--border)] rounded-lg overflow-hidden",children:[c.jsxs("summary",{className:"flex items-center justify-between p-3 cursor-pointer font-semibold text-[var(--text)] bg-[var(--surface-elevated)] hover:bg-[var(--surface-strong)] transition-colors select-none",children:[c.jsx("div",{className:"flex items-center gap-2",children:c.jsx("span",{className:"text-sm",children:"Notes"})}),c.jsx(An,{className:"h-4 w-4 transition-transform group-open:rotate-180 text-[var(--text-muted)]"})]}),c.jsx("div",{className:"p-3 border-t border-[var(--border)] bg-[var(--surface)]",children:c.jsx(_t,{text:s.notes})})]}):c.jsx("p",{className:"mt-4 text-sm text-[var(--text-muted)]",children:"No notes"}),c.jsxs("details",{className:"group mt-4 border border-[var(--border)] rounded-lg overflow-hidden",open:s.statusLog&&s.statusLog.length>0,children:[c.jsxs("summary",{className:"flex items-center justify-between p-3 cursor-pointer font-semibold text-[var(--text)] bg-[var(--surface-elevated)] hover:bg-[var(--surface-strong)] transition-colors select-none",children:[c.jsx("div",{className:"flex items-center gap-2",children:c.jsxs("span",{className:"text-sm",children:["Status History (",((b=s.statusLog)==null?void 0:b.length)??0,")"]})}),c.jsx(An,{className:"h-4 w-4 transition-transform group-open:rotate-180 text-[var(--text-muted)]"})]}),c.jsx("div",{className:"p-3 border-t border-[var(--border)] bg-[var(--surface)]",children:s.statusLog&&s.statusLog.length>0?c.jsx("div",{className:"mt-3 ml-2 border-l-2 border-[var(--border)] pl-4 space-y-3",children:[...s.statusLog].reverse().map((N,A)=>c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute -left-[21px] top-1.5 h-2.5 w-2.5 rounded-full border-2 border-[var(--border)] bg-[var(--surface)]"}),c.jsxs("div",{className:"flex flex-wrap items-baseline gap-2",children:[c.jsx("span",{className:"text-xs font-bold text-[var(--text-muted)]",children:df(N.date)}),c.jsxs("span",{className:`text-xs font-bold px-1.5 py-0.5 rounded-full ${N.toStatus==="done"?"bg-[color:color-mix(in_srgb,var(--color-status-done)_16%,transparent)] text-[var(--color-status-done)]":N.toStatus==="blocked"?"bg-[color:color-mix(in_srgb,var(--color-status-blocked)_16%,transparent)] text-[var(--color-status-blocked)]":N.toStatus==="canceled"?"bg-[color:color-mix(in_srgb,var(--color-status-canceled)_16%,transparent)] text-[var(--color-status-canceled)]":N.toStatus==="in-progress"?"bg-[color:color-mix(in_srgb,var(--color-status-in-progress)_16%,transparent)] text-[var(--color-status-in-progress)]":"bg-[color:color-mix(in_srgb,var(--color-status-planned)_16%,transparent)] text-[var(--color-status-planned)]"}`,children:[N.fromStatus," → ",N.toStatus]})]}),N.title&&N.title!==`${N.fromStatus} → ${N.toStatus}`?c.jsx("p",{className:"mt-1 text-sm font-medium text-[var(--text)]",children:N.title}):null,N.description?c.jsx("p",{className:"mt-0.5 text-sm text-[var(--text-muted)]",children:N.description}):null]},N.id))}):c.jsx("p",{className:"text-sm text-[var(--text-muted)] italic",children:"No status changes recorded."})})]}),o.length>0?c.jsxs("details",{className:"group mt-4",children:[c.jsx("summary",{className:"flex items-center gap-2 cursor-pointer font-semibold text-[var(--text)] select-none",children:c.jsxs("span",{children:["Decisions (",o.length,")"]})}),c.jsx("div",{className:"mt-2 ml-4 space-y-2 border-l-2 border-[var(--border)] pl-4",children:o.map((N,A)=>c.jsx("div",{className:"text-sm text-[var(--text-muted)]",children:c.jsx(_t,{text:N})},A))})]}):null,f.length>0?c.jsx(Yf,{decisions:f}):null,c.jsxs("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-5",children:[c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Checklist items"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:d.length})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Subtasks"}),c.jsx("p",{className:"mt-2 text-3xl font-black text-[var(--text)]",children:((y=s.subtasks)==null?void 0:y.length)??0})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Started"}),c.jsx("p",{className:"mt-2 text-sm font-semibold text-[var(--text)] break-words",children:s.startedAt?df(s.startedAt):"—"})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Completed"}),c.jsx("p",{className:"mt-2 text-sm font-semibold text-[var(--text)] break-words",children:s.completedAt?df(s.completedAt):"—"})]}),c.jsxs(bt,{children:[c.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.22em] text-[var(--text-subtle)]",children:"Phase"}),c.jsx("p",{className:"mt-2 text-sm font-semibold text-[var(--text)] break-words",children:i.title})]})]}),d.length?c.jsxs("div",{className:"grid gap-3",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-bold text-[var(--text)]",children:"Checklist"}),c.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:"Always visible and linked to the real task checklist."})]}),c.jsx("div",{className:"grid gap-2",children:d.map(N=>c.jsx(a2,{featureId:n.id,phaseId:i.id,taskId:s.id,item:N},N.id))})]}):null,(j=s.subtasks)!=null&&j.length?c.jsxs("details",{className:"surface-card px-4 py-4",children:[c.jsx("summary",{className:"cursor-pointer list-none text-sm font-bold text-[var(--text)]",children:"Subtasks"}),c.jsx("div",{className:"mt-3 grid gap-2",children:s.subtasks.map(N=>c.jsxs("div",{className:"surface-card flex items-center justify-between gap-4 px-4 py-3",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm font-semibold text-[var(--text)]",children:N.title}),c.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:N.id})]}),c.jsx(el,{status:N.status})]},N.id))})]}):null]}),c.jsx(Kr,{})]})}const n2=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(",");function ki({title:n,description:i,children:s}){const o=rn(),f=S.useRef(null),d=S.useRef(null);return S.useEffect(()=>{var p;const h=f.current;if(!h)return;const v=document.activeElement;(p=d.current)==null||p.focus();const x=b=>{if(b.key==="Escape"){b.preventDefault(),o(-1);return}if(b.key!=="Tab")return;const y=Array.from(h.querySelectorAll(n2)).filter(B=>B.offsetParent!==null);if(y.length===0){b.preventDefault(),h.focus();return}const j=y[0],N=y[y.length-1],A=document.activeElement;b.shiftKey?(A===j||!h.contains(A))&&(b.preventDefault(),N.focus()):A===N&&(b.preventDefault(),j.focus())};return window.addEventListener("keydown",x),()=>{var b;window.removeEventListener("keydown",x),(b=v==null?void 0:v.focus)==null||b.call(v)}},[o]),c.jsxs("div",{className:"fixed inset-0 z-50 overflow-y-auto p-4 md:p-6",children:[c.jsx("button",{type:"button",className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:()=>o(-1),"aria-label":"Close modal",tabIndex:-1}),c.jsx("div",{className:"relative z-10 flex min-h-full items-start justify-center",children:c.jsxs("div",{ref:f,role:"dialog","aria-modal":"true","aria-label":n,tabIndex:-1,className:"surface-panel flex max-h-[calc(100vh-2rem)] w-full max-w-2xl flex-col overflow-hidden p-6 outline-none md:max-h-[calc(100vh-3rem)] md:p-8",children:[c.jsxs("div",{className:"mb-6 flex shrink-0 items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-xl font-black tracking-tight text-[var(--text)]",children:n}),i?c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:i}):null]}),c.jsx("button",{ref:d,type:"button",onClick:()=>o(-1),className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[14px] border border-[var(--border-strong)] text-[var(--text-muted)] transition hover:text-[var(--text)]","aria-label":"Close modal",children:c.jsx(U1,{className:"h-4 w-4"})})]}),c.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:s})]})})]})}function Ui({className:n="",children:i,...s}){return c.jsx("div",{className:`sticky bottom-0 mt-2 flex justify-end gap-3 border-t border-[var(--border)] bg-[var(--surface)] px-1 pt-4 pb-1 backdrop-blur-xl ${n}`,...s,children:i})}function Je({label:n,children:i}){return c.jsxs("label",{className:"grid gap-2",children:[c.jsx("span",{className:"text-sm font-semibold text-[var(--text-muted)]",children:n}),i]})}function zt(n){return c.jsx("textarea",{className:"field-control field-textarea",...n})}function i2(){const i=sn().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var f;return(f=s.current)==null?void 0:f.requestSubmit()},[]);return qt("submit",o,{allowInEditable:!0}),c.jsx(ki,{title:"Create feature",description:"Top-level container for phases and tasks.",children:c.jsxs(xa,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Je,{label:"Feature name",children:c.jsx(Dl,{name:"name",placeholder:"Products page implementation",required:!0})}),c.jsx(Je,{label:"Description",children:c.jsx(zt,{name:"description",placeholder:"Short context for the feature"})}),c.jsx(Ui,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:i,shortcut:"submit",children:i?"Creating…":"Create feature"})})]})})}function r2(){const i=sn().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var h;return(h=s.current)==null?void 0:h.requestSubmit()},[]);qt("submit",o,{allowInEditable:!0});const d=Zr("feature-detail").feature;return c.jsx(ki,{title:"Edit feature",description:"Update metadata, planning notes and timeline.",children:c.jsxs(xa,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Je,{label:"Name",children:c.jsx(Dl,{name:"name",defaultValue:d.name,required:!0})}),c.jsx(Je,{label:"Description",children:c.jsx(zt,{name:"description",defaultValue:d.description})}),c.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[c.jsx(Je,{label:"Start date",children:c.jsx(Dl,{type:"date",name:"startDate",defaultValue:d.startDate})}),c.jsx(Je,{label:"End date",children:c.jsx(Dl,{type:"date",name:"endDate",defaultValue:d.endDate})})]}),c.jsx(Je,{label:"Status",children:c.jsx(Ir,{name:"status",defaultValue:d.status,children:Jr.map(h=>c.jsx("option",{value:h.value,children:h.label},h.value))})}),c.jsx(Je,{label:"Work done",children:c.jsx(zt,{name:"workDone",defaultValue:d.workDone})}),c.jsx(Je,{label:"Work remaining",children:c.jsx(zt,{name:"workRemaining",defaultValue:d.workRemaining})}),c.jsx(Ui,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:i,shortcut:"submit",children:i?"Saving…":"Save feature"})})]})})}function s2(){const i=sn().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var f;return(f=s.current)==null?void 0:f.requestSubmit()},[]);return qt("submit",o,{allowInEditable:!0}),c.jsx(ki,{title:"Create phase",description:"A phase belongs to the current feature.",children:c.jsxs(xa,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Je,{label:"Phase title",children:c.jsx(Dl,{name:"title",placeholder:"API creation",required:!0})}),c.jsx(Je,{label:"Summary",children:c.jsx(zt,{name:"summary",placeholder:"Brief phase summary"})}),c.jsx(Je,{label:"Description",children:c.jsx(zt,{name:"description",placeholder:"Initial implementation notes"})}),c.jsx(Ui,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:i,shortcut:"submit",children:i?"Creating…":"Create phase"})})]})})}function bi(n){return n.join(`
189
+ `)}function u2(){const i=sn().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var h;return(h=s.current)==null?void 0:h.requestSubmit()},[]);qt("submit",o,{allowInEditable:!0});const d=Zr("phase-detail").phase;return c.jsx(ki,{title:"Edit phase",description:"Update scope, constraints and delivery criteria.",children:c.jsxs(xa,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Je,{label:"Title",children:c.jsx(Dl,{name:"title",defaultValue:d.title,required:!0})}),c.jsx(Je,{label:"Status",children:c.jsx(Ir,{name:"status",defaultValue:d.status,children:Wr.map(h=>c.jsx("option",{value:h.value,children:h.label},h.value))})}),c.jsx(Je,{label:"Summary",children:c.jsx(zt,{name:"summary",defaultValue:d.summary})}),c.jsx(Je,{label:"Description",children:c.jsx(zt,{name:"description",defaultValue:d.description})}),c.jsx(Je,{label:"Goals (one per line)",children:c.jsx(zt,{name:"goals",defaultValue:bi(d.goals)})}),c.jsx(Je,{label:"Non-goals (one per line)",children:c.jsx(zt,{name:"nonGoals",defaultValue:bi(d.nonGoals)})}),c.jsx(Je,{label:"Dependencies (one per line)",children:c.jsx(zt,{name:"dependencies",defaultValue:bi(d.dependencies)})}),c.jsx(Je,{label:"Risks (one per line)",children:c.jsx(zt,{name:"risks",defaultValue:bi(d.risks)})}),c.jsx(Je,{label:"Open questions (one per line)",children:c.jsx(zt,{name:"openQuestions",defaultValue:bi(d.openQuestions)})}),c.jsx(Je,{label:"Completion criteria (one per line)",children:c.jsx(zt,{name:"completionCriteria",defaultValue:bi(d.completionCriteria)})}),c.jsx(Ui,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:i,shortcut:"submit",children:i?"Saving…":"Save phase"})})]})})}function c2(){const i=sn().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var f;return(f=s.current)==null?void 0:f.requestSubmit()},[]);return qt("submit",o,{allowInEditable:!0}),c.jsx(ki,{title:"Create task",description:"A task belongs to the current phase.",children:c.jsxs(xa,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Je,{label:"Task title",children:c.jsx(Dl,{name:"title",placeholder:"Custom fetcher integration",required:!0})}),c.jsx(Je,{label:"Description",children:c.jsx(zt,{name:"description",placeholder:"Initial task context"})}),c.jsx(Je,{label:"Status",children:c.jsx(Ir,{name:"status",defaultValue:"planned",children:Oi.map(f=>c.jsx("option",{value:f.value,children:f.label},f.value))})}),c.jsx(Ui,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:i,shortcut:"submit",children:i?"Creating…":"Create task"})})]})})}function o2(n){return n.map(i=>i.title).join(`
190
+ `)}function f2(){const i=sn().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var h;return(h=s.current)==null?void 0:h.requestSubmit()},[]);qt("submit",o,{allowInEditable:!0});const d=Zr("task-detail").task;return c.jsx(ki,{title:"Edit task",description:"Update execution details and checklist items.",children:c.jsxs(xa,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Je,{label:"Title",children:c.jsx(Dl,{name:"title",defaultValue:d.title,required:!0})}),c.jsx(Je,{label:"Status",children:c.jsx(Ir,{name:"status",defaultValue:d.status,children:Oi.map(h=>c.jsx("option",{value:h.value,children:h.label},h.value))})}),c.jsx(Je,{label:"Description",children:c.jsx(zt,{name:"description",defaultValue:d.description})}),c.jsx(Je,{label:"Checklist (one per line)",children:c.jsx(zt,{name:"checklist",defaultValue:o2(d.checklist)})}),c.jsx(Ui,{children:c.jsx(He,{type:"submit",variant:"primary",disabled:i,shortcut:"submit",children:i?"Saving…":"Save task"})})]})})}function d2(){const i=sn().state!=="idle",s=S.useRef(null),o=S.useCallback(()=>{var d;return(d=s.current)==null?void 0:d.requestSubmit()},[]);qt("submit",o,{allowInEditable:!0});const{project:f}=Zr("root");return c.jsxs("div",{className:"grid gap-8",children:[c.jsxs(Ye,{to:"/",className:"inline-flex items-center gap-2 text-sm font-semibold text-[var(--accent)] hover:underline",children:[c.jsx(zu,{className:"h-4 w-4"})," Back to dashboard"]}),c.jsxs(Vt,{className:"grid gap-5",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-xl font-black tracking-tight text-[var(--text)]",children:"Edit project goal"}),c.jsx("p",{className:"mt-2 text-sm text-[var(--text-muted)]",children:"Define the main objective of the project. This long-form goal appears in the Project Goal card on the dashboard."})]}),c.jsxs(xa,{ref:s,method:"post",className:"grid gap-4",children:[c.jsx(Je,{label:"Project goal",children:c.jsx(zt,{name:"goal",defaultValue:f.goal,placeholder:"Define the main objective, success criteria, and overall direction of the project"})}),c.jsxs("div",{className:"flex justify-end gap-3",children:[c.jsx(Ye,{to:"/",children:c.jsx(He,{type:"button",variant:"ghost",children:"Cancel"})}),c.jsx(He,{type:"submit",variant:"primary",disabled:i,shortcut:"submit",children:i?"Saving…":"Save goal"})]})]})]})]})}function va(n,i){const s=n.get(i);if(typeof s!="string"||s.trim()==="")throw new Response(`Missing field: ${i}`,{status:400});return s.trim()}function It(n,i){const s=n.get(i);return typeof s=="string"?s.trim():""}function Dn(n,i){return It(n,i).split(`
191
+ `).map(s=>s.trim()).filter(Boolean)}function ht(n,i){const s=n[i];if(!s)throw new Response(`Missing route param: ${i}`,{status:400});return s}async function m2({request:n}){const i=await n.formData();return await Y1({name:va(i,"name"),description:It(i,"description")}),al("/features")}async function h2({request:n,params:i}){const s=ht(i,"featureId"),o=await Fr(s),f=await n.formData();return await fx({...o,name:va(f,"name"),description:It(f,"description"),startDate:It(f,"startDate"),endDate:It(f,"endDate"),status:va(f,"status"),workDone:It(f,"workDone"),workRemaining:It(f,"workRemaining")}),al(`/features/${s}`)}async function p2({params:n}){return await G1(ht(n,"featureId")),al("/features")}async function v2({request:n,params:i}){const s=ht(i,"featureId"),o=await Fr(s),f=await n.formData();return await fx({...o,status:va(f,"status")}),null}async function x2({request:n,params:i}){const s=ht(i,"featureId"),o=await n.formData();return await V1({featureId:s,title:va(o,"title"),summary:It(o,"summary"),description:It(o,"description")}),al(`/features/${s}`)}async function g2({request:n,params:i}){const s=ht(i,"featureId"),o=ht(i,"phaseId"),f=await Uu(o),d=await n.formData();return await dx({...f,title:va(d,"title"),status:va(d,"status"),summary:It(d,"summary"),description:It(d,"description"),goals:Dn(d,"goals"),nonGoals:Dn(d,"nonGoals"),dependencies:Dn(d,"dependencies"),risks:Dn(d,"risks"),openQuestions:Dn(d,"openQuestions"),completionCriteria:Dn(d,"completionCriteria")}),al(`/features/${s}/phases/${o}`)}async function y2({params:n}){const i=ht(n,"featureId"),s=ht(n,"phaseId");return await X1(s),al(`/features/${i}`)}async function b2({request:n,params:i}){const s=ht(i,"phaseId"),o=await Uu(s),f=await n.formData();return await dx({...o,status:va(f,"status")}),null}async function S2({request:n,params:i}){const s=ht(i,"featureId"),o=ht(i,"phaseId"),f=await n.formData();return await Q1(o,{title:va(f,"title"),description:It(f,"description"),status:It(f,"status")||"planned"}),al(`/features/${s}/phases/${o}`)}function j2(n,i){const s=new Map(n.map(f=>[f.id,f])),o=new Map(n.map(f=>[f.title.trim().toLowerCase(),f]));return i.map((f,d)=>{var x;const h=f.trim().toLowerCase(),v=s.get(((x=n[d])==null?void 0:x.id)??"")??o.get(h);return v?{...v,title:f.trim()}:{id:`check-${d+1}-${h.replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"item"}`,title:f.trim(),checked:!1}})}async function N2({request:n,params:i}){const s=ht(i,"featureId"),o=ht(i,"phaseId"),f=ht(i,"taskId"),d=await Lu(f),h=await n.formData();return await Lf({...d,phaseId:o,title:va(h,"title"),status:va(h,"status"),description:It(h,"description"),checklist:j2(d.checklist,Dn(h,"checklist"))}),al(`/features/${s}/phases/${o}/tasks/${f}`)}async function w2({params:n}){const i=ht(n,"featureId"),s=ht(n,"phaseId"),o=ht(n,"taskId");return await Z1(o),al(`/features/${i}/phases/${s}`)}async function E2({request:n,params:i}){const s=ht(i,"phaseId"),o=ht(i,"taskId"),f=await Lu(o),d=await n.formData();return await Lf({...f,phaseId:s,status:va(d,"status")}),null}async function R2({request:n}){const i=await cx(),s=await n.formData();return await q1({...i,goal:It(s,"goal")}),al("/")}function xv(n){try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(n))}catch{return n}}async function T2(){return hx()}function D2(){const n=_n();return c.jsxs(Vt,{className:"grid gap-4",children:[c.jsxs("div",{children:[c.jsx("h2",{className:"text-lg font-bold text-[var(--text)]",children:"Handoff"}),c.jsxs("p",{className:"text-sm text-[var(--text-muted)]",children:["Canonical session handoff from ",c.jsx("code",{children:".planner/HANDOFF.md"}),"."]})]}),n.exists?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid gap-1 text-sm text-[var(--text-muted)] md:grid-cols-2",children:[c.jsxs("div",{children:["Created: ",c.jsx("span",{className:"text-[var(--text)]",children:xv(n.createdAt)})]}),c.jsxs("div",{children:["Updated: ",c.jsx("span",{className:"text-[var(--text)]",children:xv(n.updatedAt)})]})]}),c.jsx("div",{className:"rounded-[18px] border border-[var(--border)] bg-[var(--surface-card)] px-5 py-5",children:c.jsx(_t,{text:n.content,className:"max-w-none"})})]}):c.jsx("p",{className:"py-8 text-center text-sm text-[var(--text-muted)]",children:"No handoff file present."})]})}async function C2({request:n,params:i}){ht(i,"featureId");const s=ht(i,"phaseId"),o=ht(i,"taskId"),f=ht(i,"itemId"),d=await n.formData(),h=va(d,"checked")==="true",v=await Lu(o);return await Lf({...v,phaseId:s,checklist:v.checklist.map(x=>x.id===f?{...x,checked:h}:x)}),Response.json({ok:!0,taskId:o,itemId:f,checked:h})}const M2=Z0([{id:"root",path:"/",loader:hS,element:c.jsx(pS,{}),errorElement:c.jsx(vS,{}),children:[{index:!0,loader:xS,element:c.jsx(US,{})},{path:"features",id:"features",loader:LS,element:c.jsx(VS,{}),children:[{path:"new",element:c.jsx(i2,{}),action:m2}]},{path:"features/:featureId",id:"feature-detail",loader:XS,element:c.jsx(JS,{}),children:[{path:"edit",element:c.jsx(r2,{}),action:h2},{path:"phases/new",element:c.jsx(s2,{}),action:x2}]},{path:"project/edit",element:c.jsx(d2,{}),action:R2},{path:"handoff",loader:T2,element:c.jsx(D2,{})},{path:"features/:featureId/delete",action:p2},{path:"features/:featureId/status",action:v2},{path:"features/:featureId/phases/:phaseId",id:"phase-detail",loader:WS,element:c.jsx(e2,{}),children:[{path:"edit",element:c.jsx(u2,{}),action:g2},{path:"tasks/new",element:c.jsx(c2,{}),action:S2}]},{path:"features/:featureId/phases/:phaseId/delete",action:y2},{path:"features/:featureId/phases/:phaseId/status",action:b2},{path:"features/:featureId/phases/:phaseId/tasks/:taskId",id:"task-detail",loader:t2,element:c.jsx(l2,{}),children:[{path:"edit",element:c.jsx(f2,{}),action:N2}]},{path:"features/:featureId/phases/:phaseId/tasks/:taskId/delete",action:w2},{path:"features/:featureId/phases/:phaseId/tasks/:taskId/status",action:E2},{path:"features/:featureId/phases/:phaseId/tasks/:taskId/checklist/:itemId/toggle",action:C2}]}]),yx=document.getElementById("root");if(!yx)throw new Error("#root not found");Ly.createRoot(yx).render(c.jsx(S.StrictMode,{children:c.jsx(l1,{router:M2})}));