@jonit-dev/night-watch-cli 1.8.2 → 1.8.4-beta.0
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 +1017 -553
- package/dist/commands/board.d.ts.map +1 -1
- package/dist/commands/board.js +20 -0
- package/dist/commands/board.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +8 -12
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +96 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/scripts/publish.sh +94 -26
- package/dist/templates/prd-executor.md +1 -0
- package/dist/templates/skills/_codex-block.md +58 -0
- package/dist/templates/skills/nw-add-issue.md +39 -0
- package/dist/templates/skills/nw-board-sync.md +47 -0
- package/dist/templates/skills/nw-create-prd.md +61 -0
- package/dist/templates/skills/nw-review.md +39 -0
- package/dist/templates/skills/nw-run.md +39 -0
- package/dist/templates/skills/nw-slice.md +33 -0
- package/dist/templates/skills/skills/_codex-block.md +58 -0
- package/dist/templates/skills/skills/nw-add-issue.md +39 -0
- package/dist/templates/skills/skills/nw-board-sync.md +47 -0
- package/dist/templates/skills/skills/nw-create-prd.md +61 -0
- package/dist/templates/skills/skills/nw-review.md +39 -0
- package/dist/templates/skills/skills/nw-run.md +39 -0
- package/dist/templates/skills/skills/nw-slice.md +33 -0
- package/dist/web/assets/index-BFxPiKyy.js +381 -0
- package/dist/web/assets/index-Cp7RYjoy.css +1 -0
- package/dist/web/assets/index-DTsfDC7m.js +381 -0
- package/dist/web/assets/index-ZABWMEZR.js +381 -0
- package/dist/web/index.html +2 -2
- package/package.json +12 -3
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
var Vp=Object.defineProperty;var P0=l=>{throw TypeError(l)};var Bp=(l,u,d)=>u in l?Vp(l,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[u]=d;var Q0=(l,u,d)=>Bp(l,typeof u!="symbol"?u+"":u,d),sf=(l,u,d)=>u.has(l)||P0("Cannot "+d);var K=(l,u,d)=>(sf(l,u,"read from private field"),d?d.call(l):u.get(l)),lt=(l,u,d)=>u.has(l)?P0("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,d),Te=(l,u,d,o)=>(sf(l,u,"write to private field"),o?o.call(l,d):u.set(l,d),d),Ne=(l,u,d)=>(sf(l,u,"access private method"),d);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const f of m)if(f.type==="childList")for(const v of f.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&o(v)}).observe(document,{childList:!0,subtree:!0});function d(m){const f={};return m.integrity&&(f.integrity=m.integrity),m.referrerPolicy&&(f.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?f.credentials="include":m.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(m){if(m.ep)return;m.ep=!0;const f=d(m);fetch(m.href,f)}})();function Af(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function Yp(l){if(Object.prototype.hasOwnProperty.call(l,"__esModule"))return l;var u=l.default;if(typeof u=="function"){var d=function o(){return this instanceof o?Reflect.construct(u,arguments,this.constructor):u.apply(this,arguments)};d.prototype=u.prototype}else d={};return Object.defineProperty(d,"__esModule",{value:!0}),Object.keys(l).forEach(function(o){var m=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(d,o,m.get?m:{enumerable:!0,get:function(){return l[o]}})}),d}var rf={exports:{}},Yi={};/**
|
|
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 I0;function $p(){if(I0)return Yi;I0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(o,m,f){var v=null;if(f!==void 0&&(v=""+f),m.key!==void 0&&(v=""+m.key),"key"in m){f={};for(var N in m)N!=="key"&&(f[N]=m[N])}else f=m;return m=f.ref,{$$typeof:l,type:o,key:v,ref:m!==void 0?m:null,props:f}}return Yi.Fragment=u,Yi.jsx=d,Yi.jsxs=d,Yi}var W0;function Fp(){return W0||(W0=1,rf.exports=$p()),rf.exports}var s=Fp(),uf={exports:{}},He={};/**
|
|
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 X0;function Gp(){if(X0)return He;X0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),v=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),S=Symbol.iterator;function D(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,Y={};function X(_,re,ge){this.props=_,this.context=re,this.refs=Y,this.updater=ge||A}X.prototype.isReactComponent={},X.prototype.setState=function(_,re){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,re,"setState")},X.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function Q(){}Q.prototype=X.prototype;function G(_,re,ge){this.props=_,this.context=re,this.refs=Y,this.updater=ge||A}var ee=G.prototype=new Q;ee.constructor=G,M(ee,X.prototype),ee.isPureReactComponent=!0;var le=Array.isArray;function te(){}var I={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function R(_,re,ge){var pe=ge.ref;return{$$typeof:l,type:_,key:re,ref:pe!==void 0?pe:null,props:ge}}function U(_,re){return R(_.type,re,_.props)}function ne(_){return typeof _=="object"&&_!==null&&_.$$typeof===l}function F(_){var re={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(ge){return re[ge]})}var ce=/\/+/g;function ye(_,re){return typeof _=="object"&&_!==null&&_.key!=null?F(""+_.key):re.toString(36)}function me(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(te,te):(_.status="pending",_.then(function(re){_.status==="pending"&&(_.status="fulfilled",_.value=re)},function(re){_.status==="pending"&&(_.status="rejected",_.reason=re)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function B(_,re,ge,pe,De){var Ee=typeof _;(Ee==="undefined"||Ee==="boolean")&&(_=null);var Ue=!1;if(_===null)Ue=!0;else switch(Ee){case"bigint":case"string":case"number":Ue=!0;break;case"object":switch(_.$$typeof){case l:case u:Ue=!0;break;case w:return Ue=_._init,B(Ue(_._payload),re,ge,pe,De)}}if(Ue)return De=De(_),Ue=pe===""?"."+ye(_,0):pe,le(De)?(ge="",Ue!=null&&(ge=Ue.replace(ce,"$&/")+"/"),B(De,re,ge,"",function(Ft){return Ft})):De!=null&&(ne(De)&&(De=U(De,ge+(De.key==null||_&&_.key===De.key?"":(""+De.key).replace(ce,"$&/")+"/")+Ue)),re.push(De)),1;Ue=0;var ke=pe===""?".":pe+":";if(le(_))for(var Ke=0;Ke<_.length;Ke++)pe=_[Ke],Ee=ke+ye(pe,Ke),Ue+=B(pe,re,ge,Ee,De);else if(Ke=D(_),typeof Ke=="function")for(_=Ke.call(_),Ke=0;!(pe=_.next()).done;)pe=pe.value,Ee=ke+ye(pe,Ke++),Ue+=B(pe,re,ge,Ee,De);else if(Ee==="object"){if(typeof _.then=="function")return B(me(_),re,ge,pe,De);throw re=String(_),Error("Objects are not valid as a React child (found: "+(re==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":re)+"). If you meant to render a collection of children, use an array instead.")}return Ue}function ue(_,re,ge){if(_==null)return _;var pe=[],De=0;return B(_,pe,"","",function(Ee){return re.call(ge,Ee,De++)}),pe}function se(_){if(_._status===-1){var re=_._result;re=re(),re.then(function(ge){(_._status===0||_._status===-1)&&(_._status=1,_._result=ge)},function(ge){(_._status===0||_._status===-1)&&(_._status=2,_._result=ge)}),_._status===-1&&(_._status=0,_._result=re)}if(_._status===1)return _._result.default;throw _._result}var Me=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var re=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(re))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},qe={map:ue,forEach:function(_,re,ge){ue(_,function(){re.apply(this,arguments)},ge)},count:function(_){var re=0;return ue(_,function(){re++}),re},toArray:function(_){return ue(_,function(re){return re})||[]},only:function(_){if(!ne(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return He.Activity=E,He.Children=qe,He.Component=X,He.Fragment=d,He.Profiler=m,He.PureComponent=G,He.StrictMode=o,He.Suspense=b,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,He.__COMPILER_RUNTIME={__proto__:null,c:function(_){return I.H.useMemoCache(_)}},He.cache=function(_){return function(){return _.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(_,re,ge){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var pe=M({},_.props),De=_.key;if(re!=null)for(Ee in re.key!==void 0&&(De=""+re.key),re)!J.call(re,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&re.ref===void 0||(pe[Ee]=re[Ee]);var Ee=arguments.length-2;if(Ee===1)pe.children=ge;else if(1<Ee){for(var Ue=Array(Ee),ke=0;ke<Ee;ke++)Ue[ke]=arguments[ke+2];pe.children=Ue}return R(_.type,De,pe)},He.createContext=function(_){return _={$$typeof:v,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},He.createElement=function(_,re,ge){var pe,De={},Ee=null;if(re!=null)for(pe in re.key!==void 0&&(Ee=""+re.key),re)J.call(re,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(De[pe]=re[pe]);var Ue=arguments.length-2;if(Ue===1)De.children=ge;else if(1<Ue){for(var ke=Array(Ue),Ke=0;Ke<Ue;Ke++)ke[Ke]=arguments[Ke+2];De.children=ke}if(_&&_.defaultProps)for(pe in Ue=_.defaultProps,Ue)De[pe]===void 0&&(De[pe]=Ue[pe]);return R(_,Ee,De)},He.createRef=function(){return{current:null}},He.forwardRef=function(_){return{$$typeof:N,render:_}},He.isValidElement=ne,He.lazy=function(_){return{$$typeof:w,_payload:{_status:-1,_result:_},_init:se}},He.memo=function(_,re){return{$$typeof:y,type:_,compare:re===void 0?null:re}},He.startTransition=function(_){var re=I.T,ge={};I.T=ge;try{var pe=_(),De=I.S;De!==null&&De(ge,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(te,Me)}catch(Ee){Me(Ee)}finally{re!==null&&ge.types!==null&&(re.types=ge.types),I.T=re}},He.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},He.use=function(_){return I.H.use(_)},He.useActionState=function(_,re,ge){return I.H.useActionState(_,re,ge)},He.useCallback=function(_,re){return I.H.useCallback(_,re)},He.useContext=function(_){return I.H.useContext(_)},He.useDebugValue=function(){},He.useDeferredValue=function(_,re){return I.H.useDeferredValue(_,re)},He.useEffect=function(_,re){return I.H.useEffect(_,re)},He.useEffectEvent=function(_){return I.H.useEffectEvent(_)},He.useId=function(){return I.H.useId()},He.useImperativeHandle=function(_,re,ge){return I.H.useImperativeHandle(_,re,ge)},He.useInsertionEffect=function(_,re){return I.H.useInsertionEffect(_,re)},He.useLayoutEffect=function(_,re){return I.H.useLayoutEffect(_,re)},He.useMemo=function(_,re){return I.H.useMemo(_,re)},He.useOptimistic=function(_,re){return I.H.useOptimistic(_,re)},He.useReducer=function(_,re,ge){return I.H.useReducer(_,re,ge)},He.useRef=function(_){return I.H.useRef(_)},He.useState=function(_){return I.H.useState(_)},He.useSyncExternalStore=function(_,re,ge){return I.H.useSyncExternalStore(_,re,ge)},He.useTransition=function(){return I.H.useTransition()},He.version="19.2.4",He}var J0;function _f(){return J0||(J0=1,uf.exports=Gp()),uf.exports}var V=_f();const ze=Af(V);var cf={exports:{}},$i={},of={exports:{}},df={};/**
|
|
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 K0;function Zp(){return K0||(K0=1,(function(l){function u(B,ue){var se=B.length;B.push(ue);e:for(;0<se;){var Me=se-1>>>1,qe=B[Me];if(0<m(qe,ue))B[Me]=ue,B[se]=qe,se=Me;else break e}}function d(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var ue=B[0],se=B.pop();if(se!==ue){B[0]=se;e:for(var Me=0,qe=B.length,_=qe>>>1;Me<_;){var re=2*(Me+1)-1,ge=B[re],pe=re+1,De=B[pe];if(0>m(ge,se))pe<qe&&0>m(De,ge)?(B[Me]=De,B[pe]=se,Me=pe):(B[Me]=ge,B[re]=se,Me=re);else if(pe<qe&&0>m(De,se))B[Me]=De,B[pe]=se,Me=pe;else break e}}return ue}function m(B,ue){var se=B.sortIndex-ue.sortIndex;return se!==0?se:B.id-ue.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var v=Date,N=v.now();l.unstable_now=function(){return v.now()-N}}var b=[],y=[],w=1,E=null,S=3,D=!1,A=!1,M=!1,Y=!1,X=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function ee(B){for(var ue=d(y);ue!==null;){if(ue.callback===null)o(y);else if(ue.startTime<=B)o(y),ue.sortIndex=ue.expirationTime,u(b,ue);else break;ue=d(y)}}function le(B){if(M=!1,ee(B),!A)if(d(b)!==null)A=!0,te||(te=!0,F());else{var ue=d(y);ue!==null&&me(le,ue.startTime-B)}}var te=!1,I=-1,J=5,R=-1;function U(){return Y?!0:!(l.unstable_now()-R<J)}function ne(){if(Y=!1,te){var B=l.unstable_now();R=B;var ue=!0;try{e:{A=!1,M&&(M=!1,Q(I),I=-1),D=!0;var se=S;try{t:{for(ee(B),E=d(b);E!==null&&!(E.expirationTime>B&&U());){var Me=E.callback;if(typeof Me=="function"){E.callback=null,S=E.priorityLevel;var qe=Me(E.expirationTime<=B);if(B=l.unstable_now(),typeof qe=="function"){E.callback=qe,ee(B),ue=!0;break t}E===d(b)&&o(b),ee(B)}else o(b);E=d(b)}if(E!==null)ue=!0;else{var _=d(y);_!==null&&me(le,_.startTime-B),ue=!1}}break e}finally{E=null,S=se,D=!1}ue=void 0}}finally{ue?F():te=!1}}}var F;if(typeof G=="function")F=function(){G(ne)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,ye=ce.port2;ce.port1.onmessage=ne,F=function(){ye.postMessage(null)}}else F=function(){X(ne,0)};function me(B,ue){I=X(function(){B(l.unstable_now())},ue)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(B){B.callback=null},l.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<B?Math.floor(1e3/B):5},l.unstable_getCurrentPriorityLevel=function(){return S},l.unstable_next=function(B){switch(S){case 1:case 2:case 3:var ue=3;break;default:ue=S}var se=S;S=ue;try{return B()}finally{S=se}},l.unstable_requestPaint=function(){Y=!0},l.unstable_runWithPriority=function(B,ue){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var se=S;S=B;try{return ue()}finally{S=se}},l.unstable_scheduleCallback=function(B,ue,se){var Me=l.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?Me+se:Me):se=Me,B){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=se+qe,B={id:w++,callback:ue,priorityLevel:B,startTime:se,expirationTime:qe,sortIndex:-1},se>Me?(B.sortIndex=se,u(y,B),d(b)===null&&B===d(y)&&(M?(Q(I),I=-1):M=!0,me(le,se-Me))):(B.sortIndex=qe,u(b,B),A||D||(A=!0,te||(te=!0,F()))),B},l.unstable_shouldYield=U,l.unstable_wrapCallback=function(B){var ue=S;return function(){var se=S;S=ue;try{return B.apply(this,arguments)}finally{S=se}}}})(df)),df}var eg;function Pp(){return eg||(eg=1,of.exports=Zp()),of.exports}var ff={exports:{}},aa={};/**
|
|
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 tg;function Qp(){if(tg)return aa;tg=1;var l=_f();function u(b){var y="https://react.dev/errors/"+b;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)y+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+b+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var o={d:{f:d,r:function(){throw Error(u(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},m=Symbol.for("react.portal");function f(b,y,w){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:E==null?null:""+E,children:b,containerInfo:y,implementation:w}}var v=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function N(b,y){if(b==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return aa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,aa.createPortal=function(b,y){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(u(299));return f(b,y,null,w)},aa.flushSync=function(b){var y=v.T,w=o.p;try{if(v.T=null,o.p=2,b)return b()}finally{v.T=y,o.p=w,o.d.f()}},aa.preconnect=function(b,y){typeof b=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,o.d.C(b,y))},aa.prefetchDNS=function(b){typeof b=="string"&&o.d.D(b)},aa.preinit=function(b,y){if(typeof b=="string"&&y&&typeof y.as=="string"){var w=y.as,E=N(w,y.crossOrigin),S=typeof y.integrity=="string"?y.integrity:void 0,D=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;w==="style"?o.d.S(b,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:E,integrity:S,fetchPriority:D}):w==="script"&&o.d.X(b,{crossOrigin:E,integrity:S,fetchPriority:D,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},aa.preinitModule=function(b,y){if(typeof b=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var w=N(y.as,y.crossOrigin);o.d.M(b,{crossOrigin:w,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&o.d.M(b)},aa.preload=function(b,y){if(typeof b=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var w=y.as,E=N(w,y.crossOrigin);o.d.L(b,w,{crossOrigin:E,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},aa.preloadModule=function(b,y){if(typeof b=="string")if(y){var w=N(y.as,y.crossOrigin);o.d.m(b,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:w,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else o.d.m(b)},aa.requestFormReset=function(b){o.d.r(b)},aa.unstable_batchedUpdates=function(b,y){return b(y)},aa.useFormState=function(b,y,w){return v.H.useFormState(b,y,w)},aa.useFormStatus=function(){return v.H.useHostTransitionStatus()},aa.version="19.2.4",aa}var ag;function ly(){if(ag)return ff.exports;ag=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),ff.exports=Qp(),ff.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 ng;function Ip(){if(ng)return $i;ng=1;var l=Pp(),u=_f(),d=ly();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function v(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 N(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 b(e){if(f(e)!==e)throw Error(o(188))}function y(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var c=i.alternate;if(c===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===a)return b(i),e;if(c===n)return b(i),t;c=c.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=c;else{for(var x=!1,T=i.child;T;){if(T===a){x=!0,a=i,n=c;break}if(T===n){x=!0,n=i,a=c;break}T=T.sibling}if(!x){for(T=c.child;T;){if(T===a){x=!0,a=c,n=i;break}if(T===n){x=!0,n=c,a=i;break}T=T.sibling}if(!x)throw Error(o(189))}}if(a.alternate!==n)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var E=Object.assign,S=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),G=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var ce=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ce?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case X:return"Profiler";case Y:return"StrictMode";case le:return"Suspense";case te:return"SuspenseList";case R:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case G:return e.displayName||"Context";case Q: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 I:return t=e.displayName||null,t!==null?t:ye(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return ye(e(t))}catch{}}return null}var me=Array.isArray,B=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},Me=[],qe=-1;function _(e){return{current:e}}function re(e){0>qe||(e.current=Me[qe],Me[qe]=null,qe--)}function ge(e,t){qe++,Me[qe]=e.current,e.current=t}var pe=_(null),De=_(null),Ee=_(null),Ue=_(null);function ke(e,t){switch(ge(Ee,t),ge(De,e),ge(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?y0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=y0(t),e=x0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}re(pe),ge(pe,e)}function Ke(){re(pe),re(De),re(Ee)}function Ft(e){e.memoizedState!==null&&ge(Ue,e);var t=pe.current,a=x0(t,e.type);t!==a&&(ge(De,e),ge(pe,a))}function Na(e){De.current===e&&(re(pe),re(De)),Ue.current===e&&(re(Ue),Hi._currentValue=se)}var Qa,Ia;function ua(e){if(Qa===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Qa=t&&t[1]||"",Ia=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Qa+e+Ia}var ca=!1;function Wa(e,t){if(!e||ca)return"";ca=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(ae){var W=ae}Reflect.construct(e,[],de)}else{try{de.call()}catch(ae){W=ae}e.call(de.prototype)}}else{try{throw Error()}catch(ae){W=ae}(de=e())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(ae){if(ae&&W&&typeof ae.stack=="string")return[ae.stack,W.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),x=c[0],T=c[1];if(x&&T){var O=x.split(`
|
|
44
|
+
`),P=T.split(`
|
|
45
|
+
`);for(i=n=0;n<O.length&&!O[n].includes("DetermineComponentFrameRoot");)n++;for(;i<P.length&&!P[i].includes("DetermineComponentFrameRoot");)i++;if(n===O.length||i===P.length)for(n=O.length-1,i=P.length-1;1<=n&&0<=i&&O[n]!==P[i];)i--;for(;1<=n&&0<=i;n--,i--)if(O[n]!==P[i]){if(n!==1||i!==1)do if(n--,i--,0>i||O[n]!==P[i]){var ie=`
|
|
46
|
+
`+O[n].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=n&&0<=i);break}}}finally{ca=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ua(a):""}function hn(e,t){switch(e.tag){case 26:case 27:case 5:return ua(e.type);case 16:return ua("Lazy");case 13:return e.child!==t&&t!==null?ua("Suspense Fallback"):ua("Suspense");case 19:return ua("SuspenseList");case 0:case 15:return Wa(e.type,!1);case 11:return Wa(e.type.render,!1);case 1:return Wa(e.type,!0);case 31:return ua("Activity");default:return""}}function la(e){try{var t="",a=null;do t+=hn(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var ka=Object.prototype.hasOwnProperty,mn=l.unstable_scheduleCallback,gn=l.unstable_cancelCallback,rl=l.unstable_shouldYield,il=l.unstable_requestPaint,At=l.unstable_now,Xa=l.unstable_getCurrentPriorityLevel,On=l.unstable_ImmediatePriority,Dn=l.unstable_UserBlockingPriority,L=l.unstable_NormalPriority,fe=l.unstable_LowPriority,ve=l.unstable_IdlePriority,xe=l.log,et=l.unstable_setDisableYieldValue,Ge=null,dt=null;function We(e){if(typeof xe=="function"&&et(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Ge,e)}catch{}}var gt=Math.clz32?Math.clz32:to,yn=Math.log,qs=Math.LN2;function to(e){return e>>>=0,e===0?32:31-(yn(e)/qs|0)|0}var ul=256,Vs=262144,Jt=4194304;function xn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Il(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var T=n&134217727;return T!==0?(n=T&~c,n!==0?i=xn(n):(x&=T,x!==0?i=xn(x):a||(a=T&~e,a!==0&&(i=xn(a))))):(T=n&~c,T!==0?i=xn(T):x!==0?i=xn(x):a||(a=n&~e,a!==0&&(i=xn(a)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:i}function cl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function du(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 Br(){var e=Jt;return Jt<<=1,(Jt&62914560)===0&&(Jt=4194304),e}function Bs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ol(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function fu(e,t,a,n,i,c){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var T=e.entanglements,O=e.expirationTimes,P=e.hiddenUpdates;for(a=x&~a;0<a;){var ie=31-gt(a),de=1<<ie;T[ie]=0,O[ie]=-1;var W=P[ie];if(W!==null)for(P[ie]=null,ie=0;ie<W.length;ie++){var ae=W[ie];ae!==null&&(ae.lane&=-536870913)}a&=~de}n!==0&&xt(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(x&~t))}function xt(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-gt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function oa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-gt(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Yr(e,t){var a=t&-t;return a=(a&42)!==0?1:Ys(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ys(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 Kt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function $s(){var e=ue.p;return e!==0?e:(e=window.event,e===void 0?32:V0(e.type))}function $r(e,t){var a=ue.p;try{return ue.p=e,t()}finally{ue.p=a}}var Ja=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Ja,Ht="__reactProps$"+Ja,Rn="__reactContainer$"+Ja,Wl="__reactEvents$"+Ja,hu="__reactListeners$"+Ja,mu="__reactHandles$"+Ja,gu="__reactResources$"+Ja,Xl="__reactMarker$"+Ja;function Fs(e){delete e[Tt],delete e[Ht],delete e[Wl],delete e[hu],delete e[mu]}function An(e){var t=e[Tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Rn]||a[Tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=j0(e);e!==null;){if(a=e[Tt])return a;e=j0(e)}return t}e=a,a=e.parentNode}return null}function Oe(e){if(e=e[Tt]||e[Rn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function da(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Ka(e){var t=e[gu];return t||(t=e[gu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Xl]=!0}var yu=new Set,Fr={};function pn(e,t){dl(e,t),dl(e+"Capture",t)}function dl(e,t){for(Fr[e]=t,e=0;e<t.length;e++)yu.add(t[e])}var xu=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),pu={},_n={};function Gr(e){return ka.call(_n,e)?!0:ka.call(pu,e)?!1:xu.test(e)?_n[e]=!0:(pu[e]=!0,!1)}function Gt(e,t,a){if(Gr(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Gs(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function it(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}function Mt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zr(e,t,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(x){a=""+x,c.call(this,x)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jl(e){if(!e._valueTracker){var t=vn(e)?"checked":"value";e._valueTracker=Zr(e,t,""+e[t])}}function fl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=vn(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function en(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 Zs=/[\n"\\]/g;function Zt(e){return e.replace(Zs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ps(e,t,a,n,i,c,x,T){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mt(t)):e.value!==""+Mt(t)&&(e.value=""+Mt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Kl(e,x,Mt(t)):a!=null?Kl(e,x,Mt(a)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+Mt(T):e.removeAttribute("name")}function hl(e,t,a,n,i,c,x,T){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Jl(e);return}a=a!=null?""+Mt(a):"",t=t!=null?""+Mt(t):a,T||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=T?e.checked:!!n,e.defaultChecked=!!n,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Jl(e)}function Kl(e,t,a){t==="number"&&en(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function kn(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Mt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function es(e,t,a){if(t!=null&&(t=""+Mt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Mt(a):""}function Pr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(me(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Mt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Jl(e)}function tn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ts=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 as(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||ts.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function vu(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&as(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&as(e,c,t[c])}function Qs(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 ao=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"]]),bu=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ns(e){return bu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function za(){}var Qr=null;function Is(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zn=null,ml=null;function Su(e){var t=Oe(e);if(t&&(e=t.stateNode)){var a=e[Ht]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ps(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Zt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[Ht]||null;if(!i)throw Error(o(90));Ps(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&fl(n)}break e;case"textarea":es(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&kn(e,!!a.multiple,t,!1)}}}var Ir=!1;function Wr(e,t,a){if(Ir)return e(t,a);Ir=!0;try{var n=e(t);return n}finally{if(Ir=!1,(zn!==null||ml!==null)&&(gc(),zn&&(t=zn,e=ml,ml=zn=null,Su(t),e)))for(t=0;t<e.length;t++)Su(e[t])}}function ls(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Ht]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var an=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xr=!1;if(an)try{var ss={};Object.defineProperty(ss,"passive",{get:function(){Xr=!0}}),window.addEventListener("test",ss,ss),window.removeEventListener("test",ss,ss)}catch{Xr=!1}var bn=null,Ws=null,Xs=null;function qt(){if(Xs)return Xs;var e,t=Ws,a=t.length,n,i="value"in bn?bn.value:bn.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var x=a-e;for(n=1;n<=x&&t[a-n]===i[c-n];n++);return Xs=i.slice(e,1<n?1-n:void 0)}function rs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function nn(){return!0}function Un(){return!1}function Ct(e){function t(a,n,i,c,x){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=x,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(a=e[T],this[T]=a?a(c):c[T]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?nn:Un,this.isPropagationStopped=Un,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},is=Ct(Sn),us=E({},Sn,{view:0,detail:0}),Jr=Ct(us),Js,cs,os,Ks=E({},us,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fs,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!==os&&(os&&e.type==="mousemove"?(Js=e.screenX-os.screenX,cs=e.screenY-os.screenY):cs=Js=0,os=e),Js)},movementY:function(e){return"movementY"in e?e.movementY:cs}}),wu=Ct(Ks),no=E({},Ks,{dataTransfer:0}),lo=Ct(no),so=E({},us,{relatedTarget:0}),er=Ct(so),ro=E({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0}),gl=Ct(ro),io=E({},Sn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yl=Ct(io),ds=E({},Sn,{data:0}),xl=Ct(ds),uo={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},co={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"},oo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fo(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=oo[e])?!!t[e]:!1}function fs(){return fo}var ho=E({},us,{key:function(e){if(e.key){var t=uo[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?co[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fs,charCode:function(e){return e.type==="keypress"?rs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),mo=Ct(ho),go=E({},Ks,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nu=Ct(go),yo=E({},us,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fs}),xo=Ct(yo),ju=E({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0}),po=Ct(ju),vo=E({},Ks,{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}),bo=Ct(vo),So=E({},Sn,{newState:0,oldState:0}),wo=Ct(So),Eu=[9,13,27,32],Kr=an&&"CompositionEvent"in window,hs=null;an&&"documentMode"in document&&(hs=document.documentMode);var No=an&&"TextEvent"in window&&!hs,Tu=an&&(!Kr||hs&&8<hs&&11>=hs),Mu=" ",Cu=!1;function Ou(e,t){switch(e){case"keyup":return Eu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Du(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pl=!1;function jo(e,t){switch(e){case"compositionend":return Du(t);case"keypress":return t.which!==32?null:(Cu=!0,Mu);case"textInput":return e=t.data,e===Mu&&Cu?null:e;default:return null}}function Eo(e,t){if(pl)return e==="compositionend"||!Kr&&Ou(e,t)?(e=qt(),Xs=Ws=bn=null,pl=!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 Tu&&t.locale!=="ko"?null:t.data;default:return null}}var To={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 Ru(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!To[e.type]:t==="textarea"}function ei(e,t,a,n){zn?ml?ml.push(n):ml=[n]:zn=n,t=wc(t,"onChange"),0<t.length&&(a=new is("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var vl=null,ms=null;function fa(e){o0(e,0)}function ln(e){var t=da(e);if(fl(t))return e}function Au(e,t){if(e==="change")return t}var wn=!1;if(an){var ti;if(an){var ja="oninput"in document;if(!ja){var ai=document.createElement("div");ai.setAttribute("oninput","return;"),ja=typeof ai.oninput=="function"}ti=ja}else ti=!1;wn=ti&&(!document.documentMode||9<document.documentMode)}function ni(){vl&&(vl.detachEvent("onpropertychange",li),ms=vl=null)}function li(e){if(e.propertyName==="value"&&ln(ms)){var t=[];ei(t,ms,e,Is(e)),Wr(fa,t)}}function Ze(e,t,a){e==="focusin"?(ni(),vl=t,ms=a,vl.attachEvent("onpropertychange",li)):e==="focusout"&&ni()}function bl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ln(ms)}function Mo(e,t){if(e==="click")return ln(t)}function pt(e,t){if(e==="input"||e==="change")return ln(t)}function gs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ea=typeof Object.is=="function"?Object.is:gs;function ys(e,t){if(ea(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var i=a[n];if(!ka.call(t,i)||!ea(e[i],t[i]))return!1}return!0}function _u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ku(e,t){var a=_u(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=_u(a)}}function Xe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Co(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=en(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=en(e.document)}return t}function tr(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 zu=an&&"documentMode"in document&&11>=document.documentMode,Sl=null,ar=null,Pt=null,nr=!1;function xs(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;nr||Sl==null||Sl!==en(n)||(n=Sl,"selectionStart"in n&&tr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Pt&&ys(Pt,n)||(Pt=n,n=wc(ar,"onSelect"),0<n.length&&(t=new is("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Sl)))}function Ln(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var wl={animationend:Ln("Animation","AnimationEnd"),animationiteration:Ln("Animation","AnimationIteration"),animationstart:Ln("Animation","AnimationStart"),transitionrun:Ln("Transition","TransitionRun"),transitionstart:Ln("Transition","TransitionStart"),transitioncancel:Ln("Transition","TransitionCancel"),transitionend:Ln("Transition","TransitionEnd")},si={},Uu={};an&&(Uu=document.createElement("div").style,"AnimationEvent"in window||(delete wl.animationend.animation,delete wl.animationiteration.animation,delete wl.animationstart.animation),"TransitionEvent"in window||delete wl.transitionend.transition);function Hn(e){if(si[e])return si[e];if(!wl[e])return e;var t=wl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Uu)return si[e]=t[a];return e}var Lu=Hn("animationend"),Hu=Hn("animationiteration"),lr=Hn("animationstart"),Oo=Hn("transitionrun"),Do=Hn("transitionstart"),qu=Hn("transitioncancel"),ri=Hn("transitionend"),ii=new Map,ui="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(" ");ui.push("scrollEnd");function ha(e,t){ii.set(e,t),pn(t,[e])}var Nl=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)},sa=[],Ua=0,ps=0;function jl(){for(var e=Ua,t=ps=Ua=0;t<e;){var a=sa[t];sa[t++]=null;var n=sa[t];sa[t++]=null;var i=sa[t];sa[t++]=null;var c=sa[t];if(sa[t++]=null,n!==null&&i!==null){var x=n.pending;x===null?i.next=i:(i.next=x.next,x.next=i),n.pending=i}c!==0&&vs(a,i,c)}}function La(e,t,a,n){sa[Ua++]=e,sa[Ua++]=t,sa[Ua++]=a,sa[Ua++]=n,ps|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function sr(e,t,a,n){return La(e,t,a,n),bs(e)}function Ha(e,t){return La(e,null,null,t),bs(e)}function vs(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,c=e.return;c!==null;)c.childLanes|=a,n=c.alternate,n!==null&&(n.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-gt(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function bs(e){if(50<Ri)throw Ri=0,Od=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ea={};function rr(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,t,a,n){return new rr(e,t,a,n)}function ir(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qa(e,t){var a=e.alternate;return a===null?(a=Qt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Vu(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ur(e,t,a,n,i,c){var x=0;if(n=e,typeof e=="function")ir(e)&&(x=1);else if(typeof e=="string")x=Cp(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case R:return e=Qt(31,a,t,i),e.elementType=R,e.lanes=c,e;case M:return Va(a.children,i,c,t);case Y:x=8,i|=24;break;case X:return e=Qt(12,a,t,i|2),e.elementType=X,e.lanes=c,e;case le:return e=Qt(13,a,t,i),e.elementType=le,e.lanes=c,e;case te:return e=Qt(19,a,t,i),e.elementType=te,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:x=10;break e;case Q:x=9;break e;case ee:x=11;break e;case I:x=14;break e;case J:x=16,n=null;break e}x=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=Qt(x,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function Va(e,t,a,n){return e=Qt(7,e,n,t),e.lanes=a,e}function ci(e,t,a){return e=Qt(6,e,null,t),e.lanes=a,e}function Bu(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function El(e,t,a){return t=Qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var oi=new WeakMap;function ma(e,t){if(typeof e=="object"&&e!==null){var a=oi.get(e);return a!==void 0?a:(t={value:e,source:t,stack:la(t)},oi.set(e,t),t)}return{value:e,source:t,stack:la(t)}}var qn=[],Vn=0,Ss=null,sn=0,ta=[],je=0,ga=null,Ba=1,g="";function r(e,t){qn[Vn++]=sn,qn[Vn++]=Ss,Ss=e,sn=t}function h(e,t,a){ta[je++]=Ba,ta[je++]=g,ta[je++]=ga,ga=e;var n=Ba;e=g;var i=32-gt(n)-1;n&=~(1<<i),a+=1;var c=32-gt(t)+i;if(30<c){var x=i-i%5;c=(n&(1<<x)-1).toString(32),n>>=x,i-=x,Ba=1<<32-gt(t)+i|a<<i|n,g=c+e}else Ba=1<<c|a<<i|n,g=e}function p(e){e.return!==null&&(r(e,1),h(e,1,0))}function j(e){for(;e===Ss;)Ss=qn[--Vn],qn[Vn]=null,sn=qn[--Vn],qn[Vn]=null;for(;e===ga;)ga=ta[--je],ta[je]=null,g=ta[--je],ta[je]=null,Ba=ta[--je],ta[je]=null}function C(e,t){ta[je++]=Ba,ta[je++]=g,ta[je++]=ga,Ba=t.id,g=t.overflow,ga=e}var k=null,z=null,q=!1,he=null,be=!1,Le=Error(o(519));function Pe(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw rn(ma(t,e)),Le}function Re(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Tt]=e,t[Ht]=n,a){case"dialog":Fe("cancel",t),Fe("close",t);break;case"iframe":case"object":case"embed":Fe("load",t);break;case"video":case"audio":for(a=0;a<_i.length;a++)Fe(_i[a],t);break;case"source":Fe("error",t);break;case"img":case"image":case"link":Fe("error",t),Fe("load",t);break;case"details":Fe("toggle",t);break;case"input":Fe("invalid",t),hl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Fe("invalid",t);break;case"textarea":Fe("invalid",t),Pr(t,n.value,n.defaultValue,n.children)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||m0(t.textContent,a)?(n.popover!=null&&(Fe("beforetoggle",t),Fe("toggle",t)),n.onScroll!=null&&Fe("scroll",t),n.onScrollEnd!=null&&Fe("scrollend",t),n.onClick!=null&&(t.onclick=za),t=!0):t=!1,t||Pe(e,!0)}function Nt(e){for(k=e.return;k;)switch(k.tag){case 5:case 31:case 13:be=!1;return;case 27:case 3:be=!0;return;default:k=k.return}}function Bt(e){if(e!==k)return!1;if(!q)return Nt(e),q=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Fd(e.type,e.memoizedProps)),a=!a),a&&z&&Pe(e),Nt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));z=N0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));z=N0(e)}else t===27?(t=z,Hl(e.type)?(e=Id,Id=null,z=e):z=t):z=k?Ga(e.stateNode.nextSibling):null;return!0}function Yt(){z=k=null,q=!1}function Nn(){var e=he;return e!==null&&(va===null?va=e:va.push.apply(va,e),he=null),e}function rn(e){he===null?he=[e]:he.push(e)}var cr=_(null),Bn=null,Ya=null;function jn(e,t,a){ge(cr,t._currentValue),t._currentValue=a}function un(e){e._currentValue=cr.current,re(cr)}function di(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function Yn(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var x=i.child;c=c.firstContext;e:for(;c!==null;){var T=c;c=i;for(var O=0;O<t.length;O++)if(T.context===t[O]){c.lanes|=a,T=c.alternate,T!==null&&(T.lanes|=a),di(c.return,a,e),n||(x=null);break e}c=T.next}}else if(i.tag===18){if(x=i.return,x===null)throw Error(o(341));x.lanes|=a,c=x.alternate,c!==null&&(c.lanes|=a),di(x,a,e),x=null}else x=i.child;if(x!==null)x.return=i;else for(x=i;x!==null;){if(x===e){x=null;break}if(i=x.sibling,i!==null){i.return=x.return,x=i;break}x=x.return}i=x}}function $a(e,t,a,n){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var x=i.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var T=i.type;ea(i.pendingProps.value,x.value)||(e!==null?e.push(T):e=[T])}}else if(i===Ue.current){if(x=i.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Hi):e=[Hi])}i=i.return}e!==null&&Yn(t,e,a,n),t.flags|=262144}function or(e){for(e=e.firstContext;e!==null;){if(!ea(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ws(e){Bn=e,Ya=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function It(e){return Kf(Bn,e)}function Yu(e,t){return Bn===null&&ws(e),Kf(e,t)}function Kf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ya===null){if(e===null)throw Error(o(308));Ya=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ya=Ya.next=t;return a}var jx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ex=l.unstable_scheduleCallback,Tx=l.unstable_NormalPriority,kt={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ro(){return{controller:new jx,data:new Map,refCount:0}}function fi(e){e.refCount--,e.refCount===0&&Ex(Tx,function(){e.controller.abort()})}var hi=null,Ao=0,dr=0,fr=null;function Mx(e,t){if(hi===null){var a=hi=[];Ao=0,dr=zd(),fr={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ao++,t.then(eh,eh),t}function eh(){if(--Ao===0&&hi!==null){fr!==null&&(fr.status="fulfilled");var e=hi;hi=null,dr=0,fr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Cx(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var th=B.S;B.S=function(e,t){Hm=At(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Mx(e,t),th!==null&&th(e,t)};var Ns=_(null);function _o(){var e=Ns.current;return e!==null?e:yt.pooledCache}function $u(e,t){t===null?ge(Ns,Ns.current):ge(Ns,t.pool)}function ah(){var e=_o();return e===null?null:{parent:kt._currentValue,pool:e}}var hr=Error(o(460)),ko=Error(o(474)),Fu=Error(o(542)),Gu={then:function(){}};function nh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function lh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(za,za),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rh(e),e;default:if(typeof t.status=="string")t.then(za,za);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rh(e),e}throw Es=t,hr}}function js(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Es=a,hr):a}}var Es=null;function sh(){if(Es===null)throw Error(o(459));var e=Es;return Es=null,e}function rh(e){if(e===hr||e===Fu)throw Error(o(483))}var mr=null,mi=0;function Zu(e){var t=mi;return mi+=1,mr===null&&(mr=[]),lh(mr,e,t)}function gi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pu(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ih(e){function t($,H){if(e){var Z=$.deletions;Z===null?($.deletions=[H],$.flags|=16):Z.push(H)}}function a($,H){if(!e)return null;for(;H!==null;)t($,H),H=H.sibling;return null}function n($){for(var H=new Map;$!==null;)$.key!==null?H.set($.key,$):H.set($.index,$),$=$.sibling;return H}function i($,H){return $=qa($,H),$.index=0,$.sibling=null,$}function c($,H,Z){return $.index=Z,e?(Z=$.alternate,Z!==null?(Z=Z.index,Z<H?($.flags|=67108866,H):Z):($.flags|=67108866,H)):($.flags|=1048576,H)}function x($){return e&&$.alternate===null&&($.flags|=67108866),$}function T($,H,Z,oe){return H===null||H.tag!==6?(H=ci(Z,$.mode,oe),H.return=$,H):(H=i(H,Z),H.return=$,H)}function O($,H,Z,oe){var Ce=Z.type;return Ce===M?ie($,H,Z.props.children,oe,Z.key):H!==null&&(H.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&js(Ce)===H.type)?(H=i(H,Z.props),gi(H,Z),H.return=$,H):(H=ur(Z.type,Z.key,Z.props,null,$.mode,oe),gi(H,Z),H.return=$,H)}function P($,H,Z,oe){return H===null||H.tag!==4||H.stateNode.containerInfo!==Z.containerInfo||H.stateNode.implementation!==Z.implementation?(H=El(Z,$.mode,oe),H.return=$,H):(H=i(H,Z.children||[]),H.return=$,H)}function ie($,H,Z,oe,Ce){return H===null||H.tag!==7?(H=Va(Z,$.mode,oe,Ce),H.return=$,H):(H=i(H,Z),H.return=$,H)}function de($,H,Z){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=ci(""+H,$.mode,Z),H.return=$,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case D:return Z=ur(H.type,H.key,H.props,null,$.mode,Z),gi(Z,H),Z.return=$,Z;case A:return H=El(H,$.mode,Z),H.return=$,H;case J:return H=js(H),de($,H,Z)}if(me(H)||F(H))return H=Va(H,$.mode,Z,null),H.return=$,H;if(typeof H.then=="function")return de($,Zu(H),Z);if(H.$$typeof===G)return de($,Yu($,H),Z);Pu($,H)}return null}function W($,H,Z,oe){var Ce=H!==null?H.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ce!==null?null:T($,H,""+Z,oe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case D:return Z.key===Ce?O($,H,Z,oe):null;case A:return Z.key===Ce?P($,H,Z,oe):null;case J:return Z=js(Z),W($,H,Z,oe)}if(me(Z)||F(Z))return Ce!==null?null:ie($,H,Z,oe,null);if(typeof Z.then=="function")return W($,H,Zu(Z),oe);if(Z.$$typeof===G)return W($,H,Yu($,Z),oe);Pu($,Z)}return null}function ae($,H,Z,oe,Ce){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return $=$.get(Z)||null,T(H,$,""+oe,Ce);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case D:return $=$.get(oe.key===null?Z:oe.key)||null,O(H,$,oe,Ce);case A:return $=$.get(oe.key===null?Z:oe.key)||null,P(H,$,oe,Ce);case J:return oe=js(oe),ae($,H,Z,oe,Ce)}if(me(oe)||F(oe))return $=$.get(Z)||null,ie(H,$,oe,Ce,null);if(typeof oe.then=="function")return ae($,H,Z,Zu(oe),Ce);if(oe.$$typeof===G)return ae($,H,Z,Yu(H,oe),Ce);Pu(H,oe)}return null}function Se($,H,Z,oe){for(var Ce=null,tt=null,we=H,Be=H=0,Ie=null;we!==null&&Be<Z.length;Be++){we.index>Be?(Ie=we,we=null):Ie=we.sibling;var at=W($,we,Z[Be],oe);if(at===null){we===null&&(we=Ie);break}e&&we&&at.alternate===null&&t($,we),H=c(at,H,Be),tt===null?Ce=at:tt.sibling=at,tt=at,we=Ie}if(Be===Z.length)return a($,we),q&&r($,Be),Ce;if(we===null){for(;Be<Z.length;Be++)we=de($,Z[Be],oe),we!==null&&(H=c(we,H,Be),tt===null?Ce=we:tt.sibling=we,tt=we);return q&&r($,Be),Ce}for(we=n(we);Be<Z.length;Be++)Ie=ae(we,$,Be,Z[Be],oe),Ie!==null&&(e&&Ie.alternate!==null&&we.delete(Ie.key===null?Be:Ie.key),H=c(Ie,H,Be),tt===null?Ce=Ie:tt.sibling=Ie,tt=Ie);return e&&we.forEach(function($l){return t($,$l)}),q&&r($,Be),Ce}function Ae($,H,Z,oe){if(Z==null)throw Error(o(151));for(var Ce=null,tt=null,we=H,Be=H=0,Ie=null,at=Z.next();we!==null&&!at.done;Be++,at=Z.next()){we.index>Be?(Ie=we,we=null):Ie=we.sibling;var $l=W($,we,at.value,oe);if($l===null){we===null&&(we=Ie);break}e&&we&&$l.alternate===null&&t($,we),H=c($l,H,Be),tt===null?Ce=$l:tt.sibling=$l,tt=$l,we=Ie}if(at.done)return a($,we),q&&r($,Be),Ce;if(we===null){for(;!at.done;Be++,at=Z.next())at=de($,at.value,oe),at!==null&&(H=c(at,H,Be),tt===null?Ce=at:tt.sibling=at,tt=at);return q&&r($,Be),Ce}for(we=n(we);!at.done;Be++,at=Z.next())at=ae(we,$,Be,at.value,oe),at!==null&&(e&&at.alternate!==null&&we.delete(at.key===null?Be:at.key),H=c(at,H,Be),tt===null?Ce=at:tt.sibling=at,tt=at);return e&&we.forEach(function(qp){return t($,qp)}),q&&r($,Be),Ce}function mt($,H,Z,oe){if(typeof Z=="object"&&Z!==null&&Z.type===M&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case D:e:{for(var Ce=Z.key;H!==null;){if(H.key===Ce){if(Ce=Z.type,Ce===M){if(H.tag===7){a($,H.sibling),oe=i(H,Z.props.children),oe.return=$,$=oe;break e}}else if(H.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===J&&js(Ce)===H.type){a($,H.sibling),oe=i(H,Z.props),gi(oe,Z),oe.return=$,$=oe;break e}a($,H);break}else t($,H);H=H.sibling}Z.type===M?(oe=Va(Z.props.children,$.mode,oe,Z.key),oe.return=$,$=oe):(oe=ur(Z.type,Z.key,Z.props,null,$.mode,oe),gi(oe,Z),oe.return=$,$=oe)}return x($);case A:e:{for(Ce=Z.key;H!==null;){if(H.key===Ce)if(H.tag===4&&H.stateNode.containerInfo===Z.containerInfo&&H.stateNode.implementation===Z.implementation){a($,H.sibling),oe=i(H,Z.children||[]),oe.return=$,$=oe;break e}else{a($,H);break}else t($,H);H=H.sibling}oe=El(Z,$.mode,oe),oe.return=$,$=oe}return x($);case J:return Z=js(Z),mt($,H,Z,oe)}if(me(Z))return Se($,H,Z,oe);if(F(Z)){if(Ce=F(Z),typeof Ce!="function")throw Error(o(150));return Z=Ce.call(Z),Ae($,H,Z,oe)}if(typeof Z.then=="function")return mt($,H,Zu(Z),oe);if(Z.$$typeof===G)return mt($,H,Yu($,Z),oe);Pu($,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,H!==null&&H.tag===6?(a($,H.sibling),oe=i(H,Z),oe.return=$,$=oe):(a($,H),oe=ci(Z,$.mode,oe),oe.return=$,$=oe),x($)):a($,H)}return function($,H,Z,oe){try{mi=0;var Ce=mt($,H,Z,oe);return mr=null,Ce}catch(we){if(we===hr||we===Fu)throw we;var tt=Qt(29,we,null,$.mode);return tt.lanes=oe,tt.return=$,tt}finally{}}}var Ts=ih(!0),uh=ih(!1),Tl=!1;function zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uo(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 Ml(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(nt&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=bs(e),vs(e,null,a),t}return La(e,n,t,a),bs(e)}function yi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,oa(e,a)}}function Lo(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=x:c=c.next=x,a=a.next}while(a!==null);c===null?i=c=t:c=c.next=t}else i=c=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ho=!1;function xi(){if(Ho){var e=fr;if(e!==null)throw e}}function pi(e,t,a,n){Ho=!1;var i=e.updateQueue;Tl=!1;var c=i.firstBaseUpdate,x=i.lastBaseUpdate,T=i.shared.pending;if(T!==null){i.shared.pending=null;var O=T,P=O.next;O.next=null,x===null?c=P:x.next=P,x=O;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,T=ie.lastBaseUpdate,T!==x&&(T===null?ie.firstBaseUpdate=P:T.next=P,ie.lastBaseUpdate=O))}if(c!==null){var de=i.baseState;x=0,ie=P=O=null,T=c;do{var W=T.lane&-536870913,ae=W!==T.lane;if(ae?(Qe&W)===W:(n&W)===W){W!==0&&W===dr&&(Ho=!0),ie!==null&&(ie=ie.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var Se=e,Ae=T;W=t;var mt=a;switch(Ae.tag){case 1:if(Se=Ae.payload,typeof Se=="function"){de=Se.call(mt,de,W);break e}de=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ae.payload,W=typeof Se=="function"?Se.call(mt,de,W):Se,W==null)break e;de=E({},de,W);break e;case 2:Tl=!0}}W=T.callback,W!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=i.callbacks,ae===null?i.callbacks=[W]:ae.push(W))}else ae={lane:W,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ie===null?(P=ie=ae,O=de):ie=ie.next=ae,x|=W;if(T=T.next,T===null){if(T=i.shared.pending,T===null)break;ae=T,T=ae.next,ae.next=null,i.lastBaseUpdate=ae,i.shared.pending=null}}while(!0);ie===null&&(O=de),i.baseState=O,i.firstBaseUpdate=P,i.lastBaseUpdate=ie,c===null&&(i.shared.lanes=0),_l|=x,e.lanes=x,e.memoizedState=de}}function ch(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function oh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ch(a[e],t)}var gr=_(null),Qu=_(0);function dh(e,t){e=Xn,ge(Qu,e),ge(gr,t),Xn=e|t.baseLanes}function qo(){ge(Qu,Xn),ge(gr,gr.current)}function Vo(){Xn=Qu.current,re(gr),re(Qu)}var Ta=_(null),Fa=null;function Ol(e){var t=e.alternate;ge(Ot,Ot.current&1),ge(Ta,e),Fa===null&&(t===null||gr.current!==null||t.memoizedState!==null)&&(Fa=e)}function Bo(e){ge(Ot,Ot.current),ge(Ta,e),Fa===null&&(Fa=e)}function fh(e){e.tag===22?(ge(Ot,Ot.current),ge(Ta,e),Fa===null&&(Fa=e)):Dl()}function Dl(){ge(Ot,Ot.current),ge(Ta,Ta.current)}function Ma(e){re(Ta),Fa===e&&(Fa=null),re(Ot)}var Ot=_(0);function Iu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Pd(a)||Qd(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $n=0,Ve=null,ft=null,zt=null,Wu=!1,yr=!1,Ms=!1,Xu=0,vi=0,xr=null,Ox=0;function jt(){throw Error(o(321))}function Yo(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ea(e[a],t[a]))return!1;return!0}function $o(e,t,a,n,i,c){return $n=c,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?Ih:ld,Ms=!1,c=a(n,i),Ms=!1,yr&&(c=mh(t,a,n,i)),hh(e),c}function hh(e){B.H=wi;var t=ft!==null&&ft.next!==null;if($n=0,zt=ft=Ve=null,Wu=!1,vi=0,xr=null,t)throw Error(o(300));e===null||Ut||(e=e.dependencies,e!==null&&or(e)&&(Ut=!0))}function mh(e,t,a,n){Ve=e;var i=0;do{if(yr&&(xr=null),vi=0,yr=!1,25<=i)throw Error(o(301));if(i+=1,zt=ft=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}B.H=Wh,c=t(a,n)}while(yr);return c}function Dx(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?bi(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Ve.flags|=1024),t}function Fo(){var e=Xu!==0;return Xu=0,e}function Go(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Zo(e){if(Wu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wu=!1}$n=0,zt=ft=Ve=null,yr=!1,vi=Xu=0,xr=null}function ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Ve.memoizedState=zt=e:zt=zt.next=e,zt}function Dt(){if(ft===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=zt===null?Ve.memoizedState:zt.next;if(t!==null)zt=t,ft=e;else{if(e===null)throw Ve.alternate===null?Error(o(467)):Error(o(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},zt===null?Ve.memoizedState=zt=e:zt=zt.next=e}return zt}function Ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bi(e){var t=vi;return vi+=1,xr===null&&(xr=[]),e=lh(xr,e,t),t=Ve,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?Ih:ld),e}function Ku(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bi(e);if(e.$$typeof===G)return It(e)}throw Error(o(438,String(e)))}function Po(e){var t=null,a=Ve.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=Ve.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Ju(),Ve.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=U;return t.index++,a}function Fn(e,t){return typeof t=="function"?t(e):t}function ec(e){var t=Dt();return Qo(t,ft,e)}function Qo(e,t,a){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=a;var i=e.baseQueue,c=n.pending;if(c!==null){if(i!==null){var x=i.next;i.next=c.next,c.next=x}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var T=x=null,O=null,P=t,ie=!1;do{var de=P.lane&-536870913;if(de!==P.lane?(Qe&de)===de:($n&de)===de){var W=P.revertLane;if(W===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),de===dr&&(ie=!0);else if(($n&W)===W){P=P.next,W===dr&&(ie=!0);continue}else de={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(T=O=de,x=c):O=O.next=de,Ve.lanes|=W,_l|=W;de=P.action,Ms&&a(c,de),c=P.hasEagerState?P.eagerState:a(c,de)}else W={lane:de,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},O===null?(T=O=W,x=c):O=O.next=W,Ve.lanes|=de,_l|=de;P=P.next}while(P!==null&&P!==t);if(O===null?x=c:O.next=T,!ea(c,e.memoizedState)&&(Ut=!0,ie&&(a=fr,a!==null)))throw a;e.memoizedState=c,e.baseState=x,e.baseQueue=O,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Io(e){var t=Dt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,c=t.memoizedState;if(i!==null){a.pending=null;var x=i=i.next;do c=e(c,x.action),x=x.next;while(x!==i);ea(c,t.memoizedState)||(Ut=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function gh(e,t,a){var n=Ve,i=Dt(),c=q;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var x=!ea((ft||i).memoizedState,a);if(x&&(i.memoizedState=a,Ut=!0),i=i.queue,Jo(ph.bind(null,n,i,e),[e]),i.getSnapshot!==t||x||zt!==null&&zt.memoizedState.tag&1){if(n.flags|=2048,pr(9,{destroy:void 0},xh.bind(null,n,i,a,t),null),yt===null)throw Error(o(349));c||($n&127)!==0||yh(n,t,a)}return a}function yh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ve.updateQueue,t===null?(t=Ju(),Ve.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function xh(e,t,a,n){t.value=a,t.getSnapshot=n,vh(t)&&bh(e)}function ph(e,t,a){return a(function(){vh(t)&&bh(e)})}function vh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ea(e,a)}catch{return!0}}function bh(e){var t=Ha(e,2);t!==null&&ba(t,e,2)}function Wo(e){var t=ra();if(typeof e=="function"){var a=e;if(e=a(),Ms){We(!0);try{a()}finally{We(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:e},t}function Sh(e,t,a,n){return e.baseState=a,Qo(e,ft,typeof n=="function"?n:Fn)}function Rx(e,t,a,n,i){if(nc(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){c.listeners.push(x)}};B.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,wh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function wh(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=B.T,x={};B.T=x;try{var T=a(i,n),O=B.S;O!==null&&O(x,T),Nh(e,t,T)}catch(P){Xo(e,t,P)}finally{c!==null&&x.types!==null&&(c.types=x.types),B.T=c}}else try{c=a(i,n),Nh(e,t,c)}catch(P){Xo(e,t,P)}}function Nh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){jh(e,t,n)},function(n){return Xo(e,t,n)}):jh(e,t,a)}function jh(e,t,a){t.status="fulfilled",t.value=a,Eh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,wh(e,a)))}function Xo(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,Eh(t),t=t.next;while(t!==n)}e.action=null}function Eh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Th(e,t){return t}function Mh(e,t){if(q){var a=yt.formState;if(a!==null){e:{var n=Ve;if(q){if(z){t:{for(var i=z,c=be;i.nodeType!==8;){if(!c){i=null;break t}if(i=Ga(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){z=Ga(i.nextSibling),n=i.data==="F!";break e}}Pe(n)}n=!1}n&&(t=a[0])}}return a=ra(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Th,lastRenderedState:t},a.queue=n,a=Zh.bind(null,Ve,n),n.dispatch=a,n=Wo(!1),c=nd.bind(null,Ve,!1,n.queue),n=ra(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=Rx.bind(null,Ve,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Ch(e){var t=Dt();return Oh(t,ft,e)}function Oh(e,t,a){if(t=Qo(e,t,Th)[0],e=ec(Fn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=bi(t)}catch(x){throw x===hr?Fu:x}else n=t;t=Dt();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(Ve.flags|=2048,pr(9,{destroy:void 0},Ax.bind(null,i,a),null)),[n,c,e]}function Ax(e,t){e.action=t}function Dh(e){var t=Dt(),a=ft;if(a!==null)return Oh(t,a,e);Dt(),t=t.memoizedState,a=Dt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function pr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=Ju(),Ve.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function Rh(){return Dt().memoizedState}function tc(e,t,a,n){var i=ra();Ve.flags|=e,i.memoizedState=pr(1|t,{destroy:void 0},a,n===void 0?null:n)}function ac(e,t,a,n){var i=Dt();n=n===void 0?null:n;var c=i.memoizedState.inst;ft!==null&&n!==null&&Yo(n,ft.memoizedState.deps)?i.memoizedState=pr(t,c,a,n):(Ve.flags|=e,i.memoizedState=pr(1|t,c,a,n))}function Ah(e,t){tc(8390656,8,e,t)}function Jo(e,t){ac(2048,8,e,t)}function _x(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=Ju(),Ve.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function _h(e){var t=Dt().memoizedState;return _x({ref:t,nextImpl:e}),function(){if((nt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function kh(e,t){return ac(4,2,e,t)}function zh(e,t){return ac(4,4,e,t)}function Uh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Lh(e,t,a){a=a!=null?a.concat([e]):null,ac(4,4,Uh.bind(null,t,e),a)}function Ko(){}function Hh(e,t){var a=Dt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Yo(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function qh(e,t){var a=Dt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Yo(t,n[1]))return n[0];if(n=e(),Ms){We(!0);try{e()}finally{We(!1)}}return a.memoizedState=[n,t],n}function ed(e,t,a){return a===void 0||($n&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Vm(),Ve.lanes|=e,_l|=e,a)}function Vh(e,t,a,n){return ea(a,t)?a:gr.current!==null?(e=ed(e,a,n),ea(e,t)||(Ut=!0),e):($n&42)===0||($n&1073741824)!==0&&(Qe&261930)===0?(Ut=!0,e.memoizedState=a):(e=Vm(),Ve.lanes|=e,_l|=e,t)}function Bh(e,t,a,n,i){var c=ue.p;ue.p=c!==0&&8>c?c:8;var x=B.T,T={};B.T=T,nd(e,!1,t,a);try{var O=i(),P=B.S;if(P!==null&&P(T,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var ie=Cx(O,n);Si(e,t,ie,Da(e))}else Si(e,t,n,Da(e))}catch(de){Si(e,t,{then:function(){},status:"rejected",reason:de},Da())}finally{ue.p=c,x!==null&&T.types!==null&&(x.types=T.types),B.T=x}}function kx(){}function td(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Yh(e).queue;Bh(e,i,t,se,a===null?kx:function(){return $h(e),a(n)})}function Yh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:se},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $h(e){var t=Yh(e);t.next===null&&(t=e.alternate.memoizedState),Si(e,t.next.queue,{},Da())}function ad(){return It(Hi)}function Fh(){return Dt().memoizedState}function Gh(){return Dt().memoizedState}function zx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Da();e=Ml(a);var n=Cl(t,e,a);n!==null&&(ba(n,t,a),yi(n,t,a)),t={cache:Ro()},e.payload=t;return}t=t.return}}function Ux(e,t,a){var n=Da();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},nc(e)?Ph(t,a):(a=sr(e,t,a,n),a!==null&&(ba(a,e,n),Qh(a,t,n)))}function Zh(e,t,a){var n=Da();Si(e,t,a,n)}function Si(e,t,a,n){var i={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(nc(e))Ph(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var x=t.lastRenderedState,T=c(x,a);if(i.hasEagerState=!0,i.eagerState=T,ea(T,x))return La(e,t,i,0),yt===null&&jl(),!1}catch{}finally{}if(a=sr(e,t,i,n),a!==null)return ba(a,e,n),Qh(a,t,n),!0}return!1}function nd(e,t,a,n){if(n={lane:2,revertLane:zd(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},nc(e)){if(t)throw Error(o(479))}else t=sr(e,a,n,2),t!==null&&ba(t,e,2)}function nc(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Ph(e,t){yr=Wu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Qh(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,oa(e,a)}}var wi={readContext:It,use:Ku,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};wi.useEffectEvent=jt;var Ih={readContext:It,use:Ku,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:Ah,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,tc(4194308,4,Uh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return tc(4194308,4,e,t)},useInsertionEffect:function(e,t){tc(4,2,e,t)},useMemo:function(e,t){var a=ra();t=t===void 0?null:t;var n=e();if(Ms){We(!0);try{e()}finally{We(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=ra();if(a!==void 0){var i=a(t);if(Ms){We(!0);try{a(t)}finally{We(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=Ux.bind(null,Ve,e),[n.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,a=Zh.bind(null,Ve,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Ko,useDeferredValue:function(e,t){var a=ra();return ed(a,e,t)},useTransition:function(){var e=Wo(!1);return e=Bh.bind(null,Ve,e.queue,!0,!1),ra().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ve,i=ra();if(q){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),yt===null)throw Error(o(349));(Qe&127)!==0||yh(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Ah(ph.bind(null,n,c,e),[e]),n.flags|=2048,pr(9,{destroy:void 0},xh.bind(null,n,c,a,t),null),a},useId:function(){var e=ra(),t=yt.identifierPrefix;if(q){var a=g,n=Ba;a=(n&~(1<<32-gt(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Xu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Ox++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ad,useFormState:Mh,useActionState:Mh,useOptimistic:function(e){var t=ra();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=nd.bind(null,Ve,!0,a),a.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return ra().memoizedState=zx.bind(null,Ve)},useEffectEvent:function(e){var t=ra(),a={impl:e};return t.memoizedState=a,function(){if((nt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},ld={readContext:It,use:Ku,useCallback:Hh,useContext:It,useEffect:Jo,useImperativeHandle:Lh,useInsertionEffect:kh,useLayoutEffect:zh,useMemo:qh,useReducer:ec,useRef:Rh,useState:function(){return ec(Fn)},useDebugValue:Ko,useDeferredValue:function(e,t){var a=Dt();return Vh(a,ft.memoizedState,e,t)},useTransition:function(){var e=ec(Fn)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:bi(e),t]},useSyncExternalStore:gh,useId:Fh,useHostTransitionStatus:ad,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var a=Dt();return Sh(a,ft,e,t)},useMemoCache:Po,useCacheRefresh:Gh};ld.useEffectEvent=_h;var Wh={readContext:It,use:Ku,useCallback:Hh,useContext:It,useEffect:Jo,useImperativeHandle:Lh,useInsertionEffect:kh,useLayoutEffect:zh,useMemo:qh,useReducer:Io,useRef:Rh,useState:function(){return Io(Fn)},useDebugValue:Ko,useDeferredValue:function(e,t){var a=Dt();return ft===null?ed(a,e,t):Vh(a,ft.memoizedState,e,t)},useTransition:function(){var e=Io(Fn)[0],t=Dt().memoizedState;return[typeof e=="boolean"?e:bi(e),t]},useSyncExternalStore:gh,useId:Fh,useHostTransitionStatus:ad,useFormState:Dh,useActionState:Dh,useOptimistic:function(e,t){var a=Dt();return ft!==null?Sh(a,ft,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Po,useCacheRefresh:Gh};Wh.useEffectEvent=_h;function sd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:E({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var rd={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Da(),i=Ml(n);i.payload=t,a!=null&&(i.callback=a),t=Cl(e,i,n),t!==null&&(ba(t,e,n),yi(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Da(),i=Ml(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Cl(e,i,n),t!==null&&(ba(t,e,n),yi(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Da(),n=Ml(a);n.tag=2,t!=null&&(n.callback=t),t=Cl(e,n,a),t!==null&&(ba(t,e,a),yi(t,e,a))}};function Xh(e,t,a,n,i,c,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,x):t.prototype&&t.prototype.isPureReactComponent?!ys(a,n)||!ys(i,c):!0}function Jh(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&rd.enqueueReplaceState(t,t.state,null)}function Cs(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=E({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Kh(e){Nl(e)}function em(e){console.error(e)}function tm(e){Nl(e)}function lc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function am(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function id(e,t,a){return a=Ml(a),a.tag=3,a.payload={element:null},a.callback=function(){lc(e,t)},a}function nm(e){return e=Ml(e),e.tag=3,e}function lm(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var c=n.value;e.payload=function(){return i(c)},e.callback=function(){am(t,a,n)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){am(t,a,n),typeof i!="function"&&(kl===null?kl=new Set([this]):kl.add(this));var T=n.stack;this.componentDidCatch(n.value,{componentStack:T!==null?T:""})})}function Lx(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&$a(t,a,i,!0),a=Ta.current,a!==null){switch(a.tag){case 31:case 13:return Fa===null?yc():a.alternate===null&&Et===0&&(Et=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),Ad(e,n,i)),!1;case 22:return a.flags|=65536,n===Gu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),Ad(e,n,i)),!1}throw Error(o(435,a.tag))}return Ad(e,n,i),yc(),!1}if(q)return t=Ta.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Le&&(e=Error(o(422),{cause:n}),rn(ma(e,a)))):(n!==Le&&(t=Error(o(423),{cause:n}),rn(ma(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=ma(n,a),i=id(e.stateNode,n,i),Lo(e,i),Et!==4&&(Et=2)),!1;var c=Error(o(520),{cause:n});if(c=ma(c,a),Di===null?Di=[c]:Di.push(c),Et!==4&&(Et=2),t===null)return!0;n=ma(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=id(a.stateNode,n,e),Lo(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(kl===null||!kl.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=nm(i),lm(i,e,a,n),Lo(a,i),!1}a=a.return}while(a!==null);return!1}var ud=Error(o(461)),Ut=!1;function Wt(e,t,a,n){t.child=e===null?uh(t,null,a,n):Ts(t,e.child,a,n)}function sm(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var x={};for(var T in n)T!=="ref"&&(x[T]=n[T])}else x=n;return ws(t),n=$o(e,t,a,x,c,i),T=Fo(),e!==null&&!Ut?(Go(e,t,i),Gn(e,t,i)):(q&&T&&p(t),t.flags|=1,Wt(e,t,n,i),t.child)}function rm(e,t,a,n,i){if(e===null){var c=a.type;return typeof c=="function"&&!ir(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,im(e,t,c,n,i)):(e=ur(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yd(e,i)){var x=c.memoizedProps;if(a=a.compare,a=a!==null?a:ys,a(x,n)&&e.ref===t.ref)return Gn(e,t,i)}return t.flags|=1,e=qa(c,n),e.ref=t.ref,e.return=t,t.child=e}function im(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(ys(c,n)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=n=c,yd(e,i))(e.flags&131072)!==0&&(Ut=!0);else return t.lanes=e.lanes,Gn(e,t,i)}return cd(e,t,a,n,i)}function um(e,t,a,n){var i=n.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(n=t.child=e.child,i=0;n!==null;)i=i|n.lanes|n.childLanes,n=n.sibling;n=i&~c}else n=0,t.child=null;return cm(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$u(t,c!==null?c.cachePool:null),c!==null?dh(t,c):qo(),fh(t);else return n=t.lanes=536870912,cm(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?($u(t,c.cachePool),dh(t,c),Dl(),t.memoizedState=null):(e!==null&&$u(t,null),qo(),Dl());return Wt(e,t,i,a),t.child}function Ni(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cm(e,t,a,n,i){var c=_o();return c=c===null?null:{parent:kt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&$u(t,null),qo(),fh(t),e!==null&&$a(e,t,n,!0),t.childLanes=i,null}function sc(e,t){return t=ic({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function om(e,t,a){return Ts(t,e.child,null,a),e=sc(t,t.pendingProps),e.flags|=2,Ma(t),t.memoizedState=null,e}function Hx(e,t,a){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(q){if(n.mode==="hidden")return e=sc(t,n),t.lanes=536870912,Ni(null,e);if(Bo(t),(e=z)?(e=w0(e,be),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Ba,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,k=t,z=null)):e=null,e===null)throw Pe(t);return t.lanes=536870912,null}return sc(t,n)}var c=e.memoizedState;if(c!==null){var x=c.dehydrated;if(Bo(t),i)if(t.flags&256)t.flags&=-257,t=om(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ut||$a(e,t,a,!1),i=(a&e.childLanes)!==0,Ut||i){if(n=yt,n!==null&&(x=Yr(n,a),x!==0&&x!==c.retryLane))throw c.retryLane=x,Ha(e,x),ba(n,e,x),ud;yc(),t=om(e,t,a)}else e=c.treeContext,z=Ga(x.nextSibling),k=t,q=!0,he=null,be=!1,e!==null&&C(t,e),t=sc(t,n),t.flags|=4096;return t}return e=qa(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rc(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function cd(e,t,a,n,i){return ws(t),a=$o(e,t,a,n,void 0,i),n=Fo(),e!==null&&!Ut?(Go(e,t,i),Gn(e,t,i)):(q&&n&&p(t),t.flags|=1,Wt(e,t,a,i),t.child)}function dm(e,t,a,n,i,c){return ws(t),t.updateQueue=null,a=mh(t,n,a,i),hh(e),n=Fo(),e!==null&&!Ut?(Go(e,t,c),Gn(e,t,c)):(q&&n&&p(t),t.flags|=1,Wt(e,t,a,c),t.child)}function fm(e,t,a,n,i){if(ws(t),t.stateNode===null){var c=Ea,x=a.contextType;typeof x=="object"&&x!==null&&(c=It(x)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=rd,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},zo(t),x=a.contextType,c.context=typeof x=="object"&&x!==null?It(x):Ea,c.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(sd(t,a,x,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(x=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),x!==c.state&&rd.enqueueReplaceState(c,c.state,null),pi(t,n,c,i),xi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var T=t.memoizedProps,O=Cs(a,T);c.props=O;var P=c.context,ie=a.contextType;x=Ea,typeof ie=="object"&&ie!==null&&(x=It(ie));var de=a.getDerivedStateFromProps;ie=typeof de=="function"||typeof c.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,ie||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(T||P!==x)&&Jh(t,c,n,x),Tl=!1;var W=t.memoizedState;c.state=W,pi(t,n,c,i),xi(),P=t.memoizedState,T||W!==P||Tl?(typeof de=="function"&&(sd(t,a,de,n),P=t.memoizedState),(O=Tl||Xh(t,a,O,n,W,P,x))?(ie||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=P),c.props=n,c.state=P,c.context=x,n=O):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Uo(e,t),x=t.memoizedProps,ie=Cs(a,x),c.props=ie,de=t.pendingProps,W=c.context,P=a.contextType,O=Ea,typeof P=="object"&&P!==null&&(O=It(P)),T=a.getDerivedStateFromProps,(P=typeof T=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(x!==de||W!==O)&&Jh(t,c,n,O),Tl=!1,W=t.memoizedState,c.state=W,pi(t,n,c,i),xi();var ae=t.memoizedState;x!==de||W!==ae||Tl||e!==null&&e.dependencies!==null&&or(e.dependencies)?(typeof T=="function"&&(sd(t,a,T,n),ae=t.memoizedState),(ie=Tl||Xh(t,a,ie,n,W,ae,O)||e!==null&&e.dependencies!==null&&or(e.dependencies))?(P||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,ae,O),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,ae,O)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||x===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=ae),c.props=n,c.state=ae,c.context=O,n=ie):(typeof c.componentDidUpdate!="function"||x===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,rc(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=Ts(t,e.child,null,i),t.child=Ts(t,null,a,i)):Wt(e,t,a,i),t.memoizedState=c.state,e=t.child):e=Gn(e,t,i),e}function hm(e,t,a,n){return Yt(),t.flags|=256,Wt(e,t,a,n),t.child}var od={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dd(e){return{baseLanes:e,cachePool:ah()}}function fd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Oa),e}function mm(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,x;if((x=c)||(x=e!==null&&e.memoizedState===null?!1:(Ot.current&2)!==0),x&&(i=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(q){if(i?Ol(t):Dl(),(e=z)?(e=w0(e,be),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Ba,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Bu(e),a.return=t,t.child=a,k=t,z=null)):e=null,e===null)throw Pe(t);return Qd(e)?t.lanes=32:t.lanes=536870912,null}var T=n.children;return n=n.fallback,i?(Dl(),i=t.mode,T=ic({mode:"hidden",children:T},i),n=Va(n,i,a,null),T.return=t,n.return=t,T.sibling=n,t.child=T,n=t.child,n.memoizedState=dd(a),n.childLanes=fd(e,x,a),t.memoizedState=od,Ni(null,n)):(Ol(t),hd(t,T))}var O=e.memoizedState;if(O!==null&&(T=O.dehydrated,T!==null)){if(c)t.flags&256?(Ol(t),t.flags&=-257,t=md(e,t,a)):t.memoizedState!==null?(Dl(),t.child=e.child,t.flags|=128,t=null):(Dl(),T=n.fallback,i=t.mode,n=ic({mode:"visible",children:n.children},i),T=Va(T,i,a,null),T.flags|=2,n.return=t,T.return=t,n.sibling=T,t.child=n,Ts(t,e.child,null,a),n=t.child,n.memoizedState=dd(a),n.childLanes=fd(e,x,a),t.memoizedState=od,t=Ni(null,n));else if(Ol(t),Qd(T)){if(x=T.nextSibling&&T.nextSibling.dataset,x)var P=x.dgst;x=P,n=Error(o(419)),n.stack="",n.digest=x,rn({value:n,source:null,stack:null}),t=md(e,t,a)}else if(Ut||$a(e,t,a,!1),x=(a&e.childLanes)!==0,Ut||x){if(x=yt,x!==null&&(n=Yr(x,a),n!==0&&n!==O.retryLane))throw O.retryLane=n,Ha(e,n),ba(x,e,n),ud;Pd(T)||yc(),t=md(e,t,a)}else Pd(T)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,z=Ga(T.nextSibling),k=t,q=!0,he=null,be=!1,e!==null&&C(t,e),t=hd(t,n.children),t.flags|=4096);return t}return i?(Dl(),T=n.fallback,i=t.mode,O=e.child,P=O.sibling,n=qa(O,{mode:"hidden",children:n.children}),n.subtreeFlags=O.subtreeFlags&65011712,P!==null?T=qa(P,T):(T=Va(T,i,a,null),T.flags|=2),T.return=t,n.return=t,n.sibling=T,t.child=n,Ni(null,n),n=t.child,T=e.child.memoizedState,T===null?T=dd(a):(i=T.cachePool,i!==null?(O=kt._currentValue,i=i.parent!==O?{parent:O,pool:O}:i):i=ah(),T={baseLanes:T.baseLanes|a,cachePool:i}),n.memoizedState=T,n.childLanes=fd(e,x,a),t.memoizedState=od,Ni(e.child,n)):(Ol(t),a=e.child,e=a.sibling,a=qa(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function hd(e,t){return t=ic({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ic(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function md(e,t,a){return Ts(t,e.child,null,a),e=hd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gm(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),di(e.return,t,a)}function gd(e,t,a,n,i,c){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:c}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=n,x.tail=a,x.tailMode=i,x.treeForkCount=c)}function ym(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;n=n.children;var x=Ot.current,T=(x&2)!==0;if(T?(x=x&1|2,t.flags|=128):x&=1,ge(Ot,x),Wt(e,t,n,a),n=q?sn:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gm(e,a,t);else if(e.tag===19)gm(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&Iu(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),gd(t,!1,i,a,c,n);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Iu(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}gd(t,!0,a,null,c,n);break;case"together":gd(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Gn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),_l|=t.lanes,(a&t.childLanes)===0)if(e!==null){if($a(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=qa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=qa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function yd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&or(e)))}function qx(e,t,a){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),jn(t,kt,e.memoizedState.cache),Yt();break;case 27:case 5:Ft(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:jn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Bo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Ol(t),t.flags|=128,null):(a&t.child.childLanes)!==0?mm(e,t,a):(Ol(t),e=Gn(e,t,a),e!==null?e.sibling:null);Ol(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||($a(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return ym(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ge(Ot,Ot.current),n)break;return null;case 22:return t.lanes=0,um(e,t,a,t.pendingProps);case 24:jn(t,kt,e.memoizedState.cache)}return Gn(e,t,a)}function xm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ut=!0;else{if(!yd(e,a)&&(t.flags&128)===0)return Ut=!1,qx(e,t,a);Ut=(e.flags&131072)!==0}else Ut=!1,q&&(t.flags&1048576)!==0&&h(t,sn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=js(t.elementType),t.type=e,typeof e=="function")ir(e)?(n=Cs(e,n),t.tag=1,t=fm(null,t,e,n,a)):(t.tag=0,t=cd(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=sm(null,t,e,n,a);break e}else if(i===I){t.tag=14,t=rm(null,t,e,n,a);break e}}throw t=ye(e)||e,Error(o(306,t,""))}}return t;case 0:return cd(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Cs(n,t.pendingProps),fm(e,t,n,i,a);case 3:e:{if(ke(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var c=t.memoizedState;i=c.element,Uo(e,t),pi(t,n,null,a);var x=t.memoizedState;if(n=x.cache,jn(t,kt,n),n!==c.cache&&Yn(t,[kt],a,!0),xi(),n=x.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=hm(e,t,n,a);break e}else if(n!==i){i=ma(Error(o(424)),t),rn(i),t=hm(e,t,n,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(z=Ga(e.firstChild),k=t,q=!0,he=null,be=!0,a=uh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Yt(),n===i){t=Gn(e,t,a);break e}Wt(e,t,n,a)}t=t.child}return t;case 26:return rc(e,t),e===null?(a=C0(t.type,null,t.pendingProps,null))?t.memoizedState=a:q||(a=t.type,e=t.pendingProps,n=Nc(Ee.current).createElement(a),n[Tt]=t,n[Ht]=e,Xt(n,a,e),_t(n),t.stateNode=n):t.memoizedState=C0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ft(t),e===null&&q&&(n=t.stateNode=E0(t.type,t.pendingProps,Ee.current),k=t,be=!0,i=z,Hl(t.type)?(Id=i,z=Ga(n.firstChild)):z=i),Wt(e,t,t.pendingProps.children,a),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&q&&((i=n=z)&&(n=gp(n,t.type,t.pendingProps,be),n!==null?(t.stateNode=n,k=t,z=Ga(n.firstChild),be=!1,i=!0):i=!1),i||Pe(t)),Ft(t),i=t.type,c=t.pendingProps,x=e!==null?e.memoizedProps:null,n=c.children,Fd(i,c)?n=null:x!==null&&Fd(i,x)&&(t.flags|=32),t.memoizedState!==null&&(i=$o(e,t,Dx,null,null,a),Hi._currentValue=i),rc(e,t),Wt(e,t,n,a),t.child;case 6:return e===null&&q&&((e=a=z)&&(a=yp(a,t.pendingProps,be),a!==null?(t.stateNode=a,k=t,z=null,e=!0):e=!1),e||Pe(t)),null;case 13:return mm(e,t,a);case 4:return ke(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ts(t,null,n,a):Wt(e,t,n,a),t.child;case 11:return sm(e,t,t.type,t.pendingProps,a);case 7:return Wt(e,t,t.pendingProps,a),t.child;case 8:return Wt(e,t,t.pendingProps.children,a),t.child;case 12:return Wt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,jn(t,t.type,n.value),Wt(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,ws(t),i=It(i),n=n(i),t.flags|=1,Wt(e,t,n,a),t.child;case 14:return rm(e,t,t.type,t.pendingProps,a);case 15:return im(e,t,t.type,t.pendingProps,a);case 19:return ym(e,t,a);case 31:return Hx(e,t,a);case 22:return um(e,t,a,t.pendingProps);case 24:return ws(t),n=It(kt),e===null?(i=_o(),i===null&&(i=yt,c=Ro(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},zo(t),jn(t,kt,i)):((e.lanes&a)!==0&&(Uo(e,t),pi(t,null,null,a),xi()),i=e.memoizedState,c=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),jn(t,kt,n)):(n=c.cache,jn(t,kt,n),n!==i.cache&&Yn(t,[kt],a,!0))),Wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Zn(e){e.flags|=4}function xd(e,t,a,n,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Fm())e.flags|=8192;else throw Es=Gu,ko}else e.flags&=-16777217}function pm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_0(t))if(Fm())e.flags|=8192;else throw Es=Gu,ko}function uc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Br():536870912,e.lanes|=t,wr|=t)}function ji(e,t){if(!q)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function Vx(e,t,a){var n=t.pendingProps;switch(j(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),un(kt),Ke(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Bt(t)?Zn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Nn())),vt(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(Zn(t),c!==null?(vt(t),pm(t,c)):(vt(t),xd(t,i,null,n,a))):c?c!==e.memoizedState?(Zn(t),vt(t),pm(t,c)):(vt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Zn(t),vt(t),xd(t,i,e,n,a)),null;case 27:if(Na(t),a=Ee.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Zn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return vt(t),null}e=pe.current,Bt(t)?Re(t):(e=E0(i,n,a),t.stateNode=e,Zn(t))}return vt(t),null;case 5:if(Na(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Zn(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return vt(t),null}if(c=pe.current,Bt(t))Re(t);else{var x=Nc(Ee.current);switch(c){case 1:c=x.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=x.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=x.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=x.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=x.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?x.createElement("select",{is:n.is}):x.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?x.createElement(i,{is:n.is}):x.createElement(i)}}c[Tt]=t,c[Ht]=n;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)c.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=c;e:switch(Xt(c,i,n),i){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Zn(t)}}return vt(t),xd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Zn(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=Ee.current,Bt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=k,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||m0(e.nodeValue,a)),e||Pe(t,!0)}else e=Nc(e).createTextNode(n),e[Tt]=t,t.stateNode=e}return vt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Bt(t),a!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Tt]=t}else Yt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),e=!1}else a=Nn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ma(t),t):(Ma(t),null);if((t.flags&128)!==0)throw Error(o(558))}return vt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Bt(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(o(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(o(317));i[Tt]=t}else Yt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),i=!1}else i=Nn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Ma(t),t):(Ma(t),null)}return Ma(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==i&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),uc(t,t.updateQueue),vt(t),null);case 4:return Ke(),e===null&&qd(t.stateNode.containerInfo),vt(t),null;case 10:return un(t.type),vt(t),null;case 19:if(re(Ot),n=t.memoizedState,n===null)return vt(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)ji(n,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Iu(e),c!==null){for(t.flags|=128,ji(n,!1),e=c.updateQueue,t.updateQueue=e,uc(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Vu(a,e),a=a.sibling;return ge(Ot,Ot.current&1|2),q&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&At()>hc&&(t.flags|=128,i=!0,ji(n,!1),t.lanes=4194304)}else{if(!i)if(e=Iu(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,uc(t,e),ji(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!q)return vt(t),null}else 2*At()-n.renderingStartTime>hc&&a!==536870912&&(t.flags|=128,i=!0,ji(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=At(),e.sibling=null,a=Ot.current,ge(Ot,i?a&1|2:a&1),q&&r(t,n.treeForkCount),e):(vt(t),null);case 22:case 23:return Ma(t),Vo(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),a=t.updateQueue,a!==null&&uc(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&re(Ns),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),un(kt),vt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Bx(e,t){switch(j(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return un(kt),Ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Na(t),null;case 31:if(t.memoizedState!==null){if(Ma(t),t.alternate===null)throw Error(o(340));Yt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ma(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Yt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(Ot),null;case 4:return Ke(),null;case 10:return un(t.type),null;case 22:case 23:return Ma(t),Vo(),e!==null&&re(Ns),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return un(kt),null;case 25:return null;default:return null}}function vm(e,t){switch(j(t),t.tag){case 3:un(kt),Ke();break;case 26:case 27:case 5:Na(t);break;case 4:Ke();break;case 31:t.memoizedState!==null&&Ma(t);break;case 13:Ma(t);break;case 19:re(Ot);break;case 10:un(t.type);break;case 22:case 23:Ma(t),Vo(),e!==null&&re(Ns);break;case 24:un(kt)}}function Ei(e,t){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){n=void 0;var c=a.create,x=a.inst;n=c(),x.destroy=n}a=a.next}while(a!==i)}}catch(T){ct(t,t.return,T)}}function Rl(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var c=i.next;n=c;do{if((n.tag&e)===e){var x=n.inst,T=x.destroy;if(T!==void 0){x.destroy=void 0,i=t;var O=a,P=T;try{P()}catch(ie){ct(i,O,ie)}}}n=n.next}while(n!==c)}}catch(ie){ct(t,t.return,ie)}}function bm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{oh(t,a)}catch(n){ct(e,e.return,n)}}}function Sm(e,t,a){a.props=Cs(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){ct(e,t,n)}}function Ti(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(i){ct(e,t,i)}}function En(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){ct(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){ct(e,t,i)}else a.current=null}function wm(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(i){ct(e,e.return,i)}}function pd(e,t,a){try{var n=e.stateNode;cp(n,e.type,a,t),n[Ht]=t}catch(i){ct(e,e.return,i)}}function Nm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hl(e.type)||e.tag===4}function vd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Nm(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&&Hl(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 bd(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=za));else if(n!==4&&(n===27&&Hl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(bd(e,t,a),e=e.sibling;e!==null;)bd(e,t,a),e=e.sibling}function cc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&Hl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(cc(e,t,a),e=e.sibling;e!==null;)cc(e,t,a),e=e.sibling}function jm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Xt(t,n,a),t[Tt]=e,t[Ht]=a}catch(c){ct(e,e.return,c)}}var Pn=!1,Lt=!1,Sd=!1,Em=typeof WeakSet=="function"?WeakSet:Set,$t=null;function Yx(e,t){if(e=e.containerInfo,Yd=Dc,e=Co(e),tr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var i=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var x=0,T=-1,O=-1,P=0,ie=0,de=e,W=null;t:for(;;){for(var ae;de!==a||i!==0&&de.nodeType!==3||(T=x+i),de!==c||n!==0&&de.nodeType!==3||(O=x+n),de.nodeType===3&&(x+=de.nodeValue.length),(ae=de.firstChild)!==null;)W=de,de=ae;for(;;){if(de===e)break t;if(W===a&&++P===i&&(T=x),W===c&&++ie===n&&(O=x),(ae=de.nextSibling)!==null)break;de=W,W=de.parentNode}de=ae}a=T===-1||O===-1?null:{start:T,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for($d={focusedElem:e,selectionRange:a},Dc=!1,$t=t;$t!==null;)if(t=$t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$t=e;else for(;$t!==null;){switch(t=$t,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,i=c.memoizedProps,c=c.memoizedState,n=a.stateNode;try{var Se=Cs(a.type,i);e=n.getSnapshotBeforeUpdate(Se,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){ct(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Zd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Zd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,$t=e;break}$t=t.return}}function Tm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:In(e,a),n&4&&Ei(5,a);break;case 1:if(In(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){ct(a,a.return,x)}else{var i=Cs(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){ct(a,a.return,x)}}n&64&&bm(a),n&512&&Ti(a,a.return);break;case 3:if(In(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{oh(e,t)}catch(x){ct(a,a.return,x)}}break;case 27:t===null&&n&4&&jm(a);case 26:case 5:In(e,a),t===null&&n&4&&wm(a),n&512&&Ti(a,a.return);break;case 12:In(e,a);break;case 31:In(e,a),n&4&&Om(e,a);break;case 13:In(e,a),n&4&&Dm(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Xx.bind(null,a),xp(e,a))));break;case 22:if(n=a.memoizedState!==null||Pn,!n){t=t!==null&&t.memoizedState!==null||Lt,i=Pn;var c=Lt;Pn=n,(Lt=t)&&!c?Wn(e,a,(a.subtreeFlags&8772)!==0):In(e,a),Pn=i,Lt=c}break;case 30:break;default:In(e,a)}}function Mm(e){var t=e.alternate;t!==null&&(e.alternate=null,Mm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Fs(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 St=null,ya=!1;function Qn(e,t,a){for(a=a.child;a!==null;)Cm(e,t,a),a=a.sibling}function Cm(e,t,a){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Ge,a)}catch{}switch(a.tag){case 26:Lt||En(a,t),Qn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Lt||En(a,t);var n=St,i=ya;Hl(a.type)&&(St=a.stateNode,ya=!1),Qn(e,t,a),zi(a.stateNode),St=n,ya=i;break;case 5:Lt||En(a,t);case 6:if(n=St,i=ya,St=null,Qn(e,t,a),St=n,ya=i,St!==null)if(ya)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(a.stateNode)}catch(c){ct(a,t,c)}else try{St.removeChild(a.stateNode)}catch(c){ct(a,t,c)}break;case 18:St!==null&&(ya?(e=St,b0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Dr(e)):b0(St,a.stateNode));break;case 4:n=St,i=ya,St=a.stateNode.containerInfo,ya=!0,Qn(e,t,a),St=n,ya=i;break;case 0:case 11:case 14:case 15:Rl(2,a,t),Lt||Rl(4,a,t),Qn(e,t,a);break;case 1:Lt||(En(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&Sm(a,t,n)),Qn(e,t,a);break;case 21:Qn(e,t,a);break;case 22:Lt=(n=Lt)||a.memoizedState!==null,Qn(e,t,a),Lt=n;break;default:Qn(e,t,a)}}function Om(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Dr(e)}catch(a){ct(t,t.return,a)}}}function Dm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Dr(e)}catch(a){ct(t,t.return,a)}}function $x(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Em),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Em),t;default:throw Error(o(435,e.tag))}}function oc(e,t){var a=$x(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=Jx.bind(null,e,n);n.then(i,i)}})}function xa(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,x=t,T=x;e:for(;T!==null;){switch(T.tag){case 27:if(Hl(T.type)){St=T.stateNode,ya=!1;break e}break;case 5:St=T.stateNode,ya=!1;break e;case 3:case 4:St=T.stateNode.containerInfo,ya=!0;break e}T=T.return}if(St===null)throw Error(o(160));Cm(c,x,i),St=null,ya=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Rm(t,e),t=t.sibling}var cn=null;function Rm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:xa(t,e),pa(e),n&4&&(Rl(3,e,e.return),Ei(3,e),Rl(5,e,e.return));break;case 1:xa(t,e),pa(e),n&512&&(Lt||a===null||En(a,a.return)),n&64&&Pn&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var i=cn;if(xa(t,e),pa(e),n&512&&(Lt||a===null||En(a,a.return)),n&4){var c=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":c=i.getElementsByTagName("title")[0],(!c||c[Xl]||c[Tt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),Xt(c,n,a),c[Tt]=e,_t(c),n=c;break e;case"link":var x=R0("link","href",i).get(n+(a.href||""));if(x){for(var T=0;T<x.length;T++)if(c=x[T],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(T,1);break t}}c=i.createElement(n),Xt(c,n,a),i.head.appendChild(c);break;case"meta":if(x=R0("meta","content",i).get(n+(a.content||""))){for(T=0;T<x.length;T++)if(c=x[T],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(T,1);break t}}c=i.createElement(n),Xt(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[Tt]=e,_t(c),n=c}e.stateNode=n}else A0(i,e.type,e.stateNode);else e.stateNode=D0(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?A0(i,e.type,e.stateNode):D0(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&pd(e,e.memoizedProps,a.memoizedProps)}break;case 27:xa(t,e),pa(e),n&512&&(Lt||a===null||En(a,a.return)),a!==null&&n&4&&pd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(xa(t,e),pa(e),n&512&&(Lt||a===null||En(a,a.return)),e.flags&32){i=e.stateNode;try{tn(i,"")}catch(Se){ct(e,e.return,Se)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,pd(e,i,a!==null?a.memoizedProps:i)),n&1024&&(Sd=!0);break;case 6:if(xa(t,e),pa(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(Se){ct(e,e.return,Se)}}break;case 3:if(Tc=null,i=cn,cn=jc(t.containerInfo),xa(t,e),cn=i,pa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Dr(t.containerInfo)}catch(Se){ct(e,e.return,Se)}Sd&&(Sd=!1,Am(e));break;case 4:n=cn,cn=jc(e.stateNode.containerInfo),xa(t,e),pa(e),cn=n;break;case 12:xa(t,e),pa(e);break;case 31:xa(t,e),pa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 13:xa(t,e),pa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(fc=At()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 22:i=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,P=Pn,ie=Lt;if(Pn=P||i,Lt=ie||O,xa(t,e),Lt=ie,Pn=P,pa(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||O||Pn||Lt||Os(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){O=a=t;try{if(c=O.stateNode,i)x=c.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{T=O.stateNode;var de=O.memoizedProps.style,W=de!=null&&de.hasOwnProperty("display")?de.display:null;T.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(Se){ct(O,O.return,Se)}}}else if(t.tag===6){if(a===null){O=t;try{O.stateNode.nodeValue=i?"":O.memoizedProps}catch(Se){ct(O,O.return,Se)}}}else if(t.tag===18){if(a===null){O=t;try{var ae=O.stateNode;i?S0(ae,!0):S0(O.stateNode,!1)}catch(Se){ct(O,O.return,Se)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,oc(e,a))));break;case 19:xa(t,e),pa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,oc(e,n)));break;case 30:break;case 21:break;default:xa(t,e),pa(e)}}function pa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(Nm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=vd(e);cc(e,c,i);break;case 5:var x=a.stateNode;a.flags&32&&(tn(x,""),a.flags&=-33);var T=vd(e);cc(e,T,x);break;case 3:case 4:var O=a.stateNode.containerInfo,P=vd(e);bd(e,P,O);break;default:throw Error(o(161))}}catch(ie){ct(e,e.return,ie)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Am(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Am(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function In(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Tm(e,t.alternate,t),t=t.sibling}function Os(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Rl(4,t,t.return),Os(t);break;case 1:En(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Sm(t,t.return,a),Os(t);break;case 27:zi(t.stateNode);case 26:case 5:En(t,t.return),Os(t);break;case 22:t.memoizedState===null&&Os(t);break;case 30:Os(t);break;default:Os(t)}e=e.sibling}}function Wn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,x=c.flags;switch(c.tag){case 0:case 11:case 15:Wn(i,c,a),Ei(4,c);break;case 1:if(Wn(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(P){ct(n,n.return,P)}if(n=c,i=n.updateQueue,i!==null){var T=n.stateNode;try{var O=i.shared.hiddenCallbacks;if(O!==null)for(i.shared.hiddenCallbacks=null,i=0;i<O.length;i++)ch(O[i],T)}catch(P){ct(n,n.return,P)}}a&&x&64&&bm(c),Ti(c,c.return);break;case 27:jm(c);case 26:case 5:Wn(i,c,a),a&&n===null&&x&4&&wm(c),Ti(c,c.return);break;case 12:Wn(i,c,a);break;case 31:Wn(i,c,a),a&&x&4&&Om(i,c);break;case 13:Wn(i,c,a),a&&x&4&&Dm(i,c);break;case 22:c.memoizedState===null&&Wn(i,c,a),Ti(c,c.return);break;case 30:break;default:Wn(i,c,a)}t=t.sibling}}function wd(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&fi(a))}function Nd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fi(e))}function on(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)_m(e,t,a,n),t=t.sibling}function _m(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:on(e,t,a,n),i&2048&&Ei(9,t);break;case 1:on(e,t,a,n);break;case 3:on(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fi(e)));break;case 12:if(i&2048){on(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,x=c.id,T=c.onPostCommit;typeof T=="function"&&T(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){ct(t,t.return,O)}}else on(e,t,a,n);break;case 31:on(e,t,a,n);break;case 13:on(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,x=t.alternate,t.memoizedState!==null?c._visibility&2?on(e,t,a,n):Mi(e,t):c._visibility&2?on(e,t,a,n):(c._visibility|=2,vr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&wd(x,t);break;case 24:on(e,t,a,n),i&2048&&Nd(t.alternate,t);break;default:on(e,t,a,n)}}function vr(e,t,a,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,x=t,T=a,O=n,P=x.flags;switch(x.tag){case 0:case 11:case 15:vr(c,x,T,O,i),Ei(8,x);break;case 23:break;case 22:var ie=x.stateNode;x.memoizedState!==null?ie._visibility&2?vr(c,x,T,O,i):Mi(c,x):(ie._visibility|=2,vr(c,x,T,O,i)),i&&P&2048&&wd(x.alternate,x);break;case 24:vr(c,x,T,O,i),i&&P&2048&&Nd(x.alternate,x);break;default:vr(c,x,T,O,i)}t=t.sibling}}function Mi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:Mi(a,n),i&2048&&wd(n.alternate,n);break;case 24:Mi(a,n),i&2048&&Nd(n.alternate,n);break;default:Mi(a,n)}t=t.sibling}}var Ci=8192;function br(e,t,a){if(e.subtreeFlags&Ci)for(e=e.child;e!==null;)km(e,t,a),e=e.sibling}function km(e,t,a){switch(e.tag){case 26:br(e,t,a),e.flags&Ci&&e.memoizedState!==null&&Op(a,cn,e.memoizedState,e.memoizedProps);break;case 5:br(e,t,a);break;case 3:case 4:var n=cn;cn=jc(e.stateNode.containerInfo),br(e,t,a),cn=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Ci,Ci=16777216,br(e,t,a),Ci=n):br(e,t,a));break;default:br(e,t,a)}}function zm(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 Oi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];$t=n,Lm(n,e)}zm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Um(e),e=e.sibling}function Um(e){switch(e.tag){case 0:case 11:case 15:Oi(e),e.flags&2048&&Rl(9,e,e.return);break;case 3:Oi(e);break;case 12:Oi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,dc(e)):Oi(e);break;default:Oi(e)}}function dc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];$t=n,Lm(n,e)}zm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Rl(8,t,t.return),dc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,dc(t));break;default:dc(t)}e=e.sibling}}function Lm(e,t){for(;$t!==null;){var a=$t;switch(a.tag){case 0:case 11:case 15:Rl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:fi(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,$t=n;else e:for(a=e;$t!==null;){n=$t;var i=n.sibling,c=n.return;if(Mm(n),n===a){$t=null;break e}if(i!==null){i.return=c,$t=i;break e}$t=c}}}var Fx={getCacheForType:function(e){var t=It(kt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return It(kt).controller.signal}},Gx=typeof WeakMap=="function"?WeakMap:Map,nt=0,yt=null,$e=null,Qe=0,ut=0,Ca=null,Al=!1,Sr=!1,jd=!1,Xn=0,Et=0,_l=0,Ds=0,Ed=0,Oa=0,wr=0,Di=null,va=null,Td=!1,fc=0,Hm=0,hc=1/0,mc=null,kl=null,Vt=0,zl=null,Nr=null,Jn=0,Md=0,Cd=null,qm=null,Ri=0,Od=null;function Da(){return(nt&2)!==0&&Qe!==0?Qe&-Qe:B.T!==null?zd():$s()}function Vm(){if(Oa===0)if((Qe&536870912)===0||q){var e=Vs;Vs<<=1,(Vs&3932160)===0&&(Vs=262144),Oa=e}else Oa=536870912;return e=Ta.current,e!==null&&(e.flags|=32),Oa}function ba(e,t,a){(e===yt&&(ut===2||ut===9)||e.cancelPendingCommit!==null)&&(jr(e,0),Ul(e,Qe,Oa,!1)),ol(e,a),((nt&2)===0||e!==yt)&&(e===yt&&((nt&2)===0&&(Ds|=a),Et===4&&Ul(e,Qe,Oa,!1)),Tn(e))}function Bm(e,t,a){if((nt&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||cl(e,t),i=n?Qx(e,t):Rd(e,t,!0),c=n;do{if(i===0){Sr&&!n&&Ul(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Zx(a)){i=Rd(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var T=e;i=Di;var O=T.current.memoizedState.isDehydrated;if(O&&(jr(T,x).flags|=256),x=Rd(T,x,!1),x!==2){if(jd&&!O){T.errorRecoveryDisabledLanes|=c,Ds|=c,i=4;break e}c=va,va=i,c!==null&&(va===null?va=c:va.push.apply(va,c))}i=x}if(c=!1,i!==2)continue}}if(i===1){jr(e,0),Ul(e,t,0,!0);break}e:{switch(n=e,c=i,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ul(n,t,Oa,!Al);break e;case 2:va=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=fc+300-At(),10<i)){if(Ul(n,t,Oa,!Al),Il(n,0,!0)!==0)break e;Jn=t,n.timeoutHandle=p0(Ym.bind(null,n,a,va,mc,Td,t,Oa,Ds,wr,Al,c,"Throttled",-0,0),i);break e}Ym(n,a,va,mc,Td,t,Oa,Ds,wr,Al,c,null,-0,0)}}break}while(!0);Tn(e)}function Ym(e,t,a,n,i,c,x,T,O,P,ie,de,W,ae){if(e.timeoutHandle=-1,de=t.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:za},km(t,c,de);var Se=(c&62914560)===c?fc-At():(c&4194048)===c?Hm-At():0;if(Se=Dp(de,Se),Se!==null){Jn=c,e.cancelPendingCommit=Se(Wm.bind(null,e,t,c,a,n,i,x,T,O,ie,de,null,W,ae)),Ul(e,c,x,!P);return}}Wm(e,t,c,a,n,i,x,T,O)}function Zx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var i=a[n],c=i.getSnapshot;i=i.value;try{if(!ea(c(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ul(e,t,a,n){t&=~Ed,t&=~Ds,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-gt(i),x=1<<c;n[c]=-1,i&=~x}a!==0&&xt(e,a,t)}function gc(){return(nt&6)===0?(Ai(0),!1):!0}function Dd(){if($e!==null){if(ut===0)var e=$e.return;else e=$e,Ya=Bn=null,Zo(e),mr=null,mi=0,e=$e;for(;e!==null;)vm(e.alternate,e),e=e.return;$e=null}}function jr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,fp(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Jn=0,Dd(),yt=e,$e=a=qa(e.current,null),Qe=t,ut=0,Ca=null,Al=!1,Sr=cl(e,t),jd=!1,wr=Oa=Ed=Ds=_l=Et=0,va=Di=null,Td=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-gt(n),c=1<<i;t|=e[i],n&=~c}return Xn=t,jl(),a}function $m(e,t){Ve=null,B.H=wi,t===hr||t===Fu?(t=sh(),ut=3):t===ko?(t=sh(),ut=4):ut=t===ud?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ca=t,$e===null&&(Et=1,lc(e,ma(t,e.current)))}function Fm(){var e=Ta.current;return e===null?!0:(Qe&4194048)===Qe?Fa===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===Fa:!1}function Gm(){var e=B.H;return B.H=wi,e===null?wi:e}function Zm(){var e=B.A;return B.A=Fx,e}function yc(){Et=4,Al||(Qe&4194048)!==Qe&&Ta.current!==null||(Sr=!0),(_l&134217727)===0&&(Ds&134217727)===0||yt===null||Ul(yt,Qe,Oa,!1)}function Rd(e,t,a){var n=nt;nt|=2;var i=Gm(),c=Zm();(yt!==e||Qe!==t)&&(mc=null,jr(e,t)),t=!1;var x=Et;e:do try{if(ut!==0&&$e!==null){var T=$e,O=Ca;switch(ut){case 8:Dd(),x=6;break e;case 3:case 2:case 9:case 6:Ta.current===null&&(t=!0);var P=ut;if(ut=0,Ca=null,Er(e,T,O,P),a&&Sr){x=0;break e}break;default:P=ut,ut=0,Ca=null,Er(e,T,O,P)}}Px(),x=Et;break}catch(ie){$m(e,ie)}while(!0);return t&&e.shellSuspendCounter++,Ya=Bn=null,nt=n,B.H=i,B.A=c,$e===null&&(yt=null,Qe=0,jl()),x}function Px(){for(;$e!==null;)Pm($e)}function Qx(e,t){var a=nt;nt|=2;var n=Gm(),i=Zm();yt!==e||Qe!==t?(mc=null,hc=At()+500,jr(e,t)):Sr=cl(e,t);e:do try{if(ut!==0&&$e!==null){t=$e;var c=Ca;t:switch(ut){case 1:ut=0,Ca=null,Er(e,t,c,1);break;case 2:case 9:if(nh(c)){ut=0,Ca=null,Qm(t);break}t=function(){ut!==2&&ut!==9||yt!==e||(ut=7),Tn(e)},c.then(t,t);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:nh(c)?(ut=0,Ca=null,Qm(t)):(ut=0,Ca=null,Er(e,t,c,7));break;case 5:var x=null;switch($e.tag){case 26:x=$e.memoizedState;case 5:case 27:var T=$e;if(x?_0(x):T.stateNode.complete){ut=0,Ca=null;var O=T.sibling;if(O!==null)$e=O;else{var P=T.return;P!==null?($e=P,xc(P)):$e=null}break t}}ut=0,Ca=null,Er(e,t,c,5);break;case 6:ut=0,Ca=null,Er(e,t,c,6);break;case 8:Dd(),Et=6;break e;default:throw Error(o(462))}}Ix();break}catch(ie){$m(e,ie)}while(!0);return Ya=Bn=null,B.H=n,B.A=i,nt=a,$e!==null?0:(yt=null,Qe=0,jl(),Et)}function Ix(){for(;$e!==null&&!rl();)Pm($e)}function Pm(e){var t=xm(e.alternate,e,Xn);e.memoizedProps=e.pendingProps,t===null?xc(e):$e=t}function Qm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=dm(a,t,t.pendingProps,t.type,void 0,Qe);break;case 11:t=dm(a,t,t.pendingProps,t.type.render,t.ref,Qe);break;case 5:Zo(t);default:vm(a,t),t=$e=Vu(t,Xn),t=xm(a,t,Xn)}e.memoizedProps=e.pendingProps,t===null?xc(e):$e=t}function Er(e,t,a,n){Ya=Bn=null,Zo(t),mr=null,mi=0;var i=t.return;try{if(Lx(e,i,t,a,Qe)){Et=1,lc(e,ma(a,e.current)),$e=null;return}}catch(c){if(i!==null)throw $e=i,c;Et=1,lc(e,ma(a,e.current)),$e=null;return}t.flags&32768?(q||n===1?e=!0:Sr||(Qe&536870912)!==0?e=!1:(Al=e=!0,(n===2||n===9||n===3||n===6)&&(n=Ta.current,n!==null&&n.tag===13&&(n.flags|=16384))),Im(t,e)):xc(t)}function xc(e){var t=e;do{if((t.flags&32768)!==0){Im(t,Al);return}e=t.return;var a=Vx(t.alternate,t,Xn);if(a!==null){$e=a;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);Et===0&&(Et=5)}function Im(e,t){do{var a=Bx(e.alternate,e);if(a!==null){a.flags&=32767,$e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){$e=e;return}$e=e=a}while(e!==null);Et=6,$e=null}function Wm(e,t,a,n,i,c,x,T,O){e.cancelPendingCommit=null;do pc();while(Vt!==0);if((nt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=ps,fu(e,a,c,x,T,O),e===yt&&($e=yt=null,Qe=0),Nr=t,zl=e,Jn=a,Md=c,Cd=i,qm=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Kx(L,function(){return t0(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=B.T,B.T=null,i=ue.p,ue.p=2,x=nt,nt|=4;try{Yx(e,t,a)}finally{nt=x,ue.p=i,B.T=n}}Vt=1,Xm(),Jm(),Km()}}function Xm(){if(Vt===1){Vt=0;var e=zl,t=Nr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var n=ue.p;ue.p=2;var i=nt;nt|=4;try{Rm(t,e);var c=$d,x=Co(e.containerInfo),T=c.focusedElem,O=c.selectionRange;if(x!==T&&T&&T.ownerDocument&&Xe(T.ownerDocument.documentElement,T)){if(O!==null&&tr(T)){var P=O.start,ie=O.end;if(ie===void 0&&(ie=P),"selectionStart"in T)T.selectionStart=P,T.selectionEnd=Math.min(ie,T.value.length);else{var de=T.ownerDocument||document,W=de&&de.defaultView||window;if(W.getSelection){var ae=W.getSelection(),Se=T.textContent.length,Ae=Math.min(O.start,Se),mt=O.end===void 0?Ae:Math.min(O.end,Se);!ae.extend&&Ae>mt&&(x=mt,mt=Ae,Ae=x);var $=ku(T,Ae),H=ku(T,mt);if($&&H&&(ae.rangeCount!==1||ae.anchorNode!==$.node||ae.anchorOffset!==$.offset||ae.focusNode!==H.node||ae.focusOffset!==H.offset)){var Z=de.createRange();Z.setStart($.node,$.offset),ae.removeAllRanges(),Ae>mt?(ae.addRange(Z),ae.extend(H.node,H.offset)):(Z.setEnd(H.node,H.offset),ae.addRange(Z))}}}}for(de=[],ae=T;ae=ae.parentNode;)ae.nodeType===1&&de.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<de.length;T++){var oe=de[T];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Dc=!!Yd,$d=Yd=null}finally{nt=i,ue.p=n,B.T=a}}e.current=t,Vt=2}}function Jm(){if(Vt===2){Vt=0;var e=zl,t=Nr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var n=ue.p;ue.p=2;var i=nt;nt|=4;try{Tm(e,t.alternate,t)}finally{nt=i,ue.p=n,B.T=a}}Vt=3}}function Km(){if(Vt===4||Vt===3){Vt=0,il();var e=zl,t=Nr,a=Jn,n=qm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Vt=5:(Vt=0,Nr=zl=null,e0(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(kl=null),Kt(a),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Ge,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=B.T,i=ue.p,ue.p=2,B.T=null;try{for(var c=e.onRecoverableError,x=0;x<n.length;x++){var T=n[x];c(T.value,{componentStack:T.stack})}}finally{B.T=t,ue.p=i}}(Jn&3)!==0&&pc(),Tn(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===Od?Ri++:(Ri=0,Od=e):Ri=0,Ai(0)}}function e0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fi(t)))}function pc(){return Xm(),Jm(),Km(),t0()}function t0(){if(Vt!==5)return!1;var e=zl,t=Md;Md=0;var a=Kt(Jn),n=B.T,i=ue.p;try{ue.p=32>a?32:a,B.T=null,a=Cd,Cd=null;var c=zl,x=Jn;if(Vt=0,Nr=zl=null,Jn=0,(nt&6)!==0)throw Error(o(331));var T=nt;if(nt|=4,Um(c.current),_m(c,c.current,x,a),nt=T,Ai(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Ge,c)}catch{}return!0}finally{ue.p=i,B.T=n,e0(e,t)}}function a0(e,t,a){t=ma(a,t),t=id(e.stateNode,t,2),e=Cl(e,t,2),e!==null&&(ol(e,2),Tn(e))}function ct(e,t,a){if(e.tag===3)a0(e,e,a);else for(;t!==null;){if(t.tag===3){a0(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(kl===null||!kl.has(n))){e=ma(a,e),a=nm(2),n=Cl(t,a,2),n!==null&&(lm(a,n,t,e),ol(n,2),Tn(n));break}}t=t.return}}function Ad(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Gx;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(jd=!0,i.add(a),e=Wx.bind(null,e,t,a),t.then(e,e))}function Wx(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,yt===e&&(Qe&a)===a&&(Et===4||Et===3&&(Qe&62914560)===Qe&&300>At()-fc?(nt&2)===0&&jr(e,0):Ed|=a,wr===Qe&&(wr=0)),Tn(e)}function n0(e,t){t===0&&(t=Br()),e=Ha(e,t),e!==null&&(ol(e,t),Tn(e))}function Xx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),n0(e,a)}function Jx(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),n0(e,a)}function Kx(e,t){return mn(e,t)}var vc=null,Tr=null,_d=!1,bc=!1,kd=!1,Ll=0;function Tn(e){e!==Tr&&e.next===null&&(Tr===null?vc=Tr=e:Tr=Tr.next=e),bc=!0,_d||(_d=!0,tp())}function Ai(e,t){if(!kd&&bc){kd=!0;do for(var a=!1,n=vc;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var c=0;else{var x=n.suspendedLanes,T=n.pingedLanes;c=(1<<31-gt(42|e)+1)-1,c&=i&~(x&~T),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,i0(n,c))}else c=Qe,c=Il(n,n===yt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||cl(n,c)||(a=!0,i0(n,c));n=n.next}while(a);kd=!1}}function ep(){l0()}function l0(){bc=_d=!1;var e=0;Ll!==0&&dp()&&(e=Ll);for(var t=At(),a=null,n=vc;n!==null;){var i=n.next,c=s0(n,t);c===0?(n.next=null,a===null?vc=i:a.next=i,i===null&&(Tr=a)):(a=n,(e!==0||(c&3)!==0)&&(bc=!0)),n=i}Vt!==0&&Vt!==5||Ai(e),Ll!==0&&(Ll=0)}function s0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var x=31-gt(c),T=1<<x,O=i[x];O===-1?((T&a)===0||(T&n)!==0)&&(i[x]=du(T,t)):O<=t&&(e.expiredLanes|=T),c&=~T}if(t=yt,a=Qe,a=Il(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(ut===2||ut===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&gn(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||cl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&gn(n),Kt(a)){case 2:case 8:a=Dn;break;case 32:a=L;break;case 268435456:a=ve;break;default:a=L}return n=r0.bind(null,e),a=mn(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&gn(n),e.callbackPriority=2,e.callbackNode=null,2}function r0(e,t){if(Vt!==0&&Vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(pc()&&e.callbackNode!==a)return null;var n=Qe;return n=Il(e,e===yt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Bm(e,n,t),s0(e,At()),e.callbackNode!=null&&e.callbackNode===a?r0.bind(null,e):null)}function i0(e,t){if(pc())return null;Bm(e,t,!0)}function tp(){hp(function(){(nt&6)!==0?mn(On,ep):l0()})}function zd(){if(Ll===0){var e=dr;e===0&&(e=ul,ul<<=1,(ul&261888)===0&&(ul=256)),Ll=e}return Ll}function u0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ns(""+e)}function c0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function ap(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=u0((i[Ht]||null).action),x=n.submitter;x&&(t=(t=x[Ht]||null)?u0(t.formAction):x.getAttribute("formAction"),t!==null&&(c=t,x=null));var T=new is("action","action",null,n,i);e.push({event:T,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Ll!==0){var O=x?c0(i,x):new FormData(i);td(a,{pending:!0,data:O,method:i.method,action:c},null,O)}}else typeof c=="function"&&(T.preventDefault(),O=x?c0(i,x):new FormData(i),td(a,{pending:!0,data:O,method:i.method,action:c},c,O))},currentTarget:i}]})}}for(var Ud=0;Ud<ui.length;Ud++){var Ld=ui[Ud],np=Ld.toLowerCase(),lp=Ld[0].toUpperCase()+Ld.slice(1);ha(np,"on"+lp)}ha(Lu,"onAnimationEnd"),ha(Hu,"onAnimationIteration"),ha(lr,"onAnimationStart"),ha("dblclick","onDoubleClick"),ha("focusin","onFocus"),ha("focusout","onBlur"),ha(Oo,"onTransitionRun"),ha(Do,"onTransitionStart"),ha(qu,"onTransitionCancel"),ha(ri,"onTransitionEnd"),dl("onMouseEnter",["mouseout","mouseover"]),dl("onMouseLeave",["mouseout","mouseover"]),dl("onPointerEnter",["pointerout","pointerover"]),dl("onPointerLeave",["pointerout","pointerover"]),pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pn("onBeforeInput",["compositionend","keypress","textInput","paste"]),pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _i="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(" "),sp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_i));function o0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var x=n.length-1;0<=x;x--){var T=n[x],O=T.instance,P=T.currentTarget;if(T=T.listener,O!==c&&i.isPropagationStopped())break e;c=T,i.currentTarget=P;try{c(i)}catch(ie){Nl(ie)}i.currentTarget=null,c=O}else for(x=0;x<n.length;x++){if(T=n[x],O=T.instance,P=T.currentTarget,T=T.listener,O!==c&&i.isPropagationStopped())break e;c=T,i.currentTarget=P;try{c(i)}catch(ie){Nl(ie)}i.currentTarget=null,c=O}}}}function Fe(e,t){var a=t[Wl];a===void 0&&(a=t[Wl]=new Set);var n=e+"__bubble";a.has(n)||(d0(t,e,2,!1),a.add(n))}function Hd(e,t,a){var n=0;t&&(n|=4),d0(a,e,n,t)}var Sc="_reactListening"+Math.random().toString(36).slice(2);function qd(e){if(!e[Sc]){e[Sc]=!0,yu.forEach(function(a){a!=="selectionchange"&&(sp.has(a)||Hd(a,!1,e),Hd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sc]||(t[Sc]=!0,Hd("selectionchange",!1,t))}}function d0(e,t,a,n){switch(V0(t)){case 2:var i=_p;break;case 8:i=kp;break;default:i=ef}a=i.bind(null,t,a,e),i=void 0,!Xr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Vd(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var x=n.tag;if(x===3||x===4){var T=n.stateNode.containerInfo;if(T===i)break;if(x===4)for(x=n.return;x!==null;){var O=x.tag;if((O===3||O===4)&&x.stateNode.containerInfo===i)return;x=x.return}for(;T!==null;){if(x=An(T),x===null)return;if(O=x.tag,O===5||O===6||O===26||O===27){n=c=x;continue e}T=T.parentNode}}n=n.return}Wr(function(){var P=c,ie=Is(a),de=[];e:{var W=ii.get(e);if(W!==void 0){var ae=is,Se=e;switch(e){case"keypress":if(rs(a)===0)break e;case"keydown":case"keyup":ae=mo;break;case"focusin":Se="focus",ae=er;break;case"focusout":Se="blur",ae=er;break;case"beforeblur":case"afterblur":ae=er;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=wu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=lo;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=xo;break;case Lu:case Hu:case lr:ae=gl;break;case ri:ae=po;break;case"scroll":case"scrollend":ae=Jr;break;case"wheel":ae=bo;break;case"copy":case"cut":case"paste":ae=yl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=Nu;break;case"toggle":case"beforetoggle":ae=wo}var Ae=(t&4)!==0,mt=!Ae&&(e==="scroll"||e==="scrollend"),$=Ae?W!==null?W+"Capture":null:W;Ae=[];for(var H=P,Z;H!==null;){var oe=H;if(Z=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Z===null||$===null||(oe=ls(H,$),oe!=null&&Ae.push(ki(H,oe,Z))),mt)break;H=H.return}0<Ae.length&&(W=new ae(W,Se,null,a,ie),de.push({event:W,listeners:Ae}))}}if((t&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",W&&a!==Qr&&(Se=a.relatedTarget||a.fromElement)&&(An(Se)||Se[Rn]))break e;if((ae||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,ae?(Se=a.relatedTarget||a.toElement,ae=P,Se=Se?An(Se):null,Se!==null&&(mt=f(Se),Ae=Se.tag,Se!==mt||Ae!==5&&Ae!==27&&Ae!==6)&&(Se=null)):(ae=null,Se=P),ae!==Se)){if(Ae=wu,oe="onMouseLeave",$="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Nu,oe="onPointerLeave",$="onPointerEnter",H="pointer"),mt=ae==null?W:da(ae),Z=Se==null?W:da(Se),W=new Ae(oe,H+"leave",ae,a,ie),W.target=mt,W.relatedTarget=Z,oe=null,An(ie)===P&&(Ae=new Ae($,H+"enter",Se,a,ie),Ae.target=Z,Ae.relatedTarget=mt,oe=Ae),mt=oe,ae&&Se)t:{for(Ae=rp,$=ae,H=Se,Z=0,oe=$;oe;oe=Ae(oe))Z++;oe=0;for(var Ce=H;Ce;Ce=Ae(Ce))oe++;for(;0<Z-oe;)$=Ae($),Z--;for(;0<oe-Z;)H=Ae(H),oe--;for(;Z--;){if($===H||H!==null&&$===H.alternate){Ae=$;break t}$=Ae($),H=Ae(H)}Ae=null}else Ae=null;ae!==null&&f0(de,W,ae,Ae,!1),Se!==null&&mt!==null&&f0(de,mt,Se,Ae,!0)}}e:{if(W=P?da(P):window,ae=W.nodeName&&W.nodeName.toLowerCase(),ae==="select"||ae==="input"&&W.type==="file")var tt=Au;else if(Ru(W))if(wn)tt=pt;else{tt=bl;var we=Ze}else ae=W.nodeName,!ae||ae.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?P&&Qs(P.elementType)&&(tt=Au):tt=Mo;if(tt&&(tt=tt(e,P))){ei(de,tt,a,ie);break e}we&&we(e,W,P),e==="focusout"&&P&&W.type==="number"&&P.memoizedProps.value!=null&&Kl(W,"number",W.value)}switch(we=P?da(P):window,e){case"focusin":(Ru(we)||we.contentEditable==="true")&&(Sl=we,ar=P,Pt=null);break;case"focusout":Pt=ar=Sl=null;break;case"mousedown":nr=!0;break;case"contextmenu":case"mouseup":case"dragend":nr=!1,xs(de,a,ie);break;case"selectionchange":if(zu)break;case"keydown":case"keyup":xs(de,a,ie)}var Be;if(Kr)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else pl?Ou(e,a)&&(Ie="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(Tu&&a.locale!=="ko"&&(pl||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&pl&&(Be=qt()):(bn=ie,Ws="value"in bn?bn.value:bn.textContent,pl=!0)),we=wc(P,Ie),0<we.length&&(Ie=new xl(Ie,e,null,a,ie),de.push({event:Ie,listeners:we}),Be?Ie.data=Be:(Be=Du(a),Be!==null&&(Ie.data=Be)))),(Be=No?jo(e,a):Eo(e,a))&&(Ie=wc(P,"onBeforeInput"),0<Ie.length&&(we=new xl("onBeforeInput","beforeinput",null,a,ie),de.push({event:we,listeners:Ie}),we.data=Be)),ap(de,e,P,a,ie)}o0(de,t)})}function ki(e,t,a){return{instance:e,listener:t,currentTarget:a}}function wc(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=ls(e,a),i!=null&&n.unshift(ki(e,i,c)),i=ls(e,t),i!=null&&n.push(ki(e,i,c))),e.tag===3)return n;e=e.return}return[]}function rp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function f0(e,t,a,n,i){for(var c=t._reactName,x=[];a!==null&&a!==n;){var T=a,O=T.alternate,P=T.stateNode;if(T=T.tag,O!==null&&O===n)break;T!==5&&T!==26&&T!==27||P===null||(O=P,i?(P=ls(a,c),P!=null&&x.unshift(ki(a,P,O))):i||(P=ls(a,c),P!=null&&x.push(ki(a,P,O)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var ip=/\r\n?/g,up=/\u0000|\uFFFD/g;function h0(e){return(typeof e=="string"?e:""+e).replace(ip,`
|
|
49
|
+
`).replace(up,"")}function m0(e,t){return t=h0(t),h0(e)===t}function ht(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||tn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&tn(e,""+n);break;case"className":Gs(e,"class",n);break;case"tabIndex":Gs(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Gs(e,a,n);break;case"style":vu(e,n,c);break;case"data":if(t!=="object"){Gs(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ns(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(t!=="input"&&ht(e,t,"name",i.name,i,null),ht(e,t,"formEncType",i.formEncType,i,null),ht(e,t,"formMethod",i.formMethod,i,null),ht(e,t,"formTarget",i.formTarget,i,null)):(ht(e,t,"encType",i.encType,i,null),ht(e,t,"method",i.method,i,null),ht(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=ns(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=za);break;case"onScroll":n!=null&&Fe("scroll",e);break;case"onScrollEnd":n!=null&&Fe("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=ns(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":Fe("beforetoggle",e),Fe("toggle",e),Gt(e,"popover",n);break;case"xlinkActuate":it(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":it(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":it(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":it(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":it(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":it(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":it(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":it(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":it(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Gt(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=ao.get(a)||a,Gt(e,a,n))}}function Bd(e,t,a,n,i,c){switch(a){case"style":vu(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof n=="string"?tn(e,n):(typeof n=="number"||typeof n=="bigint")&&tn(e,""+n);break;case"onScroll":n!=null&&Fe("scroll",e);break;case"onScrollEnd":n!=null&&Fe("scrollend",e);break;case"onClick":n!=null&&(e.onclick=za);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),c=e[Ht]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof n=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Gt(e,a,n)}}}function Xt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fe("error",e),Fe("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var x=a[c];if(x!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ht(e,t,c,x,a,null)}}i&&ht(e,t,"srcSet",a.srcSet,a,null),n&&ht(e,t,"src",a.src,a,null);return;case"input":Fe("invalid",e);var T=c=x=i=null,O=null,P=null;for(n in a)if(a.hasOwnProperty(n)){var ie=a[n];if(ie!=null)switch(n){case"name":i=ie;break;case"type":x=ie;break;case"checked":O=ie;break;case"defaultChecked":P=ie;break;case"value":c=ie;break;case"defaultValue":T=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(o(137,t));break;default:ht(e,t,n,ie,a,null)}}hl(e,c,T,O,P,x,i,!1);return;case"select":Fe("invalid",e),n=x=c=null;for(i in a)if(a.hasOwnProperty(i)&&(T=a[i],T!=null))switch(i){case"value":c=T;break;case"defaultValue":x=T;break;case"multiple":n=T;default:ht(e,t,i,T,a,null)}t=c,a=x,e.multiple=!!n,t!=null?kn(e,!!n,t,!1):a!=null&&kn(e,!!n,a,!0);return;case"textarea":Fe("invalid",e),c=i=n=null;for(x in a)if(a.hasOwnProperty(x)&&(T=a[x],T!=null))switch(x){case"value":n=T;break;case"defaultValue":i=T;break;case"children":c=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(o(91));break;default:ht(e,t,x,T,a,null)}Pr(e,n,i,c);return;case"option":for(O in a)if(a.hasOwnProperty(O)&&(n=a[O],n!=null))switch(O){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:ht(e,t,O,n,a,null)}return;case"dialog":Fe("beforetoggle",e),Fe("toggle",e),Fe("cancel",e),Fe("close",e);break;case"iframe":case"object":Fe("load",e);break;case"video":case"audio":for(n=0;n<_i.length;n++)Fe(_i[n],e);break;case"image":Fe("error",e),Fe("load",e);break;case"details":Fe("toggle",e);break;case"embed":case"source":case"link":Fe("error",e),Fe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in a)if(a.hasOwnProperty(P)&&(n=a[P],n!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ht(e,t,P,n,a,null)}return;default:if(Qs(t)){for(ie in a)a.hasOwnProperty(ie)&&(n=a[ie],n!==void 0&&Bd(e,t,ie,n,a,void 0));return}}for(T in a)a.hasOwnProperty(T)&&(n=a[T],n!=null&&ht(e,t,T,n,a,null))}function cp(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,c=null,x=null,T=null,O=null,P=null,ie=null;for(ae in a){var de=a[ae];if(a.hasOwnProperty(ae)&&de!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":O=de;default:n.hasOwnProperty(ae)||ht(e,t,ae,null,n,de)}}for(var W in n){var ae=n[W];if(de=a[W],n.hasOwnProperty(W)&&(ae!=null||de!=null))switch(W){case"type":c=ae;break;case"name":i=ae;break;case"checked":P=ae;break;case"defaultChecked":ie=ae;break;case"value":x=ae;break;case"defaultValue":T=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:ae!==de&&ht(e,t,W,ae,n,de)}}Ps(e,x,T,O,P,ie,c,i);return;case"select":ae=x=T=W=null;for(c in a)if(O=a[c],a.hasOwnProperty(c)&&O!=null)switch(c){case"value":break;case"multiple":ae=O;default:n.hasOwnProperty(c)||ht(e,t,c,null,n,O)}for(i in n)if(c=n[i],O=a[i],n.hasOwnProperty(i)&&(c!=null||O!=null))switch(i){case"value":W=c;break;case"defaultValue":T=c;break;case"multiple":x=c;default:c!==O&&ht(e,t,i,c,n,O)}t=T,a=x,n=ae,W!=null?kn(e,!!a,W,!1):!!n!=!!a&&(t!=null?kn(e,!!a,t,!0):kn(e,!!a,a?[]:"",!1));return;case"textarea":ae=W=null;for(T in a)if(i=a[T],a.hasOwnProperty(T)&&i!=null&&!n.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:ht(e,t,T,null,n,i)}for(x in n)if(i=n[x],c=a[x],n.hasOwnProperty(x)&&(i!=null||c!=null))switch(x){case"value":W=i;break;case"defaultValue":ae=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&ht(e,t,x,i,n,c)}es(e,W,ae);return;case"option":for(var Se in a)if(W=a[Se],a.hasOwnProperty(Se)&&W!=null&&!n.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:ht(e,t,Se,null,n,W)}for(O in n)if(W=n[O],ae=a[O],n.hasOwnProperty(O)&&W!==ae&&(W!=null||ae!=null))switch(O){case"selected":e.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:ht(e,t,O,W,n,ae)}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 Ae in a)W=a[Ae],a.hasOwnProperty(Ae)&&W!=null&&!n.hasOwnProperty(Ae)&&ht(e,t,Ae,null,n,W);for(P in n)if(W=n[P],ae=a[P],n.hasOwnProperty(P)&&W!==ae&&(W!=null||ae!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(o(137,t));break;default:ht(e,t,P,W,n,ae)}return;default:if(Qs(t)){for(var mt in a)W=a[mt],a.hasOwnProperty(mt)&&W!==void 0&&!n.hasOwnProperty(mt)&&Bd(e,t,mt,void 0,n,W);for(ie in n)W=n[ie],ae=a[ie],!n.hasOwnProperty(ie)||W===ae||W===void 0&&ae===void 0||Bd(e,t,ie,W,n,ae);return}}for(var $ in a)W=a[$],a.hasOwnProperty($)&&W!=null&&!n.hasOwnProperty($)&&ht(e,t,$,null,n,W);for(de in n)W=n[de],ae=a[de],!n.hasOwnProperty(de)||W===ae||W==null&&ae==null||ht(e,t,de,W,n,ae)}function g0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function op(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),n=0;n<a.length;n++){var i=a[n],c=i.transferSize,x=i.initiatorType,T=i.duration;if(c&&T&&g0(x)){for(x=0,T=i.responseEnd,n+=1;n<a.length;n++){var O=a[n],P=O.startTime;if(P>T)break;var ie=O.transferSize,de=O.initiatorType;ie&&g0(de)&&(O=O.responseEnd,x+=ie*(O<T?1:(T-P)/(O-P)))}if(--n,t+=8*(c+x)/(i.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 Yd=null,$d=null;function Nc(e){return e.nodeType===9?e:e.ownerDocument}function y0(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 x0(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 Fd(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 Gd=null;function dp(){var e=window.event;return e&&e.type==="popstate"?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var p0=typeof setTimeout=="function"?setTimeout:void 0,fp=typeof clearTimeout=="function"?clearTimeout:void 0,v0=typeof Promise=="function"?Promise:void 0,hp=typeof queueMicrotask=="function"?queueMicrotask:typeof v0<"u"?function(e){return v0.resolve(null).then(e).catch(mp)}:p0;function mp(e){setTimeout(function(){throw e})}function Hl(e){return e==="head"}function b0(e,t){var a=t,n=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(n===0){e.removeChild(i),Dr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")zi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,zi(a);for(var c=a.firstChild;c;){var x=c.nextSibling,T=c.nodeName;c[Xl]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=x}}else a==="body"&&zi(e.ownerDocument.body);a=i}while(a);Dr(t)}function S0(e,t){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),n&&n.nodeType===8)if(a=n.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=n}while(a)}function Zd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Zd(a),Fs(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function gp(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[Xl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ga(e.nextSibling),e===null)break}return null}function yp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Ga(e.nextSibling),e===null))return null;return e}function w0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ga(e.nextSibling),e===null))return null;return e}function Pd(e){return e.data==="$?"||e.data==="$~"}function Qd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xp(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Ga(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 Id=null;function N0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Ga(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function j0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function E0(e,t,a){switch(t=Nc(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function zi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Fs(e)}var Za=new Map,T0=new Set;function jc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Kn=ue.d;ue.d={f:pp,r:vp,D:bp,C:Sp,L:wp,m:Np,X:Ep,S:jp,M:Tp};function pp(){var e=Kn.f(),t=gc();return e||t}function vp(e){var t=Oe(e);t!==null&&t.tag===5&&t.type==="form"?$h(t):Kn.r(e)}var Mr=typeof document>"u"?null:document;function M0(e,t,a){var n=Mr;if(n&&typeof t=="string"&&t){var i=Zt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),T0.has(i)||(T0.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),Xt(t,"link",e),_t(t),n.head.appendChild(t)))}}function bp(e){Kn.D(e),M0("dns-prefetch",e,null)}function Sp(e,t){Kn.C(e,t),M0("preconnect",e,t)}function wp(e,t,a){Kn.L(e,t,a);var n=Mr;if(n&&e&&t){var i='link[rel="preload"][as="'+Zt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Zt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Zt(a.imageSizes)+'"]')):i+='[href="'+Zt(e)+'"]';var c=i;switch(t){case"style":c=Cr(e);break;case"script":c=Or(e)}Za.has(c)||(e=E({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Za.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Ui(c))||t==="script"&&n.querySelector(Li(c))||(t=n.createElement("link"),Xt(t,"link",e),_t(t),n.head.appendChild(t)))}}function Np(e,t){Kn.m(e,t);var a=Mr;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Zt(n)+'"][href="'+Zt(e)+'"]',c=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Or(e)}if(!Za.has(c)&&(e=E({rel:"modulepreload",href:e},t),Za.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Li(c)))return}n=a.createElement("link"),Xt(n,"link",e),_t(n),a.head.appendChild(n)}}}function jp(e,t,a){Kn.S(e,t,a);var n=Mr;if(n&&e){var i=Ka(n).hoistableStyles,c=Cr(e);t=t||"default";var x=i.get(c);if(!x){var T={loading:0,preload:null};if(x=n.querySelector(Ui(c)))T.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Za.get(c))&&Wd(e,a);var O=x=n.createElement("link");_t(O),Xt(O,"link",e),O._p=new Promise(function(P,ie){O.onload=P,O.onerror=ie}),O.addEventListener("load",function(){T.loading|=1}),O.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Ec(x,t,n)}x={type:"stylesheet",instance:x,count:1,state:T},i.set(c,x)}}}function Ep(e,t){Kn.X(e,t);var a=Mr;if(a&&e){var n=Ka(a).hoistableScripts,i=Or(e),c=n.get(i);c||(c=a.querySelector(Li(i)),c||(e=E({src:e,async:!0},t),(t=Za.get(i))&&Xd(e,t),c=a.createElement("script"),_t(c),Xt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function Tp(e,t){Kn.M(e,t);var a=Mr;if(a&&e){var n=Ka(a).hoistableScripts,i=Or(e),c=n.get(i);c||(c=a.querySelector(Li(i)),c||(e=E({src:e,async:!0,type:"module"},t),(t=Za.get(i))&&Xd(e,t),c=a.createElement("script"),_t(c),Xt(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function C0(e,t,a,n){var i=(i=Ee.current)?jc(i):null;if(!i)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Cr(a.href),a=Ka(i).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Cr(a.href);var c=Ka(i).hoistableStyles,x=c.get(e);if(x||(i=i.ownerDocument||i,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,x),(c=i.querySelector(Ui(e)))&&!c._p&&(x.instance=c,x.state.loading=5),Za.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Za.set(e,a),c||Mp(i,e,a,x.state))),t&&n===null)throw Error(o(528,""));return x}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Or(a),a=Ka(i).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Cr(e){return'href="'+Zt(e)+'"'}function Ui(e){return'link[rel="stylesheet"]['+e+"]"}function O0(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Mp(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Xt(t,"link",a),_t(t),e.head.appendChild(t))}function Or(e){return'[src="'+Zt(e)+'"]'}function Li(e){return"script[async]"+e}function D0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Zt(a.href)+'"]');if(n)return t.instance=n,_t(n),n;var i=E({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),_t(n),Xt(n,"style",i),Ec(n,a.precedence,e),t.instance=n;case"stylesheet":i=Cr(a.href);var c=e.querySelector(Ui(i));if(c)return t.state.loading|=4,t.instance=c,_t(c),c;n=O0(a),(i=Za.get(i))&&Wd(n,i),c=(e.ownerDocument||e).createElement("link"),_t(c);var x=c;return x._p=new Promise(function(T,O){x.onload=T,x.onerror=O}),Xt(c,"link",n),t.state.loading|=4,Ec(c,a.precedence,e),t.instance=c;case"script":return c=Or(a.src),(i=e.querySelector(Li(c)))?(t.instance=i,_t(i),i):(n=a,(i=Za.get(c))&&(n=E({},a),Xd(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),_t(i),Xt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Ec(n,a.precedence,e));return t.instance}function Ec(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,c=i,x=0;x<n.length;x++){var T=n[x];if(T.dataset.precedence===t)c=T;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Wd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Tc=null;function R0(e,t,a){if(Tc===null){var n=new Map,i=Tc=new Map;i.set(a,n)}else i=Tc,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var c=a[i];if(!(c[Xl]||c[Tt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var x=c.getAttribute(t)||"";x=e+x;var T=n.get(x);T?T.push(c):n.set(x,[c])}}return n}function A0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Cp(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function _0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Op(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=Cr(n.href),c=t.querySelector(Ui(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Mc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,_t(c);return}c=t.ownerDocument||t,n=O0(n),(i=Za.get(i))&&Wd(n,i),c=c.createElement("link"),_t(c);var x=c;x._p=new Promise(function(T,O){x.onload=T,x.onerror=O}),Xt(c,"link",n),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Mc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Jd=0;function Dp(e,t){return e.stylesheets&&e.count===0&&Oc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Jd===0&&(Jd=62500*op());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Oc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Jd?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(i)}}:null}function Mc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cc=null;function Oc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cc=new Map,t.forEach(Rp,e),Cc=null,Mc.call(e))}function Rp(e,t){if(!(t.state.loading&4)){var a=Cc.get(e);if(a)var n=a.get(null);else{a=new Map,Cc.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var x=i[c];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),n=x)}n&&a.set(null,n)}i=t.instance,x=i.getAttribute("data-precedence"),c=a.get(x)||n,c===n&&a.set(null,i),a.set(x,i),this.count++,n=Mc.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Hi={$$typeof:G,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Ap(e,t,a,n,i,c,x,T,O){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=Bs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bs(0),this.hiddenUpdates=Bs(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function k0(e,t,a,n,i,c,x,T,O,P,ie,de){return e=new Ap(e,t,a,x,O,P,ie,de,T),t=1,c===!0&&(t|=24),c=Qt(3,null,null,t),e.current=c,c.stateNode=e,t=Ro(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},zo(c),e}function z0(e){return e?(e=Ea,e):Ea}function U0(e,t,a,n,i,c){i=z0(i),n.context===null?n.context=i:n.pendingContext=i,n=Ml(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=Cl(e,n,t),a!==null&&(ba(a,e,t),yi(a,e,t))}function L0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Kd(e,t){L0(e,t),(e=e.alternate)&&L0(e,t)}function H0(e){if(e.tag===13||e.tag===31){var t=Ha(e,67108864);t!==null&&ba(t,e,67108864),Kd(e,67108864)}}function q0(e){if(e.tag===13||e.tag===31){var t=Da();t=Ys(t);var a=Ha(e,t);a!==null&&ba(a,e,t),Kd(e,t)}}var Dc=!0;function _p(e,t,a,n){var i=B.T;B.T=null;var c=ue.p;try{ue.p=2,ef(e,t,a,n)}finally{ue.p=c,B.T=i}}function kp(e,t,a,n){var i=B.T;B.T=null;var c=ue.p;try{ue.p=8,ef(e,t,a,n)}finally{ue.p=c,B.T=i}}function ef(e,t,a,n){if(Dc){var i=tf(n);if(i===null)Vd(e,t,n,Rc,a),B0(e,n);else if(Up(i,e,t,a,n))n.stopPropagation();else if(B0(e,n),t&4&&-1<zp.indexOf(e)){for(;i!==null;){var c=Oe(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var x=xn(c.pendingLanes);if(x!==0){var T=c;for(T.pendingLanes|=2,T.entangledLanes|=2;x;){var O=1<<31-gt(x);T.entanglements[1]|=O,x&=~O}Tn(c),(nt&6)===0&&(hc=At()+500,Ai(0))}}break;case 31:case 13:T=Ha(c,2),T!==null&&ba(T,c,2),gc(),Kd(c,2)}if(c=tf(n),c===null&&Vd(e,t,n,Rc,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else Vd(e,t,n,null,a)}}function tf(e){return e=Is(e),af(e)}var Rc=null;function af(e){if(Rc=null,e=An(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=v(t),e!==null)return e;e=null}else if(a===31){if(e=N(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Rc=e,null}function V0(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(Xa()){case On:return 2;case Dn:return 8;case L:case fe:return 32;case ve:return 268435456;default:return 32}default:return 32}}var nf=!1,ql=null,Vl=null,Bl=null,qi=new Map,Vi=new Map,Yl=[],zp="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 B0(e,t){switch(e){case"focusin":case"focusout":ql=null;break;case"dragenter":case"dragleave":Vl=null;break;case"mouseover":case"mouseout":Bl=null;break;case"pointerover":case"pointerout":qi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vi.delete(t.pointerId)}}function Bi(e,t,a,n,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:c,targetContainers:[i]},t!==null&&(t=Oe(t),t!==null&&H0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Up(e,t,a,n,i){switch(t){case"focusin":return ql=Bi(ql,e,t,a,n,i),!0;case"dragenter":return Vl=Bi(Vl,e,t,a,n,i),!0;case"mouseover":return Bl=Bi(Bl,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return qi.set(c,Bi(qi.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,Vi.set(c,Bi(Vi.get(c)||null,e,t,a,n,i)),!0}return!1}function Y0(e){var t=An(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=v(a),t!==null){e.blockedOn=t,$r(e.priority,function(){q0(a)});return}}else if(t===31){if(t=N(a),t!==null){e.blockedOn=t,$r(e.priority,function(){q0(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ac(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=tf(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Qr=n,a.target.dispatchEvent(n),Qr=null}else return t=Oe(a),t!==null&&H0(t),e.blockedOn=a,!1;t.shift()}return!0}function $0(e,t,a){Ac(e)&&a.delete(t)}function Lp(){nf=!1,ql!==null&&Ac(ql)&&(ql=null),Vl!==null&&Ac(Vl)&&(Vl=null),Bl!==null&&Ac(Bl)&&(Bl=null),qi.forEach($0),Vi.forEach($0)}function _c(e,t){e.blockedOn===t&&(e.blockedOn=null,nf||(nf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Lp)))}var kc=null;function F0(e){kc!==e&&(kc=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){kc===e&&(kc=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(af(n||a)===null)continue;break}var c=Oe(a);c!==null&&(e.splice(t,3),t-=3,td(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Dr(e){function t(O){return _c(O,e)}ql!==null&&_c(ql,e),Vl!==null&&_c(Vl,e),Bl!==null&&_c(Bl,e),qi.forEach(t),Vi.forEach(t);for(var a=0;a<Yl.length;a++){var n=Yl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Yl.length&&(a=Yl[0],a.blockedOn===null);)Y0(a),a.blockedOn===null&&Yl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],c=a[n+1],x=i[Ht]||null;if(typeof c=="function")x||F0(a);else if(x){var T=null;if(c&&c.hasAttribute("formAction")){if(i=c,x=c[Ht]||null)T=x.formAction;else if(af(i)!==null)continue}else T=x.action;typeof T=="function"?a[n+1]=T:(a.splice(n,3),n-=3),F0(a)}}}function G0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(x){return i=x})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),n||setTimeout(a,20)}function a(){if(!n&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function lf(e){this._internalRoot=e}zc.prototype.render=lf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Da();U0(a,n,e,t,null,null)},zc.prototype.unmount=lf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;U0(e.current,2,null,e,null,null),gc(),t[Rn]=null}};function zc(e){this._internalRoot=e}zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=$s();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Yl.length&&t!==0&&t<Yl[a].priority;a++);Yl.splice(a,0,e),a===0&&Y0(e)}};var Z0=u.version;if(Z0!=="19.2.4")throw Error(o(527,Z0,"19.2.4"));ue.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=y(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var Hp={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Uc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Uc.isDisabled&&Uc.supportsFiber)try{Ge=Uc.inject(Hp),dt=Uc}catch{}}return $i.createRoot=function(e,t){if(!m(e))throw Error(o(299));var a=!1,n="",i=Kh,c=em,x=tm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=k0(e,1,!1,null,null,a,n,null,i,c,x,G0),e[Rn]=t.current,qd(e),new lf(t)},$i.hydrateRoot=function(e,t,a){if(!m(e))throw Error(o(299));var n=!1,i="",c=Kh,x=em,T=tm,O=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(T=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),t=k0(e,1,!0,t,a??null,n,i,O,c,x,T,G0),t.context=z0(null),a=t.current,n=Da(),n=Ys(n),i=Ml(n),i.callback=null,Cl(a,i,n),a=n,t.current.lanes=a,ol(t,a),Tn(t),e[Rn]=t.current,qd(e),new zc(t)},$i.version="19.2.4",$i}var lg;function Wp(){if(lg)return cf.exports;lg=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(u){console.error(u)}}return l(),cf.exports=Ip(),cf.exports}var Xp=Wp();const Jp=Af(Xp);/**
|
|
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 sg="popstate";function Kp(l={}){function u(m,f){let{pathname:v="/",search:N="",hash:b=""}=Ls(m.location.hash.substring(1));return!v.startsWith("/")&&!v.startsWith(".")&&(v="/"+v),Nf("",{pathname:v,search:N,hash:b},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(m,f){let v=m.document.querySelector("base"),N="";if(v&&v.getAttribute("href")){let b=m.location.href,y=b.indexOf("#");N=y===-1?b:b.slice(0,y)}return N+"#"+(typeof f=="string"?f:su(f))}function o(m,f){Pa(m.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return tv(u,d,o,l)}function wt(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Pa(l,u){if(!l){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function ev(){return Math.random().toString(36).substring(2,10)}function rg(l,u){return{usr:l.state,key:l.key,idx:u}}function Nf(l,u,d=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof u=="string"?Ls(u):u,state:d,key:u&&u.key||o||ev()}}function su({pathname:l="/",search:u="",hash:d=""}){return u&&u!=="?"&&(l+=u.charAt(0)==="?"?u:"?"+u),d&&d!=="#"&&(l+=d.charAt(0)==="#"?d:"#"+d),l}function Ls(l){let u={};if(l){let d=l.indexOf("#");d>=0&&(u.hash=l.substring(d),l=l.substring(0,d));let o=l.indexOf("?");o>=0&&(u.search=l.substring(o),l=l.substring(0,o)),l&&(u.pathname=l)}return u}function tv(l,u,d,o={}){let{window:m=document.defaultView,v5Compat:f=!1}=o,v=m.history,N="POP",b=null,y=w();y==null&&(y=0,v.replaceState({...v.state,idx:y},""));function w(){return(v.state||{idx:null}).idx}function E(){N="POP";let Y=w(),X=Y==null?null:Y-y;y=Y,b&&b({action:N,location:M.location,delta:X})}function S(Y,X){N="PUSH";let Q=Nf(M.location,Y,X);d&&d(Q,Y),y=w()+1;let G=rg(Q,y),ee=M.createHref(Q);try{v.pushState(G,"",ee)}catch(le){if(le instanceof DOMException&&le.name==="DataCloneError")throw le;m.location.assign(ee)}f&&b&&b({action:N,location:M.location,delta:1})}function D(Y,X){N="REPLACE";let Q=Nf(M.location,Y,X);d&&d(Q,Y),y=w();let G=rg(Q,y),ee=M.createHref(Q);v.replaceState(G,"",ee),f&&b&&b({action:N,location:M.location,delta:0})}function A(Y){return av(Y)}let M={get action(){return N},get location(){return l(m,v)},listen(Y){if(b)throw new Error("A history only accepts one active listener");return m.addEventListener(sg,E),b=Y,()=>{m.removeEventListener(sg,E),b=null}},createHref(Y){return u(m,Y)},createURL:A,encodeLocation(Y){let X=A(Y);return{pathname:X.pathname,search:X.search,hash:X.hash}},push:S,replace:D,go(Y){return v.go(Y)}};return M}function av(l,u=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),wt(d,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:su(l);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=d+o),new URL(o,d)}function sy(l,u,d="/"){return nv(l,u,d,!1)}function nv(l,u,d,o){let m=typeof u=="string"?Ls(u):u,f=ll(m.pathname||"/",d);if(f==null)return null;let v=ry(l);lv(v);let N=null;for(let b=0;N==null&&b<v.length;++b){let y=gv(f);N=hv(v[b],y,o)}return N}function ry(l,u=[],d=[],o="",m=!1){let f=(v,N,b=m,y)=>{let w={relativePath:y===void 0?v.path||"":y,caseSensitive:v.caseSensitive===!0,childrenIndex:N,route:v};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(o)&&b)return;wt(w.relativePath.startsWith(o),`Absolute route path "${w.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(o.length)}let E=nl([o,w.relativePath]),S=d.concat(w);v.children&&v.children.length>0&&(wt(v.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${E}".`),ry(v.children,u,S,E,b)),!(v.path==null&&!v.index)&&u.push({path:E,score:dv(E,v.index),routesMeta:S})};return l.forEach((v,N)=>{var b;if(v.path===""||!((b=v.path)!=null&&b.includes("?")))f(v,N);else for(let y of iy(v.path))f(v,N,!0,y)}),u}function iy(l){let u=l.split("/");if(u.length===0)return[];let[d,...o]=u,m=d.endsWith("?"),f=d.replace(/\?$/,"");if(o.length===0)return m?[f,""]:[f];let v=iy(o.join("/")),N=[];return N.push(...v.map(b=>b===""?f:[f,b].join("/"))),m&&N.push(...v),N.map(b=>l.startsWith("/")&&b===""?"/":b)}function lv(l){l.sort((u,d)=>u.score!==d.score?d.score-u.score:fv(u.routesMeta.map(o=>o.childrenIndex),d.routesMeta.map(o=>o.childrenIndex)))}var sv=/^:[\w-]+$/,rv=3,iv=2,uv=1,cv=10,ov=-2,ig=l=>l==="*";function dv(l,u){let d=l.split("/"),o=d.length;return d.some(ig)&&(o+=ov),u&&(o+=iv),d.filter(m=>!ig(m)).reduce((m,f)=>m+(sv.test(f)?rv:f===""?uv:cv),o)}function fv(l,u){return l.length===u.length&&l.slice(0,-1).every((o,m)=>o===u[m])?l[l.length-1]-u[u.length-1]:0}function hv(l,u,d=!1){let{routesMeta:o}=l,m={},f="/",v=[];for(let N=0;N<o.length;++N){let b=o[N],y=N===o.length-1,w=f==="/"?u:u.slice(f.length)||"/",E=Gc({path:b.relativePath,caseSensitive:b.caseSensitive,end:y},w),S=b.route;if(!E&&y&&d&&!o[o.length-1].route.index&&(E=Gc({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},w)),!E)return null;Object.assign(m,E.params),v.push({params:m,pathname:nl([f,E.pathname]),pathnameBase:vv(nl([f,E.pathnameBase])),route:S}),E.pathnameBase!=="/"&&(f=nl([f,E.pathnameBase]))}return v}function Gc(l,u){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,o]=mv(l.path,l.caseSensitive,l.end),m=u.match(d);if(!m)return null;let f=m[0],v=f.replace(/(.)\/+$/,"$1"),N=m.slice(1);return{params:o.reduce((y,{paramName:w,isOptional:E},S)=>{if(w==="*"){let A=N[S]||"";v=f.slice(0,f.length-A.length).replace(/(.)\/+$/,"$1")}const D=N[S];return E&&!D?y[w]=void 0:y[w]=(D||"").replace(/%2F/g,"/"),y},{}),pathname:f,pathnameBase:v,pattern:l}}function mv(l,u=!1,d=!0){Pa(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let o=[],m="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(v,N,b)=>(o.push({paramName:N,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(o.push({paramName:"*"}),m+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?m+="\\/*$":l!==""&&l!=="/"&&(m+="(?:(?=\\/|$))"),[new RegExp(m,u?void 0:"i"),o]}function gv(l){try{return l.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Pa(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${u}).`),l}}function ll(l,u){if(u==="/")return l;if(!l.toLowerCase().startsWith(u.toLowerCase()))return null;let d=u.endsWith("/")?u.length-1:u.length,o=l.charAt(d);return o&&o!=="/"?null:l.slice(d)||"/"}var yv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function xv(l,u="/"){let{pathname:d,search:o="",hash:m=""}=typeof l=="string"?Ls(l):l,f;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?f=ug(d.substring(1),"/"):f=ug(d,u)):f=u,{pathname:f,search:bv(o),hash:Sv(m)}}function ug(l,u){let d=u.replace(/\/+$/,"").split("/");return l.split("/").forEach(m=>{m===".."?d.length>1&&d.pop():m!=="."&&d.push(m)}),d.length>1?d.join("/"):"/"}function hf(l,u,d,o){return`Cannot include a '${l}' character in a manually specified \`to.${u}\` field [${JSON.stringify(o)}]. 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 pv(l){return l.filter((u,d)=>d===0||u.route.path&&u.route.path.length>0)}function kf(l){let u=pv(l);return u.map((d,o)=>o===u.length-1?d.pathname:d.pathnameBase)}function zf(l,u,d,o=!1){let m;typeof l=="string"?m=Ls(l):(m={...l},wt(!m.pathname||!m.pathname.includes("?"),hf("?","pathname","search",m)),wt(!m.pathname||!m.pathname.includes("#"),hf("#","pathname","hash",m)),wt(!m.search||!m.search.includes("#"),hf("#","search","hash",m)));let f=l===""||m.pathname==="",v=f?"/":m.pathname,N;if(v==null)N=d;else{let E=u.length-1;if(!o&&v.startsWith("..")){let S=v.split("/");for(;S[0]==="..";)S.shift(),E-=1;m.pathname=S.join("/")}N=E>=0?u[E]:"/"}let b=xv(m,N),y=v&&v!=="/"&&v.endsWith("/"),w=(f||v===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(y||w)&&(b.pathname+="/"),b}var nl=l=>l.join("/").replace(/\/\/+/g,"/"),vv=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),bv=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,Sv=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,wv=class{constructor(l,u,d,o=!1){this.status=l,this.statusText=u||"",this.internal=o,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function Nv(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function jv(l){return l.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var uy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cy(l,u){let d=l;if(typeof d!="string"||!yv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let o=d,m=!1;if(uy)try{let f=new URL(window.location.href),v=d.startsWith("//")?new URL(f.protocol+d):new URL(d),N=ll(v.pathname,u);v.origin===f.origin&&N!=null?d=N+v.search+v.hash:m=!0}catch{Pa(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:m,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var oy=["POST","PUT","PATCH","DELETE"];new Set(oy);var Ev=["GET",...oy];new Set(Ev);var Lr=V.createContext(null);Lr.displayName="DataRouter";var Wc=V.createContext(null);Wc.displayName="DataRouterState";var Tv=V.createContext(!1),dy=V.createContext({isTransitioning:!1});dy.displayName="ViewTransition";var Mv=V.createContext(new Map);Mv.displayName="Fetchers";var Cv=V.createContext(null);Cv.displayName="Await";var _a=V.createContext(null);_a.displayName="Navigation";var uu=V.createContext(null);uu.displayName="Location";var Cn=V.createContext({outlet:null,matches:[],isDataRoute:!1});Cn.displayName="Route";var Uf=V.createContext(null);Uf.displayName="RouteError";var fy="REACT_ROUTER_ERROR",Ov="REDIRECT",Dv="ROUTE_ERROR_RESPONSE";function Rv(l){if(l.startsWith(`${fy}:${Ov}:{`))try{let u=JSON.parse(l.slice(28));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string"&&typeof u.location=="string"&&typeof u.reloadDocument=="boolean"&&typeof u.replace=="boolean")return u}catch{}}function Av(l){if(l.startsWith(`${fy}:${Dv}:{`))try{let u=JSON.parse(l.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new wv(u.status,u.statusText,u.data)}catch{}}function _v(l,{relative:u}={}){wt(Hr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:o}=V.useContext(_a),{hash:m,pathname:f,search:v}=cu(l,{relative:u}),N=f;return d!=="/"&&(N=f==="/"?d:nl([d,f])),o.createHref({pathname:N,search:v,hash:m})}function Hr(){return V.useContext(uu)!=null}function Ql(){return wt(Hr(),"useLocation() may be used only in the context of a <Router> component."),V.useContext(uu).location}var hy="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function my(l){V.useContext(_a).static||V.useLayoutEffect(l)}function Lf(){let{isDataRoute:l}=V.useContext(Cn);return l?Zv():kv()}function kv(){wt(Hr(),"useNavigate() may be used only in the context of a <Router> component.");let l=V.useContext(Lr),{basename:u,navigator:d}=V.useContext(_a),{matches:o}=V.useContext(Cn),{pathname:m}=Ql(),f=JSON.stringify(kf(o)),v=V.useRef(!1);return my(()=>{v.current=!0}),V.useCallback((b,y={})=>{if(Pa(v.current,hy),!v.current)return;if(typeof b=="number"){d.go(b);return}let w=zf(b,JSON.parse(f),m,y.relative==="path");l==null&&u!=="/"&&(w.pathname=w.pathname==="/"?u:nl([u,w.pathname])),(y.replace?d.replace:d.push)(w,y.state,y)},[u,d,f,m,l])}V.createContext(null);function cu(l,{relative:u}={}){let{matches:d}=V.useContext(Cn),{pathname:o}=Ql(),m=JSON.stringify(kf(d));return V.useMemo(()=>zf(l,JSON.parse(m),o,u==="path"),[l,m,o,u])}function zv(l,u){return gy(l,u)}function gy(l,u,d,o,m){var Q;wt(Hr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=V.useContext(_a),{matches:v}=V.useContext(Cn),N=v[v.length-1],b=N?N.params:{},y=N?N.pathname:"/",w=N?N.pathnameBase:"/",E=N&&N.route;{let G=E&&E.path||"";xy(y,!E||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${y}" (under <Route path="${G}">) 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="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let S=Ql(),D;if(u){let G=typeof u=="string"?Ls(u):u;wt(w==="/"||((Q=G.pathname)==null?void 0:Q.startsWith(w)),`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 "${w}" but pathname "${G.pathname}" was given in the \`location\` prop.`),D=G}else D=S;let A=D.pathname||"/",M=A;if(w!=="/"){let G=w.replace(/^\//,"").split("/");M="/"+A.replace(/^\//,"").split("/").slice(G.length).join("/")}let Y=sy(l,{pathname:M});Pa(E||Y!=null,`No routes matched location "${D.pathname}${D.search}${D.hash}" `),Pa(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 "${D.pathname}${D.search}${D.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 X=Vv(Y&&Y.map(G=>Object.assign({},G,{params:Object.assign({},b,G.params),pathname:nl([w,f.encodeLocation?f.encodeLocation(G.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?w:nl([w,f.encodeLocation?f.encodeLocation(G.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),v,d,o,m);return u&&X?V.createElement(uu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...D},navigationType:"POP"}},X):X}function Uv(){let l=Gv(),u=Nv(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),d=l instanceof Error?l.stack:null,o="rgba(200,200,200, 0.5)",m={padding:"0.5rem",backgroundColor:o},f={padding:"2px 4px",backgroundColor:o},v=null;return console.error("Error handled by React Router default ErrorBoundary:",l),v=V.createElement(V.Fragment,null,V.createElement("p",null,"💿 Hey developer 👋"),V.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",V.createElement("code",{style:f},"ErrorBoundary")," or"," ",V.createElement("code",{style:f},"errorElement")," prop on your route.")),V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},u),d?V.createElement("pre",{style:m},d):null,v)}var Lv=V.createElement(Uv,null),yy=class extends V.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,u){return u.location!==l.location||u.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:u.error,location:u.location,revalidation:l.revalidation||u.revalidation}}componentDidCatch(l,u){this.props.onError?this.props.onError(l,u):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const d=Av(l.digest);d&&(l=d)}let u=l!==void 0?V.createElement(Cn.Provider,{value:this.props.routeContext},V.createElement(Uf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?V.createElement(Hv,{error:l},u):u}};yy.contextType=Tv;var mf=new WeakMap;function Hv({children:l,error:u}){let{basename:d}=V.useContext(_a);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=Rv(u.digest);if(o){let m=mf.get(u);if(m)throw m;let f=cy(o.location,d);if(uy&&!mf.get(u))if(f.isExternal||o.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const v=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:o.replace}));throw mf.set(u,v),v}return V.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function qv({routeContext:l,match:u,children:d}){let o=V.useContext(Lr);return o&&o.static&&o.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=u.route.id),V.createElement(Cn.Provider,{value:l},d)}function Vv(l,u=[],d=null,o=null,m=null){if(l==null){if(!d)return null;if(d.errors)l=d.matches;else if(u.length===0&&!d.initialized&&d.matches.length>0)l=d.matches;else return null}let f=l,v=d==null?void 0:d.errors;if(v!=null){let w=f.findIndex(E=>E.route.id&&(v==null?void 0:v[E.route.id])!==void 0);wt(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(v).join(",")}`),f=f.slice(0,Math.min(f.length,w+1))}let N=!1,b=-1;if(d)for(let w=0;w<f.length;w++){let E=f[w];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(b=w),E.route.id){let{loaderData:S,errors:D}=d,A=E.route.loader&&!S.hasOwnProperty(E.route.id)&&(!D||D[E.route.id]===void 0);if(E.route.lazy||A){N=!0,b>=0?f=f.slice(0,b+1):f=[f[0]];break}}}let y=d&&o?(w,E)=>{var S,D;o(w,{location:d.location,params:((D=(S=d.matches)==null?void 0:S[0])==null?void 0:D.params)??{},unstable_pattern:jv(d.matches),errorInfo:E})}:void 0;return f.reduceRight((w,E,S)=>{let D,A=!1,M=null,Y=null;d&&(D=v&&E.route.id?v[E.route.id]:void 0,M=E.route.errorElement||Lv,N&&(b<0&&S===0?(xy("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,Y=null):b===S&&(A=!0,Y=E.route.hydrateFallbackElement||null)));let X=u.concat(f.slice(0,S+1)),Q=()=>{let G;return D?G=M:A?G=Y:E.route.Component?G=V.createElement(E.route.Component,null):E.route.element?G=E.route.element:G=w,V.createElement(qv,{match:E,routeContext:{outlet:w,matches:X,isDataRoute:d!=null},children:G})};return d&&(E.route.ErrorBoundary||E.route.errorElement||S===0)?V.createElement(yy,{location:d.location,revalidation:d.revalidation,component:M,error:D,children:Q(),routeContext:{outlet:null,matches:X,isDataRoute:!0},onError:y}):Q()},null)}function Hf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bv(l){let u=V.useContext(Lr);return wt(u,Hf(l)),u}function Yv(l){let u=V.useContext(Wc);return wt(u,Hf(l)),u}function $v(l){let u=V.useContext(Cn);return wt(u,Hf(l)),u}function qf(l){let u=$v(l),d=u.matches[u.matches.length-1];return wt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function Fv(){return qf("useRouteId")}function Gv(){var o;let l=V.useContext(Uf),u=Yv("useRouteError"),d=qf("useRouteError");return l!==void 0?l:(o=u.errors)==null?void 0:o[d]}function Zv(){let{router:l}=Bv("useNavigate"),u=qf("useNavigate"),d=V.useRef(!1);return my(()=>{d.current=!0}),V.useCallback(async(m,f={})=>{Pa(d.current,hy),d.current&&(typeof m=="number"?await l.navigate(m):await l.navigate(m,{fromRouteId:u,...f}))},[l,u])}var cg={};function xy(l,u,d){!u&&!cg[l]&&(cg[l]=!0,Pa(!1,d))}V.memo(Pv);function Pv({routes:l,future:u,state:d,onError:o}){return gy(l,void 0,d,o,u)}function Qv({to:l,replace:u,state:d,relative:o}){wt(Hr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:m}=V.useContext(_a);Pa(!m,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=V.useContext(Cn),{pathname:v}=Ql(),N=Lf(),b=zf(l,kf(f),v,o==="path"),y=JSON.stringify(b);return V.useEffect(()=>{N(JSON.parse(y),{replace:u,state:d,relative:o})},[N,y,o,u,d]),null}function tl(l){wt(!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 Iv({basename:l="/",children:u=null,location:d,navigationType:o="POP",navigator:m,static:f=!1,unstable_useTransitions:v}){wt(!Hr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let N=l.replace(/^\/*/,"/"),b=V.useMemo(()=>({basename:N,navigator:m,static:f,unstable_useTransitions:v,future:{}}),[N,m,f,v]);typeof d=="string"&&(d=Ls(d));let{pathname:y="/",search:w="",hash:E="",state:S=null,key:D="default"}=d,A=V.useMemo(()=>{let M=ll(y,N);return M==null?null:{location:{pathname:M,search:w,hash:E,state:S,key:D},navigationType:o}},[N,y,w,E,S,D,o]);return Pa(A!=null,`<Router basename="${N}"> is not able to match the URL "${y}${w}${E}" because it does not start with the basename, so the <Router> won't render anything.`),A==null?null:V.createElement(_a.Provider,{value:b},V.createElement(uu.Provider,{children:u,value:A}))}function Wv({children:l,location:u}){return zv(jf(l),u)}function jf(l,u=[]){let d=[];return V.Children.forEach(l,(o,m)=>{if(!V.isValidElement(o))return;let f=[...u,m];if(o.type===V.Fragment){d.push.apply(d,jf(o.props.children,f));return}wt(o.type===tl,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),wt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let v={id:o.props.id||f.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(v.children=jf(o.props.children,f)),d.push(v)}),d}var $c="get",Fc="application/x-www-form-urlencoded";function Xc(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function Xv(l){return Xc(l)&&l.tagName.toLowerCase()==="button"}function Jv(l){return Xc(l)&&l.tagName.toLowerCase()==="form"}function Kv(l){return Xc(l)&&l.tagName.toLowerCase()==="input"}function eb(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function tb(l,u){return l.button===0&&(!u||u==="_self")&&!eb(l)}var Lc=null;function ab(){if(Lc===null)try{new FormData(document.createElement("form"),0),Lc=!1}catch{Lc=!0}return Lc}var nb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gf(l){return l!=null&&!nb.has(l)?(Pa(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Fc}"`),null):l}function lb(l,u){let d,o,m,f,v;if(Jv(l)){let N=l.getAttribute("action");o=N?ll(N,u):null,d=l.getAttribute("method")||$c,m=gf(l.getAttribute("enctype"))||Fc,f=new FormData(l)}else if(Xv(l)||Kv(l)&&(l.type==="submit"||l.type==="image")){let N=l.form;if(N==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=l.getAttribute("formaction")||N.getAttribute("action");if(o=b?ll(b,u):null,d=l.getAttribute("formmethod")||N.getAttribute("method")||$c,m=gf(l.getAttribute("formenctype"))||gf(N.getAttribute("enctype"))||Fc,f=new FormData(N,l),!ab()){let{name:y,type:w,value:E}=l;if(w==="image"){let S=y?`${y}.`:"";f.append(`${S}x`,"0"),f.append(`${S}y`,"0")}else y&&f.append(y,E)}}else{if(Xc(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=$c,o=null,m=Fc,v=l}return f&&m==="text/plain"&&(v=f,f=void 0),{action:o,method:d.toLowerCase(),encType:m,formData:f,body:v}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Vf(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function sb(l,u,d,o){let m=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return d?m.pathname.endsWith("/")?m.pathname=`${m.pathname}_.${o}`:m.pathname=`${m.pathname}.${o}`:m.pathname==="/"?m.pathname=`_root.${o}`:u&&ll(m.pathname,u)==="/"?m.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:m.pathname=`${m.pathname.replace(/\/$/,"")}.${o}`,m}async function rb(l,u){if(l.id in u)return u[l.id];try{let d=await import(l.module);return u[l.id]=d,d}catch(d){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ib(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function ub(l,u,d){let o=await Promise.all(l.map(async m=>{let f=u.routes[m.route.id];if(f){let v=await rb(f,d);return v.links?v.links():[]}return[]}));return fb(o.flat(1).filter(ib).filter(m=>m.rel==="stylesheet"||m.rel==="preload").map(m=>m.rel==="stylesheet"?{...m,rel:"prefetch",as:"style"}:{...m,rel:"prefetch"}))}function og(l,u,d,o,m,f){let v=(b,y)=>d[y]?b.route.id!==d[y].route.id:!0,N=(b,y)=>{var w;return d[y].pathname!==b.pathname||((w=d[y].route.path)==null?void 0:w.endsWith("*"))&&d[y].params["*"]!==b.params["*"]};return f==="assets"?u.filter((b,y)=>v(b,y)||N(b,y)):f==="data"?u.filter((b,y)=>{var E;let w=o.routes[b.route.id];if(!w||!w.hasLoader)return!1;if(v(b,y)||N(b,y))return!0;if(b.route.shouldRevalidate){let S=b.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((E=d[0])==null?void 0:E.params)||{},nextUrl:new URL(l,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof S=="boolean")return S}return!0}):[]}function cb(l,u,{includeHydrateFallback:d}={}){return ob(l.map(o=>{let m=u.routes[o.route.id];if(!m)return[];let f=[m.module];return m.clientActionModule&&(f=f.concat(m.clientActionModule)),m.clientLoaderModule&&(f=f.concat(m.clientLoaderModule)),d&&m.hydrateFallbackModule&&(f=f.concat(m.hydrateFallbackModule)),m.imports&&(f=f.concat(m.imports)),f}).flat(1))}function ob(l){return[...new Set(l)]}function db(l){let u={},d=Object.keys(l).sort();for(let o of d)u[o]=l[o];return u}function fb(l,u){let d=new Set;return new Set(u),l.reduce((o,m)=>{let f=JSON.stringify(db(m));return d.has(f)||(d.add(f),o.push({key:f,link:m})),o},[])}function py(){let l=V.useContext(Lr);return Vf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function hb(){let l=V.useContext(Wc);return Vf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Bf=V.createContext(void 0);Bf.displayName="FrameworkContext";function vy(){let l=V.useContext(Bf);return Vf(l,"You must render this element inside a <HydratedRouter> element"),l}function mb(l,u){let d=V.useContext(Bf),[o,m]=V.useState(!1),[f,v]=V.useState(!1),{onFocus:N,onBlur:b,onMouseEnter:y,onMouseLeave:w,onTouchStart:E}=u,S=V.useRef(null);V.useEffect(()=>{if(l==="render"&&v(!0),l==="viewport"){let M=X=>{X.forEach(Q=>{v(Q.isIntersecting)})},Y=new IntersectionObserver(M,{threshold:.5});return S.current&&Y.observe(S.current),()=>{Y.disconnect()}}},[l]),V.useEffect(()=>{if(o){let M=setTimeout(()=>{v(!0)},100);return()=>{clearTimeout(M)}}},[o]);let D=()=>{m(!0)},A=()=>{m(!1),v(!1)};return d?l!=="intent"?[f,S,{}]:[f,S,{onFocus:Fi(N,D),onBlur:Fi(b,A),onMouseEnter:Fi(y,D),onMouseLeave:Fi(w,A),onTouchStart:Fi(E,D)}]:[!1,S,{}]}function Fi(l,u){return d=>{l&&l(d),d.defaultPrevented||u(d)}}function gb({page:l,...u}){let{router:d}=py(),o=V.useMemo(()=>sy(d.routes,l,d.basename),[d.routes,l,d.basename]);return o?V.createElement(xb,{page:l,matches:o,...u}):null}function yb(l){let{manifest:u,routeModules:d}=vy(),[o,m]=V.useState([]);return V.useEffect(()=>{let f=!1;return ub(l,u,d).then(v=>{f||m(v)}),()=>{f=!0}},[l,u,d]),o}function xb({page:l,matches:u,...d}){let o=Ql(),{future:m,manifest:f,routeModules:v}=vy(),{basename:N}=py(),{loaderData:b,matches:y}=hb(),w=V.useMemo(()=>og(l,u,y,f,o,"data"),[l,u,y,f,o]),E=V.useMemo(()=>og(l,u,y,f,o,"assets"),[l,u,y,f,o]),S=V.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let M=new Set,Y=!1;if(u.forEach(Q=>{var ee;let G=f.routes[Q.route.id];!G||!G.hasLoader||(!w.some(le=>le.route.id===Q.route.id)&&Q.route.id in b&&((ee=v[Q.route.id])!=null&&ee.shouldRevalidate)||G.hasClientLoader?Y=!0:M.add(Q.route.id))}),M.size===0)return[];let X=sb(l,N,m.unstable_trailingSlashAwareDataRequests,"data");return Y&&M.size>0&&X.searchParams.set("_routes",u.filter(Q=>M.has(Q.route.id)).map(Q=>Q.route.id).join(",")),[X.pathname+X.search]},[N,m.unstable_trailingSlashAwareDataRequests,b,o,f,w,u,l,v]),D=V.useMemo(()=>cb(E,f),[E,f]),A=yb(E);return V.createElement(V.Fragment,null,S.map(M=>V.createElement("link",{key:M,rel:"prefetch",as:"fetch",href:M,...d})),D.map(M=>V.createElement("link",{key:M,rel:"modulepreload",href:M,...d})),A.map(({key:M,link:Y})=>V.createElement("link",{key:M,nonce:d.nonce,...Y,crossOrigin:Y.crossOrigin??d.crossOrigin})))}function pb(...l){return u=>{l.forEach(d=>{typeof d=="function"?d(u):d!=null&&(d.current=u)})}}var vb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vb&&(window.__reactRouterVersion="7.13.0")}catch{}function bb({basename:l,children:u,unstable_useTransitions:d,window:o}){let m=V.useRef();m.current==null&&(m.current=Kp({window:o,v5Compat:!0}));let f=m.current,[v,N]=V.useState({action:f.action,location:f.location}),b=V.useCallback(y=>{d===!1?N(y):V.startTransition(()=>N(y))},[d]);return V.useLayoutEffect(()=>f.listen(b),[f,b]),V.createElement(Iv,{basename:l,children:u,location:v.location,navigationType:v.action,navigator:f,unstable_useTransitions:d})}var by=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sy=V.forwardRef(function({onClick:u,discover:d="render",prefetch:o="none",relative:m,reloadDocument:f,replace:v,state:N,target:b,to:y,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:S,...D},A){let{basename:M,unstable_useTransitions:Y}=V.useContext(_a),X=typeof y=="string"&&by.test(y),Q=cy(y,M);y=Q.to;let G=_v(y,{relative:m}),[ee,le,te]=mb(o,D),I=Nb(y,{replace:v,state:N,target:b,preventScrollReset:w,relative:m,viewTransition:E,unstable_defaultShouldRevalidate:S,unstable_useTransitions:Y});function J(U){u&&u(U),U.defaultPrevented||I(U)}let R=V.createElement("a",{...D,...te,href:Q.absoluteURL||G,onClick:Q.isExternal||f?u:J,ref:pb(A,le),target:b,"data-discover":!X&&d==="render"?"true":void 0});return ee&&!X?V.createElement(V.Fragment,null,R,V.createElement(gb,{page:G})):R});Sy.displayName="Link";var wy=V.forwardRef(function({"aria-current":u="page",caseSensitive:d=!1,className:o="",end:m=!1,style:f,to:v,viewTransition:N,children:b,...y},w){let E=cu(v,{relative:y.relative}),S=Ql(),D=V.useContext(Wc),{navigator:A,basename:M}=V.useContext(_a),Y=D!=null&&Cb(E)&&N===!0,X=A.encodeLocation?A.encodeLocation(E).pathname:E.pathname,Q=S.pathname,G=D&&D.navigation&&D.navigation.location?D.navigation.location.pathname:null;d||(Q=Q.toLowerCase(),G=G?G.toLowerCase():null,X=X.toLowerCase()),G&&M&&(G=ll(G,M)||G);const ee=X!=="/"&&X.endsWith("/")?X.length-1:X.length;let le=Q===X||!m&&Q.startsWith(X)&&Q.charAt(ee)==="/",te=G!=null&&(G===X||!m&&G.startsWith(X)&&G.charAt(X.length)==="/"),I={isActive:le,isPending:te,isTransitioning:Y},J=le?u:void 0,R;typeof o=="function"?R=o(I):R=[o,le?"active":null,te?"pending":null,Y?"transitioning":null].filter(Boolean).join(" ");let U=typeof f=="function"?f(I):f;return V.createElement(Sy,{...y,"aria-current":J,className:R,ref:w,style:U,to:v,viewTransition:N},typeof b=="function"?b(I):b)});wy.displayName="NavLink";var Sb=V.forwardRef(({discover:l="render",fetcherKey:u,navigate:d,reloadDocument:o,replace:m,state:f,method:v=$c,action:N,onSubmit:b,relative:y,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:S,...D},A)=>{let{unstable_useTransitions:M}=V.useContext(_a),Y=Tb(),X=Mb(N,{relative:y}),Q=v.toLowerCase()==="get"?"get":"post",G=typeof N=="string"&&by.test(N),ee=le=>{if(b&&b(le),le.defaultPrevented)return;le.preventDefault();let te=le.nativeEvent.submitter,I=(te==null?void 0:te.getAttribute("formmethod"))||v,J=()=>Y(te||le.currentTarget,{fetcherKey:u,method:I,navigate:d,replace:m,state:f,relative:y,preventScrollReset:w,viewTransition:E,unstable_defaultShouldRevalidate:S});M&&d!==!1?V.startTransition(()=>J()):J()};return V.createElement("form",{ref:A,method:Q,action:X,onSubmit:o?b:ee,...D,"data-discover":!G&&l==="render"?"true":void 0})});Sb.displayName="Form";function wb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ny(l){let u=V.useContext(Lr);return wt(u,wb(l)),u}function Nb(l,{target:u,replace:d,state:o,preventScrollReset:m,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:N,unstable_useTransitions:b}={}){let y=Lf(),w=Ql(),E=cu(l,{relative:f});return V.useCallback(S=>{if(tb(S,u)){S.preventDefault();let D=d!==void 0?d:su(w)===su(E),A=()=>y(l,{replace:D,state:o,preventScrollReset:m,relative:f,viewTransition:v,unstable_defaultShouldRevalidate:N});b?V.startTransition(()=>A()):A()}},[w,y,E,d,o,u,l,m,f,v,N,b])}var jb=0,Eb=()=>`__${String(++jb)}__`;function Tb(){let{router:l}=Ny("useSubmit"),{basename:u}=V.useContext(_a),d=Fv(),o=l.fetch,m=l.navigate;return V.useCallback(async(f,v={})=>{let{action:N,method:b,encType:y,formData:w,body:E}=lb(f,u);if(v.navigate===!1){let S=v.fetcherKey||Eb();await o(S,d,v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:w,body:E,formMethod:v.method||b,formEncType:v.encType||y,flushSync:v.flushSync})}else await m(v.action||N,{unstable_defaultShouldRevalidate:v.unstable_defaultShouldRevalidate,preventScrollReset:v.preventScrollReset,formData:w,body:E,formMethod:v.method||b,formEncType:v.encType||y,replace:v.replace,state:v.state,fromRouteId:d,flushSync:v.flushSync,viewTransition:v.viewTransition})},[o,m,u,d])}function Mb(l,{relative:u}={}){let{basename:d}=V.useContext(_a),o=V.useContext(Cn);wt(o,"useFormAction must be used inside a RouteContext");let[m]=o.matches.slice(-1),f={...cu(l||".",{relative:u})},v=Ql();if(l==null){f.search=v.search;let N=new URLSearchParams(f.search),b=N.getAll("index");if(b.some(w=>w==="")){N.delete("index"),b.filter(E=>E).forEach(E=>N.append("index",E));let w=N.toString();f.search=w?`?${w}`:""}}return(!l||l===".")&&m.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(f.pathname=f.pathname==="/"?d:nl([d,f.pathname])),su(f)}function Cb(l,{relative:u}={}){let d=V.useContext(dy);wt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=Ny("useViewTransitionState"),m=cu(l,{relative:u});if(!d.isTransitioning)return!1;let f=ll(d.currentLocation.pathname,o)||d.currentLocation.pathname,v=ll(d.nextLocation.pathname,o)||d.nextLocation.pathname;return Gc(m.pathname,v)!=null||Gc(m.pathname,f)!=null}var Ob=ly();const Db=Af(Ob);/**
|
|
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 jy=(...l)=>l.filter((u,d,o)=>!!u&&u.trim()!==""&&o.indexOf(u)===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 Rb=l=>l.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 Ab=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(u,d,o)=>o?o.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 dg=l=>{const u=Ab(l);return u.charAt(0).toUpperCase()+u.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 _b={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 kb=l=>{for(const u in l)if(u.startsWith("aria-")||u==="role"||u==="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 zb=V.forwardRef(({color:l="currentColor",size:u=24,strokeWidth:d=2,absoluteStrokeWidth:o,className:m="",children:f,iconNode:v,...N},b)=>V.createElement("svg",{ref:b,..._b,width:u,height:u,stroke:l,strokeWidth:o?Number(d)*24/Number(u):d,className:jy("lucide",m),...!f&&!kb(N)&&{"aria-hidden":"true"},...N},[...v.map(([y,w])=>V.createElement(y,w)),...Array.isArray(f)?f:[f]]));/**
|
|
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 _e=(l,u)=>{const d=V.forwardRef(({className:o,...m},f)=>V.createElement(zb,{ref:f,iconNode:u,className:jy(`lucide-${Rb(dg(l))}`,`lucide-${l}`,o),...m}));return d.displayName=dg(l),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 Ub=[["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"}]],Ey=_e("activity",Ub);/**
|
|
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 Lb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Hb=_e("arrow-down",Lb);/**
|
|
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 qb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],fg=_e("arrow-right",qb);/**
|
|
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 Vb=[["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"}]],Bb=_e("arrow-up-down",Vb);/**
|
|
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 Yb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],$b=_e("arrow-up",Yb);/**
|
|
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 Fb=[["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"}]],Gb=_e("bell",Fb);/**
|
|
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 Zb=[["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"}]],hg=_e("briefcase",Zb);/**
|
|
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 Pb=[["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"}]],Yf=_e("calendar",Pb);/**
|
|
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 Qb=[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V3",key:"1lcnhd"}],["path",{d:"M19 21V9",key:"unv183"}]],Ib=_e("chart-no-axes-column",Qb);/**
|
|
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 Wb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ef=_e("check",Wb);/**
|
|
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 Xb=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ty=_e("chevron-down",Xb);/**
|
|
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 Jb=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Kb=_e("chevron-left",Jb);/**
|
|
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 e1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],t1=_e("chevron-right",e1);/**
|
|
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 a1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],n1=_e("chevron-up",a1);/**
|
|
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 l1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],s1=_e("chevrons-up-down",l1);/**
|
|
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 r1=[["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"}]],sl=_e("circle-alert",r1);/**
|
|
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 i1=[["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"}]],mg=_e("circle-arrow-down",i1);/**
|
|
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 u1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ou=_e("circle-check-big",u1);/**
|
|
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 c1=[["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"}]],o1=_e("circle-x",c1);/**
|
|
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 d1=[["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"}]],gg=_e("clipboard-list",d1);/**
|
|
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 f1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Zc=_e("clock",f1);/**
|
|
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 h1=[["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"}]],My=_e("external-link",h1);/**
|
|
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 m1=[["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"}]],g1=_e("eye-off",m1);/**
|
|
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 y1=[["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"}]],x1=_e("eye",y1);/**
|
|
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 p1=[["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"}]],Tf=_e("file-text",p1);/**
|
|
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 v1=[["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"}]],b1=_e("git-pull-request",v1);/**
|
|
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 S1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],w1=_e("globe",S1);/**
|
|
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 N1=[["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"}]],j1=_e("house",N1);/**
|
|
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 E1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],T1=_e("info",E1);/**
|
|
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 M1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],C1=_e("kanban",M1);/**
|
|
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 O1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Cy=_e("loader-circle",O1);/**
|
|
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 D1=[["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"}]],Oy=_e("map",D1);/**
|
|
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 R1=[["path",{d:"M5 12h14",key:"1ays0h"}]],A1=_e("minus",R1);/**
|
|
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 _1=[["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"}]],Dy=_e("pause",_1);/**
|
|
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 k1=[["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"}]],$f=_e("pen",k1);/**
|
|
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 z1=[["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"}]],zr=_e("play",z1);/**
|
|
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 U1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qr=_e("plus",U1);/**
|
|
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 L1=[["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"}]],Ry=_e("rotate-ccw",L1);/**
|
|
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 H1=[["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"}]],q1=_e("save",H1);/**
|
|
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 V1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jc=_e("search",V1);/**
|
|
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 B1=[["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"}]],Y1=_e("settings",B1);/**
|
|
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 $1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],yg=_e("square",$1);/**
|
|
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 F1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],G1=_e("terminal",F1);/**
|
|
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 Z1=[["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"}]],P1=_e("test-tube-diagonal",Z1);/**
|
|
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 Q1=[["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"}]],Kc=_e("trash-2",Q1);/**
|
|
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 I1=[["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"}]],ru=_e("triangle-alert",I1);/**
|
|
331
|
+
* @license lucide-react v0.564.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const W1=[["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"}]],X1=_e("wifi",W1);/**
|
|
336
|
+
* @license lucide-react v0.564.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const J1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Vr=_e("x",J1),Ff="";let Gf=!1,Pc=null;function K1(l){Gf=l}function xg(l){Pc=l}function e2(){return Gf}function Zf(l){return encodeURIComponent(l.replace(/\//g,"~"))}function bt(l){return Gf&&Pc?l.replace("/api/",`/api/projects/${Zf(Pc)}/`):l}function t2(){return rt("/api/mode")}function Ay(){return rt("/api/projects")}function a2(l){const u=Zf(l);return rt(`/api/projects/${u}`,{method:"DELETE"})}async function rt(l,u){const d=`${Ff}${l}`,o=await fetch(d,{headers:{"Content-Type":"application/json",...u==null?void 0:u.headers},...u});if(!o.ok){const m=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(m.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function yf(){return rt(bt("/api/status"))}function _y(){return rt(bt("/api/prs"))}function n2(l,u){const d=`?lines=${encodeURIComponent(u)}`;return rt(bt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Pf(){return rt(bt("/api/config"))}async function ky(){if(e2()){const u=(await Ay()).filter(o=>o.valid);return(await Promise.all(u.map(async o=>{try{const m=await rt(`/api/projects/${Zf(o.name)}/config`);return{projectId:o.name,config:m}}catch(m){return console.error(`Failed to fetch config for project ${o.name}`,m),null}}))).filter(o=>o!==null)}else{const l=await Pf();return[{projectId:Pc||"current",config:l}]}}function al(l){return rt(bt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function l2(){return rt(bt("/api/doctor"))}function zy(){return rt(bt("/api/schedule-info"))}function Uy(){return rt(bt("/api/actions/run"),{method:"POST"})}function Qf(){return rt(bt("/api/actions/review"),{method:"POST"})}function Ly(){return rt(bt("/api/actions/qa"),{method:"POST"})}function Hy(){return rt(bt("/api/actions/audit"),{method:"POST"})}function qy(){return rt(bt("/api/actions/analytics"),{method:"POST"})}function Vy(){return rt(bt("/api/actions/planner"),{method:"POST"})}function lu(){return rt(bt("/api/actions/install-cron"),{method:"POST"})}function s2(){return rt(bt("/api/actions/uninstall-cron"),{method:"POST"})}function r2(l="all"){return rt(bt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Pl=["Draft","Ready","In Progress","Review","Done"];function By(){return rt(bt("/api/board/status"))}function i2(l){return rt(bt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Yy(l,u){return rt(bt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:u})})}async function u2(l){const u=`${Ff}${bt(`/api/board/issues/${l}`)}`,d=await fetch(u,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!d.ok){const o=await d.json().catch(()=>({error:"Unknown error"}));throw new Error(o.error||`HTTP ${d.status}: ${d.statusText}`)}}function c2(){return rt(bt("/api/actions/clear-lock"),{method:"POST"})}function o2(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,m=V.useRef(l);m.current=l,V.useEffect(()=>{if(!o)return;const f=`${Ff}${bt("/api/status/events")}`,v=new EventSource(f);return v.addEventListener("status_changed",N=>{try{const b=JSON.parse(N.data);m.current(b)}catch{}}),()=>{v.close()}},[o,...u])}function d2(){return rt("/api/queue/status")}function f2(l){const u=`?window=${encodeURIComponent(l)}`;return rt(`/api/queue/analytics${u}`)}function h2(){return rt("/api/global-notifications")}function pg(l){return rt("/api/global-notifications",{method:"PUT",body:JSON.stringify(l)})}function m2(){return rt(bt("/api/roadmap"))}function g2(){return rt(bt("/api/roadmap/scan"),{method:"POST"})}function $y(l){return rt(bt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function fn(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,[m,f]=V.useState(null),[v,N]=V.useState(!0),[b,y]=V.useState(null),w=V.useRef(l);w.current=l;const E=V.useRef(()=>{(async()=>{y(null);try{const D=await w.current();f(D)}catch(D){y(D instanceof Error?D:new Error("Unknown error"))}})()});return E.current=E.current.bind(E),V.useEffect(()=>{if(!o)return;let S=!1;return N(!0),y(null),(async()=>{try{const A=await w.current();S||f(A)}catch(A){S||y(A instanceof Error?A:new Error("Unknown error"))}finally{S||N(!1)}})(),()=>{S=!0}},[...u,o]),{data:m,loading:v,error:b,refetch:E.current}}const vg=l=>{let u;const d=new Set,o=(y,w)=>{const E=typeof y=="function"?y(u):y;if(!Object.is(E,u)){const S=u;u=w??(typeof E!="object"||E===null)?E:Object.assign({},u,E),d.forEach(D=>D(u,S))}},m=()=>u,N={setState:o,getState:m,getInitialState:()=>b,subscribe:y=>(d.add(y),()=>d.delete(y))},b=u=l(o,m,N);return N},y2=l=>l?vg(l):vg,x2=l=>l;function p2(l,u=x2){const d=ze.useSyncExternalStore(l.subscribe,()=>u(l.getState()),()=>u(l.getInitialState()));return ze.useDebugValue(d),d}const bg=l=>{const u=y2(l),d=o=>p2(u,o);return Object.assign(d,u),d},v2=l=>l?bg(l):bg,b2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,na=v2(l=>({projectName:"Night Watch",setProjectName:u=>l({projectName:u}),toasts:[],addToast:u=>{const d=Math.random().toString(36).substring(7);l(o=>({toasts:[...o.toasts,{...u,id:d}]})),setTimeout(()=>{l(o=>({toasts:o.toasts.filter(m=>m.id!==d)}))},5e3)},removeToast:u=>l(d=>({toasts:d.toasts.filter(o=>o.id!==u)})),status:null,setStatus:u=>l(d=>!d.status||new Date(u.timestamp)>new Date(d.status.timestamp)?{status:u}:d),globalModeLoading:!0,setGlobalModeLoading:u=>l({globalModeLoading:u}),isGlobalMode:!1,setGlobalMode:u=>{K1(u),l({isGlobalMode:u})},projects:[],setProjects:u=>l({projects:u}),selectedProjectId:b2,selectProject:u=>{xg(u),u?localStorage.setItem("nw-selected-project",u):localStorage.removeItem("nw-selected-project"),l(d=>{const o=d.projects.find(m=>m.name===u);return{selectedProjectId:u,...o?{projectName:o.name}:{}}})},removeProjectFromList:u=>{l(d=>{var v;const o=d.projects.filter(N=>N.name!==u),m=d.selectedProjectId===u,f=m?((v=o[0])==null?void 0:v.name)??null:d.selectedProjectId;return m&&(xg(f),f?localStorage.setItem("nw-selected-project",f):localStorage.removeItem("nw-selected-project")),{projects:o,selectedProjectId:f,...m&&o[0]?{projectName:o[0].name}:{}}})}})),S2=()=>{const[l,u]=V.useState(!1),{projectName:d,isGlobalMode:o,projects:m,selectedProjectId:f,selectProject:v,globalModeLoading:N}=na(),{data:b}=fn(_y,[f],{enabled:!N}),y=(b==null?void 0:b.length)??0,w=V.useMemo(()=>[{icon:j1,label:"Dashboard",path:"/",section:"Overview"},{icon:G1,label:"Logs",path:"/logs"},{icon:C1,label:"Board",path:"/board",section:"Work"},{icon:b1,label:"Pull Requests",path:"/prs",badge:y},{icon:Oy,label:"Roadmap",path:"/roadmap"},{icon:Yf,label:"Schedules",path:"/scheduling",section:"Automation"},{icon:Y1,label:"Settings",path:"/settings",section:"Config"}],[y]);return s.jsxs("aside",{className:`
|
|
341
|
+
relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
|
|
342
|
+
${l?"w-20":"w-72"} h-screen flex-shrink-0 z-50
|
|
343
|
+
bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
|
|
344
|
+
`,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${l?"items-center justify-center flex":""}`,children:l?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:o?"Projects":"Workspace"}),o?s.jsxs("div",{className:"relative",children:[s.jsx(hg,{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:f||"",onChange:E=>v(E.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(E=>E.valid).map(E=>s.jsx("option",{value:E.name,children:E.name},E.name))}),s.jsx(s1,{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(hg,{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:w.map(E=>s.jsxs(ze.Fragment,{children:[E.section&&!l&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:E.section}),s.jsx("li",{children:s.jsx(wy,{to:E.path,className:({isActive:S})=>`
|
|
345
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
346
|
+
${S?"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"}
|
|
347
|
+
${l?"justify-center":""}
|
|
348
|
+
`,children:({isActive:S})=>s.jsxs(s.Fragment,{children:[s.jsx(E.icon,{className:`h-5 w-5 transition-colors ${S?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${l?"":"mr-3.5"}`}),!l&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:E.label}),E.badge&&(l?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 ${S?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:E.badge})),S&&!l&&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)]"}),l&&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:E.label})]})})})]},E.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>u(!l),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:l?s.jsx(t1,{className:"h-5 w-5"}):s.jsx(Kb,{className:"h-5 w-5"})})})]})},w2=()=>{const{projectName:l}=na();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:l})]}),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(X1,{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(Jc,{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(Gb,{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"})]})]})},N2=({toast:l,onDismiss:u})=>{const d={success:s.jsx(ou,{className:"h-5 w-5 text-green-400"}),error:s.jsx(sl,{className:"h-5 w-5 text-red-400"}),info:s.jsx(T1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(ru,{className:"h-5 w-5 text-amber-400"})},o={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:`
|
|
349
|
+
pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
|
|
350
|
+
bg-slate-900 border border-slate-800 border-l-4 ${o[l.type]}
|
|
351
|
+
shadow-lg ring-1 ring-black ring-opacity-5 transition-all
|
|
352
|
+
animate-in slide-in-from-right-full fade-in duration-300
|
|
353
|
+
`,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[l.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:l.title}),l.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:l.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:()=>u(l.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Vr,{className:"h-5 w-5"})]})})]})})})},j2=()=>{const{toasts:l,removeToast:u}=na();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:l.map(d=>s.jsx(N2,{toast:d,onDismiss:u},d.id))})};function E2(){const{setGlobalMode:l,setGlobalModeLoading:u,setProjects:d,selectProject:o,selectedProjectId:m}=na();V.useEffect(()=>{u(!0),t2().then(async({globalMode:f})=>{if(l(f),!f)return;const v=await Ay();d(v);const N=v.filter(b=>b.valid);m&&N.some(b=>b.name===m)?o(m):N.length>0&&o(N[0].name)}).catch(()=>{l(!1)}).finally(()=>{u(!1)})},[])}function Sg(l){if(!(l!=null&&l.timestamp))return Number.NEGATIVE_INFINITY;const u=new Date(l.timestamp).getTime();return Number.isNaN(u)?Number.NEGATIVE_INFINITY:u}function Hc(l,u){return l?u?Sg(l)>=Sg(u)?l:u:l:u}function T2(){const{setStatus:l,setProjectName:u,selectedProjectId:d,globalModeLoading:o,status:m}=na(),f=V.useRef(null);f.current=na.getState().status,o2(v=>{Hc(v,f.current)===v&&l(v)},[d,o],{enabled:!o}),V.useEffect(()=>{if(o)return;yf().then(N=>{Hc(N,f.current)===N&&l(N)}).catch(()=>{});const v=setInterval(()=>{yf().then(N=>{Hc(N,f.current)===N&&l(N)}).catch(()=>{})},3e4);return()=>clearInterval(v)},[d,o,l]),V.useEffect(()=>{const v=()=>{yf().then(N=>{Hc(N,f.current)===N&&l(N)}).catch(()=>{})};return window.addEventListener("focus",v),()=>window.removeEventListener("focus",v)},[d,l]),V.useEffect(()=>{m!=null&&m.projectName&&u(m.projectName)},[m==null?void 0:m.projectName,u])}const Je=({children:l,className:u="",onClick:d})=>s.jsxs("div",{className:`
|
|
354
|
+
relative bg-[#0b101b] rounded-xl border border-white/5
|
|
355
|
+
shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
|
|
356
|
+
transition-all duration-300
|
|
357
|
+
${d?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
|
|
358
|
+
${u}
|
|
359
|
+
`,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:l})]}),st=({children:l,variant:u="primary",size:d="md",loading:o=!1,className:m="",disabled:f,...v})=>{const N="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]",b={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"},y={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:`${N} ${b[u]} ${y[d]} ${m}`,disabled:f||o,...v,children:[o&&s.jsx(Cy,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},kr=({children:l,variant:u="default",className:d=""})=>{const o={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 ${o[u]} ${d}`,children:l})},Fy={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"}},M2=({defaultColumn:l,onClose:u,onCreated:d})=>{const[o,m]=V.useState(""),[f,v]=V.useState(""),[N,b]=V.useState(l),[y,w]=V.useState(!1),[E,S]=V.useState(null),{addToast:D}=na(),A=async M=>{if(M.preventDefault(),!!o.trim()){w(!0),S(null);try{await i2({title:o.trim(),body:f,column:N}),D({title:"Issue created",message:`"${o.trim()}" added to ${N}`,type:"success"}),d(),u()}catch(Y){S(Y instanceof Error?Y.message:"Failed to create issue")}finally{w(!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:u}),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:u,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(Vr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:A,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:o,onChange:M=>m(M.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:N,onChange:M=>b(M.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:Pl.map(M=>s.jsx("option",{value:M,children:M},M))})]}),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:f,onChange:M=>v(M.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"})]}),E&&s.jsx("p",{className:"text-sm text-red-400",children:E}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(st,{variant:"ghost",type:"button",onClick:u,children:"Cancel"}),s.jsx(st,{type:"submit",disabled:y||!o.trim(),children:y?"Creating...":"Create Issue"})]})]})]})]})},C2=({issue:l,onClose:u,onMoved:d,onClosed:o})=>{const[m,f]=V.useState(!1),[v,N]=V.useState(!1),{addToast:b}=na(),y=async S=>{if(S!==l.column){f(!0);try{await Yy(l.number,S),b({title:"Issue moved",message:`#${l.number} moved to ${S}`,type:"success"}),d(),u()}catch(D){b({title:"Move failed",message:D instanceof Error?D.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},w=async()=>{if(confirm(`Close issue #${l.number}: "${l.title}"?`)){N(!0);try{await u2(l.number),b({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),o(),u()}catch(S){b({title:"Close failed",message:S instanceof Error?S.message:"Failed to close issue",type:"error"})}finally{N(!1)}}},E=l.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:u}),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:["#",l.number]}),s.jsx(kr,{variant:Fy[E].badge,children:E})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:l.title}),l.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",l.assignees.join(", ")]})]}),s.jsx("button",{onClick:u,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(Vr,{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:"}),Pl.filter(S=>S!==l.column).map(S=>s.jsx("button",{onClick:()=>y(S),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:S},S))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[l.url&&!l.url.startsWith("local://")&&s.jsxs("a",{href:l.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(My,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:w,disabled:v,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:v?"Closing...":"Close Issue"})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:l.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:l.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},O2=({issue:l,onClick:u,onDragStart:d})=>{const[o,m]=V.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(l.number)),f.dataTransfer.effectAllowed="move",m(!0),d(l)},onDragEnd:()=>m(!1),children:s.jsxs(Je,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${o?"opacity-30":""}`,onClick:u,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",l.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:l.title}),l.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:l.assignees.join(", ")})]})})},D2=({name:l,issues:u,draggingIssue:d,onIssueClick:o,onNewIssue:m,onMoveIssue:f,onDragStart:v})=>{const N=Fy[l],[b,y]=V.useState(!1),w=d!==null&&d.column!==l;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${b&&w?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:E=>{w&&(E.preventDefault(),E.dataTransfer.dropEffect="move",y(!0))},onDragLeave:()=>y(!1),onDrop:E=>{E.preventDefault(),y(!1),d&&d.column!==l&&f(d,l)},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 ${N.dot}`}),s.jsx("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-wider",children:l}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:u.length})]}),s.jsx("button",{onClick:()=>m(l),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${l}`,children:s.jsx(qr,{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:u.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${b&&w?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:b&&w?"Drop here":"No issues"})}):u.map(E=>s.jsx(O2,{issue:E,onClick:()=>o(E),onDragStart:v},E.id))})]})},R2=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(null),[m,f]=V.useState(null),[v,N]=V.useState(null),b=V.useRef(!1),{addToast:y,selectedProjectId:w,globalModeLoading:E}=na(),{data:S,loading:D,error:A,refetch:M}=fn(By,[w],{enabled:!E});V.useEffect(()=>{const Q=setInterval(()=>{b.current||M()},3e4);return()=>clearInterval(Q)},[M]);const Y=V.useCallback(async(Q,G)=>{f(null);const ee=v??(S==null?void 0:S.columns);if(!ee)return;const le=ee,te={};for(const J of Pl)te[J]=(ee[J]??[]).filter(R=>R.number!==Q.number);const I={...Q,column:G};te[G]=[...te[G]??[],I],N(te),u(J=>(J==null?void 0:J.number)===Q.number?I:J),b.current=!0;try{await Yy(Q.number,G),M(),setTimeout(()=>{N(null),b.current=!1},800)}catch(J){N(le),u(R=>(R==null?void 0:R.number)===Q.number?Q:R),b.current=!1,y({title:"Move failed",message:J instanceof Error?J.message:"Failed to move issue",type:"error"})}},[y,M,v,S]);if(E||D)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(A&&A.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(A)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:A.message}),s.jsx(st,{onClick:()=>M(),children:"Retry"})]});if(!S)return null;const X=v??S.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:[Pl.reduce((Q,G)=>{var ee;return Q+(((ee=X[G])==null?void 0:ee.length)??0)},0)," issues across ",Pl.length," columns"]})]}),s.jsxs(st,{onClick:()=>o("Ready"),children:[s.jsx(qr,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>f(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Pl.length*236}px`},children:Pl.map(Q=>s.jsx(D2,{name:Q,issues:X[Q]??[],draggingIssue:m,onIssueClick:u,onNewIssue:o,onMoveIssue:Y,onDragStart:f},Q))})}),l&&s.jsx(C2,{issue:l,onClose:()=>u(null),onMoved:()=>M(),onClosed:()=>M()}),d&&s.jsx(M2,{defaultColumn:d,onClose:()=>o(null),onCreated:()=>M()})]})},A2=[{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"},{name:"analytics",displayName:"Analytics",processName:"analytics",triggerId:"analytics",runningLabel:"Running",idleLabel:"Idle"}],_2=({processes:l,activePrd:u,onCancelProcess:d,onForceClear:o,onViewLog:m,cancellingProcess:f,clearingLock:v,onTriggerJob:N,triggeringJob:b})=>{const y=E=>l.find(S=>S.name===E),w=(E,S)=>E.length<=S?E:E.slice(0,S-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",children:A2.map(E=>{const S=y(E.processName),D=(S==null?void 0:S.running)??!1,A=S==null?void 0:S.pid,M=f===E.cancelType,Y=D&&E.cancelType,X=!D&&E.name==="executor"&&u,Q=D?A?`PID: ${A}`:E.runningLabel:E.idleLabel,G=D&&E.name==="executor"&&u?w(u,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${D?"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 ${D?"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 ${D?"text-slate-200":"text-slate-400"}`,children:E.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:G?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Tf,{className:"h-3 w-3 flex-shrink-0"}),G]}):Q})]}),s.jsxs("div",{className:"flex-shrink-0",children:[Y&&s.jsx("button",{onClick:()=>E.cancelType&&d(E.cancelType),disabled:M,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(yg,{className:"h-3.5 w-3.5"})}),X&&s.jsx("button",{onClick:o,disabled:v,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(yg,{className:"h-3.5 w-3.5"})}),!Y&&!X&&D&&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(Tf,{className:"h-3.5 w-3.5"})}),!D&&!X&&s.jsx("button",{onClick:()=>N(E.triggerId),disabled:b!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${E.displayName}`,children:b===E.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(zr,{className:"h-3.5 w-3.5"})})]})]},E.name)})})},k2={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"},z2=()=>{var U,ne;const l=Lf(),[u,d]=V.useState(null),[o,m]=V.useState(!1),[f,v]=V.useState(null),{setProjectName:N,addToast:b,selectedProjectId:y,globalModeLoading:w,status:E}=na(),{data:S}=fn(zy,[y],{enabled:!w}),{data:D,loading:A}=fn(()=>By().catch(()=>null),[y],{enabled:!w}),M=E;if(ze.useEffect(()=>{M!=null&&M.projectName&&N(M.projectName)},[M,N]),w)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!M)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const Y=M.prs.length,X=M.prs.filter(F=>F.reviewScore!==null&&F.reviewScore<70).length,Q=((U=D==null?void 0:D.columns.Ready)==null?void 0:U.length)??0,G=((ne=D==null?void 0:D.columns["In Progress"])==null?void 0:ne.length)??0;M.processes.find(F=>F.name==="executor"),M.processes.find(F=>F.name==="reviewer"),M.processes.find(F=>F.name==="qa"),M.processes.find(F=>F.name==="audit"),M.processes.find(F=>F.name==="planner"),M.processes.find(F=>F.name==="analytics");const ee=async F=>{d(F);try{const ce=await r2(F),ye=ce.results.every(me=>me.success);b({title:ye?"Process Cancelled":"Cancel Failed",message:ce.results.map(me=>me.message).join("; "),type:ye?"success":"error"})}catch(ce){b({title:"Cancel Failed",message:ce instanceof Error?ce.message:"Failed to cancel process",type:"error"})}finally{d(null)}},le=async()=>{m(!0);try{await c2(),b({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(F){b({title:"Clear Failed",message:F instanceof Error?F.message:"Failed to clear lock",type:"error"})}finally{m(!1)}},te=async F=>{v(F);try{await{executor:Uy,reviewer:Qf,qa:Ly,audit:Hy,planner:Vy,analytics:qy}[F](),b({title:"Job Triggered",message:`${F[0].toUpperCase()+F.slice(1)} job has been queued.`,type:"success"})}catch(ce){b({title:"Trigger Failed",message:ce instanceof Error?ce.message:`Failed to trigger ${F}`,type:"error"})}finally{v(null)}},I=F=>{if(!F)return"Not scheduled";try{const ce=new Date(F),ye=new Date,me=ce.getTime()-ye.getTime(),B=Math.floor(me/6e4);return B<0?"Running now...":B<60?`in ${B} min`:B<1440?`in ${Math.floor(B/60)} hr${B>=120?"s":""}`:`in ${Math.floor(B/1440)} day${B>=2880?"s":""}`}catch{return"Unknown"}},R=(()=>{var ye,me,B;if(S!=null&&S.paused)return null;const F=[{agent:"Executor",nextRun:(S==null?void 0:S.executor.nextRun)??null},{agent:"Reviewer",nextRun:(S==null?void 0:S.reviewer.nextRun)??null},{agent:"QA",nextRun:((ye=S==null?void 0:S.qa)==null?void 0:ye.nextRun)??null},{agent:"Auditor",nextRun:((me=S==null?void 0:S.audit)==null?void 0:me.nextRun)??null},{agent:"Planner",nextRun:((B=S==null?void 0:S.planner)==null?void 0:B.nextRun)??null}];let ce=null;for(const ue of F)ue.nextRun&&(!ce||new Date(ue.nextRun)<new Date(ce.nextRun))&&(ce=ue);return ce?{agent:ce.agent,time:I(ce.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(Je,{className:"p-5",onClick:()=>l("/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:Q})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(ou,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(Je,{className:"p-5",onClick:()=>l("/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:G})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Ey,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Je,{className:"p-5",onClick:()=>l("/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(Zc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${X>0?"text-red-400 font-medium":"text-slate-500"}`,children:X>0?`${X} need work`:"All passing"})]}),s.jsxs(Je,{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:S!=null&&S.paused?"Paused":M.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${S!=null&&S.paused?"bg-amber-500/10 text-amber-400":M.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Yf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:S!=null&&S.paused?"All schedules paused":M.crontab.installed?`${M.crontab.entries.length} entr${M.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(Je,{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:()=>l("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(_2,{processes:M.processes,activePrd:M.activePrd,onCancelProcess:ee,onForceClear:le,onViewLog:()=>l("/logs"),cancellingProcess:u,clearingLock:o,onTriggerJob:te,triggeringJob:f})]}),R&&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:R.agent}),s.jsx("span",{children:R.time})]}),s.jsxs("button",{onClick:()=>l("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(fg,{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:()=>l("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(fg,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Je,{className:"p-4",children:A?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):D?s.jsx("div",{className:"flex flex-wrap gap-3",children:Pl.map(F=>{var ye;const ce=((ye=D.columns[F])==null?void 0:ye.length)??0;return s.jsxs("button",{onClick:()=>l("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${k2[F]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:F}),s.jsx("span",{className:"text-xs font-bold",children:ce})]},F)})}):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."]})})]})]})},Gy=[{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"}}],U2=()=>{const[l,u]=V.useState(!0),[d,o]=V.useState(""),[m,f]=V.useState("executor"),v=V.useRef(null),{selectedProjectId:N,globalModeLoading:b}=na(),y=na(Q=>Q.status),{data:w,loading:E,error:S,refetch:D}=fn(()=>n2(m,500),[m,N],{enabled:!b}),A=(w==null?void 0:w.lines)||[];V.useEffect(()=>{l&&v.current&&(v.current.scrollTop=v.current.scrollHeight)},[A,l]),V.useEffect(()=>{if(!l)return;const Q=window.setInterval(()=>{D()},3e3);return()=>window.clearInterval(Q)},[l,m,D]);const M=A.filter(Q=>Q.toLowerCase().includes(d.toLowerCase())),Y=Q=>{f(Q),o("")},X=Q=>{if(!(y!=null&&y.processes))return!1;const G=y.processes.find(ee=>ee.name===Q);return(G==null?void 0:G.running)??!1};return S?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{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:S.message}),s.jsx(st,{onClick:()=>D(),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:Q=>o(Q.target.value)}),s.jsx(Jc,{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:Gy.map(({processName:Q,label:G})=>s.jsx("button",{onClick:()=>Y(Q),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${m===Q?"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:G}),X(Q)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},Q))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(st,{size:"sm",variant:"ghost",onClick:()=>D(),children:[s.jsx(mg,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(st,{size:"sm",variant:"ghost",onClick:()=>u(!l),children:[l?s.jsx(Dy,{className:"h-4 w-4 mr-2"}):s.jsx(zr,{className:"h-4 w-4 mr-2"}),l?"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:[M.length," lines"]})]}),s.jsxs("div",{ref:v,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[E?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):M.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"}):M.map((Q,G)=>{const ee=Q.includes("[ERROR]"),le=Q.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ee?"text-red-400":le?"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:G+1}),Q]},G)}),l&&s.jsx("div",{className:"h-4"})," "]}),!l&&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:()=>u(!0),children:[s.jsx(mg,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},L2=()=>{const[l,u]=V.useState(null),[d,o]=V.useState(!1),[m,f]=V.useState("all"),[v,N]=V.useState("number"),[b,y]=V.useState("desc"),{addToast:w,selectedProjectId:E,globalModeLoading:S}=na(),{data:D,loading:A,error:M,refetch:Y}=fn(_y,[E],{enabled:!S}),X=D??[],Q=U=>{switch(U){case"pass":return s.jsx(ou,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(o1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(Cy,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(sl,{className:"h-4 w-4 text-slate-500"})}},G=U=>{switch(U){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=U=>U===null?"No review decision yet":U===100?"PR has been approved":U===0?"Changes have been requested":`Review score: ${U}`,le=V.useMemo(()=>X.filter(U=>{switch(m){case"needs-work":return U.ciStatus==="fail"||U.reviewScore===0;case"pending":return U.ciStatus==="pending"||U.ciStatus==="unknown"||U.reviewScore===null;case"passed":return U.ciStatus==="pass"&&U.reviewScore===100;case"all":default:return!0}}),[X,m]),te=V.useMemo(()=>[...le].sort((ne,F)=>{let ce=0;switch(v){case"number":ce=ne.number-F.number;break;case"title":ce=ne.title.localeCompare(F.title);break;case"branch":ce=ne.branch.localeCompare(F.branch);break;case"ciStatus":{const ye={fail:0,pending:1,unknown:2,pass:3};ce=(ye[ne.ciStatus]??2)-(ye[F.ciStatus]??2);break}case"reviewScore":{const ye=ne.reviewScore??-1,me=F.reviewScore??-1;ce=ye-me;break}}return b==="asc"?ce:-ce}),[le,v,b]),I=U=>{v===U?y(b==="asc"?"desc":"asc"):(N(U),y("desc"))},J=U=>v!==U?s.jsx(Bb,{className:"h-3 w-3 text-slate-600"}):b==="asc"?s.jsx($b,{className:"h-3 w-3 text-indigo-400"}):s.jsx(Hb,{className:"h-3 w-3 text-indigo-400"});if(A)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(M)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{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:M.message}),s.jsx(st,{onClick:()=>Y(),children:"Retry"})]});const R=async()=>{o(!0);try{const U=await Qf();w({title:"Reviewer Started",message:U.pid?`Started with PID ${U.pid}`:"Reviewer started",type:"success"})}catch(U){w({title:"Reviewer Failed",message:U instanceof Error?U.message:"Failed to start reviewer",type:"error"})}finally{o(!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:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${m==="passed"?"bg-green-900/50 text-green-300 border-green-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Passed"})]}),s.jsxs(st,{size:"sm",onClick:R,disabled:d,children:[s.jsx(Jc,{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:()=>I("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),J("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:()=>I("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),J("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:()=>I("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),J("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:()=>I("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),J("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:[te.map(U=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>u(l===U.number?null:U.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:["#",U.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:U.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:U.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:G(U.ciStatus),children:[Q(U.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:U.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:U.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:ee(U.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${U.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${U.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${U.reviewScore>=70?"text-green-500":"text-red-500"}`,children:U.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:U.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:ne=>ne.stopPropagation(),children:s.jsx(My,{className:"h-4 w-4"})})})]},U.number)),te.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:X.length===0?"No open PRs found.":`No PRs match the "${m}" filter.`})})]})]})}),l&&s.jsx(Je,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const U=X.find(ne=>ne.number===l);return U?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:U.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:U.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:G(U.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:[Q(U.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:U.ciStatus})]})]}),U.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:ee(U.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${U.reviewScore>=70?"text-green-500":"text-red-500"}`,children:U.reviewScore})]})]})]}):null})()})]})},wa=ze.forwardRef(({className:l="",label:u,checked:d,onChange:o,...m},f)=>{const v=N=>{o&&o(N.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${l}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:d,onChange:v,...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"})]}),u&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:u})]})});wa.displayName="Switch";const H2=()=>{const{addToast:l,selectedProjectId:u,globalModeLoading:d}=na(),[o,m]=V.useState(!1),[f,v]=V.useState(!1),{data:N,loading:b,error:y,refetch:w}=fn(m2,[u],{enabled:!d});V.useEffect(()=>{if(!(N!=null&&N.enabled))return;const Q=setInterval(()=>{w()},1e4);return()=>clearInterval(Q)},[N==null?void 0:N.enabled,w]);const E=async Q=>{v(!0);try{await $y(Q),l({title:Q?"Scanner Enabled":"Scanner Disabled",message:Q?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:Q?"success":"info"}),w()}catch(G){l({title:"Toggle Failed",message:G instanceof Error?G.message:"Failed to toggle scanner",type:"error"})}finally{v(!1)}},S=async()=>{m(!0);try{const Q=await g2();Q.created.length>0?l({title:"Scan Complete",message:`Created ${Q.created.length} PRD(s): ${Q.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),Q.errors.length>0&&l({title:"Scan Errors",message:Q.errors.join("; "),type:"warning"}),w()}catch(Q){l({title:"Scan Failed",message:Q instanceof Error?Q.message:"Failed to scan roadmap",type:"error"})}finally{m(!1)}};if(b)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(y)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{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:y.message}),s.jsx(st,{onClick:()=>w(),children:"Retry"})]});if(!N)return null;if(N.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(Je,{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(Oy,{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 D=N.totalItems>0?Math.round(N.processedItems/N.totalItems*100):0,A=V2(N.status),M=B2(N.items),Y=N.lastScan?Y2(N.lastScan):"Never",X=N.autoScanInterval?Math.round(N.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(wa,{label:N.enabled?"Enabled":"Disabled",checked:N.enabled,onChange:E,disabled:f}),s.jsxs(st,{onClick:S,loading:o,disabled:!N.enabled||N.status==="complete",children:[s.jsx(zr,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Je,{className:`p-6 border-2 ${A.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(A.icon,{className:`h-8 w-8 ${A.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 ${A.textColor}`,children:A.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})]}),N.enabled&&N.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",X," min"]})]}),N.enabled&&N.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Je,{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:[N.processedItems," / ",N.totalItems," items (",D,"%)"]})]}),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 ${D===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${D}%`}})})]}),Object.entries(M).map(([Q,G])=>s.jsxs(Je,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:Q}),s.jsx("div",{className:"space-y-2",children:G.map(ee=>s.jsx(q2,{item:ee},ee.hash))})]},Q))]})};function q2({item:l}){const u=l.checked,d=l.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${u?"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:[u?s.jsx(A1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(ou,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Tf,{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 ${u?"line-through text-slate-600":"text-slate-200"}`,children:l.title}),l.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:l.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:u?s.jsx(kr,{variant:"neutral",children:"Skipped"}):d?s.jsx(kr,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(kr,{variant:"warning",children:"Pending"})})]})}function V2(l){switch(l){case"complete":return{label:"Complete",icon:ou,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Zc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:zr,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:sl,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:sl,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function B2(l){const u={};for(const d of l){const o=d.section||"General";u[o]||(u[o]=[]),u[o].push(d)}return u}function Y2(l){try{const u=new Date(l),o=new Date().getTime()-u.getTime(),m=Math.floor(o/6e4);if(m<1)return"Just now";if(m<60)return`${m} min ago`;const f=Math.floor(m/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const Zy=({tabs:l,activeTab:u,onChange:d,className:o=""})=>{var b,y;const[m,f]=ze.useState((b=l[0])==null?void 0:b.id),v=u||m,N=w=>{d?d(w):f(w)};return s.jsxs("div",{className:`flex flex-col ${o}`,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:l.map(w=>s.jsx("button",{onClick:()=>N(w.id),className:`
|
|
360
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
361
|
+
${v===w.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
362
|
+
`,children:w.label},w.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(y=l.find(w=>w.id===v))==null?void 0:y.content})]})},Qc=[{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"}],If=[{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 Ur(l){return l?l.trim().replace(/\s+/g," "):""}function Ar(l,u){return Ur(l)===Ur(u)}function $2(l){if(l)return If.find(u=>u.id===l)}function Py(l,u,d,o,m,f){return Ar(l.schedules.executor,u)&&Ar(l.schedules.reviewer,d)&&Ar(l.schedules.qa,o)&&Ar(l.schedules.audit,m)&&Ar(l.schedules.slicer,f)}function F2(l,u,d,o,m){return If.find(f=>Py(f,l,u,d,o,m))}function nu(l,u,d,o,m,f){const v=$2(l);return v&&Py(v,u,d,o,m,f)?v:F2(u,d,o,m,f)}function wg(l){const u=Ur(l),d=u.split(/\s+/);if(d.length!==5)return u;const[o,m,f,v,N]=d,b=/^\d+$/.test(o),y=Qc.find(w=>Ur(w.value)===u);if(y)return y.label;if(o==="*/30"&&m==="*")return"Every 30 minutes";if(o==="0"&&m==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(b&&m.startsWith("*/")&&f==="*"&&v==="*"&&N==="*"){const w=parseInt(m.replace("*/",""),10);return o==="0"?`Every ${w} hours`:`Every ${w} hours at :${o.padStart(2,"0")}`}if(o==="0"&&m.startsWith("*/"))return`Every ${parseInt(m.replace("*/",""),10)} hours`;if(o==="0"&&m.includes("-")){const[w,E]=m.split("-");return`Every hour from ${Gi(w)} to ${Gi(E)}`}if(b&&m.includes("-")&&f==="*"&&v==="*"&&N==="*"){const[w,E]=m.split("-");return`Every hour from ${Zi(w,o)} to ${Zi(E,o)}`}if(o==="0"&&m.includes(",")){const w=m.split(",").map(Gi);return w.length<=3?`At ${w.join(" and ")}`:`At ${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}if(b&&m.includes(",")&&f==="*"&&v==="*"&&(N==="*"||N==="1-5")){const w=m.split(",").map(S=>Zi(S,o)),E=N==="1-5"?"Weekdays at ":"At ";return w.length<=3?`${E}${w.join(" and ")}`:`${E}${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}return o==="0"&&m!=="*"&&f==="*"&&v==="*"&&N==="*"?`Daily at ${Gi(m)}`:b&&m!=="*"&&f==="*"&&v==="*"&&N==="*"?`Daily at ${Zi(m,o)}`:o==="0"&&m!=="*"&&f==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${Gi(m)}`:b&&m!=="*"&&f==="*"&&v==="*"&&N==="1-5"?`Weekdays at ${Zi(m,o)}`:u}function Gi(l){const u=parseInt(l,10);return u===0?"12 AM":u<12?`${u} AM`:u===12?"12 PM":`${u-12} PM`}function Zi(l,u){const d=u.padStart(2,"0"),o=parseInt(l,10);return Number.isNaN(o)?`${l}:${d}`:o===0?`12:${d} AM`:o<12?`${o}:${d} AM`:o===12?`12:${d} PM`:`${o-12}:${d} PM`}function G2(l){const u=Ur(l),d=Qc.find(o=>Ur(o.value)===u);return(d==null?void 0:d.value)??"__custom__"}function Z2(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4),m=Math.floor(o/60),f=Math.floor(m/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:m<24?`in ${m} hour${m>1?"s":""}`:`in ${f} day${f>1?"s":""}`}function P2(l){const u={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",u)}function Q2(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4);return o>=0&&o<30}const Ye=ze.forwardRef(({className:l="",label:u,error:d,helperText:o,rightIcon:m,...f},v)=>{const N=ze.useId(),b=f.id??N,y=d?`${b}-error`:void 0,w=!d&&o?`${b}-help`:void 0,E=[y,w].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:b,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:v,id:b,"aria-describedby":E,"aria-invalid":d?!0:f["aria-invalid"],className:`
|
|
363
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
364
|
+
px-3 py-2 text-sm text-slate-200
|
|
365
|
+
placeholder:text-slate-600
|
|
366
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
367
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
368
|
+
transition-all duration-200
|
|
369
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
370
|
+
${m?"pr-10":""}
|
|
371
|
+
${l}
|
|
372
|
+
`,...f}),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:y,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:w,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});Ye.displayName="Input";const ia=ze.forwardRef(({className:l="",label:u,error:d,helperText:o,options:m,value:f,onChange:v,children:N,...b},y)=>{const w=ze.useId(),E=b.id??w,S=d?`${E}-error`:void 0,D=!d&&o?`${E}-help`:void 0,A=[S,D].filter(Boolean).join(" ")||void 0,M=Y=>{v&&v(Y.target.value)};return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:E,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:y,id:E,"aria-describedby":A,"aria-invalid":d?!0:b["aria-invalid"],className:`
|
|
373
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
374
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
375
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
376
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
377
|
+
transition-all duration-200
|
|
378
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
379
|
+
${l}
|
|
380
|
+
`,value:f,onChange:M,...b,children:m?m.map(Y=>s.jsx("option",{value:Y.value,children:Y.label},Y.value)):N}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Ty,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:S,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:D,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});ia.displayName="Select";const Mn=({label:l,value:u,onChange:d,helperText:o,placeholder:m="5 */3 * * *"})=>{const f=G2(u),v=f==="__custom__",N=w=>{w!=="__custom__"&&d(w)},b=w=>{d(w.target.value)},y=Qc.find(w=>w.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(ia,{label:l,value:f,onChange:N,options:Qc.map(w=>({label:w.label,value:w.value})),helperText:v?void 0:(y==null?void 0:y.description)||o}),v&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Ye,{label:"Cron Expression",value:u,onChange:b,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)"]})]})]})};var Rs={},Ra={},Pi={},As={},xf={},Ng;function I2(){return Ng||(Ng=1,Object.defineProperty(xf,"__esModule",{value:!0})),xf}var Qi={},Ii={},jg;function Hs(){var u,d,o,m,f,Qy,N;if(jg)return Ii;jg=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.CronField=void 0;let l=(N=class{constructor(y,w={rawValue:""}){lt(this,f);lt(this,u,!1);lt(this,d,!1);lt(this,o,!1);lt(this,m,[]);Q0(this,"options",{rawValue:""});if(!Array.isArray(y))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(y.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...w,rawValue:w.rawValue??""},Te(this,m,y.sort(N.sorter)),Te(this,o,this.options.wildcard!==void 0?this.options.wildcard:Ne(this,f,Qy).call(this)),Te(this,u,this.options.rawValue.includes("L")||y.includes("L")),Te(this,d,this.options.rawValue.includes("?")||y.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return K(this,u)}get hasQuestionMarkChar(){return K(this,d)}get isWildcard(){return K(this,o)}get values(){return K(this,m)}static sorter(y,w){const E=typeof y=="number",S=typeof w=="number";return E&&S?y-w:!E&&!S?y.localeCompare(w):E?-1:1}static findNearestValueInList(y,w,E=!1){if(E){for(let S=y.length-1;S>=0;S--)if(y[S]<w)return y[S];return null}for(let S=0;S<y.length;S++)if(y[S]>w)return y[S];return null}findNearestValue(y,w=!1){return this.constructor.findNearestValueInList(this.values,y,w)}serialize(){return{wildcard:K(this,o),values:K(this,m)}}validate(){let y;const w=this.chars.length>0?` or chars ${this.chars.join("")}`:"",E=M=>Y=>new RegExp(`^\\d{0,2}${Y}$`).test(M),S=M=>(y=M,typeof M=="number"?M>=this.min&&M<=this.max:this.chars.some(E(M)));if(!K(this,m).every(S))throw new Error(`${this.constructor.name} Validation error, got value ${y} expected range ${this.min}-${this.max}${w}`);const A=K(this,m).find((M,Y)=>K(this,m).indexOf(M)!==Y);if(A)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${A}`)}},u=new WeakMap,d=new WeakMap,o=new WeakMap,m=new WeakMap,f=new WeakSet,Qy=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(y,w)=>w+this.min).every(y=>K(this,m).includes(y))},N);return Ii.CronField=l,Ii}var Eg;function W2(){if(Eg)return Qi;Eg=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronDayOfMonth=void 0;const l=Hs(),u=1,d=31,o=Object.freeze(["L"]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Qi.CronDayOfMonth=m,Qi}var Wi={},Tg;function X2(){if(Tg)return Wi;Tg=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.CronDayOfWeek=void 0;const l=Hs(),u=0,d=7,o=Object.freeze(["L"]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return Wi.CronDayOfWeek=m,Wi}var Xi={},Mg;function J2(){if(Mg)return Xi;Mg=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.CronHour=void 0;const l=Hs(),u=0,d=23,o=Object.freeze([]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Xi.CronHour=m,Xi}var Ji={},Cg;function K2(){if(Cg)return Ji;Cg=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronMinute=void 0;const l=Hs(),u=0,d=59,o=Object.freeze([]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return Ji.CronMinute=m,Ji}var Ki={},pf={},Sa={},Og;function eS(){if(Og)return Sa;Og=1,Object.defineProperty(Sa,"__esModule",{value:!0});class l extends Error{}class u extends l{constructor(r){super(`Invalid DateTime: ${r.toMessage()}`)}}class d extends l{constructor(r){super(`Invalid Interval: ${r.toMessage()}`)}}class o extends l{constructor(r){super(`Invalid Duration: ${r.toMessage()}`)}}class m extends l{}class f extends l{constructor(r){super(`Invalid unit ${r}`)}}class v extends l{}class N extends l{constructor(){super("Zone is an abstract class")}}const b="numeric",y="short",w="long",E={year:b,month:b,day:b},S={year:b,month:y,day:b},D={year:b,month:y,day:b,weekday:y},A={year:b,month:w,day:b},M={year:b,month:w,day:b,weekday:w},Y={hour:b,minute:b},X={hour:b,minute:b,second:b},Q={hour:b,minute:b,second:b,timeZoneName:y},G={hour:b,minute:b,second:b,timeZoneName:w},ee={hour:b,minute:b,hourCycle:"h23"},le={hour:b,minute:b,second:b,hourCycle:"h23"},te={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:y},I={hour:b,minute:b,second:b,hourCycle:"h23",timeZoneName:w},J={year:b,month:b,day:b,hour:b,minute:b},R={year:b,month:b,day:b,hour:b,minute:b,second:b},U={year:b,month:y,day:b,hour:b,minute:b},ne={year:b,month:y,day:b,hour:b,minute:b,second:b},F={year:b,month:y,day:b,weekday:y,hour:b,minute:b},ce={year:b,month:w,day:b,hour:b,minute:b,timeZoneName:y},ye={year:b,month:w,day:b,hour:b,minute:b,second:b,timeZoneName:y},me={year:b,month:w,day:b,weekday:w,hour:b,minute:b,timeZoneName:w},B={year:b,month:w,day:b,weekday:w,hour:b,minute:b,second:b,timeZoneName:w};class ue{get type(){throw new N}get name(){throw new N}get ianaName(){return this.name}get isUniversal(){throw new N}offsetName(r,h){throw new N}formatOffset(r,h){throw new N}offset(r){throw new N}equals(r){throw new N}get isValid(){throw new N}}let se=null;class Me extends ue{static get instance(){return se===null&&(se=new Me),se}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(r,{format:h,locale:p}){return kn(r,h,p)}formatOffset(r,h){return ts(this.offset(r),h)}offset(r){return-new Date(r).getTimezoneOffset()}equals(r){return r.type==="system"}get isValid(){return!0}}const qe=new Map;function _(g){let r=qe.get(g);return r===void 0&&(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),qe.set(g,r)),r}const re={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ge(g,r){const h=g.format(r).replace(/\u200E/g,""),p=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(h),[,j,C,k,z,q,he,be]=p;return[k,j,C,z,q,he,be]}function pe(g,r){const h=g.formatToParts(r),p=[];for(let j=0;j<h.length;j++){const{type:C,value:k}=h[j],z=re[C];C==="era"?p[z]=k:Oe(z)||(p[z]=parseInt(k,10))}return p}const De=new Map;class Ee extends ue{static create(r){let h=De.get(r);return h===void 0&&De.set(r,h=new Ee(r)),h}static resetCache(){De.clear(),qe.clear()}static isValidSpecifier(r){return this.isValidZone(r)}static isValidZone(r){if(!r)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:r}).format(),!0}catch{return!1}}constructor(r){super(),this.zoneName=r,this.valid=Ee.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:h,locale:p}){return kn(r,h,p,this.name)}formatOffset(r,h){return ts(this.offset(r),h)}offset(r){if(!this.valid)return NaN;const h=new Date(r);if(isNaN(h))return NaN;const p=_(this.name);let[j,C,k,z,q,he,be]=p.formatToParts?pe(p,h):ge(p,h);z==="BC"&&(j=-Math.abs(j)+1);const Pe=Zt({year:j,month:C,day:k,hour:q===24?0:q,minute:he,second:be,millisecond:0});let Re=+h;const Nt=Re%1e3;return Re-=Nt>=0?Nt:1e3+Nt,(Pe-Re)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let Ue={};function ke(g,r={}){const h=JSON.stringify([g,r]);let p=Ue[h];return p||(p=new Intl.ListFormat(g,r),Ue[h]=p),p}const Ke=new Map;function Ft(g,r={}){const h=JSON.stringify([g,r]);let p=Ke.get(h);return p===void 0&&(p=new Intl.DateTimeFormat(g,r),Ke.set(h,p)),p}const Na=new Map;function Qa(g,r={}){const h=JSON.stringify([g,r]);let p=Na.get(h);return p===void 0&&(p=new Intl.NumberFormat(g,r),Na.set(h,p)),p}const Ia=new Map;function ua(g,r={}){const{base:h,...p}=r,j=JSON.stringify([g,p]);let C=Ia.get(j);return C===void 0&&(C=new Intl.RelativeTimeFormat(g,r),Ia.set(j,C)),C}let ca=null;function Wa(){return ca||(ca=new Intl.DateTimeFormat().resolvedOptions().locale,ca)}const hn=new Map;function la(g){let r=hn.get(g);return r===void 0&&(r=new Intl.DateTimeFormat(g).resolvedOptions(),hn.set(g,r)),r}const ka=new Map;function mn(g){let r=ka.get(g);if(!r){const h=new Intl.Locale(g);r="getWeekInfo"in h?h.getWeekInfo():h.weekInfo,"minimalDays"in r||(r={...ve,...r}),ka.set(g,r)}return r}function gn(g){const r=g.indexOf("-x-");r!==-1&&(g=g.substring(0,r));const h=g.indexOf("-u-");if(h===-1)return[g];{let p,j;try{p=Ft(g).resolvedOptions(),j=g}catch{const q=g.substring(0,h);p=Ft(q).resolvedOptions(),j=q}const{numberingSystem:C,calendar:k}=p;return[j,C,k]}}function rl(g,r,h){return(h||r)&&(g.includes("-u-")||(g+="-u"),h&&(g+=`-ca-${h}`),r&&(g+=`-nu-${r}`)),g}function il(g){const r=[];for(let h=1;h<=12;h++){const p=je.utc(2009,h,1);r.push(g(p))}return r}function At(g){const r=[];for(let h=1;h<=7;h++){const p=je.utc(2016,11,13+h);r.push(g(p))}return r}function Xa(g,r,h,p){const j=g.listingMode();return j==="error"?null:j==="en"?h(r):p(r)}function On(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||la(g.locale).numberingSystem==="latn"}class Dn{constructor(r,h,p){this.padTo=p.padTo||0,this.floor=p.floor||!1;const{padTo:j,floor:C,...k}=p;if(!h||Object.keys(k).length>0){const z={useGrouping:!1,...p};p.padTo>0&&(z.minimumIntegerDigits=p.padTo),this.inf=Qa(r,z)}}format(r){if(this.inf){const h=this.floor?Math.floor(r):r;return this.inf.format(h)}else{const h=this.floor?Math.floor(r):Jl(r,3);return it(h,this.padTo)}}}class L{constructor(r,h,p){this.opts=p,this.originalZone=void 0;let j;if(this.opts.timeZone)this.dt=r;else if(r.zone.type==="fixed"){const k=-1*(r.offset/60),z=k>=0?`Etc/GMT+${k}`:`Etc/GMT${k}`;r.offset!==0&&Ee.create(z).valid?(j=z,this.dt=r):(j="UTC",this.dt=r.offset===0?r:r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone)}else r.zone.type==="system"?this.dt=r:r.zone.type==="iana"?(this.dt=r,j=r.zone.name):(j="UTC",this.dt=r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone);const C={...this.opts};C.timeZone=C.timeZone||j,this.dtf=Ft(h,C)}format(){return this.originalZone?this.formatToParts().map(({value:r})=>r).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const r=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?r.map(h=>{if(h.type==="timeZoneName"){const p=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...h,value:p}}else return h}):r}resolvedOptions(){return this.dtf.resolvedOptions()}}class fe{constructor(r,h,p){this.opts={style:"long",...p},!h&&Fr()&&(this.rtf=ua(r,p))}format(r,h){return this.rtf?this.rtf.format(r,h):bn(h,r,this.opts.numeric,this.opts.style!=="long")}formatToParts(r,h){return this.rtf?this.rtf.formatToParts(r,h):[]}}const ve={firstDay:1,minimalDays:4,weekend:[6,7]};class xe{static fromOpts(r){return xe.create(r.locale,r.numberingSystem,r.outputCalendar,r.weekSettings,r.defaultToEN)}static create(r,h,p,j,C=!1){const k=r||xt.defaultLocale,z=k||(C?"en-US":Wa()),q=h||xt.defaultNumberingSystem,he=p||xt.defaultOutputCalendar,be=Gr(j)||xt.defaultWeekSettings;return new xe(z,q,he,be,k)}static resetCache(){ca=null,Ke.clear(),Na.clear(),Ia.clear(),hn.clear(),ka.clear()}static fromObject({locale:r,numberingSystem:h,outputCalendar:p,weekSettings:j}={}){return xe.create(r,h,p,j)}constructor(r,h,p,j,C){const[k,z,q]=gn(r);this.locale=k,this.numberingSystem=h||z||null,this.outputCalendar=p||q||null,this.weekSettings=j,this.intl=rl(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=C,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=On(this)),this.fastNumbersCached}listingMode(){const r=this.isEnglish(),h=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return r&&h?"en":"intl"}clone(r){return!r||Object.getOwnPropertyNames(r).length===0?this:xe.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,Gr(r.weekSettings)||this.weekSettings,r.defaultToEN||!1)}redefaultToEN(r={}){return this.clone({...r,defaultToEN:!0})}redefaultToSystem(r={}){return this.clone({...r,defaultToEN:!1})}months(r,h=!1){return Xa(this,r,bu,()=>{const p=this.intl==="ja"||this.intl.startsWith("ja-");h&=!p;const j=h?{month:r,day:"numeric"}:{month:r},C=h?"format":"standalone";if(!this.monthsCache[C][r]){const k=p?z=>this.dtFormatter(z,j).format():z=>this.extract(z,j,"month");this.monthsCache[C][r]=il(k)}return this.monthsCache[C][r]})}weekdays(r,h=!1){return Xa(this,r,Is,()=>{const p=h?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},j=h?"format":"standalone";return this.weekdaysCache[j][r]||(this.weekdaysCache[j][r]=At(C=>this.extract(C,p,"weekday"))),this.weekdaysCache[j][r]})}meridiems(){return Xa(this,void 0,()=>zn,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[je.utc(2016,11,13,9),je.utc(2016,11,13,19)].map(h=>this.extract(h,r,"dayperiod"))}return this.meridiemCache})}eras(r){return Xa(this,r,Wr,()=>{const h={era:r};return this.eraCache[r]||(this.eraCache[r]=[je.utc(-40,1,1),je.utc(2017,1,1)].map(p=>this.extract(p,h,"era"))),this.eraCache[r]})}extract(r,h,p){const j=this.dtFormatter(r,h),C=j.formatToParts(),k=C.find(z=>z.type.toLowerCase()===p);return k?k.value:null}numberFormatter(r={}){return new Dn(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,h={}){return new L(r,this.intl,h)}relFormatter(r={}){return new fe(this.intl,this.isEnglish(),r)}listFormatter(r={}){return ke(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||la(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:pn()?mn(this.locale):ve}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(r){return this.locale===r.locale&&this.numberingSystem===r.numberingSystem&&this.outputCalendar===r.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let et=null;class Ge extends ue{static get utcInstance(){return et===null&&(et=new Ge(0)),et}static instance(r){return r===0?Ge.utcInstance:new Ge(r)}static parseSpecifier(r){if(r){const h=r.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(h)return new Ge(es(h[1],h[2]))}return null}constructor(r){super(),this.fixed=r}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ts(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ts(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(r,h){return ts(this.fixed,h)}get isUniversal(){return!0}offset(){return this.fixed}equals(r){return r.type==="fixed"&&r.fixed===this.fixed}get isValid(){return!0}}class dt extends ue{constructor(r){super(),this.zoneName=r}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function We(g,r){if(Oe(g)||g===null)return r;if(g instanceof ue)return g;if(_t(g)){const h=g.toLowerCase();return h==="default"?r:h==="local"||h==="system"?Me.instance:h==="utc"||h==="gmt"?Ge.utcInstance:Ge.parseSpecifier(h)||Ee.create(g)}else return da(g)?Ge.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new dt(g)}const gt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},yn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},qs=gt.hanidec.replace(/[\[|\]]/g,"").split("");function to(g){let r=parseInt(g,10);if(isNaN(r)){r="";for(let h=0;h<g.length;h++){const p=g.charCodeAt(h);if(g[h].search(gt.hanidec)!==-1)r+=qs.indexOf(g[h]);else for(const j in yn){const[C,k]=yn[j];p>=C&&p<=k&&(r+=p-C)}}return parseInt(r,10)}else return r}const ul=new Map;function Vs(){ul.clear()}function Jt({numberingSystem:g},r=""){const h=g||"latn";let p=ul.get(h);p===void 0&&(p=new Map,ul.set(h,p));let j=p.get(r);return j===void 0&&(j=new RegExp(`${gt[h]}${r}`),p.set(r,j)),j}let xn=()=>Date.now(),Il="system",cl=null,du=null,Br=null,Bs=60,ol,fu=null;class xt{static get now(){return xn}static set now(r){xn=r}static set defaultZone(r){Il=r}static get defaultZone(){return We(Il,Me.instance)}static get defaultLocale(){return cl}static set defaultLocale(r){cl=r}static get defaultNumberingSystem(){return du}static set defaultNumberingSystem(r){du=r}static get defaultOutputCalendar(){return Br}static set defaultOutputCalendar(r){Br=r}static get defaultWeekSettings(){return fu}static set defaultWeekSettings(r){fu=Gr(r)}static get twoDigitCutoffYear(){return Bs}static set twoDigitCutoffYear(r){Bs=r%100}static get throwOnInvalid(){return ol}static set throwOnInvalid(r){ol=r}static resetCaches(){xe.resetCache(),Ee.resetCache(),je.resetCache(),Vs()}}class oa{constructor(r,h){this.reason=r,this.explanation=h}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Yr=[0,31,59,90,120,151,181,212,243,273,304,334],Ys=[0,31,60,91,121,152,182,213,244,274,305,335];function Kt(g,r){return new oa("unit out of range",`you specified ${r} (of type ${typeof r}) as a ${g}, which is invalid`)}function $s(g,r,h){const p=new Date(Date.UTC(g,r-1,h));g<100&&g>=0&&p.setUTCFullYear(p.getUTCFullYear()-1900);const j=p.getUTCDay();return j===0?7:j}function $r(g,r,h){return h+(fl(g)?Ys:Yr)[r-1]}function Ja(g,r){const h=fl(g)?Ys:Yr,p=h.findIndex(C=>C<r),j=r-h[p];return{month:p+1,day:j}}function Tt(g,r){return(g-r+7)%7+1}function Ht(g,r=4,h=1){const{year:p,month:j,day:C}=g,k=$r(p,j,C),z=Tt($s(p,j,C),h);let q=Math.floor((k-z+14-r)/7),he;return q<1?(he=p-1,q=hl(he,r,h)):q>hl(p,r,h)?(he=p+1,q=1):he=p,{weekYear:he,weekNumber:q,weekday:z,...as(g)}}function Rn(g,r=4,h=1){const{weekYear:p,weekNumber:j,weekday:C}=g,k=Tt($s(p,1,r),h),z=en(p);let q=j*7+C-k-7+r,he;q<1?(he=p-1,q+=en(he)):q>z?(he=p+1,q-=en(p)):he=p;const{month:be,day:Le}=Ja(he,q);return{year:he,month:be,day:Le,...as(g)}}function Wl(g){const{year:r,month:h,day:p}=g,j=$r(r,h,p);return{year:r,ordinal:j,...as(g)}}function hu(g){const{year:r,ordinal:h}=g,{month:p,day:j}=Ja(r,h);return{year:r,month:p,day:j,...as(g)}}function mu(g,r){if(!Oe(g.localWeekday)||!Oe(g.localWeekNumber)||!Oe(g.localWeekYear)){if(!Oe(g.weekday)||!Oe(g.weekNumber)||!Oe(g.weekYear))throw new m("Cannot mix locale-based week fields with ISO-based week fields");return Oe(g.localWeekday)||(g.weekday=g.localWeekday),Oe(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),Oe(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:r.getMinDaysInFirstWeek(),startOfWeek:r.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gu(g,r=4,h=1){const p=Ka(g.weekYear),j=Gt(g.weekNumber,1,hl(g.weekYear,r,h)),C=Gt(g.weekday,1,7);return p?j?C?!1:Kt("weekday",g.weekday):Kt("week",g.weekNumber):Kt("weekYear",g.weekYear)}function Xl(g){const r=Ka(g.year),h=Gt(g.ordinal,1,en(g.year));return r?h?!1:Kt("ordinal",g.ordinal):Kt("year",g.year)}function Fs(g){const r=Ka(g.year),h=Gt(g.month,1,12),p=Gt(g.day,1,Zs(g.year,g.month));return r?h?p?!1:Kt("day",g.day):Kt("month",g.month):Kt("year",g.year)}function An(g){const{hour:r,minute:h,second:p,millisecond:j}=g,C=Gt(r,0,23)||r===24&&h===0&&p===0&&j===0,k=Gt(h,0,59),z=Gt(p,0,59),q=Gt(j,0,999);return C?k?z?q?!1:Kt("millisecond",j):Kt("second",p):Kt("minute",h):Kt("hour",r)}function Oe(g){return typeof g>"u"}function da(g){return typeof g=="number"}function Ka(g){return typeof g=="number"&&g%1===0}function _t(g){return typeof g=="string"}function yu(g){return Object.prototype.toString.call(g)==="[object Date]"}function Fr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function pn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function dl(g){return Array.isArray(g)?g:[g]}function xu(g,r,h){if(g.length!==0)return g.reduce((p,j)=>{const C=[r(j),j];return p&&h(p[0],C[0])===p[0]?p:C},null)[1]}function pu(g,r){return r.reduce((h,p)=>(h[p]=g[p],h),{})}function _n(g,r){return Object.prototype.hasOwnProperty.call(g,r)}function Gr(g){if(g==null)return null;if(typeof g!="object")throw new v("Week settings must be an object");if(!Gt(g.firstDay,1,7)||!Gt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(r=>!Gt(r,1,7)))throw new v("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Gt(g,r,h){return Ka(g)&&g>=r&&g<=h}function Gs(g,r){return g-r*Math.floor(g/r)}function it(g,r=2){const h=g<0;let p;return h?p="-"+(""+-g).padStart(r,"0"):p=(""+g).padStart(r,"0"),p}function Mt(g){if(!(Oe(g)||g===null||g===""))return parseInt(g,10)}function vn(g){if(!(Oe(g)||g===null||g===""))return parseFloat(g)}function Zr(g){if(!(Oe(g)||g===null||g==="")){const r=parseFloat("0."+g)*1e3;return Math.floor(r)}}function Jl(g,r,h="round"){const p=10**r;switch(h){case"expand":return g>0?Math.ceil(g*p)/p:Math.floor(g*p)/p;case"trunc":return Math.trunc(g*p)/p;case"round":return Math.round(g*p)/p;case"floor":return Math.floor(g*p)/p;case"ceil":return Math.ceil(g*p)/p;default:throw new RangeError(`Value rounding ${h} is out of range`)}}function fl(g){return g%4===0&&(g%100!==0||g%400===0)}function en(g){return fl(g)?366:365}function Zs(g,r){const h=Gs(r-1,12)+1,p=g+(r-h)/12;return h===2?fl(p)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][h-1]}function Zt(g){let r=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(r=new Date(r),r.setUTCFullYear(g.year,g.month-1,g.day)),+r}function Ps(g,r,h){return-Tt($s(g,1,r),h)+r-1}function hl(g,r=4,h=1){const p=Ps(g,r,h),j=Ps(g+1,r,h);return(en(g)-p+j)/7}function Kl(g){return g>99?g:g>xt.twoDigitCutoffYear?1900+g:2e3+g}function kn(g,r,h,p=null){const j=new Date(g),C={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};p&&(C.timeZone=p);const k={timeZoneName:r,...C},z=new Intl.DateTimeFormat(h,k).formatToParts(j).find(q=>q.type.toLowerCase()==="timezonename");return z?z.value:null}function es(g,r){let h=parseInt(g,10);Number.isNaN(h)&&(h=0);const p=parseInt(r,10)||0,j=h<0||Object.is(h,-0)?-p:p;return h*60+j}function Pr(g){const r=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(r))throw new v(`Invalid unit value ${g}`);return r}function tn(g,r){const h={};for(const p in g)if(_n(g,p)){const j=g[p];if(j==null)continue;h[r(p)]=Pr(j)}return h}function ts(g,r){const h=Math.trunc(Math.abs(g/60)),p=Math.trunc(Math.abs(g%60)),j=g>=0?"+":"-";switch(r){case"short":return`${j}${it(h,2)}:${it(p,2)}`;case"narrow":return`${j}${h}${p>0?`:${p}`:""}`;case"techie":return`${j}${it(h,2)}${it(p,2)}`;default:throw new RangeError(`Value format ${r} is out of range for property format`)}}function as(g){return pu(g,["hour","minute","second","millisecond"])}const vu=["January","February","March","April","May","June","July","August","September","October","November","December"],Qs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ao=["J","F","M","A","M","J","J","A","S","O","N","D"];function bu(g){switch(g){case"narrow":return[...ao];case"short":return[...Qs];case"long":return[...vu];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ns=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],za=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Qr=["M","T","W","T","F","S","S"];function Is(g){switch(g){case"narrow":return[...Qr];case"short":return[...za];case"long":return[...ns];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const zn=["AM","PM"],ml=["Before Christ","Anno Domini"],Su=["BC","AD"],Ir=["B","A"];function Wr(g){switch(g){case"narrow":return[...Ir];case"short":return[...Su];case"long":return[...ml];default:return null}}function ls(g){return zn[g.hour<12?0:1]}function an(g,r){return Is(r)[g.weekday-1]}function Xr(g,r){return bu(r)[g.month-1]}function ss(g,r){return Wr(r)[g.year<0?0:1]}function bn(g,r,h="always",p=!1){const j={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},C=["hours","minutes","seconds"].indexOf(g)===-1;if(h==="auto"&&C){const Le=g==="days";switch(r){case 1:return Le?"tomorrow":`next ${j[g][0]}`;case-1:return Le?"yesterday":`last ${j[g][0]}`;case 0:return Le?"today":`this ${j[g][0]}`}}const k=Object.is(r,-0)||r<0,z=Math.abs(r),q=z===1,he=j[g],be=p?q?he[1]:he[2]||he[1]:q?j[g][0]:g;return k?`${z} ${be} ago`:`in ${z} ${be}`}function Ws(g,r){let h="";for(const p of g)p.literal?h+=p.val:h+=r(p.val);return h}const Xs={D:E,DD:S,DDD:A,DDDD:M,t:Y,tt:X,ttt:Q,tttt:G,T:ee,TT:le,TTT:te,TTTT:I,f:J,ff:U,fff:ce,ffff:me,F:R,FF:ne,FFF:ye,FFFF:B};class qt{static create(r,h={}){return new qt(r,h)}static parseFormat(r){let h=null,p="",j=!1;const C=[];for(let k=0;k<r.length;k++){const z=r.charAt(k);z==="'"?((p.length>0||j)&&C.push({literal:j||/^\s+$/.test(p),val:p===""?"'":p}),h=null,p="",j=!j):j||z===h?p+=z:(p.length>0&&C.push({literal:/^\s+$/.test(p),val:p}),p=z,h=z)}return p.length>0&&C.push({literal:j||/^\s+$/.test(p),val:p}),C}static macroTokenToFormatOpts(r){return Xs[r]}constructor(r,h){this.opts=h,this.loc=r,this.systemLoc=null}formatWithSystemDefault(r,h){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(r,{...this.opts,...h}).format()}dtFormatter(r,h={}){return this.loc.dtFormatter(r,{...this.opts,...h})}formatDateTime(r,h){return this.dtFormatter(r,h).format()}formatDateTimeParts(r,h){return this.dtFormatter(r,h).formatToParts()}formatInterval(r,h){return this.dtFormatter(r.start,h).dtf.formatRange(r.start.toJSDate(),r.end.toJSDate())}resolvedOptions(r,h){return this.dtFormatter(r,h).resolvedOptions()}num(r,h=0,p=void 0){if(this.opts.forceSimple)return it(r,h);const j={...this.opts};return h>0&&(j.padTo=h),p&&(j.signDisplay=p),this.loc.numberFormatter(j).format(r)}formatDateTimeFromString(r,h){const p=this.loc.listingMode()==="en",j=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",C=(Re,Nt)=>this.loc.extract(r,Re,Nt),k=Re=>r.isOffsetFixed&&r.offset===0&&Re.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,Re.format):"",z=()=>p?ls(r):C({hour:"numeric",hourCycle:"h12"},"dayperiod"),q=(Re,Nt)=>p?Xr(r,Re):C(Nt?{month:Re}:{month:Re,day:"numeric"},"month"),he=(Re,Nt)=>p?an(r,Re):C(Nt?{weekday:Re}:{weekday:Re,month:"long",day:"numeric"},"weekday"),be=Re=>{const Nt=qt.macroTokenToFormatOpts(Re);return Nt?this.formatWithSystemDefault(r,Nt):Re},Le=Re=>p?ss(r,Re):C({era:Re},"era"),Pe=Re=>{switch(Re){case"S":return this.num(r.millisecond);case"u":case"SSS":return this.num(r.millisecond,3);case"s":return this.num(r.second);case"ss":return this.num(r.second,2);case"uu":return this.num(Math.floor(r.millisecond/10),2);case"uuu":return this.num(Math.floor(r.millisecond/100));case"m":return this.num(r.minute);case"mm":return this.num(r.minute,2);case"h":return this.num(r.hour%12===0?12:r.hour%12);case"hh":return this.num(r.hour%12===0?12:r.hour%12,2);case"H":return this.num(r.hour);case"HH":return this.num(r.hour,2);case"Z":return k({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return k({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return k({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return r.zone.offsetName(r.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return r.zone.offsetName(r.ts,{format:"long",locale:this.loc.locale});case"z":return r.zoneName;case"a":return z();case"d":return j?C({day:"numeric"},"day"):this.num(r.day);case"dd":return j?C({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return he("short",!0);case"cccc":return he("long",!0);case"ccccc":return he("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return he("short",!1);case"EEEE":return he("long",!1);case"EEEEE":return he("narrow",!1);case"L":return j?C({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return j?C({month:"2-digit",day:"numeric"},"month"):this.num(r.month,2);case"LLL":return q("short",!0);case"LLLL":return q("long",!0);case"LLLLL":return q("narrow",!0);case"M":return j?C({month:"numeric"},"month"):this.num(r.month);case"MM":return j?C({month:"2-digit"},"month"):this.num(r.month,2);case"MMM":return q("short",!1);case"MMMM":return q("long",!1);case"MMMMM":return q("narrow",!1);case"y":return j?C({year:"numeric"},"year"):this.num(r.year);case"yy":return j?C({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return j?C({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return j?C({year:"numeric"},"year"):this.num(r.year,6);case"G":return Le("short");case"GG":return Le("long");case"GGGGG":return Le("narrow");case"kk":return this.num(r.weekYear.toString().slice(-2),2);case"kkkk":return this.num(r.weekYear,4);case"W":return this.num(r.weekNumber);case"WW":return this.num(r.weekNumber,2);case"n":return this.num(r.localWeekNumber);case"nn":return this.num(r.localWeekNumber,2);case"ii":return this.num(r.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(r.localWeekYear,4);case"o":return this.num(r.ordinal);case"ooo":return this.num(r.ordinal,3);case"q":return this.num(r.quarter);case"qq":return this.num(r.quarter,2);case"X":return this.num(Math.floor(r.ts/1e3));case"x":return this.num(r.ts);default:return be(Re)}};return Ws(qt.parseFormat(h),Pe)}formatDurationFromString(r,h){const p=this.opts.signMode==="negativeLargestOnly"?-1:1,j=be=>{switch(be[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},C=(be,Le)=>Pe=>{const Re=j(Pe);if(Re){const Nt=Le.isNegativeDuration&&Re!==Le.largestUnit?p:1;let Bt;return this.opts.signMode==="negativeLargestOnly"&&Re!==Le.largestUnit?Bt="never":this.opts.signMode==="all"?Bt="always":Bt="auto",this.num(be.get(Re)*Nt,Pe.length,Bt)}else return Pe},k=qt.parseFormat(h),z=k.reduce((be,{literal:Le,val:Pe})=>Le?be:be.concat(Pe),[]),q=r.shiftTo(...z.map(j).filter(be=>be)),he={isNegativeDuration:q<0,largestUnit:Object.keys(q.values)[0]};return Ws(k,C(q,he))}}const rs=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function nn(...g){const r=g.reduce((h,p)=>h+p.source,"");return RegExp(`^${r}$`)}function Un(...g){return r=>g.reduce(([h,p,j],C)=>{const[k,z,q]=C(r,j);return[{...h,...k},z||p,q]},[{},null,1]).slice(0,2)}function Ct(g,...r){if(g==null)return[null,null];for(const[h,p]of r){const j=h.exec(g);if(j)return p(j)}return[null,null]}function Sn(...g){return(r,h)=>{const p={};let j;for(j=0;j<g.length;j++)p[g[j]]=Mt(r[h+j]);return[p,null,h+j]}}const is=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,us=`(?:${is.source}?(?:\\[(${rs.source})\\])?)?`,Jr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Js=RegExp(`${Jr.source}${us}`),cs=RegExp(`(?:[Tt]${Js.source})?`),os=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ks=/(\d{4})-?W(\d\d)(?:-?(\d))?/,wu=/(\d{4})-?(\d{3})/,no=Sn("weekYear","weekNumber","weekDay"),lo=Sn("year","ordinal"),so=/(\d{4})-(\d\d)-(\d\d)/,er=RegExp(`${Jr.source} ?(?:${is.source}|(${rs.source}))?`),ro=RegExp(`(?: ${er.source})?`);function gl(g,r,h){const p=g[r];return Oe(p)?h:Mt(p)}function io(g,r){return[{year:gl(g,r),month:gl(g,r+1,1),day:gl(g,r+2,1)},null,r+3]}function yl(g,r){return[{hours:gl(g,r,0),minutes:gl(g,r+1,0),seconds:gl(g,r+2,0),milliseconds:Zr(g[r+3])},null,r+4]}function ds(g,r){const h=!g[r]&&!g[r+1],p=es(g[r+1],g[r+2]),j=h?null:Ge.instance(p);return[{},j,r+3]}function xl(g,r){const h=g[r]?Ee.create(g[r]):null;return[{},h,r+1]}const uo=RegExp(`^T?${Jr.source}$`),co=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function oo(g){const[r,h,p,j,C,k,z,q,he]=g,be=r[0]==="-",Le=q&&q[0]==="-",Pe=(Re,Nt=!1)=>Re!==void 0&&(Nt||Re&&be)?-Re:Re;return[{years:Pe(vn(h)),months:Pe(vn(p)),weeks:Pe(vn(j)),days:Pe(vn(C)),hours:Pe(vn(k)),minutes:Pe(vn(z)),seconds:Pe(vn(q),q==="-0"),milliseconds:Pe(Zr(he),Le)}]}const fo={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function fs(g,r,h,p,j,C,k){const z={year:r.length===2?Kl(Mt(r)):Mt(r),month:Qs.indexOf(h)+1,day:Mt(p),hour:Mt(j),minute:Mt(C)};return k&&(z.second=Mt(k)),g&&(z.weekday=g.length>3?ns.indexOf(g)+1:za.indexOf(g)+1),z}const ho=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function mo(g){const[,r,h,p,j,C,k,z,q,he,be,Le]=g,Pe=fs(r,j,p,h,C,k,z);let Re;return q?Re=fo[q]:he?Re=0:Re=es(be,Le),[Pe,new Ge(Re)]}function go(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Nu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,yo=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,xo=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ju(g){const[,r,h,p,j,C,k,z]=g;return[fs(r,j,p,h,C,k,z),Ge.utcInstance]}function po(g){const[,r,h,p,j,C,k,z]=g;return[fs(r,z,h,p,j,C,k),Ge.utcInstance]}const vo=nn(os,cs),bo=nn(Ks,cs),So=nn(wu,cs),wo=nn(Js),Eu=Un(io,yl,ds,xl),Kr=Un(no,yl,ds,xl),hs=Un(lo,yl,ds,xl),No=Un(yl,ds,xl);function Tu(g){return Ct(g,[vo,Eu],[bo,Kr],[So,hs],[wo,No])}function Mu(g){return Ct(go(g),[ho,mo])}function Cu(g){return Ct(g,[Nu,ju],[yo,ju],[xo,po])}function Ou(g){return Ct(g,[co,oo])}const Du=Un(yl);function pl(g){return Ct(g,[uo,Du])}const jo=nn(so,ro),Eo=nn(er),To=Un(yl,ds,xl);function Ru(g){return Ct(g,[jo,Eu],[Eo,To])}const ei="Invalid Duration",vl={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},ms={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...vl},fa=146097/400,ln=146097/4800,Au={years:{quarters:4,months:12,weeks:fa/7,days:fa,hours:fa*24,minutes:fa*24*60,seconds:fa*24*60*60,milliseconds:fa*24*60*60*1e3},quarters:{months:3,weeks:fa/28,days:fa/4,hours:fa*24/4,minutes:fa*24*60/4,seconds:fa*24*60*60/4,milliseconds:fa*24*60*60*1e3/4},months:{weeks:ln/7,days:ln,hours:ln*24,minutes:ln*24*60,seconds:ln*24*60*60,milliseconds:ln*24*60*60*1e3},...vl},wn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ti=wn.slice(0).reverse();function ja(g,r,h=!1){const p={values:h?r.values:{...g.values,...r.values||{}},loc:g.loc.clone(r.loc),conversionAccuracy:r.conversionAccuracy||g.conversionAccuracy,matrix:r.matrix||g.matrix};return new Ze(p)}function ai(g,r){var h;let p=(h=r.milliseconds)!=null?h:0;for(const j of ti.slice(1))r[j]&&(p+=r[j]*g[j].milliseconds);return p}function ni(g,r){const h=ai(g,r)<0?-1:1;wn.reduceRight((p,j)=>{if(Oe(r[j]))return p;if(p){const C=r[p]*h,k=g[j][p],z=Math.floor(C/k);r[j]+=z*h,r[p]-=z*k*h}return j},null),wn.reduce((p,j)=>{if(Oe(r[j]))return p;if(p){const C=r[p]%1;r[p]-=C,r[j]+=C*g[p][j]}return j},null)}function li(g){const r={};for(const[h,p]of Object.entries(g))p!==0&&(r[h]=p);return r}class Ze{constructor(r){const h=r.conversionAccuracy==="longterm"||!1;let p=h?Au:ms;r.matrix&&(p=r.matrix),this.values=r.values,this.loc=r.loc||xe.create(),this.conversionAccuracy=h?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=p,this.isLuxonDuration=!0}static fromMillis(r,h){return Ze.fromObject({milliseconds:r},h)}static fromObject(r,h={}){if(r==null||typeof r!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new Ze({values:tn(r,Ze.normalizeUnit),loc:xe.fromObject(h),conversionAccuracy:h.conversionAccuracy,matrix:h.matrix})}static fromDurationLike(r){if(da(r))return Ze.fromMillis(r);if(Ze.isDuration(r))return r;if(typeof r=="object")return Ze.fromObject(r);throw new v(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,h){const[p]=Ou(r);return p?Ze.fromObject(p,h):Ze.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,h){const[p]=pl(r);return p?Ze.fromObject(p,h):Ze.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the Duration is invalid");const p=r instanceof oa?r:new oa(r,h);if(xt.throwOnInvalid)throw new o(p);return new Ze({invalid:p})}static normalizeUnit(r){const h={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[r&&r.toLowerCase()];if(!h)throw new f(r);return h}static isDuration(r){return r&&r.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(r,h={}){const p={...h,floor:h.round!==!1&&h.floor!==!1};return this.isValid?qt.create(this.loc,p).formatDurationFromString(this,r):ei}toHuman(r={}){if(!this.isValid)return ei;const h=r.showZeros!==!1,p=wn.map(j=>{const C=this.values[j];return Oe(C)||C===0&&!h?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:j.slice(0,-1)}).format(C)}).filter(j=>j);return this.loc.listFormatter({type:"conjunction",style:r.listStyle||"narrow",...r}).format(p)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let r="P";return this.years!==0&&(r+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(r+=this.months+this.quarters*3+"M"),this.weeks!==0&&(r+=this.weeks+"W"),this.days!==0&&(r+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(r+="T"),this.hours!==0&&(r+=this.hours+"H"),this.minutes!==0&&(r+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(r+=Jl(this.seconds+this.milliseconds/1e3,3)+"S"),r==="P"&&(r+="T0S"),r}toISOTime(r={}){if(!this.isValid)return null;const h=this.toMillis();return h<0||h>=864e5?null:(r={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...r,includeOffset:!1},je.fromMillis(h,{zone:"UTC"}).toISOTime(r))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ai(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(r){if(!this.isValid)return this;const h=Ze.fromDurationLike(r),p={};for(const j of wn)(_n(h.values,j)||_n(this.values,j))&&(p[j]=h.get(j)+this.get(j));return ja(this,{values:p},!0)}minus(r){if(!this.isValid)return this;const h=Ze.fromDurationLike(r);return this.plus(h.negate())}mapUnits(r){if(!this.isValid)return this;const h={};for(const p of Object.keys(this.values))h[p]=Pr(r(this.values[p],p));return ja(this,{values:h},!0)}get(r){return this[Ze.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const h={...this.values,...tn(r,Ze.normalizeUnit)};return ja(this,{values:h})}reconfigure({locale:r,numberingSystem:h,conversionAccuracy:p,matrix:j}={}){const k={loc:this.loc.clone({locale:r,numberingSystem:h}),matrix:j,conversionAccuracy:p};return ja(this,k)}as(r){return this.isValid?this.shiftTo(r).get(r):NaN}normalize(){if(!this.isValid)return this;const r=this.toObject();return ni(this.matrix,r),ja(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=li(this.normalize().shiftToAll().toObject());return ja(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(k=>Ze.normalizeUnit(k));const h={},p={},j=this.toObject();let C;for(const k of wn)if(r.indexOf(k)>=0){C=k;let z=0;for(const he in p)z+=this.matrix[he][k]*p[he],p[he]=0;da(j[k])&&(z+=j[k]);const q=Math.trunc(z);h[k]=q,p[k]=(z*1e3-q*1e3)/1e3}else da(j[k])&&(p[k]=j[k]);for(const k in p)p[k]!==0&&(h[C]+=k===C?p[k]:p[k]/this.matrix[C][k]);return ni(this.matrix,h),ja(this,{values:h},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const r={};for(const h of Object.keys(this.values))r[h]=this.values[h]===0?0:-this.values[h];return ja(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=li(this.values);return ja(this,{values:r},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(r){if(!this.isValid||!r.isValid||!this.loc.equals(r.loc))return!1;function h(p,j){return p===void 0||p===0?j===void 0||j===0:p===j}for(const p of wn)if(!h(this.values[p],r.values[p]))return!1;return!0}}const bl="Invalid Interval";function Mo(g,r){return!g||!g.isValid?pt.invalid("missing or invalid start"):!r||!r.isValid?pt.invalid("missing or invalid end"):r<g?pt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${r.toISO()}`):null}class pt{constructor(r){this.s=r.start,this.e=r.end,this.invalid=r.invalid||null,this.isLuxonInterval=!0}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the Interval is invalid");const p=r instanceof oa?r:new oa(r,h);if(xt.throwOnInvalid)throw new d(p);return new pt({invalid:p})}static fromDateTimes(r,h){const p=ga(r),j=ga(h),C=Mo(p,j);return C??new pt({start:p,end:j})}static after(r,h){const p=Ze.fromDurationLike(h),j=ga(r);return pt.fromDateTimes(j,j.plus(p))}static before(r,h){const p=Ze.fromDurationLike(h),j=ga(r);return pt.fromDateTimes(j.minus(p),j)}static fromISO(r,h){const[p,j]=(r||"").split("/",2);if(p&&j){let C,k;try{C=je.fromISO(p,h),k=C.isValid}catch{k=!1}let z,q;try{z=je.fromISO(j,h),q=z.isValid}catch{q=!1}if(k&&q)return pt.fromDateTimes(C,z);if(k){const he=Ze.fromISO(j,h);if(he.isValid)return pt.after(C,he)}else if(q){const he=Ze.fromISO(p,h);if(he.isValid)return pt.before(z,he)}}return pt.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static isInterval(r){return r&&r.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(r="milliseconds"){return this.isValid?this.toDuration(r).get(r):NaN}count(r="milliseconds",h){if(!this.isValid)return NaN;const p=this.start.startOf(r,h);let j;return h!=null&&h.useLocaleWeeks?j=this.end.reconfigure({locale:p.locale}):j=this.end,j=j.startOf(r,h),Math.floor(j.diff(p,r).get(r))+(j.valueOf()!==this.end.valueOf())}hasSame(r){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,r):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(r){return this.isValid?this.s>r:!1}isBefore(r){return this.isValid?this.e<=r:!1}contains(r){return this.isValid?this.s<=r&&this.e>r:!1}set({start:r,end:h}={}){return this.isValid?pt.fromDateTimes(r||this.s,h||this.e):this}splitAt(...r){if(!this.isValid)return[];const h=r.map(ga).filter(k=>this.contains(k)).sort((k,z)=>k.toMillis()-z.toMillis()),p=[];let{s:j}=this,C=0;for(;j<this.e;){const k=h[C]||this.e,z=+k>+this.e?this.e:k;p.push(pt.fromDateTimes(j,z)),j=z,C+=1}return p}splitBy(r){const h=Ze.fromDurationLike(r);if(!this.isValid||!h.isValid||h.as("milliseconds")===0)return[];let{s:p}=this,j=1,C;const k=[];for(;p<this.e;){const z=this.start.plus(h.mapUnits(q=>q*j));C=+z>+this.e?this.e:z,k.push(pt.fromDateTimes(p,C)),p=C,j+=1}return k}divideEqually(r){return this.isValid?this.splitBy(this.length()/r).slice(0,r):[]}overlaps(r){return this.e>r.s&&this.s<r.e}abutsStart(r){return this.isValid?+this.e==+r.s:!1}abutsEnd(r){return this.isValid?+r.e==+this.s:!1}engulfs(r){return this.isValid?this.s<=r.s&&this.e>=r.e:!1}equals(r){return!this.isValid||!r.isValid?!1:this.s.equals(r.s)&&this.e.equals(r.e)}intersection(r){if(!this.isValid)return this;const h=this.s>r.s?this.s:r.s,p=this.e<r.e?this.e:r.e;return h>=p?null:pt.fromDateTimes(h,p)}union(r){if(!this.isValid)return this;const h=this.s<r.s?this.s:r.s,p=this.e>r.e?this.e:r.e;return pt.fromDateTimes(h,p)}static merge(r){const[h,p]=r.sort((j,C)=>j.s-C.s).reduce(([j,C],k)=>C?C.overlaps(k)||C.abutsStart(k)?[j,C.union(k)]:[j.concat([C]),k]:[j,k],[[],null]);return p&&h.push(p),h}static xor(r){let h=null,p=0;const j=[],C=r.map(q=>[{time:q.s,type:"s"},{time:q.e,type:"e"}]),k=Array.prototype.concat(...C),z=k.sort((q,he)=>q.time-he.time);for(const q of z)p+=q.type==="s"?1:-1,p===1?h=q.time:(h&&+h!=+q.time&&j.push(pt.fromDateTimes(h,q.time)),h=null);return pt.merge(j)}difference(...r){return pt.xor([this].concat(r)).map(h=>this.intersection(h)).filter(h=>h&&!h.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:bl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(r=E,h={}){return this.isValid?qt.create(this.s.loc.clone(h),r).formatInterval(this):bl}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:bl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:bl}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:bl}toFormat(r,{separator:h=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${h}${this.e.toFormat(r)}`:bl}toDuration(r,h){return this.isValid?this.e.diff(this.s,r,h):Ze.invalid(this.invalidReason)}mapEndpoints(r){return pt.fromDateTimes(r(this.s),r(this.e))}}class gs{static hasDST(r=xt.defaultZone){const h=je.now().setZone(r).set({month:12});return!r.isUniversal&&h.offset!==h.set({month:6}).offset}static isValidIANAZone(r){return Ee.isValidZone(r)}static normalizeZone(r){return We(r,xt.defaultZone)}static getStartOfWeek({locale:r=null,locObj:h=null}={}){return(h||xe.create(r)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:r=null,locObj:h=null}={}){return(h||xe.create(r)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:r=null,locObj:h=null}={}){return(h||xe.create(r)).getWeekendDays().slice()}static months(r="long",{locale:h=null,numberingSystem:p=null,locObj:j=null,outputCalendar:C="gregory"}={}){return(j||xe.create(h,p,C)).months(r)}static monthsFormat(r="long",{locale:h=null,numberingSystem:p=null,locObj:j=null,outputCalendar:C="gregory"}={}){return(j||xe.create(h,p,C)).months(r,!0)}static weekdays(r="long",{locale:h=null,numberingSystem:p=null,locObj:j=null}={}){return(j||xe.create(h,p,null)).weekdays(r)}static weekdaysFormat(r="long",{locale:h=null,numberingSystem:p=null,locObj:j=null}={}){return(j||xe.create(h,p,null)).weekdays(r,!0)}static meridiems({locale:r=null}={}){return xe.create(r).meridiems()}static eras(r="short",{locale:h=null}={}){return xe.create(h,null,"gregory").eras(r)}static features(){return{relative:Fr(),localeWeek:pn()}}}function ea(g,r){const h=j=>j.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),p=h(r)-h(g);return Math.floor(Ze.fromMillis(p).as("days"))}function ys(g,r,h){const p=[["years",(q,he)=>he.year-q.year],["quarters",(q,he)=>he.quarter-q.quarter+(he.year-q.year)*4],["months",(q,he)=>he.month-q.month+(he.year-q.year)*12],["weeks",(q,he)=>{const be=ea(q,he);return(be-be%7)/7}],["days",ea]],j={},C=g;let k,z;for(const[q,he]of p)h.indexOf(q)>=0&&(k=q,j[q]=he(g,r),z=C.plus(j),z>r?(j[q]--,g=C.plus(j),g>r&&(z=g,j[q]--,g=C.plus(j))):g=z);return[g,j,z,k]}function _u(g,r,h,p){let[j,C,k,z]=ys(g,r,h);const q=r-j,he=h.filter(Le=>["hours","minutes","seconds","milliseconds"].indexOf(Le)>=0);he.length===0&&(k<r&&(k=j.plus({[z]:1})),k!==j&&(C[z]=(C[z]||0)+q/(k-j)));const be=Ze.fromObject(C,p);return he.length>0?Ze.fromMillis(q,p).shiftTo(...he).plus(be):be}const ku="missing Intl.DateTimeFormat.formatToParts support";function Xe(g,r=h=>h){return{regex:g,deser:([h])=>r(to(h))}}const tr="[ ]",zu=new RegExp(tr,"g");function Sl(g){return g.replace(/\./g,"\\.?").replace(zu,tr)}function ar(g){return g.replace(/\./g,"").replace(zu," ").toLowerCase()}function Pt(g,r){return g===null?null:{regex:RegExp(g.map(Sl).join("|")),deser:([h])=>g.findIndex(p=>ar(h)===ar(p))+r}}function nr(g,r){return{regex:g,deser:([,h,p])=>es(h,p),groups:r}}function xs(g){return{regex:g,deser:([r])=>r}}function Ln(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function wl(g,r){const h=Jt(r),p=Jt(r,"{2}"),j=Jt(r,"{3}"),C=Jt(r,"{4}"),k=Jt(r,"{6}"),z=Jt(r,"{1,2}"),q=Jt(r,"{1,3}"),he=Jt(r,"{1,6}"),be=Jt(r,"{1,9}"),Le=Jt(r,"{2,4}"),Pe=Jt(r,"{4,6}"),Re=Yt=>({regex:RegExp(Ln(Yt.val)),deser:([Nn])=>Nn,literal:!0}),Bt=(Yt=>{if(g.literal)return Re(Yt);switch(Yt.val){case"G":return Pt(r.eras("short"),0);case"GG":return Pt(r.eras("long"),0);case"y":return Xe(he);case"yy":return Xe(Le,Kl);case"yyyy":return Xe(C);case"yyyyy":return Xe(Pe);case"yyyyyy":return Xe(k);case"M":return Xe(z);case"MM":return Xe(p);case"MMM":return Pt(r.months("short",!0),1);case"MMMM":return Pt(r.months("long",!0),1);case"L":return Xe(z);case"LL":return Xe(p);case"LLL":return Pt(r.months("short",!1),1);case"LLLL":return Pt(r.months("long",!1),1);case"d":return Xe(z);case"dd":return Xe(p);case"o":return Xe(q);case"ooo":return Xe(j);case"HH":return Xe(p);case"H":return Xe(z);case"hh":return Xe(p);case"h":return Xe(z);case"mm":return Xe(p);case"m":return Xe(z);case"q":return Xe(z);case"qq":return Xe(p);case"s":return Xe(z);case"ss":return Xe(p);case"S":return Xe(q);case"SSS":return Xe(j);case"u":return xs(be);case"uu":return xs(z);case"uuu":return Xe(h);case"a":return Pt(r.meridiems(),0);case"kkkk":return Xe(C);case"kk":return Xe(Le,Kl);case"W":return Xe(z);case"WW":return Xe(p);case"E":case"c":return Xe(h);case"EEE":return Pt(r.weekdays("short",!1),1);case"EEEE":return Pt(r.weekdays("long",!1),1);case"ccc":return Pt(r.weekdays("short",!0),1);case"cccc":return Pt(r.weekdays("long",!0),1);case"Z":case"ZZ":return nr(new RegExp(`([+-]${z.source})(?::(${p.source}))?`),2);case"ZZZ":return nr(new RegExp(`([+-]${z.source})(${p.source})?`),2);case"z":return xs(/[a-z_+-/]{1,256}?/i);case" ":return xs(/[^\S\n\r]/);default:return Re(Yt)}})(g)||{invalidReason:ku};return Bt.token=g,Bt}const si={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Uu(g,r,h){const{type:p,value:j}=g;if(p==="literal"){const q=/^\s+$/.test(j);return{literal:!q,val:q?" ":j}}const C=r[p];let k=p;p==="hour"&&(r.hour12!=null?k=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?k="hour12":k="hour24":k=h.hour12?"hour12":"hour24");let z=si[k];if(typeof z=="object"&&(z=z[C]),z)return{literal:!1,val:z}}function Hn(g){return[`^${g.map(h=>h.regex).reduce((h,p)=>`${h}(${p.source})`,"")}$`,g]}function Lu(g,r,h){const p=g.match(r);if(p){const j={};let C=1;for(const k in h)if(_n(h,k)){const z=h[k],q=z.groups?z.groups+1:1;!z.literal&&z.token&&(j[z.token.val[0]]=z.deser(p.slice(C,C+q))),C+=q}return[p,j]}else return[p,{}]}function Hu(g){const r=C=>{switch(C){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let h=null,p;return Oe(g.z)||(h=Ee.create(g.z)),Oe(g.Z)||(h||(h=new Ge(g.Z)),p=g.Z),Oe(g.q)||(g.M=(g.q-1)*3+1),Oe(g.h)||(g.h<12&&g.a===1?g.h+=12:g.h===12&&g.a===0&&(g.h=0)),g.G===0&&g.y&&(g.y=-g.y),Oe(g.u)||(g.S=Zr(g.u)),[Object.keys(g).reduce((C,k)=>{const z=r(k);return z&&(C[z]=g[k]),C},{}),h,p]}let lr=null;function Oo(){return lr||(lr=je.fromMillis(1555555555555)),lr}function Do(g,r){if(g.literal)return g;const h=qt.macroTokenToFormatOpts(g.val),p=ha(h,r);return p==null||p.includes(void 0)?g:p}function qu(g,r){return Array.prototype.concat(...g.map(h=>Do(h,r)))}class ri{constructor(r,h){if(this.locale=r,this.format=h,this.tokens=qu(qt.parseFormat(h),r),this.units=this.tokens.map(p=>wl(p,r)),this.disqualifyingUnit=this.units.find(p=>p.invalidReason),!this.disqualifyingUnit){const[p,j]=Hn(this.units);this.regex=RegExp(p,"i"),this.handlers=j}}explainFromTokens(r){if(this.isValid){const[h,p]=Lu(r,this.regex,this.handlers),[j,C,k]=p?Hu(p):[null,null,void 0];if(_n(p,"a")&&_n(p,"H"))throw new m("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:this.tokens,regex:this.regex,rawMatches:h,matches:p,result:j,zone:C,specificOffset:k}}else return{input:r,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function ii(g,r,h){return new ri(g,h).explainFromTokens(r)}function ui(g,r,h){const{result:p,zone:j,specificOffset:C,invalidReason:k}=ii(g,r,h);return[p,j,C,k]}function ha(g,r){if(!g)return null;const p=qt.create(r,g).dtFormatter(Oo()),j=p.formatToParts(),C=p.resolvedOptions();return j.map(k=>Uu(k,g,C))}const Nl="Invalid DateTime",sa=864e13;function Ua(g){return new oa("unsupported zone",`the zone "${g.name}" is not supported`)}function ps(g){return g.weekData===null&&(g.weekData=Ht(g.c)),g.weekData}function jl(g){return g.localWeekData===null&&(g.localWeekData=Ht(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function La(g,r){const h={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new je({...h,...r,old:h})}function sr(g,r,h){let p=g-r*60*1e3;const j=h.offset(p);if(r===j)return[p,r];p-=(j-r)*60*1e3;const C=h.offset(p);return j===C?[p,j]:[g-Math.min(j,C)*60*1e3,Math.max(j,C)]}function Ha(g,r){g+=r*60*1e3;const h=new Date(g);return{year:h.getUTCFullYear(),month:h.getUTCMonth()+1,day:h.getUTCDate(),hour:h.getUTCHours(),minute:h.getUTCMinutes(),second:h.getUTCSeconds(),millisecond:h.getUTCMilliseconds()}}function vs(g,r,h){return sr(Zt(g),r,h)}function bs(g,r){const h=g.o,p=g.c.year+Math.trunc(r.years),j=g.c.month+Math.trunc(r.months)+Math.trunc(r.quarters)*3,C={...g.c,year:p,month:j,day:Math.min(g.c.day,Zs(p,j))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},k=Ze.fromObject({years:r.years-Math.trunc(r.years),quarters:r.quarters-Math.trunc(r.quarters),months:r.months-Math.trunc(r.months),weeks:r.weeks-Math.trunc(r.weeks),days:r.days-Math.trunc(r.days),hours:r.hours,minutes:r.minutes,seconds:r.seconds,milliseconds:r.milliseconds}).as("milliseconds"),z=Zt(C);let[q,he]=sr(z,h,g.zone);return k!==0&&(q+=k,he=g.zone.offset(q)),{ts:q,o:he}}function Ea(g,r,h,p,j,C){const{setZone:k,zone:z}=h;if(g&&Object.keys(g).length!==0||r){const q=r||z,he=je.fromObject(g,{...h,zone:q,specificOffset:C});return k?he:he.setZone(z)}else return je.invalid(new oa("unparsable",`the input "${j}" can't be parsed as ${p}`))}function rr(g,r,h=!0){return g.isValid?qt.create(xe.create("en-US"),{allowZ:h,forceSimple:!0}).formatDateTimeFromString(g,r):null}function Qt(g,r,h){const p=g.c.year>9999||g.c.year<0;let j="";if(p&&g.c.year>=0&&(j+="+"),j+=it(g.c.year,p?6:4),h==="year")return j;if(r){if(j+="-",j+=it(g.c.month),h==="month")return j;j+="-"}else if(j+=it(g.c.month),h==="month")return j;return j+=it(g.c.day),j}function ir(g,r,h,p,j,C,k){let z=!h||g.c.millisecond!==0||g.c.second!==0,q="";switch(k){case"day":case"month":case"year":break;default:if(q+=it(g.c.hour),k==="hour")break;if(r){if(q+=":",q+=it(g.c.minute),k==="minute")break;z&&(q+=":",q+=it(g.c.second))}else{if(q+=it(g.c.minute),k==="minute")break;z&&(q+=it(g.c.second))}if(k==="second")break;z&&(!p||g.c.millisecond!==0)&&(q+=".",q+=it(g.c.millisecond,3))}return j&&(g.isOffsetFixed&&g.offset===0&&!C?q+="Z":g.o<0?(q+="-",q+=it(Math.trunc(-g.o/60)),q+=":",q+=it(Math.trunc(-g.o%60))):(q+="+",q+=it(Math.trunc(g.o/60)),q+=":",q+=it(Math.trunc(g.o%60)))),C&&(q+="["+g.zone.ianaName+"]"),q}const qa={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Vu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ur={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Va=["year","month","day","hour","minute","second","millisecond"],ci=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Bu=["year","ordinal","hour","minute","second","millisecond"];function El(g){const r={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!r)throw new f(g);return r}function oi(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return El(g)}}function ma(g){if(sn===void 0&&(sn=xt.now()),g.type!=="iana")return g.offset(sn);const r=g.name;let h=ta.get(r);return h===void 0&&(h=g.offset(sn),ta.set(r,h)),h}function qn(g,r){const h=We(r.zone,xt.defaultZone);if(!h.isValid)return je.invalid(Ua(h));const p=xe.fromObject(r);let j,C;if(Oe(g.year))j=xt.now();else{for(const q of Va)Oe(g[q])&&(g[q]=qa[q]);const k=Fs(g)||An(g);if(k)return je.invalid(k);const z=ma(h);[j,C]=vs(g,z,h)}return new je({ts:j,zone:h,loc:p,o:C})}function Vn(g,r,h){const p=Oe(h.round)?!0:h.round,j=Oe(h.rounding)?"trunc":h.rounding,C=(z,q)=>(z=Jl(z,p||h.calendary?0:2,h.calendary?"round":j),r.loc.clone(h).relFormatter(h).format(z,q)),k=z=>h.calendary?r.hasSame(g,z)?0:r.startOf(z).diff(g.startOf(z),z).get(z):r.diff(g,z).get(z);if(h.unit)return C(k(h.unit),h.unit);for(const z of h.units){const q=k(z);if(Math.abs(q)>=1)return C(q,z)}return C(g>r?-0:0,h.units[h.units.length-1])}function Ss(g){let r={},h;return g.length>0&&typeof g[g.length-1]=="object"?(r=g[g.length-1],h=Array.from(g).slice(0,g.length-1)):h=Array.from(g),[r,h]}let sn;const ta=new Map;class je{constructor(r){const h=r.zone||xt.defaultZone;let p=r.invalid||(Number.isNaN(r.ts)?new oa("invalid input"):null)||(h.isValid?null:Ua(h));this.ts=Oe(r.ts)?xt.now():r.ts;let j=null,C=null;if(!p)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(h))[j,C]=[r.old.c,r.old.o];else{const z=da(r.o)&&!r.old?r.o:h.offset(this.ts);j=Ha(this.ts,z),p=Number.isNaN(j.year)?new oa("invalid input"):null,j=p?null:j,C=p?null:z}this._zone=h,this.loc=r.loc||xe.create(),this.invalid=p,this.weekData=null,this.localWeekData=null,this.c=j,this.o=C,this.isLuxonDateTime=!0}static now(){return new je({})}static local(){const[r,h]=Ss(arguments),[p,j,C,k,z,q,he]=h;return qn({year:p,month:j,day:C,hour:k,minute:z,second:q,millisecond:he},r)}static utc(){const[r,h]=Ss(arguments),[p,j,C,k,z,q,he]=h;return r.zone=Ge.utcInstance,qn({year:p,month:j,day:C,hour:k,minute:z,second:q,millisecond:he},r)}static fromJSDate(r,h={}){const p=yu(r)?r.valueOf():NaN;if(Number.isNaN(p))return je.invalid("invalid input");const j=We(h.zone,xt.defaultZone);return j.isValid?new je({ts:p,zone:j,loc:xe.fromObject(h)}):je.invalid(Ua(j))}static fromMillis(r,h={}){if(da(r))return r<-sa||r>sa?je.invalid("Timestamp out of range"):new je({ts:r,zone:We(h.zone,xt.defaultZone),loc:xe.fromObject(h)});throw new v(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,h={}){if(da(r))return new je({ts:r*1e3,zone:We(h.zone,xt.defaultZone),loc:xe.fromObject(h)});throw new v("fromSeconds requires a numerical input")}static fromObject(r,h={}){r=r||{};const p=We(h.zone,xt.defaultZone);if(!p.isValid)return je.invalid(Ua(p));const j=xe.fromObject(h),C=tn(r,oi),{minDaysInFirstWeek:k,startOfWeek:z}=mu(C,j),q=xt.now(),he=Oe(h.specificOffset)?p.offset(q):h.specificOffset,be=!Oe(C.ordinal),Le=!Oe(C.year),Pe=!Oe(C.month)||!Oe(C.day),Re=Le||Pe,Nt=C.weekYear||C.weekNumber;if((Re||be)&&Nt)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Pe&&be)throw new m("Can't mix ordinal dates with month/day");const Bt=Nt||C.weekday&&!Re;let Yt,Nn,rn=Ha(q,he);Bt?(Yt=ci,Nn=Vu,rn=Ht(rn,k,z)):be?(Yt=Bu,Nn=ur,rn=Wl(rn)):(Yt=Va,Nn=qa);let cr=!1;for(const $a of Yt){const or=C[$a];Oe(or)?cr?C[$a]=Nn[$a]:C[$a]=rn[$a]:cr=!0}const Bn=Bt?gu(C,k,z):be?Xl(C):Fs(C),Ya=Bn||An(C);if(Ya)return je.invalid(Ya);const jn=Bt?Rn(C,k,z):be?hu(C):C,[un,di]=vs(jn,he,p),Yn=new je({ts:un,zone:p,o:di,loc:j});return C.weekday&&Re&&r.weekday!==Yn.weekday?je.invalid("mismatched weekday",`you can't specify both a weekday of ${C.weekday} and a date of ${Yn.toISO()}`):Yn.isValid?Yn:je.invalid(Yn.invalid)}static fromISO(r,h={}){const[p,j]=Tu(r);return Ea(p,j,h,"ISO 8601",r)}static fromRFC2822(r,h={}){const[p,j]=Mu(r);return Ea(p,j,h,"RFC 2822",r)}static fromHTTP(r,h={}){const[p,j]=Cu(r);return Ea(p,j,h,"HTTP",h)}static fromFormat(r,h,p={}){if(Oe(r)||Oe(h))throw new v("fromFormat requires an input string and a format");const{locale:j=null,numberingSystem:C=null}=p,k=xe.fromOpts({locale:j,numberingSystem:C,defaultToEN:!0}),[z,q,he,be]=ui(k,r,h);return be?je.invalid(be):Ea(z,q,p,`format ${h}`,r,he)}static fromString(r,h,p={}){return je.fromFormat(r,h,p)}static fromSQL(r,h={}){const[p,j]=Ru(r);return Ea(p,j,h,"SQL",r)}static invalid(r,h=null){if(!r)throw new v("need to specify a reason the DateTime is invalid");const p=r instanceof oa?r:new oa(r,h);if(xt.throwOnInvalid)throw new u(p);return new je({invalid:p})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,h={}){const p=ha(r,xe.fromObject(h));return p?p.map(j=>j?j.val:null).join(""):null}static expandFormat(r,h={}){return qu(qt.parseFormat(r),xe.fromObject(h)).map(j=>j.val).join("")}static resetCache(){sn=void 0,ta.clear()}get(r){return this[r]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ps(this).weekYear:NaN}get weekNumber(){return this.isValid?ps(this).weekNumber:NaN}get weekday(){return this.isValid?ps(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?jl(this).weekday:NaN}get localWeekNumber(){return this.isValid?jl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?jl(this).weekYear:NaN}get ordinal(){return this.isValid?Wl(this.c).ordinal:NaN}get monthShort(){return this.isValid?gs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?gs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?gs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?gs.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const r=864e5,h=6e4,p=Zt(this.c),j=this.zone.offset(p-r),C=this.zone.offset(p+r),k=this.zone.offset(p-j*h),z=this.zone.offset(p-C*h);if(k===z)return[this];const q=p-k*h,he=p-z*h,be=Ha(q,k),Le=Ha(he,z);return be.hour===Le.hour&&be.minute===Le.minute&&be.second===Le.second&&be.millisecond===Le.millisecond?[La(this,{ts:q}),La(this,{ts:he})]:[this]}get isInLeapYear(){return fl(this.year)}get daysInMonth(){return Zs(this.year,this.month)}get daysInYear(){return this.isValid?en(this.year):NaN}get weeksInWeekYear(){return this.isValid?hl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?hl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(r={}){const{locale:h,numberingSystem:p,calendar:j}=qt.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:h,numberingSystem:p,outputCalendar:j}}toUTC(r=0,h={}){return this.setZone(Ge.instance(r),h)}toLocal(){return this.setZone(xt.defaultZone)}setZone(r,{keepLocalTime:h=!1,keepCalendarTime:p=!1}={}){if(r=We(r,xt.defaultZone),r.equals(this.zone))return this;if(r.isValid){let j=this.ts;if(h||p){const C=r.offset(this.ts),k=this.toObject();[j]=vs(k,C,r)}return La(this,{ts:j,zone:r})}else return je.invalid(Ua(r))}reconfigure({locale:r,numberingSystem:h,outputCalendar:p}={}){const j=this.loc.clone({locale:r,numberingSystem:h,outputCalendar:p});return La(this,{loc:j})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const h=tn(r,oi),{minDaysInFirstWeek:p,startOfWeek:j}=mu(h,this.loc),C=!Oe(h.weekYear)||!Oe(h.weekNumber)||!Oe(h.weekday),k=!Oe(h.ordinal),z=!Oe(h.year),q=!Oe(h.month)||!Oe(h.day),he=z||q,be=h.weekYear||h.weekNumber;if((he||k)&&be)throw new m("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(q&&k)throw new m("Can't mix ordinal dates with month/day");let Le;C?Le=Rn({...Ht(this.c,p,j),...h},p,j):Oe(h.ordinal)?(Le={...this.toObject(),...h},Oe(h.day)&&(Le.day=Math.min(Zs(Le.year,Le.month),Le.day))):Le=hu({...Wl(this.c),...h});const[Pe,Re]=vs(Le,this.o,this.zone);return La(this,{ts:Pe,o:Re})}plus(r){if(!this.isValid)return this;const h=Ze.fromDurationLike(r);return La(this,bs(this,h))}minus(r){if(!this.isValid)return this;const h=Ze.fromDurationLike(r).negate();return La(this,bs(this,h))}startOf(r,{useLocaleWeeks:h=!1}={}){if(!this.isValid)return this;const p={},j=Ze.normalizeUnit(r);switch(j){case"years":p.month=1;case"quarters":case"months":p.day=1;case"weeks":case"days":p.hour=0;case"hours":p.minute=0;case"minutes":p.second=0;case"seconds":p.millisecond=0;break}if(j==="weeks")if(h){const C=this.loc.getStartOfWeek(),{weekday:k}=this;k<C&&(p.weekNumber=this.weekNumber-1),p.weekday=C}else p.weekday=1;if(j==="quarters"){const C=Math.ceil(this.month/3);p.month=(C-1)*3+1}return this.set(p)}endOf(r,h){return this.isValid?this.plus({[r]:1}).startOf(r,h).minus(1):this}toFormat(r,h={}){return this.isValid?qt.create(this.loc.redefaultToEN(h)).formatDateTimeFromString(this,r):Nl}toLocaleString(r=E,h={}){return this.isValid?qt.create(this.loc.clone(h),r).formatDateTime(this):Nl}toLocaleParts(r={}){return this.isValid?qt.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:h=!1,suppressMilliseconds:p=!1,includeOffset:j=!0,extendedZone:C=!1,precision:k="milliseconds"}={}){if(!this.isValid)return null;k=El(k);const z=r==="extended";let q=Qt(this,z,k);return Va.indexOf(k)>=3&&(q+="T"),q+=ir(this,z,h,p,j,C,k),q}toISODate({format:r="extended",precision:h="day"}={}){return this.isValid?Qt(this,r==="extended",El(h)):null}toISOWeekDate(){return rr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:h=!1,includeOffset:p=!0,includePrefix:j=!1,extendedZone:C=!1,format:k="extended",precision:z="milliseconds"}={}){return this.isValid?(z=El(z),(j&&Va.indexOf(z)>=3?"T":"")+ir(this,k==="extended",h,r,p,C,z)):null}toRFC2822(){return rr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Qt(this,!0):null}toSQLTime({includeOffset:r=!0,includeZone:h=!1,includeOffsetSpace:p=!0}={}){let j="HH:mm:ss.SSS";return(h||r)&&(p&&(j+=" "),h?j+="z":r&&(j+="ZZ")),rr(this,j,!0)}toSQL(r={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(r)}`:null}toString(){return this.isValid?this.toISO():Nl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(r={}){if(!this.isValid)return{};const h={...this.c};return r.includeConfig&&(h.outputCalendar=this.outputCalendar,h.numberingSystem=this.loc.numberingSystem,h.locale=this.loc.locale),h}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(r,h="milliseconds",p={}){if(!this.isValid||!r.isValid)return Ze.invalid("created by diffing an invalid DateTime");const j={locale:this.locale,numberingSystem:this.numberingSystem,...p},C=dl(h).map(Ze.normalizeUnit),k=r.valueOf()>this.valueOf(),z=k?this:r,q=k?r:this,he=_u(z,q,C,j);return k?he.negate():he}diffNow(r="milliseconds",h={}){return this.diff(je.now(),r,h)}until(r){return this.isValid?pt.fromDateTimes(this,r):this}hasSame(r,h,p){if(!this.isValid)return!1;const j=r.valueOf(),C=this.setZone(r.zone,{keepLocalTime:!0});return C.startOf(h,p)<=j&&j<=C.endOf(h,p)}equals(r){return this.isValid&&r.isValid&&this.valueOf()===r.valueOf()&&this.zone.equals(r.zone)&&this.loc.equals(r.loc)}toRelative(r={}){if(!this.isValid)return null;const h=r.base||je.fromObject({},{zone:this.zone}),p=r.padding?this<h?-r.padding:r.padding:0;let j=["years","months","days","hours","minutes","seconds"],C=r.unit;return Array.isArray(r.unit)&&(j=r.unit,C=void 0),Vn(h,this.plus(p),{...r,numeric:"always",units:j,unit:C})}toRelativeCalendar(r={}){return this.isValid?Vn(r.base||je.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(je.isDateTime))throw new v("min requires all arguments be DateTimes");return xu(r,h=>h.valueOf(),Math.min)}static max(...r){if(!r.every(je.isDateTime))throw new v("max requires all arguments be DateTimes");return xu(r,h=>h.valueOf(),Math.max)}static fromFormatExplain(r,h,p={}){const{locale:j=null,numberingSystem:C=null}=p,k=xe.fromOpts({locale:j,numberingSystem:C,defaultToEN:!0});return ii(k,r,h)}static fromStringExplain(r,h,p={}){return je.fromFormatExplain(r,h,p)}static buildFormatParser(r,h={}){const{locale:p=null,numberingSystem:j=null}=h,C=xe.fromOpts({locale:p,numberingSystem:j,defaultToEN:!0});return new ri(C,r)}static fromFormatParser(r,h,p={}){if(Oe(r)||Oe(h))throw new v("fromFormatParser requires an input string and a format parser");const{locale:j=null,numberingSystem:C=null}=p,k=xe.fromOpts({locale:j,numberingSystem:C,defaultToEN:!0});if(!k.equals(h.locale))throw new v(`fromFormatParser called with a locale of ${k}, but the format parser was created for ${h.locale}`);const{result:z,zone:q,specificOffset:he,invalidReason:be}=h.explainFromTokens(r);return be?je.invalid(be):Ea(z,q,p,`format ${h.format}`,r,he)}static get DATE_SHORT(){return E}static get DATE_MED(){return S}static get DATE_MED_WITH_WEEKDAY(){return D}static get DATE_FULL(){return A}static get DATE_HUGE(){return M}static get TIME_SIMPLE(){return Y}static get TIME_WITH_SECONDS(){return X}static get TIME_WITH_SHORT_OFFSET(){return Q}static get TIME_WITH_LONG_OFFSET(){return G}static get TIME_24_SIMPLE(){return ee}static get TIME_24_WITH_SECONDS(){return le}static get TIME_24_WITH_SHORT_OFFSET(){return te}static get TIME_24_WITH_LONG_OFFSET(){return I}static get DATETIME_SHORT(){return J}static get DATETIME_SHORT_WITH_SECONDS(){return R}static get DATETIME_MED(){return U}static get DATETIME_MED_WITH_SECONDS(){return ne}static get DATETIME_MED_WITH_WEEKDAY(){return F}static get DATETIME_FULL(){return ce}static get DATETIME_FULL_WITH_SECONDS(){return ye}static get DATETIME_HUGE(){return me}static get DATETIME_HUGE_WITH_SECONDS(){return B}}function ga(g){if(je.isDateTime(g))return g;if(g&&g.valueOf&&da(g.valueOf()))return je.fromJSDate(g);if(g&&typeof g=="object")return je.fromObject(g);throw new v(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Ba="3.7.2";return Sa.DateTime=je,Sa.Duration=Ze,Sa.FixedOffsetZone=Ge,Sa.IANAZone=Ee,Sa.Info=gs,Sa.Interval=pt,Sa.InvalidZone=dt,Sa.Settings=xt,Sa.SystemZone=Me,Sa.VERSION=Ba,Sa.Zone=ue,Sa}var Dg;function Wf(){return Dg||(Dg=1,(function(l){var f,v,N,b,y,Mf,E,Gl;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const u=eS();var d;(function(A){A.Second="Second",A.Minute="Minute",A.Hour="Hour",A.Day="Day",A.Month="Month",A.Year="Year"})(d||(l.TimeUnit=d={}));var o;(function(A){A.Add="Add",A.Subtract="Subtract"})(o||(l.DateMathOp=o={})),l.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const D=class D{constructor(M,Y){lt(this,E);lt(this,f);lt(this,v,null);lt(this,N,null);lt(this,b,{add:{[d.Year]:this.addYear.bind(this),[d.Month]:this.addMonth.bind(this),[d.Day]:this.addDay.bind(this),[d.Hour]:this.addHour.bind(this),[d.Minute]:this.addMinute.bind(this),[d.Second]:this.addSecond.bind(this)},subtract:{[d.Year]:this.subtractYear.bind(this),[d.Month]:this.subtractMonth.bind(this),[d.Day]:this.subtractDay.bind(this),[d.Hour]:this.subtractHour.bind(this),[d.Minute]:this.subtractMinute.bind(this),[d.Second]:this.subtractSecond.bind(this)}});const X={zone:Y};if(M?M instanceof D?(Te(this,f,K(M,f)),Te(this,v,K(M,v)),Te(this,N,K(M,N))):M instanceof Date?Te(this,f,u.DateTime.fromJSDate(M,X)):typeof M=="number"?Te(this,f,u.DateTime.fromMillis(M,X)):(Te(this,f,u.DateTime.fromISO(M,X)),K(this,f).isValid||Te(this,f,u.DateTime.fromRFC2822(M,X)),K(this,f).isValid||Te(this,f,u.DateTime.fromSQL(M,X)),K(this,f).isValid||Te(this,f,u.DateTime.fromFormat(M,"EEE, d MMM yyyy HH:mm:ss",X))):Te(this,f,u.DateTime.local()),!K(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${M}`);Y&&Y!==K(this,f).zoneName&&Te(this,f,K(this,f).setZone(Y))}get dstStart(){return K(this,v)}set dstStart(M){Te(this,v,M)}get dstEnd(){return K(this,N)}set dstEnd(M){Te(this,N,M)}addYear(){Te(this,f,K(this,f).plus({years:1}))}addMonth(){Te(this,f,K(this,f).plus({months:1}).startOf("month"))}addDay(){Te(this,f,K(this,f).plus({days:1}).startOf("day"))}addHour(){Te(this,f,K(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Te(this,f,K(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Te(this,f,K(this,f).plus({seconds:1}))}subtractYear(){Te(this,f,K(this,f).minus({years:1}))}subtractMonth(){Te(this,f,K(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Te(this,f,K(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Te(this,f,K(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Te(this,f,K(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Te(this,f,K(this,f).minus({seconds:1}))}addUnit(M){K(this,b).add[M]()}subtractUnit(M){K(this,b).subtract[M]()}invokeDateOperation(M,Y){if(M===o.Add){this.addUnit(Y);return}if(M===o.Subtract){this.subtractUnit(Y);return}throw new Error(`Invalid verb: ${M}`)}getDate(){return K(this,f).day}getFullYear(){return K(this,f).year}getDay(){const M=K(this,f).weekday;return M===7?0:M}getMonth(){return K(this,f).month-1}getHours(){return K(this,f).hour}getMinutes(){return K(this,f).minute}getSeconds(){return K(this,f).second}getMilliseconds(){return K(this,f).millisecond}getUTCOffset(){return K(this,f).offset}setStartOfDay(){Te(this,f,K(this,f).startOf("day"))}setEndOfDay(){Te(this,f,K(this,f).endOf("day"))}getTime(){return K(this,f).valueOf()}getUTCDate(){return Ne(this,E,Gl).call(this).day}getUTCFullYear(){return Ne(this,E,Gl).call(this).year}getUTCDay(){const M=Ne(this,E,Gl).call(this).weekday;return M===7?0:M}getUTCMonth(){return Ne(this,E,Gl).call(this).month-1}getUTCHours(){return Ne(this,E,Gl).call(this).hour}getUTCMinutes(){return Ne(this,E,Gl).call(this).minute}getUTCSeconds(){return Ne(this,E,Gl).call(this).second}toISOString(){return K(this,f).toUTC().toISO()}toJSON(){return K(this,f).toJSON()}setDate(M){Te(this,f,K(this,f).set({day:M}))}setFullYear(M){Te(this,f,K(this,f).set({year:M}))}setDay(M){Te(this,f,K(this,f).set({weekday:M}))}setMonth(M){Te(this,f,K(this,f).set({month:M+1}))}setHours(M){Te(this,f,K(this,f).set({hour:M}))}setMinutes(M){Te(this,f,K(this,f).set({minute:M}))}setSeconds(M){Te(this,f,K(this,f).set({second:M}))}setMilliseconds(M){Te(this,f,K(this,f).set({millisecond:M}))}toString(){return this.toDate().toString()}toDate(){return K(this,f).toJSDate()}isLastDayOfMonth(){var X;const{day:M,month:Y}=K(this,f);if(Y===2){const Q=Ne(X=D,y,Mf).call(X,K(this,f).year);return M===l.DAYS_IN_MONTH[Y-1]-(Q?0:1)}return M===l.DAYS_IN_MONTH[Y-1]}isLastWeekdayOfMonth(){var Q;const{day:M,month:Y}=K(this,f);let X;return Y===2?X=l.DAYS_IN_MONTH[Y-1]-(Ne(Q=D,y,Mf).call(Q,K(this,f).year)?0:1):X=l.DAYS_IN_MONTH[Y-1],M>X-7}applyDateOperation(M,Y,X){if(Y===d.Month||Y===d.Day){this.invokeDateOperation(M,Y);return}const Q=this.getHours();this.invokeDateOperation(M,Y);const G=this.getHours(),ee=G-Q;ee===2?X!==24&&(this.dstStart=G):ee===0&&this.getMinutes()===0&&this.getSeconds()===0&&X!==24&&(this.dstEnd=G)}};f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakMap,y=new WeakSet,Mf=function(M){return M%4===0&&M%100!==0||M%400===0},E=new WeakSet,Gl=function(){return K(this,f).toUTC()},lt(D,y);let m=D;l.CronDate=m,l.default=m})(pf)),pf}var Rg;function tS(){if(Rg)return Ki;Rg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronMonth=void 0;const l=Wf(),u=Hs(),d=1,o=12,m=Object.freeze([]);let f=class extends u.CronField{static get min(){return d}static get max(){return o}static get chars(){return m}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(N,b){super(N,b),this.validate()}get values(){return super.values}};return Ki.CronMonth=f,Ki}var eu={},Ag;function aS(){if(Ag)return eu;Ag=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.CronSecond=void 0;const l=Hs(),u=0,d=59,o=Object.freeze([]);let m=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(v,N){super(v,N),this.validate()}get values(){return super.values}};return eu.CronSecond=m,eu}var _g;function Xf(){return _g||(_g=1,(function(l){var u=As&&As.__createBinding||(Object.create?(function(o,m,f,v){v===void 0&&(v=f);var N=Object.getOwnPropertyDescriptor(m,f);(!N||("get"in N?!m.__esModule:N.writable||N.configurable))&&(N={enumerable:!0,get:function(){return m[f]}}),Object.defineProperty(o,v,N)}):(function(o,m,f,v){v===void 0&&(v=f),o[v]=m[f]})),d=As&&As.__exportStar||function(o,m){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(m,f)&&u(m,o,f)};Object.defineProperty(l,"__esModule",{value:!0}),d(I2(),l),d(W2(),l),d(X2(),l),d(Hs(),l),d(J2(),l),d(K2(),l),d(tS(),l),d(aS(),l)})(As)),As}var kg;function Xy(){var d,o,m,f,v,N,b,y,Iy,Wy;if(kg)return Pi;kg=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.CronFieldCollection=void 0;const l=Xf();let u=(y=class{constructor({second:D,minute:A,hour:M,dayOfMonth:Y,month:X,dayOfWeek:Q}){lt(this,d);lt(this,o);lt(this,m);lt(this,f);lt(this,v);lt(this,N);if(!D)throw new Error("Validation error, Field second is missing");if(!A)throw new Error("Validation error, Field minute is missing");if(!M)throw new Error("Validation error, Field hour is missing");if(!Y)throw new Error("Validation error, Field dayOfMonth is missing");if(!X)throw new Error("Validation error, Field month is missing");if(!Q)throw new Error("Validation error, Field dayOfWeek is missing");if(X.values.length===1&&!Y.hasLastChar&&!(parseInt(Y.values[0],10)<=l.CronMonth.daysInMonth[X.values[0]-1]))throw new Error("Invalid explicit day of month definition");Te(this,d,D),Te(this,o,A),Te(this,m,M),Te(this,v,X),Te(this,N,Q),Te(this,f,Y)}static from(D,A){return new y({second:this.resolveField(l.CronSecond,D.second,A.second),minute:this.resolveField(l.CronMinute,D.minute,A.minute),hour:this.resolveField(l.CronHour,D.hour,A.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,D.dayOfMonth,A.dayOfMonth),month:this.resolveField(l.CronMonth,D.month,A.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,D.dayOfWeek,A.dayOfWeek)})}static resolveField(D,A,M){return M?M instanceof l.CronField?M:new D(M):A}get second(){return K(this,d)}get minute(){return K(this,o)}get hour(){return K(this,m)}get dayOfMonth(){return K(this,f)}get month(){return K(this,v)}get dayOfWeek(){return K(this,N)}static compactField(D){if(D.length===0)return[];const A=[];let M;return D.forEach((Y,X,Q)=>{if(M===void 0){M={start:Y,count:1};return}const G=Q[X-1]||M.start,ee=Q[X+1];if(Y==="L"||Y==="W"){A.push(M),A.push({start:Y,count:1}),M=void 0;return}if(M.step===void 0&&ee!==void 0){const le=Y-G,te=ee-Y;if(le<=te){M={...M,count:2,end:Y,step:le};return}M.step=1}Y-(M.end??0)===M.step?(M.count++,M.end=Y):(M.count===1?A.push({start:M.start,count:1}):M.count===2?(A.push({start:M.start,count:1}),A.push({start:M.end??G,count:1})):A.push(M),M={start:Y,count:1})}),M&&A.push(M),A}stringifyField(D){var X;let A=D.max,M=D.values;if(D instanceof l.CronDayOfWeek){A=6;const Q=K(this,N).values;M=Q[Q.length-1]===7?Q.slice(0,-1):Q}D instanceof l.CronDayOfMonth&&(A=K(this,v).values.length===1?l.CronMonth.daysInMonth[K(this,v).values[0]-1]:D.max);const Y=y.compactField(M);if(Y.length===1){const Q=Ne(X=y,b,Iy).call(X,D,Y[0],A);if(Q)return Q}return Y.map(Q=>{var ee;const G=Q.count===1?Q.start.toString():Ne(ee=y,b,Wy).call(ee,Q,A);return D instanceof l.CronDayOfWeek&&D.nthDay>0?`${G}#${D.nthDay}`:G}).join(",")}stringify(D=!1){const A=[];return D&&A.push(this.stringifyField(K(this,d))),A.push(this.stringifyField(K(this,o)),this.stringifyField(K(this,m)),this.stringifyField(K(this,f)),this.stringifyField(K(this,v)),this.stringifyField(K(this,N))),A.join(" ")}serialize(){return{second:K(this,d).serialize(),minute:K(this,o).serialize(),hour:K(this,m).serialize(),dayOfMonth:K(this,f).serialize(),month:K(this,v).serialize(),dayOfWeek:K(this,N).serialize()}}},d=new WeakMap,o=new WeakMap,m=new WeakMap,f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakSet,Iy=function(D,A,M){const Y=A.step;return Y?Y===1&&A.start===D.min&&A.end&&A.end>=M?D.hasQuestionMarkChar?"?":"*":Y!==1&&A.start===D.min&&A.end&&A.end>=M-Y+1?`*/${Y}`:null:null},Wy=function(D,A){const M=D.step;if(M===1)return`${D.start}-${D.end}`;const Y=D.start===0?D.count-1:D.count;if(!M)throw new Error("Unexpected range step");if(!D.end)throw new Error("Unexpected range end");if(M*Y>D.end){const X=(G,ee)=>{if(typeof D.start!="number")throw new Error("Unexpected range start");return ee%M===0?D.start+ee:null};if(typeof D.start!="number")throw new Error("Unexpected range start");const Q={length:D.end-D.start+1};return Array.from(Q,X).filter(G=>G!==null).join(",")}return D.end===A-M+1?`${D.start}/${M}`:`${D.start}-${D.end}/${M}`},lt(y,b),y);return Pi.CronFieldCollection=u,Pi}var vf={},zg;function lx(){return zg||(zg=1,(function(l){var m,f,v,N,b,y,w,E,S,Zl,A,ks,Jy,Ky,ex,tx,Cf,ax,nx,_r;Object.defineProperty(l,"__esModule",{value:!0}),l.CronExpression=l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const u=Wf();l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const d=1e4,J=class J{constructor(U,ne){lt(this,A);lt(this,m);lt(this,f);lt(this,v);lt(this,N);lt(this,b);lt(this,y);lt(this,w,null);lt(this,E,!1);Te(this,m,ne),Te(this,f,ne.tz),Te(this,N,ne.startDate?new u.CronDate(ne.startDate,K(this,f)):null),Te(this,b,ne.endDate?new u.CronDate(ne.endDate,K(this,f)):null);let F=ne.currentDate??ne.startDate;if(F){const ce=new u.CronDate(F,K(this,f));K(this,N)&&ce.getTime()<K(this,N).getTime()?F=K(this,N):K(this,b)&&ce.getTime()>K(this,b).getTime()&&(F=K(this,b))}Te(this,v,new u.CronDate(F,K(this,f))),Te(this,y,U)}get fields(){return K(this,y)}static fieldsToExpression(U,ne){return new J(U,ne||{})}next(){return Ne(this,A,_r).call(this)}prev(){return Ne(this,A,_r).call(this,!0)}hasNext(){const U=K(this,v);try{return Ne(this,A,_r).call(this),!0}catch{return!1}finally{Te(this,v,U)}}hasPrev(){const U=K(this,v);try{return Ne(this,A,_r).call(this,!0),!0}catch{return!1}finally{Te(this,v,U)}}take(U){const ne=[];if(U>=0)for(let F=0;F<U;F++)try{ne.push(this.next())}catch{return ne}else for(let F=0;F>U;F--)try{ne.push(this.prev())}catch{return ne}return ne}reset(U){Te(this,v,new u.CronDate(U||K(this,m).currentDate))}stringify(U=!1){return K(this,y).stringify(U)}includesDate(U){const{second:ne,minute:F,hour:ce,month:ye}=K(this,y),me=new u.CronDate(U,K(this,f));return!(!ne.values.includes(me.getSeconds())||!F.values.includes(me.getMinutes())||!ce.values.includes(me.getHours())||!ye.values.includes(me.getMonth()+1)||!Ne(this,A,Cf).call(this,me)||K(this,y).dayOfWeek.nthDay>0&&Math.ceil(me.getDate()/7)!==K(this,y).dayOfWeek.nthDay)}toString(){return K(this,m).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ne(this,A,_r).call(this),done:!this.hasNext()})}}};m=new WeakMap,f=new WeakMap,v=new WeakMap,N=new WeakMap,b=new WeakMap,y=new WeakMap,w=new WeakMap,E=new WeakMap,S=new WeakSet,Zl=function(U,ne){return ne.some(F=>F===U)},A=new WeakSet,ks=function(U,ne){return U[ne?U.length-1:0]},Jy=function(U){const ne=`${U.getFullYear()}-${U.getMonth()+1}-${U.getDate()}`;if(K(this,w)===ne)return K(this,E);const F=new u.CronDate(U);F.setStartOfDay();const ce=new u.CronDate(U);return ce.setEndOfDay(),Te(this,w,ne),Te(this,E,F.getUTCOffset()!==ce.getUTCOffset()),K(this,E)},Ky=function(U,ne,F){const ce=K(this,y).second.values,ye=U.getSeconds(),me=K(this,y).second.findNearestValue(ye,F);if(me!==null){U.setSeconds(me);return}U.applyDateOperation(ne,u.TimeUnit.Minute,K(this,y).hour.values.length),U.setSeconds(Ne(this,A,ks).call(this,ce,F))},ex=function(U,ne,F){const ce=K(this,y).minute.values,ye=K(this,y).second.values,me=U.getMinutes(),B=K(this,y).minute.findNearestValue(me,F);if(B!==null){U.setMinutes(B),U.setSeconds(Ne(this,A,ks).call(this,ye,F));return}U.applyDateOperation(ne,u.TimeUnit.Hour,K(this,y).hour.values.length),U.setMinutes(Ne(this,A,ks).call(this,ce,F)),U.setSeconds(Ne(this,A,ks).call(this,ye,F))},tx=function(U,ne){const F=ne.isLastWeekdayOfMonth();return U.some(ce=>{const ye=parseInt(ce.toString().charAt(0),10)%7;if(Number.isNaN(ye))throw new Error(`Invalid last weekday of the month expression: ${ce}`);return ne.getDay()===ye&&F})},Cf=function(U){var ue,se,Me;const ne=K(this,y).dayOfMonth.isWildcard,F=!ne,ce=K(this,y).dayOfWeek.isWildcard,ye=!ce,me=Ne(ue=J,S,Zl).call(ue,U.getDate(),K(this,y).dayOfMonth.values)||K(this,y).dayOfMonth.hasLastChar&&U.isLastDayOfMonth(),B=Ne(se=J,S,Zl).call(se,U.getDay(),K(this,y).dayOfWeek.values)||K(this,y).dayOfWeek.hasLastChar&&Ne(Me=J,S,tx).call(Me,K(this,y).dayOfWeek.values,U);return!!(F&&ye&&(me||B)||me&&!ye||ne&&!ce&&B)},ax=function(U,ne,F){var qe,_;const ce=K(this,y).hour.values,ye=ce,me=U.getHours(),B=Ne(qe=J,S,Zl).call(qe,me,ce),ue=U.dstStart===me,se=U.dstEnd===me;if(ue)return Ne(_=J,S,Zl).call(_,me-1,ce)?!0:(U.invokeDateOperation(ne,u.TimeUnit.Hour),!1);if(se&&!F)return U.dstEnd=null,U.applyDateOperation(u.DateMathOp.Add,u.TimeUnit.Hour,ye.length),!1;if(B)return!0;U.dstStart=null;const Me=K(this,y).hour.findNearestValue(me,F);if(Me===null)return U.applyDateOperation(ne,u.TimeUnit.Day,ye.length),!1;if(Ne(this,A,Jy).call(this,U)){const re=F?me-Me:Me-me;for(let ge=0;ge<re;ge++)U.applyDateOperation(ne,u.TimeUnit.Hour,ye.length)}else U.setHours(Me);return U.setMinutes(Ne(this,A,ks).call(this,K(this,y).minute.values,F)),U.setSeconds(Ne(this,A,ks).call(this,K(this,y).second.values,F)),!1},nx=function(U){if(!K(this,N)&&!K(this,b))return;const ne=U.getTime();if(K(this,N)&&ne<K(this,N).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(K(this,b)&&ne>K(this,b).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},_r=function(U=!1){var me,B,ue;const ne=U?u.DateMathOp.Subtract:u.DateMathOp.Add,F=new u.CronDate(K(this,v)),ce=F.getTime();let ye=0;for(;++ye<d;){if(Ne(this,A,nx).call(this,F),!Ne(this,A,Cf).call(this,F)){F.applyDateOperation(ne,u.TimeUnit.Day,K(this,y).hour.values.length);continue}if(!(K(this,y).dayOfWeek.nthDay<=0||Math.ceil(F.getDate()/7)===K(this,y).dayOfWeek.nthDay)){F.applyDateOperation(ne,u.TimeUnit.Day,K(this,y).hour.values.length);continue}if(!Ne(me=J,S,Zl).call(me,F.getMonth()+1,K(this,y).month.values)){F.applyDateOperation(ne,u.TimeUnit.Month,K(this,y).hour.values.length);continue}if(Ne(this,A,ax).call(this,F,ne,U)){if(!Ne(B=J,S,Zl).call(B,F.getMinutes(),K(this,y).minute.values)){Ne(this,A,ex).call(this,F,ne,U);continue}if(!Ne(ue=J,S,Zl).call(ue,F.getSeconds(),K(this,y).second.values)){Ne(this,A,Ky).call(this,F,ne,U);continue}if(ce===F.getTime()){(ne==="Add"||F.getMilliseconds()===0)&&F.applyDateOperation(ne,u.TimeUnit.Second,K(this,y).hour.values.length);continue}break}}if(ye>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return F.getMilliseconds()!==0&&F.setMilliseconds(0),Te(this,v,F),F},lt(J,S);let o=J;l.CronExpression=o,l.default=o})(vf)),vf}var qc={},Ug;function nS(){if(Ug)return qc;Ug=1,Object.defineProperty(qc,"__esModule",{value:!0}),qc.seededRandom=d;function l(o){let m=2166136261;for(let f=0;f<o.length;f++)m^=o.charCodeAt(f),m=Math.imul(m,16777619);return()=>m>>>0}function u(o){return()=>{let m=o+=1831565813;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296}}function d(o){const m=o?l(o)():Math.floor(Math.random()*1e10);return u(m)}return qc}var Lg;function Df(){var y,w,sx,zs,rx,ix,ux,cx,ox,dx,fx,Of,hx,mx;if(Lg)return Ra;Lg=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.CronExpressionParser=Ra.DayOfWeek=Ra.Months=Ra.CronUnit=Ra.PredefinedExpressions=void 0;const l=Xy(),u=lx(),d=nS(),o=Xf();var m;(function(I){I["@yearly"]="0 0 0 1 1 *",I["@annually"]="0 0 0 1 1 *",I["@monthly"]="0 0 0 1 * *",I["@weekly"]="0 0 0 * * 0",I["@daily"]="0 0 0 * * *",I["@hourly"]="0 0 * * * *",I["@minutely"]="0 * * * * *",I["@secondly"]="* * * * * *",I["@weekdays"]="0 0 0 * * 1-5",I["@weekends"]="0 0 0 * * 0,6"})(m||(Ra.PredefinedExpressions=m={}));var f;(function(I){I.Second="Second",I.Minute="Minute",I.Hour="Hour",I.DayOfMonth="DayOfMonth",I.Month="Month",I.DayOfWeek="DayOfWeek"})(f||(Ra.CronUnit=f={}));var v;(function(I){I[I.jan=1]="jan",I[I.feb=2]="feb",I[I.mar=3]="mar",I[I.apr=4]="apr",I[I.may=5]="may",I[I.jun=6]="jun",I[I.jul=7]="jul",I[I.aug=8]="aug",I[I.sep=9]="sep",I[I.oct=10]="oct",I[I.nov=11]="nov",I[I.dec=12]="dec"})(v||(Ra.Months=v={}));var N;(function(I){I[I.sun=0]="sun",I[I.mon=1]="mon",I[I.tue=2]="tue",I[I.wed=3]="wed",I[I.thu=4]="thu",I[I.fri=5]="fri",I[I.sat=6]="sat"})(N||(Ra.DayOfWeek=N={}));let b=(w=class{static parse(J,R={}){var ge,pe,De,Ee,Ue,ke,Ke,Ft;const{strict:U=!1,hashSeed:ne}=R,F=(0,d.seededRandom)(ne);J=m[J]||J;const ce=Ne(ge=w,y,sx).call(ge,J,U);if(!(ce.dayOfMonth==="*"||ce.dayOfWeek==="*"||!U))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ye=Ne(pe=w,y,zs).call(pe,f.Second,ce.second,o.CronSecond.constraints,F),me=Ne(De=w,y,zs).call(De,f.Minute,ce.minute,o.CronMinute.constraints,F),B=Ne(Ee=w,y,zs).call(Ee,f.Hour,ce.hour,o.CronHour.constraints,F),ue=Ne(Ue=w,y,zs).call(Ue,f.Month,ce.month,o.CronMonth.constraints,F),se=Ne(ke=w,y,zs).call(ke,f.DayOfMonth,ce.dayOfMonth,o.CronDayOfMonth.constraints,F),{dayOfWeek:Me,nthDayOfWeek:qe}=Ne(Ke=w,y,hx).call(Ke,ce.dayOfWeek),_=Ne(Ft=w,y,zs).call(Ft,f.DayOfWeek,Me,o.CronDayOfWeek.constraints,F),re=new l.CronFieldCollection({second:new o.CronSecond(ye,{rawValue:ce.second}),minute:new o.CronMinute(me,{rawValue:ce.minute}),hour:new o.CronHour(B,{rawValue:ce.hour}),dayOfMonth:new o.CronDayOfMonth(se,{rawValue:ce.dayOfMonth}),month:new o.CronMonth(ue,{rawValue:ce.month}),dayOfWeek:new o.CronDayOfWeek(_,{rawValue:ce.dayOfWeek,nthDayOfWeek:qe})});return new u.CronExpression(re,{...R,expression:J})}},y=new WeakSet,sx=function(J,R){if(R&&!J.length)throw new Error("Invalid cron expression");J=J||"0 * * * * *";const U=J.trim().split(/\s+/);if(R&&U.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(U.length>6)throw new Error("Invalid cron expression, too many fields");const ne=["*","*","*","*","*","0"];U.length<ne.length&&U.unshift(...ne.slice(U.length));const[F,ce,ye,me,B,ue]=U;return{second:F,minute:ce,hour:ye,dayOfMonth:me,month:B,dayOfWeek:ue}},zs=function(J,R,U,ne){if((J===f.Month||J===f.DayOfWeek)&&(R=R.replace(/[a-z]{3}/gi,F=>{F=F.toLowerCase();const ce=v[F]||N[F];if(ce===void 0)throw new Error(`Validation error, cannot resolve alias "${F}"`);return ce.toString()})),!U.validChars.test(R))throw new Error(`Invalid characters, got value: ${R}`);return R=Ne(this,y,rx).call(this,R,U),R=Ne(this,y,ix).call(this,R,U,ne),Ne(this,y,ux).call(this,J,R,U)},rx=function(J,R){return J.replace(/[*?]/g,R.min+"-"+R.max)},ix=function(J,R,U){const ne=U();return J.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(F,ce,ye,me)=>{if(ce&&ye&&me){const B=parseInt(ce,10),ue=parseInt(ye,10),se=parseInt(me,10);if(B>ue)throw new Error(`Invalid range: ${B}-${ue}, min > max`);if(se<=0)throw new Error(`Invalid step: ${se}, must be positive`);const Me=Math.max(B,R.min),qe=Math.floor(ne*se),_=[];for(let re=Math.floor(Me/se)*se+qe;re<=ue;re+=se)re>=Me&&_.push(re);return _.join(",")}else if(ce&&ye){const B=parseInt(ce,10),ue=parseInt(ye,10);if(B>ue)throw new Error(`Invalid range: ${B}-${ue}, min > max`);return String(Math.floor(ne*(ue-B+1))+B)}else if(me){const B=parseInt(me,10);if(B<=0)throw new Error(`Invalid step: ${B}, must be positive`);const ue=Math.floor(ne*B),se=[];for(let Me=Math.floor(R.min/B)*B+ue;Me<=R.max;Me+=B)Me>=R.min&&se.push(Me);return se.join(",")}else return String(Math.floor(ne*(R.max-R.min+1)+R.min))})},ux=function(J,R,U){const ne=[];function F(ye,me){var B;if(Array.isArray(ye))ne.push(...ye);else if(Ne(B=w,y,mx).call(B,me,ye))ne.push(ye);else{const ue=parseInt(ye.toString(),10);if(!(ue>=me.min&&ue<=me.max))throw new Error(`Constraint error, got value ${ye} expected range ${me.min}-${me.max}`);ne.push(J===f.DayOfWeek?ue%7:ye)}}return R.split(",").forEach(ye=>{var me;if(!(ye.length>0))throw new Error("Invalid list value format");F(Ne(me=w,y,cx).call(me,J,ye,U),U)}),ne},cx=function(J,R,U){var F,ce;const ne=R.split("/");if(ne.length>2)throw new Error(`Invalid repeat: ${R}`);return ne.length===2?(isNaN(parseInt(ne[0],10))||(ne[0]=`${ne[0]}-${U.max}`),Ne(F=w,y,Of).call(F,J,ne[0],parseInt(ne[1],10),U)):Ne(ce=w,y,Of).call(ce,J,R,1,U)},ox=function(J,R,U){if(!(!isNaN(J)&&!isNaN(R)&&J>=U.min&&R<=U.max))throw new Error(`Constraint error, got range ${J}-${R} expected range ${U.min}-${U.max}`);if(J>R)throw new Error(`Invalid range: ${J}-${R}, min(${J}) > max(${R})`)},dx=function(J){if(!(!isNaN(J)&&J>0))throw new Error(`Constraint error, cannot repeat at every ${J} time.`)},fx=function(J,R,U,ne){const F=[];J===f.DayOfWeek&&U%7===0&&F.push(0);for(let ce=R;ce<=U;ce+=ne)F.indexOf(ce)===-1&&F.push(ce);return F},Of=function(J,R,U,ne){const F=R.split("-");if(F.length<=1)return isNaN(+R)?R:+R;const[ce,ye]=F.map(me=>parseInt(me,10));return Ne(this,y,ox).call(this,ce,ye,ne),Ne(this,y,dx).call(this,U),Ne(this,y,fx).call(this,J,ce,ye,U)},hx=function(J){const R=J.split("#");if(R.length<=1)return{dayOfWeek:R[0]};const U=+R[R.length-1],ne=J.match(/([,-/])/);if(ne!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${ne==null?void 0:ne[0]}\` special characters are incompatible`);if(!(R.length<=2&&!isNaN(U)&&U>=1&&U<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:R[0],nthDayOfWeek:U}},mx=function(J,R){return J.chars.some(U=>R.toString().includes(U))},lt(w,y),w);return Ra.CronExpressionParser=b,Ra}var dn={};const lS={},sS=Object.freeze(Object.defineProperty({__proto__:null,default:lS},Symbol.toStringTag,{value:"Module"})),Hg=Yp(sS);var qg;function rS(){var f,v,Rf,gx;if(qg)return dn;qg=1;var l=dn&&dn.__createBinding||(Object.create?(function(y,w,E,S){S===void 0&&(S=E);var D=Object.getOwnPropertyDescriptor(w,E);(!D||("get"in D?!w.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(y,S,D)}):(function(y,w,E,S){S===void 0&&(S=E),y[S]=w[E]})),u=dn&&dn.__setModuleDefault||(Object.create?(function(y,w){Object.defineProperty(y,"default",{enumerable:!0,value:w})}):function(y,w){y.default=w}),d=dn&&dn.__importStar||(function(){var y=function(w){return y=Object.getOwnPropertyNames||function(E){var S=[];for(var D in E)Object.prototype.hasOwnProperty.call(E,D)&&(S[S.length]=D);return S},y(w)};return function(w){if(w&&w.__esModule)return w;var E={};if(w!=null)for(var S=y(w),D=0;D<S.length;D++)S[D]!=="default"&&l(E,w,S[D]);return u(E,w),E}})();Object.defineProperty(dn,"__esModule",{value:!0}),dn.CronFileParser=void 0;const o=Df();let m=(v=class{static async parseFile(w){var D;const{readFile:E}=await Promise.resolve().then(()=>d(Hg)),S=await E(w,"utf8");return Ne(D=v,f,Rf).call(D,S)}static parseFileSync(w){var D;const{readFileSync:E}=Hg,S=E(w,"utf8");return Ne(D=v,f,Rf).call(D,S)}},f=new WeakSet,Rf=function(w){var D;const E=w.split(`
|
|
381
|
+
`),S={variables:{},expressions:[],errors:{}};for(const A of E){const M=A.trim();if(M.length===0||M.startsWith("#"))continue;const Y=M.match(/^(.*)=(.*)$/);if(Y){const[,X,Q]=Y;S.variables[X]=Q.replace(/["']/g,"");continue}try{const X=Ne(D=v,f,gx).call(D,M);S.expressions.push(X.interval)}catch(X){S.errors[M]=X}}return S},gx=function(w){const E=w.split(" ");return{interval:o.CronExpressionParser.parse(E.slice(0,5).join(" ")),command:E.slice(5,E.length)}},lt(v,f),v);return dn.CronFileParser=m,dn}var Vg;function iS(){return Vg||(Vg=1,(function(l){var u=Rs&&Rs.__createBinding||(Object.create?(function(y,w,E,S){S===void 0&&(S=E);var D=Object.getOwnPropertyDescriptor(w,E);(!D||("get"in D?!w.__esModule:D.writable||D.configurable))&&(D={enumerable:!0,get:function(){return w[E]}}),Object.defineProperty(y,S,D)}):(function(y,w,E,S){S===void 0&&(S=E),y[S]=w[E]})),d=Rs&&Rs.__exportStar||function(y,w){for(var E in y)E!=="default"&&!Object.prototype.hasOwnProperty.call(w,E)&&u(w,y,E)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const o=Df();var m=Wf();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return m.CronDate}});var f=Xy();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var v=lx();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return v.CronExpression}});var N=Df();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return N.CronExpressionParser}});var b=rS();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return b.CronFileParser}}),d(Xf(),l),l.default=o.CronExpressionParser})(Rs)),Rs}var uS=iS();const yx=6048e5,cS=864e5,oS=6e4,dS=36e5,Bg=Symbol.for("constructDateFrom");function Aa(l,u){return typeof l=="function"?l(u):l&&typeof l=="object"&&Bg in l?l[Bg](u):l instanceof Date?new l.constructor(u):new Date(u)}function Rt(l,u){return Aa(u||l,l)}function fS(l,u,d){return Aa(l,+Rt(l)+u)}function Vc(l,u,d){return fS(l,u*dS)}let hS={};function eo(){return hS}function iu(l,u){var N,b,y,w;const d=eo(),o=(u==null?void 0:u.weekStartsOn)??((b=(N=u==null?void 0:u.locale)==null?void 0:N.options)==null?void 0:b.weekStartsOn)??d.weekStartsOn??((w=(y=d.locale)==null?void 0:y.options)==null?void 0:w.weekStartsOn)??0,m=Rt(l,u==null?void 0:u.in),f=m.getDay(),v=(f<o?7:0)+f-o;return m.setDate(m.getDate()-v),m.setHours(0,0,0,0),m}function Ic(l,u){return iu(l,{...u,weekStartsOn:1})}function xx(l,u){const d=Rt(l,u==null?void 0:u.in),o=d.getFullYear(),m=Aa(d,0);m.setFullYear(o+1,0,4),m.setHours(0,0,0,0);const f=Ic(m),v=Aa(d,0);v.setFullYear(o,0,4),v.setHours(0,0,0,0);const N=Ic(v);return d.getTime()>=f.getTime()?o+1:d.getTime()>=N.getTime()?o:o-1}function Yg(l){const u=Rt(l),d=new Date(Date.UTC(u.getFullYear(),u.getMonth(),u.getDate(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()));return d.setUTCFullYear(u.getFullYear()),+l-+d}function mS(l,...u){const d=Aa.bind(null,u.find(o=>typeof o=="object"));return u.map(d)}function $g(l,u){const d=Rt(l,u==null?void 0:u.in);return d.setHours(0,0,0,0),d}function gS(l,u,d){const[o,m]=mS(d==null?void 0:d.in,l,u),f=$g(o),v=$g(m),N=+f-Yg(f),b=+v-Yg(v);return Math.round((N-b)/cS)}function yS(l,u){const d=xx(l,u),o=Aa(l,0);return o.setFullYear(d,0,4),o.setHours(0,0,0,0),Ic(o)}function xS(l,u){let d,o=u==null?void 0:u.in;return l.forEach(m=>{!o&&typeof m=="object"&&(o=Aa.bind(null,m));const f=Rt(m,o);(!d||d<f||isNaN(+f))&&(d=f)}),Aa(o,d||NaN)}function pS(l,u){let d,o=u==null?void 0:u.in;return l.forEach(m=>{!o&&typeof m=="object"&&(o=Aa.bind(null,m));const f=Rt(m,o);(!d||d>f||isNaN(+f))&&(d=f)}),Aa(o,d||NaN)}function vS(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function bS(l){return!(!vS(l)&&typeof l!="number"||isNaN(+Rt(l)))}function SS(l){return u=>{const o=(l?Math[l]:Math.trunc)(u);return o===0?0:o}}function wS(l,u){return+Rt(l)-+Rt(u)}function Fg(l,u,d){const o=wS(l,u)/oS;return SS(d==null?void 0:d.roundingMethod)(o)}function NS(l,u){const d=Rt(l,u==null?void 0:u.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const jS={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ES=(l,u,d)=>{let o;const m=jS[l];return typeof m=="string"?o=m:u===1?o=m.one:o=m.other.replace("{{count}}",u.toString()),d!=null&&d.addSuffix?d.comparison&&d.comparison>0?"in "+o:o+" ago":o};function bf(l){return(u={})=>{const d=u.width?String(u.width):l.defaultWidth;return l.formats[d]||l.formats[l.defaultWidth]}}const TS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},MS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},CS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},OS={date:bf({formats:TS,defaultWidth:"full"}),time:bf({formats:MS,defaultWidth:"full"}),dateTime:bf({formats:CS,defaultWidth:"full"})},DS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},RS=(l,u,d,o)=>DS[l];function tu(l){return(u,d)=>{const o=d!=null&&d.context?String(d.context):"standalone";let m;if(o==="formatting"&&l.formattingValues){const v=l.defaultFormattingWidth||l.defaultWidth,N=d!=null&&d.width?String(d.width):v;m=l.formattingValues[N]||l.formattingValues[v]}else{const v=l.defaultWidth,N=d!=null&&d.width?String(d.width):l.defaultWidth;m=l.values[N]||l.values[v]}const f=l.argumentCallback?l.argumentCallback(u):u;return m[f]}}const AS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_S={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},zS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},US={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},LS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},HS=(l,u)=>{const d=Number(l),o=d%100;if(o>20||o<10)switch(o%10){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd"}return d+"th"},qS={ordinalNumber:HS,era:tu({values:AS,defaultWidth:"wide"}),quarter:tu({values:_S,defaultWidth:"wide",argumentCallback:l=>l-1}),month:tu({values:kS,defaultWidth:"wide"}),day:tu({values:zS,defaultWidth:"wide"}),dayPeriod:tu({values:US,defaultWidth:"wide",formattingValues:LS,defaultFormattingWidth:"wide"})};function au(l){return(u,d={})=>{const o=d.width,m=o&&l.matchPatterns[o]||l.matchPatterns[l.defaultMatchWidth],f=u.match(m);if(!f)return null;const v=f[0],N=o&&l.parsePatterns[o]||l.parsePatterns[l.defaultParseWidth],b=Array.isArray(N)?BS(N,E=>E.test(v)):VS(N,E=>E.test(v));let y;y=l.valueCallback?l.valueCallback(b):b,y=d.valueCallback?d.valueCallback(y):y;const w=u.slice(v.length);return{value:y,rest:w}}}function VS(l,u){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&u(l[d]))return d}function BS(l,u){for(let d=0;d<l.length;d++)if(u(l[d]))return d}function YS(l){return(u,d={})=>{const o=u.match(l.matchPattern);if(!o)return null;const m=o[0],f=u.match(l.parsePattern);if(!f)return null;let v=l.valueCallback?l.valueCallback(f[0]):f[0];v=d.valueCallback?d.valueCallback(v):v;const N=u.slice(m.length);return{value:v,rest:N}}}const $S=/^(\d+)(th|st|nd|rd)?/i,FS=/\d+/i,GS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ZS={any:[/^b/i,/^(a|c)/i]},PS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},QS={any:[/1/i,/2/i,/3/i,/4/i]},IS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},WS={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},XS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},JS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},KS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ew={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},tw={ordinalNumber:YS({matchPattern:$S,parsePattern:FS,valueCallback:l=>parseInt(l,10)}),era:au({matchPatterns:GS,defaultMatchWidth:"wide",parsePatterns:ZS,defaultParseWidth:"any"}),quarter:au({matchPatterns:PS,defaultMatchWidth:"wide",parsePatterns:QS,defaultParseWidth:"any",valueCallback:l=>l+1}),month:au({matchPatterns:IS,defaultMatchWidth:"wide",parsePatterns:WS,defaultParseWidth:"any"}),day:au({matchPatterns:XS,defaultMatchWidth:"wide",parsePatterns:JS,defaultParseWidth:"any"}),dayPeriod:au({matchPatterns:KS,defaultMatchWidth:"any",parsePatterns:ew,defaultParseWidth:"any"})},aw={code:"en-US",formatDistance:ES,formatLong:OS,formatRelative:RS,localize:qS,match:tw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function nw(l,u){const d=Rt(l,u==null?void 0:u.in);return gS(d,NS(d))+1}function lw(l,u){const d=Rt(l,u==null?void 0:u.in),o=+Ic(d)-+yS(d);return Math.round(o/yx)+1}function px(l,u){var w,E,S,D;const d=Rt(l,u==null?void 0:u.in),o=d.getFullYear(),m=eo(),f=(u==null?void 0:u.firstWeekContainsDate)??((E=(w=u==null?void 0:u.locale)==null?void 0:w.options)==null?void 0:E.firstWeekContainsDate)??m.firstWeekContainsDate??((D=(S=m.locale)==null?void 0:S.options)==null?void 0:D.firstWeekContainsDate)??1,v=Aa((u==null?void 0:u.in)||l,0);v.setFullYear(o+1,0,f),v.setHours(0,0,0,0);const N=iu(v,u),b=Aa((u==null?void 0:u.in)||l,0);b.setFullYear(o,0,f),b.setHours(0,0,0,0);const y=iu(b,u);return+d>=+N?o+1:+d>=+y?o:o-1}function sw(l,u){var N,b,y,w;const d=eo(),o=(u==null?void 0:u.firstWeekContainsDate)??((b=(N=u==null?void 0:u.locale)==null?void 0:N.options)==null?void 0:b.firstWeekContainsDate)??d.firstWeekContainsDate??((w=(y=d.locale)==null?void 0:y.options)==null?void 0:w.firstWeekContainsDate)??1,m=px(l,u),f=Aa((u==null?void 0:u.in)||l,0);return f.setFullYear(m,0,o),f.setHours(0,0,0,0),iu(f,u)}function rw(l,u){const d=Rt(l,u==null?void 0:u.in),o=+iu(d,u)-+sw(d,u);return Math.round(o/yx)+1}function ot(l,u){const d=l<0?"-":"",o=Math.abs(l).toString().padStart(u,"0");return d+o}const Fl={y(l,u){const d=l.getFullYear(),o=d>0?d:1-d;return ot(u==="yy"?o%100:o,u.length)},M(l,u){const d=l.getMonth();return u==="M"?String(d+1):ot(d+1,2)},d(l,u){return ot(l.getDate(),u.length)},a(l,u){const d=l.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.toUpperCase();case"aaa":return d;case"aaaaa":return d[0];case"aaaa":default:return d==="am"?"a.m.":"p.m."}},h(l,u){return ot(l.getHours()%12||12,u.length)},H(l,u){return ot(l.getHours(),u.length)},m(l,u){return ot(l.getMinutes(),u.length)},s(l,u){return ot(l.getSeconds(),u.length)},S(l,u){const d=u.length,o=l.getMilliseconds(),m=Math.trunc(o*Math.pow(10,d-3));return ot(m,u.length)}},Rr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gg={G:function(l,u,d){const o=l.getFullYear()>0?1:0;switch(u){case"G":case"GG":case"GGG":return d.era(o,{width:"abbreviated"});case"GGGGG":return d.era(o,{width:"narrow"});case"GGGG":default:return d.era(o,{width:"wide"})}},y:function(l,u,d){if(u==="yo"){const o=l.getFullYear(),m=o>0?o:1-o;return d.ordinalNumber(m,{unit:"year"})}return Fl.y(l,u)},Y:function(l,u,d,o){const m=px(l,o),f=m>0?m:1-m;if(u==="YY"){const v=f%100;return ot(v,2)}return u==="Yo"?d.ordinalNumber(f,{unit:"year"}):ot(f,u.length)},R:function(l,u){const d=xx(l);return ot(d,u.length)},u:function(l,u){const d=l.getFullYear();return ot(d,u.length)},Q:function(l,u,d){const o=Math.ceil((l.getMonth()+1)/3);switch(u){case"Q":return String(o);case"QQ":return ot(o,2);case"Qo":return d.ordinalNumber(o,{unit:"quarter"});case"QQQ":return d.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return d.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return d.quarter(o,{width:"wide",context:"formatting"})}},q:function(l,u,d){const o=Math.ceil((l.getMonth()+1)/3);switch(u){case"q":return String(o);case"qq":return ot(o,2);case"qo":return d.ordinalNumber(o,{unit:"quarter"});case"qqq":return d.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return d.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return d.quarter(o,{width:"wide",context:"standalone"})}},M:function(l,u,d){const o=l.getMonth();switch(u){case"M":case"MM":return Fl.M(l,u);case"Mo":return d.ordinalNumber(o+1,{unit:"month"});case"MMM":return d.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return d.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return d.month(o,{width:"wide",context:"formatting"})}},L:function(l,u,d){const o=l.getMonth();switch(u){case"L":return String(o+1);case"LL":return ot(o+1,2);case"Lo":return d.ordinalNumber(o+1,{unit:"month"});case"LLL":return d.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return d.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return d.month(o,{width:"wide",context:"standalone"})}},w:function(l,u,d,o){const m=rw(l,o);return u==="wo"?d.ordinalNumber(m,{unit:"week"}):ot(m,u.length)},I:function(l,u,d){const o=lw(l);return u==="Io"?d.ordinalNumber(o,{unit:"week"}):ot(o,u.length)},d:function(l,u,d){return u==="do"?d.ordinalNumber(l.getDate(),{unit:"date"}):Fl.d(l,u)},D:function(l,u,d){const o=nw(l);return u==="Do"?d.ordinalNumber(o,{unit:"dayOfYear"}):ot(o,u.length)},E:function(l,u,d){const o=l.getDay();switch(u){case"E":case"EE":case"EEE":return d.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return d.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return d.day(o,{width:"short",context:"formatting"});case"EEEE":default:return d.day(o,{width:"wide",context:"formatting"})}},e:function(l,u,d,o){const m=l.getDay(),f=(m-o.weekStartsOn+8)%7||7;switch(u){case"e":return String(f);case"ee":return ot(f,2);case"eo":return d.ordinalNumber(f,{unit:"day"});case"eee":return d.day(m,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(m,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(m,{width:"short",context:"formatting"});case"eeee":default:return d.day(m,{width:"wide",context:"formatting"})}},c:function(l,u,d,o){const m=l.getDay(),f=(m-o.weekStartsOn+8)%7||7;switch(u){case"c":return String(f);case"cc":return ot(f,u.length);case"co":return d.ordinalNumber(f,{unit:"day"});case"ccc":return d.day(m,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(m,{width:"narrow",context:"standalone"});case"cccccc":return d.day(m,{width:"short",context:"standalone"});case"cccc":default:return d.day(m,{width:"wide",context:"standalone"})}},i:function(l,u,d){const o=l.getDay(),m=o===0?7:o;switch(u){case"i":return String(m);case"ii":return ot(m,u.length);case"io":return d.ordinalNumber(m,{unit:"day"});case"iii":return d.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return d.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return d.day(o,{width:"short",context:"formatting"});case"iiii":default:return d.day(o,{width:"wide",context:"formatting"})}},a:function(l,u,d){const m=l.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},b:function(l,u,d){const o=l.getHours();let m;switch(o===12?m=Rr.noon:o===0?m=Rr.midnight:m=o/12>=1?"pm":"am",u){case"b":case"bb":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},B:function(l,u,d){const o=l.getHours();let m;switch(o>=17?m=Rr.evening:o>=12?m=Rr.afternoon:o>=4?m=Rr.morning:m=Rr.night,u){case"B":case"BB":case"BBB":return d.dayPeriod(m,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(m,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(m,{width:"wide",context:"formatting"})}},h:function(l,u,d){if(u==="ho"){let o=l.getHours()%12;return o===0&&(o=12),d.ordinalNumber(o,{unit:"hour"})}return Fl.h(l,u)},H:function(l,u,d){return u==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):Fl.H(l,u)},K:function(l,u,d){const o=l.getHours()%12;return u==="Ko"?d.ordinalNumber(o,{unit:"hour"}):ot(o,u.length)},k:function(l,u,d){let o=l.getHours();return o===0&&(o=24),u==="ko"?d.ordinalNumber(o,{unit:"hour"}):ot(o,u.length)},m:function(l,u,d){return u==="mo"?d.ordinalNumber(l.getMinutes(),{unit:"minute"}):Fl.m(l,u)},s:function(l,u,d){return u==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):Fl.s(l,u)},S:function(l,u){return Fl.S(l,u)},X:function(l,u,d){const o=l.getTimezoneOffset();if(o===0)return"Z";switch(u){case"X":return Pg(o);case"XXXX":case"XX":return Us(o);case"XXXXX":case"XXX":default:return Us(o,":")}},x:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"x":return Pg(o);case"xxxx":case"xx":return Us(o);case"xxxxx":case"xxx":default:return Us(o,":")}},O:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"O":case"OO":case"OOO":return"GMT"+Zg(o,":");case"OOOO":default:return"GMT"+Us(o,":")}},z:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"z":case"zz":case"zzz":return"GMT"+Zg(o,":");case"zzzz":default:return"GMT"+Us(o,":")}},t:function(l,u,d){const o=Math.trunc(+l/1e3);return ot(o,u.length)},T:function(l,u,d){return ot(+l,u.length)}};function Zg(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),m=Math.trunc(o/60),f=o%60;return f===0?d+String(m):d+String(m)+u+ot(f,2)}function Pg(l,u){return l%60===0?(l>0?"-":"+")+ot(Math.abs(l)/60,2):Us(l,u)}function Us(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),m=ot(Math.trunc(o/60),2),f=ot(o%60,2);return d+m+u+f}const Qg=(l,u)=>{switch(l){case"P":return u.date({width:"short"});case"PP":return u.date({width:"medium"});case"PPP":return u.date({width:"long"});case"PPPP":default:return u.date({width:"full"})}},vx=(l,u)=>{switch(l){case"p":return u.time({width:"short"});case"pp":return u.time({width:"medium"});case"ppp":return u.time({width:"long"});case"pppp":default:return u.time({width:"full"})}},iw=(l,u)=>{const d=l.match(/(P+)(p+)?/)||[],o=d[1],m=d[2];if(!m)return Qg(l,u);let f;switch(o){case"P":f=u.dateTime({width:"short"});break;case"PP":f=u.dateTime({width:"medium"});break;case"PPP":f=u.dateTime({width:"long"});break;case"PPPP":default:f=u.dateTime({width:"full"});break}return f.replace("{{date}}",Qg(o,u)).replace("{{time}}",vx(m,u))},uw={p:vx,P:iw},cw=/^D+$/,ow=/^Y+$/,dw=["D","DD","YY","YYYY"];function fw(l){return cw.test(l)}function hw(l){return ow.test(l)}function mw(l,u,d){const o=gw(l,u,d);if(console.warn(o),dw.includes(l))throw new RangeError(o)}function gw(l,u,d){const o=l[0]==="Y"?"years":"days of the month";return`Use \`${l.toLowerCase()}\` instead of \`${l}\` (in \`${u}\`) for formatting ${o} to the input \`${d}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const yw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pw=/^'([^]*?)'?$/,vw=/''/g,bw=/[a-zA-Z]/;function _s(l,u,d){var w,E,S,D;const o=eo(),m=o.locale??aw,f=o.firstWeekContainsDate??((E=(w=o.locale)==null?void 0:w.options)==null?void 0:E.firstWeekContainsDate)??1,v=o.weekStartsOn??((D=(S=o.locale)==null?void 0:S.options)==null?void 0:D.weekStartsOn)??0,N=Rt(l,d==null?void 0:d.in);if(!bS(N))throw new RangeError("Invalid time value");let b=u.match(xw).map(A=>{const M=A[0];if(M==="p"||M==="P"){const Y=uw[M];return Y(A,m.formatLong)}return A}).join("").match(yw).map(A=>{if(A==="''")return{isToken:!1,value:"'"};const M=A[0];if(M==="'")return{isToken:!1,value:Sw(A)};if(Gg[M])return{isToken:!0,value:A};if(M.match(bw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+M+"`");return{isToken:!1,value:A}});m.localize.preprocessor&&(b=m.localize.preprocessor(N,b));const y={firstWeekContainsDate:f,weekStartsOn:v,locale:m};return b.map(A=>{if(!A.isToken)return A.value;const M=A.value;(hw(M)||fw(M))&&mw(M,u,String(l));const Y=Gg[M[0]];return Y(N,M,m.localize,y)}).join("")}function Sw(l){const u=l.match(pw);return u?u[1].replace(vw,"'"):l}function ww(l,u){return+Rt(l)>+Rt(u)}function Nw(l,u){return+Rt(l)<+Rt(u)}function jw(l,u){const d=Rt(l,u==null?void 0:u.in);return d.setMinutes(0,0,0),d}const Sf=Gy,Bc=[{bg:"bg-indigo-400",border:"border-indigo-400/60"},{bg:"bg-cyan-400",border:"border-cyan-400/60"},{bg:"bg-rose-400",border:"border-rose-400/60"},{bg:"bg-violet-400",border:"border-violet-400/60"},{bg:"bg-amber-400",border:"border-amber-400/60"}],el=160,Yc=14,Ew=10,Tw=7,Ig=4,bx=({configs:l,currentProjectId:u,onEditJob:d,queueStatus:o,queueAnalytics:m})=>{const f=V.useMemo(()=>jw(new Date),[]),v=V.useMemo(()=>Vc(f,24),[f]),N=V.useMemo(()=>Vc(f,-24),[f]),b=v,y=V.useMemo(()=>{const ee=[];for(let le=0;le<=24;le++)ee.push(Vc(f,le));return ee},[f]),w=V.useMemo(()=>{const ee=[];return l.forEach(({projectId:le,config:te})=>{var R,U;const I={executor:te.executorEnabled!==!1?te.cronSchedule:null,reviewer:te.reviewerEnabled?te.reviewerSchedule:null,qa:te.qa.enabled?te.qa.schedule:null,audit:te.audit.enabled?te.audit.schedule:null,slicer:te.roadmapScanner.enabled?te.roadmapScanner.slicerSchedule:null,analytics:(R=te.analytics)!=null&&R.enabled?(U=te.analytics)==null?void 0:U.schedule:null},J=te.cronScheduleOffset||0;Object.entries(I).forEach(([ne,F])=>{if(F)try{const ce=uS.CronExpressionParser.parse(F,{currentDate:f,endDate:v});for(;ce.hasNext();){const ye=ce.next(),me=new Date(ye.getTime());me.setMinutes(me.getMinutes()+J),ww(me,f)&&Nw(me,v)&&ee.push({projectId:le,jobType:ne,time:me})}}catch(ce){console.error(`Failed to parse cron "${F}" for ${le}/${ne}`,ce)}})}),ee},[l,f,v]),E=V.useMemo(()=>{const ee=new Set;return l.length===0||(l.every(le=>le.config.executorEnabled===!1)&&ee.add("executor"),l.every(le=>!le.config.reviewerEnabled)&&ee.add("reviewer"),l.every(le=>!le.config.qa.enabled)&&ee.add("qa"),l.every(le=>!le.config.audit.enabled)&&ee.add("audit"),l.every(le=>!le.config.roadmapScanner.enabled)&&ee.add("slicer"),l.every(le=>{var te;return!((te=le.config.analytics)!=null&&te.enabled)})&&ee.add("analytics")),ee},[l]),S=V.useMemo(()=>{const ee=new Map;let le=0;return l.forEach(te=>{te.projectId===u||(ee.set(te.projectId,le%Bc.length),le++)}),ee},[l,u]),D=ee=>Fg(ee,f),A=V.useMemo(()=>{const ee=[];for(let le=0;le<=24;le++)ee.push(Vc(N,le));return ee},[N]),M=ee=>{const le=pS([xS([ee,N]),b]);return Fg(le,N)},Y=V.useMemo(()=>{const ee=(m==null?void 0:m.recentRuns)??[],le=new Map;for(const te of ee){const I=te.providerKey||"default",J=new Date(te.startedAt*1e3),R=te.finishedAt?new Date(te.finishedAt*1e3):new Date;R<N||J>b||(le.has(I)||le.set(I,[]),le.get(I).push({id:te.id,jobType:te.jobType,status:te.status,projectPath:te.projectPath,startedAt:J,finishedAt:R,throttledCount:te.throttledCount}))}if(o!=null&&o.running){const te=o.running.providerKey??"default";le.has(te)||le.set(te,[]),le.get(te).push({id:o.running.id,jobType:o.running.jobType,status:"running",projectPath:o.running.projectPath,startedAt:new Date((o.running.dispatchedAt??o.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(le.entries()).sort(([te],[I])=>te.localeCompare(I)).map(([te,I])=>({providerKey:te,runs:I.sort((J,R)=>J.startedAt.getTime()-R.startedAt.getTime())}))},[b,N,m,o]),X=ee=>ee.split(/[-_]/).map(le=>le.charAt(0).toUpperCase()+le.slice(1)).join(" "),Q=l.length>1,G=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:y.map((ee,le)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},le))});return s.jsxs("div",{className:"w-full overflow-hidden rounded-xl border border-slate-800 bg-slate-950/50 flex flex-col",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Execution Timeline (Next 24h)"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Upcoming scheduled runs across projects. Aligned columns = overlap."})]}),Q&&s.jsxs("div",{className:"flex flex-wrap gap-2 justify-end max-w-sm",children:[s.jsxs("div",{className:"flex items-center gap-1 mr-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 shrink-0"}),s.jsx("span",{className:"text-[10px] text-slate-400 font-semibold",children:"current"})]}),l.filter(ee=>ee.projectId!==u).slice(0,5).map(ee=>{const le=S.get(ee.projectId)??0,te=Bc[le],I=(ee.projectId.split("/").pop()??ee.projectId).slice(0,14);return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${te.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:ee.projectId,children:I})]},ee.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+el},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:el},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:y.map((ee,le)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:le*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:_s(ee,"HH:mm")})},le))})]}),s.jsxs("div",{className:"relative",children:[l.length===0&&s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsx("p",{className:"text-sm text-slate-500 italic",children:"No project data available for timeline."})}),Sf.map(ee=>{const le=E.has(ee.id),te=w.filter(J=>J.jobType===ee.id);if(!Q)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${le?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:el},className:"shrink-0 p-3 border-r border-slate-800/50 flex items-center gap-2",children:[s.jsx("div",{className:`w-2 h-2 rounded-full ${ee.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:ee.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[G,te.length===0?s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-600 italic",children:le?"Disabled":"No runs in this window"})}):te.map((J,R)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(J.projectId,J.jobType),style:{left:D(J.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${ee.color.bg} ${ee.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${ee.label} at ${_s(J.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-10",children:_s(J.time,"HH:mm")})},R))]})]},ee.id);const I=l.length*Yc+Ig*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${le?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:el,height:I},className:"shrink-0 border-r border-slate-800/50 flex flex-col px-2 py-1",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-0.5",children:[s.jsx("div",{className:`w-1.5 h-1.5 rounded-full ${ee.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:ee.label})]}),l.map(J=>{const R=J.projectId===u,U=(J.projectId.split("/").pop()??J.projectId).slice(0,14),ne=S.get(J.projectId)??0,F=R?ee.color.bg:Bc[ne].bg;return s.jsxs("div",{style:{height:Yc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${F}`}),s.jsx("span",{className:`text-[9px] truncate ${R?"text-slate-200 font-semibold":"text-slate-600"}`,title:J.projectId,children:R?`${U} ★`:U})]},J.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:I},children:[G,l.map((J,R)=>{const U=J.projectId===u,ne=te.filter(ue=>ue.projectId===J.projectId),F=Ig+R*Yc,ce=U?Ew:Tw,ye=Math.floor((Yc-ce)/2),me=S.get(J.projectId)??0,B=U?{bg:ee.color.bg,border:ee.color.border}:Bc[me];return s.jsxs(ze.Fragment,{children:[R>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:F}}),ne.map((ue,se)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(J.projectId,ue.jobType),style:{left:D(ue.time)-3,top:F+ye,height:ce},className:`absolute w-6 rounded border ${B.bg} ${B.border} ${U?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${J.projectId} · ${ee.label} @ ${_s(ue.time,"HH:mm")}`,children:s.jsx("div",{className:"absolute -top-5 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-slate-800 text-white text-[9px] whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none border border-slate-700 z-20",children:_s(ue.time,"HH:mm")})},se))]},J.projectId)}),te.length===0&&!le&&s.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:s.jsx("span",{className:"text-[10px] text-slate-700 italic",children:"No runs in this window"})})]})]},ee.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:el+D(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})}),s.jsxs("div",{className:"p-3 bg-slate-900/40 flex items-center gap-4 text-[10px] text-slate-500",children:[s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-1.5 h-3 rounded bg-blue-500/50 border border-blue-500"}),s.jsx("span",{children:"Each block = one scheduled run"})]}),s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-[1px] h-4 bg-rose-500"}),s.jsx("span",{children:"Current Time"})]}),Q&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),Y.length>0&&s.jsxs("div",{className:"border-t border-slate-800",children:[s.jsxs("div",{className:"p-4 border-b border-slate-800 flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:"Recent Execution Runs"}),s.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"Last 24h of real runs grouped by provider bucket."})]}),s.jsxs("div",{className:"text-[10px] uppercase tracking-[0.2em] text-slate-500",children:[(m==null?void 0:m.recentRuns.length)??0," recorded runs"]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar","data-testid":"provider-execution-timeline",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+el},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:el},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:A.map((ee,le)=>s.jsx("div",{className:"absolute top-0 bottom-0 border-l border-slate-800/50 flex flex-col justify-end pb-1 px-1",style:{left:le*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:_s(ee,"HH:mm")})},le))})]}),s.jsx("div",{className:"relative",children:Y.map(({providerKey:ee,runs:le})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${ee}`,children:[s.jsxs("div",{style:{width:el},className:"shrink-0 p-3 border-r border-slate-800/50 flex flex-col justify-center",children:[s.jsx("span",{className:"text-xs font-semibold text-slate-300 truncate",title:ee,children:X(ee)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:ee})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:A.map((te,I)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},I))}),le.map(te=>{const I=Sf.find(me=>me.id===te.jobType)??Sf[0],J=M(te.startedAt),R=M(te.finishedAt),U=Math.max(R-J,8),ne=te.status==="running",F=te.status==="error"||te.status==="failed"||te.status==="errored",ce=ne?"bg-green-500":F?"bg-red-500":I.color.bg,ye=ne?"border-green-400/60":F?"border-red-400/60":I.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${ce} ${ye} opacity-85 shadow-lg ${ne?"animate-pulse":""}`,style:{left:J,width:U},title:`${ee} • ${I.label} • ${_s(te.startedAt,"MMM d HH:mm")} • ${te.status}`,"data-testid":"provider-execution-run",children:s.jsxs("div",{className:"h-full px-2 flex items-center justify-between gap-2 text-[10px] text-white/90 overflow-hidden whitespace-nowrap",children:[s.jsx("span",{className:"font-semibold uppercase tracking-wide",children:I.label}),s.jsx("span",{className:"text-white/70",children:te.status}),te.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",te.throttledCount,"x"]})]})},`${ee}-${te.id}-${te.startedAt.getTime()}`)})]})]},ee))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:el+M(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},Sx=({form:l,scheduleMode:u,selectedTemplateId:d,onFieldChange:o,onSwitchToTemplate:m,onSwitchToCustom:f,onApplyTemplate:v,allProjectConfigs:N,currentProjectId:b,onEditJob:y})=>{var w;return s.jsxs(Je,{className:"p-6 space-y-6",children:[N&&N.length>0&&s.jsx(bx,{configs:N,currentProjectId:b,onEditJob:y}),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 ${u==="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 ${u==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),u==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:If.map(E=>{const S=d===E.id;return s.jsxs("button",{type:"button",onClick:()=>v(E),className:`text-left p-4 rounded-lg border transition-colors ${S?"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:E.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:E.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",E.hints.executor],["Reviewer",E.hints.reviewer],["QA",E.hints.qa],["Audit",E.hints.audit],["Slicer",E.hints.slicer]].map(([D,A])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:D}),s.jsx("span",{className:"text-xs text-slate-400",children:A})]},D))})]},E.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Mn,{label:"PRD Execution Schedule",value:l.cronSchedule,onChange:E=>o("cronSchedule",E)}),s.jsx(Mn,{label:"PR Review Schedule",value:l.reviewerSchedule,onChange:E=>o("reviewerSchedule",E)}),s.jsx(Mn,{label:"QA Schedule",value:l.qa.schedule,onChange:E=>o("qa",{...l.qa,schedule:E})}),s.jsx(Mn,{label:"Audit Schedule",value:l.audit.schedule,onChange:E=>o("audit",{...l.audit,schedule:E})}),((w=l.analytics)==null?void 0:w.enabled)&&s.jsx(Mn,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:E=>o("analytics",{...l.analytics,schedule:E})}),l.roadmapScanner.enabled&&s.jsx(Mn,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:E=>o("roadmapScanner",{...l.roadmapScanner,slicerSchedule:E})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(ia,{label:"Scheduling Priority",value:String(l.schedulingPriority),onChange:E=>o("schedulingPriority",Number(E)),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(wa,{checked:l.globalQueueEnabled??!0,onChange:E=>o("globalQueueEnabled",E)})]})}),s.jsx(Ye,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(l.cronScheduleOffset),onChange:E=>{const S=Math.min(59,Math.max(0,Number(E.target.value||0)));o("cronScheduleOffset",S)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},Mw=()=>{var Na,Qa,Ia,ua,ca,Wa,hn,la,ka,mn,gn,rl,il,At,Xa,On,Dn;const{addToast:l,selectedProjectId:u,globalModeLoading:d}=na(),[o,m]=V.useState("overview"),[f,v]=V.useState(!1),[N,b]=V.useState(!1),[y,w]=V.useState(null),[E,S]=V.useState(null),[D,A]=V.useState([]),[M,Y]=V.useState(null),[X,Q]=V.useState(null),[G,ee]=V.useState({form:{cronSchedule:"5 */3 * * *",reviewerSchedule:"25 */6 * * *",qa:{schedule:"45 2,14 * * *",enabled:!0},audit:{schedule:"50 3 * * 1",enabled:!0},analytics:{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{slicerSchedule:"35 */12 * * *",enabled:!0},scheduleBundleId:null,schedulingPriority:3,cronScheduleOffset:0,globalQueueEnabled:!0},scheduleMode:"template",selectedTemplateId:"always-on",isDirty:!1}),{data:le,loading:te,error:I,refetch:J}=fn(zy,[u],{enabled:!d}),{data:R,loading:U,refetch:ne}=fn(Pf,[u],{enabled:!d});V.useEffect(()=>{const L=setInterval(()=>{J()},3e4);return()=>clearInterval(L)},[J]),V.useEffect(()=>{d||ky().then(A).catch(console.error)},[u,d]),V.useEffect(()=>{if(d)return;const L=()=>{d2().then(Y).catch(()=>{}),f2(24).then(Q).catch(()=>{})};L();const fe=setInterval(L,3e4);return()=>clearInterval(fe)},[d,u]),V.useEffect(()=>{var L,fe,ve,xe,et,Ge;if(R&&!G.isDirty){const We=nu(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((L=R.qa)==null?void 0:L.schedule)||"45 2,14 * * *",((fe=R.audit)==null?void 0:fe.schedule)||"50 3 * * 1",((ve=R.roadmapScanner)==null?void 0:ve.slicerSchedule)||"35 */12 * * *");ee({form:{cronSchedule:R.cronSchedule||"5 */3 * * *",reviewerSchedule:R.reviewerSchedule||"25 */6 * * *",qa:R.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:R.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:R.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((xe=R.roadmapScanner)==null?void 0:xe.enabled)??!0,slicerSchedule:((et=R.roadmapScanner)==null?void 0:et.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:R.scheduleBundleId??null,schedulingPriority:R.schedulingPriority??3,cronScheduleOffset:R.cronScheduleOffset??0,globalQueueEnabled:((Ge=R.queue)==null?void 0:Ge.enabled)??!0},scheduleMode:We?"template":"custom",selectedTemplateId:(We==null?void 0:We.id)??"",isDirty:!1})}},[R,G.isDirty]);const F=()=>{ne(),J()},ce=(L,fe)=>L instanceof Error?L.message:fe,ye=async()=>{if(le){v(!0);try{le.paused?(await lu(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await s2(),l({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),F()}catch(L){l({title:"Action Failed",message:ce(L,"Failed to toggle schedule state"),type:"error"})}finally{v(!1)}}},me=async(L,fe)=>{if(R){w(L);try{L==="executor"?await al({executorEnabled:fe}):L==="reviewer"?await al({reviewerEnabled:fe}):L==="qa"?await al({qa:{...R.qa,enabled:fe}}):L==="audit"?await al({audit:{...R.audit,enabled:fe}}):L==="analytics"?await al({analytics:{...R.analytics,enabled:fe}}):await al({roadmapScanner:{...R.roadmapScanner,enabled:fe}});let ve="";try{await lu()}catch(xe){ve=ce(xe,"Failed to reinstall cron schedules")}F(),l(ve?{title:"Job Saved (Cron Reinstall Failed)",message:ve,type:"warning"}:{title:"Job Updated",message:`${L[0].toUpperCase()+L.slice(1)} ${fe?"enabled":"disabled"}.`,type:"success"})}catch(ve){l({title:"Update Failed",message:ce(ve,"Failed to update job configuration"),type:"error"})}finally{w(null)}}},B=async L=>{S(L);try{await{executor:Uy,reviewer:Qf,qa:Ly,audit:Hy,planner:Vy,analytics:qy}[L](),l({title:"Job Triggered",message:`${L[0].toUpperCase()+L.slice(1)} job has been queued.`,type:"success"}),J()}catch(fe){l({title:"Trigger Failed",message:ce(fe,`Failed to trigger ${L} job`),type:"error"})}finally{S(null)}},ue=(L,fe)=>{ee(ve=>({...ve,form:{...ve.form,[L]:fe},isDirty:!0}))},se=()=>{if(!G.form)return;const L=nu(G.form.scheduleBundleId,G.form.cronSchedule,G.form.reviewerSchedule,G.form.qa.schedule,G.form.audit.schedule,G.form.roadmapScanner.slicerSchedule||"35 */12 * * *");ee(fe=>({...fe,scheduleMode:"template",selectedTemplateId:(L==null?void 0:L.id)??"always-on",form:{...fe.form,scheduleBundleId:(L==null?void 0:L.id)??null},isDirty:!0}))},Me=()=>{ee(L=>({...L,scheduleMode:"custom",selectedTemplateId:"",form:{...L.form,scheduleBundleId:null},isDirty:!0}))},qe=L=>{ee(fe=>({...fe,selectedTemplateId:L.id,scheduleMode:"template",form:{...fe.form,cronSchedule:L.schedules.executor,reviewerSchedule:L.schedules.reviewer,scheduleBundleId:L.id,qa:{...fe.form.qa,schedule:L.schedules.qa},audit:{...fe.form.audit,schedule:L.schedules.audit},roadmapScanner:{...fe.form.roadmapScanner,slicerSchedule:L.schedules.slicer}},isDirty:!0}))},_=async()=>{var L,fe;if(R){b(!0);try{await al({cronSchedule:G.form.cronSchedule,reviewerSchedule:G.form.reviewerSchedule,scheduleBundleId:G.scheduleMode==="template"?G.form.scheduleBundleId:null,cronScheduleOffset:G.form.cronScheduleOffset,schedulingPriority:G.form.schedulingPriority,qa:{...R.qa,schedule:G.form.qa.schedule},audit:{...R.audit,schedule:G.form.audit.schedule},analytics:{...R.analytics,schedule:((L=G.form.analytics)==null?void 0:L.schedule)||((fe=R.analytics)==null?void 0:fe.schedule)||"0 6 * * 1"},roadmapScanner:{...R.roadmapScanner,slicerSchedule:G.form.roadmapScanner.slicerSchedule||"35 */12 * * *"},queue:{...R.queue,enabled:G.form.globalQueueEnabled??!0},executorEnabled:R.executorEnabled,reviewerEnabled:R.reviewerEnabled});let ve="";try{await lu()}catch(xe){ve=ce(xe,"Failed to reinstall cron schedules")}ee(xe=>({...xe,isDirty:!1})),F(),l(ve?{title:"Schedules Saved (Cron Reinstall Failed)",message:ve,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(ve){l({title:"Save Failed",message:ce(ve,"Failed to save schedules"),type:"error"})}finally{b(!1)}}},re=L=>{if(!L)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const fe=new Date(L),ve=Q2(fe);return s.jsxs("div",{className:"flex items-center space-x-2",children:[ve&&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:Z2(fe)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",P2(fe),")"]})]})]})},ge=L=>{if(!L||L.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const fe=[];return L.balancedDelayMinutes>0&&fe.push(`auto +${L.balancedDelayMinutes}m`),L.manualDelayMinutes>0&&fe.push(`manual +${L.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:[" ",fe.join(" - ")]})]})};if(te||U)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(I||!le||!R)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{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:(I==null?void 0:I.message)||"Unknown error"}),s.jsx(st,{onClick:()=>{J(),ne()},children:"Retry"})]});const pe=le.paused,De=pe?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",Ee=pe?"Paused":"Active",Ue=nu(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((Na=R.qa)==null?void 0:Na.schedule)||"45 2,14 * * *",((Qa=R.audit)==null?void 0:Qa.schedule)||"50 3 * * 1",((Ia=R.roadmapScanner)==null?void 0:Ia.slicerSchedule)||"35 */12 * * *"),ke=(L,fe,ve)=>!Ue||L==="analytics"||!Ar(Ue.schedules[L],fe)?wg(ve):`${Ue.label} - ${Ue.hints[L]}`,Ke=[{id:"executor",name:"Executor",description:"Creates implementation PRs from PRDs",icon:s.jsx(Zc,{className:"h-4 w-4"}),enabled:(R==null?void 0:R.executorEnabled)!==!1,schedule:le.executor.schedule,nextRun:le.executor.nextRun,delayInfo:le.executor},{id:"reviewer",name:"Reviewer",description:"Reviews PRs and manages merge readiness",icon:s.jsx(Jc,{className:"h-4 w-4"}),enabled:(R==null?void 0:R.reviewerEnabled)??!1,schedule:le.reviewer.schedule,nextRun:le.reviewer.nextRun,delayInfo:le.reviewer},{id:"qa",name:"QA",description:"Generates and runs quality checks on PRs",icon:s.jsx(P1,{className:"h-4 w-4"}),enabled:((ua=R==null?void 0:R.qa)==null?void 0:ua.enabled)??!1,schedule:(ca=le.qa)==null?void 0:ca.schedule,nextRun:(Wa=le.qa)==null?void 0:Wa.nextRun,delayInfo:le.qa},{id:"audit",name:"Auditor",description:"Runs automated audit reports",icon:s.jsx(gg,{className:"h-4 w-4"}),enabled:((hn=R==null?void 0:R.audit)==null?void 0:hn.enabled)??!1,schedule:(la=le.audit)==null?void 0:la.schedule,nextRun:(ka=le.audit)==null?void 0:ka.nextRun,delayInfo:le.audit},{id:"planner",name:"Planner",description:"Creates PRDs from audit findings and pending roadmap items",icon:s.jsx(gg,{className:"h-4 w-4"}),enabled:((mn=R==null?void 0:R.roadmapScanner)==null?void 0:mn.enabled)??!1,schedule:((gn=le.planner)==null?void 0:gn.schedule)||((rl=R.roadmapScanner)==null?void 0:rl.slicerSchedule)||"35 */12 * * *",nextRun:(il=le.planner)==null?void 0:il.nextRun,delayInfo:le.planner},{id:"analytics",name:"Analytics",description:"Fetches Amplitude data, analyzes with AI, and creates board issues",icon:s.jsx(Ib,{className:"h-4 w-4"}),enabled:((At=R==null?void 0:R.analytics)==null?void 0:At.enabled)??!1,schedule:((Xa=le.analytics)==null?void 0:Xa.schedule)||((On=R.analytics)==null?void 0:On.schedule)||"0 6 * * 1",nextRun:(Dn=le.analytics)==null?void 0:Dn.nextRun,delayInfo:le.analytics}],Ft=[{id:"overview",label:"Overview",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Je,{className:`p-6 border-2 ${De}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Zc,{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:Ee}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(st,{variant:pe?"primary":"outline",size:"lg",onClick:ye,loading:f,children:pe?s.jsxs(s.Fragment,{children:[s.jsx(zr,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(Dy,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs(Je,{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:Ke.map(L=>{var fe,ve,xe,et,Ge,dt,We,gt;return s.jsxs("div",{className:`p-4 rounded-lg border ${L.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:[L.icon,s.jsx("h4",{className:"text-base font-semibold text-slate-200",children:L.name})]}),s.jsx(wa,{checked:L.enabled,disabled:y!==null,"aria-label":`Toggle ${L.name.toLowerCase()} automation`,onChange:yn=>me(L.id,yn)})]}),L.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:ke(L.id==="planner"?"slicer":L.id,L.id==="qa"?((fe=R==null?void 0:R.qa)==null?void 0:fe.schedule)||"":L.id==="audit"?((ve=R==null?void 0:R.audit)==null?void 0:ve.schedule)||"":L.id==="planner"?((xe=R==null?void 0:R.roadmapScanner)==null?void 0:xe.slicerSchedule)||"35 */12 * * *":L.id==="analytics"?((et=R==null?void 0:R.analytics)==null?void 0:et.schedule)||"0 6 * * 1":L.schedule,L.id==="qa"?((Ge=R==null?void 0:R.qa)==null?void 0:Ge.schedule)||"":L.id==="audit"?((dt=R==null?void 0:R.audit)==null?void 0:dt.schedule)||"":L.id==="planner"?((We=R==null?void 0:R.roadmapScanner)==null?void 0:We.slicerSchedule)||"35 */12 * * *":L.id==="analytics"?((gt=R==null?void 0:R.analytics)==null?void 0:gt.schedule)||"0 6 * * 1":L.schedule)})]}),ge(L.delayInfo),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Next Run"}),re(L.nextRun)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${L.enabled?"text-green-400":"text-amber-400"}`,children:[s.jsx(Ef,{className:"h-4 w-4"}),s.jsx("span",{children:L.enabled?"Active":"Disabled"})]}),s.jsxs("button",{disabled:E!==null,onClick:()=>B(L.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:[E===L.id?s.jsx("div",{className:"h-3 w-3 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(zr,{className:"h-3 w-3 fill-current"}),"Run now"]})]})]}):s.jsxs("div",{className:"text-slate-500 text-sm",children:[L.name," is disabled."]})]},L.id)})})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs("div",{className:"space-y-6",children:[s.jsx(bx,{configs:D,currentProjectId:u??void 0,onEditJob:(L,fe)=>{},queueStatus:M,queueAnalytics:X}),s.jsx(Sx,{form:G.form,scheduleMode:G.scheduleMode,selectedTemplateId:G.selectedTemplateId,onFieldChange:ue,onSwitchToTemplate:se,onSwitchToCustom:Me,onApplyTemplate:qe}),s.jsxs("div",{className:"flex justify-end pt-4",children:[s.jsx(st,{variant:"ghost",onClick:()=>{var L,fe,ve,xe,et,Ge;if(R){const dt=nu(R.scheduleBundleId,R.cronSchedule,R.reviewerSchedule,((L=R.qa)==null?void 0:L.schedule)||"45 2,14 * * *",((fe=R.audit)==null?void 0:fe.schedule)||"50 3 * * 1",((ve=R.roadmapScanner)==null?void 0:ve.slicerSchedule)||"35 */12 * * *");ee({form:{cronSchedule:R.cronSchedule||"5 */3 * * *",reviewerSchedule:R.reviewerSchedule||"25 */6 * * *",qa:R.qa||{schedule:"45 2,14 * * *",enabled:!0},audit:R.audit||{schedule:"50 3 * * 1",enabled:!0},analytics:R.analytics||{schedule:"0 6 * * 1",enabled:!1},roadmapScanner:{enabled:((xe=R.roadmapScanner)==null?void 0:xe.enabled)??!0,slicerSchedule:((et=R.roadmapScanner)==null?void 0:et.slicerSchedule)||"35 */12 * * *"},scheduleBundleId:R.scheduleBundleId??null,schedulingPriority:R.schedulingPriority??3,cronScheduleOffset:R.cronScheduleOffset??0,globalQueueEnabled:((Ge=R.queue)==null?void 0:Ge.enabled)??!0},scheduleMode:dt?"template":"custom",selectedTemplateId:(dt==null?void 0:dt.id)??"",isDirty:!1})}},disabled:!G.isDirty,children:"Reset"}),s.jsxs(st,{onClick:_,loading:N,disabled:!G.isDirty,children:[s.jsx(Ef,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]})},{id:"crontab",label:"Crontab",content:s.jsxs(Je,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Yf,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),le.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:le.entries.map((L,fe)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:L},fe))})]})}];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"}),Ue&&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:Ue.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",le.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(Zy,{tabs:Ft,activeTab:o,onChange:m})]})};function Wg(l){return l.type==="telegram"?`telegram:${l.botToken}:${l.chatId}`:`${l.type}:${l.url}`}const Cw=[{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"}],Ow=(l,u)=>l.includes(u)?l.filter(d=>d!==u):[...l,u],Xg=({webhook:l,onChange:u,onSave:d,onCancel:o,isNew:m})=>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(ia,{label:"Type",value:l.type,onChange:f=>{const v=f;u(v==="telegram"?{type:v,botToken:"",chatId:"",events:l.events}:{type:v,url:"",events:l.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),l.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(Ye,{label:"Bot Token",type:"password",value:l.botToken||"",onChange:f=>u({...l,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Ye,{label:"Chat ID",value:l.chatId||"",onChange:f=>u({...l,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Ye,{label:"Webhook URL",type:"password",value:l.url||"",onChange:f=>u({...l,url:f.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:Cw.map(f=>s.jsx("button",{type:"button",onClick:()=>u({...l,events:Ow(l.events,f.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${l.events.includes(f.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:f.label},f.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(st,{variant:"ghost",onClick:o,children:"Cancel"}),s.jsx(st,{onClick:d,disabled:l.events.length===0||(l.type==="telegram"?!l.botToken||!l.chatId:!l.url),children:m?"Add Webhook":"Save Changes"})]})]}),Jg=({notifications:l,onChange:u,globalWebhook:d,onSetGlobal:o,onUnsetGlobal:m})=>{const[f,v]=ze.useState(null),[N,b]=ze.useState(!1),[y,w]=ze.useState({type:"slack",url:"",events:[]}),E=()=>{u({webhooks:[...l.webhooks,y]}),w({type:"slack",url:"",events:[]}),b(!1)},S=(A,M)=>{const Y=[...l.webhooks];Y[A]=M,u({webhooks:Y})},D=A=>{u({webhooks:l.webhooks.filter((M,Y)=>Y!==A)})};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:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((A,M)=>s.jsx("div",{children:f===M?s.jsx(Xg,{webhook:A,onChange:Y=>S(M,Y),onSave:()=>v(null),onCancel:()=>v(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:A.type}),A.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",A.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:A.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:[o!==void 0&&(()=>{const Y=d!=null&&Wg(A)===Wg(d);return s.jsx("button",{type:"button",onClick:()=>Y?m==null?void 0:m():o(A),className:`p-2 transition-colors ${Y?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":Y?"Global channel (active)":"Set as global channel",title:Y?"Global channel (active)":"Set as global channel",children:s.jsx(w1,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>v(M),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${A.type} webhook`,title:`Edit ${A.type} webhook`,children:s.jsx($f,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>D(M),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${A.type} webhook`,title:`Delete ${A.type} webhook`,children:s.jsx(Kc,{className:"h-4 w-4"})})]})]})},M))}),N?s.jsx(Xg,{webhook:y,onChange:w,onSave:E,onCancel:()=>b(!1),isNew:!0}):s.jsxs(st,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(qr,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},Jf=({label:l,value:u,onChange:d,placeholder:o,helpText:m})=>{const[f,v]=ze.useState(""),N=()=>{f.trim()&&!u.includes(f.trim())&&(d([...u,f.trim()]),v(""))},b=w=>{d(u.filter(E=>E!==w))},y=w=>{w.key==="Enter"&&(w.preventDefault(),N())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:l}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:u.map(w=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[w,s.jsx("button",{type:"button",onClick:()=>b(w),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${w}`,title:`Remove ${w}`,children:s.jsx(Vr,{className:"h-3 w-3"})})]},w))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:w=>v(w.target.value),onKeyDown:y,placeholder:o,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(st,{onClick:N,disabled:!f.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(qr,{className:"h-4 w-4"})})]}),m&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:m})]})},Dw=({isOpen:l,onClose:u,title:d,children:o})=>(V.useEffect(()=>{const m=f=>{f.key==="Escape"&&u()};return l&&(document.addEventListener("keydown",m),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",m),document.body.style.overflow="unset"}},[l,u]),l?Db.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:u,"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:u,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(Vr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:o})]})]}),document.body):null),Rw=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),Aw=({value:l,isSensitive:u})=>{const[d,o]=ze.useState(!1);return u?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:d?l:"***********"}),s.jsx("button",{type:"button",onClick:()=>o(!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(g1,{className:"h-4 w-4"}):s.jsx(x1,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},wx=({envVars:l,onChange:u,compact:d=!1})=>{const[o,m]=ze.useState(""),[f,v]=ze.useState(""),[N,b]=ze.useState(null),[y,w]=ze.useState(""),E=()=>{if(o.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(o)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}u({...l,[o]:f}),m(""),v("")}},S=X=>{const Q={...l};delete Q[X],u(Q)},D=X=>{b(X),w(l[X]??"")},A=()=>{N&&(u({...l,[N]:y}),b(null),w(""))},M=()=>{b(null),w("")},Y=Object.entries(l);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(([X,Q])=>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:X}),N===X?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:y,onChange:G=>w(G.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:A,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${X} value`,title:`Save ${X} value`,children:s.jsx(Ef,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:M,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${X}`,title:`Cancel editing ${X}`,children:s.jsx(Vr,{className:"h-4 w-4"})})]}):s.jsx(Aw,{value:Q,isSensitive:Rw(X)})]}),N!==X&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>D(X),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${X}`,title:`Edit ${X}`,children:s.jsx($f,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>S(X),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${X}`,title:`Delete ${X}`,children:s.jsx(Kc,{className:"h-4 w-4"})})]})]},X))}),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:o,onChange:X=>m(X.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:f,onChange:X=>v(X.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(st,{onClick:E,disabled:!o.trim(),size:d?"sm":"md",children:[s.jsx(qr,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function _w(l,u){var d;return!!(l!=null&&l.startsWith("glm-")||(d=u==null?void 0:u.model)!=null&&d.startsWith("glm-"))}function kw(l,u){var d,o;return _w(l,u)?!((o=(d=u==null?void 0:u.envVars)==null?void 0:d.ANTHROPIC_API_KEY)!=null&&o.trim()):!1}const Kg={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:""}},zw=({isOpen:l,onClose:u,onSave:d,presetId:o,preset:m,isBuiltIn:f,existingIds:v})=>{const[N,b]=ze.useState(""),[y,w]=ze.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[E,S]=ze.useState(!1),[D,A]=ze.useState("custom"),[M,Y]=ze.useState(null),X=kw(o??N,y);ze.useEffect(()=>{l&&(o&&m?(b(o),w({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??{}}),o==="claude"||m.command==="claude"?A("claude"):o==="codex"||m.command==="codex"?A("codex"):A("custom")):(b(""),w({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),A("custom")),Y(null),S(!!(m!=null&&m.envVars&&Object.keys(m.envVars).length>0)))},[l,o,m]);const Q=te=>{if(A(te),te!=="custom"&&Kg[te]){const I=Kg[te];w(J=>({...J,...I,envVars:J.envVars})),!o&&!N&&b(te)}},G=(te,I)=>{w(J=>({...J,[te]:I})),Y(null)},ee=()=>{if(!y.name.trim())return Y("Name is required"),!1;if(!y.command.trim())return Y("Command is required"),!1;if(!o){if(!N.trim())return Y("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(N))return Y("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(v.includes(N))return Y("A preset with this ID already exists"),!1}return!0},le=()=>{var I,J,R,U,ne,F;if(!ee())return;const te={name:y.name.trim(),command:y.command.trim()};(I=y.subcommand)!=null&&I.trim()&&(te.subcommand=y.subcommand.trim()),(J=y.promptFlag)!=null&&J.trim()&&(te.promptFlag=y.promptFlag.trim()),(R=y.autoApproveFlag)!=null&&R.trim()&&(te.autoApproveFlag=y.autoApproveFlag.trim()),(U=y.workdirFlag)!=null&&U.trim()&&(te.workdirFlag=y.workdirFlag.trim()),(ne=y.modelFlag)!=null&&ne.trim()&&(te.modelFlag=y.modelFlag.trim()),(F=y.model)!=null&&F.trim()&&(te.model=y.model.trim()),y.envVars&&Object.keys(y.envVars).length>0&&(te.envVars=y.envVars),d(o||N,te),u()};return s.jsx(Dw,{isOpen:l,onClose:u,title:o?`Edit Preset: ${m==null?void 0:m.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[M&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:M}),X&&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(ru,{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."})]})]})}),!f&&s.jsx("div",{children:s.jsx(ia,{label:"Template",value:D,onChange:Q,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"})}),!o&&s.jsx(Ye,{label:"Preset ID",value:N,onChange:te=>b(te.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(Ye,{label:"Display Name",value:y.name,onChange:te=>G("name",te.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Ye,{label:"Command",value:y.command,onChange:te=>G("command",te.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(Ye,{label:"Model",value:y.model??"",onChange:te=>G("model",te.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Ye,{label:"Model Flag",value:y.modelFlag??"",onChange:te=>G("modelFlag",te.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:()=>S(!E),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[E?s.jsx(n1,{className:"h-4 w-4"}):s.jsx(Ty,{className:"h-4 w-4"}),"Advanced Options"]}),E&&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(Ye,{label:"Subcommand",value:y.subcommand??"",onChange:te=>G("subcommand",te.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Ye,{label:"Prompt Flag",value:y.promptFlag??"",onChange:te=>G("promptFlag",te.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(Ye,{label:"Auto-Approve Flag",value:y.autoApproveFlag??"",onChange:te=>G("autoApproveFlag",te.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Ye,{label:"Workdir Flag",value:y.workdirFlag??"",onChange:te=>G("workdirFlag",te.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(wx,{envVars:y.envVars??{},onChange:te=>G("envVars",te),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(st,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(st,{onClick:le,children:o?"Save Changes":"Add Preset"})]})]})})},Uw=({form:l,updateField:u,projectName:d,doctorChecks:o,doctorLoading:m})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(Je,{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(Ye,{label:"Project Name",value:d,disabled:!0}),s.jsx(Ye,{label:"Default Branch",value:l.defaultBranch,onChange:f=>u("defaultBranch",f.target.value)}),s.jsx(Ye,{label:"PRD Directory",value:l.prdDir,onChange:f=>u("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Ye,{label:"Branch Prefix",value:l.branchPrefix,onChange:f=>u("branchPrefix",f.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(wa,{label:"Enable PRD Executor",checked:l.executorEnabled,onChange:f=>u("executorEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(wa,{label:"Enable Automated Reviews",checked:l.reviewerEnabled,onChange:f=>u("reviewerEnabled",f)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(wa,{label:"Auto-merge approved PRs",checked:l.autoMerge,onChange:f=>u("autoMerge",f)})}),l.autoMerge&&s.jsx(ia,{label:"Merge Method",value:l.autoMergeMethod,onChange:f=>u("autoMergeMethod",f),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(Jf,{label:"Branch Patterns",value:l.branchPatterns,onChange:f=>u("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})}),s.jsxs(Je,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(Ey,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),m?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):o.map((f,v)=>{const N=f.status==="pass",b=f.status==="warn",y=N?"bg-green-500/10 text-green-400 border-green-500/20":b?"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:f.name}),s.jsx("p",{className:"text-xs text-slate-500",children:f.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${y}`,children:f.status.toUpperCase()})]},`${f.name}-${v}`)})]})]}),ey=({presetId:l,preset:u,isBuiltIn:d,onEdit:o,onDelete:m,onReset:f})=>{var y,w,E;const v=u.envVars?Object.keys(u.envVars).length:0,b=(l.startsWith("glm-")||((y=u.model)==null?void 0:y.startsWith("glm-")))&&!((E=(w=u.envVars)==null?void 0:w.ANTHROPIC_API_KEY)!=null&&E.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:u.name}),d&&s.jsx(kr,{variant:"info",className:"text-[10px]",children:"Built-in"}),b&&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(ru,{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:o,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${u.name} preset`,title:"Edit preset",children:s.jsx($f,{className:"h-4 w-4"})}),d?f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${u.name} to defaults`,title:"Reset to defaults",children:s.jsx(Ry,{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 ${u.name} preset`,title:"Delete preset",children:s.jsx(Kc,{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:[u.command,u.subcommand&&` ${u.subcommand}`]})]}),u.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(kr,{variant:"neutral",className:"text-[10px] font-mono",children:u.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: ",l]}),v>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[v," env var",v!==1?"s":""]})]})]})},ty=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Lw=({form:l,updateField:u,jobProvidersChangedRef:d,getAllPresets:o,getPresetOptions:m,handleEditPreset:f,handleDeletePreset:v,handleResetPreset:N,handleAddPreset:b})=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Je,{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(st,{onClick:b,children:[s.jsx(qr,{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:[ty.map(y=>{const E=o()[y];return E?s.jsx(ey,{presetId:y,preset:E,isBuiltIn:!0,onEdit:()=>f(y),onReset:()=>N(y)},y):null}),Object.entries(l.providerPresets).filter(([y])=>!ty.includes(y)).map(([y,w])=>s.jsx(ey,{presetId:y,preset:w,isBuiltIn:!1,onEdit:()=>f(y),onDelete:()=>v(y)},y))]})]}),s.jsxs(Je,{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(ia,{value:l.provider,onChange:y=>u("provider",y),options:m(l.providerPresets)})})]}),[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"},{key:"analytics",label:"Analytics"}].map(({key:y,label:w})=>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:w}),s.jsx("div",{className:"w-64",children:s.jsx(ia,{value:l.jobProviders[y]??"",onChange:E=>{const S={...l.jobProviders};E===""?delete S[y]:S[y]=E,d.current=!0,u("jobProviders",S)},options:[{label:"Use Global (default)",value:""},...m(l.providerPresets)]})})]},y))]})]}),s.jsxs(Je,{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(ia,{label:"Primary Fallback Preset",value:l.primaryFallbackPreset,onChange:y=>u("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(o()).map(([y,w])=>({label:w.name,value:y}))],helperText:"Preset to use as the primary rate-limit fallback"}),s.jsx(ia,{label:"Secondary Fallback Preset",value:l.secondaryFallbackPreset,onChange:y=>u("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(o()).map(([y,w])=>({label:w.name,value:y}))],helperText:"Used only if the primary fallback preset is also rate-limited"})]})]}),s.jsxs(Je,{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(wx,{envVars:l.providerEnv,onChange:y=>u("providerEnv",y)})]}),s.jsxs(Je,{className:"p-6 space-y-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Performance"}),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:l.minReviewScore,onChange:y=>u("minReviewScore",Number(y.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:l.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(Ye,{label:"Max Runtime (Executor)",type:"number",value:String(l.maxRuntime),onChange:y=>u("maxRuntime",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ye,{label:"Max Runtime (Reviewer)",type:"number",value:String(l.reviewerMaxRuntime),onChange:y=>u("reviewerMaxRuntime",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Ye,{label:"Max Log Size",type:"number",value:String(l.maxLogSize),onChange:y=>u("maxLogSize",Number(y.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Je,{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(Ye,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(l.reviewerMaxRetries),onChange:y=>{const w=Math.min(10,Math.max(0,Number(y.target.value||0)));u("reviewerMaxRetries",w)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(Ye,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(l.reviewerRetryDelay),onChange:y=>{const w=Math.min(300,Math.max(0,Number(y.target.value||0)));u("reviewerRetryDelay",w)},helperText:"Wait time between retry attempts to let CI settle."}),s.jsx(Ye,{label:"Max PRs Per Run",type:"number",min:"0",max:"100",value:String(l.reviewerMaxPrsPerRun),onChange:y=>{const w=Math.min(100,Math.max(0,Number(y.target.value||0)));u("reviewerMaxPrsPerRun",w)},helperText:"Hard cap on how many PRs the reviewer processes per run. 0 = unlimited."})]})]})]}),Hw=({form:l,updateField:u,handleRoadmapToggle:d})=>{var o,m;return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{id:"job-section-qa",children:s.jsxs(Je,{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(wa,{checked:l.qa.enabled,onChange:f=>u("qa",{...l.qa,enabled:f})})]}),l.qa.enabled&&s.jsxs("div",{className:"space-y-6 pt-4 border-t border-slate-800",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(Mn,{label:"QA Schedule",value:l.qa.schedule,onChange:f=>u("qa",{...l.qa,schedule:f})}),s.jsx(Ye,{label:"Max Runtime",type:"number",value:String(l.qa.maxRuntime),onChange:f=>u("qa",{...l.qa,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(ia,{label:"Artifacts",value:l.qa.artifacts,onChange:f=>u("qa",{...l.qa,artifacts:f}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(Ye,{label:"Skip Label",value:l.qa.skipLabel,onChange:f=>u("qa",{...l.qa,skipLabel:f.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsx(Jf,{label:"QA Branch Patterns",value:l.qa.branchPatterns,onChange:f=>u("qa",{...l.qa,branchPatterns:f}),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(wa,{checked:l.qa.autoInstallPlaywright,onChange:f=>u("qa",{...l.qa,autoInstallPlaywright:f})})]})]})]})}),s.jsx("div",{id:"job-section-audit",children:s.jsxs(Je,{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(wa,{checked:l.audit.enabled,onChange:f=>u("audit",{...l.audit,enabled:f})})]}),l.audit.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(Mn,{label:"Audit Schedule",value:l.audit.schedule,onChange:f=>u("audit",{...l.audit,schedule:f})}),s.jsx(Ye,{label:"Max Runtime",type:"number",value:String(l.audit.maxRuntime),onChange:f=>u("audit",{...l.audit,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})]})]})}),s.jsx("div",{id:"job-section-analytics",children:s.jsxs(Je,{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(wa,{checked:l.analytics.enabled,onChange:f=>u("analytics",{...l.analytics,enabled:f})})]}),l.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(Ye,{label:"Amplitude API Key",value:((o=l.providerEnv)==null?void 0:o.AMPLITUDE_API_KEY)??"",onChange:f=>u("providerEnv",{...l.providerEnv,AMPLITUDE_API_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude project API key"}),s.jsx(Ye,{label:"Amplitude Secret Key",type:"password",value:((m=l.providerEnv)==null?void 0:m.AMPLITUDE_SECRET_KEY)??"",onChange:f=>u("providerEnv",{...l.providerEnv,AMPLITUDE_SECRET_KEY:f.target.value}),placeholder:"Required",helperText:"Your Amplitude secret key"}),s.jsx(Mn,{label:"Analytics Schedule",value:l.analytics.schedule,onChange:f=>u("analytics",{...l.analytics,schedule:f})}),s.jsx(Ye,{label:"Max Runtime",type:"number",value:String(l.analytics.maxRuntime),onChange:f=>u("analytics",{...l.analytics,maxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for analytics job (default: 900 seconds)"}),s.jsx(Ye,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(l.analytics.lookbackDays),onChange:f=>u("analytics",{...l.analytics,lookbackDays:Math.max(1,Math.min(90,Number(f.target.value||7)))}),helperText:"Number of days to look back in Amplitude (1-90)"}),s.jsx(ia,{label:"Target Column",value:l.analytics.targetColumn,onChange:f=>u("analytics",{...l.analytics,targetColumn:f}),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:l.analytics.analysisPrompt??"",onChange:f=>u("analytics",{...l.analytics,analysisPrompt:f.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."})]})]})]})}),s.jsx("div",{id:"job-section-slicer",children:s.jsxs(Je,{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(wa,{checked:l.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:d})]}),l.roadmapScanner.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(Ye,{label:"Roadmap File Path",value:l.roadmapScanner.roadmapPath,onChange:f=>u("roadmapScanner",{...l.roadmapScanner,roadmapPath:f.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Mn,{label:"Planner Schedule",value:l.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:f=>u("roadmapScanner",{...l.roadmapScanner,slicerSchedule:f})}),s.jsx(Ye,{label:"Planner Max Runtime",type:"number",value:String(l.roadmapScanner.slicerMaxRuntime||""),onChange:f=>u("roadmapScanner",{...l.roadmapScanner,slicerMaxRuntime:Number(f.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(ia,{label:"Planner Priority Mode",value:l.roadmapScanner.priorityMode||"roadmap-first",onChange:f=>u("roadmapScanner",{...l.roadmapScanner,priorityMode:f==="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(ia,{label:"Planner Issue Column",value:l.roadmapScanner.issueColumn||"Draft",onChange:f=>u("roadmapScanner",{...l.roadmapScanner,issueColumn:f==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})})]})},ay=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],qw=["executor","reviewer","qa","audit","slicer","analytics"],wf=l=>{var u,d,o,m,f,v,N;return{provider:l.provider,providerLabel:l.providerLabel??"",providerPresets:l.providerPresets??{},defaultBranch:l.defaultBranch,prdDir:l.prdDir||"docs/prds",branchPrefix:l.branchPrefix,branchPatterns:l.branchPatterns||[],executorEnabled:l.executorEnabled??!0,reviewerEnabled:l.reviewerEnabled,minReviewScore:l.minReviewScore,maxRuntime:l.maxRuntime,reviewerMaxRuntime:l.reviewerMaxRuntime,maxLogSize:l.maxLogSize,cronSchedule:l.cronSchedule||"5 */3 * * *",reviewerSchedule:l.reviewerSchedule||"25 */6 * * *",scheduleBundleId:l.scheduleBundleId??null,cronScheduleOffset:l.cronScheduleOffset??0,schedulingPriority:l.schedulingPriority??3,maxRetries:l.maxRetries??3,reviewerMaxRetries:l.reviewerMaxRetries??2,reviewerRetryDelay:l.reviewerRetryDelay??30,reviewerMaxPrsPerRun:l.reviewerMaxPrsPerRun??0,providerEnv:l.providerEnv||{},notifications:l.notifications||{webhooks:[]},prdPriority:l.prdPriority||[],roadmapScanner:{enabled:((u=l.roadmapScanner)==null?void 0:u.enabled)??!0,roadmapPath:((d=l.roadmapScanner)==null?void 0:d.roadmapPath)??"ROADMAP.md",autoScanInterval:((o=l.roadmapScanner)==null?void 0:o.autoScanInterval)??300,slicerSchedule:((m=l.roadmapScanner)==null?void 0:m.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((f=l.roadmapScanner)==null?void 0:f.slicerMaxRuntime)??600,priorityMode:((v=l.roadmapScanner)==null?void 0:v.priorityMode)??"roadmap-first",issueColumn:((N=l.roadmapScanner)==null?void 0:N.issueColumn)??"Draft"},templatesDir:l.templatesDir||".night-watch/templates",boardProvider:l.boardProvider||{enabled:!0,provider:"github"},jobProviders:l.jobProviders||{},autoMerge:l.autoMerge??!1,autoMergeMethod:l.autoMergeMethod??"squash",fallbackOnRateLimit:l.fallbackOnRateLimit??!0,primaryFallbackModel:l.primaryFallbackModel??l.claudeModel??"sonnet",secondaryFallbackModel:l.secondaryFallbackModel??l.primaryFallbackModel??l.claudeModel??"sonnet",primaryFallbackPreset:l.primaryFallbackPreset??"",secondaryFallbackPreset:l.secondaryFallbackPreset??"",claudeModel:l.primaryFallbackModel??l.claudeModel??"sonnet",qa:l.qa||{enabled:!0,schedule:"45 2,14 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},audit:l.audit||{enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800},analytics:l.analytics||{enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},queue:l.queue||{enabled:!0,maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10}}}},ny=l=>{const u=nu(l.scheduleBundleId,l.cronSchedule,l.reviewerSchedule,l.qa.schedule,l.audit.schedule,l.roadmapScanner.slicerSchedule??"35 */12 * * *");return u?{mode:"template",selectedTemplateId:u.id}:{mode:"custom",selectedTemplateId:""}},Vw=()=>{const{addToast:l,projectName:u,selectedProjectId:d,globalModeLoading:o,isGlobalMode:m,removeProjectFromList:f}=na(),[v,N]=ze.useState(!1),[b,y]=ze.useState(!1),[w,E]=ze.useState(!1),[S,D]=ze.useState(null),[A,M]=ze.useState([]),[Y,X]=ze.useState(void 0),Q=ze.useRef(!1),G=ze.useRef(!1),[ee,le]=ze.useState("template"),[te,I]=ze.useState("always-on"),[J,R]=ze.useState("general"),[U,ne]=ze.useState(!1),[F,ce]=ze.useState(null),[ye,me]=ze.useState(null),[B,ue]=ze.useState(null),{data:se,loading:Me,error:qe,refetch:_}=fn(Pf,[d],{enabled:!o}),{data:re,loading:ge,refetch:pe}=fn(l2,[d],{enabled:!o}),De=re??[];ze.useEffect(()=>{ky().then(M).catch(console.error),h2().then(L=>X(L.webhook)).catch(()=>{})},[d]),ze.useEffect(()=>{const L=new URLSearchParams(location.search),fe=L.get("tab"),ve=L.get("mode");fe&&R({providers:"ai-runtime",runtime:"ai-runtime",roadmap:"jobs",qa:"jobs",audit:"jobs",analytics:"jobs",board:"integrations",notifications:"integrations"}[fe]??fe),ve==="custom"?le("custom"):ve==="template"&&le("template");const xe=L.get("jobType");xe&&setTimeout(()=>{Ue("current",xe)},300)},[location.search,se]);const Ee=ze.useCallback(L=>{const fe=ny(L);le(fe.mode),I(fe.selectedTemplateId)},[]);ze.useEffect(()=>{if(se)if(Q.current)Q.current=!1;else{const L=wf(se);D(L),Ee(L)}},[se,Ee]),ze.useEffect(()=>{S&&G.current&&(G.current=!1,Qa())},[S==null?void 0:S.jobProviders]);const Ue=(L,fe)=>{if(L===u||L==="current"){if(["qa","audit","slicer","analytics"].includes(fe)){R("jobs"),setTimeout(()=>{const xe=document.getElementById(`job-section-${fe}`);xe&&(xe.scrollIntoView({behavior:"smooth",block:"center"}),xe.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>xe.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50);return}ee!=="custom"&&Ft(),R("schedules"),setTimeout(()=>{const xe={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer"},et=document.getElementById(xe[fe]||"");et&&(et.scrollIntoView({behavior:"smooth",block:"center"}),et.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>et.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50)}else l({title:"Project Switch Required",message:`To edit ${L}, please switch to that project in the sidebar.`,type:"info"})},ke=(L,fe)=>{D(ve=>ve&&{...ve,[L]:fe})},Ke=()=>{if(le("template"),!S)return;const L=ny(S);L.mode==="template"&&(I(L.selectedTemplateId),ke("scheduleBundleId",L.selectedTemplateId))},Ft=()=>{le("custom"),ke("scheduleBundleId",null),I("")},Na=L=>{I(L.id),D(fe=>fe&&{...fe,cronSchedule:L.schedules.executor,reviewerSchedule:L.schedules.reviewer,scheduleBundleId:L.id,qa:{...fe.qa,schedule:L.schedules.qa},audit:{...fe.audit,schedule:L.schedules.audit},roadmapScanner:{...fe.roadmapScanner,slicerSchedule:L.schedules.slicer},fallbackOnRateLimit:!0})},Qa=async()=>{var ve,xe,et,Ge,dt;if(!S)return;const L=S.cronSchedule!==(se==null?void 0:se.cronSchedule)||S.reviewerSchedule!==(se==null?void 0:se.reviewerSchedule)||S.cronScheduleOffset!==((se==null?void 0:se.cronScheduleOffset)??0)||S.schedulingPriority!==((se==null?void 0:se.schedulingPriority)??3)||S.executorEnabled!==((se==null?void 0:se.executorEnabled)??!0)||S.reviewerEnabled!==((se==null?void 0:se.reviewerEnabled)??!0)||S.queue.enabled!==(((ve=se==null?void 0:se.queue)==null?void 0:ve.enabled)??!0)||S.qa.enabled!==((se==null?void 0:se.qa.enabled)??!0)||S.qa.schedule!==(se==null?void 0:se.qa.schedule)||S.audit.enabled!==((se==null?void 0:se.audit.enabled)??!0)||S.audit.schedule!==(se==null?void 0:se.audit.schedule)||S.analytics.enabled!==(((xe=se==null?void 0:se.analytics)==null?void 0:xe.enabled)??!1)||S.analytics.schedule!==(((et=se==null?void 0:se.analytics)==null?void 0:et.schedule)??"0 6 * * 1")||S.roadmapScanner.enabled!==(((Ge=se==null?void 0:se.roadmapScanner)==null?void 0:Ge.enabled)??!0)||(S.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((dt=se==null?void 0:se.roadmapScanner)==null?void 0:dt.slicerSchedule)||"35 */12 * * *"),fe={};for(const We of qw){const gt=S.jobProviders[We];typeof gt=="string"&>.trim().length>0?fe[We]=gt:se!=null&&se.jobProviders[We]&&(fe[We]=null)}N(!0);try{const We=await al({provider:S.provider,providerLabel:S.providerLabel.trim(),providerPresets:Object.keys(S.providerPresets).length>0?S.providerPresets:void 0,defaultBranch:S.defaultBranch,prdDir:S.prdDir,branchPrefix:S.branchPrefix,branchPatterns:S.branchPatterns,executorEnabled:S.executorEnabled,reviewerEnabled:S.reviewerEnabled,minReviewScore:S.minReviewScore,maxRuntime:S.maxRuntime,reviewerMaxRuntime:S.reviewerMaxRuntime,maxLogSize:S.maxLogSize,cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,scheduleBundleId:ee==="template"?S.scheduleBundleId:null,cronScheduleOffset:S.cronScheduleOffset,schedulingPriority:S.schedulingPriority,maxRetries:S.maxRetries,reviewerMaxRetries:S.reviewerMaxRetries,reviewerRetryDelay:S.reviewerRetryDelay,reviewerMaxPrsPerRun:S.reviewerMaxPrsPerRun,providerEnv:S.providerEnv,notifications:S.notifications,prdPriority:S.prdPriority,roadmapScanner:S.roadmapScanner,templatesDir:S.templatesDir,boardProvider:S.boardProvider,jobProviders:fe,autoMerge:S.autoMerge,autoMergeMethod:S.autoMergeMethod,fallbackOnRateLimit:S.fallbackOnRateLimit,primaryFallbackModel:S.primaryFallbackModel,secondaryFallbackModel:S.secondaryFallbackModel,primaryFallbackPreset:S.primaryFallbackPreset||void 0,secondaryFallbackPreset:S.secondaryFallbackPreset||void 0,claudeModel:S.primaryFallbackModel,qa:S.qa,audit:S.audit,analytics:S.analytics,queue:S.queue}),gt=wf(We);D(gt),Ee(gt);let yn="";if(L)try{await lu()}catch(qs){yn=qs instanceof Error?qs.message:"failed to reinstall cron schedules"}l(yn?{title:"Settings Saved (Cron Reinstall Failed)",message:yn,type:"warning"}:{title:"Settings Saved",message:L?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),Q.current=!0,_(),pe()}catch(We){l({title:"Save Failed",message:We instanceof Error?We.message:"Failed to save configuration",type:"error"})}finally{N(!1)}},Ia=()=>{if(se){const L=wf(se);D(L),Ee(L),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},ua=async L=>{if(!(Y!=null&&!window.confirm("Replace existing global channel?")))try{const fe=await pg({webhook:L});X(fe.webhook)}catch(fe){l({title:"Failed to set global channel",message:fe instanceof Error?fe.message:"Unknown error",type:"error"})}},ca=async()=>{try{await pg({webhook:null}),X(null)}catch(L){l({title:"Failed to unset global channel",message:L instanceof Error?L.message:"Unknown error",type:"error"})}},Wa=async L=>{try{const fe=await $y(L);ke("roadmapScanner",fe.roadmapScanner);let ve="";try{await lu()}catch(xe){ve=xe instanceof Error?xe.message:"Failed to reinstall cron schedules"}l(ve?{title:"Planner Saved (Cron Reinstall Failed)",message:ve,type:"warning"}:{title:L?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${L?"enabled":"disabled"}.`,type:"success"})}catch(fe){l({title:"Toggle Failed",message:fe instanceof Error?fe.message:"Failed to toggle roadmap scanner",type:"error"})}},hn=async()=>{if(d){E(!0);try{await a2(d),f(d),y(!1),l({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(L){l({title:"Remove Failed",message:L instanceof Error?L.message:"Failed to remove project",type:"error"})}finally{E(!1)}}},la=()=>({...{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"}}},...S==null?void 0:S.providerPresets}),ka=L=>{const fe=la();return Object.entries(fe).map(([ve,xe])=>({label:xe.name,value:ve}))},mn=(L,fe)=>{const ve=[];fe.provider===L&&ve.push("Global Provider");const xe={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[et,Ge]of Object.entries(fe.jobProviders))Ge===L&&ve.push(xe[et]??et);return ve},gn=()=>{ce(null),me(null),ne(!0)},rl=L=>{const ve=la()[L];ve&&(ce(L),me(ve),ne(!0))},il=async(L,fe)=>{if(!S)return;const ve=!F,xe={...S.providerPresets,[L]:fe};ke("providerPresets",xe);try{await al({providerPresets:{[L]:fe}}),l({title:ve?"Preset Added":"Preset Updated",message:ve?`${fe.name} has been added. You can now assign it to jobs.`:`${fe.name} has been saved.`,type:"success"})}catch(et){l({title:"Save Failed",message:et instanceof Error?et.message:"Failed to save preset",type:"error"}),ke("providerPresets",S.providerPresets)}},At=L=>{var xe,et;if(!S)return;if(ay.includes(L)){l({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const fe=mn(L,S);if(fe.length>0){ue({presetId:L,presetName:((xe=la()[L])==null?void 0:xe.name)??L,references:fe});return}const ve={...S.providerPresets};delete ve[L],ke("providerPresets",ve),l({title:"Preset Deleted",message:`${((et=la()[L])==null?void 0:et.name)??L} has been removed.`,type:"success"})},Xa=L=>{if(!S)return;const fe={...S.providerPresets};delete fe[L],ke("providerPresets",fe),l({title:"Preset Reset",message:`${L} has been reset to built-in defaults.`,type:"success"})},On=()=>{if(!B||!S)return;const{presetId:L}=B,fe={...S.providerPresets};delete fe[L],ke("providerPresets",fe);const ve={...S.jobProviders};for(const xe of Object.keys(ve))ve[xe]===L&&delete ve[xe];ke("jobProviders",ve),S.provider===L&&ke("provider","claude"),ue(null),l({title:"Preset Deleted",message:`${B.presetName} has been removed and all references cleared.`,type:"success"})};if(Me||!S)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(qe)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(sl,{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:qe.message}),s.jsx(st,{onClick:()=>_(),children:"Retry"})]});const Dn=[{id:"general",label:"General",content:s.jsx(Uw,{form:S,updateField:ke,projectName:u,doctorChecks:De,doctorLoading:ge})},{id:"ai-runtime",label:"AI & Runtime",content:s.jsx(Lw,{form:S,updateField:ke,jobProvidersChangedRef:G,getAllPresets:la,getPresetOptions:ka,handleEditPreset:rl,handleDeletePreset:At,handleResetPreset:Xa,handleAddPreset:gn})},{id:"jobs",label:"Jobs",content:s.jsx(Hw,{form:S,updateField:ke,handleRoadmapToggle:Wa})},{id:"schedules",label:"Schedules",content:s.jsx(Sx,{form:{cronSchedule:S.cronSchedule,reviewerSchedule:S.reviewerSchedule,qa:S.qa,audit:S.audit,analytics:S.analytics,roadmapScanner:{enabled:S.roadmapScanner.enabled,slicerSchedule:S.roadmapScanner.slicerSchedule||"35 */12 * * *"},scheduleBundleId:S.scheduleBundleId,schedulingPriority:S.schedulingPriority,cronScheduleOffset:S.cronScheduleOffset,globalQueueEnabled:S.queue.enabled},scheduleMode:ee,selectedTemplateId:te,onFieldChange:(L,fe)=>{L==="globalQueueEnabled"?ke("queue",{...S.queue,enabled:fe}):ke(L,fe)},onSwitchToTemplate:Ke,onSwitchToCustom:Ft,onApplyTemplate:Na,allProjectConfigs:A,currentProjectId:d,onEditJob:Ue})},{id:"notifications",label:"Notifications",content:s.jsxs(Je,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Jg,{notifications:S.notifications,onChange:L=>ke("notifications",L),globalWebhook:Y,onSetGlobal:ua,onUnsetGlobal:ca})]})},{id:"roadmap",label:"Planner",content:s.jsx(Je,{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(wa,{checked:S.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:Wa})]})})},{id:"integrations",label:"Integrations",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Je,{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(wa,{checked:S.boardProvider.enabled,onChange:L=>ke("boardProvider",{...S.boardProvider,enabled:L})})]}),S.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(ia,{label:"Board Provider",value:S.boardProvider.provider,onChange:L=>ke("boardProvider",{...S.boardProvider,provider:L}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),S.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Ye,{label:"Project Number",type:"number",value:String(S.boardProvider.projectNumber||""),onChange:L=>ke("boardProvider",{...S.boardProvider,projectNumber:L.target.value?Number(L.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Ye,{label:"Repository",value:S.boardProvider.repo||"",onChange:L=>ke("boardProvider",{...S.boardProvider,repo:L.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),S.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."})})]})]}),s.jsxs(Je,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(Jg,{notifications:S.notifications,onChange:L=>ke("notifications",L)})]})]})},{id:"advanced",label:"Advanced",content:s.jsxs(Je,{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(Ye,{label:"Templates Directory",value:S.templatesDir,onChange:L=>ke("templatesDir",L.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Ye,{label:"Max Retries",type:"number",min:"1",value:String(S.maxRetries),onChange:L=>{const fe=Math.max(1,Number(L.target.value||1));ke("maxRetries",fe)},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(Jf,{label:"PRD Priority",value:S.prdPriority,onChange:L=>ke("prdPriority",L),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(Zy,{tabs:Dn,activeTab:J,onChange:R}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(st,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:Ia,children:[s.jsx(Ry,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(st,{onClick:Qa,loading:v,children:[s.jsx(q1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),m&&d&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(st,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>y(!0),children:[s.jsx(Kc,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),b&&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:()=>!w&&y(!1),"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(ru,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",u,"?"]})]}),s.jsx("p",{className:"text-sm text-slate-300 mb-6",children:"This will uninstall cron jobs and remove all Night Watch data for this project from the database. The project files on disk will not be deleted."}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(st,{variant:"ghost",onClick:()=>y(!1),disabled:w,children:"Cancel"}),s.jsx(st,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:hn,loading:w,children:"Remove"})]})]})]}),s.jsx(zw,{isOpen:U,onClose:()=>{ne(!1),ce(null),me(null)},onSave:il,presetId:F,preset:ye,isBuiltIn:F?ay.includes(F):!1,existingIds:Object.keys(la())}),B&&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(ru,{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:B.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:B.references.map(L=>s.jsx("li",{children:L},L))}),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(st,{variant:"ghost",onClick:()=>ue(null),children:"Cancel"}),s.jsx(st,{variant:"secondary",onClick:On,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},Bw=()=>(E2(),T2(),s.jsx(bb,{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(S2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(w2,{}),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(Wv,{children:[s.jsx(tl,{path:"/",element:s.jsx(z2,{})}),s.jsx(tl,{path:"/prs",element:s.jsx(L2,{})}),s.jsx(tl,{path:"/board",element:s.jsx(R2,{})}),s.jsx(tl,{path:"/scheduling",element:s.jsx(Mw,{})}),s.jsx(tl,{path:"/logs",element:s.jsx(U2,{})}),s.jsx(tl,{path:"/roadmap",element:s.jsx(H2,{})}),s.jsx(tl,{path:"/settings",element:s.jsx(Vw,{})}),s.jsx(tl,{path:"*",element:s.jsx(Qv,{to:"/",replace:!0})})]})})})]}),s.jsx(j2,{})]})})),Nx=document.getElementById("root");if(!Nx)throw new Error("Could not find root element to mount to");const Yw=Jp.createRoot(Nx);Yw.render(s.jsx(ze.StrictMode,{children:s.jsx(Bw,{})}));
|