@jonit-dev/night-watch-cli 1.7.22 → 1.7.24

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.
@@ -1,4 +1,4 @@
1
- (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))r(m);new MutationObserver(m=>{for(const f of m)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function d(m){const f={};return m.integrity&&(f.integrity=m.integrity),m.referrerPolicy&&(f.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?f.credentials="include":m.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(m){if(m.ep)return;m.ep=!0;const f=d(m);fetch(m.href,f)}})();function vu(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var eu={exports:{}},Wn={};/**
1
+ (function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))r(m);new MutationObserver(m=>{for(const f of m)if(f.type==="childList")for(const h of f.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&r(h)}).observe(document,{childList:!0,subtree:!0});function d(m){const f={};return m.integrity&&(f.integrity=m.integrity),m.referrerPolicy&&(f.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?f.credentials="include":m.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(m){if(m.ep)return;m.ep=!0;const f=d(m);fetch(m.href,f)}})();function bu(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var tu={exports:{}},Wn={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Ym;function Sp(){if(Ym)return Wn;Ym=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function d(r,m,f){var h=null;if(f!==void 0&&(h=""+f),m.key!==void 0&&(h=""+m.key),"key"in m){f={};for(var v in m)v!=="key"&&(f[v]=m[v])}else f=m;return m=f.ref,{$$typeof:c,type:r,key:h,ref:m!==void 0?m:null,props:f}}return Wn.Fragment=o,Wn.jsx=d,Wn.jsxs=d,Wn}var Gm;function wp(){return Gm||(Gm=1,eu.exports=Sp()),eu.exports}var n=wp(),tu={exports:{}},fe={};/**
9
+ */var Ym;function Sp(){if(Ym)return Wn;Ym=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function d(r,m,f){var h=null;if(f!==void 0&&(h=""+f),m.key!==void 0&&(h=""+m.key),"key"in m){f={};for(var v in m)v!=="key"&&(f[v]=m[v])}else f=m;return m=f.ref,{$$typeof:c,type:r,key:h,ref:m!==void 0?m:null,props:f}}return Wn.Fragment=o,Wn.jsx=d,Wn.jsxs=d,Wn}var Gm;function wp(){return Gm||(Gm=1,tu.exports=Sp()),tu.exports}var n=wp(),lu={exports:{}},de={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Qm;function Cp(){if(Qm)return fe;Qm=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),D=Symbol.iterator;function z(S){return S===null||typeof S!="object"?null:(S=D&&S[D]||S["@@iterator"],typeof S=="function"?S:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,R={};function G(S,V,W){this.props=S,this.context=V,this.refs=R,this.updater=W||U}G.prototype.isReactComponent={},G.prototype.setState=function(S,V){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,V,"setState")},G.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function q(){}q.prototype=G.prototype;function L(S,V,W){this.props=S,this.context=V,this.refs=R,this.updater=W||U}var J=L.prototype=new q;J.constructor=L,A(J,G.prototype),J.isPureReactComponent=!0;var B=Array.isArray;function C(){}var Q={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function P(S,V,W){var I=W.ref;return{$$typeof:c,type:S,key:V,ref:I!==void 0?I:null,props:W}}function de(S,V){return P(S.type,V,S.props)}function xe(S){return typeof S=="object"&&S!==null&&S.$$typeof===c}function K(S){var V={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(W){return V[W]})}var se=/\/+/g;function we(S,V){return typeof S=="object"&&S!==null&&S.key!=null?K(""+S.key):V.toString(36)}function ae(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(C,C):(S.status="pending",S.then(function(V){S.status==="pending"&&(S.status="fulfilled",S.value=V)},function(V){S.status==="pending"&&(S.status="rejected",S.reason=V)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function k(S,V,W,I,oe){var re=typeof S;(re==="undefined"||re==="boolean")&&(S=null);var pe=!1;if(S===null)pe=!0;else switch(re){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(S.$$typeof){case c:case o:pe=!0;break;case j:return pe=S._init,k(pe(S._payload),V,W,I,oe)}}if(pe)return oe=oe(S),pe=I===""?"."+we(S,0):I,B(oe)?(W="",pe!=null&&(W=pe.replace(se,"$&/")+"/"),k(oe,V,W,"",function(an){return an})):oe!=null&&(xe(oe)&&(oe=de(oe,W+(oe.key==null||S&&S.key===oe.key?"":(""+oe.key).replace(se,"$&/")+"/")+pe)),V.push(oe)),1;pe=0;var Pe=I===""?".":I+":";if(B(S))for(var Ve=0;Ve<S.length;Ve++)I=S[Ve],re=Pe+we(I,Ve),pe+=k(I,V,W,re,oe);else if(Ve=z(S),typeof Ve=="function")for(S=Ve.call(S),Ve=0;!(I=S.next()).done;)I=I.value,re=Pe+we(I,Ve++),pe+=k(I,V,W,re,oe);else if(re==="object"){if(typeof S.then=="function")return k(ae(S),V,W,I,oe);throw V=String(S),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return pe}function F(S,V,W){if(S==null)return S;var I=[],oe=0;return k(S,I,"","",function(re){return V.call(W,re,oe++)}),I}function $(S){if(S._status===-1){var V=S._result;V=V(),V.then(function(W){(S._status===0||S._status===-1)&&(S._status=1,S._result=W)},function(W){(S._status===0||S._status===-1)&&(S._status=2,S._result=W)}),S._status===-1&&(S._status=0,S._result=V)}if(S._status===1)return S._result.default;throw S._result}var ie=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Se={map:F,forEach:function(S,V,W){F(S,function(){V.apply(this,arguments)},W)},count:function(S){var V=0;return F(S,function(){V++}),V},toArray:function(S){return F(S,function(V){return V})||[]},only:function(S){if(!xe(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return fe.Activity=w,fe.Children=Se,fe.Component=G,fe.Fragment=d,fe.Profiler=m,fe.PureComponent=L,fe.StrictMode=r,fe.Suspense=g,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,fe.__COMPILER_RUNTIME={__proto__:null,c:function(S){return Q.H.useMemoCache(S)}},fe.cache=function(S){return function(){return S.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(S,V,W){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var I=A({},S.props),oe=S.key;if(V!=null)for(re in V.key!==void 0&&(oe=""+V.key),V)!Z.call(V,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&V.ref===void 0||(I[re]=V[re]);var re=arguments.length-2;if(re===1)I.children=W;else if(1<re){for(var pe=Array(re),Pe=0;Pe<re;Pe++)pe[Pe]=arguments[Pe+2];I.children=pe}return P(S.type,oe,I)},fe.createContext=function(S){return S={$$typeof:h,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:f,_context:S},S},fe.createElement=function(S,V,W){var I,oe={},re=null;if(V!=null)for(I in V.key!==void 0&&(re=""+V.key),V)Z.call(V,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(oe[I]=V[I]);var pe=arguments.length-2;if(pe===1)oe.children=W;else if(1<pe){for(var Pe=Array(pe),Ve=0;Ve<pe;Ve++)Pe[Ve]=arguments[Ve+2];oe.children=Pe}if(S&&S.defaultProps)for(I in pe=S.defaultProps,pe)oe[I]===void 0&&(oe[I]=pe[I]);return P(S,re,oe)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(S){return{$$typeof:v,render:S}},fe.isValidElement=xe,fe.lazy=function(S){return{$$typeof:j,_payload:{_status:-1,_result:S},_init:$}},fe.memo=function(S,V){return{$$typeof:p,type:S,compare:V===void 0?null:V}},fe.startTransition=function(S){var V=Q.T,W={};Q.T=W;try{var I=S(),oe=Q.S;oe!==null&&oe(W,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(C,ie)}catch(re){ie(re)}finally{V!==null&&W.types!==null&&(V.types=W.types),Q.T=V}},fe.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},fe.use=function(S){return Q.H.use(S)},fe.useActionState=function(S,V,W){return Q.H.useActionState(S,V,W)},fe.useCallback=function(S,V){return Q.H.useCallback(S,V)},fe.useContext=function(S){return Q.H.useContext(S)},fe.useDebugValue=function(){},fe.useDeferredValue=function(S,V){return Q.H.useDeferredValue(S,V)},fe.useEffect=function(S,V){return Q.H.useEffect(S,V)},fe.useEffectEvent=function(S){return Q.H.useEffectEvent(S)},fe.useId=function(){return Q.H.useId()},fe.useImperativeHandle=function(S,V,W){return Q.H.useImperativeHandle(S,V,W)},fe.useInsertionEffect=function(S,V){return Q.H.useInsertionEffect(S,V)},fe.useLayoutEffect=function(S,V){return Q.H.useLayoutEffect(S,V)},fe.useMemo=function(S,V){return Q.H.useMemo(S,V)},fe.useOptimistic=function(S,V){return Q.H.useOptimistic(S,V)},fe.useReducer=function(S,V,W){return Q.H.useReducer(S,V,W)},fe.useRef=function(S){return Q.H.useRef(S)},fe.useState=function(S){return Q.H.useState(S)},fe.useSyncExternalStore=function(S,V,W){return Q.H.useSyncExternalStore(S,V,W)},fe.useTransition=function(){return Q.H.useTransition()},fe.version="19.2.4",fe}var Vm;function bu(){return Vm||(Vm=1,tu.exports=Cp()),tu.exports}var y=bu();const Ye=vu(y);var lu={exports:{}},Pn={},au={exports:{}},nu={};/**
17
+ */var Qm;function Cp(){if(Qm)return de;Qm=1;var c=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),h=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),D=Symbol.iterator;function z(S){return S===null||typeof S!="object"?null:(S=D&&S[D]||S["@@iterator"],typeof S=="function"?S:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,T={};function Q(S,G,W){this.props=S,this.context=G,this.refs=T,this.updater=W||U}Q.prototype.isReactComponent={},Q.prototype.setState=function(S,G){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,G,"setState")},Q.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function q(){}q.prototype=Q.prototype;function L(S,G,W){this.props=S,this.context=G,this.refs=T,this.updater=W||U}var J=L.prototype=new q;J.constructor=L,A(J,Q.prototype),J.isPureReactComponent=!0;var B=Array.isArray;function C(){}var V={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function P(S,G,W){var I=W.ref;return{$$typeof:c,type:S,key:G,ref:I!==void 0?I:null,props:W}}function oe(S,G){return P(S.type,G,S.props)}function ge(S){return typeof S=="object"&&S!==null&&S.$$typeof===c}function $(S){var G={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(W){return G[W]})}var ie=/\/+/g;function we(S,G){return typeof S=="object"&&S!==null&&S.key!=null?$(""+S.key):G.toString(36)}function se(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(C,C):(S.status="pending",S.then(function(G){S.status==="pending"&&(S.status="fulfilled",S.value=G)},function(G){S.status==="pending"&&(S.status="rejected",S.reason=G)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function k(S,G,W,I,re){var me=typeof S;(me==="undefined"||me==="boolean")&&(S=null);var he=!1;if(S===null)he=!0;else switch(me){case"bigint":case"string":case"number":he=!0;break;case"object":switch(S.$$typeof){case c:case o:he=!0;break;case j:return he=S._init,k(he(S._payload),G,W,I,re)}}if(he)return re=re(S),he=I===""?"."+we(S,0):I,B(re)?(W="",he!=null&&(W=he.replace(ie,"$&/")+"/"),k(re,G,W,"",function(an){return an})):re!=null&&(ge(re)&&(re=oe(re,W+(re.key==null||S&&S.key===re.key?"":(""+re.key).replace(ie,"$&/")+"/")+he)),G.push(re)),1;he=0;var Le=I===""?".":I+":";if(B(S))for(var qe=0;qe<S.length;qe++)I=S[qe],me=Le+we(I,qe),he+=k(I,G,W,me,re);else if(qe=z(S),typeof qe=="function")for(S=qe.call(S),qe=0;!(I=S.next()).done;)I=I.value,me=Le+we(I,qe++),he+=k(I,G,W,me,re);else if(me==="object"){if(typeof S.then=="function")return k(se(S),G,W,I,re);throw G=String(S),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return he}function F(S,G,W){if(S==null)return S;var I=[],re=0;return k(S,I,"","",function(me){return G.call(W,me,re++)}),I}function ae(S){if(S._status===-1){var G=S._result;G=G(),G.then(function(W){(S._status===0||S._status===-1)&&(S._status=1,S._result=W)},function(W){(S._status===0||S._status===-1)&&(S._status=2,S._result=W)}),S._status===-1&&(S._status=0,S._result=G)}if(S._status===1)return S._result.default;throw S._result}var K=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},fe={map:F,forEach:function(S,G,W){F(S,function(){G.apply(this,arguments)},W)},count:function(S){var G=0;return F(S,function(){G++}),G},toArray:function(S){return F(S,function(G){return G})||[]},only:function(S){if(!ge(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return de.Activity=w,de.Children=fe,de.Component=Q,de.Fragment=d,de.Profiler=m,de.PureComponent=L,de.StrictMode=r,de.Suspense=g,de.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,de.__COMPILER_RUNTIME={__proto__:null,c:function(S){return V.H.useMemoCache(S)}},de.cache=function(S){return function(){return S.apply(null,arguments)}},de.cacheSignal=function(){return null},de.cloneElement=function(S,G,W){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var I=A({},S.props),re=S.key;if(G!=null)for(me in G.key!==void 0&&(re=""+G.key),G)!Z.call(G,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&G.ref===void 0||(I[me]=G[me]);var me=arguments.length-2;if(me===1)I.children=W;else if(1<me){for(var he=Array(me),Le=0;Le<me;Le++)he[Le]=arguments[Le+2];I.children=he}return P(S.type,re,I)},de.createContext=function(S){return S={$$typeof:h,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:f,_context:S},S},de.createElement=function(S,G,W){var I,re={},me=null;if(G!=null)for(I in G.key!==void 0&&(me=""+G.key),G)Z.call(G,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(re[I]=G[I]);var he=arguments.length-2;if(he===1)re.children=W;else if(1<he){for(var Le=Array(he),qe=0;qe<he;qe++)Le[qe]=arguments[qe+2];re.children=Le}if(S&&S.defaultProps)for(I in he=S.defaultProps,he)re[I]===void 0&&(re[I]=he[I]);return P(S,me,re)},de.createRef=function(){return{current:null}},de.forwardRef=function(S){return{$$typeof:v,render:S}},de.isValidElement=ge,de.lazy=function(S){return{$$typeof:j,_payload:{_status:-1,_result:S},_init:ae}},de.memo=function(S,G){return{$$typeof:p,type:S,compare:G===void 0?null:G}},de.startTransition=function(S){var G=V.T,W={};V.T=W;try{var I=S(),re=V.S;re!==null&&re(W,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(C,K)}catch(me){K(me)}finally{G!==null&&W.types!==null&&(G.types=W.types),V.T=G}},de.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},de.use=function(S){return V.H.use(S)},de.useActionState=function(S,G,W){return V.H.useActionState(S,G,W)},de.useCallback=function(S,G){return V.H.useCallback(S,G)},de.useContext=function(S){return V.H.useContext(S)},de.useDebugValue=function(){},de.useDeferredValue=function(S,G){return V.H.useDeferredValue(S,G)},de.useEffect=function(S,G){return V.H.useEffect(S,G)},de.useEffectEvent=function(S){return V.H.useEffectEvent(S)},de.useId=function(){return V.H.useId()},de.useImperativeHandle=function(S,G,W){return V.H.useImperativeHandle(S,G,W)},de.useInsertionEffect=function(S,G){return V.H.useInsertionEffect(S,G)},de.useLayoutEffect=function(S,G){return V.H.useLayoutEffect(S,G)},de.useMemo=function(S,G){return V.H.useMemo(S,G)},de.useOptimistic=function(S,G){return V.H.useOptimistic(S,G)},de.useReducer=function(S,G,W){return V.H.useReducer(S,G,W)},de.useRef=function(S){return V.H.useRef(S)},de.useState=function(S){return V.H.useState(S)},de.useSyncExternalStore=function(S,G,W){return V.H.useSyncExternalStore(S,G,W)},de.useTransition=function(){return V.H.useTransition()},de.version="19.2.4",de}var Vm;function yu(){return Vm||(Vm=1,lu.exports=Cp()),lu.exports}var y=yu();const Qe=bu(y);var au={exports:{}},Pn={},nu={exports:{}},su={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var Xm;function Ep(){return Xm||(Xm=1,(function(c){function o(k,F){var $=k.length;k.push(F);e:for(;0<$;){var ie=$-1>>>1,Se=k[ie];if(0<m(Se,F))k[ie]=F,k[$]=Se,$=ie;else break e}}function d(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var F=k[0],$=k.pop();if($!==F){k[0]=$;e:for(var ie=0,Se=k.length,S=Se>>>1;ie<S;){var V=2*(ie+1)-1,W=k[V],I=V+1,oe=k[I];if(0>m(W,$))I<Se&&0>m(oe,W)?(k[ie]=oe,k[I]=$,ie=I):(k[ie]=W,k[V]=$,ie=V);else if(I<Se&&0>m(oe,$))k[ie]=oe,k[I]=$,ie=I;else break e}}return F}function m(k,F){var $=k.sortIndex-F.sortIndex;return $!==0?$:k.id-F.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;c.unstable_now=function(){return f.now()}}else{var h=Date,v=h.now();c.unstable_now=function(){return h.now()-v}}var g=[],p=[],j=1,w=null,D=3,z=!1,U=!1,A=!1,R=!1,G=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function J(k){for(var F=d(p);F!==null;){if(F.callback===null)r(p);else if(F.startTime<=k)r(p),F.sortIndex=F.expirationTime,o(g,F);else break;F=d(p)}}function B(k){if(A=!1,J(k),!U)if(d(g)!==null)U=!0,C||(C=!0,K());else{var F=d(p);F!==null&&ae(B,F.startTime-k)}}var C=!1,Q=-1,Z=5,P=-1;function de(){return R?!0:!(c.unstable_now()-P<Z)}function xe(){if(R=!1,C){var k=c.unstable_now();P=k;var F=!0;try{e:{U=!1,A&&(A=!1,q(Q),Q=-1),z=!0;var $=D;try{t:{for(J(k),w=d(g);w!==null&&!(w.expirationTime>k&&de());){var ie=w.callback;if(typeof ie=="function"){w.callback=null,D=w.priorityLevel;var Se=ie(w.expirationTime<=k);if(k=c.unstable_now(),typeof Se=="function"){w.callback=Se,J(k),F=!0;break t}w===d(g)&&r(g),J(k)}else r(g);w=d(g)}if(w!==null)F=!0;else{var S=d(p);S!==null&&ae(B,S.startTime-k),F=!1}}break e}finally{w=null,D=$,z=!1}F=void 0}}finally{F?K():C=!1}}}var K;if(typeof L=="function")K=function(){L(xe)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,we=se.port2;se.port1.onmessage=xe,K=function(){we.postMessage(null)}}else K=function(){G(xe,0)};function ae(k,F){Q=G(function(){k(c.unstable_now())},F)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(k){k.callback=null},c.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<k?Math.floor(1e3/k):5},c.unstable_getCurrentPriorityLevel=function(){return D},c.unstable_next=function(k){switch(D){case 1:case 2:case 3:var F=3;break;default:F=D}var $=D;D=F;try{return k()}finally{D=$}},c.unstable_requestPaint=function(){R=!0},c.unstable_runWithPriority=function(k,F){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var $=D;D=k;try{return F()}finally{D=$}},c.unstable_scheduleCallback=function(k,F,$){var ie=c.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?ie+$:ie):$=ie,k){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=$+Se,k={id:j++,callback:F,priorityLevel:k,startTime:$,expirationTime:Se,sortIndex:-1},$>ie?(k.sortIndex=$,o(p,k),d(g)===null&&k===d(p)&&(A?(q(Q),Q=-1):A=!0,ae(B,$-ie))):(k.sortIndex=Se,o(g,k),U||z||(U=!0,C||(C=!0,K()))),k},c.unstable_shouldYield=de,c.unstable_wrapCallback=function(k){var F=D;return function(){var $=D;D=F;try{return k.apply(this,arguments)}finally{D=$}}}})(nu)),nu}var Zm;function Ap(){return Zm||(Zm=1,au.exports=Ep()),au.exports}var su={exports:{}},it={};/**
25
+ */var Xm;function Ep(){return Xm||(Xm=1,(function(c){function o(k,F){var ae=k.length;k.push(F);e:for(;0<ae;){var K=ae-1>>>1,fe=k[K];if(0<m(fe,F))k[K]=F,k[ae]=fe,ae=K;else break e}}function d(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var F=k[0],ae=k.pop();if(ae!==F){k[0]=ae;e:for(var K=0,fe=k.length,S=fe>>>1;K<S;){var G=2*(K+1)-1,W=k[G],I=G+1,re=k[I];if(0>m(W,ae))I<fe&&0>m(re,W)?(k[K]=re,k[I]=ae,K=I):(k[K]=W,k[G]=ae,K=G);else if(I<fe&&0>m(re,ae))k[K]=re,k[I]=ae,K=I;else break e}}return F}function m(k,F){var ae=k.sortIndex-F.sortIndex;return ae!==0?ae:k.id-F.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;c.unstable_now=function(){return f.now()}}else{var h=Date,v=h.now();c.unstable_now=function(){return h.now()-v}}var g=[],p=[],j=1,w=null,D=3,z=!1,U=!1,A=!1,T=!1,Q=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function J(k){for(var F=d(p);F!==null;){if(F.callback===null)r(p);else if(F.startTime<=k)r(p),F.sortIndex=F.expirationTime,o(g,F);else break;F=d(p)}}function B(k){if(A=!1,J(k),!U)if(d(g)!==null)U=!0,C||(C=!0,$());else{var F=d(p);F!==null&&se(B,F.startTime-k)}}var C=!1,V=-1,Z=5,P=-1;function oe(){return T?!0:!(c.unstable_now()-P<Z)}function ge(){if(T=!1,C){var k=c.unstable_now();P=k;var F=!0;try{e:{U=!1,A&&(A=!1,q(V),V=-1),z=!0;var ae=D;try{t:{for(J(k),w=d(g);w!==null&&!(w.expirationTime>k&&oe());){var K=w.callback;if(typeof K=="function"){w.callback=null,D=w.priorityLevel;var fe=K(w.expirationTime<=k);if(k=c.unstable_now(),typeof fe=="function"){w.callback=fe,J(k),F=!0;break t}w===d(g)&&r(g),J(k)}else r(g);w=d(g)}if(w!==null)F=!0;else{var S=d(p);S!==null&&se(B,S.startTime-k),F=!1}}break e}finally{w=null,D=ae,z=!1}F=void 0}}finally{F?$():C=!1}}}var $;if(typeof L=="function")$=function(){L(ge)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,we=ie.port2;ie.port1.onmessage=ge,$=function(){we.postMessage(null)}}else $=function(){Q(ge,0)};function se(k,F){V=Q(function(){k(c.unstable_now())},F)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(k){k.callback=null},c.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<k?Math.floor(1e3/k):5},c.unstable_getCurrentPriorityLevel=function(){return D},c.unstable_next=function(k){switch(D){case 1:case 2:case 3:var F=3;break;default:F=D}var ae=D;D=F;try{return k()}finally{D=ae}},c.unstable_requestPaint=function(){T=!0},c.unstable_runWithPriority=function(k,F){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var ae=D;D=k;try{return F()}finally{D=ae}},c.unstable_scheduleCallback=function(k,F,ae){var K=c.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?K+ae:K):ae=K,k){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=ae+fe,k={id:j++,callback:F,priorityLevel:k,startTime:ae,expirationTime:fe,sortIndex:-1},ae>K?(k.sortIndex=ae,o(p,k),d(g)===null&&k===d(p)&&(A?(q(V),V=-1):A=!0,se(B,ae-K))):(k.sortIndex=fe,o(g,k),U||z||(U=!0,C||(C=!0,$()))),k},c.unstable_shouldYield=oe,c.unstable_wrapCallback=function(k){var F=D;return function(){var ae=D;D=F;try{return k.apply(this,arguments)}finally{D=ae}}}})(su)),su}var Zm;function Ap(){return Zm||(Zm=1,nu.exports=Ep()),nu.exports}var iu={exports:{}},it={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var $m;function Tp(){if($m)return it;$m=1;var c=bu();function o(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)p+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var r={d:{f:d,r:function(){throw Error(o(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function f(g,p,j){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:w==null?null:""+w,children:g,containerInfo:p,implementation:j}}var h=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,it.createPortal=function(g,p){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(o(299));return f(g,p,null,j)},it.flushSync=function(g){var p=h.T,j=r.p;try{if(h.T=null,r.p=2,g)return g()}finally{h.T=p,r.p=j,r.d.f()}},it.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},it.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},it.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var j=p.as,w=v(j,p.crossOrigin),D=typeof p.integrity=="string"?p.integrity:void 0,z=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;j==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:w,integrity:D,fetchPriority:z}):j==="script"&&r.d.X(g,{crossOrigin:w,integrity:D,fetchPriority:z,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},it.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var j=v(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},it.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var j=p.as,w=v(j,p.crossOrigin);r.d.L(g,j,{crossOrigin:w,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})}},it.preloadModule=function(g,p){if(typeof g=="string")if(p){var j=v(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},it.requestFormReset=function(g){r.d.r(g)},it.unstable_batchedUpdates=function(g,p){return g(p)},it.useFormState=function(g,p,j){return h.H.useFormState(g,p,j)},it.useFormStatus=function(){return h.H.useHostTransitionStatus()},it.version="19.2.4",it}var Km;function b0(){if(Km)return su.exports;Km=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),su.exports=Tp(),su.exports}/**
33
+ */var $m;function Tp(){if($m)return it;$m=1;var c=yu();function o(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)p+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var r={d:{f:d,r:function(){throw Error(o(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function f(g,p,j){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:w==null?null:""+w,children:g,containerInfo:p,implementation:j}}var h=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function v(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,it.createPortal=function(g,p){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(o(299));return f(g,p,null,j)},it.flushSync=function(g){var p=h.T,j=r.p;try{if(h.T=null,r.p=2,g)return g()}finally{h.T=p,r.p=j,r.d.f()}},it.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(g,p))},it.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},it.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var j=p.as,w=v(j,p.crossOrigin),D=typeof p.integrity=="string"?p.integrity:void 0,z=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;j==="style"?r.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:w,integrity:D,fetchPriority:z}):j==="script"&&r.d.X(g,{crossOrigin:w,integrity:D,fetchPriority:z,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},it.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var j=v(p.as,p.crossOrigin);r.d.M(g,{crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(g)},it.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var j=p.as,w=v(j,p.crossOrigin);r.d.L(g,j,{crossOrigin:w,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})}},it.preloadModule=function(g,p){if(typeof g=="string")if(p){var j=v(p.as,p.crossOrigin);r.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:j,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(g)},it.requestFormReset=function(g){r.d.r(g)},it.unstable_batchedUpdates=function(g,p){return g(p)},it.useFormState=function(g,p,j){return h.H.useFormState(g,p,j)},it.useFormStatus=function(){return h.H.useHostTransitionStatus()},it.version="19.2.4",it}var Km;function b0(){if(Km)return iu.exports;Km=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),iu.exports=Tp(),iu.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,15 +38,15 @@
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var Jm;function Rp(){if(Jm)return Pn;Jm=1;var c=Ap(),o=bu(),d=b0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l: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 g(e){if(f(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===l)return g(s),e;if(i===a)return g(s),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=s,a=i;else{for(var u=!1,x=s.child;x;){if(x===l){u=!0,l=s,a=i;break}if(x===a){u=!0,a=s,l=i;break}x=x.sibling}if(!u){for(x=i.child;x;){if(x===l){u=!0,l=i,a=s;break}if(x===a){u=!0,a=i,l=s;break}x=x.sibling}if(!u)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,D=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),L=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),de=Symbol.for("react.memo_cache_sentinel"),xe=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=xe&&e[xe]||e["@@iterator"],typeof e=="function"?e:null)}var se=Symbol.for("react.client.reference");function we(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case G:return"Profiler";case R:return"StrictMode";case B:return"Suspense";case C:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case L:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:we(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return we(e(t))}catch{}}return null}var ae=Array.isArray,k=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},ie=[],Se=-1;function S(e){return{current:e}}function V(e){0>Se||(e.current=ie[Se],ie[Se]=null,Se--)}function W(e,t){Se++,ie[Se]=e.current,e.current=t}var I=S(null),oe=S(null),re=S(null),pe=S(null);function Pe(e,t){switch(W(re,t),W(oe,e),W(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?om(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=om(t),e=dm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(I),W(I,e)}function Ve(){V(I),V(oe),V(re)}function an(e){e.memoizedState!==null&&W(pe,e);var t=I.current,l=dm(t,e.type);t!==l&&(W(oe,e),W(I,l))}function is(e){oe.current===e&&(V(I),V(oe)),pe.current===e&&(V(pe),$n._currentValue=$)}var Ui,Bu;function $l(e){if(Ui===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Ui=t&&t[1]||"",Bu=-1<l.stack.indexOf(`
41
+ */var Jm;function Rp(){if(Jm)return Pn;Jm=1;var c=Ap(),o=yu(),d=b0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l: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 g(e){if(f(e)!==e)throw Error(r(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===l)return g(s),e;if(i===a)return g(s),t;i=i.sibling}throw Error(r(188))}if(l.return!==a.return)l=s,a=i;else{for(var u=!1,x=s.child;x;){if(x===l){u=!0,l=s,a=i;break}if(x===a){u=!0,a=s,l=i;break}x=x.sibling}if(!u){for(x=i.child;x;){if(x===l){u=!0,l=i,a=s;break}if(x===a){u=!0,a=i,l=s;break}x=x.sibling}if(!u)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,D=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),L=Symbol.for("react.context"),J=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),oe=Symbol.for("react.memo_cache_sentinel"),ge=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=ge&&e[ge]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function we(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case Q:return"Profiler";case T:return"StrictMode";case B:return"Suspense";case C:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case L:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case J:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:we(e.type)||"Memo";case Z:t=e._payload,e=e._init;try{return we(e(t))}catch{}}return null}var se=Array.isArray,k=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},K=[],fe=-1;function S(e){return{current:e}}function G(e){0>fe||(e.current=K[fe],K[fe]=null,fe--)}function W(e,t){fe++,K[fe]=e.current,e.current=t}var I=S(null),re=S(null),me=S(null),he=S(null);function Le(e,t){switch(W(me,t),W(re,e),W(I,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?om(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=om(t),e=dm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(I),W(I,e)}function qe(){G(I),G(re),G(me)}function an(e){e.memoizedState!==null&&W(he,e);var t=I.current,l=dm(t,e.type);t!==l&&(W(re,e),W(I,l))}function is(e){re.current===e&&(G(I),G(re)),he.current===e&&(G(he),$n._currentValue=ae)}var Hi,Bu;function $l(e){if(Hi===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Hi=t&&t[1]||"",Bu=-1<l.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Ui+e+Bu}var Hi=!1;function Bi(e,t){if(!e||Hi)return"";Hi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(O){var M=O}Reflect.construct(e,[],X)}else{try{X.call()}catch(O){M=O}e.call(X.prototype)}}else{try{throw Error()}catch(O){M=O}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(O){if(O&&M&&typeof O.stack=="string")return[O.stack,M.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),u=i[0],x=i[1];if(u&&x){var b=u.split(`
43
+ `+Hi+e+Bu}var Bi=!1;function Li(e,t){if(!e||Bi)return"";Bi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(O){var M=O}Reflect.construct(e,[],X)}else{try{X.call()}catch(O){M=O}e.call(X.prototype)}}else{try{throw Error()}catch(O){M=O}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(O){if(O&&M&&typeof O.stack=="string")return[O.stack,M.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),u=i[0],x=i[1];if(u&&x){var b=u.split(`
44
44
  `),_=x.split(`
45
45
  `);for(s=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;s<_.length&&!_[s].includes("DetermineComponentFrameRoot");)s++;if(a===b.length||s===_.length)for(a=b.length-1,s=_.length-1;1<=a&&0<=s&&b[a]!==_[s];)s--;for(;1<=a&&0<=s;a--,s--)if(b[a]!==_[s]){if(a!==1||s!==1)do if(a--,s--,0>s||b[a]!==_[s]){var H=`
46
- `+b[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=s);break}}}finally{Hi=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?$l(l):""}function eh(e,t){switch(e.tag){case 26:case 27:case 5:return $l(e.type);case 16:return $l("Lazy");case 13:return e.child!==t&&t!==null?$l("Suspense Fallback"):$l("Suspense");case 19:return $l("SuspenseList");case 0:case 15:return Bi(e.type,!1);case 11:return Bi(e.type.render,!1);case 1:return Bi(e.type,!0);case 31:return $l("Activity");default:return""}}function Lu(e){try{var t="",l=null;do t+=eh(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
46
+ `+b[a].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=a&&0<=s);break}}}finally{Bi=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?$l(l):""}function eh(e,t){switch(e.tag){case 26:case 27:case 5:return $l(e.type);case 16:return $l("Lazy");case 13:return e.child!==t&&t!==null?$l("Suspense Fallback"):$l("Suspense");case 19:return $l("SuspenseList");case 0:case 15:return Li(e.type,!1);case 11:return Li(e.type.render,!1);case 1:return Li(e.type,!0);case 31:return $l("Activity");default:return""}}function Lu(e){try{var t="",l=null;do t+=eh(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
47
47
  Error generating stack: `+a.message+`
48
- `+a.stack}}var Li=Object.prototype.hasOwnProperty,qi=c.unstable_scheduleCallback,Yi=c.unstable_cancelCallback,th=c.unstable_shouldYield,lh=c.unstable_requestPaint,gt=c.unstable_now,ah=c.unstable_getCurrentPriorityLevel,qu=c.unstable_ImmediatePriority,Yu=c.unstable_UserBlockingPriority,cs=c.unstable_NormalPriority,nh=c.unstable_LowPriority,Gu=c.unstable_IdlePriority,sh=c.log,ih=c.unstable_setDisableYieldValue,nn=null,vt=null;function bl(e){if(typeof sh=="function"&&ih(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(nn,e)}catch{}}var bt=Math.clz32?Math.clz32:uh,ch=Math.log,rh=Math.LN2;function uh(e){return e>>>=0,e===0?32:31-(ch(e)/rh|0)|0}var rs=256,us=262144,os=4194304;function Kl(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 ds(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var x=a&134217727;return x!==0?(a=x&~i,a!==0?s=Kl(a):(u&=x,u!==0?s=Kl(u):l||(l=x&~e,l!==0&&(s=Kl(l))))):(x=a&~i,x!==0?s=Kl(x):u!==0?s=Kl(u):l||(l=a&~e,l!==0&&(s=Kl(l)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:s}function sn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function oh(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 Qu(){var e=os;return os<<=1,(os&62914560)===0&&(os=4194304),e}function Gi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function cn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dh(e,t,l,a,s,i){var u=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var x=e.entanglements,b=e.expirationTimes,_=e.hiddenUpdates;for(l=u&~l;0<l;){var H=31-bt(l),X=1<<H;x[H]=0,b[H]=-1;var M=_[H];if(M!==null)for(_[H]=null,H=0;H<M.length;H++){var O=M[H];O!==null&&(O.lane&=-536870913)}l&=~X}a!==0&&Vu(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function Vu(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-bt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Xu(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-bt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Zu(e,t){var l=t&-t;return l=(l&42)!==0?1:Qi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Qi(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 Vi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $u(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Om(e.type))}function Ku(e,t){var l=F.p;try{return F.p=e,t()}finally{F.p=l}}var yl=Math.random().toString(36).slice(2),tt="__reactFiber$"+yl,ot="__reactProps$"+yl,xa="__reactContainer$"+yl,Xi="__reactEvents$"+yl,fh="__reactListeners$"+yl,mh="__reactHandles$"+yl,Ju="__reactResources$"+yl,rn="__reactMarker$"+yl;function Zi(e){delete e[tt],delete e[ot],delete e[Xi],delete e[fh],delete e[mh]}function pa(e){var t=e[tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[xa]||l[tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=vm(e);e!==null;){if(l=e[tt])return l;e=vm(e)}return t}e=l,l=e.parentNode}return null}function ga(e){if(e=e[tt]||e[xa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function un(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function va(e){var t=e[Ju];return t||(t=e[Ju]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[rn]=!0}var Fu=new Set,Wu={};function Jl(e,t){ba(e,t),ba(e+"Capture",t)}function ba(e,t){for(Wu[e]=t,e=0;e<t.length;e++)Fu.add(t[e])}var hh=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]*$"),Pu={},Iu={};function xh(e){return Li.call(Iu,e)?!0:Li.call(Pu,e)?!1:hh.test(e)?Iu[e]=!0:(Pu[e]=!0,!1)}function fs(e,t,l){if(xh(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function ms(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Wt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ph(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $i(e){if(!e._valueTracker){var t=eo(e)?"checked":"value";e._valueTracker=ph(e,t,""+e[t])}}function to(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=eo(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function hs(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 gh=/[\n"\\]/g;function Rt(e){return e.replace(gh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ki(e,t,l,a,s,i,u,x){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Ji(e,u,Tt(t)):l!=null?Ji(e,u,Tt(l)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Tt(x):e.removeAttribute("name")}function lo(e,t,l,a,s,i,u,x){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){$i(e);return}l=l!=null?""+Tt(l):"",t=t!=null?""+Tt(t):l,x||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=x?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),$i(e)}function Ji(e,t,l){t==="number"&&hs(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ya(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Tt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ao(e,t,l){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Tt(l):""}function no(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(ae(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Tt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),$i(e)}function ja(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var vh=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 so(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||vh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function io(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&so(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&so(e,i,t[i])}function Fi(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 bh=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"]]),yh=/^[\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 xs(e){return yh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pt(){}var Wi=null;function Pi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Na=null,Sa=null;function co(e){var t=ga(e);if(t&&(e=t.stateNode)){var l=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ki(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Rt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[ot]||null;if(!s)throw Error(r(90));Ki(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&to(a)}break e;case"textarea":ao(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ya(e,!!l.multiple,t,!1)}}}var Ii=!1;function ro(e,t,l){if(Ii)return e(t,l);Ii=!0;try{var a=e(t);return a}finally{if(Ii=!1,(Na!==null||Sa!==null)&&(li(),Na&&(t=Na,e=Sa,Sa=Na=null,co(t),e)))for(t=0;t<e.length;t++)co(e[t])}}function on(e,t){var l=e.stateNode;if(l===null)return null;var a=l[ot]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ec=!1;if(It)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){ec=!0}}),window.addEventListener("test",dn,dn),window.removeEventListener("test",dn,dn)}catch{ec=!1}var jl=null,tc=null,ps=null;function uo(){if(ps)return ps;var e,t=tc,l=t.length,a,s="value"in jl?jl.value:jl.textContent,i=s.length;for(e=0;e<l&&t[e]===s[e];e++);var u=l-e;for(a=1;a<=u&&t[l-a]===s[i-a];a++);return ps=s.slice(e,1<a?1-a:void 0)}function gs(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 vs(){return!0}function oo(){return!1}function dt(e){function t(l,a,s,i,u){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(l=e[x],this[x]=l?l(i):i[x]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?vs:oo,this.isPropagationStopped=oo,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vs)},persist:function(){},isPersistent:vs}),t}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bs=dt(Fl),fn=w({},Fl,{view:0,detail:0}),jh=dt(fn),lc,ac,mn,ys=w({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sc,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!==mn&&(mn&&e.type==="mousemove"?(lc=e.screenX-mn.screenX,ac=e.screenY-mn.screenY):ac=lc=0,mn=e),lc)},movementY:function(e){return"movementY"in e?e.movementY:ac}}),fo=dt(ys),Nh=w({},ys,{dataTransfer:0}),Sh=dt(Nh),wh=w({},fn,{relatedTarget:0}),nc=dt(wh),Ch=w({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),Eh=dt(Ch),Ah=w({},Fl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Th=dt(Ah),Rh=w({},Fl,{data:0}),mo=dt(Rh),_h={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mh={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"},zh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zh[e])?!!t[e]:!1}function sc(){return Dh}var Oh=w({},fn,{key:function(e){if(e.key){var t=_h[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sc,charCode:function(e){return e.type==="keypress"?gs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kh=dt(Oh),Uh=w({},ys,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ho=dt(Uh),Hh=w({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sc}),Bh=dt(Hh),Lh=w({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),qh=dt(Lh),Yh=w({},ys,{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}),Gh=dt(Yh),Qh=w({},Fl,{newState:0,oldState:0}),Vh=dt(Qh),Xh=[9,13,27,32],ic=It&&"CompositionEvent"in window,hn=null;It&&"documentMode"in document&&(hn=document.documentMode);var Zh=It&&"TextEvent"in window&&!hn,xo=It&&(!ic||hn&&8<hn&&11>=hn),po=" ",go=!1;function vo(e,t){switch(e){case"keyup":return Xh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wa=!1;function $h(e,t){switch(e){case"compositionend":return bo(t);case"keypress":return t.which!==32?null:(go=!0,po);case"textInput":return e=t.data,e===po&&go?null:e;default:return null}}function Kh(e,t){if(wa)return e==="compositionend"||!ic&&vo(e,t)?(e=uo(),ps=tc=jl=null,wa=!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 xo&&t.locale!=="ko"?null:t.data;default:return null}}var Jh={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 yo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jh[e.type]:t==="textarea"}function jo(e,t,l,a){Na?Sa?Sa.push(a):Sa=[a]:Na=a,t=ui(t,"onChange"),0<t.length&&(l=new bs("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var xn=null,pn=null;function Fh(e){nm(e,0)}function js(e){var t=un(e);if(to(t))return e}function No(e,t){if(e==="change")return t}var So=!1;if(It){var cc;if(It){var rc="oninput"in document;if(!rc){var wo=document.createElement("div");wo.setAttribute("oninput","return;"),rc=typeof wo.oninput=="function"}cc=rc}else cc=!1;So=cc&&(!document.documentMode||9<document.documentMode)}function Co(){xn&&(xn.detachEvent("onpropertychange",Eo),pn=xn=null)}function Eo(e){if(e.propertyName==="value"&&js(pn)){var t=[];jo(t,pn,e,Pi(e)),ro(Fh,t)}}function Wh(e,t,l){e==="focusin"?(Co(),xn=t,pn=l,xn.attachEvent("onpropertychange",Eo)):e==="focusout"&&Co()}function Ph(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return js(pn)}function Ih(e,t){if(e==="click")return js(t)}function ex(e,t){if(e==="input"||e==="change")return js(t)}function tx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:tx;function gn(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!Li.call(t,s)||!yt(e[s],t[s]))return!1}return!0}function Ao(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function To(e,t){var l=Ao(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ao(l)}}function Ro(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ro(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _o(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=hs(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=hs(e.document)}return t}function uc(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 lx=It&&"documentMode"in document&&11>=document.documentMode,Ca=null,oc=null,vn=null,dc=!1;function Mo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;dc||Ca==null||Ca!==hs(a)||(a=Ca,"selectionStart"in a&&uc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),vn&&gn(vn,a)||(vn=a,a=ui(oc,"onSelect"),0<a.length&&(t=new bs("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ca)))}function Wl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ea={animationend:Wl("Animation","AnimationEnd"),animationiteration:Wl("Animation","AnimationIteration"),animationstart:Wl("Animation","AnimationStart"),transitionrun:Wl("Transition","TransitionRun"),transitionstart:Wl("Transition","TransitionStart"),transitioncancel:Wl("Transition","TransitionCancel"),transitionend:Wl("Transition","TransitionEnd")},fc={},zo={};It&&(zo=document.createElement("div").style,"AnimationEvent"in window||(delete Ea.animationend.animation,delete Ea.animationiteration.animation,delete Ea.animationstart.animation),"TransitionEvent"in window||delete Ea.transitionend.transition);function Pl(e){if(fc[e])return fc[e];if(!Ea[e])return e;var t=Ea[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in zo)return fc[e]=t[l];return e}var Do=Pl("animationend"),Oo=Pl("animationiteration"),ko=Pl("animationstart"),ax=Pl("transitionrun"),nx=Pl("transitionstart"),sx=Pl("transitioncancel"),Uo=Pl("transitionend"),Ho=new Map,mc="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(" ");mc.push("scrollEnd");function Yt(e,t){Ho.set(e,t),Jl(t,[e])}var Ns=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)},_t=[],Aa=0,hc=0;function Ss(){for(var e=Aa,t=hc=Aa=0;t<e;){var l=_t[t];_t[t++]=null;var a=_t[t];_t[t++]=null;var s=_t[t];_t[t++]=null;var i=_t[t];if(_t[t++]=null,a!==null&&s!==null){var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}i!==0&&Bo(l,s,i)}}function ws(e,t,l,a){_t[Aa++]=e,_t[Aa++]=t,_t[Aa++]=l,_t[Aa++]=a,hc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function xc(e,t,l,a){return ws(e,t,l,a),Cs(e)}function Il(e,t){return ws(e,null,null,t),Cs(e)}function Bo(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-bt(l),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),i):null}function Cs(e){if(50<qn)throw qn=0,wr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ta={};function ix(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,l,a){return new ix(e,t,l,a)}function pc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function el(e,t){var l=e.alternate;return l===null?(l=jt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Lo(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Es(e,t,l,a,s,i){var u=0;if(a=e,typeof e=="function")pc(e)&&(u=1);else if(typeof e=="string")u=dp(e,l,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=jt(31,l,t,s),e.elementType=P,e.lanes=i,e;case A:return ea(l.children,s,i,t);case R:u=8,s|=24;break;case G:return e=jt(12,l,t,s|2),e.elementType=G,e.lanes=i,e;case B:return e=jt(13,l,t,s),e.elementType=B,e.lanes=i,e;case C:return e=jt(19,l,t,s),e.elementType=C,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:u=10;break e;case q:u=9;break e;case J:u=11;break e;case Q:u=14;break e;case Z:u=16,a=null;break e}u=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=jt(u,l,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function ea(e,t,l,a){return e=jt(7,e,a,t),e.lanes=l,e}function gc(e,t,l){return e=jt(6,e,null,t),e.lanes=l,e}function qo(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function vc(e,t,l){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yo=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var l=Yo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Lu(t)},Yo.set(e,t),t)}return{value:e,source:t,stack:Lu(t)}}var Ra=[],_a=0,As=null,bn=0,zt=[],Dt=0,Nl=null,Vt=1,Xt="";function tl(e,t){Ra[_a++]=bn,Ra[_a++]=As,As=e,bn=t}function Go(e,t,l){zt[Dt++]=Vt,zt[Dt++]=Xt,zt[Dt++]=Nl,Nl=e;var a=Vt;e=Xt;var s=32-bt(a)-1;a&=~(1<<s),l+=1;var i=32-bt(t)+s;if(30<i){var u=s-s%5;i=(a&(1<<u)-1).toString(32),a>>=u,s-=u,Vt=1<<32-bt(t)+s|l<<s|a,Xt=i+e}else Vt=1<<i|l<<s|a,Xt=e}function bc(e){e.return!==null&&(tl(e,1),Go(e,1,0))}function yc(e){for(;e===As;)As=Ra[--_a],Ra[_a]=null,bn=Ra[--_a],Ra[_a]=null;for(;e===Nl;)Nl=zt[--Dt],zt[Dt]=null,Xt=zt[--Dt],zt[Dt]=null,Vt=zt[--Dt],zt[Dt]=null}function Qo(e,t){zt[Dt++]=Vt,zt[Dt++]=Xt,zt[Dt++]=Nl,Vt=t.id,Xt=t.overflow,Nl=e}var lt=null,He=null,Ne=!1,Sl=null,Ot=!1,jc=Error(r(519));function wl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yn(Mt(t,e)),jc}function Vo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[tt]=e,t[ot]=a,l){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(l=0;l<Gn.length;l++)ve(Gn[l],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),lo(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),no(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||rm(t.textContent,l)?(a.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),a.onScroll!=null&&ve("scroll",t),a.onScrollEnd!=null&&ve("scrollend",t),a.onClick!=null&&(t.onclick=Pt),t=!0):t=!1,t||wl(e,!0)}function Xo(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Ot=!1;return;case 27:case 3:Ot=!0;return;default:lt=lt.return}}function Ma(e){if(e!==lt)return!1;if(!Ne)return Xo(e),Ne=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Lr(e.type,e.memoizedProps)),l=!l),l&&He&&wl(e),Xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=gm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=gm(e)}else t===27?(t=He,Bl(e.type)?(e=Vr,Vr=null,He=e):He=t):He=lt?Ut(e.stateNode.nextSibling):null;return!0}function ta(){He=lt=null,Ne=!1}function Nc(){var e=Sl;return e!==null&&(xt===null?xt=e:xt.push.apply(xt,e),Sl=null),e}function yn(e){Sl===null?Sl=[e]:Sl.push(e)}var Sc=S(null),la=null,ll=null;function Cl(e,t,l){W(Sc,t._currentValue),t._currentValue=l}function al(e){e._currentValue=Sc.current,V(Sc)}function wc(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Cc(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var u=s.child;i=i.firstContext;e:for(;i!==null;){var x=i;i=s;for(var b=0;b<t.length;b++)if(x.context===t[b]){i.lanes|=l,x=i.alternate,x!==null&&(x.lanes|=l),wc(i.return,l,e),a||(u=null);break e}i=x.next}}else if(s.tag===18){if(u=s.return,u===null)throw Error(r(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),wc(u,l,e),u=null}else u=s.child;if(u!==null)u.return=s;else for(u=s;u!==null;){if(u===e){u=null;break}if(s=u.sibling,s!==null){s.return=u.return,u=s;break}u=u.return}s=u}}function za(e,t,l,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var u=s.alternate;if(u===null)throw Error(r(387));if(u=u.memoizedProps,u!==null){var x=s.type;yt(s.pendingProps.value,u.value)||(e!==null?e.push(x):e=[x])}}else if(s===pe.current){if(u=s.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push($n):e=[$n])}s=s.return}e!==null&&Cc(t,e,l,a),t.flags|=262144}function Ts(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){la=e,ll=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function at(e){return Zo(la,e)}function Rs(e,t){return la===null&&aa(e),Zo(e,t)}function Zo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},ll===null){if(e===null)throw Error(r(308));ll=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ll=ll.next=t;return l}var cx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},rx=c.unstable_scheduleCallback,ux=c.unstable_NormalPriority,$e={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ec(){return{controller:new cx,data:new Map,refCount:0}}function jn(e){e.refCount--,e.refCount===0&&rx(ux,function(){e.controller.abort()})}var Nn=null,Ac=0,Da=0,Oa=null;function ox(e,t){if(Nn===null){var l=Nn=[];Ac=0,Da=_r(),Oa={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Ac++,t.then($o,$o),t}function $o(){if(--Ac===0&&Nn!==null){Oa!==null&&(Oa.status="fulfilled");var e=Nn;Nn=null,Da=0,Oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function dx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Ko=k.S;k.S=function(e,t){zf=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ox(e,t),Ko!==null&&Ko(e,t)};var na=S(null);function Tc(){var e=na.current;return e!==null?e:Ue.pooledCache}function _s(e,t){t===null?W(na,na.current):W(na,t.pool)}function Jo(){var e=Tc();return e===null?null:{parent:$e._currentValue,pool:e}}var ka=Error(r(460)),Rc=Error(r(474)),Ms=Error(r(542)),zs={then:function(){}};function Fo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Pt,Pt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Io(e),e;default:if(typeof t.status=="string")t.then(Pt,Pt);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Io(e),e}throw ia=t,ka}}function sa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ia=l,ka):l}}var ia=null;function Po(){if(ia===null)throw Error(r(459));var e=ia;return ia=null,e}function Io(e){if(e===ka||e===Ms)throw Error(r(483))}var Ua=null,Sn=0;function Ds(e){var t=Sn;return Sn+=1,Ua===null&&(Ua=[]),Wo(Ua,e,t)}function wn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Os(e,t){throw t.$$typeof===D?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ed(e){function t(E,N){if(e){var T=E.deletions;T===null?(E.deletions=[N],E.flags|=16):T.push(N)}}function l(E,N){if(!e)return null;for(;N!==null;)t(E,N),N=N.sibling;return null}function a(E){for(var N=new Map;E!==null;)E.key!==null?N.set(E.key,E):N.set(E.index,E),E=E.sibling;return N}function s(E,N){return E=el(E,N),E.index=0,E.sibling=null,E}function i(E,N,T){return E.index=T,e?(T=E.alternate,T!==null?(T=T.index,T<N?(E.flags|=67108866,N):T):(E.flags|=67108866,N)):(E.flags|=1048576,N)}function u(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function x(E,N,T,Y){return N===null||N.tag!==6?(N=gc(T,E.mode,Y),N.return=E,N):(N=s(N,T),N.return=E,N)}function b(E,N,T,Y){var ne=T.type;return ne===A?H(E,N,T.props.children,Y,T.key):N!==null&&(N.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===Z&&sa(ne)===N.type)?(N=s(N,T.props),wn(N,T),N.return=E,N):(N=Es(T.type,T.key,T.props,null,E.mode,Y),wn(N,T),N.return=E,N)}function _(E,N,T,Y){return N===null||N.tag!==4||N.stateNode.containerInfo!==T.containerInfo||N.stateNode.implementation!==T.implementation?(N=vc(T,E.mode,Y),N.return=E,N):(N=s(N,T.children||[]),N.return=E,N)}function H(E,N,T,Y,ne){return N===null||N.tag!==7?(N=ea(T,E.mode,Y,ne),N.return=E,N):(N=s(N,T),N.return=E,N)}function X(E,N,T){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=gc(""+N,E.mode,T),N.return=E,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case z:return T=Es(N.type,N.key,N.props,null,E.mode,T),wn(T,N),T.return=E,T;case U:return N=vc(N,E.mode,T),N.return=E,N;case Z:return N=sa(N),X(E,N,T)}if(ae(N)||K(N))return N=ea(N,E.mode,T,null),N.return=E,N;if(typeof N.then=="function")return X(E,Ds(N),T);if(N.$$typeof===L)return X(E,Rs(E,N),T);Os(E,N)}return null}function M(E,N,T,Y){var ne=N!==null?N.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return ne!==null?null:x(E,N,""+T,Y);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case z:return T.key===ne?b(E,N,T,Y):null;case U:return T.key===ne?_(E,N,T,Y):null;case Z:return T=sa(T),M(E,N,T,Y)}if(ae(T)||K(T))return ne!==null?null:H(E,N,T,Y,null);if(typeof T.then=="function")return M(E,N,Ds(T),Y);if(T.$$typeof===L)return M(E,N,Rs(E,T),Y);Os(E,T)}return null}function O(E,N,T,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return E=E.get(T)||null,x(N,E,""+Y,ne);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case z:return E=E.get(Y.key===null?T:Y.key)||null,b(N,E,Y,ne);case U:return E=E.get(Y.key===null?T:Y.key)||null,_(N,E,Y,ne);case Z:return Y=sa(Y),O(E,N,T,Y,ne)}if(ae(Y)||K(Y))return E=E.get(T)||null,H(N,E,Y,ne,null);if(typeof Y.then=="function")return O(E,N,T,Ds(Y),ne);if(Y.$$typeof===L)return O(E,N,T,Rs(N,Y),ne);Os(N,Y)}return null}function ee(E,N,T,Y){for(var ne=null,Ce=null,te=N,he=N=0,je=null;te!==null&&he<T.length;he++){te.index>he?(je=te,te=null):je=te.sibling;var Ee=M(E,te,T[he],Y);if(Ee===null){te===null&&(te=je);break}e&&te&&Ee.alternate===null&&t(E,te),N=i(Ee,N,he),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee,te=je}if(he===T.length)return l(E,te),Ne&&tl(E,he),ne;if(te===null){for(;he<T.length;he++)te=X(E,T[he],Y),te!==null&&(N=i(te,N,he),Ce===null?ne=te:Ce.sibling=te,Ce=te);return Ne&&tl(E,he),ne}for(te=a(te);he<T.length;he++)je=O(te,E,he,T[he],Y),je!==null&&(e&&je.alternate!==null&&te.delete(je.key===null?he:je.key),N=i(je,N,he),Ce===null?ne=je:Ce.sibling=je,Ce=je);return e&&te.forEach(function(Ql){return t(E,Ql)}),Ne&&tl(E,he),ne}function ce(E,N,T,Y){if(T==null)throw Error(r(151));for(var ne=null,Ce=null,te=N,he=N=0,je=null,Ee=T.next();te!==null&&!Ee.done;he++,Ee=T.next()){te.index>he?(je=te,te=null):je=te.sibling;var Ql=M(E,te,Ee.value,Y);if(Ql===null){te===null&&(te=je);break}e&&te&&Ql.alternate===null&&t(E,te),N=i(Ql,N,he),Ce===null?ne=Ql:Ce.sibling=Ql,Ce=Ql,te=je}if(Ee.done)return l(E,te),Ne&&tl(E,he),ne;if(te===null){for(;!Ee.done;he++,Ee=T.next())Ee=X(E,Ee.value,Y),Ee!==null&&(N=i(Ee,N,he),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee);return Ne&&tl(E,he),ne}for(te=a(te);!Ee.done;he++,Ee=T.next())Ee=O(te,E,he,Ee.value,Y),Ee!==null&&(e&&Ee.alternate!==null&&te.delete(Ee.key===null?he:Ee.key),N=i(Ee,N,he),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee);return e&&te.forEach(function(Np){return t(E,Np)}),Ne&&tl(E,he),ne}function ke(E,N,T,Y){if(typeof T=="object"&&T!==null&&T.type===A&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case z:e:{for(var ne=T.key;N!==null;){if(N.key===ne){if(ne=T.type,ne===A){if(N.tag===7){l(E,N.sibling),Y=s(N,T.props.children),Y.return=E,E=Y;break e}}else if(N.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===Z&&sa(ne)===N.type){l(E,N.sibling),Y=s(N,T.props),wn(Y,T),Y.return=E,E=Y;break e}l(E,N);break}else t(E,N);N=N.sibling}T.type===A?(Y=ea(T.props.children,E.mode,Y,T.key),Y.return=E,E=Y):(Y=Es(T.type,T.key,T.props,null,E.mode,Y),wn(Y,T),Y.return=E,E=Y)}return u(E);case U:e:{for(ne=T.key;N!==null;){if(N.key===ne)if(N.tag===4&&N.stateNode.containerInfo===T.containerInfo&&N.stateNode.implementation===T.implementation){l(E,N.sibling),Y=s(N,T.children||[]),Y.return=E,E=Y;break e}else{l(E,N);break}else t(E,N);N=N.sibling}Y=vc(T,E.mode,Y),Y.return=E,E=Y}return u(E);case Z:return T=sa(T),ke(E,N,T,Y)}if(ae(T))return ee(E,N,T,Y);if(K(T)){if(ne=K(T),typeof ne!="function")throw Error(r(150));return T=ne.call(T),ce(E,N,T,Y)}if(typeof T.then=="function")return ke(E,N,Ds(T),Y);if(T.$$typeof===L)return ke(E,N,Rs(E,T),Y);Os(E,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,N!==null&&N.tag===6?(l(E,N.sibling),Y=s(N,T),Y.return=E,E=Y):(l(E,N),Y=gc(T,E.mode,Y),Y.return=E,E=Y),u(E)):l(E,N)}return function(E,N,T,Y){try{Sn=0;var ne=ke(E,N,T,Y);return Ua=null,ne}catch(te){if(te===ka||te===Ms)throw te;var Ce=jt(29,te,null,E.mode);return Ce.lanes=Y,Ce.return=E,Ce}finally{}}}var ca=ed(!0),td=ed(!1),El=!1;function _c(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mc(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 Al(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Tl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ae&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Cs(e),Bo(e,null,l),t}return ws(e,a,t,l),Cs(e)}function Cn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Xu(e,l)}}function zc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?s=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?s=i=t:i=i.next=t}else s=i=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Dc=!1;function En(){if(Dc){var e=Oa;if(e!==null)throw e}}function An(e,t,l,a){Dc=!1;var s=e.updateQueue;El=!1;var i=s.firstBaseUpdate,u=s.lastBaseUpdate,x=s.shared.pending;if(x!==null){s.shared.pending=null;var b=x,_=b.next;b.next=null,u===null?i=_:u.next=_,u=b;var H=e.alternate;H!==null&&(H=H.updateQueue,x=H.lastBaseUpdate,x!==u&&(x===null?H.firstBaseUpdate=_:x.next=_,H.lastBaseUpdate=b))}if(i!==null){var X=s.baseState;u=0,H=_=b=null,x=i;do{var M=x.lane&-536870913,O=M!==x.lane;if(O?(ye&M)===M:(a&M)===M){M!==0&&M===Da&&(Dc=!0),H!==null&&(H=H.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ee=e,ce=x;M=t;var ke=l;switch(ce.tag){case 1:if(ee=ce.payload,typeof ee=="function"){X=ee.call(ke,X,M);break e}X=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ce.payload,M=typeof ee=="function"?ee.call(ke,X,M):ee,M==null)break e;X=w({},X,M);break e;case 2:El=!0}}M=x.callback,M!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[M]:O.push(M))}else O={lane:M,tag:x.tag,payload:x.payload,callback:x.callback,next:null},H===null?(_=H=O,b=X):H=H.next=O,u|=M;if(x=x.next,x===null){if(x=s.shared.pending,x===null)break;O=x,x=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);H===null&&(b=X),s.baseState=b,s.firstBaseUpdate=_,s.lastBaseUpdate=H,i===null&&(s.shared.lanes=0),Dl|=u,e.lanes=u,e.memoizedState=X}}function ld(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function ad(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ld(l[e],t)}var Ha=S(null),ks=S(0);function nd(e,t){e=fl,W(ks,e),W(Ha,t),fl=e|t.baseLanes}function Oc(){W(ks,fl),W(Ha,Ha.current)}function kc(){fl=ks.current,V(Ha),V(ks)}var Nt=S(null),kt=null;function Rl(e){var t=e.alternate;W(Xe,Xe.current&1),W(Nt,e),kt===null&&(t===null||Ha.current!==null||t.memoizedState!==null)&&(kt=e)}function Uc(e){W(Xe,Xe.current),W(Nt,e),kt===null&&(kt=e)}function sd(e){e.tag===22?(W(Xe,Xe.current),W(Nt,e),kt===null&&(kt=e)):_l()}function _l(){W(Xe,Xe.current),W(Nt,Nt.current)}function St(e){V(Nt),kt===e&&(kt=null),V(Xe)}var Xe=S(0);function Us(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gr(l)||Qr(l)))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 nl=0,me=null,De=null,Ke=null,Hs=!1,Ba=!1,ra=!1,Bs=0,Tn=0,La=null,fx=0;function Ge(){throw Error(r(321))}function Hc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!yt(e[l],t[l]))return!1;return!0}function Bc(e,t,l,a,s,i){return nl=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Gd:Ic,ra=!1,i=l(a,s),ra=!1,Ba&&(i=cd(t,l,a,s)),id(e),i}function id(e){k.H=Mn;var t=De!==null&&De.next!==null;if(nl=0,Ke=De=me=null,Hs=!1,Tn=0,La=null,t)throw Error(r(300));e===null||Je||(e=e.dependencies,e!==null&&Ts(e)&&(Je=!0))}function cd(e,t,l,a){me=e;var s=0;do{if(Ba&&(La=null),Tn=0,Ba=!1,25<=s)throw Error(r(301));if(s+=1,Ke=De=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}k.H=Qd,i=t(l,a)}while(Ba);return i}function mx(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Rn(t):t,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(me.flags|=1024),t}function Lc(){var e=Bs!==0;return Bs=0,e}function qc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Yc(e){if(Hs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Hs=!1}nl=0,Ke=De=me=null,Ba=!1,Tn=Bs=0,La=null}function ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?me.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function Ze(){if(De===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Ke===null?me.memoizedState:Ke.next;if(t!==null)Ke=t,De=e;else{if(e===null)throw me.alternate===null?Error(r(467)):Error(r(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Ke===null?me.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Ls(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rn(e){var t=Tn;return Tn+=1,La===null&&(La=[]),e=Wo(La,e,t),t=me,(Ke===null?t.memoizedState:Ke.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Gd:Ic),e}function qs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Rn(e);if(e.$$typeof===L)return at(e)}throw Error(r(438,String(e)))}function Gc(e){var t=null,l=me.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=me.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ls(),me.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=de;return t.index++,l}function sl(e,t){return typeof t=="function"?t(e):t}function Ys(e){var t=Ze();return Qc(t,De,e)}function Qc(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var u=s.next;s.next=i.next,i.next=u}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var x=u=null,b=null,_=t,H=!1;do{var X=_.lane&-536870913;if(X!==_.lane?(ye&X)===X:(nl&X)===X){var M=_.revertLane;if(M===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),X===Da&&(H=!0);else if((nl&M)===M){_=_.next,M===Da&&(H=!0);continue}else X={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(x=b=X,u=i):b=b.next=X,me.lanes|=M,Dl|=M;X=_.action,ra&&l(i,X),i=_.hasEagerState?_.eagerState:l(i,X)}else M={lane:X,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(x=b=M,u=i):b=b.next=M,me.lanes|=X,Dl|=X;_=_.next}while(_!==null&&_!==t);if(b===null?u=i:b.next=x,!yt(i,e.memoizedState)&&(Je=!0,H&&(l=Oa,l!==null)))throw l;e.memoizedState=i,e.baseState=u,e.baseQueue=b,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Vc(e){var t=Ze(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,i=t.memoizedState;if(s!==null){l.pending=null;var u=s=s.next;do i=e(i,u.action),u=u.next;while(u!==s);yt(i,t.memoizedState)||(Je=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function rd(e,t,l){var a=me,s=Ze(),i=Ne;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var u=!yt((De||s).memoizedState,l);if(u&&(s.memoizedState=l,Je=!0),s=s.queue,$c(dd.bind(null,a,s,e),[e]),s.getSnapshot!==t||u||Ke!==null&&Ke.memoizedState.tag&1){if(a.flags|=2048,qa(9,{destroy:void 0},od.bind(null,a,s,l,t),null),Ue===null)throw Error(r(349));i||(nl&127)!==0||ud(a,t,l)}return l}function ud(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=me.updateQueue,t===null?(t=Ls(),me.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function od(e,t,l,a){t.value=l,t.getSnapshot=a,fd(t)&&md(e)}function dd(e,t,l){return l(function(){fd(t)&&md(e)})}function fd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!yt(e,l)}catch{return!0}}function md(e){var t=Il(e,2);t!==null&&pt(t,e,2)}function Xc(e){var t=ut();if(typeof e=="function"){var l=e;if(e=l(),ra){bl(!0);try{l()}finally{bl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:e},t}function hd(e,t,l,a){return e.baseState=l,Qc(e,De,typeof a=="function"?a:sl)}function hx(e,t,l,a,s){if(Vs(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};k.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,xd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function xd(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=k.T,u={};k.T=u;try{var x=l(s,a),b=k.S;b!==null&&b(u,x),pd(e,t,x)}catch(_){Zc(e,t,_)}finally{i!==null&&u.types!==null&&(i.types=u.types),k.T=i}}else try{i=l(s,a),pd(e,t,i)}catch(_){Zc(e,t,_)}}function pd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){gd(e,t,a)},function(a){return Zc(e,t,a)}):gd(e,t,l)}function gd(e,t,l){t.status="fulfilled",t.value=l,vd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,xd(e,l)))}function Zc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,vd(t),t=t.next;while(t!==a)}e.action=null}function vd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bd(e,t){return t}function yd(e,t){if(Ne){var l=Ue.formState;if(l!==null){e:{var a=me;if(Ne){if(He){t:{for(var s=He,i=Ot;s.nodeType!==8;){if(!i){s=null;break t}if(s=Ut(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){He=Ut(s.nextSibling),a=s.data==="F!";break e}}wl(a)}a=!1}a&&(t=l[0])}}return l=ut(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bd,lastRenderedState:t},l.queue=a,l=Ld.bind(null,me,a),a.dispatch=l,a=Xc(!1),i=Pc.bind(null,me,!1,a.queue),a=ut(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=hx.bind(null,me,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function jd(e){var t=Ze();return Nd(t,De,e)}function Nd(e,t,l){if(t=Qc(e,t,bd)[0],e=Ys(sl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Rn(t)}catch(u){throw u===ka?Ms:u}else a=t;t=Ze();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(me.flags|=2048,qa(9,{destroy:void 0},xx.bind(null,s,l),null)),[a,i,e]}function xx(e,t){e.action=t}function Sd(e){var t=Ze(),l=De;if(l!==null)return Nd(t,l,e);Ze(),t=t.memoizedState,l=Ze();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function qa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=me.updateQueue,t===null&&(t=Ls(),me.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function wd(){return Ze().memoizedState}function Gs(e,t,l,a){var s=ut();me.flags|=e,s.memoizedState=qa(1|t,{destroy:void 0},l,a===void 0?null:a)}function Qs(e,t,l,a){var s=Ze();a=a===void 0?null:a;var i=s.memoizedState.inst;De!==null&&a!==null&&Hc(a,De.memoizedState.deps)?s.memoizedState=qa(t,i,l,a):(me.flags|=e,s.memoizedState=qa(1|t,i,l,a))}function Cd(e,t){Gs(8390656,8,e,t)}function $c(e,t){Qs(2048,8,e,t)}function px(e){me.flags|=4;var t=me.updateQueue;if(t===null)t=Ls(),me.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ed(e){var t=Ze().memoizedState;return px({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Ad(e,t){return Qs(4,2,e,t)}function Td(e,t){return Qs(4,4,e,t)}function Rd(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _d(e,t,l){l=l!=null?l.concat([e]):null,Qs(4,4,Rd.bind(null,t,e),l)}function Kc(){}function Md(e,t){var l=Ze();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Hc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function zd(e,t){var l=Ze();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Hc(t,a[1]))return a[0];if(a=e(),ra){bl(!0);try{e()}finally{bl(!1)}}return l.memoizedState=[a,t],a}function Jc(e,t,l){return l===void 0||(nl&1073741824)!==0&&(ye&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Of(),me.lanes|=e,Dl|=e,l)}function Dd(e,t,l,a){return yt(l,t)?l:Ha.current!==null?(e=Jc(e,l,a),yt(e,t)||(Je=!0),e):(nl&42)===0||(nl&1073741824)!==0&&(ye&261930)===0?(Je=!0,e.memoizedState=l):(e=Of(),me.lanes|=e,Dl|=e,t)}function Od(e,t,l,a,s){var i=F.p;F.p=i!==0&&8>i?i:8;var u=k.T,x={};k.T=x,Pc(e,!1,t,l);try{var b=s(),_=k.S;if(_!==null&&_(x,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var H=dx(b,a);_n(e,t,H,Et(e))}else _n(e,t,a,Et(e))}catch(X){_n(e,t,{then:function(){},status:"rejected",reason:X},Et())}finally{F.p=i,u!==null&&x.types!==null&&(u.types=x.types),k.T=u}}function gx(){}function Fc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var s=kd(e).queue;Od(e,s,t,$,l===null?gx:function(){return Ud(e),l(a)})}function kd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:$},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ud(e){var t=kd(e);t.next===null&&(t=e.alternate.memoizedState),_n(e,t.next.queue,{},Et())}function Wc(){return at($n)}function Hd(){return Ze().memoizedState}function Bd(){return Ze().memoizedState}function vx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Et();e=Al(l);var a=Tl(t,e,l);a!==null&&(pt(a,t,l),Cn(a,t,l)),t={cache:Ec()},e.payload=t;return}t=t.return}}function bx(e,t,l){var a=Et();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Vs(e)?qd(t,l):(l=xc(e,t,l,a),l!==null&&(pt(l,e,a),Yd(l,t,a)))}function Ld(e,t,l){var a=Et();_n(e,t,l,a)}function _n(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))qd(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,x=i(u,l);if(s.hasEagerState=!0,s.eagerState=x,yt(x,u))return ws(e,t,s,0),Ue===null&&Ss(),!1}catch{}finally{}if(l=xc(e,t,s,a),l!==null)return pt(l,e,a),Yd(l,t,a),!0}return!1}function Pc(e,t,l,a){if(a={lane:2,revertLane:_r(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(r(479))}else t=xc(e,l,a,2),t!==null&&pt(t,e,2)}function Vs(e){var t=e.alternate;return e===me||t!==null&&t===me}function qd(e,t){Ba=Hs=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Yd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Xu(e,l)}}var Mn={readContext:at,use:qs,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Mn.useEffectEvent=Ge;var Gd={readContext:at,use:qs,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Cd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Gs(4194308,4,Rd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){Gs(4,2,e,t)},useMemo:function(e,t){var l=ut();t=t===void 0?null:t;var a=e();if(ra){bl(!0);try{e()}finally{bl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=ut();if(l!==void 0){var s=l(t);if(ra){bl(!0);try{l(t)}finally{bl(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=bx.bind(null,me,e),[a.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:function(e){e=Xc(e);var t=e.queue,l=Ld.bind(null,me,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Kc,useDeferredValue:function(e,t){var l=ut();return Jc(l,e,t)},useTransition:function(){var e=Xc(!1);return e=Od.bind(null,me,e.queue,!0,!1),ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=me,s=ut();if(Ne){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Ue===null)throw Error(r(349));(ye&127)!==0||ud(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,Cd(dd.bind(null,a,i,e),[e]),a.flags|=2048,qa(9,{destroy:void 0},od.bind(null,a,i,l,t),null),l},useId:function(){var e=ut(),t=Ue.identifierPrefix;if(Ne){var l=Xt,a=Vt;l=(a&~(1<<32-bt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Bs++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=fx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Wc,useFormState:yd,useActionState:yd,useOptimistic:function(e){var t=ut();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Pc.bind(null,me,!0,l),l.dispatch=t,[e,t]},useMemoCache:Gc,useCacheRefresh:function(){return ut().memoizedState=vx.bind(null,me)},useEffectEvent:function(e){var t=ut(),l={impl:e};return t.memoizedState=l,function(){if((Ae&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Ic={readContext:at,use:qs,useCallback:Md,useContext:at,useEffect:$c,useImperativeHandle:_d,useInsertionEffect:Ad,useLayoutEffect:Td,useMemo:zd,useReducer:Ys,useRef:wd,useState:function(){return Ys(sl)},useDebugValue:Kc,useDeferredValue:function(e,t){var l=Ze();return Dd(l,De.memoizedState,e,t)},useTransition:function(){var e=Ys(sl)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:Rn(e),t]},useSyncExternalStore:rd,useId:Hd,useHostTransitionStatus:Wc,useFormState:jd,useActionState:jd,useOptimistic:function(e,t){var l=Ze();return hd(l,De,e,t)},useMemoCache:Gc,useCacheRefresh:Bd};Ic.useEffectEvent=Ed;var Qd={readContext:at,use:qs,useCallback:Md,useContext:at,useEffect:$c,useImperativeHandle:_d,useInsertionEffect:Ad,useLayoutEffect:Td,useMemo:zd,useReducer:Vc,useRef:wd,useState:function(){return Vc(sl)},useDebugValue:Kc,useDeferredValue:function(e,t){var l=Ze();return De===null?Jc(l,e,t):Dd(l,De.memoizedState,e,t)},useTransition:function(){var e=Vc(sl)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:Rn(e),t]},useSyncExternalStore:rd,useId:Hd,useHostTransitionStatus:Wc,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,t){var l=Ze();return De!==null?hd(l,De,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Gc,useCacheRefresh:Bd};Qd.useEffectEvent=Ed;function er(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:w({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var tr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Et(),s=Al(a);s.payload=t,l!=null&&(s.callback=l),t=Tl(e,s,a),t!==null&&(pt(t,e,a),Cn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Et(),s=Al(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=Tl(e,s,a),t!==null&&(pt(t,e,a),Cn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Et(),a=Al(l);a.tag=2,t!=null&&(a.callback=t),t=Tl(e,a,l),t!==null&&(pt(t,e,l),Cn(t,e,l))}};function Vd(e,t,l,a,s,i,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,u):t.prototype&&t.prototype.isPureReactComponent?!gn(l,a)||!gn(s,i):!0}function Xd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&tr.enqueueReplaceState(t,t.state,null)}function ua(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=w({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Zd(e){Ns(e)}function $d(e){console.error(e)}function Kd(e){Ns(e)}function Xs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Jd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function lr(e,t,l){return l=Al(l),l.tag=3,l.payload={element:null},l.callback=function(){Xs(e,t)},l}function Fd(e){return e=Al(e),e.tag=3,e}function Wd(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){Jd(t,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){Jd(t,l,a),typeof s!="function"&&(Ol===null?Ol=new Set([this]):Ol.add(this));var x=a.stack;this.componentDidCatch(a.value,{componentStack:x!==null?x:""})})}function yx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&za(t,l,s,!0),l=Nt.current,l!==null){switch(l.tag){case 31:case 13:return kt===null?ai():l.alternate===null&&Qe===0&&(Qe=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===zs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Ar(e,a,s)),!1;case 22:return l.flags|=65536,a===zs?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Ar(e,a,s)),!1}throw Error(r(435,l.tag))}return Ar(e,a,s),ai(),!1}if(Ne)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==jc&&(e=Error(r(422),{cause:a}),yn(Mt(e,l)))):(a!==jc&&(t=Error(r(423),{cause:a}),yn(Mt(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=Mt(a,l),s=lr(e.stateNode,a,s),zc(e,s),Qe!==4&&(Qe=2)),!1;var i=Error(r(520),{cause:a});if(i=Mt(i,l),Ln===null?Ln=[i]:Ln.push(i),Qe!==4&&(Qe=2),t===null)return!0;a=Mt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=lr(l.stateNode,a,e),zc(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ol===null||!Ol.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Fd(s),Wd(s,e,l,a),zc(l,s),!1}l=l.return}while(l!==null);return!1}var ar=Error(r(461)),Je=!1;function nt(e,t,l,a){t.child=e===null?td(t,null,l,a):ca(t,e.child,l,a)}function Pd(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var u={};for(var x in a)x!=="ref"&&(u[x]=a[x])}else u=a;return aa(t),a=Bc(e,t,l,u,i,s),x=Lc(),e!==null&&!Je?(qc(e,t,s),il(e,t,s)):(Ne&&x&&bc(t),t.flags|=1,nt(e,t,a,s),t.child)}function Id(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!pc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,ef(e,t,i,a,s)):(e=Es(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!dr(e,s)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:gn,l(u,a)&&e.ref===t.ref)return il(e,t,s)}return t.flags|=1,e=el(i,a),e.ref=t.ref,e.return=t,t.child=e}function ef(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(gn(i,a)&&e.ref===t.ref)if(Je=!1,t.pendingProps=a=i,dr(e,s))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,il(e,t,s)}return nr(e,t,l,a,s)}function tf(e,t,l,a){var s=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~i}else a=0,t.child=null;return lf(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_s(t,i!==null?i.cachePool:null),i!==null?nd(t,i):Oc(),sd(t);else return a=t.lanes=536870912,lf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(_s(t,i.cachePool),nd(t,i),_l(),t.memoizedState=null):(e!==null&&_s(t,null),Oc(),_l());return nt(e,t,s,l),t.child}function zn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lf(e,t,l,a,s){var i=Tc();return i=i===null?null:{parent:$e._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&_s(t,null),Oc(),sd(t),e!==null&&za(e,t,a,!0),t.childLanes=s,null}function Zs(e,t){return t=Ks({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function af(e,t,l){return ca(t,e.child,null,l),e=Zs(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function jx(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(a.mode==="hidden")return e=Zs(t,a),t.lanes=536870912,zn(null,e);if(Uc(t),(e=He)?(e=pm(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Nl!==null?{id:Vt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},l=qo(e),l.return=t,t.child=l,lt=t,He=null)):e=null,e===null)throw wl(t);return t.lanes=536870912,null}return Zs(t,a)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(Uc(t),s)if(t.flags&256)t.flags&=-257,t=af(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Je||za(e,t,l,!1),s=(l&e.childLanes)!==0,Je||s){if(a=Ue,a!==null&&(u=Zu(a,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,Il(e,u),pt(a,e,u),ar;ai(),t=af(e,t,l)}else e=i.treeContext,He=Ut(u.nextSibling),lt=t,Ne=!0,Sl=null,Ot=!1,e!==null&&Qo(t,e),t=Zs(t,a),t.flags|=4096;return t}return e=el(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function $s(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function nr(e,t,l,a,s){return aa(t),l=Bc(e,t,l,a,void 0,s),a=Lc(),e!==null&&!Je?(qc(e,t,s),il(e,t,s)):(Ne&&a&&bc(t),t.flags|=1,nt(e,t,l,s),t.child)}function nf(e,t,l,a,s,i){return aa(t),t.updateQueue=null,l=cd(t,a,l,s),id(e),a=Lc(),e!==null&&!Je?(qc(e,t,i),il(e,t,i)):(Ne&&a&&bc(t),t.flags|=1,nt(e,t,l,i),t.child)}function sf(e,t,l,a,s){if(aa(t),t.stateNode===null){var i=Ta,u=l.contextType;typeof u=="object"&&u!==null&&(i=at(u)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=tr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},_c(t),u=l.contextType,i.context=typeof u=="object"&&u!==null?at(u):Ta,i.state=t.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(er(t,l,u,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&tr.enqueueReplaceState(i,i.state,null),An(t,a,i,s),En(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var x=t.memoizedProps,b=ua(l,x);i.props=b;var _=i.context,H=l.contextType;u=Ta,typeof H=="object"&&H!==null&&(u=at(H));var X=l.getDerivedStateFromProps;H=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(x||_!==u)&&Xd(t,i,a,u),El=!1;var M=t.memoizedState;i.state=M,An(t,a,i,s),En(),_=t.memoizedState,x||M!==_||El?(typeof X=="function"&&(er(t,l,X,a),_=t.memoizedState),(b=El||Vd(t,l,b,a,M,_,u))?(H||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=_),i.props=a,i.state=_,i.context=u,a=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Mc(e,t),u=t.memoizedProps,H=ua(l,u),i.props=H,X=t.pendingProps,M=i.context,_=l.contextType,b=Ta,typeof _=="object"&&_!==null&&(b=at(_)),x=l.getDerivedStateFromProps,(_=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==X||M!==b)&&Xd(t,i,a,b),El=!1,M=t.memoizedState,i.state=M,An(t,a,i,s),En();var O=t.memoizedState;u!==X||M!==O||El||e!==null&&e.dependencies!==null&&Ts(e.dependencies)?(typeof x=="function"&&(er(t,l,x,a),O=t.memoizedState),(H=El||Vd(t,l,H,a,M,O,b)||e!==null&&e.dependencies!==null&&Ts(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=b,a=H):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,$s(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=ca(t,e.child,null,s),t.child=ca(t,null,l,s)):nt(e,t,l,s),t.memoizedState=i.state,e=t.child):e=il(e,t,s),e}function cf(e,t,l,a){return ta(),t.flags|=256,nt(e,t,l,a),t.child}var sr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ir(e){return{baseLanes:e,cachePool:Jo()}}function cr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ct),e}function rf(e,t,l){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(Xe.current&2)!==0),u&&(s=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(s?Rl(t):_l(),(e=He)?(e=pm(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Nl!==null?{id:Vt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},l=qo(e),l.return=t,t.child=l,lt=t,He=null)):e=null,e===null)throw wl(t);return Qr(e)?t.lanes=32:t.lanes=536870912,null}var x=a.children;return a=a.fallback,s?(_l(),s=t.mode,x=Ks({mode:"hidden",children:x},s),a=ea(a,s,l,null),x.return=t,a.return=t,x.sibling=a,t.child=x,a=t.child,a.memoizedState=ir(l),a.childLanes=cr(e,u,l),t.memoizedState=sr,zn(null,a)):(Rl(t),rr(t,x))}var b=e.memoizedState;if(b!==null&&(x=b.dehydrated,x!==null)){if(i)t.flags&256?(Rl(t),t.flags&=-257,t=ur(e,t,l)):t.memoizedState!==null?(_l(),t.child=e.child,t.flags|=128,t=null):(_l(),x=a.fallback,s=t.mode,a=Ks({mode:"visible",children:a.children},s),x=ea(x,s,l,null),x.flags|=2,a.return=t,x.return=t,a.sibling=x,t.child=a,ca(t,e.child,null,l),a=t.child,a.memoizedState=ir(l),a.childLanes=cr(e,u,l),t.memoizedState=sr,t=zn(null,a));else if(Rl(t),Qr(x)){if(u=x.nextSibling&&x.nextSibling.dataset,u)var _=u.dgst;u=_,a=Error(r(419)),a.stack="",a.digest=u,yn({value:a,source:null,stack:null}),t=ur(e,t,l)}else if(Je||za(e,t,l,!1),u=(l&e.childLanes)!==0,Je||u){if(u=Ue,u!==null&&(a=Zu(u,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,Il(e,a),pt(u,e,a),ar;Gr(x)||ai(),t=ur(e,t,l)}else Gr(x)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,He=Ut(x.nextSibling),lt=t,Ne=!0,Sl=null,Ot=!1,e!==null&&Qo(t,e),t=rr(t,a.children),t.flags|=4096);return t}return s?(_l(),x=a.fallback,s=t.mode,b=e.child,_=b.sibling,a=el(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,_!==null?x=el(_,x):(x=ea(x,s,l,null),x.flags|=2),x.return=t,a.return=t,a.sibling=x,t.child=a,zn(null,a),a=t.child,x=e.child.memoizedState,x===null?x=ir(l):(s=x.cachePool,s!==null?(b=$e._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=Jo(),x={baseLanes:x.baseLanes|l,cachePool:s}),a.memoizedState=x,a.childLanes=cr(e,u,l),t.memoizedState=sr,zn(e.child,a)):(Rl(t),l=e.child,e=l.sibling,l=el(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=l,t.memoizedState=null,l)}function rr(e,t){return t=Ks({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ks(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function ur(e,t,l){return ca(t,e.child,null,l),e=rr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),wc(e.return,t,l)}function or(e,t,l,a,s,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=s,u.treeForkCount=i)}function of(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var u=Xe.current,x=(u&2)!==0;if(x?(u=u&1|2,t.flags|=128):u&=1,W(Xe,u),nt(e,t,a,l),a=Ne?bn:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uf(e,l,t);else if(e.tag===19)uf(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Us(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),or(t,!1,s,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Us(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}or(t,!0,l,null,i,a);break;case"together":or(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function il(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Dl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(za(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=el(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=el(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function dr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ts(e)))}function Nx(e,t,l){switch(t.tag){case 3:Pe(t,t.stateNode.containerInfo),Cl(t,$e,e.memoizedState.cache),ta();break;case 27:case 5:an(t);break;case 4:Pe(t,t.stateNode.containerInfo);break;case 10:Cl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Uc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Rl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?rf(e,t,l):(Rl(t),e=il(e,t,l),e!==null?e.sibling:null);Rl(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(za(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return of(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),W(Xe,Xe.current),a)break;return null;case 22:return t.lanes=0,tf(e,t,l,t.pendingProps);case 24:Cl(t,$e,e.memoizedState.cache)}return il(e,t,l)}function df(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!dr(e,l)&&(t.flags&128)===0)return Je=!1,Nx(e,t,l);Je=(e.flags&131072)!==0}else Je=!1,Ne&&(t.flags&1048576)!==0&&Go(t,bn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=sa(t.elementType),t.type=e,typeof e=="function")pc(e)?(a=ua(e,a),t.tag=1,t=sf(null,t,e,a,l)):(t.tag=0,t=nr(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===J){t.tag=11,t=Pd(null,t,e,a,l);break e}else if(s===Q){t.tag=14,t=Id(null,t,e,a,l);break e}}throw t=we(e)||e,Error(r(306,t,""))}}return t;case 0:return nr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=ua(a,t.pendingProps),sf(e,t,a,s,l);case 3:e:{if(Pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,Mc(e,t),An(t,a,null,l);var u=t.memoizedState;if(a=u.cache,Cl(t,$e,a),a!==i.cache&&Cc(t,[$e],l,!0),En(),a=u.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cf(e,t,a,l);break e}else if(a!==s){s=Mt(Error(r(424)),t),yn(s),t=cf(e,t,a,l);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(He=Ut(e.firstChild),lt=t,Ne=!0,Sl=null,Ot=!0,l=td(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ta(),a===s){t=il(e,t,l);break e}nt(e,t,a,l)}t=t.child}return t;case 26:return $s(e,t),e===null?(l=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ne||(l=t.type,e=t.pendingProps,a=oi(re.current).createElement(l),a[tt]=t,a[ot]=e,st(a,l,e),Ie(a),t.stateNode=a):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return an(t),e===null&&Ne&&(a=t.stateNode=bm(t.type,t.pendingProps,re.current),lt=t,Ot=!0,s=He,Bl(t.type)?(Vr=s,He=Ut(a.firstChild)):He=s),nt(e,t,t.pendingProps.children,l),$s(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((s=a=He)&&(a=Px(a,t.type,t.pendingProps,Ot),a!==null?(t.stateNode=a,lt=t,He=Ut(a.firstChild),Ot=!1,s=!0):s=!1),s||wl(t)),an(t),s=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,a=i.children,Lr(s,i)?a=null:u!==null&&Lr(s,u)&&(t.flags|=32),t.memoizedState!==null&&(s=Bc(e,t,mx,null,null,l),$n._currentValue=s),$s(e,t),nt(e,t,a,l),t.child;case 6:return e===null&&Ne&&((e=l=He)&&(l=Ix(l,t.pendingProps,Ot),l!==null?(t.stateNode=l,lt=t,He=null,e=!0):e=!1),e||wl(t)),null;case 13:return rf(e,t,l);case 4:return Pe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ca(t,null,a,l):nt(e,t,a,l),t.child;case 11:return Pd(e,t,t.type,t.pendingProps,l);case 7:return nt(e,t,t.pendingProps,l),t.child;case 8:return nt(e,t,t.pendingProps.children,l),t.child;case 12:return nt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Cl(t,t.type,a.value),nt(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,aa(t),s=at(s),a=a(s),t.flags|=1,nt(e,t,a,l),t.child;case 14:return Id(e,t,t.type,t.pendingProps,l);case 15:return ef(e,t,t.type,t.pendingProps,l);case 19:return of(e,t,l);case 31:return jx(e,t,l);case 22:return tf(e,t,l,t.pendingProps);case 24:return aa(t),a=at($e),e===null?(s=Tc(),s===null&&(s=Ue,i=Ec(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},_c(t),Cl(t,$e,s)):((e.lanes&l)!==0&&(Mc(e,t),An(t,null,null,l),En()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Cl(t,$e,a)):(a=i.cache,Cl(t,$e,a),a!==s.cache&&Cc(t,[$e],l,!0))),nt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function cl(e){e.flags|=4}function fr(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Bf())e.flags|=8192;else throw ia=zs,Rc}else e.flags&=-16777217}function ff(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Am(t))if(Bf())e.flags|=8192;else throw ia=zs,Rc}function Js(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Qu():536870912,e.lanes|=t,Va|=t)}function Dn(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Sx(e,t,l){var a=t.pendingProps;switch(yc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),al($e),Ve(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ma(t)?cl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nc())),Be(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(cl(t),i!==null?(Be(t),ff(t,i)):(Be(t),fr(t,s,null,a,l))):i?i!==e.memoizedState?(cl(t),Be(t),ff(t,i)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&cl(t),Be(t),fr(t,s,e,a,l)),null;case 27:if(is(t),l=re.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Be(t),null}e=I.current,Ma(t)?Vo(t):(e=bm(s,a,l),t.stateNode=e,cl(t))}return Be(t),null;case 5:if(is(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Be(t),null}if(i=I.current,Ma(t))Vo(t);else{var u=oi(re.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?u.createElement(s,{is:a.is}):u.createElement(s)}}i[tt]=t,i[ot]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=i;e:switch(st(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&cl(t)}}return Be(t),fr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=re.current,Ma(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=lt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[tt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||rm(e.nodeValue,l)),e||wl(t,!0)}else e=oi(e).createTextNode(a),e[tt]=t,t.stateNode=e}return Be(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ma(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[tt]=t}else ta(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else l=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Be(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ma(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[tt]=t}else ta(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),s=!1}else s=Nc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Js(t,t.updateQueue),Be(t),null);case 4:return Ve(),e===null&&Or(t.stateNode.containerInfo),Be(t),null;case 10:return al(t.type),Be(t),null;case 19:if(V(Xe),a=t.memoizedState,a===null)return Be(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)Dn(a,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Us(e),i!==null){for(t.flags|=128,Dn(a,!1),e=i.updateQueue,t.updateQueue=e,Js(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Lo(l,e),l=l.sibling;return W(Xe,Xe.current&1|2),Ne&&tl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&gt()>ei&&(t.flags|=128,s=!0,Dn(a,!1),t.lanes=4194304)}else{if(!s)if(e=Us(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Js(t,e),Dn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Ne)return Be(t),null}else 2*gt()-a.renderingStartTime>ei&&l!==536870912&&(t.flags|=128,s=!0,Dn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=gt(),e.sibling=null,l=Xe.current,W(Xe,s?l&1|2:l&1),Ne&&tl(t,a.treeForkCount),e):(Be(t),null);case 22:case 23:return St(t),kc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),l=t.updateQueue,l!==null&&Js(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&V(na),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),al($e),Be(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function wx(e,t){switch(yc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return al($e),Ve(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return is(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(r(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Xe),null;case 4:return Ve(),null;case 10:return al(t.type),null;case 22:case 23:return St(t),kc(),e!==null&&V(na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return al($e),null;case 25:return null;default:return null}}function mf(e,t){switch(yc(t),t.tag){case 3:al($e),Ve();break;case 26:case 27:case 5:is(t);break;case 4:Ve();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:V(Xe);break;case 10:al(t.type);break;case 22:case 23:St(t),kc(),e!==null&&V(na);break;case 24:al($e)}}function On(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var i=l.create,u=l.inst;a=i(),u.destroy=a}l=l.next}while(l!==s)}}catch(x){ze(t,t.return,x)}}function Ml(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var u=a.inst,x=u.destroy;if(x!==void 0){u.destroy=void 0,s=t;var b=l,_=x;try{_()}catch(H){ze(s,b,H)}}}a=a.next}while(a!==i)}}catch(H){ze(t,t.return,H)}}function hf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ad(t,l)}catch(a){ze(e,e.return,a)}}}function xf(e,t,l){l.props=ua(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){ze(e,t,a)}}function kn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){ze(e,t,s)}}function Zt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){ze(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){ze(e,t,s)}else l.current=null}function pf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){ze(e,e.return,s)}}function mr(e,t,l){try{var a=e.stateNode;Zx(a,e.type,l,t),a[ot]=t}catch(s){ze(e,e.return,s)}}function gf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bl(e.type)||e.tag===4}function hr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gf(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&&Bl(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 xr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Pt));else if(a!==4&&(a===27&&Bl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(xr(e,t,l),e=e.sibling;e!==null;)xr(e,t,l),e=e.sibling}function Fs(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Bl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Fs(e,t,l),e=e.sibling;e!==null;)Fs(e,t,l),e=e.sibling}function vf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);st(t,a,l),t[tt]=e,t[ot]=l}catch(i){ze(e,e.return,i)}}var rl=!1,Fe=!1,pr=!1,bf=typeof WeakSet=="function"?WeakSet:Set,et=null;function Cx(e,t){if(e=e.containerInfo,Hr=gi,e=_o(e),uc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var u=0,x=-1,b=-1,_=0,H=0,X=e,M=null;t:for(;;){for(var O;X!==l||s!==0&&X.nodeType!==3||(x=u+s),X!==i||a!==0&&X.nodeType!==3||(b=u+a),X.nodeType===3&&(u+=X.nodeValue.length),(O=X.firstChild)!==null;)M=X,X=O;for(;;){if(X===e)break t;if(M===l&&++_===s&&(x=u),M===i&&++H===a&&(b=u),(O=X.nextSibling)!==null)break;X=M,M=X.parentNode}X=O}l=x===-1||b===-1?null:{start:x,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Br={focusedElem:e,selectionRange:l},gi=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,i=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(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,s=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var ee=ua(l.type,s);e=a.getSnapshotBeforeUpdate(ee,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ce){ze(l,l.return,ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Yr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Yr(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function yf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ol(e,l),a&4&&On(5,l);break;case 1:if(ol(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(u){ze(l,l.return,u)}else{var s=ua(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){ze(l,l.return,u)}}a&64&&hf(l),a&512&&kn(l,l.return);break;case 3:if(ol(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{ad(e,t)}catch(u){ze(l,l.return,u)}}break;case 27:t===null&&a&4&&vf(l);case 26:case 5:ol(e,l),t===null&&a&4&&pf(l),a&512&&kn(l,l.return);break;case 12:ol(e,l);break;case 31:ol(e,l),a&4&&Sf(e,l);break;case 13:ol(e,l),a&4&&wf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ox.bind(null,l),ep(e,l))));break;case 22:if(a=l.memoizedState!==null||rl,!a){t=t!==null&&t.memoizedState!==null||Fe,s=rl;var i=Fe;rl=a,(Fe=t)&&!i?dl(e,l,(l.subtreeFlags&8772)!==0):ol(e,l),rl=s,Fe=i}break;case 30:break;default:ol(e,l)}}function jf(e){var t=e.alternate;t!==null&&(e.alternate=null,jf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Zi(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 Le=null,ft=!1;function ul(e,t,l){for(l=l.child;l!==null;)Nf(e,t,l),l=l.sibling}function Nf(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(nn,l)}catch{}switch(l.tag){case 26:Fe||Zt(l,t),ul(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Fe||Zt(l,t);var a=Le,s=ft;Bl(l.type)&&(Le=l.stateNode,ft=!1),ul(e,t,l),Vn(l.stateNode),Le=a,ft=s;break;case 5:Fe||Zt(l,t);case 6:if(a=Le,s=ft,Le=null,ul(e,t,l),Le=a,ft=s,Le!==null)if(ft)try{(Le.nodeType===9?Le.body:Le.nodeName==="HTML"?Le.ownerDocument.body:Le).removeChild(l.stateNode)}catch(i){ze(l,t,i)}else try{Le.removeChild(l.stateNode)}catch(i){ze(l,t,i)}break;case 18:Le!==null&&(ft?(e=Le,hm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Pa(e)):hm(Le,l.stateNode));break;case 4:a=Le,s=ft,Le=l.stateNode.containerInfo,ft=!0,ul(e,t,l),Le=a,ft=s;break;case 0:case 11:case 14:case 15:Ml(2,l,t),Fe||Ml(4,l,t),ul(e,t,l);break;case 1:Fe||(Zt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&xf(l,t,a)),ul(e,t,l);break;case 21:ul(e,t,l);break;case 22:Fe=(a=Fe)||l.memoizedState!==null,ul(e,t,l),Fe=a;break;default:ul(e,t,l)}}function Sf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pa(e)}catch(l){ze(t,t.return,l)}}}function wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pa(e)}catch(l){ze(t,t.return,l)}}function Ex(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bf),t;default:throw Error(r(435,e.tag))}}function Ws(e,t){var l=Ex(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=kx.bind(null,e,a);a.then(s,s)}})}function mt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],i=e,u=t,x=u;e:for(;x!==null;){switch(x.tag){case 27:if(Bl(x.type)){Le=x.stateNode,ft=!1;break e}break;case 5:Le=x.stateNode,ft=!1;break e;case 3:case 4:Le=x.stateNode.containerInfo,ft=!0;break e}x=x.return}if(Le===null)throw Error(r(160));Nf(i,u,s),Le=null,ft=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cf(t,e),t=t.sibling}var Gt=null;function Cf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mt(t,e),ht(e),a&4&&(Ml(3,e,e.return),On(3,e),Ml(5,e,e.return));break;case 1:mt(t,e),ht(e),a&512&&(Fe||l===null||Zt(l,l.return)),a&64&&rl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Gt;if(mt(t,e),ht(e),a&512&&(Fe||l===null||Zt(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[rn]||i[tt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),st(i,a,l),i[tt]=e,Ie(i),a=i;break e;case"link":var u=Cm("link","href",s).get(a+(l.href||""));if(u){for(var x=0;x<u.length;x++)if(i=u[x],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(x,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;case"meta":if(u=Cm("meta","content",s).get(a+(l.content||""))){for(x=0;x<u.length;x++)if(i=u[x],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(x,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;default:throw Error(r(468,a))}i[tt]=e,Ie(i),a=i}e.stateNode=a}else Em(s,e.type,e.stateNode);else e.stateNode=wm(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Em(s,e.type,e.stateNode):wm(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&mr(e,e.memoizedProps,l.memoizedProps)}break;case 27:mt(t,e),ht(e),a&512&&(Fe||l===null||Zt(l,l.return)),l!==null&&a&4&&mr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(mt(t,e),ht(e),a&512&&(Fe||l===null||Zt(l,l.return)),e.flags&32){s=e.stateNode;try{ja(s,"")}catch(ee){ze(e,e.return,ee)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,mr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(pr=!0);break;case 6:if(mt(t,e),ht(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ee){ze(e,e.return,ee)}}break;case 3:if(mi=null,s=Gt,Gt=di(t.containerInfo),mt(t,e),Gt=s,ht(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Pa(t.containerInfo)}catch(ee){ze(e,e.return,ee)}pr&&(pr=!1,Ef(e));break;case 4:a=Gt,Gt=di(e.stateNode.containerInfo),mt(t,e),ht(e),Gt=a;break;case 12:mt(t,e),ht(e);break;case 31:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 13:mt(t,e),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Is=gt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,_=rl,H=Fe;if(rl=_||s,Fe=H||b,mt(t,e),Fe=H,rl=_,ht(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||rl||Fe||oa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(i=b.stateNode,s)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{x=b.stateNode;var X=b.memoizedProps.style,M=X!=null&&X.hasOwnProperty("display")?X.display:null;x.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ee){ze(b,b.return,ee)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(ee){ze(b,b.return,ee)}}}else if(t.tag===18){if(l===null){b=t;try{var O=b.stateNode;s?xm(O,!0):xm(b.stateNode,!1)}catch(ee){ze(b,b.return,ee)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Ws(e,l))));break;case 19:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 30:break;case 21:break;default:mt(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(gf(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,i=hr(e);Fs(e,i,s);break;case 5:var u=l.stateNode;l.flags&32&&(ja(u,""),l.flags&=-33);var x=hr(e);Fs(e,x,u);break;case 3:case 4:var b=l.stateNode.containerInfo,_=hr(e);xr(e,_,b);break;default:throw Error(r(161))}}catch(H){ze(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ef(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ef(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yf(e,t.alternate,t),t=t.sibling}function oa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ml(4,t,t.return),oa(t);break;case 1:Zt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&xf(t,t.return,l),oa(t);break;case 27:Vn(t.stateNode);case 26:case 5:Zt(t,t.return),oa(t);break;case 22:t.memoizedState===null&&oa(t);break;case 30:oa(t);break;default:oa(t)}e=e.sibling}}function dl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,u=i.flags;switch(i.tag){case 0:case 11:case 15:dl(s,i,l),On(4,i);break;case 1:if(dl(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){ze(a,a.return,_)}if(a=i,s=a.updateQueue,s!==null){var x=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)ld(b[s],x)}catch(_){ze(a,a.return,_)}}l&&u&64&&hf(i),kn(i,i.return);break;case 27:vf(i);case 26:case 5:dl(s,i,l),l&&a===null&&u&4&&pf(i),kn(i,i.return);break;case 12:dl(s,i,l);break;case 31:dl(s,i,l),l&&u&4&&Sf(s,i);break;case 13:dl(s,i,l),l&&u&4&&wf(s,i);break;case 22:i.memoizedState===null&&dl(s,i,l),kn(i,i.return);break;case 30:break;default:dl(s,i,l)}t=t.sibling}}function gr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&jn(l))}function vr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jn(e))}function Qt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Af(e,t,l,a),t=t.sibling}function Af(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Qt(e,t,l,a),s&2048&&On(9,t);break;case 1:Qt(e,t,l,a);break;case 3:Qt(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jn(e)));break;case 12:if(s&2048){Qt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,u=i.id,x=i.onPostCommit;typeof x=="function"&&x(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){ze(t,t.return,b)}}else Qt(e,t,l,a);break;case 31:Qt(e,t,l,a);break;case 13:Qt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,u=t.alternate,t.memoizedState!==null?i._visibility&2?Qt(e,t,l,a):Un(e,t):i._visibility&2?Qt(e,t,l,a):(i._visibility|=2,Ya(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&gr(u,t);break;case 24:Qt(e,t,l,a),s&2048&&vr(t.alternate,t);break;default:Qt(e,t,l,a)}}function Ya(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,u=t,x=l,b=a,_=u.flags;switch(u.tag){case 0:case 11:case 15:Ya(i,u,x,b,s),On(8,u);break;case 23:break;case 22:var H=u.stateNode;u.memoizedState!==null?H._visibility&2?Ya(i,u,x,b,s):Un(i,u):(H._visibility|=2,Ya(i,u,x,b,s)),s&&_&2048&&gr(u.alternate,u);break;case 24:Ya(i,u,x,b,s),s&&_&2048&&vr(u.alternate,u);break;default:Ya(i,u,x,b,s)}t=t.sibling}}function Un(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Un(l,a),s&2048&&gr(a.alternate,a);break;case 24:Un(l,a),s&2048&&vr(a.alternate,a);break;default:Un(l,a)}t=t.sibling}}var Hn=8192;function Ga(e,t,l){if(e.subtreeFlags&Hn)for(e=e.child;e!==null;)Tf(e,t,l),e=e.sibling}function Tf(e,t,l){switch(e.tag){case 26:Ga(e,t,l),e.flags&Hn&&e.memoizedState!==null&&fp(l,Gt,e.memoizedState,e.memoizedProps);break;case 5:Ga(e,t,l);break;case 3:case 4:var a=Gt;Gt=di(e.stateNode.containerInfo),Ga(e,t,l),Gt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Hn,Hn=16777216,Ga(e,t,l),Hn=a):Ga(e,t,l));break;default:Ga(e,t,l)}}function Rf(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 Bn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,Mf(a,e)}Rf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_f(e),e=e.sibling}function _f(e){switch(e.tag){case 0:case 11:case 15:Bn(e),e.flags&2048&&Ml(9,e,e.return);break;case 3:Bn(e);break;case 12:Bn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ps(e)):Bn(e);break;default:Bn(e)}}function Ps(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,Mf(a,e)}Rf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ml(8,t,t.return),Ps(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ps(t));break;default:Ps(t)}e=e.sibling}}function Mf(e,t){for(;et!==null;){var l=et;switch(l.tag){case 0:case 11:case 15:Ml(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:jn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,et=a;else e:for(l=e;et!==null;){a=et;var s=a.sibling,i=a.return;if(jf(a),a===l){et=null;break e}if(s!==null){s.return=i,et=s;break e}et=i}}}var Ax={getCacheForType:function(e){var t=at($e),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return at($e).controller.signal}},Tx=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ue=null,ge=null,ye=0,Me=0,wt=null,zl=!1,Qa=!1,br=!1,fl=0,Qe=0,Dl=0,da=0,yr=0,Ct=0,Va=0,Ln=null,xt=null,jr=!1,Is=0,zf=0,ei=1/0,ti=null,Ol=null,We=0,kl=null,Xa=null,ml=0,Nr=0,Sr=null,Df=null,qn=0,wr=null;function Et(){return(Ae&2)!==0&&ye!==0?ye&-ye:k.T!==null?_r():$u()}function Of(){if(Ct===0)if((ye&536870912)===0||Ne){var e=us;us<<=1,(us&3932160)===0&&(us=262144),Ct=e}else Ct=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Ct}function pt(e,t,l){(e===Ue&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Za(e,0),Ul(e,ye,Ct,!1)),cn(e,l),((Ae&2)===0||e!==Ue)&&(e===Ue&&((Ae&2)===0&&(da|=l),Qe===4&&Ul(e,ye,Ct,!1)),$t(e))}function kf(e,t,l){if((Ae&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||sn(e,t),s=a?Mx(e,t):Er(e,t,!0),i=a;do{if(s===0){Qa&&!a&&Ul(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Rx(l)){s=Er(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var x=e;s=Ln;var b=x.current.memoizedState.isDehydrated;if(b&&(Za(x,u).flags|=256),u=Er(x,u,!1),u!==2){if(br&&!b){x.errorRecoveryDisabledLanes|=i,da|=i,s=4;break e}i=xt,xt=s,i!==null&&(xt===null?xt=i:xt.push.apply(xt,i))}s=u}if(i=!1,s!==2)continue}}if(s===1){Za(e,0),Ul(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Ul(a,t,Ct,!zl);break e;case 2:xt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=Is+300-gt(),10<s)){if(Ul(a,t,Ct,!zl),ds(a,0,!0)!==0)break e;ml=t,a.timeoutHandle=fm(Uf.bind(null,a,l,xt,ti,jr,t,Ct,da,Va,zl,i,"Throttled",-0,0),s);break e}Uf(a,l,xt,ti,jr,t,Ct,da,Va,zl,i,null,-0,0)}}break}while(!0);$t(e)}function Uf(e,t,l,a,s,i,u,x,b,_,H,X,M,O){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pt},Tf(t,i,X);var ee=(i&62914560)===i?Is-gt():(i&4194048)===i?zf-gt():0;if(ee=mp(X,ee),ee!==null){ml=i,e.cancelPendingCommit=ee(Vf.bind(null,e,t,i,l,a,s,u,x,b,H,X,null,M,O)),Ul(e,i,u,!_);return}}Vf(e,t,i,l,a,s,u,x,b)}function Rx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],i=s.getSnapshot;s=s.value;try{if(!yt(i(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Ul(e,t,l,a){t&=~yr,t&=~da,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-bt(s),u=1<<i;a[i]=-1,s&=~u}l!==0&&Vu(e,l,t)}function li(){return(Ae&6)===0?(Yn(0),!1):!0}function Cr(){if(ge!==null){if(Me===0)var e=ge.return;else e=ge,ll=la=null,Yc(e),Ua=null,Sn=0,e=ge;for(;e!==null;)mf(e.alternate,e),e=e.return;ge=null}}function Za(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Jx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ml=0,Cr(),Ue=e,ge=l=el(e.current,null),ye=t,Me=0,wt=null,zl=!1,Qa=sn(e,t),br=!1,Va=Ct=yr=da=Dl=Qe=0,xt=Ln=null,jr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-bt(a),i=1<<s;t|=e[s],a&=~i}return fl=t,Ss(),l}function Hf(e,t){me=null,k.H=Mn,t===ka||t===Ms?(t=Po(),Me=3):t===Rc?(t=Po(),Me=4):Me=t===ar?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wt=t,ge===null&&(Qe=1,Xs(e,Mt(t,e.current)))}function Bf(){var e=Nt.current;return e===null?!0:(ye&4194048)===ye?kt===null:(ye&62914560)===ye||(ye&536870912)!==0?e===kt:!1}function Lf(){var e=k.H;return k.H=Mn,e===null?Mn:e}function qf(){var e=k.A;return k.A=Ax,e}function ai(){Qe=4,zl||(ye&4194048)!==ye&&Nt.current!==null||(Qa=!0),(Dl&134217727)===0&&(da&134217727)===0||Ue===null||Ul(Ue,ye,Ct,!1)}function Er(e,t,l){var a=Ae;Ae|=2;var s=Lf(),i=qf();(Ue!==e||ye!==t)&&(ti=null,Za(e,t)),t=!1;var u=Qe;e:do try{if(Me!==0&&ge!==null){var x=ge,b=wt;switch(Me){case 8:Cr(),u=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var _=Me;if(Me=0,wt=null,$a(e,x,b,_),l&&Qa){u=0;break e}break;default:_=Me,Me=0,wt=null,$a(e,x,b,_)}}_x(),u=Qe;break}catch(H){Hf(e,H)}while(!0);return t&&e.shellSuspendCounter++,ll=la=null,Ae=a,k.H=s,k.A=i,ge===null&&(Ue=null,ye=0,Ss()),u}function _x(){for(;ge!==null;)Yf(ge)}function Mx(e,t){var l=Ae;Ae|=2;var a=Lf(),s=qf();Ue!==e||ye!==t?(ti=null,ei=gt()+500,Za(e,t)):Qa=sn(e,t);e:do try{if(Me!==0&&ge!==null){t=ge;var i=wt;t:switch(Me){case 1:Me=0,wt=null,$a(e,t,i,1);break;case 2:case 9:if(Fo(i)){Me=0,wt=null,Gf(t);break}t=function(){Me!==2&&Me!==9||Ue!==e||(Me=7),$t(e)},i.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:Fo(i)?(Me=0,wt=null,Gf(t)):(Me=0,wt=null,$a(e,t,i,7));break;case 5:var u=null;switch(ge.tag){case 26:u=ge.memoizedState;case 5:case 27:var x=ge;if(u?Am(u):x.stateNode.complete){Me=0,wt=null;var b=x.sibling;if(b!==null)ge=b;else{var _=x.return;_!==null?(ge=_,ni(_)):ge=null}break t}}Me=0,wt=null,$a(e,t,i,5);break;case 6:Me=0,wt=null,$a(e,t,i,6);break;case 8:Cr(),Qe=6;break e;default:throw Error(r(462))}}zx();break}catch(H){Hf(e,H)}while(!0);return ll=la=null,k.H=a,k.A=s,Ae=l,ge!==null?0:(Ue=null,ye=0,Ss(),Qe)}function zx(){for(;ge!==null&&!th();)Yf(ge)}function Yf(e){var t=df(e.alternate,e,fl);e.memoizedProps=e.pendingProps,t===null?ni(e):ge=t}function Gf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=nf(l,t,t.pendingProps,t.type,void 0,ye);break;case 11:t=nf(l,t,t.pendingProps,t.type.render,t.ref,ye);break;case 5:Yc(t);default:mf(l,t),t=ge=Lo(t,fl),t=df(l,t,fl)}e.memoizedProps=e.pendingProps,t===null?ni(e):ge=t}function $a(e,t,l,a){ll=la=null,Yc(t),Ua=null,Sn=0;var s=t.return;try{if(yx(e,s,t,l,ye)){Qe=1,Xs(e,Mt(l,e.current)),ge=null;return}}catch(i){if(s!==null)throw ge=s,i;Qe=1,Xs(e,Mt(l,e.current)),ge=null;return}t.flags&32768?(Ne||a===1?e=!0:Qa||(ye&536870912)!==0?e=!1:(zl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Nt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Qf(t,e)):ni(t)}function ni(e){var t=e;do{if((t.flags&32768)!==0){Qf(t,zl);return}e=t.return;var l=Sx(t.alternate,t,fl);if(l!==null){ge=l;return}if(t=t.sibling,t!==null){ge=t;return}ge=t=e}while(t!==null);Qe===0&&(Qe=5)}function Qf(e,t){do{var l=wx(e.alternate,e);if(l!==null){l.flags&=32767,ge=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ge=e;return}ge=e=l}while(e!==null);Qe=6,ge=null}function Vf(e,t,l,a,s,i,u,x,b){e.cancelPendingCommit=null;do si();while(We!==0);if((Ae&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=hc,dh(e,l,i,u,x,b),e===Ue&&(ge=Ue=null,ye=0),Xa=t,kl=e,ml=l,Nr=i,Sr=s,Df=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ux(cs,function(){return Jf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null,s=F.p,F.p=2,u=Ae,Ae|=4;try{Cx(e,t,l)}finally{Ae=u,F.p=s,k.T=a}}We=1,Xf(),Zf(),$f()}}function Xf(){if(We===1){We=0;var e=kl,t=Xa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var a=F.p;F.p=2;var s=Ae;Ae|=4;try{Cf(t,e);var i=Br,u=_o(e.containerInfo),x=i.focusedElem,b=i.selectionRange;if(u!==x&&x&&x.ownerDocument&&Ro(x.ownerDocument.documentElement,x)){if(b!==null&&uc(x)){var _=b.start,H=b.end;if(H===void 0&&(H=_),"selectionStart"in x)x.selectionStart=_,x.selectionEnd=Math.min(H,x.value.length);else{var X=x.ownerDocument||document,M=X&&X.defaultView||window;if(M.getSelection){var O=M.getSelection(),ee=x.textContent.length,ce=Math.min(b.start,ee),ke=b.end===void 0?ce:Math.min(b.end,ee);!O.extend&&ce>ke&&(u=ke,ke=ce,ce=u);var E=To(x,ce),N=To(x,ke);if(E&&N&&(O.rangeCount!==1||O.anchorNode!==E.node||O.anchorOffset!==E.offset||O.focusNode!==N.node||O.focusOffset!==N.offset)){var T=X.createRange();T.setStart(E.node,E.offset),O.removeAllRanges(),ce>ke?(O.addRange(T),O.extend(N.node,N.offset)):(T.setEnd(N.node,N.offset),O.addRange(T))}}}}for(X=[],O=x;O=O.parentNode;)O.nodeType===1&&X.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<X.length;x++){var Y=X[x];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}gi=!!Hr,Br=Hr=null}finally{Ae=s,F.p=a,k.T=l}}e.current=t,We=2}}function Zf(){if(We===2){We=0;var e=kl,t=Xa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var a=F.p;F.p=2;var s=Ae;Ae|=4;try{yf(e,t.alternate,t)}finally{Ae=s,F.p=a,k.T=l}}We=3}}function $f(){if(We===4||We===3){We=0,lh();var e=kl,t=Xa,l=ml,a=Df;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?We=5:(We=0,Xa=kl=null,Kf(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ol=null),Vi(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(nn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=k.T,s=F.p,F.p=2,k.T=null;try{for(var i=e.onRecoverableError,u=0;u<a.length;u++){var x=a[u];i(x.value,{componentStack:x.stack})}}finally{k.T=t,F.p=s}}(ml&3)!==0&&si(),$t(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===wr?qn++:(qn=0,wr=e):qn=0,Yn(0)}}function Kf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,jn(t)))}function si(){return Xf(),Zf(),$f(),Jf()}function Jf(){if(We!==5)return!1;var e=kl,t=Nr;Nr=0;var l=Vi(ml),a=k.T,s=F.p;try{F.p=32>l?32:l,k.T=null,l=Sr,Sr=null;var i=kl,u=ml;if(We=0,Xa=kl=null,ml=0,(Ae&6)!==0)throw Error(r(331));var x=Ae;if(Ae|=4,_f(i.current),Af(i,i.current,u,l),Ae=x,Yn(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(nn,i)}catch{}return!0}finally{F.p=s,k.T=a,Kf(e,t)}}function Ff(e,t,l){t=Mt(l,t),t=lr(e.stateNode,t,2),e=Tl(e,t,2),e!==null&&(cn(e,2),$t(e))}function ze(e,t,l){if(e.tag===3)Ff(e,e,l);else for(;t!==null;){if(t.tag===3){Ff(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ol===null||!Ol.has(a))){e=Mt(l,e),l=Fd(2),a=Tl(t,l,2),a!==null&&(Wd(l,a,t,e),cn(a,2),$t(a));break}}t=t.return}}function Ar(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Tx;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(br=!0,s.add(l),e=Dx.bind(null,e,t,l),t.then(e,e))}function Dx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ue===e&&(ye&l)===l&&(Qe===4||Qe===3&&(ye&62914560)===ye&&300>gt()-Is?(Ae&2)===0&&Za(e,0):yr|=l,Va===ye&&(Va=0)),$t(e)}function Wf(e,t){t===0&&(t=Qu()),e=Il(e,t),e!==null&&(cn(e,t),$t(e))}function Ox(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Wf(e,l)}function kx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Wf(e,l)}function Ux(e,t){return qi(e,t)}var ii=null,Ka=null,Tr=!1,ci=!1,Rr=!1,Hl=0;function $t(e){e!==Ka&&e.next===null&&(Ka===null?ii=Ka=e:Ka=Ka.next=e),ci=!0,Tr||(Tr=!0,Bx())}function Yn(e,t){if(!Rr&&ci){Rr=!0;do for(var l=!1,a=ii;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var u=a.suspendedLanes,x=a.pingedLanes;i=(1<<31-bt(42|e)+1)-1,i&=s&~(u&~x),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,tm(a,i))}else i=ye,i=ds(a,a===Ue?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||sn(a,i)||(l=!0,tm(a,i));a=a.next}while(l);Rr=!1}}function Hx(){Pf()}function Pf(){ci=Tr=!1;var e=0;Hl!==0&&Kx()&&(e=Hl);for(var t=gt(),l=null,a=ii;a!==null;){var s=a.next,i=If(a,t);i===0?(a.next=null,l===null?ii=s:l.next=s,s===null&&(Ka=l)):(l=a,(e!==0||(i&3)!==0)&&(ci=!0)),a=s}We!==0&&We!==5||Yn(e),Hl!==0&&(Hl=0)}function If(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-bt(i),x=1<<u,b=s[u];b===-1?((x&l)===0||(x&a)!==0)&&(s[u]=oh(x,t)):b<=t&&(e.expiredLanes|=x),i&=~x}if(t=Ue,l=ye,l=ds(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Yi(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||sn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Yi(a),Vi(l)){case 2:case 8:l=Yu;break;case 32:l=cs;break;case 268435456:l=Gu;break;default:l=cs}return a=em.bind(null,e),l=qi(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Yi(a),e.callbackPriority=2,e.callbackNode=null,2}function em(e,t){if(We!==0&&We!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(si()&&e.callbackNode!==l)return null;var a=ye;return a=ds(e,e===Ue?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(kf(e,a,t),If(e,gt()),e.callbackNode!=null&&e.callbackNode===l?em.bind(null,e):null)}function tm(e,t){if(si())return null;kf(e,t,!0)}function Bx(){Fx(function(){(Ae&6)!==0?qi(qu,Hx):Pf()})}function _r(){if(Hl===0){var e=Da;e===0&&(e=rs,rs<<=1,(rs&261888)===0&&(rs=256)),Hl=e}return Hl}function lm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xs(""+e)}function am(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Lx(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=lm((s[ot]||null).action),u=a.submitter;u&&(t=(t=u[ot]||null)?lm(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var x=new bs("action","action",null,a,s);e.push({event:x,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Hl!==0){var b=u?am(s,u):new FormData(s);Fc(l,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(x.preventDefault(),b=u?am(s,u):new FormData(s),Fc(l,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var Mr=0;Mr<mc.length;Mr++){var zr=mc[Mr],qx=zr.toLowerCase(),Yx=zr[0].toUpperCase()+zr.slice(1);Yt(qx,"on"+Yx)}Yt(Do,"onAnimationEnd"),Yt(Oo,"onAnimationIteration"),Yt(ko,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(ax,"onTransitionRun"),Yt(nx,"onTransitionStart"),Yt(sx,"onTransitionCancel"),Yt(Uo,"onTransitionEnd"),ba("onMouseEnter",["mouseout","mouseover"]),ba("onMouseLeave",["mouseout","mouseover"]),ba("onPointerEnter",["pointerout","pointerover"]),ba("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gn="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(" "),Gx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gn));function nm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var u=a.length-1;0<=u;u--){var x=a[u],b=x.instance,_=x.currentTarget;if(x=x.listener,b!==i&&s.isPropagationStopped())break e;i=x,s.currentTarget=_;try{i(s)}catch(H){Ns(H)}s.currentTarget=null,i=b}else for(u=0;u<a.length;u++){if(x=a[u],b=x.instance,_=x.currentTarget,x=x.listener,b!==i&&s.isPropagationStopped())break e;i=x,s.currentTarget=_;try{i(s)}catch(H){Ns(H)}s.currentTarget=null,i=b}}}}function ve(e,t){var l=t[Xi];l===void 0&&(l=t[Xi]=new Set);var a=e+"__bubble";l.has(a)||(sm(t,e,2,!1),l.add(a))}function Dr(e,t,l){var a=0;t&&(a|=4),sm(l,e,a,t)}var ri="_reactListening"+Math.random().toString(36).slice(2);function Or(e){if(!e[ri]){e[ri]=!0,Fu.forEach(function(l){l!=="selectionchange"&&(Gx.has(l)||Dr(l,!1,e),Dr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ri]||(t[ri]=!0,Dr("selectionchange",!1,t))}}function sm(e,t,l,a){switch(Om(t)){case 2:var s=pp;break;case 8:s=gp;break;default:s=Jr}l=s.bind(null,t,l,e),s=void 0,!ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function kr(e,t,l,a,s){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var x=a.stateNode.containerInfo;if(x===s)break;if(u===4)for(u=a.return;u!==null;){var b=u.tag;if((b===3||b===4)&&u.stateNode.containerInfo===s)return;u=u.return}for(;x!==null;){if(u=pa(x),u===null)return;if(b=u.tag,b===5||b===6||b===26||b===27){a=i=u;continue e}x=x.parentNode}}a=a.return}ro(function(){var _=i,H=Pi(l),X=[];e:{var M=Ho.get(e);if(M!==void 0){var O=bs,ee=e;switch(e){case"keypress":if(gs(l)===0)break e;case"keydown":case"keyup":O=kh;break;case"focusin":ee="focus",O=nc;break;case"focusout":ee="blur",O=nc;break;case"beforeblur":case"afterblur":O=nc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=fo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Sh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Bh;break;case Do:case Oo:case ko:O=Eh;break;case Uo:O=qh;break;case"scroll":case"scrollend":O=jh;break;case"wheel":O=Gh;break;case"copy":case"cut":case"paste":O=Th;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=ho;break;case"toggle":case"beforetoggle":O=Vh}var ce=(t&4)!==0,ke=!ce&&(e==="scroll"||e==="scrollend"),E=ce?M!==null?M+"Capture":null:M;ce=[];for(var N=_,T;N!==null;){var Y=N;if(T=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||T===null||E===null||(Y=on(N,E),Y!=null&&ce.push(Qn(N,Y,T))),ke)break;N=N.return}0<ce.length&&(M=new O(M,ee,null,l,H),X.push({event:M,listeners:ce}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",M&&l!==Wi&&(ee=l.relatedTarget||l.fromElement)&&(pa(ee)||ee[xa]))break e;if((O||M)&&(M=H.window===H?H:(M=H.ownerDocument)?M.defaultView||M.parentWindow:window,O?(ee=l.relatedTarget||l.toElement,O=_,ee=ee?pa(ee):null,ee!==null&&(ke=f(ee),ce=ee.tag,ee!==ke||ce!==5&&ce!==27&&ce!==6)&&(ee=null)):(O=null,ee=_),O!==ee)){if(ce=fo,Y="onMouseLeave",E="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ce=ho,Y="onPointerLeave",E="onPointerEnter",N="pointer"),ke=O==null?M:un(O),T=ee==null?M:un(ee),M=new ce(Y,N+"leave",O,l,H),M.target=ke,M.relatedTarget=T,Y=null,pa(H)===_&&(ce=new ce(E,N+"enter",ee,l,H),ce.target=T,ce.relatedTarget=ke,Y=ce),ke=Y,O&&ee)t:{for(ce=Qx,E=O,N=ee,T=0,Y=E;Y;Y=ce(Y))T++;Y=0;for(var ne=N;ne;ne=ce(ne))Y++;for(;0<T-Y;)E=ce(E),T--;for(;0<Y-T;)N=ce(N),Y--;for(;T--;){if(E===N||N!==null&&E===N.alternate){ce=E;break t}E=ce(E),N=ce(N)}ce=null}else ce=null;O!==null&&im(X,M,O,ce,!1),ee!==null&&ke!==null&&im(X,ke,ee,ce,!0)}}e:{if(M=_?un(_):window,O=M.nodeName&&M.nodeName.toLowerCase(),O==="select"||O==="input"&&M.type==="file")var Ce=No;else if(yo(M))if(So)Ce=ex;else{Ce=Ph;var te=Wh}else O=M.nodeName,!O||O.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?_&&Fi(_.elementType)&&(Ce=No):Ce=Ih;if(Ce&&(Ce=Ce(e,_))){jo(X,Ce,l,H);break e}te&&te(e,M,_),e==="focusout"&&_&&M.type==="number"&&_.memoizedProps.value!=null&&Ji(M,"number",M.value)}switch(te=_?un(_):window,e){case"focusin":(yo(te)||te.contentEditable==="true")&&(Ca=te,oc=_,vn=null);break;case"focusout":vn=oc=Ca=null;break;case"mousedown":dc=!0;break;case"contextmenu":case"mouseup":case"dragend":dc=!1,Mo(X,l,H);break;case"selectionchange":if(lx)break;case"keydown":case"keyup":Mo(X,l,H)}var he;if(ic)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else wa?vo(e,l)&&(je="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(je="onCompositionStart");je&&(xo&&l.locale!=="ko"&&(wa||je!=="onCompositionStart"?je==="onCompositionEnd"&&wa&&(he=uo()):(jl=H,tc="value"in jl?jl.value:jl.textContent,wa=!0)),te=ui(_,je),0<te.length&&(je=new mo(je,e,null,l,H),X.push({event:je,listeners:te}),he?je.data=he:(he=bo(l),he!==null&&(je.data=he)))),(he=Zh?$h(e,l):Kh(e,l))&&(je=ui(_,"onBeforeInput"),0<je.length&&(te=new mo("onBeforeInput","beforeinput",null,l,H),X.push({event:te,listeners:je}),te.data=he)),Lx(X,e,_,l,H)}nm(X,t)})}function Qn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ui(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=on(e,l),s!=null&&a.unshift(Qn(e,s,i)),s=on(e,t),s!=null&&a.push(Qn(e,s,i))),e.tag===3)return a;e=e.return}return[]}function Qx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function im(e,t,l,a,s){for(var i=t._reactName,u=[];l!==null&&l!==a;){var x=l,b=x.alternate,_=x.stateNode;if(x=x.tag,b!==null&&b===a)break;x!==5&&x!==26&&x!==27||_===null||(b=_,s?(_=on(l,i),_!=null&&u.unshift(Qn(l,_,b))):s||(_=on(l,i),_!=null&&u.push(Qn(l,_,b)))),l=l.return}u.length!==0&&e.push({event:t,listeners:u})}var Vx=/\r\n?/g,Xx=/\u0000|\uFFFD/g;function cm(e){return(typeof e=="string"?e:""+e).replace(Vx,`
49
- `).replace(Xx,"")}function rm(e,t){return t=cm(t),cm(e)===t}function Oe(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ja(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ja(e,""+a);break;case"className":ms(e,"class",a);break;case"tabIndex":ms(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ms(e,l,a);break;case"style":io(e,a,i);break;case"data":if(t!=="object"){ms(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=xs(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 i=="function"&&(l==="formAction"?(t!=="input"&&Oe(e,t,"name",s.name,s,null),Oe(e,t,"formEncType",s.formEncType,s,null),Oe(e,t,"formMethod",s.formMethod,s,null),Oe(e,t,"formTarget",s.formTarget,s,null)):(Oe(e,t,"encType",s.encType,s,null),Oe(e,t,"method",s.method,s,null),Oe(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=xs(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=xs(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":ve("beforetoggle",e),ve("toggle",e),fs(e,"popover",a);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":fs(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=bh.get(l)||l,fs(e,l,a))}}function Ur(e,t,l,a,s,i){switch(l){case"style":io(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ja(e,a):(typeof a=="number"||typeof a=="bigint")&&ja(e,""+a);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wu.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),i=e[ot]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):fs(e,l,a)}}}function st(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var a=!1,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Oe(e,t,i,u,l,null)}}s&&Oe(e,t,"srcSet",l.srcSet,l,null),a&&Oe(e,t,"src",l.src,l,null);return;case"input":ve("invalid",e);var x=i=u=s=null,b=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var H=l[a];if(H!=null)switch(a){case"name":s=H;break;case"type":u=H;break;case"checked":b=H;break;case"defaultChecked":_=H;break;case"value":i=H;break;case"defaultValue":x=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:Oe(e,t,a,H,l,null)}}lo(e,i,x,b,_,u,s,!1);return;case"select":ve("invalid",e),a=u=i=null;for(s in l)if(l.hasOwnProperty(s)&&(x=l[s],x!=null))switch(s){case"value":i=x;break;case"defaultValue":u=x;break;case"multiple":a=x;default:Oe(e,t,s,x,l,null)}t=i,l=u,e.multiple=!!a,t!=null?ya(e,!!a,t,!1):l!=null&&ya(e,!!a,l,!0);return;case"textarea":ve("invalid",e),i=s=a=null;for(u in l)if(l.hasOwnProperty(u)&&(x=l[u],x!=null))switch(u){case"value":a=x;break;case"defaultValue":s=x;break;case"children":i=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:Oe(e,t,u,x,l,null)}no(e,a,s,i);return;case"option":for(b in l)if(l.hasOwnProperty(b)&&(a=l[b],a!=null))switch(b){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Oe(e,t,b,a,l,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(a=0;a<Gn.length;a++)ve(Gn[a],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Oe(e,t,_,a,l,null)}return;default:if(Fi(t)){for(H in l)l.hasOwnProperty(H)&&(a=l[H],a!==void 0&&Ur(e,t,H,a,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(a=l[x],a!=null&&Oe(e,t,x,a,l,null))}function Zx(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,u=null,x=null,b=null,_=null,H=null;for(O in l){var X=l[O];if(l.hasOwnProperty(O)&&X!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=X;default:a.hasOwnProperty(O)||Oe(e,t,O,null,a,X)}}for(var M in a){var O=a[M];if(X=l[M],a.hasOwnProperty(M)&&(O!=null||X!=null))switch(M){case"type":i=O;break;case"name":s=O;break;case"checked":_=O;break;case"defaultChecked":H=O;break;case"value":u=O;break;case"defaultValue":x=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==X&&Oe(e,t,M,O,a,X)}}Ki(e,u,x,b,_,H,i,s);return;case"select":O=u=x=M=null;for(i in l)if(b=l[i],l.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":O=b;default:a.hasOwnProperty(i)||Oe(e,t,i,null,a,b)}for(s in a)if(i=a[s],b=l[s],a.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":M=i;break;case"defaultValue":x=i;break;case"multiple":u=i;default:i!==b&&Oe(e,t,s,i,a,b)}t=x,l=u,a=O,M!=null?ya(e,!!l,M,!1):!!a!=!!l&&(t!=null?ya(e,!!l,t,!0):ya(e,!!l,l?[]:"",!1));return;case"textarea":O=M=null;for(x in l)if(s=l[x],l.hasOwnProperty(x)&&s!=null&&!a.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Oe(e,t,x,null,a,s)}for(u in a)if(s=a[u],i=l[u],a.hasOwnProperty(u)&&(s!=null||i!=null))switch(u){case"value":M=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==i&&Oe(e,t,u,s,a,i)}ao(e,M,O);return;case"option":for(var ee in l)if(M=l[ee],l.hasOwnProperty(ee)&&M!=null&&!a.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Oe(e,t,ee,null,a,M)}for(b in a)if(M=a[b],O=l[b],a.hasOwnProperty(b)&&M!==O&&(M!=null||O!=null))switch(b){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Oe(e,t,b,M,a,O)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ce in l)M=l[ce],l.hasOwnProperty(ce)&&M!=null&&!a.hasOwnProperty(ce)&&Oe(e,t,ce,null,a,M);for(_ in a)if(M=a[_],O=l[_],a.hasOwnProperty(_)&&M!==O&&(M!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:Oe(e,t,_,M,a,O)}return;default:if(Fi(t)){for(var ke in l)M=l[ke],l.hasOwnProperty(ke)&&M!==void 0&&!a.hasOwnProperty(ke)&&Ur(e,t,ke,void 0,a,M);for(H in a)M=a[H],O=l[H],!a.hasOwnProperty(H)||M===O||M===void 0&&O===void 0||Ur(e,t,H,M,a,O);return}}for(var E in l)M=l[E],l.hasOwnProperty(E)&&M!=null&&!a.hasOwnProperty(E)&&Oe(e,t,E,null,a,M);for(X in a)M=a[X],O=l[X],!a.hasOwnProperty(X)||M===O||M==null&&O==null||Oe(e,t,X,M,a,O)}function um(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $x(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],i=s.transferSize,u=s.initiatorType,x=s.duration;if(i&&x&&um(u)){for(u=0,x=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],_=b.startTime;if(_>x)break;var H=b.transferSize,X=b.initiatorType;H&&um(X)&&(b=b.responseEnd,u+=H*(b<x?1:(x-_)/(b-_)))}if(--a,t+=8*(i+u)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Hr=null,Br=null;function oi(e){return e.nodeType===9?e:e.ownerDocument}function om(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 dm(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 Lr(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 qr=null;function Kx(){var e=window.event;return e&&e.type==="popstate"?e===qr?!1:(qr=e,!0):(qr=null,!1)}var fm=typeof setTimeout=="function"?setTimeout:void 0,Jx=typeof clearTimeout=="function"?clearTimeout:void 0,mm=typeof Promise=="function"?Promise:void 0,Fx=typeof queueMicrotask=="function"?queueMicrotask:typeof mm<"u"?function(e){return mm.resolve(null).then(e).catch(Wx)}:fm;function Wx(e){setTimeout(function(){throw e})}function Bl(e){return e==="head"}function hm(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),Pa(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Vn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Vn(l);for(var i=l.firstChild;i;){var u=i.nextSibling,x=i.nodeName;i[rn]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&Vn(e.ownerDocument.body);l=s}while(l);Pa(t)}function xm(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Yr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Yr(l),Zi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Px(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[rn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function Ix(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ut(e.nextSibling),e===null))return null;return e}function pm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function Gr(e){return e.data==="$?"||e.data==="$~"}function Qr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ep(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Ut(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 Vr=null;function gm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Ut(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function vm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function bm(e,t,l){switch(t=oi(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Vn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Zi(e)}var Ht=new Map,ym=new Set;function di(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var hl=F.d;F.d={f:tp,r:lp,D:ap,C:np,L:sp,m:ip,X:rp,S:cp,M:up};function tp(){var e=hl.f(),t=li();return e||t}function lp(e){var t=ga(e);t!==null&&t.tag===5&&t.type==="form"?Ud(t):hl.r(e)}var Ja=typeof document>"u"?null:document;function jm(e,t,l){var a=Ja;if(a&&typeof t=="string"&&t){var s=Rt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),ym.has(s)||(ym.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),st(t,"link",e),Ie(t),a.head.appendChild(t)))}}function ap(e){hl.D(e),jm("dns-prefetch",e,null)}function np(e,t){hl.C(e,t),jm("preconnect",e,t)}function sp(e,t,l){hl.L(e,t,l);var a=Ja;if(a&&e&&t){var s='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+Rt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+Rt(l.imageSizes)+'"]')):s+='[href="'+Rt(e)+'"]';var i=s;switch(t){case"style":i=Fa(e);break;case"script":i=Wa(e)}Ht.has(i)||(e=w({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ht.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(Xn(i))||t==="script"&&a.querySelector(Zn(i))||(t=a.createElement("link"),st(t,"link",e),Ie(t),a.head.appendChild(t)))}}function ip(e,t){hl.m(e,t);var l=Ja;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Rt(a)+'"][href="'+Rt(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Wa(e)}if(!Ht.has(i)&&(e=w({rel:"modulepreload",href:e},t),Ht.set(i,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Zn(i)))return}a=l.createElement("link"),st(a,"link",e),Ie(a),l.head.appendChild(a)}}}function cp(e,t,l){hl.S(e,t,l);var a=Ja;if(a&&e){var s=va(a).hoistableStyles,i=Fa(e);t=t||"default";var u=s.get(i);if(!u){var x={loading:0,preload:null};if(u=a.querySelector(Xn(i)))x.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ht.get(i))&&Xr(e,l);var b=u=a.createElement("link");Ie(b),st(b,"link",e),b._p=new Promise(function(_,H){b.onload=_,b.onerror=H}),b.addEventListener("load",function(){x.loading|=1}),b.addEventListener("error",function(){x.loading|=2}),x.loading|=4,fi(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:x},s.set(i,u)}}}function rp(e,t){hl.X(e,t);var l=Ja;if(l&&e){var a=va(l).hoistableScripts,s=Wa(e),i=a.get(s);i||(i=l.querySelector(Zn(s)),i||(e=w({src:e,async:!0},t),(t=Ht.get(s))&&Zr(e,t),i=l.createElement("script"),Ie(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function up(e,t){hl.M(e,t);var l=Ja;if(l&&e){var a=va(l).hoistableScripts,s=Wa(e),i=a.get(s);i||(i=l.querySelector(Zn(s)),i||(e=w({src:e,async:!0,type:"module"},t),(t=Ht.get(s))&&Zr(e,t),i=l.createElement("script"),Ie(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function Nm(e,t,l,a){var s=(s=re.current)?di(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Fa(l.href),l=va(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Fa(l.href);var i=va(s).hoistableStyles,u=i.get(e);if(u||(s=s.ownerDocument||s,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,u),(i=s.querySelector(Xn(e)))&&!i._p&&(u.instance=i,u.state.loading=5),Ht.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ht.set(e,l),i||op(s,e,l,u.state))),t&&a===null)throw Error(r(528,""));return u}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wa(l),l=va(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Fa(e){return'href="'+Rt(e)+'"'}function Xn(e){return'link[rel="stylesheet"]['+e+"]"}function Sm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function op(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),st(t,"link",l),Ie(t),e.head.appendChild(t))}function Wa(e){return'[src="'+Rt(e)+'"]'}function Zn(e){return"script[async]"+e}function wm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Rt(l.href)+'"]');if(a)return t.instance=a,Ie(a),a;var s=w({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ie(a),st(a,"style",s),fi(a,l.precedence,e),t.instance=a;case"stylesheet":s=Fa(l.href);var i=e.querySelector(Xn(s));if(i)return t.state.loading|=4,t.instance=i,Ie(i),i;a=Sm(l),(s=Ht.get(s))&&Xr(a,s),i=(e.ownerDocument||e).createElement("link"),Ie(i);var u=i;return u._p=new Promise(function(x,b){u.onload=x,u.onerror=b}),st(i,"link",a),t.state.loading|=4,fi(i,l.precedence,e),t.instance=i;case"script":return i=Wa(l.src),(s=e.querySelector(Zn(i)))?(t.instance=s,Ie(s),s):(a=l,(s=Ht.get(i))&&(a=w({},l),Zr(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ie(s),st(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,fi(a,l.precedence,e));return t.instance}function fi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,u=0;u<a.length;u++){var x=a[u];if(x.dataset.precedence===t)i=x;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Xr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Zr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var mi=null;function Cm(e,t,l){if(mi===null){var a=new Map,s=mi=new Map;s.set(l,a)}else s=mi,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var i=l[s];if(!(i[rn]||i[tt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(t)||"";u=e+u;var x=a.get(u);x?x.push(i):a.set(u,[i])}}return a}function Em(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function dp(e,t,l){if(l===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 Am(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fp(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Fa(a.href),i=t.querySelector(Xn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ie(i);return}i=t.ownerDocument||t,a=Sm(a),(s=Ht.get(s))&&Xr(a,s),i=i.createElement("link"),Ie(i);var u=i;u._p=new Promise(function(x,b){u.onload=x,u.onerror=b}),st(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=hi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var $r=0;function mp(e,t){return e.stylesheets&&e.count===0&&pi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&pi(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&$r===0&&($r=62500*$x());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pi(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>$r?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function hi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xi=null;function pi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xi=new Map,t.forEach(hp,e),xi=null,hi.call(e))}function hp(e,t){if(!(t.state.loading&4)){var l=xi.get(e);if(l)var a=l.get(null);else{l=new Map,xi.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var u=s[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),a=u)}a&&l.set(null,a)}s=t.instance,u=s.getAttribute("data-precedence"),i=l.get(u)||a,i===a&&l.set(null,s),l.set(u,s),this.count++,a=hi.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var $n={$$typeof:L,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function xp(e,t,l,a,s,i,u,x,b){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=Gi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gi(0),this.hiddenUpdates=Gi(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Tm(e,t,l,a,s,i,u,x,b,_,H,X){return e=new xp(e,t,l,u,b,_,H,X,x),t=1,i===!0&&(t|=24),i=jt(3,null,null,t),e.current=i,i.stateNode=e,t=Ec(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},_c(i),e}function Rm(e){return e?(e=Ta,e):Ta}function _m(e,t,l,a,s,i){s=Rm(s),a.context===null?a.context=s:a.pendingContext=s,a=Al(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Tl(e,a,t),l!==null&&(pt(l,e,t),Cn(l,e,t))}function Mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Kr(e,t){Mm(e,t),(e=e.alternate)&&Mm(e,t)}function zm(e){if(e.tag===13||e.tag===31){var t=Il(e,67108864);t!==null&&pt(t,e,67108864),Kr(e,67108864)}}function Dm(e){if(e.tag===13||e.tag===31){var t=Et();t=Qi(t);var l=Il(e,t);l!==null&&pt(l,e,t),Kr(e,t)}}var gi=!0;function pp(e,t,l,a){var s=k.T;k.T=null;var i=F.p;try{F.p=2,Jr(e,t,l,a)}finally{F.p=i,k.T=s}}function gp(e,t,l,a){var s=k.T;k.T=null;var i=F.p;try{F.p=8,Jr(e,t,l,a)}finally{F.p=i,k.T=s}}function Jr(e,t,l,a){if(gi){var s=Fr(a);if(s===null)kr(e,t,a,vi,l),km(e,a);else if(bp(s,e,t,l,a))a.stopPropagation();else if(km(e,a),t&4&&-1<vp.indexOf(e)){for(;s!==null;){var i=ga(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=Kl(i.pendingLanes);if(u!==0){var x=i;for(x.pendingLanes|=2,x.entangledLanes|=2;u;){var b=1<<31-bt(u);x.entanglements[1]|=b,u&=~b}$t(i),(Ae&6)===0&&(ei=gt()+500,Yn(0))}}break;case 31:case 13:x=Il(i,2),x!==null&&pt(x,i,2),li(),Kr(i,2)}if(i=Fr(a),i===null&&kr(e,t,a,vi,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else kr(e,t,a,null,l)}}function Fr(e){return e=Pi(e),Wr(e)}var vi=null;function Wr(e){if(vi=null,e=pa(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===31){if(e=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vi=e,null}function Om(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(ah()){case qu:return 2;case Yu:return 8;case cs:case nh:return 32;case Gu:return 268435456;default:return 32}default:return 32}}var Pr=!1,Ll=null,ql=null,Yl=null,Kn=new Map,Jn=new Map,Gl=[],vp="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 km(e,t){switch(e){case"focusin":case"focusout":Ll=null;break;case"dragenter":case"dragleave":ql=null;break;case"mouseover":case"mouseout":Yl=null;break;case"pointerover":case"pointerout":Kn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jn.delete(t.pointerId)}}function Fn(e,t,l,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ga(t),t!==null&&zm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function bp(e,t,l,a,s){switch(t){case"focusin":return Ll=Fn(Ll,e,t,l,a,s),!0;case"dragenter":return ql=Fn(ql,e,t,l,a,s),!0;case"mouseover":return Yl=Fn(Yl,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return Kn.set(i,Fn(Kn.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,Jn.set(i,Fn(Jn.get(i)||null,e,t,l,a,s)),!0}return!1}function Um(e){var t=pa(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,Ku(e.priority,function(){Dm(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Ku(e.priority,function(){Dm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function bi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Fr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Wi=a,l.target.dispatchEvent(a),Wi=null}else return t=ga(l),t!==null&&zm(t),e.blockedOn=l,!1;t.shift()}return!0}function Hm(e,t,l){bi(e)&&l.delete(t)}function yp(){Pr=!1,Ll!==null&&bi(Ll)&&(Ll=null),ql!==null&&bi(ql)&&(ql=null),Yl!==null&&bi(Yl)&&(Yl=null),Kn.forEach(Hm),Jn.forEach(Hm)}function yi(e,t){e.blockedOn===t&&(e.blockedOn=null,Pr||(Pr=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,yp)))}var ji=null;function Bm(e){ji!==e&&(ji=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){ji===e&&(ji=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Wr(a||l)===null)continue;break}var i=ga(l);i!==null&&(e.splice(t,3),t-=3,Fc(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Pa(e){function t(b){return yi(b,e)}Ll!==null&&yi(Ll,e),ql!==null&&yi(ql,e),Yl!==null&&yi(Yl,e),Kn.forEach(t),Jn.forEach(t);for(var l=0;l<Gl.length;l++){var a=Gl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Gl.length&&(l=Gl[0],l.blockedOn===null);)Um(l),l.blockedOn===null&&Gl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],i=l[a+1],u=s[ot]||null;if(typeof i=="function")u||Bm(l);else if(u){var x=null;if(i&&i.hasAttribute("formAction")){if(s=i,u=i[ot]||null)x=u.formAction;else if(Wr(s)!==null)continue}else x=u.action;typeof x=="function"?l[a+1]=x:(l.splice(a,3),a-=3),Bm(l)}}}function Lm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return s=u})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Ir(e){this._internalRoot=e}Ni.prototype.render=Ir.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Et();_m(l,a,e,t,null,null)},Ni.prototype.unmount=Ir.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_m(e.current,2,null,e,null,null),li(),t[xa]=null}};function Ni(e){this._internalRoot=e}Ni.prototype.unstable_scheduleHydration=function(e){if(e){var t=$u();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Gl.length&&t!==0&&t<Gl[l].priority;l++);Gl.splice(l,0,e),l===0&&Um(e)}};var qm=o.version;if(qm!=="19.2.4")throw Error(r(527,qm,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var jp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Si=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Si.isDisabled&&Si.supportsFiber)try{nn=Si.inject(jp),vt=Si}catch{}}return Pn.createRoot=function(e,t){if(!m(e))throw Error(r(299));var l=!1,a="",s=Zd,i=$d,u=Kd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Tm(e,1,!1,null,null,l,a,null,s,i,u,Lm),e[xa]=t.current,Or(e),new Ir(t)},Pn.hydrateRoot=function(e,t,l){if(!m(e))throw Error(r(299));var a=!1,s="",i=Zd,u=$d,x=Kd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Tm(e,1,!0,t,l??null,a,s,b,i,u,x,Lm),t.context=Rm(null),l=t.current,a=Et(),a=Qi(a),s=Al(a),s.callback=null,Tl(l,s,a),l=a,t.current.lanes=l,cn(t,l),$t(t),e[xa]=t.current,Or(e),new Ni(t)},Pn.version="19.2.4",Pn}var Fm;function _p(){if(Fm)return lu.exports;Fm=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),lu.exports=Rp(),lu.exports}var Mp=_p();const zp=vu(Mp);/**
48
+ `+a.stack}}var qi=Object.prototype.hasOwnProperty,Yi=c.unstable_scheduleCallback,Gi=c.unstable_cancelCallback,th=c.unstable_shouldYield,lh=c.unstable_requestPaint,gt=c.unstable_now,ah=c.unstable_getCurrentPriorityLevel,qu=c.unstable_ImmediatePriority,Yu=c.unstable_UserBlockingPriority,cs=c.unstable_NormalPriority,nh=c.unstable_LowPriority,Gu=c.unstable_IdlePriority,sh=c.log,ih=c.unstable_setDisableYieldValue,nn=null,vt=null;function bl(e){if(typeof sh=="function"&&ih(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(nn,e)}catch{}}var bt=Math.clz32?Math.clz32:uh,ch=Math.log,rh=Math.LN2;function uh(e){return e>>>=0,e===0?32:31-(ch(e)/rh|0)|0}var rs=256,us=262144,os=4194304;function Kl(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 ds(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var x=a&134217727;return x!==0?(a=x&~i,a!==0?s=Kl(a):(u&=x,u!==0?s=Kl(u):l||(l=x&~e,l!==0&&(s=Kl(l))))):(x=a&~i,x!==0?s=Kl(x):u!==0?s=Kl(u):l||(l=a&~e,l!==0&&(s=Kl(l)))),s===0?0:t!==0&&t!==s&&(t&i)===0&&(i=s&-s,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:s}function sn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function oh(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 Qu(){var e=os;return os<<=1,(os&62914560)===0&&(os=4194304),e}function Qi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function cn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dh(e,t,l,a,s,i){var u=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var x=e.entanglements,b=e.expirationTimes,_=e.hiddenUpdates;for(l=u&~l;0<l;){var H=31-bt(l),X=1<<H;x[H]=0,b[H]=-1;var M=_[H];if(M!==null)for(_[H]=null,H=0;H<M.length;H++){var O=M[H];O!==null&&(O.lane&=-536870913)}l&=~X}a!==0&&Vu(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function Vu(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-bt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Xu(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-bt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Zu(e,t){var l=t&-t;return l=(l&42)!==0?1:Vi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Vi(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 Xi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $u(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:Om(e.type))}function Ku(e,t){var l=F.p;try{return F.p=e,t()}finally{F.p=l}}var yl=Math.random().toString(36).slice(2),tt="__reactFiber$"+yl,ot="__reactProps$"+yl,xa="__reactContainer$"+yl,Zi="__reactEvents$"+yl,fh="__reactListeners$"+yl,mh="__reactHandles$"+yl,Ju="__reactResources$"+yl,rn="__reactMarker$"+yl;function $i(e){delete e[tt],delete e[ot],delete e[Zi],delete e[fh],delete e[mh]}function pa(e){var t=e[tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[xa]||l[tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=vm(e);e!==null;){if(l=e[tt])return l;e=vm(e)}return t}e=l,l=e.parentNode}return null}function ga(e){if(e=e[tt]||e[xa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function un(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function va(e){var t=e[Ju];return t||(t=e[Ju]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[rn]=!0}var Fu=new Set,Wu={};function Jl(e,t){ba(e,t),ba(e+"Capture",t)}function ba(e,t){for(Wu[e]=t,e=0;e<t.length;e++)Fu.add(t[e])}var hh=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]*$"),Pu={},Iu={};function xh(e){return qi.call(Iu,e)?!0:qi.call(Pu,e)?!1:hh.test(e)?Iu[e]=!0:(Pu[e]=!0,!1)}function fs(e,t,l){if(xh(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function ms(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Wt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function Tt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ph(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ki(e){if(!e._valueTracker){var t=eo(e)?"checked":"value";e._valueTracker=ph(e,t,""+e[t])}}function to(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=eo(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function hs(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 gh=/[\n"\\]/g;function Rt(e){return e.replace(gh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ji(e,t,l,a,s,i,u,x){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tt(t)):e.value!==""+Tt(t)&&(e.value=""+Tt(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Fi(e,u,Tt(t)):l!=null?Fi(e,u,Tt(l)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+Tt(x):e.removeAttribute("name")}function lo(e,t,l,a,s,i,u,x){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Ki(e);return}l=l!=null?""+Tt(l):"",t=t!=null?""+Tt(t):l,x||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=x?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Ki(e)}function Fi(e,t,l){t==="number"&&hs(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ya(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Tt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function ao(e,t,l){if(t!=null&&(t=""+Tt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Tt(l):""}function no(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(se(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Tt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Ki(e)}function ja(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var vh=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 so(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||vh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function io(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&so(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&so(e,i,t[i])}function Wi(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 bh=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"]]),yh=/^[\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 xs(e){return yh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Pt(){}var Pi=null;function Ii(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Na=null,Sa=null;function co(e){var t=ga(e);if(t&&(e=t.stateNode)){var l=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ji(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Rt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[ot]||null;if(!s)throw Error(r(90));Ji(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&to(a)}break e;case"textarea":ao(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&ya(e,!!l.multiple,t,!1)}}}var ec=!1;function ro(e,t,l){if(ec)return e(t,l);ec=!0;try{var a=e(t);return a}finally{if(ec=!1,(Na!==null||Sa!==null)&&(li(),Na&&(t=Na,e=Sa,Sa=Na=null,co(t),e)))for(t=0;t<e.length;t++)co(e[t])}}function on(e,t){var l=e.stateNode;if(l===null)return null;var a=l[ot]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var It=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tc=!1;if(It)try{var dn={};Object.defineProperty(dn,"passive",{get:function(){tc=!0}}),window.addEventListener("test",dn,dn),window.removeEventListener("test",dn,dn)}catch{tc=!1}var jl=null,lc=null,ps=null;function uo(){if(ps)return ps;var e,t=lc,l=t.length,a,s="value"in jl?jl.value:jl.textContent,i=s.length;for(e=0;e<l&&t[e]===s[e];e++);var u=l-e;for(a=1;a<=u&&t[l-a]===s[i-a];a++);return ps=s.slice(e,1<a?1-a:void 0)}function gs(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 vs(){return!0}function oo(){return!1}function dt(e){function t(l,a,s,i,u){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(l=e[x],this[x]=l?l(i):i[x]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?vs:oo,this.isPropagationStopped=oo,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vs)},persist:function(){},isPersistent:vs}),t}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bs=dt(Fl),fn=w({},Fl,{view:0,detail:0}),jh=dt(fn),ac,nc,mn,ys=w({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ic,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!==mn&&(mn&&e.type==="mousemove"?(ac=e.screenX-mn.screenX,nc=e.screenY-mn.screenY):nc=ac=0,mn=e),ac)},movementY:function(e){return"movementY"in e?e.movementY:nc}}),fo=dt(ys),Nh=w({},ys,{dataTransfer:0}),Sh=dt(Nh),wh=w({},fn,{relatedTarget:0}),sc=dt(wh),Ch=w({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),Eh=dt(Ch),Ah=w({},Fl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Th=dt(Ah),Rh=w({},Fl,{data:0}),mo=dt(Rh),_h={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mh={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"},zh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zh[e])?!!t[e]:!1}function ic(){return Dh}var Oh=w({},fn,{key:function(e){if(e.key){var t=_h[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ic,charCode:function(e){return e.type==="keypress"?gs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kh=dt(Oh),Uh=w({},ys,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ho=dt(Uh),Hh=w({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ic}),Bh=dt(Hh),Lh=w({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),qh=dt(Lh),Yh=w({},ys,{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}),Gh=dt(Yh),Qh=w({},Fl,{newState:0,oldState:0}),Vh=dt(Qh),Xh=[9,13,27,32],cc=It&&"CompositionEvent"in window,hn=null;It&&"documentMode"in document&&(hn=document.documentMode);var Zh=It&&"TextEvent"in window&&!hn,xo=It&&(!cc||hn&&8<hn&&11>=hn),po=" ",go=!1;function vo(e,t){switch(e){case"keyup":return Xh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wa=!1;function $h(e,t){switch(e){case"compositionend":return bo(t);case"keypress":return t.which!==32?null:(go=!0,po);case"textInput":return e=t.data,e===po&&go?null:e;default:return null}}function Kh(e,t){if(wa)return e==="compositionend"||!cc&&vo(e,t)?(e=uo(),ps=lc=jl=null,wa=!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 xo&&t.locale!=="ko"?null:t.data;default:return null}}var Jh={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 yo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jh[e.type]:t==="textarea"}function jo(e,t,l,a){Na?Sa?Sa.push(a):Sa=[a]:Na=a,t=ui(t,"onChange"),0<t.length&&(l=new bs("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var xn=null,pn=null;function Fh(e){nm(e,0)}function js(e){var t=un(e);if(to(t))return e}function No(e,t){if(e==="change")return t}var So=!1;if(It){var rc;if(It){var uc="oninput"in document;if(!uc){var wo=document.createElement("div");wo.setAttribute("oninput","return;"),uc=typeof wo.oninput=="function"}rc=uc}else rc=!1;So=rc&&(!document.documentMode||9<document.documentMode)}function Co(){xn&&(xn.detachEvent("onpropertychange",Eo),pn=xn=null)}function Eo(e){if(e.propertyName==="value"&&js(pn)){var t=[];jo(t,pn,e,Ii(e)),ro(Fh,t)}}function Wh(e,t,l){e==="focusin"?(Co(),xn=t,pn=l,xn.attachEvent("onpropertychange",Eo)):e==="focusout"&&Co()}function Ph(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return js(pn)}function Ih(e,t){if(e==="click")return js(t)}function ex(e,t){if(e==="input"||e==="change")return js(t)}function tx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:tx;function gn(e,t){if(yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!qi.call(t,s)||!yt(e[s],t[s]))return!1}return!0}function Ao(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function To(e,t){var l=Ao(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ao(l)}}function Ro(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ro(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _o(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=hs(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=hs(e.document)}return t}function oc(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 lx=It&&"documentMode"in document&&11>=document.documentMode,Ca=null,dc=null,vn=null,fc=!1;function Mo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;fc||Ca==null||Ca!==hs(a)||(a=Ca,"selectionStart"in a&&oc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),vn&&gn(vn,a)||(vn=a,a=ui(dc,"onSelect"),0<a.length&&(t=new bs("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ca)))}function Wl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ea={animationend:Wl("Animation","AnimationEnd"),animationiteration:Wl("Animation","AnimationIteration"),animationstart:Wl("Animation","AnimationStart"),transitionrun:Wl("Transition","TransitionRun"),transitionstart:Wl("Transition","TransitionStart"),transitioncancel:Wl("Transition","TransitionCancel"),transitionend:Wl("Transition","TransitionEnd")},mc={},zo={};It&&(zo=document.createElement("div").style,"AnimationEvent"in window||(delete Ea.animationend.animation,delete Ea.animationiteration.animation,delete Ea.animationstart.animation),"TransitionEvent"in window||delete Ea.transitionend.transition);function Pl(e){if(mc[e])return mc[e];if(!Ea[e])return e;var t=Ea[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in zo)return mc[e]=t[l];return e}var Do=Pl("animationend"),Oo=Pl("animationiteration"),ko=Pl("animationstart"),ax=Pl("transitionrun"),nx=Pl("transitionstart"),sx=Pl("transitioncancel"),Uo=Pl("transitionend"),Ho=new Map,hc="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(" ");hc.push("scrollEnd");function Yt(e,t){Ho.set(e,t),Jl(t,[e])}var Ns=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)},_t=[],Aa=0,xc=0;function Ss(){for(var e=Aa,t=xc=Aa=0;t<e;){var l=_t[t];_t[t++]=null;var a=_t[t];_t[t++]=null;var s=_t[t];_t[t++]=null;var i=_t[t];if(_t[t++]=null,a!==null&&s!==null){var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}i!==0&&Bo(l,s,i)}}function ws(e,t,l,a){_t[Aa++]=e,_t[Aa++]=t,_t[Aa++]=l,_t[Aa++]=a,xc|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function pc(e,t,l,a){return ws(e,t,l,a),Cs(e)}function Il(e,t){return ws(e,null,null,t),Cs(e)}function Bo(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-bt(l),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),i):null}function Cs(e){if(50<qn)throw qn=0,Cr=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ta={};function ix(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,l,a){return new ix(e,t,l,a)}function gc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function el(e,t){var l=e.alternate;return l===null?(l=jt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Lo(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Es(e,t,l,a,s,i){var u=0;if(a=e,typeof e=="function")gc(e)&&(u=1);else if(typeof e=="string")u=dp(e,l,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=jt(31,l,t,s),e.elementType=P,e.lanes=i,e;case A:return ea(l.children,s,i,t);case T:u=8,s|=24;break;case Q:return e=jt(12,l,t,s|2),e.elementType=Q,e.lanes=i,e;case B:return e=jt(13,l,t,s),e.elementType=B,e.lanes=i,e;case C:return e=jt(19,l,t,s),e.elementType=C,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:u=10;break e;case q:u=9;break e;case J:u=11;break e;case V:u=14;break e;case Z:u=16,a=null;break e}u=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=jt(u,l,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function ea(e,t,l,a){return e=jt(7,e,a,t),e.lanes=l,e}function vc(e,t,l){return e=jt(6,e,null,t),e.lanes=l,e}function qo(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function bc(e,t,l){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yo=new WeakMap;function Mt(e,t){if(typeof e=="object"&&e!==null){var l=Yo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Lu(t)},Yo.set(e,t),t)}return{value:e,source:t,stack:Lu(t)}}var Ra=[],_a=0,As=null,bn=0,zt=[],Dt=0,Nl=null,Vt=1,Xt="";function tl(e,t){Ra[_a++]=bn,Ra[_a++]=As,As=e,bn=t}function Go(e,t,l){zt[Dt++]=Vt,zt[Dt++]=Xt,zt[Dt++]=Nl,Nl=e;var a=Vt;e=Xt;var s=32-bt(a)-1;a&=~(1<<s),l+=1;var i=32-bt(t)+s;if(30<i){var u=s-s%5;i=(a&(1<<u)-1).toString(32),a>>=u,s-=u,Vt=1<<32-bt(t)+s|l<<s|a,Xt=i+e}else Vt=1<<i|l<<s|a,Xt=e}function yc(e){e.return!==null&&(tl(e,1),Go(e,1,0))}function jc(e){for(;e===As;)As=Ra[--_a],Ra[_a]=null,bn=Ra[--_a],Ra[_a]=null;for(;e===Nl;)Nl=zt[--Dt],zt[Dt]=null,Xt=zt[--Dt],zt[Dt]=null,Vt=zt[--Dt],zt[Dt]=null}function Qo(e,t){zt[Dt++]=Vt,zt[Dt++]=Xt,zt[Dt++]=Nl,Vt=t.id,Xt=t.overflow,Nl=e}var lt=null,He=null,Se=!1,Sl=null,Ot=!1,Nc=Error(r(519));function wl(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yn(Mt(t,e)),Nc}function Vo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[tt]=e,t[ot]=a,l){case"dialog":be("cancel",t),be("close",t);break;case"iframe":case"object":case"embed":be("load",t);break;case"video":case"audio":for(l=0;l<Gn.length;l++)be(Gn[l],t);break;case"source":be("error",t);break;case"img":case"image":case"link":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"input":be("invalid",t),lo(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":be("invalid",t);break;case"textarea":be("invalid",t),no(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||rm(t.textContent,l)?(a.popover!=null&&(be("beforetoggle",t),be("toggle",t)),a.onScroll!=null&&be("scroll",t),a.onScrollEnd!=null&&be("scrollend",t),a.onClick!=null&&(t.onclick=Pt),t=!0):t=!1,t||wl(e,!0)}function Xo(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Ot=!1;return;case 27:case 3:Ot=!0;return;default:lt=lt.return}}function Ma(e){if(e!==lt)return!1;if(!Se)return Xo(e),Se=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||qr(e.type,e.memoizedProps)),l=!l),l&&He&&wl(e),Xo(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=gm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));He=gm(e)}else t===27?(t=He,Bl(e.type)?(e=Xr,Xr=null,He=e):He=t):He=lt?Ut(e.stateNode.nextSibling):null;return!0}function ta(){He=lt=null,Se=!1}function Sc(){var e=Sl;return e!==null&&(xt===null?xt=e:xt.push.apply(xt,e),Sl=null),e}function yn(e){Sl===null?Sl=[e]:Sl.push(e)}var wc=S(null),la=null,ll=null;function Cl(e,t,l){W(wc,t._currentValue),t._currentValue=l}function al(e){e._currentValue=wc.current,G(wc)}function Cc(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Ec(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var u=s.child;i=i.firstContext;e:for(;i!==null;){var x=i;i=s;for(var b=0;b<t.length;b++)if(x.context===t[b]){i.lanes|=l,x=i.alternate,x!==null&&(x.lanes|=l),Cc(i.return,l,e),a||(u=null);break e}i=x.next}}else if(s.tag===18){if(u=s.return,u===null)throw Error(r(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),Cc(u,l,e),u=null}else u=s.child;if(u!==null)u.return=s;else for(u=s;u!==null;){if(u===e){u=null;break}if(s=u.sibling,s!==null){s.return=u.return,u=s;break}u=u.return}s=u}}function za(e,t,l,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if((s.flags&524288)!==0)i=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var u=s.alternate;if(u===null)throw Error(r(387));if(u=u.memoizedProps,u!==null){var x=s.type;yt(s.pendingProps.value,u.value)||(e!==null?e.push(x):e=[x])}}else if(s===he.current){if(u=s.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push($n):e=[$n])}s=s.return}e!==null&&Ec(t,e,l,a),t.flags|=262144}function Ts(e){for(e=e.firstContext;e!==null;){if(!yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){la=e,ll=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function at(e){return Zo(la,e)}function Rs(e,t){return la===null&&aa(e),Zo(e,t)}function Zo(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},ll===null){if(e===null)throw Error(r(308));ll=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ll=ll.next=t;return l}var cx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},rx=c.unstable_scheduleCallback,ux=c.unstable_NormalPriority,Ke={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ac(){return{controller:new cx,data:new Map,refCount:0}}function jn(e){e.refCount--,e.refCount===0&&rx(ux,function(){e.controller.abort()})}var Nn=null,Tc=0,Da=0,Oa=null;function ox(e,t){if(Nn===null){var l=Nn=[];Tc=0,Da=Mr(),Oa={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Tc++,t.then($o,$o),t}function $o(){if(--Tc===0&&Nn!==null){Oa!==null&&(Oa.status="fulfilled");var e=Nn;Nn=null,Da=0,Oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function dx(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Ko=k.S;k.S=function(e,t){zf=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ox(e,t),Ko!==null&&Ko(e,t)};var na=S(null);function Rc(){var e=na.current;return e!==null?e:Ue.pooledCache}function _s(e,t){t===null?W(na,na.current):W(na,t.pool)}function Jo(){var e=Rc();return e===null?null:{parent:Ke._currentValue,pool:e}}var ka=Error(r(460)),_c=Error(r(474)),Ms=Error(r(542)),zs={then:function(){}};function Fo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wo(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Pt,Pt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Io(e),e;default:if(typeof t.status=="string")t.then(Pt,Pt);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Io(e),e}throw ia=t,ka}}function sa(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ia=l,ka):l}}var ia=null;function Po(){if(ia===null)throw Error(r(459));var e=ia;return ia=null,e}function Io(e){if(e===ka||e===Ms)throw Error(r(483))}var Ua=null,Sn=0;function Ds(e){var t=Sn;return Sn+=1,Ua===null&&(Ua=[]),Wo(Ua,e,t)}function wn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Os(e,t){throw t.$$typeof===D?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ed(e){function t(E,N){if(e){var R=E.deletions;R===null?(E.deletions=[N],E.flags|=16):R.push(N)}}function l(E,N){if(!e)return null;for(;N!==null;)t(E,N),N=N.sibling;return null}function a(E){for(var N=new Map;E!==null;)E.key!==null?N.set(E.key,E):N.set(E.index,E),E=E.sibling;return N}function s(E,N){return E=el(E,N),E.index=0,E.sibling=null,E}function i(E,N,R){return E.index=R,e?(R=E.alternate,R!==null?(R=R.index,R<N?(E.flags|=67108866,N):R):(E.flags|=67108866,N)):(E.flags|=1048576,N)}function u(E){return e&&E.alternate===null&&(E.flags|=67108866),E}function x(E,N,R,Y){return N===null||N.tag!==6?(N=vc(R,E.mode,Y),N.return=E,N):(N=s(N,R),N.return=E,N)}function b(E,N,R,Y){var ne=R.type;return ne===A?H(E,N,R.props.children,Y,R.key):N!==null&&(N.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===Z&&sa(ne)===N.type)?(N=s(N,R.props),wn(N,R),N.return=E,N):(N=Es(R.type,R.key,R.props,null,E.mode,Y),wn(N,R),N.return=E,N)}function _(E,N,R,Y){return N===null||N.tag!==4||N.stateNode.containerInfo!==R.containerInfo||N.stateNode.implementation!==R.implementation?(N=bc(R,E.mode,Y),N.return=E,N):(N=s(N,R.children||[]),N.return=E,N)}function H(E,N,R,Y,ne){return N===null||N.tag!==7?(N=ea(R,E.mode,Y,ne),N.return=E,N):(N=s(N,R),N.return=E,N)}function X(E,N,R){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=vc(""+N,E.mode,R),N.return=E,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case z:return R=Es(N.type,N.key,N.props,null,E.mode,R),wn(R,N),R.return=E,R;case U:return N=bc(N,E.mode,R),N.return=E,N;case Z:return N=sa(N),X(E,N,R)}if(se(N)||$(N))return N=ea(N,E.mode,R,null),N.return=E,N;if(typeof N.then=="function")return X(E,Ds(N),R);if(N.$$typeof===L)return X(E,Rs(E,N),R);Os(E,N)}return null}function M(E,N,R,Y){var ne=N!==null?N.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ne!==null?null:x(E,N,""+R,Y);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case z:return R.key===ne?b(E,N,R,Y):null;case U:return R.key===ne?_(E,N,R,Y):null;case Z:return R=sa(R),M(E,N,R,Y)}if(se(R)||$(R))return ne!==null?null:H(E,N,R,Y,null);if(typeof R.then=="function")return M(E,N,Ds(R),Y);if(R.$$typeof===L)return M(E,N,Rs(E,R),Y);Os(E,R)}return null}function O(E,N,R,Y,ne){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return E=E.get(R)||null,x(N,E,""+Y,ne);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case z:return E=E.get(Y.key===null?R:Y.key)||null,b(N,E,Y,ne);case U:return E=E.get(Y.key===null?R:Y.key)||null,_(N,E,Y,ne);case Z:return Y=sa(Y),O(E,N,R,Y,ne)}if(se(Y)||$(Y))return E=E.get(R)||null,H(N,E,Y,ne,null);if(typeof Y.then=="function")return O(E,N,R,Ds(Y),ne);if(Y.$$typeof===L)return O(E,N,R,Rs(N,Y),ne);Os(N,Y)}return null}function ee(E,N,R,Y){for(var ne=null,Ce=null,te=N,pe=N=0,Ne=null;te!==null&&pe<R.length;pe++){te.index>pe?(Ne=te,te=null):Ne=te.sibling;var Ee=M(E,te,R[pe],Y);if(Ee===null){te===null&&(te=Ne);break}e&&te&&Ee.alternate===null&&t(E,te),N=i(Ee,N,pe),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee,te=Ne}if(pe===R.length)return l(E,te),Se&&tl(E,pe),ne;if(te===null){for(;pe<R.length;pe++)te=X(E,R[pe],Y),te!==null&&(N=i(te,N,pe),Ce===null?ne=te:Ce.sibling=te,Ce=te);return Se&&tl(E,pe),ne}for(te=a(te);pe<R.length;pe++)Ne=O(te,E,pe,R[pe],Y),Ne!==null&&(e&&Ne.alternate!==null&&te.delete(Ne.key===null?pe:Ne.key),N=i(Ne,N,pe),Ce===null?ne=Ne:Ce.sibling=Ne,Ce=Ne);return e&&te.forEach(function(Ql){return t(E,Ql)}),Se&&tl(E,pe),ne}function ce(E,N,R,Y){if(R==null)throw Error(r(151));for(var ne=null,Ce=null,te=N,pe=N=0,Ne=null,Ee=R.next();te!==null&&!Ee.done;pe++,Ee=R.next()){te.index>pe?(Ne=te,te=null):Ne=te.sibling;var Ql=M(E,te,Ee.value,Y);if(Ql===null){te===null&&(te=Ne);break}e&&te&&Ql.alternate===null&&t(E,te),N=i(Ql,N,pe),Ce===null?ne=Ql:Ce.sibling=Ql,Ce=Ql,te=Ne}if(Ee.done)return l(E,te),Se&&tl(E,pe),ne;if(te===null){for(;!Ee.done;pe++,Ee=R.next())Ee=X(E,Ee.value,Y),Ee!==null&&(N=i(Ee,N,pe),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee);return Se&&tl(E,pe),ne}for(te=a(te);!Ee.done;pe++,Ee=R.next())Ee=O(te,E,pe,Ee.value,Y),Ee!==null&&(e&&Ee.alternate!==null&&te.delete(Ee.key===null?pe:Ee.key),N=i(Ee,N,pe),Ce===null?ne=Ee:Ce.sibling=Ee,Ce=Ee);return e&&te.forEach(function(Np){return t(E,Np)}),Se&&tl(E,pe),ne}function ke(E,N,R,Y){if(typeof R=="object"&&R!==null&&R.type===A&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case z:e:{for(var ne=R.key;N!==null;){if(N.key===ne){if(ne=R.type,ne===A){if(N.tag===7){l(E,N.sibling),Y=s(N,R.props.children),Y.return=E,E=Y;break e}}else if(N.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===Z&&sa(ne)===N.type){l(E,N.sibling),Y=s(N,R.props),wn(Y,R),Y.return=E,E=Y;break e}l(E,N);break}else t(E,N);N=N.sibling}R.type===A?(Y=ea(R.props.children,E.mode,Y,R.key),Y.return=E,E=Y):(Y=Es(R.type,R.key,R.props,null,E.mode,Y),wn(Y,R),Y.return=E,E=Y)}return u(E);case U:e:{for(ne=R.key;N!==null;){if(N.key===ne)if(N.tag===4&&N.stateNode.containerInfo===R.containerInfo&&N.stateNode.implementation===R.implementation){l(E,N.sibling),Y=s(N,R.children||[]),Y.return=E,E=Y;break e}else{l(E,N);break}else t(E,N);N=N.sibling}Y=bc(R,E.mode,Y),Y.return=E,E=Y}return u(E);case Z:return R=sa(R),ke(E,N,R,Y)}if(se(R))return ee(E,N,R,Y);if($(R)){if(ne=$(R),typeof ne!="function")throw Error(r(150));return R=ne.call(R),ce(E,N,R,Y)}if(typeof R.then=="function")return ke(E,N,Ds(R),Y);if(R.$$typeof===L)return ke(E,N,Rs(E,R),Y);Os(E,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,N!==null&&N.tag===6?(l(E,N.sibling),Y=s(N,R),Y.return=E,E=Y):(l(E,N),Y=vc(R,E.mode,Y),Y.return=E,E=Y),u(E)):l(E,N)}return function(E,N,R,Y){try{Sn=0;var ne=ke(E,N,R,Y);return Ua=null,ne}catch(te){if(te===ka||te===Ms)throw te;var Ce=jt(29,te,null,E.mode);return Ce.lanes=Y,Ce.return=E,Ce}finally{}}}var ca=ed(!0),td=ed(!1),El=!1;function Mc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zc(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 Al(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Tl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ae&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Cs(e),Bo(e,null,l),t}return ws(e,a,t,l),Cs(e)}function Cn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Xu(e,l)}}function Dc(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?s=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?s=i=t:i=i.next=t}else s=i=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Oc=!1;function En(){if(Oc){var e=Oa;if(e!==null)throw e}}function An(e,t,l,a){Oc=!1;var s=e.updateQueue;El=!1;var i=s.firstBaseUpdate,u=s.lastBaseUpdate,x=s.shared.pending;if(x!==null){s.shared.pending=null;var b=x,_=b.next;b.next=null,u===null?i=_:u.next=_,u=b;var H=e.alternate;H!==null&&(H=H.updateQueue,x=H.lastBaseUpdate,x!==u&&(x===null?H.firstBaseUpdate=_:x.next=_,H.lastBaseUpdate=b))}if(i!==null){var X=s.baseState;u=0,H=_=b=null,x=i;do{var M=x.lane&-536870913,O=M!==x.lane;if(O?(je&M)===M:(a&M)===M){M!==0&&M===Da&&(Oc=!0),H!==null&&(H=H.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ee=e,ce=x;M=t;var ke=l;switch(ce.tag){case 1:if(ee=ce.payload,typeof ee=="function"){X=ee.call(ke,X,M);break e}X=ee;break e;case 3:ee.flags=ee.flags&-65537|128;case 0:if(ee=ce.payload,M=typeof ee=="function"?ee.call(ke,X,M):ee,M==null)break e;X=w({},X,M);break e;case 2:El=!0}}M=x.callback,M!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[M]:O.push(M))}else O={lane:M,tag:x.tag,payload:x.payload,callback:x.callback,next:null},H===null?(_=H=O,b=X):H=H.next=O,u|=M;if(x=x.next,x===null){if(x=s.shared.pending,x===null)break;O=x,x=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);H===null&&(b=X),s.baseState=b,s.firstBaseUpdate=_,s.lastBaseUpdate=H,i===null&&(s.shared.lanes=0),Dl|=u,e.lanes=u,e.memoizedState=X}}function ld(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function ad(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ld(l[e],t)}var Ha=S(null),ks=S(0);function nd(e,t){e=fl,W(ks,e),W(Ha,t),fl=e|t.baseLanes}function kc(){W(ks,fl),W(Ha,Ha.current)}function Uc(){fl=ks.current,G(Ha),G(ks)}var Nt=S(null),kt=null;function Rl(e){var t=e.alternate;W(Ze,Ze.current&1),W(Nt,e),kt===null&&(t===null||Ha.current!==null||t.memoizedState!==null)&&(kt=e)}function Hc(e){W(Ze,Ze.current),W(Nt,e),kt===null&&(kt=e)}function sd(e){e.tag===22?(W(Ze,Ze.current),W(Nt,e),kt===null&&(kt=e)):_l()}function _l(){W(Ze,Ze.current),W(Nt,Nt.current)}function St(e){G(Nt),kt===e&&(kt=null),G(Ze)}var Ze=S(0);function Us(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Qr(l)||Vr(l)))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 nl=0,xe=null,De=null,Je=null,Hs=!1,Ba=!1,ra=!1,Bs=0,Tn=0,La=null,fx=0;function Ve(){throw Error(r(321))}function Bc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!yt(e[l],t[l]))return!1;return!0}function Lc(e,t,l,a,s,i){return nl=i,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Gd:er,ra=!1,i=l(a,s),ra=!1,Ba&&(i=cd(t,l,a,s)),id(e),i}function id(e){k.H=Mn;var t=De!==null&&De.next!==null;if(nl=0,Je=De=xe=null,Hs=!1,Tn=0,La=null,t)throw Error(r(300));e===null||Fe||(e=e.dependencies,e!==null&&Ts(e)&&(Fe=!0))}function cd(e,t,l,a){xe=e;var s=0;do{if(Ba&&(La=null),Tn=0,Ba=!1,25<=s)throw Error(r(301));if(s+=1,Je=De=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}k.H=Qd,i=t(l,a)}while(Ba);return i}function mx(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Rn(t):t,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(xe.flags|=1024),t}function qc(){var e=Bs!==0;return Bs=0,e}function Yc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Gc(e){if(Hs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Hs=!1}nl=0,Je=De=xe=null,Ba=!1,Tn=Bs=0,La=null}function ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?xe.memoizedState=Je=e:Je=Je.next=e,Je}function $e(){if(De===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var t=Je===null?xe.memoizedState:Je.next;if(t!==null)Je=t,De=e;else{if(e===null)throw xe.alternate===null?Error(r(467)):Error(r(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Je===null?xe.memoizedState=Je=e:Je=Je.next=e}return Je}function Ls(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Rn(e){var t=Tn;return Tn+=1,La===null&&(La=[]),e=Wo(La,e,t),t=xe,(Je===null?t.memoizedState:Je.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Gd:er),e}function qs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Rn(e);if(e.$$typeof===L)return at(e)}throw Error(r(438,String(e)))}function Qc(e){var t=null,l=xe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=xe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ls(),xe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=oe;return t.index++,l}function sl(e,t){return typeof t=="function"?t(e):t}function Ys(e){var t=$e();return Vc(t,De,e)}function Vc(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var u=s.next;s.next=i.next,i.next=u}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var x=u=null,b=null,_=t,H=!1;do{var X=_.lane&-536870913;if(X!==_.lane?(je&X)===X:(nl&X)===X){var M=_.revertLane;if(M===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),X===Da&&(H=!0);else if((nl&M)===M){_=_.next,M===Da&&(H=!0);continue}else X={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(x=b=X,u=i):b=b.next=X,xe.lanes|=M,Dl|=M;X=_.action,ra&&l(i,X),i=_.hasEagerState?_.eagerState:l(i,X)}else M={lane:X,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},b===null?(x=b=M,u=i):b=b.next=M,xe.lanes|=X,Dl|=X;_=_.next}while(_!==null&&_!==t);if(b===null?u=i:b.next=x,!yt(i,e.memoizedState)&&(Fe=!0,H&&(l=Oa,l!==null)))throw l;e.memoizedState=i,e.baseState=u,e.baseQueue=b,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Xc(e){var t=$e(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,i=t.memoizedState;if(s!==null){l.pending=null;var u=s=s.next;do i=e(i,u.action),u=u.next;while(u!==s);yt(i,t.memoizedState)||(Fe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function rd(e,t,l){var a=xe,s=$e(),i=Se;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=t();var u=!yt((De||s).memoizedState,l);if(u&&(s.memoizedState=l,Fe=!0),s=s.queue,Kc(dd.bind(null,a,s,e),[e]),s.getSnapshot!==t||u||Je!==null&&Je.memoizedState.tag&1){if(a.flags|=2048,qa(9,{destroy:void 0},od.bind(null,a,s,l,t),null),Ue===null)throw Error(r(349));i||(nl&127)!==0||ud(a,t,l)}return l}function ud(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=xe.updateQueue,t===null?(t=Ls(),xe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function od(e,t,l,a){t.value=l,t.getSnapshot=a,fd(t)&&md(e)}function dd(e,t,l){return l(function(){fd(t)&&md(e)})}function fd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!yt(e,l)}catch{return!0}}function md(e){var t=Il(e,2);t!==null&&pt(t,e,2)}function Zc(e){var t=ut();if(typeof e=="function"){var l=e;if(e=l(),ra){bl(!0);try{l()}finally{bl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:e},t}function hd(e,t,l,a){return e.baseState=l,Vc(e,De,typeof a=="function"?a:sl)}function hx(e,t,l,a,s){if(Vs(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};k.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,xd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function xd(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=k.T,u={};k.T=u;try{var x=l(s,a),b=k.S;b!==null&&b(u,x),pd(e,t,x)}catch(_){$c(e,t,_)}finally{i!==null&&u.types!==null&&(i.types=u.types),k.T=i}}else try{i=l(s,a),pd(e,t,i)}catch(_){$c(e,t,_)}}function pd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){gd(e,t,a)},function(a){return $c(e,t,a)}):gd(e,t,l)}function gd(e,t,l){t.status="fulfilled",t.value=l,vd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,xd(e,l)))}function $c(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,vd(t),t=t.next;while(t!==a)}e.action=null}function vd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bd(e,t){return t}function yd(e,t){if(Se){var l=Ue.formState;if(l!==null){e:{var a=xe;if(Se){if(He){t:{for(var s=He,i=Ot;s.nodeType!==8;){if(!i){s=null;break t}if(s=Ut(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){He=Ut(s.nextSibling),a=s.data==="F!";break e}}wl(a)}a=!1}a&&(t=l[0])}}return l=ut(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bd,lastRenderedState:t},l.queue=a,l=Ld.bind(null,xe,a),a.dispatch=l,a=Zc(!1),i=Ic.bind(null,xe,!1,a.queue),a=ut(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=hx.bind(null,xe,s,i,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function jd(e){var t=$e();return Nd(t,De,e)}function Nd(e,t,l){if(t=Vc(e,t,bd)[0],e=Ys(sl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Rn(t)}catch(u){throw u===ka?Ms:u}else a=t;t=$e();var s=t.queue,i=s.dispatch;return l!==t.memoizedState&&(xe.flags|=2048,qa(9,{destroy:void 0},xx.bind(null,s,l),null)),[a,i,e]}function xx(e,t){e.action=t}function Sd(e){var t=$e(),l=De;if(l!==null)return Nd(t,l,e);$e(),t=t.memoizedState,l=$e();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function qa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Ls(),xe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function wd(){return $e().memoizedState}function Gs(e,t,l,a){var s=ut();xe.flags|=e,s.memoizedState=qa(1|t,{destroy:void 0},l,a===void 0?null:a)}function Qs(e,t,l,a){var s=$e();a=a===void 0?null:a;var i=s.memoizedState.inst;De!==null&&a!==null&&Bc(a,De.memoizedState.deps)?s.memoizedState=qa(t,i,l,a):(xe.flags|=e,s.memoizedState=qa(1|t,i,l,a))}function Cd(e,t){Gs(8390656,8,e,t)}function Kc(e,t){Qs(2048,8,e,t)}function px(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=Ls(),xe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Ed(e){var t=$e().memoizedState;return px({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Ad(e,t){return Qs(4,2,e,t)}function Td(e,t){return Qs(4,4,e,t)}function Rd(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _d(e,t,l){l=l!=null?l.concat([e]):null,Qs(4,4,Rd.bind(null,t,e),l)}function Jc(){}function Md(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Bc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function zd(e,t){var l=$e();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Bc(t,a[1]))return a[0];if(a=e(),ra){bl(!0);try{e()}finally{bl(!1)}}return l.memoizedState=[a,t],a}function Fc(e,t,l){return l===void 0||(nl&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Of(),xe.lanes|=e,Dl|=e,l)}function Dd(e,t,l,a){return yt(l,t)?l:Ha.current!==null?(e=Fc(e,l,a),yt(e,t)||(Fe=!0),e):(nl&42)===0||(nl&1073741824)!==0&&(je&261930)===0?(Fe=!0,e.memoizedState=l):(e=Of(),xe.lanes|=e,Dl|=e,t)}function Od(e,t,l,a,s){var i=F.p;F.p=i!==0&&8>i?i:8;var u=k.T,x={};k.T=x,Ic(e,!1,t,l);try{var b=s(),_=k.S;if(_!==null&&_(x,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var H=dx(b,a);_n(e,t,H,Et(e))}else _n(e,t,a,Et(e))}catch(X){_n(e,t,{then:function(){},status:"rejected",reason:X},Et())}finally{F.p=i,u!==null&&x.types!==null&&(u.types=x.types),k.T=u}}function gx(){}function Wc(e,t,l,a){if(e.tag!==5)throw Error(r(476));var s=kd(e).queue;Od(e,s,t,ae,l===null?gx:function(){return Ud(e),l(a)})}function kd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ud(e){var t=kd(e);t.next===null&&(t=e.alternate.memoizedState),_n(e,t.next.queue,{},Et())}function Pc(){return at($n)}function Hd(){return $e().memoizedState}function Bd(){return $e().memoizedState}function vx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Et();e=Al(l);var a=Tl(t,e,l);a!==null&&(pt(a,t,l),Cn(a,t,l)),t={cache:Ac()},e.payload=t;return}t=t.return}}function bx(e,t,l){var a=Et();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Vs(e)?qd(t,l):(l=pc(e,t,l,a),l!==null&&(pt(l,e,a),Yd(l,t,a)))}function Ld(e,t,l){var a=Et();_n(e,t,l,a)}function _n(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))qd(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,x=i(u,l);if(s.hasEagerState=!0,s.eagerState=x,yt(x,u))return ws(e,t,s,0),Ue===null&&Ss(),!1}catch{}finally{}if(l=pc(e,t,s,a),l!==null)return pt(l,e,a),Yd(l,t,a),!0}return!1}function Ic(e,t,l,a){if(a={lane:2,revertLane:Mr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(r(479))}else t=pc(e,l,a,2),t!==null&&pt(t,e,2)}function Vs(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function qd(e,t){Ba=Hs=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Yd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Xu(e,l)}}var Mn={readContext:at,use:qs,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve};Mn.useEffectEvent=Ve;var Gd={readContext:at,use:qs,useCallback:function(e,t){return ut().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Cd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,Gs(4194308,4,Rd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return Gs(4194308,4,e,t)},useInsertionEffect:function(e,t){Gs(4,2,e,t)},useMemo:function(e,t){var l=ut();t=t===void 0?null:t;var a=e();if(ra){bl(!0);try{e()}finally{bl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=ut();if(l!==void 0){var s=l(t);if(ra){bl(!0);try{l(t)}finally{bl(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=bx.bind(null,xe,e),[a.memoizedState,e]},useRef:function(e){var t=ut();return e={current:e},t.memoizedState=e},useState:function(e){e=Zc(e);var t=e.queue,l=Ld.bind(null,xe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Jc,useDeferredValue:function(e,t){var l=ut();return Fc(l,e,t)},useTransition:function(){var e=Zc(!1);return e=Od.bind(null,xe,e.queue,!0,!1),ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=xe,s=ut();if(Se){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Ue===null)throw Error(r(349));(je&127)!==0||ud(a,t,l)}s.memoizedState=l;var i={value:l,getSnapshot:t};return s.queue=i,Cd(dd.bind(null,a,i,e),[e]),a.flags|=2048,qa(9,{destroy:void 0},od.bind(null,a,i,l,t),null),l},useId:function(){var e=ut(),t=Ue.identifierPrefix;if(Se){var l=Xt,a=Vt;l=(a&~(1<<32-bt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Bs++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=fx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Pc,useFormState:yd,useActionState:yd,useOptimistic:function(e){var t=ut();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ic.bind(null,xe,!0,l),l.dispatch=t,[e,t]},useMemoCache:Qc,useCacheRefresh:function(){return ut().memoizedState=vx.bind(null,xe)},useEffectEvent:function(e){var t=ut(),l={impl:e};return t.memoizedState=l,function(){if((Ae&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},er={readContext:at,use:qs,useCallback:Md,useContext:at,useEffect:Kc,useImperativeHandle:_d,useInsertionEffect:Ad,useLayoutEffect:Td,useMemo:zd,useReducer:Ys,useRef:wd,useState:function(){return Ys(sl)},useDebugValue:Jc,useDeferredValue:function(e,t){var l=$e();return Dd(l,De.memoizedState,e,t)},useTransition:function(){var e=Ys(sl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Rn(e),t]},useSyncExternalStore:rd,useId:Hd,useHostTransitionStatus:Pc,useFormState:jd,useActionState:jd,useOptimistic:function(e,t){var l=$e();return hd(l,De,e,t)},useMemoCache:Qc,useCacheRefresh:Bd};er.useEffectEvent=Ed;var Qd={readContext:at,use:qs,useCallback:Md,useContext:at,useEffect:Kc,useImperativeHandle:_d,useInsertionEffect:Ad,useLayoutEffect:Td,useMemo:zd,useReducer:Xc,useRef:wd,useState:function(){return Xc(sl)},useDebugValue:Jc,useDeferredValue:function(e,t){var l=$e();return De===null?Fc(l,e,t):Dd(l,De.memoizedState,e,t)},useTransition:function(){var e=Xc(sl)[0],t=$e().memoizedState;return[typeof e=="boolean"?e:Rn(e),t]},useSyncExternalStore:rd,useId:Hd,useHostTransitionStatus:Pc,useFormState:Sd,useActionState:Sd,useOptimistic:function(e,t){var l=$e();return De!==null?hd(l,De,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Qc,useCacheRefresh:Bd};Qd.useEffectEvent=Ed;function tr(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:w({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var lr={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Et(),s=Al(a);s.payload=t,l!=null&&(s.callback=l),t=Tl(e,s,a),t!==null&&(pt(t,e,a),Cn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Et(),s=Al(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=Tl(e,s,a),t!==null&&(pt(t,e,a),Cn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Et(),a=Al(l);a.tag=2,t!=null&&(a.callback=t),t=Tl(e,a,l),t!==null&&(pt(t,e,l),Cn(t,e,l))}};function Vd(e,t,l,a,s,i,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,u):t.prototype&&t.prototype.isPureReactComponent?!gn(l,a)||!gn(s,i):!0}function Xd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&lr.enqueueReplaceState(t,t.state,null)}function ua(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=w({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Zd(e){Ns(e)}function $d(e){console.error(e)}function Kd(e){Ns(e)}function Xs(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Jd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function ar(e,t,l){return l=Al(l),l.tag=3,l.payload={element:null},l.callback=function(){Xs(e,t)},l}function Fd(e){return e=Al(e),e.tag=3,e}function Wd(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){Jd(t,l,a)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){Jd(t,l,a),typeof s!="function"&&(Ol===null?Ol=new Set([this]):Ol.add(this));var x=a.stack;this.componentDidCatch(a.value,{componentStack:x!==null?x:""})})}function yx(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&za(t,l,s,!0),l=Nt.current,l!==null){switch(l.tag){case 31:case 13:return kt===null?ai():l.alternate===null&&Xe===0&&(Xe=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===zs?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Tr(e,a,s)),!1;case 22:return l.flags|=65536,a===zs?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Tr(e,a,s)),!1}throw Error(r(435,l.tag))}return Tr(e,a,s),ai(),!1}if(Se)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==Nc&&(e=Error(r(422),{cause:a}),yn(Mt(e,l)))):(a!==Nc&&(t=Error(r(423),{cause:a}),yn(Mt(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=Mt(a,l),s=ar(e.stateNode,a,s),Dc(e,s),Xe!==4&&(Xe=2)),!1;var i=Error(r(520),{cause:a});if(i=Mt(i,l),Ln===null?Ln=[i]:Ln.push(i),Xe!==4&&(Xe=2),t===null)return!0;a=Mt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=ar(l.stateNode,a,e),Dc(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ol===null||!Ol.has(i))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Fd(s),Wd(s,e,l,a),Dc(l,s),!1}l=l.return}while(l!==null);return!1}var nr=Error(r(461)),Fe=!1;function nt(e,t,l,a){t.child=e===null?td(t,null,l,a):ca(t,e.child,l,a)}function Pd(e,t,l,a,s){l=l.render;var i=t.ref;if("ref"in a){var u={};for(var x in a)x!=="ref"&&(u[x]=a[x])}else u=a;return aa(t),a=Lc(e,t,l,u,i,s),x=qc(),e!==null&&!Fe?(Yc(e,t,s),il(e,t,s)):(Se&&x&&yc(t),t.flags|=1,nt(e,t,a,s),t.child)}function Id(e,t,l,a,s){if(e===null){var i=l.type;return typeof i=="function"&&!gc(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,ef(e,t,i,a,s)):(e=Es(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!fr(e,s)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:gn,l(u,a)&&e.ref===t.ref)return il(e,t,s)}return t.flags|=1,e=el(i,a),e.ref=t.ref,e.return=t,t.child=e}function ef(e,t,l,a,s){if(e!==null){var i=e.memoizedProps;if(gn(i,a)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=a=i,fr(e,s))(e.flags&131072)!==0&&(Fe=!0);else return t.lanes=e.lanes,il(e,t,s)}return sr(e,t,l,a,s)}function tf(e,t,l,a){var s=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~i}else a=0,t.child=null;return lf(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_s(t,i!==null?i.cachePool:null),i!==null?nd(t,i):kc(),sd(t);else return a=t.lanes=536870912,lf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(_s(t,i.cachePool),nd(t,i),_l(),t.memoizedState=null):(e!==null&&_s(t,null),kc(),_l());return nt(e,t,s,l),t.child}function zn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lf(e,t,l,a,s){var i=Rc();return i=i===null?null:{parent:Ke._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&_s(t,null),kc(),sd(t),e!==null&&za(e,t,a,!0),t.childLanes=s,null}function Zs(e,t){return t=Ks({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function af(e,t,l){return ca(t,e.child,null,l),e=Zs(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function jx(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(a.mode==="hidden")return e=Zs(t,a),t.lanes=536870912,zn(null,e);if(Hc(t),(e=He)?(e=pm(e,Ot),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Nl!==null?{id:Vt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},l=qo(e),l.return=t,t.child=l,lt=t,He=null)):e=null,e===null)throw wl(t);return t.lanes=536870912,null}return Zs(t,a)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(Hc(t),s)if(t.flags&256)t.flags&=-257,t=af(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(Fe||za(e,t,l,!1),s=(l&e.childLanes)!==0,Fe||s){if(a=Ue,a!==null&&(u=Zu(a,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,Il(e,u),pt(a,e,u),nr;ai(),t=af(e,t,l)}else e=i.treeContext,He=Ut(u.nextSibling),lt=t,Se=!0,Sl=null,Ot=!1,e!==null&&Qo(t,e),t=Zs(t,a),t.flags|=4096;return t}return e=el(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function $s(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function sr(e,t,l,a,s){return aa(t),l=Lc(e,t,l,a,void 0,s),a=qc(),e!==null&&!Fe?(Yc(e,t,s),il(e,t,s)):(Se&&a&&yc(t),t.flags|=1,nt(e,t,l,s),t.child)}function nf(e,t,l,a,s,i){return aa(t),t.updateQueue=null,l=cd(t,a,l,s),id(e),a=qc(),e!==null&&!Fe?(Yc(e,t,i),il(e,t,i)):(Se&&a&&yc(t),t.flags|=1,nt(e,t,l,i),t.child)}function sf(e,t,l,a,s){if(aa(t),t.stateNode===null){var i=Ta,u=l.contextType;typeof u=="object"&&u!==null&&(i=at(u)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=lr,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Mc(t),u=l.contextType,i.context=typeof u=="object"&&u!==null?at(u):Ta,i.state=t.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(tr(t,l,u,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&lr.enqueueReplaceState(i,i.state,null),An(t,a,i,s),En(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var x=t.memoizedProps,b=ua(l,x);i.props=b;var _=i.context,H=l.contextType;u=Ta,typeof H=="object"&&H!==null&&(u=at(H));var X=l.getDerivedStateFromProps;H=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(x||_!==u)&&Xd(t,i,a,u),El=!1;var M=t.memoizedState;i.state=M,An(t,a,i,s),En(),_=t.memoizedState,x||M!==_||El?(typeof X=="function"&&(tr(t,l,X,a),_=t.memoizedState),(b=El||Vd(t,l,b,a,M,_,u))?(H||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=_),i.props=a,i.state=_,i.context=u,a=b):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,zc(e,t),u=t.memoizedProps,H=ua(l,u),i.props=H,X=t.pendingProps,M=i.context,_=l.contextType,b=Ta,typeof _=="object"&&_!==null&&(b=at(_)),x=l.getDerivedStateFromProps,(_=typeof x=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==X||M!==b)&&Xd(t,i,a,b),El=!1,M=t.memoizedState,i.state=M,An(t,a,i,s),En();var O=t.memoizedState;u!==X||M!==O||El||e!==null&&e.dependencies!==null&&Ts(e.dependencies)?(typeof x=="function"&&(tr(t,l,x,a),O=t.memoizedState),(H=El||Vd(t,l,H,a,M,O,b)||e!==null&&e.dependencies!==null&&Ts(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,b),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,b)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=b,a=H):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,$s(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=ca(t,e.child,null,s),t.child=ca(t,null,l,s)):nt(e,t,l,s),t.memoizedState=i.state,e=t.child):e=il(e,t,s),e}function cf(e,t,l,a){return ta(),t.flags|=256,nt(e,t,l,a),t.child}var ir={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cr(e){return{baseLanes:e,cachePool:Jo()}}function rr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ct),e}function rf(e,t,l){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(Ze.current&2)!==0),u&&(s=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(s?Rl(t):_l(),(e=He)?(e=pm(e,Ot),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Nl!==null?{id:Vt,overflow:Xt}:null,retryLane:536870912,hydrationErrors:null},l=qo(e),l.return=t,t.child=l,lt=t,He=null)):e=null,e===null)throw wl(t);return Vr(e)?t.lanes=32:t.lanes=536870912,null}var x=a.children;return a=a.fallback,s?(_l(),s=t.mode,x=Ks({mode:"hidden",children:x},s),a=ea(a,s,l,null),x.return=t,a.return=t,x.sibling=a,t.child=x,a=t.child,a.memoizedState=cr(l),a.childLanes=rr(e,u,l),t.memoizedState=ir,zn(null,a)):(Rl(t),ur(t,x))}var b=e.memoizedState;if(b!==null&&(x=b.dehydrated,x!==null)){if(i)t.flags&256?(Rl(t),t.flags&=-257,t=or(e,t,l)):t.memoizedState!==null?(_l(),t.child=e.child,t.flags|=128,t=null):(_l(),x=a.fallback,s=t.mode,a=Ks({mode:"visible",children:a.children},s),x=ea(x,s,l,null),x.flags|=2,a.return=t,x.return=t,a.sibling=x,t.child=a,ca(t,e.child,null,l),a=t.child,a.memoizedState=cr(l),a.childLanes=rr(e,u,l),t.memoizedState=ir,t=zn(null,a));else if(Rl(t),Vr(x)){if(u=x.nextSibling&&x.nextSibling.dataset,u)var _=u.dgst;u=_,a=Error(r(419)),a.stack="",a.digest=u,yn({value:a,source:null,stack:null}),t=or(e,t,l)}else if(Fe||za(e,t,l,!1),u=(l&e.childLanes)!==0,Fe||u){if(u=Ue,u!==null&&(a=Zu(u,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,Il(e,a),pt(u,e,a),nr;Qr(x)||ai(),t=or(e,t,l)}else Qr(x)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,He=Ut(x.nextSibling),lt=t,Se=!0,Sl=null,Ot=!1,e!==null&&Qo(t,e),t=ur(t,a.children),t.flags|=4096);return t}return s?(_l(),x=a.fallback,s=t.mode,b=e.child,_=b.sibling,a=el(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,_!==null?x=el(_,x):(x=ea(x,s,l,null),x.flags|=2),x.return=t,a.return=t,a.sibling=x,t.child=a,zn(null,a),a=t.child,x=e.child.memoizedState,x===null?x=cr(l):(s=x.cachePool,s!==null?(b=Ke._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=Jo(),x={baseLanes:x.baseLanes|l,cachePool:s}),a.memoizedState=x,a.childLanes=rr(e,u,l),t.memoizedState=ir,zn(e.child,a)):(Rl(t),l=e.child,e=l.sibling,l=el(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=l,t.memoizedState=null,l)}function ur(e,t){return t=Ks({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ks(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function or(e,t,l){return ca(t,e.child,null,l),e=ur(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function uf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Cc(e.return,t,l)}function dr(e,t,l,a,s,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=l,u.tailMode=s,u.treeForkCount=i)}function of(e,t,l){var a=t.pendingProps,s=a.revealOrder,i=a.tail;a=a.children;var u=Ze.current,x=(u&2)!==0;if(x?(u=u&1|2,t.flags|=128):u&=1,W(Ze,u),nt(e,t,a,l),a=Se?bn:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uf(e,l,t);else if(e.tag===19)uf(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Us(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),dr(t,!1,s,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Us(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}dr(t,!0,l,null,i,a);break;case"together":dr(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function il(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Dl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(za(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=el(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=el(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function fr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ts(e)))}function Nx(e,t,l){switch(t.tag){case 3:Le(t,t.stateNode.containerInfo),Cl(t,Ke,e.memoizedState.cache),ta();break;case 27:case 5:an(t);break;case 4:Le(t,t.stateNode.containerInfo);break;case 10:Cl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Hc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Rl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?rf(e,t,l):(Rl(t),e=il(e,t,l),e!==null?e.sibling:null);Rl(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(za(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return of(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),W(Ze,Ze.current),a)break;return null;case 22:return t.lanes=0,tf(e,t,l,t.pendingProps);case 24:Cl(t,Ke,e.memoizedState.cache)}return il(e,t,l)}function df(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Fe=!0;else{if(!fr(e,l)&&(t.flags&128)===0)return Fe=!1,Nx(e,t,l);Fe=(e.flags&131072)!==0}else Fe=!1,Se&&(t.flags&1048576)!==0&&Go(t,bn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=sa(t.elementType),t.type=e,typeof e=="function")gc(e)?(a=ua(e,a),t.tag=1,t=sf(null,t,e,a,l)):(t.tag=0,t=sr(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===J){t.tag=11,t=Pd(null,t,e,a,l);break e}else if(s===V){t.tag=14,t=Id(null,t,e,a,l);break e}}throw t=we(e)||e,Error(r(306,t,""))}}return t;case 0:return sr(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=ua(a,t.pendingProps),sf(e,t,a,s,l);case 3:e:{if(Le(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,zc(e,t),An(t,a,null,l);var u=t.memoizedState;if(a=u.cache,Cl(t,Ke,a),a!==i.cache&&Ec(t,[Ke],l,!0),En(),a=u.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cf(e,t,a,l);break e}else if(a!==s){s=Mt(Error(r(424)),t),yn(s),t=cf(e,t,a,l);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(He=Ut(e.firstChild),lt=t,Se=!0,Sl=null,Ot=!0,l=td(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ta(),a===s){t=il(e,t,l);break e}nt(e,t,a,l)}t=t.child}return t;case 26:return $s(e,t),e===null?(l=Nm(t.type,null,t.pendingProps,null))?t.memoizedState=l:Se||(l=t.type,e=t.pendingProps,a=oi(me.current).createElement(l),a[tt]=t,a[ot]=e,st(a,l,e),Ie(a),t.stateNode=a):t.memoizedState=Nm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return an(t),e===null&&Se&&(a=t.stateNode=bm(t.type,t.pendingProps,me.current),lt=t,Ot=!0,s=He,Bl(t.type)?(Xr=s,He=Ut(a.firstChild)):He=s),nt(e,t,t.pendingProps.children,l),$s(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((s=a=He)&&(a=Px(a,t.type,t.pendingProps,Ot),a!==null?(t.stateNode=a,lt=t,He=Ut(a.firstChild),Ot=!1,s=!0):s=!1),s||wl(t)),an(t),s=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,a=i.children,qr(s,i)?a=null:u!==null&&qr(s,u)&&(t.flags|=32),t.memoizedState!==null&&(s=Lc(e,t,mx,null,null,l),$n._currentValue=s),$s(e,t),nt(e,t,a,l),t.child;case 6:return e===null&&Se&&((e=l=He)&&(l=Ix(l,t.pendingProps,Ot),l!==null?(t.stateNode=l,lt=t,He=null,e=!0):e=!1),e||wl(t)),null;case 13:return rf(e,t,l);case 4:return Le(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ca(t,null,a,l):nt(e,t,a,l),t.child;case 11:return Pd(e,t,t.type,t.pendingProps,l);case 7:return nt(e,t,t.pendingProps,l),t.child;case 8:return nt(e,t,t.pendingProps.children,l),t.child;case 12:return nt(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Cl(t,t.type,a.value),nt(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,aa(t),s=at(s),a=a(s),t.flags|=1,nt(e,t,a,l),t.child;case 14:return Id(e,t,t.type,t.pendingProps,l);case 15:return ef(e,t,t.type,t.pendingProps,l);case 19:return of(e,t,l);case 31:return jx(e,t,l);case 22:return tf(e,t,l,t.pendingProps);case 24:return aa(t),a=at(Ke),e===null?(s=Rc(),s===null&&(s=Ue,i=Ac(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=l),s=i),t.memoizedState={parent:a,cache:s},Mc(t),Cl(t,Ke,s)):((e.lanes&l)!==0&&(zc(e,t),An(t,null,null,l),En()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Cl(t,Ke,a)):(a=i.cache,Cl(t,Ke,a),a!==s.cache&&Ec(t,[Ke],l,!0))),nt(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function cl(e){e.flags|=4}function mr(e,t,l,a,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Bf())e.flags|=8192;else throw ia=zs,_c}else e.flags&=-16777217}function ff(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Am(t))if(Bf())e.flags|=8192;else throw ia=zs,_c}function Js(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Qu():536870912,e.lanes|=t,Va|=t)}function Dn(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Be(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Sx(e,t,l){var a=t.pendingProps;switch(jc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Be(t),null;case 1:return Be(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),al(Ke),qe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ma(t)?cl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Sc())),Be(t),null;case 26:var s=t.type,i=t.memoizedState;return e===null?(cl(t),i!==null?(Be(t),ff(t,i)):(Be(t),mr(t,s,null,a,l))):i?i!==e.memoizedState?(cl(t),Be(t),ff(t,i)):(Be(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&cl(t),Be(t),mr(t,s,e,a,l)),null;case 27:if(is(t),l=me.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Be(t),null}e=I.current,Ma(t)?Vo(t):(e=bm(s,a,l),t.stateNode=e,cl(t))}return Be(t),null;case 5:if(is(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Be(t),null}if(i=I.current,Ma(t))Vo(t);else{var u=oi(me.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?u.createElement(s,{is:a.is}):u.createElement(s)}}i[tt]=t,i[ot]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=i;e:switch(st(i,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&cl(t)}}return Be(t),mr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&cl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,Ma(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=lt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[tt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||rm(e.nodeValue,l)),e||wl(t,!0)}else e=oi(e).createTextNode(a),e[tt]=t,t.stateNode=e}return Be(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ma(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[tt]=t}else ta(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),e=!1}else l=Sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Be(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ma(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[tt]=t}else ta(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Be(t),s=!1}else s=Sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Js(t,t.updateQueue),Be(t),null);case 4:return qe(),e===null&&kr(t.stateNode.containerInfo),Be(t),null;case 10:return al(t.type),Be(t),null;case 19:if(G(Ze),a=t.memoizedState,a===null)return Be(t),null;if(s=(t.flags&128)!==0,i=a.rendering,i===null)if(s)Dn(a,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Us(e),i!==null){for(t.flags|=128,Dn(a,!1),e=i.updateQueue,t.updateQueue=e,Js(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Lo(l,e),l=l.sibling;return W(Ze,Ze.current&1|2),Se&&tl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&gt()>ei&&(t.flags|=128,s=!0,Dn(a,!1),t.lanes=4194304)}else{if(!s)if(e=Us(i),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Js(t,e),Dn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Se)return Be(t),null}else 2*gt()-a.renderingStartTime>ei&&l!==536870912&&(t.flags|=128,s=!0,Dn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=gt(),e.sibling=null,l=Ze.current,W(Ze,s?l&1|2:l&1),Se&&tl(t,a.treeForkCount),e):(Be(t),null);case 22:case 23:return St(t),Uc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Be(t),t.subtreeFlags&6&&(t.flags|=8192)):Be(t),l=t.updateQueue,l!==null&&Js(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&G(na),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),al(Ke),Be(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function wx(e,t){switch(jc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return al(Ke),qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return is(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(r(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(Ze),null;case 4:return qe(),null;case 10:return al(t.type),null;case 22:case 23:return St(t),Uc(),e!==null&&G(na),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return al(Ke),null;case 25:return null;default:return null}}function mf(e,t){switch(jc(t),t.tag){case 3:al(Ke),qe();break;case 26:case 27:case 5:is(t);break;case 4:qe();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:G(Ze);break;case 10:al(t.type);break;case 22:case 23:St(t),Uc(),e!==null&&G(na);break;case 24:al(Ke)}}function On(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var i=l.create,u=l.inst;a=i(),u.destroy=a}l=l.next}while(l!==s)}}catch(x){ze(t,t.return,x)}}function Ml(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var u=a.inst,x=u.destroy;if(x!==void 0){u.destroy=void 0,s=t;var b=l,_=x;try{_()}catch(H){ze(s,b,H)}}}a=a.next}while(a!==i)}}catch(H){ze(t,t.return,H)}}function hf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{ad(t,l)}catch(a){ze(e,e.return,a)}}}function xf(e,t,l){l.props=ua(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){ze(e,t,a)}}function kn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){ze(e,t,s)}}function Zt(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){ze(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){ze(e,t,s)}else l.current=null}function pf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){ze(e,e.return,s)}}function hr(e,t,l){try{var a=e.stateNode;Zx(a,e.type,l,t),a[ot]=t}catch(s){ze(e,e.return,s)}}function gf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bl(e.type)||e.tag===4}function xr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gf(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&&Bl(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 pr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Pt));else if(a!==4&&(a===27&&Bl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(pr(e,t,l),e=e.sibling;e!==null;)pr(e,t,l),e=e.sibling}function Fs(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Bl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Fs(e,t,l),e=e.sibling;e!==null;)Fs(e,t,l),e=e.sibling}function vf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);st(t,a,l),t[tt]=e,t[ot]=l}catch(i){ze(e,e.return,i)}}var rl=!1,We=!1,gr=!1,bf=typeof WeakSet=="function"?WeakSet:Set,et=null;function Cx(e,t){if(e=e.containerInfo,Br=gi,e=_o(e),oc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var u=0,x=-1,b=-1,_=0,H=0,X=e,M=null;t:for(;;){for(var O;X!==l||s!==0&&X.nodeType!==3||(x=u+s),X!==i||a!==0&&X.nodeType!==3||(b=u+a),X.nodeType===3&&(u+=X.nodeValue.length),(O=X.firstChild)!==null;)M=X,X=O;for(;;){if(X===e)break t;if(M===l&&++_===s&&(x=u),M===i&&++H===a&&(b=u),(O=X.nextSibling)!==null)break;X=M,M=X.parentNode}X=O}l=x===-1||b===-1?null:{start:x,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Lr={focusedElem:e,selectionRange:l},gi=!1,et=t;et!==null;)if(t=et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,et=e;else for(;et!==null;){switch(t=et,i=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(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,s=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var ee=ua(l.type,s);e=a.getSnapshotBeforeUpdate(ee,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ce){ze(l,l.return,ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Gr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gr(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,et=e;break}et=t.return}}function yf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ol(e,l),a&4&&On(5,l);break;case 1:if(ol(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(u){ze(l,l.return,u)}else{var s=ua(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){ze(l,l.return,u)}}a&64&&hf(l),a&512&&kn(l,l.return);break;case 3:if(ol(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{ad(e,t)}catch(u){ze(l,l.return,u)}}break;case 27:t===null&&a&4&&vf(l);case 26:case 5:ol(e,l),t===null&&a&4&&pf(l),a&512&&kn(l,l.return);break;case 12:ol(e,l);break;case 31:ol(e,l),a&4&&Sf(e,l);break;case 13:ol(e,l),a&4&&wf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Ox.bind(null,l),ep(e,l))));break;case 22:if(a=l.memoizedState!==null||rl,!a){t=t!==null&&t.memoizedState!==null||We,s=rl;var i=We;rl=a,(We=t)&&!i?dl(e,l,(l.subtreeFlags&8772)!==0):ol(e,l),rl=s,We=i}break;case 30:break;default:ol(e,l)}}function jf(e){var t=e.alternate;t!==null&&(e.alternate=null,jf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$i(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 Ye=null,ft=!1;function ul(e,t,l){for(l=l.child;l!==null;)Nf(e,t,l),l=l.sibling}function Nf(e,t,l){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(nn,l)}catch{}switch(l.tag){case 26:We||Zt(l,t),ul(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:We||Zt(l,t);var a=Ye,s=ft;Bl(l.type)&&(Ye=l.stateNode,ft=!1),ul(e,t,l),Vn(l.stateNode),Ye=a,ft=s;break;case 5:We||Zt(l,t);case 6:if(a=Ye,s=ft,Ye=null,ul(e,t,l),Ye=a,ft=s,Ye!==null)if(ft)try{(Ye.nodeType===9?Ye.body:Ye.nodeName==="HTML"?Ye.ownerDocument.body:Ye).removeChild(l.stateNode)}catch(i){ze(l,t,i)}else try{Ye.removeChild(l.stateNode)}catch(i){ze(l,t,i)}break;case 18:Ye!==null&&(ft?(e=Ye,hm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Pa(e)):hm(Ye,l.stateNode));break;case 4:a=Ye,s=ft,Ye=l.stateNode.containerInfo,ft=!0,ul(e,t,l),Ye=a,ft=s;break;case 0:case 11:case 14:case 15:Ml(2,l,t),We||Ml(4,l,t),ul(e,t,l);break;case 1:We||(Zt(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&xf(l,t,a)),ul(e,t,l);break;case 21:ul(e,t,l);break;case 22:We=(a=We)||l.memoizedState!==null,ul(e,t,l),We=a;break;default:ul(e,t,l)}}function Sf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pa(e)}catch(l){ze(t,t.return,l)}}}function wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pa(e)}catch(l){ze(t,t.return,l)}}function Ex(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bf),t;default:throw Error(r(435,e.tag))}}function Ws(e,t){var l=Ex(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=kx.bind(null,e,a);a.then(s,s)}})}function mt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],i=e,u=t,x=u;e:for(;x!==null;){switch(x.tag){case 27:if(Bl(x.type)){Ye=x.stateNode,ft=!1;break e}break;case 5:Ye=x.stateNode,ft=!1;break e;case 3:case 4:Ye=x.stateNode.containerInfo,ft=!0;break e}x=x.return}if(Ye===null)throw Error(r(160));Nf(i,u,s),Ye=null,ft=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cf(t,e),t=t.sibling}var Gt=null;function Cf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:mt(t,e),ht(e),a&4&&(Ml(3,e,e.return),On(3,e),Ml(5,e,e.return));break;case 1:mt(t,e),ht(e),a&512&&(We||l===null||Zt(l,l.return)),a&64&&rl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Gt;if(mt(t,e),ht(e),a&512&&(We||l===null||Zt(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[rn]||i[tt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),st(i,a,l),i[tt]=e,Ie(i),a=i;break e;case"link":var u=Cm("link","href",s).get(a+(l.href||""));if(u){for(var x=0;x<u.length;x++)if(i=u[x],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(x,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;case"meta":if(u=Cm("meta","content",s).get(a+(l.content||""))){for(x=0;x<u.length;x++)if(i=u[x],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(x,1);break t}}i=s.createElement(a),st(i,a,l),s.head.appendChild(i);break;default:throw Error(r(468,a))}i[tt]=e,Ie(i),a=i}e.stateNode=a}else Em(s,e.type,e.stateNode);else e.stateNode=wm(s,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Em(s,e.type,e.stateNode):wm(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&hr(e,e.memoizedProps,l.memoizedProps)}break;case 27:mt(t,e),ht(e),a&512&&(We||l===null||Zt(l,l.return)),l!==null&&a&4&&hr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(mt(t,e),ht(e),a&512&&(We||l===null||Zt(l,l.return)),e.flags&32){s=e.stateNode;try{ja(s,"")}catch(ee){ze(e,e.return,ee)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,hr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(gr=!0);break;case 6:if(mt(t,e),ht(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(ee){ze(e,e.return,ee)}}break;case 3:if(mi=null,s=Gt,Gt=di(t.containerInfo),mt(t,e),Gt=s,ht(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Pa(t.containerInfo)}catch(ee){ze(e,e.return,ee)}gr&&(gr=!1,Ef(e));break;case 4:a=Gt,Gt=di(e.stateNode.containerInfo),mt(t,e),ht(e),Gt=a;break;case 12:mt(t,e),ht(e);break;case 31:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 13:mt(t,e),ht(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Is=gt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,_=rl,H=We;if(rl=_||s,We=H||b,mt(t,e),We=H,rl=_,ht(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||rl||We||oa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(i=b.stateNode,s)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{x=b.stateNode;var X=b.memoizedProps.style,M=X!=null&&X.hasOwnProperty("display")?X.display:null;x.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(ee){ze(b,b.return,ee)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(ee){ze(b,b.return,ee)}}}else if(t.tag===18){if(l===null){b=t;try{var O=b.stateNode;s?xm(O,!0):xm(b.stateNode,!1)}catch(ee){ze(b,b.return,ee)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Ws(e,l))));break;case 19:mt(t,e),ht(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ws(e,a)));break;case 30:break;case 21:break;default:mt(t,e),ht(e)}}function ht(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(gf(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,i=xr(e);Fs(e,i,s);break;case 5:var u=l.stateNode;l.flags&32&&(ja(u,""),l.flags&=-33);var x=xr(e);Fs(e,x,u);break;case 3:case 4:var b=l.stateNode.containerInfo,_=xr(e);pr(e,_,b);break;default:throw Error(r(161))}}catch(H){ze(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ef(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ef(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yf(e,t.alternate,t),t=t.sibling}function oa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ml(4,t,t.return),oa(t);break;case 1:Zt(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&xf(t,t.return,l),oa(t);break;case 27:Vn(t.stateNode);case 26:case 5:Zt(t,t.return),oa(t);break;case 22:t.memoizedState===null&&oa(t);break;case 30:oa(t);break;default:oa(t)}e=e.sibling}}function dl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,u=i.flags;switch(i.tag){case 0:case 11:case 15:dl(s,i,l),On(4,i);break;case 1:if(dl(s,i,l),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(_){ze(a,a.return,_)}if(a=i,s=a.updateQueue,s!==null){var x=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)ld(b[s],x)}catch(_){ze(a,a.return,_)}}l&&u&64&&hf(i),kn(i,i.return);break;case 27:vf(i);case 26:case 5:dl(s,i,l),l&&a===null&&u&4&&pf(i),kn(i,i.return);break;case 12:dl(s,i,l);break;case 31:dl(s,i,l),l&&u&4&&Sf(s,i);break;case 13:dl(s,i,l),l&&u&4&&wf(s,i);break;case 22:i.memoizedState===null&&dl(s,i,l),kn(i,i.return);break;case 30:break;default:dl(s,i,l)}t=t.sibling}}function vr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&jn(l))}function br(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jn(e))}function Qt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Af(e,t,l,a),t=t.sibling}function Af(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Qt(e,t,l,a),s&2048&&On(9,t);break;case 1:Qt(e,t,l,a);break;case 3:Qt(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&jn(e)));break;case 12:if(s&2048){Qt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,u=i.id,x=i.onPostCommit;typeof x=="function"&&x(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){ze(t,t.return,b)}}else Qt(e,t,l,a);break;case 31:Qt(e,t,l,a);break;case 13:Qt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,u=t.alternate,t.memoizedState!==null?i._visibility&2?Qt(e,t,l,a):Un(e,t):i._visibility&2?Qt(e,t,l,a):(i._visibility|=2,Ya(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&vr(u,t);break;case 24:Qt(e,t,l,a),s&2048&&br(t.alternate,t);break;default:Qt(e,t,l,a)}}function Ya(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,u=t,x=l,b=a,_=u.flags;switch(u.tag){case 0:case 11:case 15:Ya(i,u,x,b,s),On(8,u);break;case 23:break;case 22:var H=u.stateNode;u.memoizedState!==null?H._visibility&2?Ya(i,u,x,b,s):Un(i,u):(H._visibility|=2,Ya(i,u,x,b,s)),s&&_&2048&&vr(u.alternate,u);break;case 24:Ya(i,u,x,b,s),s&&_&2048&&br(u.alternate,u);break;default:Ya(i,u,x,b,s)}t=t.sibling}}function Un(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Un(l,a),s&2048&&vr(a.alternate,a);break;case 24:Un(l,a),s&2048&&br(a.alternate,a);break;default:Un(l,a)}t=t.sibling}}var Hn=8192;function Ga(e,t,l){if(e.subtreeFlags&Hn)for(e=e.child;e!==null;)Tf(e,t,l),e=e.sibling}function Tf(e,t,l){switch(e.tag){case 26:Ga(e,t,l),e.flags&Hn&&e.memoizedState!==null&&fp(l,Gt,e.memoizedState,e.memoizedProps);break;case 5:Ga(e,t,l);break;case 3:case 4:var a=Gt;Gt=di(e.stateNode.containerInfo),Ga(e,t,l),Gt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Hn,Hn=16777216,Ga(e,t,l),Hn=a):Ga(e,t,l));break;default:Ga(e,t,l)}}function Rf(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 Bn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,Mf(a,e)}Rf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_f(e),e=e.sibling}function _f(e){switch(e.tag){case 0:case 11:case 15:Bn(e),e.flags&2048&&Ml(9,e,e.return);break;case 3:Bn(e);break;case 12:Bn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ps(e)):Bn(e);break;default:Bn(e)}}function Ps(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];et=a,Mf(a,e)}Rf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ml(8,t,t.return),Ps(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ps(t));break;default:Ps(t)}e=e.sibling}}function Mf(e,t){for(;et!==null;){var l=et;switch(l.tag){case 0:case 11:case 15:Ml(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:jn(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,et=a;else e:for(l=e;et!==null;){a=et;var s=a.sibling,i=a.return;if(jf(a),a===l){et=null;break e}if(s!==null){s.return=i,et=s;break e}et=i}}}var Ax={getCacheForType:function(e){var t=at(Ke),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return at(Ke).controller.signal}},Tx=typeof WeakMap=="function"?WeakMap:Map,Ae=0,Ue=null,ve=null,je=0,Me=0,wt=null,zl=!1,Qa=!1,yr=!1,fl=0,Xe=0,Dl=0,da=0,jr=0,Ct=0,Va=0,Ln=null,xt=null,Nr=!1,Is=0,zf=0,ei=1/0,ti=null,Ol=null,Pe=0,kl=null,Xa=null,ml=0,Sr=0,wr=null,Df=null,qn=0,Cr=null;function Et(){return(Ae&2)!==0&&je!==0?je&-je:k.T!==null?Mr():$u()}function Of(){if(Ct===0)if((je&536870912)===0||Se){var e=us;us<<=1,(us&3932160)===0&&(us=262144),Ct=e}else Ct=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Ct}function pt(e,t,l){(e===Ue&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Za(e,0),Ul(e,je,Ct,!1)),cn(e,l),((Ae&2)===0||e!==Ue)&&(e===Ue&&((Ae&2)===0&&(da|=l),Xe===4&&Ul(e,je,Ct,!1)),$t(e))}function kf(e,t,l){if((Ae&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||sn(e,t),s=a?Mx(e,t):Ar(e,t,!0),i=a;do{if(s===0){Qa&&!a&&Ul(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Rx(l)){s=Ar(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var x=e;s=Ln;var b=x.current.memoizedState.isDehydrated;if(b&&(Za(x,u).flags|=256),u=Ar(x,u,!1),u!==2){if(yr&&!b){x.errorRecoveryDisabledLanes|=i,da|=i,s=4;break e}i=xt,xt=s,i!==null&&(xt===null?xt=i:xt.push.apply(xt,i))}s=u}if(i=!1,s!==2)continue}}if(s===1){Za(e,0),Ul(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Ul(a,t,Ct,!zl);break e;case 2:xt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=Is+300-gt(),10<s)){if(Ul(a,t,Ct,!zl),ds(a,0,!0)!==0)break e;ml=t,a.timeoutHandle=fm(Uf.bind(null,a,l,xt,ti,Nr,t,Ct,da,Va,zl,i,"Throttled",-0,0),s);break e}Uf(a,l,xt,ti,Nr,t,Ct,da,Va,zl,i,null,-0,0)}}break}while(!0);$t(e)}function Uf(e,t,l,a,s,i,u,x,b,_,H,X,M,O){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Pt},Tf(t,i,X);var ee=(i&62914560)===i?Is-gt():(i&4194048)===i?zf-gt():0;if(ee=mp(X,ee),ee!==null){ml=i,e.cancelPendingCommit=ee(Vf.bind(null,e,t,i,l,a,s,u,x,b,H,X,null,M,O)),Ul(e,i,u,!_);return}}Vf(e,t,i,l,a,s,u,x,b)}function Rx(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],i=s.getSnapshot;s=s.value;try{if(!yt(i(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Ul(e,t,l,a){t&=~jr,t&=~da,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-bt(s),u=1<<i;a[i]=-1,s&=~u}l!==0&&Vu(e,l,t)}function li(){return(Ae&6)===0?(Yn(0),!1):!0}function Er(){if(ve!==null){if(Me===0)var e=ve.return;else e=ve,ll=la=null,Gc(e),Ua=null,Sn=0,e=ve;for(;e!==null;)mf(e.alternate,e),e=e.return;ve=null}}function Za(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Jx(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ml=0,Er(),Ue=e,ve=l=el(e.current,null),je=t,Me=0,wt=null,zl=!1,Qa=sn(e,t),yr=!1,Va=Ct=jr=da=Dl=Xe=0,xt=Ln=null,Nr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-bt(a),i=1<<s;t|=e[s],a&=~i}return fl=t,Ss(),l}function Hf(e,t){xe=null,k.H=Mn,t===ka||t===Ms?(t=Po(),Me=3):t===_c?(t=Po(),Me=4):Me=t===nr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,wt=t,ve===null&&(Xe=1,Xs(e,Mt(t,e.current)))}function Bf(){var e=Nt.current;return e===null?!0:(je&4194048)===je?kt===null:(je&62914560)===je||(je&536870912)!==0?e===kt:!1}function Lf(){var e=k.H;return k.H=Mn,e===null?Mn:e}function qf(){var e=k.A;return k.A=Ax,e}function ai(){Xe=4,zl||(je&4194048)!==je&&Nt.current!==null||(Qa=!0),(Dl&134217727)===0&&(da&134217727)===0||Ue===null||Ul(Ue,je,Ct,!1)}function Ar(e,t,l){var a=Ae;Ae|=2;var s=Lf(),i=qf();(Ue!==e||je!==t)&&(ti=null,Za(e,t)),t=!1;var u=Xe;e:do try{if(Me!==0&&ve!==null){var x=ve,b=wt;switch(Me){case 8:Er(),u=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var _=Me;if(Me=0,wt=null,$a(e,x,b,_),l&&Qa){u=0;break e}break;default:_=Me,Me=0,wt=null,$a(e,x,b,_)}}_x(),u=Xe;break}catch(H){Hf(e,H)}while(!0);return t&&e.shellSuspendCounter++,ll=la=null,Ae=a,k.H=s,k.A=i,ve===null&&(Ue=null,je=0,Ss()),u}function _x(){for(;ve!==null;)Yf(ve)}function Mx(e,t){var l=Ae;Ae|=2;var a=Lf(),s=qf();Ue!==e||je!==t?(ti=null,ei=gt()+500,Za(e,t)):Qa=sn(e,t);e:do try{if(Me!==0&&ve!==null){t=ve;var i=wt;t:switch(Me){case 1:Me=0,wt=null,$a(e,t,i,1);break;case 2:case 9:if(Fo(i)){Me=0,wt=null,Gf(t);break}t=function(){Me!==2&&Me!==9||Ue!==e||(Me=7),$t(e)},i.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:Fo(i)?(Me=0,wt=null,Gf(t)):(Me=0,wt=null,$a(e,t,i,7));break;case 5:var u=null;switch(ve.tag){case 26:u=ve.memoizedState;case 5:case 27:var x=ve;if(u?Am(u):x.stateNode.complete){Me=0,wt=null;var b=x.sibling;if(b!==null)ve=b;else{var _=x.return;_!==null?(ve=_,ni(_)):ve=null}break t}}Me=0,wt=null,$a(e,t,i,5);break;case 6:Me=0,wt=null,$a(e,t,i,6);break;case 8:Er(),Xe=6;break e;default:throw Error(r(462))}}zx();break}catch(H){Hf(e,H)}while(!0);return ll=la=null,k.H=a,k.A=s,Ae=l,ve!==null?0:(Ue=null,je=0,Ss(),Xe)}function zx(){for(;ve!==null&&!th();)Yf(ve)}function Yf(e){var t=df(e.alternate,e,fl);e.memoizedProps=e.pendingProps,t===null?ni(e):ve=t}function Gf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=nf(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=nf(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Gc(t);default:mf(l,t),t=ve=Lo(t,fl),t=df(l,t,fl)}e.memoizedProps=e.pendingProps,t===null?ni(e):ve=t}function $a(e,t,l,a){ll=la=null,Gc(t),Ua=null,Sn=0;var s=t.return;try{if(yx(e,s,t,l,je)){Xe=1,Xs(e,Mt(l,e.current)),ve=null;return}}catch(i){if(s!==null)throw ve=s,i;Xe=1,Xs(e,Mt(l,e.current)),ve=null;return}t.flags&32768?(Se||a===1?e=!0:Qa||(je&536870912)!==0?e=!1:(zl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Nt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Qf(t,e)):ni(t)}function ni(e){var t=e;do{if((t.flags&32768)!==0){Qf(t,zl);return}e=t.return;var l=Sx(t.alternate,t,fl);if(l!==null){ve=l;return}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Xe===0&&(Xe=5)}function Qf(e,t){do{var l=wx(e.alternate,e);if(l!==null){l.flags&=32767,ve=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ve=e;return}ve=e=l}while(e!==null);Xe=6,ve=null}function Vf(e,t,l,a,s,i,u,x,b){e.cancelPendingCommit=null;do si();while(Pe!==0);if((Ae&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=xc,dh(e,l,i,u,x,b),e===Ue&&(ve=Ue=null,je=0),Xa=t,kl=e,ml=l,Sr=i,wr=s,Df=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Ux(cs,function(){return Jf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null,s=F.p,F.p=2,u=Ae,Ae|=4;try{Cx(e,t,l)}finally{Ae=u,F.p=s,k.T=a}}Pe=1,Xf(),Zf(),$f()}}function Xf(){if(Pe===1){Pe=0;var e=kl,t=Xa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null;var a=F.p;F.p=2;var s=Ae;Ae|=4;try{Cf(t,e);var i=Lr,u=_o(e.containerInfo),x=i.focusedElem,b=i.selectionRange;if(u!==x&&x&&x.ownerDocument&&Ro(x.ownerDocument.documentElement,x)){if(b!==null&&oc(x)){var _=b.start,H=b.end;if(H===void 0&&(H=_),"selectionStart"in x)x.selectionStart=_,x.selectionEnd=Math.min(H,x.value.length);else{var X=x.ownerDocument||document,M=X&&X.defaultView||window;if(M.getSelection){var O=M.getSelection(),ee=x.textContent.length,ce=Math.min(b.start,ee),ke=b.end===void 0?ce:Math.min(b.end,ee);!O.extend&&ce>ke&&(u=ke,ke=ce,ce=u);var E=To(x,ce),N=To(x,ke);if(E&&N&&(O.rangeCount!==1||O.anchorNode!==E.node||O.anchorOffset!==E.offset||O.focusNode!==N.node||O.focusOffset!==N.offset)){var R=X.createRange();R.setStart(E.node,E.offset),O.removeAllRanges(),ce>ke?(O.addRange(R),O.extend(N.node,N.offset)):(R.setEnd(N.node,N.offset),O.addRange(R))}}}}for(X=[],O=x;O=O.parentNode;)O.nodeType===1&&X.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<X.length;x++){var Y=X[x];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}gi=!!Br,Lr=Br=null}finally{Ae=s,F.p=a,k.T=l}}e.current=t,Pe=2}}function Zf(){if(Pe===2){Pe=0;var e=kl,t=Xa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=k.T,k.T=null;var a=F.p;F.p=2;var s=Ae;Ae|=4;try{yf(e,t.alternate,t)}finally{Ae=s,F.p=a,k.T=l}}Pe=3}}function $f(){if(Pe===4||Pe===3){Pe=0,lh();var e=kl,t=Xa,l=ml,a=Df;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pe=5:(Pe=0,Xa=kl=null,Kf(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ol=null),Xi(l),t=t.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(nn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=k.T,s=F.p,F.p=2,k.T=null;try{for(var i=e.onRecoverableError,u=0;u<a.length;u++){var x=a[u];i(x.value,{componentStack:x.stack})}}finally{k.T=t,F.p=s}}(ml&3)!==0&&si(),$t(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===Cr?qn++:(qn=0,Cr=e):qn=0,Yn(0)}}function Kf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,jn(t)))}function si(){return Xf(),Zf(),$f(),Jf()}function Jf(){if(Pe!==5)return!1;var e=kl,t=Sr;Sr=0;var l=Xi(ml),a=k.T,s=F.p;try{F.p=32>l?32:l,k.T=null,l=wr,wr=null;var i=kl,u=ml;if(Pe=0,Xa=kl=null,ml=0,(Ae&6)!==0)throw Error(r(331));var x=Ae;if(Ae|=4,_f(i.current),Af(i,i.current,u,l),Ae=x,Yn(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(nn,i)}catch{}return!0}finally{F.p=s,k.T=a,Kf(e,t)}}function Ff(e,t,l){t=Mt(l,t),t=ar(e.stateNode,t,2),e=Tl(e,t,2),e!==null&&(cn(e,2),$t(e))}function ze(e,t,l){if(e.tag===3)Ff(e,e,l);else for(;t!==null;){if(t.tag===3){Ff(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ol===null||!Ol.has(a))){e=Mt(l,e),l=Fd(2),a=Tl(t,l,2),a!==null&&(Wd(l,a,t,e),cn(a,2),$t(a));break}}t=t.return}}function Tr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Tx;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(yr=!0,s.add(l),e=Dx.bind(null,e,t,l),t.then(e,e))}function Dx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ue===e&&(je&l)===l&&(Xe===4||Xe===3&&(je&62914560)===je&&300>gt()-Is?(Ae&2)===0&&Za(e,0):jr|=l,Va===je&&(Va=0)),$t(e)}function Wf(e,t){t===0&&(t=Qu()),e=Il(e,t),e!==null&&(cn(e,t),$t(e))}function Ox(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Wf(e,l)}function kx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),Wf(e,l)}function Ux(e,t){return Yi(e,t)}var ii=null,Ka=null,Rr=!1,ci=!1,_r=!1,Hl=0;function $t(e){e!==Ka&&e.next===null&&(Ka===null?ii=Ka=e:Ka=Ka.next=e),ci=!0,Rr||(Rr=!0,Bx())}function Yn(e,t){if(!_r&&ci){_r=!0;do for(var l=!1,a=ii;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var u=a.suspendedLanes,x=a.pingedLanes;i=(1<<31-bt(42|e)+1)-1,i&=s&~(u&~x),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,tm(a,i))}else i=je,i=ds(a,a===Ue?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||sn(a,i)||(l=!0,tm(a,i));a=a.next}while(l);_r=!1}}function Hx(){Pf()}function Pf(){ci=Rr=!1;var e=0;Hl!==0&&Kx()&&(e=Hl);for(var t=gt(),l=null,a=ii;a!==null;){var s=a.next,i=If(a,t);i===0?(a.next=null,l===null?ii=s:l.next=s,s===null&&(Ka=l)):(l=a,(e!==0||(i&3)!==0)&&(ci=!0)),a=s}Pe!==0&&Pe!==5||Yn(e),Hl!==0&&(Hl=0)}function If(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-bt(i),x=1<<u,b=s[u];b===-1?((x&l)===0||(x&a)!==0)&&(s[u]=oh(x,t)):b<=t&&(e.expiredLanes|=x),i&=~x}if(t=Ue,l=je,l=ds(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Gi(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||sn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Gi(a),Xi(l)){case 2:case 8:l=Yu;break;case 32:l=cs;break;case 268435456:l=Gu;break;default:l=cs}return a=em.bind(null,e),l=Yi(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Gi(a),e.callbackPriority=2,e.callbackNode=null,2}function em(e,t){if(Pe!==0&&Pe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(si()&&e.callbackNode!==l)return null;var a=je;return a=ds(e,e===Ue?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(kf(e,a,t),If(e,gt()),e.callbackNode!=null&&e.callbackNode===l?em.bind(null,e):null)}function tm(e,t){if(si())return null;kf(e,t,!0)}function Bx(){Fx(function(){(Ae&6)!==0?Yi(qu,Hx):Pf()})}function Mr(){if(Hl===0){var e=Da;e===0&&(e=rs,rs<<=1,(rs&261888)===0&&(rs=256)),Hl=e}return Hl}function lm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:xs(""+e)}function am(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Lx(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var i=lm((s[ot]||null).action),u=a.submitter;u&&(t=(t=u[ot]||null)?lm(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var x=new bs("action","action",null,a,s);e.push({event:x,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Hl!==0){var b=u?am(s,u):new FormData(s);Wc(l,{pending:!0,data:b,method:s.method,action:i},null,b)}}else typeof i=="function"&&(x.preventDefault(),b=u?am(s,u):new FormData(s),Wc(l,{pending:!0,data:b,method:s.method,action:i},i,b))},currentTarget:s}]})}}for(var zr=0;zr<hc.length;zr++){var Dr=hc[zr],qx=Dr.toLowerCase(),Yx=Dr[0].toUpperCase()+Dr.slice(1);Yt(qx,"on"+Yx)}Yt(Do,"onAnimationEnd"),Yt(Oo,"onAnimationIteration"),Yt(ko,"onAnimationStart"),Yt("dblclick","onDoubleClick"),Yt("focusin","onFocus"),Yt("focusout","onBlur"),Yt(ax,"onTransitionRun"),Yt(nx,"onTransitionStart"),Yt(sx,"onTransitionCancel"),Yt(Uo,"onTransitionEnd"),ba("onMouseEnter",["mouseout","mouseover"]),ba("onMouseLeave",["mouseout","mouseover"]),ba("onPointerEnter",["pointerout","pointerover"]),ba("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gn="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(" "),Gx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gn));function nm(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var u=a.length-1;0<=u;u--){var x=a[u],b=x.instance,_=x.currentTarget;if(x=x.listener,b!==i&&s.isPropagationStopped())break e;i=x,s.currentTarget=_;try{i(s)}catch(H){Ns(H)}s.currentTarget=null,i=b}else for(u=0;u<a.length;u++){if(x=a[u],b=x.instance,_=x.currentTarget,x=x.listener,b!==i&&s.isPropagationStopped())break e;i=x,s.currentTarget=_;try{i(s)}catch(H){Ns(H)}s.currentTarget=null,i=b}}}}function be(e,t){var l=t[Zi];l===void 0&&(l=t[Zi]=new Set);var a=e+"__bubble";l.has(a)||(sm(t,e,2,!1),l.add(a))}function Or(e,t,l){var a=0;t&&(a|=4),sm(l,e,a,t)}var ri="_reactListening"+Math.random().toString(36).slice(2);function kr(e){if(!e[ri]){e[ri]=!0,Fu.forEach(function(l){l!=="selectionchange"&&(Gx.has(l)||Or(l,!1,e),Or(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ri]||(t[ri]=!0,Or("selectionchange",!1,t))}}function sm(e,t,l,a){switch(Om(t)){case 2:var s=pp;break;case 8:s=gp;break;default:s=Fr}l=s.bind(null,t,l,e),s=void 0,!tc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Ur(e,t,l,a,s){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var x=a.stateNode.containerInfo;if(x===s)break;if(u===4)for(u=a.return;u!==null;){var b=u.tag;if((b===3||b===4)&&u.stateNode.containerInfo===s)return;u=u.return}for(;x!==null;){if(u=pa(x),u===null)return;if(b=u.tag,b===5||b===6||b===26||b===27){a=i=u;continue e}x=x.parentNode}}a=a.return}ro(function(){var _=i,H=Ii(l),X=[];e:{var M=Ho.get(e);if(M!==void 0){var O=bs,ee=e;switch(e){case"keypress":if(gs(l)===0)break e;case"keydown":case"keyup":O=kh;break;case"focusin":ee="focus",O=sc;break;case"focusout":ee="blur",O=sc;break;case"beforeblur":case"afterblur":O=sc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=fo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Sh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Bh;break;case Do:case Oo:case ko:O=Eh;break;case Uo:O=qh;break;case"scroll":case"scrollend":O=jh;break;case"wheel":O=Gh;break;case"copy":case"cut":case"paste":O=Th;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=ho;break;case"toggle":case"beforetoggle":O=Vh}var ce=(t&4)!==0,ke=!ce&&(e==="scroll"||e==="scrollend"),E=ce?M!==null?M+"Capture":null:M;ce=[];for(var N=_,R;N!==null;){var Y=N;if(R=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||R===null||E===null||(Y=on(N,E),Y!=null&&ce.push(Qn(N,Y,R))),ke)break;N=N.return}0<ce.length&&(M=new O(M,ee,null,l,H),X.push({event:M,listeners:ce}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",M&&l!==Pi&&(ee=l.relatedTarget||l.fromElement)&&(pa(ee)||ee[xa]))break e;if((O||M)&&(M=H.window===H?H:(M=H.ownerDocument)?M.defaultView||M.parentWindow:window,O?(ee=l.relatedTarget||l.toElement,O=_,ee=ee?pa(ee):null,ee!==null&&(ke=f(ee),ce=ee.tag,ee!==ke||ce!==5&&ce!==27&&ce!==6)&&(ee=null)):(O=null,ee=_),O!==ee)){if(ce=fo,Y="onMouseLeave",E="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ce=ho,Y="onPointerLeave",E="onPointerEnter",N="pointer"),ke=O==null?M:un(O),R=ee==null?M:un(ee),M=new ce(Y,N+"leave",O,l,H),M.target=ke,M.relatedTarget=R,Y=null,pa(H)===_&&(ce=new ce(E,N+"enter",ee,l,H),ce.target=R,ce.relatedTarget=ke,Y=ce),ke=Y,O&&ee)t:{for(ce=Qx,E=O,N=ee,R=0,Y=E;Y;Y=ce(Y))R++;Y=0;for(var ne=N;ne;ne=ce(ne))Y++;for(;0<R-Y;)E=ce(E),R--;for(;0<Y-R;)N=ce(N),Y--;for(;R--;){if(E===N||N!==null&&E===N.alternate){ce=E;break t}E=ce(E),N=ce(N)}ce=null}else ce=null;O!==null&&im(X,M,O,ce,!1),ee!==null&&ke!==null&&im(X,ke,ee,ce,!0)}}e:{if(M=_?un(_):window,O=M.nodeName&&M.nodeName.toLowerCase(),O==="select"||O==="input"&&M.type==="file")var Ce=No;else if(yo(M))if(So)Ce=ex;else{Ce=Ph;var te=Wh}else O=M.nodeName,!O||O.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?_&&Wi(_.elementType)&&(Ce=No):Ce=Ih;if(Ce&&(Ce=Ce(e,_))){jo(X,Ce,l,H);break e}te&&te(e,M,_),e==="focusout"&&_&&M.type==="number"&&_.memoizedProps.value!=null&&Fi(M,"number",M.value)}switch(te=_?un(_):window,e){case"focusin":(yo(te)||te.contentEditable==="true")&&(Ca=te,dc=_,vn=null);break;case"focusout":vn=dc=Ca=null;break;case"mousedown":fc=!0;break;case"contextmenu":case"mouseup":case"dragend":fc=!1,Mo(X,l,H);break;case"selectionchange":if(lx)break;case"keydown":case"keyup":Mo(X,l,H)}var pe;if(cc)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else wa?vo(e,l)&&(Ne="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ne="onCompositionStart");Ne&&(xo&&l.locale!=="ko"&&(wa||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&wa&&(pe=uo()):(jl=H,lc="value"in jl?jl.value:jl.textContent,wa=!0)),te=ui(_,Ne),0<te.length&&(Ne=new mo(Ne,e,null,l,H),X.push({event:Ne,listeners:te}),pe?Ne.data=pe:(pe=bo(l),pe!==null&&(Ne.data=pe)))),(pe=Zh?$h(e,l):Kh(e,l))&&(Ne=ui(_,"onBeforeInput"),0<Ne.length&&(te=new mo("onBeforeInput","beforeinput",null,l,H),X.push({event:te,listeners:Ne}),te.data=pe)),Lx(X,e,_,l,H)}nm(X,t)})}function Qn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function ui(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=on(e,l),s!=null&&a.unshift(Qn(e,s,i)),s=on(e,t),s!=null&&a.push(Qn(e,s,i))),e.tag===3)return a;e=e.return}return[]}function Qx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function im(e,t,l,a,s){for(var i=t._reactName,u=[];l!==null&&l!==a;){var x=l,b=x.alternate,_=x.stateNode;if(x=x.tag,b!==null&&b===a)break;x!==5&&x!==26&&x!==27||_===null||(b=_,s?(_=on(l,i),_!=null&&u.unshift(Qn(l,_,b))):s||(_=on(l,i),_!=null&&u.push(Qn(l,_,b)))),l=l.return}u.length!==0&&e.push({event:t,listeners:u})}var Vx=/\r\n?/g,Xx=/\u0000|\uFFFD/g;function cm(e){return(typeof e=="string"?e:""+e).replace(Vx,`
49
+ `).replace(Xx,"")}function rm(e,t){return t=cm(t),cm(e)===t}function Oe(e,t,l,a,s,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ja(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ja(e,""+a);break;case"className":ms(e,"class",a);break;case"tabIndex":ms(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ms(e,l,a);break;case"style":io(e,a,i);break;case"data":if(t!=="object"){ms(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=xs(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 i=="function"&&(l==="formAction"?(t!=="input"&&Oe(e,t,"name",s.name,s,null),Oe(e,t,"formEncType",s.formEncType,s,null),Oe(e,t,"formMethod",s.formMethod,s,null),Oe(e,t,"formTarget",s.formTarget,s,null)):(Oe(e,t,"encType",s.encType,s,null),Oe(e,t,"method",s.method,s,null),Oe(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=xs(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"onScroll":a!=null&&be("scroll",e);break;case"onScrollEnd":a!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=xs(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":be("beforetoggle",e),be("toggle",e),fs(e,"popover",a);break;case"xlinkActuate":Wt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Wt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Wt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Wt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Wt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Wt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Wt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":fs(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=bh.get(l)||l,fs(e,l,a))}}function Hr(e,t,l,a,s,i){switch(l){case"style":io(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?ja(e,a):(typeof a=="number"||typeof a=="bigint")&&ja(e,""+a);break;case"onScroll":a!=null&&be("scroll",e);break;case"onScrollEnd":a!=null&&be("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Pt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wu.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),i=e[ot]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):fs(e,l,a)}}}function st(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var a=!1,s=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Oe(e,t,i,u,l,null)}}s&&Oe(e,t,"srcSet",l.srcSet,l,null),a&&Oe(e,t,"src",l.src,l,null);return;case"input":be("invalid",e);var x=i=u=s=null,b=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var H=l[a];if(H!=null)switch(a){case"name":s=H;break;case"type":u=H;break;case"checked":b=H;break;case"defaultChecked":_=H;break;case"value":i=H;break;case"defaultValue":x=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:Oe(e,t,a,H,l,null)}}lo(e,i,x,b,_,u,s,!1);return;case"select":be("invalid",e),a=u=i=null;for(s in l)if(l.hasOwnProperty(s)&&(x=l[s],x!=null))switch(s){case"value":i=x;break;case"defaultValue":u=x;break;case"multiple":a=x;default:Oe(e,t,s,x,l,null)}t=i,l=u,e.multiple=!!a,t!=null?ya(e,!!a,t,!1):l!=null&&ya(e,!!a,l,!0);return;case"textarea":be("invalid",e),i=s=a=null;for(u in l)if(l.hasOwnProperty(u)&&(x=l[u],x!=null))switch(u){case"value":a=x;break;case"defaultValue":s=x;break;case"children":i=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:Oe(e,t,u,x,l,null)}no(e,a,s,i);return;case"option":for(b in l)if(l.hasOwnProperty(b)&&(a=l[b],a!=null))switch(b){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Oe(e,t,b,a,l,null)}return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(a=0;a<Gn.length;a++)be(Gn[a],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("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(_ in l)if(l.hasOwnProperty(_)&&(a=l[_],a!=null))switch(_){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Oe(e,t,_,a,l,null)}return;default:if(Wi(t)){for(H in l)l.hasOwnProperty(H)&&(a=l[H],a!==void 0&&Hr(e,t,H,a,l,void 0));return}}for(x in l)l.hasOwnProperty(x)&&(a=l[x],a!=null&&Oe(e,t,x,a,l,null))}function Zx(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,u=null,x=null,b=null,_=null,H=null;for(O in l){var X=l[O];if(l.hasOwnProperty(O)&&X!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=X;default:a.hasOwnProperty(O)||Oe(e,t,O,null,a,X)}}for(var M in a){var O=a[M];if(X=l[M],a.hasOwnProperty(M)&&(O!=null||X!=null))switch(M){case"type":i=O;break;case"name":s=O;break;case"checked":_=O;break;case"defaultChecked":H=O;break;case"value":u=O;break;case"defaultValue":x=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==X&&Oe(e,t,M,O,a,X)}}Ji(e,u,x,b,_,H,i,s);return;case"select":O=u=x=M=null;for(i in l)if(b=l[i],l.hasOwnProperty(i)&&b!=null)switch(i){case"value":break;case"multiple":O=b;default:a.hasOwnProperty(i)||Oe(e,t,i,null,a,b)}for(s in a)if(i=a[s],b=l[s],a.hasOwnProperty(s)&&(i!=null||b!=null))switch(s){case"value":M=i;break;case"defaultValue":x=i;break;case"multiple":u=i;default:i!==b&&Oe(e,t,s,i,a,b)}t=x,l=u,a=O,M!=null?ya(e,!!l,M,!1):!!a!=!!l&&(t!=null?ya(e,!!l,t,!0):ya(e,!!l,l?[]:"",!1));return;case"textarea":O=M=null;for(x in l)if(s=l[x],l.hasOwnProperty(x)&&s!=null&&!a.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Oe(e,t,x,null,a,s)}for(u in a)if(s=a[u],i=l[u],a.hasOwnProperty(u)&&(s!=null||i!=null))switch(u){case"value":M=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==i&&Oe(e,t,u,s,a,i)}ao(e,M,O);return;case"option":for(var ee in l)if(M=l[ee],l.hasOwnProperty(ee)&&M!=null&&!a.hasOwnProperty(ee))switch(ee){case"selected":e.selected=!1;break;default:Oe(e,t,ee,null,a,M)}for(b in a)if(M=a[b],O=l[b],a.hasOwnProperty(b)&&M!==O&&(M!=null||O!=null))switch(b){case"selected":e.selected=M&&typeof M!="function"&&typeof M!="symbol";break;default:Oe(e,t,b,M,a,O)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ce in l)M=l[ce],l.hasOwnProperty(ce)&&M!=null&&!a.hasOwnProperty(ce)&&Oe(e,t,ce,null,a,M);for(_ in a)if(M=a[_],O=l[_],a.hasOwnProperty(_)&&M!==O&&(M!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:Oe(e,t,_,M,a,O)}return;default:if(Wi(t)){for(var ke in l)M=l[ke],l.hasOwnProperty(ke)&&M!==void 0&&!a.hasOwnProperty(ke)&&Hr(e,t,ke,void 0,a,M);for(H in a)M=a[H],O=l[H],!a.hasOwnProperty(H)||M===O||M===void 0&&O===void 0||Hr(e,t,H,M,a,O);return}}for(var E in l)M=l[E],l.hasOwnProperty(E)&&M!=null&&!a.hasOwnProperty(E)&&Oe(e,t,E,null,a,M);for(X in a)M=a[X],O=l[X],!a.hasOwnProperty(X)||M===O||M==null&&O==null||Oe(e,t,X,M,a,O)}function um(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $x(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],i=s.transferSize,u=s.initiatorType,x=s.duration;if(i&&x&&um(u)){for(u=0,x=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],_=b.startTime;if(_>x)break;var H=b.transferSize,X=b.initiatorType;H&&um(X)&&(b=b.responseEnd,u+=H*(b<x?1:(x-_)/(b-_)))}if(--a,t+=8*(i+u)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Br=null,Lr=null;function oi(e){return e.nodeType===9?e:e.ownerDocument}function om(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 dm(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 qr(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 Yr=null;function Kx(){var e=window.event;return e&&e.type==="popstate"?e===Yr?!1:(Yr=e,!0):(Yr=null,!1)}var fm=typeof setTimeout=="function"?setTimeout:void 0,Jx=typeof clearTimeout=="function"?clearTimeout:void 0,mm=typeof Promise=="function"?Promise:void 0,Fx=typeof queueMicrotask=="function"?queueMicrotask:typeof mm<"u"?function(e){return mm.resolve(null).then(e).catch(Wx)}:fm;function Wx(e){setTimeout(function(){throw e})}function Bl(e){return e==="head"}function hm(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),Pa(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Vn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Vn(l);for(var i=l.firstChild;i;){var u=i.nextSibling,x=i.nodeName;i[rn]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&Vn(e.ownerDocument.body);l=s}while(l);Pa(t)}function xm(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Gr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Gr(l),$i(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Px(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[rn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Ut(e.nextSibling),e===null)break}return null}function Ix(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ut(e.nextSibling),e===null))return null;return e}function pm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ut(e.nextSibling),e===null))return null;return e}function Qr(e){return e.data==="$?"||e.data==="$~"}function Vr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ep(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Ut(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 Xr=null;function gm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Ut(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function vm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function bm(e,t,l){switch(t=oi(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Vn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);$i(e)}var Ht=new Map,ym=new Set;function di(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var hl=F.d;F.d={f:tp,r:lp,D:ap,C:np,L:sp,m:ip,X:rp,S:cp,M:up};function tp(){var e=hl.f(),t=li();return e||t}function lp(e){var t=ga(e);t!==null&&t.tag===5&&t.type==="form"?Ud(t):hl.r(e)}var Ja=typeof document>"u"?null:document;function jm(e,t,l){var a=Ja;if(a&&typeof t=="string"&&t){var s=Rt(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),ym.has(s)||(ym.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),st(t,"link",e),Ie(t),a.head.appendChild(t)))}}function ap(e){hl.D(e),jm("dns-prefetch",e,null)}function np(e,t){hl.C(e,t),jm("preconnect",e,t)}function sp(e,t,l){hl.L(e,t,l);var a=Ja;if(a&&e&&t){var s='link[rel="preload"][as="'+Rt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+Rt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+Rt(l.imageSizes)+'"]')):s+='[href="'+Rt(e)+'"]';var i=s;switch(t){case"style":i=Fa(e);break;case"script":i=Wa(e)}Ht.has(i)||(e=w({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ht.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(Xn(i))||t==="script"&&a.querySelector(Zn(i))||(t=a.createElement("link"),st(t,"link",e),Ie(t),a.head.appendChild(t)))}}function ip(e,t){hl.m(e,t);var l=Ja;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Rt(a)+'"][href="'+Rt(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Wa(e)}if(!Ht.has(i)&&(e=w({rel:"modulepreload",href:e},t),Ht.set(i,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Zn(i)))return}a=l.createElement("link"),st(a,"link",e),Ie(a),l.head.appendChild(a)}}}function cp(e,t,l){hl.S(e,t,l);var a=Ja;if(a&&e){var s=va(a).hoistableStyles,i=Fa(e);t=t||"default";var u=s.get(i);if(!u){var x={loading:0,preload:null};if(u=a.querySelector(Xn(i)))x.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ht.get(i))&&Zr(e,l);var b=u=a.createElement("link");Ie(b),st(b,"link",e),b._p=new Promise(function(_,H){b.onload=_,b.onerror=H}),b.addEventListener("load",function(){x.loading|=1}),b.addEventListener("error",function(){x.loading|=2}),x.loading|=4,fi(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:x},s.set(i,u)}}}function rp(e,t){hl.X(e,t);var l=Ja;if(l&&e){var a=va(l).hoistableScripts,s=Wa(e),i=a.get(s);i||(i=l.querySelector(Zn(s)),i||(e=w({src:e,async:!0},t),(t=Ht.get(s))&&$r(e,t),i=l.createElement("script"),Ie(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function up(e,t){hl.M(e,t);var l=Ja;if(l&&e){var a=va(l).hoistableScripts,s=Wa(e),i=a.get(s);i||(i=l.querySelector(Zn(s)),i||(e=w({src:e,async:!0,type:"module"},t),(t=Ht.get(s))&&$r(e,t),i=l.createElement("script"),Ie(i),st(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function Nm(e,t,l,a){var s=(s=me.current)?di(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Fa(l.href),l=va(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Fa(l.href);var i=va(s).hoistableStyles,u=i.get(e);if(u||(s=s.ownerDocument||s,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,u),(i=s.querySelector(Xn(e)))&&!i._p&&(u.instance=i,u.state.loading=5),Ht.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ht.set(e,l),i||op(s,e,l,u.state))),t&&a===null)throw Error(r(528,""));return u}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wa(l),l=va(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Fa(e){return'href="'+Rt(e)+'"'}function Xn(e){return'link[rel="stylesheet"]['+e+"]"}function Sm(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function op(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),st(t,"link",l),Ie(t),e.head.appendChild(t))}function Wa(e){return'[src="'+Rt(e)+'"]'}function Zn(e){return"script[async]"+e}function wm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Rt(l.href)+'"]');if(a)return t.instance=a,Ie(a),a;var s=w({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ie(a),st(a,"style",s),fi(a,l.precedence,e),t.instance=a;case"stylesheet":s=Fa(l.href);var i=e.querySelector(Xn(s));if(i)return t.state.loading|=4,t.instance=i,Ie(i),i;a=Sm(l),(s=Ht.get(s))&&Zr(a,s),i=(e.ownerDocument||e).createElement("link"),Ie(i);var u=i;return u._p=new Promise(function(x,b){u.onload=x,u.onerror=b}),st(i,"link",a),t.state.loading|=4,fi(i,l.precedence,e),t.instance=i;case"script":return i=Wa(l.src),(s=e.querySelector(Zn(i)))?(t.instance=s,Ie(s),s):(a=l,(s=Ht.get(i))&&(a=w({},l),$r(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),Ie(s),st(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,fi(a,l.precedence,e));return t.instance}function fi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,u=0;u<a.length;u++){var x=a[u];if(x.dataset.precedence===t)i=x;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Zr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $r(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var mi=null;function Cm(e,t,l){if(mi===null){var a=new Map,s=mi=new Map;s.set(l,a)}else s=mi,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var i=l[s];if(!(i[rn]||i[tt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(t)||"";u=e+u;var x=a.get(u);x?x.push(i):a.set(u,[i])}}return a}function Em(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function dp(e,t,l){if(l===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 Am(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fp(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Fa(a.href),i=t.querySelector(Xn(s));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=hi.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,Ie(i);return}i=t.ownerDocument||t,a=Sm(a),(s=Ht.get(s))&&Zr(a,s),i=i.createElement("link"),Ie(i);var u=i;u._p=new Promise(function(x,b){u.onload=x,u.onerror=b}),st(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=hi.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Kr=0;function mp(e,t){return e.stylesheets&&e.count===0&&pi(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&pi(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Kr===0&&(Kr=62500*$x());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pi(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Kr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function hi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var xi=null;function pi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,xi=new Map,t.forEach(hp,e),xi=null,hi.call(e))}function hp(e,t){if(!(t.state.loading&4)){var l=xi.get(e);if(l)var a=l.get(null);else{l=new Map,xi.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var u=s[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),a=u)}a&&l.set(null,a)}s=t.instance,u=s.getAttribute("data-precedence"),i=l.get(u)||a,i===a&&l.set(null,s),l.set(u,s),this.count++,a=hi.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var $n={$$typeof:L,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function xp(e,t,l,a,s,i,u,x,b){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=Qi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qi(0),this.hiddenUpdates=Qi(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Tm(e,t,l,a,s,i,u,x,b,_,H,X){return e=new xp(e,t,l,u,b,_,H,X,x),t=1,i===!0&&(t|=24),i=jt(3,null,null,t),e.current=i,i.stateNode=e,t=Ac(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Mc(i),e}function Rm(e){return e?(e=Ta,e):Ta}function _m(e,t,l,a,s,i){s=Rm(s),a.context===null?a.context=s:a.pendingContext=s,a=Al(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Tl(e,a,t),l!==null&&(pt(l,e,t),Cn(l,e,t))}function Mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Jr(e,t){Mm(e,t),(e=e.alternate)&&Mm(e,t)}function zm(e){if(e.tag===13||e.tag===31){var t=Il(e,67108864);t!==null&&pt(t,e,67108864),Jr(e,67108864)}}function Dm(e){if(e.tag===13||e.tag===31){var t=Et();t=Vi(t);var l=Il(e,t);l!==null&&pt(l,e,t),Jr(e,t)}}var gi=!0;function pp(e,t,l,a){var s=k.T;k.T=null;var i=F.p;try{F.p=2,Fr(e,t,l,a)}finally{F.p=i,k.T=s}}function gp(e,t,l,a){var s=k.T;k.T=null;var i=F.p;try{F.p=8,Fr(e,t,l,a)}finally{F.p=i,k.T=s}}function Fr(e,t,l,a){if(gi){var s=Wr(a);if(s===null)Ur(e,t,a,vi,l),km(e,a);else if(bp(s,e,t,l,a))a.stopPropagation();else if(km(e,a),t&4&&-1<vp.indexOf(e)){for(;s!==null;){var i=ga(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=Kl(i.pendingLanes);if(u!==0){var x=i;for(x.pendingLanes|=2,x.entangledLanes|=2;u;){var b=1<<31-bt(u);x.entanglements[1]|=b,u&=~b}$t(i),(Ae&6)===0&&(ei=gt()+500,Yn(0))}}break;case 31:case 13:x=Il(i,2),x!==null&&pt(x,i,2),li(),Jr(i,2)}if(i=Wr(a),i===null&&Ur(e,t,a,vi,l),i===s)break;s=i}s!==null&&a.stopPropagation()}else Ur(e,t,a,null,l)}}function Wr(e){return e=Ii(e),Pr(e)}var vi=null;function Pr(e){if(vi=null,e=pa(e),e!==null){var t=f(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=h(t),e!==null)return e;e=null}else if(l===31){if(e=v(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return vi=e,null}function Om(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(ah()){case qu:return 2;case Yu:return 8;case cs:case nh:return 32;case Gu:return 268435456;default:return 32}default:return 32}}var Ir=!1,Ll=null,ql=null,Yl=null,Kn=new Map,Jn=new Map,Gl=[],vp="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 km(e,t){switch(e){case"focusin":case"focusout":Ll=null;break;case"dragenter":case"dragleave":ql=null;break;case"mouseover":case"mouseout":Yl=null;break;case"pointerover":case"pointerout":Kn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jn.delete(t.pointerId)}}function Fn(e,t,l,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ga(t),t!==null&&zm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function bp(e,t,l,a,s){switch(t){case"focusin":return Ll=Fn(Ll,e,t,l,a,s),!0;case"dragenter":return ql=Fn(ql,e,t,l,a,s),!0;case"mouseover":return Yl=Fn(Yl,e,t,l,a,s),!0;case"pointerover":var i=s.pointerId;return Kn.set(i,Fn(Kn.get(i)||null,e,t,l,a,s)),!0;case"gotpointercapture":return i=s.pointerId,Jn.set(i,Fn(Jn.get(i)||null,e,t,l,a,s)),!0}return!1}function Um(e){var t=pa(e.target);if(t!==null){var l=f(t);if(l!==null){if(t=l.tag,t===13){if(t=h(l),t!==null){e.blockedOn=t,Ku(e.priority,function(){Dm(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Ku(e.priority,function(){Dm(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function bi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Wr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Pi=a,l.target.dispatchEvent(a),Pi=null}else return t=ga(l),t!==null&&zm(t),e.blockedOn=l,!1;t.shift()}return!0}function Hm(e,t,l){bi(e)&&l.delete(t)}function yp(){Ir=!1,Ll!==null&&bi(Ll)&&(Ll=null),ql!==null&&bi(ql)&&(ql=null),Yl!==null&&bi(Yl)&&(Yl=null),Kn.forEach(Hm),Jn.forEach(Hm)}function yi(e,t){e.blockedOn===t&&(e.blockedOn=null,Ir||(Ir=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,yp)))}var ji=null;function Bm(e){ji!==e&&(ji=e,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){ji===e&&(ji=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Pr(a||l)===null)continue;break}var i=ga(l);i!==null&&(e.splice(t,3),t-=3,Wc(i,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Pa(e){function t(b){return yi(b,e)}Ll!==null&&yi(Ll,e),ql!==null&&yi(ql,e),Yl!==null&&yi(Yl,e),Kn.forEach(t),Jn.forEach(t);for(var l=0;l<Gl.length;l++){var a=Gl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Gl.length&&(l=Gl[0],l.blockedOn===null);)Um(l),l.blockedOn===null&&Gl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],i=l[a+1],u=s[ot]||null;if(typeof i=="function")u||Bm(l);else if(u){var x=null;if(i&&i.hasAttribute("formAction")){if(s=i,u=i[ot]||null)x=u.formAction;else if(Pr(s)!==null)continue}else x=u.action;typeof x=="function"?l[a+1]=x:(l.splice(a,3),a-=3),Bm(l)}}}function Lm(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return s=u})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function eu(e){this._internalRoot=e}Ni.prototype.render=eu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Et();_m(l,a,e,t,null,null)},Ni.prototype.unmount=eu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_m(e.current,2,null,e,null,null),li(),t[xa]=null}};function Ni(e){this._internalRoot=e}Ni.prototype.unstable_scheduleHydration=function(e){if(e){var t=$u();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Gl.length&&t!==0&&t<Gl[l].priority;l++);Gl.splice(l,0,e),l===0&&Um(e)}};var qm=o.version;if(qm!=="19.2.4")throw Error(r(527,qm,"19.2.4"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var jp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Si=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Si.isDisabled&&Si.supportsFiber)try{nn=Si.inject(jp),vt=Si}catch{}}return Pn.createRoot=function(e,t){if(!m(e))throw Error(r(299));var l=!1,a="",s=Zd,i=$d,u=Kd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Tm(e,1,!1,null,null,l,a,null,s,i,u,Lm),e[xa]=t.current,kr(e),new eu(t)},Pn.hydrateRoot=function(e,t,l){if(!m(e))throw Error(r(299));var a=!1,s="",i=Zd,u=$d,x=Kd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(x=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Tm(e,1,!0,t,l??null,a,s,b,i,u,x,Lm),t.context=Rm(null),l=t.current,a=Et(),a=Vi(a),s=Al(a),s.callback=null,Tl(l,s,a),l=a,t.current.lanes=l,cn(t,l),$t(t),e[xa]=t.current,kr(e),new Ni(t)},Pn.version="19.2.4",Pn}var Fm;function _p(){if(Fm)return au.exports;Fm=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(o){console.error(o)}}return c(),au.exports=Rp(),au.exports}var Mp=_p();const zp=bu(Mp);/**
50
50
  * react-router v7.13.0
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,9 +55,9 @@ Error generating stack: `+a.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */var Wm="popstate";function Dp(c={}){function o(m,f){let{pathname:h="/",search:v="",hash:g=""}=ha(m.location.hash.substring(1));return!h.startsWith("/")&&!h.startsWith(".")&&(h="/"+h),fu("",{pathname:h,search:v,hash:g},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(m,f){let h=m.document.querySelector("base"),v="";if(h&&h.getAttribute("href")){let g=m.location.href,p=g.indexOf("#");v=p===-1?g:g.slice(0,p)}return v+"#"+(typeof f=="string"?f:ts(f))}function r(m,f){qt(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return kp(o,d,r,c)}function qe(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function qt(c,o){if(!c){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Op(){return Math.random().toString(36).substring(2,10)}function Pm(c,o){return{usr:c.state,key:c.key,idx:o}}function fu(c,o,d=null,r){return{pathname:typeof c=="string"?c:c.pathname,search:"",hash:"",...typeof o=="string"?ha(o):o,state:d,key:o&&o.key||r||Op()}}function ts({pathname:c="/",search:o="",hash:d=""}){return o&&o!=="?"&&(c+=o.charAt(0)==="?"?o:"?"+o),d&&d!=="#"&&(c+=d.charAt(0)==="#"?d:"#"+d),c}function ha(c){let o={};if(c){let d=c.indexOf("#");d>=0&&(o.hash=c.substring(d),c=c.substring(0,d));let r=c.indexOf("?");r>=0&&(o.search=c.substring(r),c=c.substring(0,r)),c&&(o.pathname=c)}return o}function kp(c,o,d,r={}){let{window:m=document.defaultView,v5Compat:f=!1}=r,h=m.history,v="POP",g=null,p=j();p==null&&(p=0,h.replaceState({...h.state,idx:p},""));function j(){return(h.state||{idx:null}).idx}function w(){v="POP";let R=j(),G=R==null?null:R-p;p=R,g&&g({action:v,location:A.location,delta:G})}function D(R,G){v="PUSH";let q=fu(A.location,R,G);d&&d(q,R),p=j()+1;let L=Pm(q,p),J=A.createHref(q);try{h.pushState(L,"",J)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;m.location.assign(J)}f&&g&&g({action:v,location:A.location,delta:1})}function z(R,G){v="REPLACE";let q=fu(A.location,R,G);d&&d(q,R),p=j();let L=Pm(q,p),J=A.createHref(q);h.replaceState(L,"",J),f&&g&&g({action:v,location:A.location,delta:0})}function U(R){return Up(R)}let A={get action(){return v},get location(){return c(m,h)},listen(R){if(g)throw new Error("A history only accepts one active listener");return m.addEventListener(Wm,w),g=R,()=>{m.removeEventListener(Wm,w),g=null}},createHref(R){return o(m,R)},createURL:U,encodeLocation(R){let G=U(R);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:D,replace:z,go(R){return h.go(R)}};return A}function Up(c,o=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),qe(d,"No window.location.(origin|href) available to create URL");let r=typeof c=="string"?c:ts(c);return r=r.replace(/ $/,"%20"),!o&&r.startsWith("//")&&(r=d+r),new URL(r,d)}function y0(c,o,d="/"){return Hp(c,o,d,!1)}function Hp(c,o,d,r){let m=typeof o=="string"?ha(o):o,f=vl(m.pathname||"/",d);if(f==null)return null;let h=j0(c);Bp(h);let v=null;for(let g=0;v==null&&g<h.length;++g){let p=Jp(f);v=$p(h[g],p,r)}return v}function j0(c,o=[],d=[],r="",m=!1){let f=(h,v,g=m,p)=>{let j={relativePath:p===void 0?h.path||"":p,caseSensitive:h.caseSensitive===!0,childrenIndex:v,route:h};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(r)&&g)return;qe(j.relativePath.startsWith(r),`Absolute route path "${j.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(r.length)}let w=pl([r,j.relativePath]),D=d.concat(j);h.children&&h.children.length>0&&(qe(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${w}".`),j0(h.children,o,D,w,g)),!(h.path==null&&!h.index)&&o.push({path:w,score:Xp(w,h.index),routesMeta:D})};return c.forEach((h,v)=>{var g;if(h.path===""||!((g=h.path)!=null&&g.includes("?")))f(h,v);else for(let p of N0(h.path))f(h,v,!0,p)}),o}function N0(c){let o=c.split("/");if(o.length===0)return[];let[d,...r]=o,m=d.endsWith("?"),f=d.replace(/\?$/,"");if(r.length===0)return m?[f,""]:[f];let h=N0(r.join("/")),v=[];return v.push(...h.map(g=>g===""?f:[f,g].join("/"))),m&&v.push(...h),v.map(g=>c.startsWith("/")&&g===""?"/":g)}function Bp(c){c.sort((o,d)=>o.score!==d.score?d.score-o.score:Zp(o.routesMeta.map(r=>r.childrenIndex),d.routesMeta.map(r=>r.childrenIndex)))}var Lp=/^:[\w-]+$/,qp=3,Yp=2,Gp=1,Qp=10,Vp=-2,Im=c=>c==="*";function Xp(c,o){let d=c.split("/"),r=d.length;return d.some(Im)&&(r+=Vp),o&&(r+=Yp),d.filter(m=>!Im(m)).reduce((m,f)=>m+(Lp.test(f)?qp:f===""?Gp:Qp),r)}function Zp(c,o){return c.length===o.length&&c.slice(0,-1).every((r,m)=>r===o[m])?c[c.length-1]-o[o.length-1]:0}function $p(c,o,d=!1){let{routesMeta:r}=c,m={},f="/",h=[];for(let v=0;v<r.length;++v){let g=r[v],p=v===r.length-1,j=f==="/"?o:o.slice(f.length)||"/",w=Ti({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},j),D=g.route;if(!w&&p&&d&&!r[r.length-1].route.index&&(w=Ti({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},j)),!w)return null;Object.assign(m,w.params),h.push({params:m,pathname:pl([f,w.pathname]),pathnameBase:Ip(pl([f,w.pathnameBase])),route:D}),w.pathnameBase!=="/"&&(f=pl([f,w.pathnameBase]))}return h}function Ti(c,o){typeof c=="string"&&(c={path:c,caseSensitive:!1,end:!0});let[d,r]=Kp(c.path,c.caseSensitive,c.end),m=o.match(d);if(!m)return null;let f=m[0],h=f.replace(/(.)\/+$/,"$1"),v=m.slice(1);return{params:r.reduce((p,{paramName:j,isOptional:w},D)=>{if(j==="*"){let U=v[D]||"";h=f.slice(0,f.length-U.length).replace(/(.)\/+$/,"$1")}const z=v[D];return w&&!z?p[j]=void 0:p[j]=(z||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:h,pattern:c}}function Kp(c,o=!1,d=!0){qt(c==="*"||!c.endsWith("*")||c.endsWith("/*"),`Route path "${c}" will be treated as if it were "${c.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${c.replace(/\*$/,"/*")}".`);let r=[],m="^"+c.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,v,g)=>(r.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return c.endsWith("*")?(r.push({paramName:"*"}),m+=c==="*"||c==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":c!==""&&c!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,o?void 0:"i"),r]}function Jp(c){try{return c.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return qt(!1,`The URL path "${c}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),c}}function vl(c,o){if(o==="/")return c;if(!c.toLowerCase().startsWith(o.toLowerCase()))return null;let d=o.endsWith("/")?o.length-1:o.length,r=c.charAt(d);return r&&r!=="/"?null:c.slice(d)||"/"}var Fp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Wp(c,o="/"){let{pathname:d,search:r="",hash:m=""}=typeof c=="string"?ha(c):c,f;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?f=e0(d.substring(1),"/"):f=e0(d,o)):f=o,{pathname:f,search:eg(r),hash:tg(m)}}function e0(c,o){let d=o.replace(/\/+$/,"").split("/");return c.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function iu(c,o,d,r){return`Cannot include a '${c}' character in a manually specified \`to.${o}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pp(c){return c.filter((o,d)=>d===0||o.route.path&&o.route.path.length>0)}function yu(c){let o=Pp(c);return o.map((d,r)=>r===o.length-1?d.pathname:d.pathnameBase)}function ju(c,o,d,r=!1){let m;typeof c=="string"?m=ha(c):(m={...c},qe(!m.pathname||!m.pathname.includes("?"),iu("?","pathname","search",m)),qe(!m.pathname||!m.pathname.includes("#"),iu("#","pathname","hash",m)),qe(!m.search||!m.search.includes("#"),iu("#","search","hash",m)));let f=c===""||m.pathname==="",h=f?"/":m.pathname,v;if(h==null)v=d;else{let w=o.length-1;if(!r&&h.startsWith("..")){let D=h.split("/");for(;D[0]==="..";)D.shift(),w-=1;m.pathname=D.join("/")}v=w>=0?o[w]:"/"}let g=Wp(m,v),p=h&&h!=="/"&&h.endsWith("/"),j=(f||h===".")&&d.endsWith("/");return!g.pathname.endsWith("/")&&(p||j)&&(g.pathname+="/"),g}var pl=c=>c.join("/").replace(/\/\/+/g,"/"),Ip=c=>c.replace(/\/+$/,"").replace(/^\/*/,"/"),eg=c=>!c||c==="?"?"":c.startsWith("?")?c:"?"+c,tg=c=>!c||c==="#"?"":c.startsWith("#")?c:"#"+c,lg=class{constructor(c,o,d,r=!1){this.status=c,this.statusText=o||"",this.internal=r,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function ag(c){return c!=null&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.internal=="boolean"&&"data"in c}function ng(c){return c.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var S0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function w0(c,o){let d=c;if(typeof d!="string"||!Fp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let r=d,m=!1;if(S0)try{let f=new URL(window.location.href),h=d.startsWith("//")?new URL(f.protocol+d):new URL(d),v=vl(h.pathname,o);h.origin===f.origin&&v!=null?d=v+h.search+h.hash:m=!0}catch{qt(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var C0=["POST","PUT","PATCH","DELETE"];new Set(C0);var sg=["GET",...C0];new Set(sg);var tn=y.createContext(null);tn.displayName="DataRouter";var Oi=y.createContext(null);Oi.displayName="DataRouterState";var ig=y.createContext(!1),E0=y.createContext({isTransitioning:!1});E0.displayName="ViewTransition";var cg=y.createContext(new Map);cg.displayName="Fetchers";var rg=y.createContext(null);rg.displayName="Await";var At=y.createContext(null);At.displayName="Navigation";var ls=y.createContext(null);ls.displayName="Location";var Jt=y.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var Nu=y.createContext(null);Nu.displayName="RouteError";var A0="REACT_ROUTER_ERROR",ug="REDIRECT",og="ROUTE_ERROR_RESPONSE";function dg(c){if(c.startsWith(`${A0}:${ug}:{`))try{let o=JSON.parse(c.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function fg(c){if(c.startsWith(`${A0}:${og}:{`))try{let o=JSON.parse(c.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new lg(o.status,o.statusText,o.data)}catch{}}function mg(c,{relative:o}={}){qe(ln(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:r}=y.useContext(At),{hash:m,pathname:f,search:h}=as(c,{relative:o}),v=f;return d!=="/"&&(v=f==="/"?d:pl([d,f])),r.createHref({pathname:v,search:h,hash:m})}function ln(){return y.useContext(ls)!=null}function Zl(){return qe(ln(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(ls).location}var T0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function R0(c){y.useContext(At).static||y.useLayoutEffect(c)}function Su(){let{isDataRoute:c}=y.useContext(Jt);return c?Eg():hg()}function hg(){qe(ln(),"useNavigate() may be used only in the context of a <Router> component.");let c=y.useContext(tn),{basename:o,navigator:d}=y.useContext(At),{matches:r}=y.useContext(Jt),{pathname:m}=Zl(),f=JSON.stringify(yu(r)),h=y.useRef(!1);return R0(()=>{h.current=!0}),y.useCallback((g,p={})=>{if(qt(h.current,T0),!h.current)return;if(typeof g=="number"){d.go(g);return}let j=ju(g,JSON.parse(f),m,p.relative==="path");c==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:pl([o,j.pathname])),(p.replace?d.replace:d.push)(j,p.state,p)},[o,d,f,m,c])}y.createContext(null);function as(c,{relative:o}={}){let{matches:d}=y.useContext(Jt),{pathname:r}=Zl(),m=JSON.stringify(yu(d));return y.useMemo(()=>ju(c,JSON.parse(m),r,o==="path"),[c,m,r,o])}function xg(c,o){return _0(c,o)}function _0(c,o,d,r,m){var q;qe(ln(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=y.useContext(At),{matches:h}=y.useContext(Jt),v=h[h.length-1],g=v?v.params:{},p=v?v.pathname:"/",j=v?v.pathnameBase:"/",w=v&&v.route;{let L=w&&w.path||"";z0(p,!w||L.endsWith("*")||L.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${L}">) 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.
58
+ */var Wm="popstate";function Dp(c={}){function o(m,f){let{pathname:h="/",search:v="",hash:g=""}=ha(m.location.hash.substring(1));return!h.startsWith("/")&&!h.startsWith(".")&&(h="/"+h),mu("",{pathname:h,search:v,hash:g},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(m,f){let h=m.document.querySelector("base"),v="";if(h&&h.getAttribute("href")){let g=m.location.href,p=g.indexOf("#");v=p===-1?g:g.slice(0,p)}return v+"#"+(typeof f=="string"?f:ts(f))}function r(m,f){qt(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return kp(o,d,r,c)}function Ge(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function qt(c,o){if(!c){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function Op(){return Math.random().toString(36).substring(2,10)}function Pm(c,o){return{usr:c.state,key:c.key,idx:o}}function mu(c,o,d=null,r){return{pathname:typeof c=="string"?c:c.pathname,search:"",hash:"",...typeof o=="string"?ha(o):o,state:d,key:o&&o.key||r||Op()}}function ts({pathname:c="/",search:o="",hash:d=""}){return o&&o!=="?"&&(c+=o.charAt(0)==="?"?o:"?"+o),d&&d!=="#"&&(c+=d.charAt(0)==="#"?d:"#"+d),c}function ha(c){let o={};if(c){let d=c.indexOf("#");d>=0&&(o.hash=c.substring(d),c=c.substring(0,d));let r=c.indexOf("?");r>=0&&(o.search=c.substring(r),c=c.substring(0,r)),c&&(o.pathname=c)}return o}function kp(c,o,d,r={}){let{window:m=document.defaultView,v5Compat:f=!1}=r,h=m.history,v="POP",g=null,p=j();p==null&&(p=0,h.replaceState({...h.state,idx:p},""));function j(){return(h.state||{idx:null}).idx}function w(){v="POP";let T=j(),Q=T==null?null:T-p;p=T,g&&g({action:v,location:A.location,delta:Q})}function D(T,Q){v="PUSH";let q=mu(A.location,T,Q);d&&d(q,T),p=j()+1;let L=Pm(q,p),J=A.createHref(q);try{h.pushState(L,"",J)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;m.location.assign(J)}f&&g&&g({action:v,location:A.location,delta:1})}function z(T,Q){v="REPLACE";let q=mu(A.location,T,Q);d&&d(q,T),p=j();let L=Pm(q,p),J=A.createHref(q);h.replaceState(L,"",J),f&&g&&g({action:v,location:A.location,delta:0})}function U(T){return Up(T)}let A={get action(){return v},get location(){return c(m,h)},listen(T){if(g)throw new Error("A history only accepts one active listener");return m.addEventListener(Wm,w),g=T,()=>{m.removeEventListener(Wm,w),g=null}},createHref(T){return o(m,T)},createURL:U,encodeLocation(T){let Q=U(T);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:D,replace:z,go(T){return h.go(T)}};return A}function Up(c,o=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Ge(d,"No window.location.(origin|href) available to create URL");let r=typeof c=="string"?c:ts(c);return r=r.replace(/ $/,"%20"),!o&&r.startsWith("//")&&(r=d+r),new URL(r,d)}function y0(c,o,d="/"){return Hp(c,o,d,!1)}function Hp(c,o,d,r){let m=typeof o=="string"?ha(o):o,f=vl(m.pathname||"/",d);if(f==null)return null;let h=j0(c);Bp(h);let v=null;for(let g=0;v==null&&g<h.length;++g){let p=Jp(f);v=$p(h[g],p,r)}return v}function j0(c,o=[],d=[],r="",m=!1){let f=(h,v,g=m,p)=>{let j={relativePath:p===void 0?h.path||"":p,caseSensitive:h.caseSensitive===!0,childrenIndex:v,route:h};if(j.relativePath.startsWith("/")){if(!j.relativePath.startsWith(r)&&g)return;Ge(j.relativePath.startsWith(r),`Absolute route path "${j.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),j.relativePath=j.relativePath.slice(r.length)}let w=pl([r,j.relativePath]),D=d.concat(j);h.children&&h.children.length>0&&(Ge(h.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${w}".`),j0(h.children,o,D,w,g)),!(h.path==null&&!h.index)&&o.push({path:w,score:Xp(w,h.index),routesMeta:D})};return c.forEach((h,v)=>{var g;if(h.path===""||!((g=h.path)!=null&&g.includes("?")))f(h,v);else for(let p of N0(h.path))f(h,v,!0,p)}),o}function N0(c){let o=c.split("/");if(o.length===0)return[];let[d,...r]=o,m=d.endsWith("?"),f=d.replace(/\?$/,"");if(r.length===0)return m?[f,""]:[f];let h=N0(r.join("/")),v=[];return v.push(...h.map(g=>g===""?f:[f,g].join("/"))),m&&v.push(...h),v.map(g=>c.startsWith("/")&&g===""?"/":g)}function Bp(c){c.sort((o,d)=>o.score!==d.score?d.score-o.score:Zp(o.routesMeta.map(r=>r.childrenIndex),d.routesMeta.map(r=>r.childrenIndex)))}var Lp=/^:[\w-]+$/,qp=3,Yp=2,Gp=1,Qp=10,Vp=-2,Im=c=>c==="*";function Xp(c,o){let d=c.split("/"),r=d.length;return d.some(Im)&&(r+=Vp),o&&(r+=Yp),d.filter(m=>!Im(m)).reduce((m,f)=>m+(Lp.test(f)?qp:f===""?Gp:Qp),r)}function Zp(c,o){return c.length===o.length&&c.slice(0,-1).every((r,m)=>r===o[m])?c[c.length-1]-o[o.length-1]:0}function $p(c,o,d=!1){let{routesMeta:r}=c,m={},f="/",h=[];for(let v=0;v<r.length;++v){let g=r[v],p=v===r.length-1,j=f==="/"?o:o.slice(f.length)||"/",w=Ti({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},j),D=g.route;if(!w&&p&&d&&!r[r.length-1].route.index&&(w=Ti({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},j)),!w)return null;Object.assign(m,w.params),h.push({params:m,pathname:pl([f,w.pathname]),pathnameBase:Ip(pl([f,w.pathnameBase])),route:D}),w.pathnameBase!=="/"&&(f=pl([f,w.pathnameBase]))}return h}function Ti(c,o){typeof c=="string"&&(c={path:c,caseSensitive:!1,end:!0});let[d,r]=Kp(c.path,c.caseSensitive,c.end),m=o.match(d);if(!m)return null;let f=m[0],h=f.replace(/(.)\/+$/,"$1"),v=m.slice(1);return{params:r.reduce((p,{paramName:j,isOptional:w},D)=>{if(j==="*"){let U=v[D]||"";h=f.slice(0,f.length-U.length).replace(/(.)\/+$/,"$1")}const z=v[D];return w&&!z?p[j]=void 0:p[j]=(z||"").replace(/%2F/g,"/"),p},{}),pathname:f,pathnameBase:h,pattern:c}}function Kp(c,o=!1,d=!0){qt(c==="*"||!c.endsWith("*")||c.endsWith("/*"),`Route path "${c}" will be treated as if it were "${c.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${c.replace(/\*$/,"/*")}".`);let r=[],m="^"+c.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(h,v,g)=>(r.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return c.endsWith("*")?(r.push({paramName:"*"}),m+=c==="*"||c==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":c!==""&&c!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,o?void 0:"i"),r]}function Jp(c){try{return c.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return qt(!1,`The URL path "${c}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),c}}function vl(c,o){if(o==="/")return c;if(!c.toLowerCase().startsWith(o.toLowerCase()))return null;let d=o.endsWith("/")?o.length-1:o.length,r=c.charAt(d);return r&&r!=="/"?null:c.slice(d)||"/"}var Fp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Wp(c,o="/"){let{pathname:d,search:r="",hash:m=""}=typeof c=="string"?ha(c):c,f;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?f=e0(d.substring(1),"/"):f=e0(d,o)):f=o,{pathname:f,search:eg(r),hash:tg(m)}}function e0(c,o){let d=o.replace(/\/+$/,"").split("/");return c.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function cu(c,o,d,r){return`Cannot include a '${c}' character in a manually specified \`to.${o}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Pp(c){return c.filter((o,d)=>d===0||o.route.path&&o.route.path.length>0)}function ju(c){let o=Pp(c);return o.map((d,r)=>r===o.length-1?d.pathname:d.pathnameBase)}function Nu(c,o,d,r=!1){let m;typeof c=="string"?m=ha(c):(m={...c},Ge(!m.pathname||!m.pathname.includes("?"),cu("?","pathname","search",m)),Ge(!m.pathname||!m.pathname.includes("#"),cu("#","pathname","hash",m)),Ge(!m.search||!m.search.includes("#"),cu("#","search","hash",m)));let f=c===""||m.pathname==="",h=f?"/":m.pathname,v;if(h==null)v=d;else{let w=o.length-1;if(!r&&h.startsWith("..")){let D=h.split("/");for(;D[0]==="..";)D.shift(),w-=1;m.pathname=D.join("/")}v=w>=0?o[w]:"/"}let g=Wp(m,v),p=h&&h!=="/"&&h.endsWith("/"),j=(f||h===".")&&d.endsWith("/");return!g.pathname.endsWith("/")&&(p||j)&&(g.pathname+="/"),g}var pl=c=>c.join("/").replace(/\/\/+/g,"/"),Ip=c=>c.replace(/\/+$/,"").replace(/^\/*/,"/"),eg=c=>!c||c==="?"?"":c.startsWith("?")?c:"?"+c,tg=c=>!c||c==="#"?"":c.startsWith("#")?c:"#"+c,lg=class{constructor(c,o,d,r=!1){this.status=c,this.statusText=o||"",this.internal=r,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function ag(c){return c!=null&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.internal=="boolean"&&"data"in c}function ng(c){return c.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var S0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function w0(c,o){let d=c;if(typeof d!="string"||!Fp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let r=d,m=!1;if(S0)try{let f=new URL(window.location.href),h=d.startsWith("//")?new URL(f.protocol+d):new URL(d),v=vl(h.pathname,o);h.origin===f.origin&&v!=null?d=v+h.search+h.hash:m=!0}catch{qt(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var C0=["POST","PUT","PATCH","DELETE"];new Set(C0);var sg=["GET",...C0];new Set(sg);var tn=y.createContext(null);tn.displayName="DataRouter";var ki=y.createContext(null);ki.displayName="DataRouterState";var ig=y.createContext(!1),E0=y.createContext({isTransitioning:!1});E0.displayName="ViewTransition";var cg=y.createContext(new Map);cg.displayName="Fetchers";var rg=y.createContext(null);rg.displayName="Await";var At=y.createContext(null);At.displayName="Navigation";var ls=y.createContext(null);ls.displayName="Location";var Jt=y.createContext({outlet:null,matches:[],isDataRoute:!1});Jt.displayName="Route";var Su=y.createContext(null);Su.displayName="RouteError";var A0="REACT_ROUTER_ERROR",ug="REDIRECT",og="ROUTE_ERROR_RESPONSE";function dg(c){if(c.startsWith(`${A0}:${ug}:{`))try{let o=JSON.parse(c.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function fg(c){if(c.startsWith(`${A0}:${og}:{`))try{let o=JSON.parse(c.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new lg(o.status,o.statusText,o.data)}catch{}}function mg(c,{relative:o}={}){Ge(ln(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:r}=y.useContext(At),{hash:m,pathname:f,search:h}=as(c,{relative:o}),v=f;return d!=="/"&&(v=f==="/"?d:pl([d,f])),r.createHref({pathname:v,search:h,hash:m})}function ln(){return y.useContext(ls)!=null}function Zl(){return Ge(ln(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(ls).location}var T0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function R0(c){y.useContext(At).static||y.useLayoutEffect(c)}function wu(){let{isDataRoute:c}=y.useContext(Jt);return c?Eg():hg()}function hg(){Ge(ln(),"useNavigate() may be used only in the context of a <Router> component.");let c=y.useContext(tn),{basename:o,navigator:d}=y.useContext(At),{matches:r}=y.useContext(Jt),{pathname:m}=Zl(),f=JSON.stringify(ju(r)),h=y.useRef(!1);return R0(()=>{h.current=!0}),y.useCallback((g,p={})=>{if(qt(h.current,T0),!h.current)return;if(typeof g=="number"){d.go(g);return}let j=Nu(g,JSON.parse(f),m,p.relative==="path");c==null&&o!=="/"&&(j.pathname=j.pathname==="/"?o:pl([o,j.pathname])),(p.replace?d.replace:d.push)(j,p.state,p)},[o,d,f,m,c])}y.createContext(null);function as(c,{relative:o}={}){let{matches:d}=y.useContext(Jt),{pathname:r}=Zl(),m=JSON.stringify(ju(d));return y.useMemo(()=>Nu(c,JSON.parse(m),r,o==="path"),[c,m,r,o])}function xg(c,o){return _0(c,o)}function _0(c,o,d,r,m){var q;Ge(ln(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=y.useContext(At),{matches:h}=y.useContext(Jt),v=h[h.length-1],g=v?v.params:{},p=v?v.pathname:"/",j=v?v.pathnameBase:"/",w=v&&v.route;{let L=w&&w.path||"";z0(p,!w||L.endsWith("*")||L.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${L}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
59
 
60
- Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}/*`}">.`)}let D=Zl(),z;if(o){let L=typeof o=="string"?ha(o):o;qe(j==="/"||((q=L.pathname)==null?void 0:q.startsWith(j)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${j}" but pathname "${L.pathname}" was given in the \`location\` prop.`),z=L}else z=D;let U=z.pathname||"/",A=U;if(j!=="/"){let L=j.replace(/^\//,"").split("/");A="/"+U.replace(/^\//,"").split("/").slice(L.length).join("/")}let R=y0(c,{pathname:A});qt(w||R!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),qt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${z.pathname}${z.search}${z.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let G=yg(R&&R.map(L=>Object.assign({},L,{params:Object.assign({},g,L.params),pathname:pl([j,f.encodeLocation?f.encodeLocation(L.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?j:pl([j,f.encodeLocation?f.encodeLocation(L.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathnameBase])})),h,d,r,m);return o&&G?y.createElement(ls.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},G):G}function pg(){let c=Cg(),o=ag(c)?`${c.status} ${c.statusText}`:c instanceof Error?c.message:JSON.stringify(c),d=c instanceof Error?c.stack:null,r="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:r},f={padding:"2px 4px",backgroundColor:r},h=null;return console.error("Error handled by React Router default ErrorBoundary:",c),h=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:f},"ErrorBoundary")," or"," ",y.createElement("code",{style:f},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},o),d?y.createElement("pre",{style:m},d):null,h)}var gg=y.createElement(pg,null),M0=class extends y.Component{constructor(c){super(c),this.state={location:c.location,revalidation:c.revalidation,error:c.error}}static getDerivedStateFromError(c){return{error:c}}static getDerivedStateFromProps(c,o){return o.location!==c.location||o.revalidation!=="idle"&&c.revalidation==="idle"?{error:c.error,location:c.location,revalidation:c.revalidation}:{error:c.error!==void 0?c.error:o.error,location:o.location,revalidation:c.revalidation||o.revalidation}}componentDidCatch(c,o){this.props.onError?this.props.onError(c,o):console.error("React Router caught the following error during render",c)}render(){let c=this.state.error;if(this.context&&typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){const d=fg(c.digest);d&&(c=d)}let o=c!==void 0?y.createElement(Jt.Provider,{value:this.props.routeContext},y.createElement(Nu.Provider,{value:c,children:this.props.component})):this.props.children;return this.context?y.createElement(vg,{error:c},o):o}};M0.contextType=ig;var cu=new WeakMap;function vg({children:c,error:o}){let{basename:d}=y.useContext(At);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let r=dg(o.digest);if(r){let m=cu.get(o);if(m)throw m;let f=w0(r.location,d);if(S0&&!cu.get(o))if(f.isExternal||r.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:r.replace}));throw cu.set(o,h),h}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return c}function bg({routeContext:c,match:o,children:d}){let r=y.useContext(tn);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),y.createElement(Jt.Provider,{value:c},d)}function yg(c,o=[],d=null,r=null,m=null){if(c==null){if(!d)return null;if(d.errors)c=d.matches;else if(o.length===0&&!d.initialized&&d.matches.length>0)c=d.matches;else return null}let f=c,h=d==null?void 0:d.errors;if(h!=null){let j=f.findIndex(w=>w.route.id&&(h==null?void 0:h[w.route.id])!==void 0);qe(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,j+1))}let v=!1,g=-1;if(d)for(let j=0;j<f.length;j++){let w=f[j];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(g=j),w.route.id){let{loaderData:D,errors:z}=d,U=w.route.loader&&!D.hasOwnProperty(w.route.id)&&(!z||z[w.route.id]===void 0);if(w.route.lazy||U){v=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=d&&r?(j,w)=>{var D,z;r(j,{location:d.location,params:((z=(D=d.matches)==null?void 0:D[0])==null?void 0:z.params)??{},unstable_pattern:ng(d.matches),errorInfo:w})}:void 0;return f.reduceRight((j,w,D)=>{let z,U=!1,A=null,R=null;d&&(z=h&&w.route.id?h[w.route.id]:void 0,A=w.route.errorElement||gg,v&&(g<0&&D===0?(z0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,R=null):g===D&&(U=!0,R=w.route.hydrateFallbackElement||null)));let G=o.concat(f.slice(0,D+1)),q=()=>{let L;return z?L=A:U?L=R:w.route.Component?L=y.createElement(w.route.Component,null):w.route.element?L=w.route.element:L=j,y.createElement(bg,{match:w,routeContext:{outlet:j,matches:G,isDataRoute:d!=null},children:L})};return d&&(w.route.ErrorBoundary||w.route.errorElement||D===0)?y.createElement(M0,{location:d.location,revalidation:d.revalidation,component:A,error:z,children:q(),routeContext:{outlet:null,matches:G,isDataRoute:!0},onError:p}):q()},null)}function wu(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jg(c){let o=y.useContext(tn);return qe(o,wu(c)),o}function Ng(c){let o=y.useContext(Oi);return qe(o,wu(c)),o}function Sg(c){let o=y.useContext(Jt);return qe(o,wu(c)),o}function Cu(c){let o=Sg(c),d=o.matches[o.matches.length-1];return qe(d.route.id,`${c} can only be used on routes that contain a unique "id"`),d.route.id}function wg(){return Cu("useRouteId")}function Cg(){var r;let c=y.useContext(Nu),o=Ng("useRouteError"),d=Cu("useRouteError");return c!==void 0?c:(r=o.errors)==null?void 0:r[d]}function Eg(){let{router:c}=jg("useNavigate"),o=Cu("useNavigate"),d=y.useRef(!1);return R0(()=>{d.current=!0}),y.useCallback(async(m,f={})=>{qt(d.current,T0),d.current&&(typeof m=="number"?await c.navigate(m):await c.navigate(m,{fromRouteId:o,...f}))},[c,o])}var t0={};function z0(c,o,d){!o&&!t0[c]&&(t0[c]=!0,qt(!1,d))}y.memo(Ag);function Ag({routes:c,future:o,state:d,onError:r}){return _0(c,void 0,d,r,o)}function Tg({to:c,replace:o,state:d,relative:r}){qe(ln(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=y.useContext(At);qt(!m,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=y.useContext(Jt),{pathname:h}=Zl(),v=Su(),g=ju(c,yu(f),h,r==="path"),p=JSON.stringify(g);return y.useEffect(()=>{v(JSON.parse(p),{replace:o,state:d,relative:r})},[v,p,r,o,d]),null}function Lt(c){qe(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Rg({basename:c="/",children:o=null,location:d,navigationType:r="POP",navigator:m,static:f=!1,unstable_useTransitions:h}){qe(!ln(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=c.replace(/^\/*/,"/"),g=y.useMemo(()=>({basename:v,navigator:m,static:f,unstable_useTransitions:h,future:{}}),[v,m,f,h]);typeof d=="string"&&(d=ha(d));let{pathname:p="/",search:j="",hash:w="",state:D=null,key:z="default"}=d,U=y.useMemo(()=>{let A=vl(p,v);return A==null?null:{location:{pathname:A,search:j,hash:w,state:D,key:z},navigationType:r}},[v,p,j,w,D,z,r]);return qt(U!=null,`<Router basename="${v}"> is not able to match the URL "${p}${j}${w}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:y.createElement(At.Provider,{value:g},y.createElement(ls.Provider,{children:o,value:U}))}function _g({children:c,location:o}){return xg(mu(c),o)}function mu(c,o=[]){let d=[];return y.Children.forEach(c,(r,m)=>{if(!y.isValidElement(r))return;let f=[...o,m];if(r.type===y.Fragment){d.push.apply(d,mu(r.props.children,f));return}qe(r.type===Lt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),qe(!r.props.index||!r.props.children,"An index route cannot have child routes.");let h={id:r.props.id||f.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(h.children=mu(r.props.children,f)),d.push(h)}),d}var Ei="get",Ai="application/x-www-form-urlencoded";function ki(c){return typeof HTMLElement<"u"&&c instanceof HTMLElement}function Mg(c){return ki(c)&&c.tagName.toLowerCase()==="button"}function zg(c){return ki(c)&&c.tagName.toLowerCase()==="form"}function Dg(c){return ki(c)&&c.tagName.toLowerCase()==="input"}function Og(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}function kg(c,o){return c.button===0&&(!o||o==="_self")&&!Og(c)}var wi=null;function Ug(){if(wi===null)try{new FormData(document.createElement("form"),0),wi=!1}catch{wi=!0}return wi}var Hg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ru(c){return c!=null&&!Hg.has(c)?(qt(!1,`"${c}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ai}"`),null):c}function Bg(c,o){let d,r,m,f,h;if(zg(c)){let v=c.getAttribute("action");r=v?vl(v,o):null,d=c.getAttribute("method")||Ei,m=ru(c.getAttribute("enctype"))||Ai,f=new FormData(c)}else if(Mg(c)||Dg(c)&&(c.type==="submit"||c.type==="image")){let v=c.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=c.getAttribute("formaction")||v.getAttribute("action");if(r=g?vl(g,o):null,d=c.getAttribute("formmethod")||v.getAttribute("method")||Ei,m=ru(c.getAttribute("formenctype"))||ru(v.getAttribute("enctype"))||Ai,f=new FormData(v,c),!Ug()){let{name:p,type:j,value:w}=c;if(j==="image"){let D=p?`${p}.`:"";f.append(`${D}x`,"0"),f.append(`${D}y`,"0")}else p&&f.append(p,w)}}else{if(ki(c))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Ei,r=null,m=Ai,h=c}return f&&m==="text/plain"&&(h=f,f=void 0),{action:r,method:d.toLowerCase(),encType:m,formData:f,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Eu(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function Lg(c,o,d,r){let m=typeof c=="string"?new URL(c,typeof window>"u"?"server://singlefetch/":window.location.origin):c;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${r}`:m.pathname=`${m.pathname}.${r}`:m.pathname==="/"?m.pathname=`_root.${r}`:o&&vl(m.pathname,o)==="/"?m.pathname=`${o.replace(/\/$/,"")}/_root.${r}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${r}`,m}async function qg(c,o){if(c.id in o)return o[c.id];try{let d=await import(c.module);return o[c.id]=d,d}catch(d){return console.error(`Error loading route module \`${c.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yg(c){return c==null?!1:c.href==null?c.rel==="preload"&&typeof c.imageSrcSet=="string"&&typeof c.imageSizes=="string":typeof c.rel=="string"&&typeof c.href=="string"}async function Gg(c,o,d){let r=await Promise.all(c.map(async m=>{let f=o.routes[m.route.id];if(f){let h=await qg(f,d);return h.links?h.links():[]}return[]}));return Zg(r.flat(1).filter(Yg).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function l0(c,o,d,r,m,f){let h=(g,p)=>d[p]?g.route.id!==d[p].route.id:!0,v=(g,p)=>{var j;return d[p].pathname!==g.pathname||((j=d[p].route.path)==null?void 0:j.endsWith("*"))&&d[p].params["*"]!==g.params["*"]};return f==="assets"?o.filter((g,p)=>h(g,p)||v(g,p)):f==="data"?o.filter((g,p)=>{var w;let j=r.routes[g.route.id];if(!j||!j.hasLoader)return!1;if(h(g,p)||v(g,p))return!0;if(g.route.shouldRevalidate){let D=g.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((w=d[0])==null?void 0:w.params)||{},nextUrl:new URL(c,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function Qg(c,o,{includeHydrateFallback:d}={}){return Vg(c.map(r=>{let m=o.routes[r.route.id];if(!m)return[];let f=[m.module];return m.clientActionModule&&(f=f.concat(m.clientActionModule)),m.clientLoaderModule&&(f=f.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(f=f.concat(m.hydrateFallbackModule)),m.imports&&(f=f.concat(m.imports)),f}).flat(1))}function Vg(c){return[...new Set(c)]}function Xg(c){let o={},d=Object.keys(c).sort();for(let r of d)o[r]=c[r];return o}function Zg(c,o){let d=new Set;return new Set(o),c.reduce((r,m)=>{let f=JSON.stringify(Xg(m));return d.has(f)||(d.add(f),r.push({key:f,link:m})),r},[])}function D0(){let c=y.useContext(tn);return Eu(c,"You must render this element inside a <DataRouterContext.Provider> element"),c}function $g(){let c=y.useContext(Oi);return Eu(c,"You must render this element inside a <DataRouterStateContext.Provider> element"),c}var Au=y.createContext(void 0);Au.displayName="FrameworkContext";function O0(){let c=y.useContext(Au);return Eu(c,"You must render this element inside a <HydratedRouter> element"),c}function Kg(c,o){let d=y.useContext(Au),[r,m]=y.useState(!1),[f,h]=y.useState(!1),{onFocus:v,onBlur:g,onMouseEnter:p,onMouseLeave:j,onTouchStart:w}=o,D=y.useRef(null);y.useEffect(()=>{if(c==="render"&&h(!0),c==="viewport"){let A=G=>{G.forEach(q=>{h(q.isIntersecting)})},R=new IntersectionObserver(A,{threshold:.5});return D.current&&R.observe(D.current),()=>{R.disconnect()}}},[c]),y.useEffect(()=>{if(r){let A=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(A)}}},[r]);let z=()=>{m(!0)},U=()=>{m(!1),h(!1)};return d?c!=="intent"?[f,D,{}]:[f,D,{onFocus:In(v,z),onBlur:In(g,U),onMouseEnter:In(p,z),onMouseLeave:In(j,U),onTouchStart:In(w,z)}]:[!1,D,{}]}function In(c,o){return d=>{c&&c(d),d.defaultPrevented||o(d)}}function Jg({page:c,...o}){let{router:d}=D0(),r=y.useMemo(()=>y0(d.routes,c,d.basename),[d.routes,c,d.basename]);return r?y.createElement(Wg,{page:c,matches:r,...o}):null}function Fg(c){let{manifest:o,routeModules:d}=O0(),[r,m]=y.useState([]);return y.useEffect(()=>{let f=!1;return Gg(c,o,d).then(h=>{f||m(h)}),()=>{f=!0}},[c,o,d]),r}function Wg({page:c,matches:o,...d}){let r=Zl(),{future:m,manifest:f,routeModules:h}=O0(),{basename:v}=D0(),{loaderData:g,matches:p}=$g(),j=y.useMemo(()=>l0(c,o,p,f,r,"data"),[c,o,p,f,r]),w=y.useMemo(()=>l0(c,o,p,f,r,"assets"),[c,o,p,f,r]),D=y.useMemo(()=>{if(c===r.pathname+r.search+r.hash)return[];let A=new Set,R=!1;if(o.forEach(q=>{var J;let L=f.routes[q.route.id];!L||!L.hasLoader||(!j.some(B=>B.route.id===q.route.id)&&q.route.id in g&&((J=h[q.route.id])!=null&&J.shouldRevalidate)||L.hasClientLoader?R=!0:A.add(q.route.id))}),A.size===0)return[];let G=Lg(c,v,m.unstable_trailingSlashAwareDataRequests,"data");return R&&A.size>0&&G.searchParams.set("_routes",o.filter(q=>A.has(q.route.id)).map(q=>q.route.id).join(",")),[G.pathname+G.search]},[v,m.unstable_trailingSlashAwareDataRequests,g,r,f,j,o,c,h]),z=y.useMemo(()=>Qg(w,f),[w,f]),U=Fg(w);return y.createElement(y.Fragment,null,D.map(A=>y.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...d})),z.map(A=>y.createElement("link",{key:A,rel:"modulepreload",href:A,...d})),U.map(({key:A,link:R})=>y.createElement("link",{key:A,nonce:d.nonce,...R,crossOrigin:R.crossOrigin??d.crossOrigin})))}function Pg(...c){return o=>{c.forEach(d=>{typeof d=="function"?d(o):d!=null&&(d.current=o)})}}var Ig=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ig&&(window.__reactRouterVersion="7.13.0")}catch{}function ev({basename:c,children:o,unstable_useTransitions:d,window:r}){let m=y.useRef();m.current==null&&(m.current=Dp({window:r,v5Compat:!0}));let f=m.current,[h,v]=y.useState({action:f.action,location:f.location}),g=y.useCallback(p=>{d===!1?v(p):y.startTransition(()=>v(p))},[d]);return y.useLayoutEffect(()=>f.listen(g),[f,g]),y.createElement(Rg,{basename:c,children:o,location:h.location,navigationType:h.action,navigator:f,unstable_useTransitions:d})}var k0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,U0=y.forwardRef(function({onClick:o,discover:d="render",prefetch:r="none",relative:m,reloadDocument:f,replace:h,state:v,target:g,to:p,preventScrollReset:j,viewTransition:w,unstable_defaultShouldRevalidate:D,...z},U){let{basename:A,unstable_useTransitions:R}=y.useContext(At),G=typeof p=="string"&&k0.test(p),q=w0(p,A);p=q.to;let L=mg(p,{relative:m}),[J,B,C]=Kg(r,z),Q=av(p,{replace:h,state:v,target:g,preventScrollReset:j,relative:m,viewTransition:w,unstable_defaultShouldRevalidate:D,unstable_useTransitions:R});function Z(de){o&&o(de),de.defaultPrevented||Q(de)}let P=y.createElement("a",{...z,...C,href:q.absoluteURL||L,onClick:q.isExternal||f?o:Z,ref:Pg(U,B),target:g,"data-discover":!G&&d==="render"?"true":void 0});return J&&!G?y.createElement(y.Fragment,null,P,y.createElement(Jg,{page:L})):P});U0.displayName="Link";var H0=y.forwardRef(function({"aria-current":o="page",caseSensitive:d=!1,className:r="",end:m=!1,style:f,to:h,viewTransition:v,children:g,...p},j){let w=as(h,{relative:p.relative}),D=Zl(),z=y.useContext(Oi),{navigator:U,basename:A}=y.useContext(At),R=z!=null&&rv(w)&&v===!0,G=U.encodeLocation?U.encodeLocation(w).pathname:w.pathname,q=D.pathname,L=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;d||(q=q.toLowerCase(),L=L?L.toLowerCase():null,G=G.toLowerCase()),L&&A&&(L=vl(L,A)||L);const J=G!=="/"&&G.endsWith("/")?G.length-1:G.length;let B=q===G||!m&&q.startsWith(G)&&q.charAt(J)==="/",C=L!=null&&(L===G||!m&&L.startsWith(G)&&L.charAt(G.length)==="/"),Q={isActive:B,isPending:C,isTransitioning:R},Z=B?o:void 0,P;typeof r=="function"?P=r(Q):P=[r,B?"active":null,C?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let de=typeof f=="function"?f(Q):f;return y.createElement(U0,{...p,"aria-current":Z,className:P,ref:j,style:de,to:h,viewTransition:v},typeof g=="function"?g(Q):g)});H0.displayName="NavLink";var tv=y.forwardRef(({discover:c="render",fetcherKey:o,navigate:d,reloadDocument:r,replace:m,state:f,method:h=Ei,action:v,onSubmit:g,relative:p,preventScrollReset:j,viewTransition:w,unstable_defaultShouldRevalidate:D,...z},U)=>{let{unstable_useTransitions:A}=y.useContext(At),R=iv(),G=cv(v,{relative:p}),q=h.toLowerCase()==="get"?"get":"post",L=typeof v=="string"&&k0.test(v),J=B=>{if(g&&g(B),B.defaultPrevented)return;B.preventDefault();let C=B.nativeEvent.submitter,Q=(C==null?void 0:C.getAttribute("formmethod"))||h,Z=()=>R(C||B.currentTarget,{fetcherKey:o,method:Q,navigate:d,replace:m,state:f,relative:p,preventScrollReset:j,viewTransition:w,unstable_defaultShouldRevalidate:D});A&&d!==!1?y.startTransition(()=>Z()):Z()};return y.createElement("form",{ref:U,method:q,action:G,onSubmit:r?g:J,...z,"data-discover":!L&&c==="render"?"true":void 0})});tv.displayName="Form";function lv(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B0(c){let o=y.useContext(tn);return qe(o,lv(c)),o}function av(c,{target:o,replace:d,state:r,preventScrollReset:m,relative:f,viewTransition:h,unstable_defaultShouldRevalidate:v,unstable_useTransitions:g}={}){let p=Su(),j=Zl(),w=as(c,{relative:f});return y.useCallback(D=>{if(kg(D,o)){D.preventDefault();let z=d!==void 0?d:ts(j)===ts(w),U=()=>p(c,{replace:z,state:r,preventScrollReset:m,relative:f,viewTransition:h,unstable_defaultShouldRevalidate:v});g?y.startTransition(()=>U()):U()}},[j,p,w,d,r,o,c,m,f,h,v,g])}var nv=0,sv=()=>`__${String(++nv)}__`;function iv(){let{router:c}=B0("useSubmit"),{basename:o}=y.useContext(At),d=wg(),r=c.fetch,m=c.navigate;return y.useCallback(async(f,h={})=>{let{action:v,method:g,encType:p,formData:j,body:w}=Bg(f,o);if(h.navigate===!1){let D=h.fetcherKey||sv();await r(D,d,h.action||v,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:j,body:w,formMethod:h.method||g,formEncType:h.encType||p,flushSync:h.flushSync})}else await m(h.action||v,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:j,body:w,formMethod:h.method||g,formEncType:h.encType||p,replace:h.replace,state:h.state,fromRouteId:d,flushSync:h.flushSync,viewTransition:h.viewTransition})},[r,m,o,d])}function cv(c,{relative:o}={}){let{basename:d}=y.useContext(At),r=y.useContext(Jt);qe(r,"useFormAction must be used inside a RouteContext");let[m]=r.matches.slice(-1),f={...as(c||".",{relative:o})},h=Zl();if(c==null){f.search=h.search;let v=new URLSearchParams(f.search),g=v.getAll("index");if(g.some(j=>j==="")){v.delete("index"),g.filter(w=>w).forEach(w=>v.append("index",w));let j=v.toString();f.search=j?`?${j}`:""}}return(!c||c===".")&&m.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(f.pathname=f.pathname==="/"?d:pl([d,f.pathname])),ts(f)}function rv(c,{relative:o}={}){let d=y.useContext(E0);qe(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=B0("useViewTransitionState"),m=as(c,{relative:o});if(!d.isTransitioning)return!1;let f=vl(d.currentLocation.pathname,r)||d.currentLocation.pathname,h=vl(d.nextLocation.pathname,r)||d.nextLocation.pathname;return Ti(m.pathname,h)!=null||Ti(m.pathname,f)!=null}var uv=b0();const ov=vu(uv);/**
60
+ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}/*`}">.`)}let D=Zl(),z;if(o){let L=typeof o=="string"?ha(o):o;Ge(j==="/"||((q=L.pathname)==null?void 0:q.startsWith(j)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${j}" but pathname "${L.pathname}" was given in the \`location\` prop.`),z=L}else z=D;let U=z.pathname||"/",A=U;if(j!=="/"){let L=j.replace(/^\//,"").split("/");A="/"+U.replace(/^\//,"").split("/").slice(L.length).join("/")}let T=y0(c,{pathname:A});qt(w||T!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),qt(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${z.pathname}${z.search}${z.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let Q=yg(T&&T.map(L=>Object.assign({},L,{params:Object.assign({},g,L.params),pathname:pl([j,f.encodeLocation?f.encodeLocation(L.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?j:pl([j,f.encodeLocation?f.encodeLocation(L.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:L.pathnameBase])})),h,d,r,m);return o&&Q?y.createElement(ls.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},Q):Q}function pg(){let c=Cg(),o=ag(c)?`${c.status} ${c.statusText}`:c instanceof Error?c.message:JSON.stringify(c),d=c instanceof Error?c.stack:null,r="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:r},f={padding:"2px 4px",backgroundColor:r},h=null;return console.error("Error handled by React Router default ErrorBoundary:",c),h=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:f},"ErrorBoundary")," or"," ",y.createElement("code",{style:f},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},o),d?y.createElement("pre",{style:m},d):null,h)}var gg=y.createElement(pg,null),M0=class extends y.Component{constructor(c){super(c),this.state={location:c.location,revalidation:c.revalidation,error:c.error}}static getDerivedStateFromError(c){return{error:c}}static getDerivedStateFromProps(c,o){return o.location!==c.location||o.revalidation!=="idle"&&c.revalidation==="idle"?{error:c.error,location:c.location,revalidation:c.revalidation}:{error:c.error!==void 0?c.error:o.error,location:o.location,revalidation:c.revalidation||o.revalidation}}componentDidCatch(c,o){this.props.onError?this.props.onError(c,o):console.error("React Router caught the following error during render",c)}render(){let c=this.state.error;if(this.context&&typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){const d=fg(c.digest);d&&(c=d)}let o=c!==void 0?y.createElement(Jt.Provider,{value:this.props.routeContext},y.createElement(Su.Provider,{value:c,children:this.props.component})):this.props.children;return this.context?y.createElement(vg,{error:c},o):o}};M0.contextType=ig;var ru=new WeakMap;function vg({children:c,error:o}){let{basename:d}=y.useContext(At);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let r=dg(o.digest);if(r){let m=ru.get(o);if(m)throw m;let f=w0(r.location,d);if(S0&&!ru.get(o))if(f.isExternal||r.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:r.replace}));throw ru.set(o,h),h}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return c}function bg({routeContext:c,match:o,children:d}){let r=y.useContext(tn);return r&&r.static&&r.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=o.route.id),y.createElement(Jt.Provider,{value:c},d)}function yg(c,o=[],d=null,r=null,m=null){if(c==null){if(!d)return null;if(d.errors)c=d.matches;else if(o.length===0&&!d.initialized&&d.matches.length>0)c=d.matches;else return null}let f=c,h=d==null?void 0:d.errors;if(h!=null){let j=f.findIndex(w=>w.route.id&&(h==null?void 0:h[w.route.id])!==void 0);Ge(j>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(h).join(",")}`),f=f.slice(0,Math.min(f.length,j+1))}let v=!1,g=-1;if(d)for(let j=0;j<f.length;j++){let w=f[j];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(g=j),w.route.id){let{loaderData:D,errors:z}=d,U=w.route.loader&&!D.hasOwnProperty(w.route.id)&&(!z||z[w.route.id]===void 0);if(w.route.lazy||U){v=!0,g>=0?f=f.slice(0,g+1):f=[f[0]];break}}}let p=d&&r?(j,w)=>{var D,z;r(j,{location:d.location,params:((z=(D=d.matches)==null?void 0:D[0])==null?void 0:z.params)??{},unstable_pattern:ng(d.matches),errorInfo:w})}:void 0;return f.reduceRight((j,w,D)=>{let z,U=!1,A=null,T=null;d&&(z=h&&w.route.id?h[w.route.id]:void 0,A=w.route.errorElement||gg,v&&(g<0&&D===0?(z0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),U=!0,T=null):g===D&&(U=!0,T=w.route.hydrateFallbackElement||null)));let Q=o.concat(f.slice(0,D+1)),q=()=>{let L;return z?L=A:U?L=T:w.route.Component?L=y.createElement(w.route.Component,null):w.route.element?L=w.route.element:L=j,y.createElement(bg,{match:w,routeContext:{outlet:j,matches:Q,isDataRoute:d!=null},children:L})};return d&&(w.route.ErrorBoundary||w.route.errorElement||D===0)?y.createElement(M0,{location:d.location,revalidation:d.revalidation,component:A,error:z,children:q(),routeContext:{outlet:null,matches:Q,isDataRoute:!0},onError:p}):q()},null)}function Cu(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jg(c){let o=y.useContext(tn);return Ge(o,Cu(c)),o}function Ng(c){let o=y.useContext(ki);return Ge(o,Cu(c)),o}function Sg(c){let o=y.useContext(Jt);return Ge(o,Cu(c)),o}function Eu(c){let o=Sg(c),d=o.matches[o.matches.length-1];return Ge(d.route.id,`${c} can only be used on routes that contain a unique "id"`),d.route.id}function wg(){return Eu("useRouteId")}function Cg(){var r;let c=y.useContext(Su),o=Ng("useRouteError"),d=Eu("useRouteError");return c!==void 0?c:(r=o.errors)==null?void 0:r[d]}function Eg(){let{router:c}=jg("useNavigate"),o=Eu("useNavigate"),d=y.useRef(!1);return R0(()=>{d.current=!0}),y.useCallback(async(m,f={})=>{qt(d.current,T0),d.current&&(typeof m=="number"?await c.navigate(m):await c.navigate(m,{fromRouteId:o,...f}))},[c,o])}var t0={};function z0(c,o,d){!o&&!t0[c]&&(t0[c]=!0,qt(!1,d))}y.memo(Ag);function Ag({routes:c,future:o,state:d,onError:r}){return _0(c,void 0,d,r,o)}function Tg({to:c,replace:o,state:d,relative:r}){Ge(ln(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=y.useContext(At);qt(!m,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=y.useContext(Jt),{pathname:h}=Zl(),v=wu(),g=Nu(c,ju(f),h,r==="path"),p=JSON.stringify(g);return y.useEffect(()=>{v(JSON.parse(p),{replace:o,state:d,relative:r})},[v,p,r,o,d]),null}function Lt(c){Ge(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Rg({basename:c="/",children:o=null,location:d,navigationType:r="POP",navigator:m,static:f=!1,unstable_useTransitions:h}){Ge(!ln(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=c.replace(/^\/*/,"/"),g=y.useMemo(()=>({basename:v,navigator:m,static:f,unstable_useTransitions:h,future:{}}),[v,m,f,h]);typeof d=="string"&&(d=ha(d));let{pathname:p="/",search:j="",hash:w="",state:D=null,key:z="default"}=d,U=y.useMemo(()=>{let A=vl(p,v);return A==null?null:{location:{pathname:A,search:j,hash:w,state:D,key:z},navigationType:r}},[v,p,j,w,D,z,r]);return qt(U!=null,`<Router basename="${v}"> is not able to match the URL "${p}${j}${w}" because it does not start with the basename, so the <Router> won't render anything.`),U==null?null:y.createElement(At.Provider,{value:g},y.createElement(ls.Provider,{children:o,value:U}))}function _g({children:c,location:o}){return xg(hu(c),o)}function hu(c,o=[]){let d=[];return y.Children.forEach(c,(r,m)=>{if(!y.isValidElement(r))return;let f=[...o,m];if(r.type===y.Fragment){d.push.apply(d,hu(r.props.children,f));return}Ge(r.type===Lt,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ge(!r.props.index||!r.props.children,"An index route cannot have child routes.");let h={id:r.props.id||f.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(h.children=hu(r.props.children,f)),d.push(h)}),d}var Ei="get",Ai="application/x-www-form-urlencoded";function Ui(c){return typeof HTMLElement<"u"&&c instanceof HTMLElement}function Mg(c){return Ui(c)&&c.tagName.toLowerCase()==="button"}function zg(c){return Ui(c)&&c.tagName.toLowerCase()==="form"}function Dg(c){return Ui(c)&&c.tagName.toLowerCase()==="input"}function Og(c){return!!(c.metaKey||c.altKey||c.ctrlKey||c.shiftKey)}function kg(c,o){return c.button===0&&(!o||o==="_self")&&!Og(c)}var wi=null;function Ug(){if(wi===null)try{new FormData(document.createElement("form"),0),wi=!1}catch{wi=!0}return wi}var Hg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function uu(c){return c!=null&&!Hg.has(c)?(qt(!1,`"${c}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ai}"`),null):c}function Bg(c,o){let d,r,m,f,h;if(zg(c)){let v=c.getAttribute("action");r=v?vl(v,o):null,d=c.getAttribute("method")||Ei,m=uu(c.getAttribute("enctype"))||Ai,f=new FormData(c)}else if(Mg(c)||Dg(c)&&(c.type==="submit"||c.type==="image")){let v=c.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=c.getAttribute("formaction")||v.getAttribute("action");if(r=g?vl(g,o):null,d=c.getAttribute("formmethod")||v.getAttribute("method")||Ei,m=uu(c.getAttribute("formenctype"))||uu(v.getAttribute("enctype"))||Ai,f=new FormData(v,c),!Ug()){let{name:p,type:j,value:w}=c;if(j==="image"){let D=p?`${p}.`:"";f.append(`${D}x`,"0"),f.append(`${D}y`,"0")}else p&&f.append(p,w)}}else{if(Ui(c))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Ei,r=null,m=Ai,h=c}return f&&m==="text/plain"&&(h=f,f=void 0),{action:r,method:d.toLowerCase(),encType:m,formData:f,body:h}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Au(c,o){if(c===!1||c===null||typeof c>"u")throw new Error(o)}function Lg(c,o,d,r){let m=typeof c=="string"?new URL(c,typeof window>"u"?"server://singlefetch/":window.location.origin):c;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${r}`:m.pathname=`${m.pathname}.${r}`:m.pathname==="/"?m.pathname=`_root.${r}`:o&&vl(m.pathname,o)==="/"?m.pathname=`${o.replace(/\/$/,"")}/_root.${r}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${r}`,m}async function qg(c,o){if(c.id in o)return o[c.id];try{let d=await import(c.module);return o[c.id]=d,d}catch(d){return console.error(`Error loading route module \`${c.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yg(c){return c==null?!1:c.href==null?c.rel==="preload"&&typeof c.imageSrcSet=="string"&&typeof c.imageSizes=="string":typeof c.rel=="string"&&typeof c.href=="string"}async function Gg(c,o,d){let r=await Promise.all(c.map(async m=>{let f=o.routes[m.route.id];if(f){let h=await qg(f,d);return h.links?h.links():[]}return[]}));return Zg(r.flat(1).filter(Yg).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function l0(c,o,d,r,m,f){let h=(g,p)=>d[p]?g.route.id!==d[p].route.id:!0,v=(g,p)=>{var j;return d[p].pathname!==g.pathname||((j=d[p].route.path)==null?void 0:j.endsWith("*"))&&d[p].params["*"]!==g.params["*"]};return f==="assets"?o.filter((g,p)=>h(g,p)||v(g,p)):f==="data"?o.filter((g,p)=>{var w;let j=r.routes[g.route.id];if(!j||!j.hasLoader)return!1;if(h(g,p)||v(g,p))return!0;if(g.route.shouldRevalidate){let D=g.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((w=d[0])==null?void 0:w.params)||{},nextUrl:new URL(c,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof D=="boolean")return D}return!0}):[]}function Qg(c,o,{includeHydrateFallback:d}={}){return Vg(c.map(r=>{let m=o.routes[r.route.id];if(!m)return[];let f=[m.module];return m.clientActionModule&&(f=f.concat(m.clientActionModule)),m.clientLoaderModule&&(f=f.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(f=f.concat(m.hydrateFallbackModule)),m.imports&&(f=f.concat(m.imports)),f}).flat(1))}function Vg(c){return[...new Set(c)]}function Xg(c){let o={},d=Object.keys(c).sort();for(let r of d)o[r]=c[r];return o}function Zg(c,o){let d=new Set;return new Set(o),c.reduce((r,m)=>{let f=JSON.stringify(Xg(m));return d.has(f)||(d.add(f),r.push({key:f,link:m})),r},[])}function D0(){let c=y.useContext(tn);return Au(c,"You must render this element inside a <DataRouterContext.Provider> element"),c}function $g(){let c=y.useContext(ki);return Au(c,"You must render this element inside a <DataRouterStateContext.Provider> element"),c}var Tu=y.createContext(void 0);Tu.displayName="FrameworkContext";function O0(){let c=y.useContext(Tu);return Au(c,"You must render this element inside a <HydratedRouter> element"),c}function Kg(c,o){let d=y.useContext(Tu),[r,m]=y.useState(!1),[f,h]=y.useState(!1),{onFocus:v,onBlur:g,onMouseEnter:p,onMouseLeave:j,onTouchStart:w}=o,D=y.useRef(null);y.useEffect(()=>{if(c==="render"&&h(!0),c==="viewport"){let A=Q=>{Q.forEach(q=>{h(q.isIntersecting)})},T=new IntersectionObserver(A,{threshold:.5});return D.current&&T.observe(D.current),()=>{T.disconnect()}}},[c]),y.useEffect(()=>{if(r){let A=setTimeout(()=>{h(!0)},100);return()=>{clearTimeout(A)}}},[r]);let z=()=>{m(!0)},U=()=>{m(!1),h(!1)};return d?c!=="intent"?[f,D,{}]:[f,D,{onFocus:In(v,z),onBlur:In(g,U),onMouseEnter:In(p,z),onMouseLeave:In(j,U),onTouchStart:In(w,z)}]:[!1,D,{}]}function In(c,o){return d=>{c&&c(d),d.defaultPrevented||o(d)}}function Jg({page:c,...o}){let{router:d}=D0(),r=y.useMemo(()=>y0(d.routes,c,d.basename),[d.routes,c,d.basename]);return r?y.createElement(Wg,{page:c,matches:r,...o}):null}function Fg(c){let{manifest:o,routeModules:d}=O0(),[r,m]=y.useState([]);return y.useEffect(()=>{let f=!1;return Gg(c,o,d).then(h=>{f||m(h)}),()=>{f=!0}},[c,o,d]),r}function Wg({page:c,matches:o,...d}){let r=Zl(),{future:m,manifest:f,routeModules:h}=O0(),{basename:v}=D0(),{loaderData:g,matches:p}=$g(),j=y.useMemo(()=>l0(c,o,p,f,r,"data"),[c,o,p,f,r]),w=y.useMemo(()=>l0(c,o,p,f,r,"assets"),[c,o,p,f,r]),D=y.useMemo(()=>{if(c===r.pathname+r.search+r.hash)return[];let A=new Set,T=!1;if(o.forEach(q=>{var J;let L=f.routes[q.route.id];!L||!L.hasLoader||(!j.some(B=>B.route.id===q.route.id)&&q.route.id in g&&((J=h[q.route.id])!=null&&J.shouldRevalidate)||L.hasClientLoader?T=!0:A.add(q.route.id))}),A.size===0)return[];let Q=Lg(c,v,m.unstable_trailingSlashAwareDataRequests,"data");return T&&A.size>0&&Q.searchParams.set("_routes",o.filter(q=>A.has(q.route.id)).map(q=>q.route.id).join(",")),[Q.pathname+Q.search]},[v,m.unstable_trailingSlashAwareDataRequests,g,r,f,j,o,c,h]),z=y.useMemo(()=>Qg(w,f),[w,f]),U=Fg(w);return y.createElement(y.Fragment,null,D.map(A=>y.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...d})),z.map(A=>y.createElement("link",{key:A,rel:"modulepreload",href:A,...d})),U.map(({key:A,link:T})=>y.createElement("link",{key:A,nonce:d.nonce,...T,crossOrigin:T.crossOrigin??d.crossOrigin})))}function Pg(...c){return o=>{c.forEach(d=>{typeof d=="function"?d(o):d!=null&&(d.current=o)})}}var Ig=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ig&&(window.__reactRouterVersion="7.13.0")}catch{}function ev({basename:c,children:o,unstable_useTransitions:d,window:r}){let m=y.useRef();m.current==null&&(m.current=Dp({window:r,v5Compat:!0}));let f=m.current,[h,v]=y.useState({action:f.action,location:f.location}),g=y.useCallback(p=>{d===!1?v(p):y.startTransition(()=>v(p))},[d]);return y.useLayoutEffect(()=>f.listen(g),[f,g]),y.createElement(Rg,{basename:c,children:o,location:h.location,navigationType:h.action,navigator:f,unstable_useTransitions:d})}var k0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,U0=y.forwardRef(function({onClick:o,discover:d="render",prefetch:r="none",relative:m,reloadDocument:f,replace:h,state:v,target:g,to:p,preventScrollReset:j,viewTransition:w,unstable_defaultShouldRevalidate:D,...z},U){let{basename:A,unstable_useTransitions:T}=y.useContext(At),Q=typeof p=="string"&&k0.test(p),q=w0(p,A);p=q.to;let L=mg(p,{relative:m}),[J,B,C]=Kg(r,z),V=av(p,{replace:h,state:v,target:g,preventScrollReset:j,relative:m,viewTransition:w,unstable_defaultShouldRevalidate:D,unstable_useTransitions:T});function Z(oe){o&&o(oe),oe.defaultPrevented||V(oe)}let P=y.createElement("a",{...z,...C,href:q.absoluteURL||L,onClick:q.isExternal||f?o:Z,ref:Pg(U,B),target:g,"data-discover":!Q&&d==="render"?"true":void 0});return J&&!Q?y.createElement(y.Fragment,null,P,y.createElement(Jg,{page:L})):P});U0.displayName="Link";var H0=y.forwardRef(function({"aria-current":o="page",caseSensitive:d=!1,className:r="",end:m=!1,style:f,to:h,viewTransition:v,children:g,...p},j){let w=as(h,{relative:p.relative}),D=Zl(),z=y.useContext(ki),{navigator:U,basename:A}=y.useContext(At),T=z!=null&&rv(w)&&v===!0,Q=U.encodeLocation?U.encodeLocation(w).pathname:w.pathname,q=D.pathname,L=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;d||(q=q.toLowerCase(),L=L?L.toLowerCase():null,Q=Q.toLowerCase()),L&&A&&(L=vl(L,A)||L);const J=Q!=="/"&&Q.endsWith("/")?Q.length-1:Q.length;let B=q===Q||!m&&q.startsWith(Q)&&q.charAt(J)==="/",C=L!=null&&(L===Q||!m&&L.startsWith(Q)&&L.charAt(Q.length)==="/"),V={isActive:B,isPending:C,isTransitioning:T},Z=B?o:void 0,P;typeof r=="function"?P=r(V):P=[r,B?"active":null,C?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let oe=typeof f=="function"?f(V):f;return y.createElement(U0,{...p,"aria-current":Z,className:P,ref:j,style:oe,to:h,viewTransition:v},typeof g=="function"?g(V):g)});H0.displayName="NavLink";var tv=y.forwardRef(({discover:c="render",fetcherKey:o,navigate:d,reloadDocument:r,replace:m,state:f,method:h=Ei,action:v,onSubmit:g,relative:p,preventScrollReset:j,viewTransition:w,unstable_defaultShouldRevalidate:D,...z},U)=>{let{unstable_useTransitions:A}=y.useContext(At),T=iv(),Q=cv(v,{relative:p}),q=h.toLowerCase()==="get"?"get":"post",L=typeof v=="string"&&k0.test(v),J=B=>{if(g&&g(B),B.defaultPrevented)return;B.preventDefault();let C=B.nativeEvent.submitter,V=(C==null?void 0:C.getAttribute("formmethod"))||h,Z=()=>T(C||B.currentTarget,{fetcherKey:o,method:V,navigate:d,replace:m,state:f,relative:p,preventScrollReset:j,viewTransition:w,unstable_defaultShouldRevalidate:D});A&&d!==!1?y.startTransition(()=>Z()):Z()};return y.createElement("form",{ref:U,method:q,action:Q,onSubmit:r?g:J,...z,"data-discover":!L&&c==="render"?"true":void 0})});tv.displayName="Form";function lv(c){return`${c} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function B0(c){let o=y.useContext(tn);return Ge(o,lv(c)),o}function av(c,{target:o,replace:d,state:r,preventScrollReset:m,relative:f,viewTransition:h,unstable_defaultShouldRevalidate:v,unstable_useTransitions:g}={}){let p=wu(),j=Zl(),w=as(c,{relative:f});return y.useCallback(D=>{if(kg(D,o)){D.preventDefault();let z=d!==void 0?d:ts(j)===ts(w),U=()=>p(c,{replace:z,state:r,preventScrollReset:m,relative:f,viewTransition:h,unstable_defaultShouldRevalidate:v});g?y.startTransition(()=>U()):U()}},[j,p,w,d,r,o,c,m,f,h,v,g])}var nv=0,sv=()=>`__${String(++nv)}__`;function iv(){let{router:c}=B0("useSubmit"),{basename:o}=y.useContext(At),d=wg(),r=c.fetch,m=c.navigate;return y.useCallback(async(f,h={})=>{let{action:v,method:g,encType:p,formData:j,body:w}=Bg(f,o);if(h.navigate===!1){let D=h.fetcherKey||sv();await r(D,d,h.action||v,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:j,body:w,formMethod:h.method||g,formEncType:h.encType||p,flushSync:h.flushSync})}else await m(h.action||v,{unstable_defaultShouldRevalidate:h.unstable_defaultShouldRevalidate,preventScrollReset:h.preventScrollReset,formData:j,body:w,formMethod:h.method||g,formEncType:h.encType||p,replace:h.replace,state:h.state,fromRouteId:d,flushSync:h.flushSync,viewTransition:h.viewTransition})},[r,m,o,d])}function cv(c,{relative:o}={}){let{basename:d}=y.useContext(At),r=y.useContext(Jt);Ge(r,"useFormAction must be used inside a RouteContext");let[m]=r.matches.slice(-1),f={...as(c||".",{relative:o})},h=Zl();if(c==null){f.search=h.search;let v=new URLSearchParams(f.search),g=v.getAll("index");if(g.some(j=>j==="")){v.delete("index"),g.filter(w=>w).forEach(w=>v.append("index",w));let j=v.toString();f.search=j?`?${j}`:""}}return(!c||c===".")&&m.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(f.pathname=f.pathname==="/"?d:pl([d,f.pathname])),ts(f)}function rv(c,{relative:o}={}){let d=y.useContext(E0);Ge(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=B0("useViewTransitionState"),m=as(c,{relative:o});if(!d.isTransitioning)return!1;let f=vl(d.currentLocation.pathname,r)||d.currentLocation.pathname,h=vl(d.nextLocation.pathname,r)||d.nextLocation.pathname;return Ti(m.pathname,h)!=null||Ti(m.pathname,f)!=null}var uv=b0();const ov=bu(uv);/**
61
61
  * @license lucide-react v0.564.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
@@ -202,7 +202,7 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
202
202
  *
203
203
  * This source code is licensed under the ISC license.
204
204
  * See the LICENSE file in the root directory of this source tree.
205
- */const Zv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],hu=le("circle-x",Zv);/**
205
+ */const Zv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],xu=le("circle-x",Zv);/**
206
206
  * @license lucide-react v0.564.0 - ISC
207
207
  *
208
208
  * This source code is licensed under the ISC license.
@@ -222,12 +222,12 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
222
222
  *
223
223
  * This source code is licensed under the ISC license.
224
224
  * See the LICENSE file in the root directory of this source tree.
225
- */const Pv=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Tu=le("external-link",Pv);/**
225
+ */const Pv=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Ru=le("external-link",Pv);/**
226
226
  * @license lucide-react v0.564.0 - ISC
227
227
  *
228
228
  * This source code is licensed under the ISC license.
229
229
  * See the LICENSE file in the root directory of this source tree.
230
- */const Iv=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],xu=le("eye-off",Iv);/**
230
+ */const Iv=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],pu=le("eye-off",Iv);/**
231
231
  * @license lucide-react v0.564.0 - ISC
232
232
  *
233
233
  * This source code is licensed under the ISC license.
@@ -297,7 +297,7 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
297
297
  *
298
298
  * This source code is licensed under the ISC license.
299
299
  * See the LICENSE file in the root directory of this source tree.
300
- */const yb=[["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"}]],Ru=le("pen",yb);/**
300
+ */const yb=[["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"}]],_u=le("pen",yb);/**
301
301
  * @license lucide-react v0.564.0 - ISC
302
302
  *
303
303
  * This source code is licensed under the ISC license.
@@ -322,7 +322,7 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
322
322
  *
323
323
  * This source code is licensed under the ISC license.
324
324
  * See the LICENSE file in the root directory of this source tree.
325
- */const Eb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],_u=le("search",Eb);/**
325
+ */const Eb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Mu=le("search",Eb);/**
326
326
  * @license lucide-react v0.564.0 - ISC
327
327
  *
328
328
  * This source code is licensed under the ISC license.
@@ -362,7 +362,7 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
362
362
  *
363
363
  * This source code is licensed under the ISC license.
364
364
  * See the LICENSE file in the root directory of this source tree.
365
- */const Bb=[["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"}]],Mu=le("trash-2",Bb);/**
365
+ */const Bb=[["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"}]],zu=le("trash-2",Bb);/**
366
366
  * @license lucide-react v0.564.0 - ISC
367
367
  *
368
368
  * This source code is licensed under the ISC license.
@@ -372,7 +372,7 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
372
372
  *
373
373
  * This source code is licensed under the ISC license.
374
374
  * See the LICENSE file in the root directory of this source tree.
375
- */const Yb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],pu=le("users",Yb);/**
375
+ */const Yb=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],gu=le("users",Yb);/**
376
376
  * @license lucide-react v0.564.0 - ISC
377
377
  *
378
378
  * This source code is licensed under the ISC license.
@@ -387,27 +387,27 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
387
387
  *
388
388
  * This source code is licensed under the ISC license.
389
389
  * See the LICENSE file in the root directory of this source tree.
390
- */const Xb=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Zb=le("zap",Xb),u0=c=>{let o;const d=new Set,r=(p,j)=>{const w=typeof p=="function"?p(o):p;if(!Object.is(w,o)){const D=o;o=j??(typeof w!="object"||w===null)?w:Object.assign({},o,w),d.forEach(z=>z(o,D))}},m=()=>o,v={setState:r,getState:m,getInitialState:()=>g,subscribe:p=>(d.add(p),()=>d.delete(p))},g=o=c(r,m,v);return v},$b=c=>c?u0(c):u0,Kb=c=>c;function Jb(c,o=Kb){const d=Ye.useSyncExternalStore(c.subscribe,()=>o(c.getState()),()=>o(c.getInitialState()));return Ye.useDebugValue(d),d}const o0=c=>{const o=$b(c),d=r=>Jb(o,r);return Object.assign(d,o),d},Fb=c=>c?o0(c):o0,Wb="";let $0=!1,gu=null;function Pb(c){$0=c}function Ib(c){gu=c}function ey(c){return encodeURIComponent(c.replace(/\//g,"~"))}function Te(c){return $0&&gu?c.replace("/api/",`/api/projects/${ey(gu)}/`):c}function ty(){return Re("/api/projects")}async function Re(c,o){const d=`${Wb}${c}`,r=await fetch(d,{headers:{"Content-Type":"application/json",...o==null?void 0:o.headers},...o});if(!r.ok){const m=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${r.status}: ${r.statusText}`)}if(r.status!==204)return r.json()}function K0(){return Re(Te("/api/status"))}function ly(){return Re(Te("/api/prds"))}function ay(){return Re(Te("/api/prs"))}function ny(c,o){const d=`?lines=${encodeURIComponent(o)}`;return Re(Te(`/api/logs/${encodeURIComponent(c)}${d}`))}function zu(){return Re(Te("/api/config"))}function Du(c){return Re(Te("/api/config"),{method:"PUT",body:JSON.stringify(c)})}function sy(){return Re(Te("/api/doctor"))}function J0(){return Re(Te("/api/schedule-info"))}function iy(c){return Re(Te("/api/actions/run"),{method:"POST",headers:c?{"Content-Type":"application/json"}:void 0,body:c?JSON.stringify({prdName:c}):void 0})}function cy(){return Re(Te("/api/actions/review"),{method:"POST"})}function d0(){return Re(Te("/api/actions/install-cron"),{method:"POST"})}function ry(){return Re(Te("/api/actions/uninstall-cron"),{method:"POST"})}function uy(c="all"){return Re(Te("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:c})})}function oy(c){return Re(Te("/api/actions/retry"),{method:"POST",body:JSON.stringify({prdName:c})})}function dy(){return Re(Te("/api/actions/clear-lock"),{method:"POST"})}const Vl=["Draft","Ready","In Progress","Review","Done"];function Ou(){return Re(Te("/api/board/status"))}function fy(c){return Re(Te("/api/board/issues"),{method:"POST",body:JSON.stringify(c)})}function F0(c,o){return Re(Te(`/api/board/issues/${c}/move`),{method:"PATCH",body:JSON.stringify({column:o})})}function my(c){return Re(Te(`/api/board/issues/${c}`),{method:"DELETE"})}function hy(){return Re(Te("/api/roadmap"))}function xy(){return Re(Te("/api/roadmap/scan"),{method:"POST"})}function W0(c){return Re(Te("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:c})})}function py(c,o){return Re(Te("/api/slack/channels/create"),{method:"POST",body:JSON.stringify({botToken:c,name:o})})}function gy(c){return Re(Te("/api/slack/channels"),{method:"POST",body:JSON.stringify({botToken:c})})}function vy(){return Re(Te("/api/agents"))}function by(c){return Re(Te(`/api/agents/${c}/prompt`))}function yy(c){return Re(Te("/api/agents"),{method:"POST",body:JSON.stringify(c)})}function f0(c,o){return Re(Te(`/api/agents/${c}`),{method:"PUT",body:JSON.stringify(o)})}function jy(c){return Re(Te(`/api/agents/${c}`),{method:"DELETE"})}function Ny(){return Re(Te("/api/agents/seed-defaults"),{method:"POST"})}function ct(c,o=[],d){const r=(d==null?void 0:d.enabled)??!0,[m,f]=y.useState(null),[h,v]=y.useState(!0),[g,p]=y.useState(null),j=y.useRef(c);j.current=c;const w=y.useRef(()=>{(async()=>{p(null);try{const z=await j.current();f(z)}catch(z){p(z instanceof Error?z:new Error("Unknown error"))}})()});return w.current=w.current.bind(w),y.useEffect(()=>{if(!r)return;let D=!1;return v(!0),p(null),(async()=>{try{const U=await j.current();D||f(U)}catch(U){D||p(U instanceof Error?U:new Error("Unknown error"))}finally{D||v(!1)}})(),()=>{D=!0}},[...o,r]),{data:m,loading:h,error:g,refetch:w.current}}function P0(c,o=[],d){y.useEffect(()=>{if((d==null?void 0:d.enabled)===!1)return;const r=Te("/api/status/events"),m=new EventSource(r);return m.addEventListener("status_changed",f=>{try{const h=JSON.parse(f.data);c(h)}catch{}}),m.addEventListener("executor_started",f=>{try{const h=JSON.parse(f.data);console.log("Executor started with PID:",h.pid)}catch{}}),m.onerror=()=>{},()=>{m.close()}},o)}const Sy=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,rt=Fb(c=>({projectName:"Night Watch",setProjectName:o=>c({projectName:o}),toasts:[],addToast:o=>{const d=Math.random().toString(36).substring(7);c(r=>({toasts:[...r.toasts,{...o,id:d}]})),setTimeout(()=>{c(r=>({toasts:r.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:o=>c(d=>({toasts:d.toasts.filter(r=>r.id!==o)})),globalModeLoading:!0,setGlobalModeLoading:o=>c({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{Pb(o),c({isGlobalMode:o})},projects:[],setProjects:o=>c({projects:o}),selectedProjectId:Sy,selectProject:o=>{Ib(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),c(d=>{const r=d.projects.find(m=>m.name===o);return{selectedProjectId:o,...r?{projectName:r.name}:{}}})}})),wy=()=>{const[c,o]=y.useState(!1),{projectName:d,isGlobalMode:r,projects:m,selectedProjectId:f,selectProject:h}=rt(),v=[{icon:cb,label:"Dashboard",path:"/"},{icon:db,label:"Board",path:"/board"},{icon:nb,label:"Pull Requests",path:"/prs",badge:1},{icon:Q0,label:"Roadmap",path:"/roadmap"},{icon:Ri,label:"Scheduling",path:"/scheduling"},{icon:Db,label:"Logs",path:"/logs"},{icon:Rv,label:"Integrations",path:"/integrations"},{icon:pu,label:"Agents",path:"/agents"},{icon:X0,label:"Settings",path:"/settings"}];return n.jsxs("aside",{className:`
390
+ */const Xb=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Zb=le("zap",Xb),u0=c=>{let o;const d=new Set,r=(p,j)=>{const w=typeof p=="function"?p(o):p;if(!Object.is(w,o)){const D=o;o=j??(typeof w!="object"||w===null)?w:Object.assign({},o,w),d.forEach(z=>z(o,D))}},m=()=>o,v={setState:r,getState:m,getInitialState:()=>g,subscribe:p=>(d.add(p),()=>d.delete(p))},g=o=c(r,m,v);return v},$b=c=>c?u0(c):u0,Kb=c=>c;function Jb(c,o=Kb){const d=Qe.useSyncExternalStore(c.subscribe,()=>o(c.getState()),()=>o(c.getInitialState()));return Qe.useDebugValue(d),d}const o0=c=>{const o=$b(c),d=r=>Jb(o,r);return Object.assign(d,o),d},Fb=c=>c?o0(c):o0,Wb="";let $0=!1,vu=null;function Pb(c){$0=c}function Ib(c){vu=c}function ey(c){return encodeURIComponent(c.replace(/\//g,"~"))}function Te(c){return $0&&vu?c.replace("/api/",`/api/projects/${ey(vu)}/`):c}function ty(){return Re("/api/projects")}async function Re(c,o){const d=`${Wb}${c}`,r=await fetch(d,{headers:{"Content-Type":"application/json",...o==null?void 0:o.headers},...o});if(!r.ok){const m=await r.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${r.status}: ${r.statusText}`)}if(r.status!==204)return r.json()}function K0(){return Re(Te("/api/status"))}function ly(){return Re(Te("/api/prds"))}function ay(){return Re(Te("/api/prs"))}function ny(c,o){const d=`?lines=${encodeURIComponent(o)}`;return Re(Te(`/api/logs/${encodeURIComponent(c)}${d}`))}function Du(){return Re(Te("/api/config"))}function Oi(c){return Re(Te("/api/config"),{method:"PUT",body:JSON.stringify(c)})}function sy(){return Re(Te("/api/doctor"))}function J0(){return Re(Te("/api/schedule-info"))}function iy(c){return Re(Te("/api/actions/run"),{method:"POST",headers:c?{"Content-Type":"application/json"}:void 0,body:c?JSON.stringify({prdName:c}):void 0})}function cy(){return Re(Te("/api/actions/review"),{method:"POST"})}function d0(){return Re(Te("/api/actions/install-cron"),{method:"POST"})}function ry(){return Re(Te("/api/actions/uninstall-cron"),{method:"POST"})}function uy(c="all"){return Re(Te("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:c})})}function oy(c){return Re(Te("/api/actions/retry"),{method:"POST",body:JSON.stringify({prdName:c})})}function dy(){return Re(Te("/api/actions/clear-lock"),{method:"POST"})}const Vl=["Draft","Ready","In Progress","Review","Done"];function Ou(){return Re(Te("/api/board/status"))}function fy(c){return Re(Te("/api/board/issues"),{method:"POST",body:JSON.stringify(c)})}function F0(c,o){return Re(Te(`/api/board/issues/${c}/move`),{method:"PATCH",body:JSON.stringify({column:o})})}function my(c){return Re(Te(`/api/board/issues/${c}`),{method:"DELETE"})}function hy(){return Re(Te("/api/roadmap"))}function xy(){return Re(Te("/api/roadmap/scan"),{method:"POST"})}function W0(c){return Re(Te("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:c})})}function py(c,o){return Re(Te("/api/slack/channels/create"),{method:"POST",body:JSON.stringify({botToken:c,name:o})})}function gy(c){return Re(Te("/api/slack/channels"),{method:"POST",body:JSON.stringify({botToken:c})})}function vy(){return Re(Te("/api/agents"))}function by(c){return Re(Te(`/api/agents/${c}/prompt`))}function yy(c){return Re(Te("/api/agents"),{method:"POST",body:JSON.stringify(c)})}function f0(c,o){return Re(Te(`/api/agents/${c}`),{method:"PUT",body:JSON.stringify(o)})}function jy(c){return Re(Te(`/api/agents/${c}`),{method:"DELETE"})}function Ny(){return Re(Te("/api/agents/seed-defaults"),{method:"POST"})}function ct(c,o=[],d){const r=(d==null?void 0:d.enabled)??!0,[m,f]=y.useState(null),[h,v]=y.useState(!0),[g,p]=y.useState(null),j=y.useRef(c);j.current=c;const w=y.useRef(()=>{(async()=>{p(null);try{const z=await j.current();f(z)}catch(z){p(z instanceof Error?z:new Error("Unknown error"))}})()});return w.current=w.current.bind(w),y.useEffect(()=>{if(!r)return;let D=!1;return v(!0),p(null),(async()=>{try{const U=await j.current();D||f(U)}catch(U){D||p(U instanceof Error?U:new Error("Unknown error"))}finally{D||v(!1)}})(),()=>{D=!0}},[...o,r]),{data:m,loading:h,error:g,refetch:w.current}}function P0(c,o=[],d){y.useEffect(()=>{if((d==null?void 0:d.enabled)===!1)return;const r=Te("/api/status/events"),m=new EventSource(r);return m.addEventListener("status_changed",f=>{try{const h=JSON.parse(f.data);c(h)}catch{}}),m.addEventListener("executor_started",f=>{try{const h=JSON.parse(f.data);console.log("Executor started with PID:",h.pid)}catch{}}),m.onerror=()=>{},()=>{m.close()}},o)}const Sy=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,rt=Fb(c=>({projectName:"Night Watch",setProjectName:o=>c({projectName:o}),toasts:[],addToast:o=>{const d=Math.random().toString(36).substring(7);c(r=>({toasts:[...r.toasts,{...o,id:d}]})),setTimeout(()=>{c(r=>({toasts:r.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:o=>c(d=>({toasts:d.toasts.filter(r=>r.id!==o)})),globalModeLoading:!0,setGlobalModeLoading:o=>c({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{Pb(o),c({isGlobalMode:o})},projects:[],setProjects:o=>c({projects:o}),selectedProjectId:Sy,selectProject:o=>{Ib(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),c(d=>{const r=d.projects.find(m=>m.name===o);return{selectedProjectId:o,...r?{projectName:r.name}:{}}})}})),wy=()=>{const[c,o]=y.useState(!1),{projectName:d,isGlobalMode:r,projects:m,selectedProjectId:f,selectProject:h}=rt(),v=[{icon:cb,label:"Dashboard",path:"/"},{icon:db,label:"Board",path:"/board"},{icon:nb,label:"Pull Requests",path:"/prs",badge:1},{icon:Q0,label:"Roadmap",path:"/roadmap"},{icon:Ri,label:"Scheduling",path:"/scheduling"},{icon:Db,label:"Logs",path:"/logs"},{icon:Rv,label:"Integrations",path:"/integrations"},{icon:gu,label:"Agents",path:"/agents"},{icon:X0,label:"Settings",path:"/settings"}];return n.jsxs("aside",{className:`
391
391
  relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
392
392
  ${c?"w-20":"w-72"} h-screen flex-shrink-0 z-50
393
393
  bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
394
- `,children:[n.jsx("div",{className:`p-6 border-b border-white/5 ${c?"items-center justify-center flex":""}`,children:c?n.jsx("div",{className:"relative group",children:n.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):n.jsxs("div",{className:"relative w-full",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:r?"Projects":"Workspace"}),r?n.jsxs("div",{className:"relative",children:[n.jsx(s0,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),n.jsx("select",{value:f||"",onChange:g=>h(g.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:m.filter(g=>g.valid).map(g=>n.jsx("option",{value:g.name,children:g.name},g.name))}),n.jsx(qv,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):n.jsxs("div",{className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 px-3.5 text-sm font-medium shadow-sm flex items-center",children:[n.jsx(s0,{className:"h-4 w-4 text-indigo-400 mr-3"}),n.jsx("span",{className:"truncate",children:d})]})]})}),n.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:n.jsx("ul",{className:"space-y-1.5 px-4",children:v.map(g=>n.jsxs(Ye.Fragment,{children:[g.path==="/agents"&&!c&&n.jsx("li",{className:"pt-3 pb-1 px-3.5",children:n.jsx("span",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest",children:"Team"})}),n.jsx("li",{children:n.jsx(H0,{to:g.path,className:({isActive:p})=>`
394
+ `,children:[n.jsx("div",{className:`p-6 border-b border-white/5 ${c?"items-center justify-center flex":""}`,children:c?n.jsx("div",{className:"relative group",children:n.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):n.jsxs("div",{className:"relative w-full",children:[n.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:r?"Projects":"Workspace"}),r?n.jsxs("div",{className:"relative",children:[n.jsx(s0,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),n.jsx("select",{value:f||"",onChange:g=>h(g.target.value),className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 pl-10 pr-8 text-sm font-medium shadow-sm appearance-none cursor-pointer hover:border-white/20 transition-colors focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20",children:m.filter(g=>g.valid).map(g=>n.jsx("option",{value:g.name,children:g.name},g.name))}),n.jsx(qv,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):n.jsxs("div",{className:"w-full bg-[#111827] border border-white/10 text-slate-200 rounded-lg py-3 px-3.5 text-sm font-medium shadow-sm flex items-center",children:[n.jsx(s0,{className:"h-4 w-4 text-indigo-400 mr-3"}),n.jsx("span",{className:"truncate",children:d})]})]})}),n.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:n.jsx("ul",{className:"space-y-1.5 px-4",children:v.map(g=>n.jsxs(Qe.Fragment,{children:[g.path==="/agents"&&!c&&n.jsx("li",{className:"pt-3 pb-1 px-3.5",children:n.jsx("span",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest",children:"Team"})}),n.jsx("li",{children:n.jsx(H0,{to:g.path,className:({isActive:p})=>`
395
395
  flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
396
396
  ${p?"bg-indigo-500/10 text-indigo-300 shadow-[inset_0_1px_0_0_rgba(255,255,255,0.05)]":"text-slate-400 hover:bg-white/5 hover:text-slate-200"}
397
397
  ${c?"justify-center":""}
398
- `,children:({isActive:p})=>n.jsxs(n.Fragment,{children:[n.jsx(g.icon,{className:`h-5 w-5 transition-colors ${p?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${c?"":"mr-3.5"}`}),!c&&n.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:g.label}),g.badge&&(c?n.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):n.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${p?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:g.badge})),p&&!c&&n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),c&&n.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:g.label})]})})})]},g.path))})}),n.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:n.jsx("button",{onClick:()=>o(!c),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:c?n.jsx(_i,{className:"h-5 w-5"}):n.jsx(Hv,{className:"h-5 w-5"})})})]})},Cy=()=>{const{projectName:c}=rt();return n.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[n.jsxs("div",{className:"flex items-center space-x-6",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),n.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:c})]}),n.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),n.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[n.jsx(Qb,{className:"h-3.5 w-3.5"}),n.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),n.jsxs("div",{className:"flex items-center space-x-5",children:[n.jsxs("div",{className:"relative hidden md:block group",children:[n.jsx("input",{type:"text",placeholder:"Search ( / )",className:"w-72 pl-10 pr-4 py-2 rounded-lg border border-white/5 bg-white/5 text-sm text-slate-200 focus:outline-none focus:ring-1 focus:ring-indigo-500/50 focus:border-indigo-500/50 transition-all placeholder:text-slate-600 focus:bg-[#0b101b]"}),n.jsx(_u,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[n.jsx(Av,{className:"h-5 w-5"}),n.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]}),n.jsx("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full transition-all",children:n.jsx(X0,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},Ey=({toast:c,onDismiss:o})=>{const d={success:n.jsx(ns,{className:"h-5 w-5 text-green-400"}),error:n.jsx(Kt,{className:"h-5 w-5 text-red-400"}),info:n.jsx(ub,{className:"h-5 w-5 text-blue-400"}),warning:n.jsx(qb,{className:"h-5 w-5 text-amber-400"})},r={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return n.jsx("div",{className:`
398
+ `,children:({isActive:p})=>n.jsxs(n.Fragment,{children:[n.jsx(g.icon,{className:`h-5 w-5 transition-colors ${p?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${c?"":"mr-3.5"}`}),!c&&n.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:g.label}),g.badge&&(c?n.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):n.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${p?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:g.badge})),p&&!c&&n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-6 bg-indigo-500 rounded-r-full shadow-[0_0_10px_rgba(99,102,241,0.4)]"}),c&&n.jsx("div",{className:"absolute left-full ml-4 px-3 py-1.5 bg-[#111827] text-white text-xs font-medium rounded-md border border-white/10 shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none whitespace-nowrap z-50 transition-opacity translate-x-2 group-hover:translate-x-0",children:g.label})]})})})]},g.path))})}),n.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:n.jsx("button",{onClick:()=>o(!c),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:c?n.jsx(_i,{className:"h-5 w-5"}):n.jsx(Hv,{className:"h-5 w-5"})})})]})},Cy=()=>{const{projectName:c}=rt();return n.jsxs("header",{className:"h-20 flex items-center justify-between px-8 z-40 sticky top-0 bg-[#030712]/80 backdrop-blur-md border-b border-white/5",children:[n.jsxs("div",{className:"flex items-center space-x-6",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),n.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:c})]}),n.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),n.jsxs("div",{className:"flex items-center space-x-2 text-xs font-medium px-3 py-1.5 rounded-full border transition-colors bg-emerald-500/5 text-emerald-400 border-emerald-500/20 shadow-[0_0_10px_-4px_rgba(16,185,129,0.3)]",children:[n.jsx(Qb,{className:"h-3.5 w-3.5"}),n.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),n.jsxs("div",{className:"flex items-center space-x-5",children:[n.jsxs("div",{className:"relative hidden md:block group",children:[n.jsx("input",{type:"text",placeholder:"Search ( / )",className:"w-72 pl-10 pr-4 py-2 rounded-lg border border-white/5 bg-white/5 text-sm text-slate-200 focus:outline-none focus:ring-1 focus:ring-indigo-500/50 focus:border-indigo-500/50 transition-all placeholder:text-slate-600 focus:bg-[#0b101b]"}),n.jsx(Mu,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[n.jsx(Av,{className:"h-5 w-5"}),n.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]}),n.jsx("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full transition-all",children:n.jsx(X0,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},Ey=({toast:c,onDismiss:o})=>{const d={success:n.jsx(ns,{className:"h-5 w-5 text-green-400"}),error:n.jsx(Kt,{className:"h-5 w-5 text-red-400"}),info:n.jsx(ub,{className:"h-5 w-5 text-blue-400"}),warning:n.jsx(qb,{className:"h-5 w-5 text-amber-400"})},r={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return n.jsx("div",{className:`
399
399
  pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
400
400
  bg-slate-900 border border-slate-800 border-l-4 ${r[c.type]}
401
401
  shadow-lg ring-1 ring-black ring-opacity-5 transition-all
402
402
  animate-in slide-in-from-right-full fade-in duration-300
403
403
  `,children:n.jsx("div",{className:"p-4",children:n.jsxs("div",{className:"flex items-start",children:[n.jsx("div",{className:"flex-shrink-0",children:d[c.type]}),n.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:c.title}),c.message&&n.jsx("p",{className:"mt-1 text-sm text-slate-400",children:c.message})]}),n.jsx("div",{className:"ml-4 flex flex-shrink-0",children:n.jsxs("button",{type:"button",className:"inline-flex rounded-md text-slate-400 hover:text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",onClick:()=>o(c.id),children:[n.jsx("span",{className:"sr-only",children:"Close"}),n.jsx(Ft,{className:"h-5 w-5"})]})})]})})})},Ay=()=>{const{toasts:c,removeToast:o}=rt();return n.jsx("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 flex flex-col items-end px-4 py-6 sm:items-end sm:p-6 z-[100] gap-4",children:c.map(d=>n.jsx(Ey,{toast:d,onDismiss:o},d.id))})};function Ty(){const{setGlobalMode:c,setGlobalModeLoading:o,setProjects:d,selectProject:r,selectedProjectId:m}=rt();y.useEffect(()=>{o(!0),ty().then(f=>{c(!0),d(f);const h=f.filter(v=>v.valid);m&&h.some(v=>v.name===m)?r(m):h.length>0&&r(h[0].name)}).catch(()=>{c(!1)}).finally(()=>{o(!1)})},[])}const ku=({persona:c,size:o="sm"})=>{const d=o==="lg"?"w-20 h-20 text-2xl":"w-12 h-12 text-base",m={"Security Reviewer":"bg-red-500/20 text-red-300 border-red-500/30","Tech Lead / Architect":"bg-indigo-500/20 text-indigo-300 border-indigo-500/30","QA Engineer":"bg-green-500/20 text-green-300 border-green-500/30",Implementer:"bg-amber-500/20 text-amber-300 border-amber-500/30"}[c.role]??"bg-slate-700/40 text-slate-300 border-white/10";return c.avatarUrl?n.jsx("img",{src:c.avatarUrl,alt:c.name,className:`${d} rounded-full object-cover border border-white/10`}):n.jsx("div",{className:`${d} rounded-full border flex items-center justify-center font-bold ${m}`,children:c.name.charAt(0)})},Ry=({role:c})=>c.toLowerCase().includes("security")?n.jsx(Z0,{className:"h-3 w-3"}):c.toLowerCase().includes("tech")||c.toLowerCase().includes("architect")?n.jsx(Zb,{className:"h-3 w-3"}):c.toLowerCase().includes("qa")?n.jsx(Hb,{className:"h-3 w-3"}):n.jsx(Jv,{className:"h-3 w-3"}),_y=({persona:c,onEdit:o,onDelete:d,onToggleActive:r})=>{const m=c.soul.expertise.slice(0,3),f=c.soul.worldview[0]??"";return n.jsxs("div",{onClick:()=>o(c),role:"button",tabIndex:0,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),o(c))},className:`relative rounded-xl border p-5 flex flex-col gap-4 transition-all duration-200
404
- ${c.isActive?"bg-[#0d1117] border-white/10 hover:border-white/20":"bg-[#0d1117]/60 border-white/5 opacity-60"}`,children:[n.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(ku,{persona:c}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold text-slate-100",children:c.name}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[n.jsx(Ry,{role:c.role}),n.jsx("span",{className:"text-xs text-slate-400",children:c.role})]})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:h=>{h.stopPropagation(),r(c)},title:c.isActive?"Deactivate":"Activate",className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${c.isActive?"bg-indigo-600":"bg-slate-700"}`,children:n.jsx("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${c.isActive?"translate-x-4":"translate-x-0.5"}`})}),n.jsx("button",{onClick:h=>{h.stopPropagation(),o(c)},className:"p-1.5 rounded-lg text-slate-500 hover:text-slate-200 hover:bg-white/5 transition-colors",title:"Edit",children:n.jsx(Ru,{className:"h-3.5 w-3.5"})}),n.jsx("button",{onClick:h=>{h.stopPropagation(),d(c)},className:"p-1.5 rounded-lg text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",title:"Delete",children:n.jsx(Mu,{className:"h-3.5 w-3.5"})})]})]}),f&&n.jsxs("p",{className:"text-xs text-slate-500 italic leading-relaxed line-clamp-2",children:["“",f,"”"]}),m.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1.5",children:m.map(h=>n.jsx("span",{className:"px-2 py-0.5 rounded-md text-[10px] font-medium bg-indigo-500/10 text-indigo-300 border border-indigo-500/20",children:h},h))}),c.modelConfig&&n.jsxs("div",{className:"text-[10px] text-slate-600 font-mono",children:[c.modelConfig.provider,"/",c.modelConfig.model]})]})},My=({tabs:c,active:o,onChange:d})=>n.jsx("div",{className:"flex border-b border-white/10 mb-6",children:c.map(r=>n.jsx("button",{onClick:()=>d(r),className:`px-4 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px ${o===r?"text-indigo-300 border-indigo-500":"text-slate-500 border-transparent hover:text-slate-300"}`,children:r},r))}),Bt=({label:c,tags:o,onChange:d,placeholder:r})=>{const[m,f]=y.useState(""),h=()=>{const v=m.trim();!v||o.includes(v)||(d([...o,v]),f(""))};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:o.map(v=>n.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-md text-xs bg-slate-800 text-slate-300 border border-white/10",children:[v,n.jsx("button",{onClick:()=>d(o.filter(g=>g!==v)),className:"text-slate-500 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},v))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:m,onChange:v=>f(v.target.value),onKeyDown:v=>v.key==="Enter"&&(v.preventDefault(),h()),placeholder:r??"Add item...",className:"flex-1 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:h,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},m0=({label:c,items:o,onChange:d})=>{const[r,m]=y.useState(""),[f,h]=y.useState(""),v=()=>{r.trim()&&(d({...o,[r.trim()]:f.trim()}),m(""),h(""))};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"space-y-1.5 mb-2",children:Object.entries(o).map(([g,p])=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs font-mono text-indigo-400 w-32 truncate",children:g}),n.jsx("span",{className:"text-xs text-slate-400 flex-1 truncate",children:p}),n.jsx("button",{onClick:()=>{const j={...o};delete j[g],d(j)},className:"text-slate-600 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},g))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:r,onChange:g=>m(g.target.value),placeholder:"key",className:"w-32 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("input",{value:f,onChange:g=>h(g.target.value),onKeyDown:g=>g.key==="Enter"&&(g.preventDefault(),v()),placeholder:"value",className:"flex-1 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:v,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},h0=({label:c,items:o,onChange:d,examplePlaceholder:r,whyPlaceholder:m})=>{const f=(h,v)=>{const g=[...o];g[h]={...g[h],...v},d(g)};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400",children:c}),n.jsx("button",{onClick:()=>d([...o,{example:"",why:""}]),className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add"})]}),n.jsx("div",{className:"space-y-2",children:o.map((h,v)=>n.jsxs("div",{className:"rounded-lg border border-white/10 bg-[#111827] p-2 space-y-2",children:[n.jsx("input",{value:h.example,onChange:g=>f(v,{example:g.target.value}),placeholder:r??"Example...",className:"w-full bg-black/20 border border-white/10 rounded-md px-2 py-1.5 text-xs text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:h.why,onChange:g=>f(v,{why:g.target.value}),placeholder:m??"Why this misses the voice...",className:"flex-1 bg-black/20 border border-white/10 rounded-md px-2 py-1.5 text-xs text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:()=>d(o.filter((g,p)=>p!==v)),className:"text-slate-500 hover:text-red-400 px-1",title:"Remove",children:n.jsx(Ft,{className:"h-3.5 w-3.5"})})]})]},v))})]})},es=({label:c,value:o,onChange:d,rows:r=3,placeholder:m})=>n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("textarea",{value:o,onChange:f=>d(f.target.value),rows:r,placeholder:m,className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 resize-none"})]}),Ia=({label:c,value:o,onChange:d,placeholder:r,type:m="text"})=>n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("input",{type:m,value:o,onChange:f=>d(f.target.value),placeholder:r,className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"})]});function zy(){return{name:"",role:"",avatarUrl:"",soul:{whoIAm:"",worldview:[],opinions:{},expertise:[],interests:[],tensions:[],boundaries:[],petPeeves:[]},style:{voicePrinciples:"",sentenceStructure:"",tone:"",wordsUsed:[],wordsAvoided:[],emojiUsage:{frequency:"moderate",favorites:[],contextRules:""},quickReactions:{},rhetoricalMoves:[],antiPatterns:[],goodExamples:[],badExamples:[]},skill:{modes:{},interpolationRules:"",additionalInstructions:[]},modelConfig:{provider:"anthropic",model:"claude-sonnet-4-6"},systemPromptOverride:""}}function Dy(c){return{name:c.name,role:c.role,avatarUrl:c.avatarUrl??"",soul:{...c.soul},style:{...c.style},skill:{...c.skill},modelConfig:c.modelConfig??{provider:"anthropic",model:"claude-sonnet-4-6"},systemPromptOverride:c.systemPromptOverride??""}}const Oy=["Identity","Soul","Style","Calibration","Advanced"],ky=({persona:c,onClose:o,onSave:d})=>{var B;const[r,m]=y.useState("Identity"),[f,h]=y.useState(c?Dy(c):zy()),[v,g]=y.useState(!1),[p,j]=y.useState(null),[w,D]=y.useState(null),[z,U]=y.useState(!1),A=C=>h(Q=>({...Q,soul:{...Q.soul,...C}})),R=C=>h(Q=>({...Q,style:{...Q.style,...C}})),G=C=>h(Q=>({...Q,skill:{...Q.skill,...C}})),q=C=>h(Q=>({...Q,modelConfig:Q.modelConfig?{...Q.modelConfig,...C}:{provider:"anthropic",model:"claude-sonnet-4-6",...C}})),L=async()=>{if(!f.name.trim()||!f.role.trim()){j("Name and role are required.");return}g(!0),j(null);const C=f.modelConfig===null?null:f.modelConfig.model?f.modelConfig:void 0,Q={name:f.name.trim(),role:f.role.trim(),avatarUrl:f.avatarUrl.trim()||void 0,soul:f.soul,style:f.style,skill:f.skill,modelConfig:C,systemPromptOverride:f.systemPromptOverride.trim()||void 0};try{await d((c==null?void 0:c.id)??null,Q),o()}catch(Z){j(Z.message)}finally{g(!1)}},J=async()=>{if(c){U(!0);try{const C=await by(c.id);D(C.prompt)}catch(C){D(`Error: ${C.message}`)}finally{U(!1)}}};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0d1117] border border-white/10 rounded-2xl shadow-2xl w-full max-w-3xl max-h-[90vh] flex flex-col",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[c&&n.jsx(ku,{persona:c}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-slate-100",children:c?`Edit ${c.name}`:"Hire Agent"}),n.jsx("p",{className:"text-xs text-slate-500",children:"Define their soul, style, and skills"})]})]}),n.jsx("button",{onClick:o,className:"p-2 rounded-lg text-slate-500 hover:text-slate-200 hover:bg-white/5",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"px-6 pt-4",children:n.jsx(My,{tabs:Oy,active:r,onChange:m})}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 pb-6 space-y-5",children:[r==="Identity"&&n.jsxs(n.Fragment,{children:[n.jsx(Ia,{label:"Name",value:f.name,onChange:C=>h(Q=>({...Q,name:C})),placeholder:"e.g. Maya"}),n.jsx(Ia,{label:"Role",value:f.role,onChange:C=>h(Q=>({...Q,role:C})),placeholder:"e.g. Security Reviewer"}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-2",children:"Avatar"}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"h-16 w-16 rounded-full bg-indigo-600/20 border border-indigo-500/30 flex items-center justify-center overflow-hidden flex-shrink-0",children:f.avatarUrl?n.jsx("img",{src:f.avatarUrl,alt:"avatar",className:"h-full w-full object-cover"}):n.jsx("span",{className:"text-xl font-bold text-indigo-400",children:(B=(f.name||"?")[0])==null?void 0:B.toUpperCase()})}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("label",{className:"cursor-pointer inline-flex items-center gap-2 px-3 py-2 rounded-lg border border-white/10 bg-white/5 text-xs text-slate-300 hover:bg-white/10 transition-colors",children:[n.jsx("span",{children:"Upload image"}),n.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:C=>{var P;const Q=(P=C.target.files)==null?void 0:P[0];if(!Q)return;const Z=new FileReader;Z.onload=de=>{var K;const xe=(K=de.target)==null?void 0:K.result;h(se=>({...se,avatarUrl:xe}))},Z.readAsDataURL(Q)}})]}),f.avatarUrl&&n.jsx("button",{onClick:()=>h(C=>({...C,avatarUrl:""})),className:"ml-2 text-xs text-slate-500 hover:text-red-400",children:"Remove"})]})]})]}),n.jsx(es,{label:"Who I Am",value:f.soul.whoIAm,onChange:C=>A({whoIAm:C}),rows:4,placeholder:"A concise self-description in first person..."}),n.jsx(Bt,{label:"Expertise",tags:f.soul.expertise,onChange:C=>A({expertise:C}),placeholder:"e.g. security, cryptography..."}),n.jsx(Bt,{label:"Interests",tags:f.soul.interests,onChange:C=>A({interests:C}),placeholder:"e.g. OWASP, threat modeling..."})]}),r==="Soul"&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{label:"Worldview (beliefs)",tags:f.soul.worldview,onChange:C=>A({worldview:C}),placeholder:"Add a core belief..."}),n.jsx(Bt,{label:"Tensions (internal conflicts)",tags:f.soul.tensions,onChange:C=>A({tensions:C}),placeholder:"Add a tension..."}),n.jsx(Bt,{label:"Boundaries (won't do)",tags:f.soul.boundaries,onChange:C=>A({boundaries:C}),placeholder:"Add a boundary..."}),n.jsx(Bt,{label:"Pet Peeves",tags:f.soul.petPeeves,onChange:C=>A({petPeeves:C}),placeholder:"Add a pet peeve..."}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Opinions"}),n.jsx("button",{onClick:()=>{const C=prompt("Domain name (e.g., security, architecture):");C!=null&&C.trim()&&A({opinions:{...f.soul.opinions??{},[C.trim()]:[]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add Domain"})]}),Object.entries(f.soul.opinions??{}).map(([C,Q])=>n.jsxs("div",{className:"mb-3 p-3 bg-white/5 rounded-lg border border-white/10",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-medium text-slate-300",children:C}),n.jsx("button",{onClick:()=>{const{[C]:Z,...P}=f.soul.opinions??{};A({opinions:P})},className:"text-xs text-red-400 hover:text-red-300",children:"Remove domain"})]}),n.jsx("div",{className:"space-y-1 mb-2",children:Q.map((Z,P)=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:Z,onChange:de=>{const xe=[...Q];xe[P]=de.target.value,A({opinions:{...f.soul.opinions??{},[C]:xe}})},className:"flex-1 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300 focus:outline-none focus:border-indigo-500/50",placeholder:"Add a take..."}),n.jsx("button",{onClick:()=>{const de=Q.filter((xe,K)=>K!==P);A({opinions:{...f.soul.opinions??{},[C]:de}})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},P))}),n.jsx("button",{onClick:()=>{A({opinions:{...f.soul.opinions??{},[C]:[...Q,""]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add take"})]},C))]})]}),r==="Style"&&n.jsxs(n.Fragment,{children:[n.jsx(es,{label:"Voice Principles",value:f.style.voicePrinciples,onChange:C=>R({voicePrinciples:C}),placeholder:"Describe the voice in 1-2 sentences..."}),n.jsx(Ia,{label:"Tone",value:f.style.tone,onChange:C=>R({tone:C}),placeholder:"e.g. Vigilant but not paranoid. Matter-of-fact."}),n.jsx(Ia,{label:"Sentence Structure",value:f.style.sentenceStructure,onChange:C=>R({sentenceStructure:C}),placeholder:"e.g. Short and punchy. One risk, one fix per message."}),n.jsx(Bt,{label:"Words I Use",tags:f.style.wordsUsed,onChange:C=>R({wordsUsed:C}),placeholder:"Add a word or phrase..."}),n.jsx(Bt,{label:"Words I Never Use",tags:f.style.wordsAvoided,onChange:C=>R({wordsAvoided:C}),placeholder:"Add a word to avoid..."}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:"Emoji Frequency"}),n.jsxs("select",{value:f.style.emojiUsage.frequency,onChange:C=>R({emojiUsage:{...f.style.emojiUsage,frequency:C.target.value}}),className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 focus:outline-none focus:border-indigo-500/50",children:[n.jsx("option",{value:"never",children:"Never"}),n.jsx("option",{value:"rare",children:"Rare"}),n.jsx("option",{value:"moderate",children:"Moderate"}),n.jsx("option",{value:"heavy",children:"Heavy"})]})]}),n.jsx(Bt,{label:"Favorite Emojis",tags:f.style.emojiUsage.favorites,onChange:C=>R({emojiUsage:{...f.style.emojiUsage,favorites:C}}),placeholder:"Add an emoji..."}),n.jsx(es,{label:"Emoji Context Rules",value:f.style.emojiUsage.contextRules,onChange:C=>R({emojiUsage:{...f.style.emojiUsage,contextRules:C}}),rows:2,placeholder:"e.g. 🔒 for concerns, ✅ for resolved issues"}),n.jsx(m0,{label:"Quick Reactions",items:f.style.quickReactions,onChange:C=>R({quickReactions:C})})]}),r==="Calibration"&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{label:"Good Examples (what I sound like)",tags:f.style.goodExamples,onChange:C=>R({goodExamples:C}),placeholder:"Add a good example message..."}),n.jsx(Bt,{label:"Rhetorical Moves",tags:f.style.rhetoricalMoves,onChange:C=>R({rhetoricalMoves:C}),placeholder:"Add a rhetorical pattern..."}),n.jsx(Bt,{label:"Additional Instructions",tags:f.skill.additionalInstructions,onChange:C=>G({additionalInstructions:C}),placeholder:"Add an instruction..."}),n.jsx(h0,{label:"Anti-Patterns (Never Sound Like This)",items:f.style.antiPatterns,onChange:C=>R({antiPatterns:C}),examplePlaceholder:"What should be avoided...",whyPlaceholder:"Why this is off-voice..."}),n.jsx(h0,{label:"Bad Examples",items:f.style.badExamples,onChange:C=>R({badExamples:C}),examplePlaceholder:"Bad output example...",whyPlaceholder:"Why it misses..."})]}),r==="Advanced"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-300",children:"Use Global Config"}),n.jsx("p",{className:"text-xs text-slate-500",children:"When on, this persona uses the global Night Watch AI model settings"})]}),n.jsx("button",{onClick:()=>h(C=>({...C,modelConfig:C.modelConfig?null:{provider:"anthropic",model:"claude-sonnet-4-6"}})),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${f.modelConfig?"bg-white/10":"bg-indigo-500"}`,children:n.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${f.modelConfig?"translate-x-1":"translate-x-6"}`})})]}),f.modelConfig&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:"Provider"}),n.jsxs("select",{value:f.modelConfig.provider,onChange:C=>q({provider:C.target.value}),className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 focus:outline-none focus:border-indigo-500/50",children:[n.jsx("option",{value:"anthropic",children:"Anthropic"}),n.jsx("option",{value:"openai",children:"OpenAI"}),n.jsx("option",{value:"custom",children:"Custom"})]})]}),n.jsx(Ia,{label:"Model",value:f.modelConfig.model,onChange:C=>q({model:C}),placeholder:"e.g. claude-sonnet-4-6"}),f.modelConfig.provider==="custom"&&n.jsx(Ia,{label:"Base URL",value:f.modelConfig.baseUrl??"",onChange:C=>q({baseUrl:C}),placeholder:"https://api.example.com/v1"}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:["Temperature:"," ",n.jsx("span",{className:"text-slate-300",children:f.modelConfig.temperature??.7})]}),n.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:f.modelConfig.temperature??.7,onChange:C=>q({temperature:parseFloat(C.target.value)}),className:"w-full accent-indigo-500"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-1",children:"Max Tokens (optional)"}),n.jsx("input",{type:"number",min:1,max:32768,value:f.modelConfig.maxTokens??"",onChange:C=>q({maxTokens:C.target.value?parseInt(C.target.value):void 0}),placeholder:"Default from provider",className:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-300 focus:outline-none focus:border-indigo-500/50"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-2",children:"Custom Env Vars"}),n.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"API keys injected at call time for this persona only. Values are masked after save."}),Object.entries(f.modelConfig.envVars??{}).map(([C,Q])=>n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("input",{value:C,readOnly:!0,className:"w-1/3 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300"}),n.jsx("input",{value:Q==="***"?"":Q,placeholder:Q==="***"?"(masked)":"value",onChange:Z=>{var P;return q({envVars:{...((P=f.modelConfig)==null?void 0:P.envVars)??{},[C]:Z.target.value}})},type:"password",className:"flex-1 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300"}),n.jsx("button",{onClick:()=>{var de;const{[C]:Z,...P}=((de=f.modelConfig)==null?void 0:de.envVars)??{};q({envVars:P})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},C)),n.jsx("button",{onClick:()=>{var Q;const C=prompt("Environment variable name (e.g., ANTHROPIC_API_KEY):");C!=null&&C.trim()&&q({envVars:{...((Q=f.modelConfig)==null?void 0:Q.envVars)??{},[C.trim()]:""}})},className:"text-xs text-indigo-400 hover:text-indigo-300 mt-1",children:"+ Add Env Var"})]})]}),n.jsx(m0,{label:"Operating Modes",items:f.skill.modes,onChange:C=>G({modes:C})}),n.jsx(es,{label:"Interpolation Rules",value:f.skill.interpolationRules,onChange:C=>G({interpolationRules:C}),rows:3,placeholder:"How this persona should reason when explicit opinions are missing..."}),n.jsx(es,{label:"System Prompt Override (leave empty to compile from soul)",value:f.systemPromptOverride,onChange:C=>h(Q=>({...Q,systemPromptOverride:C})),rows:6,placeholder:"Optionally paste a raw system prompt here to bypass soul compilation..."}),c&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-slate-400",children:"Compiled System Prompt Preview"}),n.jsxs("button",{onClick:J,disabled:z,className:"flex items-center gap-1.5 text-xs text-indigo-400 hover:text-indigo-300 disabled:opacity-50",children:[n.jsx(zi,{className:"h-3.5 w-3.5"}),z?"Loading...":"Preview"]})]}),w&&n.jsx("pre",{className:"bg-[#060d17] border border-white/10 rounded-lg p-4 text-xs text-slate-400 whitespace-pre-wrap font-mono max-h-60 overflow-y-auto",children:w})]})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-white/10",children:[p&&n.jsx("p",{className:"text-sm text-red-400",children:p}),!p&&n.jsx("span",{}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx("button",{onClick:o,className:"px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5 transition-colors",children:"Cancel"}),n.jsx("button",{onClick:L,disabled:v,className:"px-5 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white transition-colors disabled:opacity-50",children:v?"Saving...":c?"Save Changes":"Hire Agent"})]})]})]})]})},Uy=({persona:c,onConfirm:o,onCancel:d})=>{const[r,m]=y.useState(!1),f=async()=>{m(!0),await o(),m(!1)};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:d}),n.jsxs("div",{className:"relative bg-[#0d1117] border border-white/10 rounded-2xl shadow-2xl w-full max-w-sm p-6",children:[n.jsxs("h3",{className:"text-base font-semibold text-slate-100 mb-2",children:["Delete ",c.name,"?"]}),n.jsxs("p",{className:"text-sm text-slate-400 mb-6",children:["This will permanently remove ",c.name,"'s soul from the team. This action cannot be undone."]}),n.jsxs("div",{className:"flex justify-end gap-3",children:[n.jsx("button",{onClick:d,className:"px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5",children:"Cancel"}),n.jsx("button",{onClick:f,disabled:r,className:"px-4 py-2 rounded-lg text-sm font-medium bg-red-600 hover:bg-red-500 text-white disabled:opacity-50",children:r?"Deleting...":"Delete"})]})]})]})},Hy=()=>{const{selectedProjectId:c,globalModeLoading:o}=rt(),{data:d,loading:r,error:m,refetch:f}=ct(()=>vy(),[c],{enabled:!o}),[h,v]=y.useState(void 0),[g,p]=y.useState(null),[j,w]=y.useState(!1),[D,z]=y.useState(null),U=y.useCallback(async(J,B)=>{J?await f0(J,B):await yy(B),f()},[f]),A=y.useCallback(async J=>{await jy(J.id),p(null),f()},[f]),R=y.useCallback(async J=>{await f0(J.id,{isActive:!J.isActive}),f()},[f]),G=async()=>{w(!0),z(null);try{await Ny(),f()}catch(J){z(J.message)}finally{w(!1)}},q=(d==null?void 0:d.filter(J=>J.isActive).length)??0,L=(d==null?void 0:d.length)??0;return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[n.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/10 border border-indigo-500/20",children:n.jsx(pu,{className:"h-5 w-5 text-indigo-400"})}),n.jsx("h1",{className:"text-xl font-semibold text-slate-100",children:"Team"})]}),n.jsxs("p",{className:"text-sm text-slate-500 ml-11",children:[L," agent",L!==1?"s":""," ·"," ",q," active"]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("button",{onClick:G,disabled:j,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5 border border-white/10 transition-colors disabled:opacity-50",children:[n.jsx(Di,{className:`h-4 w-4 ${j?"animate-spin":""}`}),"Restore Defaults"]}),n.jsxs("button",{onClick:()=>v(null),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white transition-colors",children:[n.jsx(gl,{className:"h-4 w-4"}),"Hire Agent"]})]})]}),D&&n.jsx("div",{className:"p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-sm text-red-400",children:D}),r&&n.jsx("div",{className:"flex items-center justify-center py-20",children:n.jsx("div",{className:"h-8 w-8 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin"})}),m&&n.jsxs("div",{className:"p-4 rounded-xl bg-red-500/10 border border-red-500/20 text-sm text-red-400",children:["Failed to load agents: ",m.message]}),!r&&!m&&d&&d.length===0&&n.jsxs("div",{className:"text-center py-20",children:[n.jsx(pu,{className:"h-12 w-12 text-slate-700 mx-auto mb-4"}),n.jsx("p",{className:"text-slate-500 mb-2",children:"No agents yet"}),n.jsx("p",{className:"text-sm text-slate-600 mb-6",children:"Hire your first agent or restore the defaults to meet the team."}),n.jsxs("div",{className:"flex justify-center gap-3",children:[n.jsxs("button",{onClick:G,className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 border border-white/10 hover:bg-white/5 transition-colors",children:[n.jsx(Di,{className:"h-4 w-4"}),"Restore Defaults"]}),n.jsxs("button",{onClick:()=>v(null),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white",children:[n.jsx(gl,{className:"h-4 w-4"}),"Hire Agent"]})]})]}),!r&&!m&&d&&d.length>0&&n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[d.map(J=>n.jsx(_y,{persona:J,onEdit:v,onDelete:p,onToggleActive:R},J.id)),n.jsxs("button",{onClick:()=>v(null),className:"rounded-xl border border-dashed border-white/10 p-5 flex flex-col items-center justify-center gap-3 text-slate-600 hover:text-slate-400 hover:border-white/20 hover:bg-white/5 transition-all duration-200 min-h-[200px]",children:[n.jsx(gl,{className:"h-8 w-8"}),n.jsx("span",{className:"text-sm font-medium",children:"Hire Agent"})]})]}),!r&&!m&&d&&d.length>0&&n.jsx("div",{className:"mt-2",children:n.jsxs("details",{className:"group",children:[n.jsxs("summary",{className:"flex items-center gap-2 text-xs text-slate-600 cursor-pointer hover:text-slate-400 select-none",children:[n.jsx(_i,{className:"h-3.5 w-3.5 group-open:rotate-90 transition-transform"}),"View soul documents"]}),n.jsx("div",{className:"mt-4 space-y-3",children:d.map(J=>n.jsxs("div",{className:"rounded-xl border border-white/5 bg-[#0d1117]/60 p-4",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(ku,{persona:J,size:"sm"}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-slate-200",children:J.name}),n.jsx("span",{className:"text-xs text-slate-500 ml-2",children:J.role})]})]}),J.soul.whoIAm&&n.jsx("p",{className:"text-xs text-slate-500 leading-relaxed mb-2",children:J.soul.whoIAm}),J.soul.worldview.length>0&&n.jsx("ul",{className:"space-y-1",children:J.soul.worldview.slice(0,3).map((B,C)=>n.jsx("li",{className:"text-xs text-slate-600 pl-3 border-l border-white/5",children:B},C))})]},J.id))})]})}),h!==void 0&&n.jsx(ky,{persona:h,onClose:()=>v(void 0),onSave:U}),g&&n.jsx(Uy,{persona:g,onConfirm:()=>A(g),onCancel:()=>p(null)})]})},be=({children:c,className:o="",onClick:d})=>n.jsxs("div",{className:`
404
+ ${c.isActive?"bg-[#0d1117] border-white/10 hover:border-white/20":"bg-[#0d1117]/60 border-white/5 opacity-60"}`,children:[n.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx(ku,{persona:c}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-sm font-semibold text-slate-100",children:c.name}),n.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[n.jsx(Ry,{role:c.role}),n.jsx("span",{className:"text-xs text-slate-400",children:c.role})]})]})]}),n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("button",{onClick:h=>{h.stopPropagation(),r(c)},title:c.isActive?"Deactivate":"Activate",className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors focus:outline-none ${c.isActive?"bg-indigo-600":"bg-slate-700"}`,children:n.jsx("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-white shadow transition-transform ${c.isActive?"translate-x-4":"translate-x-0.5"}`})}),n.jsx("button",{onClick:h=>{h.stopPropagation(),o(c)},className:"p-1.5 rounded-lg text-slate-500 hover:text-slate-200 hover:bg-white/5 transition-colors",title:"Edit",children:n.jsx(_u,{className:"h-3.5 w-3.5"})}),n.jsx("button",{onClick:h=>{h.stopPropagation(),d(c)},className:"p-1.5 rounded-lg text-slate-500 hover:text-red-400 hover:bg-red-500/10 transition-colors",title:"Delete",children:n.jsx(zu,{className:"h-3.5 w-3.5"})})]})]}),f&&n.jsxs("p",{className:"text-xs text-slate-500 italic leading-relaxed line-clamp-2",children:["“",f,"”"]}),m.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1.5",children:m.map(h=>n.jsx("span",{className:"px-2 py-0.5 rounded-md text-[10px] font-medium bg-indigo-500/10 text-indigo-300 border border-indigo-500/20",children:h},h))}),c.modelConfig&&n.jsxs("div",{className:"text-[10px] text-slate-600 font-mono",children:[c.modelConfig.provider,"/",c.modelConfig.model]})]})},My=({tabs:c,active:o,onChange:d})=>n.jsx("div",{className:"flex border-b border-white/10 mb-6",children:c.map(r=>n.jsx("button",{onClick:()=>d(r),className:`px-4 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px ${o===r?"text-indigo-300 border-indigo-500":"text-slate-500 border-transparent hover:text-slate-300"}`,children:r},r))}),Bt=({label:c,tags:o,onChange:d,placeholder:r})=>{const[m,f]=y.useState(""),h=()=>{const v=m.trim();!v||o.includes(v)||(d([...o,v]),f(""))};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:o.map(v=>n.jsxs("span",{className:"flex items-center gap-1 px-2 py-0.5 rounded-md text-xs bg-slate-800 text-slate-300 border border-white/10",children:[v,n.jsx("button",{onClick:()=>d(o.filter(g=>g!==v)),className:"text-slate-500 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},v))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:m,onChange:v=>f(v.target.value),onKeyDown:v=>v.key==="Enter"&&(v.preventDefault(),h()),placeholder:r??"Add item...",className:"flex-1 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:h,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},m0=({label:c,items:o,onChange:d})=>{const[r,m]=y.useState(""),[f,h]=y.useState(""),v=()=>{r.trim()&&(d({...o,[r.trim()]:f.trim()}),m(""),h(""))};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"space-y-1.5 mb-2",children:Object.entries(o).map(([g,p])=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-xs font-mono text-indigo-400 w-32 truncate",children:g}),n.jsx("span",{className:"text-xs text-slate-400 flex-1 truncate",children:p}),n.jsx("button",{onClick:()=>{const j={...o};delete j[g],d(j)},className:"text-slate-600 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},g))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{value:r,onChange:g=>m(g.target.value),placeholder:"key",className:"w-32 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("input",{value:f,onChange:g=>h(g.target.value),onKeyDown:g=>g.key==="Enter"&&(g.preventDefault(),v()),placeholder:"value",className:"flex-1 bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:v,className:"px-3 py-2 rounded-lg bg-white/5 text-slate-400 hover:text-slate-200 text-sm",children:"Add"})]})]})},h0=({label:c,items:o,onChange:d,examplePlaceholder:r,whyPlaceholder:m})=>{const f=(h,v)=>{const g=[...o];g[h]={...g[h],...v},d(g)};return n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400",children:c}),n.jsx("button",{onClick:()=>d([...o,{example:"",why:""}]),className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add"})]}),n.jsx("div",{className:"space-y-2",children:o.map((h,v)=>n.jsxs("div",{className:"rounded-lg border border-white/10 bg-[#111827] p-2 space-y-2",children:[n.jsx("input",{value:h.example,onChange:g=>f(v,{example:g.target.value}),placeholder:r??"Example...",className:"w-full bg-black/20 border border-white/10 rounded-md px-2 py-1.5 text-xs text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:h.why,onChange:g=>f(v,{why:g.target.value}),placeholder:m??"Why this misses the voice...",className:"flex-1 bg-black/20 border border-white/10 rounded-md px-2 py-1.5 text-xs text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"}),n.jsx("button",{onClick:()=>d(o.filter((g,p)=>p!==v)),className:"text-slate-500 hover:text-red-400 px-1",title:"Remove",children:n.jsx(Ft,{className:"h-3.5 w-3.5"})})]})]},v))})]})},es=({label:c,value:o,onChange:d,rows:r=3,placeholder:m})=>n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("textarea",{value:o,onChange:f=>d(f.target.value),rows:r,placeholder:m,className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 resize-none"})]}),Ia=({label:c,value:o,onChange:d,placeholder:r,type:m="text"})=>n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:c}),n.jsx("input",{type:m,value:o,onChange:f=>d(f.target.value),placeholder:r,className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 placeholder-slate-600 focus:outline-none focus:border-indigo-500/50"})]});function zy(){return{name:"",role:"",avatarUrl:"",soul:{whoIAm:"",worldview:[],opinions:{},expertise:[],interests:[],tensions:[],boundaries:[],petPeeves:[]},style:{voicePrinciples:"",sentenceStructure:"",tone:"",wordsUsed:[],wordsAvoided:[],emojiUsage:{frequency:"moderate",favorites:[],contextRules:""},quickReactions:{},rhetoricalMoves:[],antiPatterns:[],goodExamples:[],badExamples:[]},skill:{modes:{},interpolationRules:"",additionalInstructions:[]},modelConfig:{provider:"anthropic",model:"claude-sonnet-4-6"},systemPromptOverride:""}}function Dy(c){return{name:c.name,role:c.role,avatarUrl:c.avatarUrl??"",soul:{...c.soul},style:{...c.style},skill:{...c.skill},modelConfig:c.modelConfig??{provider:"anthropic",model:"claude-sonnet-4-6"},systemPromptOverride:c.systemPromptOverride??""}}const Oy=["Identity","Soul","Style","Calibration","Advanced"],ky=({persona:c,onClose:o,onSave:d})=>{var B;const[r,m]=y.useState("Identity"),[f,h]=y.useState(c?Dy(c):zy()),[v,g]=y.useState(!1),[p,j]=y.useState(null),[w,D]=y.useState(null),[z,U]=y.useState(!1),A=C=>h(V=>({...V,soul:{...V.soul,...C}})),T=C=>h(V=>({...V,style:{...V.style,...C}})),Q=C=>h(V=>({...V,skill:{...V.skill,...C}})),q=C=>h(V=>({...V,modelConfig:V.modelConfig?{...V.modelConfig,...C}:{provider:"anthropic",model:"claude-sonnet-4-6",...C}})),L=async()=>{if(!f.name.trim()||!f.role.trim()){j("Name and role are required.");return}g(!0),j(null);const C=f.modelConfig===null?null:f.modelConfig.model?f.modelConfig:void 0,V={name:f.name.trim(),role:f.role.trim(),avatarUrl:f.avatarUrl.trim()||void 0,soul:f.soul,style:f.style,skill:f.skill,modelConfig:C,systemPromptOverride:f.systemPromptOverride.trim()||void 0};try{await d((c==null?void 0:c.id)??null,V),o()}catch(Z){j(Z.message)}finally{g(!1)}},J=async()=>{if(c){U(!0);try{const C=await by(c.id);D(C.prompt)}catch(C){D(`Error: ${C.message}`)}finally{U(!1)}}};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0d1117] border border-white/10 rounded-2xl shadow-2xl w-full max-w-3xl max-h-[90vh] flex flex-col",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/10",children:[n.jsxs("div",{className:"flex items-center gap-3",children:[c&&n.jsx(ku,{persona:c}),n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-slate-100",children:c?`Edit ${c.name}`:"Hire Agent"}),n.jsx("p",{className:"text-xs text-slate-500",children:"Define their soul, style, and skills"})]})]}),n.jsx("button",{onClick:o,className:"p-2 rounded-lg text-slate-500 hover:text-slate-200 hover:bg-white/5",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"px-6 pt-4",children:n.jsx(My,{tabs:Oy,active:r,onChange:m})}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 pb-6 space-y-5",children:[r==="Identity"&&n.jsxs(n.Fragment,{children:[n.jsx(Ia,{label:"Name",value:f.name,onChange:C=>h(V=>({...V,name:C})),placeholder:"e.g. Maya"}),n.jsx(Ia,{label:"Role",value:f.role,onChange:C=>h(V=>({...V,role:C})),placeholder:"e.g. Security Reviewer"}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-2",children:"Avatar"}),n.jsxs("div",{className:"flex items-center gap-4",children:[n.jsx("div",{className:"h-16 w-16 rounded-full bg-indigo-600/20 border border-indigo-500/30 flex items-center justify-center overflow-hidden flex-shrink-0",children:f.avatarUrl?n.jsx("img",{src:f.avatarUrl,alt:"avatar",className:"h-full w-full object-cover"}):n.jsx("span",{className:"text-xl font-bold text-indigo-400",children:(B=(f.name||"?")[0])==null?void 0:B.toUpperCase()})}),n.jsxs("div",{className:"flex-1",children:[n.jsxs("label",{className:"cursor-pointer inline-flex items-center gap-2 px-3 py-2 rounded-lg border border-white/10 bg-white/5 text-xs text-slate-300 hover:bg-white/10 transition-colors",children:[n.jsx("span",{children:"Upload image"}),n.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:C=>{var P;const V=(P=C.target.files)==null?void 0:P[0];if(!V)return;const Z=new FileReader;Z.onload=oe=>{var $;const ge=($=oe.target)==null?void 0:$.result;h(ie=>({...ie,avatarUrl:ge}))},Z.readAsDataURL(V)}})]}),f.avatarUrl&&n.jsx("button",{onClick:()=>h(C=>({...C,avatarUrl:""})),className:"ml-2 text-xs text-slate-500 hover:text-red-400",children:"Remove"})]})]})]}),n.jsx(es,{label:"Who I Am",value:f.soul.whoIAm,onChange:C=>A({whoIAm:C}),rows:4,placeholder:"A concise self-description in first person..."}),n.jsx(Bt,{label:"Expertise",tags:f.soul.expertise,onChange:C=>A({expertise:C}),placeholder:"e.g. security, cryptography..."}),n.jsx(Bt,{label:"Interests",tags:f.soul.interests,onChange:C=>A({interests:C}),placeholder:"e.g. OWASP, threat modeling..."})]}),r==="Soul"&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{label:"Worldview (beliefs)",tags:f.soul.worldview,onChange:C=>A({worldview:C}),placeholder:"Add a core belief..."}),n.jsx(Bt,{label:"Tensions (internal conflicts)",tags:f.soul.tensions,onChange:C=>A({tensions:C}),placeholder:"Add a tension..."}),n.jsx(Bt,{label:"Boundaries (won't do)",tags:f.soul.boundaries,onChange:C=>A({boundaries:C}),placeholder:"Add a boundary..."}),n.jsx(Bt,{label:"Pet Peeves",tags:f.soul.petPeeves,onChange:C=>A({petPeeves:C}),placeholder:"Add a pet peeve..."}),n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wider",children:"Opinions"}),n.jsx("button",{onClick:()=>{const C=prompt("Domain name (e.g., security, architecture):");C!=null&&C.trim()&&A({opinions:{...f.soul.opinions??{},[C.trim()]:[]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add Domain"})]}),Object.entries(f.soul.opinions??{}).map(([C,V])=>n.jsxs("div",{className:"mb-3 p-3 bg-white/5 rounded-lg border border-white/10",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("span",{className:"text-sm font-medium text-slate-300",children:C}),n.jsx("button",{onClick:()=>{const{[C]:Z,...P}=f.soul.opinions??{};A({opinions:P})},className:"text-xs text-red-400 hover:text-red-300",children:"Remove domain"})]}),n.jsx("div",{className:"space-y-1 mb-2",children:V.map((Z,P)=>n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{value:Z,onChange:oe=>{const ge=[...V];ge[P]=oe.target.value,A({opinions:{...f.soul.opinions??{},[C]:ge}})},className:"flex-1 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300 focus:outline-none focus:border-indigo-500/50",placeholder:"Add a take..."}),n.jsx("button",{onClick:()=>{const oe=V.filter((ge,$)=>$!==P);A({opinions:{...f.soul.opinions??{},[C]:oe}})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},P))}),n.jsx("button",{onClick:()=>{A({opinions:{...f.soul.opinions??{},[C]:[...V,""]}})},className:"text-xs text-indigo-400 hover:text-indigo-300",children:"+ Add take"})]},C))]})]}),r==="Style"&&n.jsxs(n.Fragment,{children:[n.jsx(es,{label:"Voice Principles",value:f.style.voicePrinciples,onChange:C=>T({voicePrinciples:C}),placeholder:"Describe the voice in 1-2 sentences..."}),n.jsx(Ia,{label:"Tone",value:f.style.tone,onChange:C=>T({tone:C}),placeholder:"e.g. Vigilant but not paranoid. Matter-of-fact."}),n.jsx(Ia,{label:"Sentence Structure",value:f.style.sentenceStructure,onChange:C=>T({sentenceStructure:C}),placeholder:"e.g. Short and punchy. One risk, one fix per message."}),n.jsx(Bt,{label:"Words I Use",tags:f.style.wordsUsed,onChange:C=>T({wordsUsed:C}),placeholder:"Add a word or phrase..."}),n.jsx(Bt,{label:"Words I Never Use",tags:f.style.wordsAvoided,onChange:C=>T({wordsAvoided:C}),placeholder:"Add a word to avoid..."}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:"Emoji Frequency"}),n.jsxs("select",{value:f.style.emojiUsage.frequency,onChange:C=>T({emojiUsage:{...f.style.emojiUsage,frequency:C.target.value}}),className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 focus:outline-none focus:border-indigo-500/50",children:[n.jsx("option",{value:"never",children:"Never"}),n.jsx("option",{value:"rare",children:"Rare"}),n.jsx("option",{value:"moderate",children:"Moderate"}),n.jsx("option",{value:"heavy",children:"Heavy"})]})]}),n.jsx(Bt,{label:"Favorite Emojis",tags:f.style.emojiUsage.favorites,onChange:C=>T({emojiUsage:{...f.style.emojiUsage,favorites:C}}),placeholder:"Add an emoji..."}),n.jsx(es,{label:"Emoji Context Rules",value:f.style.emojiUsage.contextRules,onChange:C=>T({emojiUsage:{...f.style.emojiUsage,contextRules:C}}),rows:2,placeholder:"e.g. 🔒 for concerns, ✅ for resolved issues"}),n.jsx(m0,{label:"Quick Reactions",items:f.style.quickReactions,onChange:C=>T({quickReactions:C})})]}),r==="Calibration"&&n.jsxs(n.Fragment,{children:[n.jsx(Bt,{label:"Good Examples (what I sound like)",tags:f.style.goodExamples,onChange:C=>T({goodExamples:C}),placeholder:"Add a good example message..."}),n.jsx(Bt,{label:"Rhetorical Moves",tags:f.style.rhetoricalMoves,onChange:C=>T({rhetoricalMoves:C}),placeholder:"Add a rhetorical pattern..."}),n.jsx(Bt,{label:"Additional Instructions",tags:f.skill.additionalInstructions,onChange:C=>Q({additionalInstructions:C}),placeholder:"Add an instruction..."}),n.jsx(h0,{label:"Anti-Patterns (Never Sound Like This)",items:f.style.antiPatterns,onChange:C=>T({antiPatterns:C}),examplePlaceholder:"What should be avoided...",whyPlaceholder:"Why this is off-voice..."}),n.jsx(h0,{label:"Bad Examples",items:f.style.badExamples,onChange:C=>T({badExamples:C}),examplePlaceholder:"Bad output example...",whyPlaceholder:"Why it misses..."})]}),r==="Advanced"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-300",children:"Use Global Config"}),n.jsx("p",{className:"text-xs text-slate-500",children:"When on, this persona uses the global Night Watch AI model settings"})]}),n.jsx("button",{onClick:()=>h(C=>({...C,modelConfig:C.modelConfig?null:{provider:"anthropic",model:"claude-sonnet-4-6"}})),className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${f.modelConfig?"bg-white/10":"bg-indigo-500"}`,children:n.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${f.modelConfig?"translate-x-1":"translate-x-6"}`})})]}),f.modelConfig&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:"Provider"}),n.jsxs("select",{value:f.modelConfig.provider,onChange:C=>q({provider:C.target.value}),className:"w-full bg-[#111827] border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-200 focus:outline-none focus:border-indigo-500/50",children:[n.jsx("option",{value:"anthropic",children:"Anthropic"}),n.jsx("option",{value:"openai",children:"OpenAI"}),n.jsx("option",{value:"custom",children:"Custom"})]})]}),n.jsx(Ia,{label:"Model",value:f.modelConfig.model,onChange:C=>q({model:C}),placeholder:"e.g. claude-sonnet-4-6"}),f.modelConfig.provider==="custom"&&n.jsx(Ia,{label:"Base URL",value:f.modelConfig.baseUrl??"",onChange:C=>q({baseUrl:C}),placeholder:"https://api.example.com/v1"}),n.jsxs("div",{children:[n.jsxs("label",{className:"block text-xs font-medium text-slate-400 mb-2",children:["Temperature:"," ",n.jsx("span",{className:"text-slate-300",children:f.modelConfig.temperature??.7})]}),n.jsx("input",{type:"range",min:"0",max:"1",step:"0.05",value:f.modelConfig.temperature??.7,onChange:C=>q({temperature:parseFloat(C.target.value)}),className:"w-full accent-indigo-500"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-1",children:"Max Tokens (optional)"}),n.jsx("input",{type:"number",min:1,max:32768,value:f.modelConfig.maxTokens??"",onChange:C=>q({maxTokens:C.target.value?parseInt(C.target.value):void 0}),placeholder:"Default from provider",className:"w-full bg-white/5 border border-white/10 rounded-lg px-3 py-2 text-sm text-slate-300 focus:outline-none focus:border-indigo-500/50"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-xs font-medium text-slate-400 uppercase tracking-wider mb-2",children:"Custom Env Vars"}),n.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"API keys injected at call time for this persona only. Values are masked after save."}),Object.entries(f.modelConfig.envVars??{}).map(([C,V])=>n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("input",{value:C,readOnly:!0,className:"w-1/3 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300"}),n.jsx("input",{value:V==="***"?"":V,placeholder:V==="***"?"(masked)":"value",onChange:Z=>{var P;return q({envVars:{...((P=f.modelConfig)==null?void 0:P.envVars)??{},[C]:Z.target.value}})},type:"password",className:"flex-1 bg-white/5 border border-white/10 rounded px-2 py-1 text-xs text-slate-300"}),n.jsx("button",{onClick:()=>{var oe;const{[C]:Z,...P}=((oe=f.modelConfig)==null?void 0:oe.envVars)??{};q({envVars:P})},className:"text-slate-500 hover:text-red-400 text-xs",children:"×"})]},C)),n.jsx("button",{onClick:()=>{var V;const C=prompt("Environment variable name (e.g., ANTHROPIC_API_KEY):");C!=null&&C.trim()&&q({envVars:{...((V=f.modelConfig)==null?void 0:V.envVars)??{},[C.trim()]:""}})},className:"text-xs text-indigo-400 hover:text-indigo-300 mt-1",children:"+ Add Env Var"})]})]}),n.jsx(m0,{label:"Operating Modes",items:f.skill.modes,onChange:C=>Q({modes:C})}),n.jsx(es,{label:"Interpolation Rules",value:f.skill.interpolationRules,onChange:C=>Q({interpolationRules:C}),rows:3,placeholder:"How this persona should reason when explicit opinions are missing..."}),n.jsx(es,{label:"System Prompt Override (leave empty to compile from soul)",value:f.systemPromptOverride,onChange:C=>h(V=>({...V,systemPromptOverride:C})),rows:6,placeholder:"Optionally paste a raw system prompt here to bypass soul compilation..."}),c&&n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("label",{className:"text-xs font-medium text-slate-400",children:"Compiled System Prompt Preview"}),n.jsxs("button",{onClick:J,disabled:z,className:"flex items-center gap-1.5 text-xs text-indigo-400 hover:text-indigo-300 disabled:opacity-50",children:[n.jsx(zi,{className:"h-3.5 w-3.5"}),z?"Loading...":"Preview"]})]}),w&&n.jsx("pre",{className:"bg-[#060d17] border border-white/10 rounded-lg p-4 text-xs text-slate-400 whitespace-pre-wrap font-mono max-h-60 overflow-y-auto",children:w})]})]})]}),n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-white/10",children:[p&&n.jsx("p",{className:"text-sm text-red-400",children:p}),!p&&n.jsx("span",{}),n.jsxs("div",{className:"flex gap-3",children:[n.jsx("button",{onClick:o,className:"px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5 transition-colors",children:"Cancel"}),n.jsx("button",{onClick:L,disabled:v,className:"px-5 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white transition-colors disabled:opacity-50",children:v?"Saving...":c?"Save Changes":"Hire Agent"})]})]})]})]})},Uy=({persona:c,onConfirm:o,onCancel:d})=>{const[r,m]=y.useState(!1),f=async()=>{m(!0),await o(),m(!1)};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:d}),n.jsxs("div",{className:"relative bg-[#0d1117] border border-white/10 rounded-2xl shadow-2xl w-full max-w-sm p-6",children:[n.jsxs("h3",{className:"text-base font-semibold text-slate-100 mb-2",children:["Delete ",c.name,"?"]}),n.jsxs("p",{className:"text-sm text-slate-400 mb-6",children:["This will permanently remove ",c.name,"'s soul from the team. This action cannot be undone."]}),n.jsxs("div",{className:"flex justify-end gap-3",children:[n.jsx("button",{onClick:d,className:"px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5",children:"Cancel"}),n.jsx("button",{onClick:f,disabled:r,className:"px-4 py-2 rounded-lg text-sm font-medium bg-red-600 hover:bg-red-500 text-white disabled:opacity-50",children:r?"Deleting...":"Delete"})]})]})]})},Hy=()=>{const{selectedProjectId:c,globalModeLoading:o}=rt(),{data:d,loading:r,error:m,refetch:f}=ct(()=>vy(),[c],{enabled:!o}),[h,v]=y.useState(void 0),[g,p]=y.useState(null),[j,w]=y.useState(!1),[D,z]=y.useState(null),U=y.useCallback(async(J,B)=>{J?await f0(J,B):await yy(B),f()},[f]),A=y.useCallback(async J=>{await jy(J.id),p(null),f()},[f]),T=y.useCallback(async J=>{await f0(J.id,{isActive:!J.isActive}),f()},[f]),Q=async()=>{w(!0),z(null);try{await Ny(),f()}catch(J){z(J.message)}finally{w(!1)}},q=(d==null?void 0:d.filter(J=>J.isActive).length)??0,L=(d==null?void 0:d.length)??0;return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{children:[n.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[n.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/10 border border-indigo-500/20",children:n.jsx(gu,{className:"h-5 w-5 text-indigo-400"})}),n.jsx("h1",{className:"text-xl font-semibold text-slate-100",children:"Team"})]}),n.jsxs("p",{className:"text-sm text-slate-500 ml-11",children:[L," agent",L!==1?"s":""," ·"," ",q," active"]})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("button",{onClick:Q,disabled:j,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 hover:bg-white/5 border border-white/10 transition-colors disabled:opacity-50",children:[n.jsx(Di,{className:`h-4 w-4 ${j?"animate-spin":""}`}),"Restore Defaults"]}),n.jsxs("button",{onClick:()=>v(null),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white transition-colors",children:[n.jsx(gl,{className:"h-4 w-4"}),"Hire Agent"]})]})]}),D&&n.jsx("div",{className:"p-3 rounded-lg bg-red-500/10 border border-red-500/20 text-sm text-red-400",children:D}),r&&n.jsx("div",{className:"flex items-center justify-center py-20",children:n.jsx("div",{className:"h-8 w-8 border-2 border-indigo-500 border-t-transparent rounded-full animate-spin"})}),m&&n.jsxs("div",{className:"p-4 rounded-xl bg-red-500/10 border border-red-500/20 text-sm text-red-400",children:["Failed to load agents: ",m.message]}),!r&&!m&&d&&d.length===0&&n.jsxs("div",{className:"text-center py-20",children:[n.jsx(gu,{className:"h-12 w-12 text-slate-700 mx-auto mb-4"}),n.jsx("p",{className:"text-slate-500 mb-2",children:"No agents yet"}),n.jsx("p",{className:"text-sm text-slate-600 mb-6",children:"Hire your first agent or restore the defaults to meet the team."}),n.jsxs("div",{className:"flex justify-center gap-3",children:[n.jsxs("button",{onClick:Q,className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm text-slate-400 hover:text-slate-200 border border-white/10 hover:bg-white/5 transition-colors",children:[n.jsx(Di,{className:"h-4 w-4"}),"Restore Defaults"]}),n.jsxs("button",{onClick:()=>v(null),className:"flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium bg-indigo-600 hover:bg-indigo-500 text-white",children:[n.jsx(gl,{className:"h-4 w-4"}),"Hire Agent"]})]})]}),!r&&!m&&d&&d.length>0&&n.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[d.map(J=>n.jsx(_y,{persona:J,onEdit:v,onDelete:p,onToggleActive:T},J.id)),n.jsxs("button",{onClick:()=>v(null),className:"rounded-xl border border-dashed border-white/10 p-5 flex flex-col items-center justify-center gap-3 text-slate-600 hover:text-slate-400 hover:border-white/20 hover:bg-white/5 transition-all duration-200 min-h-[200px]",children:[n.jsx(gl,{className:"h-8 w-8"}),n.jsx("span",{className:"text-sm font-medium",children:"Hire Agent"})]})]}),!r&&!m&&d&&d.length>0&&n.jsx("div",{className:"mt-2",children:n.jsxs("details",{className:"group",children:[n.jsxs("summary",{className:"flex items-center gap-2 text-xs text-slate-600 cursor-pointer hover:text-slate-400 select-none",children:[n.jsx(_i,{className:"h-3.5 w-3.5 group-open:rotate-90 transition-transform"}),"View soul documents"]}),n.jsx("div",{className:"mt-4 space-y-3",children:d.map(J=>n.jsxs("div",{className:"rounded-xl border border-white/5 bg-[#0d1117]/60 p-4",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[n.jsx(ku,{persona:J,size:"sm"}),n.jsxs("div",{children:[n.jsx("span",{className:"text-sm font-medium text-slate-200",children:J.name}),n.jsx("span",{className:"text-xs text-slate-500 ml-2",children:J.role})]})]}),J.soul.whoIAm&&n.jsx("p",{className:"text-xs text-slate-500 leading-relaxed mb-2",children:J.soul.whoIAm}),J.soul.worldview.length>0&&n.jsx("ul",{className:"space-y-1",children:J.soul.worldview.slice(0,3).map((B,C)=>n.jsx("li",{className:"text-xs text-slate-600 pl-3 border-l border-white/5",children:B},C))})]},J.id))})]})}),h!==void 0&&n.jsx(ky,{persona:h,onClose:()=>v(void 0),onSave:U}),g&&n.jsx(Uy,{persona:g,onConfirm:()=>A(g),onCancel:()=>p(null)})]})},ye=({children:c,className:o="",onClick:d})=>n.jsxs("div",{className:`
405
405
  relative bg-[#0b101b] rounded-xl border border-white/5
406
406
  shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
407
407
  transition-all duration-300
408
408
  ${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
409
409
  ${o}
410
- `,onClick:d,children:[d&&n.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),n.jsx("div",{className:"relative z-10",children:c})]}),ue=({children:c,variant:o="primary",size:d="md",loading:r=!1,className:m="",disabled:f,...h})=>{const v="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",g={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return n.jsxs("button",{className:`${v} ${g[o]} ${p[d]} ${m}`,disabled:f||r,...h,children:[r&&n.jsx(G0,{className:"mr-2 h-4 w-4 animate-spin"}),c]})},ma=({children:c,variant:o="default",className:d=""})=>{const r={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${r[o]} ${d}`,children:c})},Uu={Draft:{dot:"bg-slate-500",badge:"neutral"},Ready:{dot:"bg-green-500",badge:"success"},"In Progress":{dot:"bg-blue-500",badge:"info"},Review:{dot:"bg-amber-500",badge:"warning"},Done:{dot:"bg-slate-600",badge:"neutral"}},By=({defaultColumn:c,onClose:o,onCreated:d})=>{const[r,m]=y.useState(""),[f,h]=y.useState(""),[v,g]=y.useState(c),[p,j]=y.useState(!1),[w,D]=y.useState(null),{addToast:z}=rt(),U=async A=>{if(A.preventDefault(),!!r.trim()){j(!0),D(null);try{await fy({title:r.trim(),body:f,column:v}),z({title:"Issue created",message:`"${r.trim()}" added to ${v}`,type:"success"}),d(),o()}catch(R){D(R instanceof Error?R.message:"Failed to create issue")}finally{j(!1)}}};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[n.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[n.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),n.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsxs("form",{onSubmit:U,className:"p-6 space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),n.jsx("input",{type:"text",value:r,onChange:A=>m(A.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),n.jsx("select",{value:v,onChange:A=>g(A.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Vl.map(A=>n.jsx("option",{value:A,children:A},A))})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),n.jsx("textarea",{value:f,onChange:A=>h(A.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),w&&n.jsx("p",{className:"text-sm text-red-400",children:w}),n.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[n.jsx(ue,{variant:"ghost",type:"button",onClick:o,children:"Cancel"}),n.jsx(ue,{type:"submit",disabled:p||!r.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},Ly=({issue:c,onClose:o,onMoved:d,onClosed:r})=>{const[m,f]=y.useState(!1),[h,v]=y.useState(!1),{addToast:g}=rt(),p=async D=>{if(D!==c.column){f(!0);try{await F0(c.number,D),g({title:"Issue moved",message:`#${c.number} moved to ${D}`,type:"success"}),d(),o()}catch(z){g({title:"Move failed",message:z instanceof Error?z.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},j=async()=>{if(confirm(`Close issue #${c.number}: "${c.title}"?`)){v(!0);try{await my(c.number),g({title:"Issue closed",message:`#${c.number} closed on GitHub`,type:"success"}),r(),o()}catch(D){g({title:"Close failed",message:D instanceof Error?D.message:"Failed to close issue",type:"error"})}finally{v(!1)}}},w=c.column??"Draft";return n.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[n.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[n.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[n.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[n.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",c.number]}),n.jsx(ma,{variant:Uu[w].badge,children:w})]}),n.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:c.title}),c.assignees.length>0&&n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",c.assignees.join(", ")]})]}),n.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Vl.filter(D=>D!==c.column).map(D=>n.jsx("button",{onClick:()=>p(D),disabled:m,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:D},D))]}),n.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[n.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[n.jsx(Tu,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"GitHub"})]}),n.jsx("button",{onClick:j,disabled:h,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:h?"Closing...":"Close Issue"})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.body?n.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:c.body}):n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},qy=({issue:c,onClick:o,onMoveRequest:d})=>{const[r,m]=y.useState(!1),f=c.column??"Draft";return n.jsxs("div",{className:"relative group",children:[n.jsx(be,{className:"p-3 cursor-pointer hover:border-indigo-500/30 transition-all active:scale-[0.99] select-none",onClick:o,children:n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",c.number]}),n.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:c.title}),c.assignees.length>0&&n.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:c.assignees.join(", ")})]}),n.jsx("button",{onClick:h=>{h.stopPropagation(),m(v=>!v)},className:"ml-2 p-1 rounded hover:bg-white/10 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",title:"Move issue",children:n.jsx(Y0,{className:"h-3.5 w-3.5"})})]})}),r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 z-30",onClick:()=>m(!1)}),n.jsx("div",{className:"absolute right-0 top-full mt-1 z-40 bg-[#0f172a] border border-white/10 rounded-xl shadow-2xl py-1 min-w-[140px]",children:Vl.filter(h=>h!==f).map(h=>n.jsxs("button",{onClick:()=>{d(c,h),m(!1)},className:"w-full text-left text-xs px-4 py-2 text-slate-300 hover:bg-white/5 hover:text-slate-100 transition-colors flex items-center space-x-2",children:[n.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${Uu[h].dot}`}),n.jsx("span",{children:h})]},h))})]})]})},Yy=({name:c,issues:o,onIssueClick:d,onNewIssue:r,onMoveIssue:m})=>{const f=Uu[c];return n.jsxs("div",{className:"flex flex-col min-w-[220px] max-w-[220px] h-full",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${f.dot}`}),n.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:c}),n.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:o.length})]}),n.jsx("button",{onClick:()=>r(c),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${c}`,children:n.jsx(gl,{className:"h-3.5 w-3.5"})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:o.length===0?n.jsx("div",{className:"border-2 border-dashed border-slate-800 rounded-xl h-24 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-slate-700",children:"No issues"})}):o.map(h=>n.jsx(qy,{issue:h,onClick:()=>d(h),onMoveRequest:m},h.id))})]})},Gy=()=>{const[c,o]=y.useState(null),[d,r]=y.useState(null),{addToast:m,selectedProjectId:f,globalModeLoading:h}=rt(),{data:v,loading:g,error:p,refetch:j}=ct(Ou,[f],{enabled:!h});y.useEffect(()=>{const z=setInterval(()=>j(),3e4);return()=>clearInterval(z)},[j]);const w=y.useCallback(async(z,U)=>{try{await F0(z.number,U),m({title:"Issue moved",message:`#${z.number} moved to ${U}`,type:"success"}),j()}catch(A){m({title:"Move failed",message:A instanceof Error?A.message:"Failed to move issue",type:"error"})}},[m,j]);if(h||g)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(p&&p.message.includes("Board not configured"))return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx("div",{className:"text-4xl",children:"📋"}),n.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),n.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",n.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(p)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),n.jsx("div",{className:"text-sm text-slate-500",children:p.message}),n.jsx(ue,{onClick:()=>j(),children:"Retry"})]});if(!v)return null;const D=v.columns;return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),n.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Vl.reduce((z,U)=>{var A;return z+(((A=D[U])==null?void 0:A.length)??0)},0)," issues across ",Vl.length," columns"]})]}),n.jsxs(ue,{onClick:()=>r("Ready"),children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),n.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",children:n.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Vl.length*236}px`},children:Vl.map(z=>n.jsx(Yy,{name:z,issues:D[z]??[],onIssueClick:o,onNewIssue:r,onMoveIssue:w},z))})}),c&&n.jsx(Ly,{issue:c,onClose:()=>o(null),onMoved:()=>j(),onClosed:()=>j()}),d&&n.jsx(By,{defaultColumn:d,onClose:()=>r(null),onCreated:()=>j()})]})},Qy={Draft:"text-slate-400 bg-slate-500/10 ring-slate-500/20",Ready:"text-green-400 bg-green-500/10 ring-green-500/20","In Progress":"text-blue-400 bg-blue-500/10 ring-blue-500/20",Review:"text-amber-400 bg-amber-500/10 ring-amber-500/20",Done:"text-slate-500 bg-slate-600/10 ring-slate-600/20"},Vy=()=>{var K,se,we;const c=Su(),[o,d]=y.useState(null),[r,m]=y.useState(!1),[f,h]=y.useState(null),{setProjectName:v,addToast:g,selectedProjectId:p,globalModeLoading:j}=rt(),{data:w,loading:D,error:z,refetch:U}=ct(K0,[p],{enabled:!j}),{data:A}=ct(J0,[p],{enabled:!j}),{data:R}=ct(()=>Ou().catch(()=>null),[p],{enabled:!j});P0(ae=>{h(ae)},[p,j],{enabled:!j});const G=f||w;if(Ye.useEffect(()=>{G!=null&&G.projectName&&v(G.projectName)},[G,v]),y.useEffect(()=>{const ae=setInterval(()=>{U()},3e4);return()=>clearInterval(ae)},[U]),y.useEffect(()=>{const ae=()=>U();return window.addEventListener("focus",ae),()=>window.removeEventListener("focus",ae)},[U]),j||D)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(z)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load dashboard data"}),n.jsx("div",{className:"text-sm text-slate-500",children:z.message}),n.jsx(ue,{onClick:()=>U(),children:"Retry"})]});if(!G)return null;const q=G.prds.filter(ae=>ae.status==="ready").length,L=G.prds.filter(ae=>ae.status==="in-progress"),J=G.prs.length,B=G.prs.filter(ae=>ae.reviewScore!==null&&ae.reviewScore<70).length,C=G.processes.find(ae=>ae.name==="executor"),Q=G.processes.find(ae=>ae.name==="reviewer"),Z=G.processes.find(ae=>ae.name==="qa"),P=async ae=>{d(ae);try{const k=await uy(ae),F=k.results.every($=>$.success);g({title:F?"Process Cancelled":"Cancel Failed",message:k.results.map($=>$.message).join("; "),type:F?"success":"error"})}catch(k){g({title:"Cancel Failed",message:k instanceof Error?k.message:"Failed to cancel process",type:"error"})}finally{d(null),U()}},de=async()=>{m(!0);try{await dy(),g({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),U()}catch(ae){g({title:"Clear Failed",message:ae instanceof Error?ae.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},xe=ae=>{if(!ae)return"Not scheduled";try{const k=new Date(ae),F=new Date,$=k.getTime()-F.getTime(),ie=Math.floor($/6e4);return ie<0?"Running now...":ie<60?`In ${ie} min`:ie<1440?`In ${Math.floor(ie/60)} hr${ie>=120?"s":""}`:`In ${Math.floor(ie/1440)} day${ie>=2880?"s":""}`}catch{return"Unknown"}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsxs(be,{className:"p-5",onClick:()=>c("/prds"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"PRDs Ready"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:q})]}),n.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:n.jsx(ns,{className:"h-5 w-5"})})]}),n.jsxs("p",{className:"text-xs text-slate-500 mt-4",children:["of ",G.prds.length," total"]})]}),n.jsxs(be,{className:"p-5",onClick:()=>c("/prds"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:L.length})]}),n.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:n.jsx(q0,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4 truncate",children:L.length===1?L[0].name:`${L.length} active`})]}),n.jsxs(be,{className:"p-5",onClick:()=>c("/prs"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:J})]}),n.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:n.jsx(Mi,{className:"h-5 w-5"})})]}),n.jsx("p",{className:`text-xs mt-4 ${B>0?"text-red-400 font-medium":"text-slate-500"}`,children:B>0?`${B} need work`:"All passing"})]}),n.jsxs(be,{className:"p-5",children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Cron Status"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:G.crontab.installed?"Active":"Inactive"})]}),n.jsx("div",{className:`p-2 rounded-lg ${G.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:n.jsx(Ri,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4",children:G.crontab.installed?`${G.crontab.entries.length} entr${G.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),n.jsxs(be,{className:"p-6",children:[n.jsx("h2",{className:"text-base font-semibold text-slate-200 mb-4",children:"System Status"}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Project"}),n.jsx("p",{className:"text-sm text-slate-200",children:G.projectName})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Provider"}),n.jsx("p",{className:"text-sm text-slate-200 capitalize",children:G.config.provider})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"PRD Directory"}),n.jsx("p",{className:"text-sm text-slate-200",children:G.config.prdDir})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Last Updated"}),n.jsx("p",{className:"text-sm text-slate-200",children:new Date(G.timestamp).toLocaleString()})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-base font-semibold text-slate-200 mb-4",children:"Process Status"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${C!=null&&C.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${C!=null&&C.running?"text-slate-200":"text-slate-400"}`,children:"Executor"}),n.jsx("div",{className:"text-xs text-slate-500",children:C!=null&&C.running?`PID: ${C.pid} • ${G.activePrd??"Running"}`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(C==null?void 0:C.running)&&n.jsxs(ue,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>P("run"),disabled:o==="run",children:[n.jsx(hu,{className:"h-4 w-4 mr-1"}),o==="run"?"Stopping...":"Stop"]}),!(C!=null&&C.running)&&L.length>0&&n.jsx(ue,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:de,disabled:r,children:r?"Clearing...":"Force Clear"}),n.jsx(ue,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${Q!=null&&Q.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${Q!=null&&Q.running?"text-slate-200":"text-slate-400"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:Q!=null&&Q.running?`PID: ${Q.pid} • Running`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(Q==null?void 0:Q.running)&&n.jsxs(ue,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>P("review"),disabled:o==="review",children:[n.jsx(hu,{className:"h-4 w-4 mr-1"}),o==="review"?"Stopping...":"Stop"]}),n.jsx(ue,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),disabled:!(Q!=null&&Q.running),children:"View Log"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${Z!=null&&Z.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${Z!=null&&Z.running?"text-slate-200":"text-slate-400"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:Z!=null&&Z.running?`PID: ${Z.pid} • Running`:"Idle"})]})]}),n.jsx("div",{className:"flex items-center space-x-2",children:n.jsx(ue,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})})]})]})]}),n.jsxs(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-base font-semibold text-slate-200",children:"Scheduling"}),n.jsxs("button",{onClick:()=>c("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",n.jsx(n0,{className:"ml-1 h-3 w-3"})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${A!=null&&A.executor.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(Ri,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${A!=null&&A.executor.installed?"text-slate-200":"text-slate-500"}`,children:"Executor"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":xe(A==null?void 0:A.executor.nextRun)})]})]})}),n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${A!=null&&A.reviewer.installed?"bg-purple-500/10 text-purple-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(Mi,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${A!=null&&A.reviewer.installed?"text-slate-200":"text-slate-500"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":xe(A==null?void 0:A.reviewer.nextRun)})]})]})}),n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${(K=A==null?void 0:A.qa)!=null&&K.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(kb,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${(se=A==null?void 0:A.qa)!=null&&se.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":xe((we=A==null?void 0:A.qa)==null?void 0:we.nextRun)})]})]})})]})]})]}),n.jsxs("div",{className:"mt-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),n.jsxs("button",{onClick:()=>c("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",n.jsx(n0,{className:"ml-1 h-3 w-3"})]})]}),n.jsx(be,{className:"p-4",children:R?n.jsx("div",{className:"flex flex-wrap gap-3",children:Vl.map(ae=>{var F;const k=((F=R.columns[ae])==null?void 0:F.length)??0;return n.jsxs("button",{onClick:()=>c("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${Qy[ae]}`,children:[n.jsx("span",{className:"text-xs font-medium",children:ae}),n.jsx("span",{className:"text-xs font-bold",children:k})]},ae)})}):n.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",n.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},_e=Ye.forwardRef(({className:c="",label:o,error:d,helperText:r,rightIcon:m,...f},h)=>n.jsxs("div",{className:"w-full",children:[o&&n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{ref:h,className:`
410
+ `,onClick:d,children:[d&&n.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),n.jsx("div",{className:"relative z-10",children:c})]}),ue=({children:c,variant:o="primary",size:d="md",loading:r=!1,className:m="",disabled:f,...h})=>{const v="inline-flex items-center justify-center rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-offset-[#030712] disabled:opacity-50 disabled:pointer-events-none active:scale-[0.98]",g={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return n.jsxs("button",{className:`${v} ${g[o]} ${p[d]} ${m}`,disabled:f||r,...h,children:[r&&n.jsx(G0,{className:"mr-2 h-4 w-4 animate-spin"}),c]})},ma=({children:c,variant:o="default",className:d=""})=>{const r={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return n.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${r[o]} ${d}`,children:c})},Uu={Draft:{dot:"bg-slate-500",badge:"neutral"},Ready:{dot:"bg-green-500",badge:"success"},"In Progress":{dot:"bg-blue-500",badge:"info"},Review:{dot:"bg-amber-500",badge:"warning"},Done:{dot:"bg-slate-600",badge:"neutral"}},By=({defaultColumn:c,onClose:o,onCreated:d})=>{const[r,m]=y.useState(""),[f,h]=y.useState(""),[v,g]=y.useState(c),[p,j]=y.useState(!1),[w,D]=y.useState(null),{addToast:z}=rt(),U=async A=>{if(A.preventDefault(),!!r.trim()){j(!0),D(null);try{await fy({title:r.trim(),body:f,column:v}),z({title:"Issue created",message:`"${r.trim()}" added to ${v}`,type:"success"}),d(),o()}catch(T){D(T instanceof Error?T.message:"Failed to create issue")}finally{j(!1)}}};return n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[n.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[n.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[n.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),n.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsxs("form",{onSubmit:U,className:"p-6 space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),n.jsx("input",{type:"text",value:r,onChange:A=>m(A.target.value),placeholder:"Issue title...",required:!0,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),n.jsx("select",{value:v,onChange:A=>g(A.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Vl.map(A=>n.jsx("option",{value:A,children:A},A))})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),n.jsx("textarea",{value:f,onChange:A=>h(A.target.value),placeholder:"Issue description...",rows:5,className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-none font-mono"})]}),w&&n.jsx("p",{className:"text-sm text-red-400",children:w}),n.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[n.jsx(ue,{variant:"ghost",type:"button",onClick:o,children:"Cancel"}),n.jsx(ue,{type:"submit",disabled:p||!r.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},Ly=({issue:c,onClose:o,onMoved:d,onClosed:r})=>{const[m,f]=y.useState(!1),[h,v]=y.useState(!1),{addToast:g}=rt(),p=async D=>{if(D!==c.column){f(!0);try{await F0(c.number,D),g({title:"Issue moved",message:`#${c.number} moved to ${D}`,type:"success"}),d(),o()}catch(z){g({title:"Move failed",message:z instanceof Error?z.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},j=async()=>{if(confirm(`Close issue #${c.number}: "${c.title}"?`)){v(!0);try{await my(c.number),g({title:"Issue closed",message:`#${c.number} closed on GitHub`,type:"success"}),r(),o()}catch(D){g({title:"Close failed",message:D instanceof Error?D.message:"Failed to close issue",type:"error"})}finally{v(!1)}}},w=c.column??"Draft";return n.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[n.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:o}),n.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[n.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[n.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[n.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",c.number]}),n.jsx(ma,{variant:Uu[w].badge,children:w})]}),n.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:c.title}),c.assignees.length>0&&n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",c.assignees.join(", ")]})]}),n.jsx("button",{onClick:o,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsxs("div",{className:"flex items-center space-x-3 px-6 py-3 border-b border-white/5 flex-shrink-0 flex-wrap gap-y-2",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),Vl.filter(D=>D!==c.column).map(D=>n.jsx("button",{onClick:()=>p(D),disabled:m,className:"text-xs px-2.5 py-1 rounded-md bg-slate-800 text-slate-300 hover:bg-slate-700 hover:text-slate-100 border border-slate-700 transition-colors disabled:opacity-50",children:D},D))]}),n.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[n.jsxs("a",{href:c.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center space-x-1 text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:[n.jsx(Ru,{className:"h-3.5 w-3.5"}),n.jsx("span",{children:"GitHub"})]}),n.jsx("button",{onClick:j,disabled:h,className:"text-xs px-2.5 py-1 rounded-md bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20 transition-colors disabled:opacity-50",children:h?"Closing...":"Close Issue"})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.body?n.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:c.body}):n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},qy=({issue:c,onClick:o,onMoveRequest:d})=>{const[r,m]=y.useState(!1),f=c.column??"Draft";return n.jsxs("div",{className:"relative group",children:[n.jsx(ye,{className:"p-3 cursor-pointer hover:border-indigo-500/30 transition-all active:scale-[0.99] select-none",onClick:o,children:n.jsxs("div",{className:"flex items-start justify-between",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",c.number]}),n.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:c.title}),c.assignees.length>0&&n.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:c.assignees.join(", ")})]}),n.jsx("button",{onClick:h=>{h.stopPropagation(),m(v=>!v)},className:"ml-2 p-1 rounded hover:bg-white/10 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",title:"Move issue",children:n.jsx(Y0,{className:"h-3.5 w-3.5"})})]})}),r&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"fixed inset-0 z-30",onClick:()=>m(!1)}),n.jsx("div",{className:"absolute right-0 top-full mt-1 z-40 bg-[#0f172a] border border-white/10 rounded-xl shadow-2xl py-1 min-w-[140px]",children:Vl.filter(h=>h!==f).map(h=>n.jsxs("button",{onClick:()=>{d(c,h),m(!1)},className:"w-full text-left text-xs px-4 py-2 text-slate-300 hover:bg-white/5 hover:text-slate-100 transition-colors flex items-center space-x-2",children:[n.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${Uu[h].dot}`}),n.jsx("span",{children:h})]},h))})]})]})},Yy=({name:c,issues:o,onIssueClick:d,onNewIssue:r,onMoveIssue:m})=>{const f=Uu[c];return n.jsxs("div",{className:"flex flex-col min-w-[220px] max-w-[220px] h-full",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${f.dot}`}),n.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:c}),n.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:o.length})]}),n.jsx("button",{onClick:()=>r(c),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${c}`,children:n.jsx(gl,{className:"h-3.5 w-3.5"})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:o.length===0?n.jsx("div",{className:"border-2 border-dashed border-slate-800 rounded-xl h-24 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-slate-700",children:"No issues"})}):o.map(h=>n.jsx(qy,{issue:h,onClick:()=>d(h),onMoveRequest:m},h.id))})]})},Gy=()=>{const[c,o]=y.useState(null),[d,r]=y.useState(null),{addToast:m,selectedProjectId:f,globalModeLoading:h}=rt(),{data:v,loading:g,error:p,refetch:j}=ct(Ou,[f],{enabled:!h});y.useEffect(()=>{const z=setInterval(()=>j(),3e4);return()=>clearInterval(z)},[j]);const w=y.useCallback(async(z,U)=>{try{await F0(z.number,U),m({title:"Issue moved",message:`#${z.number} moved to ${U}`,type:"success"}),j()}catch(A){m({title:"Move failed",message:A instanceof Error?A.message:"Failed to move issue",type:"error"})}},[m,j]);if(h||g)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(p&&p.message.includes("Board not configured"))return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx("div",{className:"text-4xl",children:"📋"}),n.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),n.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",n.jsx("code",{className:"font-mono bg-slate-800 px-2 py-0.5 rounded text-indigo-300",children:"night-watch board setup"})," in your project to create a GitHub Projects board."]})]});if(p)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),n.jsx("div",{className:"text-sm text-slate-500",children:p.message}),n.jsx(ue,{onClick:()=>j(),children:"Retry"})]});if(!v)return null;const D=v.columns;return n.jsxs("div",{className:"flex flex-col h-full",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),n.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[Vl.reduce((z,U)=>{var A;return z+(((A=D[U])==null?void 0:A.length)??0)},0)," issues across ",Vl.length," columns"]})]}),n.jsxs(ue,{onClick:()=>r("Ready"),children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),n.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",children:n.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Vl.length*236}px`},children:Vl.map(z=>n.jsx(Yy,{name:z,issues:D[z]??[],onIssueClick:o,onNewIssue:r,onMoveIssue:w},z))})}),c&&n.jsx(Ly,{issue:c,onClose:()=>o(null),onMoved:()=>j(),onClosed:()=>j()}),d&&n.jsx(By,{defaultColumn:d,onClose:()=>r(null),onCreated:()=>j()})]})},Qy={Draft:"text-slate-400 bg-slate-500/10 ring-slate-500/20",Ready:"text-green-400 bg-green-500/10 ring-green-500/20","In Progress":"text-blue-400 bg-blue-500/10 ring-blue-500/20",Review:"text-amber-400 bg-amber-500/10 ring-amber-500/20",Done:"text-slate-500 bg-slate-600/10 ring-slate-600/20"},Vy=()=>{var $,ie,we;const c=wu(),[o,d]=y.useState(null),[r,m]=y.useState(!1),[f,h]=y.useState(null),{setProjectName:v,addToast:g,selectedProjectId:p,globalModeLoading:j}=rt(),{data:w,loading:D,error:z,refetch:U}=ct(K0,[p],{enabled:!j}),{data:A}=ct(J0,[p],{enabled:!j}),{data:T}=ct(()=>Ou().catch(()=>null),[p],{enabled:!j});P0(se=>{h(se)},[p,j],{enabled:!j});const Q=f||w;if(Qe.useEffect(()=>{Q!=null&&Q.projectName&&v(Q.projectName)},[Q,v]),y.useEffect(()=>{const se=setInterval(()=>{U()},3e4);return()=>clearInterval(se)},[U]),y.useEffect(()=>{const se=()=>U();return window.addEventListener("focus",se),()=>window.removeEventListener("focus",se)},[U]),j||D)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(z)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load dashboard data"}),n.jsx("div",{className:"text-sm text-slate-500",children:z.message}),n.jsx(ue,{onClick:()=>U(),children:"Retry"})]});if(!Q)return null;const q=Q.prds.filter(se=>se.status==="ready").length,L=Q.prds.filter(se=>se.status==="in-progress"),J=Q.prs.length,B=Q.prs.filter(se=>se.reviewScore!==null&&se.reviewScore<70).length,C=Q.processes.find(se=>se.name==="executor"),V=Q.processes.find(se=>se.name==="reviewer"),Z=Q.processes.find(se=>se.name==="qa"),P=async se=>{d(se);try{const k=await uy(se),F=k.results.every(ae=>ae.success);g({title:F?"Process Cancelled":"Cancel Failed",message:k.results.map(ae=>ae.message).join("; "),type:F?"success":"error"})}catch(k){g({title:"Cancel Failed",message:k instanceof Error?k.message:"Failed to cancel process",type:"error"})}finally{d(null),U()}},oe=async()=>{m(!0);try{await dy(),g({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),U()}catch(se){g({title:"Clear Failed",message:se instanceof Error?se.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},ge=se=>{if(!se)return"Not scheduled";try{const k=new Date(se),F=new Date,ae=k.getTime()-F.getTime(),K=Math.floor(ae/6e4);return K<0?"Running now...":K<60?`In ${K} min`:K<1440?`In ${Math.floor(K/60)} hr${K>=120?"s":""}`:`In ${Math.floor(K/1440)} day${K>=2880?"s":""}`}catch{return"Unknown"}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsxs(ye,{className:"p-5",onClick:()=>c("/prds"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"PRDs Ready"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:q})]}),n.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:n.jsx(ns,{className:"h-5 w-5"})})]}),n.jsxs("p",{className:"text-xs text-slate-500 mt-4",children:["of ",Q.prds.length," total"]})]}),n.jsxs(ye,{className:"p-5",onClick:()=>c("/prds"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:L.length})]}),n.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:n.jsx(q0,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4 truncate",children:L.length===1?L[0].name:`${L.length} active`})]}),n.jsxs(ye,{className:"p-5",onClick:()=>c("/prs"),children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:J})]}),n.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:n.jsx(Mi,{className:"h-5 w-5"})})]}),n.jsx("p",{className:`text-xs mt-4 ${B>0?"text-red-400 font-medium":"text-slate-500"}`,children:B>0?`${B} need work`:"All passing"})]}),n.jsxs(ye,{className:"p-5",children:[n.jsxs("div",{className:"flex justify-between items-start",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Cron Status"}),n.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:Q.crontab.installed?"Active":"Inactive"})]}),n.jsx("div",{className:`p-2 rounded-lg ${Q.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:n.jsx(Ri,{className:"h-5 w-5"})})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-4",children:Q.crontab.installed?`${Q.crontab.entries.length} entr${Q.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),n.jsxs(ye,{className:"p-6",children:[n.jsx("h2",{className:"text-base font-semibold text-slate-200 mb-4",children:"System Status"}),n.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Project"}),n.jsx("p",{className:"text-sm text-slate-200",children:Q.projectName})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Provider"}),n.jsx("p",{className:"text-sm text-slate-200 capitalize",children:Q.config.provider})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"PRD Directory"}),n.jsx("p",{className:"text-sm text-slate-200",children:Q.config.prdDir})]}),n.jsxs("div",{children:[n.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Last Updated"}),n.jsx("p",{className:"text-sm text-slate-200",children:new Date(Q.timestamp).toLocaleString()})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(ye,{className:"p-6",children:[n.jsx("h3",{className:"text-base font-semibold text-slate-200 mb-4",children:"Process Status"}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${C!=null&&C.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${C!=null&&C.running?"text-slate-200":"text-slate-400"}`,children:"Executor"}),n.jsx("div",{className:"text-xs text-slate-500",children:C!=null&&C.running?`PID: ${C.pid} • ${Q.activePrd??"Running"}`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(C==null?void 0:C.running)&&n.jsxs(ue,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>P("run"),disabled:o==="run",children:[n.jsx(xu,{className:"h-4 w-4 mr-1"}),o==="run"?"Stopping...":"Stop"]}),!(C!=null&&C.running)&&L.length>0&&n.jsx(ue,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:oe,disabled:r,children:r?"Clearing...":"Force Clear"}),n.jsx(ue,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${V!=null&&V.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${V!=null&&V.running?"text-slate-200":"text-slate-400"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:V!=null&&V.running?`PID: ${V.pid} • Running`:"Idle"})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[(V==null?void 0:V.running)&&n.jsxs(ue,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300",onClick:()=>P("review"),disabled:o==="review",children:[n.jsx(xu,{className:"h-4 w-4 mr-1"}),o==="review"?"Stopping...":"Stop"]}),n.jsx(ue,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),disabled:!(V!=null&&V.running),children:"View Log"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`h-2.5 w-2.5 rounded-full ${Z!=null&&Z.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),n.jsxs("div",{children:[n.jsx("div",{className:`font-medium ${Z!=null&&Z.running?"text-slate-200":"text-slate-400"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:Z!=null&&Z.running?`PID: ${Z.pid} • Running`:"Idle"})]})]}),n.jsx("div",{className:"flex items-center space-x-2",children:n.jsx(ue,{size:"sm",variant:"ghost",onClick:()=>c("/logs"),children:"View Log"})})]})]})]}),n.jsxs(ye,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-base font-semibold text-slate-200",children:"Scheduling"}),n.jsxs("button",{onClick:()=>c("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",n.jsx(n0,{className:"ml-1 h-3 w-3"})]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${A!=null&&A.executor.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(Ri,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${A!=null&&A.executor.installed?"text-slate-200":"text-slate-500"}`,children:"Executor"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":ge(A==null?void 0:A.executor.nextRun)})]})]})}),n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${A!=null&&A.reviewer.installed?"bg-purple-500/10 text-purple-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(Mi,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${A!=null&&A.reviewer.installed?"text-slate-200":"text-slate-500"}`,children:"Reviewer"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":ge(A==null?void 0:A.reviewer.nextRun)})]})]})}),n.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:`p-1.5 rounded-md ${($=A==null?void 0:A.qa)!=null&&$.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:n.jsx(kb,{className:"h-4 w-4"})}),n.jsxs("div",{children:[n.jsx("div",{className:`text-sm font-medium ${(ie=A==null?void 0:A.qa)!=null&&ie.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),n.jsx("div",{className:"text-xs text-slate-500",children:A!=null&&A.paused?"Paused":ge((we=A==null?void 0:A.qa)==null?void 0:we.nextRun)})]})]})})]})]})]}),n.jsxs("div",{className:"mt-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),n.jsxs("button",{onClick:()=>c("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",n.jsx(n0,{className:"ml-1 h-3 w-3"})]})]}),n.jsx(ye,{className:"p-4",children:T?n.jsx("div",{className:"flex flex-wrap gap-3",children:Vl.map(se=>{var F;const k=((F=T.columns[se])==null?void 0:F.length)??0;return n.jsxs("button",{onClick:()=>c("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${Qy[se]}`,children:[n.jsx("span",{className:"text-xs font-medium",children:se}),n.jsx("span",{className:"text-xs font-bold",children:k})]},se)})}):n.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",n.jsx("code",{className:"font-mono bg-slate-800 px-1.5 py-0.5 rounded text-indigo-300 text-xs",children:"night-watch board setup"})," to enable."]})})]})]})},_e=Qe.forwardRef(({className:c="",label:o,error:d,helperText:r,rightIcon:m,...f},h)=>n.jsxs("div",{className:"w-full",children:[o&&n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),n.jsxs("div",{className:"relative",children:[n.jsx("input",{ref:h,className:`
411
411
  w-full rounded-lg bg-slate-950 border border-slate-800
412
412
  px-3 py-2 text-sm text-slate-200
413
413
  placeholder:text-slate-600
@@ -417,7 +417,7 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
417
417
  ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
418
418
  ${m?"pr-10":""}
419
419
  ${c}
420
- `,...f}),m&&n.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),d?n.jsx("p",{className:"mt-1.5 text-xs text-red-400",children:d}):r?n.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:r}):null]}));_e.displayName="Input";const Xl=Ye.forwardRef(({className:c="",label:o,error:d,helperText:r,options:m,value:f,onChange:h,children:v,...g},p)=>{const j=w=>{h&&h(w.target.value)};return n.jsxs("div",{className:"w-full",children:[o&&n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),n.jsxs("div",{className:"relative",children:[n.jsx("select",{ref:p,className:`
420
+ `,...f}),m&&n.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),d?n.jsx("p",{className:"mt-1.5 text-xs text-red-400",children:d}):r?n.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:r}):null]}));_e.displayName="Input";const Xl=Qe.forwardRef(({className:c="",label:o,error:d,helperText:r,options:m,value:f,onChange:h,children:v,...g},p)=>{const j=w=>{h&&h(w.target.value)};return n.jsxs("div",{className:"w-full",children:[o&&n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:o}),n.jsxs("div",{className:"relative",children:[n.jsx("select",{ref:p,className:`
421
421
  w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
422
422
  px-3 py-2 pr-10 text-sm text-slate-200
423
423
  focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
@@ -425,7 +425,7 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
425
425
  transition-all duration-200
426
426
  ${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
427
427
  ${c}
428
- `,value:f,onChange:j,...g,children:m?m.map(w=>n.jsx("option",{value:w.value,children:w.label},w.value)):v}),n.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:n.jsx(Y0,{className:"h-4 w-4"})})]}),d?n.jsx("p",{className:"mt-1.5 text-xs text-red-400",children:d}):r?n.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Xl.displayName="Select";function Xy(){var k,F;const{data:c,refetch:o}=ct(zu),{addToast:d}=rt(),[r,m]=y.useState(1),[f,h]=y.useState(!1),[v,g]=y.useState(!1),[p,j]=y.useState([]),[w,D]=y.useState(!1),[z,U]=y.useState(""),[A,R]=y.useState(""),[G,q]=y.useState(""),[L,J]=y.useState(""),[B,C]=y.useState(""),[Q,Z]=y.useState("");Ye.useEffect(()=>{var $,ie,Se,S;c!=null&&c.slack&&(U(c.slack.botToken||""),R(c.slack.appToken||""),q((($=c.slack.channels)==null?void 0:$.eng)||""),J(((ie=c.slack.channels)==null?void 0:ie.prs)||""),C(((Se=c.slack.channels)==null?void 0:Se.incidents)||""),Z(((S=c.slack.channels)==null?void 0:S.releases)||""))},[c]);const P=async($=!1)=>{try{h(!0),await Du({slack:{enabled:!0,botToken:z,appToken:A,channels:{eng:G,prs:L,incidents:B,releases:Q},autoCreateProjectChannels:!0,discussionEnabled:!0}}),d({title:"Success",message:"Slack configuration saved successfully.",type:"success"}),o(),m($?1:r+1)}catch(ie){d({title:"Error",message:ie.message||"Failed to save configuration",type:"error"})}finally{h(!1)}},de=async()=>{if(m(3),!!z.startsWith("xoxb-"))try{D(!0);const $=await gy(z);j($);const ie=oe=>{var re;return(re=$.find(pe=>pe.name.toLowerCase()===oe))==null?void 0:re.id},Se=G||ie("eng"),S=L||ie("prs"),V=B||ie("incidents"),W=Q||ie("releases"),I=[];if(Se||I.push({name:"eng",setter:q}),S||I.push({name:"prs",setter:J}),V||I.push({name:"incidents",setter:C}),W||I.push({name:"releases",setter:Z}),I.length>0){d({title:"Creating Channels",message:`Auto-creating missing channels: ${I.map(re=>"#"+re.name).join(", ")}`,type:"info"});const oe=[...$];for(const re of I)try{const pe=await py(z,re.name),Pe=pe.channelId;re.setter(Pe),oe.push({id:Pe,name:re.name}),pe.inviteWarning?d({title:"Channel Created with Warning",message:`#${re.name}: ${pe.inviteWarning}`,type:"warning"}):pe.welcomeMessagePosted||d({title:"Channel Created",message:`#${re.name} was created, but welcome message failed to post.`,type:"warning"})}catch(pe){console.error("Failed to create channel:",re.name,pe)}j(oe)}else Se&&q(Se),S&&J(S),V&&C(V),W&&Z(W)}catch{d({title:"Warning",message:"Could not fetch channels automatically. Please verify your token.",type:"warning"})}finally{D(!1)}},xe="https://api.slack.com/apps?new_app=1",K=`{
428
+ `,value:f,onChange:j,...g,children:m?m.map(w=>n.jsx("option",{value:w.value,children:w.label},w.value)):v}),n.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:n.jsx(Y0,{className:"h-4 w-4"})})]}),d?n.jsx("p",{className:"mt-1.5 text-xs text-red-400",children:d}):r?n.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:r}):null]})});Xl.displayName="Select";function Xy(){var F,ae;const{data:c,refetch:o}=ct(Du),{addToast:d}=rt(),[r,m]=y.useState(1),[f,h]=y.useState(!1),[v,g]=y.useState(!1),[p,j]=y.useState([]),[w,D]=y.useState(!1),[z,U]=y.useState(""),[A,T]=y.useState(""),[Q,q]=y.useState(""),[L,J]=y.useState(""),[B,C]=y.useState(""),[V,Z]=y.useState("");Qe.useEffect(()=>{var K,fe,S,G;c!=null&&c.slack&&(U(c.slack.botToken||""),T(c.slack.appToken||""),q(((K=c.slack.channels)==null?void 0:K.eng)||""),J(((fe=c.slack.channels)==null?void 0:fe.prs)||""),C(((S=c.slack.channels)==null?void 0:S.incidents)||""),Z(((G=c.slack.channels)==null?void 0:G.releases)||""))},[c]);const P=async()=>{try{h(!0),await Oi({slack:{enabled:!1,botToken:"",appToken:"",channels:{eng:"",prs:"",incidents:"",releases:""},autoCreateProjectChannels:!1,discussionEnabled:!0}}),U(""),T(""),q(""),J(""),C(""),Z(""),m(1),o(),d({title:"Disconnected",message:"Slack integration removed.",type:"success"})}catch(K){d({title:"Error",message:K.message||"Failed to disconnect",type:"error"})}finally{h(!1)}},oe=async(K=!1)=>{try{h(!0),await Oi({slack:{enabled:!0,botToken:z,appToken:A,channels:{eng:Q,prs:L,incidents:B,releases:V},autoCreateProjectChannels:!0,discussionEnabled:!0}}),d({title:"Success",message:"Slack configuration saved successfully.",type:"success"}),o(),m(K?1:r+1)}catch(fe){d({title:"Error",message:fe.message||"Failed to save configuration",type:"error"})}finally{h(!1)}},ge=async()=>{if(m(3),!!z.startsWith("xoxb-"))try{D(!0);const K=await gy(z);j(K);const fe=me=>{var he;return(he=K.find(Le=>Le.name.toLowerCase()===me))==null?void 0:he.id},S=Q||fe("eng"),G=L||fe("prs"),W=B||fe("incidents"),I=V||fe("releases"),re=[];if(S||re.push({name:"eng",setter:q}),G||re.push({name:"prs",setter:J}),W||re.push({name:"incidents",setter:C}),I||re.push({name:"releases",setter:Z}),re.length>0){d({title:"Creating Channels",message:`Auto-creating missing channels: ${re.map(he=>"#"+he.name).join(", ")}`,type:"info"});const me=[...K];for(const he of re)try{const Le=await py(z,he.name),qe=Le.channelId;he.setter(qe),me.push({id:qe,name:he.name}),Le.inviteWarning?d({title:"Channel Created with Warning",message:`#${he.name}: ${Le.inviteWarning}`,type:"warning"}):Le.welcomeMessagePosted||d({title:"Channel Created",message:`#${he.name} was created, but welcome message failed to post.`,type:"warning"})}catch(Le){console.error("Failed to create channel:",he.name,Le)}j(me)}else S&&q(S),G&&J(G),W&&C(W),I&&Z(I)}catch{d({title:"Warning",message:"Could not fetch channels automatically. Please verify your token.",type:"warning"})}finally{D(!1)}},$="https://api.slack.com/apps?new_app=1",ie=`{
429
429
  "display_information": {
430
430
  "name": "Night Watch AI",
431
431
  "description": "AI-driven startup team",
@@ -464,10 +464,10 @@ Please change the parent <Route path="${L}"> to <Route path="${L==="/"?"*":`${L}
464
464
  "token_rotation_enabled": false,
465
465
  "org_deploy_enabled": false
466
466
  }
467
- } `;if(!c)return n.jsx("div",{className:"animate-pulse flex space-x-4",children:"Loading..."});const se=((k=c.slack)==null?void 0:k.enabled)&&((F=c.slack)==null?void 0:F.botToken),we=()=>n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-xl font-bold flex items-center gap-3",children:[n.jsx(r0,{className:"w-6 h-6 text-indigo-400"}),"Slack Bot Configuration"]}),n.jsx("p",{className:"text-slate-400 mt-1",children:"Manage your connected Slack workspace."})]}),n.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-400 bg-green-400/10 px-3 py-1.5 rounded-full border border-green-500/20",children:[n.jsx(en,{className:"w-4 h-4"})," Connected"]})]}),n.jsxs(be,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"font-medium text-slate-200 border-b border-white/10 pb-2 mb-4",children:"API Token"}),n.jsx("div",{className:"flex gap-4",children:n.jsx(_e,{label:"Bot User OAuth Token",type:v?"text":"password",value:z,onChange:$=>U($.target.value),className:"flex-1",rightIcon:n.jsx("button",{type:"button",onClick:()=>g(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(xu,{className:"w-4 h-4"}):n.jsx(zi,{className:"w-4 h-4"})})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(_e,{label:"App-Level Token (Socket Mode)",type:v?"text":"password",value:A,onChange:$=>R($.target.value),placeholder:"xapp-..."}),n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Required for real-time agent mentions like ",n.jsx("code",{children:"@maya"}),"."]})]}),n.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 pb-2 mb-4 mt-8",children:[n.jsx("h3",{className:"font-medium text-slate-200",children:"Channels"}),n.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-500 font-bold",children:"Public & Visible"})]}),n.jsx("div",{className:"grid grid-cols-2 gap-6",children:[{label:"eng",id:G},{label:"prs",id:L},{label:"incidents",id:B},{label:"releases",id:Q}].map($=>n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("label",{className:"text-xs font-medium text-slate-400 capitalize",children:["#",$.label," Channel"]}),$.id&&n.jsxs("button",{onClick:()=>window.open(`https://slack.com/app_redirect?channel=${$.id}`,"_blank"),className:"text-[10px] text-indigo-400 hover:text-indigo-300 flex items-center gap-1 transition-colors",children:["Open ",n.jsx(Tu,{className:"w-2.5 h-2.5"})]})]}),n.jsx(_e,{value:$.id,onChange:ie=>{$.label==="eng"&&q(ie.target.value),$.label==="prs"&&J(ie.target.value),$.label==="incidents"&&C(ie.target.value),$.label==="releases"&&Z(ie.target.value)},placeholder:"C1234567890"})]},$.label))}),n.jsx("div",{className:"mt-6 p-3 bg-indigo-500/5 border border-indigo-500/10 rounded-lg",children:n.jsxs("p",{className:"text-xs text-slate-400 leading-relaxed",children:[n.jsx("strong",{className:"text-indigo-300",children:"Pro Tip:"})," Channels are created as ",n.jsx("strong",{children:"Public"}),". If you don't see them in your sidebar, click ",n.jsx("b",{children:'"Add Channels" > "Browse all channels"'})," in Slack to join them for the first time."]})}),n.jsx("div",{className:"pt-6 border-t border-white/10 flex justify-end",children:n.jsx(ue,{onClick:()=>P(!0),loading:f,children:"Save Changes"})})]})]}),ae=[{number:1,title:"Create App",icon:Mv},{number:2,title:"Tokens & Scopes",icon:Z0},{number:3,title:"Channels",icon:xl}];return n.jsxs("div",{className:"max-w-4xl mx-auto space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h1",{className:"text-3xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-cyan-400 tracking-tight",children:"Integrations"}),n.jsx("p",{className:"text-slate-400",children:"Connect Night Watch to your tools for a seamless agentic workflow."})]}),se&&r===1?we():n.jsxs(be,{className:"p-8",children:[n.jsxs("div",{className:"mb-8",children:[n.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-3",children:[n.jsx(r0,{className:"w-7 h-7 text-indigo-400"}),"Connect Slack"]}),n.jsx("p",{className:"text-slate-400 mt-2",children:"Night Watch operates natively in Slack, allowing agents to discuss PRs, triage errors, and collaborate."})]}),n.jsxs("div",{className:"flex items-center justify-between mb-8 relative",children:[n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-full h-0.5 bg-slate-800 z-0"}),n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 h-0.5 bg-indigo-500 z-0 transition-all duration-300",style:{width:`${(r-1)/(ae.length-1)*100}%`}}),ae.map($=>n.jsxs("div",{className:`relative z-10 flex flex-col items-center gap-2 ${r>=$.number?"text-indigo-400":"text-slate-500"}`,children:[n.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center font-bold text-lg border-2 transition-all duration-300 bg-[#0b101b]
468
- ${r>=$.number?"border-indigo-500 glow-indigo":"border-slate-800"}
469
- ${r===$.number?"ring-4 ring-indigo-500/20":""}
470
- `,children:r>$.number?n.jsx(en,{className:"w-6 h-6"}):n.jsx($.icon,{className:"w-5 h-5"})}),n.jsx("span",{className:"text-xs font-medium tracking-wide",children:$.title})]},$.number))]}),n.jsxs("div",{className:"min-h-[300px]",children:[r===1&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"1. Create a Slack App via Manifest"}),n.jsx("p",{className:"text-sm text-slate-400",children:"We've made it easy. Copy the JSON manifest below and paste it into the Slack API dashboard to create your app instantly with the correct scopes."}),n.jsxs("div",{className:"bg-[#1e293b] rounded-lg p-4 border border-white/5 relative group",children:[n.jsx("pre",{className:"text-xs text-slate-300 overflow-x-auto",children:n.jsx("code",{children:K})}),n.jsx(ue,{size:"sm",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{navigator.clipboard.writeText(K),d({title:"Copied",message:"Manifest copied to clipboard",type:"info"})},children:"Copy JSON"})]})]}),n.jsxs("div",{className:"flex justify-between items-center pt-4",children:[n.jsx(ue,{variant:"outline",onClick:()=>window.open(xe,"_blank"),children:"Open Slack API Console"}),n.jsxs(ue,{onClick:()=>m(2),children:["Next Step ",n.jsx(_i,{className:"w-4 h-4 ml-1"})]})]})]}),r===2&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"2. Install App & Get Token"}),n.jsxs("p",{className:"text-sm text-slate-400",children:["After creating the app, navigate to ",n.jsx("strong",{children:"Features > OAuth & Permissions"})," in the left sidebar of the Slack API dashboard. Click ",n.jsx("strong",{children:"Install to Workspace"}),". Once installed, copy the ",n.jsx("strong",{children:"Bot User OAuth Token"})," (starts with ",n.jsx("code",{children:"xoxb-"}),") and paste it below. Then create an ",n.jsx("strong",{children:"App-Level Token"})," with ",n.jsx("code",{children:"connections:write"})," (starts with ",n.jsx("code",{children:"xapp-"}),") and paste it as well. Ignore the Client ID and secrets on the Basic Information page."]}),n.jsxs("div",{className:"max-w-md mt-6",children:[n.jsx(_e,{label:"Slack Bot Token",placeholder:"xoxb-...",value:z,onChange:$=>U($.target.value),type:v?"text":"password",rightIcon:n.jsx("button",{type:"button",onClick:()=>g(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(xu,{className:"w-4 h-4"}):n.jsx(zi,{className:"w-4 h-4"})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(_e,{label:"Slack App Token (Socket Mode)",placeholder:"xapp-...",value:A,onChange:$=>R($.target.value),type:v?"text":"password"}),n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Needed for real-time ",n.jsx("code",{children:"@agent"})," replies (Socket Mode + ",n.jsx("code",{children:"connections:write"}),")."]})]})]})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(ue,{variant:"ghost",onClick:()=>m(1),children:"Back"}),n.jsxs(ue,{onClick:de,disabled:!z.startsWith("xoxb-")||w,children:["Next Step ",n.jsx(_i,{className:"w-4 h-4 ml-1"})]})]})]}),r===3&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"3. Map Channels"}),n.jsx("p",{className:"text-sm text-slate-400",children:`Provide the Slack channel IDs where the agents should operate. You can find the Channel ID at the bottom of the channel's "About" modal in Slack.`}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-8",children:p.length>0?n.jsxs(n.Fragment,{children:[n.jsxs(be,{className:"p-4 border border-indigo-500/20 bg-indigo-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-indigo-300",children:[n.jsx(xl,{className:"w-4 h-4"})," eng"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"General engineering chat and agent banter."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map($=>({label:"#"+$.name,value:$.id}))],value:G,onChange:q})]}),n.jsxs(be,{className:"p-4 border border-blue-500/20 bg-blue-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-blue-300",children:[n.jsx(xl,{className:"w-4 h-4"})," prs"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Pull Request reviews and agent deliberation."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map($=>({label:"#"+$.name,value:$.id}))],value:L,onChange:J})]}),n.jsxs(be,{className:"p-4 border border-red-500/20 bg-red-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-red-300",children:[n.jsx(xl,{className:"w-4 h-4"})," incidents"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"CI/CD failures and production alerts."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map($=>({label:"#"+$.name,value:$.id}))],value:B,onChange:C})]}),n.jsxs(be,{className:"p-4 border border-emerald-500/20 bg-emerald-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-emerald-300",children:[n.jsx(xl,{className:"w-4 h-4"})," releases"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Ship announcements and merged PRs."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map($=>({label:"#"+$.name,value:$.id}))],value:Q,onChange:Z})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs(be,{className:"p-4 border border-indigo-500/20 bg-indigo-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-indigo-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," eng"]}),n.jsx(_e,{placeholder:"C1234567890",value:G,onChange:$=>q($.target.value)})]}),n.jsxs(be,{className:"p-4 border border-blue-500/20 bg-blue-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-blue-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," prs"]}),n.jsx(_e,{placeholder:"C1234567890",value:L,onChange:$=>J($.target.value)})]}),n.jsxs(be,{className:"p-4 border border-red-500/20 bg-red-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-red-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," incidents"]}),n.jsx(_e,{placeholder:"C1234567890",value:B,onChange:$=>C($.target.value)})]}),n.jsxs(be,{className:"p-4 border border-emerald-500/20 bg-emerald-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-emerald-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," releases"]}),n.jsx(_e,{placeholder:"C1234567890",value:Q,onChange:$=>Z($.target.value)})]})]})})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(ue,{variant:"ghost",onClick:()=>m(2),children:"Back"}),n.jsx(ue,{onClick:()=>P(!0),loading:f,disabled:!G||!L||!B,children:"Complete Setup"})]})]})]})]})]})}const Zy=()=>{const[c,o]=y.useState(!0),[d,r]=y.useState(""),[m,f]=y.useState("executor"),h=y.useRef(null),{selectedProjectId:v,globalModeLoading:g}=rt(),{data:p,loading:j,error:w,refetch:D}=ct(()=>ny(m,500),[m,v],{enabled:!g}),{data:z}=ct(K0,[v],{enabled:!g}),U=(p==null?void 0:p.lines)||[];y.useEffect(()=>{c&&h.current&&(h.current.scrollTop=h.current.scrollHeight)},[U,c]),y.useEffect(()=>{if(!c)return;const q=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(q)},[c,m,D]);const A=U.filter(q=>q.toLowerCase().includes(d.toLowerCase())),R=q=>{f(q),r("")},G=q=>{if(!(z!=null&&z.processes))return!1;const L=z.processes.find(J=>J.name===q);return(L==null?void 0:L.running)??!1};return w?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),n.jsx("div",{className:"text-sm text-slate-500",children:w.message}),n.jsx(ue,{onClick:()=>D(),children:"Retry"})]}):n.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs("div",{className:"relative group",children:[n.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:q=>r(q.target.value)}),n.jsx(_u,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),n.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>R("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="executor"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"Executor"}),G("executor")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),n.jsx("button",{onClick:()=>R("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="reviewer"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"Reviewer"}),G("reviewer")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),n.jsx("button",{onClick:()=>R("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="qa"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"QA"}),G("qa")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs(ue,{size:"sm",variant:"ghost",onClick:()=>D(),children:[n.jsx(i0,{className:"h-4 w-4 mr-2"}),"Refresh"]}),n.jsxs(ue,{size:"sm",variant:"ghost",onClick:()=>o(!c),children:[c?n.jsx(V0,{className:"h-4 w-4 mr-2"}):n.jsx(ss,{className:"h-4 w-4 mr-2"}),c?"Pause":"Resume"]})]})]}),n.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[n.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[n.jsxs("span",{children:["File: ",m,".log"]}),n.jsxs("span",{children:[A.length," lines"]})]}),n.jsxs("div",{ref:h,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[j?n.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):A.length===0?n.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):A.map((q,L)=>{const J=q.includes("[ERROR]"),B=q.includes("[WARN]");return n.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${J?"text-red-400":B?"text-amber-400":"text-slate-300"}`,children:[n.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:L+1}),q]},L)}),c&&n.jsx("div",{className:"h-4"})," "]}),!c&&n.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>o(!0),children:[n.jsx(i0,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},$y=({isOpen:c,onClose:o,title:d,children:r})=>(y.useEffect(()=>{const m=f=>{f.key==="Escape"&&o()};return c&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[c,o]),c?ov.createPortal(n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[n.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:o,"aria-hidden":"true"}),n.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),n.jsx("button",{onClick:o,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:r})]})]}),document.body):null),uu={ready:"Ready","in-progress":"In Progress",blocked:"Blocked","pending-review":"Pending Review",done:"Done"},ou={ready:"success","in-progress":"info",blocked:"error","pending-review":"warning",done:"neutral"},Ky=()=>{const[c,o]=y.useState("list"),[d,r]=y.useState(!1),[m,f]=y.useState(null),[h,v]=y.useState(!1),[g,p]=y.useState(!1),[j,w]=y.useState({}),{addToast:D,selectedProjectId:z,globalModeLoading:U}=rt(),{data:A,loading:R,error:G,refetch:q}=ct(ly,[z],{enabled:!U}),L=A??[],{data:J}=ct(()=>Ou().catch(()=>null),[z],{enabled:!U}),B=Ye.useMemo(()=>{const K=new Map;if(!J)return K;for(const se of Object.values(J.columns))for(const we of se)K.set(we.title.toLowerCase().trim(),we);return K},[J]),C=K=>{if(!K.content)return K.name;const se=K.content.match(/^#\s+(.+)$/m);return se?se[1].trim():K.name},Q=K=>{const se=C(K).toLowerCase().trim();return B.get(se)??null},Z=L.map(K=>j[K.name]?{...K,status:j[K.name]}:K);y.useEffect(()=>{if(Object.keys(j).length>0){const K=Object.keys(j).filter(se=>L.some(we=>we.name===se&&we.status!=="ready"));K.length>0&&w(se=>{const we={...se};for(const ae of K)delete we[ae];return we})}},[L,j]),P0(()=>{q()},[z,U],{enabled:!U});const P=async()=>{if(m){p(!0);try{const K=await oy(m.name);D({title:"PRD Queued",message:K.message,type:"success"}),f(null),q()}catch(K){D({title:"Retry Failed",message:K instanceof Error?K.message:"Failed to retry PRD",type:"error"})}finally{p(!1)}}},de=K=>{K.preventDefault(),r(!1)},xe=async()=>{if(m){v(!0),w(K=>({...K,[m.name]:"in-progress"}));try{const K=await iy(m.name);D({title:"Executor Started",message:K.pid?`Started with PID ${K.pid}`:"Executor started",type:"success"}),q()}catch(K){w(se=>{const we={...se};return delete we[m.name],we}),D({title:"Executor Failed",message:K instanceof Error?K.message:"Failed to start executor",type:"error"})}finally{v(!1)}}};return y.useEffect(()=>{const K=setInterval(()=>q(),3e4);return()=>clearInterval(K)},[q]),y.useEffect(()=>{const K=()=>q();return window.addEventListener("focus",K),()=>window.removeEventListener("focus",K)},[q]),y.useEffect(()=>{if(m){const K=Z.find(se=>se.name===m.name);K&&f(K)}},[Z,m]),R?n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading PRDs..."})}):G?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load PRDs"}),n.jsx("div",{className:"text-sm text-slate-500",children:G.message}),n.jsx(ue,{onClick:()=>q(),children:"Retry"})]}):n.jsxs("div",{className:"space-y-6 h-[calc(100vh-8rem)] flex flex-col",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(ue,{variant:c==="list"?"secondary":"ghost",size:"icon",onClick:()=>o("list"),children:n.jsx(c0,{className:"h-4 w-4"})}),n.jsx(ue,{variant:c==="card"?"secondary":"ghost",size:"icon",onClick:()=>o("card"),children:n.jsx(mb,{className:"h-4 w-4"})}),n.jsx("div",{className:"h-6 w-px bg-slate-800 mx-2"}),n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("span",{className:"px-3 py-1 bg-slate-800 text-slate-200 rounded-full text-xs font-medium cursor-pointer border border-slate-700",children:"All"}),n.jsx("span",{className:"px-3 py-1 text-slate-500 hover:bg-slate-800 hover:text-slate-300 rounded-full text-xs font-medium cursor-pointer transition-colors",children:"Ready"}),n.jsx("span",{className:"px-3 py-1 text-slate-500 hover:bg-slate-800 hover:text-slate-300 rounded-full text-xs font-medium cursor-pointer transition-colors",children:"In Progress"})]})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(ue,{variant:"outline",size:"sm",children:[n.jsx(Sv,{className:"h-4 w-4 mr-2"}),"Sort"]}),n.jsxs(ue,{onClick:()=>r(!0),size:"sm",children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"New PRD"]})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto pr-1 pb-10",children:c==="list"?n.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:n.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[n.jsx("thead",{className:"bg-slate-950/50",children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Name"}),n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Status"}),n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Dependencies"}),n.jsx("th",{scope:"col",className:"relative px-6 py-3",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]})}),n.jsxs("tbody",{className:"divide-y divide-slate-800",children:[Z.map(K=>n.jsxs("tr",{className:"hover:bg-slate-800/50 group cursor-pointer transition-colors",onClick:()=>f(K),children:[n.jsxs("td",{className:"px-6 py-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"text-sm font-medium text-slate-200",children:K.name}),(()=>{const se=Q(K);return se?n.jsxs("a",{href:se.url,target:"_blank",rel:"noopener noreferrer",onClick:we=>we.stopPropagation(),className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20 hover:bg-indigo-500/20 transition-colors",title:`Board: #${se.number} — ${se.column}`,children:["#",se.number," · ",se.column]}):null})()]}),K.unmetDependencies.length>0&&n.jsxs("div",{className:"text-xs text-amber-400 mt-1",children:["Blocked by: ",K.unmetDependencies.join(", ")]})]}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx(ma,{variant:ou[K.status],children:uu[K.status]})}),n.jsx("td",{className:"px-6 py-4",children:K.dependencies.length>0?n.jsx("div",{className:"flex flex-wrap gap-1",children:K.dependencies.map(se=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 text-slate-400 text-xs rounded border border-slate-700",children:se},se))}):n.jsx("span",{className:"text-sm text-slate-600",children:"None"})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:n.jsx("button",{className:"text-slate-500 hover:text-slate-300 opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(Wv,{className:"h-4 w-4"})})})]},K.name)),Z.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:4,className:"px-6 py-12 text-center text-slate-500",children:"No PRDs found. Create your first PRD to get started."})})]})]})}):n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Z.map(K=>n.jsxs(be,{className:"p-5 flex flex-col h-full hover:border-indigo-500/50 transition-colors",onClick:()=>f(K),children:[n.jsxs("div",{className:"flex justify-between items-start mb-4",children:[n.jsx(ma,{variant:ou[K.status],children:uu[K.status]}),K.status==="in-progress"&&n.jsx("div",{className:"h-2 w-2 bg-blue-500 rounded-full animate-pulse"}),K.status==="pending-review"&&n.jsx("div",{className:"h-2 w-2 bg-yellow-500 rounded-full animate-pulse"})]}),n.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:K.name}),(()=>{const se=Q(K);return se?n.jsxs("a",{href:se.url,target:"_blank",rel:"noopener noreferrer",onClick:we=>we.stopPropagation(),className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20 hover:bg-indigo-500/20 transition-colors flex-shrink-0",children:["#",se.number," · ",se.column]}):null})()]}),K.content&&n.jsx("p",{className:"text-sm text-slate-400 flex-1 line-clamp-3",children:K.content.replace(/^#.*\n/,"")}),n.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-800",children:[K.dependencies.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:K.dependencies.map(se=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 text-slate-400 text-xs rounded border border-slate-700",children:se},se))}),K.unmetDependencies.length>0&&n.jsxs("div",{className:"text-xs text-amber-400",children:["Blocked by: ",K.unmetDependencies.join(", ")]})]})]},K.name)),Z.length===0&&n.jsx("div",{className:"col-span-full text-center py-12 text-slate-500",children:"No PRDs found. Create your first PRD to get started."})]})}),n.jsx($y,{isOpen:d,onClose:()=>r(!1),title:"Create New PRD",children:n.jsxs("form",{onSubmit:de,className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Name"}),n.jsx("input",{type:"text",className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500 placeholder:text-slate-600",placeholder:"e.g. User Authentication"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Complexity"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("input",{type:"range",min:"1",max:"10",className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),n.jsx("span",{className:"text-sm font-bold text-slate-300 w-16 text-center",children:"MED"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Phases"}),n.jsx("input",{type:"number",defaultValue:3,min:1,max:10,className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Template"}),n.jsxs("select",{className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[n.jsx("option",{children:"Default"}),n.jsx("option",{children:"Feature"}),n.jsx("option",{children:"Bugfix"})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Dependencies"}),n.jsxs("div",{className:"bg-slate-950/30 p-3 rounded-md border border-slate-800 max-h-32 overflow-y-auto space-y-2",children:[Z.map(K=>n.jsxs("label",{className:"flex items-center space-x-2 text-sm text-slate-300 cursor-pointer",children:[n.jsx("input",{type:"checkbox",className:"rounded border-slate-600 bg-slate-800 text-indigo-500 focus:ring-indigo-500/50 focus:ring-offset-slate-900"}),n.jsx("span",{children:K.name})]},K.name)),Z.length===0&&n.jsx("p",{className:"text-sm text-slate-600 italic",children:"No existing PRDs"})]})]}),n.jsxs("div",{className:"flex justify-end pt-4 space-x-3",children:[n.jsx(ue,{type:"button",variant:"ghost",onClick:()=>r(!1),children:"Cancel"}),n.jsx(ue,{type:"submit",children:"Create PRD"})]})]})}),m&&n.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[n.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:()=>f(null)}),n.jsxs("div",{className:"relative w-full max-w-xl bg-slate-900 h-full shadow-2xl flex flex-col transform transition-transform animate-in slide-in-from-right duration-300 border-l border-slate-800",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-800",children:[n.jsx("h2",{className:"text-lg font-bold text-slate-100 line-clamp-1",children:m.name}),n.jsx("button",{onClick:()=>f(null),className:"p-2 hover:bg-slate-800 rounded-full",children:n.jsx(c0,{className:"h-5 w-5 text-slate-500"})})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-6 space-y-6",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx(ma,{variant:ou[m.status],className:"text-sm px-3 py-1",children:uu[m.status]})}),m.content&&n.jsxs("div",{className:"prose prose-sm prose-invert max-w-none",children:[n.jsx("h3",{className:"uppercase text-xs font-bold text-slate-500 tracking-wider mb-2",children:"Description"}),n.jsx("div",{className:"whitespace-pre-wrap text-slate-300 bg-slate-950/50 p-4 rounded-lg border border-slate-800 font-mono text-sm",children:m.content})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"uppercase text-xs font-bold text-slate-500 tracking-wider",children:"Dependencies"}),m.dependencies.length?n.jsx("div",{className:"flex flex-wrap gap-2",children:m.dependencies.map(K=>n.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-300 text-xs rounded border border-slate-700",children:K},K))}):n.jsx("p",{className:"text-sm text-slate-500 italic",children:"No dependencies."}),m.unmetDependencies.length>0&&n.jsx("div",{className:"mt-2",children:n.jsxs("p",{className:"text-sm text-amber-400",children:["Unmet dependencies: ",m.unmetDependencies.join(", ")]})})]})]}),n.jsx("div",{className:"p-4 border-t border-slate-800 bg-slate-900 flex space-x-3",children:m.status==="done"?n.jsxs(ue,{className:"flex-1",onClick:P,disabled:g,children:[n.jsx(Di,{className:"h-4 w-4 mr-2"}),g?"Moving...":"Retry"]}):n.jsxs(ue,{className:"flex-1",onClick:xe,disabled:h||m.status==="in-progress",children:[n.jsx(ss,{className:"h-4 w-4 mr-2"}),h?"Executing...":"Execute Now"]})})]})]})]})},x0=c=>{switch(c){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available or CI not configured"}},Ci=c=>c===null?"No review yet or review not required":c===100?"PR has been approved":c===0?"Changes have been requested":`Review score: ${c}`,Jy=()=>{const[c,o]=y.useState(null),[d,r]=y.useState(!1),[m,f]=y.useState("all"),[h,v]=y.useState("number"),[g,p]=y.useState("desc"),{addToast:j,selectedProjectId:w,globalModeLoading:D}=rt(),{data:z,loading:U,error:A,refetch:R}=ct(ay,[w],{enabled:!D}),G=z??[],q=Z=>{switch(Z){case"pass":return n.jsx(ns,{className:"h-4 w-4 text-green-500"});case"fail":return n.jsx(hu,{className:"h-4 w-4 text-red-500"});case"pending":return n.jsx(G0,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return n.jsx(Xv,{className:"h-4 w-4 text-slate-500"})}},L=y.useMemo(()=>G.filter(Z=>{switch(m){case"needs-work":return Z.ciStatus==="fail"||Z.reviewScore===0;case"pending":return Z.ciStatus==="pending"||Z.ciStatus==="unknown"||Z.reviewScore===null;case"passed":return Z.ciStatus==="pass"&&Z.reviewScore===100;case"all":default:return!0}}),[G,m]),J=y.useMemo(()=>[...L].sort((P,de)=>{let xe=0;switch(h){case"number":xe=P.number-de.number;break;case"title":xe=P.title.localeCompare(de.title);break;case"branch":xe=P.branch.localeCompare(de.branch);break;case"ciStatus":{const K={fail:0,pending:1,unknown:2,pass:3};xe=(K[P.ciStatus]??2)-(K[de.ciStatus]??2);break}case"reviewScore":{const K=P.reviewScore??-1,se=de.reviewScore??-1;xe=K-se;break}}return g==="asc"?xe:-xe}),[L,h,g]),B=Z=>{h===Z?p(g==="asc"?"desc":"asc"):(v(Z),p("desc"))},C=Z=>h!==Z?n.jsx(jv,{className:"h-3 w-3 text-slate-600"}):g==="asc"?n.jsx(Cv,{className:"h-3 w-3 text-indigo-400"}):n.jsx(vv,{className:"h-3 w-3 text-indigo-400"});if(U)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(A)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),n.jsx("div",{className:"text-sm text-slate-500",children:A.message}),n.jsx(ue,{onClick:()=>R(),children:"Retry"})]});const Q=async()=>{r(!0);try{const Z=await cy();j({title:"Reviewer Started",message:Z.pid?`Started with PID ${Z.pid}`:"Reviewer started",type:"success"})}catch(Z){j({title:"Reviewer Failed",message:Z instanceof Error?Z.message:"Failed to start reviewer",type:"error"})}finally{r(!1)}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),n.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),n.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),n.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),n.jsxs(ue,{size:"sm",onClick:Q,disabled:d,children:[n.jsx(_u,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),n.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:n.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[n.jsx("thead",{className:"bg-slate-950/50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("number"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Title"}),C("number")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("branch"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Branch"}),C("branch")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("ciStatus"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"CI Status"}),C("ciStatus")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("reviewScore"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Review Score"}),C("reviewScore")]})}),n.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsxs("tbody",{className:"divide-y divide-slate-800",children:[J.map(Z=>n.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>o(c===Z.number?null:Z.number),children:[n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center",children:[n.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",Z.number]}),n.jsx("span",{className:"font-medium text-slate-200",children:Z.title})]})}),n.jsx("td",{className:"px-6 py-4",children:n.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:Z.branch})}),n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center space-x-2",title:x0(Z.ciStatus),children:[q(Z.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-400",children:Z.ciStatus})]})}),n.jsx("td",{className:"px-6 py-4",children:Z.reviewScore!==null?n.jsxs("div",{className:"flex items-center space-x-2",title:Ci(Z.reviewScore),children:[n.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${Z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${Z.reviewScore}%`}})}),n.jsx("span",{className:`text-sm font-bold ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]}):n.jsx("span",{className:"text-slate-600 text-sm",title:Ci(null),children:"—"})}),n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx("a",{href:Z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:P=>P.stopPropagation(),children:n.jsx(Tu,{className:"h-4 w-4"})})})]},Z.number)),J.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:G.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),c&&n.jsx(be,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const Z=G.find(P=>P.number===c);return Z?n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-slate-200",children:Z.title}),n.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",n.jsx("span",{className:"font-mono",children:Z.branch})]})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"text-center",title:x0(Z.ciStatus),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),n.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[q(Z.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-300",children:Z.ciStatus})]})]}),Z.reviewScore!==null?n.jsxs("div",{className:"text-center",title:Ci(Z.reviewScore),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),n.jsx("div",{className:`text-xl font-bold mt-1 ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]}):n.jsxs("div",{className:"text-center",title:Ci(null),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),n.jsx("div",{className:"text-xl font-bold mt-1 text-slate-500",children:"—"})]})]})]}):null})()})]})},fa=Ye.forwardRef(({className:c="",label:o,checked:d,onChange:r,...m},f)=>{const h=v=>{r&&r(v.target.checked)};return n.jsxs("label",{className:`inline-flex items-center cursor-pointer ${c}`,children:[n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:d,onChange:h,...m}),n.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),o&&n.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:o})]})});fa.displayName="Switch";const Fy=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=rt(),[r,m]=y.useState(!1),[f,h]=y.useState(!1),{data:v,loading:g,error:p,refetch:j}=ct(hy,[o],{enabled:!d});y.useEffect(()=>{if(!(v!=null&&v.enabled))return;const q=setInterval(()=>{j()},1e4);return()=>clearInterval(q)},[v==null?void 0:v.enabled,j]);const w=async q=>{h(!0);try{await W0(q),c({title:q?"Scanner Enabled":"Scanner Disabled",message:q?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:q?"success":"info"}),j()}catch(L){c({title:"Toggle Failed",message:L instanceof Error?L.message:"Failed to toggle scanner",type:"error"})}finally{h(!1)}},D=async()=>{m(!0);try{const q=await xy();q.created.length>0?c({title:"Scan Complete",message:`Created ${q.created.length} PRD(s): ${q.created.join(", ")}`,type:"success"}):c({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),q.errors.length>0&&c({title:"Scan Errors",message:q.errors.join("; "),type:"warning"}),j()}catch(q){c({title:"Scan Failed",message:q instanceof Error?q.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(g)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),n.jsx("div",{className:"text-sm text-slate-500",children:p.message}),n.jsx(ue,{onClick:()=>j(),children:"Retry"})]});if(!v)return null;if(v.status==="no-roadmap")return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),n.jsx(be,{className:"p-12",children:n.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[n.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:n.jsx(Q0,{className:"h-10 w-10 text-slate-500"})}),n.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),n.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",n.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",n.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",n.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const z=v.totalItems>0?Math.round(v.processedItems/v.totalItems*100):0,U=Py(v.status),A=Iy(v.items),R=v.lastScan?e1(v.lastScan):"Never",G=v.autoScanInterval?Math.round(v.autoScanInterval/60):5;return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(fa,{label:v.enabled?"Enabled":"Disabled",checked:v.enabled,onChange:w,disabled:f}),n.jsxs(ue,{onClick:D,loading:r,disabled:!v.enabled||v.status==="complete",children:[n.jsx(ss,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),n.jsx(be,{className:`p-6 border-2 ${U.borderColor}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(U.icon,{className:`h-8 w-8 ${U.textColor}`}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),n.jsx("div",{className:`text-2xl font-bold ${U.textColor}`,children:U.label})]})]}),n.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[n.jsxs("div",{children:["Last scan: ",n.jsx("span",{className:"text-slate-300",children:R})]}),v.enabled&&v.status!=="complete"&&n.jsxs("div",{children:["Auto-scan: ",n.jsxs("span",{className:"text-slate-300",children:["every ",G," min"]})]}),v.enabled&&v.status==="complete"&&n.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),n.jsxs(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),n.jsxs("span",{className:"text-sm text-slate-400",children:[v.processedItems," / ",v.totalItems," items (",z,"%)"]})]}),n.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${z===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${z}%`}})})]}),Object.entries(A).map(([q,L])=>n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:q}),n.jsx("div",{className:"space-y-2",children:L.map(J=>n.jsx(Wy,{item:J},J.hash))})]},q))]})};function Wy({item:c}){const o=c.checked,d=c.processed;return n.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${o?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[n.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[o?n.jsx(vb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?n.jsx(ns,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):n.jsx(lb,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:`text-sm font-medium truncate ${o?"line-through text-slate-600":"text-slate-200"}`,children:c.title}),c.description&&n.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:c.description})]})]}),n.jsx("div",{className:"flex-shrink-0 ml-3",children:o?n.jsx(ma,{variant:"neutral",children:"Skipped"}):d?n.jsx(ma,{variant:"success",children:c.prdFile||"Processed"}):n.jsx(ma,{variant:"warning",children:"Pending"})})]})}function Py(c){switch(c){case"complete":return{label:"Complete",icon:ns,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Mi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:ss,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Kt,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Kt,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function Iy(c){const o={};for(const d of c){const r=d.section||"General";o[r]||(o[r]=[]),o[r].push(d)}return o}function e1(c){try{const o=new Date(c),r=new Date().getTime()-o.getTime(),m=Math.floor(r/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const Hu=[{label:"Every 30 minutes",value:"*/30 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Every 3 hours",value:"0 */3 * * *"},{label:"Every 6 hours",value:"0 */6 * * *"},{label:"Every 12 hours",value:"0 */12 * * *"},{label:"Daily at midnight",value:"0 0 * * *"},{label:"Daily at 9 AM",value:"0 9 * * *"},{label:"Weekdays at 9 AM",value:"0 9 * * 1-5"},{label:"Custom",value:"__custom__"}];function du(c){const o=c.trim().split(/\s+/);if(o.length!==5)return c;const[d,r,m,f,h]=o,v=Hu.find(g=>g.value===c);return v?v.label:d==="*/30"&&r==="*"?"Every 30 minutes":d==="0"&&r==="*"?"Every hour":d.startsWith("*/")?`Every ${parseInt(d.replace("*/",""),10)} minutes`:d==="0"&&r.startsWith("*/")?`Every ${parseInt(r.replace("*/",""),10)} hours`:d==="0"&&r!=="*"&&m==="*"&&f==="*"&&h==="*"?`Daily at ${p0(r)}`:d==="0"&&r!=="*"&&m==="*"&&f==="*"&&h==="1-5"?`Weekdays at ${p0(r)}`:c}function p0(c){const o=parseInt(c,10);return o===0?"12 AM":o<12?`${o} AM`:o===12?"12 PM":`${o-12} PM`}function t1(c){const o=Hu.find(d=>d.value===c);return(o==null?void 0:o.value)??"__custom__"}function l1(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4),m=Math.floor(r/60),f=Math.floor(m/24);return r<1?"less than a minute":r<60?`in ${r} minute${r>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function a1(c){const o={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return c.toLocaleDateString("en-US",o)}function n1(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4);return r>=0&&r<30}const s1=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=rt(),[r,m]=y.useState(!1),[f,h]=y.useState(!1),[v,g]=y.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),{data:p,loading:j,error:w,refetch:D}=ct(J0,[o],{enabled:!d}),{data:z,loading:U,refetch:A}=ct(zu,[o],{enabled:!d});y.useEffect(()=>{const P=setInterval(()=>{D()},3e4);return()=>clearInterval(P)},[D]),y.useEffect(()=>{z&&!v.isEditing&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!1})},[z,v.isEditing]);const R=async()=>{if(p){m(!0);try{p.paused?(await d0(),c({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await ry(),c({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),D()}catch(P){c({title:"Action Failed",message:P instanceof Error?P.message:"Failed to toggle schedule state",type:"error"})}finally{m(!1)}}},G=()=>{z&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!0})},q=()=>{z&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!1})},L=async()=>{if(z){h(!0);try{await Du({cronSchedule:v.executorSchedule,reviewerSchedule:v.reviewerSchedule}),await d0(),c({title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"}),g(P=>({...P,isEditing:!1})),A(),D()}catch(P){c({title:"Save Failed",message:P instanceof Error?P.message:"Failed to save schedules",type:"error"})}finally{h(!1)}}},J=(P,de)=>{if(!P)return n.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const xe=new Date(P),K=n1(xe);return n.jsxs("div",{className:"flex items-center space-x-2",children:[K&&n.jsxs("span",{className:"relative flex h-3 w-3",children:[n.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),n.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),n.jsxs("div",{className:"text-sm",children:[n.jsx("span",{className:"text-slate-200 font-medium",children:l1(xe)}),n.jsxs("span",{className:"text-slate-500 ml-2",children:["(",a1(xe),")"]})]})]})},B=(P,de,xe,K)=>{const se=t1(de),we=se==="__custom__";return n.jsxs("div",{className:`space-y-3 ${K?"opacity-50 pointer-events-none":""}`,children:[n.jsx("div",{className:"flex items-center space-x-3",children:n.jsx(Xl,{label:`${P} Preset`,options:Hu,value:se,onChange:ae=>{ae!=="__custom__"&&xe(ae)},className:"flex-1"})}),we&&n.jsx(_e,{label:"Custom Cron Expression",value:de,onChange:ae=>xe(ae.target.value),placeholder:"* * * * *",helperText:"Format: minute hour day month weekday (e.g., 0 */2 * * * for every 2 hours)"}),n.jsxs("div",{className:"text-sm text-slate-400",children:["Human-readable: ",n.jsx("span",{className:"text-slate-200",children:du(de)})]})]})};if(j||U)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(w||!p||!z)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),n.jsx("div",{className:"text-sm text-slate-500",children:(w==null?void 0:w.message)||"Unknown error"}),n.jsx(ue,{onClick:()=>{D(),A()},children:"Retry"})]});const C=p.paused,Q=C?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Z=C?"Paused":"Active";return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"})}),n.jsx(be,{className:`p-6 border-2 ${Q}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(Mi,{className:"h-8 w-8"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400",children:"Cron Status"}),n.jsx("div",{className:"text-2xl font-bold",children:Z})]})]}),n.jsx(ue,{variant:C?"primary":"outline",size:"lg",onClick:R,loading:r,children:C?n.jsxs(n.Fragment,{children:[n.jsx(ss,{className:"h-5 w-5 mr-2"}),"Resume"]}):n.jsxs(n.Fragment,{children:[n.jsx(V0,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Executor Schedule"}),!v.isEditing&&n.jsxs(ue,{variant:"ghost",size:"sm",onClick:G,children:[n.jsx(Mb,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),v.isEditing?B("Executor",v.executorSchedule,P=>g(de=>({...de,executorSchedule:P}))):n.jsx(n.Fragment,{children:n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),n.jsx("div",{className:"text-lg text-slate-200 font-medium",children:du(z.cronSchedule)}),n.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:z.cronSchedule})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),J(p.executor.nextRun,z.cronSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${p.executor.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(en,{className:"h-4 w-4"}),n.jsx("span",{children:p.executor.installed?"Installed":"Not installed"})]})]})})]}),n.jsxs(be,{className:`p-6 ${z.reviewerEnabled?"":"opacity-50"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Reviewer Schedule"}),!z.reviewerEnabled&&n.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),v.isEditing?B("Reviewer",v.reviewerSchedule,P=>g(de=>({...de,reviewerSchedule:P})),!z.reviewerEnabled):n.jsx(n.Fragment,{children:n.jsx("div",{className:"space-y-4",children:z.reviewerEnabled?n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),n.jsx("div",{className:"text-lg text-slate-200 font-medium",children:du(z.reviewerSchedule)}),n.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:z.reviewerSchedule})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),J(p.reviewer.nextRun,z.reviewerSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${p.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(en,{className:"h-4 w-4"}),n.jsx("span",{children:p.reviewer.installed?"Installed":"Not installed"})]})]}):n.jsx("div",{className:"text-slate-500 text-sm",children:"Automated reviews are disabled. Enable them in Settings to configure the reviewer schedule."})})})]})]}),n.jsxs(be,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[n.jsx(Ri,{className:"h-5 w-5 text-slate-400"}),n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),p.entries.length===0?n.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):n.jsx("div",{className:"space-y-2",children:p.entries.map((P,de)=>n.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:P},de))})]}),v.isEditing&&n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[n.jsx(ue,{variant:"ghost",onClick:q,children:"Cancel"}),n.jsxs(ue,{onClick:L,loading:f,children:[n.jsx(en,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},i1=({tabs:c,activeTab:o,onChange:d,className:r=""})=>{var g,p;const[m,f]=Ye.useState((g=c[0])==null?void 0:g.id),h=o||m,v=j=>{d?d(j):f(j)};return n.jsxs("div",{className:`flex flex-col ${r}`,children:[n.jsx("div",{className:"border-b border-slate-800 mb-6",children:n.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:c.map(j=>n.jsx("button",{onClick:()=>v(j.id),className:`
467
+ } `;if(!c)return n.jsx("div",{className:"animate-pulse flex space-x-4",children:"Loading..."});const we=((F=c.slack)==null?void 0:F.enabled)&&((ae=c.slack)==null?void 0:ae.botToken),se=()=>n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h2",{className:"text-xl font-bold flex items-center gap-3",children:[n.jsx(r0,{className:"w-6 h-6 text-indigo-400"}),"Slack Bot Configuration"]}),n.jsx("p",{className:"text-slate-400 mt-1",children:"Manage your connected Slack workspace."})]}),n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsxs("div",{className:"flex items-center gap-2 text-sm text-green-400 bg-green-400/10 px-3 py-1.5 rounded-full border border-green-500/20",children:[n.jsx(en,{className:"w-4 h-4"})," Connected"]}),n.jsx(ue,{variant:"ghost",onClick:P,loading:f,className:"text-red-400 hover:text-red-300 hover:bg-red-500/10 border border-red-500/20 text-sm px-3 py-1.5",children:"Disconnect"})]})]}),n.jsxs(ye,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"font-medium text-slate-200 border-b border-white/10 pb-2 mb-4",children:"API Token"}),n.jsx("div",{className:"flex gap-4",children:n.jsx(_e,{label:"Bot User OAuth Token",type:v?"text":"password",value:z,onChange:K=>U(K.target.value),className:"flex-1",rightIcon:n.jsx("button",{type:"button",onClick:()=>g(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(pu,{className:"w-4 h-4"}):n.jsx(zi,{className:"w-4 h-4"})})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(_e,{label:"App-Level Token (Socket Mode)",type:v?"text":"password",value:A,onChange:K=>T(K.target.value),placeholder:"xapp-..."}),n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Required for real-time agent mentions like ",n.jsx("code",{children:"@maya"}),"."]})]}),n.jsxs("div",{className:"flex items-center justify-between border-b border-white/10 pb-2 mb-4 mt-8",children:[n.jsx("h3",{className:"font-medium text-slate-200",children:"Channels"}),n.jsx("span",{className:"text-[10px] uppercase tracking-wider text-slate-500 font-bold",children:"Public & Visible"})]}),n.jsx("div",{className:"grid grid-cols-2 gap-6",children:[{label:"eng",id:Q},{label:"prs",id:L},{label:"incidents",id:B},{label:"releases",id:V}].map(K=>n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("label",{className:"text-xs font-medium text-slate-400 capitalize",children:["#",K.label," Channel"]}),K.id&&n.jsxs("button",{onClick:()=>window.open(`https://slack.com/app_redirect?channel=${K.id}`,"_blank"),className:"text-[10px] text-indigo-400 hover:text-indigo-300 flex items-center gap-1 transition-colors",children:["Open ",n.jsx(Ru,{className:"w-2.5 h-2.5"})]})]}),n.jsx(_e,{value:K.id,onChange:fe=>{K.label==="eng"&&q(fe.target.value),K.label==="prs"&&J(fe.target.value),K.label==="incidents"&&C(fe.target.value),K.label==="releases"&&Z(fe.target.value)},placeholder:"C1234567890"})]},K.label))}),n.jsx("div",{className:"mt-6 p-3 bg-indigo-500/5 border border-indigo-500/10 rounded-lg",children:n.jsxs("p",{className:"text-xs text-slate-400 leading-relaxed",children:[n.jsx("strong",{className:"text-indigo-300",children:"Pro Tip:"})," Channels are created as ",n.jsx("strong",{children:"Public"}),". If you don't see them in your sidebar, click ",n.jsx("b",{children:'"Add Channels" > "Browse all channels"'})," in Slack to join them for the first time."]})}),n.jsx("div",{className:"pt-6 border-t border-white/10 flex justify-end",children:n.jsx(ue,{onClick:()=>oe(!0),loading:f,children:"Save Changes"})})]})]}),k=[{number:1,title:"Create App",icon:Mv},{number:2,title:"Tokens & Scopes",icon:Z0},{number:3,title:"Channels",icon:xl}];return n.jsxs("div",{className:"max-w-4xl mx-auto space-y-8 animate-in fade-in slide-in-from-bottom-4 duration-500",children:[n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h1",{className:"text-3xl font-extrabold text-transparent bg-clip-text bg-gradient-to-r from-indigo-400 to-cyan-400 tracking-tight",children:"Integrations"}),n.jsx("p",{className:"text-slate-400",children:"Connect Night Watch to your tools for a seamless agentic workflow."})]}),we&&r===1?se():n.jsxs(ye,{className:"p-8",children:[n.jsxs("div",{className:"mb-8",children:[n.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-3",children:[n.jsx(r0,{className:"w-7 h-7 text-indigo-400"}),"Connect Slack"]}),n.jsx("p",{className:"text-slate-400 mt-2",children:"Night Watch operates natively in Slack, allowing agents to discuss PRs, triage errors, and collaborate."})]}),n.jsxs("div",{className:"flex items-center justify-between mb-8 relative",children:[n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-full h-0.5 bg-slate-800 z-0"}),n.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 h-0.5 bg-indigo-500 z-0 transition-all duration-300",style:{width:`${(r-1)/(k.length-1)*100}%`}}),k.map(K=>n.jsxs("div",{className:`relative z-10 flex flex-col items-center gap-2 ${r>=K.number?"text-indigo-400":"text-slate-500"}`,children:[n.jsx("div",{className:`w-12 h-12 rounded-full flex items-center justify-center font-bold text-lg border-2 transition-all duration-300 bg-[#0b101b]
468
+ ${r>=K.number?"border-indigo-500 glow-indigo":"border-slate-800"}
469
+ ${r===K.number?"ring-4 ring-indigo-500/20":""}
470
+ `,children:r>K.number?n.jsx(en,{className:"w-6 h-6"}):n.jsx(K.icon,{className:"w-5 h-5"})}),n.jsx("span",{className:"text-xs font-medium tracking-wide",children:K.title})]},K.number))]}),n.jsxs("div",{className:"min-h-[300px]",children:[r===1&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"1. Create a Slack App via Manifest"}),n.jsx("p",{className:"text-sm text-slate-400",children:"We've made it easy. Copy the JSON manifest below and paste it into the Slack API dashboard to create your app instantly with the correct scopes."}),n.jsxs("div",{className:"bg-[#1e293b] rounded-lg p-4 border border-white/5 relative group",children:[n.jsx("pre",{className:"text-xs text-slate-300 overflow-x-auto",children:n.jsx("code",{children:ie})}),n.jsx(ue,{size:"sm",className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>{navigator.clipboard.writeText(ie),d({title:"Copied",message:"Manifest copied to clipboard",type:"info"})},children:"Copy JSON"})]})]}),n.jsxs("div",{className:"flex justify-between items-center pt-4",children:[n.jsx(ue,{variant:"outline",onClick:()=>window.open($,"_blank"),children:"Open Slack API Console"}),n.jsxs(ue,{onClick:()=>m(2),children:["Next Step ",n.jsx(_i,{className:"w-4 h-4 ml-1"})]})]})]}),r===2&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"2. Install App & Get Token"}),n.jsxs("p",{className:"text-sm text-slate-400",children:["After creating the app, navigate to ",n.jsx("strong",{children:"Features > OAuth & Permissions"})," in the left sidebar of the Slack API dashboard. Click ",n.jsx("strong",{children:"Install to Workspace"}),". Once installed, copy the ",n.jsx("strong",{children:"Bot User OAuth Token"})," (starts with ",n.jsx("code",{children:"xoxb-"}),") and paste it below. Then create an ",n.jsx("strong",{children:"App-Level Token"})," with ",n.jsx("code",{children:"connections:write"})," (starts with ",n.jsx("code",{children:"xapp-"}),") and paste it as well. Ignore the Client ID and secrets on the Basic Information page."]}),n.jsxs("div",{className:"max-w-md mt-6",children:[n.jsx(_e,{label:"Slack Bot Token",placeholder:"xoxb-...",value:z,onChange:K=>U(K.target.value),type:v?"text":"password",rightIcon:n.jsx("button",{type:"button",onClick:()=>g(!v),className:"hover:text-slate-300 pointer-events-auto transition-colors",children:v?n.jsx(pu,{className:"w-4 h-4"}):n.jsx(zi,{className:"w-4 h-4"})})}),n.jsxs("div",{className:"mt-4",children:[n.jsx(_e,{label:"Slack App Token (Socket Mode)",placeholder:"xapp-...",value:A,onChange:K=>T(K.target.value),type:v?"text":"password"}),n.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Needed for real-time ",n.jsx("code",{children:"@agent"})," replies (Socket Mode + ",n.jsx("code",{children:"connections:write"}),")."]})]})]})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(ue,{variant:"ghost",onClick:()=>m(1),children:"Back"}),n.jsxs(ue,{onClick:ge,disabled:!z.startsWith("xoxb-")||w,children:["Next Step ",n.jsx(_i,{className:"w-4 h-4 ml-1"})]})]})]}),r===3&&n.jsxs("div",{className:"space-y-6 animate-in fade-in slide-in-from-right-4",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"3. Map Channels"}),n.jsx("p",{className:"text-sm text-slate-400",children:`Provide the Slack channel IDs where the agents should operate. You can find the Channel ID at the bottom of the channel's "About" modal in Slack.`}),n.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-8",children:p.length>0?n.jsxs(n.Fragment,{children:[n.jsxs(ye,{className:"p-4 border border-indigo-500/20 bg-indigo-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-indigo-300",children:[n.jsx(xl,{className:"w-4 h-4"})," eng"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"General engineering chat and agent banter."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map(K=>({label:"#"+K.name,value:K.id}))],value:Q,onChange:q})]}),n.jsxs(ye,{className:"p-4 border border-blue-500/20 bg-blue-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-blue-300",children:[n.jsx(xl,{className:"w-4 h-4"})," prs"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Pull Request reviews and agent deliberation."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map(K=>({label:"#"+K.name,value:K.id}))],value:L,onChange:J})]}),n.jsxs(ye,{className:"p-4 border border-red-500/20 bg-red-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-red-300",children:[n.jsx(xl,{className:"w-4 h-4"})," incidents"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"CI/CD failures and production alerts."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map(K=>({label:"#"+K.name,value:K.id}))],value:B,onChange:C})]}),n.jsxs(ye,{className:"p-4 border border-emerald-500/20 bg-emerald-500/5",children:[n.jsxs("div",{className:"mb-3",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-emerald-300",children:[n.jsx(xl,{className:"w-4 h-4"})," releases"]}),n.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Ship announcements and merged PRs."})]}),n.jsx(Xl,{options:[{label:"Select a channel...",value:""},...p.map(K=>({label:"#"+K.name,value:K.id}))],value:V,onChange:Z})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs(ye,{className:"p-4 border border-indigo-500/20 bg-indigo-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-indigo-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," eng"]}),n.jsx(_e,{placeholder:"C1234567890",value:Q,onChange:K=>q(K.target.value)})]}),n.jsxs(ye,{className:"p-4 border border-blue-500/20 bg-blue-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-blue-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," prs"]}),n.jsx(_e,{placeholder:"C1234567890",value:L,onChange:K=>J(K.target.value)})]}),n.jsxs(ye,{className:"p-4 border border-red-500/20 bg-red-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-red-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," incidents"]}),n.jsx(_e,{placeholder:"C1234567890",value:B,onChange:K=>C(K.target.value)})]}),n.jsxs(ye,{className:"p-4 border border-emerald-500/20 bg-emerald-500/5",children:[n.jsxs("h4",{className:"flex items-center gap-2 font-semibold text-emerald-300 mb-2",children:[n.jsx(xl,{className:"w-4 h-4"})," releases"]}),n.jsx(_e,{placeholder:"C1234567890",value:V,onChange:K=>Z(K.target.value)})]})]})})]}),n.jsxs("div",{className:"flex justify-between pt-8",children:[n.jsx(ue,{variant:"ghost",onClick:()=>m(2),children:"Back"}),n.jsx(ue,{onClick:()=>oe(!0),loading:f,disabled:!Q||!L||!B,children:"Complete Setup"})]})]})]})]})]})}const Zy=()=>{const[c,o]=y.useState(!0),[d,r]=y.useState(""),[m,f]=y.useState("executor"),h=y.useRef(null),{selectedProjectId:v,globalModeLoading:g}=rt(),{data:p,loading:j,error:w,refetch:D}=ct(()=>ny(m,500),[m,v],{enabled:!g}),{data:z}=ct(K0,[v],{enabled:!g}),U=(p==null?void 0:p.lines)||[];y.useEffect(()=>{c&&h.current&&(h.current.scrollTop=h.current.scrollHeight)},[U,c]),y.useEffect(()=>{if(!c)return;const q=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(q)},[c,m,D]);const A=U.filter(q=>q.toLowerCase().includes(d.toLowerCase())),T=q=>{f(q),r("")},Q=q=>{if(!(z!=null&&z.processes))return!1;const L=z.processes.find(J=>J.name===q);return(L==null?void 0:L.running)??!1};return w?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),n.jsx("div",{className:"text-sm text-slate-500",children:w.message}),n.jsx(ue,{onClick:()=>D(),children:"Retry"})]}):n.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs("div",{className:"relative group",children:[n.jsx("input",{type:"text",placeholder:"Filter logs...",className:"pl-9 pr-4 py-1.5 rounded-md border border-slate-700 bg-slate-950 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent w-64 placeholder:text-slate-600",value:d,onChange:q=>r(q.target.value)}),n.jsx(Mu,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),n.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>T("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="executor"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"Executor"}),Q("executor")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),n.jsx("button",{onClick:()=>T("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="reviewer"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"Reviewer"}),Q("reviewer")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),n.jsx("button",{onClick:()=>T("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m==="qa"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("span",{children:"QA"}),Q("qa")&&n.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs(ue,{size:"sm",variant:"ghost",onClick:()=>D(),children:[n.jsx(i0,{className:"h-4 w-4 mr-2"}),"Refresh"]}),n.jsxs(ue,{size:"sm",variant:"ghost",onClick:()=>o(!c),children:[c?n.jsx(V0,{className:"h-4 w-4 mr-2"}):n.jsx(ss,{className:"h-4 w-4 mr-2"}),c?"Pause":"Resume"]})]})]}),n.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[n.jsxs("div",{className:"bg-slate-950/50 backdrop-blur text-xs text-slate-500 px-4 py-1.5 flex justify-between border-b border-slate-800",children:[n.jsxs("span",{children:["File: ",m,".log"]}),n.jsxs("span",{children:[A.length," lines"]})]}),n.jsxs("div",{ref:h,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[j?n.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):A.length===0?n.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:d?"No logs match your filter":"No logs yet — logs will appear after the first run"}):A.map((q,L)=>{const J=q.includes("[ERROR]"),B=q.includes("[WARN]");return n.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${J?"text-red-400":B?"text-amber-400":"text-slate-300"}`,children:[n.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:L+1}),q]},L)}),c&&n.jsx("div",{className:"h-4"})," "]}),!c&&n.jsxs("div",{className:"absolute bottom-4 right-4 bg-indigo-600 text-white px-3 py-1.5 rounded-full shadow-lg shadow-indigo-900/40 text-xs font-medium flex items-center cursor-pointer hover:bg-indigo-500 transition-colors",onClick:()=>o(!0),children:[n.jsx(i0,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},$y=({isOpen:c,onClose:o,title:d,children:r})=>(y.useEffect(()=>{const m=f=>{f.key==="Escape"&&o()};return c&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[c,o]),c?ov.createPortal(n.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[n.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:o,"aria-hidden":"true"}),n.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[n.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),n.jsx("button",{onClick:o,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:n.jsx(Ft,{className:"h-5 w-5"})})]}),n.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:r})]})]}),document.body):null),ou={ready:"Ready","in-progress":"In Progress",blocked:"Blocked","pending-review":"Pending Review",done:"Done"},du={ready:"success","in-progress":"info",blocked:"error","pending-review":"warning",done:"neutral"},Ky=()=>{const[c,o]=y.useState("list"),[d,r]=y.useState(!1),[m,f]=y.useState(null),[h,v]=y.useState(!1),[g,p]=y.useState(!1),[j,w]=y.useState({}),{addToast:D,selectedProjectId:z,globalModeLoading:U}=rt(),{data:A,loading:T,error:Q,refetch:q}=ct(ly,[z],{enabled:!U}),L=A??[],{data:J}=ct(()=>Ou().catch(()=>null),[z],{enabled:!U}),B=Qe.useMemo(()=>{const $=new Map;if(!J)return $;for(const ie of Object.values(J.columns))for(const we of ie)$.set(we.title.toLowerCase().trim(),we);return $},[J]),C=$=>{if(!$.content)return $.name;const ie=$.content.match(/^#\s+(.+)$/m);return ie?ie[1].trim():$.name},V=$=>{const ie=C($).toLowerCase().trim();return B.get(ie)??null},Z=L.map($=>j[$.name]?{...$,status:j[$.name]}:$);y.useEffect(()=>{if(Object.keys(j).length>0){const $=Object.keys(j).filter(ie=>L.some(we=>we.name===ie&&we.status!=="ready"));$.length>0&&w(ie=>{const we={...ie};for(const se of $)delete we[se];return we})}},[L,j]),P0(()=>{q()},[z,U],{enabled:!U});const P=async()=>{if(m){p(!0);try{const $=await oy(m.name);D({title:"PRD Queued",message:$.message,type:"success"}),f(null),q()}catch($){D({title:"Retry Failed",message:$ instanceof Error?$.message:"Failed to retry PRD",type:"error"})}finally{p(!1)}}},oe=$=>{$.preventDefault(),r(!1)},ge=async()=>{if(m){v(!0),w($=>({...$,[m.name]:"in-progress"}));try{const $=await iy(m.name);D({title:"Executor Started",message:$.pid?`Started with PID ${$.pid}`:"Executor started",type:"success"}),q()}catch($){w(ie=>{const we={...ie};return delete we[m.name],we}),D({title:"Executor Failed",message:$ instanceof Error?$.message:"Failed to start executor",type:"error"})}finally{v(!1)}}};return y.useEffect(()=>{const $=setInterval(()=>q(),3e4);return()=>clearInterval($)},[q]),y.useEffect(()=>{const $=()=>q();return window.addEventListener("focus",$),()=>window.removeEventListener("focus",$)},[q]),y.useEffect(()=>{if(m){const $=Z.find(ie=>ie.name===m.name);$&&f($)}},[Z,m]),T?n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading PRDs..."})}):Q?n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load PRDs"}),n.jsx("div",{className:"text-sm text-slate-500",children:Q.message}),n.jsx(ue,{onClick:()=>q(),children:"Retry"})]}):n.jsxs("div",{className:"space-y-6 h-[calc(100vh-8rem)] flex flex-col",children:[n.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(ue,{variant:c==="list"?"secondary":"ghost",size:"icon",onClick:()=>o("list"),children:n.jsx(c0,{className:"h-4 w-4"})}),n.jsx(ue,{variant:c==="card"?"secondary":"ghost",size:"icon",onClick:()=>o("card"),children:n.jsx(mb,{className:"h-4 w-4"})}),n.jsx("div",{className:"h-6 w-px bg-slate-800 mx-2"}),n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("span",{className:"px-3 py-1 bg-slate-800 text-slate-200 rounded-full text-xs font-medium cursor-pointer border border-slate-700",children:"All"}),n.jsx("span",{className:"px-3 py-1 text-slate-500 hover:bg-slate-800 hover:text-slate-300 rounded-full text-xs font-medium cursor-pointer transition-colors",children:"Ready"}),n.jsx("span",{className:"px-3 py-1 text-slate-500 hover:bg-slate-800 hover:text-slate-300 rounded-full text-xs font-medium cursor-pointer transition-colors",children:"In Progress"})]})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(ue,{variant:"outline",size:"sm",children:[n.jsx(Sv,{className:"h-4 w-4 mr-2"}),"Sort"]}),n.jsxs(ue,{onClick:()=>r(!0),size:"sm",children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"New PRD"]})]})]}),n.jsx("div",{className:"flex-1 overflow-y-auto pr-1 pb-10",children:c==="list"?n.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:n.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[n.jsx("thead",{className:"bg-slate-950/50",children:n.jsxs("tr",{children:[n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Name"}),n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Status"}),n.jsx("th",{scope:"col",className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Dependencies"}),n.jsx("th",{scope:"col",className:"relative px-6 py-3",children:n.jsx("span",{className:"sr-only",children:"Actions"})})]})}),n.jsxs("tbody",{className:"divide-y divide-slate-800",children:[Z.map($=>n.jsxs("tr",{className:"hover:bg-slate-800/50 group cursor-pointer transition-colors",onClick:()=>f($),children:[n.jsxs("td",{className:"px-6 py-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"text-sm font-medium text-slate-200",children:$.name}),(()=>{const ie=V($);return ie?n.jsxs("a",{href:ie.url,target:"_blank",rel:"noopener noreferrer",onClick:we=>we.stopPropagation(),className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20 hover:bg-indigo-500/20 transition-colors",title:`Board: #${ie.number} — ${ie.column}`,children:["#",ie.number," · ",ie.column]}):null})()]}),$.unmetDependencies.length>0&&n.jsxs("div",{className:"text-xs text-amber-400 mt-1",children:["Blocked by: ",$.unmetDependencies.join(", ")]})]}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:n.jsx(ma,{variant:du[$.status],children:ou[$.status]})}),n.jsx("td",{className:"px-6 py-4",children:$.dependencies.length>0?n.jsx("div",{className:"flex flex-wrap gap-1",children:$.dependencies.map(ie=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 text-slate-400 text-xs rounded border border-slate-700",children:ie},ie))}):n.jsx("span",{className:"text-sm text-slate-600",children:"None"})}),n.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium",children:n.jsx("button",{className:"text-slate-500 hover:text-slate-300 opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(Wv,{className:"h-4 w-4"})})})]},$.name)),Z.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:4,className:"px-6 py-12 text-center text-slate-500",children:"No PRDs found. Create your first PRD to get started."})})]})]})}):n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Z.map($=>n.jsxs(ye,{className:"p-5 flex flex-col h-full hover:border-indigo-500/50 transition-colors",onClick:()=>f($),children:[n.jsxs("div",{className:"flex justify-between items-start mb-4",children:[n.jsx(ma,{variant:du[$.status],children:ou[$.status]}),$.status==="in-progress"&&n.jsx("div",{className:"h-2 w-2 bg-blue-500 rounded-full animate-pulse"}),$.status==="pending-review"&&n.jsx("div",{className:"h-2 w-2 bg-yellow-500 rounded-full animate-pulse"})]}),n.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:$.name}),(()=>{const ie=V($);return ie?n.jsxs("a",{href:ie.url,target:"_blank",rel:"noopener noreferrer",onClick:we=>we.stopPropagation(),className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20 hover:bg-indigo-500/20 transition-colors flex-shrink-0",children:["#",ie.number," · ",ie.column]}):null})()]}),$.content&&n.jsx("p",{className:"text-sm text-slate-400 flex-1 line-clamp-3",children:$.content.replace(/^#.*\n/,"")}),n.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-800",children:[$.dependencies.length>0&&n.jsx("div",{className:"flex flex-wrap gap-1 mb-2",children:$.dependencies.map(ie=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 text-slate-400 text-xs rounded border border-slate-700",children:ie},ie))}),$.unmetDependencies.length>0&&n.jsxs("div",{className:"text-xs text-amber-400",children:["Blocked by: ",$.unmetDependencies.join(", ")]})]})]},$.name)),Z.length===0&&n.jsx("div",{className:"col-span-full text-center py-12 text-slate-500",children:"No PRDs found. Create your first PRD to get started."})]})}),n.jsx($y,{isOpen:d,onClose:()=>r(!1),title:"Create New PRD",children:n.jsxs("form",{onSubmit:oe,className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Name"}),n.jsx("input",{type:"text",className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500 placeholder:text-slate-600",placeholder:"e.g. User Authentication"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Complexity"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("input",{type:"range",min:"1",max:"10",className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),n.jsx("span",{className:"text-sm font-bold text-slate-300 w-16 text-center",children:"MED"})]})]}),n.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Phases"}),n.jsx("input",{type:"number",defaultValue:3,min:1,max:10,className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Template"}),n.jsxs("select",{className:"w-full rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-sm text-slate-200 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:[n.jsx("option",{children:"Default"}),n.jsx("option",{children:"Feature"}),n.jsx("option",{children:"Bugfix"})]})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1",children:"Dependencies"}),n.jsxs("div",{className:"bg-slate-950/30 p-3 rounded-md border border-slate-800 max-h-32 overflow-y-auto space-y-2",children:[Z.map($=>n.jsxs("label",{className:"flex items-center space-x-2 text-sm text-slate-300 cursor-pointer",children:[n.jsx("input",{type:"checkbox",className:"rounded border-slate-600 bg-slate-800 text-indigo-500 focus:ring-indigo-500/50 focus:ring-offset-slate-900"}),n.jsx("span",{children:$.name})]},$.name)),Z.length===0&&n.jsx("p",{className:"text-sm text-slate-600 italic",children:"No existing PRDs"})]})]}),n.jsxs("div",{className:"flex justify-end pt-4 space-x-3",children:[n.jsx(ue,{type:"button",variant:"ghost",onClick:()=>r(!1),children:"Cancel"}),n.jsx(ue,{type:"submit",children:"Create PRD"})]})]})}),m&&n.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[n.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:()=>f(null)}),n.jsxs("div",{className:"relative w-full max-w-xl bg-slate-900 h-full shadow-2xl flex flex-col transform transition-transform animate-in slide-in-from-right duration-300 border-l border-slate-800",children:[n.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-slate-800",children:[n.jsx("h2",{className:"text-lg font-bold text-slate-100 line-clamp-1",children:m.name}),n.jsx("button",{onClick:()=>f(null),className:"p-2 hover:bg-slate-800 rounded-full",children:n.jsx(c0,{className:"h-5 w-5 text-slate-500"})})]}),n.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-6 space-y-6",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx(ma,{variant:du[m.status],className:"text-sm px-3 py-1",children:ou[m.status]})}),m.content&&n.jsxs("div",{className:"prose prose-sm prose-invert max-w-none",children:[n.jsx("h3",{className:"uppercase text-xs font-bold text-slate-500 tracking-wider mb-2",children:"Description"}),n.jsx("div",{className:"whitespace-pre-wrap text-slate-300 bg-slate-950/50 p-4 rounded-lg border border-slate-800 font-mono text-sm",children:m.content})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx("h3",{className:"uppercase text-xs font-bold text-slate-500 tracking-wider",children:"Dependencies"}),m.dependencies.length?n.jsx("div",{className:"flex flex-wrap gap-2",children:m.dependencies.map($=>n.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-300 text-xs rounded border border-slate-700",children:$},$))}):n.jsx("p",{className:"text-sm text-slate-500 italic",children:"No dependencies."}),m.unmetDependencies.length>0&&n.jsx("div",{className:"mt-2",children:n.jsxs("p",{className:"text-sm text-amber-400",children:["Unmet dependencies: ",m.unmetDependencies.join(", ")]})})]})]}),n.jsx("div",{className:"p-4 border-t border-slate-800 bg-slate-900 flex space-x-3",children:m.status==="done"?n.jsxs(ue,{className:"flex-1",onClick:P,disabled:g,children:[n.jsx(Di,{className:"h-4 w-4 mr-2"}),g?"Moving...":"Retry"]}):n.jsxs(ue,{className:"flex-1",onClick:ge,disabled:h||m.status==="in-progress",children:[n.jsx(ss,{className:"h-4 w-4 mr-2"}),h?"Executing...":"Execute Now"]})})]})]})]})},x0=c=>{switch(c){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available or CI not configured"}},Ci=c=>c===null?"No review yet or review not required":c===100?"PR has been approved":c===0?"Changes have been requested":`Review score: ${c}`,Jy=()=>{const[c,o]=y.useState(null),[d,r]=y.useState(!1),[m,f]=y.useState("all"),[h,v]=y.useState("number"),[g,p]=y.useState("desc"),{addToast:j,selectedProjectId:w,globalModeLoading:D}=rt(),{data:z,loading:U,error:A,refetch:T}=ct(ay,[w],{enabled:!D}),Q=z??[],q=Z=>{switch(Z){case"pass":return n.jsx(ns,{className:"h-4 w-4 text-green-500"});case"fail":return n.jsx(xu,{className:"h-4 w-4 text-red-500"});case"pending":return n.jsx(G0,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return n.jsx(Xv,{className:"h-4 w-4 text-slate-500"})}},L=y.useMemo(()=>Q.filter(Z=>{switch(m){case"needs-work":return Z.ciStatus==="fail"||Z.reviewScore===0;case"pending":return Z.ciStatus==="pending"||Z.ciStatus==="unknown"||Z.reviewScore===null;case"passed":return Z.ciStatus==="pass"&&Z.reviewScore===100;case"all":default:return!0}}),[Q,m]),J=y.useMemo(()=>[...L].sort((P,oe)=>{let ge=0;switch(h){case"number":ge=P.number-oe.number;break;case"title":ge=P.title.localeCompare(oe.title);break;case"branch":ge=P.branch.localeCompare(oe.branch);break;case"ciStatus":{const $={fail:0,pending:1,unknown:2,pass:3};ge=($[P.ciStatus]??2)-($[oe.ciStatus]??2);break}case"reviewScore":{const $=P.reviewScore??-1,ie=oe.reviewScore??-1;ge=$-ie;break}}return g==="asc"?ge:-ge}),[L,h,g]),B=Z=>{h===Z?p(g==="asc"?"desc":"asc"):(v(Z),p("desc"))},C=Z=>h!==Z?n.jsx(jv,{className:"h-3 w-3 text-slate-600"}):g==="asc"?n.jsx(Cv,{className:"h-3 w-3 text-indigo-400"}):n.jsx(vv,{className:"h-3 w-3 text-indigo-400"});if(U)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(A)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),n.jsx("div",{className:"text-sm text-slate-500",children:A.message}),n.jsx(ue,{onClick:()=>T(),children:"Retry"})]});const V=async()=>{r(!0);try{const Z=await cy();j({title:"Reviewer Started",message:Z.pid?`Started with PID ${Z.pid}`:"Reviewer started",type:"success"})}catch(Z){j({title:"Reviewer Failed",message:Z instanceof Error?Z.message:"Failed to start reviewer",type:"error"})}finally{r(!1)}};return n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex space-x-1",children:[n.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),n.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),n.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),n.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),n.jsxs(ue,{size:"sm",onClick:V,disabled:d,children:[n.jsx(Mu,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),n.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:n.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[n.jsx("thead",{className:"bg-slate-950/50",children:n.jsxs("tr",{children:[n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("number"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Title"}),C("number")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("branch"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Branch"}),C("branch")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("ciStatus"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"CI Status"}),C("ciStatus")]})}),n.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase tracking-wider cursor-pointer hover:text-slate-300",onClick:()=>B("reviewScore"),children:n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{children:"Review Score"}),C("reviewScore")]})}),n.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),n.jsxs("tbody",{className:"divide-y divide-slate-800",children:[J.map(Z=>n.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>o(c===Z.number?null:Z.number),children:[n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center",children:[n.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",Z.number]}),n.jsx("span",{className:"font-medium text-slate-200",children:Z.title})]})}),n.jsx("td",{className:"px-6 py-4",children:n.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:Z.branch})}),n.jsx("td",{className:"px-6 py-4",children:n.jsxs("div",{className:"flex items-center space-x-2",title:x0(Z.ciStatus),children:[q(Z.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-400",children:Z.ciStatus})]})}),n.jsx("td",{className:"px-6 py-4",children:Z.reviewScore!==null?n.jsxs("div",{className:"flex items-center space-x-2",title:Ci(Z.reviewScore),children:[n.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full ${Z.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${Z.reviewScore}%`}})}),n.jsx("span",{className:`text-sm font-bold ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]}):n.jsx("span",{className:"text-slate-600 text-sm",title:Ci(null),children:"—"})}),n.jsx("td",{className:"px-6 py-4 text-right",children:n.jsx("a",{href:Z.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:P=>P.stopPropagation(),children:n.jsx(Ru,{className:"h-4 w-4"})})})]},Z.number)),J.length===0&&n.jsx("tr",{children:n.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Q.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),c&&n.jsx(ye,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const Z=Q.find(P=>P.number===c);return Z?n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"font-bold text-slate-200",children:Z.title}),n.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",n.jsx("span",{className:"font-mono",children:Z.branch})]})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"text-center",title:x0(Z.ciStatus),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),n.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[q(Z.ciStatus),n.jsx("span",{className:"text-sm capitalize text-slate-300",children:Z.ciStatus})]})]}),Z.reviewScore!==null?n.jsxs("div",{className:"text-center",title:Ci(Z.reviewScore),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),n.jsx("div",{className:`text-xl font-bold mt-1 ${Z.reviewScore>=70?"text-green-500":"text-red-500"}`,children:Z.reviewScore})]}):n.jsxs("div",{className:"text-center",title:Ci(null),children:[n.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),n.jsx("div",{className:"text-xl font-bold mt-1 text-slate-500",children:"—"})]})]})]}):null})()})]})},fa=Qe.forwardRef(({className:c="",label:o,checked:d,onChange:r,...m},f)=>{const h=v=>{r&&r(v.target.checked)};return n.jsxs("label",{className:`inline-flex items-center cursor-pointer ${c}`,children:[n.jsxs("div",{className:"relative",children:[n.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:d,onChange:h,...m}),n.jsx("div",{className:"w-11 h-6 bg-slate-800 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500/50 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-slate-400 after:border-slate-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600 peer-checked:after:bg-white peer-disabled:opacity-50 peer-disabled:cursor-not-allowed"})]}),o&&n.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:o})]})});fa.displayName="Switch";const Fy=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=rt(),[r,m]=y.useState(!1),[f,h]=y.useState(!1),{data:v,loading:g,error:p,refetch:j}=ct(hy,[o],{enabled:!d});y.useEffect(()=>{if(!(v!=null&&v.enabled))return;const q=setInterval(()=>{j()},1e4);return()=>clearInterval(q)},[v==null?void 0:v.enabled,j]);const w=async q=>{h(!0);try{await W0(q),c({title:q?"Scanner Enabled":"Scanner Disabled",message:q?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:q?"success":"info"}),j()}catch(L){c({title:"Toggle Failed",message:L instanceof Error?L.message:"Failed to toggle scanner",type:"error"})}finally{h(!1)}},D=async()=>{m(!0);try{const q=await xy();q.created.length>0?c({title:"Scan Complete",message:`Created ${q.created.length} PRD(s): ${q.created.join(", ")}`,type:"success"}):c({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),q.errors.length>0&&c({title:"Scan Errors",message:q.errors.join("; "),type:"warning"}),j()}catch(q){c({title:"Scan Failed",message:q instanceof Error?q.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(g)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),n.jsx("div",{className:"text-sm text-slate-500",children:p.message}),n.jsx(ue,{onClick:()=>j(),children:"Retry"})]});if(!v)return null;if(v.status==="no-roadmap")return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),n.jsx(ye,{className:"p-12",children:n.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[n.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:n.jsx(Q0,{className:"h-10 w-10 text-slate-500"})}),n.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),n.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",n.jsx("code",{className:"text-indigo-400 bg-indigo-500/10 px-1.5 py-0.5 rounded text-sm",children:"ROADMAP.md"})," in your project root with checklist items (",n.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",n.jsx("code",{className:"text-slate-300 text-sm",children:"### Feature"}),") to get started."]})]})})]});const z=v.totalItems>0?Math.round(v.processedItems/v.totalItems*100):0,U=Py(v.status),A=Iy(v.items),T=v.lastScan?e1(v.lastScan):"Never",Q=v.autoScanInterval?Math.round(v.autoScanInterval/60):5;return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(fa,{label:v.enabled?"Enabled":"Disabled",checked:v.enabled,onChange:w,disabled:f}),n.jsxs(ue,{onClick:D,loading:r,disabled:!v.enabled||v.status==="complete",children:[n.jsx(ss,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),n.jsx(ye,{className:`p-6 border-2 ${U.borderColor}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(U.icon,{className:`h-8 w-8 ${U.textColor}`}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),n.jsx("div",{className:`text-2xl font-bold ${U.textColor}`,children:U.label})]})]}),n.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[n.jsxs("div",{children:["Last scan: ",n.jsx("span",{className:"text-slate-300",children:T})]}),v.enabled&&v.status!=="complete"&&n.jsxs("div",{children:["Auto-scan: ",n.jsxs("span",{className:"text-slate-300",children:["every ",Q," min"]})]}),v.enabled&&v.status==="complete"&&n.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),n.jsxs(ye,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-3",children:[n.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),n.jsxs("span",{className:"text-sm text-slate-400",children:[v.processedItems," / ",v.totalItems," items (",z,"%)"]})]}),n.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:n.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${z===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${z}%`}})})]}),Object.entries(A).map(([q,L])=>n.jsxs(ye,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:q}),n.jsx("div",{className:"space-y-2",children:L.map(J=>n.jsx(Wy,{item:J},J.hash))})]},q))]})};function Wy({item:c}){const o=c.checked,d=c.processed;return n.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${o?"bg-slate-950/30 border-slate-800/50":d?"bg-emerald-500/5 border-emerald-500/10":"bg-slate-950/50 border-slate-800"}`,children:[n.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[o?n.jsx(vb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?n.jsx(ns,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):n.jsx(lb,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),n.jsxs("div",{className:"min-w-0",children:[n.jsx("div",{className:`text-sm font-medium truncate ${o?"line-through text-slate-600":"text-slate-200"}`,children:c.title}),c.description&&n.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:c.description})]})]}),n.jsx("div",{className:"flex-shrink-0 ml-3",children:o?n.jsx(ma,{variant:"neutral",children:"Skipped"}):d?n.jsx(ma,{variant:"success",children:c.prdFile||"Processed"}):n.jsx(ma,{variant:"warning",children:"Pending"})})]})}function Py(c){switch(c){case"complete":return{label:"Complete",icon:ns,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Mi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:ss,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Kt,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Kt,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function Iy(c){const o={};for(const d of c){const r=d.section||"General";o[r]||(o[r]=[]),o[r].push(d)}return o}function e1(c){try{const o=new Date(c),r=new Date().getTime()-o.getTime(),m=Math.floor(r/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const Hu=[{label:"Every 30 minutes",value:"*/30 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Every 3 hours",value:"0 */3 * * *"},{label:"Every 6 hours",value:"0 */6 * * *"},{label:"Every 12 hours",value:"0 */12 * * *"},{label:"Daily at midnight",value:"0 0 * * *"},{label:"Daily at 9 AM",value:"0 9 * * *"},{label:"Weekdays at 9 AM",value:"0 9 * * 1-5"},{label:"Custom",value:"__custom__"}];function fu(c){const o=c.trim().split(/\s+/);if(o.length!==5)return c;const[d,r,m,f,h]=o,v=Hu.find(g=>g.value===c);return v?v.label:d==="*/30"&&r==="*"?"Every 30 minutes":d==="0"&&r==="*"?"Every hour":d.startsWith("*/")?`Every ${parseInt(d.replace("*/",""),10)} minutes`:d==="0"&&r.startsWith("*/")?`Every ${parseInt(r.replace("*/",""),10)} hours`:d==="0"&&r!=="*"&&m==="*"&&f==="*"&&h==="*"?`Daily at ${p0(r)}`:d==="0"&&r!=="*"&&m==="*"&&f==="*"&&h==="1-5"?`Weekdays at ${p0(r)}`:c}function p0(c){const o=parseInt(c,10);return o===0?"12 AM":o<12?`${o} AM`:o===12?"12 PM":`${o-12} PM`}function t1(c){const o=Hu.find(d=>d.value===c);return(o==null?void 0:o.value)??"__custom__"}function l1(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4),m=Math.floor(r/60),f=Math.floor(m/24);return r<1?"less than a minute":r<60?`in ${r} minute${r>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function a1(c){const o={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return c.toLocaleDateString("en-US",o)}function n1(c){const o=new Date,d=c.getTime()-o.getTime(),r=Math.floor(d/6e4);return r>=0&&r<30}const s1=()=>{const{addToast:c,selectedProjectId:o,globalModeLoading:d}=rt(),[r,m]=y.useState(!1),[f,h]=y.useState(!1),[v,g]=y.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),{data:p,loading:j,error:w,refetch:D}=ct(J0,[o],{enabled:!d}),{data:z,loading:U,refetch:A}=ct(Du,[o],{enabled:!d});y.useEffect(()=>{const P=setInterval(()=>{D()},3e4);return()=>clearInterval(P)},[D]),y.useEffect(()=>{z&&!v.isEditing&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!1})},[z,v.isEditing]);const T=async()=>{if(p){m(!0);try{p.paused?(await d0(),c({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await ry(),c({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),D()}catch(P){c({title:"Action Failed",message:P instanceof Error?P.message:"Failed to toggle schedule state",type:"error"})}finally{m(!1)}}},Q=()=>{z&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!0})},q=()=>{z&&g({executorSchedule:z.cronSchedule,reviewerSchedule:z.reviewerSchedule,isEditing:!1})},L=async()=>{if(z){h(!0);try{await Oi({cronSchedule:v.executorSchedule,reviewerSchedule:v.reviewerSchedule}),await d0(),c({title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"}),g(P=>({...P,isEditing:!1})),A(),D()}catch(P){c({title:"Save Failed",message:P instanceof Error?P.message:"Failed to save schedules",type:"error"})}finally{h(!1)}}},J=(P,oe)=>{if(!P)return n.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const ge=new Date(P),$=n1(ge);return n.jsxs("div",{className:"flex items-center space-x-2",children:[$&&n.jsxs("span",{className:"relative flex h-3 w-3",children:[n.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),n.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),n.jsxs("div",{className:"text-sm",children:[n.jsx("span",{className:"text-slate-200 font-medium",children:l1(ge)}),n.jsxs("span",{className:"text-slate-500 ml-2",children:["(",a1(ge),")"]})]})]})},B=(P,oe,ge,$)=>{const ie=t1(oe),we=ie==="__custom__";return n.jsxs("div",{className:`space-y-3 ${$?"opacity-50 pointer-events-none":""}`,children:[n.jsx("div",{className:"flex items-center space-x-3",children:n.jsx(Xl,{label:`${P} Preset`,options:Hu,value:ie,onChange:se=>{se!=="__custom__"&&ge(se)},className:"flex-1"})}),we&&n.jsx(_e,{label:"Custom Cron Expression",value:oe,onChange:se=>ge(se.target.value),placeholder:"* * * * *",helperText:"Format: minute hour day month weekday (e.g., 0 */2 * * * for every 2 hours)"}),n.jsxs("div",{className:"text-sm text-slate-400",children:["Human-readable: ",n.jsx("span",{className:"text-slate-200",children:fu(oe)})]})]})};if(j||U)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(w||!p||!z)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),n.jsx("div",{className:"text-sm text-slate-500",children:(w==null?void 0:w.message)||"Unknown error"}),n.jsx(ue,{onClick:()=>{D(),A()},children:"Retry"})]});const C=p.paused,V=C?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Z=C?"Paused":"Active";return n.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"})}),n.jsx(ye,{className:`p-6 border-2 ${V}`,children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx(Mi,{className:"h-8 w-8"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400",children:"Cron Status"}),n.jsx("div",{className:"text-2xl font-bold",children:Z})]})]}),n.jsx(ue,{variant:C?"primary":"outline",size:"lg",onClick:T,loading:r,children:C?n.jsxs(n.Fragment,{children:[n.jsx(ss,{className:"h-5 w-5 mr-2"}),"Resume"]}):n.jsxs(n.Fragment,{children:[n.jsx(V0,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(ye,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Executor Schedule"}),!v.isEditing&&n.jsxs(ue,{variant:"ghost",size:"sm",onClick:Q,children:[n.jsx(Mb,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),v.isEditing?B("Executor",v.executorSchedule,P=>g(oe=>({...oe,executorSchedule:P}))):n.jsx(n.Fragment,{children:n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),n.jsx("div",{className:"text-lg text-slate-200 font-medium",children:fu(z.cronSchedule)}),n.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:z.cronSchedule})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),J(p.executor.nextRun,z.cronSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${p.executor.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(en,{className:"h-4 w-4"}),n.jsx("span",{children:p.executor.installed?"Installed":"Not installed"})]})]})})]}),n.jsxs(ye,{className:`p-6 ${z.reviewerEnabled?"":"opacity-50"}`,children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Reviewer Schedule"}),!z.reviewerEnabled&&n.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),v.isEditing?B("Reviewer",v.reviewerSchedule,P=>g(oe=>({...oe,reviewerSchedule:P})),!z.reviewerEnabled):n.jsx(n.Fragment,{children:n.jsx("div",{className:"space-y-4",children:z.reviewerEnabled?n.jsxs(n.Fragment,{children:[n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),n.jsx("div",{className:"text-lg text-slate-200 font-medium",children:fu(z.reviewerSchedule)}),n.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:z.reviewerSchedule})]}),n.jsxs("div",{children:[n.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),J(p.reviewer.nextRun,z.reviewerSchedule)]}),n.jsxs("div",{className:`flex items-center space-x-2 text-sm ${p.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[n.jsx(en,{className:"h-4 w-4"}),n.jsx("span",{children:p.reviewer.installed?"Installed":"Not installed"})]})]}):n.jsx("div",{className:"text-slate-500 text-sm",children:"Automated reviews are disabled. Enable them in Settings to configure the reviewer schedule."})})})]})]}),n.jsxs(ye,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[n.jsx(Ri,{className:"h-5 w-5 text-slate-400"}),n.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),p.entries.length===0?n.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):n.jsx("div",{className:"space-y-2",children:p.entries.map((P,oe)=>n.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:P},oe))})]}),v.isEditing&&n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[n.jsx(ue,{variant:"ghost",onClick:q,children:"Cancel"}),n.jsxs(ue,{onClick:L,loading:f,children:[n.jsx(en,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},i1=({tabs:c,activeTab:o,onChange:d,className:r=""})=>{var g,p;const[m,f]=Qe.useState((g=c[0])==null?void 0:g.id),h=o||m,v=j=>{d?d(j):f(j)};return n.jsxs("div",{className:`flex flex-col ${r}`,children:[n.jsx("div",{className:"border-b border-slate-800 mb-6",children:n.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:c.map(j=>n.jsx("button",{onClick:()=>v(j.id),className:`
471
471
  whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
472
472
  ${h===j.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
473
- `,children:j.label},j.id))})}),n.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=c.find(j=>j.id===h))==null?void 0:p.content})]})},c1={enabled:!1,botToken:"",channels:{eng:"",prs:"",incidents:"",releases:""},autoCreateProjectChannels:!1,discussionEnabled:!1},g0=c=>({provider:c.provider,defaultBranch:c.defaultBranch,branchPrefix:c.branchPrefix,branchPatterns:c.branchPatterns||[],reviewerEnabled:c.reviewerEnabled,minReviewScore:c.minReviewScore,maxRuntime:c.maxRuntime,reviewerMaxRuntime:c.reviewerMaxRuntime,maxLogSize:c.maxLogSize,cronScheduleOffset:c.cronScheduleOffset??0,maxRetries:c.maxRetries??3,providerEnv:c.providerEnv||{},notifications:c.notifications||{webhooks:[]},prdPriority:c.prdPriority||[],roadmapScanner:c.roadmapScanner||{enabled:!1,roadmapPath:"ROADMAP.md",autoScanInterval:300},templatesDir:c.templatesDir||".night-watch/templates",slack:c.slack??c1}),r1=c=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>c.toUpperCase().includes(d)),u1=({value:c,isSensitive:o})=>{const[d,r]=Ye.useState(!1);return o?n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?c:"••••••••••••"}),n.jsx("button",{type:"button",onClick:()=>r(!d),className:"text-slate-500 hover:text-slate-300",children:d?n.jsx(xu,{className:"h-4 w-4"}):n.jsx(zi,{className:"h-4 w-4"})})]}):n.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:c})},o1=({envVars:c,onChange:o})=>{const[d,r]=Ye.useState(""),[m,f]=Ye.useState(""),[h,v]=Ye.useState(null),[g,p]=Ye.useState(""),j=()=>{if(d.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(d)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}o({...c,[d]:m}),r(""),f("")}},w=R=>{const G={...c};delete G[R],o(G)},D=R=>{v(R),p(c[R])},z=()=>{h&&(o({...c,[h]:g}),v(null),p(""))},U=()=>{v(null),p("")},A=Object.entries(c);return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),n.jsx("div",{className:"space-y-2",children:A.length===0?n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):A.map(([R,G])=>n.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[n.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[n.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:R}),h===R?n.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[n.jsx("input",{type:"text",value:g,onChange:q=>p(q.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),n.jsx("button",{type:"button",onClick:z,className:"p-1 text-green-400 hover:text-green-300",children:n.jsx(en,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:U,className:"p-1 text-slate-400 hover:text-slate-300",children:n.jsx(Ft,{className:"h-4 w-4"})})]}):n.jsx(u1,{value:G,isSensitive:r1(R)})]}),h!==R&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>D(R),className:"p-1 text-slate-400 hover:text-slate-200",children:n.jsx(Ru,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>w(R),className:"p-1 text-red-400 hover:text-red-300",children:n.jsx(Mu,{className:"h-4 w-4"})})]})]},R))}),n.jsxs("div",{className:"flex items-end gap-3 pt-4 border-t border-slate-800",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),n.jsx("input",{type:"text",value:d,onChange:R=>r(R.target.value.toUpperCase()),placeholder:"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),n.jsx("input",{type:"text",value:m,onChange:R=>f(R.target.value),placeholder:"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),n.jsxs(ue,{onClick:j,disabled:!d.trim(),children:[n.jsx(gl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},d1=({notifications:c,onChange:o})=>{const[d,r]=Ye.useState(null),[m,f]=Ye.useState(!1),[h,v]=Ye.useState({type:"slack",url:"",events:[]}),g=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],p=()=>{o({webhooks:[...c.webhooks,h]}),v({type:"slack",url:"",events:[]}),f(!1)},j=(U,A)=>{const R=[...c.webhooks];R[U]=A,o({webhooks:R})},w=U=>{o({webhooks:c.webhooks.filter((A,R)=>R!==U)})},D=(U,A)=>U.includes(A)?U.filter(R=>R!==A):[...U,A],z=({webhook:U,onChange:A,onSave:R,onCancel:G,isNew:q})=>n.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsx(Xl,{label:"Type",value:U.type,onChange:L=>{const J=L;A(J==="telegram"?{type:J,botToken:"",chatId:"",events:U.events}:{type:J,url:"",events:U.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),U.type==="telegram"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"relative",children:n.jsx(_e,{label:"Bot Token",type:"password",value:U.botToken||"",onChange:L=>A({...U,botToken:L.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),n.jsx(_e,{label:"Chat ID",value:U.chatId||"",onChange:L=>A({...U,chatId:L.target.value}),placeholder:"123456789"})]}):n.jsx("div",{className:"md:col-span-2",children:n.jsx(_e,{label:"Webhook URL",type:"password",value:U.url||"",onChange:L=>A({...U,url:L.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),n.jsx("div",{className:"flex flex-wrap gap-2",children:g.map(L=>n.jsx("button",{type:"button",onClick:()=>A({...U,events:D(U.events,L.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${U.events.includes(L.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:L.label},L.value))})]}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(ue,{variant:"ghost",onClick:G,children:"Cancel"}),n.jsx(ue,{onClick:R,disabled:U.events.length===0||(U.type==="telegram"?!U.botToken||!U.chatId:!U.url),children:q?"Add Webhook":"Save Changes"})]})]});return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),n.jsx("div",{className:"space-y-3",children:c.webhooks.length===0?n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):c.webhooks.map((U,A)=>n.jsx("div",{children:d===A?n.jsx(z,{webhook:U,onChange:R=>j(A,R),onSave:()=>r(null),onCancel:()=>r(null)}):n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:U.type}),U.type==="telegram"&&n.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",U.chatId]})]}),n.jsx("div",{className:"flex flex-wrap gap-1",children:U.events.map(R=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:R.replace("_"," ")},R))})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>r(A),className:"p-2 text-slate-400 hover:text-slate-200",children:n.jsx(Ru,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>w(A),className:"p-2 text-red-400 hover:text-red-300",children:n.jsx(Mu,{className:"h-4 w-4"})})]})]})},A))}),m?n.jsx(z,{webhook:h,onChange:v,onSave:p,onCancel:()=>f(!1),isNew:!0}):n.jsxs(ue,{variant:"ghost",onClick:()=>f(!0),children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},v0=({label:c,value:o,onChange:d,placeholder:r,helpText:m})=>{const[f,h]=Ye.useState(""),v=()=>{f.trim()&&!o.includes(f.trim())&&(d([...o,f.trim()]),h(""))},g=j=>{d(o.filter(w=>w!==j))},p=j=>{j.key==="Enter"&&(j.preventDefault(),v())};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:o.map(j=>n.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[j,n.jsx("button",{type:"button",onClick:()=>g(j),className:"text-slate-500 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},j))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{type:"text",value:f,onChange:j=>h(j.target.value),onKeyDown:p,placeholder:r,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),n.jsx(ue,{onClick:v,disabled:!f.trim(),children:n.jsx(gl,{className:"h-4 w-4"})})]}),m&&n.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},f1=()=>{const{addToast:c,projectName:o,selectedProjectId:d,globalModeLoading:r}=rt(),[m,f]=Ye.useState(!1),[h,v]=Ye.useState(null),{data:g,loading:p,error:j,refetch:w}=ct(zu,[d],{enabled:!r}),{data:D,loading:z,refetch:U}=ct(sy,[d],{enabled:!r}),A=D??[];Ye.useEffect(()=>{g&&v(g0(g))},[g]);const R=(B,C)=>{v(Q=>Q&&{...Q,[B]:C})},G=async()=>{if(h){f(!0);try{await Du({provider:h.provider,defaultBranch:h.defaultBranch,branchPrefix:h.branchPrefix,branchPatterns:h.branchPatterns,reviewerEnabled:h.reviewerEnabled,minReviewScore:h.minReviewScore,maxRuntime:h.maxRuntime,reviewerMaxRuntime:h.reviewerMaxRuntime,maxLogSize:h.maxLogSize,cronScheduleOffset:h.cronScheduleOffset,maxRetries:h.maxRetries,providerEnv:h.providerEnv,notifications:h.notifications,prdPriority:h.prdPriority,roadmapScanner:h.roadmapScanner,templatesDir:h.templatesDir,slack:h.slack}),c({title:"Settings Saved",message:"Configuration updated successfully.",type:"success"}),w(),U()}catch(B){c({title:"Save Failed",message:B instanceof Error?B.message:"Failed to save configuration",type:"error"})}finally{f(!1)}}},q=()=>{g&&(v(g0(g)),c({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},L=async B=>{try{const C=await W0(B);R("roadmapScanner",C.roadmapScanner),c({title:B?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${B?"enabled":"disabled"}.`,type:"success"})}catch(C){c({title:"Toggle Failed",message:C instanceof Error?C.message:"Failed to toggle roadmap scanner",type:"error"})}};if(p||!h)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(j)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),n.jsx("div",{className:"text-sm text-slate-500",children:j.message}),n.jsx(ue,{onClick:()=>w(),children:"Retry"})]});const J=[{id:"general",label:"General",content:n.jsxs(be,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(_e,{label:"Project Name",value:o,disabled:!0}),n.jsx(Xl,{label:"Provider",value:h.provider,onChange:B=>R("provider",B),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),n.jsx(_e,{label:"Default Branch",value:h.defaultBranch,onChange:B=>R("defaultBranch",B.target.value)}),n.jsx(_e,{label:"Branch Prefix",value:h.branchPrefix,onChange:B=>R("branchPrefix",B.target.value)}),n.jsx("div",{className:"md:col-span-2",children:n.jsx(fa,{label:"Enable Automated Reviews",checked:h.reviewerEnabled,onChange:B=>R("reviewerEnabled",B)})})]})]})},{id:"runtime",label:"Runtime",content:n.jsxs(be,{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("input",{type:"range",min:"0",max:"100",value:h.minReviewScore,onChange:B=>R("minReviewScore",Number(B.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),n.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:h.minReviewScore})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(_e,{label:"Max Runtime (Executor)",type:"number",value:String(h.maxRuntime),onChange:B=>R("maxRuntime",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(_e,{label:"Max Runtime (Reviewer)",type:"number",value:String(h.reviewerMaxRuntime),onChange:B=>R("reviewerMaxRuntime",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(_e,{label:"Max Log Size",type:"number",value:String(h.maxLogSize),onChange:B=>R("maxLogSize",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"bytes"})})]})]})},{id:"env",label:"Provider Env",content:n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),n.jsx(o1,{envVars:h.providerEnv,onChange:B=>R("providerEnv",B)})]})},{id:"notifications",label:"Notifications",content:n.jsxs(be,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),n.jsx(d1,{notifications:h.notifications,onChange:B=>R("notifications",B)})]})},{id:"slack",label:"Slack Bot",content:n.jsxs(be,{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Slack Bot Integration"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Post notifications as agent personas using the Slack Bot API"})]}),n.jsx(fa,{checked:h.slack.enabled,onChange:B=>R("slack",{...h.slack,enabled:B})})]}),n.jsx("div",{className:"grid grid-cols-1 gap-6 pt-4 border-t border-slate-800",children:n.jsx("div",{className:"relative",children:n.jsx(_e,{label:"Bot Token (xoxb-...)",type:"password",value:h.slack.botToken,onChange:B=>R("slack",{...h.slack,botToken:B.target.value}),placeholder:"xoxb-...",helperText:"OAuth Bot Token from your Slack App settings"})})}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"Channel IDs"}),n.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 hover:text-slate-200 transition-colors",onClick:()=>{alert("Coming soon: will list workspace channels")},children:"Detect Channels"})]}),n.jsx("p",{className:"text-xs text-slate-500",children:"Enter the Slack channel IDs (e.g. C01ABCDEF) where agent messages will be posted."}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsx(_e,{label:"#eng Channel ID",value:h.slack.channels.eng,onChange:B=>R("slack",{...h.slack,channels:{...h.slack.channels,eng:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(_e,{label:"#prs Channel ID",value:h.slack.channels.prs,onChange:B=>R("slack",{...h.slack,channels:{...h.slack.channels,prs:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(_e,{label:"#incidents Channel ID",value:h.slack.channels.incidents,onChange:B=>R("slack",{...h.slack,channels:{...h.slack.channels,incidents:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(_e,{label:"#releases Channel ID",value:h.slack.channels.releases,onChange:B=>R("slack",{...h.slack,channels:{...h.slack.channels,releases:B.target.value}}),placeholder:"C01ABCDEF"})]})]}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[n.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"Options"}),n.jsx(fa,{label:"Auto-create project channels",checked:h.slack.autoCreateProjectChannels,onChange:B=>R("slack",{...h.slack,autoCreateProjectChannels:B})}),n.jsx(fa,{label:"Enable agent deliberation",checked:h.slack.discussionEnabled,onChange:B=>R("slack",{...h.slack,discussionEnabled:B})})]})]})},{id:"roadmap",label:"Roadmap",content:n.jsxs(be,{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Roadmap Scanner"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Automatically scan ROADMAP.md and generate PRDs for unchecked items"})]}),n.jsx(fa,{checked:h.roadmapScanner.enabled,onChange:L})]}),h.roadmapScanner.enabled&&n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[n.jsx(_e,{label:"Roadmap Path",value:h.roadmapScanner.roadmapPath,onChange:B=>R("roadmapScanner",{...h.roadmapScanner,roadmapPath:B.target.value})}),n.jsx(_e,{label:"Auto Scan Interval",type:"number",value:String(h.roadmapScanner.autoScanInterval),onChange:B=>R("roadmapScanner",{...h.roadmapScanner,autoScanInterval:Math.max(30,Number(B.target.value||30))}),rightIcon:n.jsx("span",{className:"text-xs",children:"sec (min 30)"})})]})]})},{id:"advanced",label:"Advanced",content:n.jsxs(be,{className:"p-6 space-y-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Less commonly used configuration options"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(_e,{label:"Templates Directory",value:h.templatesDir,onChange:B=>R("templatesDir",B.target.value),helperText:"Directory for custom template overrides"}),n.jsx(_e,{label:"Cron Schedule Offset",type:"number",min:"0",max:"59",value:String(h.cronScheduleOffset),onChange:B=>{const C=Math.min(59,Math.max(0,Number(B.target.value||0)));R("cronScheduleOffset",C)},helperText:"Minutes offset (0-59) for cron schedules"}),n.jsx(_e,{label:"Max Retries",type:"number",min:"1",value:String(h.maxRetries),onChange:B=>{const C=Math.max(1,Number(B.target.value||1));R("maxRetries",C)},helperText:"Retry attempts for rate-limited API calls"})]}),n.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[n.jsx(v0,{label:"Branch Patterns",value:h.branchPatterns,onChange:B=>R("branchPatterns",B),placeholder:"e.g., feat/",helpText:"Patterns to match for PR reviews"}),n.jsx(v0,{label:"PRD Priority",value:h.prdPriority,onChange:B=>R("prdPriority",B),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}];return n.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[n.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),n.jsx(i1,{tabs:J}),n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[n.jsxs(ue,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:q,children:[n.jsx(Di,{className:"h-4 w-4 mr-2"}),"Reset"]}),n.jsxs(ue,{onClick:G,loading:m,children:[n.jsx(Cb,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),n.jsxs("div",{className:"mt-12",children:[n.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[n.jsx(q0,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),n.jsx(be,{className:"divide-y divide-slate-800",children:z?n.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):A.map((B,C)=>{const Q=B.status==="pass",Z=B.status==="warn",P=Q?"bg-green-500/10 text-green-400 border-green-500/20":Z?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return n.jsxs("div",{className:"p-4 flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:B.name}),n.jsx("p",{className:"text-xs text-slate-500",children:B.detail})]}),n.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${P}`,children:B.status.toUpperCase()})]},`${B.name}-${C}`)})})]})]})},m1=()=>(Ty(),n.jsx(ev,{children:n.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[n.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),n.jsx(wy,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[n.jsx(Cy,{}),n.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:n.jsx("div",{className:"max-w-7xl mx-auto w-full",children:n.jsxs(_g,{children:[n.jsx(Lt,{path:"/",element:n.jsx(Vy,{})}),n.jsx(Lt,{path:"/prds",element:n.jsx(Ky,{})}),n.jsx(Lt,{path:"/prs",element:n.jsx(Jy,{})}),n.jsx(Lt,{path:"/board",element:n.jsx(Gy,{})}),n.jsx(Lt,{path:"/scheduling",element:n.jsx(s1,{})}),n.jsx(Lt,{path:"/logs",element:n.jsx(Zy,{})}),n.jsx(Lt,{path:"/roadmap",element:n.jsx(Fy,{})}),n.jsx(Lt,{path:"/integrations",element:n.jsx(Xy,{})}),n.jsx(Lt,{path:"/agents",element:n.jsx(Hy,{})}),n.jsx(Lt,{path:"/settings",element:n.jsx(f1,{})}),n.jsx(Lt,{path:"*",element:n.jsx(Tg,{to:"/",replace:!0})})]})})})]}),n.jsx(Ay,{})]})})),I0=document.getElementById("root");if(!I0)throw new Error("Could not find root element to mount to");const h1=zp.createRoot(I0);h1.render(n.jsx(Ye.StrictMode,{children:n.jsx(m1,{})}));
473
+ `,children:j.label},j.id))})}),n.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=c.find(j=>j.id===h))==null?void 0:p.content})]})},c1={enabled:!1,botToken:"",channels:{eng:"",prs:"",incidents:"",releases:""},autoCreateProjectChannels:!1,discussionEnabled:!1},g0=c=>({provider:c.provider,defaultBranch:c.defaultBranch,branchPrefix:c.branchPrefix,branchPatterns:c.branchPatterns||[],reviewerEnabled:c.reviewerEnabled,minReviewScore:c.minReviewScore,maxRuntime:c.maxRuntime,reviewerMaxRuntime:c.reviewerMaxRuntime,maxLogSize:c.maxLogSize,cronScheduleOffset:c.cronScheduleOffset??0,maxRetries:c.maxRetries??3,providerEnv:c.providerEnv||{},notifications:c.notifications||{webhooks:[]},prdPriority:c.prdPriority||[],roadmapScanner:c.roadmapScanner||{enabled:!1,roadmapPath:"ROADMAP.md",autoScanInterval:300},templatesDir:c.templatesDir||".night-watch/templates",slack:c.slack??c1}),r1=c=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>c.toUpperCase().includes(d)),u1=({value:c,isSensitive:o})=>{const[d,r]=Qe.useState(!1);return o?n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?c:"••••••••••••"}),n.jsx("button",{type:"button",onClick:()=>r(!d),className:"text-slate-500 hover:text-slate-300",children:d?n.jsx(pu,{className:"h-4 w-4"}):n.jsx(zi,{className:"h-4 w-4"})})]}):n.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:c})},o1=({envVars:c,onChange:o})=>{const[d,r]=Qe.useState(""),[m,f]=Qe.useState(""),[h,v]=Qe.useState(null),[g,p]=Qe.useState(""),j=()=>{if(d.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(d)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}o({...c,[d]:m}),r(""),f("")}},w=T=>{const Q={...c};delete Q[T],o(Q)},D=T=>{v(T),p(c[T])},z=()=>{h&&(o({...c,[h]:g}),v(null),p(""))},U=()=>{v(null),p("")},A=Object.entries(c);return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),n.jsx("div",{className:"space-y-2",children:A.length===0?n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):A.map(([T,Q])=>n.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[n.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[n.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:T}),h===T?n.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[n.jsx("input",{type:"text",value:g,onChange:q=>p(q.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),n.jsx("button",{type:"button",onClick:z,className:"p-1 text-green-400 hover:text-green-300",children:n.jsx(en,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:U,className:"p-1 text-slate-400 hover:text-slate-300",children:n.jsx(Ft,{className:"h-4 w-4"})})]}):n.jsx(u1,{value:Q,isSensitive:r1(T)})]}),h!==T&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>D(T),className:"p-1 text-slate-400 hover:text-slate-200",children:n.jsx(_u,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>w(T),className:"p-1 text-red-400 hover:text-red-300",children:n.jsx(zu,{className:"h-4 w-4"})})]})]},T))}),n.jsxs("div",{className:"flex items-end gap-3 pt-4 border-t border-slate-800",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),n.jsx("input",{type:"text",value:d,onChange:T=>r(T.target.value.toUpperCase()),placeholder:"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),n.jsxs("div",{className:"flex-1",children:[n.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),n.jsx("input",{type:"text",value:m,onChange:T=>f(T.target.value),placeholder:"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),n.jsxs(ue,{onClick:j,disabled:!d.trim(),children:[n.jsx(gl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},d1=({notifications:c,onChange:o})=>{const[d,r]=Qe.useState(null),[m,f]=Qe.useState(!1),[h,v]=Qe.useState({type:"slack",url:"",events:[]}),g=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],p=()=>{o({webhooks:[...c.webhooks,h]}),v({type:"slack",url:"",events:[]}),f(!1)},j=(U,A)=>{const T=[...c.webhooks];T[U]=A,o({webhooks:T})},w=U=>{o({webhooks:c.webhooks.filter((A,T)=>T!==U)})},D=(U,A)=>U.includes(A)?U.filter(T=>T!==A):[...U,A],z=({webhook:U,onChange:A,onSave:T,onCancel:Q,isNew:q})=>n.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsx(Xl,{label:"Type",value:U.type,onChange:L=>{const J=L;A(J==="telegram"?{type:J,botToken:"",chatId:"",events:U.events}:{type:J,url:"",events:U.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),U.type==="telegram"?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"relative",children:n.jsx(_e,{label:"Bot Token",type:"password",value:U.botToken||"",onChange:L=>A({...U,botToken:L.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),n.jsx(_e,{label:"Chat ID",value:U.chatId||"",onChange:L=>A({...U,chatId:L.target.value}),placeholder:"123456789"})]}):n.jsx("div",{className:"md:col-span-2",children:n.jsx(_e,{label:"Webhook URL",type:"password",value:U.url||"",onChange:L=>A({...U,url:L.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),n.jsx("div",{className:"flex flex-wrap gap-2",children:g.map(L=>n.jsx("button",{type:"button",onClick:()=>A({...U,events:D(U.events,L.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${U.events.includes(L.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:L.label},L.value))})]}),n.jsxs("div",{className:"flex justify-end gap-2",children:[n.jsx(ue,{variant:"ghost",onClick:Q,children:"Cancel"}),n.jsx(ue,{onClick:T,disabled:U.events.length===0||(U.type==="telegram"?!U.botToken||!U.chatId:!U.url),children:q?"Add Webhook":"Save Changes"})]})]});return n.jsxs("div",{className:"space-y-4",children:[n.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),n.jsx("div",{className:"space-y-3",children:c.webhooks.length===0?n.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):c.webhooks.map((U,A)=>n.jsx("div",{children:d===A?n.jsx(z,{webhook:U,onChange:T=>j(A,T),onSave:()=>r(null),onCancel:()=>r(null)}):n.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[n.jsxs("div",{className:"flex-1",children:[n.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[n.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:U.type}),U.type==="telegram"&&n.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",U.chatId]})]}),n.jsx("div",{className:"flex flex-wrap gap-1",children:U.events.map(T=>n.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:T.replace("_"," ")},T))})]}),n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("button",{type:"button",onClick:()=>r(A),className:"p-2 text-slate-400 hover:text-slate-200",children:n.jsx(_u,{className:"h-4 w-4"})}),n.jsx("button",{type:"button",onClick:()=>w(A),className:"p-2 text-red-400 hover:text-red-300",children:n.jsx(zu,{className:"h-4 w-4"})})]})]})},A))}),m?n.jsx(z,{webhook:h,onChange:v,onSave:p,onCancel:()=>f(!1),isNew:!0}):n.jsxs(ue,{variant:"ghost",onClick:()=>f(!0),children:[n.jsx(gl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},v0=({label:c,value:o,onChange:d,placeholder:r,helpText:m})=>{const[f,h]=Qe.useState(""),v=()=>{f.trim()&&!o.includes(f.trim())&&(d([...o,f.trim()]),h(""))},g=j=>{d(o.filter(w=>w!==j))},p=j=>{j.key==="Enter"&&(j.preventDefault(),v())};return n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:c}),n.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:o.map(j=>n.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[j,n.jsx("button",{type:"button",onClick:()=>g(j),className:"text-slate-500 hover:text-red-400",children:n.jsx(Ft,{className:"h-3 w-3"})})]},j))}),n.jsxs("div",{className:"flex gap-2",children:[n.jsx("input",{type:"text",value:f,onChange:j=>h(j.target.value),onKeyDown:p,placeholder:r,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),n.jsx(ue,{onClick:v,disabled:!f.trim(),children:n.jsx(gl,{className:"h-4 w-4"})})]}),m&&n.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},f1=()=>{const{addToast:c,projectName:o,selectedProjectId:d,globalModeLoading:r}=rt(),[m,f]=Qe.useState(!1),[h,v]=Qe.useState(null),{data:g,loading:p,error:j,refetch:w}=ct(Du,[d],{enabled:!r}),{data:D,loading:z,refetch:U}=ct(sy,[d],{enabled:!r}),A=D??[];Qe.useEffect(()=>{g&&v(g0(g))},[g]);const T=(B,C)=>{v(V=>V&&{...V,[B]:C})},Q=async()=>{if(h){f(!0);try{await Oi({provider:h.provider,defaultBranch:h.defaultBranch,branchPrefix:h.branchPrefix,branchPatterns:h.branchPatterns,reviewerEnabled:h.reviewerEnabled,minReviewScore:h.minReviewScore,maxRuntime:h.maxRuntime,reviewerMaxRuntime:h.reviewerMaxRuntime,maxLogSize:h.maxLogSize,cronScheduleOffset:h.cronScheduleOffset,maxRetries:h.maxRetries,providerEnv:h.providerEnv,notifications:h.notifications,prdPriority:h.prdPriority,roadmapScanner:h.roadmapScanner,templatesDir:h.templatesDir,slack:h.slack}),c({title:"Settings Saved",message:"Configuration updated successfully.",type:"success"}),w(),U()}catch(B){c({title:"Save Failed",message:B instanceof Error?B.message:"Failed to save configuration",type:"error"})}finally{f(!1)}}},q=()=>{g&&(v(g0(g)),c({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},L=async B=>{try{const C=await W0(B);T("roadmapScanner",C.roadmapScanner),c({title:B?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${B?"enabled":"disabled"}.`,type:"success"})}catch(C){c({title:"Toggle Failed",message:C instanceof Error?C.message:"Failed to toggle roadmap scanner",type:"error"})}};if(p||!h)return n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(j)return n.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[n.jsx(Kt,{className:"h-12 w-12 text-red-400"}),n.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),n.jsx("div",{className:"text-sm text-slate-500",children:j.message}),n.jsx(ue,{onClick:()=>w(),children:"Retry"})]});const J=[{id:"general",label:"General",content:n.jsxs(ye,{className:"p-6 space-y-4",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(_e,{label:"Project Name",value:o,disabled:!0}),n.jsx(Xl,{label:"Provider",value:h.provider,onChange:B=>T("provider",B),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),n.jsx(_e,{label:"Default Branch",value:h.defaultBranch,onChange:B=>T("defaultBranch",B.target.value)}),n.jsx(_e,{label:"Branch Prefix",value:h.branchPrefix,onChange:B=>T("branchPrefix",B.target.value)}),n.jsx("div",{className:"md:col-span-2",children:n.jsx(fa,{label:"Enable Automated Reviews",checked:h.reviewerEnabled,onChange:B=>T("reviewerEnabled",B)})})]})]})},{id:"runtime",label:"Runtime",content:n.jsxs(ye,{className:"p-6 space-y-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("input",{type:"range",min:"0",max:"100",value:h.minReviewScore,onChange:B=>T("minReviewScore",Number(B.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),n.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:h.minReviewScore})]}),n.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(_e,{label:"Max Runtime (Executor)",type:"number",value:String(h.maxRuntime),onChange:B=>T("maxRuntime",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(_e,{label:"Max Runtime (Reviewer)",type:"number",value:String(h.reviewerMaxRuntime),onChange:B=>T("reviewerMaxRuntime",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"sec"})}),n.jsx(_e,{label:"Max Log Size",type:"number",value:String(h.maxLogSize),onChange:B=>T("maxLogSize",Number(B.target.value||0)),rightIcon:n.jsx("span",{className:"text-xs",children:"bytes"})})]})]})},{id:"env",label:"Provider Env",content:n.jsxs(ye,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),n.jsx(o1,{envVars:h.providerEnv,onChange:B=>T("providerEnv",B)})]})},{id:"notifications",label:"Notifications",content:n.jsxs(ye,{className:"p-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),n.jsx(d1,{notifications:h.notifications,onChange:B=>T("notifications",B)})]})},{id:"slack",label:"Slack Bot",content:n.jsxs(ye,{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Slack Bot Integration"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Post notifications as agent personas using the Slack Bot API"})]}),n.jsx(fa,{checked:h.slack.enabled,onChange:B=>T("slack",{...h.slack,enabled:B})})]}),n.jsx("div",{className:"grid grid-cols-1 gap-6 pt-4 border-t border-slate-800",children:n.jsx("div",{className:"relative",children:n.jsx(_e,{label:"Bot Token (xoxb-...)",type:"password",value:h.slack.botToken,onChange:B=>T("slack",{...h.slack,botToken:B.target.value}),placeholder:"xoxb-...",helperText:"OAuth Bot Token from your Slack App settings"})})}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[n.jsxs("div",{className:"flex items-center justify-between mb-2",children:[n.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"Channel IDs"}),n.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 hover:text-slate-200 transition-colors",onClick:()=>{alert("Coming soon: will list workspace channels")},children:"Detect Channels"})]}),n.jsx("p",{className:"text-xs text-slate-500",children:"Enter the Slack channel IDs (e.g. C01ABCDEF) where agent messages will be posted."}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[n.jsx(_e,{label:"#eng Channel ID",value:h.slack.channels.eng,onChange:B=>T("slack",{...h.slack,channels:{...h.slack.channels,eng:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(_e,{label:"#prs Channel ID",value:h.slack.channels.prs,onChange:B=>T("slack",{...h.slack,channels:{...h.slack.channels,prs:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(_e,{label:"#incidents Channel ID",value:h.slack.channels.incidents,onChange:B=>T("slack",{...h.slack,channels:{...h.slack.channels,incidents:B.target.value}}),placeholder:"C01ABCDEF"}),n.jsx(_e,{label:"#releases Channel ID",value:h.slack.channels.releases,onChange:B=>T("slack",{...h.slack,channels:{...h.slack.channels,releases:B.target.value}}),placeholder:"C01ABCDEF"})]})]}),n.jsxs("div",{className:"space-y-4 pt-4 border-t border-slate-800",children:[n.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"Options"}),n.jsx(fa,{label:"Auto-create project channels",checked:h.slack.autoCreateProjectChannels,onChange:B=>T("slack",{...h.slack,autoCreateProjectChannels:B})}),n.jsx(fa,{label:"Enable agent deliberation",checked:h.slack.discussionEnabled,onChange:B=>T("slack",{...h.slack,discussionEnabled:B})})]})]})},{id:"roadmap",label:"Roadmap",content:n.jsxs(ye,{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Roadmap Scanner"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Automatically scan ROADMAP.md and generate PRDs for unchecked items"})]}),n.jsx(fa,{checked:h.roadmapScanner.enabled,onChange:L})]}),h.roadmapScanner.enabled&&n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[n.jsx(_e,{label:"Roadmap Path",value:h.roadmapScanner.roadmapPath,onChange:B=>T("roadmapScanner",{...h.roadmapScanner,roadmapPath:B.target.value})}),n.jsx(_e,{label:"Auto Scan Interval",type:"number",value:String(h.roadmapScanner.autoScanInterval),onChange:B=>T("roadmapScanner",{...h.roadmapScanner,autoScanInterval:Math.max(30,Number(B.target.value||30))}),rightIcon:n.jsx("span",{className:"text-xs",children:"sec (min 30)"})})]})]})},{id:"advanced",label:"Advanced",content:n.jsxs(ye,{className:"p-6 space-y-6",children:[n.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),n.jsx("p",{className:"text-sm text-slate-400",children:"Less commonly used configuration options"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsx(_e,{label:"Templates Directory",value:h.templatesDir,onChange:B=>T("templatesDir",B.target.value),helperText:"Directory for custom template overrides"}),n.jsx(_e,{label:"Cron Schedule Offset",type:"number",min:"0",max:"59",value:String(h.cronScheduleOffset),onChange:B=>{const C=Math.min(59,Math.max(0,Number(B.target.value||0)));T("cronScheduleOffset",C)},helperText:"Minutes offset (0-59) for cron schedules"}),n.jsx(_e,{label:"Max Retries",type:"number",min:"1",value:String(h.maxRetries),onChange:B=>{const C=Math.max(1,Number(B.target.value||1));T("maxRetries",C)},helperText:"Retry attempts for rate-limited API calls"})]}),n.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[n.jsx(v0,{label:"Branch Patterns",value:h.branchPatterns,onChange:B=>T("branchPatterns",B),placeholder:"e.g., feat/",helpText:"Patterns to match for PR reviews"}),n.jsx(v0,{label:"PRD Priority",value:h.prdPriority,onChange:B=>T("prdPriority",B),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}];return n.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[n.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),n.jsx(i1,{tabs:J}),n.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[n.jsxs(ue,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:q,children:[n.jsx(Di,{className:"h-4 w-4 mr-2"}),"Reset"]}),n.jsxs(ue,{onClick:Q,loading:m,children:[n.jsx(Cb,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),n.jsxs("div",{className:"mt-12",children:[n.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[n.jsx(q0,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),n.jsx(ye,{className:"divide-y divide-slate-800",children:z?n.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):A.map((B,C)=>{const V=B.status==="pass",Z=B.status==="warn",P=V?"bg-green-500/10 text-green-400 border-green-500/20":Z?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return n.jsxs("div",{className:"p-4 flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-slate-200",children:B.name}),n.jsx("p",{className:"text-xs text-slate-500",children:B.detail})]}),n.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${P}`,children:B.status.toUpperCase()})]},`${B.name}-${C}`)})})]})]})},m1=()=>(Ty(),n.jsx(ev,{children:n.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[n.jsx("div",{className:"absolute top-0 left-0 w-full h-96 bg-indigo-900/10 rounded-full blur-[120px] -translate-y-1/2 pointer-events-none z-0"}),n.jsx(wy,{}),n.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[n.jsx(Cy,{}),n.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:n.jsx("div",{className:"max-w-7xl mx-auto w-full",children:n.jsxs(_g,{children:[n.jsx(Lt,{path:"/",element:n.jsx(Vy,{})}),n.jsx(Lt,{path:"/prds",element:n.jsx(Ky,{})}),n.jsx(Lt,{path:"/prs",element:n.jsx(Jy,{})}),n.jsx(Lt,{path:"/board",element:n.jsx(Gy,{})}),n.jsx(Lt,{path:"/scheduling",element:n.jsx(s1,{})}),n.jsx(Lt,{path:"/logs",element:n.jsx(Zy,{})}),n.jsx(Lt,{path:"/roadmap",element:n.jsx(Fy,{})}),n.jsx(Lt,{path:"/integrations",element:n.jsx(Xy,{})}),n.jsx(Lt,{path:"/agents",element:n.jsx(Hy,{})}),n.jsx(Lt,{path:"/settings",element:n.jsx(f1,{})}),n.jsx(Lt,{path:"*",element:n.jsx(Tg,{to:"/",replace:!0})})]})})})]}),n.jsx(Ay,{})]})})),I0=document.getElementById("root");if(!I0)throw new Error("Could not find root element to mount to");const h1=zp.createRoot(I0);h1.render(n.jsx(Qe.StrictMode,{children:n.jsx(m1,{})}));