@jonit-dev/night-watch-cli 1.7.80 → 1.7.81
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/commands/analytics.d.ts +14 -0
- package/dist/commands/analytics.d.ts.map +1 -0
- package/dist/commands/analytics.js +74 -0
- package/dist/commands/analytics.js.map +1 -0
- package/dist/scripts/night-watch-cron.sh +80 -0
- package/dist/scripts/night-watch-helpers.sh +13 -0
- package/dist/web/assets/index-BjhCFjZi.js +381 -0
- package/package.json +1 -1
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
var Nv=Object.defineProperty;var Y0=l=>{throw TypeError(l)};var wv=(l,u,d)=>u in l?Nv(l,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[u]=d;var $0=(l,u,d)=>wv(l,typeof u!="symbol"?u+"":u,d),rf=(l,u,d)=>u.has(l)||Y0("Cannot "+d);var K=(l,u,d)=>(rf(l,u,"read from private field"),d?d.call(l):u.get(l)),et=(l,u,d)=>u.has(l)?Y0("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,d),Me=(l,u,d,o)=>(rf(l,u,"write to private field"),o?o.call(l,d):u.set(l,d),d),we=(l,u,d)=>(rf(l,u,"access private method"),d);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const x of document.querySelectorAll('link[rel="modulepreload"]'))o(x);new MutationObserver(x=>{for(const m of x)if(m.type==="childList")for(const g of m.addedNodes)g.tagName==="LINK"&&g.rel==="modulepreload"&&o(g)}).observe(document,{childList:!0,subtree:!0});function d(x){const m={};return x.integrity&&(m.integrity=x.integrity),x.referrerPolicy&&(m.referrerPolicy=x.referrerPolicy),x.crossOrigin==="use-credentials"?m.credentials="include":x.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function o(x){if(x.ep)return;x.ep=!0;const m=d(x);fetch(x.href,m)}})();function Yx(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function jv(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 x=Object.getOwnPropertyDescriptor(l,o);Object.defineProperty(d,o,x.get?x:{enumerable:!0,get:function(){return l[o]}})}),d}var uf={exports:{}},Hi={};/**
|
|
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 G0;function Ev(){if(G0)return Hi;G0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.fragment");function d(o,x,m){var g=null;if(m!==void 0&&(g=""+m),x.key!==void 0&&(g=""+x.key),"key"in x){m={};for(var j in x)j!=="key"&&(m[j]=x[j])}else m=x;return x=m.ref,{$$typeof:l,type:o,key:g,ref:x!==void 0?x:null,props:m}}return Hi.Fragment=u,Hi.jsx=d,Hi.jsxs=d,Hi}var Z0;function Mv(){return Z0||(Z0=1,uf.exports=Ev()),uf.exports}var s=Mv(),cf={exports:{}},Ue={};/**
|
|
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 F0;function Tv(){if(F0)return Ue;F0=1;var l=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),g=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),_=Symbol.iterator;function A(b){return b===null||typeof b!="object"?null:(b=_&&b[_]||b["@@iterator"],typeof b=="function"?b:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,O={};function ae(b,Y,ie){this.props=b,this.context=Y,this.refs=O,this.updater=ie||T}ae.prototype.isReactComponent={},ae.prototype.setState=function(b,Y){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,Y,"setState")},ae.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function I(){}I.prototype=ae.prototype;function ne(b,Y,ie){this.props=b,this.context=Y,this.refs=O,this.updater=ie||T}var ee=ne.prototype=new I;ee.constructor=ne,C(ee,ae.prototype),ee.isPureReactComponent=!0;var J=Array.isArray;function ce(){}var W={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function $(b,Y,ie){var he=ie.ref;return{$$typeof:l,type:b,key:Y,ref:he!==void 0?he:null,props:ie}}function k(b,Y){return $(b.type,Y,b.props)}function te(b){return typeof b=="object"&&b!==null&&b.$$typeof===l}function V(b){var Y={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(ie){return Y[ie]})}var oe=/\/+/g;function ge(b,Y){return typeof b=="object"&&b!==null&&b.key!=null?V(""+b.key):Y.toString(36)}function ye(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(ce,ce):(b.status="pending",b.then(function(Y){b.status==="pending"&&(b.status="fulfilled",b.value=Y)},function(Y){b.status==="pending"&&(b.status="rejected",b.reason=Y)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function G(b,Y,ie,he,je){var fe=typeof b;(fe==="undefined"||fe==="boolean")&&(b=null);var ve=!1;if(b===null)ve=!0;else switch(fe){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(b.$$typeof){case l:case u:ve=!0;break;case E:return ve=b._init,G(ve(b._payload),Y,ie,he,je)}}if(ve)return je=je(b),ve=he===""?"."+ge(b,0):he,J(je)?(ie="",ve!=null&&(ie=ve.replace(oe,"$&/")+"/"),G(je,Y,ie,"",function(ot){return ot})):je!=null&&(te(je)&&(je=k(je,ie+(je.key==null||b&&b.key===je.key?"":(""+je.key).replace(oe,"$&/")+"/")+ve)),Y.push(je)),1;ve=0;var ke=he===""?".":he+":";if(J(b))for(var _e=0;_e<b.length;_e++)he=b[_e],fe=ke+ge(he,_e),ve+=G(he,Y,ie,fe,je);else if(_e=A(b),typeof _e=="function")for(b=_e.call(b),_e=0;!(he=b.next()).done;)he=he.value,fe=ke+ge(he,_e++),ve+=G(he,Y,ie,fe,je);else if(fe==="object"){if(typeof b.then=="function")return G(ye(b),Y,ie,he,je);throw Y=String(b),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.")}return ve}function se(b,Y,ie){if(b==null)return b;var he=[],je=0;return G(b,he,"","",function(fe){return Y.call(ie,fe,je++)}),he}function me(b){if(b._status===-1){var Y=b._result;Y=Y(),Y.then(function(ie){(b._status===0||b._status===-1)&&(b._status=1,b._result=ie)},function(ie){(b._status===0||b._status===-1)&&(b._status=2,b._result=ie)}),b._status===-1&&(b._status=0,b._result=Y)}if(b._status===1)return b._result.default;throw b._result}var Se=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Y=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(Y))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},Re={map:se,forEach:function(b,Y,ie){se(b,function(){Y.apply(this,arguments)},ie)},count:function(b){var Y=0;return se(b,function(){Y++}),Y},toArray:function(b){return se(b,function(Y){return Y})||[]},only:function(b){if(!te(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return Ue.Activity=M,Ue.Children=Re,Ue.Component=ae,Ue.Fragment=d,Ue.Profiler=x,Ue.PureComponent=ne,Ue.StrictMode=o,Ue.Suspense=S,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(b){return W.H.useMemoCache(b)}},Ue.cache=function(b){return function(){return b.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(b,Y,ie){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var he=C({},b.props),je=b.key;if(Y!=null)for(fe in Y.key!==void 0&&(je=""+Y.key),Y)!X.call(Y,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Y.ref===void 0||(he[fe]=Y[fe]);var fe=arguments.length-2;if(fe===1)he.children=ie;else if(1<fe){for(var ve=Array(fe),ke=0;ke<fe;ke++)ve[ke]=arguments[ke+2];he.children=ve}return $(b.type,je,he)},Ue.createContext=function(b){return b={$$typeof:g,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:m,_context:b},b},Ue.createElement=function(b,Y,ie){var he,je={},fe=null;if(Y!=null)for(he in Y.key!==void 0&&(fe=""+Y.key),Y)X.call(Y,he)&&he!=="key"&&he!=="__self"&&he!=="__source"&&(je[he]=Y[he]);var ve=arguments.length-2;if(ve===1)je.children=ie;else if(1<ve){for(var ke=Array(ve),_e=0;_e<ve;_e++)ke[_e]=arguments[_e+2];je.children=ke}if(b&&b.defaultProps)for(he in ve=b.defaultProps,ve)je[he]===void 0&&(je[he]=ve[he]);return $(b,fe,je)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(b){return{$$typeof:j,render:b}},Ue.isValidElement=te,Ue.lazy=function(b){return{$$typeof:E,_payload:{_status:-1,_result:b},_init:me}},Ue.memo=function(b,Y){return{$$typeof:p,type:b,compare:Y===void 0?null:Y}},Ue.startTransition=function(b){var Y=W.T,ie={};W.T=ie;try{var he=b(),je=W.S;je!==null&&je(ie,he),typeof he=="object"&&he!==null&&typeof he.then=="function"&&he.then(ce,Se)}catch(fe){Se(fe)}finally{Y!==null&&ie.types!==null&&(Y.types=ie.types),W.T=Y}},Ue.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},Ue.use=function(b){return W.H.use(b)},Ue.useActionState=function(b,Y,ie){return W.H.useActionState(b,Y,ie)},Ue.useCallback=function(b,Y){return W.H.useCallback(b,Y)},Ue.useContext=function(b){return W.H.useContext(b)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(b,Y){return W.H.useDeferredValue(b,Y)},Ue.useEffect=function(b,Y){return W.H.useEffect(b,Y)},Ue.useEffectEvent=function(b){return W.H.useEffectEvent(b)},Ue.useId=function(){return W.H.useId()},Ue.useImperativeHandle=function(b,Y,ie){return W.H.useImperativeHandle(b,Y,ie)},Ue.useInsertionEffect=function(b,Y){return W.H.useInsertionEffect(b,Y)},Ue.useLayoutEffect=function(b,Y){return W.H.useLayoutEffect(b,Y)},Ue.useMemo=function(b,Y){return W.H.useMemo(b,Y)},Ue.useOptimistic=function(b,Y){return W.H.useOptimistic(b,Y)},Ue.useReducer=function(b,Y,ie){return W.H.useReducer(b,Y,ie)},Ue.useRef=function(b){return W.H.useRef(b)},Ue.useState=function(b){return W.H.useState(b)},Ue.useSyncExternalStore=function(b,Y,ie){return W.H.useSyncExternalStore(b,Y,ie)},Ue.useTransition=function(){return W.H.useTransition()},Ue.version="19.2.4",Ue}var Q0;function Af(){return Q0||(Q0=1,cf.exports=Tv()),cf.exports}var q=Af();const Ke=Yx(q);var of={exports:{}},Li={},df={exports:{}},ff={};/**
|
|
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 W0;function Cv(){return W0||(W0=1,(function(l){function u(G,se){var me=G.length;G.push(se);e:for(;0<me;){var Se=me-1>>>1,Re=G[Se];if(0<x(Re,se))G[Se]=se,G[me]=Re,me=Se;else break e}}function d(G){return G.length===0?null:G[0]}function o(G){if(G.length===0)return null;var se=G[0],me=G.pop();if(me!==se){G[0]=me;e:for(var Se=0,Re=G.length,b=Re>>>1;Se<b;){var Y=2*(Se+1)-1,ie=G[Y],he=Y+1,je=G[he];if(0>x(ie,me))he<Re&&0>x(je,ie)?(G[Se]=je,G[he]=me,Se=he):(G[Se]=ie,G[Y]=me,Se=Y);else if(he<Re&&0>x(je,me))G[Se]=je,G[he]=me,Se=he;else break e}}return se}function x(G,se){var me=G.sortIndex-se.sortIndex;return me!==0?me:G.id-se.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var g=Date,j=g.now();l.unstable_now=function(){return g.now()-j}}var S=[],p=[],E=1,M=null,_=3,A=!1,T=!1,C=!1,O=!1,ae=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function ee(G){for(var se=d(p);se!==null;){if(se.callback===null)o(p);else if(se.startTime<=G)o(p),se.sortIndex=se.expirationTime,u(S,se);else break;se=d(p)}}function J(G){if(C=!1,ee(G),!T)if(d(S)!==null)T=!0,ce||(ce=!0,V());else{var se=d(p);se!==null&&ye(J,se.startTime-G)}}var ce=!1,W=-1,X=5,$=-1;function k(){return O?!0:!(l.unstable_now()-$<X)}function te(){if(O=!1,ce){var G=l.unstable_now();$=G;var se=!0;try{e:{T=!1,C&&(C=!1,I(W),W=-1),A=!0;var me=_;try{t:{for(ee(G),M=d(S);M!==null&&!(M.expirationTime>G&&k());){var Se=M.callback;if(typeof Se=="function"){M.callback=null,_=M.priorityLevel;var Re=Se(M.expirationTime<=G);if(G=l.unstable_now(),typeof Re=="function"){M.callback=Re,ee(G),se=!0;break t}M===d(S)&&o(S),ee(G)}else o(S);M=d(S)}if(M!==null)se=!0;else{var b=d(p);b!==null&&ye(J,b.startTime-G),se=!1}}break e}finally{M=null,_=me,A=!1}se=void 0}}finally{se?V():ce=!1}}}var V;if(typeof ne=="function")V=function(){ne(te)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,ge=oe.port2;oe.port1.onmessage=te,V=function(){ge.postMessage(null)}}else V=function(){ae(te,0)};function ye(G,se){W=ae(function(){G(l.unstable_now())},se)}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(G){G.callback=null},l.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<G?Math.floor(1e3/G):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_next=function(G){switch(_){case 1:case 2:case 3:var se=3;break;default:se=_}var me=_;_=se;try{return G()}finally{_=me}},l.unstable_requestPaint=function(){O=!0},l.unstable_runWithPriority=function(G,se){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var me=_;_=G;try{return se()}finally{_=me}},l.unstable_scheduleCallback=function(G,se,me){var Se=l.unstable_now();switch(typeof me=="object"&&me!==null?(me=me.delay,me=typeof me=="number"&&0<me?Se+me:Se):me=Se,G){case 1:var Re=-1;break;case 2:Re=250;break;case 5:Re=1073741823;break;case 4:Re=1e4;break;default:Re=5e3}return Re=me+Re,G={id:E++,callback:se,priorityLevel:G,startTime:me,expirationTime:Re,sortIndex:-1},me>Se?(G.sortIndex=me,u(p,G),d(S)===null&&G===d(p)&&(C?(I(W),W=-1):C=!0,ye(J,me-Se))):(G.sortIndex=Re,u(S,G),T||A||(T=!0,ce||(ce=!0,V()))),G},l.unstable_shouldYield=k,l.unstable_wrapCallback=function(G){var se=_;return function(){var me=_;_=se;try{return G.apply(this,arguments)}finally{_=me}}}})(ff)),ff}var X0;function Ov(){return X0||(X0=1,df.exports=Cv()),df.exports}var hf={exports:{}},na={};/**
|
|
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 I0;function Dv(){if(I0)return na;I0=1;var l=Af();function u(S){var p="https://react.dev/errors/"+S;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)p+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+S+"; visit "+p+" 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},x=Symbol.for("react.portal");function m(S,p,E){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:x,key:M==null?null:""+M,children:S,containerInfo:p,implementation:E}}var g=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(S,p){if(S==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return na.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,na.createPortal=function(S,p){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(u(299));return m(S,p,null,E)},na.flushSync=function(S){var p=g.T,E=o.p;try{if(g.T=null,o.p=2,S)return S()}finally{g.T=p,o.p=E,o.d.f()}},na.preconnect=function(S,p){typeof S=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(S,p))},na.prefetchDNS=function(S){typeof S=="string"&&o.d.D(S)},na.preinit=function(S,p){if(typeof S=="string"&&p&&typeof p.as=="string"){var E=p.as,M=j(E,p.crossOrigin),_=typeof p.integrity=="string"?p.integrity:void 0,A=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;E==="style"?o.d.S(S,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:M,integrity:_,fetchPriority:A}):E==="script"&&o.d.X(S,{crossOrigin:M,integrity:_,fetchPriority:A,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},na.preinitModule=function(S,p){if(typeof S=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var E=j(p.as,p.crossOrigin);o.d.M(S,{crossOrigin:E,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(S)},na.preload=function(S,p){if(typeof S=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var E=p.as,M=j(E,p.crossOrigin);o.d.L(S,E,{crossOrigin:M,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},na.preloadModule=function(S,p){if(typeof S=="string")if(p){var E=j(p.as,p.crossOrigin);o.d.m(S,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:E,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(S)},na.requestFormReset=function(S){o.d.r(S)},na.unstable_batchedUpdates=function(S,p){return S(p)},na.useFormState=function(S,p,E){return g.H.useFormState(S,p,E)},na.useFormStatus=function(){return g.H.useHostTransitionStatus()},na.version="19.2.4",na}var J0;function Rv(){if(J0)return hf.exports;J0=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(),hf.exports=Dv(),hf.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 K0;function _v(){if(K0)return Li;K0=1;var l=Ov(),u=Af(),d=Rv();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 x(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function g(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function j(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 S(e){if(m(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=m(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 S(i),e;if(c===n)return S(i),t;c=c.sibling}throw Error(o(188))}if(a.return!==n.return)a=i,n=c;else{for(var y=!1,w=i.child;w;){if(w===a){y=!0,a=i,n=c;break}if(w===n){y=!0,n=i,a=c;break}w=w.sibling}if(!y){for(w=c.child;w;){if(w===a){y=!0,a=c,n=i;break}if(w===n){y=!0,n=c,a=i;break}w=w.sibling}if(!y)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 E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var M=Object.assign,_=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),ae=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function V(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var oe=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case ae:return"Profiler";case O:return"StrictMode";case J:return"Suspense";case ce:return"SuspenseList";case $:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case ne:return e.displayName||"Context";case I: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 W:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case X:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}var ye=Array.isArray,G=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},Se=[],Re=-1;function b(e){return{current:e}}function Y(e){0>Re||(e.current=Se[Re],Se[Re]=null,Re--)}function ie(e,t){Re++,Se[Re]=e.current,e.current=t}var he=b(null),je=b(null),fe=b(null),ve=b(null);function ke(e,t){switch(ie(fe,t),ie(je,e),ie(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?d0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=d0(t),e=f0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Y(he),ie(he,e)}function _e(){Y(he),Y(je),Y(fe)}function ot(e){e.memoizedState!==null&&ie(ve,e);var t=he.current,a=f0(t,e.type);t!==a&&(ie(je,e),ie(he,a))}function Jt(e){je.current===e&&(Y(he),Y(je)),ve.current===e&&(Y(ve),Ai._currentValue=me)}var Bl,Xn;function Ga(e){if(Bl===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Bl=t&&t[1]||"",Xn=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Bl+e+Xn}var Za=!1;function In(e,t){if(!e||Za)return"";Za=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(P){var Q=P}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(P){Q=P}e.call(ue.prototype)}}else{try{throw Error()}catch(P){Q=P}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(P){if(P&&Q&&typeof P.stack=="string")return[P.stack,Q.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(),y=c[0],w=c[1];if(y&&w){var R=y.split(`
|
|
44
|
+
`),F=w.split(`
|
|
45
|
+
`);for(i=n=0;n<R.length&&!R[n].includes("DetermineComponentFrameRoot");)n++;for(;i<F.length&&!F[i].includes("DetermineComponentFrameRoot");)i++;if(n===R.length||i===F.length)for(n=R.length-1,i=F.length-1;1<=n&&0<=i&&R[n]!==F[i];)i--;for(;1<=n&&0<=i;n--,i--)if(R[n]!==F[i]){if(n!==1||i!==1)do if(n--,i--,0>i||R[n]!==F[i]){var le=`
|
|
46
|
+
`+R[n].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=n&&0<=i);break}}}finally{Za=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ga(a):""}function Jn(e,t){switch(e.tag){case 26:case 27:case 5:return Ga(e.type);case 16:return Ga("Lazy");case 13:return e.child!==t&&t!==null?Ga("Suspense Fallback"):Ga("Suspense");case 19:return Ga("SuspenseList");case 0:case 15:return In(e.type,!1);case 11:return In(e.type.render,!1);case 1:return In(e.type,!0);case 31:return Ga("Activity");default:return""}}function Kn(e){try{var t="",a=null;do t+=Jn(e,a),a=e,e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}var sn=Object.prototype.hasOwnProperty,Pn=l.unstable_scheduleCallback,el=l.unstable_cancelCallback,zs=l.unstable_shouldYield,Us=l.unstable_requestPaint,Ut=l.unstable_now,xe=l.unstable_getCurrentPriorityLevel,qe=l.unstable_ImmediatePriority,Ht=l.unstable_UserBlockingPriority,rn=l.unstable_NormalPriority,Hs=l.unstable_LowPriority,Yl=l.unstable_IdlePriority,Ye=l.log,zr=l.unstable_setDisableYieldValue,pt=null,Kt=null;function Yt(e){if(typeof Ye=="function"&&zr(e),Kt&&typeof Kt.setStrictMode=="function")try{Kt.setStrictMode(pt,e)}catch{}}var $t=Math.clz32?Math.clz32:ao,cu=Math.log,to=Math.LN2;function ao(e){return e>>>=0,e===0?32:31-(cu(e)/to|0)|0}var tl=256,Ls=262144,Pt=4194304;function un(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 $l(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,c=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var w=n&134217727;return w!==0?(n=w&~c,n!==0?i=un(n):(y&=w,y!==0?i=un(y):a||(a=w&~e,a!==0&&(i=un(a))))):(w=n&~c,w!==0?i=un(w):y!==0?i=un(y):a||(a=n&~e,a!==0&&(i=un(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 al(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ou(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 Ur(){var e=Pt;return Pt<<=1,(Pt&62914560)===0&&(Pt=4194304),e}function qs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function nl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function du(e,t,a,n,i,c){var y=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 w=e.entanglements,R=e.expirationTimes,F=e.hiddenUpdates;for(a=y&~a;0<a;){var le=31-$t(a),ue=1<<le;w[le]=0,R[le]=-1;var Q=F[le];if(Q!==null)for(F[le]=null,le=0;le<Q.length;le++){var P=Q[le];P!==null&&(P.lane&=-536870913)}a&=~ue}n!==0&&ft(e,n,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(y&~t))}function ft(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-$t(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&261930}function ia(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-$t(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function Hr(e,t){var a=t&-t;return a=(a&42)!==0?1:Vs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Vs(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 ea(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Bs(){var e=se.p;return e!==0?e:(e=window.event,e===void 0?32:z0(e.type))}function Lr(e,t){var a=se.p;try{return se.p=e,t()}finally{se.p=a}}var Fa=Math.random().toString(36).slice(2),Nt="__reactFiber$"+Fa,At="__reactProps$"+Fa,bn="__reactContainer$"+Fa,Gl="__reactEvents$"+Fa,fu="__reactListeners$"+Fa,hu="__reactHandles$"+Fa,mu="__reactResources$"+Fa,Zl="__reactMarker$"+Fa;function Ys(e){delete e[Nt],delete e[At],delete e[Gl],delete e[fu],delete e[hu]}function Sn(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[bn]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=p0(e);e!==null;){if(a=e[Nt])return a;e=p0(e)}return t}e=a,a=e.parentNode}return null}function Ce(e){if(e=e[Nt]||e[bn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ua(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Qa(e){var t=e[mu];return t||(t=e[mu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ct(e){e[Zl]=!0}var xu=new Set,qr={};function cn(e,t){ll(e,t),ll(e+"Capture",t)}function ll(e,t){for(qr[e]=t,e=0;e<t.length;e++)xu.add(t[e])}var gu=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]*$"),yu={},Nn={};function Vr(e){return sn.call(Nn,e)?!0:sn.call(yu,e)?!1:gu.test(e)?Nn[e]=!0:(yu[e]=!0,!1)}function Gt(e,t,a){if(Vr(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 $s(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 tt(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 wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function on(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Br(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(y){a=""+y,c.call(this,y)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fl(e){if(!e._valueTracker){var t=on(e)?"checked":"value";e._valueTracker=Br(e,t,""+e[t])}}function sl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=on(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Wa(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 Gs=/[\n"\\]/g;function Zt(e){return e.replace(Gs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Zs(e,t,a,n,i,c,y,w){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+wt(t)):e.value!==""+wt(t)&&(e.value=""+wt(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?Ql(e,y,wt(t)):a!=null?Ql(e,y,wt(a)):n!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+wt(w):e.removeAttribute("name")}function rl(e,t,a,n,i,c,y,w){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)){Fl(e);return}a=a!=null?""+wt(a):"",t=t!=null?""+wt(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=w?e.checked:!!n,e.defaultChecked=!!n,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Fl(e)}function Ql(e,t,a){t==="number"&&Wa(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function wn(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=""+wt(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 Wl(e,t,a){if(t!=null&&(t=""+wt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+wt(a):""}function Yr(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(o(92));if(ye(n)){if(1<n.length)throw Error(o(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=wt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n),Fl(e)}function Xa(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Xl=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 Il(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||Xl.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&&Il(e,i,n)}else for(var c in t)t.hasOwnProperty(c)&&Il(e,c,t[c])}function Fs(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 no=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"]]),pu=/^[\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 Jl(e){return pu.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Da(){}var $r=null;function Qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jn=null,il=null;function bu(e){var t=Ce(e);if(t&&(e=t.stateNode)){var a=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(Zs(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[At]||null;if(!i)throw Error(o(90));Zs(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&&sl(n)}break e;case"textarea":Wl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&wn(e,!!a.multiple,t,!1)}}}var Gr=!1;function Zr(e,t,a){if(Gr)return e(t,a);Gr=!0;try{var n=e(t);return n}finally{if(Gr=!1,(jn!==null||il!==null)&&(mc(),jn&&(t=jn,e=il,il=jn=null,bu(t),e)))for(t=0;t<e.length;t++)bu(e[t])}}function Kl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[At]||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 Ia=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fr=!1;if(Ia)try{var Pl={};Object.defineProperty(Pl,"passive",{get:function(){Fr=!0}}),window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{Fr=!1}var dn=null,Ws=null,Xs=null;function kt(){if(Xs)return Xs;var e,t=Ws,a=t.length,n,i="value"in dn?dn.value:dn.textContent,c=i.length;for(e=0;e<a&&t[e]===i[e];e++);var y=a-e;for(n=1;n<=y&&t[a-n]===i[c-n];n++);return Xs=i.slice(e,1<n?1-n:void 0)}function es(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 Ja(){return!0}function En(){return!1}function jt(e){function t(a,n,i,c,y){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(c):c[w]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ja:En,this.isPropagationStopped=En,this}return M(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=Ja)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ja)},persist:function(){},isPersistent:Ja}),t}var fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ts=jt(fn),as=M({},fn,{view:0,detail:0}),Qr=jt(as),Is,ns,ls,Js=M({},as,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rs,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!==ls&&(ls&&e.type==="mousemove"?(Is=e.screenX-ls.screenX,ns=e.screenY-ls.screenY):ns=Is=0,ls=e),Is)},movementY:function(e){return"movementY"in e?e.movementY:ns}}),Su=jt(Js),lo=M({},Js,{dataTransfer:0}),so=jt(lo),ro=M({},as,{relatedTarget:0}),Ks=jt(ro),io=M({},fn,{animationName:0,elapsedTime:0,pseudoElement:0}),ul=jt(io),uo=M({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cl=jt(uo),ss=M({},fn,{data:0}),ol=jt(ss),co={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oo={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"},fo={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ho(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=fo[e])?!!t[e]:!1}function rs(){return ho}var mo=M({},as,{key:function(e){if(e.key){var t=co[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?oo[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rs,charCode:function(e){return e.type==="keypress"?es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xo=jt(mo),go=M({},Js,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Nu=jt(go),yo=M({},as,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rs}),vo=jt(yo),wu=M({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0}),po=jt(wu),bo=M({},Js,{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}),So=jt(bo),No=M({},fn,{newState:0,oldState:0}),wo=jt(No),ju=[9,13,27,32],Wr=Ia&&"CompositionEvent"in window,is=null;Ia&&"documentMode"in document&&(is=document.documentMode);var jo=Ia&&"TextEvent"in window&&!is,Eu=Ia&&(!Wr||is&&8<is&&11>=is),Mu=" ",Tu=!1;function Cu(e,t){switch(e){case"keyup":return ju.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ou(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var dl=!1;function Eo(e,t){switch(e){case"compositionend":return Ou(t);case"keypress":return t.which!==32?null:(Tu=!0,Mu);case"textInput":return e=t.data,e===Mu&&Tu?null:e;default:return null}}function Mo(e,t){if(dl)return e==="compositionend"||!Wr&&Cu(e,t)?(e=kt(),Xs=Ws=dn=null,dl=!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 Eu&&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 Du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!To[e.type]:t==="textarea"}function Xr(e,t,a,n){jn?il?il.push(n):il=[n]:jn=n,t=Sc(t,"onChange"),0<t.length&&(a=new ts("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var fl=null,us=null;function ca(e){s0(e,0)}function Ka(e){var t=ua(e);if(sl(t))return e}function Ru(e,t){if(e==="change")return t}var hn=!1;if(Ia){var Ir;if(Ia){var ba="oninput"in document;if(!ba){var Jr=document.createElement("div");Jr.setAttribute("oninput","return;"),ba=typeof Jr.oninput=="function"}Ir=ba}else Ir=!1;hn=Ir&&(!document.documentMode||9<document.documentMode)}function Kr(){fl&&(fl.detachEvent("onpropertychange",Pr),us=fl=null)}function Pr(e){if(e.propertyName==="value"&&Ka(us)){var t=[];Xr(t,us,e,Qs(e)),Zr(ca,t)}}function Ze(e,t,a){e==="focusin"?(Kr(),fl=t,us=a,fl.attachEvent("onpropertychange",Pr)):e==="focusout"&&Kr()}function hl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ka(us)}function Co(e,t){if(e==="click")return Ka(t)}function ht(e,t){if(e==="input"||e==="change")return Ka(t)}function cs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ta=typeof Object.is=="function"?Object.is:cs;function os(e,t){if(ta(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(!sn.call(t,i)||!ta(e[i],t[i]))return!1}return!0}function _u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Au(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 Oo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wa(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=Wa(e.document)}return t}function Ps(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 ku=Ia&&"documentMode"in document&&11>=document.documentMode,ml=null,er=null,Ft=null,tr=!1;function ds(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;tr||ml==null||ml!==Wa(n)||(n=ml,"selectionStart"in n&&Ps(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}),Ft&&os(Ft,n)||(Ft=n,n=Sc(er,"onSelect"),0<n.length&&(t=new ts("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=ml)))}function Mn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var xl={animationend:Mn("Animation","AnimationEnd"),animationiteration:Mn("Animation","AnimationIteration"),animationstart:Mn("Animation","AnimationStart"),transitionrun:Mn("Transition","TransitionRun"),transitionstart:Mn("Transition","TransitionStart"),transitioncancel:Mn("Transition","TransitionCancel"),transitionend:Mn("Transition","TransitionEnd")},ei={},zu={};Ia&&(zu=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function Tn(e){if(ei[e])return ei[e];if(!xl[e])return e;var t=xl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in zu)return ei[e]=t[a];return e}var Uu=Tn("animationend"),Hu=Tn("animationiteration"),ar=Tn("animationstart"),Do=Tn("transitionrun"),Ro=Tn("transitionstart"),Lu=Tn("transitioncancel"),ti=Tn("transitionend"),ai=new Map,ni="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(" ");ni.push("scrollEnd");function oa(e,t){ai.set(e,t),cn(t,[e])}var gl=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)},la=[],Ra=0,fs=0;function yl(){for(var e=Ra,t=fs=Ra=0;t<e;){var a=la[t];la[t++]=null;var n=la[t];la[t++]=null;var i=la[t];la[t++]=null;var c=la[t];if(la[t++]=null,n!==null&&i!==null){var y=n.pending;y===null?i.next=i:(i.next=y.next,y.next=i),n.pending=i}c!==0&&hs(a,i,c)}}function _a(e,t,a,n){la[Ra++]=e,la[Ra++]=t,la[Ra++]=a,la[Ra++]=n,fs|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function nr(e,t,a,n){return _a(e,t,a,n),ms(e)}function Aa(e,t){return _a(e,null,null,t),ms(e)}function hs(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-$t(a),e=c.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),c):null}function ms(e){if(50<Mi)throw Mi=0,Dd=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Sa={};function lr(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 lr(e,t,a,n)}function sr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ka(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 qu(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 rr(e,t,a,n,i,c){var y=0;if(n=e,typeof e=="function")sr(e)&&(y=1);else if(typeof e=="string")y=ov(e,a,he.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case $:return e=Qt(31,a,t,i),e.elementType=$,e.lanes=c,e;case C:return za(a.children,i,c,t);case O:y=8,i|=24;break;case ae:return e=Qt(12,a,t,i|2),e.elementType=ae,e.lanes=c,e;case J:return e=Qt(13,a,t,i),e.elementType=J,e.lanes=c,e;case ce:return e=Qt(19,a,t,i),e.elementType=ce,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:y=10;break e;case I:y=9;break e;case ee:y=11;break e;case W:y=14;break e;case X:y=16,n=null;break e}y=29,a=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=Qt(y,a,t,i),t.elementType=e,t.type=n,t.lanes=c,t}function za(e,t,a,n){return e=Qt(7,e,n,t),e.lanes=a,e}function li(e,t,a){return e=Qt(6,e,null,t),e.lanes=a,e}function Vu(e){var t=Qt(18,null,null,0);return t.stateNode=e,t}function vl(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 si=new WeakMap;function da(e,t){if(typeof e=="object"&&e!==null){var a=si.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Kn(t)},si.set(e,t),t)}return{value:e,source:t,stack:Kn(t)}}var Cn=[],On=0,xs=null,Pa=0,aa=[],Ee=0,fa=null,Ua=1,h="";function r(e,t){Cn[On++]=Pa,Cn[On++]=xs,xs=e,Pa=t}function f(e,t,a){aa[Ee++]=Ua,aa[Ee++]=h,aa[Ee++]=fa,fa=e;var n=Ua;e=h;var i=32-$t(n)-1;n&=~(1<<i),a+=1;var c=32-$t(t)+i;if(30<c){var y=i-i%5;c=(n&(1<<y)-1).toString(32),n>>=y,i-=y,Ua=1<<32-$t(t)+i|a<<i|n,h=c+e}else Ua=1<<c|a<<i|n,h=e}function v(e){e.return!==null&&(r(e,1),f(e,1,0))}function N(e){for(;e===xs;)xs=Cn[--On],Cn[On]=null,Pa=Cn[--On],Cn[On]=null;for(;e===fa;)fa=aa[--Ee],aa[Ee]=null,h=aa[--Ee],aa[Ee]=null,Ua=aa[--Ee],aa[Ee]=null}function D(e,t){aa[Ee++]=Ua,aa[Ee++]=h,aa[Ee++]=fa,Ua=t.id,h=t.overflow,fa=e}var z=null,U=null,L=!1,de=null,pe=!1,ze=Error(o(519));function Fe(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw en(da(t,e)),ze}function Oe(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[Nt]=e,t[At]=n,a){case"dialog":Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":case"embed":Ge("load",t);break;case"video":case"audio":for(a=0;a<Ci.length;a++)Ge(Ci[a],t);break;case"source":Ge("error",t);break;case"img":case"image":case"link":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"input":Ge("invalid",t),rl(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Ge("invalid",t);break;case"textarea":Ge("invalid",t),Yr(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||c0(t.textContent,a)?(n.popover!=null&&(Ge("beforetoggle",t),Ge("toggle",t)),n.onScroll!=null&&Ge("scroll",t),n.onScrollEnd!=null&&Ge("scrollend",t),n.onClick!=null&&(t.onclick=Da),t=!0):t=!1,t||Fe(e,!0)}function vt(e){for(z=e.return;z;)switch(z.tag){case 5:case 31:case 13:pe=!1;return;case 27:case 3:pe=!0;return;default:z=z.return}}function Lt(e){if(e!==z)return!1;if(!L)return vt(e),L=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Zd(e.type,e.memoizedProps)),a=!a),a&&U&&Fe(e),vt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));U=v0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));U=v0(e)}else t===27?(t=U,Rl(e.type)?(e=Id,Id=null,U=e):U=t):U=z?Va(e.stateNode.nextSibling):null;return!0}function qt(){U=z=null,L=!1}function mn(){var e=de;return e!==null&&(ga===null?ga=e:ga.push.apply(ga,e),de=null),e}function en(e){de===null?de=[e]:de.push(e)}var ir=b(null),Dn=null,Ha=null;function xn(e,t,a){ie(ir,t._currentValue),t._currentValue=a}function tn(e){e._currentValue=ir.current,Y(ir)}function ri(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 Rn(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var y=i.child;c=c.firstContext;e:for(;c!==null;){var w=c;c=i;for(var R=0;R<t.length;R++)if(w.context===t[R]){c.lanes|=a,w=c.alternate,w!==null&&(w.lanes|=a),ri(c.return,a,e),n||(y=null);break e}c=w.next}}else if(i.tag===18){if(y=i.return,y===null)throw Error(o(341));y.lanes|=a,c=y.alternate,c!==null&&(c.lanes|=a),ri(y,a,e),y=null}else y=i.child;if(y!==null)y.return=i;else for(y=i;y!==null;){if(y===e){y=null;break}if(i=y.sibling,i!==null){i.return=y.return,y=i;break}y=y.return}i=y}}function La(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 y=i.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var w=i.type;ta(i.pendingProps.value,y.value)||(e!==null?e.push(w):e=[w])}}else if(i===ve.current){if(y=i.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Ai):e=[Ai])}i=i.return}e!==null&&Rn(t,e,a,n),t.flags|=262144}function ur(e){for(e=e.firstContext;e!==null;){if(!ta(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gs(e){Dn=e,Ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Wt(e){return Wf(Dn,e)}function Bu(e,t){return Dn===null&&gs(e),Wf(e,t)}function Wf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ha===null){if(e===null)throw Error(o(308));Ha=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ha=Ha.next=t;return a}var ry=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()})}},iy=l.unstable_scheduleCallback,uy=l.unstable_NormalPriority,Ot={$$typeof:ne,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _o(){return{controller:new ry,data:new Map,refCount:0}}function ii(e){e.refCount--,e.refCount===0&&iy(uy,function(){e.controller.abort()})}var ui=null,Ao=0,cr=0,or=null;function cy(e,t){if(ui===null){var a=ui=[];Ao=0,cr=Ud(),or={status:"pending",value:void 0,then:function(n){a.push(n)}}}return Ao++,t.then(Xf,Xf),t}function Xf(){if(--Ao===0&&ui!==null){or!==null&&(or.status="fulfilled");var e=ui;ui=null,cr=0,or=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function oy(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 If=G.S;G.S=function(e,t){Am=Ut(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&cy(e,t),If!==null&&If(e,t)};var ys=b(null);function ko(){var e=ys.current;return e!==null?e:dt.pooledCache}function Yu(e,t){t===null?ie(ys,ys.current):ie(ys,t.pool)}function Jf(){var e=ko();return e===null?null:{parent:Ot._currentValue,pool:e}}var dr=Error(o(460)),zo=Error(o(474)),$u=Error(o(542)),Gu={then:function(){}};function Kf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Pf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Da,Da),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,th(e),e;default:if(typeof t.status=="string")t.then(Da,Da);else{if(e=dt,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,th(e),e}throw ps=t,dr}}function vs(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ps=a,dr):a}}var ps=null;function eh(){if(ps===null)throw Error(o(459));var e=ps;return ps=null,e}function th(e){if(e===dr||e===$u)throw Error(o(483))}var fr=null,ci=0;function Zu(e){var t=ci;return ci+=1,fr===null&&(fr=[]),Pf(fr,e,t)}function oi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fu(e,t){throw t.$$typeof===_?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ah(e){function t(B,H){if(e){var Z=B.deletions;Z===null?(B.deletions=[H],B.flags|=16):Z.push(H)}}function a(B,H){if(!e)return null;for(;H!==null;)t(B,H),H=H.sibling;return null}function n(B){for(var H=new Map;B!==null;)B.key!==null?H.set(B.key,B):H.set(B.index,B),B=B.sibling;return H}function i(B,H){return B=ka(B,H),B.index=0,B.sibling=null,B}function c(B,H,Z){return B.index=Z,e?(Z=B.alternate,Z!==null?(Z=Z.index,Z<H?(B.flags|=67108866,H):Z):(B.flags|=67108866,H)):(B.flags|=1048576,H)}function y(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function w(B,H,Z,re){return H===null||H.tag!==6?(H=li(Z,B.mode,re),H.return=B,H):(H=i(H,Z),H.return=B,H)}function R(B,H,Z,re){var Te=Z.type;return Te===C?le(B,H,Z.props.children,re,Z.key):H!==null&&(H.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===X&&vs(Te)===H.type)?(H=i(H,Z.props),oi(H,Z),H.return=B,H):(H=rr(Z.type,Z.key,Z.props,null,B.mode,re),oi(H,Z),H.return=B,H)}function F(B,H,Z,re){return H===null||H.tag!==4||H.stateNode.containerInfo!==Z.containerInfo||H.stateNode.implementation!==Z.implementation?(H=vl(Z,B.mode,re),H.return=B,H):(H=i(H,Z.children||[]),H.return=B,H)}function le(B,H,Z,re,Te){return H===null||H.tag!==7?(H=za(Z,B.mode,re,Te),H.return=B,H):(H=i(H,Z),H.return=B,H)}function ue(B,H,Z){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=li(""+H,B.mode,Z),H.return=B,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case A:return Z=rr(H.type,H.key,H.props,null,B.mode,Z),oi(Z,H),Z.return=B,Z;case T:return H=vl(H,B.mode,Z),H.return=B,H;case X:return H=vs(H),ue(B,H,Z)}if(ye(H)||V(H))return H=za(H,B.mode,Z,null),H.return=B,H;if(typeof H.then=="function")return ue(B,Zu(H),Z);if(H.$$typeof===ne)return ue(B,Bu(B,H),Z);Fu(B,H)}return null}function Q(B,H,Z,re){var Te=H!==null?H.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Te!==null?null:w(B,H,""+Z,re);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case A:return Z.key===Te?R(B,H,Z,re):null;case T:return Z.key===Te?F(B,H,Z,re):null;case X:return Z=vs(Z),Q(B,H,Z,re)}if(ye(Z)||V(Z))return Te!==null?null:le(B,H,Z,re,null);if(typeof Z.then=="function")return Q(B,H,Zu(Z),re);if(Z.$$typeof===ne)return Q(B,H,Bu(B,Z),re);Fu(B,Z)}return null}function P(B,H,Z,re,Te){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return B=B.get(Z)||null,w(H,B,""+re,Te);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case A:return B=B.get(re.key===null?Z:re.key)||null,R(H,B,re,Te);case T:return B=B.get(re.key===null?Z:re.key)||null,F(H,B,re,Te);case X:return re=vs(re),P(B,H,Z,re,Te)}if(ye(re)||V(re))return B=B.get(Z)||null,le(H,B,re,Te,null);if(typeof re.then=="function")return P(B,H,Z,Zu(re),Te);if(re.$$typeof===ne)return P(B,H,Z,Bu(H,re),Te);Fu(H,re)}return null}function be(B,H,Z,re){for(var Te=null,Ie=null,Ne=H,Ve=H=0,We=null;Ne!==null&&Ve<Z.length;Ve++){Ne.index>Ve?(We=Ne,Ne=null):We=Ne.sibling;var Je=Q(B,Ne,Z[Ve],re);if(Je===null){Ne===null&&(Ne=We);break}e&&Ne&&Je.alternate===null&&t(B,Ne),H=c(Je,H,Ve),Ie===null?Te=Je:Ie.sibling=Je,Ie=Je,Ne=We}if(Ve===Z.length)return a(B,Ne),L&&r(B,Ve),Te;if(Ne===null){for(;Ve<Z.length;Ve++)Ne=ue(B,Z[Ve],re),Ne!==null&&(H=c(Ne,H,Ve),Ie===null?Te=Ne:Ie.sibling=Ne,Ie=Ne);return L&&r(B,Ve),Te}for(Ne=n(Ne);Ve<Z.length;Ve++)We=P(Ne,B,Ve,Z[Ve],re),We!==null&&(e&&We.alternate!==null&&Ne.delete(We.key===null?Ve:We.key),H=c(We,H,Ve),Ie===null?Te=We:Ie.sibling=We,Ie=We);return e&&Ne.forEach(function(Ul){return t(B,Ul)}),L&&r(B,Ve),Te}function De(B,H,Z,re){if(Z==null)throw Error(o(151));for(var Te=null,Ie=null,Ne=H,Ve=H=0,We=null,Je=Z.next();Ne!==null&&!Je.done;Ve++,Je=Z.next()){Ne.index>Ve?(We=Ne,Ne=null):We=Ne.sibling;var Ul=Q(B,Ne,Je.value,re);if(Ul===null){Ne===null&&(Ne=We);break}e&&Ne&&Ul.alternate===null&&t(B,Ne),H=c(Ul,H,Ve),Ie===null?Te=Ul:Ie.sibling=Ul,Ie=Ul,Ne=We}if(Je.done)return a(B,Ne),L&&r(B,Ve),Te;if(Ne===null){for(;!Je.done;Ve++,Je=Z.next())Je=ue(B,Je.value,re),Je!==null&&(H=c(Je,H,Ve),Ie===null?Te=Je:Ie.sibling=Je,Ie=Je);return L&&r(B,Ve),Te}for(Ne=n(Ne);!Je.done;Ve++,Je=Z.next())Je=P(Ne,B,Ve,Je.value,re),Je!==null&&(e&&Je.alternate!==null&&Ne.delete(Je.key===null?Ve:Je.key),H=c(Je,H,Ve),Ie===null?Te=Je:Ie.sibling=Je,Ie=Je);return e&&Ne.forEach(function(Sv){return t(B,Sv)}),L&&r(B,Ve),Te}function ut(B,H,Z,re){if(typeof Z=="object"&&Z!==null&&Z.type===C&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case A:e:{for(var Te=Z.key;H!==null;){if(H.key===Te){if(Te=Z.type,Te===C){if(H.tag===7){a(B,H.sibling),re=i(H,Z.props.children),re.return=B,B=re;break e}}else if(H.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===X&&vs(Te)===H.type){a(B,H.sibling),re=i(H,Z.props),oi(re,Z),re.return=B,B=re;break e}a(B,H);break}else t(B,H);H=H.sibling}Z.type===C?(re=za(Z.props.children,B.mode,re,Z.key),re.return=B,B=re):(re=rr(Z.type,Z.key,Z.props,null,B.mode,re),oi(re,Z),re.return=B,B=re)}return y(B);case T:e:{for(Te=Z.key;H!==null;){if(H.key===Te)if(H.tag===4&&H.stateNode.containerInfo===Z.containerInfo&&H.stateNode.implementation===Z.implementation){a(B,H.sibling),re=i(H,Z.children||[]),re.return=B,B=re;break e}else{a(B,H);break}else t(B,H);H=H.sibling}re=vl(Z,B.mode,re),re.return=B,B=re}return y(B);case X:return Z=vs(Z),ut(B,H,Z,re)}if(ye(Z))return be(B,H,Z,re);if(V(Z)){if(Te=V(Z),typeof Te!="function")throw Error(o(150));return Z=Te.call(Z),De(B,H,Z,re)}if(typeof Z.then=="function")return ut(B,H,Zu(Z),re);if(Z.$$typeof===ne)return ut(B,H,Bu(B,Z),re);Fu(B,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,H!==null&&H.tag===6?(a(B,H.sibling),re=i(H,Z),re.return=B,B=re):(a(B,H),re=li(Z,B.mode,re),re.return=B,B=re),y(B)):a(B,H)}return function(B,H,Z,re){try{ci=0;var Te=ut(B,H,Z,re);return fr=null,Te}catch(Ne){if(Ne===dr||Ne===$u)throw Ne;var Ie=Qt(29,Ne,null,B.mode);return Ie.lanes=re,Ie.return=B,Ie}finally{}}}var bs=ah(!0),nh=ah(!1),pl=!1;function Uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ho(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sl(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Pe&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=ms(e),hs(e,null,a),t}return _a(e,n,t,a),ms(e)}function di(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,ia(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 y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=y:c=c.next=y,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 qo=!1;function fi(){if(qo){var e=or;if(e!==null)throw e}}function hi(e,t,a,n){qo=!1;var i=e.updateQueue;pl=!1;var c=i.firstBaseUpdate,y=i.lastBaseUpdate,w=i.shared.pending;if(w!==null){i.shared.pending=null;var R=w,F=R.next;R.next=null,y===null?c=F:y.next=F,y=R;var le=e.alternate;le!==null&&(le=le.updateQueue,w=le.lastBaseUpdate,w!==y&&(w===null?le.firstBaseUpdate=F:w.next=F,le.lastBaseUpdate=R))}if(c!==null){var ue=i.baseState;y=0,le=F=R=null,w=c;do{var Q=w.lane&-536870913,P=Q!==w.lane;if(P?(Qe&Q)===Q:(n&Q)===Q){Q!==0&&Q===cr&&(qo=!0),le!==null&&(le=le.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var be=e,De=w;Q=t;var ut=a;switch(De.tag){case 1:if(be=De.payload,typeof be=="function"){ue=be.call(ut,ue,Q);break e}ue=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=De.payload,Q=typeof be=="function"?be.call(ut,ue,Q):be,Q==null)break e;ue=M({},ue,Q);break e;case 2:pl=!0}}Q=w.callback,Q!==null&&(e.flags|=64,P&&(e.flags|=8192),P=i.callbacks,P===null?i.callbacks=[Q]:P.push(Q))}else P={lane:Q,tag:w.tag,payload:w.payload,callback:w.callback,next:null},le===null?(F=le=P,R=ue):le=le.next=P,y|=Q;if(w=w.next,w===null){if(w=i.shared.pending,w===null)break;P=w,w=P.next,P.next=null,i.lastBaseUpdate=P,i.shared.pending=null}}while(!0);le===null&&(R=ue),i.baseState=R,i.firstBaseUpdate=F,i.lastBaseUpdate=le,c===null&&(i.shared.lanes=0),Ml|=y,e.lanes=y,e.memoizedState=ue}}function lh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function sh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)lh(a[e],t)}var hr=b(null),Qu=b(0);function rh(e,t){e=Vn,ie(Qu,e),ie(hr,t),Vn=e|t.baseLanes}function Vo(){ie(Qu,Vn),ie(hr,hr.current)}function Bo(){Vn=Qu.current,Y(hr),Y(Qu)}var Na=b(null),qa=null;function Nl(e){var t=e.alternate;ie(Et,Et.current&1),ie(Na,e),qa===null&&(t===null||hr.current!==null||t.memoizedState!==null)&&(qa=e)}function Yo(e){ie(Et,Et.current),ie(Na,e),qa===null&&(qa=e)}function ih(e){e.tag===22?(ie(Et,Et.current),ie(Na,e),qa===null&&(qa=e)):wl()}function wl(){ie(Et,Et.current),ie(Na,Na.current)}function wa(e){Y(Na),qa===e&&(qa=null),Y(Et)}var Et=b(0);function Wu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Wd(a)||Xd(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,He=null,rt=null,Dt=null,Xu=!1,mr=!1,Ss=!1,Iu=0,mi=0,xr=null,dy=0;function bt(){throw Error(o(321))}function $o(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ta(e[a],t[a]))return!1;return!0}function Go(e,t,a,n,i,c){return _n=c,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Gh:sd,Ss=!1,c=a(n,i),Ss=!1,mr&&(c=ch(t,a,n,i)),uh(e),c}function uh(e){G.H=yi;var t=rt!==null&&rt.next!==null;if(_n=0,Dt=rt=He=null,Xu=!1,mi=0,xr=null,t)throw Error(o(300));e===null||Rt||(e=e.dependencies,e!==null&&ur(e)&&(Rt=!0))}function ch(e,t,a,n){He=e;var i=0;do{if(mr&&(xr=null),mi=0,mr=!1,25<=i)throw Error(o(301));if(i+=1,Dt=rt=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}G.H=Zh,c=t(a,n)}while(mr);return c}function fy(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?xi(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(He.flags|=1024),t}function Zo(){var e=Iu!==0;return Iu=0,e}function Fo(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Qo(e){if(Xu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Xu=!1}_n=0,Dt=rt=He=null,mr=!1,mi=Iu=0,xr=null}function sa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?He.memoizedState=Dt=e:Dt=Dt.next=e,Dt}function Mt(){if(rt===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Dt===null?He.memoizedState:Dt.next;if(t!==null)Dt=t,rt=e;else{if(e===null)throw He.alternate===null?Error(o(467)):Error(o(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Dt===null?He.memoizedState=Dt=e:Dt=Dt.next=e}return Dt}function Ju(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xi(e){var t=mi;return mi+=1,xr===null&&(xr=[]),e=Pf(xr,e,t),t=He,(Dt===null?t.memoizedState:Dt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Gh:sd),e}function Ku(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return xi(e);if(e.$$typeof===ne)return Wt(e)}throw Error(o(438,String(e)))}function Wo(e){var t=null,a=He.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=He.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(),He.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]=k;return t.index++,a}function An(e,t){return typeof t=="function"?t(e):t}function Pu(e){var t=Mt();return Xo(t,rt,e)}function Xo(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 y=i.next;i.next=c.next,c.next=y}t.baseQueue=i=c,n.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var w=y=null,R=null,F=t,le=!1;do{var ue=F.lane&-536870913;if(ue!==F.lane?(Qe&ue)===ue:(_n&ue)===ue){var Q=F.revertLane;if(Q===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ue===cr&&(le=!0);else if((_n&Q)===Q){F=F.next,Q===cr&&(le=!0);continue}else ue={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},R===null?(w=R=ue,y=c):R=R.next=ue,He.lanes|=Q,Ml|=Q;ue=F.action,Ss&&a(c,ue),c=F.hasEagerState?F.eagerState:a(c,ue)}else Q={lane:ue,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},R===null?(w=R=Q,y=c):R=R.next=Q,He.lanes|=ue,Ml|=ue;F=F.next}while(F!==null&&F!==t);if(R===null?y=c:R.next=w,!ta(c,e.memoizedState)&&(Rt=!0,le&&(a=or,a!==null)))throw a;e.memoizedState=c,e.baseState=y,e.baseQueue=R,n.lastRenderedState=c}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Io(e){var t=Mt(),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 y=i=i.next;do c=e(c,y.action),y=y.next;while(y!==i);ta(c,t.memoizedState)||(Rt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,n]}function oh(e,t,a){var n=He,i=Mt(),c=L;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var y=!ta((rt||i).memoizedState,a);if(y&&(i.memoizedState=a,Rt=!0),i=i.queue,Po(hh.bind(null,n,i,e),[e]),i.getSnapshot!==t||y||Dt!==null&&Dt.memoizedState.tag&1){if(n.flags|=2048,gr(9,{destroy:void 0},fh.bind(null,n,i,a,t),null),dt===null)throw Error(o(349));c||(_n&127)!==0||dh(n,t,a)}return a}function dh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=He.updateQueue,t===null?(t=Ju(),He.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function fh(e,t,a,n){t.value=a,t.getSnapshot=n,mh(t)&&xh(e)}function hh(e,t,a){return a(function(){mh(t)&&xh(e)})}function mh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ta(e,a)}catch{return!0}}function xh(e){var t=Aa(e,2);t!==null&&ya(t,e,2)}function Jo(e){var t=sa();if(typeof e=="function"){var a=e;if(e=a(),Ss){Yt(!0);try{a()}finally{Yt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:e},t}function gh(e,t,a,n){return e.baseState=a,Xo(e,rt,typeof n=="function"?n:An)}function hy(e,t,a,n,i){if(ac(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(y){c.listeners.push(y)}};G.T!==null?a(!0):c.isTransition=!1,n(c),a=t.pending,a===null?(c.next=t.pending=c,yh(t,c)):(c.next=a.next,t.pending=a.next=c)}}function yh(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var c=G.T,y={};G.T=y;try{var w=a(i,n),R=G.S;R!==null&&R(y,w),vh(e,t,w)}catch(F){Ko(e,t,F)}finally{c!==null&&y.types!==null&&(c.types=y.types),G.T=c}}else try{c=a(i,n),vh(e,t,c)}catch(F){Ko(e,t,F)}}function vh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){ph(e,t,n)},function(n){return Ko(e,t,n)}):ph(e,t,a)}function ph(e,t,a){t.status="fulfilled",t.value=a,bh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,yh(e,a)))}function Ko(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,bh(t),t=t.next;while(t!==n)}e.action=null}function bh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sh(e,t){return t}function Nh(e,t){if(L){var a=dt.formState;if(a!==null){e:{var n=He;if(L){if(U){t:{for(var i=U,c=pe;i.nodeType!==8;){if(!c){i=null;break t}if(i=Va(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){U=Va(i.nextSibling),n=i.data==="F!";break e}}Fe(n)}n=!1}n&&(t=a[0])}}return a=sa(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sh,lastRenderedState:t},a.queue=n,a=Bh.bind(null,He,n),n.dispatch=a,n=Jo(!1),c=ld.bind(null,He,!1,n.queue),n=sa(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=hy.bind(null,He,i,c,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function wh(e){var t=Mt();return jh(t,rt,e)}function jh(e,t,a){if(t=Xo(e,t,Sh)[0],e=Pu(An)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=xi(t)}catch(y){throw y===dr?$u:y}else n=t;t=Mt();var i=t.queue,c=i.dispatch;return a!==t.memoizedState&&(He.flags|=2048,gr(9,{destroy:void 0},my.bind(null,i,a),null)),[n,c,e]}function my(e,t){e.action=t}function Eh(e){var t=Mt(),a=rt;if(a!==null)return jh(t,a,e);Mt(),t=t.memoizedState,a=Mt();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function gr(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=He.updateQueue,t===null&&(t=Ju(),He.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 Mh(){return Mt().memoizedState}function ec(e,t,a,n){var i=sa();He.flags|=e,i.memoizedState=gr(1|t,{destroy:void 0},a,n===void 0?null:n)}function tc(e,t,a,n){var i=Mt();n=n===void 0?null:n;var c=i.memoizedState.inst;rt!==null&&n!==null&&$o(n,rt.memoizedState.deps)?i.memoizedState=gr(t,c,a,n):(He.flags|=e,i.memoizedState=gr(1|t,c,a,n))}function Th(e,t){ec(8390656,8,e,t)}function Po(e,t){tc(2048,8,e,t)}function xy(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=Ju(),He.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Ch(e){var t=Mt().memoizedState;return xy({ref:t,nextImpl:e}),function(){if((Pe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Oh(e,t){return tc(4,2,e,t)}function Dh(e,t){return tc(4,4,e,t)}function Rh(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 _h(e,t,a){a=a!=null?a.concat([e]):null,tc(4,4,Rh.bind(null,t,e),a)}function ed(){}function Ah(e,t){var a=Mt();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&$o(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function kh(e,t){var a=Mt();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&$o(t,n[1]))return n[0];if(n=e(),Ss){Yt(!0);try{e()}finally{Yt(!1)}}return a.memoizedState=[n,t],n}function td(e,t,a){return a===void 0||(_n&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=zm(),He.lanes|=e,Ml|=e,a)}function zh(e,t,a,n){return ta(a,t)?a:hr.current!==null?(e=td(e,a,n),ta(e,t)||(Rt=!0),e):(_n&42)===0||(_n&1073741824)!==0&&(Qe&261930)===0?(Rt=!0,e.memoizedState=a):(e=zm(),He.lanes|=e,Ml|=e,t)}function Uh(e,t,a,n,i){var c=se.p;se.p=c!==0&&8>c?c:8;var y=G.T,w={};G.T=w,ld(e,!1,t,a);try{var R=i(),F=G.S;if(F!==null&&F(w,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var le=oy(R,n);gi(e,t,le,Ma(e))}else gi(e,t,n,Ma(e))}catch(ue){gi(e,t,{then:function(){},status:"rejected",reason:ue},Ma())}finally{se.p=c,y!==null&&w.types!==null&&(y.types=w.types),G.T=y}}function gy(){}function ad(e,t,a,n){if(e.tag!==5)throw Error(o(476));var i=Hh(e).queue;Uh(e,i,t,me,a===null?gy:function(){return Lh(e),a(n)})}function Hh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:me},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:An,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Lh(e){var t=Hh(e);t.next===null&&(t=e.alternate.memoizedState),gi(e,t.next.queue,{},Ma())}function nd(){return Wt(Ai)}function qh(){return Mt().memoizedState}function Vh(){return Mt().memoizedState}function yy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ma();e=bl(a);var n=Sl(t,e,a);n!==null&&(ya(n,t,a),di(n,t,a)),t={cache:_o()},e.payload=t;return}t=t.return}}function vy(e,t,a){var n=Ma();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ac(e)?Yh(t,a):(a=nr(e,t,a,n),a!==null&&(ya(a,e,n),$h(a,t,n)))}function Bh(e,t,a){var n=Ma();gi(e,t,a,n)}function gi(e,t,a,n){var i={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ac(e))Yh(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var y=t.lastRenderedState,w=c(y,a);if(i.hasEagerState=!0,i.eagerState=w,ta(w,y))return _a(e,t,i,0),dt===null&&yl(),!1}catch{}finally{}if(a=nr(e,t,i,n),a!==null)return ya(a,e,n),$h(a,t,n),!0}return!1}function ld(e,t,a,n){if(n={lane:2,revertLane:Ud(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ac(e)){if(t)throw Error(o(479))}else t=nr(e,a,n,2),t!==null&&ya(t,e,2)}function ac(e){var t=e.alternate;return e===He||t!==null&&t===He}function Yh(e,t){mr=Xu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function $h(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,ia(e,a)}}var yi={readContext:Wt,use:Ku,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};yi.useEffectEvent=bt;var Gh={readContext:Wt,use:Ku,useCallback:function(e,t){return sa().memoizedState=[e,t===void 0?null:t],e},useContext:Wt,useEffect:Th,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ec(4194308,4,Rh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ec(4194308,4,e,t)},useInsertionEffect:function(e,t){ec(4,2,e,t)},useMemo:function(e,t){var a=sa();t=t===void 0?null:t;var n=e();if(Ss){Yt(!0);try{e()}finally{Yt(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=sa();if(a!==void 0){var i=a(t);if(Ss){Yt(!0);try{a(t)}finally{Yt(!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=vy.bind(null,He,e),[n.memoizedState,e]},useRef:function(e){var t=sa();return e={current:e},t.memoizedState=e},useState:function(e){e=Jo(e);var t=e.queue,a=Bh.bind(null,He,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ed,useDeferredValue:function(e,t){var a=sa();return td(a,e,t)},useTransition:function(){var e=Jo(!1);return e=Uh.bind(null,He,e.queue,!0,!1),sa().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=He,i=sa();if(L){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),dt===null)throw Error(o(349));(Qe&127)!==0||dh(n,t,a)}i.memoizedState=a;var c={value:a,getSnapshot:t};return i.queue=c,Th(hh.bind(null,n,c,e),[e]),n.flags|=2048,gr(9,{destroy:void 0},fh.bind(null,n,c,a,t),null),a},useId:function(){var e=sa(),t=dt.identifierPrefix;if(L){var a=h,n=Ua;a=(n&~(1<<32-$t(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Iu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=dy++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:nd,useFormState:Nh,useActionState:Nh,useOptimistic:function(e){var t=sa();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ld.bind(null,He,!0,a),a.dispatch=t,[e,t]},useMemoCache:Wo,useCacheRefresh:function(){return sa().memoizedState=yy.bind(null,He)},useEffectEvent:function(e){var t=sa(),a={impl:e};return t.memoizedState=a,function(){if((Pe&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},sd={readContext:Wt,use:Ku,useCallback:Ah,useContext:Wt,useEffect:Po,useImperativeHandle:_h,useInsertionEffect:Oh,useLayoutEffect:Dh,useMemo:kh,useReducer:Pu,useRef:Mh,useState:function(){return Pu(An)},useDebugValue:ed,useDeferredValue:function(e,t){var a=Mt();return zh(a,rt.memoizedState,e,t)},useTransition:function(){var e=Pu(An)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:oh,useId:qh,useHostTransitionStatus:nd,useFormState:wh,useActionState:wh,useOptimistic:function(e,t){var a=Mt();return gh(a,rt,e,t)},useMemoCache:Wo,useCacheRefresh:Vh};sd.useEffectEvent=Ch;var Zh={readContext:Wt,use:Ku,useCallback:Ah,useContext:Wt,useEffect:Po,useImperativeHandle:_h,useInsertionEffect:Oh,useLayoutEffect:Dh,useMemo:kh,useReducer:Io,useRef:Mh,useState:function(){return Io(An)},useDebugValue:ed,useDeferredValue:function(e,t){var a=Mt();return rt===null?td(a,e,t):zh(a,rt.memoizedState,e,t)},useTransition:function(){var e=Io(An)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:xi(e),t]},useSyncExternalStore:oh,useId:qh,useHostTransitionStatus:nd,useFormState:Eh,useActionState:Eh,useOptimistic:function(e,t){var a=Mt();return rt!==null?gh(a,rt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Wo,useCacheRefresh:Vh};Zh.useEffectEvent=Ch;function rd(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:M({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var id={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Ma(),i=bl(n);i.payload=t,a!=null&&(i.callback=a),t=Sl(e,i,n),t!==null&&(ya(t,e,n),di(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Ma(),i=bl(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=Sl(e,i,n),t!==null&&(ya(t,e,n),di(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ma(),n=bl(a);n.tag=2,t!=null&&(n.callback=t),t=Sl(e,n,a),t!==null&&(ya(t,e,a),di(t,e,a))}};function Fh(e,t,a,n,i,c,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,y):t.prototype&&t.prototype.isPureReactComponent?!os(a,n)||!os(i,c):!0}function Qh(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&&id.enqueueReplaceState(t,t.state,null)}function Ns(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=M({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Wh(e){gl(e)}function Xh(e){console.error(e)}function Ih(e){gl(e)}function nc(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Jh(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 ud(e,t,a){return a=bl(a),a.tag=3,a.payload={element:null},a.callback=function(){nc(e,t)},a}function Kh(e){return e=bl(e),e.tag=3,e}function Ph(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(){Jh(t,a,n)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Jh(t,a,n),typeof i!="function"&&(Tl===null?Tl=new Set([this]):Tl.add(this));var w=n.stack;this.componentDidCatch(n.value,{componentStack:w!==null?w:""})})}function py(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&La(t,a,i,!0),a=Na.current,a!==null){switch(a.tag){case 31:case 13:return qa===null?xc():a.alternate===null&&St===0&&(St=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),xc(),!1}if(L)return t=Na.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==ze&&(e=Error(o(422),{cause:n}),en(da(e,a)))):(n!==ze&&(t=Error(o(423),{cause:n}),en(da(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=da(n,a),i=ud(e.stateNode,n,i),Lo(e,i),St!==4&&(St=2)),!1;var c=Error(o(520),{cause:n});if(c=da(c,a),Ei===null?Ei=[c]:Ei.push(c),St!==4&&(St=2),t===null)return!0;n=da(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=ud(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"&&(Tl===null||!Tl.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=Kh(i),Ph(i,e,a,n),Lo(a,i),!1}a=a.return}while(a!==null);return!1}var cd=Error(o(461)),Rt=!1;function Xt(e,t,a,n){t.child=e===null?nh(t,null,a,n):bs(t,e.child,a,n)}function em(e,t,a,n,i){a=a.render;var c=t.ref;if("ref"in n){var y={};for(var w in n)w!=="ref"&&(y[w]=n[w])}else y=n;return gs(t),n=Go(e,t,a,y,c,i),w=Zo(),e!==null&&!Rt?(Fo(e,t,i),kn(e,t,i)):(L&&w&&v(t),t.flags|=1,Xt(e,t,n,i),t.child)}function tm(e,t,a,n,i){if(e===null){var c=a.type;return typeof c=="function"&&!sr(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,am(e,t,c,n,i)):(e=rr(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 y=c.memoizedProps;if(a=a.compare,a=a!==null?a:os,a(y,n)&&e.ref===t.ref)return kn(e,t,i)}return t.flags|=1,e=ka(c,n),e.ref=t.ref,e.return=t,t.child=e}function am(e,t,a,n,i){if(e!==null){var c=e.memoizedProps;if(os(c,n)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=n=c,yd(e,i))(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,kn(e,t,i)}return od(e,t,a,n,i)}function nm(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 lm(e,t,c,a,n)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yu(t,c!==null?c.cachePool:null),c!==null?rh(t,c):Vo(),ih(t);else return n=t.lanes=536870912,lm(e,t,c!==null?c.baseLanes|a:a,a,n)}else c!==null?(Yu(t,c.cachePool),rh(t,c),wl(),t.memoizedState=null):(e!==null&&Yu(t,null),Vo(),wl());return Xt(e,t,i,a),t.child}function vi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lm(e,t,a,n,i){var c=ko();return c=c===null?null:{parent:Ot._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Yu(t,null),Vo(),ih(t),e!==null&&La(e,t,n,!0),t.childLanes=i,null}function lc(e,t){return t=rc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sm(e,t,a){return bs(t,e.child,null,a),e=lc(t,t.pendingProps),e.flags|=2,wa(t),t.memoizedState=null,e}function by(e,t,a){var n=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(L){if(n.mode==="hidden")return e=lc(t,n),t.lanes=536870912,vi(null,e);if(Yo(t),(e=U)?(e=y0(e,pe),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fa!==null?{id:Ua,overflow:h}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,z=t,U=null)):e=null,e===null)throw Fe(t);return t.lanes=536870912,null}return lc(t,n)}var c=e.memoizedState;if(c!==null){var y=c.dehydrated;if(Yo(t),i)if(t.flags&256)t.flags&=-257,t=sm(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Rt||La(e,t,a,!1),i=(a&e.childLanes)!==0,Rt||i){if(n=dt,n!==null&&(y=Hr(n,a),y!==0&&y!==c.retryLane))throw c.retryLane=y,Aa(e,y),ya(n,e,y),cd;xc(),t=sm(e,t,a)}else e=c.treeContext,U=Va(y.nextSibling),z=t,L=!0,de=null,pe=!1,e!==null&&D(t,e),t=lc(t,n),t.flags|=4096;return t}return e=ka(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(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 od(e,t,a,n,i){return gs(t),a=Go(e,t,a,n,void 0,i),n=Zo(),e!==null&&!Rt?(Fo(e,t,i),kn(e,t,i)):(L&&n&&v(t),t.flags|=1,Xt(e,t,a,i),t.child)}function rm(e,t,a,n,i,c){return gs(t),t.updateQueue=null,a=ch(t,n,a,i),uh(e),n=Zo(),e!==null&&!Rt?(Fo(e,t,c),kn(e,t,c)):(L&&n&&v(t),t.flags|=1,Xt(e,t,a,c),t.child)}function im(e,t,a,n,i){if(gs(t),t.stateNode===null){var c=Sa,y=a.contextType;typeof y=="object"&&y!==null&&(c=Wt(y)),c=new a(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=id,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Uo(t),y=a.contextType,c.context=typeof y=="object"&&y!==null?Wt(y):Sa,c.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(rd(t,a,y,n),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&id.enqueueReplaceState(c,c.state,null),hi(t,n,c,i),fi(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var w=t.memoizedProps,R=Ns(a,w);c.props=R;var F=c.context,le=a.contextType;y=Sa,typeof le=="object"&&le!==null&&(y=Wt(le));var ue=a.getDerivedStateFromProps;le=typeof ue=="function"||typeof c.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,le||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(w||F!==y)&&Qh(t,c,n,y),pl=!1;var Q=t.memoizedState;c.state=Q,hi(t,n,c,i),fi(),F=t.memoizedState,w||Q!==F||pl?(typeof ue=="function"&&(rd(t,a,ue,n),F=t.memoizedState),(R=pl||Fh(t,a,R,n,Q,F,y))?(le||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=F),c.props=n,c.state=F,c.context=y,n=R):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Ho(e,t),y=t.memoizedProps,le=Ns(a,y),c.props=le,ue=t.pendingProps,Q=c.context,F=a.contextType,R=Sa,typeof F=="object"&&F!==null&&(R=Wt(F)),w=a.getDerivedStateFromProps,(F=typeof w=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==ue||Q!==R)&&Qh(t,c,n,R),pl=!1,Q=t.memoizedState,c.state=Q,hi(t,n,c,i),fi();var P=t.memoizedState;y!==ue||Q!==P||pl||e!==null&&e.dependencies!==null&&ur(e.dependencies)?(typeof w=="function"&&(rd(t,a,w,n),P=t.memoizedState),(le=pl||Fh(t,a,le,n,Q,P,R)||e!==null&&e.dependencies!==null&&ur(e.dependencies))?(F||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,P,R),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,P,R)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=P),c.props=n,c.state=P,c.context=R,n=le):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,sc(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=bs(t,e.child,null,i),t.child=bs(t,null,a,i)):Xt(e,t,a,i),t.memoizedState=c.state,e=t.child):e=kn(e,t,i),e}function um(e,t,a,n){return qt(),t.flags|=256,Xt(e,t,a,n),t.child}var dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fd(e){return{baseLanes:e,cachePool:Jf()}}function hd(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Ea),e}function cm(e,t,a){var n=t.pendingProps,i=!1,c=(t.flags&128)!==0,y;if((y=c)||(y=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),y&&(i=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(L){if(i?Nl(t):wl(),(e=U)?(e=y0(e,pe),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fa!==null?{id:Ua,overflow:h}:null,retryLane:536870912,hydrationErrors:null},a=Vu(e),a.return=t,t.child=a,z=t,U=null)):e=null,e===null)throw Fe(t);return Xd(e)?t.lanes=32:t.lanes=536870912,null}var w=n.children;return n=n.fallback,i?(wl(),i=t.mode,w=rc({mode:"hidden",children:w},i),n=za(n,i,a,null),w.return=t,n.return=t,w.sibling=n,t.child=w,n=t.child,n.memoizedState=fd(a),n.childLanes=hd(e,y,a),t.memoizedState=dd,vi(null,n)):(Nl(t),md(t,w))}var R=e.memoizedState;if(R!==null&&(w=R.dehydrated,w!==null)){if(c)t.flags&256?(Nl(t),t.flags&=-257,t=xd(e,t,a)):t.memoizedState!==null?(wl(),t.child=e.child,t.flags|=128,t=null):(wl(),w=n.fallback,i=t.mode,n=rc({mode:"visible",children:n.children},i),w=za(w,i,a,null),w.flags|=2,n.return=t,w.return=t,n.sibling=w,t.child=n,bs(t,e.child,null,a),n=t.child,n.memoizedState=fd(a),n.childLanes=hd(e,y,a),t.memoizedState=dd,t=vi(null,n));else if(Nl(t),Xd(w)){if(y=w.nextSibling&&w.nextSibling.dataset,y)var F=y.dgst;y=F,n=Error(o(419)),n.stack="",n.digest=y,en({value:n,source:null,stack:null}),t=xd(e,t,a)}else if(Rt||La(e,t,a,!1),y=(a&e.childLanes)!==0,Rt||y){if(y=dt,y!==null&&(n=Hr(y,a),n!==0&&n!==R.retryLane))throw R.retryLane=n,Aa(e,n),ya(y,e,n),cd;Wd(w)||xc(),t=xd(e,t,a)}else Wd(w)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,U=Va(w.nextSibling),z=t,L=!0,de=null,pe=!1,e!==null&&D(t,e),t=md(t,n.children),t.flags|=4096);return t}return i?(wl(),w=n.fallback,i=t.mode,R=e.child,F=R.sibling,n=ka(R,{mode:"hidden",children:n.children}),n.subtreeFlags=R.subtreeFlags&65011712,F!==null?w=ka(F,w):(w=za(w,i,a,null),w.flags|=2),w.return=t,n.return=t,n.sibling=w,t.child=n,vi(null,n),n=t.child,w=e.child.memoizedState,w===null?w=fd(a):(i=w.cachePool,i!==null?(R=Ot._currentValue,i=i.parent!==R?{parent:R,pool:R}:i):i=Jf(),w={baseLanes:w.baseLanes|a,cachePool:i}),n.memoizedState=w,n.childLanes=hd(e,y,a),t.memoizedState=dd,vi(e.child,n)):(Nl(t),a=e.child,e=a.sibling,a=ka(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function md(e,t){return t=rc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rc(e,t){return e=Qt(22,e,null,t),e.lanes=0,e}function xd(e,t,a){return bs(t,e.child,null,a),e=md(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function om(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ri(e.return,t,a)}function gd(e,t,a,n,i,c){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i,treeForkCount:c}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=n,y.tail=a,y.tailMode=i,y.treeForkCount=c)}function dm(e,t,a){var n=t.pendingProps,i=n.revealOrder,c=n.tail;n=n.children;var y=Et.current,w=(y&2)!==0;if(w?(y=y&1|2,t.flags|=128):y&=1,ie(Et,y),Xt(e,t,n,a),n=L?Pa:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&om(e,a,t);else if(e.tag===19)om(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&&Wu(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&&Wu(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 kn(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ml|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(La(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=ka(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ka(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&&ur(e)))}function Sy(e,t,a){switch(t.tag){case 3:ke(t,t.stateNode.containerInfo),xn(t,Ot,e.memoizedState.cache),qt();break;case 27:case 5:ot(t);break;case 4:ke(t,t.stateNode.containerInfo);break;case 10:xn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yo(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Nl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?cm(e,t,a):(Nl(t),e=kn(e,t,a),e!==null?e.sibling:null);Nl(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(La(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return dm(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ie(Et,Et.current),n)break;return null;case 22:return t.lanes=0,nm(e,t,a,t.pendingProps);case 24:xn(t,Ot,e.memoizedState.cache)}return kn(e,t,a)}function fm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Rt=!0;else{if(!yd(e,a)&&(t.flags&128)===0)return Rt=!1,Sy(e,t,a);Rt=(e.flags&131072)!==0}else Rt=!1,L&&(t.flags&1048576)!==0&&f(t,Pa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=vs(t.elementType),t.type=e,typeof e=="function")sr(e)?(n=Ns(e,n),t.tag=1,t=im(null,t,e,n,a)):(t.tag=0,t=od(null,t,e,n,a));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=em(null,t,e,n,a);break e}else if(i===W){t.tag=14,t=tm(null,t,e,n,a);break e}}throw t=ge(e)||e,Error(o(306,t,""))}}return t;case 0:return od(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Ns(n,t.pendingProps),im(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,Ho(e,t),hi(t,n,null,a);var y=t.memoizedState;if(n=y.cache,xn(t,Ot,n),n!==c.cache&&Rn(t,[Ot],a,!0),fi(),n=y.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=um(e,t,n,a);break e}else if(n!==i){i=da(Error(o(424)),t),en(i),t=um(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(U=Va(e.firstChild),z=t,L=!0,de=null,pe=!0,a=nh(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(qt(),n===i){t=kn(e,t,a);break e}Xt(e,t,n,a)}t=t.child}return t;case 26:return sc(e,t),e===null?(a=w0(t.type,null,t.pendingProps,null))?t.memoizedState=a:L||(a=t.type,e=t.pendingProps,n=Nc(fe.current).createElement(a),n[Nt]=t,n[At]=e,It(n,a,e),Ct(n),t.stateNode=n):t.memoizedState=w0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ot(t),e===null&&L&&(n=t.stateNode=b0(t.type,t.pendingProps,fe.current),z=t,pe=!0,i=U,Rl(t.type)?(Id=i,U=Va(n.firstChild)):U=i),Xt(e,t,t.pendingProps.children,a),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&L&&((i=n=U)&&(n=Jy(n,t.type,t.pendingProps,pe),n!==null?(t.stateNode=n,z=t,U=Va(n.firstChild),pe=!1,i=!0):i=!1),i||Fe(t)),ot(t),i=t.type,c=t.pendingProps,y=e!==null?e.memoizedProps:null,n=c.children,Zd(i,c)?n=null:y!==null&&Zd(i,y)&&(t.flags|=32),t.memoizedState!==null&&(i=Go(e,t,fy,null,null,a),Ai._currentValue=i),sc(e,t),Xt(e,t,n,a),t.child;case 6:return e===null&&L&&((e=a=U)&&(a=Ky(a,t.pendingProps,pe),a!==null?(t.stateNode=a,z=t,U=null,e=!0):e=!1),e||Fe(t)),null;case 13:return cm(e,t,a);case 4:return ke(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=bs(t,null,n,a):Xt(e,t,n,a),t.child;case 11:return em(e,t,t.type,t.pendingProps,a);case 7:return Xt(e,t,t.pendingProps,a),t.child;case 8:return Xt(e,t,t.pendingProps.children,a),t.child;case 12:return Xt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,xn(t,t.type,n.value),Xt(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,gs(t),i=Wt(i),n=n(i),t.flags|=1,Xt(e,t,n,a),t.child;case 14:return tm(e,t,t.type,t.pendingProps,a);case 15:return am(e,t,t.type,t.pendingProps,a);case 19:return dm(e,t,a);case 31:return by(e,t,a);case 22:return nm(e,t,a,t.pendingProps);case 24:return gs(t),n=Wt(Ot),e===null?(i=ko(),i===null&&(i=dt,c=_o(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),t.memoizedState={parent:n,cache:i},Uo(t),xn(t,Ot,i)):((e.lanes&a)!==0&&(Ho(e,t),hi(t,null,null,a),fi()),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),xn(t,Ot,n)):(n=c.cache,xn(t,Ot,n),n!==i.cache&&Rn(t,[Ot],a,!0))),Xt(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 vd(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(qm())e.flags|=8192;else throw ps=Gu,zo}else e.flags&=-16777217}function hm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!C0(t))if(qm())e.flags|=8192;else throw ps=Gu,zo}function ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ur():536870912,e.lanes|=t,br|=t)}function pi(e,t){if(!L)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 mt(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 Ny(e,t,a){var n=t.pendingProps;switch(N(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),tn(Ot),_e(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Lt(t)?zn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,mn())),mt(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(zn(t),c!==null?(mt(t),hm(t,c)):(mt(t),vd(t,i,null,n,a))):c?c!==e.memoizedState?(zn(t),mt(t),hm(t,c)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&zn(t),mt(t),vd(t,i,e,n,a)),null;case 27:if(Jt(t),a=fe.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 mt(t),null}e=he.current,Lt(t)?Oe(t):(e=b0(i,n,a),t.stateNode=e,zn(t))}return mt(t),null;case 5:if(Jt(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 mt(t),null}if(c=he.current,Lt(t))Oe(t);else{var y=Nc(fe.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?y.createElement("select",{is:n.is}):y.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?y.createElement(i,{is:n.is}):y.createElement(i)}}c[Nt]=t,c[At]=n;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=c;e:switch(It(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 mt(t),vd(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=fe.current,Lt(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=z,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||c0(e.nodeValue,a)),e||Fe(t,!0)}else e=Nc(e).createTextNode(n),e[Nt]=t,t.stateNode=e}return mt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Lt(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[Nt]=t}else qt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else a=mn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(wa(t),t):(wa(t),null);if((t.flags&128)!==0)throw Error(o(558))}return mt(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Lt(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[Nt]=t}else qt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),i=!1}else i=mn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(wa(t),t):(wa(t),null)}return wa(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),ic(t,t.updateQueue),mt(t),null);case 4:return _e(),e===null&&Vd(t.stateNode.containerInfo),mt(t),null;case 10:return tn(t.type),mt(t),null;case 19:if(Y(Et),n=t.memoizedState,n===null)return mt(t),null;if(i=(t.flags&128)!==0,c=n.rendering,c===null)if(i)pi(n,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Wu(e),c!==null){for(t.flags|=128,pi(n,!1),e=c.updateQueue,t.updateQueue=e,ic(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)qu(a,e),a=a.sibling;return ie(Et,Et.current&1|2),L&&r(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&Ut()>fc&&(t.flags|=128,i=!0,pi(n,!1),t.lanes=4194304)}else{if(!i)if(e=Wu(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ic(t,e),pi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!L)return mt(t),null}else 2*Ut()-n.renderingStartTime>fc&&a!==536870912&&(t.flags|=128,i=!0,pi(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=Ut(),e.sibling=null,a=Et.current,ie(Et,i?a&1|2:a&1),L&&r(t,n.treeForkCount),e):(mt(t),null);case 22:case 23:return wa(t),Bo(),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&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),a=t.updateQueue,a!==null&&ic(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Y(ys),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),tn(Ot),mt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function wy(e,t){switch(N(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return tn(Ot),_e(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Jt(t),null;case 31:if(t.memoizedState!==null){if(wa(t),t.alternate===null)throw Error(o(340));qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));qt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Et),null;case 4:return _e(),null;case 10:return tn(t.type),null;case 22:case 23:return wa(t),Bo(),e!==null&&Y(ys),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return tn(Ot),null;case 25:return null;default:return null}}function mm(e,t){switch(N(t),t.tag){case 3:tn(Ot),_e();break;case 26:case 27:case 5:Jt(t);break;case 4:_e();break;case 31:t.memoizedState!==null&&wa(t);break;case 13:wa(t);break;case 19:Y(Et);break;case 10:tn(t.type);break;case 22:case 23:wa(t),Bo(),e!==null&&Y(ys);break;case 24:tn(Ot)}}function bi(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,y=a.inst;n=c(),y.destroy=n}a=a.next}while(a!==i)}}catch(w){nt(t,t.return,w)}}function jl(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 y=n.inst,w=y.destroy;if(w!==void 0){y.destroy=void 0,i=t;var R=a,F=w;try{F()}catch(le){nt(i,R,le)}}}n=n.next}while(n!==c)}}catch(le){nt(t,t.return,le)}}function xm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{sh(t,a)}catch(n){nt(e,e.return,n)}}}function gm(e,t,a){a.props=Ns(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){nt(e,t,n)}}function Si(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){nt(e,t,i)}}function gn(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){nt(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){nt(e,t,i)}else a.current=null}function ym(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){nt(e,e.return,i)}}function pd(e,t,a){try{var n=e.stateNode;Zy(n,e.type,a,t),n[At]=t}catch(i){nt(e,e.return,i)}}function vm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Rl(e.type)||e.tag===4}function bd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vm(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&&Rl(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 Sd(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=Da));else if(n!==4&&(n===27&&Rl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Sd(e,t,a),e=e.sibling;e!==null;)Sd(e,t,a),e=e.sibling}function uc(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&&Rl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(uc(e,t,a),e=e.sibling;e!==null;)uc(e,t,a),e=e.sibling}function pm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);It(t,n,a),t[Nt]=e,t[At]=a}catch(c){nt(e,e.return,c)}}var Un=!1,_t=!1,Nd=!1,bm=typeof WeakSet=="function"?WeakSet:Set,Vt=null;function jy(e,t){if(e=e.containerInfo,$d=Oc,e=Oo(e),Ps(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 y=0,w=-1,R=-1,F=0,le=0,ue=e,Q=null;t:for(;;){for(var P;ue!==a||i!==0&&ue.nodeType!==3||(w=y+i),ue!==c||n!==0&&ue.nodeType!==3||(R=y+n),ue.nodeType===3&&(y+=ue.nodeValue.length),(P=ue.firstChild)!==null;)Q=ue,ue=P;for(;;){if(ue===e)break t;if(Q===a&&++F===i&&(w=y),Q===c&&++le===n&&(R=y),(P=ue.nextSibling)!==null)break;ue=Q,Q=ue.parentNode}ue=P}a=w===-1||R===-1?null:{start:w,end:R}}else a=null}a=a||{start:0,end:0}}else a=null;for(Gd={focusedElem:e,selectionRange:a},Oc=!1,Vt=t;Vt!==null;)if(t=Vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Vt=e;else for(;Vt!==null;){switch(t=Vt,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 be=Ns(a.type,i);e=n.getSnapshotBeforeUpdate(be,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(De){nt(a,a.return,De)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Qd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qd(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,Vt=e;break}Vt=t.return}}function Sm(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ln(e,a),n&4&&bi(5,a);break;case 1:if(Ln(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){nt(a,a.return,y)}else{var i=Ns(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){nt(a,a.return,y)}}n&64&&xm(a),n&512&&Si(a,a.return);break;case 3:if(Ln(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{sh(e,t)}catch(y){nt(a,a.return,y)}}break;case 27:t===null&&n&4&&pm(a);case 26:case 5:Ln(e,a),t===null&&n&4&&ym(a),n&512&&Si(a,a.return);break;case 12:Ln(e,a);break;case 31:Ln(e,a),n&4&&jm(e,a);break;case 13:Ln(e,a),n&4&&Em(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ay.bind(null,a),Py(e,a))));break;case 22:if(n=a.memoizedState!==null||Un,!n){t=t!==null&&t.memoizedState!==null||_t,i=Un;var c=_t;Un=n,(_t=t)&&!c?qn(e,a,(a.subtreeFlags&8772)!==0):Ln(e,a),Un=i,_t=c}break;case 30:break;default:Ln(e,a)}}function Nm(e){var t=e.alternate;t!==null&&(e.alternate=null,Nm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ys(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 gt=null,ha=!1;function Hn(e,t,a){for(a=a.child;a!==null;)wm(e,t,a),a=a.sibling}function wm(e,t,a){if(Kt&&typeof Kt.onCommitFiberUnmount=="function")try{Kt.onCommitFiberUnmount(pt,a)}catch{}switch(a.tag){case 26:_t||gn(a,t),Hn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:_t||gn(a,t);var n=gt,i=ha;Rl(a.type)&&(gt=a.stateNode,ha=!1),Hn(e,t,a),Di(a.stateNode),gt=n,ha=i;break;case 5:_t||gn(a,t);case 6:if(n=gt,i=ha,gt=null,Hn(e,t,a),gt=n,ha=i,gt!==null)if(ha)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(a.stateNode)}catch(c){nt(a,t,c)}else try{gt.removeChild(a.stateNode)}catch(c){nt(a,t,c)}break;case 18:gt!==null&&(ha?(e=gt,x0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Cr(e)):x0(gt,a.stateNode));break;case 4:n=gt,i=ha,gt=a.stateNode.containerInfo,ha=!0,Hn(e,t,a),gt=n,ha=i;break;case 0:case 11:case 14:case 15:jl(2,a,t),_t||jl(4,a,t),Hn(e,t,a);break;case 1:_t||(gn(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&gm(a,t,n)),Hn(e,t,a);break;case 21:Hn(e,t,a);break;case 22:_t=(n=_t)||a.memoizedState!==null,Hn(e,t,a),_t=n;break;default:Hn(e,t,a)}}function jm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Cr(e)}catch(a){nt(t,t.return,a)}}}function Em(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Cr(e)}catch(a){nt(t,t.return,a)}}function Ey(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bm),t;default:throw Error(o(435,e.tag))}}function cc(e,t){var a=Ey(e);t.forEach(function(n){if(!a.has(n)){a.add(n);var i=ky.bind(null,e,n);n.then(i,i)}})}function ma(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],c=e,y=t,w=y;e:for(;w!==null;){switch(w.tag){case 27:if(Rl(w.type)){gt=w.stateNode,ha=!1;break e}break;case 5:gt=w.stateNode,ha=!1;break e;case 3:case 4:gt=w.stateNode.containerInfo,ha=!0;break e}w=w.return}if(gt===null)throw Error(o(160));wm(c,y,i),gt=null,ha=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Mm(t,e),t=t.sibling}var an=null;function Mm(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ma(t,e),xa(e),n&4&&(jl(3,e,e.return),bi(3,e),jl(5,e,e.return));break;case 1:ma(t,e),xa(e),n&512&&(_t||a===null||gn(a,a.return)),n&64&&Un&&(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=an;if(ma(t,e),xa(e),n&512&&(_t||a===null||gn(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[Zl]||c[Nt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(n),i.head.insertBefore(c,i.querySelector("head > title"))),It(c,n,a),c[Nt]=e,Ct(c),n=c;break e;case"link":var y=M0("link","href",i).get(n+(a.href||""));if(y){for(var w=0;w<y.length;w++)if(c=y[w],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)){y.splice(w,1);break t}}c=i.createElement(n),It(c,n,a),i.head.appendChild(c);break;case"meta":if(y=M0("meta","content",i).get(n+(a.content||""))){for(w=0;w<y.length;w++)if(c=y[w],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)){y.splice(w,1);break t}}c=i.createElement(n),It(c,n,a),i.head.appendChild(c);break;default:throw Error(o(468,n))}c[Nt]=e,Ct(c),n=c}e.stateNode=n}else T0(i,e.type,e.stateNode);else e.stateNode=E0(i,n,e.memoizedProps);else c!==n?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,n===null?T0(i,e.type,e.stateNode):E0(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&pd(e,e.memoizedProps,a.memoizedProps)}break;case 27:ma(t,e),xa(e),n&512&&(_t||a===null||gn(a,a.return)),a!==null&&n&4&&pd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(ma(t,e),xa(e),n&512&&(_t||a===null||gn(a,a.return)),e.flags&32){i=e.stateNode;try{Xa(i,"")}catch(be){nt(e,e.return,be)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,pd(e,i,a!==null?a.memoizedProps:i)),n&1024&&(Nd=!0);break;case 6:if(ma(t,e),xa(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(be){nt(e,e.return,be)}}break;case 3:if(Ec=null,i=an,an=wc(t.containerInfo),ma(t,e),an=i,xa(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{Cr(t.containerInfo)}catch(be){nt(e,e.return,be)}Nd&&(Nd=!1,Tm(e));break;case 4:n=an,an=wc(e.stateNode.containerInfo),ma(t,e),xa(e),an=n;break;case 12:ma(t,e),xa(e);break;case 31:ma(t,e),xa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 13:ma(t,e),xa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(dc=Ut()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 22:i=e.memoizedState!==null;var R=a!==null&&a.memoizedState!==null,F=Un,le=_t;if(Un=F||i,_t=le||R,ma(t,e),_t=le,Un=F,xa(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||R||Un||_t||ws(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){R=a=t;try{if(c=R.stateNode,i)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{w=R.stateNode;var ue=R.memoizedProps.style,Q=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;w.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(be){nt(R,R.return,be)}}}else if(t.tag===6){if(a===null){R=t;try{R.stateNode.nodeValue=i?"":R.memoizedProps}catch(be){nt(R,R.return,be)}}}else if(t.tag===18){if(a===null){R=t;try{var P=R.stateNode;i?g0(P,!0):g0(R.stateNode,!1)}catch(be){nt(R,R.return,be)}}}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,cc(e,a))));break;case 19:ma(t,e),xa(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,cc(e,n)));break;case 30:break;case 21:break;default:ma(t,e),xa(e)}}function xa(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(vm(n)){a=n;break}n=n.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var i=a.stateNode,c=bd(e);uc(e,c,i);break;case 5:var y=a.stateNode;a.flags&32&&(Xa(y,""),a.flags&=-33);var w=bd(e);uc(e,w,y);break;case 3:case 4:var R=a.stateNode.containerInfo,F=bd(e);Sd(e,F,R);break;default:throw Error(o(161))}}catch(le){nt(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Tm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Tm(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sm(e,t.alternate,t),t=t.sibling}function ws(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:jl(4,t,t.return),ws(t);break;case 1:gn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&gm(t,t.return,a),ws(t);break;case 27:Di(t.stateNode);case 26:case 5:gn(t,t.return),ws(t);break;case 22:t.memoizedState===null&&ws(t);break;case 30:ws(t);break;default:ws(t)}e=e.sibling}}function qn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,c=t,y=c.flags;switch(c.tag){case 0:case 11:case 15:qn(i,c,a),bi(4,c);break;case 1:if(qn(i,c,a),n=c,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(F){nt(n,n.return,F)}if(n=c,i=n.updateQueue,i!==null){var w=n.stateNode;try{var R=i.shared.hiddenCallbacks;if(R!==null)for(i.shared.hiddenCallbacks=null,i=0;i<R.length;i++)lh(R[i],w)}catch(F){nt(n,n.return,F)}}a&&y&64&&xm(c),Si(c,c.return);break;case 27:pm(c);case 26:case 5:qn(i,c,a),a&&n===null&&y&4&&ym(c),Si(c,c.return);break;case 12:qn(i,c,a);break;case 31:qn(i,c,a),a&&y&4&&jm(i,c);break;case 13:qn(i,c,a),a&&y&4&&Em(i,c);break;case 22:c.memoizedState===null&&qn(i,c,a),Si(c,c.return);break;case 30:break;default:qn(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&&ii(a))}function jd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ii(e))}function nn(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cm(e,t,a,n),t=t.sibling}function Cm(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:nn(e,t,a,n),i&2048&&bi(9,t);break;case 1:nn(e,t,a,n);break;case 3:nn(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&&ii(e)));break;case 12:if(i&2048){nn(e,t,a,n),e=t.stateNode;try{var c=t.memoizedProps,y=c.id,w=c.onPostCommit;typeof w=="function"&&w(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){nt(t,t.return,R)}}else nn(e,t,a,n);break;case 31:nn(e,t,a,n);break;case 13:nn(e,t,a,n);break;case 23:break;case 22:c=t.stateNode,y=t.alternate,t.memoizedState!==null?c._visibility&2?nn(e,t,a,n):Ni(e,t):c._visibility&2?nn(e,t,a,n):(c._visibility|=2,yr(e,t,a,n,(t.subtreeFlags&10256)!==0||!1)),i&2048&&wd(y,t);break;case 24:nn(e,t,a,n),i&2048&&jd(t.alternate,t);break;default:nn(e,t,a,n)}}function yr(e,t,a,n,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,y=t,w=a,R=n,F=y.flags;switch(y.tag){case 0:case 11:case 15:yr(c,y,w,R,i),bi(8,y);break;case 23:break;case 22:var le=y.stateNode;y.memoizedState!==null?le._visibility&2?yr(c,y,w,R,i):Ni(c,y):(le._visibility|=2,yr(c,y,w,R,i)),i&&F&2048&&wd(y.alternate,y);break;case 24:yr(c,y,w,R,i),i&&F&2048&&jd(y.alternate,y);break;default:yr(c,y,w,R,i)}t=t.sibling}}function Ni(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:Ni(a,n),i&2048&&wd(n.alternate,n);break;case 24:Ni(a,n),i&2048&&jd(n.alternate,n);break;default:Ni(a,n)}t=t.sibling}}var wi=8192;function vr(e,t,a){if(e.subtreeFlags&wi)for(e=e.child;e!==null;)Om(e,t,a),e=e.sibling}function Om(e,t,a){switch(e.tag){case 26:vr(e,t,a),e.flags&wi&&e.memoizedState!==null&&dv(a,an,e.memoizedState,e.memoizedProps);break;case 5:vr(e,t,a);break;case 3:case 4:var n=an;an=wc(e.stateNode.containerInfo),vr(e,t,a),an=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=wi,wi=16777216,vr(e,t,a),wi=n):vr(e,t,a));break;default:vr(e,t,a)}}function Dm(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 ji(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];Vt=n,_m(n,e)}Dm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rm(e),e=e.sibling}function Rm(e){switch(e.tag){case 0:case 11:case 15:ji(e),e.flags&2048&&jl(9,e,e.return);break;case 3:ji(e);break;case 12:ji(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,oc(e)):ji(e);break;default:ji(e)}}function oc(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];Vt=n,_m(n,e)}Dm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:jl(8,t,t.return),oc(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,oc(t));break;default:oc(t)}e=e.sibling}}function _m(e,t){for(;Vt!==null;){var a=Vt;switch(a.tag){case 0:case 11:case 15:jl(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:ii(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,Vt=n;else e:for(a=e;Vt!==null;){n=Vt;var i=n.sibling,c=n.return;if(Nm(n),n===a){Vt=null;break e}if(i!==null){i.return=c,Vt=i;break e}Vt=c}}}var My={getCacheForType:function(e){var t=Wt(Ot),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Wt(Ot).controller.signal}},Ty=typeof WeakMap=="function"?WeakMap:Map,Pe=0,dt=null,$e=null,Qe=0,at=0,ja=null,El=!1,pr=!1,Ed=!1,Vn=0,St=0,Ml=0,js=0,Md=0,Ea=0,br=0,Ei=null,ga=null,Td=!1,dc=0,Am=0,fc=1/0,hc=null,Tl=null,zt=0,Cl=null,Sr=null,Bn=0,Cd=0,Od=null,km=null,Mi=0,Dd=null;function Ma(){return(Pe&2)!==0&&Qe!==0?Qe&-Qe:G.T!==null?Ud():Bs()}function zm(){if(Ea===0)if((Qe&536870912)===0||L){var e=Ls;Ls<<=1,(Ls&3932160)===0&&(Ls=262144),Ea=e}else Ea=536870912;return e=Na.current,e!==null&&(e.flags|=32),Ea}function ya(e,t,a){(e===dt&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(Nr(e,0),Ol(e,Qe,Ea,!1)),nl(e,a),((Pe&2)===0||e!==dt)&&(e===dt&&((Pe&2)===0&&(js|=a),St===4&&Ol(e,Qe,Ea,!1)),yn(e))}function Um(e,t,a){if((Pe&6)!==0)throw Error(o(327));var n=!a&&(t&127)===0&&(t&e.expiredLanes)===0||al(e,t),i=n?Dy(e,t):_d(e,t,!0),c=n;do{if(i===0){pr&&!n&&Ol(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!Cy(a)){i=_d(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var w=e;i=Ei;var R=w.current.memoizedState.isDehydrated;if(R&&(Nr(w,y).flags|=256),y=_d(w,y,!1),y!==2){if(Ed&&!R){w.errorRecoveryDisabledLanes|=c,js|=c,i=4;break e}c=ga,ga=i,c!==null&&(ga===null?ga=c:ga.push.apply(ga,c))}i=y}if(c=!1,i!==2)continue}}if(i===1){Nr(e,0),Ol(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:Ol(n,t,Ea,!El);break e;case 2:ga=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(i=dc+300-Ut(),10<i)){if(Ol(n,t,Ea,!El),$l(n,0,!0)!==0)break e;Bn=t,n.timeoutHandle=h0(Hm.bind(null,n,a,ga,hc,Td,t,Ea,js,br,El,c,"Throttled",-0,0),i);break e}Hm(n,a,ga,hc,Td,t,Ea,js,br,El,c,null,-0,0)}}break}while(!0);yn(e)}function Hm(e,t,a,n,i,c,y,w,R,F,le,ue,Q,P){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Da},Om(t,c,ue);var be=(c&62914560)===c?dc-Ut():(c&4194048)===c?Am-Ut():0;if(be=fv(ue,be),be!==null){Bn=c,e.cancelPendingCommit=be(Zm.bind(null,e,t,c,a,n,i,y,w,R,le,ue,null,Q,P)),Ol(e,c,y,!F);return}}Zm(e,t,c,a,n,i,y,w,R)}function Cy(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(!ta(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 Ol(e,t,a,n){t&=~Md,t&=~js,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var c=31-$t(i),y=1<<c;n[c]=-1,i&=~y}a!==0&&ft(e,a,t)}function mc(){return(Pe&6)===0?(Ti(0),!1):!0}function Rd(){if($e!==null){if(at===0)var e=$e.return;else e=$e,Ha=Dn=null,Qo(e),fr=null,ci=0,e=$e;for(;e!==null;)mm(e.alternate,e),e=e.return;$e=null}}function Nr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Wy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Bn=0,Rd(),dt=e,$e=a=ka(e.current,null),Qe=t,at=0,ja=null,El=!1,pr=al(e,t),Ed=!1,br=Ea=Md=js=Ml=St=0,ga=Ei=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-$t(n),c=1<<i;t|=e[i],n&=~c}return Vn=t,yl(),a}function Lm(e,t){He=null,G.H=yi,t===dr||t===$u?(t=eh(),at=3):t===zo?(t=eh(),at=4):at=t===cd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ja=t,$e===null&&(St=1,nc(e,da(t,e.current)))}function qm(){var e=Na.current;return e===null?!0:(Qe&4194048)===Qe?qa===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===qa:!1}function Vm(){var e=G.H;return G.H=yi,e===null?yi:e}function Bm(){var e=G.A;return G.A=My,e}function xc(){St=4,El||(Qe&4194048)!==Qe&&Na.current!==null||(pr=!0),(Ml&134217727)===0&&(js&134217727)===0||dt===null||Ol(dt,Qe,Ea,!1)}function _d(e,t,a){var n=Pe;Pe|=2;var i=Vm(),c=Bm();(dt!==e||Qe!==t)&&(hc=null,Nr(e,t)),t=!1;var y=St;e:do try{if(at!==0&&$e!==null){var w=$e,R=ja;switch(at){case 8:Rd(),y=6;break e;case 3:case 2:case 9:case 6:Na.current===null&&(t=!0);var F=at;if(at=0,ja=null,wr(e,w,R,F),a&&pr){y=0;break e}break;default:F=at,at=0,ja=null,wr(e,w,R,F)}}Oy(),y=St;break}catch(le){Lm(e,le)}while(!0);return t&&e.shellSuspendCounter++,Ha=Dn=null,Pe=n,G.H=i,G.A=c,$e===null&&(dt=null,Qe=0,yl()),y}function Oy(){for(;$e!==null;)Ym($e)}function Dy(e,t){var a=Pe;Pe|=2;var n=Vm(),i=Bm();dt!==e||Qe!==t?(hc=null,fc=Ut()+500,Nr(e,t)):pr=al(e,t);e:do try{if(at!==0&&$e!==null){t=$e;var c=ja;t:switch(at){case 1:at=0,ja=null,wr(e,t,c,1);break;case 2:case 9:if(Kf(c)){at=0,ja=null,$m(t);break}t=function(){at!==2&&at!==9||dt!==e||(at=7),yn(e)},c.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:Kf(c)?(at=0,ja=null,$m(t)):(at=0,ja=null,wr(e,t,c,7));break;case 5:var y=null;switch($e.tag){case 26:y=$e.memoizedState;case 5:case 27:var w=$e;if(y?C0(y):w.stateNode.complete){at=0,ja=null;var R=w.sibling;if(R!==null)$e=R;else{var F=w.return;F!==null?($e=F,gc(F)):$e=null}break t}}at=0,ja=null,wr(e,t,c,5);break;case 6:at=0,ja=null,wr(e,t,c,6);break;case 8:Rd(),St=6;break e;default:throw Error(o(462))}}Ry();break}catch(le){Lm(e,le)}while(!0);return Ha=Dn=null,G.H=n,G.A=i,Pe=a,$e!==null?0:(dt=null,Qe=0,yl(),St)}function Ry(){for(;$e!==null&&!zs();)Ym($e)}function Ym(e){var t=fm(e.alternate,e,Vn);e.memoizedProps=e.pendingProps,t===null?gc(e):$e=t}function $m(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=rm(a,t,t.pendingProps,t.type,void 0,Qe);break;case 11:t=rm(a,t,t.pendingProps,t.type.render,t.ref,Qe);break;case 5:Qo(t);default:mm(a,t),t=$e=qu(t,Vn),t=fm(a,t,Vn)}e.memoizedProps=e.pendingProps,t===null?gc(e):$e=t}function wr(e,t,a,n){Ha=Dn=null,Qo(t),fr=null,ci=0;var i=t.return;try{if(py(e,i,t,a,Qe)){St=1,nc(e,da(a,e.current)),$e=null;return}}catch(c){if(i!==null)throw $e=i,c;St=1,nc(e,da(a,e.current)),$e=null;return}t.flags&32768?(L||n===1?e=!0:pr||(Qe&536870912)!==0?e=!1:(El=e=!0,(n===2||n===9||n===3||n===6)&&(n=Na.current,n!==null&&n.tag===13&&(n.flags|=16384))),Gm(t,e)):gc(t)}function gc(e){var t=e;do{if((t.flags&32768)!==0){Gm(t,El);return}e=t.return;var a=Ny(t.alternate,t,Vn);if(a!==null){$e=a;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);St===0&&(St=5)}function Gm(e,t){do{var a=wy(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);St=6,$e=null}function Zm(e,t,a,n,i,c,y,w,R){e.cancelPendingCommit=null;do yc();while(zt!==0);if((Pe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=fs,du(e,a,c,y,w,R),e===dt&&($e=dt=null,Qe=0),Sr=t,Cl=e,Bn=a,Cd=c,Od=i,km=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zy(rn,function(){return Im(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=G.T,G.T=null,i=se.p,se.p=2,y=Pe,Pe|=4;try{jy(e,t,a)}finally{Pe=y,se.p=i,G.T=n}}zt=1,Fm(),Qm(),Wm()}}function Fm(){if(zt===1){zt=0;var e=Cl,t=Sr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null;var n=se.p;se.p=2;var i=Pe;Pe|=4;try{Mm(t,e);var c=Gd,y=Oo(e.containerInfo),w=c.focusedElem,R=c.selectionRange;if(y!==w&&w&&w.ownerDocument&&Xe(w.ownerDocument.documentElement,w)){if(R!==null&&Ps(w)){var F=R.start,le=R.end;if(le===void 0&&(le=F),"selectionStart"in w)w.selectionStart=F,w.selectionEnd=Math.min(le,w.value.length);else{var ue=w.ownerDocument||document,Q=ue&&ue.defaultView||window;if(Q.getSelection){var P=Q.getSelection(),be=w.textContent.length,De=Math.min(R.start,be),ut=R.end===void 0?De:Math.min(R.end,be);!P.extend&&De>ut&&(y=ut,ut=De,De=y);var B=Au(w,De),H=Au(w,ut);if(B&&H&&(P.rangeCount!==1||P.anchorNode!==B.node||P.anchorOffset!==B.offset||P.focusNode!==H.node||P.focusOffset!==H.offset)){var Z=ue.createRange();Z.setStart(B.node,B.offset),P.removeAllRanges(),De>ut?(P.addRange(Z),P.extend(H.node,H.offset)):(Z.setEnd(H.node,H.offset),P.addRange(Z))}}}}for(ue=[],P=w;P=P.parentNode;)P.nodeType===1&&ue.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ue.length;w++){var re=ue[w];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Oc=!!$d,Gd=$d=null}finally{Pe=i,se.p=n,G.T=a}}e.current=t,zt=2}}function Qm(){if(zt===2){zt=0;var e=Cl,t=Sr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=G.T,G.T=null;var n=se.p;se.p=2;var i=Pe;Pe|=4;try{Sm(e,t.alternate,t)}finally{Pe=i,se.p=n,G.T=a}}zt=3}}function Wm(){if(zt===4||zt===3){zt=0,Us();var e=Cl,t=Sr,a=Bn,n=km;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?zt=5:(zt=0,Sr=Cl=null,Xm(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Tl=null),ea(a),t=t.stateNode,Kt&&typeof Kt.onCommitFiberRoot=="function")try{Kt.onCommitFiberRoot(pt,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=G.T,i=se.p,se.p=2,G.T=null;try{for(var c=e.onRecoverableError,y=0;y<n.length;y++){var w=n[y];c(w.value,{componentStack:w.stack})}}finally{G.T=t,se.p=i}}(Bn&3)!==0&&yc(),yn(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===Dd?Mi++:(Mi=0,Dd=e):Mi=0,Ti(0)}}function Xm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ii(t)))}function yc(){return Fm(),Qm(),Wm(),Im()}function Im(){if(zt!==5)return!1;var e=Cl,t=Cd;Cd=0;var a=ea(Bn),n=G.T,i=se.p;try{se.p=32>a?32:a,G.T=null,a=Od,Od=null;var c=Cl,y=Bn;if(zt=0,Sr=Cl=null,Bn=0,(Pe&6)!==0)throw Error(o(331));var w=Pe;if(Pe|=4,Rm(c.current),Cm(c,c.current,y,a),Pe=w,Ti(0,!1),Kt&&typeof Kt.onPostCommitFiberRoot=="function")try{Kt.onPostCommitFiberRoot(pt,c)}catch{}return!0}finally{se.p=i,G.T=n,Xm(e,t)}}function Jm(e,t,a){t=da(a,t),t=ud(e.stateNode,t,2),e=Sl(e,t,2),e!==null&&(nl(e,2),yn(e))}function nt(e,t,a){if(e.tag===3)Jm(e,e,a);else for(;t!==null;){if(t.tag===3){Jm(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Tl===null||!Tl.has(n))){e=da(a,e),a=Kh(2),n=Sl(t,a,2),n!==null&&(Ph(a,n,t,e),nl(n,2),yn(n));break}}t=t.return}}function Ad(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Ty;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)||(Ed=!0,i.add(a),e=_y.bind(null,e,t,a),t.then(e,e))}function _y(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,dt===e&&(Qe&a)===a&&(St===4||St===3&&(Qe&62914560)===Qe&&300>Ut()-dc?(Pe&2)===0&&Nr(e,0):Md|=a,br===Qe&&(br=0)),yn(e)}function Km(e,t){t===0&&(t=Ur()),e=Aa(e,t),e!==null&&(nl(e,t),yn(e))}function Ay(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Km(e,a)}function ky(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),Km(e,a)}function zy(e,t){return Pn(e,t)}var vc=null,jr=null,kd=!1,pc=!1,zd=!1,Dl=0;function yn(e){e!==jr&&e.next===null&&(jr===null?vc=jr=e:jr=jr.next=e),pc=!0,kd||(kd=!0,Hy())}function Ti(e,t){if(!zd&&pc){zd=!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 y=n.suspendedLanes,w=n.pingedLanes;c=(1<<31-$t(42|e)+1)-1,c&=i&~(y&~w),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,a0(n,c))}else c=Qe,c=$l(n,n===dt?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||al(n,c)||(a=!0,a0(n,c));n=n.next}while(a);zd=!1}}function Uy(){Pm()}function Pm(){pc=kd=!1;var e=0;Dl!==0&&Qy()&&(e=Dl);for(var t=Ut(),a=null,n=vc;n!==null;){var i=n.next,c=e0(n,t);c===0?(n.next=null,a===null?vc=i:a.next=i,i===null&&(jr=a)):(a=n,(e!==0||(c&3)!==0)&&(pc=!0)),n=i}zt!==0&&zt!==5||Ti(e),Dl!==0&&(Dl=0)}function e0(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var y=31-$t(c),w=1<<y,R=i[y];R===-1?((w&a)===0||(w&n)!==0)&&(i[y]=ou(w,t)):R<=t&&(e.expiredLanes|=w),c&=~w}if(t=dt,a=Qe,a=$l(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&el(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||al(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&el(n),ea(a)){case 2:case 8:a=Ht;break;case 32:a=rn;break;case 268435456:a=Yl;break;default:a=rn}return n=t0.bind(null,e),a=Pn(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&el(n),e.callbackPriority=2,e.callbackNode=null,2}function t0(e,t){if(zt!==0&&zt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(yc()&&e.callbackNode!==a)return null;var n=Qe;return n=$l(e,e===dt?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Um(e,n,t),e0(e,Ut()),e.callbackNode!=null&&e.callbackNode===a?t0.bind(null,e):null)}function a0(e,t){if(yc())return null;Um(e,t,!0)}function Hy(){Xy(function(){(Pe&6)!==0?Pn(qe,Uy):Pm()})}function Ud(){if(Dl===0){var e=cr;e===0&&(e=tl,tl<<=1,(tl&261888)===0&&(tl=256)),Dl=e}return Dl}function n0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Jl(""+e)}function l0(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 Ly(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var c=n0((i[At]||null).action),y=n.submitter;y&&(t=(t=y[At]||null)?n0(t.formAction):y.getAttribute("formAction"),t!==null&&(c=t,y=null));var w=new ts("action","action",null,n,i);e.push({event:w,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Dl!==0){var R=y?l0(i,y):new FormData(i);ad(a,{pending:!0,data:R,method:i.method,action:c},null,R)}}else typeof c=="function"&&(w.preventDefault(),R=y?l0(i,y):new FormData(i),ad(a,{pending:!0,data:R,method:i.method,action:c},c,R))},currentTarget:i}]})}}for(var Hd=0;Hd<ni.length;Hd++){var Ld=ni[Hd],qy=Ld.toLowerCase(),Vy=Ld[0].toUpperCase()+Ld.slice(1);oa(qy,"on"+Vy)}oa(Uu,"onAnimationEnd"),oa(Hu,"onAnimationIteration"),oa(ar,"onAnimationStart"),oa("dblclick","onDoubleClick"),oa("focusin","onFocus"),oa("focusout","onBlur"),oa(Do,"onTransitionRun"),oa(Ro,"onTransitionStart"),oa(Lu,"onTransitionCancel"),oa(ti,"onTransitionEnd"),ll("onMouseEnter",["mouseout","mouseover"]),ll("onMouseLeave",["mouseout","mouseover"]),ll("onPointerEnter",["pointerout","pointerover"]),ll("onPointerLeave",["pointerout","pointerover"]),cn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cn("onBeforeInput",["compositionend","keypress","textInput","paste"]),cn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ci="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(" "),By=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ci));function s0(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 y=n.length-1;0<=y;y--){var w=n[y],R=w.instance,F=w.currentTarget;if(w=w.listener,R!==c&&i.isPropagationStopped())break e;c=w,i.currentTarget=F;try{c(i)}catch(le){gl(le)}i.currentTarget=null,c=R}else for(y=0;y<n.length;y++){if(w=n[y],R=w.instance,F=w.currentTarget,w=w.listener,R!==c&&i.isPropagationStopped())break e;c=w,i.currentTarget=F;try{c(i)}catch(le){gl(le)}i.currentTarget=null,c=R}}}}function Ge(e,t){var a=t[Gl];a===void 0&&(a=t[Gl]=new Set);var n=e+"__bubble";a.has(n)||(r0(t,e,2,!1),a.add(n))}function qd(e,t,a){var n=0;t&&(n|=4),r0(a,e,n,t)}var bc="_reactListening"+Math.random().toString(36).slice(2);function Vd(e){if(!e[bc]){e[bc]=!0,xu.forEach(function(a){a!=="selectionchange"&&(By.has(a)||qd(a,!1,e),qd(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bc]||(t[bc]=!0,qd("selectionchange",!1,t))}}function r0(e,t,a,n){switch(z0(t)){case 2:var i=xv;break;case 8:i=gv;break;default:i=tf}a=i.bind(null,t,a,e),i=void 0,!Fr||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 Bd(e,t,a,n,i){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var y=n.tag;if(y===3||y===4){var w=n.stateNode.containerInfo;if(w===i)break;if(y===4)for(y=n.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===i)return;y=y.return}for(;w!==null;){if(y=Sn(w),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){n=c=y;continue e}w=w.parentNode}}n=n.return}Zr(function(){var F=c,le=Qs(a),ue=[];e:{var Q=ai.get(e);if(Q!==void 0){var P=ts,be=e;switch(e){case"keypress":if(es(a)===0)break e;case"keydown":case"keyup":P=xo;break;case"focusin":be="focus",P=Ks;break;case"focusout":be="blur",P=Ks;break;case"beforeblur":case"afterblur":P=Ks;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":P=Su;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=so;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=vo;break;case Uu:case Hu:case ar:P=ul;break;case ti:P=po;break;case"scroll":case"scrollend":P=Qr;break;case"wheel":P=So;break;case"copy":case"cut":case"paste":P=cl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Nu;break;case"toggle":case"beforetoggle":P=wo}var De=(t&4)!==0,ut=!De&&(e==="scroll"||e==="scrollend"),B=De?Q!==null?Q+"Capture":null:Q;De=[];for(var H=F,Z;H!==null;){var re=H;if(Z=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||Z===null||B===null||(re=Kl(H,B),re!=null&&De.push(Oi(H,re,Z))),ut)break;H=H.return}0<De.length&&(Q=new P(Q,be,null,a,le),ue.push({event:Q,listeners:De}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",Q&&a!==$r&&(be=a.relatedTarget||a.fromElement)&&(Sn(be)||be[bn]))break e;if((P||Q)&&(Q=le.window===le?le:(Q=le.ownerDocument)?Q.defaultView||Q.parentWindow:window,P?(be=a.relatedTarget||a.toElement,P=F,be=be?Sn(be):null,be!==null&&(ut=m(be),De=be.tag,be!==ut||De!==5&&De!==27&&De!==6)&&(be=null)):(P=null,be=F),P!==be)){if(De=Su,re="onMouseLeave",B="onMouseEnter",H="mouse",(e==="pointerout"||e==="pointerover")&&(De=Nu,re="onPointerLeave",B="onPointerEnter",H="pointer"),ut=P==null?Q:ua(P),Z=be==null?Q:ua(be),Q=new De(re,H+"leave",P,a,le),Q.target=ut,Q.relatedTarget=Z,re=null,Sn(le)===F&&(De=new De(B,H+"enter",be,a,le),De.target=Z,De.relatedTarget=ut,re=De),ut=re,P&&be)t:{for(De=Yy,B=P,H=be,Z=0,re=B;re;re=De(re))Z++;re=0;for(var Te=H;Te;Te=De(Te))re++;for(;0<Z-re;)B=De(B),Z--;for(;0<re-Z;)H=De(H),re--;for(;Z--;){if(B===H||H!==null&&B===H.alternate){De=B;break t}B=De(B),H=De(H)}De=null}else De=null;P!==null&&i0(ue,Q,P,De,!1),be!==null&&ut!==null&&i0(ue,ut,be,De,!0)}}e:{if(Q=F?ua(F):window,P=Q.nodeName&&Q.nodeName.toLowerCase(),P==="select"||P==="input"&&Q.type==="file")var Ie=Ru;else if(Du(Q))if(hn)Ie=ht;else{Ie=hl;var Ne=Ze}else P=Q.nodeName,!P||P.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?F&&Fs(F.elementType)&&(Ie=Ru):Ie=Co;if(Ie&&(Ie=Ie(e,F))){Xr(ue,Ie,a,le);break e}Ne&&Ne(e,Q,F),e==="focusout"&&F&&Q.type==="number"&&F.memoizedProps.value!=null&&Ql(Q,"number",Q.value)}switch(Ne=F?ua(F):window,e){case"focusin":(Du(Ne)||Ne.contentEditable==="true")&&(ml=Ne,er=F,Ft=null);break;case"focusout":Ft=er=ml=null;break;case"mousedown":tr=!0;break;case"contextmenu":case"mouseup":case"dragend":tr=!1,ds(ue,a,le);break;case"selectionchange":if(ku)break;case"keydown":case"keyup":ds(ue,a,le)}var Ve;if(Wr)e:{switch(e){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else dl?Cu(e,a)&&(We="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(We="onCompositionStart");We&&(Eu&&a.locale!=="ko"&&(dl||We!=="onCompositionStart"?We==="onCompositionEnd"&&dl&&(Ve=kt()):(dn=le,Ws="value"in dn?dn.value:dn.textContent,dl=!0)),Ne=Sc(F,We),0<Ne.length&&(We=new ol(We,e,null,a,le),ue.push({event:We,listeners:Ne}),Ve?We.data=Ve:(Ve=Ou(a),Ve!==null&&(We.data=Ve)))),(Ve=jo?Eo(e,a):Mo(e,a))&&(We=Sc(F,"onBeforeInput"),0<We.length&&(Ne=new ol("onBeforeInput","beforeinput",null,a,le),ue.push({event:Ne,listeners:We}),Ne.data=Ve)),Ly(ue,e,F,a,le)}s0(ue,t)})}function Oi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Sc(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=Kl(e,a),i!=null&&n.unshift(Oi(e,i,c)),i=Kl(e,t),i!=null&&n.push(Oi(e,i,c))),e.tag===3)return n;e=e.return}return[]}function Yy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function i0(e,t,a,n,i){for(var c=t._reactName,y=[];a!==null&&a!==n;){var w=a,R=w.alternate,F=w.stateNode;if(w=w.tag,R!==null&&R===n)break;w!==5&&w!==26&&w!==27||F===null||(R=F,i?(F=Kl(a,c),F!=null&&y.unshift(Oi(a,F,R))):i||(F=Kl(a,c),F!=null&&y.push(Oi(a,F,R)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var $y=/\r\n?/g,Gy=/\u0000|\uFFFD/g;function u0(e){return(typeof e=="string"?e:""+e).replace($y,`
|
|
49
|
+
`).replace(Gy,"")}function c0(e,t){return t=u0(t),u0(e)===t}function it(e,t,a,n,i,c){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Xa(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Xa(e,""+n);break;case"className":$s(e,"class",n);break;case"tabIndex":$s(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":$s(e,a,n);break;case"style":vu(e,n,c);break;case"data":if(t!=="object"){$s(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=Jl(""+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"&&it(e,t,"name",i.name,i,null),it(e,t,"formEncType",i.formEncType,i,null),it(e,t,"formMethod",i.formMethod,i,null),it(e,t,"formTarget",i.formTarget,i,null)):(it(e,t,"encType",i.encType,i,null),it(e,t,"method",i.method,i,null),it(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=Jl(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Da);break;case"onScroll":n!=null&&Ge("scroll",e);break;case"onScrollEnd":n!=null&&Ge("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=Jl(""+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":Ge("beforetoggle",e),Ge("toggle",e),Gt(e,"popover",n);break;case"xlinkActuate":tt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":tt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":tt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":tt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":tt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":tt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":tt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":tt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":tt(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=no.get(a)||a,Gt(e,a,n))}}function Yd(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"?Xa(e,n):(typeof n=="number"||typeof n=="bigint")&&Xa(e,""+n);break;case"onScroll":n!=null&&Ge("scroll",e);break;case"onScrollEnd":n!=null&&Ge("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qr.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[At]||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 It(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var n=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var y=a[c];if(y!=null)switch(c){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,c,y,a,null)}}i&&it(e,t,"srcSet",a.srcSet,a,null),n&&it(e,t,"src",a.src,a,null);return;case"input":Ge("invalid",e);var w=c=y=i=null,R=null,F=null;for(n in a)if(a.hasOwnProperty(n)){var le=a[n];if(le!=null)switch(n){case"name":i=le;break;case"type":y=le;break;case"checked":R=le;break;case"defaultChecked":F=le;break;case"value":c=le;break;case"defaultValue":w=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(o(137,t));break;default:it(e,t,n,le,a,null)}}rl(e,c,w,R,F,y,i,!1);return;case"select":Ge("invalid",e),n=y=c=null;for(i in a)if(a.hasOwnProperty(i)&&(w=a[i],w!=null))switch(i){case"value":c=w;break;case"defaultValue":y=w;break;case"multiple":n=w;default:it(e,t,i,w,a,null)}t=c,a=y,e.multiple=!!n,t!=null?wn(e,!!n,t,!1):a!=null&&wn(e,!!n,a,!0);return;case"textarea":Ge("invalid",e),c=i=n=null;for(y in a)if(a.hasOwnProperty(y)&&(w=a[y],w!=null))switch(y){case"value":n=w;break;case"defaultValue":i=w;break;case"children":c=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(o(91));break;default:it(e,t,y,w,a,null)}Yr(e,n,i,c);return;case"option":for(R in a)if(a.hasOwnProperty(R)&&(n=a[R],n!=null))switch(R){case"selected":e.selected=n&&typeof n!="function"&&typeof n!="symbol";break;default:it(e,t,R,n,a,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(n=0;n<Ci.length;n++)Ge(Ci[n],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("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(F in a)if(a.hasOwnProperty(F)&&(n=a[F],n!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:it(e,t,F,n,a,null)}return;default:if(Fs(t)){for(le in a)a.hasOwnProperty(le)&&(n=a[le],n!==void 0&&Yd(e,t,le,n,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(n=a[w],n!=null&&it(e,t,w,n,a,null))}function Zy(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,y=null,w=null,R=null,F=null,le=null;for(P in a){var ue=a[P];if(a.hasOwnProperty(P)&&ue!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":R=ue;default:n.hasOwnProperty(P)||it(e,t,P,null,n,ue)}}for(var Q in n){var P=n[Q];if(ue=a[Q],n.hasOwnProperty(Q)&&(P!=null||ue!=null))switch(Q){case"type":c=P;break;case"name":i=P;break;case"checked":F=P;break;case"defaultChecked":le=P;break;case"value":y=P;break;case"defaultValue":w=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:P!==ue&&it(e,t,Q,P,n,ue)}}Zs(e,y,w,R,F,le,c,i);return;case"select":P=y=w=Q=null;for(c in a)if(R=a[c],a.hasOwnProperty(c)&&R!=null)switch(c){case"value":break;case"multiple":P=R;default:n.hasOwnProperty(c)||it(e,t,c,null,n,R)}for(i in n)if(c=n[i],R=a[i],n.hasOwnProperty(i)&&(c!=null||R!=null))switch(i){case"value":Q=c;break;case"defaultValue":w=c;break;case"multiple":y=c;default:c!==R&&it(e,t,i,c,n,R)}t=w,a=y,n=P,Q!=null?wn(e,!!a,Q,!1):!!n!=!!a&&(t!=null?wn(e,!!a,t,!0):wn(e,!!a,a?[]:"",!1));return;case"textarea":P=Q=null;for(w in a)if(i=a[w],a.hasOwnProperty(w)&&i!=null&&!n.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:it(e,t,w,null,n,i)}for(y in n)if(i=n[y],c=a[y],n.hasOwnProperty(y)&&(i!=null||c!=null))switch(y){case"value":Q=i;break;case"defaultValue":P=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(o(91));break;default:i!==c&&it(e,t,y,i,n,c)}Wl(e,Q,P);return;case"option":for(var be in a)if(Q=a[be],a.hasOwnProperty(be)&&Q!=null&&!n.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:it(e,t,be,null,n,Q)}for(R in n)if(Q=n[R],P=a[R],n.hasOwnProperty(R)&&Q!==P&&(Q!=null||P!=null))switch(R){case"selected":e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:it(e,t,R,Q,n,P)}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 De in a)Q=a[De],a.hasOwnProperty(De)&&Q!=null&&!n.hasOwnProperty(De)&&it(e,t,De,null,n,Q);for(F in n)if(Q=n[F],P=a[F],n.hasOwnProperty(F)&&Q!==P&&(Q!=null||P!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(o(137,t));break;default:it(e,t,F,Q,n,P)}return;default:if(Fs(t)){for(var ut in a)Q=a[ut],a.hasOwnProperty(ut)&&Q!==void 0&&!n.hasOwnProperty(ut)&&Yd(e,t,ut,void 0,n,Q);for(le in n)Q=n[le],P=a[le],!n.hasOwnProperty(le)||Q===P||Q===void 0&&P===void 0||Yd(e,t,le,Q,n,P);return}}for(var B in a)Q=a[B],a.hasOwnProperty(B)&&Q!=null&&!n.hasOwnProperty(B)&&it(e,t,B,null,n,Q);for(ue in n)Q=n[ue],P=a[ue],!n.hasOwnProperty(ue)||Q===P||Q==null&&P==null||it(e,t,ue,Q,n,P)}function o0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Fy(){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,y=i.initiatorType,w=i.duration;if(c&&w&&o0(y)){for(y=0,w=i.responseEnd,n+=1;n<a.length;n++){var R=a[n],F=R.startTime;if(F>w)break;var le=R.transferSize,ue=R.initiatorType;le&&o0(ue)&&(R=R.responseEnd,y+=le*(R<w?1:(w-F)/(R-F)))}if(--n,t+=8*(c+y)/(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 $d=null,Gd=null;function Nc(e){return e.nodeType===9?e:e.ownerDocument}function d0(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 f0(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 Zd(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 Fd=null;function Qy(){var e=window.event;return e&&e.type==="popstate"?e===Fd?!1:(Fd=e,!0):(Fd=null,!1)}var h0=typeof setTimeout=="function"?setTimeout:void 0,Wy=typeof clearTimeout=="function"?clearTimeout:void 0,m0=typeof Promise=="function"?Promise:void 0,Xy=typeof queueMicrotask=="function"?queueMicrotask:typeof m0<"u"?function(e){return m0.resolve(null).then(e).catch(Iy)}:h0;function Iy(e){setTimeout(function(){throw e})}function Rl(e){return e==="head"}function x0(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),Cr(t);return}n--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")n++;else if(a==="html")Di(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Di(a);for(var c=a.firstChild;c;){var y=c.nextSibling,w=c.nodeName;c[Zl]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=y}}else a==="body"&&Di(e.ownerDocument.body);a=i}while(a);Cr(t)}function g0(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 Qd(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":Qd(a),Ys(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Jy(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[Zl])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=Va(e.nextSibling),e===null)break}return null}function Ky(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Va(e.nextSibling),e===null))return null;return e}function y0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Va(e.nextSibling),e===null))return null;return e}function Wd(e){return e.data==="$?"||e.data==="$~"}function Xd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Py(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 Va(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 v0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Va(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function p0(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 b0(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 Di(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ys(e)}var Ba=new Map,S0=new Set;function wc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Yn=se.d;se.d={f:ev,r:tv,D:av,C:nv,L:lv,m:sv,X:iv,S:rv,M:uv};function ev(){var e=Yn.f(),t=mc();return e||t}function tv(e){var t=Ce(e);t!==null&&t.tag===5&&t.type==="form"?Lh(t):Yn.r(e)}var Er=typeof document>"u"?null:document;function N0(e,t,a){var n=Er;if(n&&typeof t=="string"&&t){var i=Zt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),S0.has(i)||(S0.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),It(t,"link",e),Ct(t),n.head.appendChild(t)))}}function av(e){Yn.D(e),N0("dns-prefetch",e,null)}function nv(e,t){Yn.C(e,t),N0("preconnect",e,t)}function lv(e,t,a){Yn.L(e,t,a);var n=Er;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=Mr(e);break;case"script":c=Tr(e)}Ba.has(c)||(e=M({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ba.set(c,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(Ri(c))||t==="script"&&n.querySelector(_i(c))||(t=n.createElement("link"),It(t,"link",e),Ct(t),n.head.appendChild(t)))}}function sv(e,t){Yn.m(e,t);var a=Er;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=Tr(e)}if(!Ba.has(c)&&(e=M({rel:"modulepreload",href:e},t),Ba.set(c,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(_i(c)))return}n=a.createElement("link"),It(n,"link",e),Ct(n),a.head.appendChild(n)}}}function rv(e,t,a){Yn.S(e,t,a);var n=Er;if(n&&e){var i=Qa(n).hoistableStyles,c=Mr(e);t=t||"default";var y=i.get(c);if(!y){var w={loading:0,preload:null};if(y=n.querySelector(Ri(c)))w.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ba.get(c))&&Jd(e,a);var R=y=n.createElement("link");Ct(R),It(R,"link",e),R._p=new Promise(function(F,le){R.onload=F,R.onerror=le}),R.addEventListener("load",function(){w.loading|=1}),R.addEventListener("error",function(){w.loading|=2}),w.loading|=4,jc(y,t,n)}y={type:"stylesheet",instance:y,count:1,state:w},i.set(c,y)}}}function iv(e,t){Yn.X(e,t);var a=Er;if(a&&e){var n=Qa(a).hoistableScripts,i=Tr(e),c=n.get(i);c||(c=a.querySelector(_i(i)),c||(e=M({src:e,async:!0},t),(t=Ba.get(i))&&Kd(e,t),c=a.createElement("script"),Ct(c),It(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function uv(e,t){Yn.M(e,t);var a=Er;if(a&&e){var n=Qa(a).hoistableScripts,i=Tr(e),c=n.get(i);c||(c=a.querySelector(_i(i)),c||(e=M({src:e,async:!0,type:"module"},t),(t=Ba.get(i))&&Kd(e,t),c=a.createElement("script"),Ct(c),It(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(i,c))}}function w0(e,t,a,n){var i=(i=fe.current)?wc(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=Mr(a.href),a=Qa(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=Mr(a.href);var c=Qa(i).hoistableStyles,y=c.get(e);if(y||(i=i.ownerDocument||i,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,y),(c=i.querySelector(Ri(e)))&&!c._p&&(y.instance=c,y.state.loading=5),Ba.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},Ba.set(e,a),c||cv(i,e,a,y.state))),t&&n===null)throw Error(o(528,""));return y}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=Tr(a),a=Qa(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 Mr(e){return'href="'+Zt(e)+'"'}function Ri(e){return'link[rel="stylesheet"]['+e+"]"}function j0(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function cv(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}),It(t,"link",a),Ct(t),e.head.appendChild(t))}function Tr(e){return'[src="'+Zt(e)+'"]'}function _i(e){return"script[async]"+e}function E0(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,Ct(n),n;var i=M({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ct(n),It(n,"style",i),jc(n,a.precedence,e),t.instance=n;case"stylesheet":i=Mr(a.href);var c=e.querySelector(Ri(i));if(c)return t.state.loading|=4,t.instance=c,Ct(c),c;n=j0(a),(i=Ba.get(i))&&Jd(n,i),c=(e.ownerDocument||e).createElement("link"),Ct(c);var y=c;return y._p=new Promise(function(w,R){y.onload=w,y.onerror=R}),It(c,"link",n),t.state.loading|=4,jc(c,a.precedence,e),t.instance=c;case"script":return c=Tr(a.src),(i=e.querySelector(_i(c)))?(t.instance=i,Ct(i),i):(n=a,(i=Ba.get(c))&&(n=M({},a),Kd(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ct(i),It(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,jc(n,a.precedence,e));return t.instance}function jc(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,y=0;y<n.length;y++){var w=n[y];if(w.dataset.precedence===t)c=w;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 Jd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ec=null;function M0(e,t,a){if(Ec===null){var n=new Map,i=Ec=new Map;i.set(a,n)}else i=Ec,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[Zl]||c[Nt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(t)||"";y=e+y;var w=n.get(y);w?w.push(c):n.set(y,[c])}}return n}function T0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ov(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 C0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dv(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=Mr(n.href),c=t.querySelector(Ri(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,Ct(c);return}c=t.ownerDocument||t,n=j0(n),(i=Ba.get(i))&&Jd(n,i),c=c.createElement("link"),Ct(c);var y=c;y._p=new Promise(function(w,R){y.onload=w,y.onerror=R}),It(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 Pd=0;function fv(e,t){return e.stylesheets&&e.count===0&&Cc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Pd===0&&(Pd=62500*Fy());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Pd?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)Cc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tc=null;function Cc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tc=new Map,t.forEach(hv,e),Tc=null,Mc.call(e))}function hv(e,t){if(!(t.state.loading&4)){var a=Tc.get(e);if(a)var n=a.get(null);else{a=new Map,Tc.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var y=i[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),n=y)}n&&a.set(null,n)}i=t.instance,y=i.getAttribute("data-precedence"),c=a.get(y)||n,c===n&&a.set(null,i),a.set(y,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 Ai={$$typeof:ne,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function mv(e,t,a,n,i,c,y,w,R){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=qs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qs(0),this.hiddenUpdates=qs(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function O0(e,t,a,n,i,c,y,w,R,F,le,ue){return e=new mv(e,t,a,y,R,F,le,ue,w),t=1,c===!0&&(t|=24),c=Qt(3,null,null,t),e.current=c,c.stateNode=e,t=_o(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:a,cache:t},Uo(c),e}function D0(e){return e?(e=Sa,e):Sa}function R0(e,t,a,n,i,c){i=D0(i),n.context===null?n.context=i:n.pendingContext=i,n=bl(t),n.payload={element:a},c=c===void 0?null:c,c!==null&&(n.callback=c),a=Sl(e,n,t),a!==null&&(ya(a,e,t),di(a,e,t))}function _0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ef(e,t){_0(e,t),(e=e.alternate)&&_0(e,t)}function A0(e){if(e.tag===13||e.tag===31){var t=Aa(e,67108864);t!==null&&ya(t,e,67108864),ef(e,67108864)}}function k0(e){if(e.tag===13||e.tag===31){var t=Ma();t=Vs(t);var a=Aa(e,t);a!==null&&ya(a,e,t),ef(e,t)}}var Oc=!0;function xv(e,t,a,n){var i=G.T;G.T=null;var c=se.p;try{se.p=2,tf(e,t,a,n)}finally{se.p=c,G.T=i}}function gv(e,t,a,n){var i=G.T;G.T=null;var c=se.p;try{se.p=8,tf(e,t,a,n)}finally{se.p=c,G.T=i}}function tf(e,t,a,n){if(Oc){var i=af(n);if(i===null)Bd(e,t,n,Dc,a),U0(e,n);else if(vv(i,e,t,a,n))n.stopPropagation();else if(U0(e,n),t&4&&-1<yv.indexOf(e)){for(;i!==null;){var c=Ce(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=un(c.pendingLanes);if(y!==0){var w=c;for(w.pendingLanes|=2,w.entangledLanes|=2;y;){var R=1<<31-$t(y);w.entanglements[1]|=R,y&=~R}yn(c),(Pe&6)===0&&(fc=Ut()+500,Ti(0))}}break;case 31:case 13:w=Aa(c,2),w!==null&&ya(w,c,2),mc(),ef(c,2)}if(c=af(n),c===null&&Bd(e,t,n,Dc,a),c===i)break;i=c}i!==null&&n.stopPropagation()}else Bd(e,t,n,null,a)}}function af(e){return e=Qs(e),nf(e)}var Dc=null;function nf(e){if(Dc=null,e=Sn(e),e!==null){var t=m(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=g(t),e!==null)return e;e=null}else if(a===31){if(e=j(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 Dc=e,null}function z0(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(xe()){case qe:return 2;case Ht:return 8;case rn:case Hs:return 32;case Yl:return 268435456;default:return 32}default:return 32}}var lf=!1,_l=null,Al=null,kl=null,ki=new Map,zi=new Map,zl=[],yv="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 U0(e,t){switch(e){case"focusin":case"focusout":_l=null;break;case"dragenter":case"dragleave":Al=null;break;case"mouseover":case"mouseout":kl=null;break;case"pointerover":case"pointerout":ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zi.delete(t.pointerId)}}function Ui(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=Ce(t),t!==null&&A0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function vv(e,t,a,n,i){switch(t){case"focusin":return _l=Ui(_l,e,t,a,n,i),!0;case"dragenter":return Al=Ui(Al,e,t,a,n,i),!0;case"mouseover":return kl=Ui(kl,e,t,a,n,i),!0;case"pointerover":var c=i.pointerId;return ki.set(c,Ui(ki.get(c)||null,e,t,a,n,i)),!0;case"gotpointercapture":return c=i.pointerId,zi.set(c,Ui(zi.get(c)||null,e,t,a,n,i)),!0}return!1}function H0(e){var t=Sn(e.target);if(t!==null){var a=m(t);if(a!==null){if(t=a.tag,t===13){if(t=g(a),t!==null){e.blockedOn=t,Lr(e.priority,function(){k0(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Lr(e.priority,function(){k0(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 Rc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=af(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);$r=n,a.target.dispatchEvent(n),$r=null}else return t=Ce(a),t!==null&&A0(t),e.blockedOn=a,!1;t.shift()}return!0}function L0(e,t,a){Rc(e)&&a.delete(t)}function pv(){lf=!1,_l!==null&&Rc(_l)&&(_l=null),Al!==null&&Rc(Al)&&(Al=null),kl!==null&&Rc(kl)&&(kl=null),ki.forEach(L0),zi.forEach(L0)}function _c(e,t){e.blockedOn===t&&(e.blockedOn=null,lf||(lf=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,pv)))}var Ac=null;function q0(e){Ac!==e&&(Ac=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Ac===e&&(Ac=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(nf(n||a)===null)continue;break}var c=Ce(a);c!==null&&(e.splice(t,3),t-=3,ad(c,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function Cr(e){function t(R){return _c(R,e)}_l!==null&&_c(_l,e),Al!==null&&_c(Al,e),kl!==null&&_c(kl,e),ki.forEach(t),zi.forEach(t);for(var a=0;a<zl.length;a++){var n=zl[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<zl.length&&(a=zl[0],a.blockedOn===null);)H0(a),a.blockedOn===null&&zl.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],y=i[At]||null;if(typeof c=="function")y||q0(a);else if(y){var w=null;if(c&&c.hasAttribute("formAction")){if(i=c,y=c[At]||null)w=y.formAction;else if(nf(i)!==null)continue}else w=y.action;typeof w=="function"?a[n+1]=w:(a.splice(n,3),n-=3),q0(a)}}}function V0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return i=y})},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 sf(e){this._internalRoot=e}kc.prototype.render=sf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,n=Ma();R0(a,n,e,t,null,null)},kc.prototype.unmount=sf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;R0(e.current,2,null,e,null,null),mc(),t[bn]=null}};function kc(e){this._internalRoot=e}kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Bs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<zl.length&&t!==0&&t<zl[a].priority;a++);zl.splice(a,0,e),a===0&&H0(e)}};var B0=u.version;if(B0!=="19.2.4")throw Error(o(527,B0,"19.2.4"));se.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var bv={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zc.isDisabled&&zc.supportsFiber)try{pt=zc.inject(bv),Kt=zc}catch{}}return Li.createRoot=function(e,t){if(!x(e))throw Error(o(299));var a=!1,n="",i=Wh,c=Xh,y=Ih;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&&(y=t.onRecoverableError)),t=O0(e,1,!1,null,null,a,n,null,i,c,y,V0),e[bn]=t.current,Vd(e),new sf(t)},Li.hydrateRoot=function(e,t,a){if(!x(e))throw Error(o(299));var n=!1,i="",c=Wh,y=Xh,w=Ih,R=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&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(R=a.formState)),t=O0(e,1,!0,t,a??null,n,i,R,c,y,w,V0),t.context=D0(null),a=t.current,n=Ma(),n=Vs(n),i=bl(n),i.callback=null,Sl(a,i,n),a=n,t.current.lanes=a,nl(t,a),yn(t),e[bn]=t.current,Vd(e),new kc(t)},Li.version="19.2.4",Li}var P0;function Av(){if(P0)return of.exports;P0=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(),of.exports=_v(),of.exports}var kv=Av();const zv=Yx(kv);/**
|
|
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 ex="popstate";function Uv(l={}){function u(x,m){let{pathname:g="/",search:j="",hash:S=""}=As(x.location.hash.substring(1));return!g.startsWith("/")&&!g.startsWith(".")&&(g="/"+g),Ef("",{pathname:g,search:j,hash:S},m.state&&m.state.usr||null,m.state&&m.state.key||"default")}function d(x,m){let g=x.document.querySelector("base"),j="";if(g&&g.getAttribute("href")){let S=x.location.href,p=S.indexOf("#");j=p===-1?S:S.slice(0,p)}return j+"#"+(typeof m=="string"?m:eu(m))}function o(x,m){Ya(x.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(m)})`)}return Lv(u,d,o,l)}function yt(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Ya(l,u){if(!l){typeof console<"u"&&console.warn(u);try{throw new Error(u)}catch{}}}function Hv(){return Math.random().toString(36).substring(2,10)}function tx(l,u){return{usr:l.state,key:l.key,idx:u}}function Ef(l,u,d=null,o){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof u=="string"?As(u):u,state:d,key:u&&u.key||o||Hv()}}function eu({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 As(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 Lv(l,u,d,o={}){let{window:x=document.defaultView,v5Compat:m=!1}=o,g=x.history,j="POP",S=null,p=E();p==null&&(p=0,g.replaceState({...g.state,idx:p},""));function E(){return(g.state||{idx:null}).idx}function M(){j="POP";let O=E(),ae=O==null?null:O-p;p=O,S&&S({action:j,location:C.location,delta:ae})}function _(O,ae){j="PUSH";let I=Ef(C.location,O,ae);d&&d(I,O),p=E()+1;let ne=tx(I,p),ee=C.createHref(I);try{g.pushState(ne,"",ee)}catch(J){if(J instanceof DOMException&&J.name==="DataCloneError")throw J;x.location.assign(ee)}m&&S&&S({action:j,location:C.location,delta:1})}function A(O,ae){j="REPLACE";let I=Ef(C.location,O,ae);d&&d(I,O),p=E();let ne=tx(I,p),ee=C.createHref(I);g.replaceState(ne,"",ee),m&&S&&S({action:j,location:C.location,delta:0})}function T(O){return qv(O)}let C={get action(){return j},get location(){return l(x,g)},listen(O){if(S)throw new Error("A history only accepts one active listener");return x.addEventListener(ex,M),S=O,()=>{x.removeEventListener(ex,M),S=null}},createHref(O){return u(x,O)},createURL:T,encodeLocation(O){let ae=T(O);return{pathname:ae.pathname,search:ae.search,hash:ae.hash}},push:_,replace:A,go(O){return g.go(O)}};return C}function qv(l,u=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),yt(d,"No window.location.(origin|href) available to create URL");let o=typeof l=="string"?l:eu(l);return o=o.replace(/ $/,"%20"),!u&&o.startsWith("//")&&(o=d+o),new URL(o,d)}function $x(l,u,d="/"){return Vv(l,u,d,!1)}function Vv(l,u,d,o){let x=typeof u=="string"?As(u):u,m=Fn(x.pathname||"/",d);if(m==null)return null;let g=Gx(l);Bv(g);let j=null;for(let S=0;j==null&&S<g.length;++S){let p=Kv(m);j=Iv(g[S],p,o)}return j}function Gx(l,u=[],d=[],o="",x=!1){let m=(g,j,S=x,p)=>{let E={relativePath:p===void 0?g.path||"":p,caseSensitive:g.caseSensitive===!0,childrenIndex:j,route:g};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(o)&&S)return;yt(E.relativePath.startsWith(o),`Absolute route path "${E.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(o.length)}let M=Zn([o,E.relativePath]),_=d.concat(E);g.children&&g.children.length>0&&(yt(g.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${M}".`),Gx(g.children,u,_,M,S)),!(g.path==null&&!g.index)&&u.push({path:M,score:Wv(M,g.index),routesMeta:_})};return l.forEach((g,j)=>{var S;if(g.path===""||!((S=g.path)!=null&&S.includes("?")))m(g,j);else for(let p of Zx(g.path))m(g,j,!0,p)}),u}function Zx(l){let u=l.split("/");if(u.length===0)return[];let[d,...o]=u,x=d.endsWith("?"),m=d.replace(/\?$/,"");if(o.length===0)return x?[m,""]:[m];let g=Zx(o.join("/")),j=[];return j.push(...g.map(S=>S===""?m:[m,S].join("/"))),x&&j.push(...g),j.map(S=>l.startsWith("/")&&S===""?"/":S)}function Bv(l){l.sort((u,d)=>u.score!==d.score?d.score-u.score:Xv(u.routesMeta.map(o=>o.childrenIndex),d.routesMeta.map(o=>o.childrenIndex)))}var Yv=/^:[\w-]+$/,$v=3,Gv=2,Zv=1,Fv=10,Qv=-2,ax=l=>l==="*";function Wv(l,u){let d=l.split("/"),o=d.length;return d.some(ax)&&(o+=Qv),u&&(o+=Gv),d.filter(x=>!ax(x)).reduce((x,m)=>x+(Yv.test(m)?$v:m===""?Zv:Fv),o)}function Xv(l,u){return l.length===u.length&&l.slice(0,-1).every((o,x)=>o===u[x])?l[l.length-1]-u[u.length-1]:0}function Iv(l,u,d=!1){let{routesMeta:o}=l,x={},m="/",g=[];for(let j=0;j<o.length;++j){let S=o[j],p=j===o.length-1,E=m==="/"?u:u.slice(m.length)||"/",M=Fc({path:S.relativePath,caseSensitive:S.caseSensitive,end:p},E),_=S.route;if(!M&&p&&d&&!o[o.length-1].route.index&&(M=Fc({path:S.relativePath,caseSensitive:S.caseSensitive,end:!1},E)),!M)return null;Object.assign(x,M.params),g.push({params:x,pathname:Zn([m,M.pathname]),pathnameBase:ap(Zn([m,M.pathnameBase])),route:_}),M.pathnameBase!=="/"&&(m=Zn([m,M.pathnameBase]))}return g}function Fc(l,u){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[d,o]=Jv(l.path,l.caseSensitive,l.end),x=u.match(d);if(!x)return null;let m=x[0],g=m.replace(/(.)\/+$/,"$1"),j=x.slice(1);return{params:o.reduce((p,{paramName:E,isOptional:M},_)=>{if(E==="*"){let T=j[_]||"";g=m.slice(0,m.length-T.length).replace(/(.)\/+$/,"$1")}const A=j[_];return M&&!A?p[E]=void 0:p[E]=(A||"").replace(/%2F/g,"/"),p},{}),pathname:m,pathnameBase:g,pattern:l}}function Jv(l,u=!1,d=!0){Ya(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=[],x="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(g,j,S)=>(o.push({paramName:j,isOptional:S!=null}),S?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(o.push({paramName:"*"}),x+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?x+="\\/*$":l!==""&&l!=="/"&&(x+="(?:(?=\\/|$))"),[new RegExp(x,u?void 0:"i"),o]}function Kv(l){try{return l.split("/").map(u=>decodeURIComponent(u).replace(/\//g,"%2F")).join("/")}catch(u){return Ya(!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 Fn(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 Pv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function ep(l,u="/"){let{pathname:d,search:o="",hash:x=""}=typeof l=="string"?As(l):l,m;return d?(d=d.replace(/\/\/+/g,"/"),d.startsWith("/")?m=nx(d.substring(1),"/"):m=nx(d,u)):m=u,{pathname:m,search:np(o),hash:lp(x)}}function nx(l,u){let d=u.replace(/\/+$/,"").split("/");return l.split("/").forEach(x=>{x===".."?d.length>1&&d.pop():x!=="."&&d.push(x)}),d.length>1?d.join("/"):"/"}function mf(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 tp(l){return l.filter((u,d)=>d===0||u.route.path&&u.route.path.length>0)}function kf(l){let u=tp(l);return u.map((d,o)=>o===u.length-1?d.pathname:d.pathnameBase)}function zf(l,u,d,o=!1){let x;typeof l=="string"?x=As(l):(x={...l},yt(!x.pathname||!x.pathname.includes("?"),mf("?","pathname","search",x)),yt(!x.pathname||!x.pathname.includes("#"),mf("#","pathname","hash",x)),yt(!x.search||!x.search.includes("#"),mf("#","search","hash",x)));let m=l===""||x.pathname==="",g=m?"/":x.pathname,j;if(g==null)j=d;else{let M=u.length-1;if(!o&&g.startsWith("..")){let _=g.split("/");for(;_[0]==="..";)_.shift(),M-=1;x.pathname=_.join("/")}j=M>=0?u[M]:"/"}let S=ep(x,j),p=g&&g!=="/"&&g.endsWith("/"),E=(m||g===".")&&d.endsWith("/");return!S.pathname.endsWith("/")&&(p||E)&&(S.pathname+="/"),S}var Zn=l=>l.join("/").replace(/\/\/+/g,"/"),ap=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),np=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,lp=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,sp=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 rp(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function ip(l){return l.map(u=>u.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Fx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Qx(l,u){let d=l;if(typeof d!="string"||!Pv.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let o=d,x=!1;if(Fx)try{let m=new URL(window.location.href),g=d.startsWith("//")?new URL(m.protocol+d):new URL(d),j=Fn(g.pathname,u);g.origin===m.origin&&j!=null?d=j+g.search+g.hash:x=!0}catch{Ya(!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:x,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Wx=["POST","PUT","PATCH","DELETE"];new Set(Wx);var up=["GET",...Wx];new Set(up);var Ar=q.createContext(null);Ar.displayName="DataRouter";var Jc=q.createContext(null);Jc.displayName="DataRouterState";var cp=q.createContext(!1),Xx=q.createContext({isTransitioning:!1});Xx.displayName="ViewTransition";var op=q.createContext(new Map);op.displayName="Fetchers";var dp=q.createContext(null);dp.displayName="Await";var Oa=q.createContext(null);Oa.displayName="Navigation";var nu=q.createContext(null);nu.displayName="Location";var pn=q.createContext({outlet:null,matches:[],isDataRoute:!1});pn.displayName="Route";var Uf=q.createContext(null);Uf.displayName="RouteError";var Ix="REACT_ROUTER_ERROR",fp="REDIRECT",hp="ROUTE_ERROR_RESPONSE";function mp(l){if(l.startsWith(`${Ix}:${fp}:{`))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 xp(l){if(l.startsWith(`${Ix}:${hp}:{`))try{let u=JSON.parse(l.slice(40));if(typeof u=="object"&&u&&typeof u.status=="number"&&typeof u.statusText=="string")return new sp(u.status,u.statusText,u.data)}catch{}}function gp(l,{relative:u}={}){yt(kr(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:o}=q.useContext(Oa),{hash:x,pathname:m,search:g}=lu(l,{relative:u}),j=m;return d!=="/"&&(j=m==="/"?d:Zn([d,m])),o.createHref({pathname:j,search:g,hash:x})}function kr(){return q.useContext(nu)!=null}function Wn(){return yt(kr(),"useLocation() may be used only in the context of a <Router> component."),q.useContext(nu).location}var Jx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Kx(l){q.useContext(Oa).static||q.useLayoutEffect(l)}function Kc(){let{isDataRoute:l}=q.useContext(pn);return l?Op():yp()}function yp(){yt(kr(),"useNavigate() may be used only in the context of a <Router> component.");let l=q.useContext(Ar),{basename:u,navigator:d}=q.useContext(Oa),{matches:o}=q.useContext(pn),{pathname:x}=Wn(),m=JSON.stringify(kf(o)),g=q.useRef(!1);return Kx(()=>{g.current=!0}),q.useCallback((S,p={})=>{if(Ya(g.current,Jx),!g.current)return;if(typeof S=="number"){d.go(S);return}let E=zf(S,JSON.parse(m),x,p.relative==="path");l==null&&u!=="/"&&(E.pathname=E.pathname==="/"?u:Zn([u,E.pathname])),(p.replace?d.replace:d.push)(E,p.state,p)},[u,d,m,x,l])}q.createContext(null);function lu(l,{relative:u}={}){let{matches:d}=q.useContext(pn),{pathname:o}=Wn(),x=JSON.stringify(kf(d));return q.useMemo(()=>zf(l,JSON.parse(x),o,u==="path"),[l,x,o,u])}function vp(l,u){return Px(l,u)}function Px(l,u,d,o,x){var I;yt(kr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:m}=q.useContext(Oa),{matches:g}=q.useContext(pn),j=g[g.length-1],S=j?j.params:{},p=j?j.pathname:"/",E=j?j.pathnameBase:"/",M=j&&j.route;{let ne=M&&M.path||"";tg(p,!M||ne.endsWith("*")||ne.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${ne}">) 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="${ne}"> to <Route path="${ne==="/"?"*":`${ne}/*`}">.`)}let _=Wn(),A;if(u){let ne=typeof u=="string"?As(u):u;yt(E==="/"||((I=ne.pathname)==null?void 0:I.startsWith(E)),`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 "${E}" but pathname "${ne.pathname}" was given in the \`location\` prop.`),A=ne}else A=_;let T=A.pathname||"/",C=T;if(E!=="/"){let ne=E.replace(/^\//,"").split("/");C="/"+T.replace(/^\//,"").split("/").slice(ne.length).join("/")}let O=$x(l,{pathname:C});Ya(M||O!=null,`No routes matched location "${A.pathname}${A.search}${A.hash}" `),Ya(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${A.pathname}${A.search}${A.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 ae=wp(O&&O.map(ne=>Object.assign({},ne,{params:Object.assign({},S,ne.params),pathname:Zn([E,m.encodeLocation?m.encodeLocation(ne.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:ne.pathname]),pathnameBase:ne.pathnameBase==="/"?E:Zn([E,m.encodeLocation?m.encodeLocation(ne.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:ne.pathnameBase])})),g,d,o,x);return u&&ae?q.createElement(nu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...A},navigationType:"POP"}},ae):ae}function pp(){let l=Cp(),u=rp(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)",x={padding:"0.5rem",backgroundColor:o},m={padding:"2px 4px",backgroundColor:o},g=null;return console.error("Error handled by React Router default ErrorBoundary:",l),g=q.createElement(q.Fragment,null,q.createElement("p",null,"💿 Hey developer 👋"),q.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",q.createElement("code",{style:m},"ErrorBoundary")," or"," ",q.createElement("code",{style:m},"errorElement")," prop on your route.")),q.createElement(q.Fragment,null,q.createElement("h2",null,"Unexpected Application Error!"),q.createElement("h3",{style:{fontStyle:"italic"}},u),d?q.createElement("pre",{style:x},d):null,g)}var bp=q.createElement(pp,null),eg=class extends q.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=xp(l.digest);d&&(l=d)}let u=l!==void 0?q.createElement(pn.Provider,{value:this.props.routeContext},q.createElement(Uf.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?q.createElement(Sp,{error:l},u):u}};eg.contextType=cp;var xf=new WeakMap;function Sp({children:l,error:u}){let{basename:d}=q.useContext(Oa);if(typeof u=="object"&&u&&"digest"in u&&typeof u.digest=="string"){let o=mp(u.digest);if(o){let x=xf.get(u);if(x)throw x;let m=Qx(o.location,d);if(Fx&&!xf.get(u))if(m.isExternal||o.reloadDocument)window.location.href=m.absoluteURL||m.to;else{const g=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(m.to,{replace:o.replace}));throw xf.set(u,g),g}return q.createElement("meta",{httpEquiv:"refresh",content:`0;url=${m.absoluteURL||m.to}`})}}return l}function Np({routeContext:l,match:u,children:d}){let o=q.useContext(Ar);return o&&o.static&&o.staticContext&&(u.route.errorElement||u.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=u.route.id),q.createElement(pn.Provider,{value:l},d)}function wp(l,u=[],d=null,o=null,x=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 m=l,g=d==null?void 0:d.errors;if(g!=null){let E=m.findIndex(M=>M.route.id&&(g==null?void 0:g[M.route.id])!==void 0);yt(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(g).join(",")}`),m=m.slice(0,Math.min(m.length,E+1))}let j=!1,S=-1;if(d)for(let E=0;E<m.length;E++){let M=m[E];if((M.route.HydrateFallback||M.route.hydrateFallbackElement)&&(S=E),M.route.id){let{loaderData:_,errors:A}=d,T=M.route.loader&&!_.hasOwnProperty(M.route.id)&&(!A||A[M.route.id]===void 0);if(M.route.lazy||T){j=!0,S>=0?m=m.slice(0,S+1):m=[m[0]];break}}}let p=d&&o?(E,M)=>{var _,A;o(E,{location:d.location,params:((A=(_=d.matches)==null?void 0:_[0])==null?void 0:A.params)??{},unstable_pattern:ip(d.matches),errorInfo:M})}:void 0;return m.reduceRight((E,M,_)=>{let A,T=!1,C=null,O=null;d&&(A=g&&M.route.id?g[M.route.id]:void 0,C=M.route.errorElement||bp,j&&(S<0&&_===0?(tg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),T=!0,O=null):S===_&&(T=!0,O=M.route.hydrateFallbackElement||null)));let ae=u.concat(m.slice(0,_+1)),I=()=>{let ne;return A?ne=C:T?ne=O:M.route.Component?ne=q.createElement(M.route.Component,null):M.route.element?ne=M.route.element:ne=E,q.createElement(Np,{match:M,routeContext:{outlet:E,matches:ae,isDataRoute:d!=null},children:ne})};return d&&(M.route.ErrorBoundary||M.route.errorElement||_===0)?q.createElement(eg,{location:d.location,revalidation:d.revalidation,component:C,error:A,children:I(),routeContext:{outlet:null,matches:ae,isDataRoute:!0},onError:p}):I()},null)}function Hf(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jp(l){let u=q.useContext(Ar);return yt(u,Hf(l)),u}function Ep(l){let u=q.useContext(Jc);return yt(u,Hf(l)),u}function Mp(l){let u=q.useContext(pn);return yt(u,Hf(l)),u}function Lf(l){let u=Mp(l),d=u.matches[u.matches.length-1];return yt(d.route.id,`${l} can only be used on routes that contain a unique "id"`),d.route.id}function Tp(){return Lf("useRouteId")}function Cp(){var o;let l=q.useContext(Uf),u=Ep("useRouteError"),d=Lf("useRouteError");return l!==void 0?l:(o=u.errors)==null?void 0:o[d]}function Op(){let{router:l}=jp("useNavigate"),u=Lf("useNavigate"),d=q.useRef(!1);return Kx(()=>{d.current=!0}),q.useCallback(async(x,m={})=>{Ya(d.current,Jx),d.current&&(typeof x=="number"?await l.navigate(x):await l.navigate(x,{fromRouteId:u,...m}))},[l,u])}var lx={};function tg(l,u,d){!u&&!lx[l]&&(lx[l]=!0,Ya(!1,d))}q.memo(Dp);function Dp({routes:l,future:u,state:d,onError:o}){return Px(l,void 0,d,o,u)}function Rp({to:l,replace:u,state:d,relative:o}){yt(kr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:x}=q.useContext(Oa);Ya(!x,"<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:m}=q.useContext(pn),{pathname:g}=Wn(),j=Kc(),S=zf(l,kf(m),g,o==="path"),p=JSON.stringify(S);return q.useEffect(()=>{j(JSON.parse(p),{replace:u,state:d,relative:o})},[j,p,o,u,d]),null}function Gn(l){yt(!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 _p({basename:l="/",children:u=null,location:d,navigationType:o="POP",navigator:x,static:m=!1,unstable_useTransitions:g}){yt(!kr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=l.replace(/^\/*/,"/"),S=q.useMemo(()=>({basename:j,navigator:x,static:m,unstable_useTransitions:g,future:{}}),[j,x,m,g]);typeof d=="string"&&(d=As(d));let{pathname:p="/",search:E="",hash:M="",state:_=null,key:A="default"}=d,T=q.useMemo(()=>{let C=Fn(p,j);return C==null?null:{location:{pathname:C,search:E,hash:M,state:_,key:A},navigationType:o}},[j,p,E,M,_,A,o]);return Ya(T!=null,`<Router basename="${j}"> is not able to match the URL "${p}${E}${M}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:q.createElement(Oa.Provider,{value:S},q.createElement(nu.Provider,{children:u,value:T}))}function Ap({children:l,location:u}){return vp(Mf(l),u)}function Mf(l,u=[]){let d=[];return q.Children.forEach(l,(o,x)=>{if(!q.isValidElement(o))return;let m=[...u,x];if(o.type===q.Fragment){d.push.apply(d,Mf(o.props.children,m));return}yt(o.type===Gn,`[${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>`),yt(!o.props.index||!o.props.children,"An index route cannot have child routes.");let g={id:o.props.id||m.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&&(g.children=Mf(o.props.children,m)),d.push(g)}),d}var Yc="get",$c="application/x-www-form-urlencoded";function Pc(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function kp(l){return Pc(l)&&l.tagName.toLowerCase()==="button"}function zp(l){return Pc(l)&&l.tagName.toLowerCase()==="form"}function Up(l){return Pc(l)&&l.tagName.toLowerCase()==="input"}function Hp(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Lp(l,u){return l.button===0&&(!u||u==="_self")&&!Hp(l)}var Uc=null;function qp(){if(Uc===null)try{new FormData(document.createElement("form"),0),Uc=!1}catch{Uc=!0}return Uc}var Vp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gf(l){return l!=null&&!Vp.has(l)?(Ya(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$c}"`),null):l}function Bp(l,u){let d,o,x,m,g;if(zp(l)){let j=l.getAttribute("action");o=j?Fn(j,u):null,d=l.getAttribute("method")||Yc,x=gf(l.getAttribute("enctype"))||$c,m=new FormData(l)}else if(kp(l)||Up(l)&&(l.type==="submit"||l.type==="image")){let j=l.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let S=l.getAttribute("formaction")||j.getAttribute("action");if(o=S?Fn(S,u):null,d=l.getAttribute("formmethod")||j.getAttribute("method")||Yc,x=gf(l.getAttribute("formenctype"))||gf(j.getAttribute("enctype"))||$c,m=new FormData(j,l),!qp()){let{name:p,type:E,value:M}=l;if(E==="image"){let _=p?`${p}.`:"";m.append(`${_}x`,"0"),m.append(`${_}y`,"0")}else p&&m.append(p,M)}}else{if(Pc(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Yc,o=null,x=$c,g=l}return m&&x==="text/plain"&&(g=m,m=void 0),{action:o,method:d.toLowerCase(),encType:x,formData:m,body:g}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function qf(l,u){if(l===!1||l===null||typeof l>"u")throw new Error(u)}function Yp(l,u,d,o){let x=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return d?x.pathname.endsWith("/")?x.pathname=`${x.pathname}_.${o}`:x.pathname=`${x.pathname}.${o}`:x.pathname==="/"?x.pathname=`_root.${o}`:u&&Fn(x.pathname,u)==="/"?x.pathname=`${u.replace(/\/$/,"")}/_root.${o}`:x.pathname=`${x.pathname.replace(/\/$/,"")}.${o}`,x}async function $p(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 Gp(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 Zp(l,u,d){let o=await Promise.all(l.map(async x=>{let m=u.routes[x.route.id];if(m){let g=await $p(m,d);return g.links?g.links():[]}return[]}));return Xp(o.flat(1).filter(Gp).filter(x=>x.rel==="stylesheet"||x.rel==="preload").map(x=>x.rel==="stylesheet"?{...x,rel:"prefetch",as:"style"}:{...x,rel:"prefetch"}))}function sx(l,u,d,o,x,m){let g=(S,p)=>d[p]?S.route.id!==d[p].route.id:!0,j=(S,p)=>{var E;return d[p].pathname!==S.pathname||((E=d[p].route.path)==null?void 0:E.endsWith("*"))&&d[p].params["*"]!==S.params["*"]};return m==="assets"?u.filter((S,p)=>g(S,p)||j(S,p)):m==="data"?u.filter((S,p)=>{var M;let E=o.routes[S.route.id];if(!E||!E.hasLoader)return!1;if(g(S,p)||j(S,p))return!0;if(S.route.shouldRevalidate){let _=S.route.shouldRevalidate({currentUrl:new URL(x.pathname+x.search+x.hash,window.origin),currentParams:((M=d[0])==null?void 0:M.params)||{},nextUrl:new URL(l,window.origin),nextParams:S.params,defaultShouldRevalidate:!0});if(typeof _=="boolean")return _}return!0}):[]}function Fp(l,u,{includeHydrateFallback:d}={}){return Qp(l.map(o=>{let x=u.routes[o.route.id];if(!x)return[];let m=[x.module];return x.clientActionModule&&(m=m.concat(x.clientActionModule)),x.clientLoaderModule&&(m=m.concat(x.clientLoaderModule)),d&&x.hydrateFallbackModule&&(m=m.concat(x.hydrateFallbackModule)),x.imports&&(m=m.concat(x.imports)),m}).flat(1))}function Qp(l){return[...new Set(l)]}function Wp(l){let u={},d=Object.keys(l).sort();for(let o of d)u[o]=l[o];return u}function Xp(l,u){let d=new Set;return new Set(u),l.reduce((o,x)=>{let m=JSON.stringify(Wp(x));return d.has(m)||(d.add(m),o.push({key:m,link:x})),o},[])}function ag(){let l=q.useContext(Ar);return qf(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function Ip(){let l=q.useContext(Jc);return qf(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Vf=q.createContext(void 0);Vf.displayName="FrameworkContext";function ng(){let l=q.useContext(Vf);return qf(l,"You must render this element inside a <HydratedRouter> element"),l}function Jp(l,u){let d=q.useContext(Vf),[o,x]=q.useState(!1),[m,g]=q.useState(!1),{onFocus:j,onBlur:S,onMouseEnter:p,onMouseLeave:E,onTouchStart:M}=u,_=q.useRef(null);q.useEffect(()=>{if(l==="render"&&g(!0),l==="viewport"){let C=ae=>{ae.forEach(I=>{g(I.isIntersecting)})},O=new IntersectionObserver(C,{threshold:.5});return _.current&&O.observe(_.current),()=>{O.disconnect()}}},[l]),q.useEffect(()=>{if(o){let C=setTimeout(()=>{g(!0)},100);return()=>{clearTimeout(C)}}},[o]);let A=()=>{x(!0)},T=()=>{x(!1),g(!1)};return d?l!=="intent"?[m,_,{}]:[m,_,{onFocus:qi(j,A),onBlur:qi(S,T),onMouseEnter:qi(p,A),onMouseLeave:qi(E,T),onTouchStart:qi(M,A)}]:[!1,_,{}]}function qi(l,u){return d=>{l&&l(d),d.defaultPrevented||u(d)}}function Kp({page:l,...u}){let{router:d}=ag(),o=q.useMemo(()=>$x(d.routes,l,d.basename),[d.routes,l,d.basename]);return o?q.createElement(eb,{page:l,matches:o,...u}):null}function Pp(l){let{manifest:u,routeModules:d}=ng(),[o,x]=q.useState([]);return q.useEffect(()=>{let m=!1;return Zp(l,u,d).then(g=>{m||x(g)}),()=>{m=!0}},[l,u,d]),o}function eb({page:l,matches:u,...d}){let o=Wn(),{future:x,manifest:m,routeModules:g}=ng(),{basename:j}=ag(),{loaderData:S,matches:p}=Ip(),E=q.useMemo(()=>sx(l,u,p,m,o,"data"),[l,u,p,m,o]),M=q.useMemo(()=>sx(l,u,p,m,o,"assets"),[l,u,p,m,o]),_=q.useMemo(()=>{if(l===o.pathname+o.search+o.hash)return[];let C=new Set,O=!1;if(u.forEach(I=>{var ee;let ne=m.routes[I.route.id];!ne||!ne.hasLoader||(!E.some(J=>J.route.id===I.route.id)&&I.route.id in S&&((ee=g[I.route.id])!=null&&ee.shouldRevalidate)||ne.hasClientLoader?O=!0:C.add(I.route.id))}),C.size===0)return[];let ae=Yp(l,j,x.unstable_trailingSlashAwareDataRequests,"data");return O&&C.size>0&&ae.searchParams.set("_routes",u.filter(I=>C.has(I.route.id)).map(I=>I.route.id).join(",")),[ae.pathname+ae.search]},[j,x.unstable_trailingSlashAwareDataRequests,S,o,m,E,u,l,g]),A=q.useMemo(()=>Fp(M,m),[M,m]),T=Pp(M);return q.createElement(q.Fragment,null,_.map(C=>q.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...d})),A.map(C=>q.createElement("link",{key:C,rel:"modulepreload",href:C,...d})),T.map(({key:C,link:O})=>q.createElement("link",{key:C,nonce:d.nonce,...O,crossOrigin:O.crossOrigin??d.crossOrigin})))}function tb(...l){return u=>{l.forEach(d=>{typeof d=="function"?d(u):d!=null&&(d.current=u)})}}var ab=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ab&&(window.__reactRouterVersion="7.13.0")}catch{}function nb({basename:l,children:u,unstable_useTransitions:d,window:o}){let x=q.useRef();x.current==null&&(x.current=Uv({window:o,v5Compat:!0}));let m=x.current,[g,j]=q.useState({action:m.action,location:m.location}),S=q.useCallback(p=>{d===!1?j(p):q.startTransition(()=>j(p))},[d]);return q.useLayoutEffect(()=>m.listen(S),[m,S]),q.createElement(_p,{basename:l,children:u,location:g.location,navigationType:g.action,navigator:m,unstable_useTransitions:d})}var lg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sg=q.forwardRef(function({onClick:u,discover:d="render",prefetch:o="none",relative:x,reloadDocument:m,replace:g,state:j,target:S,to:p,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:_,...A},T){let{basename:C,unstable_useTransitions:O}=q.useContext(Oa),ae=typeof p=="string"&&lg.test(p),I=Qx(p,C);p=I.to;let ne=gp(p,{relative:x}),[ee,J,ce]=Jp(o,A),W=rb(p,{replace:g,state:j,target:S,preventScrollReset:E,relative:x,viewTransition:M,unstable_defaultShouldRevalidate:_,unstable_useTransitions:O});function X(k){u&&u(k),k.defaultPrevented||W(k)}let $=q.createElement("a",{...A,...ce,href:I.absoluteURL||ne,onClick:I.isExternal||m?u:X,ref:tb(T,J),target:S,"data-discover":!ae&&d==="render"?"true":void 0});return ee&&!ae?q.createElement(q.Fragment,null,$,q.createElement(Kp,{page:ne})):$});sg.displayName="Link";var rg=q.forwardRef(function({"aria-current":u="page",caseSensitive:d=!1,className:o="",end:x=!1,style:m,to:g,viewTransition:j,children:S,...p},E){let M=lu(g,{relative:p.relative}),_=Wn(),A=q.useContext(Jc),{navigator:T,basename:C}=q.useContext(Oa),O=A!=null&&db(M)&&j===!0,ae=T.encodeLocation?T.encodeLocation(M).pathname:M.pathname,I=_.pathname,ne=A&&A.navigation&&A.navigation.location?A.navigation.location.pathname:null;d||(I=I.toLowerCase(),ne=ne?ne.toLowerCase():null,ae=ae.toLowerCase()),ne&&C&&(ne=Fn(ne,C)||ne);const ee=ae!=="/"&&ae.endsWith("/")?ae.length-1:ae.length;let J=I===ae||!x&&I.startsWith(ae)&&I.charAt(ee)==="/",ce=ne!=null&&(ne===ae||!x&&ne.startsWith(ae)&&ne.charAt(ae.length)==="/"),W={isActive:J,isPending:ce,isTransitioning:O},X=J?u:void 0,$;typeof o=="function"?$=o(W):$=[o,J?"active":null,ce?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let k=typeof m=="function"?m(W):m;return q.createElement(sg,{...p,"aria-current":X,className:$,ref:E,style:k,to:g,viewTransition:j},typeof S=="function"?S(W):S)});rg.displayName="NavLink";var lb=q.forwardRef(({discover:l="render",fetcherKey:u,navigate:d,reloadDocument:o,replace:x,state:m,method:g=Yc,action:j,onSubmit:S,relative:p,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:_,...A},T)=>{let{unstable_useTransitions:C}=q.useContext(Oa),O=cb(),ae=ob(j,{relative:p}),I=g.toLowerCase()==="get"?"get":"post",ne=typeof j=="string"&&lg.test(j),ee=J=>{if(S&&S(J),J.defaultPrevented)return;J.preventDefault();let ce=J.nativeEvent.submitter,W=(ce==null?void 0:ce.getAttribute("formmethod"))||g,X=()=>O(ce||J.currentTarget,{fetcherKey:u,method:W,navigate:d,replace:x,state:m,relative:p,preventScrollReset:E,viewTransition:M,unstable_defaultShouldRevalidate:_});C&&d!==!1?q.startTransition(()=>X()):X()};return q.createElement("form",{ref:T,method:I,action:ae,onSubmit:o?S:ee,...A,"data-discover":!ne&&l==="render"?"true":void 0})});lb.displayName="Form";function sb(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ig(l){let u=q.useContext(Ar);return yt(u,sb(l)),u}function rb(l,{target:u,replace:d,state:o,preventScrollReset:x,relative:m,viewTransition:g,unstable_defaultShouldRevalidate:j,unstable_useTransitions:S}={}){let p=Kc(),E=Wn(),M=lu(l,{relative:m});return q.useCallback(_=>{if(Lp(_,u)){_.preventDefault();let A=d!==void 0?d:eu(E)===eu(M),T=()=>p(l,{replace:A,state:o,preventScrollReset:x,relative:m,viewTransition:g,unstable_defaultShouldRevalidate:j});S?q.startTransition(()=>T()):T()}},[E,p,M,d,o,u,l,x,m,g,j,S])}var ib=0,ub=()=>`__${String(++ib)}__`;function cb(){let{router:l}=ig("useSubmit"),{basename:u}=q.useContext(Oa),d=Tp(),o=l.fetch,x=l.navigate;return q.useCallback(async(m,g={})=>{let{action:j,method:S,encType:p,formData:E,body:M}=Bp(m,u);if(g.navigate===!1){let _=g.fetcherKey||ub();await o(_,d,g.action||j,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:E,body:M,formMethod:g.method||S,formEncType:g.encType||p,flushSync:g.flushSync})}else await x(g.action||j,{unstable_defaultShouldRevalidate:g.unstable_defaultShouldRevalidate,preventScrollReset:g.preventScrollReset,formData:E,body:M,formMethod:g.method||S,formEncType:g.encType||p,replace:g.replace,state:g.state,fromRouteId:d,flushSync:g.flushSync,viewTransition:g.viewTransition})},[o,x,u,d])}function ob(l,{relative:u}={}){let{basename:d}=q.useContext(Oa),o=q.useContext(pn);yt(o,"useFormAction must be used inside a RouteContext");let[x]=o.matches.slice(-1),m={...lu(l||".",{relative:u})},g=Wn();if(l==null){m.search=g.search;let j=new URLSearchParams(m.search),S=j.getAll("index");if(S.some(E=>E==="")){j.delete("index"),S.filter(M=>M).forEach(M=>j.append("index",M));let E=j.toString();m.search=E?`?${E}`:""}}return(!l||l===".")&&x.route.index&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(m.pathname=m.pathname==="/"?d:Zn([d,m.pathname])),eu(m)}function db(l,{relative:u}={}){let d=q.useContext(Xx);yt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=ig("useViewTransitionState"),x=lu(l,{relative:u});if(!d.isTransitioning)return!1;let m=Fn(d.currentLocation.pathname,o)||d.currentLocation.pathname,g=Fn(d.nextLocation.pathname,o)||d.nextLocation.pathname;return Fc(x.pathname,g)!=null||Fc(x.pathname,m)!=null}/**
|
|
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 ug=(...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 fb=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 hb=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 rx=l=>{const u=hb(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 mb={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 xb=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 gb=q.forwardRef(({color:l="currentColor",size:u=24,strokeWidth:d=2,absoluteStrokeWidth:o,className:x="",children:m,iconNode:g,...j},S)=>q.createElement("svg",{ref:S,...mb,width:u,height:u,stroke:l,strokeWidth:o?Number(d)*24/Number(u):d,className:ug("lucide",x),...!m&&!xb(j)&&{"aria-hidden":"true"},...j},[...g.map(([p,E])=>q.createElement(p,E)),...Array.isArray(m)?m:[m]]));/**
|
|
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 Ae=(l,u)=>{const d=q.forwardRef(({className:o,...x},m)=>q.createElement(gb,{ref:m,iconNode:u,className:ug(`lucide-${fb(rx(l))}`,`lucide-${l}`,o),...x}));return d.displayName=rx(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 yb=[["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"}]],Bf=Ae("activity",yb);/**
|
|
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 vb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],pb=Ae("arrow-down",vb);/**
|
|
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 bb=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],ix=Ae("arrow-right",bb);/**
|
|
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 Sb=[["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"}]],Nb=Ae("arrow-up-down",Sb);/**
|
|
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 wb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],jb=Ae("arrow-up",wb);/**
|
|
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 Eb=[["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"}]],Mb=Ae("bell",Eb);/**
|
|
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 Tb=[["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"}]],ux=Ae("briefcase",Tb);/**
|
|
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 Cb=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Qc=Ae("calendar",Cb);/**
|
|
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 Ob=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Gc=Ae("check",Ob);/**
|
|
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 Db=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Rb=Ae("chevron-down",Db);/**
|
|
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 _b=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ab=Ae("chevron-left",_b);/**
|
|
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 kb=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zb=Ae("chevron-right",kb);/**
|
|
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 Ub=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Hb=Ae("chevrons-up-down",Ub);/**
|
|
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 Lb=[["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"}]],Qn=Ae("circle-alert",Lb);/**
|
|
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 qb=[["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"}]],cx=Ae("circle-arrow-down",qb);/**
|
|
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 Vb=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],su=Ae("circle-check-big",Vb);/**
|
|
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 Bb=[["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"}]],Tf=Ae("circle-x",Bb);/**
|
|
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 Yb=[["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"}]],cg=Ae("clipboard-list",Yb);/**
|
|
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 $b=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Wc=Ae("clock",$b);/**
|
|
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 Gb=[["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"}]],og=Ae("external-link",Gb);/**
|
|
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 Zb=[["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"}]],Fb=Ae("eye-off",Zb);/**
|
|
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 Qb=[["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"}]],Wb=Ae("eye",Qb);/**
|
|
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 Xb=[["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"}]],Ib=Ae("file-text",Xb);/**
|
|
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 Jb=[["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"}]],Kb=Ae("git-pull-request",Jb);/**
|
|
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 Pb=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],e1=Ae("hourglass",Pb);/**
|
|
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 t1=[["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"}]],a1=Ae("house",t1);/**
|
|
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 n1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],l1=Ae("info",n1);/**
|
|
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 s1=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],r1=Ae("kanban",s1);/**
|
|
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 i1=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],u1=Ae("list-ordered",i1);/**
|
|
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 c1=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],dg=Ae("loader-circle",c1);/**
|
|
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:"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"}]],fg=Ae("map",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:"M5 12h14",key:"1ays0h"}]],f1=Ae("minus",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 h1=[["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"}]],hg=Ae("pause",h1);/**
|
|
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 m1=[["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"}]],mg=Ae("pen",m1);/**
|
|
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 x1=[["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"}]],vn=Ae("play",x1);/**
|
|
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 g1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ru=Ae("plus",g1);/**
|
|
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 y1=[["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"}]],v1=Ae("rotate-ccw",y1);/**
|
|
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 p1=[["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"}]],b1=Ae("save",p1);/**
|
|
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 S1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],iu=Ae("search",S1);/**
|
|
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 N1=[["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"}]],xg=Ae("settings",N1);/**
|
|
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 w1=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],j1=Ae("square-pen",w1);/**
|
|
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 E1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],M1=Ae("terminal",E1);/**
|
|
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 T1=[["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"}]],gg=Ae("test-tube-diagonal",T1);/**
|
|
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 C1=[["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"}]],yg=Ae("trash-2",C1);/**
|
|
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 O1=[["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"}]],D1=Ae("triangle-alert",O1);/**
|
|
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 R1=[["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"}]],_1=Ae("wifi",R1);/**
|
|
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 A1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],uu=Ae("x",A1);/**
|
|
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 k1=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],z1=Ae("zap",k1),Yf="";let $f=!1,Xc=null;function U1(l){$f=l}function H1(l){Xc=l}function L1(){return $f}function vg(l){return encodeURIComponent(l.replace(/\//g,"~"))}function xt(l){return $f&&Xc?l.replace("/api/",`/api/projects/${vg(Xc)}/`):l}function q1(){return st("/api/mode")}function pg(){return st("/api/projects")}async function st(l,u){const d=`${Yf}${l}`,o=await fetch(d,{headers:{"Content-Type":"application/json",...u==null?void 0:u.headers},...u});if(!o.ok){const x=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(x.error||`HTTP ${o.status}: ${o.statusText}`)}return o.json()}function Ki(){return st(xt("/api/status"))}function bg(){return st(xt("/api/prs"))}function V1(l,u){const d=`?lines=${encodeURIComponent(u)}`;return st(xt(`/api/logs/${encodeURIComponent(l)}${d}`))}function Gf(){return st(xt("/api/config"))}async function Sg(){if(L1()){const u=(await pg()).filter(o=>o.valid);return(await Promise.all(u.map(async o=>{try{const x=await st(`/api/projects/${vg(o.name)}/config`);return{projectId:o.name,config:x}}catch(x){return console.error(`Failed to fetch config for project ${o.name}`,x),null}}))).filter(o=>o!==null)}else{const l=await Gf();return[{projectId:Xc||"current",config:l}]}}function Os(l){return st(xt("/api/config"),{method:"PUT",body:JSON.stringify(l)})}function B1(){return st(xt("/api/doctor"))}function Ng(){return st(xt("/api/schedule-info"))}function Y1(){return st(xt("/api/actions/run"),{method:"POST"})}function wg(){return st(xt("/api/actions/review"),{method:"POST"})}function $1(){return st(xt("/api/actions/qa"),{method:"POST"})}function G1(){return st(xt("/api/actions/audit"),{method:"POST"})}function Z1(){return st(xt("/api/actions/analytics"),{method:"POST"})}function F1(){return st(xt("/api/actions/planner"),{method:"POST"})}function Pi(){return st(xt("/api/actions/install-cron"),{method:"POST"})}function Q1(){return st(xt("/api/actions/uninstall-cron"),{method:"POST"})}function W1(l="all"){return st(xt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:l})})}const Vl=["Draft","Ready","In Progress","Review","Done"];function jg(){return st(xt("/api/board/status"))}function X1(l){return st(xt("/api/board/issues"),{method:"POST",body:JSON.stringify(l)})}function Eg(l,u){return st(xt(`/api/board/issues/${l}/move`),{method:"PATCH",body:JSON.stringify({column:u})})}async function I1(l){const u=`${Yf}${xt(`/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 J1(){return st(xt("/api/actions/clear-lock"),{method:"POST"})}function K1(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,x=q.useRef(l);x.current=l,q.useEffect(()=>{if(!o)return;const m=`${Yf}${xt("/api/status/events")}`,g=new EventSource(m);return g.addEventListener("status_changed",j=>{try{const S=JSON.parse(j.data);x.current(S)}catch{}}),()=>{g.close()}},[o,...u])}function ox(){return st("/api/queue/status")}function P1(l){const u=`?window=${encodeURIComponent(l)}`;return st(`/api/queue/analytics${u}`)}function e2(l){return st("/api/queue/clear",{method:"POST",body:JSON.stringify({force:l})})}function t2(){return st(xt("/api/roadmap"))}function a2(){return st(xt("/api/roadmap/scan"),{method:"POST"})}function Mg(l){return st(xt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:l})})}function $a(l,u=[],d){const o=(d==null?void 0:d.enabled)??!0,[x,m]=q.useState(null),[g,j]=q.useState(!0),[S,p]=q.useState(null),E=q.useRef(l);E.current=l;const M=q.useRef(()=>{(async()=>{p(null);try{const A=await E.current();m(A)}catch(A){p(A instanceof Error?A:new Error("Unknown error"))}})()});return M.current=M.current.bind(M),q.useEffect(()=>{if(!o)return;let _=!1;return j(!0),p(null),(async()=>{try{const T=await E.current();_||m(T)}catch(T){_||p(T instanceof Error?T:new Error("Unknown error"))}finally{_||j(!1)}})(),()=>{_=!0}},[...u,o]),{data:x,loading:g,error:S,refetch:M.current}}const dx=l=>{let u;const d=new Set,o=(p,E)=>{const M=typeof p=="function"?p(u):p;if(!Object.is(M,u)){const _=u;u=E??(typeof M!="object"||M===null)?M:Object.assign({},u,M),d.forEach(A=>A(u,_))}},x=()=>u,j={setState:o,getState:x,getInitialState:()=>S,subscribe:p=>(d.add(p),()=>d.delete(p))},S=u=l(o,x,j);return j},n2=l=>l?dx(l):dx,l2=l=>l;function s2(l,u=l2){const d=Ke.useSyncExternalStore(l.subscribe,()=>u(l.getState()),()=>u(l.getInitialState()));return Ke.useDebugValue(d),d}const fx=l=>{const u=n2(l),d=o=>s2(u,o);return Object.assign(d,u),d},r2=l=>l?fx(l):fx,i2=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,ra=r2(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(x=>x.id!==d)}))},5e3)},removeToast:u=>l(d=>({toasts:d.toasts.filter(o=>o.id!==u)})),globalModeLoading:!0,setGlobalModeLoading:u=>l({globalModeLoading:u}),isGlobalMode:!1,setGlobalMode:u=>{U1(u),l({isGlobalMode:u})},projects:[],setProjects:u=>l({projects:u}),selectedProjectId:i2,selectProject:u=>{H1(u),u?localStorage.setItem("nw-selected-project",u):localStorage.removeItem("nw-selected-project"),l(d=>{const o=d.projects.find(x=>x.name===u);return{selectedProjectId:u,...o?{projectName:o.name}:{}}})},status:null,setStatus:u=>l({status:u})})),u2=()=>{const[l,u]=q.useState(!1),{projectName:d,isGlobalMode:o,projects:x,selectedProjectId:m,selectProject:g,globalModeLoading:j}=ra(),{data:S}=$a(bg,[m],{enabled:!j}),p=(S==null?void 0:S.length)??0,E=q.useMemo(()=>[{icon:a1,label:"Dashboard",path:"/"},{icon:r1,label:"Board",path:"/board"},{icon:Kb,label:"Pull Requests",path:"/prs",badge:p},{icon:fg,label:"Roadmap",path:"/roadmap"},{icon:Qc,label:"Scheduling",path:"/scheduling"},{icon:M1,label:"Logs",path:"/logs"},{icon:xg,label:"Settings",path:"/settings"}],[p]);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(ux,{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:m||"",onChange:M=>g(M.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:x.filter(M=>M.valid).map(M=>s.jsx("option",{value:M.name,children:M.name},M.name))}),s.jsx(Hb,{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(ux,{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:E.map(M=>s.jsx(Ke.Fragment,{children:s.jsx("li",{children:s.jsx(rg,{to:M.path,className:({isActive:_})=>`
|
|
345
|
+
flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
|
|
346
|
+
${_?"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.jsxs(s.Fragment,{children:[s.jsx(M.icon,{className:`h-5 w-5 transition-colors ${_?"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:M.label}),M.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 ${_?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:M.badge})),_&&!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:M.label})]})})})},M.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(zb,{className:"h-5 w-5"}):s.jsx(Ab,{className:"h-5 w-5"})})})]})},c2=()=>{const{projectName:l}=ra();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(_1,{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(iu,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),s.jsxs("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(Mb,{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("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full transition-all",children:s.jsx(xg,{className:"h-5 w-5"})})]}),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"})]})]})},o2=({toast:l,onDismiss:u})=>{const d={success:s.jsx(su,{className:"h-5 w-5 text-green-400"}),error:s.jsx(Qn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(l1,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(D1,{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(uu,{className:"h-5 w-5"})]})})]})})})},d2=()=>{const{toasts:l,removeToast:u}=ra();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(o2,{toast:d,onDismiss:u},d.id))})};function f2(){const{setGlobalMode:l,setGlobalModeLoading:u,setProjects:d,selectProject:o,selectedProjectId:x}=ra();q.useEffect(()=>{u(!0),q1().then(async({globalMode:m})=>{if(l(m),!m)return;const g=await pg();d(g);const j=g.filter(S=>S.valid);x&&j.some(S=>S.name===x)?o(x):j.length>0&&o(j[0].name)}).catch(()=>{l(!1)}).finally(()=>{u(!1)})},[])}function hx(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?hx(l)>=hx(u)?l:u:l:u}function h2(){const{setStatus:l,selectedProjectId:u,globalModeLoading:d}=ra(),o=q.useRef(null);o.current=ra.getState().status,K1(x=>{Hc(x,o.current)===x&&l(x)},[u,d],{enabled:!d}),q.useEffect(()=>{if(d)return;Ki().then(m=>{Hc(m,o.current)===m&&l(m)}).catch(()=>{});const x=setInterval(()=>{Ki().then(m=>{Hc(m,o.current)===m&&l(m)}).catch(()=>{})},3e4);return()=>clearInterval(x)},[u,d,l]),q.useEffect(()=>{const x=()=>{Ki().then(m=>{Hc(m,o.current)===m&&l(m)}).catch(()=>{})};return window.addEventListener("focus",x),()=>window.removeEventListener("focus",x)},[u,l])}const Le=({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})]}),Be=({children:l,variant:u="primary",size:d="md",loading:o=!1,className:x="",disabled:m,...g})=>{const j="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]",S={primary:"bg-indigo-600 text-white hover:bg-indigo-500 focus:ring-indigo-500 shadow-[0_0_15px_-3px_rgba(79,70,229,0.4)] border border-indigo-500/50 hover:shadow-[0_0_20px_-3px_rgba(79,70,229,0.5)]",secondary:"bg-[#1f2937] text-slate-200 hover:bg-[#374151] focus:ring-slate-500 border border-white/5",danger:"bg-red-600/10 text-red-400 hover:bg-red-600/20 focus:ring-red-500 border border-red-900/50 hover:border-red-500/50",ghost:"bg-transparent text-slate-400 hover:bg-white/5 hover:text-slate-200 focus:ring-slate-400",outline:"border border-slate-700/50 bg-transparent text-slate-300 hover:bg-white/5 hover:border-slate-500 focus:ring-slate-400"},p={sm:"h-8 px-3 text-xs tracking-wide",md:"h-10 px-4 py-2 text-sm",lg:"h-12 px-6 text-base",icon:"h-9 w-9"};return s.jsxs("button",{className:`${j} ${S[u]} ${p[d]} ${x}`,disabled:m||o,...g,children:[o&&s.jsx(dg,{className:"mr-2 h-4 w-4 animate-spin"}),l]})},Zc=({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})},Tg={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,x]=q.useState(""),[m,g]=q.useState(""),[j,S]=q.useState(l),[p,E]=q.useState(!1),[M,_]=q.useState(null),{addToast:A}=ra(),T=async C=>{if(C.preventDefault(),!!o.trim()){E(!0),_(null);try{await X1({title:o.trim(),body:m,column:j}),A({title:"Issue created",message:`"${o.trim()}" added to ${j}`,type:"success"}),d(),u()}catch(O){_(O instanceof Error?O.message:"Failed to create issue")}finally{E(!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(uu,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:T,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:C=>x(C.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:j,onChange:C=>S(C.target.value),className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm focus:outline-none focus:border-indigo-500/50 appearance-none cursor-pointer",children:Vl.map(C=>s.jsx("option",{value:C,children:C},C))})]}),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:m,onChange:C=>g(C.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"})]}),M&&s.jsx("p",{className:"text-sm text-red-400",children:M}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Be,{variant:"ghost",type:"button",onClick:u,children:"Cancel"}),s.jsx(Be,{type:"submit",disabled:p||!o.trim(),children:p?"Creating...":"Create Issue"})]})]})]})]})},x2=({issue:l,onClose:u,onMoved:d,onClosed:o})=>{const[x,m]=q.useState(!1),[g,j]=q.useState(!1),{addToast:S}=ra(),p=async _=>{if(_!==l.column){m(!0);try{await Eg(l.number,_),S({title:"Issue moved",message:`#${l.number} moved to ${_}`,type:"success"}),d(),u()}catch(A){S({title:"Move failed",message:A instanceof Error?A.message:"Failed to move issue",type:"error"})}finally{m(!1)}}},E=async()=>{if(confirm(`Close issue #${l.number}: "${l.title}"?`)){j(!0);try{await I1(l.number),S({title:"Issue closed",message:`#${l.number} closed on GitHub`,type:"success"}),o(),u()}catch(_){S({title:"Close failed",message:_ instanceof Error?_.message:"Failed to close issue",type:"error"})}finally{j(!1)}}},M=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(Zc,{variant:Tg[M].badge,children:M})]}),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(uu,{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:"}),Vl.filter(_=>_!==l.column).map(_=>s.jsx("button",{onClick:()=>p(_),disabled:x,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.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(og,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:E,disabled:g,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:g?"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."})})]})]})},g2=({issue:l,onClick:u,onDragStart:d})=>{const[o,x]=q.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:m=>{m.dataTransfer.setData("issueNumber",String(l.number)),m.dataTransfer.effectAllowed="move",x(!0),d(l)},onDragEnd:()=>x(!1),children:s.jsxs(Le,{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(", ")})]})})},y2=({name:l,issues:u,draggingIssue:d,onIssueClick:o,onNewIssue:x,onMoveIssue:m,onDragStart:g})=>{const j=Tg[l],[S,p]=q.useState(!1),E=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 ${S&&E?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:M=>{E&&(M.preventDefault(),M.dataTransfer.dropEffect="move",p(!0))},onDragLeave:()=>p(!1),onDrop:M=>{M.preventDefault(),p(!1),d&&d.column!==l&&m(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 ${j.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:()=>x(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(ru,{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 ${S&&E?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:S&&E?"Drop here":"No issues"})}):u.map(M=>s.jsx(g2,{issue:M,onClick:()=>o(M),onDragStart:g},M.id))})]})},v2=()=>{const[l,u]=q.useState(null),[d,o]=q.useState(null),[x,m]=q.useState(null),[g,j]=q.useState(null),S=q.useRef(!1),{addToast:p,selectedProjectId:E,globalModeLoading:M}=ra(),{data:_,loading:A,error:T,refetch:C}=$a(jg,[E],{enabled:!M});q.useEffect(()=>{const I=setInterval(()=>{S.current||C()},3e4);return()=>clearInterval(I)},[C]);const O=q.useCallback(async(I,ne)=>{m(null);const ee=g??(_==null?void 0:_.columns);if(!ee)return;const J=ee,ce={};for(const X of Vl)ce[X]=(ee[X]??[]).filter($=>$.number!==I.number);const W={...I,column:ne};ce[ne]=[...ce[ne]??[],W],j(ce),u(X=>(X==null?void 0:X.number)===I.number?W:X),S.current=!0;try{await Eg(I.number,ne),C(),setTimeout(()=>{j(null),S.current=!1},800)}catch(X){j(J),u($=>($==null?void 0:$.number)===I.number?I:$),S.current=!1,p({title:"Move failed",message:X instanceof Error?X.message:"Failed to move issue",type:"error"})}},[p,C,g,_]);if(M||A)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(T&&T.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(T)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:T.message}),s.jsx(Be,{onClick:()=>C(),children:"Retry"})]});if(!_)return null;const ae=g??_.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:[Vl.reduce((I,ne)=>{var ee;return I+(((ee=ae[ne])==null?void 0:ee.length)??0)},0)," issues across ",Vl.length," columns"]})]}),s.jsxs(Be,{onClick:()=>o("Ready"),children:[s.jsx(ru,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>m(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Vl.length*236}px`},children:Vl.map(I=>s.jsx(y2,{name:I,issues:ae[I]??[],draggingIssue:x,onIssueClick:u,onNewIssue:o,onMoveIssue:O,onDragStart:m},I))})}),l&&s.jsx(x2,{issue:l,onClose:()=>u(null),onMoved:()=>C(),onClosed:()=>C()}),d&&s.jsx(m2,{defaultColumn:d,onClose:()=>o(null),onCreated:()=>C()})]})},p2={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"},b2=()=>{var ye,G,se,me,Se,Re,b,Y,ie,he,je;const l=Kc(),[u,d]=q.useState(null),[o,x]=q.useState(!1),[m,g]=q.useState(null),{setProjectName:j,addToast:S,selectedProjectId:p,globalModeLoading:E,status:M,setStatus:_}=ra(),A=()=>Ki().then(_).catch(()=>{}),{data:T}=$a(Ng,[p],{enabled:!E}),{data:C}=$a(()=>jg().catch(()=>null),[p],{enabled:!E}),O=M;if(Ke.useEffect(()=>{O!=null&&O.projectName&&j(O.projectName)},[O,j]),E)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!O)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const ae=O.prs.length,I=O.prs.filter(fe=>fe.reviewScore!==null&&fe.reviewScore<70).length,ne=((ye=C==null?void 0:C.columns.Ready)==null?void 0:ye.length)??0,ee=((G=C==null?void 0:C.columns["In Progress"])==null?void 0:G.length)??0,J=O.processes.find(fe=>fe.name==="executor"),ce=O.processes.find(fe=>fe.name==="reviewer"),W=O.processes.find(fe=>fe.name==="qa"),X=O.processes.find(fe=>fe.name==="audit"),$=O.processes.find(fe=>fe.name==="planner"),k=O.processes.find(fe=>fe.name==="analytics"),te=async fe=>{d(fe);try{const ve=await W1(fe),ke=ve.results.every(_e=>_e.success);S({title:ke?"Process Cancelled":"Cancel Failed",message:ve.results.map(_e=>_e.message).join("; "),type:ke?"success":"error"})}catch(ve){S({title:"Cancel Failed",message:ve instanceof Error?ve.message:"Failed to cancel process",type:"error"})}finally{d(null),A()}},V=async()=>{x(!0);try{await J1(),S({title:"Lock Cleared",message:"Stale executor state removed",type:"success"}),A()}catch(fe){S({title:"Clear Failed",message:fe instanceof Error?fe.message:"Failed to clear lock",type:"error"})}finally{x(!1)}},oe=async(fe,ve)=>{g(fe);try{await ve(),S({title:`${fe} Started`,message:`${fe} is now running`,type:"success"}),A()}catch(ke){S({title:"Start Failed",message:ke instanceof Error?ke.message:`Failed to start ${fe}`,type:"error"})}finally{g(null)}},ge=fe=>{if(!fe)return"Not scheduled";try{const ve=new Date(fe),ke=new Date,_e=ve.getTime()-ke.getTime(),ot=Math.floor(_e/6e4);return ot<0?"Running now...":ot<60?`In ${ot} min`:ot<1440?`In ${Math.floor(ot/60)} hr${ot>=120?"s":""}`:`In ${Math.floor(ot/1440)} day${ot>=2880?"s":""}`}catch{return"Unknown"}};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(Le,{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:ne})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(su,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(Le,{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:ee})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(Bf,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(Le,{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:ae})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(Wc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${I>0?"text-red-400 font-medium":"text-slate-500"}`,children:I>0?`${I} need work`:"All passing"})]}),s.jsxs(Le,{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:"Cron Status"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:O.crontab.installed?"Active":"Inactive"})]}),s.jsx("div",{className:`p-2 rounded-lg ${O.crontab.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-700/50 text-slate-500"}`,children:s.jsx(Qc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:O.crontab.installed?`${O.crontab.entries.length} entr${O.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(Le,{className:"p-6",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200 mb-4",children:"System Status"}),s.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Project"}),s.jsx("p",{className:"text-sm text-slate-200",children:O.projectName})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Provider"}),s.jsx("p",{className:"text-sm text-slate-200 capitalize",children:O.config.provider})]}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs font-medium text-slate-500 uppercase mb-1",children:"Last Updated"}),s.jsx("p",{className:"text-sm text-slate-200",children:new Date(O.timestamp).toLocaleString()})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-base font-semibold text-slate-200 mb-4",children:"Process Status"}),s.jsx("div",{className:"space-y-2",children:[{label:"Executor",process:J,subtitle:J!=null&&J.running?`PID: ${J.pid} • ${O.activePrd??"Running"}`:"Idle",actions:s.jsxs(s.Fragment,{children:[(J==null?void 0:J.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 border border-red-500/30 hover:border-red-400/50",onClick:()=>te("run"),disabled:u==="run",children:[s.jsx(Tf,{className:"h-4 w-4 mr-1"}),u==="run"?"Stopping...":"Stop"]}),!(J!=null&&J.running)&&O.activePrd&&s.jsx(Be,{size:"sm",variant:"ghost",className:"text-amber-400 hover:text-amber-300",onClick:V,disabled:o,children:o?"Clearing...":"Force Clear"}),!(J!=null&&J.running)&&!O.activePrd&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>oe("Executor",Y1),disabled:m==="Executor",children:[s.jsx(vn,{className:"h-4 w-4 mr-1"}),m==="Executor"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})},{label:"Reviewer",process:ce,subtitle:ce!=null&&ce.running?`PID: ${ce.pid} • Running`:"Idle",actions:s.jsxs(s.Fragment,{children:[ce!=null&&ce.running?s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 border border-red-500/30 hover:border-red-400/50",onClick:()=>te("review"),disabled:u==="review",children:[s.jsx(Tf,{className:"h-4 w-4 mr-1"}),u==="review"?"Stopping...":"Stop"]}):s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>oe("Reviewer",wg),disabled:m==="Reviewer",children:[s.jsx(vn,{className:"h-4 w-4 mr-1"}),m==="Reviewer"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),disabled:!(ce!=null&&ce.running),children:"Log"})]})},{label:"QA",process:W,subtitle:W!=null&&W.running?`PID: ${W.pid} • Running`:"Idle",actions:s.jsxs(s.Fragment,{children:[!(W!=null&&W.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>oe("QA",$1),disabled:m==="QA",children:[s.jsx(vn,{className:"h-4 w-4 mr-1"}),m==="QA"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})},{label:"Auditor",process:X,subtitle:X!=null&&X.running?`PID: ${X.pid} • Running`:"Idle",actions:s.jsxs(s.Fragment,{children:[!(X!=null&&X.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>oe("Auditor",G1),disabled:m==="Auditor",children:[s.jsx(vn,{className:"h-4 w-4 mr-1"}),m==="Auditor"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})},{label:"Planner",process:$,subtitle:$!=null&&$.running?`PID: ${$.pid} • Writing PRDs`:"Idle",actions:s.jsxs(s.Fragment,{children:[!($!=null&&$.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>oe("Planner",F1),disabled:m==="Planner",children:[s.jsx(vn,{className:"h-4 w-4 mr-1"}),m==="Planner"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})},{label:"Analytics",process:k,subtitle:k!=null&&k.running?`PID: ${k.pid} • Analyzing`:"Idle",actions:s.jsxs(s.Fragment,{children:[!(k!=null&&k.running)&&s.jsxs(Be,{size:"sm",variant:"ghost",className:"text-green-400 hover:text-green-300",onClick:()=>oe("Analytics",Z1),disabled:m==="Analytics",children:[s.jsx(vn,{className:"h-4 w-4 mr-1"}),m==="Analytics"?"Starting...":"Run"]}),s.jsx(Be,{size:"sm",variant:"ghost",onClick:()=>l("/logs"),children:"Log"})]})}].sort((fe,ve)=>{var ke,_e;return((ke=ve.process)!=null&&ke.running?1:0)-((_e=fe.process)!=null&&_e.running?1:0)}).map(({label:fe,process:ve,subtitle:ke,actions:_e})=>s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border transition-all ${ve!=null&&ve.running?"bg-green-500/5 border-green-500/40 shadow-[0_0_12px_rgba(34,197,94,0.08)]":"bg-slate-950/50 border-slate-800 opacity-60 hover:opacity-100"}`,children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${ve!=null&&ve.running?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:`font-medium ${ve!=null&&ve.running?"text-slate-200":"text-slate-400"}`,children:fe}),(ve==null?void 0:ve.running)&&s.jsx("span",{className:"text-[10px] font-semibold tracking-wider uppercase px-1.5 py-0.5 rounded bg-green-500/15 text-green-400 border border-green-500/30",children:"Live"})]}),s.jsx("div",{className:"text-xs text-slate-500",children:ke})]})]}),s.jsx("div",{className:"flex items-center space-x-2",children:_e})]},fe))})]}),s.jsxs(Le,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-base font-semibold text-slate-200",children:"Scheduling"}),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(ix,{className:"ml-1 h-3 w-3"})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${T!=null&&T.executor.installed?"bg-indigo-500/10 text-indigo-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(Qc,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${T!=null&&T.executor.installed?"text-slate-200":"text-slate-500"}`,children:"Executor"}),s.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":ge(T==null?void 0:T.executor.nextRun)})]})]})}),s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${T!=null&&T.reviewer.installed?"bg-purple-500/10 text-purple-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(Wc,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${T!=null&&T.reviewer.installed?"text-slate-200":"text-slate-500"}`,children:"Reviewer"}),s.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":ge(T==null?void 0:T.reviewer.nextRun)})]})]})}),s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${(se=T==null?void 0:T.qa)!=null&&se.installed?"bg-green-500/10 text-green-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(gg,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(me=T==null?void 0:T.qa)!=null&&me.installed?"text-slate-200":"text-slate-500"}`,children:"QA"}),s.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":ge((Se=T==null?void 0:T.qa)==null?void 0:Se.nextRun)})]})]})}),s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${(Re=T==null?void 0:T.audit)!=null&&Re.installed?"bg-amber-500/10 text-amber-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(iu,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(b=T==null?void 0:T.audit)!=null&&b.installed?"text-slate-200":"text-slate-500"}`,children:"Auditor"}),s.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":ge((Y=T==null?void 0:T.audit)==null?void 0:Y.nextRun)})]})]})}),s.jsx("div",{className:"flex items-center justify-between p-3 bg-slate-950/50 rounded-lg border border-slate-800",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:`p-1.5 rounded-md ${(ie=T==null?void 0:T.planner)!=null&&ie.installed?"bg-cyan-500/10 text-cyan-400":"bg-slate-800 text-slate-500"}`,children:s.jsx(cg,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("div",{className:`text-sm font-medium ${(he=T==null?void 0:T.planner)!=null&&he.installed?"text-slate-200":"text-slate-500"}`,children:"Planner"}),s.jsx("div",{className:"text-xs text-slate-500",children:T!=null&&T.paused?"Paused":ge((je=T==null?void 0:T.planner)==null?void 0:je.nextRun)})]})]})})]})]})]}),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(ix,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(Le,{className:"p-4",children:C?s.jsx("div",{className:"flex flex-wrap gap-3",children:Vl.map(fe=>{var ke;const ve=((ke=C.columns[fe])==null?void 0:ke.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 ${p2[fe]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:fe}),s.jsx("span",{className:"text-xs font-bold",children:ve})]},fe)})}):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."]})})]})]})},S2=()=>{const[l,u]=q.useState(!0),[d,o]=q.useState(""),[x,m]=q.useState("executor"),g=q.useRef(null),{selectedProjectId:j,globalModeLoading:S}=ra(),{data:p,loading:E,error:M,refetch:_}=$a(()=>V1(x,500),[x,j],{enabled:!S}),{data:A}=$a(Ki,[j],{enabled:!S}),T=(p==null?void 0:p.lines)||[];q.useEffect(()=>{l&&g.current&&(g.current.scrollTop=g.current.scrollHeight)},[T,l]),q.useEffect(()=>{if(!l)return;const I=window.setInterval(()=>{_()},3e3);return()=>window.clearInterval(I)},[l,x,_]);const C=T.filter(I=>I.toLowerCase().includes(d.toLowerCase())),O=I=>{m(I),o("")},ae=I=>{if(!(A!=null&&A.processes))return!1;const ne=A.processes.find(ee=>ee.name===I);return(ne==null?void 0:ne.running)??!1};return M?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{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:M.message}),s.jsx(Be,{onClick:()=>_(),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:I=>o(I.target.value)}),s.jsx(iu,{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.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>O("executor"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="executor"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Executor"}),ae("executor")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>O("reviewer"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="reviewer"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"Reviewer"}),ae("reviewer")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>O("qa"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="qa"?"bg-slate-800 text-slate-200 shadow-sm border border-slate-700":"text-slate-400 hover:bg-slate-800 hover:text-slate-200"}`,children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("span",{children:"QA"}),ae("qa")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>O("audit"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="audit"?"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:"Auditor"}),ae("audit")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})}),s.jsx("button",{onClick:()=>O("planner"),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${x==="planner"?"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:"Planner"}),ae("planner")&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})})]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>_(),children:[s.jsx(cx,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Be,{size:"sm",variant:"ghost",onClick:()=>u(!l),children:[l?s.jsx(hg,{className:"h-4 w-4 mr-2"}):s.jsx(vn,{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: ",x,".log"]}),s.jsxs("span",{children:[C.length," lines"]})]}),s.jsxs("div",{ref:g,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..."}):C.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"}):C.map((I,ne)=>{const ee=I.includes("[ERROR]"),J=I.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${ee?"text-red-400":J?"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:ne+1}),I]},ne)}),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(cx,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},N2=()=>{const[l,u]=q.useState(null),[d,o]=q.useState(!1),[x,m]=q.useState("all"),[g,j]=q.useState("number"),[S,p]=q.useState("desc"),{addToast:E,selectedProjectId:M,globalModeLoading:_}=ra(),{data:A,loading:T,error:C,refetch:O}=$a(bg,[M],{enabled:!_}),ae=A??[],I=k=>{switch(k){case"pass":return s.jsx(su,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(Tf,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(dg,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(Qn,{className:"h-4 w-4 text-slate-500"})}},ne=k=>{switch(k){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=k=>k===null?"No review decision yet":k===100?"PR has been approved":k===0?"Changes have been requested":`Review score: ${k}`,J=q.useMemo(()=>ae.filter(k=>{switch(x){case"needs-work":return k.ciStatus==="fail"||k.reviewScore===0;case"pending":return k.ciStatus==="pending"||k.ciStatus==="unknown"||k.reviewScore===null;case"passed":return k.ciStatus==="pass"&&k.reviewScore===100;case"all":default:return!0}}),[ae,x]),ce=q.useMemo(()=>[...J].sort((te,V)=>{let oe=0;switch(g){case"number":oe=te.number-V.number;break;case"title":oe=te.title.localeCompare(V.title);break;case"branch":oe=te.branch.localeCompare(V.branch);break;case"ciStatus":{const ge={fail:0,pending:1,unknown:2,pass:3};oe=(ge[te.ciStatus]??2)-(ge[V.ciStatus]??2);break}case"reviewScore":{const ge=te.reviewScore??-1,ye=V.reviewScore??-1;oe=ge-ye;break}}return S==="asc"?oe:-oe}),[J,g,S]),W=k=>{g===k?p(S==="asc"?"desc":"asc"):(j(k),p("desc"))},X=k=>g!==k?s.jsx(Nb,{className:"h-3 w-3 text-slate-600"}):S==="asc"?s.jsx(jb,{className:"h-3 w-3 text-indigo-400"}):s.jsx(pb,{className:"h-3 w-3 text-indigo-400"});if(T)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(C)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{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:C.message}),s.jsx(Be,{onClick:()=>O(),children:"Retry"})]});const $=async()=>{o(!0);try{const k=await wg();E({title:"Reviewer Started",message:k.pid?`Started with PID ${k.pid}`:"Reviewer started",type:"success"})}catch(k){E({title:"Reviewer Failed",message:k instanceof Error?k.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:()=>m("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="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:()=>m("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="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:()=>m("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="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:()=>m("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${x==="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(Be,{size:"sm",onClick:$,disabled:d,children:[s.jsx(iu,{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:()=>W("number"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Title"}),X("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:()=>W("branch"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Branch"}),X("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:()=>W("ciStatus"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"CI Status"}),X("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:()=>W("reviewScore"),children:s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Review Score"}),X("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:[ce.map(k=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>u(l===k.number?null:k.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:["#",k.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:k.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:k.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:ne(k.ciStatus),children:[I(k.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:k.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:k.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:ee(k.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${k.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${k.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${k.reviewScore>=70?"text-green-500":"text-red-500"}`,children:k.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:k.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:te=>te.stopPropagation(),children:s.jsx(og,{className:"h-4 w-4"})})})]},k.number)),ce.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:ae.length===0?"No open PRs found.":`No PRs match the "${x}" filter.`})})]})]})}),l&&s.jsx(Le,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const k=ae.find(te=>te.number===l);return k?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:k.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:k.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:ne(k.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:[I(k.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:k.ciStatus})]})]}),k.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:ee(k.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${k.reviewScore>=70?"text-green-500":"text-red-500"}`,children:k.reviewScore})]})]})]}):null})()})]})},Bt=Ke.forwardRef(({className:l="",label:u,checked:d,onChange:o,...x},m)=>{const g=j=>{o&&o(j.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:m,checked:d,onChange:g,...x}),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})]})});Bt.displayName="Switch";const w2=()=>{const{addToast:l,selectedProjectId:u,globalModeLoading:d}=ra(),[o,x]=q.useState(!1),[m,g]=q.useState(!1),{data:j,loading:S,error:p,refetch:E}=$a(t2,[u],{enabled:!d});q.useEffect(()=>{if(!(j!=null&&j.enabled))return;const I=setInterval(()=>{E()},1e4);return()=>clearInterval(I)},[j==null?void 0:j.enabled,E]);const M=async I=>{g(!0);try{await Mg(I),l({title:I?"Scanner Enabled":"Scanner Disabled",message:I?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:I?"success":"info"}),E()}catch(ne){l({title:"Toggle Failed",message:ne instanceof Error?ne.message:"Failed to toggle scanner",type:"error"})}finally{g(!1)}},_=async()=>{x(!0);try{const I=await a2();I.created.length>0?l({title:"Scan Complete",message:`Created ${I.created.length} PRD(s): ${I.created.join(", ")}`,type:"success"}):l({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),I.errors.length>0&&l({title:"Scan Errors",message:I.errors.join("; "),type:"warning"}),E()}catch(I){l({title:"Scan Failed",message:I instanceof Error?I.message:"Failed to scan roadmap",type:"error"})}finally{x(!1)}};if(S)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading roadmap scanner..."})});if(p)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{className:"h-12 w-12 text-red-400"}),s.jsx("div",{className:"text-slate-300",children:"Failed to load roadmap data"}),s.jsx("div",{className:"text-sm text-slate-500",children:p.message}),s.jsx(Be,{onClick:()=>E(),children:"Retry"})]});if(!j)return null;if(j.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(Le,{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(fg,{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 A=j.totalItems>0?Math.round(j.processedItems/j.totalItems*100):0,T=E2(j.status),C=M2(j.items),O=j.lastScan?T2(j.lastScan):"Never",ae=j.autoScanInterval?Math.round(j.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(Bt,{label:j.enabled?"Enabled":"Disabled",checked:j.enabled,onChange:M,disabled:m}),s.jsxs(Be,{onClick:_,loading:o,disabled:!j.enabled||j.status==="complete",children:[s.jsx(vn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(Le,{className:`p-6 border-2 ${T.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(T.icon,{className:`h-8 w-8 ${T.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 ${T.textColor}`,children:T.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:O})]}),j.enabled&&j.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",ae," min"]})]}),j.enabled&&j.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(Le,{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:[j.processedItems," / ",j.totalItems," items (",A,"%)"]})]}),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 ${A===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${A}%`}})})]}),Object.entries(C).map(([I,ne])=>s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:I}),s.jsx("div",{className:"space-y-2",children:ne.map(ee=>s.jsx(j2,{item:ee},ee.hash))})]},I))]})};function j2({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(f1,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):d?s.jsx(su,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Ib,{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(Zc,{variant:"neutral",children:"Skipped"}):d?s.jsx(Zc,{variant:"success",children:l.prdFile||"Processed"}):s.jsx(Zc,{variant:"warning",children:"Pending"})})]})}function E2(l){switch(l){case"complete":return{label:"Complete",icon:su,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:Wc,textColor:"text-blue-400",borderColor:"border-blue-500/20 bg-blue-500/5"};case"scanning":return{label:"Scanning",icon:vn,textColor:"text-indigo-400",borderColor:"border-indigo-500/20 bg-indigo-500/5"};case"disabled":return{label:"Disabled",icon:Qn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:Qn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function M2(l){const u={};for(const d of l){const o=d.section||"General";u[o]||(u[o]=[]),u[o].push(d)}return u}function T2(l){try{const u=new Date(l),o=new Date().getTime()-u.getTime(),x=Math.floor(o/6e4);if(x<1)return"Just now";if(x<60)return`${x} min ago`;const m=Math.floor(x/60);return m<24?`${m} hr ago`:`${Math.floor(m/24)} day(s) ago`}catch{return"Unknown"}}const C2=({analytics:l})=>{const u=Object.entries(l.byProviderBucket).filter(([d])=>d!=="__unassigned__");return u.length===0?s.jsx("div",{className:"text-sm text-slate-500 py-2",children:"No provider bucket data available."}):s.jsx("div",{className:"space-y-2","data-testid":"provider-bucket-summary",children:u.map(([d,o])=>s.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-md bg-slate-950/40 border border-slate-800","data-testid":`provider-bucket-${d}`,children:[s.jsx("span",{className:"text-xs font-mono text-slate-300 truncate max-w-[60%]",title:d,children:d}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-400 shrink-0",children:[s.jsxs("span",{children:[s.jsx("span",{className:"text-slate-200 font-medium",children:o.running})," running"]}),s.jsx("span",{className:"text-slate-700",children:"/"}),s.jsxs("span",{children:[s.jsx("span",{className:"text-slate-200 font-medium",children:o.pending})," pending"]})]})]},d))})};var Es={},Ta={},Vi={},Ms={},yf={},mx;function O2(){return mx||(mx=1,Object.defineProperty(yf,"__esModule",{value:!0})),yf}var Bi={},Yi={},xx;function ks(){var u,d,o,x,m,Cg,j;if(xx)return Yi;xx=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.CronField=void 0;let l=(j=class{constructor(p,E={rawValue:""}){et(this,m);et(this,u,!1);et(this,d,!1);et(this,o,!1);et(this,x,[]);$0(this,"options",{rawValue:""});if(!Array.isArray(p))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(p.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...E,rawValue:E.rawValue??""},Me(this,x,p.sort(j.sorter)),Me(this,o,this.options.wildcard!==void 0?this.options.wildcard:we(this,m,Cg).call(this)),Me(this,u,this.options.rawValue.includes("L")||p.includes("L")),Me(this,d,this.options.rawValue.includes("?")||p.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,x)}static sorter(p,E){const M=typeof p=="number",_=typeof E=="number";return M&&_?p-E:!M&&!_?p.localeCompare(E):M?-1:1}static findNearestValueInList(p,E,M=!1){if(M){for(let _=p.length-1;_>=0;_--)if(p[_]<E)return p[_];return null}for(let _=0;_<p.length;_++)if(p[_]>E)return p[_];return null}findNearestValue(p,E=!1){return this.constructor.findNearestValueInList(this.values,p,E)}serialize(){return{wildcard:K(this,o),values:K(this,x)}}validate(){let p;const E=this.chars.length>0?` or chars ${this.chars.join("")}`:"",M=C=>O=>new RegExp(`^\\d{0,2}${O}$`).test(C),_=C=>(p=C,typeof C=="number"?C>=this.min&&C<=this.max:this.chars.some(M(C)));if(!K(this,x).every(_))throw new Error(`${this.constructor.name} Validation error, got value ${p} expected range ${this.min}-${this.max}${E}`);const T=K(this,x).find((C,O)=>K(this,x).indexOf(C)!==O);if(T)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${T}`)}},u=new WeakMap,d=new WeakMap,o=new WeakMap,x=new WeakMap,m=new WeakSet,Cg=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(p,E)=>E+this.min).every(p=>K(this,x).includes(p))},j);return Yi.CronField=l,Yi}var gx;function D2(){if(gx)return Bi;gx=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.CronDayOfMonth=void 0;const l=ks(),u=1,d=31,o=Object.freeze(["L"]);let x=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(g,j){super(g,j),this.validate()}get values(){return super.values}};return Bi.CronDayOfMonth=x,Bi}var $i={},yx;function R2(){if(yx)return $i;yx=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.CronDayOfWeek=void 0;const l=ks(),u=0,d=7,o=Object.freeze(["L"]);let x=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(g,j){super(g,j),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return $i.CronDayOfWeek=x,$i}var Gi={},vx;function _2(){if(vx)return Gi;vx=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.CronHour=void 0;const l=ks(),u=0,d=23,o=Object.freeze([]);let x=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(g,j){super(g,j),this.validate()}get values(){return super.values}};return Gi.CronHour=x,Gi}var Zi={},px;function A2(){if(px)return Zi;px=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.CronMinute=void 0;const l=ks(),u=0,d=59,o=Object.freeze([]);let x=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(g,j){super(g,j),this.validate()}get values(){return super.values}};return Zi.CronMinute=x,Zi}var Fi={},vf={},va={},bx;function k2(){if(bx)return va;bx=1,Object.defineProperty(va,"__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 x extends l{}class m extends l{constructor(r){super(`Invalid unit ${r}`)}}class g extends l{}class j extends l{constructor(){super("Zone is an abstract class")}}const S="numeric",p="short",E="long",M={year:S,month:S,day:S},_={year:S,month:p,day:S},A={year:S,month:p,day:S,weekday:p},T={year:S,month:E,day:S},C={year:S,month:E,day:S,weekday:E},O={hour:S,minute:S},ae={hour:S,minute:S,second:S},I={hour:S,minute:S,second:S,timeZoneName:p},ne={hour:S,minute:S,second:S,timeZoneName:E},ee={hour:S,minute:S,hourCycle:"h23"},J={hour:S,minute:S,second:S,hourCycle:"h23"},ce={hour:S,minute:S,second:S,hourCycle:"h23",timeZoneName:p},W={hour:S,minute:S,second:S,hourCycle:"h23",timeZoneName:E},X={year:S,month:S,day:S,hour:S,minute:S},$={year:S,month:S,day:S,hour:S,minute:S,second:S},k={year:S,month:p,day:S,hour:S,minute:S},te={year:S,month:p,day:S,hour:S,minute:S,second:S},V={year:S,month:p,day:S,weekday:p,hour:S,minute:S},oe={year:S,month:E,day:S,hour:S,minute:S,timeZoneName:p},ge={year:S,month:E,day:S,hour:S,minute:S,second:S,timeZoneName:p},ye={year:S,month:E,day:S,weekday:E,hour:S,minute:S,timeZoneName:E},G={year:S,month:E,day:S,weekday:E,hour:S,minute:S,second:S,timeZoneName:E};class se{get type(){throw new j}get name(){throw new j}get ianaName(){return this.name}get isUniversal(){throw new j}offsetName(r,f){throw new j}formatOffset(r,f){throw new j}offset(r){throw new j}equals(r){throw new j}get isValid(){throw new j}}let me=null;class Se extends se{static get instance(){return me===null&&(me=new Se),me}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(r,{format:f,locale:v}){return wn(r,f,v)}formatOffset(r,f){return Xl(this.offset(r),f)}offset(r){return-new Date(r).getTimezoneOffset()}equals(r){return r.type==="system"}get isValid(){return!0}}const Re=new Map;function b(h){let r=Re.get(h);return r===void 0&&(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:h,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Re.set(h,r)),r}const Y={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ie(h,r){const f=h.format(r).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(f),[,N,D,z,U,L,de,pe]=v;return[z,N,D,U,L,de,pe]}function he(h,r){const f=h.formatToParts(r),v=[];for(let N=0;N<f.length;N++){const{type:D,value:z}=f[N],U=Y[D];D==="era"?v[U]=z:Ce(U)||(v[U]=parseInt(z,10))}return v}const je=new Map;class fe extends se{static create(r){let f=je.get(r);return f===void 0&&je.set(r,f=new fe(r)),f}static resetCache(){je.clear(),Re.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=fe.isValidZone(r)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(r,{format:f,locale:v}){return wn(r,f,v,this.name)}formatOffset(r,f){return Xl(this.offset(r),f)}offset(r){if(!this.valid)return NaN;const f=new Date(r);if(isNaN(f))return NaN;const v=b(this.name);let[N,D,z,U,L,de,pe]=v.formatToParts?he(v,f):ie(v,f);U==="BC"&&(N=-Math.abs(N)+1);const Fe=Zt({year:N,month:D,day:z,hour:L===24?0:L,minute:de,second:pe,millisecond:0});let Oe=+f;const vt=Oe%1e3;return Oe-=vt>=0?vt:1e3+vt,(Fe-Oe)/(60*1e3)}equals(r){return r.type==="iana"&&r.name===this.name}get isValid(){return this.valid}}let ve={};function ke(h,r={}){const f=JSON.stringify([h,r]);let v=ve[f];return v||(v=new Intl.ListFormat(h,r),ve[f]=v),v}const _e=new Map;function ot(h,r={}){const f=JSON.stringify([h,r]);let v=_e.get(f);return v===void 0&&(v=new Intl.DateTimeFormat(h,r),_e.set(f,v)),v}const Jt=new Map;function Bl(h,r={}){const f=JSON.stringify([h,r]);let v=Jt.get(f);return v===void 0&&(v=new Intl.NumberFormat(h,r),Jt.set(f,v)),v}const Xn=new Map;function Ga(h,r={}){const{base:f,...v}=r,N=JSON.stringify([h,v]);let D=Xn.get(N);return D===void 0&&(D=new Intl.RelativeTimeFormat(h,r),Xn.set(N,D)),D}let Za=null;function In(){return Za||(Za=new Intl.DateTimeFormat().resolvedOptions().locale,Za)}const Jn=new Map;function Kn(h){let r=Jn.get(h);return r===void 0&&(r=new Intl.DateTimeFormat(h).resolvedOptions(),Jn.set(h,r)),r}const sn=new Map;function Pn(h){let r=sn.get(h);if(!r){const f=new Intl.Locale(h);r="getWeekInfo"in f?f.getWeekInfo():f.weekInfo,"minimalDays"in r||(r={...Yl,...r}),sn.set(h,r)}return r}function el(h){const r=h.indexOf("-x-");r!==-1&&(h=h.substring(0,r));const f=h.indexOf("-u-");if(f===-1)return[h];{let v,N;try{v=ot(h).resolvedOptions(),N=h}catch{const L=h.substring(0,f);v=ot(L).resolvedOptions(),N=L}const{numberingSystem:D,calendar:z}=v;return[N,D,z]}}function zs(h,r,f){return(f||r)&&(h.includes("-u-")||(h+="-u"),f&&(h+=`-ca-${f}`),r&&(h+=`-nu-${r}`)),h}function Us(h){const r=[];for(let f=1;f<=12;f++){const v=Ee.utc(2009,f,1);r.push(h(v))}return r}function Ut(h){const r=[];for(let f=1;f<=7;f++){const v=Ee.utc(2016,11,13+f);r.push(h(v))}return r}function xe(h,r,f,v){const N=h.listingMode();return N==="error"?null:N==="en"?f(r):v(r)}function qe(h){return h.numberingSystem&&h.numberingSystem!=="latn"?!1:h.numberingSystem==="latn"||!h.locale||h.locale.startsWith("en")||Kn(h.locale).numberingSystem==="latn"}class Ht{constructor(r,f,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:N,floor:D,...z}=v;if(!f||Object.keys(z).length>0){const U={useGrouping:!1,...v};v.padTo>0&&(U.minimumIntegerDigits=v.padTo),this.inf=Bl(r,U)}}format(r){if(this.inf){const f=this.floor?Math.floor(r):r;return this.inf.format(f)}else{const f=this.floor?Math.floor(r):Fl(r,3);return tt(f,this.padTo)}}}class rn{constructor(r,f,v){this.opts=v,this.originalZone=void 0;let N;if(this.opts.timeZone)this.dt=r;else if(r.zone.type==="fixed"){const z=-1*(r.offset/60),U=z>=0?`Etc/GMT+${z}`:`Etc/GMT${z}`;r.offset!==0&&fe.create(U).valid?(N=U,this.dt=r):(N="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,N=r.zone.name):(N="UTC",this.dt=r.setZone("UTC").plus({minutes:r.offset}),this.originalZone=r.zone);const D={...this.opts};D.timeZone=D.timeZone||N,this.dtf=ot(f,D)}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(f=>{if(f.type==="timeZoneName"){const v=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...f,value:v}}else return f}):r}resolvedOptions(){return this.dtf.resolvedOptions()}}class Hs{constructor(r,f,v){this.opts={style:"long",...v},!f&&qr()&&(this.rtf=Ga(r,v))}format(r,f){return this.rtf?this.rtf.format(r,f):dn(f,r,this.opts.numeric,this.opts.style!=="long")}formatToParts(r,f){return this.rtf?this.rtf.formatToParts(r,f):[]}}const Yl={firstDay:1,minimalDays:4,weekend:[6,7]};class Ye{static fromOpts(r){return Ye.create(r.locale,r.numberingSystem,r.outputCalendar,r.weekSettings,r.defaultToEN)}static create(r,f,v,N,D=!1){const z=r||ft.defaultLocale,U=z||(D?"en-US":In()),L=f||ft.defaultNumberingSystem,de=v||ft.defaultOutputCalendar,pe=Vr(N)||ft.defaultWeekSettings;return new Ye(U,L,de,pe,z)}static resetCache(){Za=null,_e.clear(),Jt.clear(),Xn.clear(),Jn.clear(),sn.clear()}static fromObject({locale:r,numberingSystem:f,outputCalendar:v,weekSettings:N}={}){return Ye.create(r,f,v,N)}constructor(r,f,v,N,D){const[z,U,L]=el(r);this.locale=z,this.numberingSystem=f||U||null,this.outputCalendar=v||L||null,this.weekSettings=N,this.intl=zs(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=D,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=qe(this)),this.fastNumbersCached}listingMode(){const r=this.isEnglish(),f=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return r&&f?"en":"intl"}clone(r){return!r||Object.getOwnPropertyNames(r).length===0?this:Ye.create(r.locale||this.specifiedLocale,r.numberingSystem||this.numberingSystem,r.outputCalendar||this.outputCalendar,Vr(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,f=!1){return xe(this,r,pu,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");f&=!v;const N=f?{month:r,day:"numeric"}:{month:r},D=f?"format":"standalone";if(!this.monthsCache[D][r]){const z=v?U=>this.dtFormatter(U,N).format():U=>this.extract(U,N,"month");this.monthsCache[D][r]=Us(z)}return this.monthsCache[D][r]})}weekdays(r,f=!1){return xe(this,r,Qs,()=>{const v=f?{weekday:r,year:"numeric",month:"long",day:"numeric"}:{weekday:r},N=f?"format":"standalone";return this.weekdaysCache[N][r]||(this.weekdaysCache[N][r]=Ut(D=>this.extract(D,v,"weekday"))),this.weekdaysCache[N][r]})}meridiems(){return xe(this,void 0,()=>jn,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ee.utc(2016,11,13,9),Ee.utc(2016,11,13,19)].map(f=>this.extract(f,r,"dayperiod"))}return this.meridiemCache})}eras(r){return xe(this,r,Zr,()=>{const f={era:r};return this.eraCache[r]||(this.eraCache[r]=[Ee.utc(-40,1,1),Ee.utc(2017,1,1)].map(v=>this.extract(v,f,"era"))),this.eraCache[r]})}extract(r,f,v){const N=this.dtFormatter(r,f),D=N.formatToParts(),z=D.find(U=>U.type.toLowerCase()===v);return z?z.value:null}numberFormatter(r={}){return new Ht(this.intl,r.forceSimple||this.fastNumbers,r)}dtFormatter(r,f={}){return new rn(r,this.intl,f)}relFormatter(r={}){return new Hs(this.intl,this.isEnglish(),r)}listFormatter(r={}){return ke(this.intl,r)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Kn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:cn()?Pn(this.locale):Yl}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 zr=null;class pt extends se{static get utcInstance(){return zr===null&&(zr=new pt(0)),zr}static instance(r){return r===0?pt.utcInstance:new pt(r)}static parseSpecifier(r){if(r){const f=r.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(f)return new pt(Wl(f[1],f[2]))}return null}constructor(r){super(),this.fixed=r}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Xl(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Xl(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(r,f){return Xl(this.fixed,f)}get isUniversal(){return!0}offset(){return this.fixed}equals(r){return r.type==="fixed"&&r.fixed===this.fixed}get isValid(){return!0}}class Kt extends se{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 Yt(h,r){if(Ce(h)||h===null)return r;if(h instanceof se)return h;if(Ct(h)){const f=h.toLowerCase();return f==="default"?r:f==="local"||f==="system"?Se.instance:f==="utc"||f==="gmt"?pt.utcInstance:pt.parseSpecifier(f)||fe.create(h)}else return ua(h)?pt.instance(h):typeof h=="object"&&"offset"in h&&typeof h.offset=="function"?h:new Kt(h)}const $t={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},cu={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]},to=$t.hanidec.replace(/[\[|\]]/g,"").split("");function ao(h){let r=parseInt(h,10);if(isNaN(r)){r="";for(let f=0;f<h.length;f++){const v=h.charCodeAt(f);if(h[f].search($t.hanidec)!==-1)r+=to.indexOf(h[f]);else for(const N in cu){const[D,z]=cu[N];v>=D&&v<=z&&(r+=v-D)}}return parseInt(r,10)}else return r}const tl=new Map;function Ls(){tl.clear()}function Pt({numberingSystem:h},r=""){const f=h||"latn";let v=tl.get(f);v===void 0&&(v=new Map,tl.set(f,v));let N=v.get(r);return N===void 0&&(N=new RegExp(`${$t[f]}${r}`),v.set(r,N)),N}let un=()=>Date.now(),$l="system",al=null,ou=null,Ur=null,qs=60,nl,du=null;class ft{static get now(){return un}static set now(r){un=r}static set defaultZone(r){$l=r}static get defaultZone(){return Yt($l,Se.instance)}static get defaultLocale(){return al}static set defaultLocale(r){al=r}static get defaultNumberingSystem(){return ou}static set defaultNumberingSystem(r){ou=r}static get defaultOutputCalendar(){return Ur}static set defaultOutputCalendar(r){Ur=r}static get defaultWeekSettings(){return du}static set defaultWeekSettings(r){du=Vr(r)}static get twoDigitCutoffYear(){return qs}static set twoDigitCutoffYear(r){qs=r%100}static get throwOnInvalid(){return nl}static set throwOnInvalid(r){nl=r}static resetCaches(){Ye.resetCache(),fe.resetCache(),Ee.resetCache(),Ls()}}class ia{constructor(r,f){this.reason=r,this.explanation=f}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Hr=[0,31,59,90,120,151,181,212,243,273,304,334],Vs=[0,31,60,91,121,152,182,213,244,274,305,335];function ea(h,r){return new ia("unit out of range",`you specified ${r} (of type ${typeof r}) as a ${h}, which is invalid`)}function Bs(h,r,f){const v=new Date(Date.UTC(h,r-1,f));h<100&&h>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const N=v.getUTCDay();return N===0?7:N}function Lr(h,r,f){return f+(sl(h)?Vs:Hr)[r-1]}function Fa(h,r){const f=sl(h)?Vs:Hr,v=f.findIndex(D=>D<r),N=r-f[v];return{month:v+1,day:N}}function Nt(h,r){return(h-r+7)%7+1}function At(h,r=4,f=1){const{year:v,month:N,day:D}=h,z=Lr(v,N,D),U=Nt(Bs(v,N,D),f);let L=Math.floor((z-U+14-r)/7),de;return L<1?(de=v-1,L=rl(de,r,f)):L>rl(v,r,f)?(de=v+1,L=1):de=v,{weekYear:de,weekNumber:L,weekday:U,...Il(h)}}function bn(h,r=4,f=1){const{weekYear:v,weekNumber:N,weekday:D}=h,z=Nt(Bs(v,1,r),f),U=Wa(v);let L=N*7+D-z-7+r,de;L<1?(de=v-1,L+=Wa(de)):L>U?(de=v+1,L-=Wa(v)):de=v;const{month:pe,day:ze}=Fa(de,L);return{year:de,month:pe,day:ze,...Il(h)}}function Gl(h){const{year:r,month:f,day:v}=h,N=Lr(r,f,v);return{year:r,ordinal:N,...Il(h)}}function fu(h){const{year:r,ordinal:f}=h,{month:v,day:N}=Fa(r,f);return{year:r,month:v,day:N,...Il(h)}}function hu(h,r){if(!Ce(h.localWeekday)||!Ce(h.localWeekNumber)||!Ce(h.localWeekYear)){if(!Ce(h.weekday)||!Ce(h.weekNumber)||!Ce(h.weekYear))throw new x("Cannot mix locale-based week fields with ISO-based week fields");return Ce(h.localWeekday)||(h.weekday=h.localWeekday),Ce(h.localWeekNumber)||(h.weekNumber=h.localWeekNumber),Ce(h.localWeekYear)||(h.weekYear=h.localWeekYear),delete h.localWeekday,delete h.localWeekNumber,delete h.localWeekYear,{minDaysInFirstWeek:r.getMinDaysInFirstWeek(),startOfWeek:r.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function mu(h,r=4,f=1){const v=Qa(h.weekYear),N=Gt(h.weekNumber,1,rl(h.weekYear,r,f)),D=Gt(h.weekday,1,7);return v?N?D?!1:ea("weekday",h.weekday):ea("week",h.weekNumber):ea("weekYear",h.weekYear)}function Zl(h){const r=Qa(h.year),f=Gt(h.ordinal,1,Wa(h.year));return r?f?!1:ea("ordinal",h.ordinal):ea("year",h.year)}function Ys(h){const r=Qa(h.year),f=Gt(h.month,1,12),v=Gt(h.day,1,Gs(h.year,h.month));return r?f?v?!1:ea("day",h.day):ea("month",h.month):ea("year",h.year)}function Sn(h){const{hour:r,minute:f,second:v,millisecond:N}=h,D=Gt(r,0,23)||r===24&&f===0&&v===0&&N===0,z=Gt(f,0,59),U=Gt(v,0,59),L=Gt(N,0,999);return D?z?U?L?!1:ea("millisecond",N):ea("second",v):ea("minute",f):ea("hour",r)}function Ce(h){return typeof h>"u"}function ua(h){return typeof h=="number"}function Qa(h){return typeof h=="number"&&h%1===0}function Ct(h){return typeof h=="string"}function xu(h){return Object.prototype.toString.call(h)==="[object Date]"}function qr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function cn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ll(h){return Array.isArray(h)?h:[h]}function gu(h,r,f){if(h.length!==0)return h.reduce((v,N)=>{const D=[r(N),N];return v&&f(v[0],D[0])===v[0]?v:D},null)[1]}function yu(h,r){return r.reduce((f,v)=>(f[v]=h[v],f),{})}function Nn(h,r){return Object.prototype.hasOwnProperty.call(h,r)}function Vr(h){if(h==null)return null;if(typeof h!="object")throw new g("Week settings must be an object");if(!Gt(h.firstDay,1,7)||!Gt(h.minimalDays,1,7)||!Array.isArray(h.weekend)||h.weekend.some(r=>!Gt(r,1,7)))throw new g("Invalid week settings");return{firstDay:h.firstDay,minimalDays:h.minimalDays,weekend:Array.from(h.weekend)}}function Gt(h,r,f){return Qa(h)&&h>=r&&h<=f}function $s(h,r){return h-r*Math.floor(h/r)}function tt(h,r=2){const f=h<0;let v;return f?v="-"+(""+-h).padStart(r,"0"):v=(""+h).padStart(r,"0"),v}function wt(h){if(!(Ce(h)||h===null||h===""))return parseInt(h,10)}function on(h){if(!(Ce(h)||h===null||h===""))return parseFloat(h)}function Br(h){if(!(Ce(h)||h===null||h==="")){const r=parseFloat("0."+h)*1e3;return Math.floor(r)}}function Fl(h,r,f="round"){const v=10**r;switch(f){case"expand":return h>0?Math.ceil(h*v)/v:Math.floor(h*v)/v;case"trunc":return Math.trunc(h*v)/v;case"round":return Math.round(h*v)/v;case"floor":return Math.floor(h*v)/v;case"ceil":return Math.ceil(h*v)/v;default:throw new RangeError(`Value rounding ${f} is out of range`)}}function sl(h){return h%4===0&&(h%100!==0||h%400===0)}function Wa(h){return sl(h)?366:365}function Gs(h,r){const f=$s(r-1,12)+1,v=h+(r-f)/12;return f===2?sl(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][f-1]}function Zt(h){let r=Date.UTC(h.year,h.month-1,h.day,h.hour,h.minute,h.second,h.millisecond);return h.year<100&&h.year>=0&&(r=new Date(r),r.setUTCFullYear(h.year,h.month-1,h.day)),+r}function Zs(h,r,f){return-Nt(Bs(h,1,r),f)+r-1}function rl(h,r=4,f=1){const v=Zs(h,r,f),N=Zs(h+1,r,f);return(Wa(h)-v+N)/7}function Ql(h){return h>99?h:h>ft.twoDigitCutoffYear?1900+h:2e3+h}function wn(h,r,f,v=null){const N=new Date(h),D={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(D.timeZone=v);const z={timeZoneName:r,...D},U=new Intl.DateTimeFormat(f,z).formatToParts(N).find(L=>L.type.toLowerCase()==="timezonename");return U?U.value:null}function Wl(h,r){let f=parseInt(h,10);Number.isNaN(f)&&(f=0);const v=parseInt(r,10)||0,N=f<0||Object.is(f,-0)?-v:v;return f*60+N}function Yr(h){const r=Number(h);if(typeof h=="boolean"||h===""||!Number.isFinite(r))throw new g(`Invalid unit value ${h}`);return r}function Xa(h,r){const f={};for(const v in h)if(Nn(h,v)){const N=h[v];if(N==null)continue;f[r(v)]=Yr(N)}return f}function Xl(h,r){const f=Math.trunc(Math.abs(h/60)),v=Math.trunc(Math.abs(h%60)),N=h>=0?"+":"-";switch(r){case"short":return`${N}${tt(f,2)}:${tt(v,2)}`;case"narrow":return`${N}${f}${v>0?`:${v}`:""}`;case"techie":return`${N}${tt(f,2)}${tt(v,2)}`;default:throw new RangeError(`Value format ${r} is out of range for property format`)}}function Il(h){return yu(h,["hour","minute","second","millisecond"])}const vu=["January","February","March","April","May","June","July","August","September","October","November","December"],Fs=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],no=["J","F","M","A","M","J","J","A","S","O","N","D"];function pu(h){switch(h){case"narrow":return[...no];case"short":return[...Fs];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 Jl=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Da=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],$r=["M","T","W","T","F","S","S"];function Qs(h){switch(h){case"narrow":return[...$r];case"short":return[...Da];case"long":return[...Jl];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const jn=["AM","PM"],il=["Before Christ","Anno Domini"],bu=["BC","AD"],Gr=["B","A"];function Zr(h){switch(h){case"narrow":return[...Gr];case"short":return[...bu];case"long":return[...il];default:return null}}function Kl(h){return jn[h.hour<12?0:1]}function Ia(h,r){return Qs(r)[h.weekday-1]}function Fr(h,r){return pu(r)[h.month-1]}function Pl(h,r){return Zr(r)[h.year<0?0:1]}function dn(h,r,f="always",v=!1){const N={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."]},D=["hours","minutes","seconds"].indexOf(h)===-1;if(f==="auto"&&D){const ze=h==="days";switch(r){case 1:return ze?"tomorrow":`next ${N[h][0]}`;case-1:return ze?"yesterday":`last ${N[h][0]}`;case 0:return ze?"today":`this ${N[h][0]}`}}const z=Object.is(r,-0)||r<0,U=Math.abs(r),L=U===1,de=N[h],pe=v?L?de[1]:de[2]||de[1]:L?N[h][0]:h;return z?`${U} ${pe} ago`:`in ${U} ${pe}`}function Ws(h,r){let f="";for(const v of h)v.literal?f+=v.val:f+=r(v.val);return f}const Xs={D:M,DD:_,DDD:T,DDDD:C,t:O,tt:ae,ttt:I,tttt:ne,T:ee,TT:J,TTT:ce,TTTT:W,f:X,ff:k,fff:oe,ffff:ye,F:$,FF:te,FFF:ge,FFFF:G};class kt{static create(r,f={}){return new kt(r,f)}static parseFormat(r){let f=null,v="",N=!1;const D=[];for(let z=0;z<r.length;z++){const U=r.charAt(z);U==="'"?((v.length>0||N)&&D.push({literal:N||/^\s+$/.test(v),val:v===""?"'":v}),f=null,v="",N=!N):N||U===f?v+=U:(v.length>0&&D.push({literal:/^\s+$/.test(v),val:v}),v=U,f=U)}return v.length>0&&D.push({literal:N||/^\s+$/.test(v),val:v}),D}static macroTokenToFormatOpts(r){return Xs[r]}constructor(r,f){this.opts=f,this.loc=r,this.systemLoc=null}formatWithSystemDefault(r,f){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(r,{...this.opts,...f}).format()}dtFormatter(r,f={}){return this.loc.dtFormatter(r,{...this.opts,...f})}formatDateTime(r,f){return this.dtFormatter(r,f).format()}formatDateTimeParts(r,f){return this.dtFormatter(r,f).formatToParts()}formatInterval(r,f){return this.dtFormatter(r.start,f).dtf.formatRange(r.start.toJSDate(),r.end.toJSDate())}resolvedOptions(r,f){return this.dtFormatter(r,f).resolvedOptions()}num(r,f=0,v=void 0){if(this.opts.forceSimple)return tt(r,f);const N={...this.opts};return f>0&&(N.padTo=f),v&&(N.signDisplay=v),this.loc.numberFormatter(N).format(r)}formatDateTimeFromString(r,f){const v=this.loc.listingMode()==="en",N=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",D=(Oe,vt)=>this.loc.extract(r,Oe,vt),z=Oe=>r.isOffsetFixed&&r.offset===0&&Oe.allowZ?"Z":r.isValid?r.zone.formatOffset(r.ts,Oe.format):"",U=()=>v?Kl(r):D({hour:"numeric",hourCycle:"h12"},"dayperiod"),L=(Oe,vt)=>v?Fr(r,Oe):D(vt?{month:Oe}:{month:Oe,day:"numeric"},"month"),de=(Oe,vt)=>v?Ia(r,Oe):D(vt?{weekday:Oe}:{weekday:Oe,month:"long",day:"numeric"},"weekday"),pe=Oe=>{const vt=kt.macroTokenToFormatOpts(Oe);return vt?this.formatWithSystemDefault(r,vt):Oe},ze=Oe=>v?Pl(r,Oe):D({era:Oe},"era"),Fe=Oe=>{switch(Oe){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 z({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return z({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return z({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 U();case"d":return N?D({day:"numeric"},"day"):this.num(r.day);case"dd":return N?D({day:"2-digit"},"day"):this.num(r.day,2);case"c":return this.num(r.weekday);case"ccc":return de("short",!0);case"cccc":return de("long",!0);case"ccccc":return de("narrow",!0);case"E":return this.num(r.weekday);case"EEE":return de("short",!1);case"EEEE":return de("long",!1);case"EEEEE":return de("narrow",!1);case"L":return N?D({month:"numeric",day:"numeric"},"month"):this.num(r.month);case"LL":return N?D({month:"2-digit",day:"numeric"},"month"):this.num(r.month,2);case"LLL":return L("short",!0);case"LLLL":return L("long",!0);case"LLLLL":return L("narrow",!0);case"M":return N?D({month:"numeric"},"month"):this.num(r.month);case"MM":return N?D({month:"2-digit"},"month"):this.num(r.month,2);case"MMM":return L("short",!1);case"MMMM":return L("long",!1);case"MMMMM":return L("narrow",!1);case"y":return N?D({year:"numeric"},"year"):this.num(r.year);case"yy":return N?D({year:"2-digit"},"year"):this.num(r.year.toString().slice(-2),2);case"yyyy":return N?D({year:"numeric"},"year"):this.num(r.year,4);case"yyyyyy":return N?D({year:"numeric"},"year"):this.num(r.year,6);case"G":return ze("short");case"GG":return ze("long");case"GGGGG":return ze("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 pe(Oe)}};return Ws(kt.parseFormat(f),Fe)}formatDurationFromString(r,f){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,N=pe=>{switch(pe[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}},D=(pe,ze)=>Fe=>{const Oe=N(Fe);if(Oe){const vt=ze.isNegativeDuration&&Oe!==ze.largestUnit?v:1;let Lt;return this.opts.signMode==="negativeLargestOnly"&&Oe!==ze.largestUnit?Lt="never":this.opts.signMode==="all"?Lt="always":Lt="auto",this.num(pe.get(Oe)*vt,Fe.length,Lt)}else return Fe},z=kt.parseFormat(f),U=z.reduce((pe,{literal:ze,val:Fe})=>ze?pe:pe.concat(Fe),[]),L=r.shiftTo(...U.map(N).filter(pe=>pe)),de={isNegativeDuration:L<0,largestUnit:Object.keys(L.values)[0]};return Ws(z,D(L,de))}}const es=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ja(...h){const r=h.reduce((f,v)=>f+v.source,"");return RegExp(`^${r}$`)}function En(...h){return r=>h.reduce(([f,v,N],D)=>{const[z,U,L]=D(r,N);return[{...f,...z},U||v,L]},[{},null,1]).slice(0,2)}function jt(h,...r){if(h==null)return[null,null];for(const[f,v]of r){const N=f.exec(h);if(N)return v(N)}return[null,null]}function fn(...h){return(r,f)=>{const v={};let N;for(N=0;N<h.length;N++)v[h[N]]=wt(r[f+N]);return[v,null,f+N]}}const ts=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,as=`(?:${ts.source}?(?:\\[(${es.source})\\])?)?`,Qr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Is=RegExp(`${Qr.source}${as}`),ns=RegExp(`(?:[Tt]${Is.source})?`),ls=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Js=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Su=/(\d{4})-?(\d{3})/,lo=fn("weekYear","weekNumber","weekDay"),so=fn("year","ordinal"),ro=/(\d{4})-(\d\d)-(\d\d)/,Ks=RegExp(`${Qr.source} ?(?:${ts.source}|(${es.source}))?`),io=RegExp(`(?: ${Ks.source})?`);function ul(h,r,f){const v=h[r];return Ce(v)?f:wt(v)}function uo(h,r){return[{year:ul(h,r),month:ul(h,r+1,1),day:ul(h,r+2,1)},null,r+3]}function cl(h,r){return[{hours:ul(h,r,0),minutes:ul(h,r+1,0),seconds:ul(h,r+2,0),milliseconds:Br(h[r+3])},null,r+4]}function ss(h,r){const f=!h[r]&&!h[r+1],v=Wl(h[r+1],h[r+2]),N=f?null:pt.instance(v);return[{},N,r+3]}function ol(h,r){const f=h[r]?fe.create(h[r]):null;return[{},f,r+1]}const co=RegExp(`^T?${Qr.source}$`),oo=/^-?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 fo(h){const[r,f,v,N,D,z,U,L,de]=h,pe=r[0]==="-",ze=L&&L[0]==="-",Fe=(Oe,vt=!1)=>Oe!==void 0&&(vt||Oe&&pe)?-Oe:Oe;return[{years:Fe(on(f)),months:Fe(on(v)),weeks:Fe(on(N)),days:Fe(on(D)),hours:Fe(on(z)),minutes:Fe(on(U)),seconds:Fe(on(L),L==="-0"),milliseconds:Fe(Br(de),ze)}]}const ho={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function rs(h,r,f,v,N,D,z){const U={year:r.length===2?Ql(wt(r)):wt(r),month:Fs.indexOf(f)+1,day:wt(v),hour:wt(N),minute:wt(D)};return z&&(U.second=wt(z)),h&&(U.weekday=h.length>3?Jl.indexOf(h)+1:Da.indexOf(h)+1),U}const mo=/^(?:(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 xo(h){const[,r,f,v,N,D,z,U,L,de,pe,ze]=h,Fe=rs(r,N,v,f,D,z,U);let Oe;return L?Oe=ho[L]:de?Oe=0:Oe=Wl(pe,ze),[Fe,new pt(Oe)]}function go(h){return h.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$/,vo=/^(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 wu(h){const[,r,f,v,N,D,z,U]=h;return[rs(r,N,v,f,D,z,U),pt.utcInstance]}function po(h){const[,r,f,v,N,D,z,U]=h;return[rs(r,U,f,v,N,D,z),pt.utcInstance]}const bo=Ja(ls,ns),So=Ja(Js,ns),No=Ja(Su,ns),wo=Ja(Is),ju=En(uo,cl,ss,ol),Wr=En(lo,cl,ss,ol),is=En(so,cl,ss,ol),jo=En(cl,ss,ol);function Eu(h){return jt(h,[bo,ju],[So,Wr],[No,is],[wo,jo])}function Mu(h){return jt(go(h),[mo,xo])}function Tu(h){return jt(h,[Nu,wu],[yo,wu],[vo,po])}function Cu(h){return jt(h,[oo,fo])}const Ou=En(cl);function dl(h){return jt(h,[co,Ou])}const Eo=Ja(ro,io),Mo=Ja(Ks),To=En(cl,ss,ol);function Du(h){return jt(h,[Eo,ju],[Mo,To])}const Xr="Invalid Duration",fl={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}},us={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},...fl},ca=146097/400,Ka=146097/4800,Ru={years:{quarters:4,months:12,weeks:ca/7,days:ca,hours:ca*24,minutes:ca*24*60,seconds:ca*24*60*60,milliseconds:ca*24*60*60*1e3},quarters:{months:3,weeks:ca/28,days:ca/4,hours:ca*24/4,minutes:ca*24*60/4,seconds:ca*24*60*60/4,milliseconds:ca*24*60*60*1e3/4},months:{weeks:Ka/7,days:Ka,hours:Ka*24,minutes:Ka*24*60,seconds:Ka*24*60*60,milliseconds:Ka*24*60*60*1e3},...fl},hn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ir=hn.slice(0).reverse();function ba(h,r,f=!1){const v={values:f?r.values:{...h.values,...r.values||{}},loc:h.loc.clone(r.loc),conversionAccuracy:r.conversionAccuracy||h.conversionAccuracy,matrix:r.matrix||h.matrix};return new Ze(v)}function Jr(h,r){var f;let v=(f=r.milliseconds)!=null?f:0;for(const N of Ir.slice(1))r[N]&&(v+=r[N]*h[N].milliseconds);return v}function Kr(h,r){const f=Jr(h,r)<0?-1:1;hn.reduceRight((v,N)=>{if(Ce(r[N]))return v;if(v){const D=r[v]*f,z=h[N][v],U=Math.floor(D/z);r[N]+=U*f,r[v]-=U*z*f}return N},null),hn.reduce((v,N)=>{if(Ce(r[N]))return v;if(v){const D=r[v]%1;r[v]-=D,r[N]+=D*h[v][N]}return N},null)}function Pr(h){const r={};for(const[f,v]of Object.entries(h))v!==0&&(r[f]=v);return r}class Ze{constructor(r){const f=r.conversionAccuracy==="longterm"||!1;let v=f?Ru:us;r.matrix&&(v=r.matrix),this.values=r.values,this.loc=r.loc||Ye.create(),this.conversionAccuracy=f?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=v,this.isLuxonDuration=!0}static fromMillis(r,f){return Ze.fromObject({milliseconds:r},f)}static fromObject(r,f={}){if(r==null||typeof r!="object")throw new g(`Duration.fromObject: argument expected to be an object, got ${r===null?"null":typeof r}`);return new Ze({values:Xa(r,Ze.normalizeUnit),loc:Ye.fromObject(f),conversionAccuracy:f.conversionAccuracy,matrix:f.matrix})}static fromDurationLike(r){if(ua(r))return Ze.fromMillis(r);if(Ze.isDuration(r))return r;if(typeof r=="object")return Ze.fromObject(r);throw new g(`Unknown duration argument ${r} of type ${typeof r}`)}static fromISO(r,f){const[v]=Cu(r);return v?Ze.fromObject(v,f):Ze.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static fromISOTime(r,f){const[v]=dl(r);return v?Ze.fromObject(v,f):Ze.invalid("unparsable",`the input "${r}" can't be parsed as ISO 8601`)}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the Duration is invalid");const v=r instanceof ia?r:new ia(r,f);if(ft.throwOnInvalid)throw new o(v);return new Ze({invalid:v})}static normalizeUnit(r){const f={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(!f)throw new m(r);return f}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,f={}){const v={...f,floor:f.round!==!1&&f.floor!==!1};return this.isValid?kt.create(this.loc,v).formatDurationFromString(this,r):Xr}toHuman(r={}){if(!this.isValid)return Xr;const f=r.showZeros!==!1,v=hn.map(N=>{const D=this.values[N];return Ce(D)||D===0&&!f?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...r,unit:N.slice(0,-1)}).format(D)}).filter(N=>N);return this.loc.listFormatter({type:"conjunction",style:r.listStyle||"narrow",...r}).format(v)}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+=Fl(this.seconds+this.milliseconds/1e3,3)+"S"),r==="P"&&(r+="T0S"),r}toISOTime(r={}){if(!this.isValid)return null;const f=this.toMillis();return f<0||f>=864e5?null:(r={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...r,includeOffset:!1},Ee.fromMillis(f,{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?Jr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(r){if(!this.isValid)return this;const f=Ze.fromDurationLike(r),v={};for(const N of hn)(Nn(f.values,N)||Nn(this.values,N))&&(v[N]=f.get(N)+this.get(N));return ba(this,{values:v},!0)}minus(r){if(!this.isValid)return this;const f=Ze.fromDurationLike(r);return this.plus(f.negate())}mapUnits(r){if(!this.isValid)return this;const f={};for(const v of Object.keys(this.values))f[v]=Yr(r(this.values[v],v));return ba(this,{values:f},!0)}get(r){return this[Ze.normalizeUnit(r)]}set(r){if(!this.isValid)return this;const f={...this.values,...Xa(r,Ze.normalizeUnit)};return ba(this,{values:f})}reconfigure({locale:r,numberingSystem:f,conversionAccuracy:v,matrix:N}={}){const z={loc:this.loc.clone({locale:r,numberingSystem:f}),matrix:N,conversionAccuracy:v};return ba(this,z)}as(r){return this.isValid?this.shiftTo(r).get(r):NaN}normalize(){if(!this.isValid)return this;const r=this.toObject();return Kr(this.matrix,r),ba(this,{values:r},!0)}rescale(){if(!this.isValid)return this;const r=Pr(this.normalize().shiftToAll().toObject());return ba(this,{values:r},!0)}shiftTo(...r){if(!this.isValid)return this;if(r.length===0)return this;r=r.map(z=>Ze.normalizeUnit(z));const f={},v={},N=this.toObject();let D;for(const z of hn)if(r.indexOf(z)>=0){D=z;let U=0;for(const de in v)U+=this.matrix[de][z]*v[de],v[de]=0;ua(N[z])&&(U+=N[z]);const L=Math.trunc(U);f[z]=L,v[z]=(U*1e3-L*1e3)/1e3}else ua(N[z])&&(v[z]=N[z]);for(const z in v)v[z]!==0&&(f[D]+=z===D?v[z]:v[z]/this.matrix[D][z]);return Kr(this.matrix,f),ba(this,{values:f},!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 f of Object.keys(this.values))r[f]=this.values[f]===0?0:-this.values[f];return ba(this,{values:r},!0)}removeZeros(){if(!this.isValid)return this;const r=Pr(this.values);return ba(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 f(v,N){return v===void 0||v===0?N===void 0||N===0:v===N}for(const v of hn)if(!f(this.values[v],r.values[v]))return!1;return!0}}const hl="Invalid Interval";function Co(h,r){return!h||!h.isValid?ht.invalid("missing or invalid start"):!r||!r.isValid?ht.invalid("missing or invalid end"):r<h?ht.invalid("end before start",`The end of an interval must be after its start, but you had start=${h.toISO()} and end=${r.toISO()}`):null}class ht{constructor(r){this.s=r.start,this.e=r.end,this.invalid=r.invalid||null,this.isLuxonInterval=!0}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the Interval is invalid");const v=r instanceof ia?r:new ia(r,f);if(ft.throwOnInvalid)throw new d(v);return new ht({invalid:v})}static fromDateTimes(r,f){const v=fa(r),N=fa(f),D=Co(v,N);return D??new ht({start:v,end:N})}static after(r,f){const v=Ze.fromDurationLike(f),N=fa(r);return ht.fromDateTimes(N,N.plus(v))}static before(r,f){const v=Ze.fromDurationLike(f),N=fa(r);return ht.fromDateTimes(N.minus(v),N)}static fromISO(r,f){const[v,N]=(r||"").split("/",2);if(v&&N){let D,z;try{D=Ee.fromISO(v,f),z=D.isValid}catch{z=!1}let U,L;try{U=Ee.fromISO(N,f),L=U.isValid}catch{L=!1}if(z&&L)return ht.fromDateTimes(D,U);if(z){const de=Ze.fromISO(N,f);if(de.isValid)return ht.after(D,de)}else if(L){const de=Ze.fromISO(v,f);if(de.isValid)return ht.before(U,de)}}return ht.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",f){if(!this.isValid)return NaN;const v=this.start.startOf(r,f);let N;return f!=null&&f.useLocaleWeeks?N=this.end.reconfigure({locale:v.locale}):N=this.end,N=N.startOf(r,f),Math.floor(N.diff(v,r).get(r))+(N.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:f}={}){return this.isValid?ht.fromDateTimes(r||this.s,f||this.e):this}splitAt(...r){if(!this.isValid)return[];const f=r.map(fa).filter(z=>this.contains(z)).sort((z,U)=>z.toMillis()-U.toMillis()),v=[];let{s:N}=this,D=0;for(;N<this.e;){const z=f[D]||this.e,U=+z>+this.e?this.e:z;v.push(ht.fromDateTimes(N,U)),N=U,D+=1}return v}splitBy(r){const f=Ze.fromDurationLike(r);if(!this.isValid||!f.isValid||f.as("milliseconds")===0)return[];let{s:v}=this,N=1,D;const z=[];for(;v<this.e;){const U=this.start.plus(f.mapUnits(L=>L*N));D=+U>+this.e?this.e:U,z.push(ht.fromDateTimes(v,D)),v=D,N+=1}return z}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 f=this.s>r.s?this.s:r.s,v=this.e<r.e?this.e:r.e;return f>=v?null:ht.fromDateTimes(f,v)}union(r){if(!this.isValid)return this;const f=this.s<r.s?this.s:r.s,v=this.e>r.e?this.e:r.e;return ht.fromDateTimes(f,v)}static merge(r){const[f,v]=r.sort((N,D)=>N.s-D.s).reduce(([N,D],z)=>D?D.overlaps(z)||D.abutsStart(z)?[N,D.union(z)]:[N.concat([D]),z]:[N,z],[[],null]);return v&&f.push(v),f}static xor(r){let f=null,v=0;const N=[],D=r.map(L=>[{time:L.s,type:"s"},{time:L.e,type:"e"}]),z=Array.prototype.concat(...D),U=z.sort((L,de)=>L.time-de.time);for(const L of U)v+=L.type==="s"?1:-1,v===1?f=L.time:(f&&+f!=+L.time&&N.push(ht.fromDateTimes(f,L.time)),f=null);return ht.merge(N)}difference(...r){return ht.xor([this].concat(r)).map(f=>this.intersection(f)).filter(f=>f&&!f.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:hl}[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=M,f={}){return this.isValid?kt.create(this.s.loc.clone(f),r).formatInterval(this):hl}toISO(r){return this.isValid?`${this.s.toISO(r)}/${this.e.toISO(r)}`:hl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:hl}toISOTime(r){return this.isValid?`${this.s.toISOTime(r)}/${this.e.toISOTime(r)}`:hl}toFormat(r,{separator:f=" – "}={}){return this.isValid?`${this.s.toFormat(r)}${f}${this.e.toFormat(r)}`:hl}toDuration(r,f){return this.isValid?this.e.diff(this.s,r,f):Ze.invalid(this.invalidReason)}mapEndpoints(r){return ht.fromDateTimes(r(this.s),r(this.e))}}class cs{static hasDST(r=ft.defaultZone){const f=Ee.now().setZone(r).set({month:12});return!r.isUniversal&&f.offset!==f.set({month:6}).offset}static isValidIANAZone(r){return fe.isValidZone(r)}static normalizeZone(r){return Yt(r,ft.defaultZone)}static getStartOfWeek({locale:r=null,locObj:f=null}={}){return(f||Ye.create(r)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:r=null,locObj:f=null}={}){return(f||Ye.create(r)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:r=null,locObj:f=null}={}){return(f||Ye.create(r)).getWeekendDays().slice()}static months(r="long",{locale:f=null,numberingSystem:v=null,locObj:N=null,outputCalendar:D="gregory"}={}){return(N||Ye.create(f,v,D)).months(r)}static monthsFormat(r="long",{locale:f=null,numberingSystem:v=null,locObj:N=null,outputCalendar:D="gregory"}={}){return(N||Ye.create(f,v,D)).months(r,!0)}static weekdays(r="long",{locale:f=null,numberingSystem:v=null,locObj:N=null}={}){return(N||Ye.create(f,v,null)).weekdays(r)}static weekdaysFormat(r="long",{locale:f=null,numberingSystem:v=null,locObj:N=null}={}){return(N||Ye.create(f,v,null)).weekdays(r,!0)}static meridiems({locale:r=null}={}){return Ye.create(r).meridiems()}static eras(r="short",{locale:f=null}={}){return Ye.create(f,null,"gregory").eras(r)}static features(){return{relative:qr(),localeWeek:cn()}}}function ta(h,r){const f=N=>N.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=f(r)-f(h);return Math.floor(Ze.fromMillis(v).as("days"))}function os(h,r,f){const v=[["years",(L,de)=>de.year-L.year],["quarters",(L,de)=>de.quarter-L.quarter+(de.year-L.year)*4],["months",(L,de)=>de.month-L.month+(de.year-L.year)*12],["weeks",(L,de)=>{const pe=ta(L,de);return(pe-pe%7)/7}],["days",ta]],N={},D=h;let z,U;for(const[L,de]of v)f.indexOf(L)>=0&&(z=L,N[L]=de(h,r),U=D.plus(N),U>r?(N[L]--,h=D.plus(N),h>r&&(U=h,N[L]--,h=D.plus(N))):h=U);return[h,N,U,z]}function _u(h,r,f,v){let[N,D,z,U]=os(h,r,f);const L=r-N,de=f.filter(ze=>["hours","minutes","seconds","milliseconds"].indexOf(ze)>=0);de.length===0&&(z<r&&(z=N.plus({[U]:1})),z!==N&&(D[U]=(D[U]||0)+L/(z-N)));const pe=Ze.fromObject(D,v);return de.length>0?Ze.fromMillis(L,v).shiftTo(...de).plus(pe):pe}const Au="missing Intl.DateTimeFormat.formatToParts support";function Xe(h,r=f=>f){return{regex:h,deser:([f])=>r(ao(f))}}const Ps="[ ]",ku=new RegExp(Ps,"g");function ml(h){return h.replace(/\./g,"\\.?").replace(ku,Ps)}function er(h){return h.replace(/\./g,"").replace(ku," ").toLowerCase()}function Ft(h,r){return h===null?null:{regex:RegExp(h.map(ml).join("|")),deser:([f])=>h.findIndex(v=>er(f)===er(v))+r}}function tr(h,r){return{regex:h,deser:([,f,v])=>Wl(f,v),groups:r}}function ds(h){return{regex:h,deser:([r])=>r}}function Mn(h){return h.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function xl(h,r){const f=Pt(r),v=Pt(r,"{2}"),N=Pt(r,"{3}"),D=Pt(r,"{4}"),z=Pt(r,"{6}"),U=Pt(r,"{1,2}"),L=Pt(r,"{1,3}"),de=Pt(r,"{1,6}"),pe=Pt(r,"{1,9}"),ze=Pt(r,"{2,4}"),Fe=Pt(r,"{4,6}"),Oe=qt=>({regex:RegExp(Mn(qt.val)),deser:([mn])=>mn,literal:!0}),Lt=(qt=>{if(h.literal)return Oe(qt);switch(qt.val){case"G":return Ft(r.eras("short"),0);case"GG":return Ft(r.eras("long"),0);case"y":return Xe(de);case"yy":return Xe(ze,Ql);case"yyyy":return Xe(D);case"yyyyy":return Xe(Fe);case"yyyyyy":return Xe(z);case"M":return Xe(U);case"MM":return Xe(v);case"MMM":return Ft(r.months("short",!0),1);case"MMMM":return Ft(r.months("long",!0),1);case"L":return Xe(U);case"LL":return Xe(v);case"LLL":return Ft(r.months("short",!1),1);case"LLLL":return Ft(r.months("long",!1),1);case"d":return Xe(U);case"dd":return Xe(v);case"o":return Xe(L);case"ooo":return Xe(N);case"HH":return Xe(v);case"H":return Xe(U);case"hh":return Xe(v);case"h":return Xe(U);case"mm":return Xe(v);case"m":return Xe(U);case"q":return Xe(U);case"qq":return Xe(v);case"s":return Xe(U);case"ss":return Xe(v);case"S":return Xe(L);case"SSS":return Xe(N);case"u":return ds(pe);case"uu":return ds(U);case"uuu":return Xe(f);case"a":return Ft(r.meridiems(),0);case"kkkk":return Xe(D);case"kk":return Xe(ze,Ql);case"W":return Xe(U);case"WW":return Xe(v);case"E":case"c":return Xe(f);case"EEE":return Ft(r.weekdays("short",!1),1);case"EEEE":return Ft(r.weekdays("long",!1),1);case"ccc":return Ft(r.weekdays("short",!0),1);case"cccc":return Ft(r.weekdays("long",!0),1);case"Z":case"ZZ":return tr(new RegExp(`([+-]${U.source})(?::(${v.source}))?`),2);case"ZZZ":return tr(new RegExp(`([+-]${U.source})(${v.source})?`),2);case"z":return ds(/[a-z_+-/]{1,256}?/i);case" ":return ds(/[^\S\n\r]/);default:return Oe(qt)}})(h)||{invalidReason:Au};return Lt.token=h,Lt}const ei={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 zu(h,r,f){const{type:v,value:N}=h;if(v==="literal"){const L=/^\s+$/.test(N);return{literal:!L,val:L?" ":N}}const D=r[v];let z=v;v==="hour"&&(r.hour12!=null?z=r.hour12?"hour12":"hour24":r.hourCycle!=null?r.hourCycle==="h11"||r.hourCycle==="h12"?z="hour12":z="hour24":z=f.hour12?"hour12":"hour24");let U=ei[z];if(typeof U=="object"&&(U=U[D]),U)return{literal:!1,val:U}}function Tn(h){return[`^${h.map(f=>f.regex).reduce((f,v)=>`${f}(${v.source})`,"")}$`,h]}function Uu(h,r,f){const v=h.match(r);if(v){const N={};let D=1;for(const z in f)if(Nn(f,z)){const U=f[z],L=U.groups?U.groups+1:1;!U.literal&&U.token&&(N[U.token.val[0]]=U.deser(v.slice(D,D+L))),D+=L}return[v,N]}else return[v,{}]}function Hu(h){const r=D=>{switch(D){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 f=null,v;return Ce(h.z)||(f=fe.create(h.z)),Ce(h.Z)||(f||(f=new pt(h.Z)),v=h.Z),Ce(h.q)||(h.M=(h.q-1)*3+1),Ce(h.h)||(h.h<12&&h.a===1?h.h+=12:h.h===12&&h.a===0&&(h.h=0)),h.G===0&&h.y&&(h.y=-h.y),Ce(h.u)||(h.S=Br(h.u)),[Object.keys(h).reduce((D,z)=>{const U=r(z);return U&&(D[U]=h[z]),D},{}),f,v]}let ar=null;function Do(){return ar||(ar=Ee.fromMillis(1555555555555)),ar}function Ro(h,r){if(h.literal)return h;const f=kt.macroTokenToFormatOpts(h.val),v=oa(f,r);return v==null||v.includes(void 0)?h:v}function Lu(h,r){return Array.prototype.concat(...h.map(f=>Ro(f,r)))}class ti{constructor(r,f){if(this.locale=r,this.format=f,this.tokens=Lu(kt.parseFormat(f),r),this.units=this.tokens.map(v=>xl(v,r)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,N]=Tn(this.units);this.regex=RegExp(v,"i"),this.handlers=N}}explainFromTokens(r){if(this.isValid){const[f,v]=Uu(r,this.regex,this.handlers),[N,D,z]=v?Hu(v):[null,null,void 0];if(Nn(v,"a")&&Nn(v,"H"))throw new x("Can't include meridiem when specifying 24-hour format");return{input:r,tokens:this.tokens,regex:this.regex,rawMatches:f,matches:v,result:N,zone:D,specificOffset:z}}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 ai(h,r,f){return new ti(h,f).explainFromTokens(r)}function ni(h,r,f){const{result:v,zone:N,specificOffset:D,invalidReason:z}=ai(h,r,f);return[v,N,D,z]}function oa(h,r){if(!h)return null;const v=kt.create(r,h).dtFormatter(Do()),N=v.formatToParts(),D=v.resolvedOptions();return N.map(z=>zu(z,h,D))}const gl="Invalid DateTime",la=864e13;function Ra(h){return new ia("unsupported zone",`the zone "${h.name}" is not supported`)}function fs(h){return h.weekData===null&&(h.weekData=At(h.c)),h.weekData}function yl(h){return h.localWeekData===null&&(h.localWeekData=At(h.c,h.loc.getMinDaysInFirstWeek(),h.loc.getStartOfWeek())),h.localWeekData}function _a(h,r){const f={ts:h.ts,zone:h.zone,c:h.c,o:h.o,loc:h.loc,invalid:h.invalid};return new Ee({...f,...r,old:f})}function nr(h,r,f){let v=h-r*60*1e3;const N=f.offset(v);if(r===N)return[v,r];v-=(N-r)*60*1e3;const D=f.offset(v);return N===D?[v,N]:[h-Math.min(N,D)*60*1e3,Math.max(N,D)]}function Aa(h,r){h+=r*60*1e3;const f=new Date(h);return{year:f.getUTCFullYear(),month:f.getUTCMonth()+1,day:f.getUTCDate(),hour:f.getUTCHours(),minute:f.getUTCMinutes(),second:f.getUTCSeconds(),millisecond:f.getUTCMilliseconds()}}function hs(h,r,f){return nr(Zt(h),r,f)}function ms(h,r){const f=h.o,v=h.c.year+Math.trunc(r.years),N=h.c.month+Math.trunc(r.months)+Math.trunc(r.quarters)*3,D={...h.c,year:v,month:N,day:Math.min(h.c.day,Gs(v,N))+Math.trunc(r.days)+Math.trunc(r.weeks)*7},z=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"),U=Zt(D);let[L,de]=nr(U,f,h.zone);return z!==0&&(L+=z,de=h.zone.offset(L)),{ts:L,o:de}}function Sa(h,r,f,v,N,D){const{setZone:z,zone:U}=f;if(h&&Object.keys(h).length!==0||r){const L=r||U,de=Ee.fromObject(h,{...f,zone:L,specificOffset:D});return z?de:de.setZone(U)}else return Ee.invalid(new ia("unparsable",`the input "${N}" can't be parsed as ${v}`))}function lr(h,r,f=!0){return h.isValid?kt.create(Ye.create("en-US"),{allowZ:f,forceSimple:!0}).formatDateTimeFromString(h,r):null}function Qt(h,r,f){const v=h.c.year>9999||h.c.year<0;let N="";if(v&&h.c.year>=0&&(N+="+"),N+=tt(h.c.year,v?6:4),f==="year")return N;if(r){if(N+="-",N+=tt(h.c.month),f==="month")return N;N+="-"}else if(N+=tt(h.c.month),f==="month")return N;return N+=tt(h.c.day),N}function sr(h,r,f,v,N,D,z){let U=!f||h.c.millisecond!==0||h.c.second!==0,L="";switch(z){case"day":case"month":case"year":break;default:if(L+=tt(h.c.hour),z==="hour")break;if(r){if(L+=":",L+=tt(h.c.minute),z==="minute")break;U&&(L+=":",L+=tt(h.c.second))}else{if(L+=tt(h.c.minute),z==="minute")break;U&&(L+=tt(h.c.second))}if(z==="second")break;U&&(!v||h.c.millisecond!==0)&&(L+=".",L+=tt(h.c.millisecond,3))}return N&&(h.isOffsetFixed&&h.offset===0&&!D?L+="Z":h.o<0?(L+="-",L+=tt(Math.trunc(-h.o/60)),L+=":",L+=tt(Math.trunc(-h.o%60))):(L+="+",L+=tt(Math.trunc(h.o/60)),L+=":",L+=tt(Math.trunc(h.o%60)))),D&&(L+="["+h.zone.ianaName+"]"),L}const ka={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},qu={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},rr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},za=["year","month","day","hour","minute","second","millisecond"],li=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Vu=["year","ordinal","hour","minute","second","millisecond"];function vl(h){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"}[h.toLowerCase()];if(!r)throw new m(h);return r}function si(h){switch(h.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return vl(h)}}function da(h){if(Pa===void 0&&(Pa=ft.now()),h.type!=="iana")return h.offset(Pa);const r=h.name;let f=aa.get(r);return f===void 0&&(f=h.offset(Pa),aa.set(r,f)),f}function Cn(h,r){const f=Yt(r.zone,ft.defaultZone);if(!f.isValid)return Ee.invalid(Ra(f));const v=Ye.fromObject(r);let N,D;if(Ce(h.year))N=ft.now();else{for(const L of za)Ce(h[L])&&(h[L]=ka[L]);const z=Ys(h)||Sn(h);if(z)return Ee.invalid(z);const U=da(f);[N,D]=hs(h,U,f)}return new Ee({ts:N,zone:f,loc:v,o:D})}function On(h,r,f){const v=Ce(f.round)?!0:f.round,N=Ce(f.rounding)?"trunc":f.rounding,D=(U,L)=>(U=Fl(U,v||f.calendary?0:2,f.calendary?"round":N),r.loc.clone(f).relFormatter(f).format(U,L)),z=U=>f.calendary?r.hasSame(h,U)?0:r.startOf(U).diff(h.startOf(U),U).get(U):r.diff(h,U).get(U);if(f.unit)return D(z(f.unit),f.unit);for(const U of f.units){const L=z(U);if(Math.abs(L)>=1)return D(L,U)}return D(h>r?-0:0,f.units[f.units.length-1])}function xs(h){let r={},f;return h.length>0&&typeof h[h.length-1]=="object"?(r=h[h.length-1],f=Array.from(h).slice(0,h.length-1)):f=Array.from(h),[r,f]}let Pa;const aa=new Map;class Ee{constructor(r){const f=r.zone||ft.defaultZone;let v=r.invalid||(Number.isNaN(r.ts)?new ia("invalid input"):null)||(f.isValid?null:Ra(f));this.ts=Ce(r.ts)?ft.now():r.ts;let N=null,D=null;if(!v)if(r.old&&r.old.ts===this.ts&&r.old.zone.equals(f))[N,D]=[r.old.c,r.old.o];else{const U=ua(r.o)&&!r.old?r.o:f.offset(this.ts);N=Aa(this.ts,U),v=Number.isNaN(N.year)?new ia("invalid input"):null,N=v?null:N,D=v?null:U}this._zone=f,this.loc=r.loc||Ye.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=N,this.o=D,this.isLuxonDateTime=!0}static now(){return new Ee({})}static local(){const[r,f]=xs(arguments),[v,N,D,z,U,L,de]=f;return Cn({year:v,month:N,day:D,hour:z,minute:U,second:L,millisecond:de},r)}static utc(){const[r,f]=xs(arguments),[v,N,D,z,U,L,de]=f;return r.zone=pt.utcInstance,Cn({year:v,month:N,day:D,hour:z,minute:U,second:L,millisecond:de},r)}static fromJSDate(r,f={}){const v=xu(r)?r.valueOf():NaN;if(Number.isNaN(v))return Ee.invalid("invalid input");const N=Yt(f.zone,ft.defaultZone);return N.isValid?new Ee({ts:v,zone:N,loc:Ye.fromObject(f)}):Ee.invalid(Ra(N))}static fromMillis(r,f={}){if(ua(r))return r<-la||r>la?Ee.invalid("Timestamp out of range"):new Ee({ts:r,zone:Yt(f.zone,ft.defaultZone),loc:Ye.fromObject(f)});throw new g(`fromMillis requires a numerical input, but received a ${typeof r} with value ${r}`)}static fromSeconds(r,f={}){if(ua(r))return new Ee({ts:r*1e3,zone:Yt(f.zone,ft.defaultZone),loc:Ye.fromObject(f)});throw new g("fromSeconds requires a numerical input")}static fromObject(r,f={}){r=r||{};const v=Yt(f.zone,ft.defaultZone);if(!v.isValid)return Ee.invalid(Ra(v));const N=Ye.fromObject(f),D=Xa(r,si),{minDaysInFirstWeek:z,startOfWeek:U}=hu(D,N),L=ft.now(),de=Ce(f.specificOffset)?v.offset(L):f.specificOffset,pe=!Ce(D.ordinal),ze=!Ce(D.year),Fe=!Ce(D.month)||!Ce(D.day),Oe=ze||Fe,vt=D.weekYear||D.weekNumber;if((Oe||pe)&&vt)throw new x("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Fe&&pe)throw new x("Can't mix ordinal dates with month/day");const Lt=vt||D.weekday&&!Oe;let qt,mn,en=Aa(L,de);Lt?(qt=li,mn=qu,en=At(en,z,U)):pe?(qt=Vu,mn=rr,en=Gl(en)):(qt=za,mn=ka);let ir=!1;for(const La of qt){const ur=D[La];Ce(ur)?ir?D[La]=mn[La]:D[La]=en[La]:ir=!0}const Dn=Lt?mu(D,z,U):pe?Zl(D):Ys(D),Ha=Dn||Sn(D);if(Ha)return Ee.invalid(Ha);const xn=Lt?bn(D,z,U):pe?fu(D):D,[tn,ri]=hs(xn,de,v),Rn=new Ee({ts:tn,zone:v,o:ri,loc:N});return D.weekday&&Oe&&r.weekday!==Rn.weekday?Ee.invalid("mismatched weekday",`you can't specify both a weekday of ${D.weekday} and a date of ${Rn.toISO()}`):Rn.isValid?Rn:Ee.invalid(Rn.invalid)}static fromISO(r,f={}){const[v,N]=Eu(r);return Sa(v,N,f,"ISO 8601",r)}static fromRFC2822(r,f={}){const[v,N]=Mu(r);return Sa(v,N,f,"RFC 2822",r)}static fromHTTP(r,f={}){const[v,N]=Tu(r);return Sa(v,N,f,"HTTP",f)}static fromFormat(r,f,v={}){if(Ce(r)||Ce(f))throw new g("fromFormat requires an input string and a format");const{locale:N=null,numberingSystem:D=null}=v,z=Ye.fromOpts({locale:N,numberingSystem:D,defaultToEN:!0}),[U,L,de,pe]=ni(z,r,f);return pe?Ee.invalid(pe):Sa(U,L,v,`format ${f}`,r,de)}static fromString(r,f,v={}){return Ee.fromFormat(r,f,v)}static fromSQL(r,f={}){const[v,N]=Du(r);return Sa(v,N,f,"SQL",r)}static invalid(r,f=null){if(!r)throw new g("need to specify a reason the DateTime is invalid");const v=r instanceof ia?r:new ia(r,f);if(ft.throwOnInvalid)throw new u(v);return new Ee({invalid:v})}static isDateTime(r){return r&&r.isLuxonDateTime||!1}static parseFormatForOpts(r,f={}){const v=oa(r,Ye.fromObject(f));return v?v.map(N=>N?N.val:null).join(""):null}static expandFormat(r,f={}){return Lu(kt.parseFormat(r),Ye.fromObject(f)).map(N=>N.val).join("")}static resetCache(){Pa=void 0,aa.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?fs(this).weekYear:NaN}get weekNumber(){return this.isValid?fs(this).weekNumber:NaN}get weekday(){return this.isValid?fs(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?yl(this).weekday:NaN}get localWeekNumber(){return this.isValid?yl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?yl(this).weekYear:NaN}get ordinal(){return this.isValid?Gl(this.c).ordinal:NaN}get monthShort(){return this.isValid?cs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?cs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?cs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?cs.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,f=6e4,v=Zt(this.c),N=this.zone.offset(v-r),D=this.zone.offset(v+r),z=this.zone.offset(v-N*f),U=this.zone.offset(v-D*f);if(z===U)return[this];const L=v-z*f,de=v-U*f,pe=Aa(L,z),ze=Aa(de,U);return pe.hour===ze.hour&&pe.minute===ze.minute&&pe.second===ze.second&&pe.millisecond===ze.millisecond?[_a(this,{ts:L}),_a(this,{ts:de})]:[this]}get isInLeapYear(){return sl(this.year)}get daysInMonth(){return Gs(this.year,this.month)}get daysInYear(){return this.isValid?Wa(this.year):NaN}get weeksInWeekYear(){return this.isValid?rl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?rl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(r={}){const{locale:f,numberingSystem:v,calendar:N}=kt.create(this.loc.clone(r),r).resolvedOptions(this);return{locale:f,numberingSystem:v,outputCalendar:N}}toUTC(r=0,f={}){return this.setZone(pt.instance(r),f)}toLocal(){return this.setZone(ft.defaultZone)}setZone(r,{keepLocalTime:f=!1,keepCalendarTime:v=!1}={}){if(r=Yt(r,ft.defaultZone),r.equals(this.zone))return this;if(r.isValid){let N=this.ts;if(f||v){const D=r.offset(this.ts),z=this.toObject();[N]=hs(z,D,r)}return _a(this,{ts:N,zone:r})}else return Ee.invalid(Ra(r))}reconfigure({locale:r,numberingSystem:f,outputCalendar:v}={}){const N=this.loc.clone({locale:r,numberingSystem:f,outputCalendar:v});return _a(this,{loc:N})}setLocale(r){return this.reconfigure({locale:r})}set(r){if(!this.isValid)return this;const f=Xa(r,si),{minDaysInFirstWeek:v,startOfWeek:N}=hu(f,this.loc),D=!Ce(f.weekYear)||!Ce(f.weekNumber)||!Ce(f.weekday),z=!Ce(f.ordinal),U=!Ce(f.year),L=!Ce(f.month)||!Ce(f.day),de=U||L,pe=f.weekYear||f.weekNumber;if((de||z)&&pe)throw new x("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(L&&z)throw new x("Can't mix ordinal dates with month/day");let ze;D?ze=bn({...At(this.c,v,N),...f},v,N):Ce(f.ordinal)?(ze={...this.toObject(),...f},Ce(f.day)&&(ze.day=Math.min(Gs(ze.year,ze.month),ze.day))):ze=fu({...Gl(this.c),...f});const[Fe,Oe]=hs(ze,this.o,this.zone);return _a(this,{ts:Fe,o:Oe})}plus(r){if(!this.isValid)return this;const f=Ze.fromDurationLike(r);return _a(this,ms(this,f))}minus(r){if(!this.isValid)return this;const f=Ze.fromDurationLike(r).negate();return _a(this,ms(this,f))}startOf(r,{useLocaleWeeks:f=!1}={}){if(!this.isValid)return this;const v={},N=Ze.normalizeUnit(r);switch(N){case"years":v.month=1;case"quarters":case"months":v.day=1;case"weeks":case"days":v.hour=0;case"hours":v.minute=0;case"minutes":v.second=0;case"seconds":v.millisecond=0;break}if(N==="weeks")if(f){const D=this.loc.getStartOfWeek(),{weekday:z}=this;z<D&&(v.weekNumber=this.weekNumber-1),v.weekday=D}else v.weekday=1;if(N==="quarters"){const D=Math.ceil(this.month/3);v.month=(D-1)*3+1}return this.set(v)}endOf(r,f){return this.isValid?this.plus({[r]:1}).startOf(r,f).minus(1):this}toFormat(r,f={}){return this.isValid?kt.create(this.loc.redefaultToEN(f)).formatDateTimeFromString(this,r):gl}toLocaleString(r=M,f={}){return this.isValid?kt.create(this.loc.clone(f),r).formatDateTime(this):gl}toLocaleParts(r={}){return this.isValid?kt.create(this.loc.clone(r),r).formatDateTimeParts(this):[]}toISO({format:r="extended",suppressSeconds:f=!1,suppressMilliseconds:v=!1,includeOffset:N=!0,extendedZone:D=!1,precision:z="milliseconds"}={}){if(!this.isValid)return null;z=vl(z);const U=r==="extended";let L=Qt(this,U,z);return za.indexOf(z)>=3&&(L+="T"),L+=sr(this,U,f,v,N,D,z),L}toISODate({format:r="extended",precision:f="day"}={}){return this.isValid?Qt(this,r==="extended",vl(f)):null}toISOWeekDate(){return lr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:r=!1,suppressSeconds:f=!1,includeOffset:v=!0,includePrefix:N=!1,extendedZone:D=!1,format:z="extended",precision:U="milliseconds"}={}){return this.isValid?(U=vl(U),(N&&za.indexOf(U)>=3?"T":"")+sr(this,z==="extended",f,r,v,D,U)):null}toRFC2822(){return lr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return lr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Qt(this,!0):null}toSQLTime({includeOffset:r=!0,includeZone:f=!1,includeOffsetSpace:v=!0}={}){let N="HH:mm:ss.SSS";return(f||r)&&(v&&(N+=" "),f?N+="z":r&&(N+="ZZ")),lr(this,N,!0)}toSQL(r={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(r)}`:null}toString(){return this.isValid?this.toISO():gl}[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 f={...this.c};return r.includeConfig&&(f.outputCalendar=this.outputCalendar,f.numberingSystem=this.loc.numberingSystem,f.locale=this.loc.locale),f}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(r,f="milliseconds",v={}){if(!this.isValid||!r.isValid)return Ze.invalid("created by diffing an invalid DateTime");const N={locale:this.locale,numberingSystem:this.numberingSystem,...v},D=ll(f).map(Ze.normalizeUnit),z=r.valueOf()>this.valueOf(),U=z?this:r,L=z?r:this,de=_u(U,L,D,N);return z?de.negate():de}diffNow(r="milliseconds",f={}){return this.diff(Ee.now(),r,f)}until(r){return this.isValid?ht.fromDateTimes(this,r):this}hasSame(r,f,v){if(!this.isValid)return!1;const N=r.valueOf(),D=this.setZone(r.zone,{keepLocalTime:!0});return D.startOf(f,v)<=N&&N<=D.endOf(f,v)}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 f=r.base||Ee.fromObject({},{zone:this.zone}),v=r.padding?this<f?-r.padding:r.padding:0;let N=["years","months","days","hours","minutes","seconds"],D=r.unit;return Array.isArray(r.unit)&&(N=r.unit,D=void 0),On(f,this.plus(v),{...r,numeric:"always",units:N,unit:D})}toRelativeCalendar(r={}){return this.isValid?On(r.base||Ee.fromObject({},{zone:this.zone}),this,{...r,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...r){if(!r.every(Ee.isDateTime))throw new g("min requires all arguments be DateTimes");return gu(r,f=>f.valueOf(),Math.min)}static max(...r){if(!r.every(Ee.isDateTime))throw new g("max requires all arguments be DateTimes");return gu(r,f=>f.valueOf(),Math.max)}static fromFormatExplain(r,f,v={}){const{locale:N=null,numberingSystem:D=null}=v,z=Ye.fromOpts({locale:N,numberingSystem:D,defaultToEN:!0});return ai(z,r,f)}static fromStringExplain(r,f,v={}){return Ee.fromFormatExplain(r,f,v)}static buildFormatParser(r,f={}){const{locale:v=null,numberingSystem:N=null}=f,D=Ye.fromOpts({locale:v,numberingSystem:N,defaultToEN:!0});return new ti(D,r)}static fromFormatParser(r,f,v={}){if(Ce(r)||Ce(f))throw new g("fromFormatParser requires an input string and a format parser");const{locale:N=null,numberingSystem:D=null}=v,z=Ye.fromOpts({locale:N,numberingSystem:D,defaultToEN:!0});if(!z.equals(f.locale))throw new g(`fromFormatParser called with a locale of ${z}, but the format parser was created for ${f.locale}`);const{result:U,zone:L,specificOffset:de,invalidReason:pe}=f.explainFromTokens(r);return pe?Ee.invalid(pe):Sa(U,L,v,`format ${f.format}`,r,de)}static get DATE_SHORT(){return M}static get DATE_MED(){return _}static get DATE_MED_WITH_WEEKDAY(){return A}static get DATE_FULL(){return T}static get DATE_HUGE(){return C}static get TIME_SIMPLE(){return O}static get TIME_WITH_SECONDS(){return ae}static get TIME_WITH_SHORT_OFFSET(){return I}static get TIME_WITH_LONG_OFFSET(){return ne}static get TIME_24_SIMPLE(){return ee}static get TIME_24_WITH_SECONDS(){return J}static get TIME_24_WITH_SHORT_OFFSET(){return ce}static get TIME_24_WITH_LONG_OFFSET(){return W}static get DATETIME_SHORT(){return X}static get DATETIME_SHORT_WITH_SECONDS(){return $}static get DATETIME_MED(){return k}static get DATETIME_MED_WITH_SECONDS(){return te}static get DATETIME_MED_WITH_WEEKDAY(){return V}static get DATETIME_FULL(){return oe}static get DATETIME_FULL_WITH_SECONDS(){return ge}static get DATETIME_HUGE(){return ye}static get DATETIME_HUGE_WITH_SECONDS(){return G}}function fa(h){if(Ee.isDateTime(h))return h;if(h&&h.valueOf&&ua(h.valueOf()))return Ee.fromJSDate(h);if(h&&typeof h=="object")return Ee.fromObject(h);throw new g(`Unknown datetime argument: ${h}, of type ${typeof h}`)}const Ua="3.7.2";return va.DateTime=Ee,va.Duration=Ze,va.FixedOffsetZone=pt,va.IANAZone=fe,va.Info=cs,va.Interval=ht,va.InvalidZone=Kt,va.Settings=ft,va.SystemZone=Se,va.VERSION=Ua,va.Zone=se,va}var Sx;function Zf(){return Sx||(Sx=1,(function(l){var m,g,j,S,p,Cf,M,Ll;Object.defineProperty(l,"__esModule",{value:!0}),l.CronDate=l.DAYS_IN_MONTH=l.DateMathOp=l.TimeUnit=void 0;const u=k2();var d;(function(T){T.Second="Second",T.Minute="Minute",T.Hour="Hour",T.Day="Day",T.Month="Month",T.Year="Year"})(d||(l.TimeUnit=d={}));var o;(function(T){T.Add="Add",T.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 A=class A{constructor(C,O){et(this,M);et(this,m);et(this,g,null);et(this,j,null);et(this,S,{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 ae={zone:O};if(C?C instanceof A?(Me(this,m,K(C,m)),Me(this,g,K(C,g)),Me(this,j,K(C,j))):C instanceof Date?Me(this,m,u.DateTime.fromJSDate(C,ae)):typeof C=="number"?Me(this,m,u.DateTime.fromMillis(C,ae)):(Me(this,m,u.DateTime.fromISO(C,ae)),K(this,m).isValid||Me(this,m,u.DateTime.fromRFC2822(C,ae)),K(this,m).isValid||Me(this,m,u.DateTime.fromSQL(C,ae)),K(this,m).isValid||Me(this,m,u.DateTime.fromFormat(C,"EEE, d MMM yyyy HH:mm:ss",ae))):Me(this,m,u.DateTime.local()),!K(this,m).isValid)throw new Error(`CronDate: unhandled timestamp: ${C}`);O&&O!==K(this,m).zoneName&&Me(this,m,K(this,m).setZone(O))}get dstStart(){return K(this,g)}set dstStart(C){Me(this,g,C)}get dstEnd(){return K(this,j)}set dstEnd(C){Me(this,j,C)}addYear(){Me(this,m,K(this,m).plus({years:1}))}addMonth(){Me(this,m,K(this,m).plus({months:1}).startOf("month"))}addDay(){Me(this,m,K(this,m).plus({days:1}).startOf("day"))}addHour(){Me(this,m,K(this,m).plus({hours:1}).startOf("hour"))}addMinute(){Me(this,m,K(this,m).plus({minutes:1}).startOf("minute"))}addSecond(){Me(this,m,K(this,m).plus({seconds:1}))}subtractYear(){Me(this,m,K(this,m).minus({years:1}))}subtractMonth(){Me(this,m,K(this,m).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Me(this,m,K(this,m).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Me(this,m,K(this,m).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Me(this,m,K(this,m).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Me(this,m,K(this,m).minus({seconds:1}))}addUnit(C){K(this,S).add[C]()}subtractUnit(C){K(this,S).subtract[C]()}invokeDateOperation(C,O){if(C===o.Add){this.addUnit(O);return}if(C===o.Subtract){this.subtractUnit(O);return}throw new Error(`Invalid verb: ${C}`)}getDate(){return K(this,m).day}getFullYear(){return K(this,m).year}getDay(){const C=K(this,m).weekday;return C===7?0:C}getMonth(){return K(this,m).month-1}getHours(){return K(this,m).hour}getMinutes(){return K(this,m).minute}getSeconds(){return K(this,m).second}getMilliseconds(){return K(this,m).millisecond}getUTCOffset(){return K(this,m).offset}setStartOfDay(){Me(this,m,K(this,m).startOf("day"))}setEndOfDay(){Me(this,m,K(this,m).endOf("day"))}getTime(){return K(this,m).valueOf()}getUTCDate(){return we(this,M,Ll).call(this).day}getUTCFullYear(){return we(this,M,Ll).call(this).year}getUTCDay(){const C=we(this,M,Ll).call(this).weekday;return C===7?0:C}getUTCMonth(){return we(this,M,Ll).call(this).month-1}getUTCHours(){return we(this,M,Ll).call(this).hour}getUTCMinutes(){return we(this,M,Ll).call(this).minute}getUTCSeconds(){return we(this,M,Ll).call(this).second}toISOString(){return K(this,m).toUTC().toISO()}toJSON(){return K(this,m).toJSON()}setDate(C){Me(this,m,K(this,m).set({day:C}))}setFullYear(C){Me(this,m,K(this,m).set({year:C}))}setDay(C){Me(this,m,K(this,m).set({weekday:C}))}setMonth(C){Me(this,m,K(this,m).set({month:C+1}))}setHours(C){Me(this,m,K(this,m).set({hour:C}))}setMinutes(C){Me(this,m,K(this,m).set({minute:C}))}setSeconds(C){Me(this,m,K(this,m).set({second:C}))}setMilliseconds(C){Me(this,m,K(this,m).set({millisecond:C}))}toString(){return this.toDate().toString()}toDate(){return K(this,m).toJSDate()}isLastDayOfMonth(){var ae;const{day:C,month:O}=K(this,m);if(O===2){const I=we(ae=A,p,Cf).call(ae,K(this,m).year);return C===l.DAYS_IN_MONTH[O-1]-(I?0:1)}return C===l.DAYS_IN_MONTH[O-1]}isLastWeekdayOfMonth(){var I;const{day:C,month:O}=K(this,m);let ae;return O===2?ae=l.DAYS_IN_MONTH[O-1]-(we(I=A,p,Cf).call(I,K(this,m).year)?0:1):ae=l.DAYS_IN_MONTH[O-1],C>ae-7}applyDateOperation(C,O,ae){if(O===d.Month||O===d.Day){this.invokeDateOperation(C,O);return}const I=this.getHours();this.invokeDateOperation(C,O);const ne=this.getHours(),ee=ne-I;ee===2?ae!==24&&(this.dstStart=ne):ee===0&&this.getMinutes()===0&&this.getSeconds()===0&&ae!==24&&(this.dstEnd=ne)}};m=new WeakMap,g=new WeakMap,j=new WeakMap,S=new WeakMap,p=new WeakSet,Cf=function(C){return C%4===0&&C%100!==0||C%400===0},M=new WeakSet,Ll=function(){return K(this,m).toUTC()},et(A,p);let x=A;l.CronDate=x,l.default=x})(vf)),vf}var Nx;function z2(){if(Nx)return Fi;Nx=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.CronMonth=void 0;const l=Zf(),u=ks(),d=1,o=12,x=Object.freeze([]);let m=class extends u.CronField{static get min(){return d}static get max(){return o}static get chars(){return x}static get daysInMonth(){return l.DAYS_IN_MONTH}constructor(j,S){super(j,S),this.validate()}get values(){return super.values}};return Fi.CronMonth=m,Fi}var Qi={},wx;function U2(){if(wx)return Qi;wx=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.CronSecond=void 0;const l=ks(),u=0,d=59,o=Object.freeze([]);let x=class extends l.CronField{static get min(){return u}static get max(){return d}static get chars(){return o}constructor(g,j){super(g,j),this.validate()}get values(){return super.values}};return Qi.CronSecond=x,Qi}var jx;function Ff(){return jx||(jx=1,(function(l){var u=Ms&&Ms.__createBinding||(Object.create?(function(o,x,m,g){g===void 0&&(g=m);var j=Object.getOwnPropertyDescriptor(x,m);(!j||("get"in j?!x.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return x[m]}}),Object.defineProperty(o,g,j)}):(function(o,x,m,g){g===void 0&&(g=m),o[g]=x[m]})),d=Ms&&Ms.__exportStar||function(o,x){for(var m in o)m!=="default"&&!Object.prototype.hasOwnProperty.call(x,m)&&u(x,o,m)};Object.defineProperty(l,"__esModule",{value:!0}),d(O2(),l),d(D2(),l),d(R2(),l),d(ks(),l),d(_2(),l),d(A2(),l),d(z2(),l),d(U2(),l)})(Ms)),Ms}var Ex;function Rg(){var d,o,x,m,g,j,S,p,Og,Dg;if(Ex)return Vi;Ex=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.CronFieldCollection=void 0;const l=Ff();let u=(p=class{constructor({second:A,minute:T,hour:C,dayOfMonth:O,month:ae,dayOfWeek:I}){et(this,d);et(this,o);et(this,x);et(this,m);et(this,g);et(this,j);if(!A)throw new Error("Validation error, Field second is missing");if(!T)throw new Error("Validation error, Field minute is missing");if(!C)throw new Error("Validation error, Field hour is missing");if(!O)throw new Error("Validation error, Field dayOfMonth is missing");if(!ae)throw new Error("Validation error, Field month is missing");if(!I)throw new Error("Validation error, Field dayOfWeek is missing");if(ae.values.length===1&&!O.hasLastChar&&!(parseInt(O.values[0],10)<=l.CronMonth.daysInMonth[ae.values[0]-1]))throw new Error("Invalid explicit day of month definition");Me(this,d,A),Me(this,o,T),Me(this,x,C),Me(this,g,ae),Me(this,j,I),Me(this,m,O)}static from(A,T){return new p({second:this.resolveField(l.CronSecond,A.second,T.second),minute:this.resolveField(l.CronMinute,A.minute,T.minute),hour:this.resolveField(l.CronHour,A.hour,T.hour),dayOfMonth:this.resolveField(l.CronDayOfMonth,A.dayOfMonth,T.dayOfMonth),month:this.resolveField(l.CronMonth,A.month,T.month),dayOfWeek:this.resolveField(l.CronDayOfWeek,A.dayOfWeek,T.dayOfWeek)})}static resolveField(A,T,C){return C?C instanceof l.CronField?C:new A(C):T}get second(){return K(this,d)}get minute(){return K(this,o)}get hour(){return K(this,x)}get dayOfMonth(){return K(this,m)}get month(){return K(this,g)}get dayOfWeek(){return K(this,j)}static compactField(A){if(A.length===0)return[];const T=[];let C;return A.forEach((O,ae,I)=>{if(C===void 0){C={start:O,count:1};return}const ne=I[ae-1]||C.start,ee=I[ae+1];if(O==="L"||O==="W"){T.push(C),T.push({start:O,count:1}),C=void 0;return}if(C.step===void 0&&ee!==void 0){const J=O-ne,ce=ee-O;if(J<=ce){C={...C,count:2,end:O,step:J};return}C.step=1}O-(C.end??0)===C.step?(C.count++,C.end=O):(C.count===1?T.push({start:C.start,count:1}):C.count===2?(T.push({start:C.start,count:1}),T.push({start:C.end??ne,count:1})):T.push(C),C={start:O,count:1})}),C&&T.push(C),T}stringifyField(A){var ae;let T=A.max,C=A.values;if(A instanceof l.CronDayOfWeek){T=6;const I=K(this,j).values;C=I[I.length-1]===7?I.slice(0,-1):I}A instanceof l.CronDayOfMonth&&(T=K(this,g).values.length===1?l.CronMonth.daysInMonth[K(this,g).values[0]-1]:A.max);const O=p.compactField(C);if(O.length===1){const I=we(ae=p,S,Og).call(ae,A,O[0],T);if(I)return I}return O.map(I=>{var ee;const ne=I.count===1?I.start.toString():we(ee=p,S,Dg).call(ee,I,T);return A instanceof l.CronDayOfWeek&&A.nthDay>0?`${ne}#${A.nthDay}`:ne}).join(",")}stringify(A=!1){const T=[];return A&&T.push(this.stringifyField(K(this,d))),T.push(this.stringifyField(K(this,o)),this.stringifyField(K(this,x)),this.stringifyField(K(this,m)),this.stringifyField(K(this,g)),this.stringifyField(K(this,j))),T.join(" ")}serialize(){return{second:K(this,d).serialize(),minute:K(this,o).serialize(),hour:K(this,x).serialize(),dayOfMonth:K(this,m).serialize(),month:K(this,g).serialize(),dayOfWeek:K(this,j).serialize()}}},d=new WeakMap,o=new WeakMap,x=new WeakMap,m=new WeakMap,g=new WeakMap,j=new WeakMap,S=new WeakSet,Og=function(A,T,C){const O=T.step;return O?O===1&&T.start===A.min&&T.end&&T.end>=C?A.hasQuestionMarkChar?"?":"*":O!==1&&T.start===A.min&&T.end&&T.end>=C-O+1?`*/${O}`:null:null},Dg=function(A,T){const C=A.step;if(C===1)return`${A.start}-${A.end}`;const O=A.start===0?A.count-1:A.count;if(!C)throw new Error("Unexpected range step");if(!A.end)throw new Error("Unexpected range end");if(C*O>A.end){const ae=(ne,ee)=>{if(typeof A.start!="number")throw new Error("Unexpected range start");return ee%C===0?A.start+ee:null};if(typeof A.start!="number")throw new Error("Unexpected range start");const I={length:A.end-A.start+1};return Array.from(I,ae).filter(ne=>ne!==null).join(",")}return A.end===T-C+1?`${A.start}/${C}`:`${A.start}-${A.end}/${C}`},et(p,S),p);return Vi.CronFieldCollection=u,Vi}var pf={},Mx;function Lg(){return Mx||(Mx=1,(function(l){var x,m,g,j,S,p,E,M,_,ql,T,Ds,_g,Ag,kg,zg,Of,Ug,Hg,Dr;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=Zf();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,X=class X{constructor(k,te){et(this,T);et(this,x);et(this,m);et(this,g);et(this,j);et(this,S);et(this,p);et(this,E,null);et(this,M,!1);Me(this,x,te),Me(this,m,te.tz),Me(this,j,te.startDate?new u.CronDate(te.startDate,K(this,m)):null),Me(this,S,te.endDate?new u.CronDate(te.endDate,K(this,m)):null);let V=te.currentDate??te.startDate;if(V){const oe=new u.CronDate(V,K(this,m));K(this,j)&&oe.getTime()<K(this,j).getTime()?V=K(this,j):K(this,S)&&oe.getTime()>K(this,S).getTime()&&(V=K(this,S))}Me(this,g,new u.CronDate(V,K(this,m))),Me(this,p,k)}get fields(){return K(this,p)}static fieldsToExpression(k,te){return new X(k,te||{})}next(){return we(this,T,Dr).call(this)}prev(){return we(this,T,Dr).call(this,!0)}hasNext(){const k=K(this,g);try{return we(this,T,Dr).call(this),!0}catch{return!1}finally{Me(this,g,k)}}hasPrev(){const k=K(this,g);try{return we(this,T,Dr).call(this,!0),!0}catch{return!1}finally{Me(this,g,k)}}take(k){const te=[];if(k>=0)for(let V=0;V<k;V++)try{te.push(this.next())}catch{return te}else for(let V=0;V>k;V--)try{te.push(this.prev())}catch{return te}return te}reset(k){Me(this,g,new u.CronDate(k||K(this,x).currentDate))}stringify(k=!1){return K(this,p).stringify(k)}includesDate(k){const{second:te,minute:V,hour:oe,month:ge}=K(this,p),ye=new u.CronDate(k,K(this,m));return!(!te.values.includes(ye.getSeconds())||!V.values.includes(ye.getMinutes())||!oe.values.includes(ye.getHours())||!ge.values.includes(ye.getMonth()+1)||!we(this,T,Of).call(this,ye)||K(this,p).dayOfWeek.nthDay>0&&Math.ceil(ye.getDate()/7)!==K(this,p).dayOfWeek.nthDay)}toString(){return K(this,x).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:we(this,T,Dr).call(this),done:!this.hasNext()})}}};x=new WeakMap,m=new WeakMap,g=new WeakMap,j=new WeakMap,S=new WeakMap,p=new WeakMap,E=new WeakMap,M=new WeakMap,_=new WeakSet,ql=function(k,te){return te.some(V=>V===k)},T=new WeakSet,Ds=function(k,te){return k[te?k.length-1:0]},_g=function(k){const te=`${k.getFullYear()}-${k.getMonth()+1}-${k.getDate()}`;if(K(this,E)===te)return K(this,M);const V=new u.CronDate(k);V.setStartOfDay();const oe=new u.CronDate(k);return oe.setEndOfDay(),Me(this,E,te),Me(this,M,V.getUTCOffset()!==oe.getUTCOffset()),K(this,M)},Ag=function(k,te,V){const oe=K(this,p).second.values,ge=k.getSeconds(),ye=K(this,p).second.findNearestValue(ge,V);if(ye!==null){k.setSeconds(ye);return}k.applyDateOperation(te,u.TimeUnit.Minute,K(this,p).hour.values.length),k.setSeconds(we(this,T,Ds).call(this,oe,V))},kg=function(k,te,V){const oe=K(this,p).minute.values,ge=K(this,p).second.values,ye=k.getMinutes(),G=K(this,p).minute.findNearestValue(ye,V);if(G!==null){k.setMinutes(G),k.setSeconds(we(this,T,Ds).call(this,ge,V));return}k.applyDateOperation(te,u.TimeUnit.Hour,K(this,p).hour.values.length),k.setMinutes(we(this,T,Ds).call(this,oe,V)),k.setSeconds(we(this,T,Ds).call(this,ge,V))},zg=function(k,te){const V=te.isLastWeekdayOfMonth();return k.some(oe=>{const ge=parseInt(oe.toString().charAt(0),10)%7;if(Number.isNaN(ge))throw new Error(`Invalid last weekday of the month expression: ${oe}`);return te.getDay()===ge&&V})},Of=function(k){var se,me,Se;const te=K(this,p).dayOfMonth.isWildcard,V=!te,oe=K(this,p).dayOfWeek.isWildcard,ge=!oe,ye=we(se=X,_,ql).call(se,k.getDate(),K(this,p).dayOfMonth.values)||K(this,p).dayOfMonth.hasLastChar&&k.isLastDayOfMonth(),G=we(me=X,_,ql).call(me,k.getDay(),K(this,p).dayOfWeek.values)||K(this,p).dayOfWeek.hasLastChar&&we(Se=X,_,zg).call(Se,K(this,p).dayOfWeek.values,k);return!!(V&&ge&&(ye||G)||ye&&!ge||te&&!oe&&G)},Ug=function(k,te,V){var Re,b;const oe=K(this,p).hour.values,ge=oe,ye=k.getHours(),G=we(Re=X,_,ql).call(Re,ye,oe),se=k.dstStart===ye,me=k.dstEnd===ye;if(se)return we(b=X,_,ql).call(b,ye-1,oe)?!0:(k.invokeDateOperation(te,u.TimeUnit.Hour),!1);if(me&&!V)return k.dstEnd=null,k.applyDateOperation(u.DateMathOp.Add,u.TimeUnit.Hour,ge.length),!1;if(G)return!0;k.dstStart=null;const Se=K(this,p).hour.findNearestValue(ye,V);if(Se===null)return k.applyDateOperation(te,u.TimeUnit.Day,ge.length),!1;if(we(this,T,_g).call(this,k)){const Y=V?ye-Se:Se-ye;for(let ie=0;ie<Y;ie++)k.applyDateOperation(te,u.TimeUnit.Hour,ge.length)}else k.setHours(Se);return k.setMinutes(we(this,T,Ds).call(this,K(this,p).minute.values,V)),k.setSeconds(we(this,T,Ds).call(this,K(this,p).second.values,V)),!1},Hg=function(k){if(!K(this,j)&&!K(this,S))return;const te=k.getTime();if(K(this,j)&&te<K(this,j).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(K(this,S)&&te>K(this,S).getTime())throw new Error(l.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Dr=function(k=!1){var ye,G,se;const te=k?u.DateMathOp.Subtract:u.DateMathOp.Add,V=new u.CronDate(K(this,g)),oe=V.getTime();let ge=0;for(;++ge<d;){if(we(this,T,Hg).call(this,V),!we(this,T,Of).call(this,V)){V.applyDateOperation(te,u.TimeUnit.Day,K(this,p).hour.values.length);continue}if(!(K(this,p).dayOfWeek.nthDay<=0||Math.ceil(V.getDate()/7)===K(this,p).dayOfWeek.nthDay)){V.applyDateOperation(te,u.TimeUnit.Day,K(this,p).hour.values.length);continue}if(!we(ye=X,_,ql).call(ye,V.getMonth()+1,K(this,p).month.values)){V.applyDateOperation(te,u.TimeUnit.Month,K(this,p).hour.values.length);continue}if(we(this,T,Ug).call(this,V,te,k)){if(!we(G=X,_,ql).call(G,V.getMinutes(),K(this,p).minute.values)){we(this,T,kg).call(this,V,te,k);continue}if(!we(se=X,_,ql).call(se,V.getSeconds(),K(this,p).second.values)){we(this,T,Ag).call(this,V,te,k);continue}if(oe===V.getTime()){(te==="Add"||V.getMilliseconds()===0)&&V.applyDateOperation(te,u.TimeUnit.Second,K(this,p).hour.values.length);continue}break}}if(ge>d)throw new Error(l.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return V.getMilliseconds()!==0&&V.setMilliseconds(0),Me(this,g,V),V},et(X,_);let o=X;l.CronExpression=o,l.default=o})(pf)),pf}var Lc={},Tx;function H2(){if(Tx)return Lc;Tx=1,Object.defineProperty(Lc,"__esModule",{value:!0}),Lc.seededRandom=d;function l(o){let x=2166136261;for(let m=0;m<o.length;m++)x^=o.charCodeAt(m),x=Math.imul(x,16777619);return()=>x>>>0}function u(o){return()=>{let x=o+=1831565813;return x=Math.imul(x^x>>>15,x|1),x^=x+Math.imul(x^x>>>7,x|61),((x^x>>>14)>>>0)/4294967296}}function d(o){const x=o?l(o)():Math.floor(Math.random()*1e10);return u(x)}return Lc}var Cx;function Rf(){var p,E,qg,Rs,Vg,Bg,Yg,$g,Gg,Zg,Fg,Df,Qg,Wg;if(Cx)return Ta;Cx=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.CronExpressionParser=Ta.DayOfWeek=Ta.Months=Ta.CronUnit=Ta.PredefinedExpressions=void 0;const l=Rg(),u=Lg(),d=H2(),o=Ff();var x;(function(W){W["@yearly"]="0 0 0 1 1 *",W["@annually"]="0 0 0 1 1 *",W["@monthly"]="0 0 0 1 * *",W["@weekly"]="0 0 0 * * 0",W["@daily"]="0 0 0 * * *",W["@hourly"]="0 0 * * * *",W["@minutely"]="0 * * * * *",W["@secondly"]="* * * * * *",W["@weekdays"]="0 0 0 * * 1-5",W["@weekends"]="0 0 0 * * 0,6"})(x||(Ta.PredefinedExpressions=x={}));var m;(function(W){W.Second="Second",W.Minute="Minute",W.Hour="Hour",W.DayOfMonth="DayOfMonth",W.Month="Month",W.DayOfWeek="DayOfWeek"})(m||(Ta.CronUnit=m={}));var g;(function(W){W[W.jan=1]="jan",W[W.feb=2]="feb",W[W.mar=3]="mar",W[W.apr=4]="apr",W[W.may=5]="may",W[W.jun=6]="jun",W[W.jul=7]="jul",W[W.aug=8]="aug",W[W.sep=9]="sep",W[W.oct=10]="oct",W[W.nov=11]="nov",W[W.dec=12]="dec"})(g||(Ta.Months=g={}));var j;(function(W){W[W.sun=0]="sun",W[W.mon=1]="mon",W[W.tue=2]="tue",W[W.wed=3]="wed",W[W.thu=4]="thu",W[W.fri=5]="fri",W[W.sat=6]="sat"})(j||(Ta.DayOfWeek=j={}));let S=(E=class{static parse(X,$={}){var ie,he,je,fe,ve,ke,_e,ot;const{strict:k=!1,hashSeed:te}=$,V=(0,d.seededRandom)(te);X=x[X]||X;const oe=we(ie=E,p,qg).call(ie,X,k);if(!(oe.dayOfMonth==="*"||oe.dayOfWeek==="*"||!k))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ge=we(he=E,p,Rs).call(he,m.Second,oe.second,o.CronSecond.constraints,V),ye=we(je=E,p,Rs).call(je,m.Minute,oe.minute,o.CronMinute.constraints,V),G=we(fe=E,p,Rs).call(fe,m.Hour,oe.hour,o.CronHour.constraints,V),se=we(ve=E,p,Rs).call(ve,m.Month,oe.month,o.CronMonth.constraints,V),me=we(ke=E,p,Rs).call(ke,m.DayOfMonth,oe.dayOfMonth,o.CronDayOfMonth.constraints,V),{dayOfWeek:Se,nthDayOfWeek:Re}=we(_e=E,p,Qg).call(_e,oe.dayOfWeek),b=we(ot=E,p,Rs).call(ot,m.DayOfWeek,Se,o.CronDayOfWeek.constraints,V),Y=new l.CronFieldCollection({second:new o.CronSecond(ge,{rawValue:oe.second}),minute:new o.CronMinute(ye,{rawValue:oe.minute}),hour:new o.CronHour(G,{rawValue:oe.hour}),dayOfMonth:new o.CronDayOfMonth(me,{rawValue:oe.dayOfMonth}),month:new o.CronMonth(se,{rawValue:oe.month}),dayOfWeek:new o.CronDayOfWeek(b,{rawValue:oe.dayOfWeek,nthDayOfWeek:Re})});return new u.CronExpression(Y,{...$,expression:X})}},p=new WeakSet,qg=function(X,$){if($&&!X.length)throw new Error("Invalid cron expression");X=X||"0 * * * * *";const k=X.trim().split(/\s+/);if($&&k.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(k.length>6)throw new Error("Invalid cron expression, too many fields");const te=["*","*","*","*","*","0"];k.length<te.length&&k.unshift(...te.slice(k.length));const[V,oe,ge,ye,G,se]=k;return{second:V,minute:oe,hour:ge,dayOfMonth:ye,month:G,dayOfWeek:se}},Rs=function(X,$,k,te){if((X===m.Month||X===m.DayOfWeek)&&($=$.replace(/[a-z]{3}/gi,V=>{V=V.toLowerCase();const oe=g[V]||j[V];if(oe===void 0)throw new Error(`Validation error, cannot resolve alias "${V}"`);return oe.toString()})),!k.validChars.test($))throw new Error(`Invalid characters, got value: ${$}`);return $=we(this,p,Vg).call(this,$,k),$=we(this,p,Bg).call(this,$,k,te),we(this,p,Yg).call(this,X,$,k)},Vg=function(X,$){return X.replace(/[*?]/g,$.min+"-"+$.max)},Bg=function(X,$,k){const te=k();return X.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(V,oe,ge,ye)=>{if(oe&&ge&&ye){const G=parseInt(oe,10),se=parseInt(ge,10),me=parseInt(ye,10);if(G>se)throw new Error(`Invalid range: ${G}-${se}, min > max`);if(me<=0)throw new Error(`Invalid step: ${me}, must be positive`);const Se=Math.max(G,$.min),Re=Math.floor(te*me),b=[];for(let Y=Math.floor(Se/me)*me+Re;Y<=se;Y+=me)Y>=Se&&b.push(Y);return b.join(",")}else if(oe&&ge){const G=parseInt(oe,10),se=parseInt(ge,10);if(G>se)throw new Error(`Invalid range: ${G}-${se}, min > max`);return String(Math.floor(te*(se-G+1))+G)}else if(ye){const G=parseInt(ye,10);if(G<=0)throw new Error(`Invalid step: ${G}, must be positive`);const se=Math.floor(te*G),me=[];for(let Se=Math.floor($.min/G)*G+se;Se<=$.max;Se+=G)Se>=$.min&&me.push(Se);return me.join(",")}else return String(Math.floor(te*($.max-$.min+1)+$.min))})},Yg=function(X,$,k){const te=[];function V(ge,ye){var G;if(Array.isArray(ge))te.push(...ge);else if(we(G=E,p,Wg).call(G,ye,ge))te.push(ge);else{const se=parseInt(ge.toString(),10);if(!(se>=ye.min&&se<=ye.max))throw new Error(`Constraint error, got value ${ge} expected range ${ye.min}-${ye.max}`);te.push(X===m.DayOfWeek?se%7:ge)}}return $.split(",").forEach(ge=>{var ye;if(!(ge.length>0))throw new Error("Invalid list value format");V(we(ye=E,p,$g).call(ye,X,ge,k),k)}),te},$g=function(X,$,k){var V,oe;const te=$.split("/");if(te.length>2)throw new Error(`Invalid repeat: ${$}`);return te.length===2?(isNaN(parseInt(te[0],10))||(te[0]=`${te[0]}-${k.max}`),we(V=E,p,Df).call(V,X,te[0],parseInt(te[1],10),k)):we(oe=E,p,Df).call(oe,X,$,1,k)},Gg=function(X,$,k){if(!(!isNaN(X)&&!isNaN($)&&X>=k.min&&$<=k.max))throw new Error(`Constraint error, got range ${X}-${$} expected range ${k.min}-${k.max}`);if(X>$)throw new Error(`Invalid range: ${X}-${$}, min(${X}) > max(${$})`)},Zg=function(X){if(!(!isNaN(X)&&X>0))throw new Error(`Constraint error, cannot repeat at every ${X} time.`)},Fg=function(X,$,k,te){const V=[];X===m.DayOfWeek&&k%7===0&&V.push(0);for(let oe=$;oe<=k;oe+=te)V.indexOf(oe)===-1&&V.push(oe);return V},Df=function(X,$,k,te){const V=$.split("-");if(V.length<=1)return isNaN(+$)?$:+$;const[oe,ge]=V.map(ye=>parseInt(ye,10));return we(this,p,Gg).call(this,oe,ge,te),we(this,p,Zg).call(this,k),we(this,p,Fg).call(this,X,oe,ge,k)},Qg=function(X){const $=X.split("#");if($.length<=1)return{dayOfWeek:$[0]};const k=+$[$.length-1],te=X.match(/([,-/])/);if(te!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${te==null?void 0:te[0]}\` special characters are incompatible`);if(!($.length<=2&&!isNaN(k)&&k>=1&&k<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:$[0],nthDayOfWeek:k}},Wg=function(X,$){return X.chars.some(k=>$.toString().includes(k))},et(E,p),E);return Ta.CronExpressionParser=S,Ta}var ln={};const L2={},q2=Object.freeze(Object.defineProperty({__proto__:null,default:L2},Symbol.toStringTag,{value:"Module"})),Ox=jv(q2);var Dx;function V2(){var m,g,_f,Xg;if(Dx)return ln;Dx=1;var l=ln&&ln.__createBinding||(Object.create?(function(p,E,M,_){_===void 0&&(_=M);var A=Object.getOwnPropertyDescriptor(E,M);(!A||("get"in A?!E.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return E[M]}}),Object.defineProperty(p,_,A)}):(function(p,E,M,_){_===void 0&&(_=M),p[_]=E[M]})),u=ln&&ln.__setModuleDefault||(Object.create?(function(p,E){Object.defineProperty(p,"default",{enumerable:!0,value:E})}):function(p,E){p.default=E}),d=ln&&ln.__importStar||(function(){var p=function(E){return p=Object.getOwnPropertyNames||function(M){var _=[];for(var A in M)Object.prototype.hasOwnProperty.call(M,A)&&(_[_.length]=A);return _},p(E)};return function(E){if(E&&E.__esModule)return E;var M={};if(E!=null)for(var _=p(E),A=0;A<_.length;A++)_[A]!=="default"&&l(M,E,_[A]);return u(M,E),M}})();Object.defineProperty(ln,"__esModule",{value:!0}),ln.CronFileParser=void 0;const o=Rf();let x=(g=class{static async parseFile(E){var A;const{readFile:M}=await Promise.resolve().then(()=>d(Ox)),_=await M(E,"utf8");return we(A=g,m,_f).call(A,_)}static parseFileSync(E){var A;const{readFileSync:M}=Ox,_=M(E,"utf8");return we(A=g,m,_f).call(A,_)}},m=new WeakSet,_f=function(E){var A;const M=E.split(`
|
|
360
|
+
`),_={variables:{},expressions:[],errors:{}};for(const T of M){const C=T.trim();if(C.length===0||C.startsWith("#"))continue;const O=C.match(/^(.*)=(.*)$/);if(O){const[,ae,I]=O;_.variables[ae]=I.replace(/["']/g,"");continue}try{const ae=we(A=g,m,Xg).call(A,C);_.expressions.push(ae.interval)}catch(ae){_.errors[C]=ae}}return _},Xg=function(E){const M=E.split(" ");return{interval:o.CronExpressionParser.parse(M.slice(0,5).join(" ")),command:M.slice(5,M.length)}},et(g,m),g);return ln.CronFileParser=x,ln}var Rx;function B2(){return Rx||(Rx=1,(function(l){var u=Es&&Es.__createBinding||(Object.create?(function(p,E,M,_){_===void 0&&(_=M);var A=Object.getOwnPropertyDescriptor(E,M);(!A||("get"in A?!E.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return E[M]}}),Object.defineProperty(p,_,A)}):(function(p,E,M,_){_===void 0&&(_=M),p[_]=E[M]})),d=Es&&Es.__exportStar||function(p,E){for(var M in p)M!=="default"&&!Object.prototype.hasOwnProperty.call(E,M)&&u(E,p,M)};Object.defineProperty(l,"__esModule",{value:!0}),l.CronFileParser=l.CronExpressionParser=l.CronExpression=l.CronFieldCollection=l.CronDate=void 0;const o=Rf();var x=Zf();Object.defineProperty(l,"CronDate",{enumerable:!0,get:function(){return x.CronDate}});var m=Rg();Object.defineProperty(l,"CronFieldCollection",{enumerable:!0,get:function(){return m.CronFieldCollection}});var g=Lg();Object.defineProperty(l,"CronExpression",{enumerable:!0,get:function(){return g.CronExpression}});var j=Rf();Object.defineProperty(l,"CronExpressionParser",{enumerable:!0,get:function(){return j.CronExpressionParser}});var S=V2();Object.defineProperty(l,"CronFileParser",{enumerable:!0,get:function(){return S.CronFileParser}}),d(Ff(),l),l.default=o.CronExpressionParser})(Es)),Es}var Y2=B2();const Ig=6048e5,$2=864e5,G2=6e4,Z2=36e5,_x=Symbol.for("constructDateFrom");function Ca(l,u){return typeof l=="function"?l(u):l&&typeof l=="object"&&_x in l?l[_x](u):l instanceof Date?new l.constructor(u):new Date(u)}function Tt(l,u){return Ca(u||l,l)}function F2(l,u,d){return Ca(l,+Tt(l)+u)}function qc(l,u,d){return F2(l,u*Z2)}let Q2={};function eo(){return Q2}function tu(l,u){var j,S,p,E;const d=eo(),o=(u==null?void 0:u.weekStartsOn)??((S=(j=u==null?void 0:u.locale)==null?void 0:j.options)==null?void 0:S.weekStartsOn)??d.weekStartsOn??((E=(p=d.locale)==null?void 0:p.options)==null?void 0:E.weekStartsOn)??0,x=Tt(l,u==null?void 0:u.in),m=x.getDay(),g=(m<o?7:0)+m-o;return x.setDate(x.getDate()-g),x.setHours(0,0,0,0),x}function Ic(l,u){return tu(l,{...u,weekStartsOn:1})}function Jg(l,u){const d=Tt(l,u==null?void 0:u.in),o=d.getFullYear(),x=Ca(d,0);x.setFullYear(o+1,0,4),x.setHours(0,0,0,0);const m=Ic(x),g=Ca(d,0);g.setFullYear(o,0,4),g.setHours(0,0,0,0);const j=Ic(g);return d.getTime()>=m.getTime()?o+1:d.getTime()>=j.getTime()?o:o-1}function Ax(l){const u=Tt(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 W2(l,...u){const d=Ca.bind(null,u.find(o=>typeof o=="object"));return u.map(d)}function kx(l,u){const d=Tt(l,u==null?void 0:u.in);return d.setHours(0,0,0,0),d}function X2(l,u,d){const[o,x]=W2(d==null?void 0:d.in,l,u),m=kx(o),g=kx(x),j=+m-Ax(m),S=+g-Ax(g);return Math.round((j-S)/$2)}function I2(l,u){const d=Jg(l,u),o=Ca(l,0);return o.setFullYear(d,0,4),o.setHours(0,0,0,0),Ic(o)}function J2(l,u){let d,o=u==null?void 0:u.in;return l.forEach(x=>{!o&&typeof x=="object"&&(o=Ca.bind(null,x));const m=Tt(x,o);(!d||d<m||isNaN(+m))&&(d=m)}),Ca(o,d||NaN)}function K2(l,u){let d,o=u==null?void 0:u.in;return l.forEach(x=>{!o&&typeof x=="object"&&(o=Ca.bind(null,x));const m=Tt(x,o);(!d||d>m||isNaN(+m))&&(d=m)}),Ca(o,d||NaN)}function P2(l){return l instanceof Date||typeof l=="object"&&Object.prototype.toString.call(l)==="[object Date]"}function eS(l){return!(!P2(l)&&typeof l!="number"||isNaN(+Tt(l)))}function tS(l){return u=>{const o=(l?Math[l]:Math.trunc)(u);return o===0?0:o}}function aS(l,u){return+Tt(l)-+Tt(u)}function zx(l,u,d){const o=aS(l,u)/G2;return tS(d==null?void 0:d.roundingMethod)(o)}function nS(l,u){const d=Tt(l,u==null?void 0:u.in);return d.setFullYear(d.getFullYear(),0,1),d.setHours(0,0,0,0),d}const lS={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"}},sS=(l,u,d)=>{let o;const x=lS[l];return typeof x=="string"?o=x:u===1?o=x.one:o=x.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 rS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},iS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},cS={date:bf({formats:rS,defaultWidth:"full"}),time:bf({formats:iS,defaultWidth:"full"}),dateTime:bf({formats:uS,defaultWidth:"full"})},oS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},dS=(l,u,d,o)=>oS[l];function Wi(l){return(u,d)=>{const o=d!=null&&d.context?String(d.context):"standalone";let x;if(o==="formatting"&&l.formattingValues){const g=l.defaultFormattingWidth||l.defaultWidth,j=d!=null&&d.width?String(d.width):g;x=l.formattingValues[j]||l.formattingValues[g]}else{const g=l.defaultWidth,j=d!=null&&d.width?String(d.width):l.defaultWidth;x=l.values[j]||l.values[g]}const m=l.argumentCallback?l.argumentCallback(u):u;return x[m]}}const fS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},hS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},mS={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"]},xS={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"]},gS={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"}},yS={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"}},vS=(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"},pS={ordinalNumber:vS,era:Wi({values:fS,defaultWidth:"wide"}),quarter:Wi({values:hS,defaultWidth:"wide",argumentCallback:l=>l-1}),month:Wi({values:mS,defaultWidth:"wide"}),day:Wi({values:xS,defaultWidth:"wide"}),dayPeriod:Wi({values:gS,defaultWidth:"wide",formattingValues:yS,defaultFormattingWidth:"wide"})};function Xi(l){return(u,d={})=>{const o=d.width,x=o&&l.matchPatterns[o]||l.matchPatterns[l.defaultMatchWidth],m=u.match(x);if(!m)return null;const g=m[0],j=o&&l.parsePatterns[o]||l.parsePatterns[l.defaultParseWidth],S=Array.isArray(j)?SS(j,M=>M.test(g)):bS(j,M=>M.test(g));let p;p=l.valueCallback?l.valueCallback(S):S,p=d.valueCallback?d.valueCallback(p):p;const E=u.slice(g.length);return{value:p,rest:E}}}function bS(l,u){for(const d in l)if(Object.prototype.hasOwnProperty.call(l,d)&&u(l[d]))return d}function SS(l,u){for(let d=0;d<l.length;d++)if(u(l[d]))return d}function NS(l){return(u,d={})=>{const o=u.match(l.matchPattern);if(!o)return null;const x=o[0],m=u.match(l.parsePattern);if(!m)return null;let g=l.valueCallback?l.valueCallback(m[0]):m[0];g=d.valueCallback?d.valueCallback(g):g;const j=u.slice(x.length);return{value:g,rest:j}}}const wS=/^(\d+)(th|st|nd|rd)?/i,jS=/\d+/i,ES={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},MS={any:[/^b/i,/^(a|c)/i]},TS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},CS={any:[/1/i,/2/i,/3/i,/4/i]},OS={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},DS={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]},RS={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},_S={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]},AS={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},kS={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}},zS={ordinalNumber:NS({matchPattern:wS,parsePattern:jS,valueCallback:l=>parseInt(l,10)}),era:Xi({matchPatterns:ES,defaultMatchWidth:"wide",parsePatterns:MS,defaultParseWidth:"any"}),quarter:Xi({matchPatterns:TS,defaultMatchWidth:"wide",parsePatterns:CS,defaultParseWidth:"any",valueCallback:l=>l+1}),month:Xi({matchPatterns:OS,defaultMatchWidth:"wide",parsePatterns:DS,defaultParseWidth:"any"}),day:Xi({matchPatterns:RS,defaultMatchWidth:"wide",parsePatterns:_S,defaultParseWidth:"any"}),dayPeriod:Xi({matchPatterns:AS,defaultMatchWidth:"any",parsePatterns:kS,defaultParseWidth:"any"})},US={code:"en-US",formatDistance:sS,formatLong:cS,formatRelative:dS,localize:pS,match:zS,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HS(l,u){const d=Tt(l,u==null?void 0:u.in);return X2(d,nS(d))+1}function LS(l,u){const d=Tt(l,u==null?void 0:u.in),o=+Ic(d)-+I2(d);return Math.round(o/Ig)+1}function Kg(l,u){var E,M,_,A;const d=Tt(l,u==null?void 0:u.in),o=d.getFullYear(),x=eo(),m=(u==null?void 0:u.firstWeekContainsDate)??((M=(E=u==null?void 0:u.locale)==null?void 0:E.options)==null?void 0:M.firstWeekContainsDate)??x.firstWeekContainsDate??((A=(_=x.locale)==null?void 0:_.options)==null?void 0:A.firstWeekContainsDate)??1,g=Ca((u==null?void 0:u.in)||l,0);g.setFullYear(o+1,0,m),g.setHours(0,0,0,0);const j=tu(g,u),S=Ca((u==null?void 0:u.in)||l,0);S.setFullYear(o,0,m),S.setHours(0,0,0,0);const p=tu(S,u);return+d>=+j?o+1:+d>=+p?o:o-1}function qS(l,u){var j,S,p,E;const d=eo(),o=(u==null?void 0:u.firstWeekContainsDate)??((S=(j=u==null?void 0:u.locale)==null?void 0:j.options)==null?void 0:S.firstWeekContainsDate)??d.firstWeekContainsDate??((E=(p=d.locale)==null?void 0:p.options)==null?void 0:E.firstWeekContainsDate)??1,x=Kg(l,u),m=Ca((u==null?void 0:u.in)||l,0);return m.setFullYear(x,0,o),m.setHours(0,0,0,0),tu(m,u)}function VS(l,u){const d=Tt(l,u==null?void 0:u.in),o=+tu(d,u)-+qS(d,u);return Math.round(o/Ig)+1}function lt(l,u){const d=l<0?"-":"",o=Math.abs(l).toString().padStart(u,"0");return d+o}const Hl={y(l,u){const d=l.getFullYear(),o=d>0?d:1-d;return lt(u==="yy"?o%100:o,u.length)},M(l,u){const d=l.getMonth();return u==="M"?String(d+1):lt(d+1,2)},d(l,u){return lt(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 lt(l.getHours()%12||12,u.length)},H(l,u){return lt(l.getHours(),u.length)},m(l,u){return lt(l.getMinutes(),u.length)},s(l,u){return lt(l.getSeconds(),u.length)},S(l,u){const d=u.length,o=l.getMilliseconds(),x=Math.trunc(o*Math.pow(10,d-3));return lt(x,u.length)}},Or={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ux={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(),x=o>0?o:1-o;return d.ordinalNumber(x,{unit:"year"})}return Hl.y(l,u)},Y:function(l,u,d,o){const x=Kg(l,o),m=x>0?x:1-x;if(u==="YY"){const g=m%100;return lt(g,2)}return u==="Yo"?d.ordinalNumber(m,{unit:"year"}):lt(m,u.length)},R:function(l,u){const d=Jg(l);return lt(d,u.length)},u:function(l,u){const d=l.getFullYear();return lt(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 lt(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 lt(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 Hl.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 lt(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 x=VS(l,o);return u==="wo"?d.ordinalNumber(x,{unit:"week"}):lt(x,u.length)},I:function(l,u,d){const o=LS(l);return u==="Io"?d.ordinalNumber(o,{unit:"week"}):lt(o,u.length)},d:function(l,u,d){return u==="do"?d.ordinalNumber(l.getDate(),{unit:"date"}):Hl.d(l,u)},D:function(l,u,d){const o=HS(l);return u==="Do"?d.ordinalNumber(o,{unit:"dayOfYear"}):lt(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 x=l.getDay(),m=(x-o.weekStartsOn+8)%7||7;switch(u){case"e":return String(m);case"ee":return lt(m,2);case"eo":return d.ordinalNumber(m,{unit:"day"});case"eee":return d.day(x,{width:"abbreviated",context:"formatting"});case"eeeee":return d.day(x,{width:"narrow",context:"formatting"});case"eeeeee":return d.day(x,{width:"short",context:"formatting"});case"eeee":default:return d.day(x,{width:"wide",context:"formatting"})}},c:function(l,u,d,o){const x=l.getDay(),m=(x-o.weekStartsOn+8)%7||7;switch(u){case"c":return String(m);case"cc":return lt(m,u.length);case"co":return d.ordinalNumber(m,{unit:"day"});case"ccc":return d.day(x,{width:"abbreviated",context:"standalone"});case"ccccc":return d.day(x,{width:"narrow",context:"standalone"});case"cccccc":return d.day(x,{width:"short",context:"standalone"});case"cccc":default:return d.day(x,{width:"wide",context:"standalone"})}},i:function(l,u,d){const o=l.getDay(),x=o===0?7:o;switch(u){case"i":return String(x);case"ii":return lt(x,u.length);case"io":return d.ordinalNumber(x,{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 x=l.getHours()/12>=1?"pm":"am";switch(u){case"a":case"aa":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"});case"aaa":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return d.dayPeriod(x,{width:"narrow",context:"formatting"});case"aaaa":default:return d.dayPeriod(x,{width:"wide",context:"formatting"})}},b:function(l,u,d){const o=l.getHours();let x;switch(o===12?x=Or.noon:o===0?x=Or.midnight:x=o/12>=1?"pm":"am",u){case"b":case"bb":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"});case"bbb":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return d.dayPeriod(x,{width:"narrow",context:"formatting"});case"bbbb":default:return d.dayPeriod(x,{width:"wide",context:"formatting"})}},B:function(l,u,d){const o=l.getHours();let x;switch(o>=17?x=Or.evening:o>=12?x=Or.afternoon:o>=4?x=Or.morning:x=Or.night,u){case"B":case"BB":case"BBB":return d.dayPeriod(x,{width:"abbreviated",context:"formatting"});case"BBBBB":return d.dayPeriod(x,{width:"narrow",context:"formatting"});case"BBBB":default:return d.dayPeriod(x,{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 Hl.h(l,u)},H:function(l,u,d){return u==="Ho"?d.ordinalNumber(l.getHours(),{unit:"hour"}):Hl.H(l,u)},K:function(l,u,d){const o=l.getHours()%12;return u==="Ko"?d.ordinalNumber(o,{unit:"hour"}):lt(o,u.length)},k:function(l,u,d){let o=l.getHours();return o===0&&(o=24),u==="ko"?d.ordinalNumber(o,{unit:"hour"}):lt(o,u.length)},m:function(l,u,d){return u==="mo"?d.ordinalNumber(l.getMinutes(),{unit:"minute"}):Hl.m(l,u)},s:function(l,u,d){return u==="so"?d.ordinalNumber(l.getSeconds(),{unit:"second"}):Hl.s(l,u)},S:function(l,u){return Hl.S(l,u)},X:function(l,u,d){const o=l.getTimezoneOffset();if(o===0)return"Z";switch(u){case"X":return Lx(o);case"XXXX":case"XX":return _s(o);case"XXXXX":case"XXX":default:return _s(o,":")}},x:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"x":return Lx(o);case"xxxx":case"xx":return _s(o);case"xxxxx":case"xxx":default:return _s(o,":")}},O:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"O":case"OO":case"OOO":return"GMT"+Hx(o,":");case"OOOO":default:return"GMT"+_s(o,":")}},z:function(l,u,d){const o=l.getTimezoneOffset();switch(u){case"z":case"zz":case"zzz":return"GMT"+Hx(o,":");case"zzzz":default:return"GMT"+_s(o,":")}},t:function(l,u,d){const o=Math.trunc(+l/1e3);return lt(o,u.length)},T:function(l,u,d){return lt(+l,u.length)}};function Hx(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),x=Math.trunc(o/60),m=o%60;return m===0?d+String(x):d+String(x)+u+lt(m,2)}function Lx(l,u){return l%60===0?(l>0?"-":"+")+lt(Math.abs(l)/60,2):_s(l,u)}function _s(l,u=""){const d=l>0?"-":"+",o=Math.abs(l),x=lt(Math.trunc(o/60),2),m=lt(o%60,2);return d+x+u+m}const qx=(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"})}},Pg=(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"})}},BS=(l,u)=>{const d=l.match(/(P+)(p+)?/)||[],o=d[1],x=d[2];if(!x)return qx(l,u);let m;switch(o){case"P":m=u.dateTime({width:"short"});break;case"PP":m=u.dateTime({width:"medium"});break;case"PPP":m=u.dateTime({width:"long"});break;case"PPPP":default:m=u.dateTime({width:"full"});break}return m.replace("{{date}}",qx(o,u)).replace("{{time}}",Pg(x,u))},YS={p:Pg,P:BS},$S=/^D+$/,GS=/^Y+$/,ZS=["D","DD","YY","YYYY"];function FS(l){return $S.test(l)}function QS(l){return GS.test(l)}function WS(l,u,d){const o=XS(l,u,d);if(console.warn(o),ZS.includes(l))throw new RangeError(o)}function XS(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 IS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KS=/^'([^]*?)'?$/,PS=/''/g,eN=/[a-zA-Z]/;function Ts(l,u,d){var E,M,_,A;const o=eo(),x=o.locale??US,m=o.firstWeekContainsDate??((M=(E=o.locale)==null?void 0:E.options)==null?void 0:M.firstWeekContainsDate)??1,g=o.weekStartsOn??((A=(_=o.locale)==null?void 0:_.options)==null?void 0:A.weekStartsOn)??0,j=Tt(l,d==null?void 0:d.in);if(!eS(j))throw new RangeError("Invalid time value");let S=u.match(JS).map(T=>{const C=T[0];if(C==="p"||C==="P"){const O=YS[C];return O(T,x.formatLong)}return T}).join("").match(IS).map(T=>{if(T==="''")return{isToken:!1,value:"'"};const C=T[0];if(C==="'")return{isToken:!1,value:tN(T)};if(Ux[C])return{isToken:!0,value:T};if(C.match(eN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:T}});x.localize.preprocessor&&(S=x.localize.preprocessor(j,S));const p={firstWeekContainsDate:m,weekStartsOn:g,locale:x};return S.map(T=>{if(!T.isToken)return T.value;const C=T.value;(QS(C)||FS(C))&&WS(C,u,String(l));const O=Ux[C[0]];return O(j,C,x.localize,p)}).join("")}function tN(l){const u=l.match(KS);return u?u[1].replace(PS,"'"):l}function aN(l,u){return+Tt(l)>+Tt(u)}function nN(l,u){return+Tt(l)<+Tt(u)}function lN(l,u){const d=Tt(l,u==null?void 0:u.in);return d.setMinutes(0,0,0),d}const Sf=[{id:"executor",label:"Executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}}],Vc=[{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"}],$n=160,Bc=14,sN=10,rN=7,Vx=4,ey=({configs:l,currentProjectId:u,onEditJob:d,queueStatus:o,queueAnalytics:x})=>{const m=q.useMemo(()=>lN(new Date),[]),g=q.useMemo(()=>qc(m,24),[m]),j=q.useMemo(()=>qc(m,-24),[m]),S=g,p=q.useMemo(()=>{const ee=[];for(let J=0;J<=24;J++)ee.push(qc(m,J));return ee},[m]),E=q.useMemo(()=>{const ee=[];return l.forEach(({projectId:J,config:ce})=>{const W={executor:ce.executorEnabled!==!1?ce.cronSchedule:null,reviewer:ce.reviewerEnabled?ce.reviewerSchedule:null,qa:ce.qa.enabled?ce.qa.schedule:null,audit:ce.audit.enabled?ce.audit.schedule:null,slicer:ce.roadmapScanner.enabled?ce.roadmapScanner.slicerSchedule:null},X=ce.cronScheduleOffset||0;Object.entries(W).forEach(([$,k])=>{if(k)try{const te=Y2.CronExpressionParser.parse(k,{currentDate:m,endDate:g,iterator:!0});for(;te.hasNext();){const V=te.next(),oe=new Date(V.getTime());oe.setMinutes(oe.getMinutes()+X),aN(oe,m)&&nN(oe,g)&&ee.push({projectId:J,jobType:$,time:oe})}}catch(te){console.error(`Failed to parse cron "${k}" for ${J}/${$}`,te)}})}),ee},[l,m,g]),M=q.useMemo(()=>{const ee=new Set;return l.length===0||(l.every(J=>J.config.executorEnabled===!1)&&ee.add("executor"),l.every(J=>!J.config.reviewerEnabled)&&ee.add("reviewer"),l.every(J=>!J.config.qa.enabled)&&ee.add("qa"),l.every(J=>!J.config.audit.enabled)&&ee.add("audit"),l.every(J=>!J.config.roadmapScanner.enabled)&&ee.add("slicer")),ee},[l]),_=q.useMemo(()=>{const ee=new Map;let J=0;return l.forEach(ce=>{ce.projectId===u||(ee.set(ce.projectId,J%Vc.length),J++)}),ee},[l,u]),A=ee=>zx(ee,m),T=q.useMemo(()=>{const ee=[];for(let J=0;J<=24;J++)ee.push(qc(j,J));return ee},[j]),C=ee=>{const J=K2([J2([ee,j]),S]);return zx(J,j)},O=q.useMemo(()=>{const ee=(x==null?void 0:x.recentRuns)??[],J=new Map;for(const ce of ee){const W=ce.providerKey||"default",X=new Date(ce.startedAt*1e3),$=ce.finishedAt?new Date(ce.finishedAt*1e3):new Date;$<j||X>S||(J.has(W)||J.set(W,[]),J.get(W).push({id:ce.id,jobType:ce.jobType,status:ce.status,projectPath:ce.projectPath,startedAt:X,finishedAt:$,throttledCount:ce.throttledCount}))}if(o!=null&&o.running){const ce=o.running.providerKey??"default";J.has(ce)||J.set(ce,[]),J.get(ce).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(J.entries()).sort(([ce],[W])=>ce.localeCompare(W)).map(([ce,W])=>({providerKey:ce,runs:W.sort((X,$)=>X.startedAt.getTime()-$.startedAt.getTime())}))},[S,j,x,o]),ae=ee=>ee.split(/[-_]/).map(J=>J.charAt(0).toUpperCase()+J.slice(1)).join(" "),I=l.length>1,ne=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:p.map((ee,J)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},J))});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."})]}),I&&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 J=_.get(ee.projectId)??0,ce=Vc[J],W=(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 ${ce.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:ee.projectId,children:W})]},ee.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+$n},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:$n},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:p.map((ee,J)=>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:J*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ts(ee,"HH:mm")})},J))})]}),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 J=M.has(ee.id),ce=E.filter(X=>X.jobType===ee.id);if(!I)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${J?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:$n},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:[ne,ce.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:J?"Disabled":"No runs in this window"})}):ce.map((X,$)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(X.projectId,X.jobType),style:{left:A(X.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 ${Ts(X.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:Ts(X.time,"HH:mm")})},$))]})]},ee.id);const W=l.length*Bc+Vx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${J?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:$n,height:W},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(X=>{const $=X.projectId===u,k=(X.projectId.split("/").pop()??X.projectId).slice(0,14),te=_.get(X.projectId)??0,V=$?ee.color.bg:Vc[te].bg;return s.jsxs("div",{style:{height:Bc},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${V}`}),s.jsx("span",{className:`text-[9px] truncate ${$?"text-slate-200 font-semibold":"text-slate-600"}`,title:X.projectId,children:$?`${k} ★`:k})]},X.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:W},children:[ne,l.map((X,$)=>{const k=X.projectId===u,te=ce.filter(se=>se.projectId===X.projectId),V=Vx+$*Bc,oe=k?sN:rN,ge=Math.floor((Bc-oe)/2),ye=_.get(X.projectId)??0,G=k?{bg:ee.color.bg,border:ee.color.border}:Vc[ye];return s.jsxs(Ke.Fragment,{children:[$>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:V}}),te.map((se,me)=>s.jsx("button",{type:"button",onClick:()=>d==null?void 0:d(X.projectId,se.jobType),style:{left:A(se.time)-3,top:V+ge,height:oe},className:`absolute w-6 rounded border ${G.bg} ${G.border} ${k?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${X.projectId} · ${ee.label} @ ${Ts(se.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:Ts(se.time,"HH:mm")})},me))]},X.projectId)}),ce.length===0&&!J&&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:$n+A(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"})]}),I&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project · blocks in same column = scheduling overlap"})})]}),O.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:[(x==null?void 0:x.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+$n},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:$n},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:T.map((ee,J)=>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:J*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Ts(ee,"HH:mm")})},J))})]}),s.jsx("div",{className:"relative",children:O.map(({providerKey:ee,runs:J})=>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:$n},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:ae(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:T.map((ce,W)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},W))}),J.map(ce=>{const W=Sf.find(ye=>ye.id===ce.jobType)??Sf[0],X=C(ce.startedAt),$=C(ce.finishedAt),k=Math.max($-X,8),te=ce.status==="running",V=ce.status==="error"||ce.status==="failed"||ce.status==="errored",oe=te?"bg-green-500":V?"bg-red-500":W.color.bg,ge=te?"border-green-400/60":V?"border-red-400/60":W.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${oe} ${ge} opacity-85 shadow-lg ${te?"animate-pulse":""}`,style:{left:X,width:k},title:`${ee} • ${W.label} • ${Ts(ce.startedAt,"MMM d HH:mm")} • ${ce.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:W.label}),s.jsx("span",{className:"text-white/70",children:ce.status}),ce.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",ce.throttledCount,"x"]})]})},`${ee}-${ce.id}-${ce.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:$n+C(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},ct=Ke.forwardRef(({className:l="",label:u,error:d,helperText:o,rightIcon:x,...m},g)=>{const j=Ke.useId(),S=m.id??j,p=d?`${S}-error`:void 0,E=!d&&o?`${S}-help`:void 0,M=[p,E].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:S,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:g,id:S,"aria-describedby":M,"aria-invalid":d?!0:m["aria-invalid"],className:`
|
|
361
|
+
w-full rounded-lg bg-slate-950 border border-slate-800
|
|
362
|
+
px-3 py-2 text-sm text-slate-200
|
|
363
|
+
placeholder:text-slate-600
|
|
364
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
365
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
366
|
+
transition-all duration-200
|
|
367
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
368
|
+
${x?"pr-10":""}
|
|
369
|
+
${l}
|
|
370
|
+
`,...m}),x&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:x})]}),d?s.jsx("p",{id:p,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:E,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});ct.displayName="Input";const pa=Ke.forwardRef(({className:l="",label:u,error:d,helperText:o,options:x,value:m,onChange:g,children:j,...S},p)=>{const E=Ke.useId(),M=S.id??E,_=d?`${M}-error`:void 0,A=!d&&o?`${M}-help`:void 0,T=[_,A].filter(Boolean).join(" ")||void 0,C=O=>{g&&g(O.target.value)};return s.jsxs("div",{className:"w-full",children:[u&&s.jsx("label",{htmlFor:M,className:"block text-sm font-medium text-slate-400 mb-1.5",children:u}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:p,id:M,"aria-describedby":T,"aria-invalid":d?!0:S["aria-invalid"],className:`
|
|
371
|
+
w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
|
|
372
|
+
px-3 py-2 pr-10 text-sm text-slate-200
|
|
373
|
+
focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
|
|
374
|
+
disabled:opacity-50 disabled:cursor-not-allowed
|
|
375
|
+
transition-all duration-200
|
|
376
|
+
${d?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
|
|
377
|
+
${l}
|
|
378
|
+
`,value:m,onChange:C,...S,children:x?x.map(O=>s.jsx("option",{value:O.value,children:O.label},O.value)):j}),s.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-slate-500",children:s.jsx(Rb,{className:"h-4 w-4"})})]}),d?s.jsx("p",{id:_,className:"mt-1.5 text-xs text-red-400",children:d}):o?s.jsx("p",{id:A,className:"mt-1.5 text-xs text-slate-500",children:o}):null]})});pa.displayName="Select";const ty=({tabs:l,activeTab:u,onChange:d,className:o=""})=>{var S,p;const[x,m]=Ke.useState((S=l[0])==null?void 0:S.id),g=u||x,j=E=>{d?d(E):m(E)};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(E=>s.jsx("button",{onClick:()=>j(E.id),className:`
|
|
379
|
+
whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
|
|
380
|
+
${g===E.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
|
|
381
|
+
`,children:E.label},E.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(p=l.find(E=>E.id===g))==null?void 0:p.content})]})},au=[{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"}],Qf=[{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 _r(l){return l.trim().replace(/\s+/g," ")}function Rr(l,u){return _r(l)===_r(u)}function iN(l){if(l)return Qf.find(u=>u.id===l)}function ay(l,u,d,o,x,m){return Rr(l.schedules.executor,u)&&Rr(l.schedules.reviewer,d)&&Rr(l.schedules.qa,o)&&Rr(l.schedules.audit,x)&&Rr(l.schedules.slicer,m)}function uN(l,u,d,o,x){return Qf.find(m=>ay(m,l,u,d,o,x))}function ny(l,u,d,o,x,m){const g=iN(l);return g&&ay(g,u,d,o,x,m)?g:uN(u,d,o,x,m)}function Nf(l){const u=_r(l),d=u.split(/\s+/);if(d.length!==5)return u;const[o,x,m,g,j]=d,S=/^\d+$/.test(o),p=au.find(E=>_r(E.value)===u);if(p)return p.label;if(o==="*/30"&&x==="*")return"Every 30 minutes";if(o==="0"&&x==="*")return"Every hour";if(o.startsWith("*/"))return`Every ${parseInt(o.replace("*/",""),10)} minutes`;if(S&&x.startsWith("*/")&&m==="*"&&g==="*"&&j==="*"){const E=parseInt(x.replace("*/",""),10);return o==="0"?`Every ${E} hours`:`Every ${E} hours at :${o.padStart(2,"0")}`}if(o==="0"&&x.startsWith("*/"))return`Every ${parseInt(x.replace("*/",""),10)} hours`;if(o==="0"&&x.includes("-")){const[E,M]=x.split("-");return`Every hour from ${Ii(E)} to ${Ii(M)}`}if(S&&x.includes("-")&&m==="*"&&g==="*"&&j==="*"){const[E,M]=x.split("-");return`Every hour from ${Ji(E,o)} to ${Ji(M,o)}`}if(o==="0"&&x.includes(",")){const E=x.split(",").map(Ii);return E.length<=3?`At ${E.join(" and ")}`:`At ${E.slice(0,-1).join(", ")}, and ${E[E.length-1]}`}if(S&&x.includes(",")&&m==="*"&&g==="*"&&(j==="*"||j==="1-5")){const E=x.split(",").map(_=>Ji(_,o)),M=j==="1-5"?"Weekdays at ":"At ";return E.length<=3?`${M}${E.join(" and ")}`:`${M}${E.slice(0,-1).join(", ")}, and ${E[E.length-1]}`}return o==="0"&&x!=="*"&&m==="*"&&g==="*"&&j==="*"?`Daily at ${Ii(x)}`:S&&x!=="*"&&m==="*"&&g==="*"&&j==="*"?`Daily at ${Ji(x,o)}`:o==="0"&&x!=="*"&&m==="*"&&g==="*"&&j==="1-5"?`Weekdays at ${Ii(x)}`:S&&x!=="*"&&m==="*"&&g==="*"&&j==="1-5"?`Weekdays at ${Ji(x,o)}`:u}function Ii(l){const u=parseInt(l,10);return u===0?"12 AM":u<12?`${u} AM`:u===12?"12 PM":`${u-12} PM`}function Ji(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 ly(l){const u=_r(l),d=au.find(o=>_r(o.value)===u);return(d==null?void 0:d.value)??"__custom__"}function cN(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4),x=Math.floor(o/60),m=Math.floor(x/24);return o<1?"less than a minute":o<60?`in ${o} minute${o>1?"s":""}`:x<24?`in ${x} hour${x>1?"s":""}`:`in ${m} day${m>1?"s":""}`}function oN(l){const u={weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0};return l.toLocaleDateString("en-US",u)}function dN(l){const u=new Date,d=l.getTime()-u.getTime(),o=Math.floor(d/6e4);return o>=0&&o<30}const fN=()=>{var In,Jn,Kn,sn,Pn,el,zs,Us,Ut;const{addToast:l,selectedProjectId:u,globalModeLoading:d}=ra(),o=Kc(),[x,m]=q.useState(!1),[g,j]=q.useState(!1),[S,p]=q.useState([]);q.useEffect(()=>{d||Sg().then(p).catch(console.error)},[u,d]);const E=(xe,qe)=>{xe===u||xe==="current"?o(`/settings?tab=schedules&mode=custom&jobType=${qe}`):l({title:"Project Switch Required",message:`To edit ${xe}, please switch to that project in the sidebar.`,type:"info"})},[M,_]=q.useState(null),[A,T]=q.useState({executorSchedule:"",reviewerSchedule:"",isEditing:!1}),[C,O]=q.useState(null),[ae,I]=q.useState(null),[ne,ee]=q.useState(!1),{data:J,loading:ce,error:W,refetch:X}=$a(Ng,[u],{enabled:!d}),{data:$,loading:k,refetch:te}=$a(Gf,[u],{enabled:!d});q.useEffect(()=>{const xe=setInterval(()=>{X()},3e4);return()=>clearInterval(xe)},[X]),q.useEffect(()=>{if(d)return;const xe=()=>{ox().then(O).catch(()=>{}),P1(24).then(I).catch(()=>{})};xe();const qe=setInterval(xe,3e4);return()=>clearInterval(qe)},[d,u]),q.useEffect(()=>{$&&!A.isEditing&&T({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!1})},[$,A.isEditing]);const V=()=>{te(),X()},oe=(xe,qe)=>xe instanceof Error?xe.message:qe,ge=async()=>{if(J){m(!0);try{J.paused?(await Pi(),l({title:"Schedule Resumed",message:"Cron schedules have been reactivated.",type:"success"})):(await Q1(),l({title:"Schedule Paused",message:"Cron schedules have been deactivated.",type:"info"})),V()}catch(xe){l({title:"Action Failed",message:oe(xe,"Failed to toggle schedule state"),type:"error"})}finally{m(!1)}}},ye=()=>{$&&T({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!0})},G=()=>{$&&T({executorSchedule:$.cronSchedule,reviewerSchedule:$.reviewerSchedule,isEditing:!1})},se=async()=>{if($){j(!0);try{await Os({cronSchedule:A.executorSchedule,reviewerSchedule:A.reviewerSchedule});let xe="";try{await Pi()}catch(qe){xe=oe(qe,"Failed to reinstall cron schedules")}T(qe=>({...qe,isEditing:!1})),V(),l(xe?{title:"Schedules Saved (Cron Reinstall Failed)",message:xe,type:"warning"}:{title:"Schedule Updated",message:"Cron schedules have been saved and installed.",type:"success"})}catch(xe){l({title:"Save Failed",message:oe(xe,"Failed to save schedules"),type:"error"})}finally{j(!1)}}},me=async()=>{ee(!0);try{const xe=await e2(!0);O(null),ox().then(O).catch(()=>{}),l({title:"Queue Cleared",message:`Removed ${xe.cleared} stale job${xe.cleared!==1?"s":""} from the queue.`,type:"success"})}catch(xe){l({title:"Clear Failed",message:xe instanceof Error?xe.message:"Failed to clear queue",type:"error"})}finally{ee(!1)}},Se=async(xe,qe)=>{if($){_(xe);try{xe==="executor"?await Os({executorEnabled:qe}):xe==="reviewer"?await Os({reviewerEnabled:qe}):xe==="qa"?await Os({qa:{...$.qa,enabled:qe}}):xe==="audit"?await Os({audit:{...$.audit,enabled:qe}}):await Os({roadmapScanner:{...$.roadmapScanner,enabled:qe}});let Ht="";try{await Pi()}catch(rn){Ht=oe(rn,"Failed to reinstall cron schedules")}V(),l(Ht?{title:"Job Saved (Cron Reinstall Failed)",message:Ht,type:"warning"}:{title:"Job Updated",message:`${xe[0].toUpperCase()+xe.slice(1)} ${qe?"enabled":"disabled"}.`,type:"success"})}catch(Ht){l({title:"Update Failed",message:oe(Ht,"Failed to update job configuration"),type:"error"})}finally{_(null)}}},Re=xe=>{if(!xe)return s.jsx("span",{className:"text-slate-500",children:"Not scheduled"});const qe=new Date(xe),Ht=dN(qe);return s.jsxs("div",{className:"flex items-center space-x-2",children:[Ht&&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:cN(qe)}),s.jsxs("span",{className:"text-slate-500 ml-2",children:["(",oN(qe),")"]})]})]})},b=(xe,qe,Ht,rn)=>{const Hs=ly(qe),Yl=Hs==="__custom__";return s.jsxs("div",{className:`space-y-3 ${rn?"opacity-50 pointer-events-none":""}`,children:[s.jsx("div",{className:"flex items-center space-x-3",children:s.jsx(pa,{label:`${xe} Preset`,options:au,value:Hs,onChange:Ye=>{Ye!=="__custom__"&&Ht(Ye)},className:"flex-1"})}),Yl&&s.jsx(ct,{label:"Custom Cron Expression",value:qe,onChange:Ye=>Ht(Ye.target.value),placeholder:"* * * * *",helperText:"Format: minute hour day month weekday (e.g., 0 */2 * * * for every 2 hours)"}),s.jsxs("div",{className:"text-sm text-slate-400",children:["Human-readable: ",s.jsx("span",{className:"text-slate-200",children:Nf(qe)})]})]})},Y=xe=>{if(!xe||xe.delayMinutes<=0)return s.jsx("div",{className:"text-xs text-slate-500 mt-2",children:"Starts directly at the scheduled time."});const qe=[];return xe.balancedDelayMinutes>0&&qe.push(`auto +${xe.balancedDelayMinutes}m`),xe.manualDelayMinutes>0&&qe.push(`manual +${xe.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:[" ",qe.join(" • ")]})]})};if(ce||k)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(W||!J||!$)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{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:(W==null?void 0:W.message)||"Unknown error"}),s.jsx(Be,{onClick:()=>{X(),te()},children:"Retry"})]});const ie=J.paused,he=ie?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-green-500/10 text-green-400 border-green-500/20",je=ie?"Paused":"Active",fe=ny($.scheduleBundleId,$.cronSchedule,$.reviewerSchedule,$.qa.schedule,$.audit.schedule,$.roadmapScanner.slicerSchedule||"35 */12 * * *"),ve=(xe,qe,Ht)=>!fe||!Rr(fe.schedules[xe],qe)?Nf(Ht):`${fe.label} • ${fe.hints[xe]}`,ke=C!=null&&C.running?1:0,_e=(C==null?void 0:C.pending.total)??0,ot=(ae==null?void 0:ae.averageWaitSeconds)??null,Jt=ae?ae.recentRuns.filter(xe=>xe.throttledCount>0).length:null,Bl=xe=>xe===null?"—":xe<60?`${Math.round(xe)}s`:`${Math.floor(xe/60)}m ${Math.round(xe%60)}s`,Xn=s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4","data-testid":"queue-overview-cards",children:[s.jsx(Le,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Bf,{className:"h-5 w-5 text-green-400 shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Running"}),s.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-running",children:C?ke:"—"}),(C==null?void 0:C.running)&&s.jsxs("div",{className:"text-[11px] text-slate-400 truncate mt-0.5",children:[C.running.jobType," · ",C.running.projectName]})]}),(ke>0||_e>0)&&s.jsx(Be,{size:"sm",variant:"ghost",className:"text-red-400 hover:text-red-300 shrink-0",onClick:me,loading:ne,title:"Force clear all stale running and pending queue entries",children:"Clear"})]})}),s.jsx(Le,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(u1,{className:"h-5 w-5 text-indigo-400 shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Pending"}),s.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-pending",children:C?_e:"—"})]})]})}),s.jsx(Le,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(e1,{className:"h-5 w-5 text-amber-400 shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Avg Wait"}),s.jsx("div",{className:"text-2xl font-bold text-slate-100","data-testid":"overview-avg-wait",children:Bl(ot)})]})]})}),s.jsx(Le,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(z1,{className:"h-5 w-5 text-yellow-400 shrink-0"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 uppercase tracking-wide",children:"Throttled"}),s.jsx("div",{className:`text-2xl font-bold ${Jt&&Jt>0?"text-yellow-300":"text-slate-100"}`,"data-testid":"overview-throttled",children:Jt!==null?Jt:"—"}),s.jsx("div",{className:"text-[11px] text-slate-500 mt-0.5",children:"in last 24h"})]})]})})]}),s.jsx(ey,{configs:S,currentProjectId:u,onEditJob:E,queueStatus:C,queueAnalytics:ae}),ae&&s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-300 uppercase tracking-wide mb-4",children:"Provider Buckets"}),s.jsx(C2,{analytics:ae})]})]}),Ga=s.jsxs("div",{className:"space-y-6",children:[s.jsx(Le,{className:`p-6 border-2 ${he}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(Wc,{className:"h-8 w-8"}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400",children:"Cron Status"}),s.jsx("div",{className:"text-2xl font-bold",children:je}),s.jsx("div",{className:"text-sm text-slate-500 mt-1",children:"Automatic balancing spreads registered projects before queueing overlaps."})]})]}),s.jsx(Be,{variant:ie?"primary":"outline",size:"lg",onClick:ge,loading:x,children:ie?s.jsxs(s.Fragment,{children:[s.jsx(vn,{className:"h-5 w-5 mr-2"}),"Resume"]}):s.jsxs(s.Fragment,{children:[s.jsx(hg,{className:"h-5 w-5 mr-2"}),"Pause"]})})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(Le,{className:`p-6 ${$.executorEnabled===!1?"opacity-50":""}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Executor"}),$.executorEnabled===!1?s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"}):!A.isEditing&&s.jsxs(Be,{variant:"ghost",size:"sm",onClick:ye,children:[s.jsx(j1,{className:"h-4 w-4 mr-1"}),"Edit"]})]}),A.isEditing?b("Executor",A.executorSchedule,xe=>T(qe=>({...qe,executorSchedule:xe})),$.executorEnabled===!1):s.jsx("div",{className:"space-y-4",children:$.executorEnabled!==!1?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:ve("executor",$.cronSchedule,J.executor.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:J.executor.schedule}),Y(J.executor)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),Re(J.executor.nextRun)]}),s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${J.executor.installed?"text-green-400":"text-amber-400"}`,children:[s.jsx(Gc,{className:"h-4 w-4"}),s.jsx("span",{children:J.executor.installed?"Installed":"Not installed"})]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Executor is disabled in settings."})})]}),s.jsxs(Le,{className:`p-6 ${$.reviewerEnabled?"":"opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Reviewer"}),!$.reviewerEnabled&&s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),A.isEditing?b("Reviewer",A.reviewerSchedule,xe=>T(qe=>({...qe,reviewerSchedule:xe})),!$.reviewerEnabled):s.jsx("div",{className:"space-y-4",children:$.reviewerEnabled?s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:ve("reviewer",$.reviewerSchedule,J.reviewer.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:J.reviewer.schedule}),Y(J.reviewer)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),Re(J.reviewer.nextRun)]}),s.jsxs("div",{className:`flex items-center space-x-2 text-sm ${J.reviewer.installed?"text-green-400":"text-amber-400"}`,children:[s.jsx(Gc,{className:"h-4 w-4"}),s.jsx("span",{children:J.reviewer.installed?"Installed":"Not installed"})]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Automated reviews are disabled. Enable them in Settings to configure the reviewer schedule."})})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs(Le,{className:`p-6 ${$.qa.enabled?"":"opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[s.jsx(gg,{className:"h-4 w-4"}),"QA"]}),!$.qa.enabled&&s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),$.qa.enabled?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:ve("qa",$.qa.schedule,((In=J.qa)==null?void 0:In.schedule)??$.qa.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((Jn=J.qa)==null?void 0:Jn.schedule)??$.qa.schedule}),Y(J.qa)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),Re((Kn=J.qa)==null?void 0:Kn.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"QA is disabled in settings."})]}),s.jsxs(Le,{className:`p-6 ${$.audit.enabled?"":"opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[s.jsx(iu,{className:"h-4 w-4"}),"Auditor"]}),!$.audit.enabled&&s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),$.audit.enabled?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:ve("audit",$.audit.schedule,((sn=J.audit)==null?void 0:sn.schedule)??$.audit.schedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((Pn=J.audit)==null?void 0:Pn.schedule)??$.audit.schedule}),Y(J.audit)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),Re((el=J.audit)==null?void 0:el.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Audit is disabled in settings."})]}),s.jsxs(Le,{className:`p-6 ${$.roadmapScanner.enabled?"":"opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("h3",{className:"text-lg font-semibold text-slate-200 flex items-center gap-2",children:[s.jsx(cg,{className:"h-4 w-4"}),"Planner"]}),!$.roadmapScanner.enabled&&s.jsx("span",{className:"text-xs text-slate-500 bg-slate-800 px-2 py-1 rounded",children:"Disabled"})]}),$.roadmapScanner.enabled?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Schedule"}),s.jsx("div",{className:"text-lg text-slate-200 font-medium",children:ve("slicer",$.roadmapScanner.slicerSchedule,((zs=J.planner)==null?void 0:zs.schedule)??$.roadmapScanner.slicerSchedule)}),s.jsx("div",{className:"text-xs text-slate-500 font-mono mt-1",children:((Us=J.planner)==null?void 0:Us.schedule)??$.roadmapScanner.slicerSchedule}),Y(J.planner)]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-slate-400 mb-1",children:"Next Run"}),Re((Ut=J.planner)==null?void 0:Ut.nextRun)]})]}):s.jsx("div",{className:"text-slate-500 text-sm",children:"Planner uses roadmap scanner scheduling."})]})]}),s.jsxs(Le,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-4",children:[s.jsx(Qc,{className:"h-5 w-5 text-slate-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Active Crontab Entries"})]}),J.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:J.entries.map((xe,qe)=>s.jsx("div",{className:"bg-slate-950/50 rounded-lg p-3 font-mono text-sm text-slate-300 border border-slate-800",children:xe},qe))})]}),A.isEditing&&s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-4 border-t border-slate-800",children:[s.jsx(Be,{variant:"ghost",onClick:G,children:"Cancel"}),s.jsxs(Be,{onClick:se,loading:g,children:[s.jsx(Gc,{className:"h-4 w-4 mr-2"}),"Save & Install"]})]})]}),Za=s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:"Job Enablement"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[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("div",{className:"text-sm font-medium text-slate-200",children:"Executor"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Creates implementation PRs from PRDs"})]}),s.jsx(Bt,{checked:$.executorEnabled!==!1,disabled:M!==null,"aria-label":"Toggle executor automation",onChange:xe=>Se("executor",xe)})]}),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("div",{className:"text-sm font-medium text-slate-200",children:"Reviewer"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Reviews PRs and manages merge readiness"})]}),s.jsx(Bt,{checked:$.reviewerEnabled,disabled:M!==null,"aria-label":"Toggle reviewer automation",onChange:xe=>Se("reviewer",xe)})]}),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("div",{className:"text-sm font-medium text-slate-200",children:"QA"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Generates and runs quality checks on PRs"})]}),s.jsx(Bt,{checked:$.qa.enabled,disabled:M!==null,"aria-label":"Toggle QA automation",onChange:xe=>Se("qa",xe)})]}),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("div",{className:"text-sm font-medium text-slate-200",children:"Auditor"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Runs automated audit reports"})]}),s.jsx(Bt,{checked:$.audit.enabled,disabled:M!==null,"aria-label":"Toggle audit automation",onChange:xe=>Se("audit",xe)})]}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 md:col-span-2",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:"Planner"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Creates PRDs from audit findings and pending roadmap items"})]}),s.jsx(Bt,{checked:$.roadmapScanner.enabled,disabled:M!==null,"aria-label":"Toggle planner automation",onChange:xe=>Se("planner",xe)})]})]})]});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"}),fe&&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:fe.label}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Priority ",J.schedulingPriority,"/5 across registered projects"]})]})]}),s.jsx(ty,{tabs:[{id:"overview",label:"Overview",content:Xn},{id:"schedules",label:"Schedules",content:Ga},{id:"jobs",label:"Jobs",content:Za}]})]})},Cs=({label:l,value:u,onChange:d,helperText:o,placeholder:x="5 */3 * * *"})=>{const m=ly(u),g=m==="__custom__",j=E=>{E!=="__custom__"&&d(E)},S=E=>{d(E.target.value)},p=au.find(E=>E.value===m);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(pa,{label:l,value:m,onChange:j,options:au.map(E=>({label:E.label,value:E.value})),helperText:g?void 0:(p==null?void 0:p.description)||o}),g&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(ct,{label:"Cron Expression",value:u,onChange:S,placeholder:x}),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)"]})]})]})},wf=l=>{var u,d,o,x,m,g,j;return{provider:l.provider,providerLabel:l.providerLabel??"",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,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:((x=l.roadmapScanner)==null?void 0:x.slicerSchedule)??"35 */12 * * *",slicerMaxRuntime:((m=l.roadmapScanner)==null?void 0:m.slicerMaxRuntime)??600,priorityMode:((g=l.roadmapScanner)==null?void 0:g.priorityMode)??"roadmap-first",issueColumn:((j=l.roadmapScanner)==null?void 0:j.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,claudeModel: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}}}},Bx=l=>{const u=ny(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:""}},hN=l=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(d=>l.toUpperCase().includes(d)),mN=({value:l,isSensitive:u})=>{const[d,o]=Ke.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(Fb,{className:"h-4 w-4"}):s.jsx(Wb,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:l})},xN=({envVars:l,onChange:u})=>{const[d,o]=Ke.useState(""),[x,m]=Ke.useState(""),[g,j]=Ke.useState(null),[S,p]=Ke.useState(""),E=()=>{if(d.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(d)){alert("Key must be uppercase with underscores (e.g., API_KEY)");return}u({...l,[d]:x}),o(""),m("")}},M=O=>{const ae={...l};delete ae[O],u(ae)},_=O=>{j(O),p(l[O])},A=()=>{g&&(u({...l,[g]:S}),j(null),p(""))},T=()=>{j(null),p("")},C=Object.entries(l);return s.jsxs("div",{className:"space-y-4",children:[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:C.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No provider environment variables configured."}):C.map(([O,ae])=>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:O}),g===O?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:S,onChange:I=>p(I.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 ${O} value`,title:`Save ${O} value`,children:s.jsx(Gc,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:T,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${O}`,title:`Cancel editing ${O}`,children:s.jsx(uu,{className:"h-4 w-4"})})]}):s.jsx(mN,{value:ae,isSensitive:hN(O)})]}),g!==O&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>_(O),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${O}`,title:`Edit ${O}`,children:s.jsx(mg,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(O),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${O}`,title:`Delete ${O}`,children:s.jsx(yg,{className:"h-4 w-4"})})]})]},O))}),s.jsxs("div",{className:"flex items-end gap-3 pt-4 border-t border-slate-800",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:d,onChange:O=>o(O.target.value.toUpperCase()),placeholder:"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:x,onChange:O=>m(O.target.value),placeholder:"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Be,{onClick:E,disabled:!d.trim(),children:[s.jsx(ru,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})},gN=({notifications:l,onChange:u})=>{const[d,o]=Ke.useState(null),[x,m]=Ke.useState(!1),[g,j]=Ke.useState({type:"slack",url:"",events:[]}),S=[{label:"Run Started",value:"run_started"},{label:"Run Succeeded",value:"run_succeeded"},{label:"Run Failed",value:"run_failed"},{label:"Run Timeout",value:"run_timeout"},{label:"Review Completed",value:"review_completed"},{label:"PR Auto-Merged",value:"pr_auto_merged"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],p=()=>{u({webhooks:[...l.webhooks,g]}),j({type:"slack",url:"",events:[]}),m(!1)},E=(T,C)=>{const O=[...l.webhooks];O[T]=C,u({webhooks:O})},M=T=>{u({webhooks:l.webhooks.filter((C,O)=>O!==T)})},_=(T,C)=>T.includes(C)?T.filter(O=>O!==C):[...T,C],A=({webhook:T,onChange:C,onSave:O,onCancel:ae,isNew:I})=>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(pa,{label:"Type",value:T.type,onChange:ne=>{const ee=ne;C(ee==="telegram"?{type:ee,botToken:"",chatId:"",events:T.events}:{type:ee,url:"",events:T.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),T.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(ct,{label:"Bot Token",type:"password",value:T.botToken||"",onChange:ne=>C({...T,botToken:ne.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(ct,{label:"Chat ID",value:T.chatId||"",onChange:ne=>C({...T,chatId:ne.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(ct,{label:"Webhook URL",type:"password",value:T.url||"",onChange:ne=>C({...T,url:ne.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:S.map(ne=>s.jsx("button",{type:"button",onClick:()=>C({...T,events:_(T.events,ne.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${T.events.includes(ne.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:ne.label},ne.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Be,{variant:"ghost",onClick:ae,children:"Cancel"}),s.jsx(Be,{onClick:O,disabled:T.events.length===0||(T.type==="telegram"?!T.botToken||!T.chatId:!T.url),children:I?"Add Webhook":"Save Changes"})]})]});return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Receive notifications when events occur via Slack, Discord, or Telegram"}),s.jsx("div",{className:"space-y-3",children:l.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):l.webhooks.map((T,C)=>s.jsx("div",{children:d===C?s.jsx(A,{webhook:T,onChange:O=>E(C,O),onSave:()=>o(null),onCancel:()=>o(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:T.type}),T.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",T.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:T.events.map(O=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:O.replace("_"," ")},O))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>o(C),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${T.type} webhook`,title:`Edit ${T.type} webhook`,children:s.jsx(mg,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>M(C),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${T.type} webhook`,title:`Delete ${T.type} webhook`,children:s.jsx(yg,{className:"h-4 w-4"})})]})]})},C))}),x?s.jsx(A,{webhook:g,onChange:j,onSave:p,onCancel:()=>m(!1),isNew:!0}):s.jsxs(Be,{variant:"ghost",onClick:()=>m(!0),children:[s.jsx(ru,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},jf=({label:l,value:u,onChange:d,placeholder:o,helpText:x})=>{const[m,g]=Ke.useState(""),j=()=>{m.trim()&&!u.includes(m.trim())&&(d([...u,m.trim()]),g(""))},S=E=>{d(u.filter(M=>M!==E))},p=E=>{E.key==="Enter"&&(E.preventDefault(),j())};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(E=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[E,s.jsx("button",{type:"button",onClick:()=>S(E),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${E}`,title:`Remove ${E}`,children:s.jsx(uu,{className:"h-3 w-3"})})]},E))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:m,onChange:E=>g(E.target.value),onKeyDown:p,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(Be,{onClick:j,disabled:!m.trim(),"aria-label":`Add ${l.toLowerCase()} value`,children:s.jsx(ru,{className:"h-4 w-4"})})]}),x&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:x})]})},yN=()=>{var Re;const{addToast:l,projectName:u,selectedProjectId:d,globalModeLoading:o}=ra(),[x,m]=Ke.useState(!1),[g,j]=Ke.useState(null),S=Ke.useRef(!1),[p,E]=Ke.useState("template"),[M,_]=Ke.useState("always-on"),[A,T]=Ke.useState("general"),C=Wn(),{data:O,loading:ae,error:I,refetch:ne}=$a(Gf,[d],{enabled:!o}),{data:ee,loading:J,refetch:ce}=$a(B1,[d],{enabled:!o}),W=ee??[];Ke.useEffect(()=>{const b=new URLSearchParams(C.search),Y=b.get("tab"),ie=b.get("mode");Y&&T(Y),ie==="custom"?E("custom"):ie==="template"&&E("template");const he=b.get("jobType");he&&Y==="schedules"&&setTimeout(()=>{te("current",he)},300)},[C.search,O]);const X=Ke.useCallback(b=>{const Y=Bx(b);E(Y.mode),_(Y.selectedTemplateId)},[]);Ke.useEffect(()=>{if(O)if(S.current)S.current=!1;else{const b=wf(O);j(b),X(b)}},[O,X]);const[$,k]=Ke.useState([]);Ke.useEffect(()=>{Sg().then(k).catch(console.error)},[O]);const te=(b,Y)=>{b===u||b==="current"?(p!=="custom"&&ge(),setTimeout(()=>{const ie={executor:"job-schedule-executor",reviewer:"job-schedule-reviewer",qa:"job-schedule-qa",audit:"job-schedule-audit",slicer:"job-schedule-slicer"},he=document.getElementById(ie[Y]||"");he&&(he.scrollIntoView({behavior:"smooth",block:"center"}),he.classList.add("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900","rounded-lg"),setTimeout(()=>he.classList.remove("ring-2","ring-indigo-500","ring-offset-2","ring-offset-slate-900"),2e3))},50)):l({title:"Project Switch Required",message:`To edit ${b}, please switch to that project in the sidebar.`,type:"info"})},V=(b,Y)=>{j(ie=>ie&&{...ie,[b]:Y})},oe=()=>{if(E("template"),!g)return;const b=Bx(g);b.mode==="template"&&(_(b.selectedTemplateId),V("scheduleBundleId",b.selectedTemplateId))},ge=()=>{E("custom"),V("scheduleBundleId",null),_("")},ye=b=>{_(b.id),j(Y=>Y&&{...Y,cronSchedule:b.schedules.executor,reviewerSchedule:b.schedules.reviewer,scheduleBundleId:b.id,qa:{...Y.qa,schedule:b.schedules.qa},audit:{...Y.audit,schedule:b.schedules.audit},roadmapScanner:{...Y.roadmapScanner,slicerSchedule:b.schedules.slicer},fallbackOnRateLimit:!0})},G=async()=>{var ie,he,je,fe,ve;if(!g)return;const b=g.cronSchedule!==(O==null?void 0:O.cronSchedule)||g.reviewerSchedule!==(O==null?void 0:O.reviewerSchedule)||g.cronScheduleOffset!==((O==null?void 0:O.cronScheduleOffset)??0)||g.schedulingPriority!==((O==null?void 0:O.schedulingPriority)??3)||g.executorEnabled!==((O==null?void 0:O.executorEnabled)??!0)||g.reviewerEnabled!==((O==null?void 0:O.reviewerEnabled)??!0)||g.queue.enabled!==(((ie=O==null?void 0:O.queue)==null?void 0:ie.enabled)??!0)||g.qa.enabled!==((O==null?void 0:O.qa.enabled)??!0)||g.qa.schedule!==(O==null?void 0:O.qa.schedule)||g.audit.enabled!==((O==null?void 0:O.audit.enabled)??!0)||g.audit.schedule!==(O==null?void 0:O.audit.schedule)||g.analytics.enabled!==(((he=O==null?void 0:O.analytics)==null?void 0:he.enabled)??!1)||g.analytics.schedule!==(((je=O==null?void 0:O.analytics)==null?void 0:je.schedule)??"0 6 * * 1")||g.roadmapScanner.enabled!==(((fe=O==null?void 0:O.roadmapScanner)==null?void 0:fe.enabled)??!0)||(g.roadmapScanner.slicerSchedule||"35 */12 * * *")!==(((ve=O==null?void 0:O.roadmapScanner)==null?void 0:ve.slicerSchedule)||"35 */12 * * *"),Y={};for(const[ke,_e]of Object.entries(g.jobProviders))_e!=null&&_e!==""&&(Y[ke]=_e);m(!0);try{const ke=await Os({provider:g.provider,providerLabel:g.providerLabel.trim(),defaultBranch:g.defaultBranch,prdDir:g.prdDir,branchPrefix:g.branchPrefix,branchPatterns:g.branchPatterns,executorEnabled:g.executorEnabled,reviewerEnabled:g.reviewerEnabled,minReviewScore:g.minReviewScore,maxRuntime:g.maxRuntime,reviewerMaxRuntime:g.reviewerMaxRuntime,maxLogSize:g.maxLogSize,cronSchedule:g.cronSchedule,reviewerSchedule:g.reviewerSchedule,scheduleBundleId:p==="template"?g.scheduleBundleId:null,cronScheduleOffset:g.cronScheduleOffset,schedulingPriority:g.schedulingPriority,maxRetries:g.maxRetries,reviewerMaxRetries:g.reviewerMaxRetries,reviewerRetryDelay:g.reviewerRetryDelay,providerEnv:g.providerEnv,notifications:g.notifications,prdPriority:g.prdPriority,roadmapScanner:g.roadmapScanner,templatesDir:g.templatesDir,boardProvider:g.boardProvider,jobProviders:Y,autoMerge:g.autoMerge,autoMergeMethod:g.autoMergeMethod,fallbackOnRateLimit:g.fallbackOnRateLimit,claudeModel:g.claudeModel,qa:g.qa,audit:g.audit,analytics:g.analytics,queue:g.queue}),_e=wf(ke);j(_e),X(_e);let ot="";if(b)try{await Pi()}catch(Jt){ot=Jt instanceof Error?Jt.message:"failed to reinstall cron schedules"}l(ot?{title:"Settings Saved (Cron Reinstall Failed)",message:ot,type:"warning"}:{title:"Settings Saved",message:b?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),S.current=!0,ne(),ce()}catch(ke){l({title:"Save Failed",message:ke instanceof Error?ke.message:"Failed to save configuration",type:"error"})}finally{m(!1)}},se=()=>{if(O){const b=wf(O);j(b),X(b),l({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"})}},me=async b=>{try{const Y=await Mg(b);V("roadmapScanner",Y.roadmapScanner);let ie="";try{await Pi()}catch(he){ie=he instanceof Error?he.message:"Failed to reinstall cron schedules"}l(ie?{title:"Planner Saved (Cron Reinstall Failed)",message:ie,type:"warning"}:{title:b?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${b?"enabled":"disabled"}.`,type:"success"})}catch(Y){l({title:"Toggle Failed",message:Y instanceof Error?Y.message:"Failed to toggle roadmap scanner",type:"error"})}};if(ae||!g)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(I)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(Qn,{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:I.message}),s.jsx(Be,{onClick:()=>ne(),children:"Retry"})]});const Se=[{id:"general",label:"General",content:s.jsx(Le,{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(ct,{label:"Project Name",value:u,disabled:!0}),s.jsx(ct,{label:"Default Branch",value:g.defaultBranch,onChange:b=>V("defaultBranch",b.target.value)}),s.jsx(ct,{label:"PRD Directory",value:g.prdDir,onChange:b=>V("prdDir",b.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(ct,{label:"Branch Prefix",value:g.branchPrefix,onChange:b=>V("branchPrefix",b.target.value)}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Bt,{label:"Enable PRD Executor",checked:g.executorEnabled,onChange:b=>V("executorEnabled",b)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Bt,{label:"Enable Automated Reviews",checked:g.reviewerEnabled,onChange:b=>V("reviewerEnabled",b)})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Bt,{label:"Auto-merge approved PRs",checked:g.autoMerge,onChange:b=>V("autoMerge",b)})}),g.autoMerge&&s.jsx(pa,{label:"Merge Method",value:g.autoMergeMethod,onChange:b=>V("autoMergeMethod",b),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:g.branchPatterns,onChange:b=>V("branchPatterns",b),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"})})]})})},{id:"providers",label:"Providers",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Le,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Global Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default AI provider used for all jobs unless overridden below"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(pa,{label:"Provider",value:g.provider,onChange:b=>V("provider",b),options:[{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]}),s.jsx(ct,{label:"Provider Label",value:g.providerLabel,onChange:b=>V("providerLabel",b.target.value),placeholder:"e.g. GLM-5 (auto-derived if blank)",helperText:"Human-friendly name shown in PR comments, review footers, and commit attribution"}),s.jsx(pa,{label:"Claude Model",value:g.claudeModel,onChange:b=>V("claudeModel",b),options:[{label:"Sonnet (claude-sonnet-4-6)",value:"sonnet"},{label:"Opus (claude-opus-4-6)",value:"opus"}],helperText:"Model used for native Claude execution (when no proxy is set or after fallback)"}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(Bt,{label:"Fallback on Rate Limit",checked:g.fallbackOnRateLimit,onChange:b=>V("fallbackOnRateLimit",b)}),s.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"When enabled, automatically fall back to native Claude API after rate-limit on proxy provider"})]})]})]}),s.jsxs(Le,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Per-Job Provider Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:'Override the AI provider for specific job types. Leave as "Use Global" to use the default provider.'})]}),s.jsx("div",{className:"space-y-4",children:[{key:"executor",label:"Executor"},{key:"reviewer",label:"Reviewer"},{key:"qa",label:"QA"},{key:"audit",label:"Audit"},{key:"slicer",label:"Planner"}].map(({key:b,label:Y})=>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:Y}),s.jsx("div",{className:"w-64",children:s.jsx(pa,{value:g.jobProviders[b]??"",onChange:ie=>{const he={...g.jobProviders};ie===""?delete he[b]:he[b]=ie,V("jobProviders",he)},options:[{label:"Use Global (default)",value:""},{label:"Anthropic (Claude)",value:"claude"},{label:"OpenAI (Codex)",value:"codex"}]})})]},b))})]}),s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Provider Environment Variables"}),s.jsx(xN,{envVars:g.providerEnv,onChange:b=>V("providerEnv",b)})]})]})},{id:"runtime",label:"Runtime",content:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(Le,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Min Review Score (0-100)"}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("input",{type:"range",min:"0",max:"100",value:g.minReviewScore,onChange:b=>V("minReviewScore",Number(b.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:g.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(ct,{label:"Max Runtime (Executor)",type:"number",value:String(g.maxRuntime),onChange:b=>V("maxRuntime",Number(b.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ct,{label:"Max Runtime (Reviewer)",type:"number",value:String(g.reviewerMaxRuntime),onChange:b=>V("reviewerMaxRuntime",Number(b.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ct,{label:"Max Log Size",type:"number",value:String(g.maxLogSize),onChange:b=>V("maxLogSize",Number(b.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"})})]})]}),s.jsxs(Le,{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(ct,{label:"Max Retry Attempts",type:"number",min:"0",max:"10",value:String(g.reviewerMaxRetries),onChange:b=>{const Y=Math.min(10,Math.max(0,Number(b.target.value||0)));V("reviewerMaxRetries",Y)},helperText:"Additional fix attempts after initial review. 0 = no retries."}),s.jsx(ct,{label:"Retry Delay (seconds)",type:"number",min:"0",max:"300",value:String(g.reviewerRetryDelay),onChange:b=>{const Y=Math.min(300,Math.max(0,Number(b.target.value||0)));V("reviewerRetryDelay",Y)},helperText:"Wait time between retry attempts to let CI settle."})]})]})]})},{id:"schedules",label:"Schedules",content:s.jsxs(Le,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-1",children:"Job Schedules"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Configure when automated jobs run using a preset template or custom cron expressions"})]}),s.jsxs("div",{className:"flex rounded-lg border border-slate-700 overflow-hidden shrink-0",children:[s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${p==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:oe,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${p==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:ge,children:"Custom"})]})]}),s.jsx(ey,{configs:$,currentProjectId:d,onEditJob:te}),p==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Qf.map(b=>{const Y=M===b.id;return s.jsxs("button",{type:"button",onClick:()=>ye(b),className:`text-left p-4 rounded-lg border transition-colors ${Y?"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:b.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:b.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",b.hints.executor],["Reviewer",b.hints.reviewer],["QA",b.hints.qa],["Audit",b.hints.audit],["Slicer",b.hints.slicer]].map(([ie,he])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:ie}),s.jsx("span",{className:"text-xs text-slate-400",children:he})]},ie))})]},b.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx("div",{id:"job-schedule-executor",children:s.jsx(Cs,{label:"PRD Execution Schedule",value:g.cronSchedule,onChange:b=>V("cronSchedule",b)})}),s.jsx("div",{id:"job-schedule-reviewer",children:s.jsx(Cs,{label:"PR Review Schedule",value:g.reviewerSchedule,onChange:b=>V("reviewerSchedule",b)})}),s.jsx("div",{id:"job-schedule-qa",children:s.jsx(Cs,{label:"QA Schedule",value:g.qa.schedule,onChange:b=>V("qa",{...g.qa,schedule:b})})}),s.jsx("div",{id:"job-schedule-audit",children:s.jsx(Cs,{label:"Audit Schedule",value:g.audit.schedule,onChange:b=>V("audit",{...g.audit,schedule:b})})}),g.roadmapScanner.enabled&&s.jsx("div",{id:"job-schedule-slicer",children:s.jsx(Cs,{label:"Planner Schedule",value:g.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:b=>V("roadmapScanner",{...g.roadmapScanner,slicerSchedule:b})})}),g.analytics.enabled&&s.jsx("div",{id:"job-schedule-analytics",children:s.jsx(Cs,{label:"Analytics Schedule",value:g.analytics.schedule,onChange:b=>V("analytics",{...g.analytics,schedule:b})})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsx(pa,{label:"Scheduling Priority",value:String(g.schedulingPriority),onChange:b=>V("schedulingPriority",Number(b)),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(Bt,{checked:g.queue.enabled,onChange:b=>V("queue",{...g.queue,enabled:b})})]})}),s.jsx(ct,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(g.cronScheduleOffset),onChange:b=>{const Y=Math.min(59,Math.max(0,Number(b.target.value||0)));V("cronScheduleOffset",Y)},helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]})]})},{id:"notifications",label:"Notifications",content:s.jsxs(Le,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx(gN,{notifications:g.notifications,onChange:b=>V("notifications",b)})]})},{id:"roadmap",label:"Planner",content:s.jsxs(Le,{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(Bt,{checked:g.roadmapScanner.enabled,"aria-label":"Enable planner",onChange:me})]}),g.roadmapScanner.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(ct,{label:"Roadmap File Path",value:g.roadmapScanner.roadmapPath,onChange:b=>V("roadmapScanner",{...g.roadmapScanner,roadmapPath:b.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Cs,{label:"Planner Schedule",value:g.roadmapScanner.slicerSchedule||"35 */12 * * *",onChange:b=>V("roadmapScanner",{...g.roadmapScanner,slicerSchedule:b})})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800",children:[s.jsx("h4",{className:"text-md font-medium text-slate-200 mb-4",children:"Planner Execution"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Planner creates one PRD at a time and can auto-create a board issue for handoff."}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Planner Max Runtime",type:"number",value:String(g.roadmapScanner.slicerMaxRuntime||""),onChange:b=>V("roadmapScanner",{...g.roadmapScanner,slicerMaxRuntime:Number(b.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for planner tasks"}),s.jsx(pa,{label:"Planner Priority Mode",value:g.roadmapScanner.priorityMode||"roadmap-first",onChange:b=>V("roadmapScanner",{...g.roadmapScanner,priorityMode:b==="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(pa,{label:"Planner Issue Column",value:g.roadmapScanner.issueColumn||"Draft",onChange:b=>V("roadmapScanner",{...g.roadmapScanner,issueColumn:b==="Ready"?"Ready":"Draft"}),options:[{label:"Draft (default)",value:"Draft"},{label:"Ready",value:"Ready"}],helperText:"Column where planner-created issues are added after PRD generation."})]})]})]})]})},{id:"board",label:"Board",content:s.jsxs(Le,{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(Bt,{checked:g.boardProvider.enabled,onChange:b=>V("boardProvider",{...g.boardProvider,enabled:b})})]}),g.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(pa,{label:"Board Provider",value:g.boardProvider.provider,onChange:b=>V("boardProvider",{...g.boardProvider,provider:b}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),g.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(ct,{label:"Project Number",type:"number",value:String(g.boardProvider.projectNumber||""),onChange:b=>V("boardProvider",{...g.boardProvider,projectNumber:b.target.value?Number(b.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(ct,{label:"Repository",value:g.boardProvider.repo||"",onChange:b=>V("boardProvider",{...g.boardProvider,repo:b.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),g.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]})},{id:"qa",label:"QA",content:s.jsxs(Le,{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(Bt,{checked:g.qa.enabled,onChange:b=>V("qa",{...g.qa,enabled:b})})]}),g.qa.enabled&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:[s.jsx(ct,{label:"Max Runtime",type:"number",value:String(g.qa.maxRuntime),onChange:b=>V("qa",{...g.qa,maxRuntime:Number(b.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for QA tasks (default: 3600 seconds)"}),s.jsx(pa,{label:"Artifacts",value:g.qa.artifacts,onChange:b=>V("qa",{...g.qa,artifacts:b}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}],helperText:"What artifacts to capture for UI tests"}),s.jsx(ct,{label:"Skip Label",value:g.qa.skipLabel,onChange:b=>V("qa",{...g.qa,skipLabel:b.target.value}),helperText:"GitHub label to skip QA (PRs with this label are excluded)"})]}),s.jsxs("div",{className:"pt-4 border-t border-slate-800 space-y-4",children:[s.jsx(jf,{label:"QA Branch Patterns",value:g.qa.branchPatterns,onChange:b=>V("qa",{...g.qa,branchPatterns:b}),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(Bt,{checked:g.qa.autoInstallPlaywright,onChange:b=>V("qa",{...g.qa,autoInstallPlaywright:b})})]})]})]})]})},{id:"audit",label:"Audit",content:s.jsxs(Le,{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(Bt,{checked:g.audit.enabled,onChange:b=>V("audit",{...g.audit,enabled:b})})]}),g.audit.enabled&&s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-4 border-t border-slate-800",children:s.jsx(ct,{label:"Max Runtime",type:"number",value:String(g.audit.maxRuntime),onChange:b=>V("audit",{...g.audit,maxRuntime:Number(b.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for audit tasks (default: 1800 seconds)"})})]})},{id:"analytics",label:"Analytics",content:s.jsxs(Le,{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(Bt,{checked:g.analytics.enabled,onChange:b=>{var Y,ie;b&&!((Y=g.providerEnv)!=null&&Y.AMPLITUDE_API_KEY)&&!((ie=g.providerEnv)!=null&&ie.AMPLITUDE_SECRET_KEY)||V("analytics",{...g.analytics,enabled:b})}})]}),g.analytics.enabled&&!((Re=g.providerEnv)!=null&&Re.AMPLITUDE_API_KEY)&&s.jsx("p",{className:"text-sm text-amber-400",children:"Amplitude API Key and Secret Key are required. Set them in Provider Environment below."}),g.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(ct,{label:"Max Runtime",type:"number",value:String(g.analytics.maxRuntime),onChange:b=>V("analytics",{...g.analytics,maxRuntime:Number(b.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for analytics job (default: 900 seconds)"}),s.jsx(ct,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(g.analytics.lookbackDays),onChange:b=>V("analytics",{...g.analytics,lookbackDays:Math.max(1,Math.min(90,Number(b.target.value||7)))}),helperText:"Number of days to look back in Amplitude (1-90)"}),s.jsx(pa,{label:"Target Column",value:g.analytics.targetColumn,onChange:b=>V("analytics",{...g.analytics,targetColumn:b.target.value}),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"})]})]})},{id:"advanced",label:"Advanced",content:s.jsxs(Le,{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(ct,{label:"Templates Directory",value:g.templatesDir,onChange:b=>V("templatesDir",b.target.value),helperText:"Directory for custom template overrides"}),s.jsx(ct,{label:"Max Retries",type:"number",min:"1",value:String(g.maxRetries),onChange:b=>{const Y=Math.max(1,Number(b.target.value||1));V("maxRetries",Y)},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:g.prdPriority,onChange:b=>V("prdPriority",b),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(ty,{tabs:Se,activeTab:A,onChange:T}),s.jsxs("div",{className:"flex items-center justify-end space-x-4 pt-6 mt-6 border-t border-slate-800",children:[s.jsxs(Be,{variant:"ghost",className:"text-slate-400 hover:text-slate-300",onClick:se,children:[s.jsx(v1,{className:"h-4 w-4 mr-2"}),"Reset"]}),s.jsxs(Be,{onClick:G,loading:x,children:[s.jsx(b1,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]}),s.jsxs("div",{className:"mt-12",children:[s.jsxs("h3",{className:"text-lg font-bold text-slate-200 mb-4 flex items-center",children:[s.jsx(Bf,{className:"h-5 w-5 mr-2 text-indigo-500"}),"System Health"]}),s.jsx(Le,{className:"divide-y divide-slate-800",children:J?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):W.map((b,Y)=>{const ie=b.status==="pass",he=b.status==="warn",je=ie?"bg-green-500/10 text-green-400 border-green-500/20":he?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:b.name}),s.jsx("p",{className:"text-xs text-slate-500",children:b.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${je}`,children:b.status.toUpperCase()})]},`${b.name}-${Y}`)})})]})]})},vN=()=>(f2(),h2(),s.jsx(nb,{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(u2,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(c2,{}),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(Ap,{children:[s.jsx(Gn,{path:"/",element:s.jsx(b2,{})}),s.jsx(Gn,{path:"/prs",element:s.jsx(N2,{})}),s.jsx(Gn,{path:"/board",element:s.jsx(v2,{})}),s.jsx(Gn,{path:"/scheduling",element:s.jsx(fN,{})}),s.jsx(Gn,{path:"/logs",element:s.jsx(S2,{})}),s.jsx(Gn,{path:"/roadmap",element:s.jsx(w2,{})}),s.jsx(Gn,{path:"/settings",element:s.jsx(yN,{})}),s.jsx(Gn,{path:"*",element:s.jsx(Rp,{to:"/",replace:!0})})]})})})]}),s.jsx(d2,{})]})})),sy=document.getElementById("root");if(!sy)throw new Error("Could not find root element to mount to");const pN=zv.createRoot(sy);pN.render(s.jsx(Ke.StrictMode,{children:s.jsx(vN,{})}));
|