@jonit-dev/night-watch-cli 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +701 -286
- package/dist/cli.js.map +1 -1
- package/dist/commands/analytics.d.ts.map +1 -1
- package/dist/commands/analytics.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +4 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +24 -0
- package/dist/commands/install.js.map +1 -1
- package/dist/web/assets/index-B_l_3wnA.js +370 -0
- package/dist/web/assets/index-CLuRf7Zt.js +381 -0
- package/dist/web/assets/index-CvUk-33B.css +1 -0
- package/dist/web/assets/index-DgOAgkZy.css +1 -0
- package/dist/web/assets/index-aCHmkAcJ.css +1 -0
- package/dist/web/assets/index-oOp_MFeE.js +376 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))u(m);new MutationObserver(m=>{for(const x of m)if(x.type==="childList")for(const f of x.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function d(m){const x={};return m.integrity&&(x.integrity=m.integrity),m.referrerPolicy&&(x.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?x.credentials="include":m.crossOrigin==="anonymous"?x.credentials="omit":x.credentials="same-origin",x}function u(m){if(m.ep)return;m.ep=!0;const x=d(m);fetch(m.href,x)}})();function Tc(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var cc={exports:{}},ds={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Qm;function Rp(){if(Qm)return ds;Qm=1;var r=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function d(u,m,x){var f=null;if(x!==void 0&&(f=""+x),m.key!==void 0&&(f=""+m.key),"key"in m){x={};for(var v in m)v!=="key"&&(x[v]=m[v])}else x=m;return m=x.ref,{$$typeof:r,type:u,key:f,ref:m!==void 0?m:null,props:x}}return ds.Fragment=c,ds.jsx=d,ds.jsxs=d,ds}var Vm;function Ap(){return Vm||(Vm=1,cc.exports=Rp()),cc.exports}var s=Ap(),oc={exports:{}},fe={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Xm;function Mp(){if(Xm)return fe;Xm=1;var r=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),f=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),C=Symbol.iterator;function z(N){return N===null||typeof N!="object"?null:(N=C&&N[C]||N["@@iterator"],typeof N=="function"?N:null)}var q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,Y={};function V(N,G,$){this.props=N,this.context=G,this.refs=Y,this.updater=$||q}V.prototype.isReactComponent={},V.prototype.setState=function(N,G){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,G,"setState")},V.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function B(){}B.prototype=V.prototype;function S(N,G,$){this.props=N,this.context=G,this.refs=Y,this.updater=$||q}var ee=S.prototype=new B;ee.constructor=S,A(ee,V.prototype),ee.isPureReactComponent=!0;var ue=Array.isArray;function H(){}var P={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function ge(N,G,$){var W=$.ref;return{$$typeof:r,type:N,key:G,ref:W!==void 0?W:null,props:$}}function J(N,G){return ge(N.type,G,N.props)}function ze(N){return typeof N=="object"&&N!==null&&N.$$typeof===r}function se(N){var G={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function($){return G[$]})}var pe=/\/+/g;function Ce(N,G){return typeof N=="object"&&N!==null&&N.key!=null?se(""+N.key):G.toString(36)}function Z(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(H,H):(N.status="pending",N.then(function(G){N.status==="pending"&&(N.status="fulfilled",N.value=G)},function(G){N.status==="pending"&&(N.status="rejected",N.reason=G)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function U(N,G,$,W,ce){var me=typeof N;(me==="undefined"||me==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(me){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case r:case c:Ee=!0;break;case y:return Ee=N._init,U(Ee(N._payload),G,$,W,ce)}}if(Ee)return ce=ce(N),Ee=W===""?"."+Ce(N,0):W,ue(ce)?($="",Ee!=null&&($=Ee.replace(pe,"$&/")+"/"),U(ce,G,$,"",function(el){return el})):ce!=null&&(ze(ce)&&(ce=J(ce,$+(ce.key==null||N&&N.key===ce.key?"":(""+ce.key).replace(pe,"$&/")+"/")+Ee)),G.push(ce)),1;Ee=0;var lt=W===""?".":W+":";if(ue(N))for(var Qe=0;Qe<N.length;Qe++)W=N[Qe],me=lt+Ce(W,Qe),Ee+=U(W,G,$,me,ce);else if(Qe=z(N),typeof Qe=="function")for(N=Qe.call(N),Qe=0;!(W=N.next()).done;)W=W.value,me=lt+Ce(W,Qe++),Ee+=U(W,G,$,me,ce);else if(me==="object"){if(typeof N.then=="function")return U(Z(N),G,$,W,ce);throw G=String(N),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function K(N,G,$){if(N==null)return N;var W=[],ce=0;return U(N,W,"","",function(me){return G.call($,me,ce++)}),W}function ae(N){if(N._status===-1){var G=N._result;G=G(),G.then(function($){(N._status===0||N._status===-1)&&(N._status=1,N._result=$)},function($){(N._status===0||N._status===-1)&&(N._status=2,N._result=$)}),N._status===-1&&(N._status=0,N._result=G)}if(N._status===1)return N._result.default;throw N._result}var Te=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Me={map:K,forEach:function(N,G,$){K(N,function(){G.apply(this,arguments)},$)},count:function(N){var G=0;return K(N,function(){G++}),G},toArray:function(N){return K(N,function(G){return G})||[]},only:function(N){if(!ze(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return fe.Activity=b,fe.Children=Me,fe.Component=V,fe.Fragment=d,fe.Profiler=m,fe.PureComponent=S,fe.StrictMode=u,fe.Suspense=g,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,fe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return P.H.useMemoCache(N)}},fe.cache=function(N){return function(){return N.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(N,G,$){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var W=A({},N.props),ce=N.key;if(G!=null)for(me in G.key!==void 0&&(ce=""+G.key),G)!ie.call(G,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&G.ref===void 0||(W[me]=G[me]);var me=arguments.length-2;if(me===1)W.children=$;else if(1<me){for(var Ee=Array(me),lt=0;lt<me;lt++)Ee[lt]=arguments[lt+2];W.children=Ee}return ge(N.type,ce,W)},fe.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:x,_context:N},N},fe.createElement=function(N,G,$){var W,ce={},me=null;if(G!=null)for(W in G.key!==void 0&&(me=""+G.key),G)ie.call(G,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ce[W]=G[W]);var Ee=arguments.length-2;if(Ee===1)ce.children=$;else if(1<Ee){for(var lt=Array(Ee),Qe=0;Qe<Ee;Qe++)lt[Qe]=arguments[Qe+2];ce.children=lt}if(N&&N.defaultProps)for(W in Ee=N.defaultProps,Ee)ce[W]===void 0&&(ce[W]=Ee[W]);return ge(N,me,ce)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(N){return{$$typeof:v,render:N}},fe.isValidElement=ze,fe.lazy=function(N){return{$$typeof:y,_payload:{_status:-1,_result:N},_init:ae}},fe.memo=function(N,G){return{$$typeof:p,type:N,compare:G===void 0?null:G}},fe.startTransition=function(N){var G=P.T,$={};P.T=$;try{var W=N(),ce=P.S;ce!==null&&ce($,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(H,Te)}catch(me){Te(me)}finally{G!==null&&$.types!==null&&(G.types=$.types),P.T=G}},fe.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},fe.use=function(N){return P.H.use(N)},fe.useActionState=function(N,G,$){return P.H.useActionState(N,G,$)},fe.useCallback=function(N,G){return P.H.useCallback(N,G)},fe.useContext=function(N){return P.H.useContext(N)},fe.useDebugValue=function(){},fe.useDeferredValue=function(N,G){return P.H.useDeferredValue(N,G)},fe.useEffect=function(N,G){return P.H.useEffect(N,G)},fe.useEffectEvent=function(N){return P.H.useEffectEvent(N)},fe.useId=function(){return P.H.useId()},fe.useImperativeHandle=function(N,G,$){return P.H.useImperativeHandle(N,G,$)},fe.useInsertionEffect=function(N,G){return P.H.useInsertionEffect(N,G)},fe.useLayoutEffect=function(N,G){return P.H.useLayoutEffect(N,G)},fe.useMemo=function(N,G){return P.H.useMemo(N,G)},fe.useOptimistic=function(N,G){return P.H.useOptimistic(N,G)},fe.useReducer=function(N,G,$){return P.H.useReducer(N,G,$)},fe.useRef=function(N){return P.H.useRef(N)},fe.useState=function(N){return P.H.useState(N)},fe.useSyncExternalStore=function(N,G,$){return P.H.useSyncExternalStore(N,G,$)},fe.useTransition=function(){return P.H.useTransition()},fe.version="19.2.4",fe}var Zm;function Cc(){return Zm||(Zm=1,oc.exports=Mp()),oc.exports}var T=Cc();const ve=Tc(T);var dc={exports:{}},fs={},fc={exports:{}},mc={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var $m;function _p(){return $m||($m=1,(function(r){function c(U,K){var ae=U.length;U.push(K);e:for(;0<ae;){var Te=ae-1>>>1,Me=U[Te];if(0<m(Me,K))U[Te]=K,U[ae]=Me,ae=Te;else break e}}function d(U){return U.length===0?null:U[0]}function u(U){if(U.length===0)return null;var K=U[0],ae=U.pop();if(ae!==K){U[0]=ae;e:for(var Te=0,Me=U.length,N=Me>>>1;Te<N;){var G=2*(Te+1)-1,$=U[G],W=G+1,ce=U[W];if(0>m($,ae))W<Me&&0>m(ce,$)?(U[Te]=ce,U[W]=ae,Te=W):(U[Te]=$,U[G]=ae,Te=G);else if(W<Me&&0>m(ce,ae))U[Te]=ce,U[W]=ae,Te=W;else break e}}return K}function m(U,K){var ae=U.sortIndex-K.sortIndex;return ae!==0?ae:U.id-K.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var x=performance;r.unstable_now=function(){return x.now()}}else{var f=Date,v=f.now();r.unstable_now=function(){return f.now()-v}}var g=[],p=[],y=1,b=null,C=3,z=!1,q=!1,A=!1,Y=!1,V=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function ee(U){for(var K=d(p);K!==null;){if(K.callback===null)u(p);else if(K.startTime<=U)u(p),K.sortIndex=K.expirationTime,c(g,K);else break;K=d(p)}}function ue(U){if(A=!1,ee(U),!q)if(d(g)!==null)q=!0,H||(H=!0,se());else{var K=d(p);K!==null&&Z(ue,K.startTime-U)}}var H=!1,P=-1,ie=5,ge=-1;function J(){return Y?!0:!(r.unstable_now()-ge<ie)}function ze(){if(Y=!1,H){var U=r.unstable_now();ge=U;var K=!0;try{e:{q=!1,A&&(A=!1,B(P),P=-1),z=!0;var ae=C;try{t:{for(ee(U),b=d(g);b!==null&&!(b.expirationTime>U&&J());){var Te=b.callback;if(typeof Te=="function"){b.callback=null,C=b.priorityLevel;var Me=Te(b.expirationTime<=U);if(U=r.unstable_now(),typeof Me=="function"){b.callback=Me,ee(U),K=!0;break t}b===d(g)&&u(g),ee(U)}else u(g);b=d(g)}if(b!==null)K=!0;else{var N=d(p);N!==null&&Z(ue,N.startTime-U),K=!1}}break e}finally{b=null,C=ae,z=!1}K=void 0}}finally{K?se():H=!1}}}var se;if(typeof S=="function")se=function(){S(ze)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,Ce=pe.port2;pe.port1.onmessage=ze,se=function(){Ce.postMessage(null)}}else se=function(){V(ze,0)};function Z(U,K){P=V(function(){U(r.unstable_now())},K)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(U){U.callback=null},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return C},r.unstable_next=function(U){switch(C){case 1:case 2:case 3:var K=3;break;default:K=C}var ae=C;C=K;try{return U()}finally{C=ae}},r.unstable_requestPaint=function(){Y=!0},r.unstable_runWithPriority=function(U,K){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ae=C;C=U;try{return K()}finally{C=ae}},r.unstable_scheduleCallback=function(U,K,ae){var Te=r.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Te+ae:Te):ae=Te,U){case 1:var Me=-1;break;case 2:Me=250;break;case 5:Me=1073741823;break;case 4:Me=1e4;break;default:Me=5e3}return Me=ae+Me,U={id:y++,callback:K,priorityLevel:U,startTime:ae,expirationTime:Me,sortIndex:-1},ae>Te?(U.sortIndex=ae,c(p,U),d(g)===null&&U===d(p)&&(A?(B(P),P=-1):A=!0,Z(ue,ae-Te))):(U.sortIndex=Me,c(g,U),q||z||(q=!0,H||(H=!0,se()))),U},r.unstable_shouldYield=J,r.unstable_wrapCallback=function(U){var K=C;return function(){var ae=C;C=K;try{return U.apply(this,arguments)}finally{C=ae}}}})(mc)),mc}var Km;function Dp(){return Km||(Km=1,fc.exports=_p()),fc.exports}var hc={exports:{}},pt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Jm;function zp(){if(Jm)return pt;Jm=1;var r=Cc();function c(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}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 u={d:{f:d,r:function(){throw Error(c(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 x(g,p,y){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:b==null?null:""+b,children:g,containerInfo:p,implementation:y}}var f=r.__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 pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,pt.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(c(299));return x(g,p,null,y)},pt.flushSync=function(g){var p=f.T,y=u.p;try{if(f.T=null,u.p=2,g)return g()}finally{f.T=p,u.p=y,u.d.f()}},pt.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,u.d.C(g,p))},pt.prefetchDNS=function(g){typeof g=="string"&&u.d.D(g)},pt.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,b=v(y,p.crossOrigin),C=typeof p.integrity=="string"?p.integrity:void 0,z=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?u.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:C,fetchPriority:z}):y==="script"&&u.d.X(g,{crossOrigin:b,integrity:C,fetchPriority:z,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},pt.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=v(p.as,p.crossOrigin);u.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&u.d.M(g)},pt.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,b=v(y,p.crossOrigin);u.d.L(g,y,{crossOrigin:b,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})}},pt.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=v(p.as,p.crossOrigin);u.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else u.d.m(g)},pt.requestFormReset=function(g){u.d.r(g)},pt.unstable_batchedUpdates=function(g,p){return g(p)},pt.useFormState=function(g,p,y){return f.H.useFormState(g,p,y)},pt.useFormStatus=function(){return f.H.useHostTransitionStatus()},pt.version="19.2.4",pt}var Fm;function gh(){if(Fm)return hc.exports;Fm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(c){console.error(c)}}return r(),hc.exports=zp(),hc.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Pm;function Op(){if(Pm)return fs;Pm=1;var r=Dp(),c=Cc(),d=gh();function u(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 x(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 f(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(x(e)!==e)throw Error(u(188))}function p(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(u(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return g(n),e;if(i===a)return g(n),t;i=i.sibling}throw Error(u(188))}if(l.return!==a.return)l=n,a=i;else{for(var o=!1,h=n.child;h;){if(h===l){o=!0,l=n,a=i;break}if(h===a){o=!0,a=n,l=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===l){o=!0,l=i,a=n;break}if(h===a){o=!0,a=i,l=n;break}h=h.sibling}if(!o)throw Error(u(189))}}if(l.alternate!==a)throw Error(u(190))}if(l.tag!==3)throw Error(u(188));return l.stateNode.current===l?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,C=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),q=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),S=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),J=Symbol.for("react.memo_cache_sentinel"),ze=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=ze&&e[ze]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function Ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case V:return"Profiler";case Y:return"StrictMode";case ue:return"Suspense";case H:return"SuspenseList";case ge:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case q:return"Portal";case S:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case ee:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:Ce(e.type)||"Memo";case ie:t=e._payload,e=e._init;try{return Ce(e(t))}catch{}}return null}var Z=Array.isArray,U=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Te=[],Me=-1;function N(e){return{current:e}}function G(e){0>Me||(e.current=Te[Me],Te[Me]=null,Me--)}function $(e,t){Me++,Te[Me]=e.current,e.current=t}var W=N(null),ce=N(null),me=N(null),Ee=N(null);function lt(e,t){switch($(me,t),$(ce,e),$(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fm(t),e=mm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(W),$(W,e)}function Qe(){G(W),G(ce),G(me)}function el(e){e.memoizedState!==null&&$(Ee,e);var t=W.current,l=mm(t,e.type);t!==l&&($(ce,e),$(W,l))}function il(e){ce.current===e&&(G(W),G(ce)),Ee.current===e&&(G(Ee),rs._currentValue=ae)}var rl,Ml;function w(e){if(rl===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);rl=t&&t[1]||"",Ml=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+rl+e+Ml}var F=!1;function de(e,t){if(!e||F)return"";F=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(O){var D=O}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(O){D=O}e.call(Q.prototype)}}else{try{throw Error()}catch(O){D=O}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(O){if(O&&D&&typeof O.stack=="string")return[O.stack,D.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var j=o.split(`
|
|
44
|
+
`),_=h.split(`
|
|
45
|
+
`);for(n=a=0;a<j.length&&!j[a].includes("DetermineComponentFrameRoot");)a++;for(;n<_.length&&!_[n].includes("DetermineComponentFrameRoot");)n++;if(a===j.length||n===_.length)for(a=j.length-1,n=_.length-1;1<=a&&0<=n&&j[a]!==_[n];)n--;for(;1<=a&&0<=n;a--,n--)if(j[a]!==_[n]){if(a!==1||n!==1)do if(a--,n--,0>n||j[a]!==_[n]){var L=`
|
|
46
|
+
`+j[a].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=a&&0<=n);break}}}finally{F=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?w(l):""}function He(e,t){switch(e.tag){case 26:case 27:case 5:return w(e.type);case 16:return w("Lazy");case 13:return e.child!==t&&t!==null?w("Suspense Fallback"):w("Suspense");case 19:return w("SuspenseList");case 0:case 15:return de(e.type,!1);case 11:return de(e.type.render,!1);case 1:return de(e.type,!0);case 31:return w("Activity");default:return""}}function X(e){try{var t="",l=null;do t+=He(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var le=Object.prototype.hasOwnProperty,Oe=r.unstable_scheduleCallback,Je=r.unstable_cancelCallback,ot=r.unstable_shouldYield,yt=r.unstable_requestPaint,Ve=r.unstable_now,_l=r.unstable_getCurrentPriorityLevel,Gc=r.unstable_ImmediatePriority,Qc=r.unstable_UserBlockingPriority,Ss=r.unstable_NormalPriority,c0=r.unstable_LowPriority,Vc=r.unstable_IdlePriority,o0=r.log,d0=r.unstable_setDisableYieldValue,bn=null,Rt=null;function Dl(e){if(typeof o0=="function"&&d0(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(bn,e)}catch{}}var At=Math.clz32?Math.clz32:h0,f0=Math.log,m0=Math.LN2;function h0(e){return e>>>=0,e===0?32:31-(f0(e)/m0|0)|0}var Ns=256,Es=262144,ws=4194304;function ia(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 Ts(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=a&134217727;return h!==0?(a=h&~i,a!==0?n=ia(a):(o&=h,o!==0?n=ia(o):l||(l=h&~e,l!==0&&(n=ia(l))))):(h=a&~i,h!==0?n=ia(h):o!==0?n=ia(o):l||(l=a&~e,l!==0&&(n=ia(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function yn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function x0(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 Xc(){var e=ws;return ws<<=1,(ws&62914560)===0&&(ws=4194304),e}function Pi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function jn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function p0(e,t,l,a,n,i){var o=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 h=e.entanglements,j=e.expirationTimes,_=e.hiddenUpdates;for(l=o&~l;0<l;){var L=31-At(l),Q=1<<L;h[L]=0,j[L]=-1;var D=_[L];if(D!==null)for(_[L]=null,L=0;L<D.length;L++){var O=D[L];O!==null&&(O.lane&=-536870913)}l&=~Q}a!==0&&Zc(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Zc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-At(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function $c(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-At(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function Kc(e,t){var l=t&-t;return l=(l&42)!==0?1:Wi(l),(l&(e.suspendedLanes|t))!==0?0:l}function Wi(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 Ii(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Jc(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:qm(e.type))}function Fc(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var zl=Math.random().toString(36).slice(2),dt="__reactFiber$"+zl,jt="__reactProps$"+zl,wa="__reactContainer$"+zl,er="__reactEvents$"+zl,v0="__reactListeners$"+zl,g0="__reactHandles$"+zl,Pc="__reactResources$"+zl,Sn="__reactMarker$"+zl;function tr(e){delete e[dt],delete e[jt],delete e[er],delete e[v0],delete e[g0]}function Ta(e){var t=e[dt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[wa]||l[dt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=ym(e);e!==null;){if(l=e[dt])return l;e=ym(e)}return t}e=l,l=e.parentNode}return null}function Ca(e){if(e=e[dt]||e[wa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ra(e){var t=e[Pc];return t||(t=e[Pc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ut(e){e[Sn]=!0}var Wc=new Set,Ic={};function ra(e,t){Aa(e,t),Aa(e+"Capture",t)}function Aa(e,t){for(Ic[e]=t,e=0;e<t.length;e++)Wc.add(t[e])}var b0=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]*$"),eo={},to={};function y0(e){return le.call(to,e)?!0:le.call(eo,e)?!1:b0.test(e)?to[e]=!0:(eo[e]=!0,!1)}function Cs(e,t,l){if(y0(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 Rs(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 ul(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 Bt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function lo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j0(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 n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){l=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(o){l=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lr(e){if(!e._valueTracker){var t=lo(e)?"checked":"value";e._valueTracker=j0(e,t,""+e[t])}}function ao(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=lo(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function As(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 S0=/[\n"\\]/g;function kt(e){return e.replace(S0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ar(e,t,l,a,n,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Bt(t)):e.value!==""+Bt(t)&&(e.value=""+Bt(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?nr(e,o,Bt(t)):l!=null?nr(e,o,Bt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+Bt(h):e.removeAttribute("name")}function no(e,t,l,a,n,i,o,h){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)){lr(e);return}l=l!=null?""+Bt(l):"",t=t!=null?""+Bt(t):l,h||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=h?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),lr(e)}function nr(e,t,l){t==="number"&&As(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Ma(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Bt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function so(e,t,l){if(t!=null&&(t=""+Bt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Bt(l):""}function io(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(u(92));if(Z(a)){if(1<a.length)throw Error(u(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Bt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),lr(e)}function _a(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var N0=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 ro(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||N0.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function uo(e,t,l){if(t!=null&&typeof t!="object")throw Error(u(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 n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&ro(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&ro(e,i,t[i])}function sr(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 E0=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"]]),w0=/^[\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 Ms(e){return w0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function cl(){}var ir=null;function rr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Da=null,za=null;function co(e){var t=Ca(e);if(t&&(e=t.stateNode)){var l=e[jt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ar(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="'+kt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[jt]||null;if(!n)throw Error(u(90));ar(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&ao(a)}break e;case"textarea":so(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Ma(e,!!l.multiple,t,!1)}}}var ur=!1;function oo(e,t,l){if(ur)return e(t,l);ur=!0;try{var a=e(t);return a}finally{if(ur=!1,(Da!==null||za!==null)&&(vi(),Da&&(t=Da,e=za,za=Da=null,co(t),e)))for(t=0;t<e.length;t++)co(e[t])}}function En(e,t){var l=e.stateNode;if(l===null)return null;var a=l[jt]||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(u(231,t,typeof l));return l}var ol=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cr=!1;if(ol)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){cr=!0}}),window.addEventListener("test",wn,wn),window.removeEventListener("test",wn,wn)}catch{cr=!1}var Ol=null,or=null,_s=null;function fo(){if(_s)return _s;var e,t=or,l=t.length,a,n="value"in Ol?Ol.value:Ol.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var o=l-e;for(a=1;a<=o&&t[l-a]===n[i-a];a++);return _s=n.slice(e,1<a?1-a:void 0)}function Ds(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 zs(){return!0}function mo(){return!1}function St(e){function t(l,a,n,i,o){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(l=e[h],this[h]=l?l(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?zs:mo,this.isPropagationStopped=mo,this}return b(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=zs)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=zs)},persist:function(){},isPersistent:zs}),t}var ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Os=St(ua),Tn=b({},ua,{view:0,detail:0}),T0=St(Tn),dr,fr,Cn,Us=b({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hr,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!==Cn&&(Cn&&e.type==="mousemove"?(dr=e.screenX-Cn.screenX,fr=e.screenY-Cn.screenY):fr=dr=0,Cn=e),dr)},movementY:function(e){return"movementY"in e?e.movementY:fr}}),ho=St(Us),C0=b({},Us,{dataTransfer:0}),R0=St(C0),A0=b({},Tn,{relatedTarget:0}),mr=St(A0),M0=b({},ua,{animationName:0,elapsedTime:0,pseudoElement:0}),_0=St(M0),D0=b({},ua,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z0=St(D0),O0=b({},ua,{data:0}),xo=St(O0),U0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q0={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"},H0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=H0[e])?!!t[e]:!1}function hr(){return L0}var B0=b({},Tn,{key:function(e){if(e.key){var t=U0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?q0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hr,charCode:function(e){return e.type==="keypress"?Ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k0=St(B0),Y0=b({},Us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),po=St(Y0),G0=b({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hr}),Q0=St(G0),V0=b({},ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),X0=St(V0),Z0=b({},Us,{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}),$0=St(Z0),K0=b({},ua,{newState:0,oldState:0}),J0=St(K0),F0=[9,13,27,32],xr=ol&&"CompositionEvent"in window,Rn=null;ol&&"documentMode"in document&&(Rn=document.documentMode);var P0=ol&&"TextEvent"in window&&!Rn,vo=ol&&(!xr||Rn&&8<Rn&&11>=Rn),go=" ",bo=!1;function yo(e,t){switch(e){case"keyup":return F0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oa=!1;function W0(e,t){switch(e){case"compositionend":return jo(t);case"keypress":return t.which!==32?null:(bo=!0,go);case"textInput":return e=t.data,e===go&&bo?null:e;default:return null}}function I0(e,t){if(Oa)return e==="compositionend"||!xr&&yo(e,t)?(e=fo(),_s=or=Ol=null,Oa=!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 vo&&t.locale!=="ko"?null:t.data;default:return null}}var ex={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 So(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ex[e.type]:t==="textarea"}function No(e,t,l,a){Da?za?za.push(a):za=[a]:Da=a,t=Ei(t,"onChange"),0<t.length&&(l=new Os("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var An=null,Mn=null;function tx(e){im(e,0)}function qs(e){var t=Nn(e);if(ao(t))return e}function Eo(e,t){if(e==="change")return t}var wo=!1;if(ol){var pr;if(ol){var vr="oninput"in document;if(!vr){var To=document.createElement("div");To.setAttribute("oninput","return;"),vr=typeof To.oninput=="function"}pr=vr}else pr=!1;wo=pr&&(!document.documentMode||9<document.documentMode)}function Co(){An&&(An.detachEvent("onpropertychange",Ro),Mn=An=null)}function Ro(e){if(e.propertyName==="value"&&qs(Mn)){var t=[];No(t,Mn,e,rr(e)),oo(tx,t)}}function lx(e,t,l){e==="focusin"?(Co(),An=t,Mn=l,An.attachEvent("onpropertychange",Ro)):e==="focusout"&&Co()}function ax(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qs(Mn)}function nx(e,t){if(e==="click")return qs(t)}function sx(e,t){if(e==="input"||e==="change")return qs(t)}function ix(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:ix;function _n(e,t){if(Mt(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 n=l[a];if(!le.call(t,n)||!Mt(e[n],t[n]))return!1}return!0}function Ao(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mo(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 _o(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_o(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Do(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=As(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=As(e.document)}return t}function gr(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 rx=ol&&"documentMode"in document&&11>=document.documentMode,Ua=null,br=null,Dn=null,yr=!1;function zo(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;yr||Ua==null||Ua!==As(a)||(a=Ua,"selectionStart"in a&&gr(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}),Dn&&_n(Dn,a)||(Dn=a,a=Ei(br,"onSelect"),0<a.length&&(t=new Os("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ua)))}function ca(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var qa={animationend:ca("Animation","AnimationEnd"),animationiteration:ca("Animation","AnimationIteration"),animationstart:ca("Animation","AnimationStart"),transitionrun:ca("Transition","TransitionRun"),transitionstart:ca("Transition","TransitionStart"),transitioncancel:ca("Transition","TransitionCancel"),transitionend:ca("Transition","TransitionEnd")},jr={},Oo={};ol&&(Oo=document.createElement("div").style,"AnimationEvent"in window||(delete qa.animationend.animation,delete qa.animationiteration.animation,delete qa.animationstart.animation),"TransitionEvent"in window||delete qa.transitionend.transition);function oa(e){if(jr[e])return jr[e];if(!qa[e])return e;var t=qa[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Oo)return jr[e]=t[l];return e}var Uo=oa("animationend"),qo=oa("animationiteration"),Ho=oa("animationstart"),ux=oa("transitionrun"),cx=oa("transitionstart"),ox=oa("transitioncancel"),Lo=oa("transitionend"),Bo=new Map,Sr="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(" ");Sr.push("scrollEnd");function Ft(e,t){Bo.set(e,t),ra(t,[e])}var Hs=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)},Yt=[],Ha=0,Nr=0;function Ls(){for(var e=Ha,t=Nr=Ha=0;t<e;){var l=Yt[t];Yt[t++]=null;var a=Yt[t];Yt[t++]=null;var n=Yt[t];Yt[t++]=null;var i=Yt[t];if(Yt[t++]=null,a!==null&&n!==null){var o=a.pending;o===null?n.next=n:(n.next=o.next,o.next=n),a.pending=n}i!==0&&ko(l,n,i)}}function Bs(e,t,l,a){Yt[Ha++]=e,Yt[Ha++]=t,Yt[Ha++]=l,Yt[Ha++]=a,Nr|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Er(e,t,l,a){return Bs(e,t,l,a),ks(e)}function da(e,t){return Bs(e,null,null,t),ks(e)}function ko(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!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||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-At(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function ks(e){if(50<es)throw es=0,zu=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var La={};function dx(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 _t(e,t,l,a){return new dx(e,t,l,a)}function wr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dl(e,t){var l=e.alternate;return l===null?(l=_t(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 Yo(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 Ys(e,t,l,a,n,i){var o=0;if(a=e,typeof e=="function")wr(e)&&(o=1);else if(typeof e=="string")o=pp(e,l,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ge:return e=_t(31,l,t,n),e.elementType=ge,e.lanes=i,e;case A:return fa(l.children,n,i,t);case Y:o=8,n|=24;break;case V:return e=_t(12,l,t,n|2),e.elementType=V,e.lanes=i,e;case ue:return e=_t(13,l,t,n),e.elementType=ue,e.lanes=i,e;case H:return e=_t(19,l,t,n),e.elementType=H,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S:o=10;break e;case B:o=9;break e;case ee:o=11;break e;case P:o=14;break e;case ie:o=16,a=null;break e}o=29,l=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=_t(o,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function fa(e,t,l,a){return e=_t(7,e,a,t),e.lanes=l,e}function Tr(e,t,l){return e=_t(6,e,null,t),e.lanes=l,e}function Go(e){var t=_t(18,null,null,0);return t.stateNode=e,t}function Cr(e,t,l){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qo=new WeakMap;function Gt(e,t){if(typeof e=="object"&&e!==null){var l=Qo.get(e);return l!==void 0?l:(t={value:e,source:t,stack:X(t)},Qo.set(e,t),t)}return{value:e,source:t,stack:X(t)}}var Ba=[],ka=0,Gs=null,zn=0,Qt=[],Vt=0,Ul=null,tl=1,ll="";function fl(e,t){Ba[ka++]=zn,Ba[ka++]=Gs,Gs=e,zn=t}function Vo(e,t,l){Qt[Vt++]=tl,Qt[Vt++]=ll,Qt[Vt++]=Ul,Ul=e;var a=tl;e=ll;var n=32-At(a)-1;a&=~(1<<n),l+=1;var i=32-At(t)+n;if(30<i){var o=n-n%5;i=(a&(1<<o)-1).toString(32),a>>=o,n-=o,tl=1<<32-At(t)+n|l<<n|a,ll=i+e}else tl=1<<i|l<<n|a,ll=e}function Rr(e){e.return!==null&&(fl(e,1),Vo(e,1,0))}function Ar(e){for(;e===Gs;)Gs=Ba[--ka],Ba[ka]=null,zn=Ba[--ka],Ba[ka]=null;for(;e===Ul;)Ul=Qt[--Vt],Qt[Vt]=null,ll=Qt[--Vt],Qt[Vt]=null,tl=Qt[--Vt],Qt[Vt]=null}function Xo(e,t){Qt[Vt++]=tl,Qt[Vt++]=ll,Qt[Vt++]=Ul,tl=t.id,ll=t.overflow,Ul=e}var ft=null,Xe=null,we=!1,ql=null,Xt=!1,Mr=Error(u(519));function Hl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw On(Gt(t,e)),Mr}function Zo(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[dt]=e,t[jt]=a,l){case"dialog":ye("cancel",t),ye("close",t);break;case"iframe":case"object":case"embed":ye("load",t);break;case"video":case"audio":for(l=0;l<ls.length;l++)ye(ls[l],t);break;case"source":ye("error",t);break;case"img":case"image":case"link":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"input":ye("invalid",t),no(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ye("invalid",t);break;case"textarea":ye("invalid",t),io(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||om(t.textContent,l)?(a.popover!=null&&(ye("beforetoggle",t),ye("toggle",t)),a.onScroll!=null&&ye("scroll",t),a.onScrollEnd!=null&&ye("scrollend",t),a.onClick!=null&&(t.onclick=cl),t=!0):t=!1,t||Hl(e,!0)}function $o(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:ft=ft.return}}function Ya(e){if(e!==ft)return!1;if(!we)return $o(e),we=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Ku(e.type,e.memoizedProps)),l=!l),l&&Xe&&Hl(e),$o(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Xe=bm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Xe=bm(e)}else t===27?(t=Xe,Pl(e.type)?(e=Iu,Iu=null,Xe=e):Xe=t):Xe=ft?$t(e.stateNode.nextSibling):null;return!0}function ma(){Xe=ft=null,we=!1}function _r(){var e=ql;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),ql=null),e}function On(e){ql===null?ql=[e]:ql.push(e)}var Dr=N(null),ha=null,ml=null;function Ll(e,t,l){$(Dr,t._currentValue),t._currentValue=l}function hl(e){e._currentValue=Dr.current,G(Dr)}function zr(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 Or(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=n;for(var j=0;j<t.length;j++)if(h.context===t[j]){i.lanes|=l,h=i.alternate,h!==null&&(h.lanes|=l),zr(i.return,l,e),a||(o=null);break e}i=h.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(u(341));o.lanes|=l,i=o.alternate,i!==null&&(i.lanes|=l),zr(o,l,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function Ga(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(u(387));if(o=o.memoizedProps,o!==null){var h=n.type;Mt(n.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(n===Ee.current){if(o=n.alternate,o===null)throw Error(u(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(rs):e=[rs])}n=n.return}e!==null&&Or(t,e,l,a),t.flags|=262144}function Qs(e){for(e=e.firstContext;e!==null;){if(!Mt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xa(e){ha=e,ml=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function mt(e){return Ko(ha,e)}function Vs(e,t){return ha===null&&xa(e),Ko(e,t)}function Ko(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},ml===null){if(e===null)throw Error(u(308));ml=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ml=ml.next=t;return l}var fx=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()})}},mx=r.unstable_scheduleCallback,hx=r.unstable_NormalPriority,at={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ur(){return{controller:new fx,data:new Map,refCount:0}}function Un(e){e.refCount--,e.refCount===0&&mx(hx,function(){e.controller.abort()})}var qn=null,qr=0,Qa=0,Va=null;function xx(e,t){if(qn===null){var l=qn=[];qr=0,Qa=Bu(),Va={status:"pending",value:void 0,then:function(a){l.push(a)}}}return qr++,t.then(Jo,Jo),t}function Jo(){if(--qr===0&&qn!==null){Va!==null&&(Va.status="fulfilled");var e=qn;qn=null,Qa=0,Va=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function px(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Fo=U.S;U.S=function(e,t){Of=Ve(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&xx(e,t),Fo!==null&&Fo(e,t)};var pa=N(null);function Hr(){var e=pa.current;return e!==null?e:Ge.pooledCache}function Xs(e,t){t===null?$(pa,pa.current):$(pa,t.pool)}function Po(){var e=Hr();return e===null?null:{parent:at._currentValue,pool:e}}var Xa=Error(u(460)),Lr=Error(u(474)),Zs=Error(u(542)),$s={then:function(){}};function Wo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Io(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(cl,cl),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e;default:if(typeof t.status=="string")t.then(cl,cl);else{if(e=Ge,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,td(e),e}throw ga=t,Xa}}function va(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ga=l,Xa):l}}var ga=null;function ed(){if(ga===null)throw Error(u(459));var e=ga;return ga=null,e}function td(e){if(e===Xa||e===Zs)throw Error(u(483))}var Za=null,Hn=0;function Ks(e){var t=Hn;return Hn+=1,Za===null&&(Za=[]),Io(Za,e,t)}function Ln(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Js(e,t){throw t.$$typeof===C?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ld(e){function t(R,E){if(e){var M=R.deletions;M===null?(R.deletions=[E],R.flags|=16):M.push(E)}}function l(R,E){if(!e)return null;for(;E!==null;)t(R,E),E=E.sibling;return null}function a(R){for(var E=new Map;R!==null;)R.key!==null?E.set(R.key,R):E.set(R.index,R),R=R.sibling;return E}function n(R,E){return R=dl(R,E),R.index=0,R.sibling=null,R}function i(R,E,M){return R.index=M,e?(M=R.alternate,M!==null?(M=M.index,M<E?(R.flags|=67108866,E):M):(R.flags|=67108866,E)):(R.flags|=1048576,E)}function o(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function h(R,E,M,k){return E===null||E.tag!==6?(E=Tr(M,R.mode,k),E.return=R,E):(E=n(E,M),E.return=R,E)}function j(R,E,M,k){var ne=M.type;return ne===A?L(R,E,M.props.children,k,M.key):E!==null&&(E.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===ie&&va(ne)===E.type)?(E=n(E,M.props),Ln(E,M),E.return=R,E):(E=Ys(M.type,M.key,M.props,null,R.mode,k),Ln(E,M),E.return=R,E)}function _(R,E,M,k){return E===null||E.tag!==4||E.stateNode.containerInfo!==M.containerInfo||E.stateNode.implementation!==M.implementation?(E=Cr(M,R.mode,k),E.return=R,E):(E=n(E,M.children||[]),E.return=R,E)}function L(R,E,M,k,ne){return E===null||E.tag!==7?(E=fa(M,R.mode,k,ne),E.return=R,E):(E=n(E,M),E.return=R,E)}function Q(R,E,M){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Tr(""+E,R.mode,M),E.return=R,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case z:return M=Ys(E.type,E.key,E.props,null,R.mode,M),Ln(M,E),M.return=R,M;case q:return E=Cr(E,R.mode,M),E.return=R,E;case ie:return E=va(E),Q(R,E,M)}if(Z(E)||se(E))return E=fa(E,R.mode,M,null),E.return=R,E;if(typeof E.then=="function")return Q(R,Ks(E),M);if(E.$$typeof===S)return Q(R,Vs(R,E),M);Js(R,E)}return null}function D(R,E,M,k){var ne=E!==null?E.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ne!==null?null:h(R,E,""+M,k);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case z:return M.key===ne?j(R,E,M,k):null;case q:return M.key===ne?_(R,E,M,k):null;case ie:return M=va(M),D(R,E,M,k)}if(Z(M)||se(M))return ne!==null?null:L(R,E,M,k,null);if(typeof M.then=="function")return D(R,E,Ks(M),k);if(M.$$typeof===S)return D(R,E,Vs(R,M),k);Js(R,M)}return null}function O(R,E,M,k,ne){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return R=R.get(M)||null,h(E,R,""+k,ne);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case z:return R=R.get(k.key===null?M:k.key)||null,j(E,R,k,ne);case q:return R=R.get(k.key===null?M:k.key)||null,_(E,R,k,ne);case ie:return k=va(k),O(R,E,M,k,ne)}if(Z(k)||se(k))return R=R.get(M)||null,L(E,R,k,ne,null);if(typeof k.then=="function")return O(R,E,M,Ks(k),ne);if(k.$$typeof===S)return O(R,E,M,Vs(E,k),ne);Js(E,k)}return null}function I(R,E,M,k){for(var ne=null,Re=null,te=E,xe=E=0,Se=null;te!==null&&xe<M.length;xe++){te.index>xe?(Se=te,te=null):Se=te.sibling;var Ae=D(R,te,M[xe],k);if(Ae===null){te===null&&(te=Se);break}e&&te&&Ae.alternate===null&&t(R,te),E=i(Ae,E,xe),Re===null?ne=Ae:Re.sibling=Ae,Re=Ae,te=Se}if(xe===M.length)return l(R,te),we&&fl(R,xe),ne;if(te===null){for(;xe<M.length;xe++)te=Q(R,M[xe],k),te!==null&&(E=i(te,E,xe),Re===null?ne=te:Re.sibling=te,Re=te);return we&&fl(R,xe),ne}for(te=a(te);xe<M.length;xe++)Se=O(te,R,xe,M[xe],k),Se!==null&&(e&&Se.alternate!==null&&te.delete(Se.key===null?xe:Se.key),E=i(Se,E,xe),Re===null?ne=Se:Re.sibling=Se,Re=Se);return e&&te.forEach(function(la){return t(R,la)}),we&&fl(R,xe),ne}function re(R,E,M,k){if(M==null)throw Error(u(151));for(var ne=null,Re=null,te=E,xe=E=0,Se=null,Ae=M.next();te!==null&&!Ae.done;xe++,Ae=M.next()){te.index>xe?(Se=te,te=null):Se=te.sibling;var la=D(R,te,Ae.value,k);if(la===null){te===null&&(te=Se);break}e&&te&&la.alternate===null&&t(R,te),E=i(la,E,xe),Re===null?ne=la:Re.sibling=la,Re=la,te=Se}if(Ae.done)return l(R,te),we&&fl(R,xe),ne;if(te===null){for(;!Ae.done;xe++,Ae=M.next())Ae=Q(R,Ae.value,k),Ae!==null&&(E=i(Ae,E,xe),Re===null?ne=Ae:Re.sibling=Ae,Re=Ae);return we&&fl(R,xe),ne}for(te=a(te);!Ae.done;xe++,Ae=M.next())Ae=O(te,R,xe,Ae.value,k),Ae!==null&&(e&&Ae.alternate!==null&&te.delete(Ae.key===null?xe:Ae.key),E=i(Ae,E,xe),Re===null?ne=Ae:Re.sibling=Ae,Re=Ae);return e&&te.forEach(function(Cp){return t(R,Cp)}),we&&fl(R,xe),ne}function ke(R,E,M,k){if(typeof M=="object"&&M!==null&&M.type===A&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case z:e:{for(var ne=M.key;E!==null;){if(E.key===ne){if(ne=M.type,ne===A){if(E.tag===7){l(R,E.sibling),k=n(E,M.props.children),k.return=R,R=k;break e}}else if(E.elementType===ne||typeof ne=="object"&&ne!==null&&ne.$$typeof===ie&&va(ne)===E.type){l(R,E.sibling),k=n(E,M.props),Ln(k,M),k.return=R,R=k;break e}l(R,E);break}else t(R,E);E=E.sibling}M.type===A?(k=fa(M.props.children,R.mode,k,M.key),k.return=R,R=k):(k=Ys(M.type,M.key,M.props,null,R.mode,k),Ln(k,M),k.return=R,R=k)}return o(R);case q:e:{for(ne=M.key;E!==null;){if(E.key===ne)if(E.tag===4&&E.stateNode.containerInfo===M.containerInfo&&E.stateNode.implementation===M.implementation){l(R,E.sibling),k=n(E,M.children||[]),k.return=R,R=k;break e}else{l(R,E);break}else t(R,E);E=E.sibling}k=Cr(M,R.mode,k),k.return=R,R=k}return o(R);case ie:return M=va(M),ke(R,E,M,k)}if(Z(M))return I(R,E,M,k);if(se(M)){if(ne=se(M),typeof ne!="function")throw Error(u(150));return M=ne.call(M),re(R,E,M,k)}if(typeof M.then=="function")return ke(R,E,Ks(M),k);if(M.$$typeof===S)return ke(R,E,Vs(R,M),k);Js(R,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,E!==null&&E.tag===6?(l(R,E.sibling),k=n(E,M),k.return=R,R=k):(l(R,E),k=Tr(M,R.mode,k),k.return=R,R=k),o(R)):l(R,E)}return function(R,E,M,k){try{Hn=0;var ne=ke(R,E,M,k);return Za=null,ne}catch(te){if(te===Xa||te===Zs)throw te;var Re=_t(29,te,null,R.mode);return Re.lanes=k,Re.return=R,Re}finally{}}}var ba=ld(!0),ad=ld(!1),Bl=!1;function Br(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kr(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 kl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(_e&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=ks(e),ko(e,null,l),t}return Bs(e,a,t,l),ks(e)}function Bn(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,$c(e,l)}}function Yr(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var o={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=o:i=i.next=o,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,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 Gr=!1;function kn(){if(Gr){var e=Va;if(e!==null)throw e}}function Yn(e,t,l,a){Gr=!1;var n=e.updateQueue;Bl=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var j=h,_=j.next;j.next=null,o===null?i=_:o.next=_,o=j;var L=e.alternate;L!==null&&(L=L.updateQueue,h=L.lastBaseUpdate,h!==o&&(h===null?L.firstBaseUpdate=_:h.next=_,L.lastBaseUpdate=j))}if(i!==null){var Q=n.baseState;o=0,L=_=j=null,h=i;do{var D=h.lane&-536870913,O=D!==h.lane;if(O?(je&D)===D:(a&D)===D){D!==0&&D===Qa&&(Gr=!0),L!==null&&(L=L.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var I=e,re=h;D=t;var ke=l;switch(re.tag){case 1:if(I=re.payload,typeof I=="function"){Q=I.call(ke,Q,D);break e}Q=I;break e;case 3:I.flags=I.flags&-65537|128;case 0:if(I=re.payload,D=typeof I=="function"?I.call(ke,Q,D):I,D==null)break e;Q=b({},Q,D);break e;case 2:Bl=!0}}D=h.callback,D!==null&&(e.flags|=64,O&&(e.flags|=8192),O=n.callbacks,O===null?n.callbacks=[D]:O.push(D))}else O={lane:D,tag:h.tag,payload:h.payload,callback:h.callback,next:null},L===null?(_=L=O,j=Q):L=L.next=O,o|=D;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;O=h,h=O.next,O.next=null,n.lastBaseUpdate=O,n.shared.pending=null}}while(!0);L===null&&(j=Q),n.baseState=j,n.firstBaseUpdate=_,n.lastBaseUpdate=L,i===null&&(n.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=Q}}function nd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function sd(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)nd(l[e],t)}var $a=N(null),Fs=N(0);function id(e,t){e=Nl,$(Fs,e),$($a,t),Nl=e|t.baseLanes}function Qr(){$(Fs,Nl),$($a,$a.current)}function Vr(){Nl=Fs.current,G($a),G(Fs)}var Dt=N(null),Zt=null;function Gl(e){var t=e.alternate;$(et,et.current&1),$(Dt,e),Zt===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(Zt=e)}function Xr(e){$(et,et.current),$(Dt,e),Zt===null&&(Zt=e)}function rd(e){e.tag===22?($(et,et.current),$(Dt,e),Zt===null&&(Zt=e)):Ql()}function Ql(){$(et,et.current),$(Dt,Dt.current)}function zt(e){G(Dt),Zt===e&&(Zt=null),G(et)}var et=N(0);function Ps(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Pu(l)||Wu(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 xl=0,he=null,Le=null,nt=null,Ws=!1,Ka=!1,ya=!1,Is=0,Gn=0,Ja=null,vx=0;function We(){throw Error(u(321))}function Zr(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Mt(e[l],t[l]))return!1;return!0}function $r(e,t,l,a,n,i){return xl=i,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Vd:uu,ya=!1,i=l(a,n),ya=!1,Ka&&(i=cd(t,l,a,n)),ud(e),i}function ud(e){U.H=Xn;var t=Le!==null&&Le.next!==null;if(xl=0,nt=Le=he=null,Ws=!1,Gn=0,Ja=null,t)throw Error(u(300));e===null||st||(e=e.dependencies,e!==null&&Qs(e)&&(st=!0))}function cd(e,t,l,a){he=e;var n=0;do{if(Ka&&(Ja=null),Gn=0,Ka=!1,25<=n)throw Error(u(301));if(n+=1,nt=Le=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}U.H=Xd,i=t(l,a)}while(Ka);return i}function gx(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Qn(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(he.flags|=1024),t}function Kr(){var e=Is!==0;return Is=0,e}function Jr(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Fr(e){if(Ws){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ws=!1}xl=0,nt=Le=he=null,Ka=!1,Gn=Is=0,Ja=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?he.memoizedState=nt=e:nt=nt.next=e,nt}function tt(){if(Le===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=nt===null?he.memoizedState:nt.next;if(t!==null)nt=t,Le=e;else{if(e===null)throw he.alternate===null?Error(u(467)):Error(u(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},nt===null?he.memoizedState=nt=e:nt=nt.next=e}return nt}function ei(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qn(e){var t=Gn;return Gn+=1,Ja===null&&(Ja=[]),e=Io(Ja,e,t),t=he,(nt===null?t.memoizedState:nt.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Vd:uu),e}function ti(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Qn(e);if(e.$$typeof===S)return mt(e)}throw Error(u(438,String(e)))}function Pr(e){var t=null,l=he.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=he.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=ei(),he.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]=J;return t.index++,l}function pl(e,t){return typeof t=="function"?t(e):t}function li(e){var t=tt();return Wr(t,Le,e)}function Wr(e,t,l){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var h=o=null,j=null,_=t,L=!1;do{var Q=_.lane&-536870913;if(Q!==_.lane?(je&Q)===Q:(xl&Q)===Q){var D=_.revertLane;if(D===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null}),Q===Qa&&(L=!0);else if((xl&D)===D){_=_.next,D===Qa&&(L=!0);continue}else Q={lane:0,revertLane:_.revertLane,gesture:null,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},j===null?(h=j=Q,o=i):j=j.next=Q,he.lanes|=D,Zl|=D;Q=_.action,ya&&l(i,Q),i=_.hasEagerState?_.eagerState:l(i,Q)}else D={lane:Q,revertLane:_.revertLane,gesture:_.gesture,action:_.action,hasEagerState:_.hasEagerState,eagerState:_.eagerState,next:null},j===null?(h=j=D,o=i):j=j.next=D,he.lanes|=Q,Zl|=Q;_=_.next}while(_!==null&&_!==t);if(j===null?o=i:j.next=h,!Mt(i,e.memoizedState)&&(st=!0,L&&(l=Va,l!==null)))throw l;e.memoizedState=i,e.baseState=o,e.baseQueue=j,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ir(e){var t=tt(),l=t.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var o=n=n.next;do i=e(i,o.action),o=o.next;while(o!==n);Mt(i,t.memoizedState)||(st=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function od(e,t,l){var a=he,n=tt(),i=we;if(i){if(l===void 0)throw Error(u(407));l=l()}else l=t();var o=!Mt((Le||n).memoizedState,l);if(o&&(n.memoizedState=l,st=!0),n=n.queue,lu(md.bind(null,a,n,e),[e]),n.getSnapshot!==t||o||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,Fa(9,{destroy:void 0},fd.bind(null,a,n,l,t),null),Ge===null)throw Error(u(349));i||(xl&127)!==0||dd(a,t,l)}return l}function dd(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=he.updateQueue,t===null?(t=ei(),he.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function fd(e,t,l,a){t.value=l,t.getSnapshot=a,hd(t)&&xd(e)}function md(e,t,l){return l(function(){hd(t)&&xd(e)})}function hd(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Mt(e,l)}catch{return!0}}function xd(e){var t=da(e,2);t!==null&&Ct(t,e,2)}function eu(e){var t=gt();if(typeof e=="function"){var l=e;if(e=l(),ya){Dl(!0);try{l()}finally{Dl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:e},t}function pd(e,t,l,a){return e.baseState=l,Wr(e,Le,typeof a=="function"?a:pl)}function bx(e,t,l,a,n){if(si(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};U.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,vd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function vd(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=U.T,o={};U.T=o;try{var h=l(n,a),j=U.S;j!==null&&j(o,h),gd(e,t,h)}catch(_){tu(e,t,_)}finally{i!==null&&o.types!==null&&(i.types=o.types),U.T=i}}else try{i=l(n,a),gd(e,t,i)}catch(_){tu(e,t,_)}}function gd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){bd(e,t,a)},function(a){return tu(e,t,a)}):bd(e,t,l)}function bd(e,t,l){t.status="fulfilled",t.value=l,yd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,vd(e,l)))}function tu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,yd(t),t=t.next;while(t!==a)}e.action=null}function yd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function jd(e,t){return t}function Sd(e,t){if(we){var l=Ge.formState;if(l!==null){e:{var a=he;if(we){if(Xe){t:{for(var n=Xe,i=Xt;n.nodeType!==8;){if(!i){n=null;break t}if(n=$t(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Xe=$t(n.nextSibling),a=n.data==="F!";break e}}Hl(a)}a=!1}a&&(t=l[0])}}return l=gt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jd,lastRenderedState:t},l.queue=a,l=Yd.bind(null,he,a),a.dispatch=l,a=eu(!1),i=ru.bind(null,he,!1,a.queue),a=gt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=bx.bind(null,he,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Nd(e){var t=tt();return Ed(t,Le,e)}function Ed(e,t,l){if(t=Wr(e,t,jd)[0],e=li(pl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Qn(t)}catch(o){throw o===Xa?Zs:o}else a=t;t=tt();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(he.flags|=2048,Fa(9,{destroy:void 0},yx.bind(null,n,l),null)),[a,i,e]}function yx(e,t){e.action=t}function wd(e){var t=tt(),l=Le;if(l!==null)return Ed(t,l,e);tt(),t=t.memoizedState,l=tt();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Fa(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=he.updateQueue,t===null&&(t=ei(),he.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 Td(){return tt().memoizedState}function ai(e,t,l,a){var n=gt();he.flags|=e,n.memoizedState=Fa(1|t,{destroy:void 0},l,a===void 0?null:a)}function ni(e,t,l,a){var n=tt();a=a===void 0?null:a;var i=n.memoizedState.inst;Le!==null&&a!==null&&Zr(a,Le.memoizedState.deps)?n.memoizedState=Fa(t,i,l,a):(he.flags|=e,n.memoizedState=Fa(1|t,i,l,a))}function Cd(e,t){ai(8390656,8,e,t)}function lu(e,t){ni(2048,8,e,t)}function jx(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=ei(),he.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Rd(e){var t=tt().memoizedState;return jx({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Ad(e,t){return ni(4,2,e,t)}function Md(e,t){return ni(4,4,e,t)}function _d(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 Dd(e,t,l){l=l!=null?l.concat([e]):null,ni(4,4,_d.bind(null,t,e),l)}function au(){}function zd(e,t){var l=tt();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Zr(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Od(e,t){var l=tt();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Zr(t,a[1]))return a[0];if(a=e(),ya){Dl(!0);try{e()}finally{Dl(!1)}}return l.memoizedState=[a,t],a}function nu(e,t,l){return l===void 0||(xl&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=qf(),he.lanes|=e,Zl|=e,l)}function Ud(e,t,l,a){return Mt(l,t)?l:$a.current!==null?(e=nu(e,l,a),Mt(e,t)||(st=!0),e):(xl&42)===0||(xl&1073741824)!==0&&(je&261930)===0?(st=!0,e.memoizedState=l):(e=qf(),he.lanes|=e,Zl|=e,t)}function qd(e,t,l,a,n){var i=K.p;K.p=i!==0&&8>i?i:8;var o=U.T,h={};U.T=h,ru(e,!1,t,l);try{var j=n(),_=U.S;if(_!==null&&_(h,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var L=px(j,a);Vn(e,t,L,qt(e))}else Vn(e,t,a,qt(e))}catch(Q){Vn(e,t,{then:function(){},status:"rejected",reason:Q},qt())}finally{K.p=i,o!==null&&h.types!==null&&(o.types=h.types),U.T=o}}function Sx(){}function su(e,t,l,a){if(e.tag!==5)throw Error(u(476));var n=Hd(e).queue;qd(e,n,t,ae,l===null?Sx:function(){return Ld(e),l(a)})}function Hd(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:pl,lastRenderedState:ae},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ld(e){var t=Hd(e);t.next===null&&(t=e.alternate.memoizedState),Vn(e,t.next.queue,{},qt())}function iu(){return mt(rs)}function Bd(){return tt().memoizedState}function kd(){return tt().memoizedState}function Nx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=qt();e=kl(l);var a=Yl(t,e,l);a!==null&&(Ct(a,t,l),Bn(a,t,l)),t={cache:Ur()},e.payload=t;return}t=t.return}}function Ex(e,t,l){var a=qt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},si(e)?Gd(t,l):(l=Er(e,t,l,a),l!==null&&(Ct(l,e,a),Qd(l,t,a)))}function Yd(e,t,l){var a=qt();Vn(e,t,l,a)}function Vn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(si(e))Gd(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,l);if(n.hasEagerState=!0,n.eagerState=h,Mt(h,o))return Bs(e,t,n,0),Ge===null&&Ls(),!1}catch{}finally{}if(l=Er(e,t,n,a),l!==null)return Ct(l,e,a),Qd(l,t,a),!0}return!1}function ru(e,t,l,a){if(a={lane:2,revertLane:Bu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},si(e)){if(t)throw Error(u(479))}else t=Er(e,l,a,2),t!==null&&Ct(t,e,2)}function si(e){var t=e.alternate;return e===he||t!==null&&t===he}function Gd(e,t){Ka=Ws=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Qd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,$c(e,l)}}var Xn={readContext:mt,use:ti,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useInsertionEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useSyncExternalStore:We,useId:We,useHostTransitionStatus:We,useFormState:We,useActionState:We,useOptimistic:We,useMemoCache:We,useCacheRefresh:We};Xn.useEffectEvent=We;var Vd={readContext:mt,use:ti,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:Cd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ai(4194308,4,_d.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ai(4194308,4,e,t)},useInsertionEffect:function(e,t){ai(4,2,e,t)},useMemo:function(e,t){var l=gt();t=t===void 0?null:t;var a=e();if(ya){Dl(!0);try{e()}finally{Dl(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=gt();if(l!==void 0){var n=l(t);if(ya){Dl(!0);try{l(t)}finally{Dl(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=Ex.bind(null,he,e),[a.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=eu(e);var t=e.queue,l=Yd.bind(null,he,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:au,useDeferredValue:function(e,t){var l=gt();return nu(l,e,t)},useTransition:function(){var e=eu(!1);return e=qd.bind(null,he,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=he,n=gt();if(we){if(l===void 0)throw Error(u(407));l=l()}else{if(l=t(),Ge===null)throw Error(u(349));(je&127)!==0||dd(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,Cd(md.bind(null,a,i,e),[e]),a.flags|=2048,Fa(9,{destroy:void 0},fd.bind(null,a,i,l,t),null),l},useId:function(){var e=gt(),t=Ge.identifierPrefix;if(we){var l=ll,a=tl;l=(a&~(1<<32-At(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Is++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=vx++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:iu,useFormState:Sd,useActionState:Sd,useOptimistic:function(e){var t=gt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=ru.bind(null,he,!0,l),l.dispatch=t,[e,t]},useMemoCache:Pr,useCacheRefresh:function(){return gt().memoizedState=Nx.bind(null,he)},useEffectEvent:function(e){var t=gt(),l={impl:e};return t.memoizedState=l,function(){if((_e&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},uu={readContext:mt,use:ti,useCallback:zd,useContext:mt,useEffect:lu,useImperativeHandle:Dd,useInsertionEffect:Ad,useLayoutEffect:Md,useMemo:Od,useReducer:li,useRef:Td,useState:function(){return li(pl)},useDebugValue:au,useDeferredValue:function(e,t){var l=tt();return Ud(l,Le.memoizedState,e,t)},useTransition:function(){var e=li(pl)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:Qn(e),t]},useSyncExternalStore:od,useId:Bd,useHostTransitionStatus:iu,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var l=tt();return pd(l,Le,e,t)},useMemoCache:Pr,useCacheRefresh:kd};uu.useEffectEvent=Rd;var Xd={readContext:mt,use:ti,useCallback:zd,useContext:mt,useEffect:lu,useImperativeHandle:Dd,useInsertionEffect:Ad,useLayoutEffect:Md,useMemo:Od,useReducer:Ir,useRef:Td,useState:function(){return Ir(pl)},useDebugValue:au,useDeferredValue:function(e,t){var l=tt();return Le===null?nu(l,e,t):Ud(l,Le.memoizedState,e,t)},useTransition:function(){var e=Ir(pl)[0],t=tt().memoizedState;return[typeof e=="boolean"?e:Qn(e),t]},useSyncExternalStore:od,useId:Bd,useHostTransitionStatus:iu,useFormState:wd,useActionState:wd,useOptimistic:function(e,t){var l=tt();return Le!==null?pd(l,Le,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Pr,useCacheRefresh:kd};Xd.useEffectEvent=Rd;function cu(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:b({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var ou={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=qt(),n=kl(a);n.payload=t,l!=null&&(n.callback=l),t=Yl(e,n,a),t!==null&&(Ct(t,e,a),Bn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=qt(),n=kl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Yl(e,n,a),t!==null&&(Ct(t,e,a),Bn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=qt(),a=kl(l);a.tag=2,t!=null&&(a.callback=t),t=Yl(e,a,l),t!==null&&(Ct(t,e,l),Bn(t,e,l))}};function Zd(e,t,l,a,n,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!_n(l,a)||!_n(n,i):!0}function $d(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&&ou.enqueueReplaceState(t,t.state,null)}function ja(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=b({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function Kd(e){Hs(e)}function Jd(e){console.error(e)}function Fd(e){Hs(e)}function ii(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Pd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function du(e,t,l){return l=kl(l),l.tag=3,l.payload={element:null},l.callback=function(){ii(e,t)},l}function Wd(e){return e=kl(e),e.tag=3,e}function Id(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){Pd(t,l,a)}}var o=l.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Pd(t,l,a),typeof n!="function"&&($l===null?$l=new Set([this]):$l.add(this));var h=a.stack;this.componentDidCatch(a.value,{componentStack:h!==null?h:""})})}function wx(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ga(t,l,n,!0),l=Dt.current,l!==null){switch(l.tag){case 31:case 13:return Zt===null?gi():l.alternate===null&&Ie===0&&(Ie=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===$s?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),qu(e,a,n)),!1;case 22:return l.flags|=65536,a===$s?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)),qu(e,a,n)),!1}throw Error(u(435,l.tag))}return qu(e,a,n),gi(),!1}if(we)return t=Dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Mr&&(e=Error(u(422),{cause:a}),On(Gt(e,l)))):(a!==Mr&&(t=Error(u(423),{cause:a}),On(Gt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=Gt(a,l),n=du(e.stateNode,a,n),Yr(e,n),Ie!==4&&(Ie=2)),!1;var i=Error(u(520),{cause:a});if(i=Gt(i,l),In===null?In=[i]:In.push(i),Ie!==4&&(Ie=2),t===null)return!0;a=Gt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=du(l.stateNode,a,e),Yr(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"&&($l===null||!$l.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Wd(n),Id(n,e,l,a),Yr(l,n),!1}l=l.return}while(l!==null);return!1}var fu=Error(u(461)),st=!1;function ht(e,t,l,a){t.child=e===null?ad(t,null,l,a):ba(t,e.child,l,a)}function ef(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var o={};for(var h in a)h!=="ref"&&(o[h]=a[h])}else o=a;return xa(t),a=$r(e,t,l,o,i,n),h=Kr(),e!==null&&!st?(Jr(e,t,n),vl(e,t,n)):(we&&h&&Rr(t),t.flags|=1,ht(e,t,a,n),t.child)}function tf(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!wr(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,lf(e,t,i,a,n)):(e=Ys(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!yu(e,n)){var o=i.memoizedProps;if(l=l.compare,l=l!==null?l:_n,l(o,a)&&e.ref===t.ref)return vl(e,t,n)}return t.flags|=1,e=dl(i,a),e.ref=t.ref,e.return=t,t.child=e}function lf(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(_n(i,a)&&e.ref===t.ref)if(st=!1,t.pendingProps=a=i,yu(e,n))(e.flags&131072)!==0&&(st=!0);else return t.lanes=e.lanes,vl(e,t,n)}return mu(e,t,l,a,n)}function af(e,t,l,a){var n=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,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return nf(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xs(t,i!==null?i.cachePool:null),i!==null?id(t,i):Qr(),rd(t);else return a=t.lanes=536870912,nf(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Xs(t,i.cachePool),id(t,i),Ql(),t.memoizedState=null):(e!==null&&Xs(t,null),Qr(),Ql());return ht(e,t,n,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 nf(e,t,l,a,n){var i=Hr();return i=i===null?null:{parent:at._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Xs(t,null),Qr(),rd(t),e!==null&&Ga(e,t,a,!0),t.childLanes=n,null}function ri(e,t){return t=ci({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sf(e,t,l){return ba(t,e.child,null,l),e=ri(t,t.pendingProps),e.flags|=2,zt(t),t.memoizedState=null,e}function Tx(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(we){if(a.mode==="hidden")return e=ri(t,a),t.lanes=536870912,Zn(null,e);if(Xr(t),(e=Xe)?(e=gm(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ul!==null?{id:tl,overflow:ll}:null,retryLane:536870912,hydrationErrors:null},l=Go(e),l.return=t,t.child=l,ft=t,Xe=null)):e=null,e===null)throw Hl(t);return t.lanes=536870912,null}return ri(t,a)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Xr(t),n)if(t.flags&256)t.flags&=-257,t=sf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(st||Ga(e,t,l,!1),n=(l&e.childLanes)!==0,st||n){if(a=Ge,a!==null&&(o=Kc(a,l),o!==0&&o!==i.retryLane))throw i.retryLane=o,da(e,o),Ct(a,e,o),fu;gi(),t=sf(e,t,l)}else e=i.treeContext,Xe=$t(o.nextSibling),ft=t,we=!0,ql=null,Xt=!1,e!==null&&Xo(t,e),t=ri(t,a),t.flags|=4096;return t}return e=dl(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ui(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(u(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function mu(e,t,l,a,n){return xa(t),l=$r(e,t,l,a,void 0,n),a=Kr(),e!==null&&!st?(Jr(e,t,n),vl(e,t,n)):(we&&a&&Rr(t),t.flags|=1,ht(e,t,l,n),t.child)}function rf(e,t,l,a,n,i){return xa(t),t.updateQueue=null,l=cd(t,a,l,n),ud(e),a=Kr(),e!==null&&!st?(Jr(e,t,i),vl(e,t,i)):(we&&a&&Rr(t),t.flags|=1,ht(e,t,l,i),t.child)}function uf(e,t,l,a,n){if(xa(t),t.stateNode===null){var i=La,o=l.contextType;typeof o=="object"&&o!==null&&(i=mt(o)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=ou,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},Br(t),o=l.contextType,i.context=typeof o=="object"&&o!==null?mt(o):La,i.state=t.memoizedState,o=l.getDerivedStateFromProps,typeof o=="function"&&(cu(t,l,o,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&ou.enqueueReplaceState(i,i.state,null),Yn(t,a,i,n),kn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,j=ja(l,h);i.props=j;var _=i.context,L=l.contextType;o=La,typeof L=="object"&&L!==null&&(o=mt(L));var Q=l.getDerivedStateFromProps;L=typeof Q=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,L||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||_!==o)&&$d(t,i,a,o),Bl=!1;var D=t.memoizedState;i.state=D,Yn(t,a,i,n),kn(),_=t.memoizedState,h||D!==_||Bl?(typeof Q=="function"&&(cu(t,l,Q,a),_=t.memoizedState),(j=Bl||Zd(t,l,j,a,D,_,o))?(L||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=o,a=j):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,kr(e,t),o=t.memoizedProps,L=ja(l,o),i.props=L,Q=t.pendingProps,D=i.context,_=l.contextType,j=La,typeof _=="object"&&_!==null&&(j=mt(_)),h=l.getDerivedStateFromProps,(_=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==Q||D!==j)&&$d(t,i,a,j),Bl=!1,D=t.memoizedState,i.state=D,Yn(t,a,i,n),kn();var O=t.memoizedState;o!==Q||D!==O||Bl||e!==null&&e.dependencies!==null&&Qs(e.dependencies)?(typeof h=="function"&&(cu(t,l,h,a),O=t.memoizedState),(L=Bl||Zd(t,l,L,a,D,O,j)||e!==null&&e.dependencies!==null&&Qs(e.dependencies))?(_||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,j),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,j)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=j,a=L):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&D===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&D===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,ui(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=ba(t,e.child,null,n),t.child=ba(t,null,l,n)):ht(e,t,l,n),t.memoizedState=i.state,e=t.child):e=vl(e,t,n),e}function cf(e,t,l,a){return ma(),t.flags|=256,ht(e,t,l,a),t.child}var hu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xu(e){return{baseLanes:e,cachePool:Po()}}function pu(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ut),e}function of(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(et.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(we){if(n?Gl(t):Ql(),(e=Xe)?(e=gm(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ul!==null?{id:tl,overflow:ll}:null,retryLane:536870912,hydrationErrors:null},l=Go(e),l.return=t,t.child=l,ft=t,Xe=null)):e=null,e===null)throw Hl(t);return Wu(e)?t.lanes=32:t.lanes=536870912,null}var h=a.children;return a=a.fallback,n?(Ql(),n=t.mode,h=ci({mode:"hidden",children:h},n),a=fa(a,n,l,null),h.return=t,a.return=t,h.sibling=a,t.child=h,a=t.child,a.memoizedState=xu(l),a.childLanes=pu(e,o,l),t.memoizedState=hu,Zn(null,a)):(Gl(t),vu(t,h))}var j=e.memoizedState;if(j!==null&&(h=j.dehydrated,h!==null)){if(i)t.flags&256?(Gl(t),t.flags&=-257,t=gu(e,t,l)):t.memoizedState!==null?(Ql(),t.child=e.child,t.flags|=128,t=null):(Ql(),h=a.fallback,n=t.mode,a=ci({mode:"visible",children:a.children},n),h=fa(h,n,l,null),h.flags|=2,a.return=t,h.return=t,a.sibling=h,t.child=a,ba(t,e.child,null,l),a=t.child,a.memoizedState=xu(l),a.childLanes=pu(e,o,l),t.memoizedState=hu,t=Zn(null,a));else if(Gl(t),Wu(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var _=o.dgst;o=_,a=Error(u(419)),a.stack="",a.digest=o,On({value:a,source:null,stack:null}),t=gu(e,t,l)}else if(st||Ga(e,t,l,!1),o=(l&e.childLanes)!==0,st||o){if(o=Ge,o!==null&&(a=Kc(o,l),a!==0&&a!==j.retryLane))throw j.retryLane=a,da(e,a),Ct(o,e,a),fu;Pu(h)||gi(),t=gu(e,t,l)}else Pu(h)?(t.flags|=192,t.child=e.child,t=null):(e=j.treeContext,Xe=$t(h.nextSibling),ft=t,we=!0,ql=null,Xt=!1,e!==null&&Xo(t,e),t=vu(t,a.children),t.flags|=4096);return t}return n?(Ql(),h=a.fallback,n=t.mode,j=e.child,_=j.sibling,a=dl(j,{mode:"hidden",children:a.children}),a.subtreeFlags=j.subtreeFlags&65011712,_!==null?h=dl(_,h):(h=fa(h,n,l,null),h.flags|=2),h.return=t,a.return=t,a.sibling=h,t.child=a,Zn(null,a),a=t.child,h=e.child.memoizedState,h===null?h=xu(l):(n=h.cachePool,n!==null?(j=at._currentValue,n=n.parent!==j?{parent:j,pool:j}:n):n=Po(),h={baseLanes:h.baseLanes|l,cachePool:n}),a.memoizedState=h,a.childLanes=pu(e,o,l),t.memoizedState=hu,Zn(e.child,a)):(Gl(t),l=e.child,e=l.sibling,l=dl(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=l,t.memoizedState=null,l)}function vu(e,t){return t=ci({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ci(e,t){return e=_t(22,e,null,t),e.lanes=0,e}function gu(e,t,l){return ba(t,e.child,null,l),e=vu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function df(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),zr(e.return,t,l)}function bu(e,t,l,a,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=l,o.tailMode=n,o.treeForkCount=i)}function ff(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var o=et.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,$(et,o),ht(e,t,a,l),a=we?zn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&df(e,l,t);else if(e.tag===19)df(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(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&Ps(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),bu(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Ps(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}bu(t,!0,l,null,i,a);break;case"together":bu(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function vl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Zl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ga(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,l=dl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=dl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function yu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Qs(e)))}function Cx(e,t,l){switch(t.tag){case 3:lt(t,t.stateNode.containerInfo),Ll(t,at,e.memoizedState.cache),ma();break;case 27:case 5:el(t);break;case 4:lt(t,t.stateNode.containerInfo);break;case 10:Ll(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xr(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Gl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?of(e,t,l):(Gl(t),e=vl(e,t,l),e!==null?e.sibling:null);Gl(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ga(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return ff(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),$(et,et.current),a)break;return null;case 22:return t.lanes=0,af(e,t,l,t.pendingProps);case 24:Ll(t,at,e.memoizedState.cache)}return vl(e,t,l)}function mf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!yu(e,l)&&(t.flags&128)===0)return st=!1,Cx(e,t,l);st=(e.flags&131072)!==0}else st=!1,we&&(t.flags&1048576)!==0&&Vo(t,zn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=va(t.elementType),t.type=e,typeof e=="function")wr(e)?(a=ja(e,a),t.tag=1,t=uf(null,t,e,a,l)):(t.tag=0,t=mu(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===ee){t.tag=11,t=ef(null,t,e,a,l);break e}else if(n===P){t.tag=14,t=tf(null,t,e,a,l);break e}}throw t=Ce(e)||e,Error(u(306,t,""))}}return t;case 0:return mu(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=ja(a,t.pendingProps),uf(e,t,a,n,l);case 3:e:{if(lt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,kr(e,t),Yn(t,a,null,l);var o=t.memoizedState;if(a=o.cache,Ll(t,at,a),a!==i.cache&&Or(t,[at],l,!0),kn(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cf(e,t,a,l);break e}else if(a!==n){n=Gt(Error(u(424)),t),On(n),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(Xe=$t(e.firstChild),ft=t,we=!0,ql=null,Xt=!0,l=ad(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ma(),a===n){t=vl(e,t,l);break e}ht(e,t,a,l)}t=t.child}return t;case 26:return ui(e,t),e===null?(l=Em(t.type,null,t.pendingProps,null))?t.memoizedState=l:we||(l=t.type,e=t.pendingProps,a=wi(me.current).createElement(l),a[dt]=t,a[jt]=e,xt(a,l,e),ut(a),t.stateNode=a):t.memoizedState=Em(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return el(t),e===null&&we&&(a=t.stateNode=jm(t.type,t.pendingProps,me.current),ft=t,Xt=!0,n=Xe,Pl(t.type)?(Iu=n,Xe=$t(a.firstChild)):Xe=n),ht(e,t,t.pendingProps.children,l),ui(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&we&&((n=a=Xe)&&(a=ap(a,t.type,t.pendingProps,Xt),a!==null?(t.stateNode=a,ft=t,Xe=$t(a.firstChild),Xt=!1,n=!0):n=!1),n||Hl(t)),el(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Ku(n,i)?a=null:o!==null&&Ku(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=$r(e,t,gx,null,null,l),rs._currentValue=n),ui(e,t),ht(e,t,a,l),t.child;case 6:return e===null&&we&&((e=l=Xe)&&(l=np(l,t.pendingProps,Xt),l!==null?(t.stateNode=l,ft=t,Xe=null,e=!0):e=!1),e||Hl(t)),null;case 13:return of(e,t,l);case 4:return lt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ba(t,null,a,l):ht(e,t,a,l),t.child;case 11:return ef(e,t,t.type,t.pendingProps,l);case 7:return ht(e,t,t.pendingProps,l),t.child;case 8:return ht(e,t,t.pendingProps.children,l),t.child;case 12:return ht(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,Ll(t,t.type,a.value),ht(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,xa(t),n=mt(n),a=a(n),t.flags|=1,ht(e,t,a,l),t.child;case 14:return tf(e,t,t.type,t.pendingProps,l);case 15:return lf(e,t,t.type,t.pendingProps,l);case 19:return ff(e,t,l);case 31:return Tx(e,t,l);case 22:return af(e,t,l,t.pendingProps);case 24:return xa(t),a=mt(at),e===null?(n=Hr(),n===null&&(n=Ge,i=Ur(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},Br(t),Ll(t,at,n)):((e.lanes&l)!==0&&(kr(e,t),Yn(t,null,null,l),kn()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),Ll(t,at,a)):(a=i.cache,Ll(t,at,a),a!==n.cache&&Or(t,[at],l,!0))),ht(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function gl(e){e.flags|=4}function ju(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(kf())e.flags|=8192;else throw ga=$s,Lr}else e.flags&=-16777217}function hf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Am(t))if(kf())e.flags|=8192;else throw ga=$s,Lr}function oi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xc():536870912,e.lanes|=t,en|=t)}function $n(e,t){if(!we)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 Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function Rx(e,t,l){var a=t.pendingProps;switch(Ar(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),hl(at),Qe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ya(t)?gl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_r())),Ze(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(gl(t),i!==null?(Ze(t),hf(t,i)):(Ze(t),ju(t,n,null,a,l))):i?i!==e.memoizedState?(gl(t),Ze(t),hf(t,i)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&gl(t),Ze(t),ju(t,n,e,a,l)),null;case 27:if(il(t),l=me.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&gl(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Ze(t),null}e=W.current,Ya(t)?Zo(t):(e=jm(n,a,l),t.stateNode=e,gl(t))}return Ze(t),null;case 5:if(il(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&gl(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Ze(t),null}if(i=W.current,Ya(t))Zo(t);else{var o=wi(me.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?o.createElement(n,{is:a.is}):o.createElement(n)}}i[dt]=t,i[jt]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(xt(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&gl(t)}}return Ze(t),ju(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&gl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=me.current,Ya(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=ft,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[dt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||om(e.nodeValue,l)),e||Hl(t,!0)}else e=wi(e).createTextNode(a),e[dt]=t,t.stateNode=e}return Ze(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ya(t),l!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[dt]=t}else ma(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else l=_r(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(zt(t),t):(zt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Ya(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(u(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(u(317));n[dt]=t}else ma(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),n=!1}else n=_r(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(zt(t),t):(zt(t),null)}return zt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),oi(t,t.updateQueue),Ze(t),null);case 4:return Qe(),e===null&&Qu(t.stateNode.containerInfo),Ze(t),null;case 10:return hl(t.type),Ze(t),null;case 19:if(G(et),a=t.memoizedState,a===null)return Ze(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)$n(a,!1);else{if(Ie!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ps(e),i!==null){for(t.flags|=128,$n(a,!1),e=i.updateQueue,t.updateQueue=e,oi(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Yo(l,e),l=l.sibling;return $(et,et.current&1|2),we&&fl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Ve()>xi&&(t.flags|=128,n=!0,$n(a,!1),t.lanes=4194304)}else{if(!n)if(e=Ps(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,oi(t,e),$n(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!we)return Ze(t),null}else 2*Ve()-a.renderingStartTime>xi&&l!==536870912&&(t.flags|=128,n=!0,$n(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=Ve(),e.sibling=null,l=et.current,$(et,n?l&1|2:l&1),we&&fl(t,a.treeForkCount),e):(Ze(t),null);case 22:case 23:return zt(t),Vr(),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&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),l=t.updateQueue,l!==null&&oi(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(pa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),hl(at),Ze(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Ax(e,t){switch(Ar(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return hl(at),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return il(t),null;case 31:if(t.memoizedState!==null){if(zt(t),t.alternate===null)throw Error(u(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));ma()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(et),null;case 4:return Qe(),null;case 10:return hl(t.type),null;case 22:case 23:return zt(t),Vr(),e!==null&&G(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return hl(at),null;case 25:return null;default:return null}}function xf(e,t){switch(Ar(t),t.tag){case 3:hl(at),Qe();break;case 26:case 27:case 5:il(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&zt(t);break;case 13:zt(t);break;case 19:G(et);break;case 10:hl(t.type);break;case 22:case 23:zt(t),Vr(),e!==null&&G(pa);break;case 24:hl(at)}}function Kn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,o=l.inst;a=i(),o.destroy=a}l=l.next}while(l!==n)}}catch(h){qe(t,t.return,h)}}function Vl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var o=a.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,n=t;var j=l,_=h;try{_()}catch(L){qe(n,j,L)}}}a=a.next}while(a!==i)}}catch(L){qe(t,t.return,L)}}function pf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{sd(t,l)}catch(a){qe(e,e.return,a)}}}function vf(e,t,l){l.props=ja(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){qe(e,t,a)}}function Jn(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(n){qe(e,t,n)}}function al(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){qe(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){qe(e,t,n)}else l.current=null}function gf(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(n){qe(e,e.return,n)}}function Su(e,t,l){try{var a=e.stateNode;Px(a,e.type,l,t),a[jt]=t}catch(n){qe(e,e.return,n)}}function bf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Pl(e.type)||e.tag===4}function Nu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bf(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&&Pl(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 Eu(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=cl));else if(a!==4&&(a===27&&Pl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Eu(e,t,l),e=e.sibling;e!==null;)Eu(e,t,l),e=e.sibling}function di(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&&Pl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(di(e,t,l),e=e.sibling;e!==null;)di(e,t,l),e=e.sibling}function yf(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);xt(t,a,l),t[dt]=e,t[jt]=l}catch(i){qe(e,e.return,i)}}var bl=!1,it=!1,wu=!1,jf=typeof WeakSet=="function"?WeakSet:Set,ct=null;function Mx(e,t){if(e=e.containerInfo,Zu=Di,e=Do(e),gr(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 n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var o=0,h=-1,j=-1,_=0,L=0,Q=e,D=null;t:for(;;){for(var O;Q!==l||n!==0&&Q.nodeType!==3||(h=o+n),Q!==i||a!==0&&Q.nodeType!==3||(j=o+a),Q.nodeType===3&&(o+=Q.nodeValue.length),(O=Q.firstChild)!==null;)D=Q,Q=O;for(;;){if(Q===e)break t;if(D===l&&++_===n&&(h=o),D===i&&++L===a&&(j=o),(O=Q.nextSibling)!==null)break;Q=D,D=Q.parentNode}Q=O}l=h===-1||j===-1?null:{start:h,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for($u={focusedElem:e,selectionRange:l},Di=!1,ct=t;ct!==null;)if(t=ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ct=e;else for(;ct!==null;){switch(t=ct,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++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var I=ja(l.type,n);e=a.getSnapshotBeforeUpdate(I,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(re){qe(l,l.return,re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Fu(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fu(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(u(163))}if(e=t.sibling,e!==null){e.return=t.return,ct=e;break}ct=t.return}}function Sf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:jl(e,l),a&4&&Kn(5,l);break;case 1:if(jl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(o){qe(l,l.return,o)}else{var n=ja(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){qe(l,l.return,o)}}a&64&&pf(l),a&512&&Jn(l,l.return);break;case 3:if(jl(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{sd(e,t)}catch(o){qe(l,l.return,o)}}break;case 27:t===null&&a&4&&yf(l);case 26:case 5:jl(e,l),t===null&&a&4&&gf(l),a&512&&Jn(l,l.return);break;case 12:jl(e,l);break;case 31:jl(e,l),a&4&&wf(e,l);break;case 13:jl(e,l),a&4&&Tf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Bx.bind(null,l),sp(e,l))));break;case 22:if(a=l.memoizedState!==null||bl,!a){t=t!==null&&t.memoizedState!==null||it,n=bl;var i=it;bl=a,(it=t)&&!i?Sl(e,l,(l.subtreeFlags&8772)!==0):jl(e,l),bl=n,it=i}break;case 30:break;default:jl(e,l)}}function Nf(e){var t=e.alternate;t!==null&&(e.alternate=null,Nf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tr(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 Fe=null,Nt=!1;function yl(e,t,l){for(l=l.child;l!==null;)Ef(e,t,l),l=l.sibling}function Ef(e,t,l){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(bn,l)}catch{}switch(l.tag){case 26:it||al(l,t),yl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:it||al(l,t);var a=Fe,n=Nt;Pl(l.type)&&(Fe=l.stateNode,Nt=!1),yl(e,t,l),ns(l.stateNode),Fe=a,Nt=n;break;case 5:it||al(l,t);case 6:if(a=Fe,n=Nt,Fe=null,yl(e,t,l),Fe=a,Nt=n,Fe!==null)if(Nt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(l.stateNode)}catch(i){qe(l,t,i)}else try{Fe.removeChild(l.stateNode)}catch(i){qe(l,t,i)}break;case 18:Fe!==null&&(Nt?(e=Fe,pm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),cn(e)):pm(Fe,l.stateNode));break;case 4:a=Fe,n=Nt,Fe=l.stateNode.containerInfo,Nt=!0,yl(e,t,l),Fe=a,Nt=n;break;case 0:case 11:case 14:case 15:Vl(2,l,t),it||Vl(4,l,t),yl(e,t,l);break;case 1:it||(al(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&vf(l,t,a)),yl(e,t,l);break;case 21:yl(e,t,l);break;case 22:it=(a=it)||l.memoizedState!==null,yl(e,t,l),it=a;break;default:yl(e,t,l)}}function wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cn(e)}catch(l){qe(t,t.return,l)}}}function Tf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cn(e)}catch(l){qe(t,t.return,l)}}function _x(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jf),t;default:throw Error(u(435,e.tag))}}function fi(e,t){var l=_x(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=kx.bind(null,e,a);a.then(n,n)}})}function Et(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(Pl(h.type)){Fe=h.stateNode,Nt=!1;break e}break;case 5:Fe=h.stateNode,Nt=!1;break e;case 3:case 4:Fe=h.stateNode.containerInfo,Nt=!0;break e}h=h.return}if(Fe===null)throw Error(u(160));Ef(i,o,n),Fe=null,Nt=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Cf(t,e),t=t.sibling}var Pt=null;function Cf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(t,e),wt(e),a&4&&(Vl(3,e,e.return),Kn(3,e),Vl(5,e,e.return));break;case 1:Et(t,e),wt(e),a&512&&(it||l===null||al(l,l.return)),a&64&&bl&&(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 n=Pt;if(Et(t,e),wt(e),a&512&&(it||l===null||al(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,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[Sn]||i[dt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),xt(i,a,l),i[dt]=e,ut(i),a=i;break e;case"link":var o=Cm("link","href",n).get(a+(l.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],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)){o.splice(h,1);break t}}i=n.createElement(a),xt(i,a,l),n.head.appendChild(i);break;case"meta":if(o=Cm("meta","content",n).get(a+(l.content||""))){for(h=0;h<o.length;h++)if(i=o[h],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)){o.splice(h,1);break t}}i=n.createElement(a),xt(i,a,l),n.head.appendChild(i);break;default:throw Error(u(468,a))}i[dt]=e,ut(i),a=i}e.stateNode=a}else Rm(n,e.type,e.stateNode);else e.stateNode=Tm(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?Rm(n,e.type,e.stateNode):Tm(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Su(e,e.memoizedProps,l.memoizedProps)}break;case 27:Et(t,e),wt(e),a&512&&(it||l===null||al(l,l.return)),l!==null&&a&4&&Su(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Et(t,e),wt(e),a&512&&(it||l===null||al(l,l.return)),e.flags&32){n=e.stateNode;try{_a(n,"")}catch(I){qe(e,e.return,I)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Su(e,n,l!==null?l.memoizedProps:n)),a&1024&&(wu=!0);break;case 6:if(Et(t,e),wt(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(I){qe(e,e.return,I)}}break;case 3:if(Ri=null,n=Pt,Pt=Ti(t.containerInfo),Et(t,e),Pt=n,wt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{cn(t.containerInfo)}catch(I){qe(e,e.return,I)}wu&&(wu=!1,Rf(e));break;case 4:a=Pt,Pt=Ti(e.stateNode.containerInfo),Et(t,e),wt(e),Pt=a;break;case 12:Et(t,e),wt(e);break;case 31:Et(t,e),wt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 13:Et(t,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(hi=Ve()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 22:n=e.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,_=bl,L=it;if(bl=_||n,it=L||j,Et(t,e),it=L,bl=_,wt(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||j||bl||it||Sa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){j=l=t;try{if(i=j.stateNode,n)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=j.stateNode;var Q=j.memoizedProps.style,D=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;h.style.display=D==null||typeof D=="boolean"?"":(""+D).trim()}}catch(I){qe(j,j.return,I)}}}else if(t.tag===6){if(l===null){j=t;try{j.stateNode.nodeValue=n?"":j.memoizedProps}catch(I){qe(j,j.return,I)}}}else if(t.tag===18){if(l===null){j=t;try{var O=j.stateNode;n?vm(O,!0):vm(j.stateNode,!1)}catch(I){qe(j,j.return,I)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;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,fi(e,l))));break;case 19:Et(t,e),wt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,fi(e,a)));break;case 30:break;case 21:break;default:Et(t,e),wt(e)}}function wt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(bf(a)){l=a;break}a=a.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var n=l.stateNode,i=Nu(e);di(e,i,n);break;case 5:var o=l.stateNode;l.flags&32&&(_a(o,""),l.flags&=-33);var h=Nu(e);di(e,h,o);break;case 3:case 4:var j=l.stateNode.containerInfo,_=Nu(e);Eu(e,_,j);break;default:throw Error(u(161))}}catch(L){qe(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Rf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function jl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sf(e,t.alternate,t),t=t.sibling}function Sa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vl(4,t,t.return),Sa(t);break;case 1:al(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&vf(t,t.return,l),Sa(t);break;case 27:ns(t.stateNode);case 26:case 5:al(t,t.return),Sa(t);break;case 22:t.memoizedState===null&&Sa(t);break;case 30:Sa(t);break;default:Sa(t)}e=e.sibling}}function Sl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:Sl(n,i,l),Kn(4,i);break;case 1:if(Sl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(_){qe(a,a.return,_)}if(a=i,n=a.updateQueue,n!==null){var h=a.stateNode;try{var j=n.shared.hiddenCallbacks;if(j!==null)for(n.shared.hiddenCallbacks=null,n=0;n<j.length;n++)nd(j[n],h)}catch(_){qe(a,a.return,_)}}l&&o&64&&pf(i),Jn(i,i.return);break;case 27:yf(i);case 26:case 5:Sl(n,i,l),l&&a===null&&o&4&&gf(i),Jn(i,i.return);break;case 12:Sl(n,i,l);break;case 31:Sl(n,i,l),l&&o&4&&wf(n,i);break;case 13:Sl(n,i,l),l&&o&4&&Tf(n,i);break;case 22:i.memoizedState===null&&Sl(n,i,l),Jn(i,i.return);break;case 30:break;default:Sl(n,i,l)}t=t.sibling}}function Tu(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&&Un(l))}function Cu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Un(e))}function Wt(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 n=t.flags;switch(t.tag){case 0:case 11:case 15:Wt(e,t,l,a),n&2048&&Kn(9,t);break;case 1:Wt(e,t,l,a);break;case 3:Wt(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Un(e)));break;case 12:if(n&2048){Wt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(j){qe(t,t.return,j)}}else Wt(e,t,l,a);break;case 31:Wt(e,t,l,a);break;case 13:Wt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?Wt(e,t,l,a):Fn(e,t):i._visibility&2?Wt(e,t,l,a):(i._visibility|=2,Pa(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Tu(o,t);break;case 24:Wt(e,t,l,a),n&2048&&Cu(t.alternate,t);break;default:Wt(e,t,l,a)}}function Pa(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=l,j=a,_=o.flags;switch(o.tag){case 0:case 11:case 15:Pa(i,o,h,j,n),Kn(8,o);break;case 23:break;case 22:var L=o.stateNode;o.memoizedState!==null?L._visibility&2?Pa(i,o,h,j,n):Fn(i,o):(L._visibility|=2,Pa(i,o,h,j,n)),n&&_&2048&&Tu(o.alternate,o);break;case 24:Pa(i,o,h,j,n),n&&_&2048&&Cu(o.alternate,o);break;default:Pa(i,o,h,j,n)}t=t.sibling}}function Fn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:Fn(l,a),n&2048&&Tu(a.alternate,a);break;case 24:Fn(l,a),n&2048&&Cu(a.alternate,a);break;default:Fn(l,a)}t=t.sibling}}var Pn=8192;function Wa(e,t,l){if(e.subtreeFlags&Pn)for(e=e.child;e!==null;)Mf(e,t,l),e=e.sibling}function Mf(e,t,l){switch(e.tag){case 26:Wa(e,t,l),e.flags&Pn&&e.memoizedState!==null&&vp(l,Pt,e.memoizedState,e.memoizedProps);break;case 5:Wa(e,t,l);break;case 3:case 4:var a=Pt;Pt=Ti(e.stateNode.containerInfo),Wa(e,t,l),Pt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Pn,Pn=16777216,Wa(e,t,l),Pn=a):Wa(e,t,l));break;default:Wa(e,t,l)}}function _f(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 Wn(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];ct=a,zf(a,e)}_f(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Df(e),e=e.sibling}function Df(e){switch(e.tag){case 0:case 11:case 15:Wn(e),e.flags&2048&&Vl(9,e,e.return);break;case 3:Wn(e);break;case 12:Wn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mi(e)):Wn(e);break;default:Wn(e)}}function mi(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];ct=a,zf(a,e)}_f(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vl(8,t,t.return),mi(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mi(t));break;default:mi(t)}e=e.sibling}}function zf(e,t){for(;ct!==null;){var l=ct;switch(l.tag){case 0:case 11:case 15:Vl(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:Un(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,ct=a;else e:for(l=e;ct!==null;){a=ct;var n=a.sibling,i=a.return;if(Nf(a),a===l){ct=null;break e}if(n!==null){n.return=i,ct=n;break e}ct=i}}}var Dx={getCacheForType:function(e){var t=mt(at),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return mt(at).controller.signal}},zx=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ge=null,be=null,je=0,Ue=0,Ot=null,Xl=!1,Ia=!1,Ru=!1,Nl=0,Ie=0,Zl=0,Na=0,Au=0,Ut=0,en=0,In=null,Tt=null,Mu=!1,hi=0,Of=0,xi=1/0,pi=null,$l=null,rt=0,Kl=null,tn=null,El=0,_u=0,Du=null,Uf=null,es=0,zu=null;function qt(){return(_e&2)!==0&&je!==0?je&-je:U.T!==null?Bu():Jc()}function qf(){if(Ut===0)if((je&536870912)===0||we){var e=Es;Es<<=1,(Es&3932160)===0&&(Es=262144),Ut=e}else Ut=536870912;return e=Dt.current,e!==null&&(e.flags|=32),Ut}function Ct(e,t,l){(e===Ge&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(ln(e,0),Jl(e,je,Ut,!1)),jn(e,l),((_e&2)===0||e!==Ge)&&(e===Ge&&((_e&2)===0&&(Na|=l),Ie===4&&Jl(e,je,Ut,!1)),nl(e))}function Hf(e,t,l){if((_e&6)!==0)throw Error(u(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||yn(e,t),n=a?qx(e,t):Uu(e,t,!0),i=a;do{if(n===0){Ia&&!a&&Jl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!Ox(l)){n=Uu(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;n=In;var j=h.current.memoizedState.isDehydrated;if(j&&(ln(h,o).flags|=256),o=Uu(h,o,!1),o!==2){if(Ru&&!j){h.errorRecoveryDisabledLanes|=i,Na|=i,n=4;break e}i=Tt,Tt=n,i!==null&&(Tt===null?Tt=i:Tt.push.apply(Tt,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){ln(e,0),Jl(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Jl(a,t,Ut,!Xl);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(n=hi+300-Ve(),10<n)){if(Jl(a,t,Ut,!Xl),Ts(a,0,!0)!==0)break e;El=t,a.timeoutHandle=hm(Lf.bind(null,a,l,Tt,pi,Mu,t,Ut,Na,en,Xl,i,"Throttled",-0,0),n);break e}Lf(a,l,Tt,pi,Mu,t,Ut,Na,en,Xl,i,null,-0,0)}}break}while(!0);nl(e)}function Lf(e,t,l,a,n,i,o,h,j,_,L,Q,D,O){if(e.timeoutHandle=-1,Q=t.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:cl},Mf(t,i,Q);var I=(i&62914560)===i?hi-Ve():(i&4194048)===i?Of-Ve():0;if(I=gp(Q,I),I!==null){El=i,e.cancelPendingCommit=I(Zf.bind(null,e,t,i,l,a,n,o,h,j,L,Q,null,D,O)),Jl(e,i,o,!_);return}}Zf(e,t,i,l,a,n,o,h,j)}function Ox(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 n=l[a],i=n.getSnapshot;n=n.value;try{if(!Mt(i(),n))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 Jl(e,t,l,a){t&=~Au,t&=~Na,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-At(n),o=1<<i;a[i]=-1,n&=~o}l!==0&&Zc(e,l,t)}function vi(){return(_e&6)===0?(ts(0),!1):!0}function Ou(){if(be!==null){if(Ue===0)var e=be.return;else e=be,ml=ha=null,Fr(e),Za=null,Hn=0,e=be;for(;e!==null;)xf(e.alternate,e),e=e.return;be=null}}function ln(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,ep(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),El=0,Ou(),Ge=e,be=l=dl(e.current,null),je=t,Ue=0,Ot=null,Xl=!1,Ia=yn(e,t),Ru=!1,en=Ut=Au=Na=Zl=Ie=0,Tt=In=null,Mu=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-At(a),i=1<<n;t|=e[n],a&=~i}return Nl=t,Ls(),l}function Bf(e,t){he=null,U.H=Xn,t===Xa||t===Zs?(t=ed(),Ue=3):t===Lr?(t=ed(),Ue=4):Ue=t===fu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ot=t,be===null&&(Ie=1,ii(e,Gt(t,e.current)))}function kf(){var e=Dt.current;return e===null?!0:(je&4194048)===je?Zt===null:(je&62914560)===je||(je&536870912)!==0?e===Zt:!1}function Yf(){var e=U.H;return U.H=Xn,e===null?Xn:e}function Gf(){var e=U.A;return U.A=Dx,e}function gi(){Ie=4,Xl||(je&4194048)!==je&&Dt.current!==null||(Ia=!0),(Zl&134217727)===0&&(Na&134217727)===0||Ge===null||Jl(Ge,je,Ut,!1)}function Uu(e,t,l){var a=_e;_e|=2;var n=Yf(),i=Gf();(Ge!==e||je!==t)&&(pi=null,ln(e,t)),t=!1;var o=Ie;e:do try{if(Ue!==0&&be!==null){var h=be,j=Ot;switch(Ue){case 8:Ou(),o=6;break e;case 3:case 2:case 9:case 6:Dt.current===null&&(t=!0);var _=Ue;if(Ue=0,Ot=null,an(e,h,j,_),l&&Ia){o=0;break e}break;default:_=Ue,Ue=0,Ot=null,an(e,h,j,_)}}Ux(),o=Ie;break}catch(L){Bf(e,L)}while(!0);return t&&e.shellSuspendCounter++,ml=ha=null,_e=a,U.H=n,U.A=i,be===null&&(Ge=null,je=0,Ls()),o}function Ux(){for(;be!==null;)Qf(be)}function qx(e,t){var l=_e;_e|=2;var a=Yf(),n=Gf();Ge!==e||je!==t?(pi=null,xi=Ve()+500,ln(e,t)):Ia=yn(e,t);e:do try{if(Ue!==0&&be!==null){t=be;var i=Ot;t:switch(Ue){case 1:Ue=0,Ot=null,an(e,t,i,1);break;case 2:case 9:if(Wo(i)){Ue=0,Ot=null,Vf(t);break}t=function(){Ue!==2&&Ue!==9||Ge!==e||(Ue=7),nl(e)},i.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:Wo(i)?(Ue=0,Ot=null,Vf(t)):(Ue=0,Ot=null,an(e,t,i,7));break;case 5:var o=null;switch(be.tag){case 26:o=be.memoizedState;case 5:case 27:var h=be;if(o?Am(o):h.stateNode.complete){Ue=0,Ot=null;var j=h.sibling;if(j!==null)be=j;else{var _=h.return;_!==null?(be=_,bi(_)):be=null}break t}}Ue=0,Ot=null,an(e,t,i,5);break;case 6:Ue=0,Ot=null,an(e,t,i,6);break;case 8:Ou(),Ie=6;break e;default:throw Error(u(462))}}Hx();break}catch(L){Bf(e,L)}while(!0);return ml=ha=null,U.H=a,U.A=n,_e=l,be!==null?0:(Ge=null,je=0,Ls(),Ie)}function Hx(){for(;be!==null&&!ot();)Qf(be)}function Qf(e){var t=mf(e.alternate,e,Nl);e.memoizedProps=e.pendingProps,t===null?bi(e):be=t}function Vf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=rf(l,t,t.pendingProps,t.type,void 0,je);break;case 11:t=rf(l,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:Fr(t);default:xf(l,t),t=be=Yo(t,Nl),t=mf(l,t,Nl)}e.memoizedProps=e.pendingProps,t===null?bi(e):be=t}function an(e,t,l,a){ml=ha=null,Fr(t),Za=null,Hn=0;var n=t.return;try{if(wx(e,n,t,l,je)){Ie=1,ii(e,Gt(l,e.current)),be=null;return}}catch(i){if(n!==null)throw be=n,i;Ie=1,ii(e,Gt(l,e.current)),be=null;return}t.flags&32768?(we||a===1?e=!0:Ia||(je&536870912)!==0?e=!1:(Xl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Xf(t,e)):bi(t)}function bi(e){var t=e;do{if((t.flags&32768)!==0){Xf(t,Xl);return}e=t.return;var l=Rx(t.alternate,t,Nl);if(l!==null){be=l;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);Ie===0&&(Ie=5)}function Xf(e,t){do{var l=Ax(e.alternate,e);if(l!==null){l.flags&=32767,be=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){be=e;return}be=e=l}while(e!==null);Ie=6,be=null}function Zf(e,t,l,a,n,i,o,h,j){e.cancelPendingCommit=null;do yi();while(rt!==0);if((_e&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=Nr,p0(e,l,i,o,h,j),e===Ge&&(be=Ge=null,je=0),tn=t,Kl=e,El=l,_u=i,Du=n,Uf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Yx(Ss,function(){return Pf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=U.T,U.T=null,n=K.p,K.p=2,o=_e,_e|=4;try{Mx(e,t,l)}finally{_e=o,K.p=n,U.T=a}}rt=1,$f(),Kf(),Jf()}}function $f(){if(rt===1){rt=0;var e=Kl,t=tn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var a=K.p;K.p=2;var n=_e;_e|=4;try{Cf(t,e);var i=$u,o=Do(e.containerInfo),h=i.focusedElem,j=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&_o(h.ownerDocument.documentElement,h)){if(j!==null&&gr(h)){var _=j.start,L=j.end;if(L===void 0&&(L=_),"selectionStart"in h)h.selectionStart=_,h.selectionEnd=Math.min(L,h.value.length);else{var Q=h.ownerDocument||document,D=Q&&Q.defaultView||window;if(D.getSelection){var O=D.getSelection(),I=h.textContent.length,re=Math.min(j.start,I),ke=j.end===void 0?re:Math.min(j.end,I);!O.extend&&re>ke&&(o=ke,ke=re,re=o);var R=Mo(h,re),E=Mo(h,ke);if(R&&E&&(O.rangeCount!==1||O.anchorNode!==R.node||O.anchorOffset!==R.offset||O.focusNode!==E.node||O.focusOffset!==E.offset)){var M=Q.createRange();M.setStart(R.node,R.offset),O.removeAllRanges(),re>ke?(O.addRange(M),O.extend(E.node,E.offset)):(M.setEnd(E.node,E.offset),O.addRange(M))}}}}for(Q=[],O=h;O=O.parentNode;)O.nodeType===1&&Q.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<Q.length;h++){var k=Q[h];k.element.scrollLeft=k.left,k.element.scrollTop=k.top}}Di=!!Zu,$u=Zu=null}finally{_e=n,K.p=a,U.T=l}}e.current=t,rt=2}}function Kf(){if(rt===2){rt=0;var e=Kl,t=tn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var a=K.p;K.p=2;var n=_e;_e|=4;try{Sf(e,t.alternate,t)}finally{_e=n,K.p=a,U.T=l}}rt=3}}function Jf(){if(rt===4||rt===3){rt=0,yt();var e=Kl,t=tn,l=El,a=Uf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?rt=5:(rt=0,tn=Kl=null,Ff(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&($l=null),Ii(l),t=t.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(bn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=U.T,n=K.p,K.p=2,U.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var h=a[o];i(h.value,{componentStack:h.stack})}}finally{U.T=t,K.p=n}}(El&3)!==0&&yi(),nl(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===zu?es++:(es=0,zu=e):es=0,ts(0)}}function Ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Un(t)))}function yi(){return $f(),Kf(),Jf(),Pf()}function Pf(){if(rt!==5)return!1;var e=Kl,t=_u;_u=0;var l=Ii(El),a=U.T,n=K.p;try{K.p=32>l?32:l,U.T=null,l=Du,Du=null;var i=Kl,o=El;if(rt=0,tn=Kl=null,El=0,(_e&6)!==0)throw Error(u(331));var h=_e;if(_e|=4,Df(i.current),Af(i,i.current,o,l),_e=h,ts(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(bn,i)}catch{}return!0}finally{K.p=n,U.T=a,Ff(e,t)}}function Wf(e,t,l){t=Gt(l,t),t=du(e.stateNode,t,2),e=Yl(e,t,2),e!==null&&(jn(e,2),nl(e))}function qe(e,t,l){if(e.tag===3)Wf(e,e,l);else for(;t!==null;){if(t.tag===3){Wf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&($l===null||!$l.has(a))){e=Gt(l,e),l=Wd(2),a=Yl(t,l,2),a!==null&&(Id(l,a,t,e),jn(a,2),nl(a));break}}t=t.return}}function qu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new zx;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Ru=!0,n.add(l),e=Lx.bind(null,e,t,l),t.then(e,e))}function Lx(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ge===e&&(je&l)===l&&(Ie===4||Ie===3&&(je&62914560)===je&&300>Ve()-hi?(_e&2)===0&&ln(e,0):Au|=l,en===je&&(en=0)),nl(e)}function If(e,t){t===0&&(t=Xc()),e=da(e,t),e!==null&&(jn(e,t),nl(e))}function Bx(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),If(e,l)}function kx(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(t),If(e,l)}function Yx(e,t){return Oe(e,t)}var ji=null,nn=null,Hu=!1,Si=!1,Lu=!1,Fl=0;function nl(e){e!==nn&&e.next===null&&(nn===null?ji=nn=e:nn=nn.next=e),Si=!0,Hu||(Hu=!0,Qx())}function ts(e,t){if(!Lu&&Si){Lu=!0;do for(var l=!1,a=ji;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var o=a.suspendedLanes,h=a.pingedLanes;i=(1<<31-At(42|e)+1)-1,i&=n&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,am(a,i))}else i=je,i=Ts(a,a===Ge?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||yn(a,i)||(l=!0,am(a,i));a=a.next}while(l);Lu=!1}}function Gx(){em()}function em(){Si=Hu=!1;var e=0;Fl!==0&&Ix()&&(e=Fl);for(var t=Ve(),l=null,a=ji;a!==null;){var n=a.next,i=tm(a,t);i===0?(a.next=null,l===null?ji=n:l.next=n,n===null&&(nn=l)):(l=a,(e!==0||(i&3)!==0)&&(Si=!0)),a=n}rt!==0&&rt!==5||ts(e),Fl!==0&&(Fl=0)}function tm(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-At(i),h=1<<o,j=n[o];j===-1?((h&l)===0||(h&a)!==0)&&(n[o]=x0(h,t)):j<=t&&(e.expiredLanes|=h),i&=~h}if(t=Ge,l=je,l=Ts(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Je(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||yn(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&Je(a),Ii(l)){case 2:case 8:l=Qc;break;case 32:l=Ss;break;case 268435456:l=Vc;break;default:l=Ss}return a=lm.bind(null,e),l=Oe(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&Je(a),e.callbackPriority=2,e.callbackNode=null,2}function lm(e,t){if(rt!==0&&rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(yi()&&e.callbackNode!==l)return null;var a=je;return a=Ts(e,e===Ge?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Hf(e,a,t),tm(e,Ve()),e.callbackNode!=null&&e.callbackNode===l?lm.bind(null,e):null)}function am(e,t){if(yi())return null;Hf(e,t,!0)}function Qx(){tp(function(){(_e&6)!==0?Oe(Gc,Gx):em()})}function Bu(){if(Fl===0){var e=Qa;e===0&&(e=Ns,Ns<<=1,(Ns&261888)===0&&(Ns=256)),Fl=e}return Fl}function nm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ms(""+e)}function sm(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 Vx(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=nm((n[jt]||null).action),o=a.submitter;o&&(t=(t=o[jt]||null)?nm(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new Os("action","action",null,a,n);e.push({event:h,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Fl!==0){var j=o?sm(n,o):new FormData(n);su(l,{pending:!0,data:j,method:n.method,action:i},null,j)}}else typeof i=="function"&&(h.preventDefault(),j=o?sm(n,o):new FormData(n),su(l,{pending:!0,data:j,method:n.method,action:i},i,j))},currentTarget:n}]})}}for(var ku=0;ku<Sr.length;ku++){var Yu=Sr[ku],Xx=Yu.toLowerCase(),Zx=Yu[0].toUpperCase()+Yu.slice(1);Ft(Xx,"on"+Zx)}Ft(Uo,"onAnimationEnd"),Ft(qo,"onAnimationIteration"),Ft(Ho,"onAnimationStart"),Ft("dblclick","onDoubleClick"),Ft("focusin","onFocus"),Ft("focusout","onBlur"),Ft(ux,"onTransitionRun"),Ft(cx,"onTransitionStart"),Ft(ox,"onTransitionCancel"),Ft(Lo,"onTransitionEnd"),Aa("onMouseEnter",["mouseout","mouseover"]),Aa("onMouseLeave",["mouseout","mouseover"]),Aa("onPointerEnter",["pointerout","pointerover"]),Aa("onPointerLeave",["pointerout","pointerover"]),ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ls="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(" "),$x=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ls));function im(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var h=a[o],j=h.instance,_=h.currentTarget;if(h=h.listener,j!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=_;try{i(n)}catch(L){Hs(L)}n.currentTarget=null,i=j}else for(o=0;o<a.length;o++){if(h=a[o],j=h.instance,_=h.currentTarget,h=h.listener,j!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=_;try{i(n)}catch(L){Hs(L)}n.currentTarget=null,i=j}}}}function ye(e,t){var l=t[er];l===void 0&&(l=t[er]=new Set);var a=e+"__bubble";l.has(a)||(rm(t,e,2,!1),l.add(a))}function Gu(e,t,l){var a=0;t&&(a|=4),rm(l,e,a,t)}var Ni="_reactListening"+Math.random().toString(36).slice(2);function Qu(e){if(!e[Ni]){e[Ni]=!0,Wc.forEach(function(l){l!=="selectionchange"&&($x.has(l)||Gu(l,!1,e),Gu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ni]||(t[Ni]=!0,Gu("selectionchange",!1,t))}}function rm(e,t,l,a){switch(qm(t)){case 2:var n=jp;break;case 8:n=Sp;break;default:n=nc}l=n.bind(null,t,l,e),n=void 0,!cr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Vu(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var h=a.stateNode.containerInfo;if(h===n)break;if(o===4)for(o=a.return;o!==null;){var j=o.tag;if((j===3||j===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;h!==null;){if(o=Ta(h),o===null)return;if(j=o.tag,j===5||j===6||j===26||j===27){a=i=o;continue e}h=h.parentNode}}a=a.return}oo(function(){var _=i,L=rr(l),Q=[];e:{var D=Bo.get(e);if(D!==void 0){var O=Os,I=e;switch(e){case"keypress":if(Ds(l)===0)break e;case"keydown":case"keyup":O=k0;break;case"focusin":I="focus",O=mr;break;case"focusout":I="blur",O=mr;break;case"beforeblur":case"afterblur":O=mr;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=ho;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=R0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Q0;break;case Uo:case qo:case Ho:O=_0;break;case Lo:O=X0;break;case"scroll":case"scrollend":O=T0;break;case"wheel":O=$0;break;case"copy":case"cut":case"paste":O=z0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=po;break;case"toggle":case"beforetoggle":O=J0}var re=(t&4)!==0,ke=!re&&(e==="scroll"||e==="scrollend"),R=re?D!==null?D+"Capture":null:D;re=[];for(var E=_,M;E!==null;){var k=E;if(M=k.stateNode,k=k.tag,k!==5&&k!==26&&k!==27||M===null||R===null||(k=En(E,R),k!=null&&re.push(as(E,k,M))),ke)break;E=E.return}0<re.length&&(D=new O(D,I,null,l,L),Q.push({event:D,listeners:re}))}}if((t&7)===0){e:{if(D=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",D&&l!==ir&&(I=l.relatedTarget||l.fromElement)&&(Ta(I)||I[wa]))break e;if((O||D)&&(D=L.window===L?L:(D=L.ownerDocument)?D.defaultView||D.parentWindow:window,O?(I=l.relatedTarget||l.toElement,O=_,I=I?Ta(I):null,I!==null&&(ke=x(I),re=I.tag,I!==ke||re!==5&&re!==27&&re!==6)&&(I=null)):(O=null,I=_),O!==I)){if(re=ho,k="onMouseLeave",R="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(re=po,k="onPointerLeave",R="onPointerEnter",E="pointer"),ke=O==null?D:Nn(O),M=I==null?D:Nn(I),D=new re(k,E+"leave",O,l,L),D.target=ke,D.relatedTarget=M,k=null,Ta(L)===_&&(re=new re(R,E+"enter",I,l,L),re.target=M,re.relatedTarget=ke,k=re),ke=k,O&&I)t:{for(re=Kx,R=O,E=I,M=0,k=R;k;k=re(k))M++;k=0;for(var ne=E;ne;ne=re(ne))k++;for(;0<M-k;)R=re(R),M--;for(;0<k-M;)E=re(E),k--;for(;M--;){if(R===E||E!==null&&R===E.alternate){re=R;break t}R=re(R),E=re(E)}re=null}else re=null;O!==null&&um(Q,D,O,re,!1),I!==null&&ke!==null&&um(Q,ke,I,re,!0)}}e:{if(D=_?Nn(_):window,O=D.nodeName&&D.nodeName.toLowerCase(),O==="select"||O==="input"&&D.type==="file")var Re=Eo;else if(So(D))if(wo)Re=sx;else{Re=ax;var te=lx}else O=D.nodeName,!O||O.toLowerCase()!=="input"||D.type!=="checkbox"&&D.type!=="radio"?_&&sr(_.elementType)&&(Re=Eo):Re=nx;if(Re&&(Re=Re(e,_))){No(Q,Re,l,L);break e}te&&te(e,D,_),e==="focusout"&&_&&D.type==="number"&&_.memoizedProps.value!=null&&nr(D,"number",D.value)}switch(te=_?Nn(_):window,e){case"focusin":(So(te)||te.contentEditable==="true")&&(Ua=te,br=_,Dn=null);break;case"focusout":Dn=br=Ua=null;break;case"mousedown":yr=!0;break;case"contextmenu":case"mouseup":case"dragend":yr=!1,zo(Q,l,L);break;case"selectionchange":if(rx)break;case"keydown":case"keyup":zo(Q,l,L)}var xe;if(xr)e:{switch(e){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Oa?yo(e,l)&&(Se="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(vo&&l.locale!=="ko"&&(Oa||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Oa&&(xe=fo()):(Ol=L,or="value"in Ol?Ol.value:Ol.textContent,Oa=!0)),te=Ei(_,Se),0<te.length&&(Se=new xo(Se,e,null,l,L),Q.push({event:Se,listeners:te}),xe?Se.data=xe:(xe=jo(l),xe!==null&&(Se.data=xe)))),(xe=P0?W0(e,l):I0(e,l))&&(Se=Ei(_,"onBeforeInput"),0<Se.length&&(te=new xo("onBeforeInput","beforeinput",null,l,L),Q.push({event:te,listeners:Se}),te.data=xe)),Vx(Q,e,_,l,L)}im(Q,t)})}function as(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Ei(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=En(e,l),n!=null&&a.unshift(as(e,n,i)),n=En(e,t),n!=null&&a.push(as(e,n,i))),e.tag===3)return a;e=e.return}return[]}function Kx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function um(e,t,l,a,n){for(var i=t._reactName,o=[];l!==null&&l!==a;){var h=l,j=h.alternate,_=h.stateNode;if(h=h.tag,j!==null&&j===a)break;h!==5&&h!==26&&h!==27||_===null||(j=_,n?(_=En(l,i),_!=null&&o.unshift(as(l,_,j))):n||(_=En(l,i),_!=null&&o.push(as(l,_,j)))),l=l.return}o.length!==0&&e.push({event:t,listeners:o})}var Jx=/\r\n?/g,Fx=/\u0000|\uFFFD/g;function cm(e){return(typeof e=="string"?e:""+e).replace(Jx,`
|
|
49
|
+
`).replace(Fx,"")}function om(e,t){return t=cm(t),cm(e)===t}function Be(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||_a(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&_a(e,""+a);break;case"className":Rs(e,"class",a);break;case"tabIndex":Rs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Rs(e,l,a);break;case"style":uo(e,a,i);break;case"data":if(t!=="object"){Rs(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=Ms(""+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"&&Be(e,t,"name",n.name,n,null),Be(e,t,"formEncType",n.formEncType,n,null),Be(e,t,"formMethod",n.formMethod,n,null),Be(e,t,"formTarget",n.formTarget,n,null)):(Be(e,t,"encType",n.encType,n,null),Be(e,t,"method",n.method,n,null),Be(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Ms(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=cl);break;case"onScroll":a!=null&&ye("scroll",e);break;case"onScrollEnd":a!=null&&ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(u(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=Ms(""+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":ye("beforetoggle",e),ye("toggle",e),Cs(e,"popover",a);break;case"xlinkActuate":ul(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ul(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ul(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ul(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ul(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ul(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ul(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ul(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ul(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Cs(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=E0.get(l)||l,Cs(e,l,a))}}function Xu(e,t,l,a,n,i){switch(l){case"style":uo(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof a=="string"?_a(e,a):(typeof a=="number"||typeof a=="bigint")&&_a(e,""+a);break;case"onScroll":a!=null&&ye("scroll",e);break;case"onScrollEnd":a!=null&&ye("scrollend",e);break;case"onClick":a!=null&&(e.onclick=cl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ic.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[jt]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Cs(e,l,a)}}}function xt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",e),ye("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var o=l[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Be(e,t,i,o,l,null)}}n&&Be(e,t,"srcSet",l.srcSet,l,null),a&&Be(e,t,"src",l.src,l,null);return;case"input":ye("invalid",e);var h=i=o=n=null,j=null,_=null;for(a in l)if(l.hasOwnProperty(a)){var L=l[a];if(L!=null)switch(a){case"name":n=L;break;case"type":o=L;break;case"checked":j=L;break;case"defaultChecked":_=L;break;case"value":i=L;break;case"defaultValue":h=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(u(137,t));break;default:Be(e,t,a,L,l,null)}}no(e,i,h,j,_,o,n,!1);return;case"select":ye("invalid",e),a=o=i=null;for(n in l)if(l.hasOwnProperty(n)&&(h=l[n],h!=null))switch(n){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":a=h;default:Be(e,t,n,h,l,null)}t=i,l=o,e.multiple=!!a,t!=null?Ma(e,!!a,t,!1):l!=null&&Ma(e,!!a,l,!0);return;case"textarea":ye("invalid",e),i=n=a=null;for(o in l)if(l.hasOwnProperty(o)&&(h=l[o],h!=null))switch(o){case"value":a=h;break;case"defaultValue":n=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(u(91));break;default:Be(e,t,o,h,l,null)}io(e,a,n,i);return;case"option":for(j in l)if(l.hasOwnProperty(j)&&(a=l[j],a!=null))switch(j){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Be(e,t,j,a,l,null)}return;case"dialog":ye("beforetoggle",e),ye("toggle",e),ye("cancel",e),ye("close",e);break;case"iframe":case"object":ye("load",e);break;case"video":case"audio":for(a=0;a<ls.length;a++)ye(ls[a],e);break;case"image":ye("error",e),ye("load",e);break;case"details":ye("toggle",e);break;case"embed":case"source":case"link":ye("error",e),ye("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(u(137,t));default:Be(e,t,_,a,l,null)}return;default:if(sr(t)){for(L in l)l.hasOwnProperty(L)&&(a=l[L],a!==void 0&&Xu(e,t,L,a,l,void 0));return}}for(h in l)l.hasOwnProperty(h)&&(a=l[h],a!=null&&Be(e,t,h,a,l,null))}function Px(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 n=null,i=null,o=null,h=null,j=null,_=null,L=null;for(O in l){var Q=l[O];if(l.hasOwnProperty(O)&&Q!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":j=Q;default:a.hasOwnProperty(O)||Be(e,t,O,null,a,Q)}}for(var D in a){var O=a[D];if(Q=l[D],a.hasOwnProperty(D)&&(O!=null||Q!=null))switch(D){case"type":i=O;break;case"name":n=O;break;case"checked":_=O;break;case"defaultChecked":L=O;break;case"value":o=O;break;case"defaultValue":h=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:O!==Q&&Be(e,t,D,O,a,Q)}}ar(e,o,h,j,_,L,i,n);return;case"select":O=o=h=D=null;for(i in l)if(j=l[i],l.hasOwnProperty(i)&&j!=null)switch(i){case"value":break;case"multiple":O=j;default:a.hasOwnProperty(i)||Be(e,t,i,null,a,j)}for(n in a)if(i=a[n],j=l[n],a.hasOwnProperty(n)&&(i!=null||j!=null))switch(n){case"value":D=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==j&&Be(e,t,n,i,a,j)}t=h,l=o,a=O,D!=null?Ma(e,!!l,D,!1):!!a!=!!l&&(t!=null?Ma(e,!!l,t,!0):Ma(e,!!l,l?[]:"",!1));return;case"textarea":O=D=null;for(h in l)if(n=l[h],l.hasOwnProperty(h)&&n!=null&&!a.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:Be(e,t,h,null,a,n)}for(o in a)if(n=a[o],i=l[o],a.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":D=n;break;case"defaultValue":O=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(u(91));break;default:n!==i&&Be(e,t,o,n,a,i)}so(e,D,O);return;case"option":for(var I in l)if(D=l[I],l.hasOwnProperty(I)&&D!=null&&!a.hasOwnProperty(I))switch(I){case"selected":e.selected=!1;break;default:Be(e,t,I,null,a,D)}for(j in a)if(D=a[j],O=l[j],a.hasOwnProperty(j)&&D!==O&&(D!=null||O!=null))switch(j){case"selected":e.selected=D&&typeof D!="function"&&typeof D!="symbol";break;default:Be(e,t,j,D,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 re in l)D=l[re],l.hasOwnProperty(re)&&D!=null&&!a.hasOwnProperty(re)&&Be(e,t,re,null,a,D);for(_ in a)if(D=a[_],O=l[_],a.hasOwnProperty(_)&&D!==O&&(D!=null||O!=null))switch(_){case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(u(137,t));break;default:Be(e,t,_,D,a,O)}return;default:if(sr(t)){for(var ke in l)D=l[ke],l.hasOwnProperty(ke)&&D!==void 0&&!a.hasOwnProperty(ke)&&Xu(e,t,ke,void 0,a,D);for(L in a)D=a[L],O=l[L],!a.hasOwnProperty(L)||D===O||D===void 0&&O===void 0||Xu(e,t,L,D,a,O);return}}for(var R in l)D=l[R],l.hasOwnProperty(R)&&D!=null&&!a.hasOwnProperty(R)&&Be(e,t,R,null,a,D);for(Q in a)D=a[Q],O=l[Q],!a.hasOwnProperty(Q)||D===O||D==null&&O==null||Be(e,t,Q,D,a,O)}function dm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Wx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,o=n.initiatorType,h=n.duration;if(i&&h&&dm(o)){for(o=0,h=n.responseEnd,a+=1;a<l.length;a++){var j=l[a],_=j.startTime;if(_>h)break;var L=j.transferSize,Q=j.initiatorType;L&&dm(Q)&&(j=j.responseEnd,o+=L*(j<h?1:(h-_)/(j-_)))}if(--a,t+=8*(i+o)/(n.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 Zu=null,$u=null;function wi(e){return e.nodeType===9?e:e.ownerDocument}function fm(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 mm(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 Ku(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 Ju=null;function Ix(){var e=window.event;return e&&e.type==="popstate"?e===Ju?!1:(Ju=e,!0):(Ju=null,!1)}var hm=typeof setTimeout=="function"?setTimeout:void 0,ep=typeof clearTimeout=="function"?clearTimeout:void 0,xm=typeof Promise=="function"?Promise:void 0,tp=typeof queueMicrotask=="function"?queueMicrotask:typeof xm<"u"?function(e){return xm.resolve(null).then(e).catch(lp)}:hm;function lp(e){setTimeout(function(){throw e})}function Pl(e){return e==="head"}function pm(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),cn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")ns(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ns(l);for(var i=l.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[Sn]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=o}}else l==="body"&&ns(e.ownerDocument.body);l=n}while(l);cn(t)}function vm(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 Fu(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":Fu(l),tr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function ap(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Sn])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!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=$t(e.nextSibling),e===null)break}return null}function np(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=$t(e.nextSibling),e===null))return null;return e}function gm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=$t(e.nextSibling),e===null))return null;return e}function Pu(e){return e.data==="$?"||e.data==="$~"}function Wu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function sp(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 $t(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 Iu=null;function bm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return $t(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function ym(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 jm(e,t,l){switch(t=wi(l),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function ns(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tr(e)}var Kt=new Map,Sm=new Set;function Ti(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var wl=K.d;K.d={f:ip,r:rp,D:up,C:cp,L:op,m:dp,X:mp,S:fp,M:hp};function ip(){var e=wl.f(),t=vi();return e||t}function rp(e){var t=Ca(e);t!==null&&t.tag===5&&t.type==="form"?Ld(t):wl.r(e)}var sn=typeof document>"u"?null:document;function Nm(e,t,l){var a=sn;if(a&&typeof t=="string"&&t){var n=kt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Sm.has(n)||(Sm.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),xt(t,"link",e),ut(t),a.head.appendChild(t)))}}function up(e){wl.D(e),Nm("dns-prefetch",e,null)}function cp(e,t){wl.C(e,t),Nm("preconnect",e,t)}function op(e,t,l){wl.L(e,t,l);var a=sn;if(a&&e&&t){var n='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+kt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+kt(l.imageSizes)+'"]')):n+='[href="'+kt(e)+'"]';var i=n;switch(t){case"style":i=rn(e);break;case"script":i=un(e)}Kt.has(i)||(e=b({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Kt.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(ss(i))||t==="script"&&a.querySelector(is(i))||(t=a.createElement("link"),xt(t,"link",e),ut(t),a.head.appendChild(t)))}}function dp(e,t){wl.m(e,t);var l=sn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+kt(a)+'"][href="'+kt(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=un(e)}if(!Kt.has(i)&&(e=b({rel:"modulepreload",href:e},t),Kt.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(is(i)))return}a=l.createElement("link"),xt(a,"link",e),ut(a),l.head.appendChild(a)}}}function fp(e,t,l){wl.S(e,t,l);var a=sn;if(a&&e){var n=Ra(a).hoistableStyles,i=rn(e);t=t||"default";var o=n.get(i);if(!o){var h={loading:0,preload:null};if(o=a.querySelector(ss(i)))h.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Kt.get(i))&&ec(e,l);var j=o=a.createElement("link");ut(j),xt(j,"link",e),j._p=new Promise(function(_,L){j.onload=_,j.onerror=L}),j.addEventListener("load",function(){h.loading|=1}),j.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Ci(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:h},n.set(i,o)}}}function mp(e,t){wl.X(e,t);var l=sn;if(l&&e){var a=Ra(l).hoistableScripts,n=un(e),i=a.get(n);i||(i=l.querySelector(is(n)),i||(e=b({src:e,async:!0},t),(t=Kt.get(n))&&tc(e,t),i=l.createElement("script"),ut(i),xt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function hp(e,t){wl.M(e,t);var l=sn;if(l&&e){var a=Ra(l).hoistableScripts,n=un(e),i=a.get(n);i||(i=l.querySelector(is(n)),i||(e=b({src:e,async:!0,type:"module"},t),(t=Kt.get(n))&&tc(e,t),i=l.createElement("script"),ut(i),xt(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function Em(e,t,l,a){var n=(n=me.current)?Ti(n):null;if(!n)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=rn(l.href),l=Ra(n).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=rn(l.href);var i=Ra(n).hoistableStyles,o=i.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=n.querySelector(ss(e)))&&!i._p&&(o.instance=i,o.state.loading=5),Kt.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},Kt.set(e,l),i||xp(n,e,l,o.state))),t&&a===null)throw Error(u(528,""));return o}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=un(l),l=Ra(n).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(u(444,e))}}function rn(e){return'href="'+kt(e)+'"'}function ss(e){return'link[rel="stylesheet"]['+e+"]"}function wm(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function xp(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}),xt(t,"link",l),ut(t),e.head.appendChild(t))}function un(e){return'[src="'+kt(e)+'"]'}function is(e){return"script[async]"+e}function Tm(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+kt(l.href)+'"]');if(a)return t.instance=a,ut(a),a;var n=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ut(a),xt(a,"style",n),Ci(a,l.precedence,e),t.instance=a;case"stylesheet":n=rn(l.href);var i=e.querySelector(ss(n));if(i)return t.state.loading|=4,t.instance=i,ut(i),i;a=wm(l),(n=Kt.get(n))&&ec(a,n),i=(e.ownerDocument||e).createElement("link"),ut(i);var o=i;return o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),xt(i,"link",a),t.state.loading|=4,Ci(i,l.precedence,e),t.instance=i;case"script":return i=un(l.src),(n=e.querySelector(is(i)))?(t.instance=n,ut(n),n):(a=l,(n=Kt.get(i))&&(a=b({},l),tc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),ut(n),xt(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ci(a,l.precedence,e));return t.instance}function Ci(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,o=0;o<a.length;o++){var h=a[o];if(h.dataset.precedence===t)i=h;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function ec(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function tc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ri=null;function Cm(e,t,l){if(Ri===null){var a=new Map,n=Ri=new Map;n.set(l,a)}else n=Ri,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[Sn]||i[dt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=a.get(o);h?h.push(i):a.set(o,[i])}}return a}function Rm(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function pp(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 vp(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 n=rn(a.href),i=t.querySelector(ss(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ai.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,ut(i);return}i=t.ownerDocument||t,a=wm(a),(n=Kt.get(n))&&ec(a,n),i=i.createElement("link"),ut(i);var o=i;o._p=new Promise(function(h,j){o.onload=h,o.onerror=j}),xt(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=Ai.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var lc=0;function gp(e,t){return e.stylesheets&&e.count===0&&_i(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&_i(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&lc===0&&(lc=62500*Wx());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_i(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>lc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Ai(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_i(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mi=null;function _i(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mi=new Map,t.forEach(bp,e),Mi=null,Ai.call(e))}function bp(e,t){if(!(t.state.loading&4)){var l=Mi.get(e);if(l)var a=l.get(null);else{l=new Map,Mi.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(l.set(o.dataset.precedence,o),a=o)}a&&l.set(null,a)}n=t.instance,o=n.getAttribute("data-precedence"),i=l.get(o)||a,i===a&&l.set(null,n),l.set(o,n),this.count++,a=Ai.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var rs={$$typeof:S,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function yp(e,t,l,a,n,i,o,h,j){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=Pi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pi(0),this.hiddenUpdates=Pi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function Mm(e,t,l,a,n,i,o,h,j,_,L,Q){return e=new yp(e,t,l,o,j,_,L,Q,h),t=1,i===!0&&(t|=24),i=_t(3,null,null,t),e.current=i,i.stateNode=e,t=Ur(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},Br(i),e}function _m(e){return e?(e=La,e):La}function Dm(e,t,l,a,n,i){n=_m(n),a.context===null?a.context=n:a.pendingContext=n,a=kl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Yl(e,a,t),l!==null&&(Ct(l,e,t),Bn(l,e,t))}function zm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ac(e,t){zm(e,t),(e=e.alternate)&&zm(e,t)}function Om(e){if(e.tag===13||e.tag===31){var t=da(e,67108864);t!==null&&Ct(t,e,67108864),ac(e,67108864)}}function Um(e){if(e.tag===13||e.tag===31){var t=qt();t=Wi(t);var l=da(e,t);l!==null&&Ct(l,e,t),ac(e,t)}}var Di=!0;function jp(e,t,l,a){var n=U.T;U.T=null;var i=K.p;try{K.p=2,nc(e,t,l,a)}finally{K.p=i,U.T=n}}function Sp(e,t,l,a){var n=U.T;U.T=null;var i=K.p;try{K.p=8,nc(e,t,l,a)}finally{K.p=i,U.T=n}}function nc(e,t,l,a){if(Di){var n=sc(a);if(n===null)Vu(e,t,a,zi,l),Hm(e,a);else if(Ep(n,e,t,l,a))a.stopPropagation();else if(Hm(e,a),t&4&&-1<Np.indexOf(e)){for(;n!==null;){var i=Ca(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=ia(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var j=1<<31-At(o);h.entanglements[1]|=j,o&=~j}nl(i),(_e&6)===0&&(xi=Ve()+500,ts(0))}}break;case 31:case 13:h=da(i,2),h!==null&&Ct(h,i,2),vi(),ac(i,2)}if(i=sc(a),i===null&&Vu(e,t,a,zi,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Vu(e,t,a,null,l)}}function sc(e){return e=rr(e),ic(e)}var zi=null;function ic(e){if(zi=null,e=Ta(e),e!==null){var t=x(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=f(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 zi=e,null}function qm(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(_l()){case Gc:return 2;case Qc:return 8;case Ss:case c0:return 32;case Vc:return 268435456;default:return 32}default:return 32}}var rc=!1,Wl=null,Il=null,ea=null,us=new Map,cs=new Map,ta=[],Np="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 Hm(e,t){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":Il=null;break;case"mouseover":case"mouseout":ea=null;break;case"pointerover":case"pointerout":us.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":cs.delete(t.pointerId)}}function os(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=Ca(t),t!==null&&Om(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Ep(e,t,l,a,n){switch(t){case"focusin":return Wl=os(Wl,e,t,l,a,n),!0;case"dragenter":return Il=os(Il,e,t,l,a,n),!0;case"mouseover":return ea=os(ea,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return us.set(i,os(us.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,cs.set(i,os(cs.get(i)||null,e,t,l,a,n)),!0}return!1}function Lm(e){var t=Ta(e.target);if(t!==null){var l=x(t);if(l!==null){if(t=l.tag,t===13){if(t=f(l),t!==null){e.blockedOn=t,Fc(e.priority,function(){Um(l)});return}}else if(t===31){if(t=v(l),t!==null){e.blockedOn=t,Fc(e.priority,function(){Um(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 Oi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=sc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);ir=a,l.target.dispatchEvent(a),ir=null}else return t=Ca(l),t!==null&&Om(t),e.blockedOn=l,!1;t.shift()}return!0}function Bm(e,t,l){Oi(e)&&l.delete(t)}function wp(){rc=!1,Wl!==null&&Oi(Wl)&&(Wl=null),Il!==null&&Oi(Il)&&(Il=null),ea!==null&&Oi(ea)&&(ea=null),us.forEach(Bm),cs.forEach(Bm)}function Ui(e,t){e.blockedOn===t&&(e.blockedOn=null,rc||(rc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,wp)))}var qi=null;function km(e){qi!==e&&(qi=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){qi===e&&(qi=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(ic(a||l)===null)continue;break}var i=Ca(l);i!==null&&(e.splice(t,3),t-=3,su(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function cn(e){function t(j){return Ui(j,e)}Wl!==null&&Ui(Wl,e),Il!==null&&Ui(Il,e),ea!==null&&Ui(ea,e),us.forEach(t),cs.forEach(t);for(var l=0;l<ta.length;l++){var a=ta[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ta.length&&(l=ta[0],l.blockedOn===null);)Lm(l),l.blockedOn===null&&ta.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],o=n[jt]||null;if(typeof i=="function")o||km(l);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[jt]||null)h=o.formAction;else if(ic(n)!==null)continue}else h=o.action;typeof h=="function"?l[a+1]=h:(l.splice(a,3),a-=3),km(l)}}}function Ym(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=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,n=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),n!==null&&(n(),n=null)}}}function uc(e){this._internalRoot=e}Hi.prototype.render=uc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var l=t.current,a=qt();Dm(l,a,e,t,null,null)},Hi.prototype.unmount=uc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dm(e.current,2,null,e,null,null),vi(),t[wa]=null}};function Hi(e){this._internalRoot=e}Hi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<ta.length&&t!==0&&t<ta[l].priority;l++);ta.splice(l,0,e),l===0&&Lm(e)}};var Gm=c.version;if(Gm!=="19.2.4")throw Error(u(527,Gm,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Tp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Li=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Li.isDisabled&&Li.supportsFiber)try{bn=Li.inject(Tp),Rt=Li}catch{}}return fs.createRoot=function(e,t){if(!m(e))throw Error(u(299));var l=!1,a="",n=Kd,i=Jd,o=Fd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Mm(e,1,!1,null,null,l,a,null,n,i,o,Ym),e[wa]=t.current,Qu(e),new uc(t)},fs.hydrateRoot=function(e,t,l){if(!m(e))throw Error(u(299));var a=!1,n="",i=Kd,o=Jd,h=Fd,j=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(o=l.onCaughtError),l.onRecoverableError!==void 0&&(h=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),t=Mm(e,1,!0,t,l??null,a,n,j,i,o,h,Ym),t.context=_m(null),l=t.current,a=qt(),a=Wi(a),n=kl(a),n.callback=null,Yl(l,n,a),l=a,t.current.lanes=l,jn(t,l),nl(t),e[wa]=t.current,Qu(e),new Hi(t)},fs.version="19.2.4",fs}var Wm;function Up(){if(Wm)return dc.exports;Wm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(c){console.error(c)}}return r(),dc.exports=Op(),dc.exports}var qp=Up();const Hp=Tc(qp);/**
|
|
50
|
+
* react-router v7.13.0
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var Im="popstate";function Lp(r={}){function c(m,x){let{pathname:f="/",search:v="",hash:g=""}=Ea(m.location.hash.substring(1));return!f.startsWith("/")&&!f.startsWith(".")&&(f="/"+f),jc("",{pathname:f,search:v,hash:g},x.state&&x.state.usr||null,x.state&&x.state.key||"default")}function d(m,x){let f=m.document.querySelector("base"),v="";if(f&&f.getAttribute("href")){let g=m.location.href,p=g.indexOf("#");v=p===-1?g:g.slice(0,p)}return v+"#"+(typeof x=="string"?x:gs(x))}function u(m,x){Jt(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(x)})`)}return kp(c,d,u,r)}function Pe(r,c){if(r===!1||r===null||typeof r>"u")throw new Error(c)}function Jt(r,c){if(!r){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function Bp(){return Math.random().toString(36).substring(2,10)}function eh(r,c){return{usr:r.state,key:r.key,idx:c}}function jc(r,c,d=null,u){return{pathname:typeof r=="string"?r:r.pathname,search:"",hash:"",...typeof c=="string"?Ea(c):c,state:d,key:c&&c.key||u||Bp()}}function gs({pathname:r="/",search:c="",hash:d=""}){return c&&c!=="?"&&(r+=c.charAt(0)==="?"?c:"?"+c),d&&d!=="#"&&(r+=d.charAt(0)==="#"?d:"#"+d),r}function Ea(r){let c={};if(r){let d=r.indexOf("#");d>=0&&(c.hash=r.substring(d),r=r.substring(0,d));let u=r.indexOf("?");u>=0&&(c.search=r.substring(u),r=r.substring(0,u)),r&&(c.pathname=r)}return c}function kp(r,c,d,u={}){let{window:m=document.defaultView,v5Compat:x=!1}=u,f=m.history,v="POP",g=null,p=y();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function y(){return(f.state||{idx:null}).idx}function b(){v="POP";let Y=y(),V=Y==null?null:Y-p;p=Y,g&&g({action:v,location:A.location,delta:V})}function C(Y,V){v="PUSH";let B=jc(A.location,Y,V);d&&d(B,Y),p=y()+1;let S=eh(B,p),ee=A.createHref(B);try{f.pushState(S,"",ee)}catch(ue){if(ue instanceof DOMException&&ue.name==="DataCloneError")throw ue;m.location.assign(ee)}x&&g&&g({action:v,location:A.location,delta:1})}function z(Y,V){v="REPLACE";let B=jc(A.location,Y,V);d&&d(B,Y),p=y();let S=eh(B,p),ee=A.createHref(B);f.replaceState(S,"",ee),x&&g&&g({action:v,location:A.location,delta:0})}function q(Y){return Yp(Y)}let A={get action(){return v},get location(){return r(m,f)},listen(Y){if(g)throw new Error("A history only accepts one active listener");return m.addEventListener(Im,b),g=Y,()=>{m.removeEventListener(Im,b),g=null}},createHref(Y){return c(m,Y)},createURL:q,encodeLocation(Y){let V=q(Y);return{pathname:V.pathname,search:V.search,hash:V.hash}},push:C,replace:z,go(Y){return f.go(Y)}};return A}function Yp(r,c=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(d,"No window.location.(origin|href) available to create URL");let u=typeof r=="string"?r:gs(r);return u=u.replace(/ $/,"%20"),!c&&u.startsWith("//")&&(u=d+u),new URL(u,d)}function bh(r,c,d="/"){return Gp(r,c,d,!1)}function Gp(r,c,d,u){let m=typeof c=="string"?Ea(c):c,x=Rl(m.pathname||"/",d);if(x==null)return null;let f=yh(r);Qp(f);let v=null;for(let g=0;v==null&&g<f.length;++g){let p=ev(x);v=Wp(f[g],p,u)}return v}function yh(r,c=[],d=[],u="",m=!1){let x=(f,v,g=m,p)=>{let y={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:v,route:f};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(u)&&g)return;Pe(y.relativePath.startsWith(u),`Absolute route path "${y.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(u.length)}let b=Cl([u,y.relativePath]),C=d.concat(y);f.children&&f.children.length>0&&(Pe(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),yh(f.children,c,C,b,g)),!(f.path==null&&!f.index)&&c.push({path:b,score:Fp(b,f.index),routesMeta:C})};return r.forEach((f,v)=>{var g;if(f.path===""||!((g=f.path)!=null&&g.includes("?")))x(f,v);else for(let p of jh(f.path))x(f,v,!0,p)}),c}function jh(r){let c=r.split("/");if(c.length===0)return[];let[d,...u]=c,m=d.endsWith("?"),x=d.replace(/\?$/,"");if(u.length===0)return m?[x,""]:[x];let f=jh(u.join("/")),v=[];return v.push(...f.map(g=>g===""?x:[x,g].join("/"))),m&&v.push(...f),v.map(g=>r.startsWith("/")&&g===""?"/":g)}function Qp(r){r.sort((c,d)=>c.score!==d.score?d.score-c.score:Pp(c.routesMeta.map(u=>u.childrenIndex),d.routesMeta.map(u=>u.childrenIndex)))}var Vp=/^:[\w-]+$/,Xp=3,Zp=2,$p=1,Kp=10,Jp=-2,th=r=>r==="*";function Fp(r,c){let d=r.split("/"),u=d.length;return d.some(th)&&(u+=Jp),c&&(u+=Zp),d.filter(m=>!th(m)).reduce((m,x)=>m+(Vp.test(x)?Xp:x===""?$p:Kp),u)}function Pp(r,c){return r.length===c.length&&r.slice(0,-1).every((u,m)=>u===c[m])?r[r.length-1]-c[c.length-1]:0}function Wp(r,c,d=!1){let{routesMeta:u}=r,m={},x="/",f=[];for(let v=0;v<u.length;++v){let g=u[v],p=v===u.length-1,y=x==="/"?c:c.slice(x.length)||"/",b=Vi({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},y),C=g.route;if(!b&&p&&d&&!u[u.length-1].route.index&&(b=Vi({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!b)return null;Object.assign(m,b.params),f.push({params:m,pathname:Cl([x,b.pathname]),pathnameBase:nv(Cl([x,b.pathnameBase])),route:C}),b.pathnameBase!=="/"&&(x=Cl([x,b.pathnameBase]))}return f}function Vi(r,c){typeof r=="string"&&(r={path:r,caseSensitive:!1,end:!0});let[d,u]=Ip(r.path,r.caseSensitive,r.end),m=c.match(d);if(!m)return null;let x=m[0],f=x.replace(/(.)\/+$/,"$1"),v=m.slice(1);return{params:u.reduce((p,{paramName:y,isOptional:b},C)=>{if(y==="*"){let q=v[C]||"";f=x.slice(0,x.length-q.length).replace(/(.)\/+$/,"$1")}const z=v[C];return b&&!z?p[y]=void 0:p[y]=(z||"").replace(/%2F/g,"/"),p},{}),pathname:x,pathnameBase:f,pattern:r}}function Ip(r,c=!1,d=!0){Jt(r==="*"||!r.endsWith("*")||r.endsWith("/*"),`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`);let u=[],m="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,v,g)=>(u.push({paramName:v,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return r.endsWith("*")?(u.push({paramName:"*"}),m+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":r!==""&&r!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,c?void 0:"i"),u]}function ev(r){try{return r.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return Jt(!1,`The URL path "${r}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),r}}function Rl(r,c){if(c==="/")return r;if(!r.toLowerCase().startsWith(c.toLowerCase()))return null;let d=c.endsWith("/")?c.length-1:c.length,u=r.charAt(d);return u&&u!=="/"?null:r.slice(d)||"/"}var tv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function lv(r,c="/"){let{pathname:d,search:u="",hash:m=""}=typeof r=="string"?Ea(r):r,x;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?x=lh(d.substring(1),"/"):x=lh(d,c)):x=c,{pathname:x,search:sv(u),hash:iv(m)}}function lh(r,c){let d=c.replace(/\/+$/,"").split("/");return r.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function xc(r,c,d,u){return`Cannot include a '${r}' character in a manually specified \`to.${c}\` field [${JSON.stringify(u)}]. 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 av(r){return r.filter((c,d)=>d===0||c.route.path&&c.route.path.length>0)}function Rc(r){let c=av(r);return c.map((d,u)=>u===c.length-1?d.pathname:d.pathnameBase)}function Ac(r,c,d,u=!1){let m;typeof r=="string"?m=Ea(r):(m={...r},Pe(!m.pathname||!m.pathname.includes("?"),xc("?","pathname","search",m)),Pe(!m.pathname||!m.pathname.includes("#"),xc("#","pathname","hash",m)),Pe(!m.search||!m.search.includes("#"),xc("#","search","hash",m)));let x=r===""||m.pathname==="",f=x?"/":m.pathname,v;if(f==null)v=d;else{let b=c.length-1;if(!u&&f.startsWith("..")){let C=f.split("/");for(;C[0]==="..";)C.shift(),b-=1;m.pathname=C.join("/")}v=b>=0?c[b]:"/"}let g=lv(m,v),p=f&&f!=="/"&&f.endsWith("/"),y=(x||f===".")&&d.endsWith("/");return!g.pathname.endsWith("/")&&(p||y)&&(g.pathname+="/"),g}var Cl=r=>r.join("/").replace(/\/\/+/g,"/"),nv=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),sv=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,iv=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r,rv=class{constructor(r,c,d,u=!1){this.status=r,this.statusText=c||"",this.internal=u,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function uv(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}function cv(r){return r.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Sh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nh(r,c){let d=r;if(typeof d!="string"||!tv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let u=d,m=!1;if(Sh)try{let x=new URL(window.location.href),f=d.startsWith("//")?new URL(x.protocol+d):new URL(d),v=Rl(f.pathname,c);f.origin===x.origin&&v!=null?d=v+f.search+f.hash:m=!0}catch{Jt(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Eh=["POST","PUT","PATCH","DELETE"];new Set(Eh);var ov=["GET",...Eh];new Set(ov);var xn=T.createContext(null);xn.displayName="DataRouter";var $i=T.createContext(null);$i.displayName="DataRouterState";var dv=T.createContext(!1),wh=T.createContext({isTransitioning:!1});wh.displayName="ViewTransition";var fv=T.createContext(new Map);fv.displayName="Fetchers";var mv=T.createContext(null);mv.displayName="Await";var Lt=T.createContext(null);Lt.displayName="Navigation";var bs=T.createContext(null);bs.displayName="Location";var sl=T.createContext({outlet:null,matches:[],isDataRoute:!1});sl.displayName="Route";var Mc=T.createContext(null);Mc.displayName="RouteError";var Th="REACT_ROUTER_ERROR",hv="REDIRECT",xv="ROUTE_ERROR_RESPONSE";function pv(r){if(r.startsWith(`${Th}:${hv}:{`))try{let c=JSON.parse(r.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function vv(r){if(r.startsWith(`${Th}:${xv}:{`))try{let c=JSON.parse(r.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new rv(c.status,c.statusText,c.data)}catch{}}function gv(r,{relative:c}={}){Pe(pn(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:u}=T.useContext(Lt),{hash:m,pathname:x,search:f}=ys(r,{relative:c}),v=x;return d!=="/"&&(v=x==="/"?d:Cl([d,x])),u.createHref({pathname:v,search:f,hash:m})}function pn(){return T.useContext(bs)!=null}function sa(){return Pe(pn(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(bs).location}var Ch="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Rh(r){T.useContext(Lt).static||T.useLayoutEffect(r)}function _c(){let{isDataRoute:r}=T.useContext(sl);return r?_v():bv()}function bv(){Pe(pn(),"useNavigate() may be used only in the context of a <Router> component.");let r=T.useContext(xn),{basename:c,navigator:d}=T.useContext(Lt),{matches:u}=T.useContext(sl),{pathname:m}=sa(),x=JSON.stringify(Rc(u)),f=T.useRef(!1);return Rh(()=>{f.current=!0}),T.useCallback((g,p={})=>{if(Jt(f.current,Ch),!f.current)return;if(typeof g=="number"){d.go(g);return}let y=Ac(g,JSON.parse(x),m,p.relative==="path");r==null&&c!=="/"&&(y.pathname=y.pathname==="/"?c:Cl([c,y.pathname])),(p.replace?d.replace:d.push)(y,p.state,p)},[c,d,x,m,r])}T.createContext(null);function ys(r,{relative:c}={}){let{matches:d}=T.useContext(sl),{pathname:u}=sa(),m=JSON.stringify(Rc(d));return T.useMemo(()=>Ac(r,JSON.parse(m),u,c==="path"),[r,m,u,c])}function yv(r,c){return Ah(r,c)}function Ah(r,c,d,u,m){var B;Pe(pn(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:x}=T.useContext(Lt),{matches:f}=T.useContext(sl),v=f[f.length-1],g=v?v.params:{},p=v?v.pathname:"/",y=v?v.pathnameBase:"/",b=v&&v.route;{let S=b&&b.path||"";_h(p,!b||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
+
|
|
60
|
+
Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let C=sa(),z;if(c){let S=typeof c=="string"?Ea(c):c;Pe(y==="/"||((B=S.pathname)==null?void 0:B.startsWith(y)),`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 "${y}" but pathname "${S.pathname}" was given in the \`location\` prop.`),z=S}else z=C;let q=z.pathname||"/",A=q;if(y!=="/"){let S=y.replace(/^\//,"").split("/");A="/"+q.replace(/^\//,"").split("/").slice(S.length).join("/")}let Y=bh(r,{pathname:A});Jt(b||Y!=null,`No routes matched location "${z.pathname}${z.search}${z.hash}" `),Jt(Y==null||Y[Y.length-1].route.element!==void 0||Y[Y.length-1].route.Component!==void 0||Y[Y.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 V=wv(Y&&Y.map(S=>Object.assign({},S,{params:Object.assign({},g,S.params),pathname:Cl([y,x.encodeLocation?x.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?y:Cl([y,x.encodeLocation?x.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),f,d,u,m);return c&&V?T.createElement(bs.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...z},navigationType:"POP"}},V):V}function jv(){let r=Mv(),c=uv(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),d=r instanceof Error?r.stack:null,u="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:u},x={padding:"2px 4px",backgroundColor:u},f=null;return console.error("Error handled by React Router default ErrorBoundary:",r),f=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:x},"ErrorBoundary")," or"," ",T.createElement("code",{style:x},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},c),d?T.createElement("pre",{style:m},d):null,f)}var Sv=T.createElement(jv,null),Mh=class extends T.Component{constructor(r){super(r),this.state={location:r.location,revalidation:r.revalidation,error:r.error}}static getDerivedStateFromError(r){return{error:r}}static getDerivedStateFromProps(r,c){return c.location!==r.location||c.revalidation!=="idle"&&r.revalidation==="idle"?{error:r.error,location:r.location,revalidation:r.revalidation}:{error:r.error!==void 0?r.error:c.error,location:c.location,revalidation:r.revalidation||c.revalidation}}componentDidCatch(r,c){this.props.onError?this.props.onError(r,c):console.error("React Router caught the following error during render",r)}render(){let r=this.state.error;if(this.context&&typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){const d=vv(r.digest);d&&(r=d)}let c=r!==void 0?T.createElement(sl.Provider,{value:this.props.routeContext},T.createElement(Mc.Provider,{value:r,children:this.props.component})):this.props.children;return this.context?T.createElement(Nv,{error:r},c):c}};Mh.contextType=dv;var pc=new WeakMap;function Nv({children:r,error:c}){let{basename:d}=T.useContext(Lt);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let u=pv(c.digest);if(u){let m=pc.get(c);if(m)throw m;let x=Nh(u.location,d);if(Sh&&!pc.get(c))if(x.isExternal||u.reloadDocument)window.location.href=x.absoluteURL||x.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(x.to,{replace:u.replace}));throw pc.set(c,f),f}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${x.absoluteURL||x.to}`})}}return r}function Ev({routeContext:r,match:c,children:d}){let u=T.useContext(xn);return u&&u.static&&u.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=c.route.id),T.createElement(sl.Provider,{value:r},d)}function wv(r,c=[],d=null,u=null,m=null){if(r==null){if(!d)return null;if(d.errors)r=d.matches;else if(c.length===0&&!d.initialized&&d.matches.length>0)r=d.matches;else return null}let x=r,f=d==null?void 0:d.errors;if(f!=null){let y=x.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);Pe(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),x=x.slice(0,Math.min(x.length,y+1))}let v=!1,g=-1;if(d)for(let y=0;y<x.length;y++){let b=x[y];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(g=y),b.route.id){let{loaderData:C,errors:z}=d,q=b.route.loader&&!C.hasOwnProperty(b.route.id)&&(!z||z[b.route.id]===void 0);if(b.route.lazy||q){v=!0,g>=0?x=x.slice(0,g+1):x=[x[0]];break}}}let p=d&&u?(y,b)=>{var C,z;u(y,{location:d.location,params:((z=(C=d.matches)==null?void 0:C[0])==null?void 0:z.params)??{},unstable_pattern:cv(d.matches),errorInfo:b})}:void 0;return x.reduceRight((y,b,C)=>{let z,q=!1,A=null,Y=null;d&&(z=f&&b.route.id?f[b.route.id]:void 0,A=b.route.errorElement||Sv,v&&(g<0&&C===0?(_h("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),q=!0,Y=null):g===C&&(q=!0,Y=b.route.hydrateFallbackElement||null)));let V=c.concat(x.slice(0,C+1)),B=()=>{let S;return z?S=A:q?S=Y:b.route.Component?S=T.createElement(b.route.Component,null):b.route.element?S=b.route.element:S=y,T.createElement(Ev,{match:b,routeContext:{outlet:y,matches:V,isDataRoute:d!=null},children:S})};return d&&(b.route.ErrorBoundary||b.route.errorElement||C===0)?T.createElement(Mh,{location:d.location,revalidation:d.revalidation,component:A,error:z,children:B(),routeContext:{outlet:null,matches:V,isDataRoute:!0},onError:p}):B()},null)}function Dc(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Tv(r){let c=T.useContext(xn);return Pe(c,Dc(r)),c}function Cv(r){let c=T.useContext($i);return Pe(c,Dc(r)),c}function Rv(r){let c=T.useContext(sl);return Pe(c,Dc(r)),c}function zc(r){let c=Rv(r),d=c.matches[c.matches.length-1];return Pe(d.route.id,`${r} can only be used on routes that contain a unique "id"`),d.route.id}function Av(){return zc("useRouteId")}function Mv(){var u;let r=T.useContext(Mc),c=Cv("useRouteError"),d=zc("useRouteError");return r!==void 0?r:(u=c.errors)==null?void 0:u[d]}function _v(){let{router:r}=Tv("useNavigate"),c=zc("useNavigate"),d=T.useRef(!1);return Rh(()=>{d.current=!0}),T.useCallback(async(m,x={})=>{Jt(d.current,Ch),d.current&&(typeof m=="number"?await r.navigate(m):await r.navigate(m,{fromRouteId:c,...x}))},[r,c])}var ah={};function _h(r,c,d){!c&&!ah[r]&&(ah[r]=!0,Jt(!1,d))}T.memo(Dv);function Dv({routes:r,future:c,state:d,onError:u}){return Ah(r,void 0,d,u,c)}function zv({to:r,replace:c,state:d,relative:u}){Pe(pn(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=T.useContext(Lt);Jt(!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:x}=T.useContext(sl),{pathname:f}=sa(),v=_c(),g=Ac(r,Rc(x),f,u==="path"),p=JSON.stringify(g);return T.useEffect(()=>{v(JSON.parse(p),{replace:c,state:d,relative:u})},[v,p,u,c,d]),null}function Tl(r){Pe(!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 Ov({basename:r="/",children:c=null,location:d,navigationType:u="POP",navigator:m,static:x=!1,unstable_useTransitions:f}){Pe(!pn(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let v=r.replace(/^\/*/,"/"),g=T.useMemo(()=>({basename:v,navigator:m,static:x,unstable_useTransitions:f,future:{}}),[v,m,x,f]);typeof d=="string"&&(d=Ea(d));let{pathname:p="/",search:y="",hash:b="",state:C=null,key:z="default"}=d,q=T.useMemo(()=>{let A=Rl(p,v);return A==null?null:{location:{pathname:A,search:y,hash:b,state:C,key:z},navigationType:u}},[v,p,y,b,C,z,u]);return Jt(q!=null,`<Router basename="${v}"> is not able to match the URL "${p}${y}${b}" because it does not start with the basename, so the <Router> won't render anything.`),q==null?null:T.createElement(Lt.Provider,{value:g},T.createElement(bs.Provider,{children:c,value:q}))}function Uv({children:r,location:c}){return yv(Sc(r),c)}function Sc(r,c=[]){let d=[];return T.Children.forEach(r,(u,m)=>{if(!T.isValidElement(u))return;let x=[...c,m];if(u.type===T.Fragment){d.push.apply(d,Sc(u.props.children,x));return}Pe(u.type===Tl,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pe(!u.props.index||!u.props.children,"An index route cannot have child routes.");let f={id:u.props.id||x.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(f.children=Sc(u.props.children,x)),d.push(f)}),d}var Gi="get",Qi="application/x-www-form-urlencoded";function Ki(r){return typeof HTMLElement<"u"&&r instanceof HTMLElement}function qv(r){return Ki(r)&&r.tagName.toLowerCase()==="button"}function Hv(r){return Ki(r)&&r.tagName.toLowerCase()==="form"}function Lv(r){return Ki(r)&&r.tagName.toLowerCase()==="input"}function Bv(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function kv(r,c){return r.button===0&&(!c||c==="_self")&&!Bv(r)}var Bi=null;function Yv(){if(Bi===null)try{new FormData(document.createElement("form"),0),Bi=!1}catch{Bi=!0}return Bi}var Gv=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vc(r){return r!=null&&!Gv.has(r)?(Jt(!1,`"${r}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Qi}"`),null):r}function Qv(r,c){let d,u,m,x,f;if(Hv(r)){let v=r.getAttribute("action");u=v?Rl(v,c):null,d=r.getAttribute("method")||Gi,m=vc(r.getAttribute("enctype"))||Qi,x=new FormData(r)}else if(qv(r)||Lv(r)&&(r.type==="submit"||r.type==="image")){let v=r.form;if(v==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=r.getAttribute("formaction")||v.getAttribute("action");if(u=g?Rl(g,c):null,d=r.getAttribute("formmethod")||v.getAttribute("method")||Gi,m=vc(r.getAttribute("formenctype"))||vc(v.getAttribute("enctype"))||Qi,x=new FormData(v,r),!Yv()){let{name:p,type:y,value:b}=r;if(y==="image"){let C=p?`${p}.`:"";x.append(`${C}x`,"0"),x.append(`${C}y`,"0")}else p&&x.append(p,b)}}else{if(Ki(r))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Gi,u=null,m=Qi,f=r}return x&&m==="text/plain"&&(f=x,x=void 0),{action:u,method:d.toLowerCase(),encType:m,formData:x,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Oc(r,c){if(r===!1||r===null||typeof r>"u")throw new Error(c)}function Vv(r,c,d,u){let m=typeof r=="string"?new URL(r,typeof window>"u"?"server://singlefetch/":window.location.origin):r;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${u}`:m.pathname=`${m.pathname}.${u}`:m.pathname==="/"?m.pathname=`_root.${u}`:c&&Rl(m.pathname,c)==="/"?m.pathname=`${c.replace(/\/$/,"")}/_root.${u}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${u}`,m}async function Xv(r,c){if(r.id in c)return c[r.id];try{let d=await import(r.module);return c[r.id]=d,d}catch(d){return console.error(`Error loading route module \`${r.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Zv(r){return r==null?!1:r.href==null?r.rel==="preload"&&typeof r.imageSrcSet=="string"&&typeof r.imageSizes=="string":typeof r.rel=="string"&&typeof r.href=="string"}async function $v(r,c,d){let u=await Promise.all(r.map(async m=>{let x=c.routes[m.route.id];if(x){let f=await Xv(x,d);return f.links?f.links():[]}return[]}));return Pv(u.flat(1).filter(Zv).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function nh(r,c,d,u,m,x){let f=(g,p)=>d[p]?g.route.id!==d[p].route.id:!0,v=(g,p)=>{var y;return d[p].pathname!==g.pathname||((y=d[p].route.path)==null?void 0:y.endsWith("*"))&&d[p].params["*"]!==g.params["*"]};return x==="assets"?c.filter((g,p)=>f(g,p)||v(g,p)):x==="data"?c.filter((g,p)=>{var b;let y=u.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(f(g,p)||v(g,p))return!0;if(g.route.shouldRevalidate){let C=g.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((b=d[0])==null?void 0:b.params)||{},nextUrl:new URL(r,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function Kv(r,c,{includeHydrateFallback:d}={}){return Jv(r.map(u=>{let m=c.routes[u.route.id];if(!m)return[];let x=[m.module];return m.clientActionModule&&(x=x.concat(m.clientActionModule)),m.clientLoaderModule&&(x=x.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(x=x.concat(m.hydrateFallbackModule)),m.imports&&(x=x.concat(m.imports)),x}).flat(1))}function Jv(r){return[...new Set(r)]}function Fv(r){let c={},d=Object.keys(r).sort();for(let u of d)c[u]=r[u];return c}function Pv(r,c){let d=new Set;return new Set(c),r.reduce((u,m)=>{let x=JSON.stringify(Fv(m));return d.has(x)||(d.add(x),u.push({key:x,link:m})),u},[])}function Dh(){let r=T.useContext(xn);return Oc(r,"You must render this element inside a <DataRouterContext.Provider> element"),r}function Wv(){let r=T.useContext($i);return Oc(r,"You must render this element inside a <DataRouterStateContext.Provider> element"),r}var Uc=T.createContext(void 0);Uc.displayName="FrameworkContext";function zh(){let r=T.useContext(Uc);return Oc(r,"You must render this element inside a <HydratedRouter> element"),r}function Iv(r,c){let d=T.useContext(Uc),[u,m]=T.useState(!1),[x,f]=T.useState(!1),{onFocus:v,onBlur:g,onMouseEnter:p,onMouseLeave:y,onTouchStart:b}=c,C=T.useRef(null);T.useEffect(()=>{if(r==="render"&&f(!0),r==="viewport"){let A=V=>{V.forEach(B=>{f(B.isIntersecting)})},Y=new IntersectionObserver(A,{threshold:.5});return C.current&&Y.observe(C.current),()=>{Y.disconnect()}}},[r]),T.useEffect(()=>{if(u){let A=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(A)}}},[u]);let z=()=>{m(!0)},q=()=>{m(!1),f(!1)};return d?r!=="intent"?[x,C,{}]:[x,C,{onFocus:ms(v,z),onBlur:ms(g,q),onMouseEnter:ms(p,z),onMouseLeave:ms(y,q),onTouchStart:ms(b,z)}]:[!1,C,{}]}function ms(r,c){return d=>{r&&r(d),d.defaultPrevented||c(d)}}function eg({page:r,...c}){let{router:d}=Dh(),u=T.useMemo(()=>bh(d.routes,r,d.basename),[d.routes,r,d.basename]);return u?T.createElement(lg,{page:r,matches:u,...c}):null}function tg(r){let{manifest:c,routeModules:d}=zh(),[u,m]=T.useState([]);return T.useEffect(()=>{let x=!1;return $v(r,c,d).then(f=>{x||m(f)}),()=>{x=!0}},[r,c,d]),u}function lg({page:r,matches:c,...d}){let u=sa(),{future:m,manifest:x,routeModules:f}=zh(),{basename:v}=Dh(),{loaderData:g,matches:p}=Wv(),y=T.useMemo(()=>nh(r,c,p,x,u,"data"),[r,c,p,x,u]),b=T.useMemo(()=>nh(r,c,p,x,u,"assets"),[r,c,p,x,u]),C=T.useMemo(()=>{if(r===u.pathname+u.search+u.hash)return[];let A=new Set,Y=!1;if(c.forEach(B=>{var ee;let S=x.routes[B.route.id];!S||!S.hasLoader||(!y.some(ue=>ue.route.id===B.route.id)&&B.route.id in g&&((ee=f[B.route.id])!=null&&ee.shouldRevalidate)||S.hasClientLoader?Y=!0:A.add(B.route.id))}),A.size===0)return[];let V=Vv(r,v,m.unstable_trailingSlashAwareDataRequests,"data");return Y&&A.size>0&&V.searchParams.set("_routes",c.filter(B=>A.has(B.route.id)).map(B=>B.route.id).join(",")),[V.pathname+V.search]},[v,m.unstable_trailingSlashAwareDataRequests,g,u,x,y,c,r,f]),z=T.useMemo(()=>Kv(b,x),[b,x]),q=tg(b);return T.createElement(T.Fragment,null,C.map(A=>T.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...d})),z.map(A=>T.createElement("link",{key:A,rel:"modulepreload",href:A,...d})),q.map(({key:A,link:Y})=>T.createElement("link",{key:A,nonce:d.nonce,...Y,crossOrigin:Y.crossOrigin??d.crossOrigin})))}function ag(...r){return c=>{r.forEach(d=>{typeof d=="function"?d(c):d!=null&&(d.current=c)})}}var ng=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ng&&(window.__reactRouterVersion="7.13.0")}catch{}function sg({basename:r,children:c,unstable_useTransitions:d,window:u}){let m=T.useRef();m.current==null&&(m.current=Lp({window:u,v5Compat:!0}));let x=m.current,[f,v]=T.useState({action:x.action,location:x.location}),g=T.useCallback(p=>{d===!1?v(p):T.startTransition(()=>v(p))},[d]);return T.useLayoutEffect(()=>x.listen(g),[x,g]),T.createElement(Ov,{basename:r,children:c,location:f.location,navigationType:f.action,navigator:x,unstable_useTransitions:d})}var Oh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Uh=T.forwardRef(function({onClick:c,discover:d="render",prefetch:u="none",relative:m,reloadDocument:x,replace:f,state:v,target:g,to:p,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:C,...z},q){let{basename:A,unstable_useTransitions:Y}=T.useContext(Lt),V=typeof p=="string"&&Oh.test(p),B=Nh(p,A);p=B.to;let S=gv(p,{relative:m}),[ee,ue,H]=Iv(u,z),P=ug(p,{replace:f,state:v,target:g,preventScrollReset:y,relative:m,viewTransition:b,unstable_defaultShouldRevalidate:C,unstable_useTransitions:Y});function ie(J){c&&c(J),J.defaultPrevented||P(J)}let ge=T.createElement("a",{...z,...H,href:B.absoluteURL||S,onClick:B.isExternal||x?c:ie,ref:ag(q,ue),target:g,"data-discover":!V&&d==="render"?"true":void 0});return ee&&!V?T.createElement(T.Fragment,null,ge,T.createElement(eg,{page:S})):ge});Uh.displayName="Link";var qh=T.forwardRef(function({"aria-current":c="page",caseSensitive:d=!1,className:u="",end:m=!1,style:x,to:f,viewTransition:v,children:g,...p},y){let b=ys(f,{relative:p.relative}),C=sa(),z=T.useContext($i),{navigator:q,basename:A}=T.useContext(Lt),Y=z!=null&&mg(b)&&v===!0,V=q.encodeLocation?q.encodeLocation(b).pathname:b.pathname,B=C.pathname,S=z&&z.navigation&&z.navigation.location?z.navigation.location.pathname:null;d||(B=B.toLowerCase(),S=S?S.toLowerCase():null,V=V.toLowerCase()),S&&A&&(S=Rl(S,A)||S);const ee=V!=="/"&&V.endsWith("/")?V.length-1:V.length;let ue=B===V||!m&&B.startsWith(V)&&B.charAt(ee)==="/",H=S!=null&&(S===V||!m&&S.startsWith(V)&&S.charAt(V.length)==="/"),P={isActive:ue,isPending:H,isTransitioning:Y},ie=ue?c:void 0,ge;typeof u=="function"?ge=u(P):ge=[u,ue?"active":null,H?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let J=typeof x=="function"?x(P):x;return T.createElement(Uh,{...p,"aria-current":ie,className:ge,ref:y,style:J,to:f,viewTransition:v},typeof g=="function"?g(P):g)});qh.displayName="NavLink";var ig=T.forwardRef(({discover:r="render",fetcherKey:c,navigate:d,reloadDocument:u,replace:m,state:x,method:f=Gi,action:v,onSubmit:g,relative:p,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:C,...z},q)=>{let{unstable_useTransitions:A}=T.useContext(Lt),Y=dg(),V=fg(v,{relative:p}),B=f.toLowerCase()==="get"?"get":"post",S=typeof v=="string"&&Oh.test(v),ee=ue=>{if(g&&g(ue),ue.defaultPrevented)return;ue.preventDefault();let H=ue.nativeEvent.submitter,P=(H==null?void 0:H.getAttribute("formmethod"))||f,ie=()=>Y(H||ue.currentTarget,{fetcherKey:c,method:P,navigate:d,replace:m,state:x,relative:p,preventScrollReset:y,viewTransition:b,unstable_defaultShouldRevalidate:C});A&&d!==!1?T.startTransition(()=>ie()):ie()};return T.createElement("form",{ref:q,method:B,action:V,onSubmit:u?g:ee,...z,"data-discover":!S&&r==="render"?"true":void 0})});ig.displayName="Form";function rg(r){return`${r} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hh(r){let c=T.useContext(xn);return Pe(c,rg(r)),c}function ug(r,{target:c,replace:d,state:u,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:v,unstable_useTransitions:g}={}){let p=_c(),y=sa(),b=ys(r,{relative:x});return T.useCallback(C=>{if(kv(C,c)){C.preventDefault();let z=d!==void 0?d:gs(y)===gs(b),q=()=>p(r,{replace:z,state:u,preventScrollReset:m,relative:x,viewTransition:f,unstable_defaultShouldRevalidate:v});g?T.startTransition(()=>q()):q()}},[y,p,b,d,u,c,r,m,x,f,v,g])}var cg=0,og=()=>`__${String(++cg)}__`;function dg(){let{router:r}=Hh("useSubmit"),{basename:c}=T.useContext(Lt),d=Av(),u=r.fetch,m=r.navigate;return T.useCallback(async(x,f={})=>{let{action:v,method:g,encType:p,formData:y,body:b}=Qv(x,c);if(f.navigate===!1){let C=f.fetcherKey||og();await u(C,d,f.action||v,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||g,formEncType:f.encType||p,flushSync:f.flushSync})}else await m(f.action||v,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:y,body:b,formMethod:f.method||g,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:d,flushSync:f.flushSync,viewTransition:f.viewTransition})},[u,m,c,d])}function fg(r,{relative:c}={}){let{basename:d}=T.useContext(Lt),u=T.useContext(sl);Pe(u,"useFormAction must be used inside a RouteContext");let[m]=u.matches.slice(-1),x={...ys(r||".",{relative:c})},f=sa();if(r==null){x.search=f.search;let v=new URLSearchParams(x.search),g=v.getAll("index");if(g.some(y=>y==="")){v.delete("index"),g.filter(b=>b).forEach(b=>v.append("index",b));let y=v.toString();x.search=y?`?${y}`:""}}return(!r||r===".")&&m.route.index&&(x.search=x.search?x.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(x.pathname=x.pathname==="/"?d:Cl([d,x.pathname])),gs(x)}function mg(r,{relative:c}={}){let d=T.useContext(wh);Pe(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=Hh("useViewTransitionState"),m=ys(r,{relative:c});if(!d.isTransitioning)return!1;let x=Rl(d.currentLocation.pathname,u)||d.currentLocation.pathname,f=Rl(d.nextLocation.pathname,u)||d.nextLocation.pathname;return Vi(m.pathname,f)!=null||Vi(m.pathname,x)!=null}var hg=gh();const xg=Tc(hg);/**
|
|
61
|
+
* @license lucide-react v0.564.0 - ISC
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the ISC license.
|
|
64
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/const Lh=(...r)=>r.filter((c,d,u)=>!!c&&c.trim()!==""&&u.indexOf(c)===d).join(" ").trim();/**
|
|
66
|
+
* @license lucide-react v0.564.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const pg=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
71
|
+
* @license lucide-react v0.564.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const vg=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,d,u)=>u?u.toUpperCase():d.toLowerCase());/**
|
|
76
|
+
* @license lucide-react v0.564.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const sh=r=>{const c=vg(r);return c.charAt(0).toUpperCase()+c.slice(1)};/**
|
|
81
|
+
* @license lucide-react v0.564.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/var gg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
86
|
+
* @license lucide-react v0.564.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const bg=r=>{for(const c in r)if(c.startsWith("aria-")||c==="role"||c==="title")return!0;return!1};/**
|
|
91
|
+
* @license lucide-react v0.564.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const yg=T.forwardRef(({color:r="currentColor",size:c=24,strokeWidth:d=2,absoluteStrokeWidth:u,className:m="",children:x,iconNode:f,...v},g)=>T.createElement("svg",{ref:g,...gg,width:c,height:c,stroke:r,strokeWidth:u?Number(d)*24/Number(c):d,className:Lh("lucide",m),...!x&&!bg(v)&&{"aria-hidden":"true"},...v},[...f.map(([p,y])=>T.createElement(p,y)),...Array.isArray(x)?x:[x]]));/**
|
|
96
|
+
* @license lucide-react v0.564.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const oe=(r,c)=>{const d=T.forwardRef(({className:u,...m},x)=>T.createElement(yg,{ref:x,iconNode:c,className:Lh(`lucide-${pg(sh(r))}`,`lucide-${r}`,u),...m}));return d.displayName=sh(r),d};/**
|
|
101
|
+
* @license lucide-react v0.564.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const jg=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Bh=oe("activity",jg);/**
|
|
106
|
+
* @license lucide-react v0.564.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Sg=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Ng=oe("arrow-down",Sg);/**
|
|
111
|
+
* @license lucide-react v0.564.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Eg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ih=oe("arrow-right",Eg);/**
|
|
116
|
+
* @license lucide-react v0.564.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const wg=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Tg=oe("arrow-up-down",wg);/**
|
|
121
|
+
* @license lucide-react v0.564.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Cg=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Rg=oe("arrow-up",Cg);/**
|
|
126
|
+
* @license lucide-react v0.564.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const Ag=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],Mg=oe("bell",Ag);/**
|
|
131
|
+
* @license lucide-react v0.564.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const _g=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],rh=oe("briefcase",_g);/**
|
|
136
|
+
* @license lucide-react v0.564.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const Dg=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],qc=oe("calendar",Dg);/**
|
|
141
|
+
* @license lucide-react v0.564.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const zg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Nc=oe("check",zg);/**
|
|
146
|
+
* @license lucide-react v0.564.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Og=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],kh=oe("chevron-down",Og);/**
|
|
151
|
+
* @license lucide-react v0.564.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Ug=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],qg=oe("chevron-left",Ug);/**
|
|
156
|
+
* @license lucide-react v0.564.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const Hg=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lg=oe("chevron-right",Hg);/**
|
|
161
|
+
* @license lucide-react v0.564.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const Bg=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],kg=oe("chevron-up",Bg);/**
|
|
166
|
+
* @license lucide-react v0.564.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Yg=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Gg=oe("chevrons-up-down",Yg);/**
|
|
171
|
+
* @license lucide-react v0.564.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const Qg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Al=oe("circle-alert",Qg);/**
|
|
176
|
+
* @license lucide-react v0.564.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const Vg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]],uh=oe("circle-arrow-down",Vg);/**
|
|
181
|
+
* @license lucide-react v0.564.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const Xg=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],js=oe("circle-check-big",Xg);/**
|
|
186
|
+
* @license lucide-react v0.564.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const Zg=[["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"}]],$g=oe("circle-x",Zg);/**
|
|
191
|
+
* @license lucide-react v0.564.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const Kg=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],ch=oe("clipboard-list",Kg);/**
|
|
196
|
+
* @license lucide-react v0.564.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const Jg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Xi=oe("clock",Jg);/**
|
|
201
|
+
* @license lucide-react v0.564.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const Fg=[["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"}]],Yh=oe("external-link",Fg);/**
|
|
206
|
+
* @license lucide-react v0.564.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const Pg=[["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"}]],Wg=oe("eye-off",Pg);/**
|
|
211
|
+
* @license lucide-react v0.564.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const Ig=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],eb=oe("eye",Ig);/**
|
|
216
|
+
* @license lucide-react v0.564.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const tb=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ec=oe("file-text",tb);/**
|
|
221
|
+
* @license lucide-react v0.564.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const lb=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],ab=oe("git-pull-request",lb);/**
|
|
226
|
+
* @license lucide-react v0.564.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const nb=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],sb=oe("house",nb);/**
|
|
231
|
+
* @license lucide-react v0.564.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const ib=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],rb=oe("info",ib);/**
|
|
236
|
+
* @license lucide-react v0.564.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const ub=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],cb=oe("kanban",ub);/**
|
|
241
|
+
* @license lucide-react v0.564.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const ob=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Gh=oe("loader-circle",ob);/**
|
|
246
|
+
* @license lucide-react v0.564.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const db=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Qh=oe("map",db);/**
|
|
251
|
+
* @license lucide-react v0.564.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const fb=[["path",{d:"M5 12h14",key:"1ays0h"}]],mb=oe("minus",fb);/**
|
|
256
|
+
* @license lucide-react v0.564.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const hb=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Vh=oe("pause",hb);/**
|
|
261
|
+
* @license lucide-react v0.564.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const xb=[["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"}]],Hc=oe("pen",xb);/**
|
|
266
|
+
* @license lucide-react v0.564.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const pb=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],mn=oe("play",pb);/**
|
|
271
|
+
* @license lucide-react v0.564.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const vb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vn=oe("plus",vb);/**
|
|
276
|
+
* @license lucide-react v0.564.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const gb=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Xh=oe("rotate-ccw",gb);/**
|
|
281
|
+
* @license lucide-react v0.564.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const bb=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],yb=oe("save",bb);/**
|
|
286
|
+
* @license lucide-react v0.564.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const jb=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ji=oe("search",jb);/**
|
|
291
|
+
* @license lucide-react v0.564.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const Sb=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Nb=oe("settings",Sb);/**
|
|
296
|
+
* @license lucide-react v0.564.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const Eb=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],oh=oe("square",Eb);/**
|
|
301
|
+
* @license lucide-react v0.564.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const wb=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Tb=oe("terminal",wb);/**
|
|
306
|
+
* @license lucide-react v0.564.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const Cb=[["path",{d:"M21 7 6.82 21.18a2.83 2.83 0 0 1-3.99-.01a2.83 2.83 0 0 1 0-4L17 3",key:"1ub6xw"}],["path",{d:"m16 2 6 6",key:"1gw87d"}],["path",{d:"M12 16H4",key:"1cjfip"}]],Rb=oe("test-tube-diagonal",Cb);/**
|
|
311
|
+
* @license lucide-react v0.564.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const Ab=[["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"}]],Lc=oe("trash-2",Ab);/**
|
|
316
|
+
* @license lucide-react v0.564.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const Mb=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Fi=oe("triangle-alert",Mb);/**
|
|
321
|
+
* @license lucide-react v0.564.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const _b=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],Db=oe("wifi",_b);/**
|
|
326
|
+
* @license lucide-react v0.564.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const zb=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gn=oe("x",zb),Bc="";let Zh=!1,wc=null;function Ob(r){Zh=r}function Ub(r){wc=r}function qb(r){return encodeURIComponent(r.replace(/\//g,"~"))}function $e(r){return Zh&&wc?r.replace("/api/",`/api/projects/${qb(wc)}/`):r}function Hb(){return Ke("/api/mode")}function Lb(){return Ke("/api/projects")}async function Ke(r,c){const d=`${Bc}${r}`,u=await fetch(d,{headers:{"Content-Type":"application/json",...c==null?void 0:c.headers},...c});if(!u.ok){const m=await u.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${u.status}: ${u.statusText}`)}return u.json()}function gc(){return Ke($e("/api/status"))}function $h(){return Ke($e("/api/prs"))}function Bb(r,c){const d=`?lines=${encodeURIComponent(c)}`;return Ke($e(`/api/logs/${encodeURIComponent(r)}${d}`))}function Kh(){return Ke($e("/api/config"))}function aa(r){return Ke($e("/api/config"),{method:"PUT",body:JSON.stringify(r)})}function kb(){return Ke($e("/api/doctor"))}function Jh(){return Ke($e("/api/schedule-info"))}function Fh(){return Ke($e("/api/actions/run"),{method:"POST"})}function kc(){return Ke($e("/api/actions/review"),{method:"POST"})}function Ph(){return Ke($e("/api/actions/qa"),{method:"POST"})}function Wh(){return Ke($e("/api/actions/audit"),{method:"POST"})}function Yb(){return Ke($e("/api/actions/analytics"),{method:"POST"})}function Ih(){return Ke($e("/api/actions/planner"),{method:"POST"})}function vs(){return Ke($e("/api/actions/install-cron"),{method:"POST"})}function Gb(){return Ke($e("/api/actions/uninstall-cron"),{method:"POST"})}function Qb(r="all"){return Ke($e("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:r})})}const na=["Draft","Ready","In Progress","Review","Done"];function e0(){return Ke($e("/api/board/status"))}function Vb(r){return Ke($e("/api/board/issues"),{method:"POST",body:JSON.stringify(r)})}function t0(r,c){return Ke($e(`/api/board/issues/${r}/move`),{method:"PATCH",body:JSON.stringify({column:c})})}async function Xb(r){const c=`${Bc}${$e(`/api/board/issues/${r}`)}`,d=await fetch(c,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const u=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(u.error||`HTTP ${d.status}: ${d.statusText}`)}}function Zb(){return Ke($e("/api/actions/clear-lock"),{method:"POST"})}function $b(r,c=[],d){const u=(d==null?void 0:d.enabled)??!0,m=T.useRef(r);m.current=r,T.useEffect(()=>{if(!u)return;const x=`${Bc}${$e("/api/status/events")}`,f=new EventSource(x);return f.addEventListener("status_changed",v=>{try{const g=JSON.parse(v.data);m.current(g)}catch{}}),()=>{f.close()}},[u,...c])}function Kb(){return Ke($e("/api/roadmap"))}function Jb(){return Ke($e("/api/roadmap/scan"),{method:"POST"})}function l0(r){return Ke($e("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:r})})}function It(r,c=[],d){const u=(d==null?void 0:d.enabled)??!0,[m,x]=T.useState(null),[f,v]=T.useState(!0),[g,p]=T.useState(null),y=T.useRef(r);y.current=r;const b=T.useRef(()=>{(async()=>{p(null);try{const z=await y.current();x(z)}catch(z){p(z instanceof Error?z:new Error("Unknown error"))}})()});return b.current=b.current.bind(b),T.useEffect(()=>{if(!u)return;let C=!1;return v(!0),p(null),(async()=>{try{const q=await y.current();C||x(q)}catch(q){C||p(q instanceof Error?q:new Error("Unknown error"))}finally{C||v(!1)}})(),()=>{C=!0}},[...c,u]),{data:m,loading:f,error:g,refetch:b.current}}const dh=r=>{let c;const d=new Set,u=(p,y)=>{const b=typeof p=="function"?p(c):p;if(!Object.is(b,c)){const C=c;c=y??(typeof b!="object"||b===null)?b:Object.assign({},c,b),d.forEach(z=>z(c,C))}},m=()=>c,v={setState:u,getState:m,getInitialState:()=>g,subscribe:p=>(d.add(p),()=>d.delete(p))},g=c=r(u,m,v);return v},Fb=r=>r?dh(r):dh,Pb=r=>r;function Wb(r,c=Pb){const d=ve.useSyncExternalStore(r.subscribe,()=>c(r.getState()),()=>c(r.getInitialState()));return ve.useDebugValue(d),d}const fh=r=>{const c=Fb(r),d=u=>Wb(c,u);return Object.assign(d,c),d},Ib=r=>r?fh(r):fh,ey=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,vt=Ib(r=>({projectName:"Night Watch",setProjectName:c=>r({projectName:c}),toasts:[],addToast:c=>{const d=Math.random().toString(36).substring(7);r(u=>({toasts:[...u.toasts,{...c,id:d}]})),setTimeout(()=>{r(u=>({toasts:u.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:c=>r(d=>({toasts:d.toasts.filter(u=>u.id!==c)})),status:null,setStatus:c=>r(d=>!d.status||new Date(c.timestamp)>new Date(d.status.timestamp)?{status:c}:d),globalModeLoading:!0,setGlobalModeLoading:c=>r({globalModeLoading:c}),isGlobalMode:!1,setGlobalMode:c=>{Ob(c),r({isGlobalMode:c})},projects:[],setProjects:c=>r({projects:c}),selectedProjectId:ey,selectProject:c=>{Ub(c),c?localStorage.setItem("nw-selected-project",c):localStorage.removeItem("nw-selected-project"),r(d=>{const u=d.projects.find(m=>m.name===c);return{selectedProjectId:c,...u?{projectName:u.name}:{}}})}})),ty=()=>{const[r,c]=T.useState(!1),{projectName:d,isGlobalMode:u,projects:m,selectedProjectId:x,selectProject:f,globalModeLoading:v}=vt(),{data:g}=It($h,[x],{enabled:!v}),p=(g==null?void 0:g.length)??0,y=T.useMemo(()=>[{icon:sb,label:"Dashboard",path:"/",section:"Overview"},{icon:Tb,label:"Logs",path:"/logs"},{icon:cb,label:"Board",path:"/board",section:"Work"},{icon:ab,label:"Pull Requests",path:"/prs",badge:p},{icon:Qh,label:"Roadmap",path:"/roadmap"},{icon:qc,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:Nb,label:"Settings",path:"/settings",section:"Config"}],[p]);return s.jsxs("aside",{className:`
|
|
331
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
332
|
+
${r?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
333
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
334
|
+
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${r?"items-center justify-center flex":""}`,children:r?s.jsx("div",{className:"relative group",children:s.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"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:u?"Projects":"Workspace"}),u?s.jsxs("div",{className:"relative",children:[s.jsx(rh,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:x||"",onChange:b=>f(b.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(b=>b.valid).map(b=>s.jsx("option",{value:b.name,children:b.name},b.name))}),s.jsx(Gg,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-slate-500 pointer-events-none"})]}):s.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:[s.jsx(rh,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:d})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:y.map(b=>s.jsxs(ve.Fragment,{children:[b.section&&!r&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:b.section}),s.jsx("li",{children:s.jsx(qh,{to:b.path,className:({isActive:C})=>`
|
|
335
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
336
|
+
${C?"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"}
|
|
337
|
+
${r?"justify-center":""}
|
|
338
|
+
`,children:({isActive:C})=>s.jsxs(s.Fragment,{children:[s.jsx(b.icon,{className:`h-5 w-5 transition-colors ${C?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${r?"":"mr-3.5"}`}),!r&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:b.label}),b.badge&&(r?s.jsx("span",{className:"absolute top-2 right-2 h-2 w-2 bg-indigo-500 rounded-full border border-[#030712] shadow-sm"}):s.jsx("span",{className:`text-[10px] font-bold px-2 py-0.5 rounded-md ${C?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:b.badge})),C&&!r&&s.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)]"}),r&&s.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:b.label})]})})})]},b.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>c(!r),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:r?s.jsx(Lg,{className:"h-5 w-5"}):s.jsx(qg,{className:"h-5 w-5"})})})]})},ly=()=>{const{projectName:r}=vt();return s.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:[s.jsxs("div",{className:"flex items-center space-x-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-mono text-indigo-400 mb-0.5 tracking-tight",children:"Active Project"}),s.jsx("h1",{className:"text-xl font-semibold text-white tracking-tight leading-none",children:r})]}),s.jsx("div",{className:"h-8 w-px bg-white/10 mx-2"}),s.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:[s.jsx(Db,{className:"h-3.5 w-3.5"}),s.jsx("span",{className:"uppercase tracking-wider text-[10px]",children:"Online"})]})]}),s.jsxs("div",{className:"flex items-center space-x-5",children:[s.jsxs("div",{className:"relative hidden md:block group",children:[s.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]"}),s.jsx(Ji,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),s.jsx("div",{className:"flex items-center space-x-3",children:s.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[s.jsx(Mg,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),s.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"})]})]})},ay=({toast:r,onDismiss:c})=>{const d={success:s.jsx(js,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Al,{className:"h-5 w-5 text-red-400"}),info:s.jsx(rb,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Fi,{className:"h-5 w-5 text-amber-400"})},u={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
|
|
339
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
340
|
+
bg-slate-900 border border-slate-800 border-l-4 ${u[r.type]}
|
|
341
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
342
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
343
|
+
`,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:d[r.type]}),s.jsxs("div",{className:"ml-3 w-0 flex-1 pt-0.5",children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:r.title}),r.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:r.message})]}),s.jsx("div",{className:"ml-4 flex flex-shrink-0",children:s.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:()=>c(r.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(gn,{className:"h-5 w-5"})]})})]})})})},ny=()=>{const{toasts:r,removeToast:c}=vt();return s.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:r.map(d=>s.jsx(ay,{toast:d,onDismiss:c},d.id))})};function sy(){const{setGlobalMode:r,setGlobalModeLoading:c,setProjects:d,selectProject:u,selectedProjectId:m}=vt();T.useEffect(()=>{c(!0),Hb().then(async({globalMode:x})=>{if(r(x),!x)return;const f=await Lb();d(f);const v=f.filter(g=>g.valid);m&&v.some(g=>g.name===m)?u(m):v.length>0&&u(v[0].name)}).catch(()=>{r(!1)}).finally(()=>{c(!1)})},[])}function mh(r){if(!(r!=null&&r.timestamp))return Number.NEGATIVE_INFINITY;const c=new Date(r.timestamp).getTime();return Number.isNaN(c)?Number.NEGATIVE_INFINITY:c}function ki(r,c){return r?c?mh(r)>=mh(c)?r:c:r:c}function iy(){const{setStatus:r,setProjectName:c,selectedProjectId:d,globalModeLoading:u,status:m}=vt(),x=T.useRef(null);x.current=vt.getState().status,$b(f=>{ki(f,x.current)===f&&r(f)},[d,u],{enabled:!u}),T.useEffect(()=>{if(u)return;gc().then(v=>{ki(v,x.current)===v&&r(v)}).catch(()=>{});const f=setInterval(()=>{gc().then(v=>{ki(v,x.current)===v&&r(v)}).catch(()=>{})},3e4);return()=>clearInterval(f)},[d,u,r]),T.useEffect(()=>{const f=()=>{gc().then(v=>{ki(v,x.current)===v&&r(v)}).catch(()=>{})};return window.addEventListener("focus",f),()=>window.removeEventListener("focus",f)},[d,r]),T.useEffect(()=>{m!=null&&m.projectName&&c(m.projectName)},[m==null?void 0:m.projectName,c])}const De=({children:r,className:c="",onClick:d})=>s.jsxs("div",{className:`
|
|
344
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
345
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
346
|
+
transition-all duration-300
|
|
347
|
+
${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
348
|
+
${c}
|
|
349
|
+
`,onClick:d,children:[d&&s.jsx("div",{className:"absolute inset-0 bg-indigo-500/0 group-hover:bg-indigo-500/[0.02] transition-colors rounded-xl pointer-events-none"}),s.jsx("div",{className:"relative z-10",children:r})]}),Ye=({children:r,variant:c="primary",size:d="md",loading:u=!1,className:m="",disabled:x,...f})=>{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 s.jsxs("button",{className:`${v} ${g[c]} ${p[d]} ${m}`,disabled:x||u,...f,children:[u&&s.jsx(Gh,{className:"mr-2 h-4 w-4 animate-spin"}),r]})},fn=({children:r,variant:c="default",className:d=""})=>{const u={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 s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${u[c]} ${d}`,children:r})},a0={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"}},ry=({defaultColumn:r,onClose:c,onCreated:d})=>{const[u,m]=T.useState(""),[x,f]=T.useState(""),[v,g]=T.useState(r),[p,y]=T.useState(!1),[b,C]=T.useState(null),{addToast:z}=vt(),q=async A=>{if(A.preventDefault(),!!u.trim()){y(!0),C(null);try{await Vb({title:u.trim(),body:x,column:v}),z({title:"Issue created",message:`"${u.trim()}" added to ${v}`,type:"success"}),d(),c()}catch(Y){C(Y instanceof Error?Y.message:"Failed to create issue")}finally{y(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:c}),s.jsxs("div",{className:"relative bg-[#0f172a] border border-white/10 rounded-2xl shadow-2xl w-full max-w-lg",children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-white/5",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"New Board Issue"}),s.jsx("button",{onClick:c,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(gn,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:q,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:u,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"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Column"}),s.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:na.map(A=>s.jsx("option",{value:A,children:A},A))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:x,onChange:A=>f(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"})]}),b&&s.jsx("p",{className:"text-sm text-red-400",children:b}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Ye,{variant:"ghost",type:"button",onClick:c,children:"Cancel"}),s.jsx(Ye,{type:"submit",disabled:p||!u.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},uy=({issue:r,onClose:c,onMoved:d,onClosed:u})=>{const[m,x]=T.useState(!1),[f,v]=T.useState(!1),{addToast:g}=vt(),p=async C=>{if(C!==r.column){x(!0);try{await t0(r.number,C),g({title:"Issue moved",message:`#${r.number} moved to ${C}`,type:"success"}),d(),c()}catch(z){g({title:"Move failed",message:z instanceof Error?z.message:"Failed to move issue",type:"error"})}finally{x(!1)}}},y=async()=>{if(confirm(`Close issue #${r.number}: "${r.title}"?`)){v(!0);try{await Xb(r.number),g({title:"Issue closed",message:`#${r.number} closed on GitHub`,type:"success"}),u(),c()}catch(C){g({title:"Close failed",message:C instanceof Error?C.message:"Failed to close issue",type:"error"})}finally{v(!1)}}},b=r.column??"Draft";return s.jsxs("div",{className:"fixed inset-0 z-50 flex justify-end",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:c}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border-l border-white/10 w-full max-w-xl flex flex-col shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-white/5 flex-shrink-0",children:[s.jsxs("div",{className:"flex-1 min-w-0 pr-4",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[s.jsxs("span",{className:"text-slate-500 text-sm font-mono",children:["#",r.number]}),s.jsx(fn,{variant:a0[b].badge,children:b})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:r.title}),r.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",r.assignees.join(", ")]})]}),s.jsx("button",{onClick:c,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors flex-shrink-0",children:s.jsx(gn,{className:"h-5 w-5"})})]}),s.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:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Move to:"}),na.filter(C=>C!==r.column).map(C=>s.jsx("button",{onClick:()=>p(C),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:C},C))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[r.url&&!r.url.startsWith("local://")&&s.jsxs("a",{href:r.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:[s.jsx(Yh,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:y,disabled:f,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:f?"Closing...":"Close Issue"})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:r.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:r.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},cy=({issue:r,onClick:c,onDragStart:d})=>{const[u,m]=T.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:x=>{x.dataTransfer.setData("issueNumber",String(r.number)),x.dataTransfer.effectAllowed="move",m(!0),d(r)},onDragEnd:()=>m(!1),children:s.jsxs(De,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${u?"opacity-30":""}`,onClick:c,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",r.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:r.title}),r.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:r.assignees.join(", ")})]})})},oy=({name:r,issues:c,draggingIssue:d,onIssueClick:u,onNewIssue:m,onMoveIssue:x,onDragStart:f})=>{const v=a0[r],[g,p]=T.useState(!1),y=d!==null&&d.column!==r;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${g&&y?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:b=>{y&&(b.preventDefault(),b.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:b=>{b.preventDefault(),p(!1),d&&d.column!==r&&x(d,r)},children:[s.jsxs("div",{className:"flex items-center justify-between mb-3 flex-shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${v.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:r}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:c.length})]}),s.jsx("button",{onClick:()=>m(r),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${r}`,children:s.jsx(vn,{className:"h-3.5 w-3.5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1 scrollbar-hide min-h-0",children:c.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${g&&y?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:g&&y?"Drop here":"No issues"})}):c.map(b=>s.jsx(cy,{issue:b,onClick:()=>u(b),onDragStart:f},b.id))})]})},dy=()=>{const[r,c]=T.useState(null),[d,u]=T.useState(null),[m,x]=T.useState(null),[f,v]=T.useState(null),g=T.useRef(!1),{addToast:p,selectedProjectId:y,globalModeLoading:b}=vt(),{data:C,loading:z,error:q,refetch:A}=It(e0,[y],{enabled:!b});T.useEffect(()=>{const B=setInterval(()=>{g.current||A()},3e4);return()=>clearInterval(B)},[A]);const Y=T.useCallback(async(B,S)=>{x(null);const ee=f??(C==null?void 0:C.columns);if(!ee)return;const ue=ee,H={};for(const ie of na)H[ie]=(ee[ie]??[]).filter(ge=>ge.number!==B.number);const P={...B,column:S};H[S]=[...H[S]??[],P],v(H),c(ie=>(ie==null?void 0:ie.number)===B.number?P:ie),g.current=!0;try{await t0(B.number,S),A(),setTimeout(()=>{v(null),g.current=!1},800)}catch(ie){v(ue),c(ge=>(ge==null?void 0:ge.number)===B.number?B:ge),g.current=!1,p({title:"Move failed",message:ie instanceof Error?ie.message:"Failed to move issue",type:"error"})}},[p,A,f,C]);if(b||z)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(q&&q.message.includes("Board not configured"))return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-4xl",children:"📋"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"Board not configured"}),s.jsxs("p",{className:"text-slate-500 text-sm max-w-sm text-center",children:["Run ",s.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(q)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx("div",{className:"text-slate-300",children:"Failed to load board"}),s.jsx("div",{className:"text-sm text-slate-500",children:q.message}),s.jsx(Ye,{onClick:()=>A(),children:"Retry"})]});if(!C)return null;const V=f??C.columns;return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6 flex-shrink-0",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-100",children:"Board"}),s.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[na.reduce((B,S)=>{var ee;return B+(((ee=V[S])==null?void 0:ee.length)??0)},0)," issues across ",na.length," columns"]})]}),s.jsxs(Ye,{onClick:()=>u("Ready"),children:[s.jsx(vn,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>x(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${na.length*236}px`},children:na.map(B=>s.jsx(oy,{name:B,issues:V[B]??[],draggingIssue:m,onIssueClick:c,onNewIssue:u,onMoveIssue:Y,onDragStart:x},B))})}),r&&s.jsx(uy,{issue:r,onClose:()=>c(null),onMoved:()=>A(),onClosed:()=>A()}),d&&s.jsx(ry,{defaultColumn:d,onClose:()=>u(null),onCreated:()=>A()})]})},fy=[{name:"executor",displayName:"Executor",processName:"executor",triggerId:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",triggerId:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",triggerId:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",triggerId:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"}],my=({processes:r,activePrd:c,onCancelProcess:d,onForceClear:u,onViewLog:m,cancellingProcess:x,clearingLock:f,onTriggerJob:v,triggeringJob:g})=>{const p=b=>r.find(C=>C.name===b),y=(b,C)=>b.length<=C?b:b.slice(0,C-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:fy.map(b=>{const C=p(b.processName),z=(C==null?void 0:C.running)??!1,q=C==null?void 0:C.pid,A=x===b.cancelType,Y=z&&b.cancelType,V=!z&&b.name==="executor"&&c,B=z?q?`PID: ${q}`:b.runningLabel:b.idleLabel,S=z&&b.name==="executor"&&c?y(c,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${z?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${z?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${z?"text-slate-200":"text-slate-400"}`,children:b.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:S?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Ec,{className:"h-3 w-3 flex-shrink-0"}),S]}):B})]}),s.jsxs("div",{className:"flex-shrink-0",children:[Y&&s.jsx("button",{onClick:()=>b.cancelType&&d(b.cancelType),disabled:A,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(oh,{className:"h-3.5 w-3.5"})}),V&&s.jsx("button",{onClick:u,disabled:f,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(oh,{className:"h-3.5 w-3.5"})}),!Y&&!V&&z&&s.jsx("button",{onClick:m,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Ec,{className:"h-3.5 w-3.5"})}),!z&&!V&&s.jsx("button",{onClick:()=>v(b.triggerId),disabled:g!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${b.displayName}`,children:g===b.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(mn,{className:"h-3.5 w-3.5"})})]})]},b.name)})})},hy={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"},xy=()=>{var J,ze;const r=_c(),[c,d]=T.useState(null),[u,m]=T.useState(!1),[x,f]=T.useState(null),{setProjectName:v,addToast:g,selectedProjectId:p,globalModeLoading:y,status:b}=vt(),{data:C}=It(Jh,[p],{enabled:!y}),{data:z,loading:q}=It(()=>e0().catch(()=>null),[p],{enabled:!y}),A=b;if(ve.useEffect(()=>{A!=null&&A.projectName&&v(A.projectName)},[A,v]),y)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!A)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const Y=A.prs.length,V=A.prs.filter(se=>se.reviewScore!==null&&se.reviewScore<70).length,B=((J=z==null?void 0:z.columns.Ready)==null?void 0:J.length)??0,S=((ze=z==null?void 0:z.columns["In Progress"])==null?void 0:ze.length)??0,ee=async se=>{d(se);try{const pe=await Qb(se),Ce=pe.results.every(Z=>Z.success);g({title:Ce?"Process Cancelled":"Cancel Failed",message:pe.results.map(Z=>Z.message).join("; "),type:Ce?"success":"error"})}catch(pe){g({title:"Cancel Failed",message:pe instanceof Error?pe.message:"Failed to cancel process",type:"error"})}finally{d(null)}},ue=async()=>{m(!0);try{await Zb(),g({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(se){g({title:"Clear Failed",message:se instanceof Error?se.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},H=async se=>{f(se);try{await{executor:Fh,reviewer:kc,qa:Ph,audit:Wh,planner:Ih,analytics:Yb}[se](),g({title:"Job Triggered",message:`${se[0].toUpperCase()+se.slice(1)} job has been queued.`,type:"success"})}catch(pe){g({title:"Trigger Failed",message:pe instanceof Error?pe.message:`Failed to trigger ${se}`,type:"error"})}finally{f(null)}},P=se=>{if(!se)return"Not scheduled";try{const pe=new Date(se),Ce=new Date,Z=pe.getTime()-Ce.getTime(),U=Math.floor(Z/6e4);return U<0?"Running now...":U<60?`in ${U} min`:U<1440?`in ${Math.floor(U/60)} hr${U>=120?"s":""}`:`in ${Math.floor(U/1440)} day${U>=2880?"s":""}`}catch{return"Unknown"}},ge=(()=>{var Ce,Z,U;if(C!=null&&C.paused)return null;const se=[{agent:"Executor",nextRun:(C==null?void 0:C.executor.nextRun)??null},{agent:"Reviewer",nextRun:(C==null?void 0:C.reviewer.nextRun)??null},{agent:"QA",nextRun:((Ce=C==null?void 0:C.qa)==null?void 0:Ce.nextRun)??null},{agent:"Auditor",nextRun:((Z=C==null?void 0:C.audit)==null?void 0:Z.nextRun)??null},{agent:"Planner",nextRun:((U=C==null?void 0:C.planner)==null?void 0:U.nextRun)??null}];let pe=null;for(const K of se)K.nextRun&&(!pe||new Date(K.nextRun)<new Date(pe.nextRun))&&(pe=K);return pe?{agent:pe.agent,time:P(pe.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(De,{className:"p-5",onClick:()=>r("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Board Ready"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:B})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(js,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(De,{className:"p-5",onClick:()=>r("/board"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"In Progress"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:S})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Bh,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(De,{className:"p-5",onClick:()=>r("/prs"),children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Open PRs"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:Y})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Xi,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${V>0?"text-red-400 font-medium":"text-slate-500"}`,children:V>0?`${V} need work`:"All passing"})]}),s.jsxs(De,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:C!=null&&C.paused?"Paused":A.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${C!=null&&C.paused?"bg-amber-500/10 text-amber-400":A.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(qc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:C!=null&&C.paused?"All schedules paused":A.crontab.installed?`${A.crontab.entries.length} entr${A.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(De,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>r("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(my,{processes:A.processes,activePrd:A.activePrd,onCancelProcess:ee,onForceClear:ue,onViewLog:()=>r("/logs"),cancellingProcess:c,clearingLock:u,onTriggerJob:H,triggeringJob:x})]}),ge&&s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:ge.agent}),s.jsx("span",{children:ge.time})]}),s.jsxs("button",{onClick:()=>r("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(ih,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-200",children:"GitHub Board"}),s.jsxs("button",{onClick:()=>r("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(ih,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(De,{className:"p-4",children:q?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):z?s.jsx("div",{className:"flex flex-wrap gap-3",children:na.map(se=>{var Ce;const pe=((Ce=z.columns[se])==null?void 0:Ce.length)??0;return s.jsxs("button",{onClick:()=>r("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${hy[se]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:se}),s.jsx("span",{className:"text-xs font-bold",children:pe})]},se)})}):s.jsxs("p",{className:"text-sm text-slate-500 italic",children:["Board not configured — run ",s.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."]})})]})]})},py=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}}],vy=()=>{const[r,c]=T.useState(!0),[d,u]=T.useState(""),[m,x]=T.useState("executor"),f=T.useRef(null),{selectedProjectId:v,globalModeLoading:g}=vt(),p=vt(B=>B.status),{data:y,loading:b,error:C,refetch:z}=It(()=>Bb(m,500),[m,v],{enabled:!g}),q=(y==null?void 0:y.lines)||[];T.useEffect(()=>{r&&f.current&&(f.current.scrollTop=f.current.scrollHeight)},[q,r]),T.useEffect(()=>{if(!r)return;const B=window.setInterval(()=>{z()},3e3);return()=>window.clearInterval(B)},[r,m,z]);const A=q.filter(B=>B.toLowerCase().includes(d.toLowerCase())),Y=B=>{x(B),u("")},V=B=>{if(!(p!=null&&p.processes))return!1;const S=p.processes.find(ee=>ee.name===B);return(S==null?void 0:S.running)??!1};return C?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Al,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load logs"}),s.jsx("div",{className:"text-sm text-slate-500",children:C.message}),s.jsx(Ye,{onClick:()=>z(),children:"Retry"})]}):s.jsxs("div",{className:"flex flex-col h-[calc(100vh-8rem)]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 bg-slate-900 p-2 rounded-lg border border-slate-800 shadow-sm",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("div",{className:"relative group",children:[s.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:B=>u(B.target.value)}),s.jsx(Ji,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),s.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),s.jsx("div",{className:"flex space-x-1",children:py.map(({processName:B,label:S})=>s.jsx("button",{onClick:()=>Y(B),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m===B?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:S}),V(B)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},B))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Ye,{size:"sm",variant:"ghost",onClick:()=>z(),children:[s.jsx(uh,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Ye,{size:"sm",variant:"ghost",onClick:()=>c(!r),children:[r?s.jsx(Vh,{className:"h-4 w-4 mr-2"}):s.jsx(mn,{className:"h-4 w-4 mr-2"}),r?"Pause":"Resume"]})]})]}),s.jsxs("div",{className:"flex-1 bg-slate-900 rounded-xl overflow-hidden shadow-inner border border-slate-800 flex flex-col relative",children:[s.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:[s.jsxs("span",{children:["File: ",m,".log"]}),s.jsxs("span",{children:[A.length," lines"]})]}),s.jsxs("div",{ref:f,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[b?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):A.length===0?s.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((B,S)=>{const ee=B.includes("[ERROR]"),ue=B.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ee?"text-red-400":ue?"text-amber-400":"text-slate-300"}`,children:[s.jsx("span",{className:"text-slate-600 select-none w-10 inline-block text-right mr-4 text-xs opacity-50",children:S+1}),B]},S)}),r&&s.jsx("div",{className:"h-4"})," "]}),!r&&s.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:()=>c(!0),children:[s.jsx(uh,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},gy=()=>{const[r,c]=T.useState(null),[d,u]=T.useState(!1),[m,x]=T.useState("all"),[f,v]=T.useState("number"),[g,p]=T.useState("desc"),{addToast:y,selectedProjectId:b,globalModeLoading:C}=vt(),{data:z,loading:q,error:A,refetch:Y}=It($h,[b],{enabled:!C}),V=z??[],B=J=>{switch(J){case"pass":return s.jsx(js,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx($g,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Gh,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Al,{className:"h-4 w-4 text-slate-500"})}},S=J=>{switch(J){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"}},ee=J=>J===null?"No review decision yet":J===100?"PR has been approved":J===0?"Changes have been requested":`Review score: ${J}`,ue=T.useMemo(()=>V.filter(J=>{switch(m){case"needs-work":return J.ciStatus==="fail"||J.reviewScore===0;case"pending":return J.ciStatus==="pending"||J.ciStatus==="unknown"||J.reviewScore===null;case"passed":return J.ciStatus==="pass"&&J.reviewScore===100;case"all":default:return!0}}),[V,m]),H=T.useMemo(()=>[...ue].sort((ze,se)=>{let pe=0;switch(f){case"number":pe=ze.number-se.number;break;case"title":pe=ze.title.localeCompare(se.title);break;case"branch":pe=ze.branch.localeCompare(se.branch);break;case"ciStatus":{const Ce={fail:0,pending:1,unknown:2,pass:3};pe=(Ce[ze.ciStatus]??2)-(Ce[se.ciStatus]??2);break}case"reviewScore":{const Ce=ze.reviewScore??-1,Z=se.reviewScore??-1;pe=Ce-Z;break}}return g==="asc"?pe:-pe}),[ue,f,g]),P=J=>{f===J?p(g==="asc"?"desc":"asc"):(v(J),p("desc"))},ie=J=>f!==J?s.jsx(Tg,{className:"h-3 w-3 text-slate-600"}):g==="asc"?s.jsx(Rg,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Ng,{className:"h-3 w-3 text-indigo-400"});if(q)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(A)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Al,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load PRs"}),s.jsx("div",{className:"text-sm text-slate-500",children:A.message}),s.jsx(Ye,{onClick:()=>Y(),children:"Retry"})]});const ge=async()=>{u(!0);try{const J=await kc();y({title:"Reviewer Started",message:J.pid?`Started with PID ${J.pid}`:"Reviewer started",type:"success"})}catch(J){y({title:"Reviewer Failed",message:J instanceof Error?J.message:"Failed to start reviewer",type:"error"})}finally{u(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>x("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"}),s.jsx("button",{onClick:()=>x("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"}),s.jsx("button",{onClick:()=>x("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"}),s.jsx("button",{onClick:()=>x("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"})]}),s.jsxs(Ye,{size:"sm",onClick:ge,disabled:d,children:[s.jsx(Ji,{className:"h-4 w-4 mr-2"}),d?"Starting...":"Run Reviewer Now"]})]}),s.jsx("div",{className:"bg-slate-900 rounded-lg shadow-sm border border-slate-800 overflow-hidden",children:s.jsxs("table",{className:"min-w-full divide-y divide-slate-800",children:[s.jsx("thead",{className:"bg-slate-950/50",children:s.jsxs("tr",{children:[s.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:()=>P("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),ie("number")]})}),s.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:()=>P("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),ie("branch")]})}),s.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:()=>P("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),ie("ciStatus")]})}),s.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:()=>P("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),ie("reviewScore")]})}),s.jsx("th",{className:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase tracking-wider",children:"Actions"})]})}),s.jsxs("tbody",{className:"divide-y divide-slate-800",children:[H.map(J=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>c(r===J.number?null:J.number),children:[s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center",children:[s.jsxs("span",{className:"text-slate-500 font-mono mr-2",children:["#",J.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:J.title})]})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"px-2 py-1 bg-slate-800 text-slate-400 border border-slate-700 rounded text-xs font-mono",children:J.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:S(J.ciStatus),children:[B(J.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:J.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:J.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:ee(J.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${J.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${J.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${J.reviewScore>=70?"text-green-500":"text-red-500"}`,children:J.reviewScore})]}):s.jsx("span",{className:"text-slate-600 text-sm",title:"No review decision yet",children:"—"})}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("a",{href:J.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ze=>ze.stopPropagation(),children:s.jsx(Yh,{className:"h-4 w-4"})})})]},J.number)),H.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:V.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),r&&s.jsx(De,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const J=V.find(ze=>ze.number===r);return J?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:J.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:J.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:S(J.ciStatus),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"CI Status"}),s.jsxs("div",{className:"flex items-center space-x-1 mt-1",children:[B(J.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:J.ciStatus})]})]}),J.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:ee(J.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${J.reviewScore>=70?"text-green-500":"text-red-500"}`,children:J.reviewScore})]})]})]}):null})()})]})},Ht=ve.forwardRef(({className:r="",label:c,checked:d,onChange:u,...m},x)=>{const f=v=>{u&&u(v.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${r}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:x,checked:d,onChange:f,...m}),s.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"})]}),c&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:c})]})});Ht.displayName="Switch";const by=()=>{const{addToast:r,selectedProjectId:c,globalModeLoading:d}=vt(),[u,m]=T.useState(!1),[x,f]=T.useState(!1),{data:v,loading:g,error:p,refetch:y}=It(Kb,[c],{enabled:!d});T.useEffect(()=>{if(!(v!=null&&v.enabled))return;const B=setInterval(()=>{y()},1e4);return()=>clearInterval(B)},[v==null?void 0:v.enabled,y]);const b=async B=>{f(!0);try{await l0(B),r({title:B?"Scanner Enabled":"Scanner Disabled",message:B?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:B?"success":"info"}),y()}catch(S){r({title:"Toggle Failed",message:S instanceof Error?S.message:"Failed to toggle scanner",type:"error"})}finally{f(!1)}},C=async()=>{m(!0);try{const B=await Jb();B.created.length>0?r({title:"Scan Complete",message:`Created ${B.created.length} PRD(s): ${B.created.join(", ")}`,type:"success"}):r({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),B.errors.length>0&&r({title:"Scan Errors",message:B.errors.join("; "),type:"warning"}),y()}catch(B){r({title:"Scan Failed",message:B instanceof Error?B.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(g)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Al,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:p.message}),s.jsx(Ye,{onClick:()=>y(),children:"Retry"})]});if(!v)return null;if(v.status==="no-roadmap")return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"})}),s.jsx(De,{className:"p-12",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[s.jsx("div",{className:"p-4 bg-slate-800 rounded-full",children:s.jsx(Qh,{className:"h-10 w-10 text-slate-500"})}),s.jsx("h2",{className:"text-xl font-semibold text-slate-200",children:"No ROADMAP.md Found"}),s.jsxs("p",{className:"text-slate-400 max-w-md",children:["Create a ",s.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 (",s.jsx("code",{className:"text-slate-300 text-sm",children:"- [ ] Feature"}),") or heading-based items (",s.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,q=jy(v.status),A=Sy(v.items),Y=v.lastScan?Ny(v.lastScan):"Never",V=v.autoScanInterval?Math.round(v.autoScanInterval/60):5;return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Roadmap Scanner"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Ht,{label:v.enabled?"Enabled":"Disabled",checked:v.enabled,onChange:b,disabled:x}),s.jsxs(Ye,{onClick:C,loading:u,disabled:!v.enabled||v.status==="complete",children:[s.jsx(mn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(De,{className:`p-6 border-2 ${q.borderColor}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(q.icon,{className:`h-8 w-8 ${q.textColor}`}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Scanner Status"}),s.jsx("div",{className:`text-2xl font-bold ${q.textColor}`,children:q.label})]})]}),s.jsxs("div",{className:"text-right text-sm text-slate-400 space-y-1",children:[s.jsxs("div",{children:["Last scan: ",s.jsx("span",{className:"text-slate-300",children:Y})]}),v.enabled&&v.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",V," min"]})]}),v.enabled&&v.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(De,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-sm text-slate-400",children:[v.processedItems," / ",v.totalItems," items (",z,"%)"]})]}),s.jsx("div",{className:"w-full h-3 bg-slate-800 rounded-full overflow-hidden",children:s.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(([B,S])=>s.jsxs(De,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:B}),s.jsx("div",{className:"space-y-2",children:S.map(ee=>s.jsx(yy,{item:ee},ee.hash))})]},B))]})};function yy({item:r}){const c=r.checked,d=r.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${c?"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:[s.jsxs("div",{className:"flex items-center space-x-3 min-w-0 flex-1",children:[c?s.jsx(mb,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(js,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Ec,{className:"h-4 w-4 text-slate-500 flex-shrink-0"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:`text-sm font-medium truncate ${c?"line-through text-slate-600":"text-slate-200"}`,children:r.title}),r.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:r.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:c?s.jsx(fn,{variant:"neutral",children:"Skipped"}):d?s.jsx(fn,{variant:"success",children:r.prdFile||"Processed"}):s.jsx(fn,{variant:"warning",children:"Pending"})})]})}function jy(r){switch(r){case"complete":return{label:"Complete",icon:js,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Xi,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:mn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Al,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Al,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function Sy(r){const c={};for(const d of r){const u=d.section||"General";c[u]||(c[u]=[]),c[u].push(d)}return c}function Ny(r){try{const c=new Date(r),u=new Date().getTime()-c.getTime(),m=Math.floor(u/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const x=Math.floor(m/60);return x<24?`${x} hr ago`:`${Math.floor(x/24)} day(s) ago`}catch{return"Unknown"}}const n0=({tabs:r,activeTab:c,onChange:d,className:u=""})=>{var g,p;const[m,x]=ve.useState((g=r[0])==null?void 0:g.id),f=c||m,v=y=>{d?d(y):x(y)};return s.jsxs("div",{className:`flex flex-col ${u}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:r.map(y=>s.jsx("button",{onClick:()=>v(y.id),className:`
|
|
350
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
351
|
+
${f===y.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
352
|
+
`,children:y.label},y.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=r.find(y=>y.id===f))==null?void 0:p.content})]})},Zi=[{label:"Balanced (recommended)",value:"5 */2 * * *",description:"Every 2 hours at minute 5"},{label:"Every 6 hours (very safe)",value:"10 */6 * * *",description:"Every 6 hours at minute 10"},{label:"Every 4 hours",value:"10 */4 * * *",description:"Every 4 hours at minute 10"},{label:"Twice daily",value:"20 2,14 * * *",description:"At 02:20 and 14:20 UTC"},{label:"Daily",value:"30 3 * * *",description:"Once per day at 03:30 UTC"},{label:"Weekdays only",value:"30 9 * * 1-5",description:"At 09:30 UTC, Monday to Friday"},{label:"Weekly (Monday)",value:"40 3 * * 1",description:"At 03:40 UTC every Monday"},{label:"Custom",value:"__custom__",description:"Enter your own cron expression"}],Yc=[{id:"night-surge",label:"Night Surge",description:"Dense overnight execution every 2h with daytime reviews.",schedules:{executor:"5 20,22,0,2,4,6 * * *",reviewer:"25 8,14,20 * * *",qa:"45 22,10 * * *",audit:"50 4 * * 1",slicer:"35 19,7 * * *"},hints:{executor:"8pm–6am every 2h (6 runs)",reviewer:"8:25am, 2:25pm, 8:25pm",qa:"10:45pm & 10:45am",audit:"Mon 4:50am",slicer:"7:35pm & 7:35am"}},{id:"always-on",label:"Always On (Recommended)",description:"24/7 with maximum cadence — executor every hour, reviewer every 3h.",schedules:{executor:"5 * * * *",reviewer:"25 */3 * * *",qa:"45 2,10,18 * * *",audit:"50 3 * * 1",slicer:"35 */6 * * *"},hints:{executor:"Every hour at :05",reviewer:"Every 3h at :25",qa:"2:45am, 10:45am & 6:45pm",audit:"Mon 3:50am",slicer:"Every 6h at :35"}},{id:"day-shift",label:"Day Shift",description:"Weekday daytime — hourly executor 8am–8pm, reviews 4x/day.",schedules:{executor:"5 8-20 * * 1-5",reviewer:"25 9,13,17,19 * * 1-5",qa:"45 10,14,18 * * 1-5",audit:"50 9 * * 1",slicer:"35 7 * * 1"},hints:{executor:"Hourly at :05, 8am–8pm weekdays",reviewer:"9:25am, 1:25pm, 5:25pm, 7:25pm",qa:"10:45am, 2:45pm & 6:45pm weekdays",audit:"Mon 9:50am",slicer:"Mon 7:35am"}},{id:"minimal",label:"Minimal",description:"Twice-daily executor and reviewer with weekly heavy jobs.",schedules:{executor:"5 2,14 * * *",reviewer:"25 8,20 * * *",qa:"45 3 * * 0",audit:"50 4 * * 0",slicer:"35 1 * * 1"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am"}}];function hn(r){return r?r.trim().replace(/\s+/g," "):""}function on(r,c){return hn(r)===hn(c)}function Ey(r){if(r)return Yc.find(c=>c.id===r)}function s0(r,c,d,u,m,x){return on(r.schedules.executor,c)&&on(r.schedules.reviewer,d)&&on(r.schedules.qa,u)&&on(r.schedules.audit,m)&&on(r.schedules.slicer,x)}function wy(r,c,d,u,m){return Yc.find(x=>s0(x,r,c,d,u,m))}function ps(r,c,d,u,m,x){const f=Ey(r);return f&&s0(f,c,d,u,m,x)?f:wy(c,d,u,m,x)}function hh(r){const c=hn(r),d=c.split(/\s+/);if(d.length!==5)return c;const[u,m,x,f,v]=d,g=/^\d+$/.test(u),p=Zi.find(y=>hn(y.value)===c);if(p)return p.label;if(u==="*/30"&&m==="*")return"Every 30 minutes";if(u==="0"&&m==="*")return"Every hour";if(u.startsWith("*/"))return`Every ${parseInt(u.replace("*/",""),10)} minutes`;if(g&&m.startsWith("*/")&&x==="*"&&f==="*"&&v==="*"){const y=parseInt(m.replace("*/",""),10);return u==="0"?`Every ${y} hours`:`Every ${y} hours at :${u.padStart(2,"0")}`}if(u==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(u==="0"&&m.includes("-")){const[y,b]=m.split("-");return`Every hour from ${hs(y)} to ${hs(b)}`}if(g&&m.includes("-")&&x==="*"&&f==="*"&&v==="*"){const[y,b]=m.split("-");return`Every hour from ${xs(y,u)} to ${xs(b,u)}`}if(u==="0"&&m.includes(",")){const y=m.split(",").map(hs);return y.length<=3?`At ${y.join(" and ")}`:`At ${y.slice(0,-1).join(", ")}, and ${y[y.length-1]}`}if(g&&m.includes(",")&&x==="*"&&f==="*"&&(v==="*"||v==="1-5")){const y=m.split(",").map(C=>xs(C,u)),b=v==="1-5"?"Weekdays at ":"At ";return y.length<=3?`${b}${y.join(" and ")}`:`${b}${y.slice(0,-1).join(", ")}, and ${y[y.length-1]}`}return u==="0"&&m!=="*"&&x==="*"&&f==="*"&&v==="*"?`Daily at ${hs(m)}`:g&&m!=="*"&&x==="*"&&f==="*"&&v==="*"?`Daily at ${xs(m,u)}`:u==="0"&&m!=="*"&&x==="*"&&f==="*"&&v==="1-5"?`Weekdays at ${hs(m)}`:g&&m!=="*"&&x==="*"&&f==="*"&&v==="1-5"?`Weekdays at ${xs(m,u)}`:c}function hs(r){const c=parseInt(r,10);return c===0?"12 AM":c<12?`${c} AM`:c===12?"12 PM":`${c-12} PM`}function xs(r,c){const d=c.padStart(2,"0"),u=parseInt(r,10);return Number.isNaN(u)?`${r}:${d}`:u===0?`12:${d} AM`:u<12?`${u}:${d} AM`:u===12?`12:${d} PM`:`${u-12}:${d} PM`}function Ty(r){const c=hn(r),d=Zi.find(u=>hn(u.value)===c);return(d==null?void 0:d.value)??"__custom__"}function Cy(r){const c=new Date,d=r.getTime()-c.getTime(),u=Math.floor(d/6e4),m=Math.floor(u/60),x=Math.floor(m/24);return u<1?"less than a minute":u<60?`in ${u} minute${u>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${x} day${x>1?"s":""}`}function Ry(r){const c={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return r.toLocaleDateString("en-US",c)}function Ay(r){const c=new Date,d=r.getTime()-c.getTime(),u=Math.floor(d/6e4);return u>=0&&u<30}const Ne=ve.forwardRef(({className:r="",label:c,error:d,helperText:u,rightIcon:m,...x},f)=>{const v=ve.useId(),g=x.id??v,p=d?`${g}-error`:void 0,y=!d&&u?`${g}-help`:void 0,b=[p,y].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[c&&s.jsx("label",{htmlFor:g,className:"block text-sm font-medium text-slate-400 mb-1.5",children:c}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:f,id:g,"aria-describedby":b,"aria-invalid":d?!0:x["aria-invalid"],className:`
|
|
353
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
354
|
+
px-3 py-2 text-sm text-slate-200
|
|
355
|
+
placeholder:text-slate-600
|
|
356
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
357
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
358
|
+
transition-all duration-200
|
|
359
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
360
|
+
${m?"pr-10":""}
|
|
361
|
+
${r}
|
|
362
|
+
`,...x}),m&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:m})]}),d?s.jsx("p",{id:p,className:"mt-1.5 text-xs text-red-400",children:d}):u?s.jsx("p",{id:y,className:"mt-1.5 text-xs text-slate-500",children:u}):null]})});Ne.displayName="Input";const bt=ve.forwardRef(({className:r="",label:c,error:d,helperText:u,options:m,value:x,onChange:f,children:v,...g},p)=>{const y=ve.useId(),b=g.id??y,C=d?`${b}-error`:void 0,z=!d&&u?`${b}-help`:void 0,q=[C,z].filter(Boolean).join(" ")||void 0,A=Y=>{f&&f(Y.target.value)};return s.jsxs("div",{className:"w-full",children:[c&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:c}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:p,id:b,"aria-describedby":q,"aria-invalid":d?!0:g["aria-invalid"],className:`
|
|
363
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
364
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
365
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
366
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
367
|
+
transition-all duration-200
|
|
368
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
369
|
+
${r}
|
|
370
|
+
`,value:x,onChange:A,...g,children:m?m.map(Y=>s.jsx("option",{value:Y.value,children:Y.label},Y.value)):v}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(kh,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:C,className:"mt-1.5 text-xs text-red-400",children:d}):u?s.jsx("p",{id:z,className:"mt-1.5 text-xs text-slate-500",children:u}):null]})});bt.displayName="Select";const dn=({label:r,value:c,onChange:d,helperText:u,placeholder:m="5 */3 * * *"})=>{const x=Ty(c),f=x==="__custom__",v=y=>{y!=="__custom__"&&d(y)},g=y=>{d(y.target.value)},p=Zi.find(y=>y.value===x);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(bt,{label:r,value:x,onChange:v,options:Zi.map(y=>({label:y.label,value:y.value})),helperText:f?void 0:(p==null?void 0:p.description)||u}),f&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Ne,{label:"Cron Expression",value:c,onChange:g,placeholder:m}),s.jsxs("div",{className:"text-xs text-slate-500 bg-slate-900/40 p-3 rounded-md border border-slate-800/60",children:[s.jsx("strong",{className:"text-slate-400",children:"Format:"})," minute hour day month weekday",s.jsx("br",{}),s.jsx("strong",{className:"text-slate-400",children:"Examples:"})," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 * * * *"})," (hourly),"," ",s.jsx("code",{className:"bg-slate-950 px-1 py-0.5 rounded text-indigo-300",children:"0 0 * * *"})," (daily at midnight)"]})]})]})},i0=({form:r,scheduleMode:c,selectedTemplateId:d,onFieldChange:u,onSwitchToTemplate:m,onSwitchToCustom:x,onApplyTemplate:f})=>s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${c==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:m,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${c==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:x,children:"Custom"})]})]}),c==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Yc.map(v=>{const g=d===v.id;return s.jsxs("button",{type:"button",onClick:()=>f(v),className:`text-left p-4 rounded-lg border transition-colors ${g?"border-indigo-500 bg-indigo-950/40":"border-slate-700 bg-slate-800/30 hover:border-slate-600"}`,children:[s.jsx("div",{className:"font-medium text-slate-200 mb-1",children:v.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:v.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",v.hints.executor],["Reviewer",v.hints.reviewer],["QA",v.hints.qa],["Audit",v.hints.audit],["Slicer",v.hints.slicer]].map(([p,y])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:p}),s.jsx("span",{className:"text-xs text-slate-400",children:y})]},p))})]},v.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(dn,{label:"PRD Execution Schedule",value:r.cronSchedule,onChange:v=>u("cronSchedule",v)}),s.jsx(dn,{label:"PR Review Schedule",value:r.reviewerSchedule,onChange:v=>u("reviewerSchedule",v)}),s.jsx(dn,{label:"QA Schedule",value:r.qa.schedule,onChange:v=>u("qa",{...r.qa,schedule:v})}),s.jsx(dn,{label:"Audit Schedule",value:r.audit.schedule,onChange:v=>u("audit",{...r.audit,schedule:v})}),r.roadmapScanner.enabled&&s.jsx(dn,{label:"Planner Schedule",value:r.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:v=>u("roadmapScanner",{...r.roadmapScanner,slicerSchedule:v})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(bt,{label:"Scheduling Priority",value:String(r.schedulingPriority),onChange:v=>u("schedulingPriority",Number(v)),options:[{label:"1 - Lowest",value:"1"},{label:"2 - Low",value:"2"},{label:"3 - Balanced",value:"3"},{label:"4 - High",value:"4"},{label:"5 - Highest",value:"5"}],helperText:"Higher-priority projects get earlier balanced start slots and win queue tie-breakers first."}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/50 p-4",children:s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Global Queue"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Queue overlapping jobs across projects instead of letting them burst the provider API."})]}),s.jsx(Ht,{checked:r.globalQueueEnabled??!0,onChange:v=>u("globalQueueEnabled",v)})]})}),s.jsx(Ne,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(r.cronScheduleOffset),onChange:v=>{const g=Math.min(59,Math.max(0,Number(v.target.value||0)));u("cronScheduleOffset",g)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]}),My=()=>{var ce,me,Ee,lt,Qe,el,il,rl,Ml,w,F,de,He;const{addToast:r,selectedProjectId:c,globalModeLoading:d}=vt(),[u,m]=T.useState("overview"),[x,f]=T.useState(!1),[v,g]=T.useState(!1),[p,y]=T.useState(null),[b,C]=T.useState(null),[z,q]=T.useState({form:{cronSchedule:"5 */3 * * *",reviewerSchedule:"25 */6 * * *",qa:{schedule:"45 2,14 * * *",enabled:!0},audit:{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{slicerSchedule:"35 */12 * * *",enabled:!0},scheduleBundleId:null,schedulingPriority:3,cronScheduleOffset:0,globalQueueEnabled:!0},scheduleMode:"template",selectedTemplateId:"always-on",isDirty:!1}),{data:A,loading:Y,error:V,refetch:B}=It(Jh,[c],{enabled:!d}),{data:S,loading:ee,refetch:ue}=It(Kh,[c],{enabled:!d});T.useEffect(()=>{const X=setInterval(()=>{B()},3e4);return()=>clearInterval(X)},[B]),T.useEffect(()=>{var X,le,Oe,Je,ot,yt;if(S&&!z.isDirty){const _l=ps(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((X=S.qa)==null?void 0:X.schedule)||"45 2,14 * * *",((le=S.audit)==null?void 0:le.schedule)||"50 3 * * 1",((Oe=S.roadmapScanner)==null?void 0:Oe.slicerSchedule)||"35 */12 * * *");q({form:{cronSchedule:S.cronSchedule||"5 */3 * * *",reviewerSchedule:S.reviewerSchedule||"25 */6 * * *",qa:S.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:S.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((Je=S.roadmapScanner)==null?void 0:Je.enabled)??!0,slicerSchedule:((ot=S.roadmapScanner)==null?void 0:ot.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:S.scheduleBundleId??null,schedulingPriority:S.schedulingPriority??3,cronScheduleOffset:S.cronScheduleOffset??0,globalQueueEnabled:((yt=S.queue)==null?void 0:yt.enabled)??!0},scheduleMode:_l?"template":"custom",selectedTemplateId:(_l==null?void 0:_l.id)??"",isDirty:!1})}},[S,z.isDirty]);const H=()=>{ue(),B()},P=(X,le)=>X instanceof Error?X.message:le,ie=async()=>{if(A){f(!0);try{A.paused?(await vs(),r({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Gb(),r({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),H()}catch(X){r({title:"Action Failed",message:P(X,"Failed to toggle schedule state"),type:"error"})}finally{f(!1)}}},ge=async(X,le)=>{if(S){y(X);try{X==="executor"?await aa({executorEnabled:le}):X==="reviewer"?await aa({reviewerEnabled:le}):X==="qa"?await aa({qa:{...S.qa,enabled:le}}):X==="audit"?await aa({audit:{...S.audit,enabled:le}}):await aa({roadmapScanner:{...S.roadmapScanner,enabled:le}});let Oe="";try{await vs()}catch(Je){Oe=P(Je,"Failed to reinstall cron schedules")}H(),r(Oe?{title:"Job Saved (Cron Reinstall Failed)",message:Oe,type:"warning"}:{title:"Job Updated",message:`${X[0].toUpperCase()+X.slice(1)} ${le?"enabled":"disabled"}.`,type:"success"})}catch(Oe){r({title:"Update Failed",message:P(Oe,"Failed to update job configuration"),type:"error"})}finally{y(null)}}},J=async X=>{C(X);try{await{executor:Fh,reviewer:kc,qa:Ph,audit:Wh,planner:Ih}[X](),r({title:"Job Triggered",message:`${X[0].toUpperCase()+X.slice(1)} job has been queued.`,type:"success"}),B()}catch(le){r({title:"Trigger Failed",message:P(le,`Failed to trigger ${X} job`),type:"error"})}finally{C(null)}},ze=(X,le)=>{q(Oe=>({...Oe,form:{...Oe.form,[X]:le},isDirty:!0}))},se=()=>{if(!z.form)return;const X=ps(z.form.scheduleBundleId,z.form.cronSchedule,z.form.reviewerSchedule,z.form.qa.schedule,z.form.audit.schedule,z.form.roadmapScanner.slicerSchedule||"35 */12 * * *");q(le=>({...le,scheduleMode:"template",selectedTemplateId:(X==null?void 0:X.id)??"always-on",form:{...le.form,scheduleBundleId:(X==null?void 0:X.id)??null},isDirty:!0}))},pe=()=>{q(X=>({...X,scheduleMode:"custom",selectedTemplateId:"",form:{...X.form,scheduleBundleId:null},isDirty:!0}))},Ce=X=>{q(le=>({...le,selectedTemplateId:X.id,scheduleMode:"template",form:{...le.form,cronSchedule:X.schedules.executor,reviewerSchedule:X.schedules.reviewer,scheduleBundleId:X.id,qa:{...le.form.qa,schedule:X.schedules.qa},audit:{...le.form.audit,schedule:X.schedules.audit},roadmapScanner:{...le.form.roadmapScanner,slicerSchedule:X.schedules.slicer}},isDirty:!0}))},Z=async()=>{if(S){g(!0);try{await aa({cronSchedule:z.form.cronSchedule,reviewerSchedule:z.form.reviewerSchedule,scheduleBundleId:z.scheduleMode==="template"?z.form.scheduleBundleId:null,cronScheduleOffset:z.form.cronScheduleOffset,schedulingPriority:z.form.schedulingPriority,qa:{...S.qa,schedule:z.form.qa.schedule},audit:{...S.audit,schedule:z.form.audit.schedule},roadmapScanner:{...S.roadmapScanner,slicerSchedule:z.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...S.queue,enabled:z.form.globalQueueEnabled??!0},executorEnabled:S.executorEnabled,reviewerEnabled:S.reviewerEnabled});let X="";try{await vs()}catch(le){X=P(le,"Failed to reinstall cron schedules")}q(le=>({...le,isDirty:!1})),H(),r(X?{title:"Schedules Saved (Cron Reinstall Failed)",message:X,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(X){r({title:"Save Failed",message:P(X,"Failed to save schedules"),type:"error"})}finally{g(!1)}}},U=X=>{if(!X)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const le=new Date(X),Oe=Ay(le);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Oe&&s.jsxs("span",{className:"relative flex h-3 w-3",children:[s.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"}),s.jsx("span",{className:"relative inline-flex rounded-full h-3 w-3 bg-green-500"})]}),s.jsxs("div",{className:"text-sm",children:[s.jsx("span",{className:"text-slate-200 font-medium",children:Cy(le)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",Ry(le),")"]})]})]})},K=X=>{if(!X||X.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const le=[];return X.balancedDelayMinutes>0&&le.push(`auto +${X.balancedDelayMinutes}m`),X.manualDelayMinutes>0&&le.push(`manual +${X.manualDelayMinutes}m`),s.jsxs("div",{className:"text-xs text-slate-500 mt-2",children:["Delayed after cron fire:",s.jsxs("span",{className:"text-slate-300",children:[" ",le.join(" - ")]})]})};if(Y||ee)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading scheduling information..."})});if(V||!A||!S)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Al,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load schedule information"}),s.jsx("div",{className:"text-sm text-slate-500",children:(V==null?void 0:V.message)||"Unknown error"}),s.jsx(Ye,{onClick:()=>{B(),ue()},children:"Retry"})]});const ae=A.paused,Te=ae?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Me=ae?"Paused":"Active",N=ps(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((ce=S.qa)==null?void 0:ce.schedule)||"45 2,14 * * *",((me=S.audit)==null?void 0:me.schedule)||"50 3 * * 1",((Ee=S.roadmapScanner)==null?void 0:Ee.slicerSchedule)||"35 */12 * * *"),G=(X,le,Oe)=>!N||!on(N.schedules[X],le)?hh(Oe):`${N.label} - ${N.hints[X]}`,$=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Xi,{className:"h-4 w-4"}),enabled:(S==null?void 0:S.executorEnabled)!==!1,schedule:A.executor.schedule,nextRun:A.executor.nextRun,delayInfo:A.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(Ji,{className:"h-4 w-4"}),enabled:(S==null?void 0:S.reviewerEnabled)??!1,schedule:A.reviewer.schedule,nextRun:A.reviewer.nextRun,delayInfo:A.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(Rb,{className:"h-4 w-4"}),enabled:((lt=S==null?void 0:S.qa)==null?void 0:lt.enabled)??!1,schedule:(Qe=A.qa)==null?void 0:Qe.schedule,nextRun:(el=A.qa)==null?void 0:el.nextRun,delayInfo:A.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(ch,{className:"h-4 w-4"}),enabled:((il=S==null?void 0:S.audit)==null?void 0:il.enabled)??!1,schedule:(rl=A.audit)==null?void 0:rl.schedule,nextRun:(Ml=A.audit)==null?void 0:Ml.nextRun,delayInfo:A.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(ch,{className:"h-4 w-4"}),enabled:((w=S==null?void 0:S.roadmapScanner)==null?void 0:w.enabled)??!1,schedule:((F=A.planner)==null?void 0:F.schedule)||((de=S.roadmapScanner)==null?void 0:de.slicerSchedule)||"35 */12 * * *",nextRun:(He=A.planner)==null?void 0:He.nextRun,delayInfo:A.planner}],W=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(De,{className:`p-6 border-2 ${Te}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Xi,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Automation Status"}),s.jsx("div",{className:"text-2xl font-bold",children:Me}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Ye,{variant:ae?"primary":"outline",size:"lg",onClick:ie,loading:x,children:ae?s.jsxs(s.Fragment,{children:[s.jsx(mn,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Vh,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(De,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:$.map(X=>{var le,Oe,Je,ot,yt,Ve;return s.jsxs("div",{className:`p-4 rounded-lg border ${X.enabled?"border-slate-800":"border-slate-800 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[X.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:X.name})]}),s.jsx(Ht,{checked:X.enabled,disabled:p!==null,"aria-label":`Toggle ${X.name.toLowerCase()} automation`,onChange:_l=>ge(X.id,_l)})]}),X.enabled?s.jsxs("div",{className:"space-y-3 mt-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Schedule"}),s.jsx("div",{className:"text-sm text-slate-200 font-medium",children:G(X.id==="planner"?"slicer":X.id,X.id==="qa"?((le=S==null?void 0:S.qa)==null?void 0:le.schedule)||"":X.id==="audit"?((Oe=S==null?void 0:S.audit)==null?void 0:Oe.schedule)||"":X.id==="planner"?((Je=S==null?void 0:S.roadmapScanner)==null?void 0:Je.slicerSchedule)||"35 */12 * * *":X.schedule,X.id==="qa"?((ot=S==null?void 0:S.qa)==null?void 0:ot.schedule)||"":X.id==="audit"?((yt=S==null?void 0:S.audit)==null?void 0:yt.schedule)||"":X.id==="planner"?((Ve=S==null?void 0:S.roadmapScanner)==null?void 0:Ve.slicerSchedule)||"35 */12 * * *":X.schedule)})]}),K(X.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),U(X.nextRun)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${X.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Nc,{className:"h-4 w-4"}),s.jsx("span",{children:X.enabled?"Active":"Disabled"})]}),s.jsxs("button",{disabled:b!==null,onClick:()=>J(X.id),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium text-green-400 bg-green-500/10 hover:bg-green-500/20 border border-green-500/30 hover:border-green-500/50 disabled:opacity-40 disabled:cursor-not-allowed transition-colors",children:[b===X.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(mn,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[X.name," is disabled."]})]},X.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(i0,{form:z.form,scheduleMode:z.scheduleMode,selectedTemplateId:z.selectedTemplateId,onFieldChange:ze,onSwitchToTemplate:se,onSwitchToCustom:pe,onApplyTemplate:Ce}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(Ye,{variant:"ghost",onClick:()=>{var X,le,Oe,Je,ot,yt;if(S){const Ve=ps(S.scheduleBundleId,S.cronSchedule,S.reviewerSchedule,((X=S.qa)==null?void 0:X.schedule)||"45 2,14 * * *",((le=S.audit)==null?void 0:le.schedule)||"50 3 * * 1",((Oe=S.roadmapScanner)==null?void 0:Oe.slicerSchedule)||"35 */12 * * *");q({form:{cronSchedule:S.cronSchedule||"5 */3 * * *",reviewerSchedule:S.reviewerSchedule||"25 */6 * * *",qa:S.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:S.audit||{schedule:"50 3 * * 1",enabled:!0},roadmapScanner:{enabled:((Je=S.roadmapScanner)==null?void 0:Je.enabled)??!0,slicerSchedule:((ot=S.roadmapScanner)==null?void 0:ot.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:S.scheduleBundleId??null,schedulingPriority:S.schedulingPriority??3,cronScheduleOffset:S.cronScheduleOffset??0,globalQueueEnabled:((yt=S.queue)==null?void 0:yt.enabled)??!0},scheduleMode:Ve?"template":"custom",selectedTemplateId:(Ve==null?void 0:Ve.id)??"",isDirty:!1})}},disabled:!z.isDirty,children:"Reset"}),s.jsxs(Ye,{onClick:Z,loading:v,disabled:!z.isDirty,children:[s.jsx(Nc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(De,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(qc,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),A.entries.length===0?s.jsx("div",{className:"text-slate-500 text-sm",children:"No crontab entries found."}):s.jsx("div",{className:"space-y-2",children:A.entries.map((X,le)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:X},le))})]})}];return s.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-100",children:"Scheduling"}),N&&s.jsxs("div",{className:"text-right",children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500",children:"Schedule Bundle"}),s.jsx("div",{className:"text-sm font-medium text-indigo-300",children:N.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",A.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(n0,{tabs:W,activeTab:u,onChange:m})]})},xh=({presetId:r,preset:c,isBuiltIn:d,onEdit:u,onDelete:m,onReset:x})=>{var p,y,b;const f=c.envVars?Object.keys(c.envVars).length:0,g=(r.startsWith("glm-")||((p=c.model)==null?void 0:p.startsWith("glm-")))&&!((b=(y=c.envVars)==null?void 0:y.ANTHROPIC_API_KEY)!=null&&b.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:c.name}),d&&s.jsx(fn,{variant:"info",className:"text-[10px]",children:"Built-in"}),g&&s.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-amber-900/40 text-amber-400 border border-amber-800/50",title:"GLM presets require ANTHROPIC_API_KEY in env vars",children:[s.jsx(Fi,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:u,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${c.name} preset`,title:"Edit preset",children:s.jsx(Hc,{className:"h-4 w-4"})}),d?x&&s.jsx("button",{type:"button",onClick:x,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${c.name} to defaults`,title:"Reset to defaults",children:s.jsx(Xh,{className:"h-4 w-4"})}):m&&s.jsx("button",{type:"button",onClick:m,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${c.name} preset`,title:"Delete preset",children:s.jsx(Lc,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[c.command,c.subcommand&&` ${c.subcommand}`]})]}),c.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(fn,{variant:"neutral",className:"text-[10px] font-mono",children:c.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",r]}),f>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[f," env var",f!==1?"s":""]})]})]})},_y=({isOpen:r,onClose:c,title:d,children:u})=>(T.useEffect(()=>{const m=x=>{x.key==="Escape"&&c()};return r&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[r,c]),r?xg.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:c,"aria-hidden":"true"}),s.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:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:d}),s.jsx("button",{onClick:c,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:s.jsx(gn,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:u})]})]}),document.body):null),Dy=r=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>r.toUpperCase().includes(d)),zy=({value:r,isSensitive:c})=>{const[d,u]=ve.useState(!1);return c?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?r:"***********"}),s.jsx("button",{type:"button",onClick:()=>u(!d),className:"text-slate-500 hover:text-slate-300","aria-label":d?"Hide sensitive value":"Show sensitive value",title:d?"Hide sensitive value":"Show sensitive value",children:d?s.jsx(Wg,{className:"h-4 w-4"}):s.jsx(eb,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:r})},r0=({envVars:r,onChange:c,compact:d=!1})=>{const[u,m]=ve.useState(""),[x,f]=ve.useState(""),[v,g]=ve.useState(null),[p,y]=ve.useState(""),b=()=>{if(u.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(u)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}c({...r,[u]:x}),m(""),f("")}},C=V=>{const B={...r};delete B[V],c(B)},z=V=>{g(V),y(r[V]??"")},q=()=>{v&&(c({...r,[v]:p}),g(null),y(""))},A=()=>{g(null),y("")},Y=Object.entries(r);return s.jsxs("div",{className:"space-y-4",children:[!d&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:Y.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):Y.map(([V,B])=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[s.jsx("span",{className:"text-sm font-mono text-indigo-400 w-48 truncate",children:V}),v===V?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:p,onChange:S=>y(S.target.value),className:"flex-1 bg-slate-800 border border-slate-700 rounded px-2 py-1 text-sm text-slate-200"}),s.jsx("button",{type:"button",onClick:q,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${V} value`,title:`Save ${V} value`,children:s.jsx(Nc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:A,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${V}`,title:`Cancel editing ${V}`,children:s.jsx(gn,{className:"h-4 w-4"})})]}):s.jsx(zy,{value:B,isSensitive:Dy(V)})]}),v!==V&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>z(V),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${V}`,title:`Edit ${V}`,children:s.jsx(Hc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>C(V),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${V}`,title:`Delete ${V}`,children:s.jsx(Lc,{className:"h-4 w-4"})})]})]},V))}),s.jsxs("div",{className:`flex items-end gap-3 ${d?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:u,onChange:V=>m(V.target.value.toUpperCase()),placeholder:d?"ENV_VAR_NAME":"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"})]}),s.jsxs("div",{className:"flex-1",children:[!d&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:x,onChange:V=>f(V.target.value),placeholder:d?"value":"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"})]}),s.jsxs(Ye,{onClick:b,disabled:!u.trim(),size:d?"sm":"md",children:[s.jsx(vn,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function Oy(r,c){var d;return!!(r!=null&&r.startsWith("glm-")||(d=c==null?void 0:c.model)!=null&&d.startsWith("glm-"))}function Uy(r,c){var d,u;return Oy(r,c)?!((u=(d=c==null?void 0:c.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&u.trim()):!1}const ph={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},qy=({isOpen:r,onClose:c,onSave:d,presetId:u,preset:m,isBuiltIn:x,existingIds:f})=>{const[v,g]=ve.useState(""),[p,y]=ve.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[b,C]=ve.useState(!1),[z,q]=ve.useState("custom"),[A,Y]=ve.useState(null),V=Uy(u??v,p);ve.useEffect(()=>{r&&(u&&m?(g(u),y({name:m.name,command:m.command,subcommand:m.subcommand??"",promptFlag:m.promptFlag??"",autoApproveFlag:m.autoApproveFlag??"",workdirFlag:m.workdirFlag??"",modelFlag:m.modelFlag??"",model:m.model??"",envVars:m.envVars??{}}),u==="claude"||m.command==="claude"?q("claude"):u==="codex"||m.command==="codex"?q("codex"):q("custom")):(g(""),y({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),q("custom")),Y(null),C(!!(m!=null&&m.envVars&&Object.keys(m.envVars).length>0)))},[r,u,m]);const B=H=>{if(q(H),H!=="custom"&&ph[H]){const P=ph[H];y(ie=>({...ie,...P,envVars:ie.envVars})),!u&&!v&&g(H)}},S=(H,P)=>{y(ie=>({...ie,[H]:P})),Y(null)},ee=()=>{if(!p.name.trim())return Y("Name is required"),!1;if(!p.command.trim())return Y("Command is required"),!1;if(!u){if(!v.trim())return Y("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(v))return Y("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(f.includes(v))return Y("A preset with this ID already exists"),!1}return!0},ue=()=>{var P,ie,ge,J,ze,se;if(!ee())return;const H={name:p.name.trim(),command:p.command.trim()};(P=p.subcommand)!=null&&P.trim()&&(H.subcommand=p.subcommand.trim()),(ie=p.promptFlag)!=null&&ie.trim()&&(H.promptFlag=p.promptFlag.trim()),(ge=p.autoApproveFlag)!=null&&ge.trim()&&(H.autoApproveFlag=p.autoApproveFlag.trim()),(J=p.workdirFlag)!=null&&J.trim()&&(H.workdirFlag=p.workdirFlag.trim()),(ze=p.modelFlag)!=null&&ze.trim()&&(H.modelFlag=p.modelFlag.trim()),(se=p.model)!=null&&se.trim()&&(H.model=p.model.trim()),p.envVars&&Object.keys(p.envVars).length>0&&(H.envVars=p.envVars),d(u||v,H),c()};return s.jsx(_y,{isOpen:r,onClose:c,title:u?`Edit Preset: ${m==null?void 0:m.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[A&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:A}),V&&s.jsx("div",{className:"p-3 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-300 text-sm",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Fi,{className:"h-4 w-4 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"GLM presets require `ANTHROPIC_API_KEY`."}),s.jsx("div",{className:"text-amber-200/80",children:"Add `ANTHROPIC_API_KEY` in Environment Variables before using this preset."})]})]})}),!x&&s.jsx("div",{children:s.jsx(bt,{label:"Template",value:z,onChange:B,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!u&&s.jsx(Ne,{label:"Preset ID",value:v,onChange:H=>g(H.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ne,{label:"Display Name",value:p.name,onChange:H=>S("name",H.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Ne,{label:"Command",value:p.command,onChange:H=>S("command",H.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ne,{label:"Model",value:p.model??"",onChange:H=>S("model",H.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Ne,{label:"Model Flag",value:p.modelFlag??"",onChange:H=>S("modelFlag",H.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>C(!b),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[b?s.jsx(kg,{className:"h-4 w-4"}):s.jsx(kh,{className:"h-4 w-4"}),"Advanced Options"]}),b&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ne,{label:"Subcommand",value:p.subcommand??"",onChange:H=>S("subcommand",H.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Ne,{label:"Prompt Flag",value:p.promptFlag??"",onChange:H=>S("promptFlag",H.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Ne,{label:"Auto-Approve Flag",value:p.autoApproveFlag??"",onChange:H=>S("autoApproveFlag",H.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Ne,{label:"Workdir Flag",value:p.workdirFlag??"",onChange:H=>S("workdirFlag",H.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(r0,{envVars:p.envVars??{},onChange:H=>S("envVars",H),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Ye,{variant:"ghost",onClick:c,children:"Cancel"}),s.jsx(Ye,{onClick:ue,children:u?"Save Changes":"Add Preset"})]})]})})},Yi=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Hy=["executor","reviewer","qa","audit","slicer","analytics"],bc=r=>{var c,d,u,m,x,f,v;return{provider:r.provider,providerLabel:r.providerLabel??"",providerPresets:r.providerPresets??{},defaultBranch:r.defaultBranch,prdDir:r.prdDir||"docs/prds",branchPrefix:r.branchPrefix,branchPatterns:r.branchPatterns||[],executorEnabled:r.executorEnabled??!0,reviewerEnabled:r.reviewerEnabled,minReviewScore:r.minReviewScore,maxRuntime:r.maxRuntime,reviewerMaxRuntime:r.reviewerMaxRuntime,maxLogSize:r.maxLogSize,cronSchedule:r.cronSchedule||"5 */3 * * *",reviewerSchedule:r.reviewerSchedule||"25 */6 * * *",scheduleBundleId:r.scheduleBundleId??null,cronScheduleOffset:r.cronScheduleOffset??0,schedulingPriority:r.schedulingPriority??3,maxRetries:r.maxRetries??3,reviewerMaxRetries:r.reviewerMaxRetries??2,reviewerRetryDelay:r.reviewerRetryDelay??30,reviewerMaxPrsPerRun:r.reviewerMaxPrsPerRun??0,providerEnv:r.providerEnv||{},notifications:r.notifications||{webhooks:[]},prdPriority:r.prdPriority||[],roadmapScanner:{enabled:((c=r.roadmapScanner)==null?void 0:c.enabled)??!0,roadmapPath:((d=r.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((u=r.roadmapScanner)==null?void 0:u.autoScanInterval)??300,slicerSchedule:((m=r.roadmapScanner)==null?void 0:m.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((x=r.roadmapScanner)==null?void 0:x.slicerMaxRuntime)??600,priorityMode:((f=r.roadmapScanner)==null?void 0:f.priorityMode)??"roadmap-first",issueColumn:((v=r.roadmapScanner)==null?void 0:v.issueColumn)??"Draft"},templatesDir:r.templatesDir||".night-watch/templates",boardProvider:r.boardProvider||{enabled:!0,provider:"github"},jobProviders:r.jobProviders||{},autoMerge:r.autoMerge??!1,autoMergeMethod:r.autoMergeMethod??"squash",fallbackOnRateLimit:r.fallbackOnRateLimit??!0,primaryFallbackModel:r.primaryFallbackModel??r.claudeModel??"sonnet",secondaryFallbackModel:r.secondaryFallbackModel??r.primaryFallbackModel??r.claudeModel??"sonnet",primaryFallbackPreset:r.primaryFallbackPreset??"",secondaryFallbackPreset:r.secondaryFallbackPreset??"",claudeModel:r.primaryFallbackModel??r.claudeModel??"sonnet",qa:r.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:r.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},analytics:r.analytics||{enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},queue:r.queue||{enabled:!0,maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10}}}},vh=r=>{const c=ps(r.scheduleBundleId,r.cronSchedule,r.reviewerSchedule,r.qa.schedule,r.audit.schedule,r.roadmapScanner.slicerSchedule??"35 */12 * * *");return c?{mode:"template",selectedTemplateId:c.id}:{mode:"custom",selectedTemplateId:""}},Ly=({notifications:r,onChange:c})=>{const[d,u]=ve.useState(null),[m,x]=ve.useState(!1),[f,v]=ve.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=()=>{c({webhooks:[...r.webhooks,f]}),v({type:"slack",url:"",events:[]}),x(!1)},y=(q,A)=>{const Y=[...r.webhooks];Y[q]=A,c({webhooks:Y})},b=q=>{c({webhooks:r.webhooks.filter((A,Y)=>Y!==q)})},C=(q,A)=>q.includes(A)?q.filter(Y=>Y!==A):[...q,A],z=({webhook:q,onChange:A,onSave:Y,onCancel:V,isNew:B})=>s.jsxs("div",{className:"p-4 rounded-md border border-slate-700 bg-slate-900/50 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(bt,{label:"Type",value:q.type,onChange:S=>{const ee=S;A(ee==="telegram"?{type:ee,botToken:"",chatId:"",events:q.events}:{type:ee,url:"",events:q.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),q.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(Ne,{label:"Bot Token",type:"password",value:q.botToken||"",onChange:S=>A({...q,botToken:S.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Ne,{label:"Chat ID",value:q.chatId||"",onChange:S=>A({...q,chatId:S.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ne,{label:"Webhook URL",type:"password",value:q.url||"",onChange:S=>A({...q,url:S.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:g.map(S=>s.jsx("button",{type:"button",onClick:()=>A({...q,events:C(q.events,S.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${q.events.includes(S.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:S.label},S.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Ye,{variant:"ghost",onClick:V,children:"Cancel"}),s.jsx(Ye,{onClick:Y,disabled:q.events.length===0||(q.type==="telegram"?!q.botToken||!q.chatId:!q.url),children:B?"Add Webhook":"Save Changes"})]})]});return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:r.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):r.webhooks.map((q,A)=>s.jsx("div",{children:d===A?s.jsx(z,{webhook:q,onChange:Y=>y(A,Y),onSave:()=>u(null),onCancel:()=>u(null)}):s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 capitalize",children:q.type}),q.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",q.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:q.events.map(Y=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:Y.replace("_"," ")},Y))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>u(A),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${q.type} webhook`,title:`Edit ${q.type} webhook`,children:s.jsx(Hc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>b(A),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${q.type} webhook`,title:`Delete ${q.type} webhook`,children:s.jsx(Lc,{className:"h-4 w-4"})})]})]})},A))}),m?s.jsx(z,{webhook:f,onChange:v,onSave:p,onCancel:()=>x(!1),isNew:!0}):s.jsxs(Ye,{variant:"ghost",onClick:()=>x(!0),children:[s.jsx(vn,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},yc=({label:r,value:c,onChange:d,placeholder:u,helpText:m})=>{const[x,f]=ve.useState(""),v=()=>{x.trim()&&!c.includes(x.trim())&&(d([...c,x.trim()]),f(""))},g=y=>{d(c.filter(b=>b!==y))},p=y=>{y.key==="Enter"&&(y.preventDefault(),v())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:r}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:c.map(y=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[y,s.jsx("button",{type:"button",onClick:()=>g(y),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${y}`,title:`Remove ${y}`,children:s.jsx(gn,{className:"h-3 w-3"})})]},y))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:x,onChange:y=>f(y.target.value),onKeyDown:p,placeholder:u,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Ye,{onClick:v,disabled:!x.trim(),"aria-label":`Add ${r.toLowerCase()} value`,children:s.jsx(vn,{className:"h-4 w-4"})})]}),m&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},By=()=>{var rl,Ml;const{addToast:r,projectName:c,selectedProjectId:d,globalModeLoading:u}=vt(),[m,x]=ve.useState(!1),[f,v]=ve.useState(null),g=ve.useRef(!1),p=ve.useRef(!1),[y,b]=ve.useState("template"),[C,z]=ve.useState("always-on"),[q,A]=ve.useState(!1),[Y,V]=ve.useState(null),[B,S]=ve.useState(null),[ee,ue]=ve.useState(null),{data:H,loading:P,error:ie,refetch:ge}=It(Kh,[d],{enabled:!u}),{data:J,loading:ze,refetch:se}=It(kb,[d],{enabled:!u}),pe=J??[],Ce=ve.useCallback(w=>{const F=vh(w);b(F.mode),z(F.selectedTemplateId)},[]);ve.useEffect(()=>{if(H)if(g.current)g.current=!1;else{const w=bc(H);v(w),Ce(w)}},[H,Ce]),ve.useEffect(()=>{f&&p.current&&(p.current=!1,Te())},[f==null?void 0:f.jobProviders]);const Z=(w,F)=>{v(de=>de&&{...de,[w]:F})},U=()=>{if(b("template"),!f)return;const w=vh(f);w.mode==="template"&&(z(w.selectedTemplateId),Z("scheduleBundleId",w.selectedTemplateId))},K=()=>{b("custom"),Z("scheduleBundleId",null),z("")},ae=w=>{z(w.id),v(F=>F&&{...F,cronSchedule:w.schedules.executor,reviewerSchedule:w.schedules.reviewer,scheduleBundleId:w.id,qa:{...F.qa,schedule:w.schedules.qa},audit:{...F.audit,schedule:w.schedules.audit},roadmapScanner:{...F.roadmapScanner,slicerSchedule:w.schedules.slicer},fallbackOnRateLimit:!0})},Te=async()=>{var de,He,X,le,Oe;if(!f)return;const w=f.cronSchedule!==(H==null?void 0:H.cronSchedule)||f.reviewerSchedule!==(H==null?void 0:H.reviewerSchedule)||f.cronScheduleOffset!==((H==null?void 0:H.cronScheduleOffset)??0)||f.schedulingPriority!==((H==null?void 0:H.schedulingPriority)??3)||f.executorEnabled!==((H==null?void 0:H.executorEnabled)??!0)||f.reviewerEnabled!==((H==null?void 0:H.reviewerEnabled)??!0)||f.queue.enabled!==(((de=H==null?void 0:H.queue)==null?void 0:de.enabled)??!0)||f.qa.enabled!==((H==null?void 0:H.qa.enabled)??!0)||f.qa.schedule!==(H==null?void 0:H.qa.schedule)||f.audit.enabled!==((H==null?void 0:H.audit.enabled)??!0)||f.audit.schedule!==(H==null?void 0:H.audit.schedule)||f.analytics.enabled!==(((He=H==null?void 0:H.analytics)==null?void 0:He.enabled)??!1)||f.analytics.schedule!==(((X=H==null?void 0:H.analytics)==null?void 0:X.schedule)??"0 6 * * 1")||f.roadmapScanner.enabled!==(((le=H==null?void 0:H.roadmapScanner)==null?void 0:le.enabled)??!0)||(f.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((Oe=H==null?void 0:H.roadmapScanner)==null?void 0:Oe.slicerSchedule)||"35 */12 * * *"),F={};for(const Je of Hy){const ot=f.jobProviders[Je];typeof ot=="string"&&ot.trim().length>0?F[Je]=ot:H!=null&&H.jobProviders[Je]&&(F[Je]=null)}x(!0);try{const Je=await aa({provider:f.provider,providerLabel:f.providerLabel.trim(),providerPresets:Object.keys(f.providerPresets).length>0?f.providerPresets:void 0,defaultBranch:f.defaultBranch,prdDir:f.prdDir,branchPrefix:f.branchPrefix,branchPatterns:f.branchPatterns,executorEnabled:f.executorEnabled,reviewerEnabled:f.reviewerEnabled,minReviewScore:f.minReviewScore,maxRuntime:f.maxRuntime,reviewerMaxRuntime:f.reviewerMaxRuntime,maxLogSize:f.maxLogSize,cronSchedule:f.cronSchedule,reviewerSchedule:f.reviewerSchedule,scheduleBundleId:y==="template"?f.scheduleBundleId:null,cronScheduleOffset:f.cronScheduleOffset,schedulingPriority:f.schedulingPriority,maxRetries:f.maxRetries,reviewerMaxRetries:f.reviewerMaxRetries,reviewerRetryDelay:f.reviewerRetryDelay,reviewerMaxPrsPerRun:f.reviewerMaxPrsPerRun,providerEnv:f.providerEnv,notifications:f.notifications,prdPriority:f.prdPriority,roadmapScanner:f.roadmapScanner,templatesDir:f.templatesDir,boardProvider:f.boardProvider,jobProviders:F,autoMerge:f.autoMerge,autoMergeMethod:f.autoMergeMethod,fallbackOnRateLimit:f.fallbackOnRateLimit,primaryFallbackModel:f.primaryFallbackModel,secondaryFallbackModel:f.secondaryFallbackModel,primaryFallbackPreset:f.primaryFallbackPreset||void 0,secondaryFallbackPreset:f.secondaryFallbackPreset||void 0,claudeModel:f.primaryFallbackModel,qa:f.qa,audit:f.audit,analytics:f.analytics,queue:f.queue}),ot=bc(Je);v(ot),Ce(ot);let yt="";if(w)try{await vs()}catch(Ve){yt=Ve instanceof Error?Ve.message:"failed to reinstall cron schedules"}r(yt?{title:"Settings Saved (Cron Reinstall Failed)",message:yt,type:"warning"}:{title:"Settings Saved",message:w?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),g.current=!0,ge(),se()}catch(Je){r({title:"Save Failed",message:Je instanceof Error?Je.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},Me=()=>{if(H){const w=bc(H);v(w),Ce(w),r({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},N=async w=>{try{const F=await l0(w);Z("roadmapScanner",F.roadmapScanner);let de="";try{await vs()}catch(He){de=He instanceof Error?He.message:"Failed to reinstall cron schedules"}r(de?{title:"Planner Saved (Cron Reinstall Failed)",message:de,type:"warning"}:{title:w?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${w?"enabled":"disabled"}.`,type:"success"})}catch(F){r({title:"Toggle Failed",message:F instanceof Error?F.message:"Failed to toggle roadmap scanner",type:"error"})}},G=w=>({claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}})[w]??null,$=()=>({...{claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}},...f==null?void 0:f.providerPresets}),W=w=>{const F=$();return Object.entries(F).map(([de,He])=>({label:He.name,value:de}))},ce=(w,F)=>{const de=[];F.provider===w&&de.push("Global Provider");const He={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner"};for(const[X,le]of Object.entries(F.jobProviders))le===w&&de.push(He[X]??X);return de},me=w=>{const de=$()[w];de&&(V(w),S(de),A(!0))},Ee=async(w,F)=>{if(!f)return;const de=!Y,He={...f.providerPresets,[w]:F};Z("providerPresets",He);try{await aa({providerPresets:{[w]:F}}),r({title:de?"Preset Added":"Preset Updated",message:de?`${F.name} has been added. You can now assign it to jobs.`:`${F.name} has been saved.`,type:"success"})}catch(X){r({title:"Save Failed",message:X instanceof Error?X.message:"Failed to save preset",type:"error"}),Z("providerPresets",f.providerPresets)}},lt=w=>{var He,X;if(!f)return;if(Yi.includes(w)){r({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const F=ce(w,f);if(F.length>0){ue({presetId:w,presetName:((He=$()[w])==null?void 0:He.name)??w,references:F});return}const de={...f.providerPresets};delete de[w],Z("providerPresets",de),r({title:"Preset Deleted",message:`${((X=$()[w])==null?void 0:X.name)??w} has been removed.`,type:"success"})},Qe=w=>{if(!f)return;const F={...f.providerPresets};delete F[w],Z("providerPresets",F),r({title:"Preset Reset",message:`${w} has been reset to built-in defaults.`,type:"success"})},el=()=>{if(!ee||!f)return;const{presetId:w}=ee,F={...f.providerPresets};delete F[w],Z("providerPresets",F);const de={...f.jobProviders};for(const He of Object.keys(de))de[He]===w&&delete de[He];Z("jobProviders",de),f.provider===w&&Z("provider","claude"),ue(null),r({title:"Preset Deleted",message:`${ee.presetName} has been removed and all references cleared.`,type:"success"})};if(P||!f)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(ie)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Al,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load settings"}),s.jsx("div",{className:"text-sm text-slate-500",children:ie.message}),s.jsx(Ye,{onClick:()=>ge(),children:"Retry"})]});const il=[{id:"general",label:"General",content:s.jsx(De,{className:"p-6 space-y-6",children:s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Project Configuration"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-4",children:[s.jsx(Ne,{label:"Project Name",value:c,disabled:!0}),s.jsx(Ne,{label:"Default Branch",value:f.defaultBranch,onChange:w=>Z("defaultBranch",w.target.value)}),s.jsx(Ne,{label:"PRD Directory",value:f.prdDir,onChange:w=>Z("prdDir",w.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Ne,{label:"Branch Prefix",value:f.branchPrefix,onChange:w=>Z("branchPrefix",w.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ht,{label:"Enable PRD Executor",checked:f.executorEnabled,onChange:w=>Z("executorEnabled",w)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ht,{label:"Enable Automated Reviews",checked:f.reviewerEnabled,onChange:w=>Z("reviewerEnabled",w)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ht,{label:"Auto-merge approved PRs",checked:f.autoMerge,onChange:w=>Z("autoMerge",w)})}),f.autoMerge&&s.jsx(bt,{label:"Merge Method",value:f.autoMergeMethod,onChange:w=>Z("autoMergeMethod",w),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]})]}),s.jsx("div",{className:"pt-4 mt-4 border-t border-slate-800",children:s.jsx(yc,{label:"Branch Patterns",value:f.branchPatterns,onChange:w=>Z("branchPatterns",w),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})})},{id:"providers",label:"Providers",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Provider Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure AI provider presets with custom commands, models, and environment variables"})]}),s.jsxs(Ye,{onClick:()=>{V(null),S(null),A(!0)},children:[s.jsx(vn,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[Yi.map(w=>{const de=f.providerPresets[w]||G(w);return de?s.jsx(xh,{presetId:w,preset:de,isBuiltIn:!0,onEdit:()=>me(w),onReset:()=>Qe(w)},w):null}),Object.entries(f.providerPresets).filter(([w])=>!Yi.includes(w)).map(([w,F])=>s.jsx(xh,{presetId:w,preset:F,isBuiltIn:!1,onEdit:()=>me(w),onDelete:()=>lt(w)},w))]})]}),s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Assignments"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Assign provider presets to specific job types. Jobs without an assignment use the global provider."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 rounded-md border border-indigo-500/30 bg-indigo-500/5 gap-4",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Default preset for all jobs without a specific assignment"})]}),s.jsx("div",{className:"w-64",children:s.jsx(bt,{value:f.provider,onChange:w=>Z("provider",w),options:W(f.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"}].map(({key:w,label:F})=>s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 gap-4",children:[s.jsx("span",{className:"text-sm font-medium text-slate-200 whitespace-nowrap",children:F}),s.jsx("div",{className:"w-64",children:s.jsx(bt,{value:f.jobProviders[w]??"",onChange:de=>{const He={...f.jobProviders};de===""?delete He[w]:He[w]=de,p.current=!0,Z("jobProviders",He)},options:[{label:"Use Global (default)",value:""},...W(f.providerPresets)]})})]},w))]})]}),s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Rate Limit Fallback"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Preset to use when the active provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(bt,{label:"Primary Fallback Preset",value:f.primaryFallbackPreset,onChange:w=>Z("primaryFallbackPreset",w),options:[{label:"— None —",value:""},...Object.entries($()).map(([w,F])=>({label:F.name,value:w}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(bt,{label:"Secondary Fallback Preset",value:f.secondaryFallbackPreset,onChange:w=>Z("secondaryFallbackPreset",w),options:[{label:"— None —",value:""},...Object.entries($()).map(([w,F])=>({label:F.name,value:w}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(De,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Provider Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Environment variables passed to all provider CLIs. Preset-level env vars take precedence."}),s.jsx(r0,{envVars:f.providerEnv,onChange:w=>Z("providerEnv",w)})]})]})},{id:"runtime",label:"Runtime",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:f.minReviewScore,onChange:w=>Z("minReviewScore",Number(w.target.value)),className:"w-full h-2 bg-slate-800 rounded-lg appearance-none cursor-pointer accent-indigo-500"}),s.jsx("span",{className:"text-sm font-bold text-slate-200 w-10",children:f.minReviewScore})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:'PRs below this score will be marked as "Needs Work".'})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ne,{label:"Max Runtime (Executor)",type:"number",value:String(f.maxRuntime),onChange:w=>Z("maxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ne,{label:"Max Runtime (Reviewer)",type:"number",value:String(f.reviewerMaxRuntime),onChange:w=>Z("reviewerMaxRuntime",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ne,{label:"Max Log Size",type:"number",value:String(f.maxLogSize),onChange:w=>Z("maxLogSize",Number(w.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Retry Settings"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automatic retry behavior for the PR reviewer when fixes do not fully resolve issues."})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ne,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(f.reviewerMaxRetries),onChange:w=>{const F=Math.min(10,Math.max(0,Number(w.target.value||0)));Z("reviewerMaxRetries",F)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(Ne,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(f.reviewerRetryDelay),onChange:w=>{const F=Math.min(300,Math.max(0,Number(w.target.value||0)));Z("reviewerRetryDelay",F)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(Ne,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(f.reviewerMaxPrsPerRun),onChange:w=>{const F=Math.min(100,Math.max(0,Number(w.target.value||0)));Z("reviewerMaxPrsPerRun",F)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]})},{id:"schedules",label:"Schedules",content:s.jsx(i0,{form:{cronSchedule:f.cronSchedule,reviewerSchedule:f.reviewerSchedule,qa:f.qa,audit:f.audit,analytics:f.analytics,roadmapScanner:{enabled:f.roadmapScanner.enabled,slicerSchedule:f.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:f.scheduleBundleId,schedulingPriority:f.schedulingPriority,cronScheduleOffset:f.cronScheduleOffset,globalQueueEnabled:f.queue.enabled},scheduleMode:y,selectedTemplateId:C,onFieldChange:(w,F)=>{w==="globalQueueEnabled"?Z("queue",{...f.queue,enabled:F}):Z(w,F)},onSwitchToTemplate:U,onSwitchToCustom:K,onApplyTemplate:ae})},{id:"notifications",label:"Notifications",content:s.jsxs(De,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Ly,{notifications:f.notifications,onChange:w=>Z("notifications",w)})]})},{id:"roadmap",label:"Planner",content:s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Planner"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Generate one PRD per run using ROADMAP.md first, then audit findings when roadmap work is exhausted"})]}),s.jsx(Ht,{checked:f.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:N})]}),f.roadmapScanner.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ne,{label:"Roadmap File Path",value:f.roadmapScanner.roadmapPath,onChange:w=>Z("roadmapScanner",{...f.roadmapScanner,roadmapPath:w.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(dn,{label:"Planner Schedule",value:f.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:w=>Z("roadmapScanner",{...f.roadmapScanner,slicerSchedule:w})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800",children:[s.jsx("h4",{className:"text-md font-medium text-slate-200 mb-4",children:"Planner Execution"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Planner creates one PRD at a time and can auto-create a board issue for handoff."}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ne,{label:"Planner Max Runtime",type:"number",value:String(f.roadmapScanner.slicerMaxRuntime||""),onChange:w=>Z("roadmapScanner",{...f.roadmapScanner,slicerMaxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(bt,{label:"Planner Priority Mode",value:f.roadmapScanner.priorityMode||"roadmap-first",onChange:w=>Z("roadmapScanner",{...f.roadmapScanner,priorityMode:w==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}],helperText:"Choose whether planner consumes roadmap items or audit findings first."}),s.jsx(bt,{label:"Planner Issue Column",value:f.roadmapScanner.issueColumn||"Draft",onChange:w=>Z("roadmapScanner",{...f.roadmapScanner,issueColumn:w==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})]})]})},{id:"board",label:"Board",content:s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Board Provider"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(Ht,{checked:f.boardProvider.enabled,onChange:w=>Z("boardProvider",{...f.boardProvider,enabled:w})})]}),f.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(bt,{label:"Board Provider",value:f.boardProvider.provider,onChange:w=>Z("boardProvider",{...f.boardProvider,provider:w}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),f.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Ne,{label:"Project Number",type:"number",value:String(f.boardProvider.projectNumber||""),onChange:w=>Z("boardProvider",{...f.boardProvider,projectNumber:w.target.value?Number(w.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Ne,{label:"Repository",value:f.boardProvider.repo||"",onChange:w=>Z("boardProvider",{...f.boardProvider,repo:w.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),f.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]})},{id:"qa",label:"QA",content:s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Quality Assurance"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated UI testing using Playwright"})]}),s.jsx(Ht,{checked:f.qa.enabled,onChange:w=>Z("qa",{...f.qa,enabled:w})})]}),f.qa.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ne,{label:"Max Runtime",type:"number",value:String(f.qa.maxRuntime),onChange:w=>Z("qa",{...f.qa,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(bt,{label:"Artifacts",value:f.qa.artifacts,onChange:w=>Z("qa",{...f.qa,artifacts:w}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(Ne,{label:"Skip Label",value:f.qa.skipLabel,onChange:w=>Z("qa",{...f.qa,skipLabel:w.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[s.jsx(yc,{label:"QA Branch Patterns",value:f.qa.branchPatterns,onChange:w=>Z("qa",{...f.qa,branchPatterns:w}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA (defaults to top-level branchPatterns if empty)"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Auto-install Playwright"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Automatically install Playwright browsers if missing during QA run"})]}),s.jsx(Ht,{checked:f.qa.autoInstallPlaywright,onChange:w=>Z("qa",{...f.qa,autoInstallPlaywright:w})})]})]})]})]})},{id:"audit",label:"Audit",content:s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Code Audit"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Automated code quality and security audits"})]}),s.jsx(Ht,{checked:f.audit.enabled,onChange:w=>Z("audit",{...f.audit,enabled:w})})]}),f.audit.enabled&&s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:s.jsx(Ne,{label:"Max Runtime",type:"number",value:String(f.audit.maxRuntime),onChange:w=>Z("audit",{...f.audit,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})},{id:"analytics",label:"Analytics",content:s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Analytics (Amplitude)"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Fetch Amplitude data, analyze with AI, and create board issues"})]}),s.jsx(Ht,{checked:f.analytics.enabled,onChange:w=>{Z("analytics",{...f.analytics,enabled:w})}})]}),f.analytics.enabled&&(!((rl=f.providerEnv)!=null&&rl.AMPLITUDE_API_KEY)||!((Ml=f.providerEnv)!=null&&Ml.AMPLITUDE_SECRET_KEY))&&s.jsx("p",{className:"text-sm text-amber-400",children:"Amplitude API Key and Secret Key are required. Set them in Provider Environment below."}),f.analytics.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(Ne,{label:"Max Runtime",type:"number",value:String(f.analytics.maxRuntime),onChange:w=>Z("analytics",{...f.analytics,maxRuntime:Number(w.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for analytics job (default: 900 seconds)"}),s.jsx(Ne,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(f.analytics.lookbackDays),onChange:w=>Z("analytics",{...f.analytics,lookbackDays:Math.max(1,Math.min(90,Number(w.target.value||7)))}),helperText:"Number of days to look back in Amplitude (1-90)"}),s.jsx(bt,{label:"Target Column",value:f.analytics.targetColumn,onChange:w=>Z("analytics",{...f.analytics,targetColumn:w}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}],helperText:"Board column for created issues"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:f.analytics.analysisPrompt??"",onChange:w=>Z("analytics",{...f.analytics,analysisPrompt:w.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",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-y"}),s.jsx("p",{className:"mt-1.5 text-xs text-slate-500",children:"Custom prompt for AI analysis. Leave empty to use default."})]})]})]})},{id:"advanced",label:"Advanced",content:s.jsxs(De,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Advanced Settings"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Templates, retry policy, and PRD execution priority"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Ne,{label:"Templates Directory",value:f.templatesDir,onChange:w=>Z("templatesDir",w.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Ne,{label:"Max Retries",type:"number",min:"1",value:String(f.maxRetries),onChange:w=>{const F=Math.max(1,Number(w.target.value||1));Z("maxRetries",F)},helperText:"Retry attempts for rate-limited API calls"})]}),s.jsx("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:s.jsx(yc,{label:"PRD Priority",value:f.prdPriority,onChange:w=>Z("prdPriority",w),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})})]})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-10",children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100 mb-6",children:"Settings"}),s.jsx(n0,{tabs:il}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Ye,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Me,children:[s.jsx(Xh,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Ye,{onClick:Te,loading:m,children:[s.jsx(yb,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),s.jsxs("div",{className:"mt-12",children:[s.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[s.jsx(Bh,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),s.jsx(De,{className:"divide-y divide-slate-800",children:ze?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):pe.map((w,F)=>{const de=w.status==="pass",He=w.status==="warn",X=de?"bg-green-500/10 text-green-400 border-green-500/20":He?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:w.name}),s.jsx("p",{className:"text-xs text-slate-500",children:w.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${X}`,children:w.status.toUpperCase()})]},`${w.name}-${F}`)})})]}),s.jsx(qy,{isOpen:q,onClose:()=>{A(!1),V(null),S(null)},onSave:Ee,presetId:Y,preset:B,isBuiltIn:Y?Yi.includes(Y):!1,existingIds:Object.keys($())}),ee&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>ue(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Fi,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:ee.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:ee.references.map(w=>s.jsx("li",{children:w},w))}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:'Please remove these assignments before deleting the preset, or use "Force Delete" to remove the preset and clear all references.'}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Ye,{variant:"ghost",onClick:()=>ue(null),children:"Cancel"}),s.jsx(Ye,{variant:"secondary",onClick:el,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},ky=()=>(sy(),iy(),s.jsx(sg,{children:s.jsxs("div",{className:"flex h-screen bg-[#030712] text-slate-300 overflow-hidden relative",children:[s.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"}),s.jsx(ty,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(ly,{}),s.jsx("main",{className:"flex-1 overflow-auto p-6 scroll-smooth relative",children:s.jsx("div",{className:"max-w-7xl mx-auto w-full",children:s.jsxs(Uv,{children:[s.jsx(Tl,{path:"/",element:s.jsx(xy,{})}),s.jsx(Tl,{path:"/prs",element:s.jsx(gy,{})}),s.jsx(Tl,{path:"/board",element:s.jsx(dy,{})}),s.jsx(Tl,{path:"/scheduling",element:s.jsx(My,{})}),s.jsx(Tl,{path:"/logs",element:s.jsx(vy,{})}),s.jsx(Tl,{path:"/roadmap",element:s.jsx(by,{})}),s.jsx(Tl,{path:"/settings",element:s.jsx(By,{})}),s.jsx(Tl,{path:"*",element:s.jsx(zv,{to:"/",replace:!0})})]})})})]}),s.jsx(ny,{})]})})),u0=document.getElementById("root");if(!u0)throw new Error("Could not find root element to mount to");const Yy=Hp.createRoot(u0);Yy.render(s.jsx(ve.StrictMode,{children:s.jsx(ky,{})}));
|