@jonit-dev/night-watch-cli 1.8.14-beta.11 → 1.8.14-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,442 +0,0 @@
1
- var vy=Object.defineProperty;var gg=n=>{throw TypeError(n)};var yy=(n,r,o)=>r in n?vy(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var xg=(n,r,o)=>yy(n,typeof r!="symbol"?r+"":r,o),wf=(n,r,o)=>r.has(n)||gg("Cannot "+o);var ee=(n,r,o)=>(wf(n,r,"read from private field"),o?o.call(n):r.get(n)),et=(n,r,o)=>r.has(n)?gg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,o),Me=(n,r,o,u)=>(wf(n,r,"write to private field"),u?u.call(n,o):r.set(n,o),o),we=(n,r,o)=>(wf(n,r,"access private method"),o);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))u(h);new MutationObserver(h=>{for(const f of h)if(f.type==="childList")for(const b of f.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&u(b)}).observe(document,{childList:!0,subtree:!0});function o(h){const f={};return h.integrity&&(f.integrity=h.integrity),h.referrerPolicy&&(f.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?f.credentials="include":h.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(h){if(h.ep)return;h.ep=!0;const f=o(h);fetch(h.href,f)}})();function Jf(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function by(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var r=n.default;if(typeof r=="function"){var o=function u(){return this instanceof u?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};o.prototype=r.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(n).forEach(function(u){var h=Object.getOwnPropertyDescriptor(n,u);Object.defineProperty(o,u,h.get?h:{enumerable:!0,get:function(){return n[u]}})}),o}var Sf={exports:{}},Ii={};/**
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 pg;function jy(){if(pg)return Ii;pg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(u,h,f){var b=null;if(f!==void 0&&(b=""+f),h.key!==void 0&&(b=""+h.key),"key"in h){f={};for(var j in h)j!=="key"&&(f[j]=h[j])}else f=h;return h=f.ref,{$$typeof:n,type:u,key:b,ref:h!==void 0?h:null,props:f}}return Ii.Fragment=r,Ii.jsx=o,Ii.jsxs=o,Ii}var vg;function Ny(){return vg||(vg=1,Sf.exports=jy()),Sf.exports}var s=Ny(),Ef={exports:{}},He={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var yg;function wy(){if(yg)return He;yg=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),b=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),z=Symbol.iterator;function _(H){return H===null||typeof H!="object"?null:(H=z&&H[z]||H["@@iterator"],typeof H=="function"?H:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,k={};function Y(H,se,ge){this.props=H,this.context=se,this.refs=k,this.updater=ge||N}Y.prototype.isReactComponent={},Y.prototype.setState=function(H,se){if(typeof H!="object"&&typeof H!="function"&&H!=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,H,se,"setState")},Y.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function D(){}D.prototype=Y.prototype;function M(H,se,ge){this.props=H,this.context=se,this.refs=k,this.updater=ge||N}var V=M.prototype=new D;V.constructor=M,O(V,Y.prototype),V.isPureReactComponent=!0;var K=Array.isArray;function $(){}var W={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function ae(H,se,ge){var pe=ge.ref;return{$$typeof:n,type:H,key:se,ref:pe!==void 0?pe:null,props:ge}}function C(H,se){return ae(H.type,se,H.props)}function J(H){return typeof H=="object"&&H!==null&&H.$$typeof===n}function ne(H){var se={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(ge){return se[ge]})}var he=/\/+/g;function ve(H,se){return typeof H=="object"&&H!==null&&H.key!=null?ne(""+H.key):se.toString(36)}function ue(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then($,$):(H.status="pending",H.then(function(se){H.status==="pending"&&(H.status="fulfilled",H.value=se)},function(se){H.status==="pending"&&(H.status="rejected",H.reason=se)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function G(H,se,ge,pe,Ee){var xe=typeof H;(xe==="undefined"||xe==="boolean")&&(H=null);var Ce=!1;if(H===null)Ce=!0;else switch(xe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(H.$$typeof){case n:case r:Ce=!0;break;case w:return Ce=H._init,G(Ce(H._payload),se,ge,pe,Ee)}}if(Ce)return Ee=Ee(H),Ce=pe===""?"."+ve(H,0):pe,K(Ee)?(ge="",Ce!=null&&(ge=Ce.replace(he,"$&/")+"/"),G(Ee,se,ge,"",function(kt){return kt})):Ee!=null&&(J(Ee)&&(Ee=C(Ee,ge+(Ee.key==null||H&&H.key===Ee.key?"":(""+Ee.key).replace(he,"$&/")+"/")+Ce)),se.push(Ee)),1;Ce=0;var Ze=pe===""?".":pe+":";if(K(H))for(var We=0;We<H.length;We++)pe=H[We],xe=Ze+ve(pe,We),Ce+=G(pe,se,ge,xe,Ee);else if(We=_(H),typeof We=="function")for(H=We.call(H),We=0;!(pe=H.next()).done;)pe=pe.value,xe=Ze+ve(pe,We++),Ce+=G(pe,se,ge,xe,Ee);else if(xe==="object"){if(typeof H.then=="function")return G(ue(H),se,ge,pe,Ee);throw se=String(H),Error("Objects are not valid as a React child (found: "+(se==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":se)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function le(H,se,ge){if(H==null)return H;var pe=[],Ee=0;return G(H,pe,"","",function(xe){return se.call(ge,xe,Ee++)}),pe}function de(H){if(H._status===-1){var se=H._result;se=se(),se.then(function(ge){(H._status===0||H._status===-1)&&(H._status=1,H._result=ge)},function(ge){(H._status===0||H._status===-1)&&(H._status=2,H._result=ge)}),H._status===-1&&(H._status=0,H._result=se)}if(H._status===1)return H._result.default;throw H._result}var me=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var se=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(se))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},ze={map:le,forEach:function(H,se,ge){le(H,function(){se.apply(this,arguments)},ge)},count:function(H){var se=0;return le(H,function(){se++}),se},toArray:function(H){return le(H,function(se){return se})||[]},only:function(H){if(!J(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return He.Activity=T,He.Children=ze,He.Component=Y,He.Fragment=o,He.Profiler=h,He.PureComponent=M,He.StrictMode=u,He.Suspense=y,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,He.__COMPILER_RUNTIME={__proto__:null,c:function(H){return W.H.useMemoCache(H)}},He.cache=function(H){return function(){return H.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(H,se,ge){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var pe=O({},H.props),Ee=H.key;if(se!=null)for(xe in se.key!==void 0&&(Ee=""+se.key),se)!R.call(se,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&se.ref===void 0||(pe[xe]=se[xe]);var xe=arguments.length-2;if(xe===1)pe.children=ge;else if(1<xe){for(var Ce=Array(xe),Ze=0;Ze<xe;Ze++)Ce[Ze]=arguments[Ze+2];pe.children=Ce}return ae(H.type,Ee,pe)},He.createContext=function(H){return H={$$typeof:b,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:f,_context:H},H},He.createElement=function(H,se,ge){var pe,Ee={},xe=null;if(se!=null)for(pe in se.key!==void 0&&(xe=""+se.key),se)R.call(se,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(Ee[pe]=se[pe]);var Ce=arguments.length-2;if(Ce===1)Ee.children=ge;else if(1<Ce){for(var Ze=Array(Ce),We=0;We<Ce;We++)Ze[We]=arguments[We+2];Ee.children=Ze}if(H&&H.defaultProps)for(pe in Ce=H.defaultProps,Ce)Ee[pe]===void 0&&(Ee[pe]=Ce[pe]);return ae(H,xe,Ee)},He.createRef=function(){return{current:null}},He.forwardRef=function(H){return{$$typeof:j,render:H}},He.isValidElement=J,He.lazy=function(H){return{$$typeof:w,_payload:{_status:-1,_result:H},_init:de}},He.memo=function(H,se){return{$$typeof:x,type:H,compare:se===void 0?null:se}},He.startTransition=function(H){var se=W.T,ge={};W.T=ge;try{var pe=H(),Ee=W.S;Ee!==null&&Ee(ge,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then($,me)}catch(xe){me(xe)}finally{se!==null&&ge.types!==null&&(se.types=ge.types),W.T=se}},He.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},He.use=function(H){return W.H.use(H)},He.useActionState=function(H,se,ge){return W.H.useActionState(H,se,ge)},He.useCallback=function(H,se){return W.H.useCallback(H,se)},He.useContext=function(H){return W.H.useContext(H)},He.useDebugValue=function(){},He.useDeferredValue=function(H,se){return W.H.useDeferredValue(H,se)},He.useEffect=function(H,se){return W.H.useEffect(H,se)},He.useEffectEvent=function(H){return W.H.useEffectEvent(H)},He.useId=function(){return W.H.useId()},He.useImperativeHandle=function(H,se,ge){return W.H.useImperativeHandle(H,se,ge)},He.useInsertionEffect=function(H,se){return W.H.useInsertionEffect(H,se)},He.useLayoutEffect=function(H,se){return W.H.useLayoutEffect(H,se)},He.useMemo=function(H,se){return W.H.useMemo(H,se)},He.useOptimistic=function(H,se){return W.H.useOptimistic(H,se)},He.useReducer=function(H,se,ge){return W.H.useReducer(H,se,ge)},He.useRef=function(H){return W.H.useRef(H)},He.useState=function(H){return W.H.useState(H)},He.useSyncExternalStore=function(H,se,ge){return W.H.useSyncExternalStore(H,se,ge)},He.useTransition=function(){return W.H.useTransition()},He.version="19.2.4",He}var bg;function Kf(){return bg||(bg=1,Ef.exports=wy()),Ef.exports}var L=Kf();const _e=Jf(L);var Tf={exports:{}},Qi={},Cf={exports:{}},Mf={};/**
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 jg;function Sy(){return jg||(jg=1,(function(n){function r(G,le){var de=G.length;G.push(le);e:for(;0<de;){var me=de-1>>>1,ze=G[me];if(0<h(ze,le))G[me]=le,G[de]=ze,de=me;else break e}}function o(G){return G.length===0?null:G[0]}function u(G){if(G.length===0)return null;var le=G[0],de=G.pop();if(de!==le){G[0]=de;e:for(var me=0,ze=G.length,H=ze>>>1;me<H;){var se=2*(me+1)-1,ge=G[se],pe=se+1,Ee=G[pe];if(0>h(ge,de))pe<ze&&0>h(Ee,ge)?(G[me]=Ee,G[pe]=de,me=pe):(G[me]=ge,G[se]=de,me=se);else if(pe<ze&&0>h(Ee,de))G[me]=Ee,G[pe]=de,me=pe;else break e}}return le}function h(G,le){var de=G.sortIndex-le.sortIndex;return de!==0?de:G.id-le.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var b=Date,j=b.now();n.unstable_now=function(){return b.now()-j}}var y=[],x=[],w=1,T=null,z=3,_=!1,N=!1,O=!1,k=!1,Y=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function V(G){for(var le=o(x);le!==null;){if(le.callback===null)u(x);else if(le.startTime<=G)u(x),le.sortIndex=le.expirationTime,r(y,le);else break;le=o(x)}}function K(G){if(O=!1,V(G),!N)if(o(y)!==null)N=!0,$||($=!0,ne());else{var le=o(x);le!==null&&ue(K,le.startTime-G)}}var $=!1,W=-1,R=5,ae=-1;function C(){return k?!0:!(n.unstable_now()-ae<R)}function J(){if(k=!1,$){var G=n.unstable_now();ae=G;var le=!0;try{e:{N=!1,O&&(O=!1,D(W),W=-1),_=!0;var de=z;try{t:{for(V(G),T=o(y);T!==null&&!(T.expirationTime>G&&C());){var me=T.callback;if(typeof me=="function"){T.callback=null,z=T.priorityLevel;var ze=me(T.expirationTime<=G);if(G=n.unstable_now(),typeof ze=="function"){T.callback=ze,V(G),le=!0;break t}T===o(y)&&u(y),V(G)}else u(y);T=o(y)}if(T!==null)le=!0;else{var H=o(x);H!==null&&ue(K,H.startTime-G),le=!1}}break e}finally{T=null,z=de,_=!1}le=void 0}}finally{le?ne():$=!1}}}var ne;if(typeof M=="function")ne=function(){M(J)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ve=he.port2;he.port1.onmessage=J,ne=function(){ve.postMessage(null)}}else ne=function(){Y(J,0)};function ue(G,le){W=Y(function(){G(n.unstable_now())},le)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(G){G.callback=null},n.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"):R=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return z},n.unstable_next=function(G){switch(z){case 1:case 2:case 3:var le=3;break;default:le=z}var de=z;z=le;try{return G()}finally{z=de}},n.unstable_requestPaint=function(){k=!0},n.unstable_runWithPriority=function(G,le){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var de=z;z=G;try{return le()}finally{z=de}},n.unstable_scheduleCallback=function(G,le,de){var me=n.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?me+de:me):de=me,G){case 1:var ze=-1;break;case 2:ze=250;break;case 5:ze=1073741823;break;case 4:ze=1e4;break;default:ze=5e3}return ze=de+ze,G={id:w++,callback:le,priorityLevel:G,startTime:de,expirationTime:ze,sortIndex:-1},de>me?(G.sortIndex=de,r(x,G),o(y)===null&&G===o(x)&&(O?(D(W),W=-1):O=!0,ue(K,de-me))):(G.sortIndex=ze,r(y,G),N||_||(N=!0,$||($=!0,ne()))),G},n.unstable_shouldYield=C,n.unstable_wrapCallback=function(G){var le=z;return function(){var de=z;z=le;try{return G.apply(this,arguments)}finally{z=de}}}})(Mf)),Mf}var Ng;function Ey(){return Ng||(Ng=1,Cf.exports=Sy()),Cf.exports}var Of={exports:{}},ca={};/**
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 wg;function Ty(){if(wg)return ca;wg=1;var n=Kf();function r(y){var x="https://react.dev/errors/"+y;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)x+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+y+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var u={d:{f:o,r:function(){throw Error(r(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},h=Symbol.for("react.portal");function f(y,x,w){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:T==null?null:""+T,children:y,containerInfo:x,implementation:w}}var b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(y,x){if(y==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return ca.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,ca.createPortal=function(y,x){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(r(299));return f(y,x,null,w)},ca.flushSync=function(y){var x=b.T,w=u.p;try{if(b.T=null,u.p=2,y)return y()}finally{b.T=x,u.p=w,u.d.f()}},ca.preconnect=function(y,x){typeof y=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,u.d.C(y,x))},ca.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},ca.preinit=function(y,x){if(typeof y=="string"&&x&&typeof x.as=="string"){var w=x.as,T=j(w,x.crossOrigin),z=typeof x.integrity=="string"?x.integrity:void 0,_=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;w==="style"?u.d.S(y,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:T,integrity:z,fetchPriority:_}):w==="script"&&u.d.X(y,{crossOrigin:T,integrity:z,fetchPriority:_,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},ca.preinitModule=function(y,x){if(typeof y=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var w=j(x.as,x.crossOrigin);u.d.M(y,{crossOrigin:w,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&u.d.M(y)},ca.preload=function(y,x){if(typeof y=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var w=x.as,T=j(w,x.crossOrigin);u.d.L(y,w,{crossOrigin:T,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},ca.preloadModule=function(y,x){if(typeof y=="string")if(x){var w=j(x.as,x.crossOrigin);u.d.m(y,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:w,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else u.d.m(y)},ca.requestFormReset=function(y){u.d.r(y)},ca.unstable_batchedUpdates=function(y,x){return y(x)},ca.useFormState=function(y,x,w){return b.H.useFormState(y,x,w)},ca.useFormStatus=function(){return b.H.useHostTransitionStatus()},ca.version="19.2.4",ca}var Sg;function zx(){if(Sg)return Of.exports;Sg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Of.exports=Ty(),Of.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 Eg;function Cy(){if(Eg)return Qi;Eg=1;var n=Ey(),r=Kf(),o=zx();function u(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 h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function b(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 y(e){if(f(e)!==e)throw Error(u(188))}function x(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(l=c.return,l!==null){a=l;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return y(c),e;if(d===l)return y(c),t;d=d.sibling}throw Error(u(188))}if(a.return!==l.return)a=c,l=d;else{for(var p=!1,E=c.child;E;){if(E===a){p=!0,a=c,l=d;break}if(E===l){p=!0,l=c,a=d;break}E=E.sibling}if(!p){for(E=d.child;E;){if(E===a){p=!0,a=d,l=c;break}if(E===l){p=!0,l=d,a=c;break}E=E.sibling}if(!p)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,z=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),M=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),C=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case Y:return"Profiler";case k:return"StrictMode";case K:return"Suspense";case $:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case M:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case V: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:ve(e.type)||"Memo";case R:t=e._payload,e=e._init;try{return ve(e(t))}catch{}}return null}var ue=Array.isArray,G=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},me=[],ze=-1;function H(e){return{current:e}}function se(e){0>ze||(e.current=me[ze],me[ze]=null,ze--)}function ge(e,t){ze++,me[ze]=e.current,e.current=t}var pe=H(null),Ee=H(null),xe=H(null),Ce=H(null);function Ze(e,t){switch(ge(xe,t),ge(Ee,e),ge(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?H0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=H0(t),e=q0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}se(pe),ge(pe,e)}function We(){se(pe),se(Ee),se(xe)}function kt(e){e.memoizedState!==null&&ge(Ce,e);var t=pe.current,a=q0(t,e.type);t!==a&&(ge(Ee,e),ge(pe,a))}function ha(e){Ee.current===e&&(se(pe),se(Ee)),Ce.current===e&&(se(Ce),Fi._currentValue=de)}var Ka,en;function ma(e){if(Ka===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ka=t&&t[1]||"",en=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Ka+e+en}var ga=!1;function bn(e,t){if(!e||ga)return"";ga=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(te){var X=te}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(te){X=te}e.call(ce.prototype)}}else{try{throw Error()}catch(te){X=te}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(te){if(te&&X&&typeof te.stack=="string")return[te.stack,X.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),p=d[0],E=d[1];if(p&&E){var U=p.split(`
44
- `),Q=E.split(`
45
- `);for(c=l=0;l<U.length&&!U[l].includes("DetermineComponentFrameRoot");)l++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(l===U.length||c===Q.length)for(l=U.length-1,c=Q.length-1;1<=l&&0<=c&&U[l]!==Q[c];)c--;for(;1<=l&&0<=c;l--,c--)if(U[l]!==Q[c]){if(l!==1||c!==1)do if(l--,c--,0>c||U[l]!==Q[c]){var re=`
46
- `+U[l].replace(" at new "," at ");return e.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",e.displayName)),re}while(1<=l&&0<=c);break}}}finally{ga=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ma(a):""}function Gt(e,t){switch(e.tag){case 26:case 27:case 5:return ma(e.type);case 16:return ma("Lazy");case 13:return e.child!==t&&t!==null?ma("Suspense Fallback"):ma("Suspense");case 19:return ma("SuspenseList");case 0:case 15:return bn(e.type,!1);case 11:return bn(e.type.render,!1);case 1:return bn(e.type,!0);case 31:return ma("Activity");default:return""}}function ua(e){try{var t="",a=null;do t+=Gt(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
47
- Error generating stack: `+l.message+`
48
- `+l.stack}}var tn=Object.prototype.hasOwnProperty,an=n.unstable_scheduleCallback,nn=n.unstable_cancelCallback,qa=n.unstable_shouldYield,jn=n.unstable_requestPaint,Qt=n.unstable_now,cl=n.unstable_getCurrentPriorityLevel,Zr=n.unstable_ImmediatePriority,Zs=n.unstable_UserBlockingPriority,_n=n.unstable_NormalPriority,Ws=n.unstable_LowPriority,ol=n.unstable_IdlePriority,Ie=n.log,ul=n.unstable_setDisableYieldValue,mt=null,Bt=null;function At(e){if(typeof Ie=="function"&&ul(e),Bt&&typeof Bt.setStrictMode=="function")try{Bt.setStrictMode(mt,e)}catch{}}var _t=Math.clz32?Math.clz32:at,oe=Math.log,je=Math.LN2;function at(e){return e>>>=0,e===0?32:31-(oe(e)/je|0)|0}var Et=256,jt=262144,zt=4194304;function Nn(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 es(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var c=0,d=e.suspendedLanes,p=e.pingedLanes;e=e.warmLanes;var E=l&134217727;return E!==0?(l=E&~d,l!==0?c=Nn(l):(p&=E,p!==0?c=Nn(p):a||(a=E&~e,a!==0&&(c=Nn(a))))):(E=l&~d,E!==0?c=Nn(E):p!==0?c=Nn(p):a||(a=l&~e,a!==0&&(c=Nn(a)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:c}function dl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yc(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 Wr(){var e=zt;return zt<<=1,(zt&62914560)===0&&(zt=4194304),e}function Is(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function fl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bc(e,t,a,l,c,d){var p=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 E=e.entanglements,U=e.expirationTimes,Q=e.hiddenUpdates;for(a=p&~a;0<a;){var re=31-_t(a),ce=1<<re;E[re]=0,U[re]=-1;var X=Q[re];if(X!==null)for(Q[re]=null,re=0;re<X.length;re++){var te=X[re];te!==null&&(te.lane&=-536870913)}a&=~ce}l!==0&&ht(e,l,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(p&~t))}function ht(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-_t(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function xa(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-_t(a),c=1<<l;c&t|e[l]&t&&(e[l]|=t),a&=~c}}function Ir(e,t){var a=t&-t;return a=(a&42)!==0?1:Qs(a),(a&(e.suspendedLanes|t))!==0?0:a}function Qs(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 sa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xs(){var e=le.p;return e!==0?e:(e=window.event,e===void 0?32:cg(e.type))}function Qr(e,t){var a=le.p;try{return le.p=e,t()}finally{le.p=a}}var ln=Math.random().toString(36).slice(2),Tt="__reactFiber$"+ln,$t="__reactProps$"+ln,zn="__reactContainer$"+ln,ts="__reactEvents$"+ln,jc="__reactListeners$"+ln,Nc="__reactHandles$"+ln,wc="__reactResources$"+ln,as="__reactMarker$"+ln;function Js(e){delete e[Tt],delete e[$t],delete e[ts],delete e[jc],delete e[Nc]}function Un(e){var t=e[Tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[zn]||a[Tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=G0(e);e!==null;){if(a=e[Tt])return a;e=G0(e)}return t}e=a,a=e.parentNode}return null}function De(e){if(e=e[Tt]||e[zn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function pa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function sn(e){var t=e[wc];return t||(t=e[wc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ut(e){e[as]=!0}var Sc=new Set,Xr={};function wn(e,t){hl(e,t),hl(e+"Capture",t)}function hl(e,t){for(Xr[e]=t,e=0;e<t.length;e++)Sc.add(t[e])}var Ec=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]*$"),Tc={},Ln={};function Jr(e){return tn.call(Ln,e)?!0:tn.call(Tc,e)?!1:Ec.test(e)?Ln[e]=!0:(Tc[e]=!0,!1)}function Xt(e,t,a){if(Jr(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ks(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 nt(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kr(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,d=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(p){a=""+p,d.call(this,p)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(p){a=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ns(e){if(!e._valueTracker){var t=Sn(e)?"checked":"value";e._valueTracker=Kr(e,t,""+e[t])}}function ml(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Sn(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function rn(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 er=/[\n"\\]/g;function Jt(e){return e.replace(er,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function tr(e,t,a,l,c,d,p,E){e.name="",p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.type=p:e.removeAttribute("type"),t!=null?p==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):p!=="submit"&&p!=="reset"||e.removeAttribute("value"),t!=null?ls(e,p,Ct(t)):a!=null?ls(e,p,Ct(a)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Ct(E):e.removeAttribute("name")}function gl(e,t,a,l,c,d,p,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){ns(e);return}a=a!=null?""+Ct(a):"",t=t!=null?""+Ct(t):a,E||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=E?e.checked:!!l,e.defaultChecked=!!l,p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.name=p),ns(e)}function ls(e,t,a){t==="number"&&rn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Hn(e,t,a,l){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Ct(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function ss(e,t,a){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ct(a):""}function ei(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(ue(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=Ct(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),ns(e)}function cn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var rs=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 is(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||rs.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Cc(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&a[c]!==l&&is(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&is(e,d,t[d])}function ar(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 bu=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"]]),Mc=/^[\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 cs(e){return Mc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Va(){}var ti=null;function nr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qn=null,xl=null;function Oc(e){var t=De(e);if(t&&(e=t.stateNode)){var a=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(tr(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Jt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var c=l[$t]||null;if(!c)throw Error(u(90));tr(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&ml(l)}break e;case"textarea":ss(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Hn(e,!!a.multiple,t,!1)}}}var ai=!1;function ni(e,t,a){if(ai)return e(t,a);ai=!0;try{var l=e(t);return l}finally{if(ai=!1,(qn!==null||xl!==null)&&(So(),qn&&(t=qn,e=xl,xl=qn=null,Oc(t),e)))for(t=0;t<e.length;t++)Oc(e[t])}}function os(e,t){var a=e.stateNode;if(a===null)return null;var l=a[$t]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var on=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),li=!1;if(on)try{var us={};Object.defineProperty(us,"passive",{get:function(){li=!0}}),window.addEventListener("test",us,us),window.removeEventListener("test",us,us)}catch{li=!1}var En=null,lr=null,sr=null;function Yt(){if(sr)return sr;var e,t=lr,a=t.length,l,c="value"in En?En.value:En.textContent,d=c.length;for(e=0;e<a&&t[e]===c[e];e++);var p=a-e;for(l=1;l<=p&&t[a-l]===c[d-l];l++);return sr=c.slice(e,1<l?1-l:void 0)}function ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function un(){return!0}function Vn(){return!1}function Mt(e){function t(a,l,c,d,p){this._reactName=a,this._targetInst=c,this.type=l,this.nativeEvent=d,this.target=p,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?un:Vn,this.isPropagationStopped=Vn,this}return T(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=un)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fs=Mt(Tn),hs=T({},Tn,{view:0,detail:0}),si=Mt(hs),rr,ms,gs,ir=T({},hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ps,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!==gs&&(gs&&e.type==="mousemove"?(rr=e.screenX-gs.screenX,ms=e.screenY-gs.screenY):ms=rr=0,gs=e),rr)},movementY:function(e){return"movementY"in e?e.movementY:ms}}),Rc=Mt(ir),ju=T({},ir,{dataTransfer:0}),Nu=Mt(ju),wu=T({},hs,{relatedTarget:0}),cr=Mt(wu),Su=T({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0}),pl=Mt(Su),Eu=T({},Tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vl=Mt(Eu),xs=T({},Tn,{data:0}),yl=Mt(xs),Tu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cu={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"},Mu={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ou(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Mu[e])?!!t[e]:!1}function ps(){return Ou}var Ru=T({},hs,{key:function(e){if(e.key){var t=Tu[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Cu[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ps,charCode:function(e){return e.type==="keypress"?ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Du=Mt(Ru),ku=T({},ir,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dc=Mt(ku),Au=T({},hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ps}),_u=Mt(Au),kc=T({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0}),zu=Mt(kc),Uu=T({},ir,{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}),Lu=Mt(Uu),Hu=T({},Tn,{newState:0,oldState:0}),qu=Mt(Hu),Ac=[9,13,27,32],ri=on&&"CompositionEvent"in window,vs=null;on&&"documentMode"in document&&(vs=document.documentMode);var Vu=on&&"TextEvent"in window&&!vs,_c=on&&(!ri||vs&&8<vs&&11>=vs),zc=" ",Uc=!1;function Lc(e,t){switch(e){case"keyup":return Ac.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function Bu(e,t){switch(e){case"compositionend":return Hc(t);case"keypress":return t.which!==32?null:(Uc=!0,zc);case"textInput":return e=t.data,e===zc&&Uc?null:e;default:return null}}function $u(e,t){if(bl)return e==="compositionend"||!ri&&Lc(e,t)?(e=Yt(),sr=lr=En=null,bl=!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 _c&&t.locale!=="ko"?null:t.data;default:return null}}var Yu={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 qc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Yu[e.type]:t==="textarea"}function ii(e,t,a,l){qn?xl?xl.push(l):xl=[l]:qn=l,t=Do(t,"onChange"),0<t.length&&(a=new fs("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var jl=null,ys=null;function va(e){k0(e,0)}function dn(e){var t=pa(e);if(ml(t))return e}function Vc(e,t){if(e==="change")return t}var Cn=!1;if(on){var ci;if(on){var Ma="oninput"in document;if(!Ma){var oi=document.createElement("div");oi.setAttribute("oninput","return;"),Ma=typeof oi.oninput=="function"}ci=Ma}else ci=!1;Cn=ci&&(!document.documentMode||9<document.documentMode)}function ui(){jl&&(jl.detachEvent("onpropertychange",di),ys=jl=null)}function di(e){if(e.propertyName==="value"&&dn(ys)){var t=[];ii(t,ys,e,nr(e)),ni(va,t)}}function Ye(e,t,a){e==="focusin"?(ui(),jl=t,ys=a,jl.attachEvent("onpropertychange",di)):e==="focusout"&&ui()}function Nl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return dn(ys)}function Pu(e,t){if(e==="click")return dn(t)}function gt(e,t){if(e==="input"||e==="change")return dn(t)}function bs(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ra=typeof Object.is=="function"?Object.is:bs;function js(e,t){if(ra(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var c=a[l];if(!tn.call(t,c)||!ra(e[c],t[c]))return!1}return!0}function Bc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $c(e,t){var a=Bc(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Bc(a)}}function Qe(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qe(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=rn(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=rn(e.document)}return t}function or(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 Yc=on&&"documentMode"in document&&11>=document.documentMode,wl=null,ur=null,Kt=null,dr=!1;function Ns(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;dr||wl==null||wl!==rn(l)||(l=wl,"selectionStart"in l&&or(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Kt&&js(Kt,l)||(Kt=l,l=Do(ur,"onSelect"),0<l.length&&(t=new fs("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=wl)))}function Bn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Sl={animationend:Bn("Animation","AnimationEnd"),animationiteration:Bn("Animation","AnimationIteration"),animationstart:Bn("Animation","AnimationStart"),transitionrun:Bn("Transition","TransitionRun"),transitionstart:Bn("Transition","TransitionStart"),transitioncancel:Bn("Transition","TransitionCancel"),transitionend:Bn("Transition","TransitionEnd")},fi={},Pc={};on&&(Pc=document.createElement("div").style,"AnimationEvent"in window||(delete Sl.animationend.animation,delete Sl.animationiteration.animation,delete Sl.animationstart.animation),"TransitionEvent"in window||delete Sl.transitionend.transition);function $n(e){if(fi[e])return fi[e];if(!Sl[e])return e;var t=Sl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Pc)return fi[e]=t[a];return e}var Fc=$n("animationend"),Gc=$n("animationiteration"),fr=$n("animationstart"),Gu=$n("transitionrun"),Zu=$n("transitionstart"),Zc=$n("transitioncancel"),hi=$n("transitionend"),mi=new Map,gi="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(" ");gi.push("scrollEnd");function ya(e,t){mi.set(e,t),wn(t,[e])}var El=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)},da=[],Ba=0,ws=0;function Tl(){for(var e=Ba,t=ws=Ba=0;t<e;){var a=da[t];da[t++]=null;var l=da[t];da[t++]=null;var c=da[t];da[t++]=null;var d=da[t];if(da[t++]=null,l!==null&&c!==null){var p=l.pending;p===null?c.next=c:(c.next=p.next,p.next=c),l.pending=c}d!==0&&Ss(a,c,d)}}function $a(e,t,a,l){da[Ba++]=e,da[Ba++]=t,da[Ba++]=a,da[Ba++]=l,ws|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function hr(e,t,a,l){return $a(e,t,a,l),Es(e)}function Ya(e,t){return $a(e,null,null,t),Es(e)}function Ss(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,l=d.alternate,l!==null&&(l.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-_t(a),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=a|536870912),d):null}function Es(e){if(50<Hi)throw Hi=0,Gd=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Oa={};function mr(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ea(e,t,a,l){return new mr(e,t,a,l)}function gr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pa(e,t){var a=e.alternate;return a===null?(a=ea(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 Wc(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 xr(e,t,a,l,c,d){var p=0;if(l=e,typeof e=="function")gr(e)&&(p=1);else if(typeof e=="string")p=ry(e,a,pe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=ea(31,a,t,c),e.elementType=ae,e.lanes=d,e;case O:return Fa(a.children,c,d,t);case k:p=8,c|=24;break;case Y:return e=ea(12,a,t,c|2),e.elementType=Y,e.lanes=d,e;case K:return e=ea(13,a,t,c),e.elementType=K,e.lanes=d,e;case $:return e=ea(19,a,t,c),e.elementType=$,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case M:p=10;break e;case D:p=9;break e;case V:p=11;break e;case W:p=14;break e;case R:p=16,l=null;break e}p=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=ea(p,a,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function Fa(e,t,a,l){return e=ea(7,e,l,t),e.lanes=a,e}function xi(e,t,a){return e=ea(6,e,null,t),e.lanes=a,e}function Ic(e){var t=ea(18,null,null,0);return t.stateNode=e,t}function Cl(e,t,a){return t=ea(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function ba(e,t){if(typeof e=="object"&&e!==null){var a=pi.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ua(t)},pi.set(e,t),t)}return{value:e,source:t,stack:ua(t)}}var Yn=[],Pn=0,Ts=null,fn=0,ia=[],Te=0,ja=null,Ga=1,g="";function i(e,t){Yn[Pn++]=fn,Yn[Pn++]=Ts,Ts=e,fn=t}function m(e,t,a){ia[Te++]=Ga,ia[Te++]=g,ia[Te++]=ja,ja=e;var l=Ga;e=g;var c=32-_t(l)-1;l&=~(1<<c),a+=1;var d=32-_t(t)+c;if(30<d){var p=c-c%5;d=(l&(1<<p)-1).toString(32),l>>=p,c-=p,Ga=1<<32-_t(t)+c|a<<c|l,g=d+e}else Ga=1<<d|a<<c|l,g=e}function v(e){e.return!==null&&(i(e,1),m(e,1,0))}function S(e){for(;e===Ts;)Ts=Yn[--Pn],Yn[Pn]=null,fn=Yn[--Pn],Yn[Pn]=null;for(;e===ja;)ja=ia[--Te],ia[Te]=null,g=ia[--Te],ia[Te]=null,Ga=ia[--Te],ia[Te]=null}function A(e,t){ia[Te++]=Ga,ia[Te++]=g,ia[Te++]=ja,Ga=t.id,g=t.overflow,ja=e}var q=null,B=null,F=!1,fe=null,ye=!1,Ue=Error(u(519));function Pe(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hn(ba(t,e)),Ue}function ke(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Tt]=e,t[$t]=l,a){case"dialog":$e("cancel",t),$e("close",t);break;case"iframe":case"object":case"embed":$e("load",t);break;case"video":case"audio":for(a=0;a<Vi.length;a++)$e(Vi[a],t);break;case"source":$e("error",t);break;case"img":case"image":case"link":$e("error",t),$e("load",t);break;case"details":$e("toggle",t);break;case"input":$e("invalid",t),gl(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":$e("invalid",t);break;case"textarea":$e("invalid",t),ei(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||U0(t.textContent,a)?(l.popover!=null&&($e("beforetoggle",t),$e("toggle",t)),l.onScroll!=null&&$e("scroll",t),l.onScrollEnd!=null&&$e("scrollend",t),l.onClick!=null&&(t.onclick=Va),t=!0):t=!1,t||Pe(e,!0)}function bt(e){for(q=e.return;q;)switch(q.tag){case 5:case 31:case 13:ye=!1;return;case 27:case 3:ye=!0;return;default:q=q.return}}function Zt(e){if(e!==q)return!1;if(!F)return bt(e),F=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||cf(e.type,e.memoizedProps)),a=!a),a&&B&&Pe(e),bt(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));B=F0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));B=F0(e)}else t===27?(t=B,Vl(e.type)?(e=hf,hf=null,B=e):B=t):B=q?Qa(e.stateNode.nextSibling):null;return!0}function Wt(){B=q=null,F=!1}function Mn(){var e=fe;return e!==null&&(Ea===null?Ea=e:Ea.push.apply(Ea,e),fe=null),e}function hn(e){fe===null?fe=[e]:fe.push(e)}var pr=H(null),Fn=null,Za=null;function On(e,t,a){ge(pr,t._currentValue),t._currentValue=a}function mn(e){e._currentValue=pr.current,se(pr)}function vi(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Gn(e,t,a,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var p=c.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=c;for(var U=0;U<t.length;U++)if(E.context===t[U]){d.lanes|=a,E=d.alternate,E!==null&&(E.lanes|=a),vi(d.return,a,e),l||(p=null);break e}d=E.next}}else if(c.tag===18){if(p=c.return,p===null)throw Error(u(341));p.lanes|=a,d=p.alternate,d!==null&&(d.lanes|=a),vi(p,a,e),p=null}else p=c.child;if(p!==null)p.return=c;else for(p=c;p!==null;){if(p===e){p=null;break}if(c=p.sibling,c!==null){c.return=p.return,p=c;break}p=p.return}c=p}}function Wa(e,t,a,l){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var p=c.alternate;if(p===null)throw Error(u(387));if(p=p.memoizedProps,p!==null){var E=c.type;ra(c.pendingProps.value,p.value)||(e!==null?e.push(E):e=[E])}}else if(c===Ce.current){if(p=c.alternate,p===null)throw Error(u(387));p.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Fi):e=[Fi])}c=c.return}e!==null&&Gn(t,e,a,l),t.flags|=262144}function vr(e){for(e=e.firstContext;e!==null;){if(!ra(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cs(e){Fn=e,Za=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return jh(Fn,e)}function Qc(e,t){return Fn===null&&Cs(e),jh(e,t)}function jh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Za===null){if(e===null)throw Error(u(308));Za=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Za=Za.next=t;return a}var av=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},nv=n.unstable_scheduleCallback,lv=n.unstable_NormalPriority,Lt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wu(){return{controller:new av,data:new Map,refCount:0}}function yi(e){e.refCount--,e.refCount===0&&nv(lv,function(){e.controller.abort()})}var bi=null,Iu=0,yr=0,br=null;function sv(e,t){if(bi===null){var a=bi=[];Iu=0,yr=Jd(),br={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Iu++,t.then(Nh,Nh),t}function Nh(){if(--Iu===0&&bi!==null){br!==null&&(br.status="fulfilled");var e=bi;bi=null,yr=0,br=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function rv(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),l}var wh=G.S;G.S=function(e,t){r0=Qt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sv(e,t),wh!==null&&wh(e,t)};var Ms=H(null);function Qu(){var e=Ms.current;return e!==null?e:ft.pooledCache}function Xc(e,t){t===null?ge(Ms,Ms.current):ge(Ms,t.pool)}function Sh(){var e=Qu();return e===null?null:{parent:Lt._currentValue,pool:e}}var jr=Error(u(460)),Xu=Error(u(474)),Jc=Error(u(542)),Kc={then:function(){}};function Eh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Th(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Va,Va),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mh(e),e;default:if(typeof t.status=="string")t.then(Va,Va);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mh(e),e}throw Rs=t,jr}}function Os(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Rs=a,jr):a}}var Rs=null;function Ch(){if(Rs===null)throw Error(u(459));var e=Rs;return Rs=null,e}function Mh(e){if(e===jr||e===Jc)throw Error(u(483))}var Nr=null,ji=0;function eo(e){var t=ji;return ji+=1,Nr===null&&(Nr=[]),Th(Nr,e,t)}function Ni(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function to(e,t){throw t.$$typeof===z?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Oh(e){function t(Z,P){if(e){var I=Z.deletions;I===null?(Z.deletions=[P],Z.flags|=16):I.push(P)}}function a(Z,P){if(!e)return null;for(;P!==null;)t(Z,P),P=P.sibling;return null}function l(Z){for(var P=new Map;Z!==null;)Z.key!==null?P.set(Z.key,Z):P.set(Z.index,Z),Z=Z.sibling;return P}function c(Z,P){return Z=Pa(Z,P),Z.index=0,Z.sibling=null,Z}function d(Z,P,I){return Z.index=I,e?(I=Z.alternate,I!==null?(I=I.index,I<P?(Z.flags|=67108866,P):I):(Z.flags|=67108866,P)):(Z.flags|=1048576,P)}function p(Z){return e&&Z.alternate===null&&(Z.flags|=67108866),Z}function E(Z,P,I,ie){return P===null||P.tag!==6?(P=xi(I,Z.mode,ie),P.return=Z,P):(P=c(P,I),P.return=Z,P)}function U(Z,P,I,ie){var Re=I.type;return Re===O?re(Z,P,I.props.children,ie,I.key):P!==null&&(P.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===R&&Os(Re)===P.type)?(P=c(P,I.props),Ni(P,I),P.return=Z,P):(P=xr(I.type,I.key,I.props,null,Z.mode,ie),Ni(P,I),P.return=Z,P)}function Q(Z,P,I,ie){return P===null||P.tag!==4||P.stateNode.containerInfo!==I.containerInfo||P.stateNode.implementation!==I.implementation?(P=Cl(I,Z.mode,ie),P.return=Z,P):(P=c(P,I.children||[]),P.return=Z,P)}function re(Z,P,I,ie,Re){return P===null||P.tag!==7?(P=Fa(I,Z.mode,ie,Re),P.return=Z,P):(P=c(P,I),P.return=Z,P)}function ce(Z,P,I){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=xi(""+P,Z.mode,I),P.return=Z,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case _:return I=xr(P.type,P.key,P.props,null,Z.mode,I),Ni(I,P),I.return=Z,I;case N:return P=Cl(P,Z.mode,I),P.return=Z,P;case R:return P=Os(P),ce(Z,P,I)}if(ue(P)||ne(P))return P=Fa(P,Z.mode,I,null),P.return=Z,P;if(typeof P.then=="function")return ce(Z,eo(P),I);if(P.$$typeof===M)return ce(Z,Qc(Z,P),I);to(Z,P)}return null}function X(Z,P,I,ie){var Re=P!==null?P.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return Re!==null?null:E(Z,P,""+I,ie);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case _:return I.key===Re?U(Z,P,I,ie):null;case N:return I.key===Re?Q(Z,P,I,ie):null;case R:return I=Os(I),X(Z,P,I,ie)}if(ue(I)||ne(I))return Re!==null?null:re(Z,P,I,ie,null);if(typeof I.then=="function")return X(Z,P,eo(I),ie);if(I.$$typeof===M)return X(Z,P,Qc(Z,I),ie);to(Z,I)}return null}function te(Z,P,I,ie,Re){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Z=Z.get(I)||null,E(P,Z,""+ie,Re);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case _:return Z=Z.get(ie.key===null?I:ie.key)||null,U(P,Z,ie,Re);case N:return Z=Z.get(ie.key===null?I:ie.key)||null,Q(P,Z,ie,Re);case R:return ie=Os(ie),te(Z,P,I,ie,Re)}if(ue(ie)||ne(ie))return Z=Z.get(I)||null,re(P,Z,ie,Re,null);if(typeof ie.then=="function")return te(Z,P,I,eo(ie),Re);if(ie.$$typeof===M)return te(Z,P,I,Qc(P,ie),Re);to(P,ie)}return null}function be(Z,P,I,ie){for(var Re=null,Xe=null,Ne=P,Ve=P=0,Ge=null;Ne!==null&&Ve<I.length;Ve++){Ne.index>Ve?(Ge=Ne,Ne=null):Ge=Ne.sibling;var Je=X(Z,Ne,I[Ve],ie);if(Je===null){Ne===null&&(Ne=Ge);break}e&&Ne&&Je.alternate===null&&t(Z,Ne),P=d(Je,P,Ve),Xe===null?Re=Je:Xe.sibling=Je,Xe=Je,Ne=Ge}if(Ve===I.length)return a(Z,Ne),F&&i(Z,Ve),Re;if(Ne===null){for(;Ve<I.length;Ve++)Ne=ce(Z,I[Ve],ie),Ne!==null&&(P=d(Ne,P,Ve),Xe===null?Re=Ne:Xe.sibling=Ne,Xe=Ne);return F&&i(Z,Ve),Re}for(Ne=l(Ne);Ve<I.length;Ve++)Ge=te(Ne,Z,Ve,I[Ve],ie),Ge!==null&&(e&&Ge.alternate!==null&&Ne.delete(Ge.key===null?Ve:Ge.key),P=d(Ge,P,Ve),Xe===null?Re=Ge:Xe.sibling=Ge,Xe=Ge);return e&&Ne.forEach(function(Fl){return t(Z,Fl)}),F&&i(Z,Ve),Re}function Ae(Z,P,I,ie){if(I==null)throw Error(u(151));for(var Re=null,Xe=null,Ne=P,Ve=P=0,Ge=null,Je=I.next();Ne!==null&&!Je.done;Ve++,Je=I.next()){Ne.index>Ve?(Ge=Ne,Ne=null):Ge=Ne.sibling;var Fl=X(Z,Ne,Je.value,ie);if(Fl===null){Ne===null&&(Ne=Ge);break}e&&Ne&&Fl.alternate===null&&t(Z,Ne),P=d(Fl,P,Ve),Xe===null?Re=Fl:Xe.sibling=Fl,Xe=Fl,Ne=Ge}if(Je.done)return a(Z,Ne),F&&i(Z,Ve),Re;if(Ne===null){for(;!Je.done;Ve++,Je=I.next())Je=ce(Z,Je.value,ie),Je!==null&&(P=d(Je,P,Ve),Xe===null?Re=Je:Xe.sibling=Je,Xe=Je);return F&&i(Z,Ve),Re}for(Ne=l(Ne);!Je.done;Ve++,Je=I.next())Je=te(Ne,Z,Ve,Je.value,ie),Je!==null&&(e&&Je.alternate!==null&&Ne.delete(Je.key===null?Ve:Je.key),P=d(Je,P,Ve),Xe===null?Re=Je:Xe.sibling=Je,Xe=Je);return e&&Ne.forEach(function(py){return t(Z,py)}),F&&i(Z,Ve),Re}function dt(Z,P,I,ie){if(typeof I=="object"&&I!==null&&I.type===O&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case _:e:{for(var Re=I.key;P!==null;){if(P.key===Re){if(Re=I.type,Re===O){if(P.tag===7){a(Z,P.sibling),ie=c(P,I.props.children),ie.return=Z,Z=ie;break e}}else if(P.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===R&&Os(Re)===P.type){a(Z,P.sibling),ie=c(P,I.props),Ni(ie,I),ie.return=Z,Z=ie;break e}a(Z,P);break}else t(Z,P);P=P.sibling}I.type===O?(ie=Fa(I.props.children,Z.mode,ie,I.key),ie.return=Z,Z=ie):(ie=xr(I.type,I.key,I.props,null,Z.mode,ie),Ni(ie,I),ie.return=Z,Z=ie)}return p(Z);case N:e:{for(Re=I.key;P!==null;){if(P.key===Re)if(P.tag===4&&P.stateNode.containerInfo===I.containerInfo&&P.stateNode.implementation===I.implementation){a(Z,P.sibling),ie=c(P,I.children||[]),ie.return=Z,Z=ie;break e}else{a(Z,P);break}else t(Z,P);P=P.sibling}ie=Cl(I,Z.mode,ie),ie.return=Z,Z=ie}return p(Z);case R:return I=Os(I),dt(Z,P,I,ie)}if(ue(I))return be(Z,P,I,ie);if(ne(I)){if(Re=ne(I),typeof Re!="function")throw Error(u(150));return I=Re.call(I),Ae(Z,P,I,ie)}if(typeof I.then=="function")return dt(Z,P,eo(I),ie);if(I.$$typeof===M)return dt(Z,P,Qc(Z,I),ie);to(Z,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,P!==null&&P.tag===6?(a(Z,P.sibling),ie=c(P,I),ie.return=Z,Z=ie):(a(Z,P),ie=xi(I,Z.mode,ie),ie.return=Z,Z=ie),p(Z)):a(Z,P)}return function(Z,P,I,ie){try{ji=0;var Re=dt(Z,P,I,ie);return Nr=null,Re}catch(Ne){if(Ne===jr||Ne===Jc)throw Ne;var Xe=ea(29,Ne,null,Z.mode);return Xe.lanes=ie,Xe.return=Z,Xe}finally{}}}var Ds=Oh(!0),Rh=Oh(!1),Ml=!1;function Ju(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ku(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 Ol(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rl(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Es(e),Ss(e,null,a),t}return $a(e,l,t,a),Es(e)}function wi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,xa(e,a)}}function ed(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var p={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=p:d=d.next=p,a=a.next}while(a!==null);d===null?c=d=t:d=d.next=t}else c=d=t;a={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var td=!1;function Si(){if(td){var e=br;if(e!==null)throw e}}function Ei(e,t,a,l){td=!1;var c=e.updateQueue;Ml=!1;var d=c.firstBaseUpdate,p=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var U=E,Q=U.next;U.next=null,p===null?d=Q:p.next=Q,p=U;var re=e.alternate;re!==null&&(re=re.updateQueue,E=re.lastBaseUpdate,E!==p&&(E===null?re.firstBaseUpdate=Q:E.next=Q,re.lastBaseUpdate=U))}if(d!==null){var ce=c.baseState;p=0,re=Q=U=null,E=d;do{var X=E.lane&-536870913,te=X!==E.lane;if(te?(Fe&X)===X:(l&X)===X){X!==0&&X===yr&&(td=!0),re!==null&&(re=re.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var be=e,Ae=E;X=t;var dt=a;switch(Ae.tag){case 1:if(be=Ae.payload,typeof be=="function"){ce=be.call(dt,ce,X);break e}ce=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=Ae.payload,X=typeof be=="function"?be.call(dt,ce,X):be,X==null)break e;ce=T({},ce,X);break e;case 2:Ml=!0}}X=E.callback,X!==null&&(e.flags|=64,te&&(e.flags|=8192),te=c.callbacks,te===null?c.callbacks=[X]:te.push(X))}else te={lane:X,tag:E.tag,payload:E.payload,callback:E.callback,next:null},re===null?(Q=re=te,U=ce):re=re.next=te,p|=X;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;te=E,E=te.next,te.next=null,c.lastBaseUpdate=te,c.shared.pending=null}}while(!0);re===null&&(U=ce),c.baseState=U,c.firstBaseUpdate=Q,c.lastBaseUpdate=re,d===null&&(c.shared.lanes=0),zl|=p,e.lanes=p,e.memoizedState=ce}}function Dh(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function kh(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Dh(a[e],t)}var wr=H(null),ao=H(0);function Ah(e,t){e=tl,ge(ao,e),ge(wr,t),tl=e|t.baseLanes}function ad(){ge(ao,tl),ge(wr,wr.current)}function nd(){tl=ao.current,se(wr),se(ao)}var Ra=H(null),Ia=null;function Dl(e){var t=e.alternate;ge(Ot,Ot.current&1),ge(Ra,e),Ia===null&&(t===null||wr.current!==null||t.memoizedState!==null)&&(Ia=e)}function ld(e){ge(Ot,Ot.current),ge(Ra,e),Ia===null&&(Ia=e)}function _h(e){e.tag===22?(ge(Ot,Ot.current),ge(Ra,e),Ia===null&&(Ia=e)):kl()}function kl(){ge(Ot,Ot.current),ge(Ra,Ra.current)}function Da(e){se(Ra),Ia===e&&(Ia=null),se(Ot)}var Ot=H(0);function no(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||df(a)||ff(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 Zn=0,qe=null,ot=null,Ht=null,lo=!1,Sr=!1,ks=!1,so=0,Ti=0,Er=null,iv=0;function Nt(){throw Error(u(321))}function sd(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!ra(e[a],t[a]))return!1;return!0}function rd(e,t,a,l,c,d){return Zn=d,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?pm:jd,ks=!1,d=a(l,c),ks=!1,Sr&&(d=Uh(t,a,l,c)),zh(e),d}function zh(e){G.H=Oi;var t=ot!==null&&ot.next!==null;if(Zn=0,Ht=ot=qe=null,lo=!1,Ti=0,Er=null,t)throw Error(u(300));e===null||qt||(e=e.dependencies,e!==null&&vr(e)&&(qt=!0))}function Uh(e,t,a,l){qe=e;var c=0;do{if(Sr&&(Er=null),Ti=0,Sr=!1,25<=c)throw Error(u(301));if(c+=1,Ht=ot=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}G.H=vm,d=t(a,l)}while(Sr);return d}function cv(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?Ci(t):t,e=e.useState()[0],(ot!==null?ot.memoizedState:null)!==e&&(qe.flags|=1024),t}function id(){var e=so!==0;return so=0,e}function cd(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function od(e){if(lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}lo=!1}Zn=0,Ht=ot=qe=null,Sr=!1,Ti=so=0,Er=null}function fa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e,Ht}function Rt(){if(ot===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=Ht===null?qe.memoizedState:Ht.next;if(t!==null)Ht=t,ot=e;else{if(e===null)throw qe.alternate===null?Error(u(467)):Error(u(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e}return Ht}function ro(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ci(e){var t=Ti;return Ti+=1,Er===null&&(Er=[]),e=Th(Er,e,t),t=qe,(Ht===null?t.memoizedState:Ht.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?pm:jd),e}function io(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ci(e);if(e.$$typeof===M)return ta(e)}throw Error(u(438,String(e)))}function ud(e){var t=null,a=qe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=qe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=ro(),qe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=C;return t.index++,a}function Wn(e,t){return typeof t=="function"?t(e):t}function co(e){var t=Rt();return dd(t,ot,e)}function dd(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var c=e.baseQueue,d=l.pending;if(d!==null){if(c!==null){var p=c.next;c.next=d.next,d.next=p}t.baseQueue=c=d,l.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var E=p=null,U=null,Q=t,re=!1;do{var ce=Q.lane&-536870913;if(ce!==Q.lane?(Fe&ce)===ce:(Zn&ce)===ce){var X=Q.revertLane;if(X===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ce===yr&&(re=!0);else if((Zn&X)===X){Q=Q.next,X===yr&&(re=!0);continue}else ce={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},U===null?(E=U=ce,p=d):U=U.next=ce,qe.lanes|=X,zl|=X;ce=Q.action,ks&&a(d,ce),d=Q.hasEagerState?Q.eagerState:a(d,ce)}else X={lane:ce,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},U===null?(E=U=X,p=d):U=U.next=X,qe.lanes|=ce,zl|=ce;Q=Q.next}while(Q!==null&&Q!==t);if(U===null?p=d:U.next=E,!ra(d,e.memoizedState)&&(qt=!0,re&&(a=br,a!==null)))throw a;e.memoizedState=d,e.baseState=p,e.baseQueue=U,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function fd(e){var t=Rt(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,c=a.pending,d=t.memoizedState;if(c!==null){a.pending=null;var p=c=c.next;do d=e(d,p.action),p=p.next;while(p!==c);ra(d,t.memoizedState)||(qt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,l]}function Lh(e,t,a){var l=qe,c=Rt(),d=F;if(d){if(a===void 0)throw Error(u(407));a=a()}else a=t();var p=!ra((ot||c).memoizedState,a);if(p&&(c.memoizedState=a,qt=!0),c=c.queue,gd(Vh.bind(null,l,c,e),[e]),c.getSnapshot!==t||p||Ht!==null&&Ht.memoizedState.tag&1){if(l.flags|=2048,Tr(9,{destroy:void 0},qh.bind(null,l,c,a,t),null),ft===null)throw Error(u(349));d||(Zn&127)!==0||Hh(l,t,a)}return a}function Hh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=ro(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function qh(e,t,a,l){t.value=a,t.getSnapshot=l,Bh(t)&&$h(e)}function Vh(e,t,a){return a(function(){Bh(t)&&$h(e)})}function Bh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!ra(e,a)}catch{return!0}}function $h(e){var t=Ya(e,2);t!==null&&Ta(t,e,2)}function hd(e){var t=fa();if(typeof e=="function"){var a=e;if(e=a(),ks){At(!0);try{a()}finally{At(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function Yh(e,t,a,l){return e.baseState=a,dd(e,ot,typeof l=="function"?l:Wn)}function ov(e,t,a,l,c){if(fo(e))throw Error(u(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(p){d.listeners.push(p)}};G.T!==null?a(!0):d.isTransition=!1,l(d),a=t.pending,a===null?(d.next=t.pending=d,Ph(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Ph(e,t){var a=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=G.T,p={};G.T=p;try{var E=a(c,l),U=G.S;U!==null&&U(p,E),Fh(e,t,E)}catch(Q){md(e,t,Q)}finally{d!==null&&p.types!==null&&(d.types=p.types),G.T=d}}else try{d=a(c,l),Fh(e,t,d)}catch(Q){md(e,t,Q)}}function Fh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Gh(e,t,l)},function(l){return md(e,t,l)}):Gh(e,t,a)}function Gh(e,t,a){t.status="fulfilled",t.value=a,Zh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ph(e,a)))}function md(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Zh(t),t=t.next;while(t!==l)}e.action=null}function Zh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wh(e,t){return t}function Ih(e,t){if(F){var a=ft.formState;if(a!==null){e:{var l=qe;if(F){if(B){t:{for(var c=B,d=ye;c.nodeType!==8;){if(!d){c=null;break t}if(c=Qa(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){B=Qa(c.nextSibling),l=c.data==="F!";break e}}Pe(l)}l=!1}l&&(t=a[0])}}return a=fa(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wh,lastRenderedState:t},a.queue=l,a=mm.bind(null,qe,l),l.dispatch=a,l=hd(!1),d=bd.bind(null,qe,!1,l.queue),l=fa(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,a=ov.bind(null,qe,c,d,a),c.dispatch=a,l.memoizedState=e,[t,a,!1]}function Qh(e){var t=Rt();return Xh(t,ot,e)}function Xh(e,t,a){if(t=dd(e,t,Wh)[0],e=co(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ci(t)}catch(p){throw p===jr?Jc:p}else l=t;t=Rt();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,Tr(9,{destroy:void 0},uv.bind(null,c,a),null)),[l,d,e]}function uv(e,t){e.action=t}function Jh(e){var t=Rt(),a=ot;if(a!==null)return Xh(t,a,e);Rt(),t=t.memoizedState,a=Rt();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function Tr(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=qe.updateQueue,t===null&&(t=ro(),qe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Kh(){return Rt().memoizedState}function oo(e,t,a,l){var c=fa();qe.flags|=e,c.memoizedState=Tr(1|t,{destroy:void 0},a,l===void 0?null:l)}function uo(e,t,a,l){var c=Rt();l=l===void 0?null:l;var d=c.memoizedState.inst;ot!==null&&l!==null&&sd(l,ot.memoizedState.deps)?c.memoizedState=Tr(t,d,a,l):(qe.flags|=e,c.memoizedState=Tr(1|t,d,a,l))}function em(e,t){oo(8390656,8,e,t)}function gd(e,t){uo(2048,8,e,t)}function dv(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=ro(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function tm(e){var t=Rt().memoizedState;return dv({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function am(e,t){return uo(4,2,e,t)}function nm(e,t){return uo(4,4,e,t)}function lm(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 sm(e,t,a){a=a!=null?a.concat([e]):null,uo(4,4,lm.bind(null,t,e),a)}function xd(){}function rm(e,t){var a=Rt();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&sd(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function im(e,t){var a=Rt();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&sd(t,l[1]))return l[0];if(l=e(),ks){At(!0);try{e()}finally{At(!1)}}return a.memoizedState=[l,t],l}function pd(e,t,a){return a===void 0||(Zn&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=c0(),qe.lanes|=e,zl|=e,a)}function cm(e,t,a,l){return ra(a,t)?a:wr.current!==null?(e=pd(e,a,l),ra(e,t)||(qt=!0),e):(Zn&42)===0||(Zn&1073741824)!==0&&(Fe&261930)===0?(qt=!0,e.memoizedState=a):(e=c0(),qe.lanes|=e,zl|=e,t)}function om(e,t,a,l,c){var d=le.p;le.p=d!==0&&8>d?d:8;var p=G.T,E={};G.T=E,bd(e,!1,t,a);try{var U=c(),Q=G.S;if(Q!==null&&Q(E,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var re=rv(U,l);Mi(e,t,re,_a(e))}else Mi(e,t,l,_a(e))}catch(ce){Mi(e,t,{then:function(){},status:"rejected",reason:ce},_a())}finally{le.p=d,p!==null&&E.types!==null&&(p.types=E.types),G.T=p}}function fv(){}function vd(e,t,a,l){if(e.tag!==5)throw Error(u(476));var c=um(e).queue;om(e,c,t,de,a===null?fv:function(){return dm(e),a(l)})}function um(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:de},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function dm(e){var t=um(e);t.next===null&&(t=e.alternate.memoizedState),Mi(e,t.next.queue,{},_a())}function yd(){return ta(Fi)}function fm(){return Rt().memoizedState}function hm(){return Rt().memoizedState}function hv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=_a();e=Ol(a);var l=Rl(t,e,a);l!==null&&(Ta(l,t,a),wi(l,t,a)),t={cache:Wu()},e.payload=t;return}t=t.return}}function mv(e,t,a){var l=_a();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},fo(e)?gm(t,a):(a=hr(e,t,a,l),a!==null&&(Ta(a,e,l),xm(a,t,l)))}function mm(e,t,a){var l=_a();Mi(e,t,a,l)}function Mi(e,t,a,l){var c={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(fo(e))gm(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var p=t.lastRenderedState,E=d(p,a);if(c.hasEagerState=!0,c.eagerState=E,ra(E,p))return $a(e,t,c,0),ft===null&&Tl(),!1}catch{}finally{}if(a=hr(e,t,c,l),a!==null)return Ta(a,e,l),xm(a,t,l),!0}return!1}function bd(e,t,a,l){if(l={lane:2,revertLane:Jd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fo(e)){if(t)throw Error(u(479))}else t=hr(e,a,l,2),t!==null&&Ta(t,e,2)}function fo(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function gm(e,t){Sr=lo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function xm(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,xa(e,a)}}var Oi={readContext:ta,use:io,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};Oi.useEffectEvent=Nt;var pm={readContext:ta,use:io,useCallback:function(e,t){return fa().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:em,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,oo(4194308,4,lm.bind(null,t,e),a)},useLayoutEffect:function(e,t){return oo(4194308,4,e,t)},useInsertionEffect:function(e,t){oo(4,2,e,t)},useMemo:function(e,t){var a=fa();t=t===void 0?null:t;var l=e();if(ks){At(!0);try{e()}finally{At(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=fa();if(a!==void 0){var c=a(t);if(ks){At(!0);try{a(t)}finally{At(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=mv.bind(null,qe,e),[l.memoizedState,e]},useRef:function(e){var t=fa();return e={current:e},t.memoizedState=e},useState:function(e){e=hd(e);var t=e.queue,a=mm.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:xd,useDeferredValue:function(e,t){var a=fa();return pd(a,e,t)},useTransition:function(){var e=hd(!1);return e=om.bind(null,qe,e.queue,!0,!1),fa().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=qe,c=fa();if(F){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),ft===null)throw Error(u(349));(Fe&127)!==0||Hh(l,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,em(Vh.bind(null,l,d,e),[e]),l.flags|=2048,Tr(9,{destroy:void 0},qh.bind(null,l,d,a,t),null),a},useId:function(){var e=fa(),t=ft.identifierPrefix;if(F){var a=g,l=Ga;a=(l&~(1<<32-_t(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=so++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=iv++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:yd,useFormState:Ih,useActionState:Ih,useOptimistic:function(e){var t=fa();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=bd.bind(null,qe,!0,a),a.dispatch=t,[e,t]},useMemoCache:ud,useCacheRefresh:function(){return fa().memoizedState=hv.bind(null,qe)},useEffectEvent:function(e){var t=fa(),a={impl:e};return t.memoizedState=a,function(){if((Ke&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},jd={readContext:ta,use:io,useCallback:rm,useContext:ta,useEffect:gd,useImperativeHandle:sm,useInsertionEffect:am,useLayoutEffect:nm,useMemo:im,useReducer:co,useRef:Kh,useState:function(){return co(Wn)},useDebugValue:xd,useDeferredValue:function(e,t){var a=Rt();return cm(a,ot.memoizedState,e,t)},useTransition:function(){var e=co(Wn)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:Ci(e),t]},useSyncExternalStore:Lh,useId:fm,useHostTransitionStatus:yd,useFormState:Qh,useActionState:Qh,useOptimistic:function(e,t){var a=Rt();return Yh(a,ot,e,t)},useMemoCache:ud,useCacheRefresh:hm};jd.useEffectEvent=tm;var vm={readContext:ta,use:io,useCallback:rm,useContext:ta,useEffect:gd,useImperativeHandle:sm,useInsertionEffect:am,useLayoutEffect:nm,useMemo:im,useReducer:fd,useRef:Kh,useState:function(){return fd(Wn)},useDebugValue:xd,useDeferredValue:function(e,t){var a=Rt();return ot===null?pd(a,e,t):cm(a,ot.memoizedState,e,t)},useTransition:function(){var e=fd(Wn)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:Ci(e),t]},useSyncExternalStore:Lh,useId:fm,useHostTransitionStatus:yd,useFormState:Jh,useActionState:Jh,useOptimistic:function(e,t){var a=Rt();return ot!==null?Yh(a,ot,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:ud,useCacheRefresh:hm};vm.useEffectEvent=tm;function Nd(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:T({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var wd={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=_a(),c=Ol(l);c.payload=t,a!=null&&(c.callback=a),t=Rl(e,c,l),t!==null&&(Ta(t,e,l),wi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=_a(),c=Ol(l);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=Rl(e,c,l),t!==null&&(Ta(t,e,l),wi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=_a(),l=Ol(a);l.tag=2,t!=null&&(l.callback=t),t=Rl(e,l,a),t!==null&&(Ta(t,e,a),wi(t,e,a))}};function ym(e,t,a,l,c,d,p){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,p):t.prototype&&t.prototype.isPureReactComponent?!js(a,l)||!js(c,d):!0}function bm(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&wd.enqueueReplaceState(t,t.state,null)}function As(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=T({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function jm(e){El(e)}function Nm(e){console.error(e)}function wm(e){El(e)}function ho(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Sm(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Sd(e,t,a){return a=Ol(a),a.tag=3,a.payload={element:null},a.callback=function(){ho(e,t)},a}function Em(e){return e=Ol(e),e.tag=3,e}function Tm(e,t,a,l){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=l.value;e.payload=function(){return c(d)},e.callback=function(){Sm(t,a,l)}}var p=a.stateNode;p!==null&&typeof p.componentDidCatch=="function"&&(e.callback=function(){Sm(t,a,l),typeof c!="function"&&(Ul===null?Ul=new Set([this]):Ul.add(this));var E=l.stack;this.componentDidCatch(l.value,{componentStack:E!==null?E:""})})}function gv(e,t,a,l,c){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Wa(t,a,c,!0),a=Ra.current,a!==null){switch(a.tag){case 31:case 13:return Ia===null?Eo():a.alternate===null&&wt===0&&(wt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,l===Kc?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Id(e,l,c)),!1;case 22:return a.flags|=65536,l===Kc?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Id(e,l,c)),!1}throw Error(u(435,a.tag))}return Id(e,l,c),Eo(),!1}if(F)return t=Ra.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Ue&&(e=Error(u(422),{cause:l}),hn(ba(e,a)))):(l!==Ue&&(t=Error(u(423),{cause:l}),hn(ba(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=ba(l,a),c=Sd(e.stateNode,l,c),ed(e,c),wt!==4&&(wt=2)),!1;var d=Error(u(520),{cause:l});if(d=ba(d,a),Li===null?Li=[d]:Li.push(d),wt!==4&&(wt=2),t===null)return!0;l=ba(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Sd(a.stateNode,l,e),ed(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ul===null||!Ul.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Em(c),Tm(c,e,a,l),ed(a,c),!1}a=a.return}while(a!==null);return!1}var Ed=Error(u(461)),qt=!1;function aa(e,t,a,l){t.child=e===null?Rh(t,null,a,l):Ds(t,e.child,a,l)}function Cm(e,t,a,l,c){a=a.render;var d=t.ref;if("ref"in l){var p={};for(var E in l)E!=="ref"&&(p[E]=l[E])}else p=l;return Cs(t),l=rd(e,t,a,p,d,c),E=id(),e!==null&&!qt?(cd(e,t,c),In(e,t,c)):(F&&E&&v(t),t.flags|=1,aa(e,t,l,c),t.child)}function Mm(e,t,a,l,c){if(e===null){var d=a.type;return typeof d=="function"&&!gr(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,Om(e,t,d,l,c)):(e=xr(a.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Ad(e,c)){var p=d.memoizedProps;if(a=a.compare,a=a!==null?a:js,a(p,l)&&e.ref===t.ref)return In(e,t,c)}return t.flags|=1,e=Pa(d,l),e.ref=t.ref,e.return=t,t.child=e}function Om(e,t,a,l,c){if(e!==null){var d=e.memoizedProps;if(js(d,l)&&e.ref===t.ref)if(qt=!1,t.pendingProps=l=d,Ad(e,c))(e.flags&131072)!==0&&(qt=!0);else return t.lanes=e.lanes,In(e,t,c)}return Td(e,t,a,l,c)}function Rm(e,t,a,l){var c=l.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~d}else l=0,t.child=null;return Dm(e,t,d,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xc(t,d!==null?d.cachePool:null),d!==null?Ah(t,d):ad(),_h(t);else return l=t.lanes=536870912,Dm(e,t,d!==null?d.baseLanes|a:a,a,l)}else d!==null?(Xc(t,d.cachePool),Ah(t,d),kl(),t.memoizedState=null):(e!==null&&Xc(t,null),ad(),kl());return aa(e,t,c,a),t.child}function Ri(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Dm(e,t,a,l,c){var d=Qu();return d=d===null?null:{parent:Lt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Xc(t,null),ad(),_h(t),e!==null&&Wa(e,t,l,!0),t.childLanes=c,null}function mo(e,t){return t=xo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function km(e,t,a){return Ds(t,e.child,null,a),e=mo(t,t.pendingProps),e.flags|=2,Da(t),t.memoizedState=null,e}function xv(e,t,a){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(F){if(l.mode==="hidden")return e=mo(t,l),t.lanes=536870912,Ri(null,e);if(ld(t),(e=B)?(e=P0(e,ye),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Ga,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Ic(e),a.return=t,t.child=a,q=t,B=null)):e=null,e===null)throw Pe(t);return t.lanes=536870912,null}return mo(t,l)}var d=e.memoizedState;if(d!==null){var p=d.dehydrated;if(ld(t),c)if(t.flags&256)t.flags&=-257,t=km(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(qt||Wa(e,t,a,!1),c=(a&e.childLanes)!==0,qt||c){if(l=ft,l!==null&&(p=Ir(l,a),p!==0&&p!==d.retryLane))throw d.retryLane=p,Ya(e,p),Ta(l,e,p),Ed;Eo(),t=km(e,t,a)}else e=d.treeContext,B=Qa(p.nextSibling),q=t,F=!0,fe=null,ye=!1,e!==null&&A(t,e),t=mo(t,l),t.flags|=4096;return t}return e=Pa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function go(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(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Td(e,t,a,l,c){return Cs(t),a=rd(e,t,a,l,void 0,c),l=id(),e!==null&&!qt?(cd(e,t,c),In(e,t,c)):(F&&l&&v(t),t.flags|=1,aa(e,t,a,c),t.child)}function Am(e,t,a,l,c,d){return Cs(t),t.updateQueue=null,a=Uh(t,l,a,c),zh(e),l=id(),e!==null&&!qt?(cd(e,t,d),In(e,t,d)):(F&&l&&v(t),t.flags|=1,aa(e,t,a,d),t.child)}function _m(e,t,a,l,c){if(Cs(t),t.stateNode===null){var d=Oa,p=a.contextType;typeof p=="object"&&p!==null&&(d=ta(p)),d=new a(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=wd,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},Ju(t),p=a.contextType,d.context=typeof p=="object"&&p!==null?ta(p):Oa,d.state=t.memoizedState,p=a.getDerivedStateFromProps,typeof p=="function"&&(Nd(t,a,p,l),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(p=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),p!==d.state&&wd.enqueueReplaceState(d,d.state,null),Ei(t,l,d,c),Si(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,U=As(a,E);d.props=U;var Q=d.context,re=a.contextType;p=Oa,typeof re=="object"&&re!==null&&(p=ta(re));var ce=a.getDerivedStateFromProps;re=typeof ce=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,re||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||Q!==p)&&bm(t,d,l,p),Ml=!1;var X=t.memoizedState;d.state=X,Ei(t,l,d,c),Si(),Q=t.memoizedState,E||X!==Q||Ml?(typeof ce=="function"&&(Nd(t,a,ce,l),Q=t.memoizedState),(U=Ml||ym(t,a,U,l,X,Q,p))?(re||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=Q),d.props=l,d.state=Q,d.context=p,l=U):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,Ku(e,t),p=t.memoizedProps,re=As(a,p),d.props=re,ce=t.pendingProps,X=d.context,Q=a.contextType,U=Oa,typeof Q=="object"&&Q!==null&&(U=ta(Q)),E=a.getDerivedStateFromProps,(Q=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(p!==ce||X!==U)&&bm(t,d,l,U),Ml=!1,X=t.memoizedState,d.state=X,Ei(t,l,d,c),Si();var te=t.memoizedState;p!==ce||X!==te||Ml||e!==null&&e.dependencies!==null&&vr(e.dependencies)?(typeof E=="function"&&(Nd(t,a,E,l),te=t.memoizedState),(re=Ml||ym(t,a,re,l,X,te,U)||e!==null&&e.dependencies!==null&&vr(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,te,U),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,te,U)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=te),d.props=l,d.state=te,d.context=U,l=re):(typeof d.componentDidUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||p===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,go(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=Ds(t,e.child,null,c),t.child=Ds(t,null,a,c)):aa(e,t,a,c),t.memoizedState=d.state,e=t.child):e=In(e,t,c),e}function zm(e,t,a,l){return Wt(),t.flags|=256,aa(e,t,a,l),t.child}var Cd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Md(e){return{baseLanes:e,cachePool:Sh()}}function Od(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Aa),e}function Um(e,t,a){var l=t.pendingProps,c=!1,d=(t.flags&128)!==0,p;if((p=d)||(p=e!==null&&e.memoizedState===null?!1:(Ot.current&2)!==0),p&&(c=!0,t.flags&=-129),p=(t.flags&32)!==0,t.flags&=-33,e===null){if(F){if(c?Dl(t):kl(),(e=B)?(e=P0(e,ye),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ja!==null?{id:Ga,overflow:g}:null,retryLane:536870912,hydrationErrors:null},a=Ic(e),a.return=t,t.child=a,q=t,B=null)):e=null,e===null)throw Pe(t);return ff(e)?t.lanes=32:t.lanes=536870912,null}var E=l.children;return l=l.fallback,c?(kl(),c=t.mode,E=xo({mode:"hidden",children:E},c),l=Fa(l,c,a,null),E.return=t,l.return=t,E.sibling=l,t.child=E,l=t.child,l.memoizedState=Md(a),l.childLanes=Od(e,p,a),t.memoizedState=Cd,Ri(null,l)):(Dl(t),Rd(t,E))}var U=e.memoizedState;if(U!==null&&(E=U.dehydrated,E!==null)){if(d)t.flags&256?(Dl(t),t.flags&=-257,t=Dd(e,t,a)):t.memoizedState!==null?(kl(),t.child=e.child,t.flags|=128,t=null):(kl(),E=l.fallback,c=t.mode,l=xo({mode:"visible",children:l.children},c),E=Fa(E,c,a,null),E.flags|=2,l.return=t,E.return=t,l.sibling=E,t.child=l,Ds(t,e.child,null,a),l=t.child,l.memoizedState=Md(a),l.childLanes=Od(e,p,a),t.memoizedState=Cd,t=Ri(null,l));else if(Dl(t),ff(E)){if(p=E.nextSibling&&E.nextSibling.dataset,p)var Q=p.dgst;p=Q,l=Error(u(419)),l.stack="",l.digest=p,hn({value:l,source:null,stack:null}),t=Dd(e,t,a)}else if(qt||Wa(e,t,a,!1),p=(a&e.childLanes)!==0,qt||p){if(p=ft,p!==null&&(l=Ir(p,a),l!==0&&l!==U.retryLane))throw U.retryLane=l,Ya(e,l),Ta(p,e,l),Ed;df(E)||Eo(),t=Dd(e,t,a)}else df(E)?(t.flags|=192,t.child=e.child,t=null):(e=U.treeContext,B=Qa(E.nextSibling),q=t,F=!0,fe=null,ye=!1,e!==null&&A(t,e),t=Rd(t,l.children),t.flags|=4096);return t}return c?(kl(),E=l.fallback,c=t.mode,U=e.child,Q=U.sibling,l=Pa(U,{mode:"hidden",children:l.children}),l.subtreeFlags=U.subtreeFlags&65011712,Q!==null?E=Pa(Q,E):(E=Fa(E,c,a,null),E.flags|=2),E.return=t,l.return=t,l.sibling=E,t.child=l,Ri(null,l),l=t.child,E=e.child.memoizedState,E===null?E=Md(a):(c=E.cachePool,c!==null?(U=Lt._currentValue,c=c.parent!==U?{parent:U,pool:U}:c):c=Sh(),E={baseLanes:E.baseLanes|a,cachePool:c}),l.memoizedState=E,l.childLanes=Od(e,p,a),t.memoizedState=Cd,Ri(e.child,l)):(Dl(t),a=e.child,e=a.sibling,a=Pa(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(p=t.deletions,p===null?(t.deletions=[e],t.flags|=16):p.push(e)),t.child=a,t.memoizedState=null,a)}function Rd(e,t){return t=xo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xo(e,t){return e=ea(22,e,null,t),e.lanes=0,e}function Dd(e,t,a){return Ds(t,e.child,null,a),e=Rd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lm(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),vi(e.return,t,a)}function kd(e,t,a,l,c,d){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:c,treeForkCount:d}:(p.isBackwards=t,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=a,p.tailMode=c,p.treeForkCount=d)}function Hm(e,t,a){var l=t.pendingProps,c=l.revealOrder,d=l.tail;l=l.children;var p=Ot.current,E=(p&2)!==0;if(E?(p=p&1|2,t.flags|=128):p&=1,ge(Ot,p),aa(e,t,l,a),l=F?fn:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Lm(e,a,t);else if(e.tag===19)Lm(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(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&no(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),kd(t,!1,c,a,d,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&no(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}kd(t,!0,a,null,d,l);break;case"together":kd(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function In(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),zl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Wa(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Pa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Pa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Ad(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vr(e)))}function pv(e,t,a){switch(t.tag){case 3:Ze(t,t.stateNode.containerInfo),On(t,Lt,e.memoizedState.cache),Wt();break;case 27:case 5:kt(t);break;case 4:Ze(t,t.stateNode.containerInfo);break;case 10:On(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ld(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Dl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Um(e,t,a):(Dl(t),e=In(e,t,a),e!==null?e.sibling:null);Dl(t);break;case 19:var c=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Wa(e,t,a,!1),l=(a&t.childLanes)!==0),c){if(l)return Hm(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),ge(Ot,Ot.current),l)break;return null;case 22:return t.lanes=0,Rm(e,t,a,t.pendingProps);case 24:On(t,Lt,e.memoizedState.cache)}return In(e,t,a)}function qm(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)qt=!0;else{if(!Ad(e,a)&&(t.flags&128)===0)return qt=!1,pv(e,t,a);qt=(e.flags&131072)!==0}else qt=!1,F&&(t.flags&1048576)!==0&&m(t,fn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Os(t.elementType),t.type=e,typeof e=="function")gr(e)?(l=As(e,l),t.tag=1,t=_m(null,t,e,l,a)):(t.tag=0,t=Td(null,t,e,l,a));else{if(e!=null){var c=e.$$typeof;if(c===V){t.tag=11,t=Cm(null,t,e,l,a);break e}else if(c===W){t.tag=14,t=Mm(null,t,e,l,a);break e}}throw t=ve(e)||e,Error(u(306,t,""))}}return t;case 0:return Td(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,c=As(l,t.pendingProps),_m(e,t,l,c,a);case 3:e:{if(Ze(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,Ku(e,t),Ei(t,l,null,a);var p=t.memoizedState;if(l=p.cache,On(t,Lt,l),l!==d.cache&&Gn(t,[Lt],a,!0),Si(),l=p.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:p.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=zm(e,t,l,a);break e}else if(l!==c){c=ba(Error(u(424)),t),hn(c),t=zm(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(B=Qa(e.firstChild),q=t,F=!0,fe=null,ye=!0,a=Rh(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Wt(),l===c){t=In(e,t,a);break e}aa(e,t,l,a)}t=t.child}return t;case 26:return go(e,t),e===null?(a=Q0(t.type,null,t.pendingProps,null))?t.memoizedState=a:F||(a=t.type,e=t.pendingProps,l=ko(xe.current).createElement(a),l[Tt]=t,l[$t]=e,na(l,a,e),Ut(l),t.stateNode=l):t.memoizedState=Q0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return kt(t),e===null&&F&&(l=t.stateNode=Z0(t.type,t.pendingProps,xe.current),q=t,ye=!0,c=B,Vl(t.type)?(hf=c,B=Qa(l.firstChild)):B=c),aa(e,t,t.pendingProps.children,a),go(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&F&&((c=l=B)&&(l=Zv(l,t.type,t.pendingProps,ye),l!==null?(t.stateNode=l,q=t,B=Qa(l.firstChild),ye=!1,c=!0):c=!1),c||Pe(t)),kt(t),c=t.type,d=t.pendingProps,p=e!==null?e.memoizedProps:null,l=d.children,cf(c,d)?l=null:p!==null&&cf(c,p)&&(t.flags|=32),t.memoizedState!==null&&(c=rd(e,t,cv,null,null,a),Fi._currentValue=c),go(e,t),aa(e,t,l,a),t.child;case 6:return e===null&&F&&((e=a=B)&&(a=Wv(a,t.pendingProps,ye),a!==null?(t.stateNode=a,q=t,B=null,e=!0):e=!1),e||Pe(t)),null;case 13:return Um(e,t,a);case 4:return Ze(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ds(t,null,l,a):aa(e,t,l,a),t.child;case 11:return Cm(e,t,t.type,t.pendingProps,a);case 7:return aa(e,t,t.pendingProps,a),t.child;case 8:return aa(e,t,t.pendingProps.children,a),t.child;case 12:return aa(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,On(t,t.type,l.value),aa(e,t,l.children,a),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Cs(t),c=ta(c),l=l(c),t.flags|=1,aa(e,t,l,a),t.child;case 14:return Mm(e,t,t.type,t.pendingProps,a);case 15:return Om(e,t,t.type,t.pendingProps,a);case 19:return Hm(e,t,a);case 31:return xv(e,t,a);case 22:return Rm(e,t,a,t.pendingProps);case 24:return Cs(t),l=ta(Lt),e===null?(c=Qu(),c===null&&(c=ft,d=Wu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:l,cache:c},Ju(t),On(t,Lt,c)):((e.lanes&a)!==0&&(Ku(e,t),Ei(t,null,null,a),Si()),c=e.memoizedState,d=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),On(t,Lt,l)):(l=d.cache,On(t,Lt,l),l!==c.cache&&Gn(t,[Lt],a,!0))),aa(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Qn(e){e.flags|=4}function _d(e,t,a,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(f0())e.flags|=8192;else throw Rs=Kc,Xu}else e.flags&=-16777217}function Vm(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!tg(t))if(f0())e.flags|=8192;else throw Rs=Kc,Xu}function po(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wr():536870912,e.lanes|=t,Rr|=t)}function Di(e,t){if(!F)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function xt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function vv(e,t,a){var l=t.pendingProps;switch(S(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return xt(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),mn(Lt),We(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Zt(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Mn())),xt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(Qn(t),d!==null?(xt(t),Vm(t,d)):(xt(t),_d(t,c,null,l,a))):d?d!==e.memoizedState?(Qn(t),xt(t),Vm(t,d)):(xt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Qn(t),xt(t),_d(t,c,e,l,a)),null;case 27:if(ha(t),a=xe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return xt(t),null}e=pe.current,Zt(t)?ke(t):(e=Z0(c,l,a),t.stateNode=e,Qn(t))}return xt(t),null;case 5:if(ha(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return xt(t),null}if(d=pe.current,Zt(t))ke(t);else{var p=ko(xe.current);switch(d){case 1:d=p.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=p.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=p.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=p.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof l.is=="string"?p.createElement("select",{is:l.is}):p.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?p.createElement(c,{is:l.is}):p.createElement(c)}}d[Tt]=t,d[$t]=l;e:for(p=t.child;p!==null;){if(p.tag===5||p.tag===6)d.appendChild(p.stateNode);else if(p.tag!==4&&p.tag!==27&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;p=p.return}p.sibling.return=p.return,p=p.sibling}t.stateNode=d;e:switch(na(d,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Qn(t)}}return xt(t),_d(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Qn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=xe.current,Zt(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,c=q,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||U0(e.nodeValue,a)),e||Pe(t,!0)}else e=ko(e).createTextNode(l),e[Tt]=t,t.stateNode=e}return xt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Zt(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Tt]=t}else Wt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;xt(t),e=!1}else a=Mn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Da(t),t):(Da(t),null);if((t.flags&128)!==0)throw Error(u(558))}return xt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Zt(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(u(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(u(317));c[Tt]=t}else Wt(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;xt(t),c=!1}else c=Mn(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(Da(t),t):(Da(t),null)}return Da(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==c&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),po(t,t.updateQueue),xt(t),null);case 4:return We(),e===null&&af(t.stateNode.containerInfo),xt(t),null;case 10:return mn(t.type),xt(t),null;case 19:if(se(Ot),l=t.memoizedState,l===null)return xt(t),null;if(c=(t.flags&128)!==0,d=l.rendering,d===null)if(c)Di(l,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=no(e),d!==null){for(t.flags|=128,Di(l,!1),e=d.updateQueue,t.updateQueue=e,po(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Wc(a,e),a=a.sibling;return ge(Ot,Ot.current&1|2),F&&i(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Qt()>No&&(t.flags|=128,c=!0,Di(l,!1),t.lanes=4194304)}else{if(!c)if(e=no(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,po(t,e),Di(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!F)return xt(t),null}else 2*Qt()-l.renderingStartTime>No&&a!==536870912&&(t.flags|=128,c=!0,Di(l,!1),t.lanes=4194304);l.isBackwards?(d.sibling=t.child,t.child=d):(e=l.last,e!==null?e.sibling=d:t.child=d,l.last=d)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Qt(),e.sibling=null,a=Ot.current,ge(Ot,c?a&1|2:a&1),F&&i(t,l.treeForkCount),e):(xt(t),null);case 22:case 23:return Da(t),nd(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),a=t.updateQueue,a!==null&&po(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&se(Ms),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),mn(Lt),xt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function yv(e,t){switch(S(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mn(Lt),We(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ha(t),null;case 31:if(t.memoizedState!==null){if(Da(t),t.alternate===null)throw Error(u(340));Wt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Wt()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(Ot),null;case 4:return We(),null;case 10:return mn(t.type),null;case 22:case 23:return Da(t),nd(),e!==null&&se(Ms),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return mn(Lt),null;case 25:return null;default:return null}}function Bm(e,t){switch(S(t),t.tag){case 3:mn(Lt),We();break;case 26:case 27:case 5:ha(t);break;case 4:We();break;case 31:t.memoizedState!==null&&Da(t);break;case 13:Da(t);break;case 19:se(Ot);break;case 10:mn(t.type);break;case 22:case 23:Da(t),nd(),e!==null&&se(Ms);break;case 24:mn(Lt)}}function ki(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var c=l.next;a=c;do{if((a.tag&e)===e){l=void 0;var d=a.create,p=a.inst;l=d(),p.destroy=l}a=a.next}while(a!==c)}}catch(E){rt(t,t.return,E)}}function Al(e,t,a){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&e)===e){var p=l.inst,E=p.destroy;if(E!==void 0){p.destroy=void 0,c=t;var U=a,Q=E;try{Q()}catch(re){rt(c,U,re)}}}l=l.next}while(l!==d)}}catch(re){rt(t,t.return,re)}}function $m(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{kh(t,a)}catch(l){rt(e,e.return,l)}}}function Ym(e,t,a){a.props=As(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){rt(e,t,l)}}function Ai(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(c){rt(e,t,c)}}function Rn(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(c){rt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){rt(e,t,c)}else a.current=null}function Pm(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(c){rt(e,e.return,c)}}function zd(e,t,a){try{var l=e.stateNode;Bv(l,e.type,a,t),l[$t]=t}catch(c){rt(e,e.return,c)}}function Fm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Vl(e.type)||e.tag===4}function Ud(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fm(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&&Vl(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 Ld(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Va));else if(l!==4&&(l===27&&Vl(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Ld(e,t,a),e=e.sibling;e!==null;)Ld(e,t,a),e=e.sibling}function vo(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Vl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(vo(e,t,a),e=e.sibling;e!==null;)vo(e,t,a),e=e.sibling}function Gm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);na(t,l,a),t[Tt]=e,t[$t]=a}catch(d){rt(e,e.return,d)}}var Xn=!1,Vt=!1,Hd=!1,Zm=typeof WeakSet=="function"?WeakSet:Set,It=null;function bv(e,t){if(e=e.containerInfo,sf=qo,e=Fu(e),or(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var p=0,E=-1,U=-1,Q=0,re=0,ce=e,X=null;t:for(;;){for(var te;ce!==a||c!==0&&ce.nodeType!==3||(E=p+c),ce!==d||l!==0&&ce.nodeType!==3||(U=p+l),ce.nodeType===3&&(p+=ce.nodeValue.length),(te=ce.firstChild)!==null;)X=ce,ce=te;for(;;){if(ce===e)break t;if(X===a&&++Q===c&&(E=p),X===d&&++re===l&&(U=p),(te=ce.nextSibling)!==null)break;ce=X,X=ce.parentNode}ce=te}a=E===-1||U===-1?null:{start:E,end:U}}else a=null}a=a||{start:0,end:0}}else a=null;for(rf={focusedElem:e,selectionRange:a},qo=!1,It=t;It!==null;)if(t=It,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,It=e;else for(;It!==null;){switch(t=It,d=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++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,c=d.memoizedProps,d=d.memoizedState,l=a.stateNode;try{var be=As(a.type,c);e=l.getSnapshotBeforeUpdate(be,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){rt(a,a.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)uf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,It=e;break}It=t.return}}function Wm(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Kn(e,a),l&4&&ki(5,a);break;case 1:if(Kn(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(p){rt(a,a.return,p)}else{var c=As(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(p){rt(a,a.return,p)}}l&64&&$m(a),l&512&&Ai(a,a.return);break;case 3:if(Kn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{kh(e,t)}catch(p){rt(a,a.return,p)}}break;case 27:t===null&&l&4&&Gm(a);case 26:case 5:Kn(e,a),t===null&&l&4&&Pm(a),l&512&&Ai(a,a.return);break;case 12:Kn(e,a);break;case 31:Kn(e,a),l&4&&Xm(e,a);break;case 13:Kn(e,a),l&4&&Jm(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ov.bind(null,a),Iv(e,a))));break;case 22:if(l=a.memoizedState!==null||Xn,!l){t=t!==null&&t.memoizedState!==null||Vt,c=Xn;var d=Vt;Xn=l,(Vt=t)&&!d?el(e,a,(a.subtreeFlags&8772)!==0):Kn(e,a),Xn=c,Vt=d}break;case 30:break;default:Kn(e,a)}}function Im(e){var t=e.alternate;t!==null&&(e.alternate=null,Im(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Js(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 pt=null,Na=!1;function Jn(e,t,a){for(a=a.child;a!==null;)Qm(e,t,a),a=a.sibling}function Qm(e,t,a){if(Bt&&typeof Bt.onCommitFiberUnmount=="function")try{Bt.onCommitFiberUnmount(mt,a)}catch{}switch(a.tag){case 26:Vt||Rn(a,t),Jn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Vt||Rn(a,t);var l=pt,c=Na;Vl(a.type)&&(pt=a.stateNode,Na=!1),Jn(e,t,a),$i(a.stateNode),pt=l,Na=c;break;case 5:Vt||Rn(a,t);case 6:if(l=pt,c=Na,pt=null,Jn(e,t,a),pt=l,Na=c,pt!==null)if(Na)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(a.stateNode)}catch(d){rt(a,t,d)}else try{pt.removeChild(a.stateNode)}catch(d){rt(a,t,d)}break;case 18:pt!==null&&(Na?(e=pt,$0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Hr(e)):$0(pt,a.stateNode));break;case 4:l=pt,c=Na,pt=a.stateNode.containerInfo,Na=!0,Jn(e,t,a),pt=l,Na=c;break;case 0:case 11:case 14:case 15:Al(2,a,t),Vt||Al(4,a,t),Jn(e,t,a);break;case 1:Vt||(Rn(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Ym(a,t,l)),Jn(e,t,a);break;case 21:Jn(e,t,a);break;case 22:Vt=(l=Vt)||a.memoizedState!==null,Jn(e,t,a),Vt=l;break;default:Jn(e,t,a)}}function Xm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hr(e)}catch(a){rt(t,t.return,a)}}}function Jm(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hr(e)}catch(a){rt(t,t.return,a)}}function jv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zm),t;default:throw Error(u(435,e.tag))}}function yo(e,t){var a=jv(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var c=Rv.bind(null,e,l);l.then(c,c)}})}function wa(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var c=a[l],d=e,p=t,E=p;e:for(;E!==null;){switch(E.tag){case 27:if(Vl(E.type)){pt=E.stateNode,Na=!1;break e}break;case 5:pt=E.stateNode,Na=!1;break e;case 3:case 4:pt=E.stateNode.containerInfo,Na=!0;break e}E=E.return}if(pt===null)throw Error(u(160));Qm(d,p,c),pt=null,Na=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Km(t,e),t=t.sibling}var gn=null;function Km(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wa(t,e),Sa(e),l&4&&(Al(3,e,e.return),ki(3,e),Al(5,e,e.return));break;case 1:wa(t,e),Sa(e),l&512&&(Vt||a===null||Rn(a,a.return)),l&64&&Xn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var c=gn;if(wa(t,e),Sa(e),l&512&&(Vt||a===null||Rn(a,a.return)),l&4){var d=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":d=c.getElementsByTagName("title")[0],(!d||d[as]||d[Tt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),na(d,l,a),d[Tt]=e,Ut(d),l=d;break e;case"link":var p=K0("link","href",c).get(l+(a.href||""));if(p){for(var E=0;E<p.length;E++)if(d=p[E],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){p.splice(E,1);break t}}d=c.createElement(l),na(d,l,a),c.head.appendChild(d);break;case"meta":if(p=K0("meta","content",c).get(l+(a.content||""))){for(E=0;E<p.length;E++)if(d=p[E],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){p.splice(E,1);break t}}d=c.createElement(l),na(d,l,a),c.head.appendChild(d);break;default:throw Error(u(468,l))}d[Tt]=e,Ut(d),l=d}e.stateNode=l}else eg(c,e.type,e.stateNode);else e.stateNode=J0(c,l,e.memoizedProps);else d!==l?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,l===null?eg(c,e.type,e.stateNode):J0(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&zd(e,e.memoizedProps,a.memoizedProps)}break;case 27:wa(t,e),Sa(e),l&512&&(Vt||a===null||Rn(a,a.return)),a!==null&&l&4&&zd(e,e.memoizedProps,a.memoizedProps);break;case 5:if(wa(t,e),Sa(e),l&512&&(Vt||a===null||Rn(a,a.return)),e.flags&32){c=e.stateNode;try{cn(c,"")}catch(be){rt(e,e.return,be)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,zd(e,c,a!==null?a.memoizedProps:c)),l&1024&&(Hd=!0);break;case 6:if(wa(t,e),Sa(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(be){rt(e,e.return,be)}}break;case 3:if(zo=null,c=gn,gn=Ao(t.containerInfo),wa(t,e),gn=c,Sa(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Hr(t.containerInfo)}catch(be){rt(e,e.return,be)}Hd&&(Hd=!1,e0(e));break;case 4:l=gn,gn=Ao(e.stateNode.containerInfo),wa(t,e),Sa(e),gn=l;break;case 12:wa(t,e),Sa(e);break;case 31:wa(t,e),Sa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yo(e,l)));break;case 13:wa(t,e),Sa(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(jo=Qt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yo(e,l)));break;case 22:c=e.memoizedState!==null;var U=a!==null&&a.memoizedState!==null,Q=Xn,re=Vt;if(Xn=Q||c,Vt=re||U,wa(t,e),Vt=re,Xn=Q,Sa(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||U||Xn||Vt||_s(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){U=a=t;try{if(d=U.stateNode,c)p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none";else{E=U.stateNode;var ce=U.memoizedProps.style,X=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;E.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(be){rt(U,U.return,be)}}}else if(t.tag===6){if(a===null){U=t;try{U.stateNode.nodeValue=c?"":U.memoizedProps}catch(be){rt(U,U.return,be)}}}else if(t.tag===18){if(a===null){U=t;try{var te=U.stateNode;c?Y0(te,!0):Y0(U.stateNode,!1)}catch(be){rt(U,U.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}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,yo(e,a))));break;case 19:wa(t,e),Sa(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yo(e,l)));break;case 30:break;case 21:break;default:wa(t,e),Sa(e)}}function Sa(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Fm(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var c=a.stateNode,d=Ud(e);vo(e,d,c);break;case 5:var p=a.stateNode;a.flags&32&&(cn(p,""),a.flags&=-33);var E=Ud(e);vo(e,E,p);break;case 3:case 4:var U=a.stateNode.containerInfo,Q=Ud(e);Ld(e,Q,U);break;default:throw Error(u(161))}}catch(re){rt(e,e.return,re)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function e0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;e0(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Kn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Wm(e,t.alternate,t),t=t.sibling}function _s(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Al(4,t,t.return),_s(t);break;case 1:Rn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Ym(t,t.return,a),_s(t);break;case 27:$i(t.stateNode);case 26:case 5:Rn(t,t.return),_s(t);break;case 22:t.memoizedState===null&&_s(t);break;case 30:_s(t);break;default:_s(t)}e=e.sibling}}function el(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,d=t,p=d.flags;switch(d.tag){case 0:case 11:case 15:el(c,d,a),ki(4,d);break;case 1:if(el(c,d,a),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){rt(l,l.return,Q)}if(l=d,c=l.updateQueue,c!==null){var E=l.stateNode;try{var U=c.shared.hiddenCallbacks;if(U!==null)for(c.shared.hiddenCallbacks=null,c=0;c<U.length;c++)Dh(U[c],E)}catch(Q){rt(l,l.return,Q)}}a&&p&64&&$m(d),Ai(d,d.return);break;case 27:Gm(d);case 26:case 5:el(c,d,a),a&&l===null&&p&4&&Pm(d),Ai(d,d.return);break;case 12:el(c,d,a);break;case 31:el(c,d,a),a&&p&4&&Xm(c,d);break;case 13:el(c,d,a),a&&p&4&&Jm(c,d);break;case 22:d.memoizedState===null&&el(c,d,a),Ai(d,d.return);break;case 30:break;default:el(c,d,a)}t=t.sibling}}function qd(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&&yi(a))}function Vd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e))}function xn(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)t0(e,t,a,l),t=t.sibling}function t0(e,t,a,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:xn(e,t,a,l),c&2048&&ki(9,t);break;case 1:xn(e,t,a,l);break;case 3:xn(e,t,a,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&yi(e)));break;case 12:if(c&2048){xn(e,t,a,l),e=t.stateNode;try{var d=t.memoizedProps,p=d.id,E=d.onPostCommit;typeof E=="function"&&E(p,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(U){rt(t,t.return,U)}}else xn(e,t,a,l);break;case 31:xn(e,t,a,l);break;case 13:xn(e,t,a,l);break;case 23:break;case 22:d=t.stateNode,p=t.alternate,t.memoizedState!==null?d._visibility&2?xn(e,t,a,l):_i(e,t):d._visibility&2?xn(e,t,a,l):(d._visibility|=2,Cr(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&qd(p,t);break;case 24:xn(e,t,a,l),c&2048&&Vd(t.alternate,t);break;default:xn(e,t,a,l)}}function Cr(e,t,a,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,p=t,E=a,U=l,Q=p.flags;switch(p.tag){case 0:case 11:case 15:Cr(d,p,E,U,c),ki(8,p);break;case 23:break;case 22:var re=p.stateNode;p.memoizedState!==null?re._visibility&2?Cr(d,p,E,U,c):_i(d,p):(re._visibility|=2,Cr(d,p,E,U,c)),c&&Q&2048&&qd(p.alternate,p);break;case 24:Cr(d,p,E,U,c),c&&Q&2048&&Vd(p.alternate,p);break;default:Cr(d,p,E,U,c)}t=t.sibling}}function _i(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,c=l.flags;switch(l.tag){case 22:_i(a,l),c&2048&&qd(l.alternate,l);break;case 24:_i(a,l),c&2048&&Vd(l.alternate,l);break;default:_i(a,l)}t=t.sibling}}var zi=8192;function Mr(e,t,a){if(e.subtreeFlags&zi)for(e=e.child;e!==null;)a0(e,t,a),e=e.sibling}function a0(e,t,a){switch(e.tag){case 26:Mr(e,t,a),e.flags&zi&&e.memoizedState!==null&&iy(a,gn,e.memoizedState,e.memoizedProps);break;case 5:Mr(e,t,a);break;case 3:case 4:var l=gn;gn=Ao(e.stateNode.containerInfo),Mr(e,t,a),gn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=zi,zi=16777216,Mr(e,t,a),zi=l):Mr(e,t,a));break;default:Mr(e,t,a)}}function n0(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 Ui(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];It=l,s0(l,e)}n0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)l0(e),e=e.sibling}function l0(e){switch(e.tag){case 0:case 11:case 15:Ui(e),e.flags&2048&&Al(9,e,e.return);break;case 3:Ui(e);break;case 12:Ui(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,bo(e)):Ui(e);break;default:Ui(e)}}function bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];It=l,s0(l,e)}n0(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Al(8,t,t.return),bo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,bo(t));break;default:bo(t)}e=e.sibling}}function s0(e,t){for(;It!==null;){var a=It;switch(a.tag){case 0:case 11:case 15:Al(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:yi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,It=l;else e:for(a=e;It!==null;){l=It;var c=l.sibling,d=l.return;if(Im(l),l===a){It=null;break e}if(c!==null){c.return=d,It=c;break e}It=d}}}var Nv={getCacheForType:function(e){var t=ta(Lt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return ta(Lt).controller.signal}},wv=typeof WeakMap=="function"?WeakMap:Map,Ke=0,ft=null,Be=null,Fe=0,st=0,ka=null,_l=!1,Or=!1,Bd=!1,tl=0,wt=0,zl=0,zs=0,$d=0,Aa=0,Rr=0,Li=null,Ea=null,Yd=!1,jo=0,r0=0,No=1/0,wo=null,Ul=null,Pt=0,Ll=null,Dr=null,al=0,Pd=0,Fd=null,i0=null,Hi=0,Gd=null;function _a(){return(Ke&2)!==0&&Fe!==0?Fe&-Fe:G.T!==null?Jd():Xs()}function c0(){if(Aa===0)if((Fe&536870912)===0||F){var e=jt;jt<<=1,(jt&3932160)===0&&(jt=262144),Aa=e}else Aa=536870912;return e=Ra.current,e!==null&&(e.flags|=32),Aa}function Ta(e,t,a){(e===ft&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(kr(e,0),Hl(e,Fe,Aa,!1)),fl(e,a),((Ke&2)===0||e!==ft)&&(e===ft&&((Ke&2)===0&&(zs|=a),wt===4&&Hl(e,Fe,Aa,!1)),Dn(e))}function o0(e,t,a){if((Ke&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||dl(e,t),c=l?Tv(e,t):Wd(e,t,!0),d=l;do{if(c===0){Or&&!l&&Hl(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!Sv(a)){c=Wd(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var p=0;else p=e.pendingLanes&-536870913,p=p!==0?p:p&536870912?536870912:0;if(p!==0){t=p;e:{var E=e;c=Li;var U=E.current.memoizedState.isDehydrated;if(U&&(kr(E,p).flags|=256),p=Wd(E,p,!1),p!==2){if(Bd&&!U){E.errorRecoveryDisabledLanes|=d,zs|=d,c=4;break e}d=Ea,Ea=c,d!==null&&(Ea===null?Ea=d:Ea.push.apply(Ea,d))}c=p}if(d=!1,c!==2)continue}}if(c===1){kr(e,0),Hl(e,t,0,!0);break}e:{switch(l=e,d=c,d){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Hl(l,t,Aa,!_l);break e;case 2:Ea=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(c=jo+300-Qt(),10<c)){if(Hl(l,t,Aa,!_l),es(l,0,!0)!==0)break e;al=t,l.timeoutHandle=V0(u0.bind(null,l,a,Ea,wo,Yd,t,Aa,zs,Rr,_l,d,"Throttled",-0,0),c);break e}u0(l,a,Ea,wo,Yd,t,Aa,zs,Rr,_l,d,null,-0,0)}}break}while(!0);Dn(e)}function u0(e,t,a,l,c,d,p,E,U,Q,re,ce,X,te){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Va},a0(t,d,ce);var be=(d&62914560)===d?jo-Qt():(d&4194048)===d?r0-Qt():0;if(be=cy(ce,be),be!==null){al=d,e.cancelPendingCommit=be(v0.bind(null,e,t,d,a,l,c,p,E,U,re,ce,null,X,te)),Hl(e,d,p,!Q);return}}v0(e,t,d,a,l,c,p,E,U)}function Sv(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var c=a[l],d=c.getSnapshot;c=c.value;try{if(!ra(d(),c))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 Hl(e,t,a,l){t&=~$d,t&=~zs,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-_t(c),p=1<<d;l[d]=-1,c&=~p}a!==0&&ht(e,a,t)}function So(){return(Ke&6)===0?(qi(0),!1):!0}function Zd(){if(Be!==null){if(st===0)var e=Be.return;else e=Be,Za=Fn=null,od(e),Nr=null,ji=0,e=Be;for(;e!==null;)Bm(e.alternate,e),e=e.return;Be=null}}function kr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Pv(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),al=0,Zd(),ft=e,Be=a=Pa(e.current,null),Fe=t,st=0,ka=null,_l=!1,Or=dl(e,t),Bd=!1,Rr=Aa=$d=zs=zl=wt=0,Ea=Li=null,Yd=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-_t(l),d=1<<c;t|=e[c],l&=~d}return tl=t,Tl(),a}function d0(e,t){qe=null,G.H=Oi,t===jr||t===Jc?(t=Ch(),st=3):t===Xu?(t=Ch(),st=4):st=t===Ed?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,ka=t,Be===null&&(wt=1,ho(e,ba(t,e.current)))}function f0(){var e=Ra.current;return e===null?!0:(Fe&4194048)===Fe?Ia===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===Ia:!1}function h0(){var e=G.H;return G.H=Oi,e===null?Oi:e}function m0(){var e=G.A;return G.A=Nv,e}function Eo(){wt=4,_l||(Fe&4194048)!==Fe&&Ra.current!==null||(Or=!0),(zl&134217727)===0&&(zs&134217727)===0||ft===null||Hl(ft,Fe,Aa,!1)}function Wd(e,t,a){var l=Ke;Ke|=2;var c=h0(),d=m0();(ft!==e||Fe!==t)&&(wo=null,kr(e,t)),t=!1;var p=wt;e:do try{if(st!==0&&Be!==null){var E=Be,U=ka;switch(st){case 8:Zd(),p=6;break e;case 3:case 2:case 9:case 6:Ra.current===null&&(t=!0);var Q=st;if(st=0,ka=null,Ar(e,E,U,Q),a&&Or){p=0;break e}break;default:Q=st,st=0,ka=null,Ar(e,E,U,Q)}}Ev(),p=wt;break}catch(re){d0(e,re)}while(!0);return t&&e.shellSuspendCounter++,Za=Fn=null,Ke=l,G.H=c,G.A=d,Be===null&&(ft=null,Fe=0,Tl()),p}function Ev(){for(;Be!==null;)g0(Be)}function Tv(e,t){var a=Ke;Ke|=2;var l=h0(),c=m0();ft!==e||Fe!==t?(wo=null,No=Qt()+500,kr(e,t)):Or=dl(e,t);e:do try{if(st!==0&&Be!==null){t=Be;var d=ka;t:switch(st){case 1:st=0,ka=null,Ar(e,t,d,1);break;case 2:case 9:if(Eh(d)){st=0,ka=null,x0(t);break}t=function(){st!==2&&st!==9||ft!==e||(st=7),Dn(e)},d.then(t,t);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:Eh(d)?(st=0,ka=null,x0(t)):(st=0,ka=null,Ar(e,t,d,7));break;case 5:var p=null;switch(Be.tag){case 26:p=Be.memoizedState;case 5:case 27:var E=Be;if(p?tg(p):E.stateNode.complete){st=0,ka=null;var U=E.sibling;if(U!==null)Be=U;else{var Q=E.return;Q!==null?(Be=Q,To(Q)):Be=null}break t}}st=0,ka=null,Ar(e,t,d,5);break;case 6:st=0,ka=null,Ar(e,t,d,6);break;case 8:Zd(),wt=6;break e;default:throw Error(u(462))}}Cv();break}catch(re){d0(e,re)}while(!0);return Za=Fn=null,G.H=l,G.A=c,Ke=a,Be!==null?0:(ft=null,Fe=0,Tl(),wt)}function Cv(){for(;Be!==null&&!qa();)g0(Be)}function g0(e){var t=qm(e.alternate,e,tl);e.memoizedProps=e.pendingProps,t===null?To(e):Be=t}function x0(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Am(a,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=Am(a,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:od(t);default:Bm(a,t),t=Be=Wc(t,tl),t=qm(a,t,tl)}e.memoizedProps=e.pendingProps,t===null?To(e):Be=t}function Ar(e,t,a,l){Za=Fn=null,od(t),Nr=null,ji=0;var c=t.return;try{if(gv(e,c,t,a,Fe)){wt=1,ho(e,ba(a,e.current)),Be=null;return}}catch(d){if(c!==null)throw Be=c,d;wt=1,ho(e,ba(a,e.current)),Be=null;return}t.flags&32768?(F||l===1?e=!0:Or||(Fe&536870912)!==0?e=!1:(_l=e=!0,(l===2||l===9||l===3||l===6)&&(l=Ra.current,l!==null&&l.tag===13&&(l.flags|=16384))),p0(t,e)):To(t)}function To(e){var t=e;do{if((t.flags&32768)!==0){p0(t,_l);return}e=t.return;var a=vv(t.alternate,t,tl);if(a!==null){Be=a;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);wt===0&&(wt=5)}function p0(e,t){do{var a=yv(e.alternate,e);if(a!==null){a.flags&=32767,Be=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=a}while(e!==null);wt=6,Be=null}function v0(e,t,a,l,c,d,p,E,U){e.cancelPendingCommit=null;do Co();while(Pt!==0);if((Ke&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(d=t.lanes|t.childLanes,d|=ws,bc(e,a,d,p,E,U),e===ft&&(Be=ft=null,Fe=0),Dr=t,Ll=e,al=a,Pd=d,Fd=c,i0=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Dv(_n,function(){return w0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=G.T,G.T=null,c=le.p,le.p=2,p=Ke,Ke|=4;try{bv(e,t,a)}finally{Ke=p,le.p=c,G.T=l}}Pt=1,y0(),b0(),j0()}}function y0(){if(Pt===1){Pt=0;var e=Ll,t=Dr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null;var l=le.p;le.p=2;var c=Ke;Ke|=4;try{Km(t,e);var d=rf,p=Fu(e.containerInfo),E=d.focusedElem,U=d.selectionRange;if(p!==E&&E&&E.ownerDocument&&Qe(E.ownerDocument.documentElement,E)){if(U!==null&&or(E)){var Q=U.start,re=U.end;if(re===void 0&&(re=Q),"selectionStart"in E)E.selectionStart=Q,E.selectionEnd=Math.min(re,E.value.length);else{var ce=E.ownerDocument||document,X=ce&&ce.defaultView||window;if(X.getSelection){var te=X.getSelection(),be=E.textContent.length,Ae=Math.min(U.start,be),dt=U.end===void 0?Ae:Math.min(U.end,be);!te.extend&&Ae>dt&&(p=dt,dt=Ae,Ae=p);var Z=$c(E,Ae),P=$c(E,dt);if(Z&&P&&(te.rangeCount!==1||te.anchorNode!==Z.node||te.anchorOffset!==Z.offset||te.focusNode!==P.node||te.focusOffset!==P.offset)){var I=ce.createRange();I.setStart(Z.node,Z.offset),te.removeAllRanges(),Ae>dt?(te.addRange(I),te.extend(P.node,P.offset)):(I.setEnd(P.node,P.offset),te.addRange(I))}}}}for(ce=[],te=E;te=te.parentNode;)te.nodeType===1&&ce.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<ce.length;E++){var ie=ce[E];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}qo=!!sf,rf=sf=null}finally{Ke=c,le.p=l,G.T=a}}e.current=t,Pt=2}}function b0(){if(Pt===2){Pt=0;var e=Ll,t=Dr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=G.T,G.T=null;var l=le.p;le.p=2;var c=Ke;Ke|=4;try{Wm(e,t.alternate,t)}finally{Ke=c,le.p=l,G.T=a}}Pt=3}}function j0(){if(Pt===4||Pt===3){Pt=0,jn();var e=Ll,t=Dr,a=al,l=i0;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Pt=5:(Pt=0,Dr=Ll=null,N0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ul=null),sa(a),t=t.stateNode,Bt&&typeof Bt.onCommitFiberRoot=="function")try{Bt.onCommitFiberRoot(mt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=G.T,c=le.p,le.p=2,G.T=null;try{for(var d=e.onRecoverableError,p=0;p<l.length;p++){var E=l[p];d(E.value,{componentStack:E.stack})}}finally{G.T=t,le.p=c}}(al&3)!==0&&Co(),Dn(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Gd?Hi++:(Hi=0,Gd=e):Hi=0,qi(0)}}function N0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,yi(t)))}function Co(){return y0(),b0(),j0(),w0()}function w0(){if(Pt!==5)return!1;var e=Ll,t=Pd;Pd=0;var a=sa(al),l=G.T,c=le.p;try{le.p=32>a?32:a,G.T=null,a=Fd,Fd=null;var d=Ll,p=al;if(Pt=0,Dr=Ll=null,al=0,(Ke&6)!==0)throw Error(u(331));var E=Ke;if(Ke|=4,l0(d.current),t0(d,d.current,p,a),Ke=E,qi(0,!1),Bt&&typeof Bt.onPostCommitFiberRoot=="function")try{Bt.onPostCommitFiberRoot(mt,d)}catch{}return!0}finally{le.p=c,G.T=l,N0(e,t)}}function S0(e,t,a){t=ba(a,t),t=Sd(e.stateNode,t,2),e=Rl(e,t,2),e!==null&&(fl(e,2),Dn(e))}function rt(e,t,a){if(e.tag===3)S0(e,e,a);else for(;t!==null;){if(t.tag===3){S0(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ul===null||!Ul.has(l))){e=ba(a,e),a=Em(2),l=Rl(t,a,2),l!==null&&(Tm(a,l,t,e),fl(l,2),Dn(l));break}}t=t.return}}function Id(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new wv;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(a)||(Bd=!0,c.add(a),e=Mv.bind(null,e,t,a),t.then(e,e))}function Mv(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ft===e&&(Fe&a)===a&&(wt===4||wt===3&&(Fe&62914560)===Fe&&300>Qt()-jo?(Ke&2)===0&&kr(e,0):$d|=a,Rr===Fe&&(Rr=0)),Dn(e)}function E0(e,t){t===0&&(t=Wr()),e=Ya(e,t),e!==null&&(fl(e,t),Dn(e))}function Ov(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),E0(e,a)}function Rv(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),E0(e,a)}function Dv(e,t){return an(e,t)}var Mo=null,_r=null,Qd=!1,Oo=!1,Xd=!1,ql=0;function Dn(e){e!==_r&&e.next===null&&(_r===null?Mo=_r=e:_r=_r.next=e),Oo=!0,Qd||(Qd=!0,Av())}function qi(e,t){if(!Xd&&Oo){Xd=!0;do for(var a=!1,l=Mo;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var p=l.suspendedLanes,E=l.pingedLanes;d=(1<<31-_t(42|e)+1)-1,d&=c&~(p&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,O0(l,d))}else d=Fe,d=es(l,l===ft?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||dl(l,d)||(a=!0,O0(l,d));l=l.next}while(a);Xd=!1}}function kv(){T0()}function T0(){Oo=Qd=!1;var e=0;ql!==0&&Yv()&&(e=ql);for(var t=Qt(),a=null,l=Mo;l!==null;){var c=l.next,d=C0(l,t);d===0?(l.next=null,a===null?Mo=c:a.next=c,c===null&&(_r=a)):(a=l,(e!==0||(d&3)!==0)&&(Oo=!0)),l=c}Pt!==0&&Pt!==5||qi(e),ql!==0&&(ql=0)}function C0(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var p=31-_t(d),E=1<<p,U=c[p];U===-1?((E&a)===0||(E&l)!==0)&&(c[p]=yc(E,t)):U<=t&&(e.expiredLanes|=E),d&=~E}if(t=ft,a=Fe,a=es(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(st===2||st===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&nn(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||dl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&nn(l),sa(a)){case 2:case 8:a=Zs;break;case 32:a=_n;break;case 268435456:a=ol;break;default:a=_n}return l=M0.bind(null,e),a=an(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&nn(l),e.callbackPriority=2,e.callbackNode=null,2}function M0(e,t){if(Pt!==0&&Pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Co()&&e.callbackNode!==a)return null;var l=Fe;return l=es(e,e===ft?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(o0(e,l,t),C0(e,Qt()),e.callbackNode!=null&&e.callbackNode===a?M0.bind(null,e):null)}function O0(e,t){if(Co())return null;o0(e,t,!0)}function Av(){Fv(function(){(Ke&6)!==0?an(Zr,kv):T0()})}function Jd(){if(ql===0){var e=yr;e===0&&(e=Et,Et<<=1,(Et&261888)===0&&(Et=256)),ql=e}return ql}function R0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:cs(""+e)}function D0(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 _v(e,t,a,l,c){if(t==="submit"&&a&&a.stateNode===c){var d=R0((c[$t]||null).action),p=l.submitter;p&&(t=(t=p[$t]||null)?R0(t.formAction):p.getAttribute("formAction"),t!==null&&(d=t,p=null));var E=new fs("action","action",null,l,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ql!==0){var U=p?D0(c,p):new FormData(c);vd(a,{pending:!0,data:U,method:c.method,action:d},null,U)}}else typeof d=="function"&&(E.preventDefault(),U=p?D0(c,p):new FormData(c),vd(a,{pending:!0,data:U,method:c.method,action:d},d,U))},currentTarget:c}]})}}for(var Kd=0;Kd<gi.length;Kd++){var ef=gi[Kd],zv=ef.toLowerCase(),Uv=ef[0].toUpperCase()+ef.slice(1);ya(zv,"on"+Uv)}ya(Fc,"onAnimationEnd"),ya(Gc,"onAnimationIteration"),ya(fr,"onAnimationStart"),ya("dblclick","onDoubleClick"),ya("focusin","onFocus"),ya("focusout","onBlur"),ya(Gu,"onTransitionRun"),ya(Zu,"onTransitionStart"),ya(Zc,"onTransitionCancel"),ya(hi,"onTransitionEnd"),hl("onMouseEnter",["mouseout","mouseover"]),hl("onMouseLeave",["mouseout","mouseover"]),hl("onPointerEnter",["pointerout","pointerover"]),hl("onPointerLeave",["pointerout","pointerover"]),wn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wn("onBeforeInput",["compositionend","keypress","textInput","paste"]),wn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="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(" "),Lv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vi));function k0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],c=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var p=l.length-1;0<=p;p--){var E=l[p],U=E.instance,Q=E.currentTarget;if(E=E.listener,U!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=Q;try{d(c)}catch(re){El(re)}c.currentTarget=null,d=U}else for(p=0;p<l.length;p++){if(E=l[p],U=E.instance,Q=E.currentTarget,E=E.listener,U!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=Q;try{d(c)}catch(re){El(re)}c.currentTarget=null,d=U}}}}function $e(e,t){var a=t[ts];a===void 0&&(a=t[ts]=new Set);var l=e+"__bubble";a.has(l)||(A0(t,e,2,!1),a.add(l))}function tf(e,t,a){var l=0;t&&(l|=4),A0(a,e,l,t)}var Ro="_reactListening"+Math.random().toString(36).slice(2);function af(e){if(!e[Ro]){e[Ro]=!0,Sc.forEach(function(a){a!=="selectionchange"&&(Lv.has(a)||tf(a,!1,e),tf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ro]||(t[Ro]=!0,tf("selectionchange",!1,t))}}function A0(e,t,a,l){switch(cg(t)){case 2:var c=dy;break;case 8:c=fy;break;default:c=vf}a=c.bind(null,t,a,e),c=void 0,!li||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function nf(e,t,a,l,c){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var p=l.tag;if(p===3||p===4){var E=l.stateNode.containerInfo;if(E===c)break;if(p===4)for(p=l.return;p!==null;){var U=p.tag;if((U===3||U===4)&&p.stateNode.containerInfo===c)return;p=p.return}for(;E!==null;){if(p=Un(E),p===null)return;if(U=p.tag,U===5||U===6||U===26||U===27){l=d=p;continue e}E=E.parentNode}}l=l.return}ni(function(){var Q=d,re=nr(a),ce=[];e:{var X=mi.get(e);if(X!==void 0){var te=fs,be=e;switch(e){case"keypress":if(ds(a)===0)break e;case"keydown":case"keyup":te=Du;break;case"focusin":be="focus",te=cr;break;case"focusout":be="blur",te=cr;break;case"beforeblur":case"afterblur":te=cr;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":te=Rc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=Nu;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=_u;break;case Fc:case Gc:case fr:te=pl;break;case hi:te=zu;break;case"scroll":case"scrollend":te=si;break;case"wheel":te=Lu;break;case"copy":case"cut":case"paste":te=vl;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Dc;break;case"toggle":case"beforetoggle":te=qu}var Ae=(t&4)!==0,dt=!Ae&&(e==="scroll"||e==="scrollend"),Z=Ae?X!==null?X+"Capture":null:X;Ae=[];for(var P=Q,I;P!==null;){var ie=P;if(I=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||I===null||Z===null||(ie=os(P,Z),ie!=null&&Ae.push(Bi(P,ie,I))),dt)break;P=P.return}0<Ae.length&&(X=new te(X,be,null,a,re),ce.push({event:X,listeners:Ae}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",X&&a!==ti&&(be=a.relatedTarget||a.fromElement)&&(Un(be)||be[zn]))break e;if((te||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,te?(be=a.relatedTarget||a.toElement,te=Q,be=be?Un(be):null,be!==null&&(dt=f(be),Ae=be.tag,be!==dt||Ae!==5&&Ae!==27&&Ae!==6)&&(be=null)):(te=null,be=Q),te!==be)){if(Ae=Rc,ie="onMouseLeave",Z="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=Dc,ie="onPointerLeave",Z="onPointerEnter",P="pointer"),dt=te==null?X:pa(te),I=be==null?X:pa(be),X=new Ae(ie,P+"leave",te,a,re),X.target=dt,X.relatedTarget=I,ie=null,Un(re)===Q&&(Ae=new Ae(Z,P+"enter",be,a,re),Ae.target=I,Ae.relatedTarget=dt,ie=Ae),dt=ie,te&&be)t:{for(Ae=Hv,Z=te,P=be,I=0,ie=Z;ie;ie=Ae(ie))I++;ie=0;for(var Re=P;Re;Re=Ae(Re))ie++;for(;0<I-ie;)Z=Ae(Z),I--;for(;0<ie-I;)P=Ae(P),ie--;for(;I--;){if(Z===P||P!==null&&Z===P.alternate){Ae=Z;break t}Z=Ae(Z),P=Ae(P)}Ae=null}else Ae=null;te!==null&&_0(ce,X,te,Ae,!1),be!==null&&dt!==null&&_0(ce,dt,be,Ae,!0)}}e:{if(X=Q?pa(Q):window,te=X.nodeName&&X.nodeName.toLowerCase(),te==="select"||te==="input"&&X.type==="file")var Xe=Vc;else if(qc(X))if(Cn)Xe=gt;else{Xe=Nl;var Ne=Ye}else te=X.nodeName,!te||te.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&ar(Q.elementType)&&(Xe=Vc):Xe=Pu;if(Xe&&(Xe=Xe(e,Q))){ii(ce,Xe,a,re);break e}Ne&&Ne(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&ls(X,"number",X.value)}switch(Ne=Q?pa(Q):window,e){case"focusin":(qc(Ne)||Ne.contentEditable==="true")&&(wl=Ne,ur=Q,Kt=null);break;case"focusout":Kt=ur=wl=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,Ns(ce,a,re);break;case"selectionchange":if(Yc)break;case"keydown":case"keyup":Ns(ce,a,re)}var Ve;if(ri)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else bl?Lc(e,a)&&(Ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ge="onCompositionStart");Ge&&(_c&&a.locale!=="ko"&&(bl||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&bl&&(Ve=Yt()):(En=re,lr="value"in En?En.value:En.textContent,bl=!0)),Ne=Do(Q,Ge),0<Ne.length&&(Ge=new yl(Ge,e,null,a,re),ce.push({event:Ge,listeners:Ne}),Ve?Ge.data=Ve:(Ve=Hc(a),Ve!==null&&(Ge.data=Ve)))),(Ve=Vu?Bu(e,a):$u(e,a))&&(Ge=Do(Q,"onBeforeInput"),0<Ge.length&&(Ne=new yl("onBeforeInput","beforeinput",null,a,re),ce.push({event:Ne,listeners:Ge}),Ne.data=Ve)),_v(ce,e,Q,a,re)}k0(ce,t)})}function Bi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Do(e,t){for(var a=t+"Capture",l=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=os(e,a),c!=null&&l.unshift(Bi(e,c,d)),c=os(e,t),c!=null&&l.push(Bi(e,c,d))),e.tag===3)return l;e=e.return}return[]}function Hv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _0(e,t,a,l,c){for(var d=t._reactName,p=[];a!==null&&a!==l;){var E=a,U=E.alternate,Q=E.stateNode;if(E=E.tag,U!==null&&U===l)break;E!==5&&E!==26&&E!==27||Q===null||(U=Q,c?(Q=os(a,d),Q!=null&&p.unshift(Bi(a,Q,U))):c||(Q=os(a,d),Q!=null&&p.push(Bi(a,Q,U)))),a=a.return}p.length!==0&&e.push({event:t,listeners:p})}var qv=/\r\n?/g,Vv=/\u0000|\uFFFD/g;function z0(e){return(typeof e=="string"?e:""+e).replace(qv,`
49
- `).replace(Vv,"")}function U0(e,t){return t=z0(t),z0(e)===t}function ut(e,t,a,l,c,d){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||cn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&cn(e,""+l);break;case"className":Ks(e,"class",l);break;case"tabIndex":Ks(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ks(e,a,l);break;case"style":Cc(e,l,d);break;case"data":if(t!=="object"){Ks(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=cs(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&ut(e,t,"name",c.name,c,null),ut(e,t,"formEncType",c.formEncType,c,null),ut(e,t,"formMethod",c.formMethod,c,null),ut(e,t,"formTarget",c.formTarget,c,null)):(ut(e,t,"encType",c.encType,c,null),ut(e,t,"method",c.method,c,null),ut(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=cs(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Va);break;case"onScroll":l!=null&&$e("scroll",e);break;case"onScrollEnd":l!=null&&$e("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=cs(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":$e("beforetoggle",e),$e("toggle",e),Xt(e,"popover",l);break;case"xlinkActuate":nt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":nt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":nt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":nt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":nt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":nt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":nt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":nt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":nt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Xt(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=bu.get(a)||a,Xt(e,a,l))}}function lf(e,t,a,l,c,d){switch(a){case"style":Cc(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(c.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?cn(e,l):(typeof l=="number"||typeof l=="bigint")&&cn(e,""+l);break;case"onScroll":l!=null&&$e("scroll",e);break;case"onScrollEnd":l!=null&&$e("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xr.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),d=e[$t]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof l=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,c);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Xt(e,a,l)}}}function na(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",e),$e("load",e);var l=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var p=a[d];if(p!=null)switch(d){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ut(e,t,d,p,a,null)}}c&&ut(e,t,"srcSet",a.srcSet,a,null),l&&ut(e,t,"src",a.src,a,null);return;case"input":$e("invalid",e);var E=d=p=c=null,U=null,Q=null;for(l in a)if(a.hasOwnProperty(l)){var re=a[l];if(re!=null)switch(l){case"name":c=re;break;case"type":p=re;break;case"checked":U=re;break;case"defaultChecked":Q=re;break;case"value":d=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(u(137,t));break;default:ut(e,t,l,re,a,null)}}gl(e,d,E,U,Q,p,c,!1);return;case"select":$e("invalid",e),l=p=d=null;for(c in a)if(a.hasOwnProperty(c)&&(E=a[c],E!=null))switch(c){case"value":d=E;break;case"defaultValue":p=E;break;case"multiple":l=E;default:ut(e,t,c,E,a,null)}t=d,a=p,e.multiple=!!l,t!=null?Hn(e,!!l,t,!1):a!=null&&Hn(e,!!l,a,!0);return;case"textarea":$e("invalid",e),d=c=l=null;for(p in a)if(a.hasOwnProperty(p)&&(E=a[p],E!=null))switch(p){case"value":l=E;break;case"defaultValue":c=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(u(91));break;default:ut(e,t,p,E,a,null)}ei(e,l,c,d);return;case"option":for(U in a)if(a.hasOwnProperty(U)&&(l=a[U],l!=null))switch(U){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:ut(e,t,U,l,a,null)}return;case"dialog":$e("beforetoggle",e),$e("toggle",e),$e("cancel",e),$e("close",e);break;case"iframe":case"object":$e("load",e);break;case"video":case"audio":for(l=0;l<Vi.length;l++)$e(Vi[l],e);break;case"image":$e("error",e),$e("load",e);break;case"details":$e("toggle",e);break;case"embed":case"source":case"link":$e("error",e),$e("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(Q in a)if(a.hasOwnProperty(Q)&&(l=a[Q],l!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ut(e,t,Q,l,a,null)}return;default:if(ar(t)){for(re in a)a.hasOwnProperty(re)&&(l=a[re],l!==void 0&&lf(e,t,re,l,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(l=a[E],l!=null&&ut(e,t,E,l,a,null))}function Bv(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,p=null,E=null,U=null,Q=null,re=null;for(te in a){var ce=a[te];if(a.hasOwnProperty(te)&&ce!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":U=ce;default:l.hasOwnProperty(te)||ut(e,t,te,null,l,ce)}}for(var X in l){var te=l[X];if(ce=a[X],l.hasOwnProperty(X)&&(te!=null||ce!=null))switch(X){case"type":d=te;break;case"name":c=te;break;case"checked":Q=te;break;case"defaultChecked":re=te;break;case"value":p=te;break;case"defaultValue":E=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(u(137,t));break;default:te!==ce&&ut(e,t,X,te,l,ce)}}tr(e,p,E,U,Q,re,d,c);return;case"select":te=p=E=X=null;for(d in a)if(U=a[d],a.hasOwnProperty(d)&&U!=null)switch(d){case"value":break;case"multiple":te=U;default:l.hasOwnProperty(d)||ut(e,t,d,null,l,U)}for(c in l)if(d=l[c],U=a[c],l.hasOwnProperty(c)&&(d!=null||U!=null))switch(c){case"value":X=d;break;case"defaultValue":E=d;break;case"multiple":p=d;default:d!==U&&ut(e,t,c,d,l,U)}t=E,a=p,l=te,X!=null?Hn(e,!!a,X,!1):!!l!=!!a&&(t!=null?Hn(e,!!a,t,!0):Hn(e,!!a,a?[]:"",!1));return;case"textarea":te=X=null;for(E in a)if(c=a[E],a.hasOwnProperty(E)&&c!=null&&!l.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:ut(e,t,E,null,l,c)}for(p in l)if(c=l[p],d=a[p],l.hasOwnProperty(p)&&(c!=null||d!=null))switch(p){case"value":X=c;break;case"defaultValue":te=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(u(91));break;default:c!==d&&ut(e,t,p,c,l,d)}ss(e,X,te);return;case"option":for(var be in a)if(X=a[be],a.hasOwnProperty(be)&&X!=null&&!l.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:ut(e,t,be,null,l,X)}for(U in l)if(X=l[U],te=a[U],l.hasOwnProperty(U)&&X!==te&&(X!=null||te!=null))switch(U){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:ut(e,t,U,X,l,te)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ae in a)X=a[Ae],a.hasOwnProperty(Ae)&&X!=null&&!l.hasOwnProperty(Ae)&&ut(e,t,Ae,null,l,X);for(Q in l)if(X=l[Q],te=a[Q],l.hasOwnProperty(Q)&&X!==te&&(X!=null||te!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(u(137,t));break;default:ut(e,t,Q,X,l,te)}return;default:if(ar(t)){for(var dt in a)X=a[dt],a.hasOwnProperty(dt)&&X!==void 0&&!l.hasOwnProperty(dt)&&lf(e,t,dt,void 0,l,X);for(re in l)X=l[re],te=a[re],!l.hasOwnProperty(re)||X===te||X===void 0&&te===void 0||lf(e,t,re,X,l,te);return}}for(var Z in a)X=a[Z],a.hasOwnProperty(Z)&&X!=null&&!l.hasOwnProperty(Z)&&ut(e,t,Z,null,l,X);for(ce in l)X=l[ce],te=a[ce],!l.hasOwnProperty(ce)||X===te||X==null&&te==null||ut(e,t,ce,X,l,te)}function L0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $v(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var c=a[l],d=c.transferSize,p=c.initiatorType,E=c.duration;if(d&&E&&L0(p)){for(p=0,E=c.responseEnd,l+=1;l<a.length;l++){var U=a[l],Q=U.startTime;if(Q>E)break;var re=U.transferSize,ce=U.initiatorType;re&&L0(ce)&&(U=U.responseEnd,p+=re*(U<E?1:(E-Q)/(U-Q)))}if(--l,t+=8*(d+p)/(c.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 sf=null,rf=null;function ko(e){return e.nodeType===9?e:e.ownerDocument}function H0(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 q0(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 cf(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 of=null;function Yv(){var e=window.event;return e&&e.type==="popstate"?e===of?!1:(of=e,!0):(of=null,!1)}var V0=typeof setTimeout=="function"?setTimeout:void 0,Pv=typeof clearTimeout=="function"?clearTimeout:void 0,B0=typeof Promise=="function"?Promise:void 0,Fv=typeof queueMicrotask=="function"?queueMicrotask:typeof B0<"u"?function(e){return B0.resolve(null).then(e).catch(Gv)}:V0;function Gv(e){setTimeout(function(){throw e})}function Vl(e){return e==="head"}function $0(e,t){var a=t,l=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(c),Hr(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")$i(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,$i(a);for(var d=a.firstChild;d;){var p=d.nextSibling,E=d.nodeName;d[as]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=p}}else a==="body"&&$i(e.ownerDocument.body);a=c}while(a);Hr(t)}function Y0(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function uf(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":uf(a),Js(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Zv(e,t,a,l){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[as])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Qa(e.nextSibling),e===null)break}return null}function Wv(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Qa(e.nextSibling),e===null))return null;return e}function P0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qa(e.nextSibling),e===null))return null;return e}function df(e){return e.data==="$?"||e.data==="$~"}function ff(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Iv(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Qa(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 hf=null;function F0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return Qa(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function G0(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 Z0(e,t,a){switch(t=ko(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function $i(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Js(e)}var Xa=new Map,W0=new Set;function Ao(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=le.d;le.d={f:Qv,r:Xv,D:Jv,C:Kv,L:ey,m:ty,X:ny,S:ay,M:ly};function Qv(){var e=nl.f(),t=So();return e||t}function Xv(e){var t=De(e);t!==null&&t.tag===5&&t.type==="form"?dm(t):nl.r(e)}var zr=typeof document>"u"?null:document;function I0(e,t,a){var l=zr;if(l&&typeof t=="string"&&t){var c=Jt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),W0.has(c)||(W0.add(c),e={rel:e,crossOrigin:a,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),na(t,"link",e),Ut(t),l.head.appendChild(t)))}}function Jv(e){nl.D(e),I0("dns-prefetch",e,null)}function Kv(e,t){nl.C(e,t),I0("preconnect",e,t)}function ey(e,t,a){nl.L(e,t,a);var l=zr;if(l&&e&&t){var c='link[rel="preload"][as="'+Jt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+Jt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+Jt(a.imageSizes)+'"]')):c+='[href="'+Jt(e)+'"]';var d=c;switch(t){case"style":d=Ur(e);break;case"script":d=Lr(e)}Xa.has(d)||(e=T({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Xa.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Yi(d))||t==="script"&&l.querySelector(Pi(d))||(t=l.createElement("link"),na(t,"link",e),Ut(t),l.head.appendChild(t)))}}function ty(e,t){nl.m(e,t);var a=zr;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Jt(l)+'"][href="'+Jt(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Lr(e)}if(!Xa.has(d)&&(e=T({rel:"modulepreload",href:e},t),Xa.set(d,e),a.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Pi(d)))return}l=a.createElement("link"),na(l,"link",e),Ut(l),a.head.appendChild(l)}}}function ay(e,t,a){nl.S(e,t,a);var l=zr;if(l&&e){var c=sn(l).hoistableStyles,d=Ur(e);t=t||"default";var p=c.get(d);if(!p){var E={loading:0,preload:null};if(p=l.querySelector(Yi(d)))E.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Xa.get(d))&&mf(e,a);var U=p=l.createElement("link");Ut(U),na(U,"link",e),U._p=new Promise(function(Q,re){U.onload=Q,U.onerror=re}),U.addEventListener("load",function(){E.loading|=1}),U.addEventListener("error",function(){E.loading|=2}),E.loading|=4,_o(p,t,l)}p={type:"stylesheet",instance:p,count:1,state:E},c.set(d,p)}}}function ny(e,t){nl.X(e,t);var a=zr;if(a&&e){var l=sn(a).hoistableScripts,c=Lr(e),d=l.get(c);d||(d=a.querySelector(Pi(c)),d||(e=T({src:e,async:!0},t),(t=Xa.get(c))&&gf(e,t),d=a.createElement("script"),Ut(d),na(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function ly(e,t){nl.M(e,t);var a=zr;if(a&&e){var l=sn(a).hoistableScripts,c=Lr(e),d=l.get(c);d||(d=a.querySelector(Pi(c)),d||(e=T({src:e,async:!0,type:"module"},t),(t=Xa.get(c))&&gf(e,t),d=a.createElement("script"),Ut(d),na(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function Q0(e,t,a,l){var c=(c=xe.current)?Ao(c):null;if(!c)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ur(a.href),a=sn(c).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ur(a.href);var d=sn(c).hoistableStyles,p=d.get(e);if(p||(c=c.ownerDocument||c,p={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,p),(d=c.querySelector(Yi(e)))&&!d._p&&(p.instance=d,p.state.loading=5),Xa.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},Xa.set(e,a),d||sy(c,e,a,p.state))),t&&l===null)throw Error(u(528,""));return p}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Lr(a),a=sn(c).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ur(e){return'href="'+Jt(e)+'"'}function Yi(e){return'link[rel="stylesheet"]['+e+"]"}function X0(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function sy(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),na(t,"link",a),Ut(t),e.head.appendChild(t))}function Lr(e){return'[src="'+Jt(e)+'"]'}function Pi(e){return"script[async]"+e}function J0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Jt(a.href)+'"]');if(l)return t.instance=l,Ut(l),l;var c=T({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ut(l),na(l,"style",c),_o(l,a.precedence,e),t.instance=l;case"stylesheet":c=Ur(a.href);var d=e.querySelector(Yi(c));if(d)return t.state.loading|=4,t.instance=d,Ut(d),d;l=X0(a),(c=Xa.get(c))&&mf(l,c),d=(e.ownerDocument||e).createElement("link"),Ut(d);var p=d;return p._p=new Promise(function(E,U){p.onload=E,p.onerror=U}),na(d,"link",l),t.state.loading|=4,_o(d,a.precedence,e),t.instance=d;case"script":return d=Lr(a.src),(c=e.querySelector(Pi(d)))?(t.instance=c,Ut(c),c):(l=a,(c=Xa.get(d))&&(l=T({},a),gf(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ut(c),na(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,_o(l,a.precedence,e));return t.instance}function _o(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,d=c,p=0;p<l.length;p++){var E=l[p];if(E.dataset.precedence===t)d=E;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function mf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var zo=null;function K0(e,t,a){if(zo===null){var l=new Map,c=zo=new Map;c.set(a,l)}else c=zo,l=c.get(a),l||(l=new Map,c.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[as]||d[Tt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var p=d.getAttribute(t)||"";p=e+p;var E=l.get(p);E?E.push(d):l.set(p,[d])}}return l}function eg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ry(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 tg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function iy(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Ur(l.href),d=t.querySelector(Yi(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Uo.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Ut(d);return}d=t.ownerDocument||t,l=X0(l),(c=Xa.get(c))&&mf(l,c),d=d.createElement("link"),Ut(d);var p=d;p._p=new Promise(function(E,U){p.onload=E,p.onerror=U}),na(d,"link",l),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Uo.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var xf=0;function cy(e,t){return e.stylesheets&&e.count===0&&Ho(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ho(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&xf===0&&(xf=62500*$v());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ho(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>xf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function Uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ho(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Lo=null;function Ho(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Lo=new Map,t.forEach(oy,e),Lo=null,Uo.call(e))}function oy(e,t){if(!(t.state.loading&4)){var a=Lo.get(e);if(a)var l=a.get(null);else{a=new Map,Lo.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var p=c[d];(p.nodeName==="LINK"||p.getAttribute("media")!=="not all")&&(a.set(p.dataset.precedence,p),l=p)}l&&a.set(null,l)}c=t.instance,p=c.getAttribute("data-precedence"),d=a.get(p)||l,d===l&&a.set(null,c),a.set(p,c),this.count++,l=Uo.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Fi={$$typeof:M,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function uy(e,t,a,l,c,d,p,E,U){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=Is(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Is(0),this.hiddenUpdates=Is(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=p,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function ag(e,t,a,l,c,d,p,E,U,Q,re,ce){return e=new uy(e,t,a,p,U,Q,re,ce,E),t=1,d===!0&&(t|=24),d=ea(3,null,null,t),e.current=d,d.stateNode=e,t=Wu(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:a,cache:t},Ju(d),e}function ng(e){return e?(e=Oa,e):Oa}function lg(e,t,a,l,c,d){c=ng(c),l.context===null?l.context=c:l.pendingContext=c,l=Ol(t),l.payload={element:a},d=d===void 0?null:d,d!==null&&(l.callback=d),a=Rl(e,l,t),a!==null&&(Ta(a,e,t),wi(a,e,t))}function sg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function pf(e,t){sg(e,t),(e=e.alternate)&&sg(e,t)}function rg(e){if(e.tag===13||e.tag===31){var t=Ya(e,67108864);t!==null&&Ta(t,e,67108864),pf(e,67108864)}}function ig(e){if(e.tag===13||e.tag===31){var t=_a();t=Qs(t);var a=Ya(e,t);a!==null&&Ta(a,e,t),pf(e,t)}}var qo=!0;function dy(e,t,a,l){var c=G.T;G.T=null;var d=le.p;try{le.p=2,vf(e,t,a,l)}finally{le.p=d,G.T=c}}function fy(e,t,a,l){var c=G.T;G.T=null;var d=le.p;try{le.p=8,vf(e,t,a,l)}finally{le.p=d,G.T=c}}function vf(e,t,a,l){if(qo){var c=yf(l);if(c===null)nf(e,t,l,Vo,a),og(e,l);else if(my(c,e,t,a,l))l.stopPropagation();else if(og(e,l),t&4&&-1<hy.indexOf(e)){for(;c!==null;){var d=De(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var p=Nn(d.pendingLanes);if(p!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;p;){var U=1<<31-_t(p);E.entanglements[1]|=U,p&=~U}Dn(d),(Ke&6)===0&&(No=Qt()+500,qi(0))}}break;case 31:case 13:E=Ya(d,2),E!==null&&Ta(E,d,2),So(),pf(d,2)}if(d=yf(l),d===null&&nf(e,t,l,Vo,a),d===c)break;c=d}c!==null&&l.stopPropagation()}else nf(e,t,l,null,a)}}function yf(e){return e=nr(e),bf(e)}var Vo=null;function bf(e){if(Vo=null,e=Un(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=b(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 Vo=e,null}function cg(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(cl()){case Zr:return 2;case Zs:return 8;case _n:case Ws:return 32;case ol:return 268435456;default:return 32}default:return 32}}var jf=!1,Bl=null,$l=null,Yl=null,Gi=new Map,Zi=new Map,Pl=[],hy="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 og(e,t){switch(e){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":$l=null;break;case"mouseover":case"mouseout":Yl=null;break;case"pointerover":case"pointerout":Gi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Wi(e,t,a,l,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:d,targetContainers:[c]},t!==null&&(t=De(t),t!==null&&rg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function my(e,t,a,l,c){switch(t){case"focusin":return Bl=Wi(Bl,e,t,a,l,c),!0;case"dragenter":return $l=Wi($l,e,t,a,l,c),!0;case"mouseover":return Yl=Wi(Yl,e,t,a,l,c),!0;case"pointerover":var d=c.pointerId;return Gi.set(d,Wi(Gi.get(d)||null,e,t,a,l,c)),!0;case"gotpointercapture":return d=c.pointerId,Zi.set(d,Wi(Zi.get(d)||null,e,t,a,l,c)),!0}return!1}function ug(e){var t=Un(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=b(a),t!==null){e.blockedOn=t,Qr(e.priority,function(){ig(a)});return}}else if(t===31){if(t=j(a),t!==null){e.blockedOn=t,Qr(e.priority,function(){ig(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 Bo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=yf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);ti=l,a.target.dispatchEvent(l),ti=null}else return t=De(a),t!==null&&rg(t),e.blockedOn=a,!1;t.shift()}return!0}function dg(e,t,a){Bo(e)&&a.delete(t)}function gy(){jf=!1,Bl!==null&&Bo(Bl)&&(Bl=null),$l!==null&&Bo($l)&&($l=null),Yl!==null&&Bo(Yl)&&(Yl=null),Gi.forEach(dg),Zi.forEach(dg)}function $o(e,t){e.blockedOn===t&&(e.blockedOn=null,jf||(jf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,gy)))}var Yo=null;function fg(e){Yo!==e&&(Yo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Yo===e&&(Yo=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(bf(l||a)===null)continue;break}var d=De(a);d!==null&&(e.splice(t,3),t-=3,vd(d,{pending:!0,data:c,method:a.method,action:l},l,c))}}))}function Hr(e){function t(U){return $o(U,e)}Bl!==null&&$o(Bl,e),$l!==null&&$o($l,e),Yl!==null&&$o(Yl,e),Gi.forEach(t),Zi.forEach(t);for(var a=0;a<Pl.length;a++){var l=Pl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Pl.length&&(a=Pl[0],a.blockedOn===null);)ug(a),a.blockedOn===null&&Pl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var c=a[l],d=a[l+1],p=c[$t]||null;if(typeof d=="function")p||fg(a);else if(p){var E=null;if(d&&d.hasAttribute("formAction")){if(c=d,p=d[$t]||null)E=p.formAction;else if(bf(c)!==null)continue}else E=p.action;typeof E=="function"?a[l+1]=E:(a.splice(l,3),l-=3),fg(a)}}}function hg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(p){return c=p})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Nf(e){this._internalRoot=e}Po.prototype.render=Nf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=_a();lg(a,l,e,t,null,null)},Po.prototype.unmount=Nf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;lg(e.current,2,null,e,null,null),So(),t[zn]=null}};function Po(e){this._internalRoot=e}Po.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xs();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Pl.length&&t!==0&&t<Pl[a].priority;a++);Pl.splice(a,0,e),a===0&&ug(e)}};var mg=r.version;if(mg!=="19.2.4")throw Error(u(527,mg,"19.2.4"));le.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=x(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var xy={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fo.isDisabled&&Fo.supportsFiber)try{mt=Fo.inject(xy),Bt=Fo}catch{}}return Qi.createRoot=function(e,t){if(!h(e))throw Error(u(299));var a=!1,l="",c=jm,d=Nm,p=wm;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(p=t.onRecoverableError)),t=ag(e,1,!1,null,null,a,l,null,c,d,p,hg),e[zn]=t.current,af(e),new Nf(t)},Qi.hydrateRoot=function(e,t,a){if(!h(e))throw Error(u(299));var l=!1,c="",d=jm,p=Nm,E=wm,U=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(p=a.onCaughtError),a.onRecoverableError!==void 0&&(E=a.onRecoverableError),a.formState!==void 0&&(U=a.formState)),t=ag(e,1,!0,t,a??null,l,c,U,d,p,E,hg),t.context=ng(null),a=t.current,l=_a(),l=Qs(l),c=Ol(l),c.callback=null,Rl(a,c,l),a=l,t.current.lanes=a,fl(t,a),Dn(t),e[zn]=t.current,af(e),new Po(t)},Qi.version="19.2.4",Qi}var Tg;function My(){if(Tg)return Tf.exports;Tg=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Tf.exports=Cy(),Tf.exports}var Oy=My();const Ry=Jf(Oy);/**
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 Cg="popstate";function Dy(n={}){function r(h,f){let{pathname:b="/",search:j="",hash:y=""}=Ps(h.location.hash.substring(1));return!b.startsWith("/")&&!b.startsWith(".")&&(b="/"+b),Bf("",{pathname:b,search:j,hash:y},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function o(h,f){let b=h.document.querySelector("base"),j="";if(b&&b.getAttribute("href")){let y=h.location.href,x=y.indexOf("#");j=x===-1?y:y.slice(0,x)}return j+"#"+(typeof f=="string"?f:fc(f))}function u(h,f){Ja(h.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(f)})`)}return Ay(r,o,u,n)}function vt(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Ja(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function ky(){return Math.random().toString(36).substring(2,10)}function Mg(n,r){return{usr:n.state,key:n.key,idx:r}}function Bf(n,r,o=null,u){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?Ps(r):r,state:o,key:r&&r.key||u||ky()}}function fc({pathname:n="/",search:r="",hash:o=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(n+=o.charAt(0)==="#"?o:"#"+o),n}function Ps(n){let r={};if(n){let o=n.indexOf("#");o>=0&&(r.hash=n.substring(o),n=n.substring(0,o));let u=n.indexOf("?");u>=0&&(r.search=n.substring(u),n=n.substring(0,u)),n&&(r.pathname=n)}return r}function Ay(n,r,o,u={}){let{window:h=document.defaultView,v5Compat:f=!1}=u,b=h.history,j="POP",y=null,x=w();x==null&&(x=0,b.replaceState({...b.state,idx:x},""));function w(){return(b.state||{idx:null}).idx}function T(){j="POP";let k=w(),Y=k==null?null:k-x;x=k,y&&y({action:j,location:O.location,delta:Y})}function z(k,Y){j="PUSH";let D=Bf(O.location,k,Y);o&&o(D,k),x=w()+1;let M=Mg(D,x),V=O.createHref(D);try{b.pushState(M,"",V)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;h.location.assign(V)}f&&y&&y({action:j,location:O.location,delta:1})}function _(k,Y){j="REPLACE";let D=Bf(O.location,k,Y);o&&o(D,k),x=w();let M=Mg(D,x),V=O.createHref(D);b.replaceState(M,"",V),f&&y&&y({action:j,location:O.location,delta:0})}function N(k){return _y(k)}let O={get action(){return j},get location(){return n(h,b)},listen(k){if(y)throw new Error("A history only accepts one active listener");return h.addEventListener(Cg,T),y=k,()=>{h.removeEventListener(Cg,T),y=null}},createHref(k){return r(h,k)},createURL:N,encodeLocation(k){let Y=N(k);return{pathname:Y.pathname,search:Y.search,hash:Y.hash}},push:z,replace:_,go(k){return b.go(k)}};return O}function _y(n,r=!1){let o="http://localhost";typeof window<"u"&&(o=window.location.origin!=="null"?window.location.origin:window.location.href),vt(o,"No window.location.(origin|href) available to create URL");let u=typeof n=="string"?n:fc(n);return u=u.replace(/ $/,"%20"),!r&&u.startsWith("//")&&(u=o+u),new URL(u,o)}function Ux(n,r,o="/"){return zy(n,r,o,!1)}function zy(n,r,o,u){let h=typeof r=="string"?Ps(r):r,f=il(h.pathname||"/",o);if(f==null)return null;let b=Lx(n);Uy(b);let j=null;for(let y=0;j==null&&y<b.length;++y){let x=Zy(f);j=Fy(b[y],x,u)}return j}function Lx(n,r=[],o=[],u="",h=!1){let f=(b,j,y=h,x)=>{let w={relativePath:x===void 0?b.path||"":x,caseSensitive:b.caseSensitive===!0,childrenIndex:j,route:b};if(w.relativePath.startsWith("/")){if(!w.relativePath.startsWith(u)&&y)return;vt(w.relativePath.startsWith(u),`Absolute route path "${w.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),w.relativePath=w.relativePath.slice(u.length)}let T=rl([u,w.relativePath]),z=o.concat(w);b.children&&b.children.length>0&&(vt(b.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${T}".`),Lx(b.children,r,z,T,y)),!(b.path==null&&!b.index)&&r.push({path:T,score:Yy(T,b.index),routesMeta:z})};return n.forEach((b,j)=>{var y;if(b.path===""||!((y=b.path)!=null&&y.includes("?")))f(b,j);else for(let x of Hx(b.path))f(b,j,!0,x)}),r}function Hx(n){let r=n.split("/");if(r.length===0)return[];let[o,...u]=r,h=o.endsWith("?"),f=o.replace(/\?$/,"");if(u.length===0)return h?[f,""]:[f];let b=Hx(u.join("/")),j=[];return j.push(...b.map(y=>y===""?f:[f,y].join("/"))),h&&j.push(...b),j.map(y=>n.startsWith("/")&&y===""?"/":y)}function Uy(n){n.sort((r,o)=>r.score!==o.score?o.score-r.score:Py(r.routesMeta.map(u=>u.childrenIndex),o.routesMeta.map(u=>u.childrenIndex)))}var Ly=/^:[\w-]+$/,Hy=3,qy=2,Vy=1,By=10,$y=-2,Og=n=>n==="*";function Yy(n,r){let o=n.split("/"),u=o.length;return o.some(Og)&&(u+=$y),r&&(u+=qy),o.filter(h=>!Og(h)).reduce((h,f)=>h+(Ly.test(f)?Hy:f===""?Vy:By),u)}function Py(n,r){return n.length===r.length&&n.slice(0,-1).every((u,h)=>u===r[h])?n[n.length-1]-r[r.length-1]:0}function Fy(n,r,o=!1){let{routesMeta:u}=n,h={},f="/",b=[];for(let j=0;j<u.length;++j){let y=u[j],x=j===u.length-1,w=f==="/"?r:r.slice(f.length)||"/",T=ru({path:y.relativePath,caseSensitive:y.caseSensitive,end:x},w),z=y.route;if(!T&&x&&o&&!u[u.length-1].route.index&&(T=ru({path:y.relativePath,caseSensitive:y.caseSensitive,end:!1},w)),!T)return null;Object.assign(h,T.params),b.push({params:h,pathname:rl([f,T.pathname]),pathnameBase:Xy(rl([f,T.pathnameBase])),route:z}),T.pathnameBase!=="/"&&(f=rl([f,T.pathnameBase]))}return b}function ru(n,r){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[o,u]=Gy(n.path,n.caseSensitive,n.end),h=r.match(o);if(!h)return null;let f=h[0],b=f.replace(/(.)\/+$/,"$1"),j=h.slice(1);return{params:u.reduce((x,{paramName:w,isOptional:T},z)=>{if(w==="*"){let N=j[z]||"";b=f.slice(0,f.length-N.length).replace(/(.)\/+$/,"$1")}const _=j[z];return T&&!_?x[w]=void 0:x[w]=(_||"").replace(/%2F/g,"/"),x},{}),pathname:f,pathnameBase:b,pattern:n}}function Gy(n,r=!1,o=!0){Ja(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let u=[],h="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(b,j,y)=>(u.push({paramName:j,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(u.push({paramName:"*"}),h+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):o?h+="\\/*$":n!==""&&n!=="/"&&(h+="(?:(?=\\/|$))"),[new RegExp(h,r?void 0:"i"),u]}function Zy(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ja(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function il(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let o=r.endsWith("/")?r.length-1:r.length,u=n.charAt(o);return u&&u!=="/"?null:n.slice(o)||"/"}var Wy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Iy(n,r="/"){let{pathname:o,search:u="",hash:h=""}=typeof n=="string"?Ps(n):n,f;return o?(o=o.replace(/\/\/+/g,"/"),o.startsWith("/")?f=Rg(o.substring(1),"/"):f=Rg(o,r)):f=r,{pathname:f,search:Jy(u),hash:Ky(h)}}function Rg(n,r){let o=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(h=>{h===".."?o.length>1&&o.pop():h!=="."&&o.push(h)}),o.length>1?o.join("/"):"/"}function Rf(n,r,o,u){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${o}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Qy(n){return n.filter((r,o)=>o===0||r.route.path&&r.route.path.length>0)}function eh(n){let r=Qy(n);return r.map((o,u)=>u===r.length-1?o.pathname:o.pathnameBase)}function th(n,r,o,u=!1){let h;typeof n=="string"?h=Ps(n):(h={...n},vt(!h.pathname||!h.pathname.includes("?"),Rf("?","pathname","search",h)),vt(!h.pathname||!h.pathname.includes("#"),Rf("#","pathname","hash",h)),vt(!h.search||!h.search.includes("#"),Rf("#","search","hash",h)));let f=n===""||h.pathname==="",b=f?"/":h.pathname,j;if(b==null)j=o;else{let T=r.length-1;if(!u&&b.startsWith("..")){let z=b.split("/");for(;z[0]==="..";)z.shift(),T-=1;h.pathname=z.join("/")}j=T>=0?r[T]:"/"}let y=Iy(h,j),x=b&&b!=="/"&&b.endsWith("/"),w=(f||b===".")&&o.endsWith("/");return!y.pathname.endsWith("/")&&(x||w)&&(y.pathname+="/"),y}var rl=n=>n.join("/").replace(/\/\/+/g,"/"),Xy=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),Jy=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Ky=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,eb=class{constructor(n,r,o,u=!1){this.status=n,this.statusText=r||"",this.internal=u,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}};function tb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function ab(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var qx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Vx(n,r){let o=n;if(typeof o!="string"||!Wy.test(o))return{absoluteURL:void 0,isExternal:!1,to:o};let u=o,h=!1;if(qx)try{let f=new URL(window.location.href),b=o.startsWith("//")?new URL(f.protocol+o):new URL(o),j=il(b.pathname,r);b.origin===f.origin&&j!=null?o=j+b.search+b.hash:h=!0}catch{Ja(!1,`<Link to="${o}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:h,to:o}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Bx=["POST","PUT","PATCH","DELETE"];new Set(Bx);var nb=["GET",...Bx];new Set(nb);var Yr=L.createContext(null);Yr.displayName="DataRouter";var hu=L.createContext(null);hu.displayName="DataRouterState";var lb=L.createContext(!1),$x=L.createContext({isTransitioning:!1});$x.displayName="ViewTransition";var sb=L.createContext(new Map);sb.displayName="Fetchers";var rb=L.createContext(null);rb.displayName="Await";var Ha=L.createContext(null);Ha.displayName="Navigation";var xc=L.createContext(null);xc.displayName="Location";var kn=L.createContext({outlet:null,matches:[],isDataRoute:!1});kn.displayName="Route";var ah=L.createContext(null);ah.displayName="RouteError";var Yx="REACT_ROUTER_ERROR",ib="REDIRECT",cb="ROUTE_ERROR_RESPONSE";function ob(n){if(n.startsWith(`${Yx}:${ib}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function ub(n){if(n.startsWith(`${Yx}:${cb}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new eb(r.status,r.statusText,r.data)}catch{}}function db(n,{relative:r}={}){vt(Pr(),"useHref() may be used only in the context of a <Router> component.");let{basename:o,navigator:u}=L.useContext(Ha),{hash:h,pathname:f,search:b}=pc(n,{relative:r}),j=f;return o!=="/"&&(j=f==="/"?o:rl([o,f])),u.createHref({pathname:j,search:b,hash:h})}function Pr(){return L.useContext(xc)!=null}function An(){return vt(Pr(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(xc).location}var Px="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fx(n){L.useContext(Ha).static||L.useLayoutEffect(n)}function mu(){let{isDataRoute:n}=L.useContext(kn);return n?Sb():fb()}function fb(){vt(Pr(),"useNavigate() may be used only in the context of a <Router> component.");let n=L.useContext(Yr),{basename:r,navigator:o}=L.useContext(Ha),{matches:u}=L.useContext(kn),{pathname:h}=An(),f=JSON.stringify(eh(u)),b=L.useRef(!1);return Fx(()=>{b.current=!0}),L.useCallback((y,x={})=>{if(Ja(b.current,Px),!b.current)return;if(typeof y=="number"){o.go(y);return}let w=th(y,JSON.parse(f),h,x.relative==="path");n==null&&r!=="/"&&(w.pathname=w.pathname==="/"?r:rl([r,w.pathname])),(x.replace?o.replace:o.push)(w,x.state,x)},[r,o,f,h,n])}L.createContext(null);function pc(n,{relative:r}={}){let{matches:o}=L.useContext(kn),{pathname:u}=An(),h=JSON.stringify(eh(o));return L.useMemo(()=>th(n,JSON.parse(h),u,r==="path"),[n,h,u,r])}function hb(n,r){return Gx(n,r)}function Gx(n,r,o,u,h){var D;vt(Pr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=L.useContext(Ha),{matches:b}=L.useContext(kn),j=b[b.length-1],y=j?j.params:{},x=j?j.pathname:"/",w=j?j.pathnameBase:"/",T=j&&j.route;{let M=T&&T.path||"";Wx(x,!T||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${M}">) 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="${M}"> to <Route path="${M==="/"?"*":`${M}/*`}">.`)}let z=An(),_;if(r){let M=typeof r=="string"?Ps(r):r;vt(w==="/"||((D=M.pathname)==null?void 0:D.startsWith(w)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${w}" but pathname "${M.pathname}" was given in the \`location\` prop.`),_=M}else _=z;let N=_.pathname||"/",O=N;if(w!=="/"){let M=w.replace(/^\//,"").split("/");O="/"+N.replace(/^\//,"").split("/").slice(M.length).join("/")}let k=Ux(n,{pathname:O});Ja(T||k!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),Ja(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.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 Y=vb(k&&k.map(M=>Object.assign({},M,{params:Object.assign({},y,M.params),pathname:rl([w,f.encodeLocation?f.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?w:rl([w,f.encodeLocation?f.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),b,o,u,h);return r&&Y?L.createElement(xc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",..._},navigationType:"POP"}},Y):Y}function mb(){let n=wb(),r=tb(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),o=n instanceof Error?n.stack:null,u="rgba(200,200,200, 0.5)",h={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},b=null;return console.error("Error handled by React Router default ErrorBoundary:",n),b=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:f},"ErrorBoundary")," or"," ",L.createElement("code",{style:f},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},r),o?L.createElement("pre",{style:h},o):null,b)}var gb=L.createElement(mb,null),Zx=class extends L.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const o=ub(n.digest);o&&(n=o)}let r=n!==void 0?L.createElement(kn.Provider,{value:this.props.routeContext},L.createElement(ah.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?L.createElement(xb,{error:n},r):r}};Zx.contextType=lb;var Df=new WeakMap;function xb({children:n,error:r}){let{basename:o}=L.useContext(Ha);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let u=ob(r.digest);if(u){let h=Df.get(r);if(h)throw h;let f=Vx(u.location,o);if(qx&&!Df.get(r))if(f.isExternal||u.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const b=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:u.replace}));throw Df.set(r,b),b}return L.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return n}function pb({routeContext:n,match:r,children:o}){let u=L.useContext(Yr);return u&&u.static&&u.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=r.route.id),L.createElement(kn.Provider,{value:n},o)}function vb(n,r=[],o=null,u=null,h=null){if(n==null){if(!o)return null;if(o.errors)n=o.matches;else if(r.length===0&&!o.initialized&&o.matches.length>0)n=o.matches;else return null}let f=n,b=o==null?void 0:o.errors;if(b!=null){let w=f.findIndex(T=>T.route.id&&(b==null?void 0:b[T.route.id])!==void 0);vt(w>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(b).join(",")}`),f=f.slice(0,Math.min(f.length,w+1))}let j=!1,y=-1;if(o)for(let w=0;w<f.length;w++){let T=f[w];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(y=w),T.route.id){let{loaderData:z,errors:_}=o,N=T.route.loader&&!z.hasOwnProperty(T.route.id)&&(!_||_[T.route.id]===void 0);if(T.route.lazy||N){j=!0,y>=0?f=f.slice(0,y+1):f=[f[0]];break}}}let x=o&&u?(w,T)=>{var z,_;u(w,{location:o.location,params:((_=(z=o.matches)==null?void 0:z[0])==null?void 0:_.params)??{},unstable_pattern:ab(o.matches),errorInfo:T})}:void 0;return f.reduceRight((w,T,z)=>{let _,N=!1,O=null,k=null;o&&(_=b&&T.route.id?b[T.route.id]:void 0,O=T.route.errorElement||gb,j&&(y<0&&z===0?(Wx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,k=null):y===z&&(N=!0,k=T.route.hydrateFallbackElement||null)));let Y=r.concat(f.slice(0,z+1)),D=()=>{let M;return _?M=O:N?M=k:T.route.Component?M=L.createElement(T.route.Component,null):T.route.element?M=T.route.element:M=w,L.createElement(pb,{match:T,routeContext:{outlet:w,matches:Y,isDataRoute:o!=null},children:M})};return o&&(T.route.ErrorBoundary||T.route.errorElement||z===0)?L.createElement(Zx,{location:o.location,revalidation:o.revalidation,component:O,error:_,children:D(),routeContext:{outlet:null,matches:Y,isDataRoute:!0},onError:x}):D()},null)}function nh(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function yb(n){let r=L.useContext(Yr);return vt(r,nh(n)),r}function bb(n){let r=L.useContext(hu);return vt(r,nh(n)),r}function jb(n){let r=L.useContext(kn);return vt(r,nh(n)),r}function lh(n){let r=jb(n),o=r.matches[r.matches.length-1];return vt(o.route.id,`${n} can only be used on routes that contain a unique "id"`),o.route.id}function Nb(){return lh("useRouteId")}function wb(){var u;let n=L.useContext(ah),r=bb("useRouteError"),o=lh("useRouteError");return n!==void 0?n:(u=r.errors)==null?void 0:u[o]}function Sb(){let{router:n}=yb("useNavigate"),r=lh("useNavigate"),o=L.useRef(!1);return Fx(()=>{o.current=!0}),L.useCallback(async(h,f={})=>{Ja(o.current,Px),o.current&&(typeof h=="number"?await n.navigate(h):await n.navigate(h,{fromRouteId:r,...f}))},[n,r])}var Dg={};function Wx(n,r,o){!r&&!Dg[n]&&(Dg[n]=!0,Ja(!1,o))}L.memo(Eb);function Eb({routes:n,future:r,state:o,onError:u}){return Gx(n,void 0,o,u,r)}function Tb({to:n,replace:r,state:o,relative:u}){vt(Pr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:h}=L.useContext(Ha);Ja(!h,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=L.useContext(kn),{pathname:b}=An(),j=mu(),y=th(n,eh(f),b,u==="path"),x=JSON.stringify(y);return L.useEffect(()=>{j(JSON.parse(x),{replace:r,state:o,relative:u})},[j,x,u,r,o]),null}function sl(n){vt(!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 Cb({basename:n="/",children:r=null,location:o,navigationType:u="POP",navigator:h,static:f=!1,unstable_useTransitions:b}){vt(!Pr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let j=n.replace(/^\/*/,"/"),y=L.useMemo(()=>({basename:j,navigator:h,static:f,unstable_useTransitions:b,future:{}}),[j,h,f,b]);typeof o=="string"&&(o=Ps(o));let{pathname:x="/",search:w="",hash:T="",state:z=null,key:_="default"}=o,N=L.useMemo(()=>{let O=il(x,j);return O==null?null:{location:{pathname:O,search:w,hash:T,state:z,key:_},navigationType:u}},[j,x,w,T,z,_,u]);return Ja(N!=null,`<Router basename="${j}"> is not able to match the URL "${x}${w}${T}" because it does not start with the basename, so the <Router> won't render anything.`),N==null?null:L.createElement(Ha.Provider,{value:y},L.createElement(xc.Provider,{children:r,value:N}))}function Mb({children:n,location:r}){return hb($f(n),r)}function $f(n,r=[]){let o=[];return L.Children.forEach(n,(u,h)=>{if(!L.isValidElement(u))return;let f=[...r,h];if(u.type===L.Fragment){o.push.apply(o,$f(u.props.children,f));return}vt(u.type===sl,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),vt(!u.props.index||!u.props.children,"An index route cannot have child routes.");let b={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(b.children=$f(u.props.children,f)),o.push(b)}),o}var au="get",nu="application/x-www-form-urlencoded";function gu(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function Ob(n){return gu(n)&&n.tagName.toLowerCase()==="button"}function Rb(n){return gu(n)&&n.tagName.toLowerCase()==="form"}function Db(n){return gu(n)&&n.tagName.toLowerCase()==="input"}function kb(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Ab(n,r){return n.button===0&&(!r||r==="_self")&&!kb(n)}var Go=null;function _b(){if(Go===null)try{new FormData(document.createElement("form"),0),Go=!1}catch{Go=!0}return Go}var zb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kf(n){return n!=null&&!zb.has(n)?(Ja(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nu}"`),null):n}function Ub(n,r){let o,u,h,f,b;if(Rb(n)){let j=n.getAttribute("action");u=j?il(j,r):null,o=n.getAttribute("method")||au,h=kf(n.getAttribute("enctype"))||nu,f=new FormData(n)}else if(Ob(n)||Db(n)&&(n.type==="submit"||n.type==="image")){let j=n.form;if(j==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let y=n.getAttribute("formaction")||j.getAttribute("action");if(u=y?il(y,r):null,o=n.getAttribute("formmethod")||j.getAttribute("method")||au,h=kf(n.getAttribute("formenctype"))||kf(j.getAttribute("enctype"))||nu,f=new FormData(j,n),!_b()){let{name:x,type:w,value:T}=n;if(w==="image"){let z=x?`${x}.`:"";f.append(`${z}x`,"0"),f.append(`${z}y`,"0")}else x&&f.append(x,T)}}else{if(gu(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');o=au,u=null,h=nu,b=n}return f&&h==="text/plain"&&(b=f,f=void 0),{action:u,method:o.toLowerCase(),encType:h,formData:f,body:b}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sh(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function Lb(n,r,o,u){let h=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return o?h.pathname.endsWith("/")?h.pathname=`${h.pathname}_.${u}`:h.pathname=`${h.pathname}.${u}`:h.pathname==="/"?h.pathname=`_root.${u}`:r&&il(h.pathname,r)==="/"?h.pathname=`${r.replace(/\/$/,"")}/_root.${u}`:h.pathname=`${h.pathname.replace(/\/$/,"")}.${u}`,h}async function Hb(n,r){if(n.id in r)return r[n.id];try{let o=await import(n.module);return r[n.id]=o,o}catch(o){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(o),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function qb(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function Vb(n,r,o){let u=await Promise.all(n.map(async h=>{let f=r.routes[h.route.id];if(f){let b=await Hb(f,o);return b.links?b.links():[]}return[]}));return Pb(u.flat(1).filter(qb).filter(h=>h.rel==="stylesheet"||h.rel==="preload").map(h=>h.rel==="stylesheet"?{...h,rel:"prefetch",as:"style"}:{...h,rel:"prefetch"}))}function kg(n,r,o,u,h,f){let b=(y,x)=>o[x]?y.route.id!==o[x].route.id:!0,j=(y,x)=>{var w;return o[x].pathname!==y.pathname||((w=o[x].route.path)==null?void 0:w.endsWith("*"))&&o[x].params["*"]!==y.params["*"]};return f==="assets"?r.filter((y,x)=>b(y,x)||j(y,x)):f==="data"?r.filter((y,x)=>{var T;let w=u.routes[y.route.id];if(!w||!w.hasLoader)return!1;if(b(y,x)||j(y,x))return!0;if(y.route.shouldRevalidate){let z=y.route.shouldRevalidate({currentUrl:new URL(h.pathname+h.search+h.hash,window.origin),currentParams:((T=o[0])==null?void 0:T.params)||{},nextUrl:new URL(n,window.origin),nextParams:y.params,defaultShouldRevalidate:!0});if(typeof z=="boolean")return z}return!0}):[]}function Bb(n,r,{includeHydrateFallback:o}={}){return $b(n.map(u=>{let h=r.routes[u.route.id];if(!h)return[];let f=[h.module];return h.clientActionModule&&(f=f.concat(h.clientActionModule)),h.clientLoaderModule&&(f=f.concat(h.clientLoaderModule)),o&&h.hydrateFallbackModule&&(f=f.concat(h.hydrateFallbackModule)),h.imports&&(f=f.concat(h.imports)),f}).flat(1))}function $b(n){return[...new Set(n)]}function Yb(n){let r={},o=Object.keys(n).sort();for(let u of o)r[u]=n[u];return r}function Pb(n,r){let o=new Set;return new Set(r),n.reduce((u,h)=>{let f=JSON.stringify(Yb(h));return o.has(f)||(o.add(f),u.push({key:f,link:h})),u},[])}function Ix(){let n=L.useContext(Yr);return sh(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function Fb(){let n=L.useContext(hu);return sh(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var rh=L.createContext(void 0);rh.displayName="FrameworkContext";function Qx(){let n=L.useContext(rh);return sh(n,"You must render this element inside a <HydratedRouter> element"),n}function Gb(n,r){let o=L.useContext(rh),[u,h]=L.useState(!1),[f,b]=L.useState(!1),{onFocus:j,onBlur:y,onMouseEnter:x,onMouseLeave:w,onTouchStart:T}=r,z=L.useRef(null);L.useEffect(()=>{if(n==="render"&&b(!0),n==="viewport"){let O=Y=>{Y.forEach(D=>{b(D.isIntersecting)})},k=new IntersectionObserver(O,{threshold:.5});return z.current&&k.observe(z.current),()=>{k.disconnect()}}},[n]),L.useEffect(()=>{if(u){let O=setTimeout(()=>{b(!0)},100);return()=>{clearTimeout(O)}}},[u]);let _=()=>{h(!0)},N=()=>{h(!1),b(!1)};return o?n!=="intent"?[f,z,{}]:[f,z,{onFocus:Xi(j,_),onBlur:Xi(y,N),onMouseEnter:Xi(x,_),onMouseLeave:Xi(w,N),onTouchStart:Xi(T,_)}]:[!1,z,{}]}function Xi(n,r){return o=>{n&&n(o),o.defaultPrevented||r(o)}}function Zb({page:n,...r}){let{router:o}=Ix(),u=L.useMemo(()=>Ux(o.routes,n,o.basename),[o.routes,n,o.basename]);return u?L.createElement(Ib,{page:n,matches:u,...r}):null}function Wb(n){let{manifest:r,routeModules:o}=Qx(),[u,h]=L.useState([]);return L.useEffect(()=>{let f=!1;return Vb(n,r,o).then(b=>{f||h(b)}),()=>{f=!0}},[n,r,o]),u}function Ib({page:n,matches:r,...o}){let u=An(),{future:h,manifest:f,routeModules:b}=Qx(),{basename:j}=Ix(),{loaderData:y,matches:x}=Fb(),w=L.useMemo(()=>kg(n,r,x,f,u,"data"),[n,r,x,f,u]),T=L.useMemo(()=>kg(n,r,x,f,u,"assets"),[n,r,x,f,u]),z=L.useMemo(()=>{if(n===u.pathname+u.search+u.hash)return[];let O=new Set,k=!1;if(r.forEach(D=>{var V;let M=f.routes[D.route.id];!M||!M.hasLoader||(!w.some(K=>K.route.id===D.route.id)&&D.route.id in y&&((V=b[D.route.id])!=null&&V.shouldRevalidate)||M.hasClientLoader?k=!0:O.add(D.route.id))}),O.size===0)return[];let Y=Lb(n,j,h.unstable_trailingSlashAwareDataRequests,"data");return k&&O.size>0&&Y.searchParams.set("_routes",r.filter(D=>O.has(D.route.id)).map(D=>D.route.id).join(",")),[Y.pathname+Y.search]},[j,h.unstable_trailingSlashAwareDataRequests,y,u,f,w,r,n,b]),_=L.useMemo(()=>Bb(T,f),[T,f]),N=Wb(T);return L.createElement(L.Fragment,null,z.map(O=>L.createElement("link",{key:O,rel:"prefetch",as:"fetch",href:O,...o})),_.map(O=>L.createElement("link",{key:O,rel:"modulepreload",href:O,...o})),N.map(({key:O,link:k})=>L.createElement("link",{key:O,nonce:o.nonce,...k,crossOrigin:k.crossOrigin??o.crossOrigin})))}function Qb(...n){return r=>{n.forEach(o=>{typeof o=="function"?o(r):o!=null&&(o.current=r)})}}var Xb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Xb&&(window.__reactRouterVersion="7.13.0")}catch{}function Jb({basename:n,children:r,unstable_useTransitions:o,window:u}){let h=L.useRef();h.current==null&&(h.current=Dy({window:u,v5Compat:!0}));let f=h.current,[b,j]=L.useState({action:f.action,location:f.location}),y=L.useCallback(x=>{o===!1?j(x):L.startTransition(()=>j(x))},[o]);return L.useLayoutEffect(()=>f.listen(y),[f,y]),L.createElement(Cb,{basename:n,children:r,location:b.location,navigationType:b.action,navigator:f,unstable_useTransitions:o})}var Xx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jx=L.forwardRef(function({onClick:r,discover:o="render",prefetch:u="none",relative:h,reloadDocument:f,replace:b,state:j,target:y,to:x,preventScrollReset:w,viewTransition:T,unstable_defaultShouldRevalidate:z,..._},N){let{basename:O,unstable_useTransitions:k}=L.useContext(Ha),Y=typeof x=="string"&&Xx.test(x),D=Vx(x,O);x=D.to;let M=db(x,{relative:h}),[V,K,$]=Gb(u,_),W=t1(x,{replace:b,state:j,target:y,preventScrollReset:w,relative:h,viewTransition:T,unstable_defaultShouldRevalidate:z,unstable_useTransitions:k});function R(C){r&&r(C),C.defaultPrevented||W(C)}let ae=L.createElement("a",{..._,...$,href:D.absoluteURL||M,onClick:D.isExternal||f?r:R,ref:Qb(N,K),target:y,"data-discover":!Y&&o==="render"?"true":void 0});return V&&!Y?L.createElement(L.Fragment,null,ae,L.createElement(Zb,{page:M})):ae});Jx.displayName="Link";var Kx=L.forwardRef(function({"aria-current":r="page",caseSensitive:o=!1,className:u="",end:h=!1,style:f,to:b,viewTransition:j,children:y,...x},w){let T=pc(b,{relative:x.relative}),z=An(),_=L.useContext(hu),{navigator:N,basename:O}=L.useContext(Ha),k=_!=null&&r1(T)&&j===!0,Y=N.encodeLocation?N.encodeLocation(T).pathname:T.pathname,D=z.pathname,M=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;o||(D=D.toLowerCase(),M=M?M.toLowerCase():null,Y=Y.toLowerCase()),M&&O&&(M=il(M,O)||M);const V=Y!=="/"&&Y.endsWith("/")?Y.length-1:Y.length;let K=D===Y||!h&&D.startsWith(Y)&&D.charAt(V)==="/",$=M!=null&&(M===Y||!h&&M.startsWith(Y)&&M.charAt(Y.length)==="/"),W={isActive:K,isPending:$,isTransitioning:k},R=K?r:void 0,ae;typeof u=="function"?ae=u(W):ae=[u,K?"active":null,$?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let C=typeof f=="function"?f(W):f;return L.createElement(Jx,{...x,"aria-current":R,className:ae,ref:w,style:C,to:b,viewTransition:j},typeof y=="function"?y(W):y)});Kx.displayName="NavLink";var Kb=L.forwardRef(({discover:n="render",fetcherKey:r,navigate:o,reloadDocument:u,replace:h,state:f,method:b=au,action:j,onSubmit:y,relative:x,preventScrollReset:w,viewTransition:T,unstable_defaultShouldRevalidate:z,..._},N)=>{let{unstable_useTransitions:O}=L.useContext(Ha),k=l1(),Y=s1(j,{relative:x}),D=b.toLowerCase()==="get"?"get":"post",M=typeof j=="string"&&Xx.test(j),V=K=>{if(y&&y(K),K.defaultPrevented)return;K.preventDefault();let $=K.nativeEvent.submitter,W=($==null?void 0:$.getAttribute("formmethod"))||b,R=()=>k($||K.currentTarget,{fetcherKey:r,method:W,navigate:o,replace:h,state:f,relative:x,preventScrollReset:w,viewTransition:T,unstable_defaultShouldRevalidate:z});O&&o!==!1?L.startTransition(()=>R()):R()};return L.createElement("form",{ref:N,method:D,action:Y,onSubmit:u?y:V,..._,"data-discover":!M&&n==="render"?"true":void 0})});Kb.displayName="Form";function e1(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ep(n){let r=L.useContext(Yr);return vt(r,e1(n)),r}function t1(n,{target:r,replace:o,state:u,preventScrollReset:h,relative:f,viewTransition:b,unstable_defaultShouldRevalidate:j,unstable_useTransitions:y}={}){let x=mu(),w=An(),T=pc(n,{relative:f});return L.useCallback(z=>{if(Ab(z,r)){z.preventDefault();let _=o!==void 0?o:fc(w)===fc(T),N=()=>x(n,{replace:_,state:u,preventScrollReset:h,relative:f,viewTransition:b,unstable_defaultShouldRevalidate:j});y?L.startTransition(()=>N()):N()}},[w,x,T,o,u,r,n,h,f,b,j,y])}var a1=0,n1=()=>`__${String(++a1)}__`;function l1(){let{router:n}=ep("useSubmit"),{basename:r}=L.useContext(Ha),o=Nb(),u=n.fetch,h=n.navigate;return L.useCallback(async(f,b={})=>{let{action:j,method:y,encType:x,formData:w,body:T}=Ub(f,r);if(b.navigate===!1){let z=b.fetcherKey||n1();await u(z,o,b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:w,body:T,formMethod:b.method||y,formEncType:b.encType||x,flushSync:b.flushSync})}else await h(b.action||j,{unstable_defaultShouldRevalidate:b.unstable_defaultShouldRevalidate,preventScrollReset:b.preventScrollReset,formData:w,body:T,formMethod:b.method||y,formEncType:b.encType||x,replace:b.replace,state:b.state,fromRouteId:o,flushSync:b.flushSync,viewTransition:b.viewTransition})},[u,h,r,o])}function s1(n,{relative:r}={}){let{basename:o}=L.useContext(Ha),u=L.useContext(kn);vt(u,"useFormAction must be used inside a RouteContext");let[h]=u.matches.slice(-1),f={...pc(n||".",{relative:r})},b=An();if(n==null){f.search=b.search;let j=new URLSearchParams(f.search),y=j.getAll("index");if(y.some(w=>w==="")){j.delete("index"),y.filter(T=>T).forEach(T=>j.append("index",T));let w=j.toString();f.search=w?`?${w}`:""}}return(!n||n===".")&&h.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(f.pathname=f.pathname==="/"?o:rl([o,f.pathname])),fc(f)}function r1(n,{relative:r}={}){let o=L.useContext($x);vt(o!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=ep("useViewTransitionState"),h=pc(n,{relative:r});if(!o.isTransitioning)return!1;let f=il(o.currentLocation.pathname,u)||o.currentLocation.pathname,b=il(o.nextLocation.pathname,u)||o.nextLocation.pathname;return ru(h.pathname,b)!=null||ru(h.pathname,f)!=null}var i1=zx();const c1=Jf(i1);/**
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 tp=(...n)=>n.filter((r,o,u)=>!!r&&r.trim()!==""&&u.indexOf(r)===o).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 o1=n=>n.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 u1=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,u)=>u?u.toUpperCase():o.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 Ag=n=>{const r=u1(n);return r.charAt(0).toUpperCase()+r.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 d1={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 f1=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="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 h1=L.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:u,className:h="",children:f,iconNode:b,...j},y)=>L.createElement("svg",{ref:y,...d1,width:r,height:r,stroke:n,strokeWidth:u?Number(o)*24/Number(r):o,className:tp("lucide",h),...!f&&!f1(j)&&{"aria-hidden":"true"},...j},[...b.map(([x,w])=>L.createElement(x,w)),...Array.isArray(f)?f:[f]]));/**
96
- * @license lucide-react v0.564.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const Se=(n,r)=>{const o=L.forwardRef(({className:u,...h},f)=>L.createElement(h1,{ref:f,iconNode:r,className:tp(`lucide-${o1(Ag(n))}`,`lucide-${n}`,u),...h}));return o.displayName=Ag(n),o};/**
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 m1=[["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"}]],ap=Se("activity",m1);/**
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 g1=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],x1=Se("arrow-down",g1);/**
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 p1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_g=Se("arrow-right",p1);/**
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 v1=[["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"}]],y1=Se("arrow-up-down",v1);/**
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 b1=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],j1=Se("arrow-up",b1);/**
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 N1=[["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"}]],w1=Se("bell",N1);/**
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 S1=[["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"}]],zg=Se("briefcase",S1);/**
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 E1=[["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"}]],np=Se("calendar",E1);/**
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 T1=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],ih=Se("chart-column",T1);/**
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 C1=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],M1=Se("check",C1);/**
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 O1=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ch=Se("chevron-down",O1);/**
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 R1=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],D1=Se("chevron-left",R1);/**
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 k1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],A1=Se("chevron-right",k1);/**
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 _1=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],z1=Se("chevron-up",_1);/**
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 U1=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],L1=Se("chevrons-up-down",U1);/**
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 H1=[["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"}]],yn=Se("circle-alert",H1);/**
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 q1=[["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"}]],Ug=Se("circle-arrow-down",q1);/**
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 V1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],lp=Se("circle-check",V1);/**
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 B1=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],vc=Se("circle-check-big",B1);/**
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 $1=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],Y1=Se("circle-pause",$1);/**
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 P1=[["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"}]],F1=Se("circle-x",P1);/**
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 G1=[["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"}]],Lg=Se("clipboard",G1);/**
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 Z1=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],W1=Se("clock-3",Z1);/**
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 I1=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],sp=Se("clock",I1);/**
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 Q1=[["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"}]],rp=Se("external-link",Q1);/**
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 X1=[["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"}]],J1=Se("eye-off",X1);/**
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 K1=[["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"}]],oh=Se("eye",K1);/**
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 ej=[["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"}]],Yf=Se("file-text",ej);/**
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 tj=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],uh=Se("git-merge",tj);/**
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 aj=[["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"}]],xu=Se("git-pull-request",aj);/**
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 nj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],lj=Se("globe",nj);/**
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 sj=[["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"}]],rj=Se("house",sj);/**
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 ij=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],cj=Se("info",ij);/**
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 oj=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],uj=Se("kanban",oj);/**
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 dj=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M7 12H3",key:"13ou7f"}],["path",{d:"M7 19H3",key:"wbqt3n"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14",key:"qth677"}],["path",{d:"M11 10v4h4",key:"172dkj"}]],Hg=Se("list-restart",dj);/**
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 fj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ip=Se("loader-circle",fj);/**
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 hj=[["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"}]],cp=Se("map",hj);/**
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 mj=[["path",{d:"M5 12h14",key:"1ays0h"}]],gj=Se("minus",mj);/**
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 xj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],dh=Se("panels-top-left",xj);/**
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 pj=[["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"}]],iu=Se("pause",pj);/**
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 vj=[["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"}]],pu=Se("pen",vj);/**
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 yj=[["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=Se("play",yj);/**
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 bj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Kl=Se("plus",bj);/**
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 jj=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],hc=Se("refresh-cw",jj);/**
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 Nj=[["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"}]],fh=Se("rotate-ccw",Nj);/**
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 wj=[["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"}]],op=Se("save",wj);/**
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 Sj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Fr=Se("search",Sj);/**
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 Ej=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],qg=Se("settings-2",Ej);/**
341
- * @license lucide-react v0.564.0 - ISC
342
- *
343
- * This source code is licensed under the ISC license.
344
- * See the LICENSE file in the root directory of this source tree.
345
- */const Tj=[["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"}]],Cj=Se("settings",Tj);/**
346
- * @license lucide-react v0.564.0 - ISC
347
- *
348
- * This source code is licensed under the ISC license.
349
- * See the LICENSE file in the root directory of this source tree.
350
- */const Mj=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Oj=Se("sparkles",Mj);/**
351
- * @license lucide-react v0.564.0 - ISC
352
- *
353
- * This source code is licensed under the ISC license.
354
- * See the LICENSE file in the root directory of this source tree.
355
- */const Rj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Vg=Se("square",Rj);/**
356
- * @license lucide-react v0.564.0 - ISC
357
- *
358
- * This source code is licensed under the ISC license.
359
- * See the LICENSE file in the root directory of this source tree.
360
- */const Dj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],kj=Se("terminal",Dj);/**
361
- * @license lucide-react v0.564.0 - ISC
362
- *
363
- * This source code is licensed under the ISC license.
364
- * See the LICENSE file in the root directory of this source tree.
365
- */const Aj=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7",key:"10he05"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2",key:"15f7sh"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M12 12v-2",key:"fwoke6"}]],_j=Se("timer-off",Aj);/**
366
- * @license lucide-react v0.564.0 - ISC
367
- *
368
- * This source code is licensed under the ISC license.
369
- * See the LICENSE file in the root directory of this source tree.
370
- */const zj=[["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"}]],Fs=Se("trash-2",zj);/**
371
- * @license lucide-react v0.564.0 - ISC
372
- *
373
- * This source code is licensed under the ISC license.
374
- * See the LICENSE file in the root directory of this source tree.
375
- */const Uj=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],Lj=Se("trending-down",Uj);/**
376
- * @license lucide-react v0.564.0 - ISC
377
- *
378
- * This source code is licensed under the ISC license.
379
- * See the LICENSE file in the root directory of this source tree.
380
- */const Hj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],qj=Se("trending-up",Hj);/**
381
- * @license lucide-react v0.564.0 - ISC
382
- *
383
- * This source code is licensed under the ISC license.
384
- * See the LICENSE file in the root directory of this source tree.
385
- */const Vj=[["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"}]],Ys=Se("triangle-alert",Vj);/**
386
- * @license lucide-react v0.564.0 - ISC
387
- *
388
- * This source code is licensed under the ISC license.
389
- * See the LICENSE file in the root directory of this source tree.
390
- */const Bj=[["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"}]],$j=Se("wifi",Bj);/**
391
- * @license lucide-react v0.564.0 - ISC
392
- *
393
- * This source code is licensed under the ISC license.
394
- * See the LICENSE file in the root directory of this source tree.
395
- */const Yj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Gr=Se("x",Yj);/**
396
- * @license lucide-react v0.564.0 - ISC
397
- *
398
- * This source code is licensed under the ISC license.
399
- * See the LICENSE file in the root directory of this source tree.
400
- */const Pj=[["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"}]],Bg=Se("zap",Pj),up=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"}},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"}},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"}},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"}},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"}},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"}},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"}},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"}}],dp=[{id:"executor",label:"Executor",processName:"executor",color:{bg:"bg-blue-500",border:"border-blue-500/60"},triggerEndpoint:"/api/actions/run",scheduleTemplateKey:"executor",getEnabled:n=>n.executorEnabled??!0,getSchedule:n=>n.cronSchedule??"5 */2 * * *",settingsSection:"general",buildEnabledPatch:n=>({executorEnabled:n})},{id:"reviewer",label:"Reviewer",processName:"reviewer",color:{bg:"bg-green-500",border:"border-green-500/60"},triggerEndpoint:"/api/actions/review",scheduleTemplateKey:"reviewer",getEnabled:n=>n.reviewerEnabled??!0,getSchedule:n=>n.reviewerSchedule??"25 */3 * * *",settingsSection:"general",buildEnabledPatch:n=>({reviewerEnabled:n})},{id:"qa",label:"QA",processName:"qa",color:{bg:"bg-purple-500",border:"border-purple-500/60"},triggerEndpoint:"/api/actions/qa",scheduleTemplateKey:"qa",getEnabled:n=>{var r;return((r=n.qa)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.qa)==null?void 0:r.schedule)??"45 2,10,18 * * *"},settingsSection:"general",buildEnabledPatch:(n,r)=>({qa:{...r.qa??{},enabled:n}})},{id:"audit",label:"Audit",processName:"audit",color:{bg:"bg-orange-500",border:"border-orange-500/60"},triggerEndpoint:"/api/actions/audit",scheduleTemplateKey:"audit",getEnabled:n=>{var r;return((r=n.audit)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.audit)==null?void 0:r.schedule)??"50 3 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({audit:{...r.audit??{},enabled:n}})},{id:"slicer",label:"Planner",processName:"planner",color:{bg:"bg-yellow-500",border:"border-yellow-500/60"},triggerEndpoint:"/api/actions/planner",scheduleTemplateKey:"slicer",getEnabled:n=>{var r;return((r=n.roadmapScanner)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.roadmapScanner)==null?void 0:r.slicerSchedule)??"35 */6 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({roadmapScanner:{...r.roadmapScanner??{},enabled:n}})},{id:"analytics",label:"Analytics",processName:"analytics",color:{bg:"bg-pink-500",border:"border-pink-500/60"},triggerEndpoint:"/api/actions/analytics",scheduleTemplateKey:"analytics",getEnabled:n=>{var r;return((r=n.analytics)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.analytics)==null?void 0:r.schedule)??"0 6 * * 1"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({analytics:{...r.analytics??{},enabled:n}})},{id:"pr-resolver",label:"PR Resolver",processName:"pr-resolver",color:{bg:"bg-teal-500",border:"border-teal-500/60"},triggerEndpoint:"/api/actions/resolve",scheduleTemplateKey:"prResolver",getEnabled:n=>{var r;return((r=n.prResolver)==null?void 0:r.enabled)??!0},getSchedule:n=>{var r;return((r=n.prResolver)==null?void 0:r.schedule)??"15 6,14,22 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({prResolver:{...r.prResolver??{},enabled:n}})},{id:"merger",label:"Merger",processName:"merger",color:{bg:"bg-cyan-500",border:"border-cyan-500/60"},triggerEndpoint:"/api/actions/merge",scheduleTemplateKey:"merger",getEnabled:n=>{var r;return((r=n.merger)==null?void 0:r.enabled)??!1},getSchedule:n=>{var r;return((r=n.merger)==null?void 0:r.schedule)??"55 */4 * * *"},settingsSection:"advanced",buildEnabledPatch:(n,r)=>({merger:{...r.merger??{},enabled:n}})}];function Fj(n){return dp.find(r=>r.id===n)}const hh="";let mh=!1,cu=null;function Gj(n){mh=n}function $g(n){cu=n}function Zj(){return mh}function gh(n){return encodeURIComponent(n.replace(/\//g,"~"))}function yt(n){return mh&&cu?n.replace("/api/",`/api/projects/${gh(cu)}/`):n}function Wj(){return tt("/api/mode")}function fp(){return tt("/api/projects")}function Ij(n){const r=gh(n);return tt(`/api/projects/${r}`,{method:"DELETE"})}async function tt(n,r){const o=`${hh}${n}`,u=await fetch(o,{headers:{"Content-Type":"application/json",...r==null?void 0:r.headers},...r});if(!u.ok){const h=await u.json().catch(()=>({error:"Unknown error"}));throw new Error(h.error||`HTTP ${u.status}: ${u.statusText}`)}return u.json()}function Af(){return tt(yt("/api/status"))}function Qj(){return tt(yt("/api/feedback/summary"))}function Xj(){return tt(yt("/api/feedback/patterns"))}function Jj(n,r){return tt(yt(`/api/feedback/augmentations/${n}`),{method:"PATCH",body:JSON.stringify(r)})}function hp(){return tt(yt("/api/prs"))}function Kj(n,r){const o=`?lines=${encodeURIComponent(r)}`;return tt(yt(`/api/logs/${encodeURIComponent(n)}${o}`))}function xh(){return tt(yt("/api/config"))}async function eN(){if(Zj()){const r=(await fp()).filter(u=>u.valid);return(await Promise.all(r.map(async u=>{try{const h=await tt(`/api/projects/${gh(u.name)}/config`);return{projectId:u.name,config:h}}catch(h){return console.error(`Failed to fetch config for project ${u.name}`,h),null}}))).filter(u=>u!==null)}else{const n=await xh();return[{projectId:cu||"current",config:n}]}}function ou(n){return tt(yt("/api/config"),{method:"PUT",body:JSON.stringify(n)})}function tN(){return tt(yt("/api/doctor"))}function mp(){return tt(yt("/api/schedule-info"))}function aN(){return tt(yt("/api/actions/review"),{method:"POST"})}function gp(n){const r=Fj(n);return r?tt(yt(r.triggerEndpoint),{method:"POST"}):Promise.reject(new Error(`Unknown job ID: ${n}`))}function uc(){return tt(yt("/api/actions/install-cron"),{method:"POST"})}function xp(){return tt(yt("/api/actions/uninstall-cron"),{method:"POST"})}function nN(n="all"){return tt(yt("/api/actions/cancel"),{method:"POST",body:JSON.stringify({type:n})})}const Jl=["Draft","Ready","In Progress","Review","Done"];function pp(){return tt(yt("/api/board/status"))}function lN(n){return tt(yt("/api/board/issues"),{method:"POST",body:JSON.stringify(n)})}function vp(n,r){return tt(yt(`/api/board/issues/${n}/move`),{method:"PATCH",body:JSON.stringify({column:r})})}async function sN(n){const r=`${hh}${yt(`/api/board/issues/${n}`)}`,o=await fetch(r,{headers:{"Content-Type":"application/json"},method:"DELETE"});if(!o.ok){const u=await o.json().catch(()=>({error:"Unknown error"}));throw new Error(u.error||`HTTP ${o.status}: ${o.statusText}`)}}function rN(){return tt(yt("/api/actions/clear-lock"),{method:"POST"})}function iN(n,r=[],o){const u=(o==null?void 0:o.enabled)??!0,h=L.useRef(n);h.current=n,L.useEffect(()=>{if(!u)return;const f=`${hh}${yt("/api/status/events")}`,b=new EventSource(f);return b.addEventListener("status_changed",j=>{try{const y=JSON.parse(j.data);h.current(y)}catch{}}),()=>{b.close()}},[u,...r])}function Yg(){return tt("/api/queue/status")}function cN(n){const r=`?window=${encodeURIComponent(n)}`;return tt(`/api/queue/analytics${r}`)}function oN(n){return tt("/api/queue/clear",{method:"POST",body:JSON.stringify({force:!1})})}function uN(){return tt("/api/global-notifications")}function Pg(n){return tt("/api/global-notifications",{method:"PUT",body:JSON.stringify(n)})}function dN(){return tt(yt("/api/roadmap"))}function fN(){return tt(yt("/api/roadmap/scan"),{method:"POST"})}function yp(n){return tt(yt("/api/roadmap/toggle"),{method:"PUT",body:JSON.stringify({enabled:n})})}function Ua(n,r=[],o){const u=(o==null?void 0:o.enabled)??!0,[h,f]=L.useState(null),[b,j]=L.useState(!0),[y,x]=L.useState(null),w=L.useRef(n);w.current=n;const T=L.useRef(()=>{(async()=>{x(null);try{const _=await w.current();f(_)}catch(_){x(_ instanceof Error?_:new Error("Unknown error"))}})()});return L.useEffect(()=>{if(!u)return;let z=!1;return j(!0),x(null),(async()=>{try{const N=await w.current();z||f(N)}catch(N){z||x(N instanceof Error?N:new Error("Unknown error"))}finally{z||j(!1)}})(),()=>{z=!0}},[...r,u]),{data:h,loading:b,error:y,refetch:T.current}}const Fg=n=>{let r;const o=new Set,u=(x,w)=>{const T=typeof x=="function"?x(r):x;if(!Object.is(T,r)){const z=r;r=w??(typeof T!="object"||T===null)?T:Object.assign({},r,T),o.forEach(_=>_(r,z))}},h=()=>r,j={setState:u,getState:h,getInitialState:()=>y,subscribe:x=>(o.add(x),()=>o.delete(x))},y=r=n(u,h,j);return j},hN=n=>n?Fg(n):Fg,mN=n=>n;function gN(n,r=mN){const o=_e.useSyncExternalStore(n.subscribe,()=>r(n.getState()),()=>r(n.getInitialState()));return _e.useDebugValue(o),o}const Gg=n=>{const r=hN(n),o=u=>gN(r,u);return Object.assign(o,r),o},xN=n=>n?Gg(n):Gg,pN=typeof localStorage<"u"?localStorage.getItem("nw-selected-project"):null,Ft=xN((n,r)=>({projectName:"Night Watch",setProjectName:o=>n({projectName:o}),toasts:[],addToast:o=>{const u=Math.random().toString(36).substring(7);n(h=>({toasts:[...h.toasts,{...o,id:u}]})),setTimeout(()=>{n(h=>({toasts:h.toasts.filter(f=>f.id!==u)}))},5e3)},removeToast:o=>n(u=>({toasts:u.toasts.filter(h=>h.id!==o)})),status:null,setStatus:o=>n(u=>!u.status||new Date(o.timestamp)>new Date(u.status.timestamp)?{status:o}:u),globalModeLoading:!0,setGlobalModeLoading:o=>n({globalModeLoading:o}),isGlobalMode:!1,setGlobalMode:o=>{Gj(o),n({isGlobalMode:o})},projects:[],setProjects:o=>n({projects:o}),selectedProjectId:pN,selectProject:o=>{$g(o),o?localStorage.setItem("nw-selected-project",o):localStorage.removeItem("nw-selected-project"),n(u=>{const h=u.projects.find(f=>f.name===o);return{selectedProjectId:o,...h?{projectName:h.name}:{}}})},removeProjectFromList:o=>{n(u=>{var j;const h=u.projects.filter(y=>y.name!==o),f=u.selectedProjectId===o,b=f?((j=h[0])==null?void 0:j.name)??null:u.selectedProjectId;return f&&($g(b),b?localStorage.setItem("nw-selected-project",b):localStorage.removeItem("nw-selected-project")),{projects:h,selectedProjectId:b,...f&&h[0]?{projectName:h[0].name}:{}}})},getJobStates:()=>{const{status:o}=r(),u=o==null?void 0:o.config;return dp.map(h=>({id:h.id,label:h.label,processName:h.processName,color:h.color,enabled:u?h.getEnabled(u):!0,schedule:u?h.getSchedule(u):"",triggerEndpoint:h.triggerEndpoint}))}})),vN=()=>{const[n,r]=L.useState(!1),{projectName:o,isGlobalMode:u,projects:h,selectedProjectId:f,selectProject:b,globalModeLoading:j}=Ft(),{data:y}=Ua(hp,[f],{enabled:!j}),x=(y==null?void 0:y.length)??0,w=L.useMemo(()=>[{icon:rj,label:"Dashboard",path:"/",section:"Overview"},{icon:kj,label:"Logs",path:"/logs"},{icon:uj,label:"Board",path:"/board",section:"Work"},{icon:xu,label:"Pull Requests",path:"/prs",badge:x},{icon:cp,label:"Roadmap",path:"/roadmap"},{icon:np,label:"Automation",path:"/scheduling",section:"Automation"},{icon:Cj,label:"Settings",path:"/settings",section:"Config"}],[x]);return s.jsxs("aside",{className:`
401
- relative flex flex-col transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)]
402
- ${n?"w-20":"w-72"} h-screen flex-shrink-0 z-50
403
- bg-[#030712]/80 backdrop-blur-xl border-r border-white/5
404
- `,children:[s.jsx("div",{className:`p-6 border-b border-white/5 ${n?"items-center justify-center flex":""}`,children:n?s.jsx("div",{className:"relative group",children:s.jsx("div",{className:"h-10 w-10 bg-indigo-600 rounded-xl flex items-center justify-center text-white font-bold cursor-pointer shadow-lg shadow-indigo-500/20 group-hover:bg-indigo-500 transition-colors bg-gradient-to-br from-indigo-500 to-indigo-700",title:"Switch Project",children:"NW"})}):s.jsxs("div",{className:"relative w-full",children:[s.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest mb-3 block pl-1",children:u?"Projects":"Workspace"}),u?s.jsxs("div",{className:"relative",children:[s.jsx(zg,{className:"absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-indigo-400 pointer-events-none"}),s.jsx("select",{value:f||"",onChange:T=>b(T.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:h.filter(T=>T.valid).map(T=>s.jsx("option",{value:T.name,children:T.name},T.name))}),s.jsx(L1,{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(zg,{className:"h-4 w-4 text-indigo-400 mr-3"}),s.jsx("span",{className:"truncate",children:o})]})]})}),s.jsx("nav",{className:"flex-1 py-6 overflow-y-auto overflow-x-hidden scrollbar-hide",children:s.jsx("ul",{className:"space-y-1.5 px-4",children:w.map(T=>s.jsxs(_e.Fragment,{children:[T.section&&!n&&s.jsx("li",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-widest px-3.5 pt-4 pb-1",children:T.section}),s.jsx("li",{children:s.jsx(Kx,{to:T.path,className:({isActive:z})=>`
405
- flex items-center px-3.5 py-3 rounded-xl transition-all duration-200 group relative
406
- ${z?"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"}
407
- ${n?"justify-center":""}
408
- `,children:({isActive:z})=>s.jsxs(s.Fragment,{children:[s.jsx(T.icon,{className:`h-5 w-5 transition-colors ${z?"text-indigo-400 drop-shadow-[0_0_8px_rgba(99,102,241,0.5)]":"text-slate-500 group-hover:text-slate-300"} ${n?"":"mr-3.5"}`}),!n&&s.jsx("span",{className:"flex-1 text-sm font-medium tracking-wide",children:T.label}),T.badge&&(n?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 ${z?"bg-indigo-500/20 text-indigo-300":"bg-white/5 text-slate-400 border border-white/5"}`,children:T.badge})),z&&!n&&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)]"}),n&&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:T.label})]})})})]},T.path))})}),s.jsx("div",{className:"p-4 border-t border-white/5 flex justify-end",children:s.jsx("button",{onClick:()=>r(!n),className:"p-2 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:n?s.jsx(A1,{className:"h-5 w-5"}):s.jsx(D1,{className:"h-5 w-5"})})})]})},yN=()=>{const{projectName:n}=Ft();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:n})]}),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($j,{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(Fr,{className:"absolute left-3.5 top-2.5 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400 transition-colors"})]}),s.jsx("div",{className:"flex items-center space-x-3",children:s.jsxs("button",{className:"p-2.5 text-slate-400 hover:text-white hover:bg-white/5 rounded-full relative transition-all",children:[s.jsx(w1,{className:"h-5 w-5"}),s.jsx("span",{className:"absolute top-2.5 right-2.5 h-2 w-2 bg-red-500 rounded-full ring-2 ring-[#030712]"})]})}),s.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-tr from-indigo-600 to-purple-600 ring-2 ring-white/10 flex items-center justify-center text-white font-bold text-xs shadow-lg",children:"AD"})]})]})},bN=({toast:n,onDismiss:r})=>{const o={success:s.jsx(vc,{className:"h-5 w-5 text-green-400"}),error:s.jsx(yn,{className:"h-5 w-5 text-red-400"}),info:s.jsx(cj,{className:"h-5 w-5 text-blue-400"}),warning:s.jsx(Ys,{className:"h-5 w-5 text-amber-400"})},u={success:"border-l-green-500",error:"border-l-red-500",info:"border-l-blue-500",warning:"border-l-amber-500"};return s.jsx("div",{className:`
409
- pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg
410
- bg-slate-900 border border-slate-800 border-l-4 ${u[n.type]}
411
- shadow-lg ring-1 ring-black ring-opacity-5 transition-all
412
- animate-in slide-in-from-right-full fade-in duration-300
413
- `,children:s.jsx("div",{className:"p-4",children:s.jsxs("div",{className:"flex items-start",children:[s.jsx("div",{className:"flex-shrink-0",children:o[n.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:n.title}),n.message&&s.jsx("p",{className:"mt-1 text-sm text-slate-400",children:n.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:()=>r(n.id),children:[s.jsx("span",{className:"sr-only",children:"Close"}),s.jsx(Gr,{className:"h-5 w-5"})]})})]})})})},jN=()=>{const{toasts:n,removeToast:r}=Ft();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:n.map(o=>s.jsx(bN,{toast:o,onDismiss:r},o.id))})};function NN(){const{setGlobalMode:n,setGlobalModeLoading:r,setProjects:o,selectProject:u,selectedProjectId:h}=Ft();L.useEffect(()=>{r(!0),Wj().then(async({globalMode:f})=>{if(n(f),!f)return;const b=await fp();o(b);const j=b.filter(y=>y.valid);h&&j.some(y=>y.name===h)?u(h):j.length>0&&u(j[0].name)}).catch(()=>{n(!1)}).finally(()=>{r(!1)})},[])}function Zg(n){if(!(n!=null&&n.timestamp))return Number.NEGATIVE_INFINITY;const r=new Date(n.timestamp).getTime();return Number.isNaN(r)?Number.NEGATIVE_INFINITY:r}function Zo(n,r){return n?r?Zg(n)>=Zg(r)?n:r:n:r}function wN(){const{setStatus:n,setProjectName:r,selectedProjectId:o,globalModeLoading:u,status:h}=Ft(),f=L.useRef(null);f.current=Ft.getState().status,iN(b=>{Zo(b,f.current)===b&&n(b)},[o,u],{enabled:!u}),L.useEffect(()=>{if(u)return;Af().then(j=>{Zo(j,f.current)===j&&n(j)}).catch(()=>{});const b=setInterval(()=>{Af().then(j=>{Zo(j,f.current)===j&&n(j)}).catch(()=>{})},3e4);return()=>clearInterval(b)},[o,u,n]),L.useEffect(()=>{const b=()=>{Af().then(j=>{Zo(j,f.current)===j&&n(j)}).catch(()=>{})};return window.addEventListener("focus",b),()=>window.removeEventListener("focus",b)},[o,n]),L.useEffect(()=>{h!=null&&h.projectName&&r(h.projectName)},[h==null?void 0:h.projectName,r])}const lt=({children:n,className:r="",onClick:o})=>s.jsxs("div",{className:`
414
- relative bg-[#0b101b] rounded-xl border border-white/5
415
- shadow-[0_4px_20px_-4px_rgba(0,0,0,0.5)]
416
- transition-all duration-300
417
- ${o?"cursor-pointer hover:border-indigo-500/30 hover:shadow-indigo-500/5 group":""}
418
- ${r}
419
- `,onClick:o,children:[o&&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:n})]}),Le=({children:n,variant:r="primary",size:o="md",loading:u=!1,className:h="",disabled:f,...b})=>{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]",y={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"},x={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} ${y[r]} ${x[o]} ${h}`,disabled:f||u,...b,children:[u&&s.jsx(ip,{className:"mr-2 h-4 w-4 animate-spin"}),n]})},St=({children:n,variant:r="default",className:o=""})=>{const u={default:"bg-indigo-500/10 text-indigo-400 ring-1 ring-inset ring-indigo-500/20",success:"bg-emerald-500/10 text-emerald-400 ring-1 ring-inset ring-emerald-500/20",warning:"bg-amber-500/10 text-amber-400 ring-1 ring-inset ring-amber-500/20",error:"bg-red-500/10 text-red-400 ring-1 ring-inset ring-red-500/20",neutral:"bg-slate-500/10 text-slate-400 ring-1 ring-inset ring-slate-500/20",info:"bg-blue-500/10 text-blue-400 ring-1 ring-inset ring-blue-500/20"};return s.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[11px] font-medium tracking-wide ${u[r]} ${o}`,children:n})},bp={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"}},SN=({defaultColumn:n,onClose:r,onCreated:o})=>{const[u,h]=L.useState(""),[f,b]=L.useState(""),[j,y]=L.useState(n),[x,w]=L.useState(!1),[T,z]=L.useState(null),{addToast:_}=Ft(),N=async O=>{if(O.preventDefault(),!!u.trim()){w(!0),z(null);try{await lN({title:u.trim(),body:f,column:j}),_({title:"Issue created",message:`"${u.trim()}" added to ${j}`,type:"success"}),o(),r()}catch(k){z(k instanceof Error?k.message:"Failed to create issue")}finally{w(!1)}}};return s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:r}),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:r,className:"p-1.5 rounded-lg hover:bg-white/5 text-slate-500 hover:text-slate-300 transition-colors",children:s.jsx(Gr,{className:"h-5 w-5"})})]}),s.jsxs("form",{onSubmit:N,className:"p-6 space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Title"}),s.jsx("input",{type:"text",value:u,onChange:O=>h(O.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:O=>y(O.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:Jl.map(O=>s.jsx("option",{value:O,children:O},O))})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-slate-400 uppercase tracking-wide block mb-1.5",children:"Body (optional)"}),s.jsx("textarea",{value:f,onChange:O=>b(O.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"})]}),T&&s.jsx("p",{className:"text-sm text-red-400",children:T}),s.jsxs("div",{className:"flex justify-end space-x-3 pt-2",children:[s.jsx(Le,{variant:"ghost",type:"button",onClick:r,children:"Cancel"}),s.jsx(Le,{type:"submit",disabled:x||!u.trim(),children:x?"Creating...":"Create Issue"})]})]})]})]})},EN=({issue:n,onClose:r,onMoved:o,onClosed:u})=>{const[h,f]=L.useState(!1),[b,j]=L.useState(!1),[y,x]=L.useState(!1),{addToast:w}=Ft(),T=async N=>{if(N!==n.column){f(!0);try{await vp(n.number,N),w({title:"Issue moved",message:`#${n.number} moved to ${N}`,type:"success"}),o(),r()}catch(O){w({title:"Move failed",message:O instanceof Error?O.message:"Failed to move issue",type:"error"})}finally{f(!1)}}},z=async()=>{x(!1),j(!0);try{await sN(n.number),w({title:"Issue closed",message:`#${n.number} closed on GitHub`,type:"success"}),u(),r()}catch(N){w({title:"Close failed",message:N instanceof Error?N.message:"Failed to close issue",type:"error"})}finally{j(!1)}},_=n.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:r}),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:["#",n.number]}),s.jsx(St,{variant:bp[_].badge,children:_})]}),s.jsx("h2",{className:"text-lg font-semibold text-slate-100 leading-snug",children:n.title}),n.assignees.length>0&&s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Assigned to: ",n.assignees.join(", ")]})]}),s.jsx("button",{onClick:r,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(Gr,{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:"}),Jl.filter(N=>N!==n.column).map(N=>s.jsx("button",{onClick:()=>T(N),disabled:h,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:N},N))]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-auto",children:[n.url&&!n.url.startsWith("local://")&&s.jsxs("a",{href:n.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(rp,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"GitHub"})]}),s.jsx("button",{onClick:()=>x(!0),disabled:b,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:b?"Closing...":"Close Issue"})]})]}),y&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:()=>x(!1)}),s.jsxs("div",{className:"relative bg-[#0a0f1e] border border-white/10 rounded-xl p-6 max-w-sm w-full mx-4 shadow-2xl",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-100 mb-2",children:"Close issue?"}),s.jsxs("p",{className:"text-sm text-slate-400 mb-4",children:["Close issue #",n.number,': "',n.title,'"?']}),s.jsxs("div",{className:"flex justify-end space-x-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>x(!1),children:"Cancel"}),s.jsx(Le,{onClick:z,children:"Confirm"})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:n.body?s.jsx("pre",{className:"text-sm text-slate-300 whitespace-pre-wrap font-mono leading-relaxed break-words",children:n.body}):s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No description provided."})})]})]})},TN=({issue:n,onClick:r,onDragStart:o})=>{const[u,h]=L.useState(!1);return s.jsx("div",{className:"relative",draggable:!0,onDragStart:f=>{f.dataTransfer.setData("issueNumber",String(n.number)),f.dataTransfer.effectAllowed="move",h(!0),o(n)},onDragEnd:()=>h(!1),children:s.jsxs(lt,{className:`p-3 cursor-grab hover:border-indigo-500/30 transition-all select-none ${u?"opacity-30":""}`,onClick:r,children:[s.jsxs("span",{className:"text-[10px] font-mono text-slate-600",children:["#",n.number]}),s.jsx("p",{className:"text-xs font-medium text-slate-200 line-clamp-2 mt-0.5 leading-snug",children:n.title}),n.assignees.length>0&&s.jsx("p",{className:"text-[10px] text-slate-500 mt-1.5 truncate",children:n.assignees.join(", ")})]})})},CN=({name:n,issues:r,draggingIssue:o,onIssueClick:u,onNewIssue:h,onMoveIssue:f,onDragStart:b})=>{const j=bp[n],[y,x]=L.useState(!1),w=o!==null&&o.column!==n;return s.jsxs("div",{className:`flex flex-col min-w-[220px] max-w-[220px] h-full rounded-xl transition-colors ${y&&w?"bg-indigo-500/5 ring-1 ring-indigo-500/30":""}`,onDragOver:T=>{w&&(T.preventDefault(),T.dataTransfer.dropEffect="move",x(!0))},onDragLeave:()=>x(!1),onDrop:T=>{T.preventDefault(),x(!1),o&&o.column!==n&&f(o,n)},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:n}),s.jsx("span",{className:"text-[10px] font-bold text-slate-600 bg-slate-800 rounded-full px-1.5 py-0.5",children:r.length})]}),s.jsx("button",{onClick:()=>h(n),className:"p-1 rounded-md hover:bg-white/5 text-slate-600 hover:text-slate-400 transition-colors",title:`Add issue to ${n}`,children:s.jsx(Kl,{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:r.length===0?s.jsx("div",{className:`border-2 border-dashed rounded-xl h-24 flex items-center justify-center transition-colors ${y&&w?"border-indigo-500/40":"border-slate-800"}`,children:s.jsx("span",{className:"text-xs text-slate-700",children:y&&w?"Drop here":"No issues"})}):r.map(T=>s.jsx(TN,{issue:T,onClick:()=>u(T),onDragStart:b},T.id))})]})},MN=()=>{const[n,r]=L.useState(null),[o,u]=L.useState(null),[h,f]=L.useState(null),[b,j]=L.useState(null),y=L.useRef(!1),{addToast:x,selectedProjectId:w,globalModeLoading:T}=Ft(),{data:z,loading:_,error:N,refetch:O}=Ua(pp,[w],{enabled:!T});L.useEffect(()=>{const D=setInterval(()=>{y.current||O()},3e4);return()=>clearInterval(D)},[O]);const k=L.useCallback(async(D,M)=>{f(null);const V=b??(z==null?void 0:z.columns);if(!V)return;const K=V,$={};for(const R of Jl)$[R]=(V[R]??[]).filter(ae=>ae.number!==D.number);const W={...D,column:M};$[M]=[...$[M]??[],W],j($),r(R=>(R==null?void 0:R.number)===D.number?W:R),y.current=!0;try{await vp(D.number,M),O(),setTimeout(()=>{j(null),y.current=!1},800)}catch(R){j(K),r(ae=>(ae==null?void 0:ae.number)===D.number?D:ae),y.current=!1,x({title:"Move failed",message:R instanceof Error?R.message:"Failed to move issue",type:"error"})}},[x,O,b,z]);if(T||_)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading board..."})});if(N&&N.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(N)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:N.message}),s.jsx(Le,{onClick:()=>O(),children:"Retry"})]});if(!z)return null;const Y=b??z.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:[Jl.reduce((D,M)=>{var V;return D+(((V=Y[M])==null?void 0:V.length)??0)},0)," issues across ",Jl.length," columns"]})]}),s.jsxs(Le,{onClick:()=>u("Ready"),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"New Issue"]})]}),s.jsx("div",{className:"flex-1 overflow-x-auto overflow-y-hidden",onDragEnd:()=>f(null),children:s.jsx("div",{className:"flex space-x-4 h-full pb-4",style:{minWidth:`${Jl.length*236}px`},children:Jl.map(D=>s.jsx(CN,{name:D,issues:Y[D]??[],draggingIssue:h,onIssueClick:r,onNewIssue:u,onMoveIssue:k,onDragStart:f},D))})}),n&&s.jsx(EN,{issue:n,onClose:()=>r(null),onMoved:()=>O(),onClosed:()=>O()}),o&&s.jsx(SN,{defaultColumn:o,onClose:()=>u(null),onCreated:()=>O()})]})},ON=[{name:"executor",displayName:"Executor",processName:"executor",triggerId:"executor",cancelType:"run",runningLabel:"Running",idleLabel:"Idle"},{name:"reviewer",displayName:"Reviewer",processName:"reviewer",triggerId:"reviewer",cancelType:"review",runningLabel:"Running",idleLabel:"Idle"},{name:"qa",displayName:"QA",processName:"qa",triggerId:"qa",runningLabel:"Running",idleLabel:"Idle"},{name:"auditor",displayName:"Auditor",processName:"audit",triggerId:"audit",runningLabel:"Running",idleLabel:"Idle"},{name:"planner",displayName:"Planner",processName:"planner",triggerId:"planner",runningLabel:"Writing PRDs",idleLabel:"Idle"},{name:"analytics",displayName:"Analytics",processName:"analytics",triggerId:"analytics",runningLabel:"Running",idleLabel:"Idle"},{name:"pr-resolver",displayName:"PR Resolver",processName:"pr-resolver",triggerId:"pr-resolver",runningLabel:"Resolving",idleLabel:"Idle"},{name:"merger",displayName:"Merger",processName:"merger",triggerId:"merger",runningLabel:"Running",idleLabel:"Idle"}],RN=({processes:n,activePrd:r,onCancelProcess:o,onForceClear:u,onViewLog:h,cancellingProcess:f,clearingLock:b,onTriggerJob:j,triggeringJob:y})=>{const x=T=>n.find(z=>z.name===T),w=(T,z)=>T.length<=z?T:T.slice(0,z-1)+"...";return s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-8 gap-3",children:ON.map(T=>{const z=x(T.processName),_=(z==null?void 0:z.running)??!1,N=z==null?void 0:z.pid,O=f===T.cancelType,k=_&&T.cancelType,Y=!_&&T.name==="executor"&&r,D=_?N?`PID: ${N}`:T.runningLabel:T.idleLabel,M=_&&T.name==="executor"&&r?w(r,20):null;return s.jsxs("div",{className:`flex items-center gap-2 p-2.5 rounded-lg border transition-colors ${_?"bg-green-950/30 border-green-800/50":"bg-slate-950/50 border-slate-800"}`,children:[s.jsx("div",{className:`h-2.5 w-2.5 rounded-full flex-shrink-0 ${_?"bg-green-500 animate-pulse shadow-[0_0_8px_rgba(34,197,94,0.5)]":"bg-slate-700"}`}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:`text-sm font-medium ${_?"text-slate-200":"text-slate-400"}`,children:T.displayName}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:M?s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx(Yf,{className:"h-3 w-3 flex-shrink-0"}),M]}):D})]}),s.jsxs("div",{className:"flex-shrink-0",children:[k&&s.jsx("button",{onClick:()=>T.cancelType&&o(T.cancelType),disabled:O,className:"p-1 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded transition-colors disabled:opacity-50",title:"Stop process",children:s.jsx(Vg,{className:"h-3.5 w-3.5"})}),Y&&s.jsx("button",{onClick:u,disabled:b,className:"p-1 text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 rounded transition-colors disabled:opacity-50",title:"Force clear stale state",children:s.jsx(Vg,{className:"h-3.5 w-3.5"})}),!k&&!Y&&_&&s.jsx("button",{onClick:h,className:"p-1 text-slate-400 hover:text-slate-300 hover:bg-white/5 rounded transition-colors",title:"View log",children:s.jsx(Yf,{className:"h-3.5 w-3.5"})}),!_&&!Y&&s.jsx("button",{onClick:()=>j(T.triggerId),disabled:y!==null,className:"p-1 text-slate-500 hover:text-green-400 hover:bg-green-500/10 rounded transition-colors disabled:opacity-50",title:`Run ${T.displayName}`,children:y===T.triggerId?s.jsx("div",{className:"h-3.5 w-3.5 border-2 border-current border-t-transparent rounded-full animate-spin"}):s.jsx(vn,{className:"h-3.5 w-3.5"})})]})]},T.name)})})};function DN(n){return`${Math.round(n*100)}%`}function Wg(n){return new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}function Ig(n){return(n==null?void 0:n.replace(/_/g," "))||"uncategorized"}const kN=({activePatterns:n,augmentations:r,topFailurePatterns:o,updatingAugmentationId:u=null,onAugmentationAction:h})=>s.jsxs("div",{className:"space-y-6","data-testid":"feedback-pattern-list",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Active Patterns"}),s.jsx(St,{variant:"neutral",children:n.length})]}),n.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No active feedback patterns."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:n.map(f=>s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"truncate text-sm font-medium text-slate-200",title:f.title,children:f.title}),s.jsx("p",{className:"mt-1 line-clamp-2 text-xs text-slate-500",children:f.description})]}),s.jsx(St,{variant:"info",className:"shrink-0 capitalize",children:f.jobType})]}),s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 text-[11px] text-slate-500",children:[s.jsx("span",{className:"capitalize",children:Ig(f.category)}),s.jsxs("span",{children:[f.sampleCount," samples"]}),s.jsxs("span",{children:[DN(f.confidence)," confidence"]})]})]},f.id))})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Top Failure Patterns"}),s.jsx(St,{variant:"neutral",children:o.length})]}),o.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No repeated failure signatures yet."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:o.map(f=>s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"truncate text-sm font-medium text-slate-200",title:f.signature??f.key,children:f.signature||Ig(f.category)}),s.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-[11px] text-slate-500",children:[s.jsx("span",{className:"capitalize",children:f.jobType}),s.jsx("span",{className:"font-mono",children:f.providerKey})]})]}),s.jsx(St,{variant:"warning",className:"shrink-0",children:f.sampleCount})]}),s.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-slate-500",children:[s.jsx(W1,{className:"h-3 w-3"}),s.jsxs("span",{children:["Last seen ",Wg(f.lastSeenAt)]})]})]},f.key))})]})]}),s.jsxs("section",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Active Augmentations"}),s.jsx(St,{variant:r.length>0?"success":"neutral",children:r.length})]}),r.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No active prompt augmentations."}):s.jsx("div",{className:"overflow-x-auto rounded-lg border border-slate-800",children:s.jsxs("table",{className:"w-full min-w-[720px] text-left text-sm",children:[s.jsx("thead",{className:"border-b border-slate-800 bg-slate-900/30 text-[11px] uppercase tracking-wider text-slate-500",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3 font-semibold",children:"Prompt Snippet"}),s.jsx("th",{className:"px-4 py-3 font-semibold",children:"Job"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Use"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Expires"}),s.jsx("th",{className:"px-4 py-3 text-right font-semibold",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/60",children:r.map(f=>{const b=u===f.id,j=f.appliedCount>0?`${Math.round(f.successCount/f.appliedCount*100)}%`:"new";return s.jsxs("tr",{className:"hover:bg-slate-800/20",children:[s.jsx("td",{className:"px-4 py-3",children:s.jsx("div",{className:"line-clamp-2 max-w-xl text-sm text-slate-300",title:f.promptText,children:f.promptText})}),s.jsx("td",{className:"px-4 py-3",children:s.jsx(St,{variant:"info",className:"capitalize",children:f.jobType})}),s.jsxs("td",{className:"px-4 py-3 text-right text-xs text-slate-400",children:[f.appliedCount," applied · ",j]}),s.jsx("td",{className:"px-4 py-3 text-right text-xs text-slate-500",children:f.expiresAt?Wg(f.expiresAt):"No expiry"}),s.jsx("td",{className:"px-4 py-3",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsxs(Le,{variant:"outline",size:"sm",disabled:b,onClick:()=>h(f.id,"disable"),children:[s.jsx(Y1,{className:"mr-1.5 h-3.5 w-3.5"}),"Disable"]}),s.jsxs(Le,{variant:"ghost",size:"sm",disabled:b,onClick:()=>h(f.id,"expire"),className:"text-slate-500 hover:text-amber-300",children:[s.jsx(_j,{className:"mr-1.5 h-3.5 w-3.5"}),"Expire"]})]})})]},f.id)})})]})})]})]});function lu(n){return n===null?"—":`${Math.round(n*100)}%`}function AN(n){return n===null?"—":n<60?`${Math.round(n)}s`:`${Math.floor(n/60)}m ${Math.round(n%60)}s`}function _N(n,r){return Object.entries(n).sort(([,o],[,u])=>u-o).slice(0,r)}function Wo(n){return Object.entries(n).sort(([,r],[,o])=>o.totalCount-r.totalCount).slice(0,5).map(([r,o])=>[r,`${lu(o.successRate)} · ${o.totalCount} runs`])}function zN(n,r){if(n===null||r===null)return"Waiting for comparable data";const o=Math.round((n-r)*100);return o===0?"Flat vs 30 days":`${o>0?"+":""}${o} pts vs 30 days`}function UN(n,r){return n===null||r===null?"neutral":n>=r?"success":"warning"}const Io=({label:n,value:r,detail:o})=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/40 p-4",children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.16em] text-slate-500",children:n}),s.jsx("div",{className:"mt-2 text-2xl font-bold text-slate-100",children:r}),s.jsx("div",{className:"mt-1 text-xs text-slate-500",children:o})]}),LN=()=>{const{addToast:n,selectedProjectId:r,globalModeLoading:o}=Ft(),[u,h]=_e.useState(null),{data:f,loading:b,error:j,refetch:y}=Ua(Qj,[r],{enabled:!o}),{data:x,loading:w,error:T,refetch:z}=Ua(Xj,[r],{enabled:!o}),_=()=>{y(),z()},N=async(C,J)=>{h(C);try{await Jj(C,{action:J}),n({title:J==="expire"?"Augmentation Expired":"Augmentation Disabled",message:"Prompt augmentation state was updated.",type:"success"}),_()}catch(ne){n({title:"Update Failed",message:ne instanceof Error?ne.message:"Failed to update augmentation",type:"error"})}finally{h(null)}},O=b||w,k=j||T,Y=(f==null?void 0:f.windows.last7Days)??null,D=(f==null?void 0:f.windows.last30Days)??null,M=((x==null?void 0:x.patterns)??[]).filter(C=>C.status==="active").sort((C,J)=>J.confidence-C.confidence||J.sampleCount-C.sampleCount).slice(0,5),V=(x==null?void 0:x.topFailurePatterns.slice(0,5))??[],K=_N((D==null?void 0:D.byFailureCategory)??{},5),$=Math.max(...K.map(([,C])=>C),1),W=((D==null?void 0:D.totalCount)??0)>0||((Y==null?void 0:Y.totalCount)??0)>0,R=UN((Y==null?void 0:Y.successRate)??null,(D==null?void 0:D.successRate)??null),ae=R==="success"?s.jsx(qj,{className:"h-4 w-4"}):R==="warning"?s.jsx(Lj,{className:"h-4 w-4"}):null;return s.jsxs("section",{className:"space-y-4","aria-labelledby":"feedback-performance-heading",children:[s.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{id:"feedback-performance-heading",className:"text-lg font-semibold text-slate-200",children:"Feedback Performance"}),s.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Outcome trends, repeated failures, and prompt augmentations."})]}),s.jsxs(Le,{variant:"outline",size:"sm",onClick:_,disabled:O,children:[s.jsx(hc,{className:`mr-1.5 h-4 w-4 ${O?"animate-spin":""}`}),"Refresh"]})]}),s.jsx(lt,{className:"p-5",children:O&&!f?s.jsx("div",{className:"py-10 text-center text-sm text-slate-500",children:"Loading feedback performance..."}):k?s.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-300",children:[s.jsx(yn,{className:"h-5 w-5 shrink-0"}),s.jsx("span",{children:k.message})]}):!f||!W?s.jsxs("div",{className:"py-10 text-center",children:[s.jsx("div",{className:"text-sm font-medium text-slate-300",children:"No feedback outcomes recorded yet."}),s.jsx("p",{className:"mx-auto mt-2 max-w-md text-sm text-slate-500",children:"This panel will populate after executor, reviewer, QA, audit, planner, or merge jobs complete."})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-4",children:[s.jsx(Io,{label:"7 Day Success",value:lu((Y==null?void 0:Y.successRate)??null),detail:`${(Y==null?void 0:Y.successCount)??0} of ${(Y==null?void 0:Y.totalCount)??0} completed`}),s.jsx(Io,{label:"30 Day Success",value:lu((D==null?void 0:D.successRate)??null),detail:`${(D==null?void 0:D.successCount)??0} of ${(D==null?void 0:D.totalCount)??0} completed`}),s.jsx(Io,{label:"Failure Load",value:String(((D==null?void 0:D.failureCount)??0)+((D==null?void 0:D.timeoutCount)??0)),detail:`${(D==null?void 0:D.rateLimitedCount)??0} rate limited`}),s.jsx(Io,{label:"Avg Duration",value:AN((D==null?void 0:D.averageDurationSeconds)??null),detail:"Last 30 days"})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Success-Rate Trend"}),s.jsxs(St,{variant:R,className:"gap-1",children:[ae,zN((Y==null?void 0:Y.successRate)??null,(D==null?void 0:D.successRate)??null)]})]}),s.jsx("div",{className:"space-y-3",children:[{label:"Last 7 days",value:(Y==null?void 0:Y.successRate)??0},{label:"Last 30 days",value:(D==null?void 0:D.successRate)??0}].map(C=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between text-xs",children:[s.jsx("span",{className:"text-slate-400",children:C.label}),s.jsx("span",{className:"font-mono text-slate-300",children:lu(C.value)})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-900",children:s.jsx("div",{className:"h-full rounded-full bg-emerald-500",style:{width:`${Math.max(4,Math.round(C.value*100))}%`}})})]},C.label))})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Failure Categories"}),s.jsx(St,{variant:"neutral",children:K.length})]}),K.length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No categorized failures in the last 30 days."}):s.jsx("div",{className:"space-y-3",children:K.map(([C,J])=>s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex justify-between gap-3 text-xs",children:[s.jsx("span",{className:"truncate capitalize text-slate-400",children:C.replace(/_/g," ")}),s.jsx("span",{className:"font-mono text-slate-300",children:J})]}),s.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-slate-900",children:s.jsx("div",{className:"h-full rounded-full bg-red-500",style:{width:`${Math.max(8,Math.round(J/$*100))}%`}})})]},C))})]})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Job Breakdown"}),s.jsx(St,{variant:"neutral",children:Object.keys((D==null?void 0:D.byJobType)??{}).length})]}),Wo((D==null?void 0:D.byJobType)??{}).length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No job-specific outcomes in the last 30 days."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:Wo((D==null?void 0:D.byJobType)??{}).map(([C,J])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-sm",children:[s.jsx("span",{className:"capitalize text-slate-300",children:C}),s.jsx("span",{className:"text-xs text-slate-500",children:J})]},C))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-slate-200",children:"Provider Breakdown"}),s.jsx(St,{variant:"neutral",children:Object.keys((D==null?void 0:D.byProvider)??{}).length})]}),Wo((D==null?void 0:D.byProvider)??{}).length===0?s.jsx("p",{className:"rounded-lg border border-slate-800 bg-slate-950/40 px-3 py-4 text-sm text-slate-500",children:"No provider-specific outcomes in the last 30 days."}):s.jsx("div",{className:"divide-y divide-slate-800/70 rounded-lg border border-slate-800",children:Wo((D==null?void 0:D.byProvider)??{}).map(([C,J])=>s.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-sm",children:[s.jsx("span",{className:"font-mono text-slate-300",children:C}),s.jsx("span",{className:"text-xs text-slate-500",children:J})]},C))})]})]})]})}),s.jsx(lt,{className:"p-5",children:s.jsx(kN,{activePatterns:M,augmentations:(f==null?void 0:f.activeAugmentations)??[],topFailurePatterns:V,updatingAugmentationId:u,onAugmentationAction:N})})]})},HN={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"},qN=()=>{var he,ve;const n=mu(),[r,o]=L.useState(null),[u,h]=L.useState(!1),[f,b]=L.useState(null),[j,y]=L.useState(!1),{setProjectName:x,addToast:w,selectedProjectId:T,globalModeLoading:z,status:_}=Ft(),{data:N}=Ua(mp,[T],{enabled:!z}),{data:O,loading:k}=Ua(()=>pp().catch(()=>null),[T],{enabled:!z}),Y=_;if(_e.useEffect(()=>{Y!=null&&Y.projectName&&x(Y.projectName)},[Y,x]),z)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});if(!Y)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading..."})});const D=Y.prs.length,M=Y.prs.filter(ue=>ue.reviewScore!==null&&ue.reviewScore<70).length,V=((he=O==null?void 0:O.columns.Ready)==null?void 0:he.length)??0,K=((ve=O==null?void 0:O.columns["In Progress"])==null?void 0:ve.length)??0,$=async ue=>{o(ue);try{const G=await nN(ue),le=G.results.every(de=>de.success);w({title:le?"Process Cancelled":"Cancel Failed",message:G.results.map(de=>de.message).join("; "),type:le?"success":"error"})}catch(G){w({title:"Cancel Failed",message:G instanceof Error?G.message:"Failed to cancel process",type:"error"})}finally{o(null)}},W=async()=>{h(!0);try{await rN(),w({title:"Lock Cleared",message:"Stale executor state removed",type:"success"})}catch(ue){w({title:"Clear Failed",message:ue instanceof Error?ue.message:"Failed to clear lock",type:"error"})}finally{h(!1)}},R=async ue=>{b(ue);try{await gp(ue==="planner"?"slicer":ue),w({title:"Job Triggered",message:`${ue[0].toUpperCase()+ue.slice(1)} job has been queued.`,type:"success"})}catch(G){w({title:"Trigger Failed",message:G instanceof Error?G.message:`Failed to trigger ${ue}`,type:"error"})}finally{b(null)}},ae=async()=>{if(N){y(!0);try{N.paused?(await uc(),w({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await xp(),w({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"}))}catch(ue){w({title:"Action Failed",message:ue instanceof Error?ue.message:"Toggle failed",type:"error"})}finally{y(!1)}}},C=ue=>{if(!ue)return"Not scheduled";try{const G=new Date(ue),le=new Date,de=G.getTime()-le.getTime(),me=Math.floor(de/6e4);return me<0?"Running now...":me<60?`in ${me} min`:me<1440?`in ${Math.floor(me/60)} hr${me>=120?"s":""}`:`in ${Math.floor(me/1440)} day${me>=2880?"s":""}`}catch{return"Unknown"}},ne=(()=>{var le,de,me,ze,H,se;if(N!=null&&N.paused)return null;const ue=[{agent:"Executor",nextRun:(N==null?void 0:N.executor.nextRun)??null},{agent:"Reviewer",nextRun:(N==null?void 0:N.reviewer.nextRun)??null},{agent:"QA",nextRun:((le=N==null?void 0:N.qa)==null?void 0:le.nextRun)??null},{agent:"Auditor",nextRun:((de=N==null?void 0:N.audit)==null?void 0:de.nextRun)??null},{agent:"Planner",nextRun:((me=N==null?void 0:N.planner)==null?void 0:me.nextRun)??null},{agent:"Analytics",nextRun:((ze=N==null?void 0:N.analytics)==null?void 0:ze.nextRun)??null},{agent:"PR Resolver",nextRun:((H=N==null?void 0:N.prResolver)==null?void 0:H.nextRun)??null},{agent:"Merger",nextRun:((se=N==null?void 0:N.merger)==null?void 0:se.nextRun)??null}];let G=null;for(const ge of ue)ge.nextRun&&(!G||new Date(ge.nextRun)<new Date(G.nextRun))&&(G=ge);return G?{agent:G.agent,time:C(G.nextRun)}:null})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[s.jsxs(lt,{className:"p-5",onClick:()=>n("/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:V})]}),s.jsx("div",{className:"p-2 bg-green-500/10 rounded-lg text-green-400",children:s.jsx(vc,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues ready to start"})]}),s.jsxs(lt,{className:"p-5",onClick:()=>n("/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:K})]}),s.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg text-blue-400",children:s.jsx(ap,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:"issues in progress"})]}),s.jsxs(lt,{className:"p-5",onClick:()=>n("/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:D})]}),s.jsx("div",{className:"p-2 bg-purple-500/10 rounded-lg text-purple-400",children:s.jsx(sp,{className:"h-5 w-5"})})]}),s.jsx("p",{className:`text-xs mt-4 ${M>0?"text-red-400 font-medium":"text-slate-500"}`,children:M>0?`${M} need work`:"All passing"})]}),s.jsxs(lt,{className:"p-5",children:[s.jsxs("div",{className:"flex justify-between items-start",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Automation"}),s.jsx("h3",{className:"text-3xl font-bold text-slate-100 mt-1",children:N!=null&&N.paused?"Paused":Y.crontab.installed?"Active":"Inactive"})]}),s.jsx("button",{onClick:ae,disabled:j||!N||!Y.crontab.installed,title:N!=null&&N.paused?"Resume scheduling":"Pause scheduling",className:`p-2 rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${N!=null&&N.paused?"bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20":Y.crontab.installed?"bg-indigo-500/10 text-indigo-400 hover:bg-indigo-500/20":"bg-slate-700/50 text-slate-500"}`,children:j?s.jsx(hc,{className:"h-5 w-5 animate-spin"}):N!=null&&N.paused?s.jsx(vn,{className:"h-5 w-5 fill-current"}):Y.crontab.installed?s.jsx(iu,{className:"h-5 w-5"}):s.jsx(np,{className:"h-5 w-5"})})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-4",children:N!=null&&N.paused?"All schedules paused":Y.crontab.installed?`${Y.crontab.entries.length} entr${Y.crontab.entries.length===1?"y":"ies"} installed`:"No crontab entries"})]})]}),s.jsxs(lt,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx("h2",{className:"text-base font-semibold text-slate-200",children:"Agents"}),s.jsx("button",{onClick:()=>n("/logs"),className:"text-xs text-slate-400 hover:text-slate-300 transition-colors",children:"View logs"})]}),s.jsx(RN,{processes:Y.processes,activePrd:Y.activePrd,onCancelProcess:$,onForceClear:W,onViewLog:()=>n("/logs"),cancellingProcess:r,clearingLock:u,onTriggerJob:R,triggeringJob:f})]}),ne?s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-slate-900/50 rounded-lg border border-slate-800",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[s.jsx("span",{children:"Next automation:"}),s.jsx("span",{className:"text-slate-200 font-medium",children:ne.agent}),s.jsx("span",{children:ne.time})]}),s.jsxs("button",{onClick:()=>n("/scheduling"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["Manage Schedules ",s.jsx(_g,{className:"ml-1 h-3 w-3"})]})]}):N!=null&&N.paused?s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-amber-900/20 rounded-lg border border-amber-800/40",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm text-amber-400",children:[s.jsx(iu,{className:"h-3.5 w-3.5"}),s.jsx("span",{children:"Automation is paused"})]}),s.jsxs("button",{onClick:ae,disabled:j,className:"text-sm text-emerald-400 hover:text-emerald-300 flex items-center transition-colors disabled:opacity-50",children:[j?s.jsx(hc,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}):s.jsx(vn,{className:"h-3.5 w-3.5 mr-1.5 fill-current"}),"Resume"]})]}):null,s.jsx(LN,{}),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:()=>n("/board"),className:"text-sm text-indigo-400 hover:text-indigo-300 flex items-center transition-colors",children:["View board ",s.jsx(_g,{className:"ml-1 h-3 w-3"})]})]}),s.jsx(lt,{className:"p-4",children:k?s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx("div",{className:"text-slate-400 text-sm",children:"Loading board..."})}):O?s.jsx("div",{className:"flex flex-wrap gap-3",children:Jl.map(ue=>{var le;const G=((le=O.columns[ue])==null?void 0:le.length)??0;return s.jsxs("button",{onClick:()=>n("/board"),className:`inline-flex items-center space-x-2 px-3 py-2 rounded-lg ring-1 ring-inset transition-colors hover:opacity-80 ${HN[ue]}`,children:[s.jsx("span",{className:"text-xs font-medium",children:ue}),s.jsx("span",{className:"text-xs font-bold",children:G})]},ue)})}):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."]})})]})]})},VN=()=>{const[n,r]=L.useState(!0),[o,u]=L.useState(""),[h,f]=L.useState("executor"),b=L.useRef(null),{selectedProjectId:j,globalModeLoading:y}=Ft(),x=Ft(D=>D.status),{data:w,loading:T,error:z,refetch:_}=Ua(()=>Kj(h,500),[h,j],{enabled:!y}),N=(w==null?void 0:w.lines)||[];L.useEffect(()=>{n&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[N,n]),L.useEffect(()=>{if(!n)return;const D=window.setInterval(()=>{_()},3e3);return()=>window.clearInterval(D)},[n,h,_]);const O=N.filter(D=>D.toLowerCase().includes(o.toLowerCase())),k=D=>{f(D),u("")},Y=D=>{if(!(x!=null&&x.processes))return!1;const M=x.processes.find(V=>V.name===D);return(M==null?void 0:M.running)??!1};return z?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(yn,{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:z.message}),s.jsx(Le,{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:o,onChange:D=>u(D.target.value)}),s.jsx(Fr,{className:"absolute left-2.5 top-2 h-4 w-4 text-slate-500 group-focus-within:text-indigo-400"})]}),s.jsx("div",{className:"h-6 w-px bg-slate-700 mx-2"}),s.jsx("div",{className:"flex space-x-1",children:up.map(({processName:D,label:M})=>s.jsx("button",{onClick:()=>k(D),className:`px-3 py-1.5 rounded text-sm font-medium transition-colors ${h===D?"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:M}),Y(D)&&s.jsx("div",{className:"h-2 w-2 bg-green-500 rounded-full animate-pulse"})]})},D))})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>_(),children:[s.jsx(Ug,{className:"h-4 w-4 mr-2"}),"Refresh"]}),s.jsxs(Le,{size:"sm",variant:"ghost",onClick:()=>r(!n),children:[n?s.jsx(iu,{className:"h-4 w-4 mr-2"}):s.jsx(vn,{className:"h-4 w-4 mr-2"}),n?"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: ",h,".log"]}),s.jsxs("span",{children:[O.length," lines"]})]}),s.jsxs("div",{ref:b,className:"flex-1 overflow-y-auto p-4 font-mono text-sm terminal-scroll bg-slate-900",children:[T?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:"Loading logs..."}):O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-slate-500",children:o?"No logs match your filter":"No logs yet — logs will appear after the first run"}):O.map((D,M)=>{const V=D.includes("[ERROR]"),K=D.includes("[WARN]");return s.jsxs("div",{className:`leading-6 hover:bg-slate-800/50 px-2 rounded -mx-2 ${V?"text-red-400":K?"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:M+1}),D]},M)}),n&&s.jsx("div",{className:"h-4"})," "]}),!n&&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:()=>r(!0),children:[s.jsx(Ug,{className:"h-4 w-4 mr-2"}),"Scroll to bottom"]})]})]})},BN=()=>{const[n,r]=L.useState(null),[o,u]=L.useState(!1),[h,f]=L.useState("all"),[b,j]=L.useState("number"),[y,x]=L.useState("desc"),{addToast:w,selectedProjectId:T,globalModeLoading:z}=Ft(),{data:_,loading:N,error:O,refetch:k}=Ua(hp,[T],{enabled:!z}),Y=_??[],D=C=>{switch(C){case"pass":return s.jsx(vc,{className:"h-4 w-4 text-green-500"});case"fail":return s.jsx(F1,{className:"h-4 w-4 text-red-500"});case"pending":return s.jsx(ip,{className:"h-4 w-4 text-amber-500 animate-spin"});default:return s.jsx(yn,{className:"h-4 w-4 text-slate-500"})}},M=C=>{switch(C){case"pass":return"All CI checks passed";case"fail":return"One or more CI checks failed";case"pending":return"CI checks are still running";default:return"No CI data available"}},V=C=>C===null?"No review decision yet":C===100?"PR has been approved":C===0?"Changes have been requested":`Review score: ${C}`,K=L.useMemo(()=>Y.filter(C=>{switch(h){case"needs-work":return C.ciStatus==="fail"||C.reviewScore===0;case"pending":return C.ciStatus==="pending"||C.ciStatus==="unknown"||C.reviewScore===null;case"passed":return C.ciStatus==="pass"&&C.reviewScore===100;case"all":default:return!0}}),[Y,h]),$=L.useMemo(()=>[...K].sort((J,ne)=>{let he=0;switch(b){case"number":he=J.number-ne.number;break;case"title":he=J.title.localeCompare(ne.title);break;case"branch":he=J.branch.localeCompare(ne.branch);break;case"ciStatus":{const ve={fail:0,pending:1,unknown:2,pass:3};he=(ve[J.ciStatus]??2)-(ve[ne.ciStatus]??2);break}case"reviewScore":{const ve=J.reviewScore??-1,ue=ne.reviewScore??-1;he=ve-ue;break}}return y==="asc"?he:-he}),[K,b,y]),W=C=>{b===C?x(y==="asc"?"desc":"asc"):(j(C),x("desc"))},R=C=>b!==C?s.jsx(y1,{className:"h-3 w-3 text-slate-600"}):y==="asc"?s.jsx(j1,{className:"h-3 w-3 text-indigo-400"}):s.jsx(x1,{className:"h-3 w-3 text-indigo-400"});if(N)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading PRs..."})});if(O)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(yn,{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:O.message}),s.jsx(Le,{onClick:()=>k(),children:"Retry"})]});const ae=async()=>{u(!0);try{const C=await aN();w({title:"Reviewer Started",message:C.pid?`Started with PID ${C.pid}`:"Reviewer started",type:"success"})}catch(C){w({title:"Reviewer Failed",message:C instanceof Error?C.message:"Failed to start reviewer",type:"error"})}finally{u(!1)}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("button",{onClick:()=>f("all"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="all"?"bg-slate-800 text-slate-200 border-slate-700":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"All"}),s.jsx("button",{onClick:()=>f("needs-work"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="needs-work"?"bg-red-900/50 text-red-300 border-red-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Needs Work"}),s.jsx("button",{onClick:()=>f("pending"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="pending"?"bg-amber-900/50 text-amber-300 border-amber-800":"text-slate-500 hover:bg-slate-800 hover:text-slate-300 border-transparent"}`,children:"Pending"}),s.jsx("button",{onClick:()=>f("passed"),className:`px-3 py-1 rounded-full text-xs font-medium cursor-pointer border transition-colors ${h==="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(Le,{size:"sm",onClick:ae,disabled:o,children:[s.jsx(Fr,{className:"h-4 w-4 mr-2"}),o?"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"}),R("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"}),R("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"}),R("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"}),R("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:[$.map(C=>s.jsxs("tr",{className:"hover:bg-slate-800/50 cursor-pointer transition-colors",onClick:()=>r(n===C.number?null:C.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:["#",C.number]}),s.jsx("span",{className:"font-medium text-slate-200",children:C.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:C.branch})}),s.jsx("td",{className:"px-6 py-4",children:s.jsxs("div",{className:"flex items-center space-x-2",title:M(C.ciStatus),children:[D(C.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-400",children:C.ciStatus})]})}),s.jsx("td",{className:"px-6 py-4",children:C.reviewScore!==null?s.jsxs("div",{className:"flex items-center space-x-2",title:V(C.reviewScore),children:[s.jsx("div",{className:"w-24 h-2 bg-slate-800 rounded-full overflow-hidden",children:s.jsx("div",{className:`h-full ${C.reviewScore>=70?"bg-green-500":"bg-red-500"}`,style:{width:`${C.reviewScore}%`}})}),s.jsx("span",{className:`text-sm font-bold ${C.reviewScore>=70?"text-green-500":"text-red-500"}`,children:C.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:C.url,target:"_blank",rel:"noopener noreferrer",className:"text-slate-500 hover:text-indigo-400",onClick:J=>J.stopPropagation(),children:s.jsx(rp,{className:"h-4 w-4"})})})]},C.number)),$.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:5,className:"px-6 py-12 text-center text-slate-500",children:Y.length===0?"No open PRs found.":`No PRs match the "${h}" filter.`})})]})]})}),n&&s.jsx(lt,{className:"p-6 bg-slate-900 border-indigo-900/50 animate-in fade-in slide-in-from-top-4 duration-300",children:(()=>{const C=Y.find(J=>J.number===n);return C?s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-bold text-slate-200",children:C.title}),s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Branch: ",s.jsx("span",{className:"font-mono",children:C.branch})]})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsxs("div",{className:"text-center",title:M(C.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:[D(C.ciStatus),s.jsx("span",{className:"text-sm capitalize text-slate-300",children:C.ciStatus})]})]}),C.reviewScore!==null&&s.jsxs("div",{className:"text-center",title:V(C.reviewScore),children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Review Score"}),s.jsx("div",{className:`text-xl font-bold mt-1 ${C.reviewScore>=70?"text-green-500":"text-red-500"}`,children:C.reviewScore})]})]})]}):null})()})]})},la=_e.forwardRef(({className:n="",label:r,checked:o,onChange:u,...h},f)=>{const b=j=>{u&&u(j.target.checked)};return s.jsxs("label",{className:`inline-flex items-center cursor-pointer ${n}`,children:[s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:"checkbox",className:"sr-only peer",ref:f,checked:o,onChange:b,...h}),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"})]}),r&&s.jsx("span",{className:"ml-3 text-sm font-medium text-slate-300 select-none",children:r})]})});la.displayName="Switch";const $N=()=>{const{addToast:n,selectedProjectId:r,globalModeLoading:o}=Ft(),[u,h]=L.useState(!1),[f,b]=L.useState(!1),{data:j,loading:y,error:x,refetch:w}=Ua(dN,[r],{enabled:!o});L.useEffect(()=>{if(!(j!=null&&j.enabled))return;const D=setInterval(()=>{w()},1e4);return()=>clearInterval(D)},[j==null?void 0:j.enabled,w]);const T=async D=>{b(!0);try{await yp(D),n({title:D?"Scanner Enabled":"Scanner Disabled",message:D?"Roadmap scanner is now active.":"Roadmap scanner has been paused.",type:D?"success":"info"}),w()}catch(M){n({title:"Toggle Failed",message:M instanceof Error?M.message:"Failed to toggle scanner",type:"error"})}finally{b(!1)}},z=async()=>{h(!0);try{const D=await fN();D.created.length>0?n({title:"Scan Complete",message:`Created ${D.created.length} PRD(s): ${D.created.join(", ")}`,type:"success"}):n({title:"Scan Complete",message:"No new PRDs to create.",type:"info"}),D.errors.length>0&&n({title:"Scan Errors",message:D.errors.join("; "),type:"warning"}),w()}catch(D){n({title:"Scan Failed",message:D instanceof Error?D.message:"Failed to scan roadmap",type:"error"})}finally{h(!1)}};if(y)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(x)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(yn,{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:x.message}),s.jsx(Le,{onClick:()=>w(),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(lt,{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(cp,{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 _=j.totalItems>0?Math.round(j.processedItems/j.totalItems*100):0,N=PN(j.status),O=FN(j.items),k=j.lastScan?GN(j.lastScan):"Never",Y=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(la,{label:j.enabled?"Enabled":"Disabled",checked:j.enabled,onChange:T,disabled:f}),s.jsxs(Le,{onClick:z,loading:u,disabled:!j.enabled||j.status==="complete",children:[s.jsx(vn,{className:"h-4 w-4 mr-2"}),"Scan Now"]})]})]}),s.jsx(lt,{className:`p-6 border-2 ${N.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(N.icon,{className:`h-8 w-8 ${N.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 ${N.textColor}`,children:N.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:k})]}),j.enabled&&j.status!=="complete"&&s.jsxs("div",{children:["Auto-scan: ",s.jsxs("span",{className:"text-slate-300",children:["every ",Y," min"]})]}),j.enabled&&j.status==="complete"&&s.jsx("div",{className:"text-emerald-400",children:"Auto-scan paused - all items sliced"})]})]})}),s.jsxs(lt,{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 (",_,"%)"]})]}),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 ${_===100?"bg-gradient-to-r from-emerald-500 to-emerald-400":"bg-gradient-to-r from-indigo-600 to-indigo-400"}`,style:{width:`${_}%`}})})]}),Object.entries(O).map(([D,M])=>s.jsxs(lt,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200 mb-4",children:D}),s.jsx("div",{className:"space-y-2",children:M.map(V=>s.jsx(YN,{item:V},V.hash))})]},D))]})};function YN({item:n}){const r=n.checked,o=n.processed;return s.jsxs("div",{className:`flex items-center justify-between p-3 rounded-lg border ${r?"bg-slate-950/30 border-slate-800/50":o?"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:[r?s.jsx(gj,{className:"h-4 w-4 text-slate-600 flex-shrink-0"}):o?s.jsx(vc,{className:"h-4 w-4 text-emerald-400 flex-shrink-0"}):s.jsx(Yf,{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 ${r?"line-through text-slate-600":"text-slate-200"}`,children:n.title}),n.description&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:n.description})]})]}),s.jsx("div",{className:"flex-shrink-0 ml-3",children:r?s.jsx(St,{variant:"neutral",children:"Skipped"}):o?s.jsx(St,{variant:"success",children:n.prdFile||"Processed"}):s.jsx(St,{variant:"warning",children:"Pending"})})]})}function PN(n){switch(n){case"complete":return{label:"Complete",icon:vc,textColor:"text-emerald-400",borderColor:"border-emerald-500/20 bg-emerald-500/5"};case"idle":return{label:"Idle",icon:sp,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:yn,textColor:"text-slate-400",borderColor:"border-slate-500/20 bg-slate-500/5"};default:return{label:"No Roadmap",icon:yn,textColor:"text-slate-500",borderColor:"border-slate-500/20"}}}function FN(n){const r={};for(const o of n){const u=o.section||"General";r[u]||(r[u]=[]),r[u].push(o)}return r}function GN(n){try{const r=new Date(n),u=new Date().getTime()-r.getTime(),h=Math.floor(u/6e4);if(h<1)return"Just now";if(h<60)return`${h} min ago`;const f=Math.floor(h/60);return f<24?`${f} hr ago`:`${Math.floor(f/24)} day(s) ago`}catch{return"Unknown"}}const ct=_e.forwardRef(({className:n="",label:r,error:o,helperText:u,options:h,value:f,onChange:b,children:j,...y},x)=>{const w=_e.useId(),T=y.id??w,z=o?`${T}-error`:void 0,_=!o&&u?`${T}-help`:void 0,N=[z,_].filter(Boolean).join(" ")||void 0,O=k=>{b&&b(k.target.value)};return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:T,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{ref:x,id:T,"aria-describedby":N,"aria-invalid":o?!0:y["aria-invalid"],className:`
420
- w-full appearance-none rounded-lg bg-slate-950 border border-slate-800
421
- px-3 py-2 pr-10 text-sm text-slate-200
422
- focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
423
- disabled:opacity-50 disabled:cursor-not-allowed
424
- transition-all duration-200
425
- ${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
426
- ${n}
427
- `,value:f,onChange:O,...y,children:h?h.map(k=>s.jsx("option",{value:k.value,children:k.label},k.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(ch,{className:"h-4 w-4"})})]}),o?s.jsx("p",{id:z,className:"mt-1.5 text-xs text-red-400",children:o}):u?s.jsx("p",{id:_,className:"mt-1.5 text-xs text-slate-500",children:u}):null]})});ct.displayName="Select";const Oe=_e.forwardRef(({className:n="",label:r,error:o,helperText:u,rightIcon:h,...f},b)=>{const j=_e.useId(),y=f.id??j,x=o?`${y}-error`:void 0,w=!o&&u?`${y}-help`:void 0,T=[x,w].filter(Boolean).join(" ")||void 0;return s.jsxs("div",{className:"w-full",children:[r&&s.jsx("label",{htmlFor:y,className:"block text-sm font-medium text-slate-400 mb-1.5",children:r}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{ref:b,id:y,"aria-describedby":T,"aria-invalid":o?!0:f["aria-invalid"],className:`
428
- w-full rounded-lg bg-slate-950 border border-slate-800
429
- px-3 py-2 text-sm text-slate-200
430
- placeholder:text-slate-600
431
- focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500
432
- disabled:opacity-50 disabled:cursor-not-allowed
433
- transition-all duration-200
434
- ${o?"border-red-500/50 focus:ring-red-500/50 focus:border-red-500":""}
435
- ${h?"pr-10":""}
436
- ${n}
437
- `,...f}),h&&s.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none text-slate-500",children:h})]}),o?s.jsx("p",{id:x,className:"mt-1.5 text-xs text-red-400",children:o}):u?s.jsx("p",{id:w,className:"mt-1.5 text-xs text-slate-500",children:u}):null]})});Oe.displayName="Input";const jp=({tabs:n,activeTab:r,onChange:o,className:u=""})=>{var y,x;const[h,f]=_e.useState((y=n[0])==null?void 0:y.id),b=r||h,j=w=>{o?o(w):f(w)};return s.jsxs("div",{className:`flex flex-col ${u}`,children:[s.jsx("div",{className:"border-b border-slate-800 mb-6",children:s.jsx("nav",{className:"-mb-px flex space-x-8 overflow-x-auto scrollbar-hide",children:n.map(w=>s.jsx("button",{onClick:()=>j(w.id),className:`
438
- whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm transition-all duration-200
439
- ${b===w.id?"border-indigo-500 text-indigo-400":"border-transparent text-slate-500 hover:text-slate-300 hover:border-slate-700"}
440
- `,children:w.label},w.id))})}),s.jsx("div",{className:"flex-1 animate-in fade-in slide-in-from-bottom-2 duration-300",children:(x=n.find(w=>w.id===b))==null?void 0:x.content})]})};var Us={},za={},Ji={},Ls={},_f={},Qg;function ZN(){return Qg||(Qg=1,Object.defineProperty(_f,"__esModule",{value:!0})),_f}var Ki={},ec={},Xg;function Gs(){var r,o,u,h,f,Np,j;if(Xg)return ec;Xg=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.CronField=void 0;let n=(j=class{constructor(x,w={rawValue:""}){et(this,f);et(this,r,!1);et(this,o,!1);et(this,u,!1);et(this,h,[]);xg(this,"options",{rawValue:""});if(!Array.isArray(x))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(x.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...w,rawValue:w.rawValue??""},Me(this,h,x.sort(j.sorter)),Me(this,u,this.options.wildcard!==void 0?this.options.wildcard:we(this,f,Np).call(this)),Me(this,r,this.options.rawValue.includes("L")||x.includes("L")),Me(this,o,this.options.rawValue.includes("?")||x.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 ee(this,r)}get hasQuestionMarkChar(){return ee(this,o)}get isWildcard(){return ee(this,u)}get values(){return ee(this,h)}static sorter(x,w){const T=typeof x=="number",z=typeof w=="number";return T&&z?x-w:!T&&!z?x.localeCompare(w):T?-1:1}static findNearestValueInList(x,w,T=!1){if(T){for(let z=x.length-1;z>=0;z--)if(x[z]<w)return x[z];return null}for(let z=0;z<x.length;z++)if(x[z]>w)return x[z];return null}findNearestValue(x,w=!1){return this.constructor.findNearestValueInList(this.values,x,w)}serialize(){return{wildcard:ee(this,u),values:ee(this,h)}}validate(){let x;const w=this.chars.length>0?` or chars ${this.chars.join("")}`:"",T=O=>k=>new RegExp(`^\\d{0,2}${k}$`).test(O),z=O=>(x=O,typeof O=="number"?O>=this.min&&O<=this.max:this.chars.some(T(O)));if(!ee(this,h).every(z))throw new Error(`${this.constructor.name} Validation error, got value ${x} expected range ${this.min}-${this.max}${w}`);const N=ee(this,h).find((O,k)=>ee(this,h).indexOf(O)!==k);if(N)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${N}`)}},r=new WeakMap,o=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakSet,Np=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(x,w)=>w+this.min).every(x=>ee(this,h).includes(x))},j);return ec.CronField=n,ec}var Jg;function WN(){if(Jg)return Ki;Jg=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.CronDayOfMonth=void 0;const n=Gs(),r=1,o=31,u=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return Ki.CronDayOfMonth=h,Ki}var tc={},Kg;function IN(){if(Kg)return tc;Kg=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.CronDayOfWeek=void 0;const n=Gs(),r=0,o=7,u=Object.freeze(["L"]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return tc.CronDayOfWeek=h,tc}var ac={},ex;function QN(){if(ex)return ac;ex=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.CronHour=void 0;const n=Gs(),r=0,o=23,u=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return ac.CronHour=h,ac}var nc={},tx;function XN(){if(tx)return nc;tx=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.CronMinute=void 0;const n=Gs(),r=0,o=59,u=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return nc.CronMinute=h,nc}var lc={},zf={},Ca={},ax;function JN(){if(ax)return Ca;ax=1,Object.defineProperty(Ca,"__esModule",{value:!0});class n extends Error{}class r extends n{constructor(i){super(`Invalid DateTime: ${i.toMessage()}`)}}class o extends n{constructor(i){super(`Invalid Interval: ${i.toMessage()}`)}}class u extends n{constructor(i){super(`Invalid Duration: ${i.toMessage()}`)}}class h extends n{}class f extends n{constructor(i){super(`Invalid unit ${i}`)}}class b extends n{}class j extends n{constructor(){super("Zone is an abstract class")}}const y="numeric",x="short",w="long",T={year:y,month:y,day:y},z={year:y,month:x,day:y},_={year:y,month:x,day:y,weekday:x},N={year:y,month:w,day:y},O={year:y,month:w,day:y,weekday:w},k={hour:y,minute:y},Y={hour:y,minute:y,second:y},D={hour:y,minute:y,second:y,timeZoneName:x},M={hour:y,minute:y,second:y,timeZoneName:w},V={hour:y,minute:y,hourCycle:"h23"},K={hour:y,minute:y,second:y,hourCycle:"h23"},$={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:x},W={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:w},R={year:y,month:y,day:y,hour:y,minute:y},ae={year:y,month:y,day:y,hour:y,minute:y,second:y},C={year:y,month:x,day:y,hour:y,minute:y},J={year:y,month:x,day:y,hour:y,minute:y,second:y},ne={year:y,month:x,day:y,weekday:x,hour:y,minute:y},he={year:y,month:w,day:y,hour:y,minute:y,timeZoneName:x},ve={year:y,month:w,day:y,hour:y,minute:y,second:y,timeZoneName:x},ue={year:y,month:w,day:y,weekday:w,hour:y,minute:y,timeZoneName:w},G={year:y,month:w,day:y,weekday:w,hour:y,minute:y,second:y,timeZoneName:w};class le{get type(){throw new j}get name(){throw new j}get ianaName(){return this.name}get isUniversal(){throw new j}offsetName(i,m){throw new j}formatOffset(i,m){throw new j}offset(i){throw new j}equals(i){throw new j}get isValid(){throw new j}}let de=null;class me extends le{static get instance(){return de===null&&(de=new me),de}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return Hn(i,m,v)}formatOffset(i,m){return rs(this.offset(i),m)}offset(i){return-new Date(i).getTimezoneOffset()}equals(i){return i.type==="system"}get isValid(){return!0}}const ze=new Map;function H(g){let i=ze.get(g);return i===void 0&&(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),ze.set(g,i)),i}const se={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ge(g,i){const m=g.format(i).replace(/\u200E/g,""),v=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(m),[,S,A,q,B,F,fe,ye]=v;return[q,S,A,B,F,fe,ye]}function pe(g,i){const m=g.formatToParts(i),v=[];for(let S=0;S<m.length;S++){const{type:A,value:q}=m[S],B=se[A];A==="era"?v[B]=q:De(B)||(v[B]=parseInt(q,10))}return v}const Ee=new Map;class xe extends le{static create(i){let m=Ee.get(i);return m===void 0&&Ee.set(i,m=new xe(i)),m}static resetCache(){Ee.clear(),ze.clear()}static isValidSpecifier(i){return this.isValidZone(i)}static isValidZone(i){if(!i)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:i}).format(),!0}catch{return!1}}constructor(i){super(),this.zoneName=i,this.valid=xe.isValidZone(i)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(i,{format:m,locale:v}){return Hn(i,m,v,this.name)}formatOffset(i,m){return rs(this.offset(i),m)}offset(i){if(!this.valid)return NaN;const m=new Date(i);if(isNaN(m))return NaN;const v=H(this.name);let[S,A,q,B,F,fe,ye]=v.formatToParts?pe(v,m):ge(v,m);B==="BC"&&(S=-Math.abs(S)+1);const Pe=Jt({year:S,month:A,day:q,hour:F===24?0:F,minute:fe,second:ye,millisecond:0});let ke=+m;const bt=ke%1e3;return ke-=bt>=0?bt:1e3+bt,(Pe-ke)/(60*1e3)}equals(i){return i.type==="iana"&&i.name===this.name}get isValid(){return this.valid}}let Ce={};function Ze(g,i={}){const m=JSON.stringify([g,i]);let v=Ce[m];return v||(v=new Intl.ListFormat(g,i),Ce[m]=v),v}const We=new Map;function kt(g,i={}){const m=JSON.stringify([g,i]);let v=We.get(m);return v===void 0&&(v=new Intl.DateTimeFormat(g,i),We.set(m,v)),v}const ha=new Map;function Ka(g,i={}){const m=JSON.stringify([g,i]);let v=ha.get(m);return v===void 0&&(v=new Intl.NumberFormat(g,i),ha.set(m,v)),v}const en=new Map;function ma(g,i={}){const{base:m,...v}=i,S=JSON.stringify([g,v]);let A=en.get(S);return A===void 0&&(A=new Intl.RelativeTimeFormat(g,i),en.set(S,A)),A}let ga=null;function bn(){return ga||(ga=new Intl.DateTimeFormat().resolvedOptions().locale,ga)}const Gt=new Map;function ua(g){let i=Gt.get(g);return i===void 0&&(i=new Intl.DateTimeFormat(g).resolvedOptions(),Gt.set(g,i)),i}const tn=new Map;function an(g){let i=tn.get(g);if(!i){const m=new Intl.Locale(g);i="getWeekInfo"in m?m.getWeekInfo():m.weekInfo,"minimalDays"in i||(i={...ol,...i}),tn.set(g,i)}return i}function nn(g){const i=g.indexOf("-x-");i!==-1&&(g=g.substring(0,i));const m=g.indexOf("-u-");if(m===-1)return[g];{let v,S;try{v=kt(g).resolvedOptions(),S=g}catch{const F=g.substring(0,m);v=kt(F).resolvedOptions(),S=F}const{numberingSystem:A,calendar:q}=v;return[S,A,q]}}function qa(g,i,m){return(m||i)&&(g.includes("-u-")||(g+="-u"),m&&(g+=`-ca-${m}`),i&&(g+=`-nu-${i}`)),g}function jn(g){const i=[];for(let m=1;m<=12;m++){const v=Te.utc(2009,m,1);i.push(g(v))}return i}function Qt(g){const i=[];for(let m=1;m<=7;m++){const v=Te.utc(2016,11,13+m);i.push(g(v))}return i}function cl(g,i,m,v){const S=g.listingMode();return S==="error"?null:S==="en"?m(i):v(i)}function Zr(g){return g.numberingSystem&&g.numberingSystem!=="latn"?!1:g.numberingSystem==="latn"||!g.locale||g.locale.startsWith("en")||ua(g.locale).numberingSystem==="latn"}class Zs{constructor(i,m,v){this.padTo=v.padTo||0,this.floor=v.floor||!1;const{padTo:S,floor:A,...q}=v;if(!m||Object.keys(q).length>0){const B={useGrouping:!1,...v};v.padTo>0&&(B.minimumIntegerDigits=v.padTo),this.inf=Ka(i,B)}}format(i){if(this.inf){const m=this.floor?Math.floor(i):i;return this.inf.format(m)}else{const m=this.floor?Math.floor(i):ns(i,3);return nt(m,this.padTo)}}}class _n{constructor(i,m,v){this.opts=v,this.originalZone=void 0;let S;if(this.opts.timeZone)this.dt=i;else if(i.zone.type==="fixed"){const q=-1*(i.offset/60),B=q>=0?`Etc/GMT+${q}`:`Etc/GMT${q}`;i.offset!==0&&xe.create(B).valid?(S=B,this.dt=i):(S="UTC",this.dt=i.offset===0?i:i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone)}else i.zone.type==="system"?this.dt=i:i.zone.type==="iana"?(this.dt=i,S=i.zone.name):(S="UTC",this.dt=i.setZone("UTC").plus({minutes:i.offset}),this.originalZone=i.zone);const A={...this.opts};A.timeZone=A.timeZone||S,this.dtf=kt(m,A)}format(){return this.originalZone?this.formatToParts().map(({value:i})=>i).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const i=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?i.map(m=>{if(m.type==="timeZoneName"){const v=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...m,value:v}}else return m}):i}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ws{constructor(i,m,v){this.opts={style:"long",...v},!m&&Xr()&&(this.rtf=ma(i,v))}format(i,m){return this.rtf?this.rtf.format(i,m):En(m,i,this.opts.numeric,this.opts.style!=="long")}formatToParts(i,m){return this.rtf?this.rtf.formatToParts(i,m):[]}}const ol={firstDay:1,minimalDays:4,weekend:[6,7]};class Ie{static fromOpts(i){return Ie.create(i.locale,i.numberingSystem,i.outputCalendar,i.weekSettings,i.defaultToEN)}static create(i,m,v,S,A=!1){const q=i||ht.defaultLocale,B=q||(A?"en-US":bn()),F=m||ht.defaultNumberingSystem,fe=v||ht.defaultOutputCalendar,ye=Jr(S)||ht.defaultWeekSettings;return new Ie(B,F,fe,ye,q)}static resetCache(){ga=null,We.clear(),ha.clear(),en.clear(),Gt.clear(),tn.clear()}static fromObject({locale:i,numberingSystem:m,outputCalendar:v,weekSettings:S}={}){return Ie.create(i,m,v,S)}constructor(i,m,v,S,A){const[q,B,F]=nn(i);this.locale=q,this.numberingSystem=m||B||null,this.outputCalendar=v||F||null,this.weekSettings=S,this.intl=qa(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=A,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Zr(this)),this.fastNumbersCached}listingMode(){const i=this.isEnglish(),m=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return i&&m?"en":"intl"}clone(i){return!i||Object.getOwnPropertyNames(i).length===0?this:Ie.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,Jr(i.weekSettings)||this.weekSettings,i.defaultToEN||!1)}redefaultToEN(i={}){return this.clone({...i,defaultToEN:!0})}redefaultToSystem(i={}){return this.clone({...i,defaultToEN:!1})}months(i,m=!1){return cl(this,i,Mc,()=>{const v=this.intl==="ja"||this.intl.startsWith("ja-");m&=!v;const S=m?{month:i,day:"numeric"}:{month:i},A=m?"format":"standalone";if(!this.monthsCache[A][i]){const q=v?B=>this.dtFormatter(B,S).format():B=>this.extract(B,S,"month");this.monthsCache[A][i]=jn(q)}return this.monthsCache[A][i]})}weekdays(i,m=!1){return cl(this,i,nr,()=>{const v=m?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},S=m?"format":"standalone";return this.weekdaysCache[S][i]||(this.weekdaysCache[S][i]=Qt(A=>this.extract(A,v,"weekday"))),this.weekdaysCache[S][i]})}meridiems(){return cl(this,void 0,()=>qn,()=>{if(!this.meridiemCache){const i={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Te.utc(2016,11,13,9),Te.utc(2016,11,13,19)].map(m=>this.extract(m,i,"dayperiod"))}return this.meridiemCache})}eras(i){return cl(this,i,ni,()=>{const m={era:i};return this.eraCache[i]||(this.eraCache[i]=[Te.utc(-40,1,1),Te.utc(2017,1,1)].map(v=>this.extract(v,m,"era"))),this.eraCache[i]})}extract(i,m,v){const S=this.dtFormatter(i,m),A=S.formatToParts(),q=A.find(B=>B.type.toLowerCase()===v);return q?q.value:null}numberFormatter(i={}){return new Zs(this.intl,i.forceSimple||this.fastNumbers,i)}dtFormatter(i,m={}){return new _n(i,this.intl,m)}relFormatter(i={}){return new Ws(this.intl,this.isEnglish(),i)}listFormatter(i={}){return Ze(this.intl,i)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||ua(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:wn()?an(this.locale):ol}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let ul=null;class mt extends le{static get utcInstance(){return ul===null&&(ul=new mt(0)),ul}static instance(i){return i===0?mt.utcInstance:new mt(i)}static parseSpecifier(i){if(i){const m=i.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(m)return new mt(ss(m[1],m[2]))}return null}constructor(i){super(),this.fixed=i}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${rs(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${rs(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(i,m){return rs(this.fixed,m)}get isUniversal(){return!0}offset(){return this.fixed}equals(i){return i.type==="fixed"&&i.fixed===this.fixed}get isValid(){return!0}}class Bt extends le{constructor(i){super(),this.zoneName=i}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 At(g,i){if(De(g)||g===null)return i;if(g instanceof le)return g;if(Ut(g)){const m=g.toLowerCase();return m==="default"?i:m==="local"||m==="system"?me.instance:m==="utc"||m==="gmt"?mt.utcInstance:mt.parseSpecifier(m)||xe.create(g)}else return pa(g)?mt.instance(g):typeof g=="object"&&"offset"in g&&typeof g.offset=="function"?g:new Bt(g)}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"},oe={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]},je=_t.hanidec.replace(/[\[|\]]/g,"").split("");function at(g){let i=parseInt(g,10);if(isNaN(i)){i="";for(let m=0;m<g.length;m++){const v=g.charCodeAt(m);if(g[m].search(_t.hanidec)!==-1)i+=je.indexOf(g[m]);else for(const S in oe){const[A,q]=oe[S];v>=A&&v<=q&&(i+=v-A)}}return parseInt(i,10)}else return i}const Et=new Map;function jt(){Et.clear()}function zt({numberingSystem:g},i=""){const m=g||"latn";let v=Et.get(m);v===void 0&&(v=new Map,Et.set(m,v));let S=v.get(i);return S===void 0&&(S=new RegExp(`${_t[m]}${i}`),v.set(i,S)),S}let Nn=()=>Date.now(),es="system",dl=null,yc=null,Wr=null,Is=60,fl,bc=null;class ht{static get now(){return Nn}static set now(i){Nn=i}static set defaultZone(i){es=i}static get defaultZone(){return At(es,me.instance)}static get defaultLocale(){return dl}static set defaultLocale(i){dl=i}static get defaultNumberingSystem(){return yc}static set defaultNumberingSystem(i){yc=i}static get defaultOutputCalendar(){return Wr}static set defaultOutputCalendar(i){Wr=i}static get defaultWeekSettings(){return bc}static set defaultWeekSettings(i){bc=Jr(i)}static get twoDigitCutoffYear(){return Is}static set twoDigitCutoffYear(i){Is=i%100}static get throwOnInvalid(){return fl}static set throwOnInvalid(i){fl=i}static resetCaches(){Ie.resetCache(),xe.resetCache(),Te.resetCache(),jt()}}class xa{constructor(i,m){this.reason=i,this.explanation=m}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ir=[0,31,59,90,120,151,181,212,243,273,304,334],Qs=[0,31,60,91,121,152,182,213,244,274,305,335];function sa(g,i){return new xa("unit out of range",`you specified ${i} (of type ${typeof i}) as a ${g}, which is invalid`)}function Xs(g,i,m){const v=new Date(Date.UTC(g,i-1,m));g<100&&g>=0&&v.setUTCFullYear(v.getUTCFullYear()-1900);const S=v.getUTCDay();return S===0?7:S}function Qr(g,i,m){return m+(ml(g)?Qs:Ir)[i-1]}function ln(g,i){const m=ml(g)?Qs:Ir,v=m.findIndex(A=>A<i),S=i-m[v];return{month:v+1,day:S}}function Tt(g,i){return(g-i+7)%7+1}function $t(g,i=4,m=1){const{year:v,month:S,day:A}=g,q=Qr(v,S,A),B=Tt(Xs(v,S,A),m);let F=Math.floor((q-B+14-i)/7),fe;return F<1?(fe=v-1,F=gl(fe,i,m)):F>gl(v,i,m)?(fe=v+1,F=1):fe=v,{weekYear:fe,weekNumber:F,weekday:B,...is(g)}}function zn(g,i=4,m=1){const{weekYear:v,weekNumber:S,weekday:A}=g,q=Tt(Xs(v,1,i),m),B=rn(v);let F=S*7+A-q-7+i,fe;F<1?(fe=v-1,F+=rn(fe)):F>B?(fe=v+1,F-=rn(v)):fe=v;const{month:ye,day:Ue}=ln(fe,F);return{year:fe,month:ye,day:Ue,...is(g)}}function ts(g){const{year:i,month:m,day:v}=g,S=Qr(i,m,v);return{year:i,ordinal:S,...is(g)}}function jc(g){const{year:i,ordinal:m}=g,{month:v,day:S}=ln(i,m);return{year:i,month:v,day:S,...is(g)}}function Nc(g,i){if(!De(g.localWeekday)||!De(g.localWeekNumber)||!De(g.localWeekYear)){if(!De(g.weekday)||!De(g.weekNumber)||!De(g.weekYear))throw new h("Cannot mix locale-based week fields with ISO-based week fields");return De(g.localWeekday)||(g.weekday=g.localWeekday),De(g.localWeekNumber)||(g.weekNumber=g.localWeekNumber),De(g.localWeekYear)||(g.weekYear=g.localWeekYear),delete g.localWeekday,delete g.localWeekNumber,delete g.localWeekYear,{minDaysInFirstWeek:i.getMinDaysInFirstWeek(),startOfWeek:i.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function wc(g,i=4,m=1){const v=sn(g.weekYear),S=Xt(g.weekNumber,1,gl(g.weekYear,i,m)),A=Xt(g.weekday,1,7);return v?S?A?!1:sa("weekday",g.weekday):sa("week",g.weekNumber):sa("weekYear",g.weekYear)}function as(g){const i=sn(g.year),m=Xt(g.ordinal,1,rn(g.year));return i?m?!1:sa("ordinal",g.ordinal):sa("year",g.year)}function Js(g){const i=sn(g.year),m=Xt(g.month,1,12),v=Xt(g.day,1,er(g.year,g.month));return i?m?v?!1:sa("day",g.day):sa("month",g.month):sa("year",g.year)}function Un(g){const{hour:i,minute:m,second:v,millisecond:S}=g,A=Xt(i,0,23)||i===24&&m===0&&v===0&&S===0,q=Xt(m,0,59),B=Xt(v,0,59),F=Xt(S,0,999);return A?q?B?F?!1:sa("millisecond",S):sa("second",v):sa("minute",m):sa("hour",i)}function De(g){return typeof g>"u"}function pa(g){return typeof g=="number"}function sn(g){return typeof g=="number"&&g%1===0}function Ut(g){return typeof g=="string"}function Sc(g){return Object.prototype.toString.call(g)==="[object Date]"}function Xr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function wn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function hl(g){return Array.isArray(g)?g:[g]}function Ec(g,i,m){if(g.length!==0)return g.reduce((v,S)=>{const A=[i(S),S];return v&&m(v[0],A[0])===v[0]?v:A},null)[1]}function Tc(g,i){return i.reduce((m,v)=>(m[v]=g[v],m),{})}function Ln(g,i){return Object.prototype.hasOwnProperty.call(g,i)}function Jr(g){if(g==null)return null;if(typeof g!="object")throw new b("Week settings must be an object");if(!Xt(g.firstDay,1,7)||!Xt(g.minimalDays,1,7)||!Array.isArray(g.weekend)||g.weekend.some(i=>!Xt(i,1,7)))throw new b("Invalid week settings");return{firstDay:g.firstDay,minimalDays:g.minimalDays,weekend:Array.from(g.weekend)}}function Xt(g,i,m){return sn(g)&&g>=i&&g<=m}function Ks(g,i){return g-i*Math.floor(g/i)}function nt(g,i=2){const m=g<0;let v;return m?v="-"+(""+-g).padStart(i,"0"):v=(""+g).padStart(i,"0"),v}function Ct(g){if(!(De(g)||g===null||g===""))return parseInt(g,10)}function Sn(g){if(!(De(g)||g===null||g===""))return parseFloat(g)}function Kr(g){if(!(De(g)||g===null||g==="")){const i=parseFloat("0."+g)*1e3;return Math.floor(i)}}function ns(g,i,m="round"){const v=10**i;switch(m){case"expand":return g>0?Math.ceil(g*v)/v:Math.floor(g*v)/v;case"trunc":return Math.trunc(g*v)/v;case"round":return Math.round(g*v)/v;case"floor":return Math.floor(g*v)/v;case"ceil":return Math.ceil(g*v)/v;default:throw new RangeError(`Value rounding ${m} is out of range`)}}function ml(g){return g%4===0&&(g%100!==0||g%400===0)}function rn(g){return ml(g)?366:365}function er(g,i){const m=Ks(i-1,12)+1,v=g+(i-m)/12;return m===2?ml(v)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][m-1]}function Jt(g){let i=Date.UTC(g.year,g.month-1,g.day,g.hour,g.minute,g.second,g.millisecond);return g.year<100&&g.year>=0&&(i=new Date(i),i.setUTCFullYear(g.year,g.month-1,g.day)),+i}function tr(g,i,m){return-Tt(Xs(g,1,i),m)+i-1}function gl(g,i=4,m=1){const v=tr(g,i,m),S=tr(g+1,i,m);return(rn(g)-v+S)/7}function ls(g){return g>99?g:g>ht.twoDigitCutoffYear?1900+g:2e3+g}function Hn(g,i,m,v=null){const S=new Date(g),A={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};v&&(A.timeZone=v);const q={timeZoneName:i,...A},B=new Intl.DateTimeFormat(m,q).formatToParts(S).find(F=>F.type.toLowerCase()==="timezonename");return B?B.value:null}function ss(g,i){let m=parseInt(g,10);Number.isNaN(m)&&(m=0);const v=parseInt(i,10)||0,S=m<0||Object.is(m,-0)?-v:v;return m*60+S}function ei(g){const i=Number(g);if(typeof g=="boolean"||g===""||!Number.isFinite(i))throw new b(`Invalid unit value ${g}`);return i}function cn(g,i){const m={};for(const v in g)if(Ln(g,v)){const S=g[v];if(S==null)continue;m[i(v)]=ei(S)}return m}function rs(g,i){const m=Math.trunc(Math.abs(g/60)),v=Math.trunc(Math.abs(g%60)),S=g>=0?"+":"-";switch(i){case"short":return`${S}${nt(m,2)}:${nt(v,2)}`;case"narrow":return`${S}${m}${v>0?`:${v}`:""}`;case"techie":return`${S}${nt(m,2)}${nt(v,2)}`;default:throw new RangeError(`Value format ${i} is out of range for property format`)}}function is(g){return Tc(g,["hour","minute","second","millisecond"])}const Cc=["January","February","March","April","May","June","July","August","September","October","November","December"],ar=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],bu=["J","F","M","A","M","J","J","A","S","O","N","D"];function Mc(g){switch(g){case"narrow":return[...bu];case"short":return[...ar];case"long":return[...Cc];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 cs=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Va=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ti=["M","T","W","T","F","S","S"];function nr(g){switch(g){case"narrow":return[...ti];case"short":return[...Va];case"long":return[...cs];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const qn=["AM","PM"],xl=["Before Christ","Anno Domini"],Oc=["BC","AD"],ai=["B","A"];function ni(g){switch(g){case"narrow":return[...ai];case"short":return[...Oc];case"long":return[...xl];default:return null}}function os(g){return qn[g.hour<12?0:1]}function on(g,i){return nr(i)[g.weekday-1]}function li(g,i){return Mc(i)[g.month-1]}function us(g,i){return ni(i)[g.year<0?0:1]}function En(g,i,m="always",v=!1){const S={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."]},A=["hours","minutes","seconds"].indexOf(g)===-1;if(m==="auto"&&A){const Ue=g==="days";switch(i){case 1:return Ue?"tomorrow":`next ${S[g][0]}`;case-1:return Ue?"yesterday":`last ${S[g][0]}`;case 0:return Ue?"today":`this ${S[g][0]}`}}const q=Object.is(i,-0)||i<0,B=Math.abs(i),F=B===1,fe=S[g],ye=v?F?fe[1]:fe[2]||fe[1]:F?S[g][0]:g;return q?`${B} ${ye} ago`:`in ${B} ${ye}`}function lr(g,i){let m="";for(const v of g)v.literal?m+=v.val:m+=i(v.val);return m}const sr={D:T,DD:z,DDD:N,DDDD:O,t:k,tt:Y,ttt:D,tttt:M,T:V,TT:K,TTT:$,TTTT:W,f:R,ff:C,fff:he,ffff:ue,F:ae,FF:J,FFF:ve,FFFF:G};class Yt{static create(i,m={}){return new Yt(i,m)}static parseFormat(i){let m=null,v="",S=!1;const A=[];for(let q=0;q<i.length;q++){const B=i.charAt(q);B==="'"?((v.length>0||S)&&A.push({literal:S||/^\s+$/.test(v),val:v===""?"'":v}),m=null,v="",S=!S):S||B===m?v+=B:(v.length>0&&A.push({literal:/^\s+$/.test(v),val:v}),v=B,m=B)}return v.length>0&&A.push({literal:S||/^\s+$/.test(v),val:v}),A}static macroTokenToFormatOpts(i){return sr[i]}constructor(i,m){this.opts=m,this.loc=i,this.systemLoc=null}formatWithSystemDefault(i,m){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(i,{...this.opts,...m}).format()}dtFormatter(i,m={}){return this.loc.dtFormatter(i,{...this.opts,...m})}formatDateTime(i,m){return this.dtFormatter(i,m).format()}formatDateTimeParts(i,m){return this.dtFormatter(i,m).formatToParts()}formatInterval(i,m){return this.dtFormatter(i.start,m).dtf.formatRange(i.start.toJSDate(),i.end.toJSDate())}resolvedOptions(i,m){return this.dtFormatter(i,m).resolvedOptions()}num(i,m=0,v=void 0){if(this.opts.forceSimple)return nt(i,m);const S={...this.opts};return m>0&&(S.padTo=m),v&&(S.signDisplay=v),this.loc.numberFormatter(S).format(i)}formatDateTimeFromString(i,m){const v=this.loc.listingMode()==="en",S=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",A=(ke,bt)=>this.loc.extract(i,ke,bt),q=ke=>i.isOffsetFixed&&i.offset===0&&ke.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,ke.format):"",B=()=>v?os(i):A({hour:"numeric",hourCycle:"h12"},"dayperiod"),F=(ke,bt)=>v?li(i,ke):A(bt?{month:ke}:{month:ke,day:"numeric"},"month"),fe=(ke,bt)=>v?on(i,ke):A(bt?{weekday:ke}:{weekday:ke,month:"long",day:"numeric"},"weekday"),ye=ke=>{const bt=Yt.macroTokenToFormatOpts(ke);return bt?this.formatWithSystemDefault(i,bt):ke},Ue=ke=>v?us(i,ke):A({era:ke},"era"),Pe=ke=>{switch(ke){case"S":return this.num(i.millisecond);case"u":case"SSS":return this.num(i.millisecond,3);case"s":return this.num(i.second);case"ss":return this.num(i.second,2);case"uu":return this.num(Math.floor(i.millisecond/10),2);case"uuu":return this.num(Math.floor(i.millisecond/100));case"m":return this.num(i.minute);case"mm":return this.num(i.minute,2);case"h":return this.num(i.hour%12===0?12:i.hour%12);case"hh":return this.num(i.hour%12===0?12:i.hour%12,2);case"H":return this.num(i.hour);case"HH":return this.num(i.hour,2);case"Z":return q({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return q({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return q({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:this.loc.locale});case"z":return i.zoneName;case"a":return B();case"d":return S?A({day:"numeric"},"day"):this.num(i.day);case"dd":return S?A({day:"2-digit"},"day"):this.num(i.day,2);case"c":return this.num(i.weekday);case"ccc":return fe("short",!0);case"cccc":return fe("long",!0);case"ccccc":return fe("narrow",!0);case"E":return this.num(i.weekday);case"EEE":return fe("short",!1);case"EEEE":return fe("long",!1);case"EEEEE":return fe("narrow",!1);case"L":return S?A({month:"numeric",day:"numeric"},"month"):this.num(i.month);case"LL":return S?A({month:"2-digit",day:"numeric"},"month"):this.num(i.month,2);case"LLL":return F("short",!0);case"LLLL":return F("long",!0);case"LLLLL":return F("narrow",!0);case"M":return S?A({month:"numeric"},"month"):this.num(i.month);case"MM":return S?A({month:"2-digit"},"month"):this.num(i.month,2);case"MMM":return F("short",!1);case"MMMM":return F("long",!1);case"MMMMM":return F("narrow",!1);case"y":return S?A({year:"numeric"},"year"):this.num(i.year);case"yy":return S?A({year:"2-digit"},"year"):this.num(i.year.toString().slice(-2),2);case"yyyy":return S?A({year:"numeric"},"year"):this.num(i.year,4);case"yyyyyy":return S?A({year:"numeric"},"year"):this.num(i.year,6);case"G":return Ue("short");case"GG":return Ue("long");case"GGGGG":return Ue("narrow");case"kk":return this.num(i.weekYear.toString().slice(-2),2);case"kkkk":return this.num(i.weekYear,4);case"W":return this.num(i.weekNumber);case"WW":return this.num(i.weekNumber,2);case"n":return this.num(i.localWeekNumber);case"nn":return this.num(i.localWeekNumber,2);case"ii":return this.num(i.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(i.localWeekYear,4);case"o":return this.num(i.ordinal);case"ooo":return this.num(i.ordinal,3);case"q":return this.num(i.quarter);case"qq":return this.num(i.quarter,2);case"X":return this.num(Math.floor(i.ts/1e3));case"x":return this.num(i.ts);default:return ye(ke)}};return lr(Yt.parseFormat(m),Pe)}formatDurationFromString(i,m){const v=this.opts.signMode==="negativeLargestOnly"?-1:1,S=ye=>{switch(ye[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}},A=(ye,Ue)=>Pe=>{const ke=S(Pe);if(ke){const bt=Ue.isNegativeDuration&&ke!==Ue.largestUnit?v:1;let Zt;return this.opts.signMode==="negativeLargestOnly"&&ke!==Ue.largestUnit?Zt="never":this.opts.signMode==="all"?Zt="always":Zt="auto",this.num(ye.get(ke)*bt,Pe.length,Zt)}else return Pe},q=Yt.parseFormat(m),B=q.reduce((ye,{literal:Ue,val:Pe})=>Ue?ye:ye.concat(Pe),[]),F=i.shiftTo(...B.map(S).filter(ye=>ye)),fe={isNegativeDuration:F<0,largestUnit:Object.keys(F.values)[0]};return lr(q,A(F,fe))}}const ds=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function un(...g){const i=g.reduce((m,v)=>m+v.source,"");return RegExp(`^${i}$`)}function Vn(...g){return i=>g.reduce(([m,v,S],A)=>{const[q,B,F]=A(i,S);return[{...m,...q},B||v,F]},[{},null,1]).slice(0,2)}function Mt(g,...i){if(g==null)return[null,null];for(const[m,v]of i){const S=m.exec(g);if(S)return v(S)}return[null,null]}function Tn(...g){return(i,m)=>{const v={};let S;for(S=0;S<g.length;S++)v[g[S]]=Ct(i[m+S]);return[v,null,m+S]}}const fs=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,hs=`(?:${fs.source}?(?:\\[(${ds.source})\\])?)?`,si=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,rr=RegExp(`${si.source}${hs}`),ms=RegExp(`(?:[Tt]${rr.source})?`),gs=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ir=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Rc=/(\d{4})-?(\d{3})/,ju=Tn("weekYear","weekNumber","weekDay"),Nu=Tn("year","ordinal"),wu=/(\d{4})-(\d\d)-(\d\d)/,cr=RegExp(`${si.source} ?(?:${fs.source}|(${ds.source}))?`),Su=RegExp(`(?: ${cr.source})?`);function pl(g,i,m){const v=g[i];return De(v)?m:Ct(v)}function Eu(g,i){return[{year:pl(g,i),month:pl(g,i+1,1),day:pl(g,i+2,1)},null,i+3]}function vl(g,i){return[{hours:pl(g,i,0),minutes:pl(g,i+1,0),seconds:pl(g,i+2,0),milliseconds:Kr(g[i+3])},null,i+4]}function xs(g,i){const m=!g[i]&&!g[i+1],v=ss(g[i+1],g[i+2]),S=m?null:mt.instance(v);return[{},S,i+3]}function yl(g,i){const m=g[i]?xe.create(g[i]):null;return[{},m,i+1]}const Tu=RegExp(`^T?${si.source}$`),Cu=/^-?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 Mu(g){const[i,m,v,S,A,q,B,F,fe]=g,ye=i[0]==="-",Ue=F&&F[0]==="-",Pe=(ke,bt=!1)=>ke!==void 0&&(bt||ke&&ye)?-ke:ke;return[{years:Pe(Sn(m)),months:Pe(Sn(v)),weeks:Pe(Sn(S)),days:Pe(Sn(A)),hours:Pe(Sn(q)),minutes:Pe(Sn(B)),seconds:Pe(Sn(F),F==="-0"),milliseconds:Pe(Kr(fe),Ue)}]}const Ou={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ps(g,i,m,v,S,A,q){const B={year:i.length===2?ls(Ct(i)):Ct(i),month:ar.indexOf(m)+1,day:Ct(v),hour:Ct(S),minute:Ct(A)};return q&&(B.second=Ct(q)),g&&(B.weekday=g.length>3?cs.indexOf(g)+1:Va.indexOf(g)+1),B}const Ru=/^(?:(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 Du(g){const[,i,m,v,S,A,q,B,F,fe,ye,Ue]=g,Pe=ps(i,S,v,m,A,q,B);let ke;return F?ke=Ou[F]:fe?ke=0:ke=ss(ye,Ue),[Pe,new mt(ke)]}function ku(g){return g.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Dc=/^(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$/,Au=/^(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$/,_u=/^(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 kc(g){const[,i,m,v,S,A,q,B]=g;return[ps(i,S,v,m,A,q,B),mt.utcInstance]}function zu(g){const[,i,m,v,S,A,q,B]=g;return[ps(i,B,m,v,S,A,q),mt.utcInstance]}const Uu=un(gs,ms),Lu=un(ir,ms),Hu=un(Rc,ms),qu=un(rr),Ac=Vn(Eu,vl,xs,yl),ri=Vn(ju,vl,xs,yl),vs=Vn(Nu,vl,xs,yl),Vu=Vn(vl,xs,yl);function _c(g){return Mt(g,[Uu,Ac],[Lu,ri],[Hu,vs],[qu,Vu])}function zc(g){return Mt(ku(g),[Ru,Du])}function Uc(g){return Mt(g,[Dc,kc],[Au,kc],[_u,zu])}function Lc(g){return Mt(g,[Cu,Mu])}const Hc=Vn(vl);function bl(g){return Mt(g,[Tu,Hc])}const Bu=un(wu,Su),$u=un(cr),Yu=Vn(vl,xs,yl);function qc(g){return Mt(g,[Bu,Ac],[$u,Yu])}const ii="Invalid Duration",jl={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}},ys={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},...jl},va=146097/400,dn=146097/4800,Vc={years:{quarters:4,months:12,weeks:va/7,days:va,hours:va*24,minutes:va*24*60,seconds:va*24*60*60,milliseconds:va*24*60*60*1e3},quarters:{months:3,weeks:va/28,days:va/4,hours:va*24/4,minutes:va*24*60/4,seconds:va*24*60*60/4,milliseconds:va*24*60*60*1e3/4},months:{weeks:dn/7,days:dn,hours:dn*24,minutes:dn*24*60,seconds:dn*24*60*60,milliseconds:dn*24*60*60*1e3},...jl},Cn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ci=Cn.slice(0).reverse();function Ma(g,i,m=!1){const v={values:m?i.values:{...g.values,...i.values||{}},loc:g.loc.clone(i.loc),conversionAccuracy:i.conversionAccuracy||g.conversionAccuracy,matrix:i.matrix||g.matrix};return new Ye(v)}function oi(g,i){var m;let v=(m=i.milliseconds)!=null?m:0;for(const S of ci.slice(1))i[S]&&(v+=i[S]*g[S].milliseconds);return v}function ui(g,i){const m=oi(g,i)<0?-1:1;Cn.reduceRight((v,S)=>{if(De(i[S]))return v;if(v){const A=i[v]*m,q=g[S][v],B=Math.floor(A/q);i[S]+=B*m,i[v]-=B*q*m}return S},null),Cn.reduce((v,S)=>{if(De(i[S]))return v;if(v){const A=i[v]%1;i[v]-=A,i[S]+=A*g[v][S]}return S},null)}function di(g){const i={};for(const[m,v]of Object.entries(g))v!==0&&(i[m]=v);return i}class Ye{constructor(i){const m=i.conversionAccuracy==="longterm"||!1;let v=m?Vc:ys;i.matrix&&(v=i.matrix),this.values=i.values,this.loc=i.loc||Ie.create(),this.conversionAccuracy=m?"longterm":"casual",this.invalid=i.invalid||null,this.matrix=v,this.isLuxonDuration=!0}static fromMillis(i,m){return Ye.fromObject({milliseconds:i},m)}static fromObject(i,m={}){if(i==null||typeof i!="object")throw new b(`Duration.fromObject: argument expected to be an object, got ${i===null?"null":typeof i}`);return new Ye({values:cn(i,Ye.normalizeUnit),loc:Ie.fromObject(m),conversionAccuracy:m.conversionAccuracy,matrix:m.matrix})}static fromDurationLike(i){if(pa(i))return Ye.fromMillis(i);if(Ye.isDuration(i))return i;if(typeof i=="object")return Ye.fromObject(i);throw new b(`Unknown duration argument ${i} of type ${typeof i}`)}static fromISO(i,m){const[v]=Lc(i);return v?Ye.fromObject(v,m):Ye.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static fromISOTime(i,m){const[v]=bl(i);return v?Ye.fromObject(v,m):Ye.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the Duration is invalid");const v=i instanceof xa?i:new xa(i,m);if(ht.throwOnInvalid)throw new u(v);return new Ye({invalid:v})}static normalizeUnit(i){const m={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"}[i&&i.toLowerCase()];if(!m)throw new f(i);return m}static isDuration(i){return i&&i.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(i,m={}){const v={...m,floor:m.round!==!1&&m.floor!==!1};return this.isValid?Yt.create(this.loc,v).formatDurationFromString(this,i):ii}toHuman(i={}){if(!this.isValid)return ii;const m=i.showZeros!==!1,v=Cn.map(S=>{const A=this.values[S];return De(A)||A===0&&!m?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...i,unit:S.slice(0,-1)}).format(A)}).filter(S=>S);return this.loc.listFormatter({type:"conjunction",style:i.listStyle||"narrow",...i}).format(v)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=ns(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i}toISOTime(i={}){if(!this.isValid)return null;const m=this.toMillis();return m<0||m>=864e5?null:(i={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...i,includeOffset:!1},Te.fromMillis(m,{zone:"UTC"}).toISOTime(i))}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?oi(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(i){if(!this.isValid)return this;const m=Ye.fromDurationLike(i),v={};for(const S of Cn)(Ln(m.values,S)||Ln(this.values,S))&&(v[S]=m.get(S)+this.get(S));return Ma(this,{values:v},!0)}minus(i){if(!this.isValid)return this;const m=Ye.fromDurationLike(i);return this.plus(m.negate())}mapUnits(i){if(!this.isValid)return this;const m={};for(const v of Object.keys(this.values))m[v]=ei(i(this.values[v],v));return Ma(this,{values:m},!0)}get(i){return this[Ye.normalizeUnit(i)]}set(i){if(!this.isValid)return this;const m={...this.values,...cn(i,Ye.normalizeUnit)};return Ma(this,{values:m})}reconfigure({locale:i,numberingSystem:m,conversionAccuracy:v,matrix:S}={}){const q={loc:this.loc.clone({locale:i,numberingSystem:m}),matrix:S,conversionAccuracy:v};return Ma(this,q)}as(i){return this.isValid?this.shiftTo(i).get(i):NaN}normalize(){if(!this.isValid)return this;const i=this.toObject();return ui(this.matrix,i),Ma(this,{values:i},!0)}rescale(){if(!this.isValid)return this;const i=di(this.normalize().shiftToAll().toObject());return Ma(this,{values:i},!0)}shiftTo(...i){if(!this.isValid)return this;if(i.length===0)return this;i=i.map(q=>Ye.normalizeUnit(q));const m={},v={},S=this.toObject();let A;for(const q of Cn)if(i.indexOf(q)>=0){A=q;let B=0;for(const fe in v)B+=this.matrix[fe][q]*v[fe],v[fe]=0;pa(S[q])&&(B+=S[q]);const F=Math.trunc(B);m[q]=F,v[q]=(B*1e3-F*1e3)/1e3}else pa(S[q])&&(v[q]=S[q]);for(const q in v)v[q]!==0&&(m[A]+=q===A?v[q]:v[q]/this.matrix[A][q]);return ui(this.matrix,m),Ma(this,{values:m},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const i={};for(const m of Object.keys(this.values))i[m]=this.values[m]===0?0:-this.values[m];return Ma(this,{values:i},!0)}removeZeros(){if(!this.isValid)return this;const i=di(this.values);return Ma(this,{values:i},!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(i){if(!this.isValid||!i.isValid||!this.loc.equals(i.loc))return!1;function m(v,S){return v===void 0||v===0?S===void 0||S===0:v===S}for(const v of Cn)if(!m(this.values[v],i.values[v]))return!1;return!0}}const Nl="Invalid Interval";function Pu(g,i){return!g||!g.isValid?gt.invalid("missing or invalid start"):!i||!i.isValid?gt.invalid("missing or invalid end"):i<g?gt.invalid("end before start",`The end of an interval must be after its start, but you had start=${g.toISO()} and end=${i.toISO()}`):null}class gt{constructor(i){this.s=i.start,this.e=i.end,this.invalid=i.invalid||null,this.isLuxonInterval=!0}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the Interval is invalid");const v=i instanceof xa?i:new xa(i,m);if(ht.throwOnInvalid)throw new o(v);return new gt({invalid:v})}static fromDateTimes(i,m){const v=ja(i),S=ja(m),A=Pu(v,S);return A??new gt({start:v,end:S})}static after(i,m){const v=Ye.fromDurationLike(m),S=ja(i);return gt.fromDateTimes(S,S.plus(v))}static before(i,m){const v=Ye.fromDurationLike(m),S=ja(i);return gt.fromDateTimes(S.minus(v),S)}static fromISO(i,m){const[v,S]=(i||"").split("/",2);if(v&&S){let A,q;try{A=Te.fromISO(v,m),q=A.isValid}catch{q=!1}let B,F;try{B=Te.fromISO(S,m),F=B.isValid}catch{F=!1}if(q&&F)return gt.fromDateTimes(A,B);if(q){const fe=Ye.fromISO(S,m);if(fe.isValid)return gt.after(A,fe)}else if(F){const fe=Ye.fromISO(v,m);if(fe.isValid)return gt.before(B,fe)}}return gt.invalid("unparsable",`the input "${i}" can't be parsed as ISO 8601`)}static isInterval(i){return i&&i.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(i="milliseconds"){return this.isValid?this.toDuration(i).get(i):NaN}count(i="milliseconds",m){if(!this.isValid)return NaN;const v=this.start.startOf(i,m);let S;return m!=null&&m.useLocaleWeeks?S=this.end.reconfigure({locale:v.locale}):S=this.end,S=S.startOf(i,m),Math.floor(S.diff(v,i).get(i))+(S.valueOf()!==this.end.valueOf())}hasSame(i){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,i):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(i){return this.isValid?this.s>i:!1}isBefore(i){return this.isValid?this.e<=i:!1}contains(i){return this.isValid?this.s<=i&&this.e>i:!1}set({start:i,end:m}={}){return this.isValid?gt.fromDateTimes(i||this.s,m||this.e):this}splitAt(...i){if(!this.isValid)return[];const m=i.map(ja).filter(q=>this.contains(q)).sort((q,B)=>q.toMillis()-B.toMillis()),v=[];let{s:S}=this,A=0;for(;S<this.e;){const q=m[A]||this.e,B=+q>+this.e?this.e:q;v.push(gt.fromDateTimes(S,B)),S=B,A+=1}return v}splitBy(i){const m=Ye.fromDurationLike(i);if(!this.isValid||!m.isValid||m.as("milliseconds")===0)return[];let{s:v}=this,S=1,A;const q=[];for(;v<this.e;){const B=this.start.plus(m.mapUnits(F=>F*S));A=+B>+this.e?this.e:B,q.push(gt.fromDateTimes(v,A)),v=A,S+=1}return q}divideEqually(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]}overlaps(i){return this.e>i.s&&this.s<i.e}abutsStart(i){return this.isValid?+this.e==+i.s:!1}abutsEnd(i){return this.isValid?+i.e==+this.s:!1}engulfs(i){return this.isValid?this.s<=i.s&&this.e>=i.e:!1}equals(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)}intersection(i){if(!this.isValid)return this;const m=this.s>i.s?this.s:i.s,v=this.e<i.e?this.e:i.e;return m>=v?null:gt.fromDateTimes(m,v)}union(i){if(!this.isValid)return this;const m=this.s<i.s?this.s:i.s,v=this.e>i.e?this.e:i.e;return gt.fromDateTimes(m,v)}static merge(i){const[m,v]=i.sort((S,A)=>S.s-A.s).reduce(([S,A],q)=>A?A.overlaps(q)||A.abutsStart(q)?[S,A.union(q)]:[S.concat([A]),q]:[S,q],[[],null]);return v&&m.push(v),m}static xor(i){let m=null,v=0;const S=[],A=i.map(F=>[{time:F.s,type:"s"},{time:F.e,type:"e"}]),q=Array.prototype.concat(...A),B=q.sort((F,fe)=>F.time-fe.time);for(const F of B)v+=F.type==="s"?1:-1,v===1?m=F.time:(m&&+m!=+F.time&&S.push(gt.fromDateTimes(m,F.time)),m=null);return gt.merge(S)}difference(...i){return gt.xor([this].concat(i)).map(m=>this.intersection(m)).filter(m=>m&&!m.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Nl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(i=T,m={}){return this.isValid?Yt.create(this.s.loc.clone(m),i).formatInterval(this):Nl}toISO(i){return this.isValid?`${this.s.toISO(i)}/${this.e.toISO(i)}`:Nl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Nl}toISOTime(i){return this.isValid?`${this.s.toISOTime(i)}/${this.e.toISOTime(i)}`:Nl}toFormat(i,{separator:m=" – "}={}){return this.isValid?`${this.s.toFormat(i)}${m}${this.e.toFormat(i)}`:Nl}toDuration(i,m){return this.isValid?this.e.diff(this.s,i,m):Ye.invalid(this.invalidReason)}mapEndpoints(i){return gt.fromDateTimes(i(this.s),i(this.e))}}class bs{static hasDST(i=ht.defaultZone){const m=Te.now().setZone(i).set({month:12});return!i.isUniversal&&m.offset!==m.set({month:6}).offset}static isValidIANAZone(i){return xe.isValidZone(i)}static normalizeZone(i){return At(i,ht.defaultZone)}static getStartOfWeek({locale:i=null,locObj:m=null}={}){return(m||Ie.create(i)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:i=null,locObj:m=null}={}){return(m||Ie.create(i)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:i=null,locObj:m=null}={}){return(m||Ie.create(i)).getWeekendDays().slice()}static months(i="long",{locale:m=null,numberingSystem:v=null,locObj:S=null,outputCalendar:A="gregory"}={}){return(S||Ie.create(m,v,A)).months(i)}static monthsFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:S=null,outputCalendar:A="gregory"}={}){return(S||Ie.create(m,v,A)).months(i,!0)}static weekdays(i="long",{locale:m=null,numberingSystem:v=null,locObj:S=null}={}){return(S||Ie.create(m,v,null)).weekdays(i)}static weekdaysFormat(i="long",{locale:m=null,numberingSystem:v=null,locObj:S=null}={}){return(S||Ie.create(m,v,null)).weekdays(i,!0)}static meridiems({locale:i=null}={}){return Ie.create(i).meridiems()}static eras(i="short",{locale:m=null}={}){return Ie.create(m,null,"gregory").eras(i)}static features(){return{relative:Xr(),localeWeek:wn()}}}function ra(g,i){const m=S=>S.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),v=m(i)-m(g);return Math.floor(Ye.fromMillis(v).as("days"))}function js(g,i,m){const v=[["years",(F,fe)=>fe.year-F.year],["quarters",(F,fe)=>fe.quarter-F.quarter+(fe.year-F.year)*4],["months",(F,fe)=>fe.month-F.month+(fe.year-F.year)*12],["weeks",(F,fe)=>{const ye=ra(F,fe);return(ye-ye%7)/7}],["days",ra]],S={},A=g;let q,B;for(const[F,fe]of v)m.indexOf(F)>=0&&(q=F,S[F]=fe(g,i),B=A.plus(S),B>i?(S[F]--,g=A.plus(S),g>i&&(B=g,S[F]--,g=A.plus(S))):g=B);return[g,S,B,q]}function Bc(g,i,m,v){let[S,A,q,B]=js(g,i,m);const F=i-S,fe=m.filter(Ue=>["hours","minutes","seconds","milliseconds"].indexOf(Ue)>=0);fe.length===0&&(q<i&&(q=S.plus({[B]:1})),q!==S&&(A[B]=(A[B]||0)+F/(q-S)));const ye=Ye.fromObject(A,v);return fe.length>0?Ye.fromMillis(F,v).shiftTo(...fe).plus(ye):ye}const $c="missing Intl.DateTimeFormat.formatToParts support";function Qe(g,i=m=>m){return{regex:g,deser:([m])=>i(at(m))}}const or="[  ]",Yc=new RegExp(or,"g");function wl(g){return g.replace(/\./g,"\\.?").replace(Yc,or)}function ur(g){return g.replace(/\./g,"").replace(Yc," ").toLowerCase()}function Kt(g,i){return g===null?null:{regex:RegExp(g.map(wl).join("|")),deser:([m])=>g.findIndex(v=>ur(m)===ur(v))+i}}function dr(g,i){return{regex:g,deser:([,m,v])=>ss(m,v),groups:i}}function Ns(g){return{regex:g,deser:([i])=>i}}function Bn(g){return g.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sl(g,i){const m=zt(i),v=zt(i,"{2}"),S=zt(i,"{3}"),A=zt(i,"{4}"),q=zt(i,"{6}"),B=zt(i,"{1,2}"),F=zt(i,"{1,3}"),fe=zt(i,"{1,6}"),ye=zt(i,"{1,9}"),Ue=zt(i,"{2,4}"),Pe=zt(i,"{4,6}"),ke=Wt=>({regex:RegExp(Bn(Wt.val)),deser:([Mn])=>Mn,literal:!0}),Zt=(Wt=>{if(g.literal)return ke(Wt);switch(Wt.val){case"G":return Kt(i.eras("short"),0);case"GG":return Kt(i.eras("long"),0);case"y":return Qe(fe);case"yy":return Qe(Ue,ls);case"yyyy":return Qe(A);case"yyyyy":return Qe(Pe);case"yyyyyy":return Qe(q);case"M":return Qe(B);case"MM":return Qe(v);case"MMM":return Kt(i.months("short",!0),1);case"MMMM":return Kt(i.months("long",!0),1);case"L":return Qe(B);case"LL":return Qe(v);case"LLL":return Kt(i.months("short",!1),1);case"LLLL":return Kt(i.months("long",!1),1);case"d":return Qe(B);case"dd":return Qe(v);case"o":return Qe(F);case"ooo":return Qe(S);case"HH":return Qe(v);case"H":return Qe(B);case"hh":return Qe(v);case"h":return Qe(B);case"mm":return Qe(v);case"m":return Qe(B);case"q":return Qe(B);case"qq":return Qe(v);case"s":return Qe(B);case"ss":return Qe(v);case"S":return Qe(F);case"SSS":return Qe(S);case"u":return Ns(ye);case"uu":return Ns(B);case"uuu":return Qe(m);case"a":return Kt(i.meridiems(),0);case"kkkk":return Qe(A);case"kk":return Qe(Ue,ls);case"W":return Qe(B);case"WW":return Qe(v);case"E":case"c":return Qe(m);case"EEE":return Kt(i.weekdays("short",!1),1);case"EEEE":return Kt(i.weekdays("long",!1),1);case"ccc":return Kt(i.weekdays("short",!0),1);case"cccc":return Kt(i.weekdays("long",!0),1);case"Z":case"ZZ":return dr(new RegExp(`([+-]${B.source})(?::(${v.source}))?`),2);case"ZZZ":return dr(new RegExp(`([+-]${B.source})(${v.source})?`),2);case"z":return Ns(/[a-z_+-/]{1,256}?/i);case" ":return Ns(/[^\S\n\r]/);default:return ke(Wt)}})(g)||{invalidReason:$c};return Zt.token=g,Zt}const fi={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 Pc(g,i,m){const{type:v,value:S}=g;if(v==="literal"){const F=/^\s+$/.test(S);return{literal:!F,val:F?" ":S}}const A=i[v];let q=v;v==="hour"&&(i.hour12!=null?q=i.hour12?"hour12":"hour24":i.hourCycle!=null?i.hourCycle==="h11"||i.hourCycle==="h12"?q="hour12":q="hour24":q=m.hour12?"hour12":"hour24");let B=fi[q];if(typeof B=="object"&&(B=B[A]),B)return{literal:!1,val:B}}function $n(g){return[`^${g.map(m=>m.regex).reduce((m,v)=>`${m}(${v.source})`,"")}$`,g]}function Fc(g,i,m){const v=g.match(i);if(v){const S={};let A=1;for(const q in m)if(Ln(m,q)){const B=m[q],F=B.groups?B.groups+1:1;!B.literal&&B.token&&(S[B.token.val[0]]=B.deser(v.slice(A,A+F))),A+=F}return[v,S]}else return[v,{}]}function Gc(g){const i=A=>{switch(A){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 m=null,v;return De(g.z)||(m=xe.create(g.z)),De(g.Z)||(m||(m=new mt(g.Z)),v=g.Z),De(g.q)||(g.M=(g.q-1)*3+1),De(g.h)||(g.h<12&&g.a===1?g.h+=12:g.h===12&&g.a===0&&(g.h=0)),g.G===0&&g.y&&(g.y=-g.y),De(g.u)||(g.S=Kr(g.u)),[Object.keys(g).reduce((A,q)=>{const B=i(q);return B&&(A[B]=g[q]),A},{}),m,v]}let fr=null;function Gu(){return fr||(fr=Te.fromMillis(1555555555555)),fr}function Zu(g,i){if(g.literal)return g;const m=Yt.macroTokenToFormatOpts(g.val),v=ya(m,i);return v==null||v.includes(void 0)?g:v}function Zc(g,i){return Array.prototype.concat(...g.map(m=>Zu(m,i)))}class hi{constructor(i,m){if(this.locale=i,this.format=m,this.tokens=Zc(Yt.parseFormat(m),i),this.units=this.tokens.map(v=>Sl(v,i)),this.disqualifyingUnit=this.units.find(v=>v.invalidReason),!this.disqualifyingUnit){const[v,S]=$n(this.units);this.regex=RegExp(v,"i"),this.handlers=S}}explainFromTokens(i){if(this.isValid){const[m,v]=Fc(i,this.regex,this.handlers),[S,A,q]=v?Gc(v):[null,null,void 0];if(Ln(v,"a")&&Ln(v,"H"))throw new h("Can't include meridiem when specifying 24-hour format");return{input:i,tokens:this.tokens,regex:this.regex,rawMatches:m,matches:v,result:S,zone:A,specificOffset:q}}else return{input:i,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function mi(g,i,m){return new hi(g,m).explainFromTokens(i)}function gi(g,i,m){const{result:v,zone:S,specificOffset:A,invalidReason:q}=mi(g,i,m);return[v,S,A,q]}function ya(g,i){if(!g)return null;const v=Yt.create(i,g).dtFormatter(Gu()),S=v.formatToParts(),A=v.resolvedOptions();return S.map(q=>Pc(q,g,A))}const El="Invalid DateTime",da=864e13;function Ba(g){return new xa("unsupported zone",`the zone "${g.name}" is not supported`)}function ws(g){return g.weekData===null&&(g.weekData=$t(g.c)),g.weekData}function Tl(g){return g.localWeekData===null&&(g.localWeekData=$t(g.c,g.loc.getMinDaysInFirstWeek(),g.loc.getStartOfWeek())),g.localWeekData}function $a(g,i){const m={ts:g.ts,zone:g.zone,c:g.c,o:g.o,loc:g.loc,invalid:g.invalid};return new Te({...m,...i,old:m})}function hr(g,i,m){let v=g-i*60*1e3;const S=m.offset(v);if(i===S)return[v,i];v-=(S-i)*60*1e3;const A=m.offset(v);return S===A?[v,S]:[g-Math.min(S,A)*60*1e3,Math.max(S,A)]}function Ya(g,i){g+=i*60*1e3;const m=new Date(g);return{year:m.getUTCFullYear(),month:m.getUTCMonth()+1,day:m.getUTCDate(),hour:m.getUTCHours(),minute:m.getUTCMinutes(),second:m.getUTCSeconds(),millisecond:m.getUTCMilliseconds()}}function Ss(g,i,m){return hr(Jt(g),i,m)}function Es(g,i){const m=g.o,v=g.c.year+Math.trunc(i.years),S=g.c.month+Math.trunc(i.months)+Math.trunc(i.quarters)*3,A={...g.c,year:v,month:S,day:Math.min(g.c.day,er(v,S))+Math.trunc(i.days)+Math.trunc(i.weeks)*7},q=Ye.fromObject({years:i.years-Math.trunc(i.years),quarters:i.quarters-Math.trunc(i.quarters),months:i.months-Math.trunc(i.months),weeks:i.weeks-Math.trunc(i.weeks),days:i.days-Math.trunc(i.days),hours:i.hours,minutes:i.minutes,seconds:i.seconds,milliseconds:i.milliseconds}).as("milliseconds"),B=Jt(A);let[F,fe]=hr(B,m,g.zone);return q!==0&&(F+=q,fe=g.zone.offset(F)),{ts:F,o:fe}}function Oa(g,i,m,v,S,A){const{setZone:q,zone:B}=m;if(g&&Object.keys(g).length!==0||i){const F=i||B,fe=Te.fromObject(g,{...m,zone:F,specificOffset:A});return q?fe:fe.setZone(B)}else return Te.invalid(new xa("unparsable",`the input "${S}" can't be parsed as ${v}`))}function mr(g,i,m=!0){return g.isValid?Yt.create(Ie.create("en-US"),{allowZ:m,forceSimple:!0}).formatDateTimeFromString(g,i):null}function ea(g,i,m){const v=g.c.year>9999||g.c.year<0;let S="";if(v&&g.c.year>=0&&(S+="+"),S+=nt(g.c.year,v?6:4),m==="year")return S;if(i){if(S+="-",S+=nt(g.c.month),m==="month")return S;S+="-"}else if(S+=nt(g.c.month),m==="month")return S;return S+=nt(g.c.day),S}function gr(g,i,m,v,S,A,q){let B=!m||g.c.millisecond!==0||g.c.second!==0,F="";switch(q){case"day":case"month":case"year":break;default:if(F+=nt(g.c.hour),q==="hour")break;if(i){if(F+=":",F+=nt(g.c.minute),q==="minute")break;B&&(F+=":",F+=nt(g.c.second))}else{if(F+=nt(g.c.minute),q==="minute")break;B&&(F+=nt(g.c.second))}if(q==="second")break;B&&(!v||g.c.millisecond!==0)&&(F+=".",F+=nt(g.c.millisecond,3))}return S&&(g.isOffsetFixed&&g.offset===0&&!A?F+="Z":g.o<0?(F+="-",F+=nt(Math.trunc(-g.o/60)),F+=":",F+=nt(Math.trunc(-g.o%60))):(F+="+",F+=nt(Math.trunc(g.o/60)),F+=":",F+=nt(Math.trunc(g.o%60)))),A&&(F+="["+g.zone.ianaName+"]"),F}const Pa={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Wc={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},xr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Fa=["year","month","day","hour","minute","second","millisecond"],xi=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ic=["year","ordinal","hour","minute","second","millisecond"];function Cl(g){const i={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[g.toLowerCase()];if(!i)throw new f(g);return i}function pi(g){switch(g.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Cl(g)}}function ba(g){if(fn===void 0&&(fn=ht.now()),g.type!=="iana")return g.offset(fn);const i=g.name;let m=ia.get(i);return m===void 0&&(m=g.offset(fn),ia.set(i,m)),m}function Yn(g,i){const m=At(i.zone,ht.defaultZone);if(!m.isValid)return Te.invalid(Ba(m));const v=Ie.fromObject(i);let S,A;if(De(g.year))S=ht.now();else{for(const F of Fa)De(g[F])&&(g[F]=Pa[F]);const q=Js(g)||Un(g);if(q)return Te.invalid(q);const B=ba(m);[S,A]=Ss(g,B,m)}return new Te({ts:S,zone:m,loc:v,o:A})}function Pn(g,i,m){const v=De(m.round)?!0:m.round,S=De(m.rounding)?"trunc":m.rounding,A=(B,F)=>(B=ns(B,v||m.calendary?0:2,m.calendary?"round":S),i.loc.clone(m).relFormatter(m).format(B,F)),q=B=>m.calendary?i.hasSame(g,B)?0:i.startOf(B).diff(g.startOf(B),B).get(B):i.diff(g,B).get(B);if(m.unit)return A(q(m.unit),m.unit);for(const B of m.units){const F=q(B);if(Math.abs(F)>=1)return A(F,B)}return A(g>i?-0:0,m.units[m.units.length-1])}function Ts(g){let i={},m;return g.length>0&&typeof g[g.length-1]=="object"?(i=g[g.length-1],m=Array.from(g).slice(0,g.length-1)):m=Array.from(g),[i,m]}let fn;const ia=new Map;class Te{constructor(i){const m=i.zone||ht.defaultZone;let v=i.invalid||(Number.isNaN(i.ts)?new xa("invalid input"):null)||(m.isValid?null:Ba(m));this.ts=De(i.ts)?ht.now():i.ts;let S=null,A=null;if(!v)if(i.old&&i.old.ts===this.ts&&i.old.zone.equals(m))[S,A]=[i.old.c,i.old.o];else{const B=pa(i.o)&&!i.old?i.o:m.offset(this.ts);S=Ya(this.ts,B),v=Number.isNaN(S.year)?new xa("invalid input"):null,S=v?null:S,A=v?null:B}this._zone=m,this.loc=i.loc||Ie.create(),this.invalid=v,this.weekData=null,this.localWeekData=null,this.c=S,this.o=A,this.isLuxonDateTime=!0}static now(){return new Te({})}static local(){const[i,m]=Ts(arguments),[v,S,A,q,B,F,fe]=m;return Yn({year:v,month:S,day:A,hour:q,minute:B,second:F,millisecond:fe},i)}static utc(){const[i,m]=Ts(arguments),[v,S,A,q,B,F,fe]=m;return i.zone=mt.utcInstance,Yn({year:v,month:S,day:A,hour:q,minute:B,second:F,millisecond:fe},i)}static fromJSDate(i,m={}){const v=Sc(i)?i.valueOf():NaN;if(Number.isNaN(v))return Te.invalid("invalid input");const S=At(m.zone,ht.defaultZone);return S.isValid?new Te({ts:v,zone:S,loc:Ie.fromObject(m)}):Te.invalid(Ba(S))}static fromMillis(i,m={}){if(pa(i))return i<-da||i>da?Te.invalid("Timestamp out of range"):new Te({ts:i,zone:At(m.zone,ht.defaultZone),loc:Ie.fromObject(m)});throw new b(`fromMillis requires a numerical input, but received a ${typeof i} with value ${i}`)}static fromSeconds(i,m={}){if(pa(i))return new Te({ts:i*1e3,zone:At(m.zone,ht.defaultZone),loc:Ie.fromObject(m)});throw new b("fromSeconds requires a numerical input")}static fromObject(i,m={}){i=i||{};const v=At(m.zone,ht.defaultZone);if(!v.isValid)return Te.invalid(Ba(v));const S=Ie.fromObject(m),A=cn(i,pi),{minDaysInFirstWeek:q,startOfWeek:B}=Nc(A,S),F=ht.now(),fe=De(m.specificOffset)?v.offset(F):m.specificOffset,ye=!De(A.ordinal),Ue=!De(A.year),Pe=!De(A.month)||!De(A.day),ke=Ue||Pe,bt=A.weekYear||A.weekNumber;if((ke||ye)&&bt)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(Pe&&ye)throw new h("Can't mix ordinal dates with month/day");const Zt=bt||A.weekday&&!ke;let Wt,Mn,hn=Ya(F,fe);Zt?(Wt=xi,Mn=Wc,hn=$t(hn,q,B)):ye?(Wt=Ic,Mn=xr,hn=ts(hn)):(Wt=Fa,Mn=Pa);let pr=!1;for(const Wa of Wt){const vr=A[Wa];De(vr)?pr?A[Wa]=Mn[Wa]:A[Wa]=hn[Wa]:pr=!0}const Fn=Zt?wc(A,q,B):ye?as(A):Js(A),Za=Fn||Un(A);if(Za)return Te.invalid(Za);const On=Zt?zn(A,q,B):ye?jc(A):A,[mn,vi]=Ss(On,fe,v),Gn=new Te({ts:mn,zone:v,o:vi,loc:S});return A.weekday&&ke&&i.weekday!==Gn.weekday?Te.invalid("mismatched weekday",`you can't specify both a weekday of ${A.weekday} and a date of ${Gn.toISO()}`):Gn.isValid?Gn:Te.invalid(Gn.invalid)}static fromISO(i,m={}){const[v,S]=_c(i);return Oa(v,S,m,"ISO 8601",i)}static fromRFC2822(i,m={}){const[v,S]=zc(i);return Oa(v,S,m,"RFC 2822",i)}static fromHTTP(i,m={}){const[v,S]=Uc(i);return Oa(v,S,m,"HTTP",m)}static fromFormat(i,m,v={}){if(De(i)||De(m))throw new b("fromFormat requires an input string and a format");const{locale:S=null,numberingSystem:A=null}=v,q=Ie.fromOpts({locale:S,numberingSystem:A,defaultToEN:!0}),[B,F,fe,ye]=gi(q,i,m);return ye?Te.invalid(ye):Oa(B,F,v,`format ${m}`,i,fe)}static fromString(i,m,v={}){return Te.fromFormat(i,m,v)}static fromSQL(i,m={}){const[v,S]=qc(i);return Oa(v,S,m,"SQL",i)}static invalid(i,m=null){if(!i)throw new b("need to specify a reason the DateTime is invalid");const v=i instanceof xa?i:new xa(i,m);if(ht.throwOnInvalid)throw new r(v);return new Te({invalid:v})}static isDateTime(i){return i&&i.isLuxonDateTime||!1}static parseFormatForOpts(i,m={}){const v=ya(i,Ie.fromObject(m));return v?v.map(S=>S?S.val:null).join(""):null}static expandFormat(i,m={}){return Zc(Yt.parseFormat(i),Ie.fromObject(m)).map(S=>S.val).join("")}static resetCache(){fn=void 0,ia.clear()}get(i){return this[i]}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?ws(this).weekYear:NaN}get weekNumber(){return this.isValid?ws(this).weekNumber:NaN}get weekday(){return this.isValid?ws(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Tl(this).weekday:NaN}get localWeekNumber(){return this.isValid?Tl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Tl(this).weekYear:NaN}get ordinal(){return this.isValid?ts(this.c).ordinal:NaN}get monthShort(){return this.isValid?bs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?bs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?bs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?bs.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 i=864e5,m=6e4,v=Jt(this.c),S=this.zone.offset(v-i),A=this.zone.offset(v+i),q=this.zone.offset(v-S*m),B=this.zone.offset(v-A*m);if(q===B)return[this];const F=v-q*m,fe=v-B*m,ye=Ya(F,q),Ue=Ya(fe,B);return ye.hour===Ue.hour&&ye.minute===Ue.minute&&ye.second===Ue.second&&ye.millisecond===Ue.millisecond?[$a(this,{ts:F}),$a(this,{ts:fe})]:[this]}get isInLeapYear(){return ml(this.year)}get daysInMonth(){return er(this.year,this.month)}get daysInYear(){return this.isValid?rn(this.year):NaN}get weeksInWeekYear(){return this.isValid?gl(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?gl(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(i={}){const{locale:m,numberingSystem:v,calendar:S}=Yt.create(this.loc.clone(i),i).resolvedOptions(this);return{locale:m,numberingSystem:v,outputCalendar:S}}toUTC(i=0,m={}){return this.setZone(mt.instance(i),m)}toLocal(){return this.setZone(ht.defaultZone)}setZone(i,{keepLocalTime:m=!1,keepCalendarTime:v=!1}={}){if(i=At(i,ht.defaultZone),i.equals(this.zone))return this;if(i.isValid){let S=this.ts;if(m||v){const A=i.offset(this.ts),q=this.toObject();[S]=Ss(q,A,i)}return $a(this,{ts:S,zone:i})}else return Te.invalid(Ba(i))}reconfigure({locale:i,numberingSystem:m,outputCalendar:v}={}){const S=this.loc.clone({locale:i,numberingSystem:m,outputCalendar:v});return $a(this,{loc:S})}setLocale(i){return this.reconfigure({locale:i})}set(i){if(!this.isValid)return this;const m=cn(i,pi),{minDaysInFirstWeek:v,startOfWeek:S}=Nc(m,this.loc),A=!De(m.weekYear)||!De(m.weekNumber)||!De(m.weekday),q=!De(m.ordinal),B=!De(m.year),F=!De(m.month)||!De(m.day),fe=B||F,ye=m.weekYear||m.weekNumber;if((fe||q)&&ye)throw new h("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(F&&q)throw new h("Can't mix ordinal dates with month/day");let Ue;A?Ue=zn({...$t(this.c,v,S),...m},v,S):De(m.ordinal)?(Ue={...this.toObject(),...m},De(m.day)&&(Ue.day=Math.min(er(Ue.year,Ue.month),Ue.day))):Ue=jc({...ts(this.c),...m});const[Pe,ke]=Ss(Ue,this.o,this.zone);return $a(this,{ts:Pe,o:ke})}plus(i){if(!this.isValid)return this;const m=Ye.fromDurationLike(i);return $a(this,Es(this,m))}minus(i){if(!this.isValid)return this;const m=Ye.fromDurationLike(i).negate();return $a(this,Es(this,m))}startOf(i,{useLocaleWeeks:m=!1}={}){if(!this.isValid)return this;const v={},S=Ye.normalizeUnit(i);switch(S){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(S==="weeks")if(m){const A=this.loc.getStartOfWeek(),{weekday:q}=this;q<A&&(v.weekNumber=this.weekNumber-1),v.weekday=A}else v.weekday=1;if(S==="quarters"){const A=Math.ceil(this.month/3);v.month=(A-1)*3+1}return this.set(v)}endOf(i,m){return this.isValid?this.plus({[i]:1}).startOf(i,m).minus(1):this}toFormat(i,m={}){return this.isValid?Yt.create(this.loc.redefaultToEN(m)).formatDateTimeFromString(this,i):El}toLocaleString(i=T,m={}){return this.isValid?Yt.create(this.loc.clone(m),i).formatDateTime(this):El}toLocaleParts(i={}){return this.isValid?Yt.create(this.loc.clone(i),i).formatDateTimeParts(this):[]}toISO({format:i="extended",suppressSeconds:m=!1,suppressMilliseconds:v=!1,includeOffset:S=!0,extendedZone:A=!1,precision:q="milliseconds"}={}){if(!this.isValid)return null;q=Cl(q);const B=i==="extended";let F=ea(this,B,q);return Fa.indexOf(q)>=3&&(F+="T"),F+=gr(this,B,m,v,S,A,q),F}toISODate({format:i="extended",precision:m="day"}={}){return this.isValid?ea(this,i==="extended",Cl(m)):null}toISOWeekDate(){return mr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:i=!1,suppressSeconds:m=!1,includeOffset:v=!0,includePrefix:S=!1,extendedZone:A=!1,format:q="extended",precision:B="milliseconds"}={}){return this.isValid?(B=Cl(B),(S&&Fa.indexOf(B)>=3?"T":"")+gr(this,q==="extended",m,i,v,A,B)):null}toRFC2822(){return mr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return mr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?ea(this,!0):null}toSQLTime({includeOffset:i=!0,includeZone:m=!1,includeOffsetSpace:v=!0}={}){let S="HH:mm:ss.SSS";return(m||i)&&(v&&(S+=" "),m?S+="z":i&&(S+="ZZ")),mr(this,S,!0)}toSQL(i={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(i)}`:null}toString(){return this.isValid?this.toISO():El}[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(i={}){if(!this.isValid)return{};const m={...this.c};return i.includeConfig&&(m.outputCalendar=this.outputCalendar,m.numberingSystem=this.loc.numberingSystem,m.locale=this.loc.locale),m}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(i,m="milliseconds",v={}){if(!this.isValid||!i.isValid)return Ye.invalid("created by diffing an invalid DateTime");const S={locale:this.locale,numberingSystem:this.numberingSystem,...v},A=hl(m).map(Ye.normalizeUnit),q=i.valueOf()>this.valueOf(),B=q?this:i,F=q?i:this,fe=Bc(B,F,A,S);return q?fe.negate():fe}diffNow(i="milliseconds",m={}){return this.diff(Te.now(),i,m)}until(i){return this.isValid?gt.fromDateTimes(this,i):this}hasSame(i,m,v){if(!this.isValid)return!1;const S=i.valueOf(),A=this.setZone(i.zone,{keepLocalTime:!0});return A.startOf(m,v)<=S&&S<=A.endOf(m,v)}equals(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)}toRelative(i={}){if(!this.isValid)return null;const m=i.base||Te.fromObject({},{zone:this.zone}),v=i.padding?this<m?-i.padding:i.padding:0;let S=["years","months","days","hours","minutes","seconds"],A=i.unit;return Array.isArray(i.unit)&&(S=i.unit,A=void 0),Pn(m,this.plus(v),{...i,numeric:"always",units:S,unit:A})}toRelativeCalendar(i={}){return this.isValid?Pn(i.base||Te.fromObject({},{zone:this.zone}),this,{...i,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...i){if(!i.every(Te.isDateTime))throw new b("min requires all arguments be DateTimes");return Ec(i,m=>m.valueOf(),Math.min)}static max(...i){if(!i.every(Te.isDateTime))throw new b("max requires all arguments be DateTimes");return Ec(i,m=>m.valueOf(),Math.max)}static fromFormatExplain(i,m,v={}){const{locale:S=null,numberingSystem:A=null}=v,q=Ie.fromOpts({locale:S,numberingSystem:A,defaultToEN:!0});return mi(q,i,m)}static fromStringExplain(i,m,v={}){return Te.fromFormatExplain(i,m,v)}static buildFormatParser(i,m={}){const{locale:v=null,numberingSystem:S=null}=m,A=Ie.fromOpts({locale:v,numberingSystem:S,defaultToEN:!0});return new hi(A,i)}static fromFormatParser(i,m,v={}){if(De(i)||De(m))throw new b("fromFormatParser requires an input string and a format parser");const{locale:S=null,numberingSystem:A=null}=v,q=Ie.fromOpts({locale:S,numberingSystem:A,defaultToEN:!0});if(!q.equals(m.locale))throw new b(`fromFormatParser called with a locale of ${q}, but the format parser was created for ${m.locale}`);const{result:B,zone:F,specificOffset:fe,invalidReason:ye}=m.explainFromTokens(i);return ye?Te.invalid(ye):Oa(B,F,v,`format ${m.format}`,i,fe)}static get DATE_SHORT(){return T}static get DATE_MED(){return z}static get DATE_MED_WITH_WEEKDAY(){return _}static get DATE_FULL(){return N}static get DATE_HUGE(){return O}static get TIME_SIMPLE(){return k}static get TIME_WITH_SECONDS(){return Y}static get TIME_WITH_SHORT_OFFSET(){return D}static get TIME_WITH_LONG_OFFSET(){return M}static get TIME_24_SIMPLE(){return V}static get TIME_24_WITH_SECONDS(){return K}static get TIME_24_WITH_SHORT_OFFSET(){return $}static get TIME_24_WITH_LONG_OFFSET(){return W}static get DATETIME_SHORT(){return R}static get DATETIME_SHORT_WITH_SECONDS(){return ae}static get DATETIME_MED(){return C}static get DATETIME_MED_WITH_SECONDS(){return J}static get DATETIME_MED_WITH_WEEKDAY(){return ne}static get DATETIME_FULL(){return he}static get DATETIME_FULL_WITH_SECONDS(){return ve}static get DATETIME_HUGE(){return ue}static get DATETIME_HUGE_WITH_SECONDS(){return G}}function ja(g){if(Te.isDateTime(g))return g;if(g&&g.valueOf&&pa(g.valueOf()))return Te.fromJSDate(g);if(g&&typeof g=="object")return Te.fromObject(g);throw new b(`Unknown datetime argument: ${g}, of type ${typeof g}`)}const Ga="3.7.2";return Ca.DateTime=Te,Ca.Duration=Ye,Ca.FixedOffsetZone=mt,Ca.IANAZone=xe,Ca.Info=bs,Ca.Interval=gt,Ca.InvalidZone=Bt,Ca.Settings=ht,Ca.SystemZone=me,Ca.VERSION=Ga,Ca.Zone=le,Ca}var nx;function ph(){return nx||(nx=1,(function(n){var f,b,j,y,x,Pf,T,Ql;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;const r=JN();var o;(function(N){N.Second="Second",N.Minute="Minute",N.Hour="Hour",N.Day="Day",N.Month="Month",N.Year="Year"})(o||(n.TimeUnit=o={}));var u;(function(N){N.Add="Add",N.Subtract="Subtract"})(u||(n.DateMathOp=u={})),n.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const _=class _{constructor(O,k){et(this,T);et(this,f);et(this,b,null);et(this,j,null);et(this,y,{add:{[o.Year]:this.addYear.bind(this),[o.Month]:this.addMonth.bind(this),[o.Day]:this.addDay.bind(this),[o.Hour]:this.addHour.bind(this),[o.Minute]:this.addMinute.bind(this),[o.Second]:this.addSecond.bind(this)},subtract:{[o.Year]:this.subtractYear.bind(this),[o.Month]:this.subtractMonth.bind(this),[o.Day]:this.subtractDay.bind(this),[o.Hour]:this.subtractHour.bind(this),[o.Minute]:this.subtractMinute.bind(this),[o.Second]:this.subtractSecond.bind(this)}});const Y={zone:k};if(O?O instanceof _?(Me(this,f,ee(O,f)),Me(this,b,ee(O,b)),Me(this,j,ee(O,j))):O instanceof Date?Me(this,f,r.DateTime.fromJSDate(O,Y)):typeof O=="number"?Me(this,f,r.DateTime.fromMillis(O,Y)):(Me(this,f,r.DateTime.fromISO(O,Y)),ee(this,f).isValid||Me(this,f,r.DateTime.fromRFC2822(O,Y)),ee(this,f).isValid||Me(this,f,r.DateTime.fromSQL(O,Y)),ee(this,f).isValid||Me(this,f,r.DateTime.fromFormat(O,"EEE, d MMM yyyy HH:mm:ss",Y))):Me(this,f,r.DateTime.local()),!ee(this,f).isValid)throw new Error(`CronDate: unhandled timestamp: ${O}`);k&&k!==ee(this,f).zoneName&&Me(this,f,ee(this,f).setZone(k))}get dstStart(){return ee(this,b)}set dstStart(O){Me(this,b,O)}get dstEnd(){return ee(this,j)}set dstEnd(O){Me(this,j,O)}addYear(){Me(this,f,ee(this,f).plus({years:1}))}addMonth(){Me(this,f,ee(this,f).plus({months:1}).startOf("month"))}addDay(){Me(this,f,ee(this,f).plus({days:1}).startOf("day"))}addHour(){Me(this,f,ee(this,f).plus({hours:1}).startOf("hour"))}addMinute(){Me(this,f,ee(this,f).plus({minutes:1}).startOf("minute"))}addSecond(){Me(this,f,ee(this,f).plus({seconds:1}))}subtractYear(){Me(this,f,ee(this,f).minus({years:1}))}subtractMonth(){Me(this,f,ee(this,f).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Me(this,f,ee(this,f).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Me(this,f,ee(this,f).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Me(this,f,ee(this,f).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Me(this,f,ee(this,f).minus({seconds:1}))}addUnit(O){ee(this,y).add[O]()}subtractUnit(O){ee(this,y).subtract[O]()}invokeDateOperation(O,k){if(O===u.Add){this.addUnit(k);return}if(O===u.Subtract){this.subtractUnit(k);return}throw new Error(`Invalid verb: ${O}`)}getDate(){return ee(this,f).day}getFullYear(){return ee(this,f).year}getDay(){const O=ee(this,f).weekday;return O===7?0:O}getMonth(){return ee(this,f).month-1}getHours(){return ee(this,f).hour}getMinutes(){return ee(this,f).minute}getSeconds(){return ee(this,f).second}getMilliseconds(){return ee(this,f).millisecond}getUTCOffset(){return ee(this,f).offset}setStartOfDay(){Me(this,f,ee(this,f).startOf("day"))}setEndOfDay(){Me(this,f,ee(this,f).endOf("day"))}getTime(){return ee(this,f).valueOf()}getUTCDate(){return we(this,T,Ql).call(this).day}getUTCFullYear(){return we(this,T,Ql).call(this).year}getUTCDay(){const O=we(this,T,Ql).call(this).weekday;return O===7?0:O}getUTCMonth(){return we(this,T,Ql).call(this).month-1}getUTCHours(){return we(this,T,Ql).call(this).hour}getUTCMinutes(){return we(this,T,Ql).call(this).minute}getUTCSeconds(){return we(this,T,Ql).call(this).second}toISOString(){return ee(this,f).toUTC().toISO()}toJSON(){return ee(this,f).toJSON()}setDate(O){Me(this,f,ee(this,f).set({day:O}))}setFullYear(O){Me(this,f,ee(this,f).set({year:O}))}setDay(O){Me(this,f,ee(this,f).set({weekday:O}))}setMonth(O){Me(this,f,ee(this,f).set({month:O+1}))}setHours(O){Me(this,f,ee(this,f).set({hour:O}))}setMinutes(O){Me(this,f,ee(this,f).set({minute:O}))}setSeconds(O){Me(this,f,ee(this,f).set({second:O}))}setMilliseconds(O){Me(this,f,ee(this,f).set({millisecond:O}))}toString(){return this.toDate().toString()}toDate(){return ee(this,f).toJSDate()}isLastDayOfMonth(){var Y;const{day:O,month:k}=ee(this,f);if(k===2){const D=we(Y=_,x,Pf).call(Y,ee(this,f).year);return O===n.DAYS_IN_MONTH[k-1]-(D?0:1)}return O===n.DAYS_IN_MONTH[k-1]}isLastWeekdayOfMonth(){var D;const{day:O,month:k}=ee(this,f);let Y;return k===2?Y=n.DAYS_IN_MONTH[k-1]-(we(D=_,x,Pf).call(D,ee(this,f).year)?0:1):Y=n.DAYS_IN_MONTH[k-1],O>Y-7}applyDateOperation(O,k,Y){if(k===o.Month||k===o.Day){this.invokeDateOperation(O,k);return}const D=this.getHours();this.invokeDateOperation(O,k);const M=this.getHours(),V=M-D;V===2?Y!==24&&(this.dstStart=M):V===0&&this.getMinutes()===0&&this.getSeconds()===0&&Y!==24&&(this.dstEnd=M)}};f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakMap,x=new WeakSet,Pf=function(O){return O%4===0&&O%100!==0||O%400===0},T=new WeakSet,Ql=function(){return ee(this,f).toUTC()},et(_,x);let h=_;n.CronDate=h,n.default=h})(zf)),zf}var lx;function KN(){if(lx)return lc;lx=1,Object.defineProperty(lc,"__esModule",{value:!0}),lc.CronMonth=void 0;const n=ph(),r=Gs(),o=1,u=12,h=Object.freeze([]);let f=class extends r.CronField{static get min(){return o}static get max(){return u}static get chars(){return h}static get daysInMonth(){return n.DAYS_IN_MONTH}constructor(j,y){super(j,y),this.validate()}get values(){return super.values}};return lc.CronMonth=f,lc}var sc={},sx;function e2(){if(sx)return sc;sx=1,Object.defineProperty(sc,"__esModule",{value:!0}),sc.CronSecond=void 0;const n=Gs(),r=0,o=59,u=Object.freeze([]);let h=class extends n.CronField{static get min(){return r}static get max(){return o}static get chars(){return u}constructor(b,j){super(b,j),this.validate()}get values(){return super.values}};return sc.CronSecond=h,sc}var rx;function vh(){return rx||(rx=1,(function(n){var r=Ls&&Ls.__createBinding||(Object.create?(function(u,h,f,b){b===void 0&&(b=f);var j=Object.getOwnPropertyDescriptor(h,f);(!j||("get"in j?!h.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return h[f]}}),Object.defineProperty(u,b,j)}):(function(u,h,f,b){b===void 0&&(b=f),u[b]=h[f]})),o=Ls&&Ls.__exportStar||function(u,h){for(var f in u)f!=="default"&&!Object.prototype.hasOwnProperty.call(h,f)&&r(h,u,f)};Object.defineProperty(n,"__esModule",{value:!0}),o(ZN(),n),o(WN(),n),o(IN(),n),o(Gs(),n),o(QN(),n),o(XN(),n),o(KN(),n),o(e2(),n)})(Ls)),Ls}var ix;function Ep(){var o,u,h,f,b,j,y,x,wp,Sp;if(ix)return Ji;ix=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.CronFieldCollection=void 0;const n=vh();let r=(x=class{constructor({second:_,minute:N,hour:O,dayOfMonth:k,month:Y,dayOfWeek:D}){et(this,o);et(this,u);et(this,h);et(this,f);et(this,b);et(this,j);if(!_)throw new Error("Validation error, Field second is missing");if(!N)throw new Error("Validation error, Field minute is missing");if(!O)throw new Error("Validation error, Field hour is missing");if(!k)throw new Error("Validation error, Field dayOfMonth is missing");if(!Y)throw new Error("Validation error, Field month is missing");if(!D)throw new Error("Validation error, Field dayOfWeek is missing");if(Y.values.length===1&&!k.hasLastChar&&!(parseInt(k.values[0],10)<=n.CronMonth.daysInMonth[Y.values[0]-1]))throw new Error("Invalid explicit day of month definition");Me(this,o,_),Me(this,u,N),Me(this,h,O),Me(this,b,Y),Me(this,j,D),Me(this,f,k)}static from(_,N){return new x({second:this.resolveField(n.CronSecond,_.second,N.second),minute:this.resolveField(n.CronMinute,_.minute,N.minute),hour:this.resolveField(n.CronHour,_.hour,N.hour),dayOfMonth:this.resolveField(n.CronDayOfMonth,_.dayOfMonth,N.dayOfMonth),month:this.resolveField(n.CronMonth,_.month,N.month),dayOfWeek:this.resolveField(n.CronDayOfWeek,_.dayOfWeek,N.dayOfWeek)})}static resolveField(_,N,O){return O?O instanceof n.CronField?O:new _(O):N}get second(){return ee(this,o)}get minute(){return ee(this,u)}get hour(){return ee(this,h)}get dayOfMonth(){return ee(this,f)}get month(){return ee(this,b)}get dayOfWeek(){return ee(this,j)}static compactField(_){if(_.length===0)return[];const N=[];let O;return _.forEach((k,Y,D)=>{if(O===void 0){O={start:k,count:1};return}const M=D[Y-1]||O.start,V=D[Y+1];if(k==="L"||k==="W"){N.push(O),N.push({start:k,count:1}),O=void 0;return}if(O.step===void 0&&V!==void 0){const K=k-M,$=V-k;if(K<=$){O={...O,count:2,end:k,step:K};return}O.step=1}k-(O.end??0)===O.step?(O.count++,O.end=k):(O.count===1?N.push({start:O.start,count:1}):O.count===2?(N.push({start:O.start,count:1}),N.push({start:O.end??M,count:1})):N.push(O),O={start:k,count:1})}),O&&N.push(O),N}stringifyField(_){var Y;let N=_.max,O=_.values;if(_ instanceof n.CronDayOfWeek){N=6;const D=ee(this,j).values;O=D[D.length-1]===7?D.slice(0,-1):D}_ instanceof n.CronDayOfMonth&&(N=ee(this,b).values.length===1?n.CronMonth.daysInMonth[ee(this,b).values[0]-1]:_.max);const k=x.compactField(O);if(k.length===1){const D=we(Y=x,y,wp).call(Y,_,k[0],N);if(D)return D}return k.map(D=>{var V;const M=D.count===1?D.start.toString():we(V=x,y,Sp).call(V,D,N);return _ instanceof n.CronDayOfWeek&&_.nthDay>0?`${M}#${_.nthDay}`:M}).join(",")}stringify(_=!1){const N=[];return _&&N.push(this.stringifyField(ee(this,o))),N.push(this.stringifyField(ee(this,u)),this.stringifyField(ee(this,h)),this.stringifyField(ee(this,f)),this.stringifyField(ee(this,b)),this.stringifyField(ee(this,j))),N.join(" ")}serialize(){return{second:ee(this,o).serialize(),minute:ee(this,u).serialize(),hour:ee(this,h).serialize(),dayOfMonth:ee(this,f).serialize(),month:ee(this,b).serialize(),dayOfWeek:ee(this,j).serialize()}}},o=new WeakMap,u=new WeakMap,h=new WeakMap,f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakSet,wp=function(_,N,O){const k=N.step;return k?k===1&&N.start===_.min&&N.end&&N.end>=O?_.hasQuestionMarkChar?"?":"*":k!==1&&N.start===_.min&&N.end&&N.end>=O-k+1?`*/${k}`:null:null},Sp=function(_,N){const O=_.step;if(O===1)return`${_.start}-${_.end}`;const k=_.start===0?_.count-1:_.count;if(!O)throw new Error("Unexpected range step");if(!_.end)throw new Error("Unexpected range end");if(O*k>_.end){const Y=(M,V)=>{if(typeof _.start!="number")throw new Error("Unexpected range start");return V%O===0?_.start+V:null};if(typeof _.start!="number")throw new Error("Unexpected range start");const D={length:_.end-_.start+1};return Array.from(D,Y).filter(M=>M!==null).join(",")}return _.end===N-O+1?`${_.start}/${O}`:`${_.start}-${_.end}/${O}`},et(x,y),x);return Ji.CronFieldCollection=r,Ji}var Uf={},cx;function kp(){return cx||(cx=1,(function(n){var h,f,b,j,y,x,w,T,z,Xl,N,Vs,Tp,Cp,Mp,Op,Ff,Rp,Dp,Vr;Object.defineProperty(n,"__esModule",{value:!0}),n.CronExpression=n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const r=ph();n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const o=1e4,R=class R{constructor(C,J){et(this,N);et(this,h);et(this,f);et(this,b);et(this,j);et(this,y);et(this,x);et(this,w,null);et(this,T,!1);Me(this,h,J),Me(this,f,J.tz),Me(this,j,J.startDate?new r.CronDate(J.startDate,ee(this,f)):null),Me(this,y,J.endDate?new r.CronDate(J.endDate,ee(this,f)):null);let ne=J.currentDate??J.startDate;if(ne){const he=new r.CronDate(ne,ee(this,f));ee(this,j)&&he.getTime()<ee(this,j).getTime()?ne=ee(this,j):ee(this,y)&&he.getTime()>ee(this,y).getTime()&&(ne=ee(this,y))}Me(this,b,new r.CronDate(ne,ee(this,f))),Me(this,x,C)}get fields(){return ee(this,x)}static fieldsToExpression(C,J){return new R(C,J||{})}next(){return we(this,N,Vr).call(this)}prev(){return we(this,N,Vr).call(this,!0)}hasNext(){const C=ee(this,b);try{return we(this,N,Vr).call(this),!0}catch{return!1}finally{Me(this,b,C)}}hasPrev(){const C=ee(this,b);try{return we(this,N,Vr).call(this,!0),!0}catch{return!1}finally{Me(this,b,C)}}take(C){const J=[];if(C>=0)for(let ne=0;ne<C;ne++)try{J.push(this.next())}catch{return J}else for(let ne=0;ne>C;ne--)try{J.push(this.prev())}catch{return J}return J}reset(C){Me(this,b,new r.CronDate(C||ee(this,h).currentDate))}stringify(C=!1){return ee(this,x).stringify(C)}includesDate(C){const{second:J,minute:ne,hour:he,month:ve}=ee(this,x),ue=new r.CronDate(C,ee(this,f));return!(!J.values.includes(ue.getSeconds())||!ne.values.includes(ue.getMinutes())||!he.values.includes(ue.getHours())||!ve.values.includes(ue.getMonth()+1)||!we(this,N,Ff).call(this,ue)||ee(this,x).dayOfWeek.nthDay>0&&Math.ceil(ue.getDate()/7)!==ee(this,x).dayOfWeek.nthDay)}toString(){return ee(this,h).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:we(this,N,Vr).call(this),done:!this.hasNext()})}}};h=new WeakMap,f=new WeakMap,b=new WeakMap,j=new WeakMap,y=new WeakMap,x=new WeakMap,w=new WeakMap,T=new WeakMap,z=new WeakSet,Xl=function(C,J){return J.some(ne=>ne===C)},N=new WeakSet,Vs=function(C,J){return C[J?C.length-1:0]},Tp=function(C){const J=`${C.getFullYear()}-${C.getMonth()+1}-${C.getDate()}`;if(ee(this,w)===J)return ee(this,T);const ne=new r.CronDate(C);ne.setStartOfDay();const he=new r.CronDate(C);return he.setEndOfDay(),Me(this,w,J),Me(this,T,ne.getUTCOffset()!==he.getUTCOffset()),ee(this,T)},Cp=function(C,J,ne){const he=ee(this,x).second.values,ve=C.getSeconds(),ue=ee(this,x).second.findNearestValue(ve,ne);if(ue!==null){C.setSeconds(ue);return}C.applyDateOperation(J,r.TimeUnit.Minute,ee(this,x).hour.values.length),C.setSeconds(we(this,N,Vs).call(this,he,ne))},Mp=function(C,J,ne){const he=ee(this,x).minute.values,ve=ee(this,x).second.values,ue=C.getMinutes(),G=ee(this,x).minute.findNearestValue(ue,ne);if(G!==null){C.setMinutes(G),C.setSeconds(we(this,N,Vs).call(this,ve,ne));return}C.applyDateOperation(J,r.TimeUnit.Hour,ee(this,x).hour.values.length),C.setMinutes(we(this,N,Vs).call(this,he,ne)),C.setSeconds(we(this,N,Vs).call(this,ve,ne))},Op=function(C,J){const ne=J.isLastWeekdayOfMonth();return C.some(he=>{const ve=parseInt(he.toString().charAt(0),10)%7;if(Number.isNaN(ve))throw new Error(`Invalid last weekday of the month expression: ${he}`);return J.getDay()===ve&&ne})},Ff=function(C){var le,de,me;const J=ee(this,x).dayOfMonth.isWildcard,ne=!J,he=ee(this,x).dayOfWeek.isWildcard,ve=!he,ue=we(le=R,z,Xl).call(le,C.getDate(),ee(this,x).dayOfMonth.values)||ee(this,x).dayOfMonth.hasLastChar&&C.isLastDayOfMonth(),G=we(de=R,z,Xl).call(de,C.getDay(),ee(this,x).dayOfWeek.values)||ee(this,x).dayOfWeek.hasLastChar&&we(me=R,z,Op).call(me,ee(this,x).dayOfWeek.values,C);return!!(ne&&ve&&(ue||G)||ue&&!ve||J&&!he&&G)},Rp=function(C,J,ne){var ze,H;const he=ee(this,x).hour.values,ve=he,ue=C.getHours(),G=we(ze=R,z,Xl).call(ze,ue,he),le=C.dstStart===ue,de=C.dstEnd===ue;if(le)return we(H=R,z,Xl).call(H,ue-1,he)?!0:(C.invokeDateOperation(J,r.TimeUnit.Hour),!1);if(de&&!ne)return C.dstEnd=null,C.applyDateOperation(r.DateMathOp.Add,r.TimeUnit.Hour,ve.length),!1;if(G)return!0;C.dstStart=null;const me=ee(this,x).hour.findNearestValue(ue,ne);if(me===null)return C.applyDateOperation(J,r.TimeUnit.Day,ve.length),!1;if(we(this,N,Tp).call(this,C)){const se=ne?ue-me:me-ue;for(let ge=0;ge<se;ge++)C.applyDateOperation(J,r.TimeUnit.Hour,ve.length)}else C.setHours(me);return C.setMinutes(we(this,N,Vs).call(this,ee(this,x).minute.values,ne)),C.setSeconds(we(this,N,Vs).call(this,ee(this,x).second.values,ne)),!1},Dp=function(C){if(!ee(this,j)&&!ee(this,y))return;const J=C.getTime();if(ee(this,j)&&J<ee(this,j).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(ee(this,y)&&J>ee(this,y).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Vr=function(C=!1){var ue,G,le;const J=C?r.DateMathOp.Subtract:r.DateMathOp.Add,ne=new r.CronDate(ee(this,b)),he=ne.getTime();let ve=0;for(;++ve<o;){if(we(this,N,Dp).call(this,ne),!we(this,N,Ff).call(this,ne)){ne.applyDateOperation(J,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!(ee(this,x).dayOfWeek.nthDay<=0||Math.ceil(ne.getDate()/7)===ee(this,x).dayOfWeek.nthDay)){ne.applyDateOperation(J,r.TimeUnit.Day,ee(this,x).hour.values.length);continue}if(!we(ue=R,z,Xl).call(ue,ne.getMonth()+1,ee(this,x).month.values)){ne.applyDateOperation(J,r.TimeUnit.Month,ee(this,x).hour.values.length);continue}if(we(this,N,Rp).call(this,ne,J,C)){if(!we(G=R,z,Xl).call(G,ne.getMinutes(),ee(this,x).minute.values)){we(this,N,Mp).call(this,ne,J,C);continue}if(!we(le=R,z,Xl).call(le,ne.getSeconds(),ee(this,x).second.values)){we(this,N,Cp).call(this,ne,J,C);continue}if(he===ne.getTime()){(J==="Add"||ne.getMilliseconds()===0)&&ne.applyDateOperation(J,r.TimeUnit.Second,ee(this,x).hour.values.length);continue}break}}if(ve>o)throw new Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return ne.getMilliseconds()!==0&&ne.setMilliseconds(0),Me(this,b,ne),ne},et(R,z);let u=R;n.CronExpression=u,n.default=u})(Uf)),Uf}var Qo={},ox;function t2(){if(ox)return Qo;ox=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.seededRandom=o;function n(u){let h=2166136261;for(let f=0;f<u.length;f++)h^=u.charCodeAt(f),h=Math.imul(h,16777619);return()=>h>>>0}function r(u){return()=>{let h=u+=1831565813;return h=Math.imul(h^h>>>15,h|1),h^=h+Math.imul(h^h>>>7,h|61),((h^h>>>14)>>>0)/4294967296}}function o(u){const h=u?n(u)():Math.floor(Math.random()*1e10);return r(h)}return Qo}var ux;function Zf(){var x,w,Ap,Bs,_p,zp,Up,Lp,Hp,qp,Vp,Gf,Bp,$p;if(ux)return za;ux=1,Object.defineProperty(za,"__esModule",{value:!0}),za.CronExpressionParser=za.DayOfWeek=za.Months=za.CronUnit=za.PredefinedExpressions=void 0;const n=Ep(),r=kp(),o=t2(),u=vh();var h;(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"})(h||(za.PredefinedExpressions=h={}));var f;(function(W){W.Second="Second",W.Minute="Minute",W.Hour="Hour",W.DayOfMonth="DayOfMonth",W.Month="Month",W.DayOfWeek="DayOfWeek"})(f||(za.CronUnit=f={}));var b;(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"})(b||(za.Months=b={}));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||(za.DayOfWeek=j={}));let y=(w=class{static parse(R,ae={}){var ge,pe,Ee,xe,Ce,Ze,We,kt;const{strict:C=!1,hashSeed:J}=ae,ne=(0,o.seededRandom)(J);R=h[R]||R;const he=we(ge=w,x,Ap).call(ge,R,C);if(!(he.dayOfMonth==="*"||he.dayOfWeek==="*"||!C))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const ve=we(pe=w,x,Bs).call(pe,f.Second,he.second,u.CronSecond.constraints,ne),ue=we(Ee=w,x,Bs).call(Ee,f.Minute,he.minute,u.CronMinute.constraints,ne),G=we(xe=w,x,Bs).call(xe,f.Hour,he.hour,u.CronHour.constraints,ne),le=we(Ce=w,x,Bs).call(Ce,f.Month,he.month,u.CronMonth.constraints,ne),de=we(Ze=w,x,Bs).call(Ze,f.DayOfMonth,he.dayOfMonth,u.CronDayOfMonth.constraints,ne),{dayOfWeek:me,nthDayOfWeek:ze}=we(We=w,x,Bp).call(We,he.dayOfWeek),H=we(kt=w,x,Bs).call(kt,f.DayOfWeek,me,u.CronDayOfWeek.constraints,ne),se=new n.CronFieldCollection({second:new u.CronSecond(ve,{rawValue:he.second}),minute:new u.CronMinute(ue,{rawValue:he.minute}),hour:new u.CronHour(G,{rawValue:he.hour}),dayOfMonth:new u.CronDayOfMonth(de,{rawValue:he.dayOfMonth}),month:new u.CronMonth(le,{rawValue:he.month}),dayOfWeek:new u.CronDayOfWeek(H,{rawValue:he.dayOfWeek,nthDayOfWeek:ze})});return new r.CronExpression(se,{...ae,expression:R})}},x=new WeakSet,Ap=function(R,ae){if(ae&&!R.length)throw new Error("Invalid cron expression");R=R||"0 * * * * *";const C=R.trim().split(/\s+/);if(ae&&C.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(C.length>6)throw new Error("Invalid cron expression, too many fields");const J=["*","*","*","*","*","0"];C.length<J.length&&C.unshift(...J.slice(C.length));const[ne,he,ve,ue,G,le]=C;return{second:ne,minute:he,hour:ve,dayOfMonth:ue,month:G,dayOfWeek:le}},Bs=function(R,ae,C,J){if((R===f.Month||R===f.DayOfWeek)&&(ae=ae.replace(/[a-z]{3}/gi,ne=>{ne=ne.toLowerCase();const he=b[ne]||j[ne];if(he===void 0)throw new Error(`Validation error, cannot resolve alias "${ne}"`);return he.toString()})),!C.validChars.test(ae))throw new Error(`Invalid characters, got value: ${ae}`);return ae=we(this,x,_p).call(this,ae,C),ae=we(this,x,zp).call(this,ae,C,J),we(this,x,Up).call(this,R,ae,C)},_p=function(R,ae){return R.replace(/[*?]/g,ae.min+"-"+ae.max)},zp=function(R,ae,C){const J=C();return R.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(ne,he,ve,ue)=>{if(he&&ve&&ue){const G=parseInt(he,10),le=parseInt(ve,10),de=parseInt(ue,10);if(G>le)throw new Error(`Invalid range: ${G}-${le}, min > max`);if(de<=0)throw new Error(`Invalid step: ${de}, must be positive`);const me=Math.max(G,ae.min),ze=Math.floor(J*de),H=[];for(let se=Math.floor(me/de)*de+ze;se<=le;se+=de)se>=me&&H.push(se);return H.join(",")}else if(he&&ve){const G=parseInt(he,10),le=parseInt(ve,10);if(G>le)throw new Error(`Invalid range: ${G}-${le}, min > max`);return String(Math.floor(J*(le-G+1))+G)}else if(ue){const G=parseInt(ue,10);if(G<=0)throw new Error(`Invalid step: ${G}, must be positive`);const le=Math.floor(J*G),de=[];for(let me=Math.floor(ae.min/G)*G+le;me<=ae.max;me+=G)me>=ae.min&&de.push(me);return de.join(",")}else return String(Math.floor(J*(ae.max-ae.min+1)+ae.min))})},Up=function(R,ae,C){const J=[];function ne(ve,ue){var G;if(Array.isArray(ve))J.push(...ve);else if(we(G=w,x,$p).call(G,ue,ve))J.push(ve);else{const le=parseInt(ve.toString(),10);if(!(le>=ue.min&&le<=ue.max))throw new Error(`Constraint error, got value ${ve} expected range ${ue.min}-${ue.max}`);J.push(R===f.DayOfWeek?le%7:ve)}}return ae.split(",").forEach(ve=>{var ue;if(!(ve.length>0))throw new Error("Invalid list value format");ne(we(ue=w,x,Lp).call(ue,R,ve,C),C)}),J},Lp=function(R,ae,C){var ne,he;const J=ae.split("/");if(J.length>2)throw new Error(`Invalid repeat: ${ae}`);return J.length===2?(isNaN(parseInt(J[0],10))||(J[0]=`${J[0]}-${C.max}`),we(ne=w,x,Gf).call(ne,R,J[0],parseInt(J[1],10),C)):we(he=w,x,Gf).call(he,R,ae,1,C)},Hp=function(R,ae,C){if(!(!isNaN(R)&&!isNaN(ae)&&R>=C.min&&ae<=C.max))throw new Error(`Constraint error, got range ${R}-${ae} expected range ${C.min}-${C.max}`);if(R>ae)throw new Error(`Invalid range: ${R}-${ae}, min(${R}) > max(${ae})`)},qp=function(R){if(!(!isNaN(R)&&R>0))throw new Error(`Constraint error, cannot repeat at every ${R} time.`)},Vp=function(R,ae,C,J){const ne=[];R===f.DayOfWeek&&C%7===0&&ne.push(0);for(let he=ae;he<=C;he+=J)ne.indexOf(he)===-1&&ne.push(he);return ne},Gf=function(R,ae,C,J){const ne=ae.split("-");if(ne.length<=1)return isNaN(+ae)?ae:+ae;const[he,ve]=ne.map(ue=>parseInt(ue,10));return we(this,x,Hp).call(this,he,ve,J),we(this,x,qp).call(this,C),we(this,x,Vp).call(this,R,he,ve,C)},Bp=function(R){const ae=R.split("#");if(ae.length<=1)return{dayOfWeek:ae[0]};const C=+ae[ae.length-1],J=R.match(/([,-/])/);if(J!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${J==null?void 0:J[0]}\` special characters are incompatible`);if(!(ae.length<=2&&!isNaN(C)&&C>=1&&C<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:ae[0],nthDayOfWeek:C}},$p=function(R,ae){return R.chars.some(C=>ae.toString().includes(C))},et(w,x),w);return za.CronExpressionParser=y,za}var pn={};const a2={},n2=Object.freeze(Object.defineProperty({__proto__:null,default:a2},Symbol.toStringTag,{value:"Module"})),dx=by(n2);var fx;function l2(){var f,b,Wf,Yp;if(fx)return pn;fx=1;var n=pn&&pn.__createBinding||(Object.create?(function(x,w,T,z){z===void 0&&(z=T);var _=Object.getOwnPropertyDescriptor(w,T);(!_||("get"in _?!w.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(x,z,_)}):(function(x,w,T,z){z===void 0&&(z=T),x[z]=w[T]})),r=pn&&pn.__setModuleDefault||(Object.create?(function(x,w){Object.defineProperty(x,"default",{enumerable:!0,value:w})}):function(x,w){x.default=w}),o=pn&&pn.__importStar||(function(){var x=function(w){return x=Object.getOwnPropertyNames||function(T){var z=[];for(var _ in T)Object.prototype.hasOwnProperty.call(T,_)&&(z[z.length]=_);return z},x(w)};return function(w){if(w&&w.__esModule)return w;var T={};if(w!=null)for(var z=x(w),_=0;_<z.length;_++)z[_]!=="default"&&n(T,w,z[_]);return r(T,w),T}})();Object.defineProperty(pn,"__esModule",{value:!0}),pn.CronFileParser=void 0;const u=Zf();let h=(b=class{static async parseFile(w){var _;const{readFile:T}=await Promise.resolve().then(()=>o(dx)),z=await T(w,"utf8");return we(_=b,f,Wf).call(_,z)}static parseFileSync(w){var _;const{readFileSync:T}=dx,z=T(w,"utf8");return we(_=b,f,Wf).call(_,z)}},f=new WeakSet,Wf=function(w){var _;const T=w.split(`
441
- `),z={variables:{},expressions:[],errors:{}};for(const N of T){const O=N.trim();if(O.length===0||O.startsWith("#"))continue;const k=O.match(/^(.*)=(.*)$/);if(k){const[,Y,D]=k;z.variables[Y]=D.replace(/["']/g,"");continue}try{const Y=we(_=b,f,Yp).call(_,O);z.expressions.push(Y.interval)}catch(Y){z.errors[O]=Y}}return z},Yp=function(w){const T=w.split(" ");return{interval:u.CronExpressionParser.parse(T.slice(0,5).join(" ")),command:T.slice(5,T.length)}},et(b,f),b);return pn.CronFileParser=h,pn}var hx;function s2(){return hx||(hx=1,(function(n){var r=Us&&Us.__createBinding||(Object.create?(function(x,w,T,z){z===void 0&&(z=T);var _=Object.getOwnPropertyDescriptor(w,T);(!_||("get"in _?!w.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return w[T]}}),Object.defineProperty(x,z,_)}):(function(x,w,T,z){z===void 0&&(z=T),x[z]=w[T]})),o=Us&&Us.__exportStar||function(x,w){for(var T in x)T!=="default"&&!Object.prototype.hasOwnProperty.call(w,T)&&r(w,x,T)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;const u=Zf();var h=ph();Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return h.CronDate}});var f=Ep();Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return f.CronFieldCollection}});var b=kp();Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return b.CronExpression}});var j=Zf();Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return j.CronExpressionParser}});var y=l2();Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return y.CronFileParser}}),o(vh(),n),n.default=u.CronExpressionParser})(Us)),Us}var r2=s2();const Pp=6048e5,i2=864e5,c2=6e4,o2=36e5,mx=Symbol.for("constructDateFrom");function La(n,r){return typeof n=="function"?n(r):n&&typeof n=="object"&&mx in n?n[mx](r):n instanceof Date?new n.constructor(r):new Date(r)}function Dt(n,r){return La(r||n,n)}function u2(n,r,o){return La(n,+Dt(n)+r)}function Xo(n,r,o){return u2(n,r*o2)}let d2={};function vu(){return d2}function mc(n,r){var j,y,x,w;const o=vu(),u=(r==null?void 0:r.weekStartsOn)??((y=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:y.weekStartsOn)??o.weekStartsOn??((w=(x=o.locale)==null?void 0:x.options)==null?void 0:w.weekStartsOn)??0,h=Dt(n,r==null?void 0:r.in),f=h.getDay(),b=(f<u?7:0)+f-u;return h.setDate(h.getDate()-b),h.setHours(0,0,0,0),h}function uu(n,r){return mc(n,{...r,weekStartsOn:1})}function Fp(n,r){const o=Dt(n,r==null?void 0:r.in),u=o.getFullYear(),h=La(o,0);h.setFullYear(u+1,0,4),h.setHours(0,0,0,0);const f=uu(h),b=La(o,0);b.setFullYear(u,0,4),b.setHours(0,0,0,0);const j=uu(b);return o.getTime()>=f.getTime()?u+1:o.getTime()>=j.getTime()?u:u-1}function gx(n){const r=Dt(n),o=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return o.setUTCFullYear(r.getFullYear()),+n-+o}function f2(n,...r){const o=La.bind(null,r.find(u=>typeof u=="object"));return r.map(o)}function xx(n,r){const o=Dt(n,r==null?void 0:r.in);return o.setHours(0,0,0,0),o}function h2(n,r,o){const[u,h]=f2(o==null?void 0:o.in,n,r),f=xx(u),b=xx(h),j=+f-gx(f),y=+b-gx(b);return Math.round((j-y)/i2)}function m2(n,r){const o=Fp(n,r),u=La(n,0);return u.setFullYear(o,0,4),u.setHours(0,0,0,0),uu(u)}function g2(n,r){let o,u=r==null?void 0:r.in;return n.forEach(h=>{!u&&typeof h=="object"&&(u=La.bind(null,h));const f=Dt(h,u);(!o||o<f||isNaN(+f))&&(o=f)}),La(u,o||NaN)}function x2(n,r){let o,u=r==null?void 0:r.in;return n.forEach(h=>{!u&&typeof h=="object"&&(u=La.bind(null,h));const f=Dt(h,u);(!o||o>f||isNaN(+f))&&(o=f)}),La(u,o||NaN)}function p2(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function v2(n){return!(!p2(n)&&typeof n!="number"||isNaN(+Dt(n)))}function y2(n){return r=>{const u=(n?Math[n]:Math.trunc)(r);return u===0?0:u}}function b2(n,r){return+Dt(n)-+Dt(r)}function px(n,r,o){const u=b2(n,r)/c2;return y2(o==null?void 0:o.roundingMethod)(u)}function j2(n,r){const o=Dt(n,r==null?void 0:r.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}const N2={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"}},w2=(n,r,o)=>{let u;const h=N2[n];return typeof h=="string"?u=h:r===1?u=h.one:u=h.other.replace("{{count}}",r.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+u:u+" ago":u};function Lf(n){return(r={})=>{const o=r.width?String(r.width):n.defaultWidth;return n.formats[o]||n.formats[n.defaultWidth]}}const S2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},E2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},T2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},C2={date:Lf({formats:S2,defaultWidth:"full"}),time:Lf({formats:E2,defaultWidth:"full"}),dateTime:Lf({formats:T2,defaultWidth:"full"})},M2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},O2=(n,r,o,u)=>M2[n];function rc(n){return(r,o)=>{const u=o!=null&&o.context?String(o.context):"standalone";let h;if(u==="formatting"&&n.formattingValues){const b=n.defaultFormattingWidth||n.defaultWidth,j=o!=null&&o.width?String(o.width):b;h=n.formattingValues[j]||n.formattingValues[b]}else{const b=n.defaultWidth,j=o!=null&&o.width?String(o.width):n.defaultWidth;h=n.values[j]||n.values[b]}const f=n.argumentCallback?n.argumentCallback(r):r;return h[f]}}const R2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},D2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},k2={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"]},A2={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"]},_2={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"}},z2={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"}},U2=(n,r)=>{const o=Number(n),u=o%100;if(u>20||u<10)switch(u%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},L2={ordinalNumber:U2,era:rc({values:R2,defaultWidth:"wide"}),quarter:rc({values:D2,defaultWidth:"wide",argumentCallback:n=>n-1}),month:rc({values:k2,defaultWidth:"wide"}),day:rc({values:A2,defaultWidth:"wide"}),dayPeriod:rc({values:_2,defaultWidth:"wide",formattingValues:z2,defaultFormattingWidth:"wide"})};function ic(n){return(r,o={})=>{const u=o.width,h=u&&n.matchPatterns[u]||n.matchPatterns[n.defaultMatchWidth],f=r.match(h);if(!f)return null;const b=f[0],j=u&&n.parsePatterns[u]||n.parsePatterns[n.defaultParseWidth],y=Array.isArray(j)?q2(j,T=>T.test(b)):H2(j,T=>T.test(b));let x;x=n.valueCallback?n.valueCallback(y):y,x=o.valueCallback?o.valueCallback(x):x;const w=r.slice(b.length);return{value:x,rest:w}}}function H2(n,r){for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&r(n[o]))return o}function q2(n,r){for(let o=0;o<n.length;o++)if(r(n[o]))return o}function V2(n){return(r,o={})=>{const u=r.match(n.matchPattern);if(!u)return null;const h=u[0],f=r.match(n.parsePattern);if(!f)return null;let b=n.valueCallback?n.valueCallback(f[0]):f[0];b=o.valueCallback?o.valueCallback(b):b;const j=r.slice(h.length);return{value:b,rest:j}}}const B2=/^(\d+)(th|st|nd|rd)?/i,$2=/\d+/i,Y2={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},P2={any:[/^b/i,/^(a|c)/i]},F2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},G2={any:[/1/i,/2/i,/3/i,/4/i]},Z2={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},W2={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]},I2={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},Q2={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]},X2={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},J2={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}},K2={ordinalNumber:V2({matchPattern:B2,parsePattern:$2,valueCallback:n=>parseInt(n,10)}),era:ic({matchPatterns:Y2,defaultMatchWidth:"wide",parsePatterns:P2,defaultParseWidth:"any"}),quarter:ic({matchPatterns:F2,defaultMatchWidth:"wide",parsePatterns:G2,defaultParseWidth:"any",valueCallback:n=>n+1}),month:ic({matchPatterns:Z2,defaultMatchWidth:"wide",parsePatterns:W2,defaultParseWidth:"any"}),day:ic({matchPatterns:I2,defaultMatchWidth:"wide",parsePatterns:Q2,defaultParseWidth:"any"}),dayPeriod:ic({matchPatterns:X2,defaultMatchWidth:"any",parsePatterns:J2,defaultParseWidth:"any"})},ew={code:"en-US",formatDistance:w2,formatLong:C2,formatRelative:O2,localize:L2,match:K2,options:{weekStartsOn:0,firstWeekContainsDate:1}};function tw(n,r){const o=Dt(n,r==null?void 0:r.in);return h2(o,j2(o))+1}function aw(n,r){const o=Dt(n,r==null?void 0:r.in),u=+uu(o)-+m2(o);return Math.round(u/Pp)+1}function Gp(n,r){var w,T,z,_;const o=Dt(n,r==null?void 0:r.in),u=o.getFullYear(),h=vu(),f=(r==null?void 0:r.firstWeekContainsDate)??((T=(w=r==null?void 0:r.locale)==null?void 0:w.options)==null?void 0:T.firstWeekContainsDate)??h.firstWeekContainsDate??((_=(z=h.locale)==null?void 0:z.options)==null?void 0:_.firstWeekContainsDate)??1,b=La((r==null?void 0:r.in)||n,0);b.setFullYear(u+1,0,f),b.setHours(0,0,0,0);const j=mc(b,r),y=La((r==null?void 0:r.in)||n,0);y.setFullYear(u,0,f),y.setHours(0,0,0,0);const x=mc(y,r);return+o>=+j?u+1:+o>=+x?u:u-1}function nw(n,r){var j,y,x,w;const o=vu(),u=(r==null?void 0:r.firstWeekContainsDate)??((y=(j=r==null?void 0:r.locale)==null?void 0:j.options)==null?void 0:y.firstWeekContainsDate)??o.firstWeekContainsDate??((w=(x=o.locale)==null?void 0:x.options)==null?void 0:w.firstWeekContainsDate)??1,h=Gp(n,r),f=La((r==null?void 0:r.in)||n,0);return f.setFullYear(h,0,u),f.setHours(0,0,0,0),mc(f,r)}function lw(n,r){const o=Dt(n,r==null?void 0:r.in),u=+mc(o,r)-+nw(o,r);return Math.round(u/Pp)+1}function it(n,r){const o=n<0?"-":"",u=Math.abs(n).toString().padStart(r,"0");return o+u}const Gl={y(n,r){const o=n.getFullYear(),u=o>0?o:1-o;return it(r==="yy"?u%100:u,r.length)},M(n,r){const o=n.getMonth();return r==="M"?String(o+1):it(o+1,2)},d(n,r){return it(n.getDate(),r.length)},a(n,r){const o=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(n,r){return it(n.getHours()%12||12,r.length)},H(n,r){return it(n.getHours(),r.length)},m(n,r){return it(n.getMinutes(),r.length)},s(n,r){return it(n.getSeconds(),r.length)},S(n,r){const o=r.length,u=n.getMilliseconds(),h=Math.trunc(u*Math.pow(10,o-3));return it(h,r.length)}},qr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vx={G:function(n,r,o){const u=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return o.era(u,{width:"abbreviated"});case"GGGGG":return o.era(u,{width:"narrow"});case"GGGG":default:return o.era(u,{width:"wide"})}},y:function(n,r,o){if(r==="yo"){const u=n.getFullYear(),h=u>0?u:1-u;return o.ordinalNumber(h,{unit:"year"})}return Gl.y(n,r)},Y:function(n,r,o,u){const h=Gp(n,u),f=h>0?h:1-h;if(r==="YY"){const b=f%100;return it(b,2)}return r==="Yo"?o.ordinalNumber(f,{unit:"year"}):it(f,r.length)},R:function(n,r){const o=Fp(n);return it(o,r.length)},u:function(n,r){const o=n.getFullYear();return it(o,r.length)},Q:function(n,r,o){const u=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(u);case"QQ":return it(u,2);case"Qo":return o.ordinalNumber(u,{unit:"quarter"});case"QQQ":return o.quarter(u,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(u,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(u,{width:"wide",context:"formatting"})}},q:function(n,r,o){const u=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(u);case"qq":return it(u,2);case"qo":return o.ordinalNumber(u,{unit:"quarter"});case"qqq":return o.quarter(u,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(u,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(u,{width:"wide",context:"standalone"})}},M:function(n,r,o){const u=n.getMonth();switch(r){case"M":case"MM":return Gl.M(n,r);case"Mo":return o.ordinalNumber(u+1,{unit:"month"});case"MMM":return o.month(u,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(u,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(u,{width:"wide",context:"formatting"})}},L:function(n,r,o){const u=n.getMonth();switch(r){case"L":return String(u+1);case"LL":return it(u+1,2);case"Lo":return o.ordinalNumber(u+1,{unit:"month"});case"LLL":return o.month(u,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(u,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(u,{width:"wide",context:"standalone"})}},w:function(n,r,o,u){const h=lw(n,u);return r==="wo"?o.ordinalNumber(h,{unit:"week"}):it(h,r.length)},I:function(n,r,o){const u=aw(n);return r==="Io"?o.ordinalNumber(u,{unit:"week"}):it(u,r.length)},d:function(n,r,o){return r==="do"?o.ordinalNumber(n.getDate(),{unit:"date"}):Gl.d(n,r)},D:function(n,r,o){const u=tw(n);return r==="Do"?o.ordinalNumber(u,{unit:"dayOfYear"}):it(u,r.length)},E:function(n,r,o){const u=n.getDay();switch(r){case"E":case"EE":case"EEE":return o.day(u,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(u,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(u,{width:"short",context:"formatting"});case"EEEE":default:return o.day(u,{width:"wide",context:"formatting"})}},e:function(n,r,o,u){const h=n.getDay(),f=(h-u.weekStartsOn+8)%7||7;switch(r){case"e":return String(f);case"ee":return it(f,2);case"eo":return o.ordinalNumber(f,{unit:"day"});case"eee":return o.day(h,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(h,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(h,{width:"short",context:"formatting"});case"eeee":default:return o.day(h,{width:"wide",context:"formatting"})}},c:function(n,r,o,u){const h=n.getDay(),f=(h-u.weekStartsOn+8)%7||7;switch(r){case"c":return String(f);case"cc":return it(f,r.length);case"co":return o.ordinalNumber(f,{unit:"day"});case"ccc":return o.day(h,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(h,{width:"narrow",context:"standalone"});case"cccccc":return o.day(h,{width:"short",context:"standalone"});case"cccc":default:return o.day(h,{width:"wide",context:"standalone"})}},i:function(n,r,o){const u=n.getDay(),h=u===0?7:u;switch(r){case"i":return String(h);case"ii":return it(h,r.length);case"io":return o.ordinalNumber(h,{unit:"day"});case"iii":return o.day(u,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(u,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(u,{width:"short",context:"formatting"});case"iiii":default:return o.day(u,{width:"wide",context:"formatting"})}},a:function(n,r,o){const h=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(h,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(h,{width:"wide",context:"formatting"})}},b:function(n,r,o){const u=n.getHours();let h;switch(u===12?h=qr.noon:u===0?h=qr.midnight:h=u/12>=1?"pm":"am",r){case"b":case"bb":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(h,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(h,{width:"wide",context:"formatting"})}},B:function(n,r,o){const u=n.getHours();let h;switch(u>=17?h=qr.evening:u>=12?h=qr.afternoon:u>=4?h=qr.morning:h=qr.night,r){case"B":case"BB":case"BBB":return o.dayPeriod(h,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(h,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(h,{width:"wide",context:"formatting"})}},h:function(n,r,o){if(r==="ho"){let u=n.getHours()%12;return u===0&&(u=12),o.ordinalNumber(u,{unit:"hour"})}return Gl.h(n,r)},H:function(n,r,o){return r==="Ho"?o.ordinalNumber(n.getHours(),{unit:"hour"}):Gl.H(n,r)},K:function(n,r,o){const u=n.getHours()%12;return r==="Ko"?o.ordinalNumber(u,{unit:"hour"}):it(u,r.length)},k:function(n,r,o){let u=n.getHours();return u===0&&(u=24),r==="ko"?o.ordinalNumber(u,{unit:"hour"}):it(u,r.length)},m:function(n,r,o){return r==="mo"?o.ordinalNumber(n.getMinutes(),{unit:"minute"}):Gl.m(n,r)},s:function(n,r,o){return r==="so"?o.ordinalNumber(n.getSeconds(),{unit:"second"}):Gl.s(n,r)},S:function(n,r){return Gl.S(n,r)},X:function(n,r,o){const u=n.getTimezoneOffset();if(u===0)return"Z";switch(r){case"X":return bx(u);case"XXXX":case"XX":return $s(u);case"XXXXX":case"XXX":default:return $s(u,":")}},x:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"x":return bx(u);case"xxxx":case"xx":return $s(u);case"xxxxx":case"xxx":default:return $s(u,":")}},O:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+yx(u,":");case"OOOO":default:return"GMT"+$s(u,":")}},z:function(n,r,o){const u=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+yx(u,":");case"zzzz":default:return"GMT"+$s(u,":")}},t:function(n,r,o){const u=Math.trunc(+n/1e3);return it(u,r.length)},T:function(n,r,o){return it(+n,r.length)}};function yx(n,r=""){const o=n>0?"-":"+",u=Math.abs(n),h=Math.trunc(u/60),f=u%60;return f===0?o+String(h):o+String(h)+r+it(f,2)}function bx(n,r){return n%60===0?(n>0?"-":"+")+it(Math.abs(n)/60,2):$s(n,r)}function $s(n,r=""){const o=n>0?"-":"+",u=Math.abs(n),h=it(Math.trunc(u/60),2),f=it(u%60,2);return o+h+r+f}const jx=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},Zp=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},sw=(n,r)=>{const o=n.match(/(P+)(p+)?/)||[],u=o[1],h=o[2];if(!h)return jx(n,r);let f;switch(u){case"P":f=r.dateTime({width:"short"});break;case"PP":f=r.dateTime({width:"medium"});break;case"PPP":f=r.dateTime({width:"long"});break;case"PPPP":default:f=r.dateTime({width:"full"});break}return f.replace("{{date}}",jx(u,r)).replace("{{time}}",Zp(h,r))},rw={p:Zp,P:sw},iw=/^D+$/,cw=/^Y+$/,ow=["D","DD","YY","YYYY"];function uw(n){return iw.test(n)}function dw(n){return cw.test(n)}function fw(n,r,o){const u=hw(n,r,o);if(console.warn(u),ow.includes(n))throw new RangeError(u)}function hw(n,r,o){const u=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${r}\`) for formatting ${u} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xw=/^'([^]*?)'?$/,pw=/''/g,vw=/[a-zA-Z]/;function Hs(n,r,o){var w,T,z,_;const u=vu(),h=u.locale??ew,f=u.firstWeekContainsDate??((T=(w=u.locale)==null?void 0:w.options)==null?void 0:T.firstWeekContainsDate)??1,b=u.weekStartsOn??((_=(z=u.locale)==null?void 0:z.options)==null?void 0:_.weekStartsOn)??0,j=Dt(n,o==null?void 0:o.in);if(!v2(j))throw new RangeError("Invalid time value");let y=r.match(gw).map(N=>{const O=N[0];if(O==="p"||O==="P"){const k=rw[O];return k(N,h.formatLong)}return N}).join("").match(mw).map(N=>{if(N==="''")return{isToken:!1,value:"'"};const O=N[0];if(O==="'")return{isToken:!1,value:yw(N)};if(vx[O])return{isToken:!0,value:N};if(O.match(vw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+O+"`");return{isToken:!1,value:N}});h.localize.preprocessor&&(y=h.localize.preprocessor(j,y));const x={firstWeekContainsDate:f,weekStartsOn:b,locale:h};return y.map(N=>{if(!N.isToken)return N.value;const O=N.value;(dw(O)||uw(O))&&fw(O,r,String(n));const k=vx[O[0]];return k(j,O,h.localize,x)}).join("")}function yw(n){const r=n.match(xw);return r?r[1].replace(pw,"'"):n}function bw(n,r){return+Dt(n)>+Dt(r)}function jw(n,r){return+Dt(n)<+Dt(r)}function Nw(n,r){const o=Dt(n,r==null?void 0:r.in);return o.setMinutes(0,0,0),o}const Hf=up,Jo=[{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"}],ll=160,Ko=14,ww=10,Sw=7,Nx=4,Ew=({configs:n,currentProjectId:r,onEditJob:o,queueStatus:u,queueAnalytics:h})=>{const f=L.useMemo(()=>Nw(new Date),[]),b=L.useMemo(()=>Xo(f,24),[f]),j=L.useMemo(()=>Xo(f,-24),[f]),y=b,x=L.useMemo(()=>{const V=[];for(let K=0;K<=24;K++)V.push(Xo(f,K));return V},[f]),w=L.useMemo(()=>{const V=[];return n.forEach(({projectId:K,config:$})=>{var ae,C,J,ne,he;const W={executor:$.executorEnabled!==!1?$.cronSchedule:null,reviewer:$.reviewerEnabled?$.reviewerSchedule:null,qa:$.qa.enabled?$.qa.schedule:null,audit:$.audit.enabled?$.audit.schedule:null,slicer:$.roadmapScanner.enabled?$.roadmapScanner.slicerSchedule:null,analytics:(ae=$.analytics)!=null&&ae.enabled?(C=$.analytics)==null?void 0:C.schedule:null,"pr-resolver":(J=$.prResolver)!=null&&J.enabled?$.prResolver.schedule:null,merger:(ne=$.merger)!=null&&ne.enabled?(he=$.merger)==null?void 0:he.schedule:null},R=$.cronScheduleOffset||0;Object.entries(W).forEach(([ve,ue])=>{if(ue)try{const G=r2.CronExpressionParser.parse(ue,{currentDate:f,endDate:b});for(;G.hasNext();){const le=G.next(),de=new Date(le.getTime());de.setMinutes(de.getMinutes()+R),bw(de,f)&&jw(de,b)&&V.push({projectId:K,jobType:ve,time:de})}}catch(G){console.error(`Failed to parse cron "${ue}" for ${K}/${ve}`,G)}})}),V},[n,f,b]),T=L.useMemo(()=>{const V=new Set;return n.length===0||(n.every(K=>K.config.executorEnabled===!1)&&V.add("executor"),n.every(K=>!K.config.reviewerEnabled)&&V.add("reviewer"),n.every(K=>!K.config.qa.enabled)&&V.add("qa"),n.every(K=>!K.config.audit.enabled)&&V.add("audit"),n.every(K=>!K.config.roadmapScanner.enabled)&&V.add("slicer"),n.every(K=>{var $;return!(($=K.config.analytics)!=null&&$.enabled)})&&V.add("analytics"),n.every(K=>{var $;return!(($=K.config.prResolver)!=null&&$.enabled)})&&V.add("pr-resolver"),n.every(K=>{var $;return!(($=K.config.merger)!=null&&$.enabled)})&&V.add("merger")),V},[n]),z=L.useMemo(()=>{const V=new Map;let K=0;return n.forEach($=>{$.projectId===r||(V.set($.projectId,K%Jo.length),K++)}),V},[n,r]),_=V=>px(V,f),N=L.useMemo(()=>{const V=[];for(let K=0;K<=24;K++)V.push(Xo(j,K));return V},[j]),O=V=>{const K=x2([g2([V,j]),y]);return px(K,j)},k=L.useMemo(()=>{const V=(h==null?void 0:h.recentRuns)??[],K=new Map;for(const $ of V){const W=$.providerKey||"default",R=new Date($.startedAt*1e3),ae=$.finishedAt?new Date($.finishedAt*1e3):new Date;ae<j||R>y||(K.has(W)||K.set(W,[]),K.get(W).push({id:$.id,jobType:$.jobType,status:$.status,projectPath:$.projectPath,startedAt:R,finishedAt:ae,throttledCount:$.throttledCount}))}if(u!=null&&u.running){const $=u.running.providerKey??"default";K.has($)||K.set($,[]),K.get($).push({id:u.running.id,jobType:u.running.jobType,status:"running",projectPath:u.running.projectPath,startedAt:new Date((u.running.dispatchedAt??u.running.enqueuedAt)*1e3),finishedAt:new Date,throttledCount:0})}return Array.from(K.entries()).sort(([$],[W])=>$.localeCompare(W)).map(([$,W])=>({providerKey:$,runs:W.sort((R,ae)=>R.startedAt.getTime()-ae.startedAt.getTime())}))},[y,j,h,u]),Y=V=>V.split(/[-_]/).map(K=>K.charAt(0).toUpperCase()+K.slice(1)).join(" "),D=n.length>1,M=s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:x.map((V,K)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},K))});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."})]}),D&&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"})]}),n.filter(V=>V.projectId!==r).slice(0,5).map(V=>{const K=z.get(V.projectId)??0,$=Jo[K],W=(V.projectId.split("/").pop()??V.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 ${$.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] text-slate-500",title:V.projectId,children:W})]},V.projectId)})]})]}),s.jsx("div",{className:"overflow-x-auto custom-scrollbar",children:s.jsxs("div",{className:"relative min-w-[1600px]",style:{width:1440+ll},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:ll},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative",children:x.map((V,K)=>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:K*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Hs(V,"HH:mm")})},K))})]}),s.jsxs("div",{className:"relative",children:[n.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."})}),Hf.map(V=>{const K=T.has(V.id),$=w.filter(R=>R.jobType===V.id);if(!D)return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${K?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:ll},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 ${V.color.bg} shrink-0`}),s.jsx("span",{className:"text-xs font-semibold text-slate-300",children:V.label})]}),s.jsxs("div",{className:"flex-1 relative h-10",children:[M,$.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:K?"Disabled":"No runs in this window"})}):$.map((R,ae)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(R.projectId,R.jobType),style:{left:_(R.time)-3},className:`absolute top-1/2 -translate-y-1/2 h-4 w-6 rounded border ${V.color.bg} ${V.color.border} opacity-90 hover:opacity-100 hover:scale-110 transition-all cursor-pointer shadow-lg group`,title:`${V.label} at ${Hs(R.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:Hs(R.time,"HH:mm")})},ae))]})]},V.id);const W=n.length*Ko+Nx*2;return s.jsxs("div",{className:`flex border-b border-slate-800/30 ${K?"opacity-40":""}`,children:[s.jsxs("div",{style:{width:ll,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 ${V.color.bg} shrink-0`}),s.jsx("span",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wide",children:V.label})]}),n.map(R=>{const ae=R.projectId===r,C=(R.projectId.split("/").pop()??R.projectId).slice(0,14),J=z.get(R.projectId)??0,ne=ae?V.color.bg:Jo[J].bg;return s.jsxs("div",{style:{height:Ko},className:"flex items-center gap-1 overflow-hidden",children:[s.jsx("div",{className:`w-1 h-1 rounded-full shrink-0 ${ne}`}),s.jsx("span",{className:`text-[9px] truncate ${ae?"text-slate-200 font-semibold":"text-slate-600"}`,title:R.projectId,children:ae?`${C} ★`:C})]},R.projectId)})]}),s.jsxs("div",{className:"flex-1 relative",style:{height:W},children:[M,n.map((R,ae)=>{const C=R.projectId===r,J=$.filter(le=>le.projectId===R.projectId),ne=Nx+ae*Ko,he=C?ww:Sw,ve=Math.floor((Ko-he)/2),ue=z.get(R.projectId)??0,G=C?{bg:V.color.bg,border:V.color.border}:Jo[ue];return s.jsxs(_e.Fragment,{children:[ae>0&&s.jsx("div",{className:"absolute left-0 right-0 border-t border-slate-800/20 pointer-events-none",style:{top:ne}}),J.map((le,de)=>s.jsx("button",{type:"button",onClick:()=>o==null?void 0:o(R.projectId,le.jobType),style:{left:_(le.time)-3,top:ne+ve,height:he},className:`absolute w-6 rounded border ${G.bg} ${G.border} ${C?"opacity-90":"opacity-50"} hover:opacity-100 hover:z-10 transition-all cursor-pointer group`,title:`${R.projectId} · ${V.label} @ ${Hs(le.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:Hs(le.time,"HH:mm")})},de))]},R.projectId)}),$.length===0&&!K&&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"})})]})]},V.id)})]}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:ll+_(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"})]}),D&&s.jsx("div",{className:"flex items-center gap-1.5",children:s.jsx("span",{children:"★ = current project  ·  blocks in same column = scheduling overlap"})})]}),k.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:[(h==null?void 0:h.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+ll},children:[s.jsxs("div",{className:"h-8 border-b border-slate-800 flex",children:[s.jsx("div",{style:{width:ll},className:"shrink-0 border-r border-slate-800"}),s.jsx("div",{className:"flex-1 relative flex",children:N.map((V,K)=>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:K*60},children:s.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:Hs(V,"HH:mm")})},K))})]}),s.jsx("div",{className:"relative",children:k.map(({providerKey:V,runs:K})=>s.jsxs("div",{className:"flex border-b border-slate-800/30 min-h-14","data-testid":`provider-execution-lane-${V}`,children:[s.jsxs("div",{style:{width:ll},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:V,children:Y(V)}),s.jsx("span",{className:"text-[10px] text-slate-500 font-mono truncate",children:V})]}),s.jsxs("div",{className:"flex-1 relative h-14",children:[s.jsx("div",{className:"absolute inset-0 flex pointer-events-none",children:N.map(($,W)=>s.jsx("div",{className:"h-full border-l border-slate-800/20",style:{width:60}},W))}),K.map($=>{const W=Hf.find(ue=>ue.id===$.jobType)??Hf[0],R=O($.startedAt),ae=O($.finishedAt),C=Math.max(ae-R,8),J=$.status==="running",ne=$.status==="error"||$.status==="failed"||$.status==="errored",he=J?"bg-green-500":ne?"bg-red-500":W.color.bg,ve=J?"border-green-400/60":ne?"border-red-400/60":W.color.border;return s.jsx("div",{className:`absolute top-1/2 -translate-y-1/2 h-8 rounded border ${he} ${ve} opacity-85 shadow-lg ${J?"animate-pulse":""}`,style:{left:R,width:C},title:`${V} • ${W.label} • ${Hs($.startedAt,"MMM d HH:mm")} • ${$.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:$.status}),$.throttledCount>0&&s.jsxs("span",{className:"text-yellow-100",children:["throttle ",$.throttledCount,"x"]})]})},`${V}-${$.id}-${$.startedAt.getTime()}`)})]})]},V))}),s.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-rose-500/50 z-10 pointer-events-none",style:{left:ll+O(new Date)},children:s.jsx("div",{className:"absolute top-0 h-2 w-2 rounded-full bg-rose-500 -translate-x-1/2"})})]})})]})]})},du=[{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"}],yh=[{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 * * *",prResolver:"15 9,15,21 * * *",merger:"55 */4 * * *"},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",prResolver:"9:15am, 3:15pm, 9:15pm",merger:"Every 4h at :55"}},{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 * * *",prResolver:"15 6,14,22 * * *",merger:"55 */4 * * *"},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",prResolver:"6:15am, 2:15pm & 10:15pm",merger:"Every 4h at :55"}},{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",prResolver:"15 8,12,16 * * 1-5",merger:"55 */4 * * 1-5"},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",prResolver:"8:15am, 12:15pm & 4:15pm weekdays",merger:"Every 4h at :55 weekdays"}},{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",prResolver:"15 8 * * 1,4",merger:"55 */8 * * *"},hints:{executor:"2:05am & 2:05pm",reviewer:"8:25am & 8:25pm",qa:"Sun 3:45am",audit:"Sun 4:50am",slicer:"Mon 1:35am",prResolver:"Mon & Thu at 8:15am",merger:"Every 8h at :55"}}];function Br(n){return n?n.trim().replace(/\s+/g," "):""}function qs(n,r){return Br(n)===Br(r)}function If(n){if(n)return yh.find(r=>r.id===n)}function Wp(n,r,o,u,h,f,b,j){return qs(n.schedules.executor,r)&&qs(n.schedules.reviewer,o)&&qs(n.schedules.qa,u)&&qs(n.schedules.audit,h)&&qs(n.schedules.slicer,f)&&qs(n.schedules.prResolver,b)&&qs(n.schedules.merger,j)}function Tw(n,r,o,u,h,f,b){return yh.find(j=>Wp(j,n,r,o,u,h,f,b))}function Cw(n,r,o,u,h,f,b,j){const y=If(n);return y&&Wp(y,r,o,u,h,f,b,j)?y:Tw(r,o,u,h,f,b,j)}function oa(n){const r=Br(n),o=r.split(/\s+/);if(o.length!==5)return r;const[u,h,f,b,j]=o,y=/^\d+$/.test(u),x=du.find(w=>Br(w.value)===r);if(x)return x.label;if(u==="*/30"&&h==="*")return"Every 30 minutes";if(u==="0"&&h==="*")return"Every hour";if(u.startsWith("*/"))return`Every ${parseInt(u.replace("*/",""),10)} minutes`;if(y&&h.startsWith("*/")&&f==="*"&&b==="*"&&j==="*"){const w=parseInt(h.replace("*/",""),10);return u==="0"?`Every ${w} hours`:`Every ${w} hours at :${u.padStart(2,"0")}`}if(u==="0"&&h.startsWith("*/"))return`Every ${parseInt(h.replace("*/",""),10)} hours`;if(u==="0"&&h.includes("-")){const[w,T]=h.split("-");return`Every hour from ${cc(w)} to ${cc(T)}`}if(y&&h.includes("-")&&f==="*"&&b==="*"&&j==="*"){const[w,T]=h.split("-");return`Every hour from ${oc(w,u)} to ${oc(T,u)}`}if(u==="0"&&h.includes(",")){const w=h.split(",").map(cc);return w.length<=3?`At ${w.join(" and ")}`:`At ${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}if(y&&h.includes(",")&&f==="*"&&b==="*"&&(j==="*"||j==="1-5")){const w=h.split(",").map(z=>oc(z,u)),T=j==="1-5"?"Weekdays at ":"At ";return w.length<=3?`${T}${w.join(" and ")}`:`${T}${w.slice(0,-1).join(", ")}, and ${w[w.length-1]}`}return u==="0"&&h!=="*"&&f==="*"&&b==="*"&&j==="*"?`Daily at ${cc(h)}`:y&&h!=="*"&&f==="*"&&b==="*"&&j==="*"?`Daily at ${oc(h,u)}`:u==="0"&&h!=="*"&&f==="*"&&b==="*"&&j==="1-5"?`Weekdays at ${cc(h)}`:y&&h!=="*"&&f==="*"&&b==="*"&&j==="1-5"?`Weekdays at ${oc(h,u)}`:r}function cc(n){const r=parseInt(n,10);return r===0?"12 AM":r<12?`${r} AM`:r===12?"12 PM":`${r-12} PM`}function oc(n,r){const o=r.padStart(2,"0"),u=parseInt(n,10);return Number.isNaN(u)?`${n}:${o}`:u===0?`12:${o} AM`:u<12?`${u}:${o} AM`:u===12?`12:${o} PM`:`${u-12}:${o} PM`}function Mw(n){const r=Br(n),o=du.find(u=>Br(u.value)===r);return(o==null?void 0:o.value)??"__custom__"}function wx(n){const r=new Date,o=n.getTime()-r.getTime(),u=Math.floor(o/6e4),h=Math.floor(u/60),f=Math.floor(h/24);return u<1?"less than a minute":u<60?`in ${u} minute${u>1?"s":""}`:h<24?`in ${h} hour${h>1?"s":""}`:`in ${f} day${f>1?"s":""}`}const Ow=({label:n,value:r,onChange:o,helperText:u,placeholder:h="5 */3 * * *"})=>{const f=Mw(r),b=f==="__custom__",j=w=>{w!=="__custom__"&&o(w)},y=w=>{o(w.target.value)},x=du.find(w=>w.value===f);return s.jsxs("div",{className:"space-y-3",children:[s.jsx(ct,{label:n,value:f,onChange:j,options:du.map(w=>({label:w.label,value:w.value})),helperText:b?void 0:(x==null?void 0:x.description)||u}),b&&s.jsxs("div",{className:"space-y-2 mt-2",children:[s.jsx(Oe,{label:"Cron Expression",value:r,onChange:y,placeholder:h}),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)"]})]})]})},Zl=({id:n,icon:r,title:o,description:u,value:h,onChange:f})=>s.jsxs("div",{id:n,className:"rounded-xl border border-slate-700 bg-slate-800/50 p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-0.5 p-1.5 rounded-md bg-slate-800 text-slate-400",children:s.jsx(r,{size:14})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-slate-200",children:o}),s.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:u})]})]}),s.jsx(Ow,{label:"",value:h,onChange:f})]}),Rw=({form:n,scheduleMode:r,selectedTemplateId:o,onFieldChange:u,onSwitchToTemplate:h,onSwitchToCustom:f,onApplyTemplate:b})=>s.jsxs(lt,{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.jsx("p",{className:"text-xs text-slate-500 mt-2 mb-2",children:"This tab only controls cadence. Runtime and provider settings live in the Jobs tab."})]}),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 ${r==="template"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:h,children:"Template"}),s.jsx("button",{type:"button",className:`px-4 py-1.5 text-sm font-medium transition-colors ${r==="custom"?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:text-slate-200"}`,onClick:f,children:"Custom"})]})]}),r==="template"?s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:yh.map(j=>{const y=o===j.id;return s.jsxs("button",{type:"button",onClick:()=>b(j),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:j.label}),s.jsx("p",{className:"text-xs text-slate-400 mb-3",children:j.description}),s.jsx("div",{className:"space-y-0.5",children:[["Executor",j.hints.executor],["Reviewer",j.hints.reviewer],["QA",j.hints.qa],["Audit",j.hints.audit],["Planner",j.hints.slicer],["PR Resolver",j.hints.prResolver],["Merger",j.hints.merger]].map(([x,w])=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-slate-500 w-16 shrink-0",children:x}),s.jsx("span",{className:"text-xs text-slate-400",children:w})]},x))})]},j.id)})}):s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Zl,{id:"job-schedule-executor",icon:vn,title:"PRD Executor",description:"Executes PRDs to generate code and create PRs",value:n.cronSchedule,onChange:j=>u("cronSchedule",j)}),s.jsx(Zl,{id:"job-schedule-reviewer",icon:oh,title:"PR Reviewer",description:"Reviews PRs and provides feedback or automated fixes",value:n.reviewerSchedule,onChange:j=>u("reviewerSchedule",j)}),s.jsx(Zl,{id:"job-schedule-qa",icon:lp,title:"Quality Assurance",description:"Automated UI testing using Playwright",value:n.qa.schedule,onChange:j=>u("qa",{...n.qa,schedule:j})}),s.jsx(Zl,{id:"job-schedule-audit",icon:Fr,title:"Code Audit",description:"Automated code quality and security audits",value:n.audit.schedule,onChange:j=>u("audit",{...n.audit,schedule:j})}),s.jsx(Zl,{id:"job-schedule-slicer",icon:dh,title:"Planner",description:"Generate PRDs from ROADMAP.md or audit findings",value:n.roadmapScanner.slicerSchedule,onChange:j=>u("roadmapScanner",{...n.roadmapScanner,slicerSchedule:j})}),n.analytics&&s.jsx(Zl,{id:"job-schedule-analytics",icon:ih,title:"Analytics",description:"Fetch Amplitude data, analyze with AI, and create issues",value:n.analytics.schedule,onChange:j=>u("analytics",{...n.analytics,schedule:j})}),n.prResolver&&s.jsx(Zl,{id:"job-schedule-pr-resolver",icon:uh,title:"PR Resolver",description:"Rebases PRs and applies review feedback",value:n.prResolver.schedule,onChange:j=>u("prResolver",{...n.prResolver,schedule:j})}),n.merger&&s.jsx(Zl,{id:"job-schedule-merger",icon:xu,title:"Merge Orchestrator",description:"Scans, rebases, and merges approved PRs",value:n.merger.schedule,onChange:j=>u("merger",{...n.merger,schedule:j})})]})]}),dc=({label:n,value:r=[],onChange:o,placeholder:u,helpText:h})=>{const[f,b]=_e.useState(""),j=()=>{f.trim()&&!r.includes(f.trim())&&(o([...r,f.trim()]),b(""))},y=w=>{o(r.filter(T=>T!==w))},x=w=>{w.key==="Enter"&&(w.preventDefault(),j())};return s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:n}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:r.map(w=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 bg-slate-800 rounded text-sm text-slate-300",children:[w,s.jsx("button",{type:"button",onClick:()=>y(w),className:"text-slate-500 hover:text-red-400","aria-label":`Remove ${w}`,title:`Remove ${w}`,children:s.jsx(Gr,{className:"h-3 w-3"})})]},w))}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"text",value:f,onChange:w=>b(w.target.value),onKeyDown:x,placeholder:u,className:"flex-1 bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"}),s.jsx(Le,{onClick:j,disabled:!f.trim(),"aria-label":`Add ${n.toLowerCase()} value`,children:s.jsx(Kl,{className:"h-4 w-4"})})]}),h&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:h})]})},Wl=({title:n,icon:r,description:o,enabled:u,onToggle:h,expanded:f,onExpandChange:b,scheduleSummary:j,providerLabel:y,children:x,id:w})=>s.jsxs("div",{id:w,className:`border border-slate-800 rounded-xl overflow-hidden transition-all duration-200 ${f?"bg-slate-900/50 ring-1 ring-indigo-500/20":"bg-slate-900/20 hover:bg-slate-900/40"}`,children:[s.jsxs("div",{className:"flex items-center justify-between p-4 cursor-pointer select-none",onClick:()=>b(!f),children:[s.jsxs("div",{className:"flex items-center gap-3 overflow-hidden",children:[s.jsx("div",{className:`p-2 rounded-lg ${f?"bg-indigo-500/20 text-indigo-400":"bg-slate-800 text-slate-400"}`,children:s.jsx(r,{className:"h-5 w-5"})}),s.jsxs("div",{className:"overflow-hidden",children:[s.jsx("h3",{className:"text-sm font-medium text-slate-200 truncate",children:n}),!f&&s.jsx("p",{className:"text-xs text-slate-500 truncate",children:o})]})]}),s.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[!f&&s.jsxs("div",{className:"hidden sm:flex items-center gap-2",children:[j&&s.jsx(St,{variant:"neutral",className:"bg-slate-800/50 text-[10px]",children:j}),y&&s.jsx(St,{variant:"info",className:"bg-blue-500/5 text-[10px]",children:y})]}),s.jsx("div",{onClick:T=>T.stopPropagation(),children:s.jsx(la,{checked:u,onChange:h})}),s.jsx(ch,{className:`h-5 w-5 text-slate-500 transition-transform duration-300 ${f?"rotate-180 text-indigo-400":""}`})]})]}),s.jsx("div",{className:`grid transition-all duration-300 ease-in-out ${f?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:"p-6 pt-0 space-y-6 border-t border-slate-800/50 mt-2",children:s.jsx("div",{className:"pt-6",children:x})})})})]}),Il=({summary:n,onOpen:r})=>s.jsxs("div",{className:"flex flex-col gap-4 rounded-xl border border-slate-800 bg-slate-950/50 p-4 md:flex-row md:items-center md:justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-slate-500",children:"Cadence"}),s.jsx("div",{className:"mt-1 text-sm font-medium text-slate-200",children:n}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"Managed centrally in Automation > Schedules."})]}),s.jsx(Le,{variant:"outline",size:"sm",onClick:r,className:"border-slate-700 text-slate-300 hover:bg-slate-800",children:"Open Schedules"})]}),Dw=({form:n,updateField:r,handleRoadmapToggle:o,presetOptions:u,expandedJob:h,onExpandedJobChange:f,onOpenSchedule:b})=>{var x,w,T,z,_,N,O,k,Y,D;const j=(M,V)=>{const K={...n.jobProviders};V===""?delete K[M]:K[M]=V,r("jobProviders",K)},y=[{label:"Use Global (default)",value:""},...u];return s.jsxs("div",{className:"space-y-8",children:[s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Prompt Augmentation"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Tune how repeated feedback patterns become prompt snippets."})]}),s.jsx("div",{className:"hidden rounded-lg bg-amber-500/10 p-2 text-amber-400 sm:block",children:s.jsx(Oj,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsxs("div",{className:"flex items-center justify-between rounded-md border border-slate-800 bg-slate-950/40 p-3",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-slate-200",children:"Enable prompt augmentation"}),s.jsx("p",{className:"mt-0.5 text-xs text-slate-500",children:"Adds capped feedback snippets to future job prompts."})]}),s.jsx(la,{checked:n.feedback.enabled,onChange:M=>r("feedback",{...n.feedback,enabled:M})})]}),s.jsx(Oe,{label:"Activation Threshold",type:"number",min:"0",max:"1",step:"0.05",value:String(n.feedback.confidenceThreshold),onChange:M=>r("feedback",{...n.feedback,confidenceThreshold:Math.max(0,Math.min(1,Number(M.target.value||0)))}),helperText:"Minimum confidence required before a snippet can activate."}),s.jsx(Oe,{label:"TTL",type:"number",min:"1",value:String(n.feedback.augmentationTtlDays),onChange:M=>r("feedback",{...n.feedback,augmentationTtlDays:Math.max(1,Number(M.target.value||1))}),rightIcon:s.jsx("span",{className:"text-xs",children:"days"}),helperText:"How long an augmentation remains active before expiry."}),s.jsx(Oe,{label:"Max Snippets Per Job",type:"number",min:"0",value:String(n.feedback.maxActiveAugmentations),onChange:M=>r("feedback",{...n.feedback,maxActiveAugmentations:Math.max(0,Number(M.target.value||0))}),helperText:"Maximum active augmentation snippets applied to each job prompt."}),s.jsx(Oe,{label:"Success Streak Expiry",type:"number",min:"0",value:String(n.feedback.successStreakToExpire),onChange:M=>r("feedback",{...n.feedback,successStreakToExpire:Math.max(0,Number(M.target.value||0))}),helperText:"Consecutive successes before active snippets expire."})]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-slate-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Job Configurations"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Enable jobs, choose providers, and tune runtime behavior. Cadence stays in Automation > Schedules."})]}),s.jsx("span",{className:"text-xs text-slate-500",children:"8 total jobs"})]}),s.jsx(Wl,{id:"job-section-executor",title:"PRD Executor",icon:vn,description:"Executes PRDs to generate code and create PRs",enabled:n.executorEnabled,onToggle:M=>r("executorEnabled",M),expanded:h==="executor",onExpandChange:M=>f(M?"executor":null),scheduleSummary:oa(n.cronSchedule),providerLabel:n.jobProviders.executor?(x=u.find(M=>M.value===n.jobProviders.executor))==null?void 0:x.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:oa(n.cronSchedule),onOpen:()=>b("executor")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(ct,{label:"Provider",value:n.jobProviders.executor??"",onChange:M=>j("executor",M),options:y}),s.jsx(Oe,{label:"Max Runtime",type:"number",value:String(n.maxRuntime),onChange:M=>r("maxRuntime",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"}),helperText:"Maximum runtime for executor tasks"})]})]})}),s.jsx(Wl,{id:"job-section-reviewer",title:"PR Reviewer",icon:oh,description:"Reviews PRs and provides feedback or automated fixes",enabled:n.reviewerEnabled,onToggle:M=>r("reviewerEnabled",M),expanded:h==="reviewer",onExpandChange:M=>f(M?"reviewer":null),scheduleSummary:oa(n.reviewerSchedule),providerLabel:n.jobProviders.reviewer?(w=u.find(M=>M.value===n.jobProviders.reviewer))==null?void 0:w.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:oa(n.reviewerSchedule),onOpen:()=>b("reviewer")}),s.jsxs("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2",children:[s.jsx(ct,{label:"Provider",value:n.jobProviders.reviewer??"",onChange:M=>j("reviewer",M),options:y}),s.jsx(Oe,{label:"Max Runtime",type:"number",value:String(n.reviewerMaxRuntime),onChange:M=>r("reviewerMaxRuntime",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Oe,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.minReviewScore),onChange:M=>r("minReviewScore",Number(M.target.value||0)),helperText:"PRs below this score will be marked as 'Needs Work'"}),s.jsx(Oe,{label:"Max Retries",type:"number",value:String(n.reviewerMaxRetries),onChange:M=>r("reviewerMaxRetries",Number(M.target.value||0)),helperText:"Fix attempts after initial review"}),s.jsx(Oe,{label:"Retry Delay",type:"number",value:String(n.reviewerRetryDelay),onChange:M=>r("reviewerRetryDelay",Number(M.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(Oe,{label:"Max PRs Per Run",type:"number",value:String(n.reviewerMaxPrsPerRun),onChange:M=>r("reviewerMaxPrsPerRun",Number(M.target.value||0)),helperText:"Hard cap on PRs processed per run (0 = unlimited)"})})]})]})}),s.jsx(Wl,{id:"job-section-qa",title:"Quality Assurance",icon:lp,description:"Automated UI testing using Playwright",enabled:n.qa.enabled,onToggle:M=>r("qa",{...n.qa,enabled:M}),expanded:h==="qa",onExpandChange:M=>f(M?"qa":null),scheduleSummary:oa(n.qa.schedule),providerLabel:n.jobProviders.qa?(T=u.find(M=>M.value===n.jobProviders.qa))==null?void 0:T.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:oa(n.qa.schedule),onOpen:()=>b("qa")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Provider",value:n.jobProviders.qa??"",onChange:M=>j("qa",M),options:y}),s.jsx(Oe,{label:"Max Runtime",type:"number",value:String(n.qa.maxRuntime),onChange:M=>r("qa",{...n.qa,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ct,{label:"Artifacts",value:n.qa.artifacts,onChange:M=>r("qa",{...n.qa,artifacts:M}),options:[{label:"Screenshots",value:"screenshot"},{label:"Videos",value:"video"},{label:"Both",value:"both"}]}),s.jsx(Oe,{label:"Skip Label",value:n.qa.skipLabel,onChange:M=>r("qa",{...n.qa,skipLabel:M.target.value}),helperText:"GitHub label to skip QA"}),s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-md border border-slate-800 bg-slate-950/40 mt-1.5",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-0.5",children:"Install browsers if missing"})]}),s.jsx(la,{checked:n.qa.autoInstallPlaywright,onChange:M=>r("qa",{...n.qa,autoInstallPlaywright:M})})]})]}),s.jsx(dc,{label:"QA Branch Patterns",value:n.qa.branchPatterns,onChange:M=>r("qa",{...n.qa,branchPatterns:M}),placeholder:"e.g., qa/, test/",helpText:"Branch patterns to match for QA"})]})}),s.jsx(Wl,{id:"job-section-audit",title:"Code Audit",icon:Fr,description:"Automated code quality and security audits",enabled:n.audit.enabled,onToggle:M=>r("audit",{...n.audit,enabled:M}),expanded:h==="audit",onExpandChange:M=>f(M?"audit":null),scheduleSummary:oa(n.audit.schedule),providerLabel:n.jobProviders.audit?(z=u.find(M=>M.value===n.jobProviders.audit))==null?void 0:z.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:oa(n.audit.schedule),onOpen:()=>b("audit")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Provider",value:n.jobProviders.audit??"",onChange:M=>j("audit",M),options:y}),s.jsx(Oe,{label:"Max Runtime",type:"number",value:String(n.audit.maxRuntime),onChange:M=>r("audit",{...n.audit,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ct,{label:"Target Column",value:n.audit.targetColumn,onChange:M=>r("audit",{...n.audit,targetColumn:M}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]})]})]})}),s.jsx(Wl,{id:"job-section-slicer",title:"Planner",icon:dh,description:"Generate one PRD per run using ROADMAP.md or audit findings",enabled:n.roadmapScanner.enabled,onToggle:o,expanded:h==="slicer",onExpandChange:M=>f(M?"slicer":null),scheduleSummary:oa(n.roadmapScanner.slicerSchedule),providerLabel:n.jobProviders.slicer?(_=u.find(M=>M.value===n.jobProviders.slicer))==null?void 0:_.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:oa(n.roadmapScanner.slicerSchedule),onOpen:()=>b("slicer")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Provider",value:n.jobProviders.slicer??"",onChange:M=>j("slicer",M),options:y}),s.jsx(Oe,{label:"Roadmap File Path",value:n.roadmapScanner.roadmapPath,onChange:M=>r("roadmapScanner",{...n.roadmapScanner,roadmapPath:M.target.value}),helperText:"Primary planning source (relative to project root)."}),s.jsx(Oe,{label:"Max Runtime",type:"number",value:String(n.roadmapScanner.slicerMaxRuntime||""),onChange:M=>r("roadmapScanner",{...n.roadmapScanner,slicerMaxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ct,{label:"Priority Mode",value:n.roadmapScanner.priorityMode||"roadmap-first",onChange:M=>r("roadmapScanner",{...n.roadmapScanner,priorityMode:M==="audit-first"?"audit-first":"roadmap-first"}),options:[{label:"Roadmap first (recommended)",value:"roadmap-first"},{label:"Audit first",value:"audit-first"}]}),s.jsx(ct,{label:"Issue Column",value:n.roadmapScanner.issueColumn||"Ready",onChange:M=>r("roadmapScanner",{...n.roadmapScanner,issueColumn:M==="Draft"?"Draft":"Ready"}),options:[{label:"Ready (default)",value:"Ready"},{label:"Draft",value:"Draft"}]})]})]})}),s.jsx(Wl,{id:"job-section-analytics",title:"Analytics (Amplitude)",icon:ih,description:"Fetch Amplitude data, analyze with AI, and create board issues",enabled:n.analytics.enabled,onToggle:M=>r("analytics",{...n.analytics,enabled:M}),expanded:h==="analytics",onExpandChange:M=>f(M?"analytics":null),scheduleSummary:oa(n.analytics.schedule),providerLabel:n.jobProviders.analytics?(N=u.find(M=>M.value===n.jobProviders.analytics))==null?void 0:N.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:oa(n.analytics.schedule),onOpen:()=>b("analytics")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Provider",value:n.jobProviders.analytics??"",onChange:M=>j("analytics",M),options:y}),s.jsx(Oe,{label:"Amplitude API Key",value:((O=n.providerEnv)==null?void 0:O.AMPLITUDE_API_KEY)??"",onChange:M=>r("providerEnv",{...n.providerEnv,AMPLITUDE_API_KEY:M.target.value}),placeholder:"Required"}),s.jsx(Oe,{label:"Amplitude Secret Key",type:"password",value:((k=n.providerEnv)==null?void 0:k.AMPLITUDE_SECRET_KEY)??"",onChange:M=>r("providerEnv",{...n.providerEnv,AMPLITUDE_SECRET_KEY:M.target.value}),placeholder:"Required"}),s.jsx(Oe,{label:"Max Runtime",type:"number",value:String(n.analytics.maxRuntime),onChange:M=>r("analytics",{...n.analytics,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Oe,{label:"Lookback Days",type:"number",min:"1",max:"90",value:String(n.analytics.lookbackDays),onChange:M=>r("analytics",{...n.analytics,lookbackDays:Math.max(1,Math.min(90,Number(M.target.value||7)))})}),s.jsx(ct,{label:"Target Column",value:n.analytics.targetColumn,onChange:M=>r("analytics",{...n.analytics,targetColumn:M}),options:[{value:"Draft",label:"Draft"},{value:"Ready",label:"Ready"},{value:"In Progress",label:"In Progress"},{value:"Review",label:"Review"},{value:"Done",label:"Done"}]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-1.5",children:"Analysis Prompt (optional)"}),s.jsx("textarea",{rows:4,value:n.analytics.analysisPrompt??"",onChange:M=>r("analytics",{...n.analytics,analysisPrompt:M.target.value}),placeholder:"Custom prompt for AI analysis. Leave empty to use default.",className:"w-full bg-slate-950/50 border border-white/10 text-slate-200 rounded-lg px-3 py-2.5 text-sm placeholder-slate-600 focus:outline-none focus:border-indigo-500/50 focus:ring-1 focus:ring-indigo-500/20 resize-y"})]})]})]})}),s.jsx(Wl,{id:"job-section-pr-resolver",title:"PR Resolver",icon:uh,description:"Repo-wide conflict resolver that rebases PRs and applies feedback",enabled:n.prResolver.enabled,onToggle:M=>r("prResolver",{...n.prResolver,enabled:M}),expanded:h==="pr-resolver",onExpandChange:M=>f(M?"pr-resolver":null),scheduleSummary:oa(n.prResolver.schedule),providerLabel:n.jobProviders["pr-resolver"]?(Y=u.find(M=>M.value===n.jobProviders["pr-resolver"]))==null?void 0:Y.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:oa(n.prResolver.schedule),onOpen:()=>b("pr-resolver")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Provider",value:n.jobProviders["pr-resolver"]??"",onChange:M=>j("pr-resolver",M),options:y}),s.jsx(Oe,{label:"Max Runtime",type:"number",value:String(n.prResolver.maxRuntime),onChange:M=>r("prResolver",{...n.prResolver,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Oe,{label:"Per-PR Timeout",type:"number",value:String(n.prResolver.perPrTimeout),onChange:M=>r("prResolver",{...n.prResolver,perPrTimeout:Math.max(0,Number(M.target.value||0))}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(Oe,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.prResolver.maxPrsPerRun),onChange:M=>r("prResolver",{...n.prResolver,maxPrsPerRun:Math.max(0,Number(M.target.value||0))})}),s.jsx(Oe,{label:"Ready Label",value:n.prResolver.readyLabel,onChange:M=>r("prResolver",{...n.prResolver,readyLabel:M.target.value})})]}),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("span",{className:"text-sm font-medium text-slate-200",children:"AI conflict resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"AI help for non-trivial rebases"})]}),s.jsx(la,{checked:n.prResolver.aiConflictResolution,onChange:M=>r("prResolver",{...n.prResolver,aiConflictResolution:M})})]}),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:"AI review resolution"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Implement open review comments"})]}),s.jsx(la,{checked:n.prResolver.aiReviewResolution,onChange:M=>r("prResolver",{...n.prResolver,aiReviewResolution:M})})]})]}),s.jsx(dc,{label:"PR Resolver Branch Patterns",value:n.prResolver.branchPatterns,onChange:M=>r("prResolver",{...n.prResolver,branchPatterns:M}),placeholder:"e.g., feat/, night-watch/",helpText:"Branch patterns to filter PRs (empty = all)"})]})}),s.jsx(Wl,{id:"job-section-merger",title:"Merge Orchestrator",icon:xu,description:"Repo-wide PR merge coordinator — scans, rebases, and merges",enabled:n.merger.enabled,onToggle:M=>r("merger",{...n.merger,enabled:M}),expanded:h==="merger",onExpandChange:M=>f(M?"merger":null),scheduleSummary:oa(n.merger.schedule),providerLabel:n.jobProviders.merger?(D=u.find(M=>M.value===n.jobProviders.merger))==null?void 0:D.label:"Global",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Il,{summary:oa(n.merger.schedule),onOpen:()=>b("merger")}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Provider",value:n.jobProviders.merger??"",onChange:M=>j("merger",M),options:y}),s.jsx(Oe,{label:"Max Runtime",type:"number",value:String(n.merger.maxRuntime),onChange:M=>r("merger",{...n.merger,maxRuntime:Number(M.target.value||0)}),rightIcon:s.jsx("span",{className:"text-xs",children:"sec"})}),s.jsx(ct,{label:"Merge Method",value:n.merger.mergeMethod,onChange:M=>r("merger",{...n.merger,mergeMethod:M}),options:[{label:"Squash",value:"squash"},{label:"Merge",value:"merge"},{label:"Rebase",value:"rebase"}]}),s.jsx(Oe,{label:"Min Review Score",type:"number",min:"0",max:"100",value:String(n.merger.minReviewScore),onChange:M=>r("merger",{...n.merger,minReviewScore:Math.max(0,Math.min(100,Number(M.target.value||0)))})}),s.jsx(Oe,{label:"Max PRs Per Run",type:"number",min:"0",value:String(n.merger.maxPrsPerRun),onChange:M=>r("merger",{...n.merger,maxPrsPerRun:Math.max(0,Number(M.target.value||0))})})]}),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:"Rebase before merge"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rebase each PR against its base branch"})]}),s.jsx(la,{checked:n.merger.rebaseBeforeMerge,onChange:M=>r("merger",{...n.merger,rebaseBeforeMerge:M})})]}),s.jsx(dc,{label:"Merger Branch Patterns",value:n.merger.branchPatterns,onChange:M=>r("merger",{...n.merger,branchPatterns:M}),placeholder:"e.g., feat/, night-watch/"})]})})]})]})},Ip="5 * * * *",Qp="25 */3 * * *",kw={enabled:!0,roadmapPath:"ROADMAP.md",autoScanInterval:300,slicerSchedule:"35 */6 * * *",slicerMaxRuntime:600,priorityMode:"roadmap-first",issueColumn:"Ready"},Sx={enabled:!0,schedule:"45 2,10,18 * * *",maxRuntime:3600,branchPatterns:[],artifacts:"both",skipLabel:"skip-qa",autoInstallPlaywright:!0},Aw={enabled:!0,schedule:"50 3 * * 1",maxRuntime:1800,targetColumn:"Draft"},_w={enabled:!1,schedule:"0 6 * * 1",maxRuntime:900,lookbackDays:7,targetColumn:"Draft",analysisPrompt:""},Ex={enabled:!0,schedule:"15 6,14,22 * * *",maxRuntime:3600,branchPatterns:[],maxPrsPerRun:0,perPrTimeout:600,aiConflictResolution:!0,aiReviewResolution:!1,readyLabel:"ready-to-merge"},Tx={enabled:!1,schedule:"55 */4 * * *",maxRuntime:1800,mergeMethod:"squash",minReviewScore:80,branchPatterns:[],rebaseBeforeMerge:!0,maxPrsPerRun:0};function $r(){return{...kw}}function Xp(){return{...Sx,branchPatterns:[...Sx.branchPatterns]}}function Jp(){return{...Aw}}function bh(){return{..._w}}function gc(){return{...Ex,branchPatterns:[...Ex.branchPatterns]}}function yu(){return{...Tx,branchPatterns:[...Tx.branchPatterns]}}const fu=["claude","claude-sonnet-4-6","claude-opus-4-6","codex","glm-47","glm-5"],Kp={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},"claude-sonnet-4-6":{name:"Claude Sonnet 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-sonnet-4-6"},"claude-opus-4-6":{name:"Claude Opus 4.6",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"claude-opus-4-6"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},"glm-47":{name:"GLM-4.7",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-4.7",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-4.7",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-4.7"}},"glm-5":{name:"GLM-5",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions",modelFlag:"--model",model:"glm-5",envVars:{ANTHROPIC_BASE_URL:"https://api.z.ai/api/anthropic",API_TIMEOUT_MS:"3000000",ANTHROPIC_DEFAULT_OPUS_MODEL:"glm-5",ANTHROPIC_DEFAULT_SONNET_MODEL:"glm-5"}}},zw={enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}},Uw=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],Lw=new Set(["overview","schedules","jobs"]),qf=n=>{if(!n)return null;const r=n==="planner"?"slicer":n;return["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"].includes(r)?r:null},eu=n=>({cronSchedule:n.cronSchedule||Ip,reviewerSchedule:n.reviewerSchedule||Qp,scheduleBundleId:n.scheduleBundleId??null,cronScheduleOffset:n.cronScheduleOffset??0,schedulingPriority:n.schedulingPriority??3,executorEnabled:n.executorEnabled??!0,reviewerEnabled:n.reviewerEnabled??!1,maxRuntime:n.maxRuntime??3600,reviewerMaxRuntime:n.reviewerMaxRuntime??1800,maxRetries:n.maxRetries??3,reviewerMaxRetries:n.reviewerMaxRetries??2,reviewerRetryDelay:n.reviewerRetryDelay??30,reviewerMaxPrsPerRun:n.reviewerMaxPrsPerRun??0,minReviewScore:n.minReviewScore??70,branchPatterns:n.branchPatterns||[],providerEnv:n.providerEnv||{},jobProviders:n.jobProviders||{},providerPresets:n.providerPresets??{},qa:n.qa||Xp(),audit:n.audit||Jp(),analytics:n.analytics||bh(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??gc(),merger:n.merger??yu(),roadmapScanner:n.roadmapScanner||$r(),queue:n.queue||zw}),su=n=>{var r,o;return Cw(n.scheduleBundleId,n.cronSchedule,n.reviewerSchedule,n.qa.schedule,n.audit.schedule,n.roadmapScanner.slicerSchedule??$r().slicerSchedule,((r=n.prResolver)==null?void 0:r.schedule)??gc().schedule,((o=n.merger)==null?void 0:o.schedule)??yu().schedule)},tu=n=>{const r=su(n);return!n.scheduleBundleId&&r?{form:{...n,scheduleBundleId:r.id},detectedTemplate:r}:{form:n,detectedTemplate:r}},Hw=()=>{var _n,Ws,ol,Ie,ul,mt,Bt,At,_t;const n=An(),{addToast:r,selectedProjectId:o,globalModeLoading:u}=Ft(),[h,f]=L.useState(!1),[b,j]=L.useState(!1),[y,x]=L.useState(!1),[w,T]=L.useState(null),[z,_]=L.useState([]),[N,O]=L.useState(null),[k,Y]=L.useState(null),[D,M]=L.useState("overview"),[V,K]=L.useState(null),[$,W]=L.useState(null),[R,ae]=L.useState(null),[C,J]=L.useState("template"),[ne,he]=L.useState(""),[ve,ue]=L.useState(!1),[G,le]=L.useState(!1),de=L.useRef(null),me=L.useRef(!1),ze=L.useRef(null),{data:H,loading:se,error:ge,refetch:pe}=Ua(mp,[o],{enabled:!u}),{data:Ee,loading:xe,refetch:Ce}=Ua(xh,[o],{enabled:!u});L.useEffect(()=>{if(u)return;const oe=()=>{pe(),Yg().then(O).catch(()=>{}),cN(24).then(Y).catch(()=>{}),eN().then(_).catch(()=>{})};oe();const je=setInterval(oe,3e4);return()=>clearInterval(je)},[o,u,pe]),L.useEffect(()=>{if(!Ee)return;if(me.current){me.current=!1;return}const{form:oe,detectedTemplate:je}=tu(eu(Ee));ae(oe),de.current=oe,J(je?"template":"custom"),he((je==null?void 0:je.id)??""),ue(!1)},[Ee]),L.useEffect(()=>{!R||!de.current||ue(JSON.stringify(R)!==JSON.stringify(de.current))},[R]),L.useEffect(()=>{if(D!=="jobs"||!V)return;const oe=window.setTimeout(()=>{const je=document.getElementById(`job-section-${V}`);je&&je.scrollIntoView({behavior:"smooth",block:"center"})},100);return()=>window.clearTimeout(oe)},[D,V]),L.useEffect(()=>{if(D!=="schedules"||C!=="custom"||!$)return;const oe=$,je=window.setTimeout(()=>{const at=document.getElementById(`job-schedule-${oe}`);at&&at.scrollIntoView({behavior:"smooth",block:"center"}),W(null)},100);return()=>window.clearTimeout(je)},[D,C,$]);const Ze=(oe,je)=>{ae(at=>at&&{...at,[oe]:je})},We=()=>{if(J("template"),!R)return;const oe=su(R);if(oe){he(oe.id),Ze("scheduleBundleId",oe.id);return}const je=If(ne)??If("always-on");je&&Ka(je)},kt=()=>{J("custom"),Ze("scheduleBundleId",null),he("")},ha=oe=>{const je=qf(oe);je&&(C!=="custom"&&kt(),M("schedules"),W(je))},Ka=oe=>{he(oe.id),ae(je=>je&&{...je,cronSchedule:oe.schedules.executor,reviewerSchedule:oe.schedules.reviewer,scheduleBundleId:oe.id,qa:{...je.qa,schedule:oe.schedules.qa},audit:{...je.audit,schedule:oe.schedules.audit},roadmapScanner:{...je.roadmapScanner,slicerSchedule:oe.schedules.slicer},prResolver:{...je.prResolver,schedule:oe.schedules.prResolver},merger:{...je.merger,schedule:oe.schedules.merger}})},en=async()=>{if(R){le(!0);try{const oe={};for(const jt of Uw){const zt=R.jobProviders[jt];typeof zt=="string"&&zt.trim().length>0?oe[jt]=zt:Ee!=null&&Ee.jobProviders[jt]&&(oe[jt]=null)}const je=await ou({cronSchedule:R.cronSchedule,reviewerSchedule:R.reviewerSchedule,scheduleBundleId:C==="template"?R.scheduleBundleId:null,cronScheduleOffset:R.cronScheduleOffset,schedulingPriority:R.schedulingPriority,executorEnabled:R.executorEnabled,reviewerEnabled:R.reviewerEnabled,maxRuntime:R.maxRuntime,reviewerMaxRuntime:R.reviewerMaxRuntime,maxRetries:R.maxRetries,reviewerMaxRetries:R.reviewerMaxRetries,reviewerRetryDelay:R.reviewerRetryDelay,reviewerMaxPrsPerRun:R.reviewerMaxPrsPerRun,minReviewScore:R.minReviewScore,branchPatterns:R.branchPatterns,providerEnv:R.providerEnv,jobProviders:oe,qa:R.qa,audit:R.audit,analytics:R.analytics,feedback:R.feedback,prResolver:R.prResolver,merger:R.merger,roadmapScanner:R.roadmapScanner,queue:R.queue}),{form:at}=tu(eu(je));ae(at),de.current=at,ue(!1);let Et="";try{await uc()}catch(jt){Et=jt instanceof Error?jt.message:"Failed to reinstall cron"}r(Et?{title:"Saved (Cron Reinstall Failed)",message:Et,type:"warning"}:{title:"Saved",message:"Configuration updated and cron schedules reinstalled.",type:"success"}),me.current=!0,Ce()}catch(oe){r({title:"Save Failed",message:oe instanceof Error?oe.message:"Failed to save configuration",type:"error"})}finally{le(!1)}}},ma=()=>{if(de.current){ae(de.current);const oe=de.current,je=su(oe);J(je?"template":"custom"),he((je==null?void 0:je.id)??""),ue(!1)}},ga=async oe=>{try{const je=await yp(oe),{form:at}=tu(eu(je));ae(at),de.current=at,ue(!1);let Et="";try{await uc()}catch(jt){Et=jt instanceof Error?jt.message:"Failed to reinstall cron"}r(Et?{title:"Saved (Cron Reinstall Failed)",message:Et,type:"warning"}:{title:oe?"Roadmap Scanner Enabled":"Roadmap Scanner Disabled",message:`Roadmap scanner has been ${oe?"enabled":"disabled"}.`,type:"success"}),me.current=!0,Ce(),pe()}catch(je){r({title:"Toggle Failed",message:je instanceof Error?je.message:"Failed to toggle roadmap scanner",type:"error"})}},bn=async()=>{if(H){f(!0);try{H.paused?(await uc(),r({title:"Schedule Resumed",message:"Cron schedules are active.",type:"success"})):(await xp(),r({title:"Schedule Paused",message:"Cron schedules are deactivated.",type:"info"})),pe()}catch(oe){r({title:"Action Failed",message:oe instanceof Error?oe.message:"Toggle failed",type:"error"})}finally{f(!1)}}},Gt=async()=>{if(window.confirm("Are you sure you want to clear all pending jobs?")){j(!0);try{const oe=await oN();r({title:"Queue Cleared",message:`Removed ${oe.cleared} pending jobs.`,type:"success"}),Yg().then(O)}catch(oe){r({title:"Clear Failed",message:oe instanceof Error?oe.message:"Failed to clear queue",type:"error"})}finally{j(!1)}}},ua=async oe=>{if(R){le(!0);try{const je=await ou({queue:{...R.queue,...oe}}),{form:at}=tu(eu(je));ae(at),de.current=at,ue(!1),r({title:"Settings Saved",message:"Queue configuration updated.",type:"success"}),me.current=!0,Ce(),pe()}catch(je){r({title:"Save Failed",message:je instanceof Error?je.message:"Save failed",type:"error"})}finally{le(!1)}}},tn=async oe=>{const je=oe==="planner"?"slicer":oe;T(oe);try{await gp(je),r({title:"Job Triggered",message:`${oe} job queued successfully.`,type:"success"})}catch(at){r({title:"Trigger Failed",message:at instanceof Error?at.message:"Failed to trigger job",type:"error"})}finally{T(null)}},an=oe=>{const je=qf(oe);je&&(M("jobs"),K(je))};L.useEffect(()=>{if(!R||ze.current===n.search)return;ze.current=n.search;const oe=new URLSearchParams(n.search),je=oe.get("tab"),at=je==="queue"?"overview":je,Et=oe.get("mode"),jt=qf(oe.get("jobType"));if(at&&Lw.has(at)){if(at==="jobs"){M("jobs"),jt&&K(jt);return}if(at==="schedules"){if(jt){ha(jt);return}M("schedules"),Et==="custom"&&C!=="custom"&&kt(),Et==="template"&&C!=="template"&&We();return}M(at);return}Et==="custom"&&C!=="custom"&&(M("schedules"),kt()),Et==="template"&&C!=="template"&&(M("schedules"),We())},[n.search,R,C]);const nn=L.useMemo(()=>{const oe={...Kp,...(R==null?void 0:R.providerPresets)??{}};return Object.entries(oe).map(([je,at])=>({label:at.name||je,value:je}))},[R==null?void 0:R.providerPresets]);if(se||xe||!R)return s.jsx("div",{className:"flex items-center justify-center min-h-[400px] text-slate-500",children:"Loading automation state..."});if(ge||!H||!Ee)return s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[s.jsx(yn,{className:"h-10 w-10 text-red-500"}),s.jsx("div",{className:"text-slate-300 font-medium",children:"Failed to load scheduling data"}),s.jsx(Le,{onClick:()=>{pe(),Ce()},children:"Retry"})]});const qa=H.paused,jn=R?su(R):void 0,Qt=s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[s.jsxs(lt,{className:"overflow-hidden border-slate-800",children:[s.jsxs("div",{className:"p-5 border-b border-slate-800 flex items-center justify-between bg-slate-900/30",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Bg,{className:"h-5 w-5 text-indigo-400"}),s.jsx("h3",{className:"font-semibold text-slate-200",children:"Execution Queue"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Le,{variant:"ghost",size:"sm",onClick:Gt,loading:b,disabled:!(N!=null&&N.items.length),className:"text-slate-500 hover:text-red-400 hover:bg-red-400/10",children:[s.jsx(Fs,{className:"h-4 w-4 mr-1.5"}),"Clear"]}),s.jsx("div",{className:`p-1.5 rounded-lg cursor-pointer hover:bg-slate-800 transition-colors ${y?"text-indigo-400 bg-slate-800":"text-slate-500"}`,onClick:()=>x(!y),title:"Automation Settings",children:s.jsx(qg,{className:"h-5 w-5"})})]})]}),s.jsx("div",{className:`transition-all duration-300 overflow-hidden ${y?"max-h-[500px]":"max-h-0"}`,children:s.jsxs("div",{className:"p-6 bg-slate-950/40 border-b border-slate-800 grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Dispatch Mode",value:((_n=R==null?void 0:R.queue)==null?void 0:_n.mode)||"auto",onChange:oe=>ua({mode:oe}),options:[{label:"Auto (Recommended)",value:"auto"},{label:"Conservative (1 at a time)",value:"conservative"},{label:"Provider-aware",value:"provider-aware"}]}),s.jsx(Oe,{label:"Max Concurrency",type:"number",min:"1",max:"20",value:String(((Ws=R==null?void 0:R.queue)==null?void 0:Ws.maxConcurrency)||1),onChange:oe=>ua({maxConcurrency:Number(oe.target.value)})}),s.jsx("div",{className:"md:col-span-2 flex items-center gap-3",children:s.jsx(la,{label:"Coordinator Enabled",checked:((ol=R==null?void 0:R.queue)==null?void 0:ol.enabled)??!0,onChange:oe=>ua({enabled:oe})})})]})}),s.jsx("div",{className:"p-0",children:N!=null&&N.items.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-3",children:"Job / Project"}),s.jsx("th",{className:"px-6 py-3",children:"Status"}),s.jsx("th",{className:"px-6 py-3",children:"Wait Time"}),s.jsx("th",{className:"px-6 py-3 text-right",children:"Actions"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:N.items.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/20 transition-colors group",children:[s.jsxs("td",{className:"px-6 py-4",children:[s.jsx("div",{className:"font-medium text-slate-200",children:oe.jobType}),s.jsx("div",{className:"text-[11px] text-slate-500 truncate max-w-[200px]",title:oe.projectPath,children:oe.projectName||oe.projectPath})]}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(St,{variant:oe.status==="running"?"info":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:wx(new Date(oe.enqueuedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right",children:s.jsx("button",{onClick:()=>an(oe.jobType),className:"opacity-0 group-hover:opacity-100 p-2 text-slate-500 hover:text-indigo-400 transition-all",title:"Configure Job",children:s.jsx(qg,{className:"h-4 w-4"})})})]},oe.id))})]})}):s.jsxs("div",{className:"py-12 flex flex-col items-center justify-center text-slate-500 text-sm italic",children:[s.jsx("div",{className:"mb-3 p-3 rounded-full bg-slate-900 border border-slate-800",children:s.jsx(Hg,{className:"h-6 w-6 opacity-30"})}),"Queue is empty"]})})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Operational Timeline"}),s.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-2",children:[s.jsx(hc,{className:"h-3 w-3 animate-spin-slow"})," Live Update"]})]}),s.jsx(Ew,{configs:z,currentProjectId:o??void 0,onEditJob:(oe,je)=>an(je),queueStatus:N,queueAnalytics:k})]}),s.jsxs("section",{className:"space-y-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-200",children:"Execution History (Last 24h)"}),s.jsx(lt,{className:"border-slate-800 overflow-hidden",children:k!=null&&k.recentRuns.length?s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left text-sm",children:[s.jsx("thead",{className:"text-[11px] uppercase tracking-wider text-slate-500 font-semibold bg-slate-900/20",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-6 py-4",children:"Job Type"}),s.jsx("th",{className:"px-6 py-4",children:"Status"}),s.jsx("th",{className:"px-6 py-4",children:"Duration"}),s.jsx("th",{className:"px-6 py-4",children:"Started"}),s.jsx("th",{className:"px-6 py-4 text-right",children:"Provider"})]})}),s.jsx("tbody",{className:"divide-y divide-slate-800/40",children:k.recentRuns.map(oe=>s.jsxs("tr",{className:"hover:bg-slate-800/10 transition-colors",children:[s.jsx("td",{className:"px-6 py-4",children:s.jsx("span",{className:"font-medium text-slate-300 capitalize",children:oe.jobType})}),s.jsx("td",{className:"px-6 py-4",children:s.jsx(St,{variant:oe.status==="finished"?"success":oe.status==="failed"?"error":"neutral",className:"text-[10px]",children:oe.status})}),s.jsx("td",{className:"px-6 py-4 text-slate-400",children:oe.durationSeconds?`${oe.durationSeconds}s`:"--"}),s.jsx("td",{className:"px-6 py-4 text-slate-500 text-xs",children:wx(new Date(oe.startedAt*1e3))}),s.jsx("td",{className:"px-6 py-4 text-right text-slate-500 font-mono text-xs",children:oe.providerKey||"default"})]},oe.id))})]})}):s.jsx("div",{className:"py-20 text-center text-slate-500 italic text-sm",children:"No recorded runs in the last 24 hours."})})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs(lt,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Automation Controls"}),s.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-950/40 p-4",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Schedule Template"}),s.jsx("div",{className:"mt-1 text-sm font-medium text-slate-200",children:(jn==null?void 0:jn.label)??"Custom"}),s.jsx("p",{className:"mt-1 text-xs text-slate-500",children:(jn==null?void 0:jn.description)??"Custom cron expressions are active for this project."})]}),s.jsx(ct,{label:"Scheduling Priority",value:String(R.schedulingPriority),onChange:oe=>Ze("schedulingPriority",Number(oe)),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(Oe,{label:"Extra Start Delay",type:"number",min:"0",max:"59",value:String(R.cronScheduleOffset),onChange:oe=>Ze("cronScheduleOffset",Math.min(59,Math.max(0,Number(oe.target.value||0)))),helperText:"Manual delay in minutes added before cron jobs start. This stacks on top of automatic balancing."})]}),s.jsxs(lt,{className:"p-5 space-y-4 border-slate-800 bg-slate-900/20",children:[s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Efficiency Stats"}),s.jsxs("div",{className:"grid grid-cols-1 gap-4",children:[s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Avg Wait Time"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[N!=null&&N.averageWaitSeconds?(N.averageWaitSeconds/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]}),s.jsxs("div",{className:"p-4 rounded-xl border border-slate-800 bg-slate-950/40",children:[s.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"Oldest Pending"}),s.jsxs("div",{className:"text-xl font-bold text-slate-200 mt-1",children:[N!=null&&N.oldestPendingAge?(N.oldestPendingAge/60).toFixed(1):"0"," ",s.jsx("span",{className:"text-xs font-normal text-slate-500",children:"min"})]})]})]})]}),s.jsxs(lt,{className:"divide-y divide-slate-800 border-slate-800",children:[s.jsx("div",{className:"p-4 bg-slate-900/30",children:s.jsx("h4",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Manual Trigger"})}),s.jsx("div",{className:"p-2 space-y-1",children:[{id:"executor",label:"Run Executor",icon:vn,enabled:(R==null?void 0:R.executorEnabled)!==!1},{id:"reviewer",label:"Run Reviewer",icon:Fr,enabled:(R==null?void 0:R.reviewerEnabled)??!1},{id:"qa",label:"Run QA",icon:Bg,enabled:((Ie=R==null?void 0:R.qa)==null?void 0:Ie.enabled)??!1},{id:"audit",label:"Run Audit",icon:Hg,enabled:((ul=R==null?void 0:R.audit)==null?void 0:ul.enabled)??!1},{id:"planner",label:"Run Planner",icon:dh,enabled:((mt=R==null?void 0:R.roadmapScanner)==null?void 0:mt.enabled)??!1},{id:"analytics",label:"Run Analytics",icon:ih,enabled:((Bt=R==null?void 0:R.analytics)==null?void 0:Bt.enabled)??!1},{id:"pr-resolver",label:"Run PR Resolver",icon:uh,enabled:((At=R==null?void 0:R.prResolver)==null?void 0:At.enabled)??!1},{id:"merger",label:"Run Merger",icon:xu,enabled:((_t=R==null?void 0:R.merger)==null?void 0:_t.enabled)??!1}].map(oe=>s.jsxs("button",{onClick:()=>tn(oe.id),disabled:w===oe.id||!oe.enabled,className:`w-full flex items-center justify-between p-3 rounded-lg text-sm transition-colors group disabled:cursor-not-allowed ${oe.enabled?"text-slate-300 hover:bg-slate-800/40":"text-slate-600 opacity-50"}`,children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(oe.icon,{className:`h-4 w-4 ${oe.enabled?"text-slate-500 group-hover:text-indigo-400":"text-slate-700"}`}),oe.label]}),w===oe.id?s.jsx(hc,{className:"h-3 w-3 animate-spin text-indigo-400"}):oe.enabled?s.jsx(vn,{className:"h-3 w-3 opacity-0 group-hover:opacity-100 transition-all fill-current text-indigo-400"}):s.jsx("span",{className:"text-[10px] text-slate-600 uppercase tracking-wider",children:"Off"})]},oe.id))})]})]})]}),cl=R?s.jsx(Rw,{form:{cronSchedule:R.cronSchedule,reviewerSchedule:R.reviewerSchedule,qa:R.qa,audit:R.audit,analytics:R.analytics,roadmapScanner:{...R.roadmapScanner,slicerSchedule:R.roadmapScanner.slicerSchedule??$r().slicerSchedule},prResolver:R.prResolver,merger:R.merger},scheduleMode:C,selectedTemplateId:ne,onFieldChange:(oe,je)=>{Ze(oe,je)},onSwitchToTemplate:We,onSwitchToCustom:kt,onApplyTemplate:Ka}):null,Zs=[{id:"overview",label:"Overview",content:Qt},{id:"schedules",label:"Schedules",content:cl},{id:"jobs",label:"Jobs",content:R?s.jsx(Dw,{form:R,updateField:Ze,handleRoadmapToggle:ga,presetOptions:nn,expandedJob:V,onExpandedJobChange:K,onOpenSchedule:ha}):null}];return s.jsxs("div",{className:"max-w-6xl mx-auto space-y-6 pb-20",children:[s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-6",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold text-slate-100 flex items-center gap-3",children:["Automation",s.jsx(St,{variant:qa?"warning":"success",className:"px-3 py-1 text-xs uppercase tracking-wider",children:qa?"Paused":"Active"})]}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Manage automation overview, schedules, jobs, and live queue"})]}),s.jsx(Le,{variant:qa?"primary":"outline",size:"lg",className:qa?"bg-emerald-600 hover:bg-emerald-700":"border-slate-700 hover:bg-slate-800",onClick:bn,loading:h,children:qa?s.jsxs(s.Fragment,{children:[s.jsx(vn,{className:"h-5 w-5 mr-2 fill-current"})," Resume Scheduling"]}):s.jsxs(s.Fragment,{children:[s.jsx(iu,{className:"h-5 w-5 mr-2"})," Pause Scheduling"]})})]}),s.jsx(jp,{tabs:Zs,activeTab:D,onChange:M}),ve&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx(Ys,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"Unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save to apply and reinstall cron schedules"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Le,{variant:"ghost",size:"sm",onClick:ma,className:"text-slate-400",children:[s.jsx(fh,{className:"h-4 w-4 mr-1.5"}),"Reset"]}),s.jsxs(Le,{variant:"primary",size:"sm",onClick:en,loading:G,children:[s.jsx(op,{className:"h-4 w-4 mr-1.5"}),"Save"]})]})]})})]})},qw=({isOpen:n,onClose:r,title:o,children:u})=>(L.useEffect(()=>{const h=f=>{f.key==="Escape"&&r()};return n&&(document.addEventListener("keydown",h),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",h),document.body.style.overflow="unset"}},[n,r]),n?c1.createPortal(s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm transition-opacity",onClick:r,"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-2xl transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl transition-all flex flex-col max-h-[90vh]",children:[s.jsxs("div",{className:"flex items-center justify-between border-b border-slate-800 px-6 py-4",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:o}),s.jsx("button",{onClick:r,className:"rounded-full p-1 text-slate-400 hover:bg-slate-800 hover:text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500",children:s.jsx(Gr,{className:"h-5 w-5"})})]}),s.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-6 text-slate-300",children:u})]})]}),document.body):null),Vw=n=>["TOKEN","SECRET","KEY","PASSWORD","AUTH","API_KEY"].some(o=>n.toUpperCase().includes(o)),Bw=({value:n,isSensitive:r})=>{const[o,u]=_e.useState(!1);return r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm text-slate-300 font-mono",children:o?n:"***********"}),s.jsx("button",{type:"button",onClick:()=>u(!o),className:"text-slate-500 hover:text-slate-300","aria-label":o?"Hide sensitive value":"Show sensitive value",title:o?"Hide sensitive value":"Show sensitive value",children:o?s.jsx(J1,{className:"h-4 w-4"}):s.jsx(oh,{className:"h-4 w-4"})})]}):s.jsx("span",{className:"text-sm text-slate-300 font-mono truncate max-w-xs",children:n})},ev=({envVars:n,onChange:r,compact:o=!1})=>{const[u,h]=_e.useState(""),[f,b]=_e.useState(""),[j,y]=_e.useState(null),[x,w]=_e.useState(""),{addToast:T}=Ft(),z=()=>{if(u.trim()){if(!/^[A-Z_][A-Z0-9_]*$/.test(u)){T({title:"Invalid Key Format",message:"Key must be uppercase with underscores (e.g., API_KEY)",type:"error"});return}r({...n,[u]:f}),h(""),b("")}},_=D=>{const M={...n};delete M[D],r(M)},N=D=>{y(D),w(n[D]??"")},O=()=>{j&&(r({...n,[j]:x}),y(null),w(""))},k=()=>{y(null),w("")},Y=Object.entries(n);return s.jsxs("div",{className:"space-y-4",children:[!o&&s.jsx("div",{className:"text-sm text-slate-400 mb-4",children:"Configure environment variables passed to the provider CLI (API keys, base URLs)"}),s.jsx("div",{className:"space-y-2",children:Y.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No environment variables configured."}):Y.map(([D,M])=>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:D}),j===D?s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("input",{type:"text",value:x,onChange:V=>w(V.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:O,className:"p-1 text-green-400 hover:text-green-300","aria-label":`Save ${D} value`,title:`Save ${D} value`,children:s.jsx(M1,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:k,className:"p-1 text-slate-400 hover:text-slate-300","aria-label":`Cancel editing ${D}`,title:`Cancel editing ${D}`,children:s.jsx(Gr,{className:"h-4 w-4"})})]}):s.jsx(Bw,{value:M,isSensitive:Vw(D)})]}),j!==D&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>N(D),className:"p-1 text-slate-400 hover:text-slate-200","aria-label":`Edit ${D}`,title:`Edit ${D}`,children:s.jsx(pu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>_(D),className:"p-1 text-red-400 hover:text-red-300","aria-label":`Delete ${D}`,title:`Delete ${D}`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]},D))}),s.jsxs("div",{className:`flex items-end gap-3 ${o?"":"pt-4 border-t border-slate-800"}`,children:[s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Key"}),s.jsx("input",{type:"text",value:u,onChange:D=>h(D.target.value.toUpperCase()),placeholder:o?"ENV_VAR_NAME":"e.g., ANTHROPIC_BASE_URL",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs("div",{className:"flex-1",children:[!o&&s.jsx("label",{className:"block text-xs font-medium text-slate-500 mb-1",children:"Value"}),s.jsx("input",{type:"text",value:f,onChange:D=>b(D.target.value),placeholder:o?"value":"e.g., https://api.example.com",className:"w-full bg-slate-800 border border-slate-700 rounded px-3 py-2 text-sm text-slate-200 placeholder-slate-500"})]}),s.jsxs(Le,{onClick:z,disabled:!u.trim(),size:o?"sm":"md",children:[s.jsx(Kl,{className:"h-4 w-4 mr-1"}),"Add"]})]})]})};function $w(n,r){var o;return!!(n!=null&&n.startsWith("glm-")||(o=r==null?void 0:r.model)!=null&&o.startsWith("glm-"))}function Yw(n,r){var o,u;return $w(n,r)?!((u=(o=r==null?void 0:r.envVars)==null?void 0:o.ANTHROPIC_API_KEY)!=null&&u.trim()):!1}const Cx={claude:{name:"Claude",command:"claude",promptFlag:"-p",autoApproveFlag:"--dangerously-skip-permissions"},codex:{name:"Codex",command:"codex",subcommand:"exec",autoApproveFlag:"--yolo",workdirFlag:"-C"},custom:{name:"",command:""}},Pw=({isOpen:n,onClose:r,onSave:o,presetId:u,preset:h,isBuiltIn:f,existingIds:b})=>{const[j,y]=_e.useState(""),[x,w]=_e.useState({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),[T,z]=_e.useState(!1),[_,N]=_e.useState("custom"),[O,k]=_e.useState(null),Y=Yw(u??j,x);_e.useEffect(()=>{n&&(u&&h?(y(u),w({name:h.name,command:h.command,subcommand:h.subcommand??"",promptFlag:h.promptFlag??"",autoApproveFlag:h.autoApproveFlag??"",workdirFlag:h.workdirFlag??"",modelFlag:h.modelFlag??"",model:h.model??"",envVars:h.envVars??{}}),u==="claude"||h.command==="claude"?N("claude"):u==="codex"||h.command==="codex"?N("codex"):N("custom")):(y(""),w({name:"",command:"",subcommand:"",promptFlag:"",autoApproveFlag:"",workdirFlag:"",modelFlag:"",model:"",envVars:{}}),N("custom")),k(null),z(!!(h!=null&&h.envVars&&Object.keys(h.envVars).length>0)))},[n,u,h]);const D=$=>{if(N($),$!=="custom"&&Cx[$]){const W=Cx[$];w(R=>({...R,...W,envVars:R.envVars})),!u&&!j&&y($)}},M=($,W)=>{w(R=>({...R,[$]:W})),k(null)},V=()=>{if(!x.name.trim())return k("Name is required"),!1;if(!x.command.trim())return k("Command is required"),!1;if(!u){if(!j.trim())return k("Preset ID is required"),!1;if(!/^[a-z0-9_-]+$/.test(j))return k("Preset ID must be lowercase letters, numbers, hyphens, and underscores only"),!1;if(b.includes(j))return k("A preset with this ID already exists"),!1}return!0},K=()=>{var W,R,ae,C,J,ne;if(!V())return;const $={name:x.name.trim(),command:x.command.trim()};(W=x.subcommand)!=null&&W.trim()&&($.subcommand=x.subcommand.trim()),(R=x.promptFlag)!=null&&R.trim()&&($.promptFlag=x.promptFlag.trim()),(ae=x.autoApproveFlag)!=null&&ae.trim()&&($.autoApproveFlag=x.autoApproveFlag.trim()),(C=x.workdirFlag)!=null&&C.trim()&&($.workdirFlag=x.workdirFlag.trim()),(J=x.modelFlag)!=null&&J.trim()&&($.modelFlag=x.modelFlag.trim()),(ne=x.model)!=null&&ne.trim()&&($.model=x.model.trim()),x.envVars&&Object.keys(x.envVars).length>0&&($.envVars=x.envVars),o(u||j,$),r()};return s.jsx(qw,{isOpen:n,onClose:r,title:u?`Edit Preset: ${h==null?void 0:h.name}`:"Add Provider Preset",children:s.jsxs("div",{className:"space-y-6",children:[O&&s.jsx("div",{className:"p-3 rounded-md bg-red-500/10 border border-red-500/20 text-red-400 text-sm",children:O}),Y&&s.jsx("div",{className:"p-3 rounded-md bg-amber-500/10 border border-amber-500/20 text-amber-300 text-sm",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Ys,{className:"h-4 w-4 shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:"GLM presets require `ANTHROPIC_API_KEY`."}),s.jsx("div",{className:"text-amber-200/80",children:"Add `ANTHROPIC_API_KEY` in Environment Variables before using this preset."})]})]})}),!f&&s.jsx("div",{children:s.jsx(ct,{label:"Template",value:_,onChange:D,options:[{label:"Start from scratch",value:"custom"},{label:"Claude (Anthropic)",value:"claude"},{label:"Codex (OpenAI)",value:"codex"}],helperText:"Start with a pre-configured template or customize from scratch"})}),!u&&s.jsx(Oe,{label:"Preset ID",value:j,onChange:$=>y($.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,"")),placeholder:"e.g., my-custom-provider",helperText:"Unique identifier for this preset (lowercase, numbers, hyphens, underscores)"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Oe,{label:"Display Name",value:x.name,onChange:$=>M("name",$.target.value),placeholder:"e.g., My Custom Provider",required:!0}),s.jsx(Oe,{label:"Command",value:x.command,onChange:$=>M("command",$.target.value),placeholder:"e.g., claude, codex, npx",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Oe,{label:"Model",value:x.model??"",onChange:$=>M("model",$.target.value),placeholder:"e.g., claude-opus-4-6",helperText:"Default model to use"}),s.jsx(Oe,{label:"Model Flag",value:x.modelFlag??"",onChange:$=>M("modelFlag",$.target.value),placeholder:"e.g., --model",helperText:"Flag for specifying the model"})]}),s.jsxs("div",{className:"border-t border-slate-800 pt-4",children:[s.jsxs("button",{type:"button",onClick:()=>z(!T),className:"flex items-center gap-2 text-sm text-slate-400 hover:text-slate-200 transition-colors",children:[T?s.jsx(z1,{className:"h-4 w-4"}):s.jsx(ch,{className:"h-4 w-4"}),"Advanced Options"]}),T&&s.jsxs("div",{className:"mt-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Oe,{label:"Subcommand",value:x.subcommand??"",onChange:$=>M("subcommand",$.target.value),placeholder:"e.g., exec",helperText:"Subcommand after base command"}),s.jsx(Oe,{label:"Prompt Flag",value:x.promptFlag??"",onChange:$=>M("promptFlag",$.target.value),placeholder:"e.g., -p",helperText:"Flag for passing the prompt"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsx(Oe,{label:"Auto-Approve Flag",value:x.autoApproveFlag??"",onChange:$=>M("autoApproveFlag",$.target.value),placeholder:"e.g., --dangerously-skip-permissions",helperText:"Flag to enable auto-approve mode"}),s.jsx(Oe,{label:"Workdir Flag",value:x.workdirFlag??"",onChange:$=>M("workdirFlag",$.target.value),placeholder:"e.g., -C",helperText:"Flag for setting working directory"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Environment Variables"}),s.jsx(ev,{envVars:x.envVars??{},onChange:$=>M("envVars",$),compact:!0})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t border-slate-800",children:[s.jsx(Le,{variant:"ghost",onClick:r,children:"Cancel"}),s.jsx(Le,{onClick:K,children:u?"Save Changes":"Add Preset"})]})]})})},Fw=({form:n,updateField:r,projectName:o,doctorChecks:u,doctorLoading:h})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(lt,{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(Oe,{label:"Project Name",value:o,disabled:!0}),s.jsx(Oe,{label:"Default Branch",value:n.defaultBranch,onChange:f=>r("defaultBranch",f.target.value)}),s.jsx(Oe,{label:"PRD Directory",value:n.prdDir,onChange:f=>r("prdDir",f.target.value),helperText:"Directory containing PRD files (relative to project root)"}),s.jsx(Oe,{label:"Branch Prefix",value:n.branchPrefix,onChange:f=>r("branchPrefix",f.target.value)}),s.jsx(Oe,{label:"Templates Directory",value:n.templatesDir,onChange:f=>r("templatesDir",f.target.value),helperText:"Directory for custom template overrides"}),s.jsx(Oe,{label:"Max Log Size",type:"number",value:String(n.maxLogSize),onChange:f=>r("maxLogSize",Number(f.target.value||0)),rightIcon:s.jsx("span",{className:"text-xs",children:"bytes"}),helperText:"Maximum size for process log files"})]}),s.jsxs("div",{className:"pt-4 mt-4 border-t border-slate-800 space-y-6",children:[s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/40 p-4",children:[s.jsx(la,{checked:n.gitPushNoVerify,onChange:f=>r("gitPushNoVerify",f),label:"Use --no-verify on automated pushes"}),s.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Project-scoped. Bypasses local pre-push hooks for Night Watch controller and agent pushes in repos whose hooks block automation."})]}),s.jsx(dc,{label:"Branch Patterns",value:n.branchPatterns,onChange:f=>r("branchPatterns",f),placeholder:"e.g., feat/",helpText:"Branch patterns matched by reviewer and related automation jobs"}),s.jsx(dc,{label:"PRD Priority",value:n.prdPriority,onChange:f=>r("prdPriority",f),placeholder:"e.g., feature-x",helpText:"PRDs matching these names are executed first"})]})]})}),s.jsxs(lt,{className:"divide-y divide-slate-800",children:[s.jsxs("div",{className:"p-4 flex items-center gap-2",children:[s.jsx(ap,{className:"h-4 w-4 text-indigo-500"}),s.jsx("h3",{className:"text-base font-medium text-slate-200",children:"System Health"})]}),h?s.jsx("div",{className:"p-4 text-sm text-slate-500",children:"Loading health checks..."}):u.map((f,b)=>{const j=f.status==="pass",y=f.status==="warn",x=j?"bg-green-500/10 text-green-400 border-green-500/20":y?"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-red-500/10 text-red-400 border-red-500/20";return s.jsxs("div",{className:"p-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-slate-200",children:f.name}),s.jsx("p",{className:"text-xs text-slate-500",children:f.detail})]}),s.jsx("span",{className:`inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${x}`,children:f.status.toUpperCase()})]},`${f.name}-${b}`)})]})]}),Mx=({presetId:n,preset:r,isBuiltIn:o,onEdit:u,onDelete:h,onReset:f})=>{var x,w,T;const b=r.envVars?Object.keys(r.envVars).length:0,y=(n.startsWith("glm-")||((x=r.model)==null?void 0:x.startsWith("glm-")))&&!((T=(w=r.envVars)==null?void 0:w.ANTHROPIC_API_KEY)!=null&&T.trim());return s.jsxs("div",{className:"flex flex-col p-4 rounded-lg border border-slate-800 bg-slate-950/40 hover:border-slate-700 transition-colors",children:[s.jsxs("div",{className:"flex items-start justify-between gap-2 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h4",{className:"text-sm font-medium text-slate-200",children:r.name}),o&&s.jsx(St,{variant:"info",className:"text-[10px]",children:"Built-in"}),y&&s.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] bg-amber-900/40 text-amber-400 border border-amber-800/50",title:"GLM presets require ANTHROPIC_API_KEY in env vars",children:[s.jsx(Ys,{className:"h-3 w-3"}),"Missing ANTHROPIC_API_KEY"]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{type:"button",onClick:u,className:"p-1.5 text-slate-400 hover:text-slate-200 hover:bg-slate-800 rounded transition-colors","aria-label":`Edit ${r.name} preset`,title:"Edit preset",children:s.jsx(pu,{className:"h-4 w-4"})}),o?f&&s.jsx("button",{type:"button",onClick:f,className:"p-1.5 text-slate-400 hover:text-indigo-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Reset ${r.name} to defaults`,title:"Reset to defaults",children:s.jsx(fh,{className:"h-4 w-4"})}):h&&s.jsx("button",{type:"button",onClick:h,className:"p-1.5 text-slate-400 hover:text-red-400 hover:bg-slate-800 rounded transition-colors","aria-label":`Delete ${r.name} preset`,title:"Delete preset",children:s.jsx(Fs,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Command:"}),s.jsxs("code",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-indigo-400 font-mono",children:[r.command,r.subcommand&&` ${r.subcommand}`]})]}),r.model&&s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-xs text-slate-500",children:"Model:"}),s.jsx(St,{variant:"neutral",className:"text-[10px] font-mono",children:r.model})]}),s.jsxs("div",{className:"flex items-center gap-3 mt-auto pt-2 border-t border-slate-800/50",children:[s.jsxs("span",{className:"text-xs text-slate-600 font-mono",children:["id: ",n]}),b>0&&s.jsxs("span",{className:"text-xs text-slate-500",children:[b," env var",b!==1?"s":""]})]})]})},Qf={0:"Su",1:"Mo",2:"Tu",3:"We",4:"Th",5:"Fr",6:"Sa"},Xf={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics",planner:"Planner","pr-resolver":"PR Resolver",merger:"Merger"},Vf={label:"",presetId:"",days:[1,2,3,4,5],startTime:"23:00",endTime:"04:00",jobTypes:null,enabled:!0},Ox=({override:n,onChange:r,onSave:o,onCancel:u,isNew:h,presetOptions:f})=>{const b=N=>{const O=n.days.includes(N)?n.days.filter(k=>k!==N):[...n.days,N].sort((k,Y)=>k-Y);r({...n,days:O})},j=()=>{r({...n,days:[1,2,3,4,5]})},y=()=>{r({...n,days:[0,6]})},x=()=>{r({...n,days:[0,1,2,3,4,5,6]})},w=()=>{r({...n,jobTypes:null})},T=N=>{const O=n.jobTypes??[],k=O.includes(N)?O.filter(Y=>Y!==N):[...O,N];r({...n,jobTypes:k.length===0?null:k})},z=n.jobTypes===null||n.jobTypes===void 0,_=n.label.trim().length>0&&n.presetId.trim().length>0&&n.days.length>0&&n.startTime.trim().length>0&&n.endTime.trim().length>0;return 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(Oe,{label:"Label",value:n.label,onChange:N=>r({...n,label:N.target.value}),placeholder:"e.g., Night Hours",required:!0}),s.jsx(ct,{label:"Provider",value:n.presetId,onChange:N=>r({...n,presetId:N}),options:f})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Days"}),s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Object.keys(Qf).map(N=>s.jsx("button",{type:"button",onClick:()=>b(N),className:`w-10 h-10 rounded-md text-sm font-medium transition-colors ${n.days.includes(N)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:Qf[N]},N)),s.jsxs("div",{className:"flex gap-1 ml-2",children:[s.jsx("button",{type:"button",onClick:j,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekdays"}),s.jsx("button",{type:"button",onClick:y,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"Weekend"}),s.jsx("button",{type:"button",onClick:x,className:"px-3 py-2 text-xs rounded-md bg-slate-800 text-slate-400 hover:bg-slate-700 transition-colors",children:"All"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Start Time"}),s.jsx("input",{type:"time",value:n.startTime,onChange:N=>r({...n,startTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"End Time"}),s.jsx("input",{type:"time",value:n.endTime,onChange:N=>r({...n,endTime:N.target.value}),className:"w-full h-10 px-3 rounded-md bg-slate-800 border border-slate-700 text-slate-200 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500"})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Job Types"}),s.jsx("button",{type:"button",onClick:w,className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:z?"All Jobs Selected":"Select All Jobs"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(Xf).filter(N=>N!=="planner").map(N=>{var k;const O=z||(((k=n.jobTypes)==null?void 0:k.includes(N))??!1);return s.jsx("button",{type:"button",onClick:()=>T(N),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${O?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,disabled:z,children:Xf[N]},N)})}),z&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"This override applies to all job types."})]}),s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(la,{checked:n.enabled,onChange:N=>r({...n,enabled:N}),label:"Enabled"})}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(Le,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(Le,{onClick:o,disabled:!_,children:h?"Add Override":"Save Changes"})]})]})},Gw=({overrides:n,onChange:r,presetOptions:o})=>{const[u,h]=_e.useState(null),[f,b]=_e.useState(!1),[j,y]=_e.useState(Vf),x=()=>{r([...n,j]),y({...Vf}),b(!1)},w=(k,Y)=>{const D=[...n];D[k]=Y,r(D)},T=k=>{window.confirm("Are you sure you want to delete this schedule override?")&&r(n.filter((Y,D)=>D!==k))},z=k=>{const Y=[...n];Y[k]={...Y[k],enabled:!Y[k].enabled},r(Y)},_=k=>k.length===7?"Every day":k.length===5&&k.every(Y=>Y>=1&&Y<=5)?"Weekdays":k.length===2&&k.includes(0)&&k.includes(6)?"Weekends":k.map(Y=>Qf[Y]).join(", "),N=k=>!k||k.length===0?"All Jobs":k.map(Y=>Xf[Y]).join(", "),O=k=>{const Y=o.find(D=>D.value===k);return(Y==null?void 0:Y.label)||k};return s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"space-y-3",children:n.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No schedule overrides configured."}):n.map((k,Y)=>s.jsx("div",{children:u===Y?s.jsx(Ox,{override:k,onChange:D=>w(Y,D),onSave:()=>h(null),onCancel:()=>h(null),presetOptions:o}):s.jsxs("div",{className:`flex items-start justify-between p-4 rounded-md border bg-slate-950/40 ${k.enabled?"border-slate-800":"border-slate-800/50 opacity-60"}`,children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[s.jsx(la,{checked:k.enabled,onChange:()=>z(Y)}),s.jsx("span",{className:"text-slate-100 font-medium",children:k.label})]}),s.jsxs("div",{className:"text-sm text-slate-400 ml-11",children:[s.jsx("span",{className:"text-indigo-400",children:O(k.presetId)})," · ",_(k.days)," · ",k.startTime," - ",k.endTime," · ",N(k.jobTypes)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("button",{type:"button",onClick:()=>h(Y),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${k.label}`,title:`Edit ${k.label}`,children:s.jsx(pu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>T(Y),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${k.label}`,title:`Delete ${k.label}`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]})},Y))}),f?s.jsx(Ox,{override:j,onChange:y,onSave:x,onCancel:()=>{b(!1),y({...Vf})},isNew:!0,presetOptions:o}):s.jsxs(Le,{variant:"ghost",onClick:()=>b(!0),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Schedule Override"]})]})},Zw=({form:n,updateField:r,getAllPresets:o,getPresetOptions:u,handleEditPreset:h,handleDeletePreset:f,handleResetPreset:b,handleAddPreset:j})=>s.jsxs("div",{className:"space-y-6",children:[s.jsx(lt,{className:"p-6 bg-slate-900/60 border-indigo-500/20",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-100",children:"Global AI Provider"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Default preset for all automation tasks"})]}),s.jsx("div",{className:"w-full md:w-72",children:s.jsx(ct,{value:n.provider,onChange:y=>r("provider",y),options:u(n.providerPresets)})})]})}),s.jsxs(lt,{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:"Available Presets"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Custom AI models and environment configurations"})]}),s.jsxs(Le,{onClick:j,variant:"primary",size:"sm",children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Provider"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[fu.map(y=>{const w=o()[y];return w?s.jsx(Mx,{presetId:y,preset:w,isBuiltIn:!0,onEdit:()=>h(y),onReset:()=>b(y)},y):null}),Object.entries(n.providerPresets).filter(([y])=>!fu.includes(y)).map(([y,x])=>s.jsx(Mx,{presetId:y,preset:x,isBuiltIn:!1,onEdit:()=>h(y),onDelete:()=>f(y)},y))]})]}),s.jsxs(lt,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Reliability & Fallbacks"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Configure automated fallback when a provider is rate-limited"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(ct,{label:"Primary Native Fallback",value:n.primaryFallbackModel,onChange:y=>r("primaryFallbackModel",y),options:[{label:"— None —",value:""},{label:"Claude Sonnet 4.6",value:"sonnet"},{label:"Claude Opus 4.6",value:"opus"}],helperText:"Used only when no primary fallback preset is configured"}),s.jsx(ct,{label:"Secondary Native Fallback",value:n.secondaryFallbackModel,onChange:y=>r("secondaryFallbackModel",y),options:[{label:"— None —",value:""},{label:"Claude Sonnet 4.6",value:"sonnet"},{label:"Claude Opus 4.6",value:"opus"}],helperText:"Tried only if the primary native fallback also rate-limits"}),s.jsx(ct,{label:"Primary Fallback Preset",value:n.primaryFallbackPreset,onChange:y=>r("primaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(o()).map(([y,x])=>({label:x.name,value:y}))],helperText:"Automatic switch when global provider is throttled"}),s.jsx(ct,{label:"Secondary Fallback Preset",value:n.secondaryFallbackPreset,onChange:y=>r("secondaryFallbackPreset",y),options:[{label:"— None —",value:""},...Object.entries(o()).map(([y,x])=>({label:x.name,value:y}))]})]})]}),s.jsxs(lt,{className:"p-6 space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Scheduled Overrides"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Automatically switch providers based on the time of day (e.g. use cheaper models at night)"})]}),s.jsx(Gw,{overrides:n.providerScheduleOverrides,onChange:y=>r("providerScheduleOverrides",y),presetOptions:Object.entries(o()).map(([y,x])=>({label:x.name,value:y}))})]}),s.jsxs(lt,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Global Environment Variables"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Variables passed to all provider CLI executions"}),s.jsx(ev,{envVars:n.providerEnv,onChange:y=>r("providerEnv",y)})]})]});function Rx(n){return n.type==="telegram"?`telegram:${n.botToken}:${n.chatId}`:`${n.type}:${n.url}`}const Ww=[{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:"Merge Completed",value:"merge_completed"},{label:"Merge Failed",value:"merge_failed"},{label:"Rate Limit Fallback",value:"rate_limit_fallback"},{label:"QA Completed",value:"qa_completed"}],Iw=(n,r)=>n.includes(r)?n.filter(o=>o!==r):[...n,r],Dx=({webhook:n,onChange:r,onSave:o,onCancel:u,isNew:h})=>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(ct,{label:"Type",value:n.type,onChange:f=>{const b=f;r(b==="telegram"?{type:b,botToken:"",chatId:"",events:n.events}:{type:b,url:"",events:n.events})},options:[{label:"Slack",value:"slack"},{label:"Discord",value:"discord"},{label:"Telegram",value:"telegram"}]}),n.type==="telegram"?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"relative",children:s.jsx(Oe,{label:"Bot Token",type:"password",value:n.botToken||"",onChange:f=>r({...n,botToken:f.target.value}),placeholder:"123456789:ABCdefGHIjklMNOpqrsTUVwxyz"})}),s.jsx(Oe,{label:"Chat ID",value:n.chatId||"",onChange:f=>r({...n,chatId:f.target.value}),placeholder:"123456789"})]}):s.jsx("div",{className:"md:col-span-2",children:s.jsx(Oe,{label:"Webhook URL",type:"password",value:n.url||"",onChange:f=>r({...n,url:f.target.value}),placeholder:"https://hooks.slack.com/services/..."})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Ww.map(f=>s.jsx("button",{type:"button",onClick:()=>r({...n,events:Iw(n.events,f.value)}),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${n.events.includes(f.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:f.label},f.value))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Le,{variant:"ghost",onClick:u,children:"Cancel"}),s.jsx(Le,{onClick:o,disabled:n.events.length===0||(n.type==="telegram"?!n.botToken||!n.chatId:!n.url),children:h?"Add Webhook":"Save Changes"})]})]}),Qw=({notifications:n,onChange:r,globalWebhook:o,onSetGlobal:u,onUnsetGlobal:h})=>{const[f,b]=_e.useState(null),[j,y]=_e.useState(!1),[x,w]=_e.useState({type:"slack",url:"",events:[]}),T=()=>{r({webhooks:[...n.webhooks,x]}),w({type:"slack",url:"",events:[]}),y(!1)},z=(N,O)=>{const k=[...n.webhooks];k[N]=O,r({webhooks:k})},_=N=>{r({webhooks:n.webhooks.filter((O,k)=>k!==N)})};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:n.webhooks.length===0?s.jsx("p",{className:"text-slate-500 text-sm italic",children:"No webhooks configured."}):n.webhooks.map((N,O)=>s.jsx("div",{children:f===O?s.jsx(Dx,{webhook:N,onChange:k=>z(O,k),onSave:()=>b(null),onCancel:()=>b(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:N.type}),N.type==="telegram"&&s.jsxs("span",{className:"text-xs text-slate-500",children:["Chat ID: ",N.chatId]})]}),s.jsx("div",{className:"flex flex-wrap gap-1",children:N.events.map(k=>s.jsx("span",{className:"px-2 py-0.5 bg-slate-800 rounded text-xs text-slate-400",children:k.replace("_"," ")},k))})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[u!==void 0&&(()=>{const k=o!=null&&Rx(N)===Rx(o);return s.jsx("button",{type:"button",onClick:()=>k?h==null?void 0:h():u(N),className:`p-2 transition-colors ${k?"text-indigo-400 hover:text-indigo-300":"text-slate-500 hover:text-slate-300"}`,"aria-label":k?"Global channel (active)":"Set as global channel",title:k?"Global channel (active)":"Set as global channel",children:s.jsx(lj,{className:"h-4 w-4"})})})(),s.jsx("button",{type:"button",onClick:()=>b(O),className:"p-2 text-slate-400 hover:text-slate-200","aria-label":`Edit ${N.type} webhook`,title:`Edit ${N.type} webhook`,children:s.jsx(pu,{className:"h-4 w-4"})}),s.jsx("button",{type:"button",onClick:()=>_(O),className:"p-2 text-red-400 hover:text-red-300","aria-label":`Delete ${N.type} webhook`,title:`Delete ${N.type} webhook`,children:s.jsx(Fs,{className:"h-4 w-4"})})]})]})},O))}),j?s.jsx(Dx,{webhook:x,onChange:w,onSave:T,onCancel:()=>y(!1),isNew:!0}):s.jsxs(Le,{variant:"ghost",onClick:()=>y(!0),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add Webhook"]})]})},kx=[{label:"Executor",value:"executor"},{label:"Reviewer",value:"reviewer"},{label:"QA",value:"qa"},{label:"Audit",value:"audit"},{label:"Slicer / Planner",value:"slicer"},{label:"Analytics",value:"analytics"},{label:"PR Resolver",value:"pr-resolver"},{label:"Merger",value:"merger"}],Ax=[{label:"workflow_run",value:"workflow_run"},{label:"check_suite",value:"check_suite"},{label:"pull_request",value:"pull_request"},{label:"repository_dispatch",value:"repository_dispatch"}];function Xw(n){return encodeURIComponent(n.replace(/\//g,"~"))}function Jw(){return typeof window>"u"||window.location.origin==="null"?"":window.location.origin}function Kw(n){return(n==null?void 0:n.join(", "))??""}function eS(n){const r=n.split(",").map(o=>o.trim()).filter(Boolean);return r.length>0?r:void 0}function tS(n){return{event:"workflow_run",action:"completed",jobId:n}}function aS(n,r,o){const u=n&&r?`/api/projects/${Xw(r)}/jobs/${o}/run`:`/api/jobs/${o}/run`;return`${Jw()}${u}`}function nS(n){return[`payload='{"source":"manual"}'`,`signature=$(printf '%s' "$payload" | openssl dgst -sha256 -hmac "$NIGHT_WATCH_WEBHOOK_SECRET" | awk '{print $2}')`,`curl -X POST '${n}' \\`," -H 'Content-Type: application/json' \\",' -H "X-Night-Watch-Signature: sha256=$signature" \\',' --data "$payload"'].join(`
442
- `)}const lS=({form:n,updateField:r,globalWebhook:o,isGlobalMode:u=!1,onSetGlobal:h,onUnsetGlobal:f,selectedProjectId:b})=>{const[j,y]=_e.useState(null),x=n.webhookTriggers,w=x.allowedJobIds[0]??"reviewer",T=aS(u,b,w),z=nS(T),_=V=>{r("webhookTriggers",{...x,...V})},N=V=>{_({github:{...x.github,...V}})},O=V=>{const K=x.allowedJobIds.includes(V)?x.allowedJobIds.filter($=>$!==V):[...x.allowedJobIds,V];_({allowedJobIds:K})},k=V=>{const K=x.github.events.includes(V)?x.github.events.filter($=>$!==V):[...x.github.events,V];N({events:K})},Y=(V,K)=>{const $=x.github.rules.map((W,R)=>R===V?{...W,...K}:W);N({rules:$})},D=V=>{N({rules:x.github.rules.filter((K,$)=>$!==V)})},M=async(V,K)=>{var $;await(($=navigator.clipboard)==null?void 0:$.writeText(V)),y(K),window.setTimeout(()=>y(null),1500)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(lt,{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 mt-1",children:"Track PRDs and their status using GitHub Projects or local SQLite"})]}),s.jsx(la,{checked:n.boardProvider.enabled,onChange:V=>r("boardProvider",{...n.boardProvider,enabled:V})})]}),n.boardProvider.enabled&&s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(ct,{label:"Board Provider",value:n.boardProvider.provider,onChange:V=>r("boardProvider",{...n.boardProvider,provider:V}),options:[{label:"GitHub Projects",value:"github"},{label:"Local (SQLite)",value:"local"}]}),n.boardProvider.provider==="github"&&s.jsxs(s.Fragment,{children:[s.jsx(Oe,{label:"Project Number",type:"number",value:String(n.boardProvider.projectNumber||""),onChange:V=>r("boardProvider",{...n.boardProvider,projectNumber:V.target.value?Number(V.target.value):void 0}),helperText:"GitHub Projects V2 project number"}),s.jsx(Oe,{label:"Repository",value:n.boardProvider.repo||"",onChange:V=>r("boardProvider",{...n.boardProvider,repo:V.target.value||void 0}),helperText:"owner/repo (auto-detected if empty)"})]}),n.boardProvider.provider==="local"&&s.jsx("div",{className:"md:col-span-2",children:s.jsx("p",{className:"text-sm text-slate-400",children:"Local board uses SQLite for storage — no additional configuration needed."})})]})]}),s.jsxs(lt,{className:"p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200",children:"Inbound Webhook Triggers"}),s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"Run signed Night Watch jobs from external systems"})]}),s.jsx(la,{checked:x.enabled,label:"Enabled",name:"webhookTriggers.enabled",onChange:V=>_({enabled:V})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 pt-6 border-t border-slate-800",children:[s.jsx(Oe,{label:"Secret Environment Variable",name:"webhookTriggers.secretEnv",value:x.secretEnv,onChange:V=>_({secretEnv:V.target.value}),helperText:"Server environment variable containing the shared HMAC secret"}),s.jsx(Oe,{label:"Signature Max Skew",min:0,name:"webhookTriggers.maxSkewSeconds",type:"number",value:String(x.maxSkewSeconds),onChange:V=>_({maxSkewSeconds:V.target.value?Math.max(0,Number(V.target.value)):0}),helperText:"Seconds, used when timestamp validation is required"}),s.jsx("div",{className:"md:col-span-2",children:s.jsx(la,{checked:x.requireTimestamp,label:"Require timestamp header",name:"webhookTriggers.requireTimestamp",onChange:V=>_({requireTimestamp:V})})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Allowed Jobs"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:kx.map(V=>s.jsx("button",{type:"button","aria-pressed":x.allowedJobIds.includes(V.value),onClick:()=>O(V.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.allowedJobIds.includes(V.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:V.label},V.value))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsx(Oe,{label:"Endpoint URL",readOnly:!0,value:T}),s.jsx(Le,{"aria-label":"Copy endpoint URL",size:"icon",type:"button",variant:"outline",onClick:()=>M(T,"endpoint"),children:s.jsx(Lg,{className:"h-4 w-4"})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400",children:"Signed curl Example"}),s.jsxs(Le,{size:"sm",type:"button",variant:"ghost",onClick:()=>M(z,"curl"),children:[s.jsx(Lg,{className:"h-4 w-4 mr-2"}),j==="curl"?"Copied":"Copy"]})]}),s.jsx("pre",{className:"overflow-x-auto rounded-lg border border-slate-800 bg-slate-950 p-3 text-xs text-slate-300",children:s.jsx("code",{children:z})})]})]}),s.jsxs("div",{className:"space-y-4 pt-6 border-t border-slate-800",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-slate-300",children:"GitHub Events"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Rules dispatch the configured job when GitHub payloads match"})]}),s.jsx(la,{checked:x.github.enabled,label:"Enabled",name:"webhookTriggers.github.enabled",onChange:V=>N({enabled:V})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-slate-400 mb-2",children:"Selected Events"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:Ax.map(V=>s.jsx("button",{type:"button","aria-pressed":x.github.events.includes(V.value),onClick:()=>k(V.value),className:`px-3 py-1.5 rounded-md text-sm transition-colors ${x.github.events.includes(V.value)?"bg-indigo-600 text-white":"bg-slate-800 text-slate-400 hover:bg-slate-700"}`,children:V.label},V.value))})]}),s.jsxs("div",{className:"space-y-3",children:[x.github.rules.map((V,K)=>s.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-950/40 p-4 space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[s.jsx(ct,{label:"Event",value:V.event,onChange:$=>Y(K,{event:$}),options:Ax}),s.jsx(Oe,{label:"Action",value:V.action??"",onChange:$=>Y(K,{action:$.target.value||void 0}),placeholder:"completed"}),s.jsx(ct,{label:"Job",value:V.jobId,onChange:$=>Y(K,{jobId:$}),options:kx})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_auto_auto] gap-4 md:items-end",children:[s.jsx(Oe,{label:"Branch Patterns",value:Kw(V.branchPatterns),onChange:$=>Y(K,{branchPatterns:eS($.target.value)}),placeholder:"main, release/*"}),s.jsx(la,{checked:V.onlyOnFailure??!1,label:"Only failures",onChange:$=>Y(K,{onlyOnFailure:$})}),s.jsx(Le,{"aria-label":`Delete GitHub rule ${K+1}`,size:"icon",type:"button",variant:"ghost",onClick:()=>D(K),children:s.jsx(Fs,{className:"h-4 w-4 text-red-400"})})]})]},K)),s.jsxs(Le,{type:"button",variant:"ghost",onClick:()=>N({rules:[...x.github.rules,tS(w)]}),children:[s.jsx(Kl,{className:"h-4 w-4 mr-2"}),"Add GitHub Rule"]})]})]})]}),s.jsxs(lt,{className:"p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-slate-200 mb-2",children:"Notification Webhooks"}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:"Send status updates and job results to custom endpoints or team channels"}),s.jsx(Qw,{notifications:n.notifications,onChange:V=>r("notifications",V),globalWebhook:o,onSetGlobal:h,onUnsetGlobal:f})]})]})};function sS(n,r,o,u){const{addToast:h}=Ft(),[f,b]=L.useState(!1),[j,y]=L.useState(null),[x,w]=L.useState(null),[T,z]=L.useState(null),_=L.useCallback(()=>({...Kp,...n}),[n]),N=L.useCallback($=>{const W=_();return Object.entries(W).map(([R,ae])=>({label:ae.name,value:R}))},[_]),O=L.useCallback($=>{const W=[];r===$&&W.push("Global Provider");const R={executor:"Executor",reviewer:"Reviewer",qa:"QA",audit:"Audit",slicer:"Planner",analytics:"Analytics"};for(const[ae,C]of Object.entries(o))C===$&&W.push(R[ae]??ae);return W},[r,o]),k=L.useCallback(()=>{y(null),w(null),b(!0)},[]),Y=L.useCallback($=>{const R=_()[$];R&&(y($),w(R),b(!0))},[_]),D=L.useCallback(async($,W)=>{const R=!j,ae={...n,[$]:W};u("providerPresets",ae);try{await ou({providerPresets:{[$]:W}}),h({title:R?"Preset Added":"Preset Updated",message:R?`${W.name} has been added. You can now assign it to jobs.`:`${W.name} has been saved.`,type:"success"})}catch(C){h({title:"Save Failed",message:C instanceof Error?C.message:"Failed to save preset",type:"error"}),u("providerPresets",n)}},[j,n,u,h]),M=L.useCallback($=>{var ae,C;if(fu.includes($)){h({title:"Cannot Delete",message:"Built-in presets cannot be deleted.",type:"error"});return}const W=O($);if(W.length>0){z({presetId:$,presetName:((ae=_()[$])==null?void 0:ae.name)??$,references:W});return}const R={...n};delete R[$],u("providerPresets",R),h({title:"Preset Deleted",message:`${((C=_()[$])==null?void 0:C.name)??$} has been removed.`,type:"success"})},[n,u,h,O,_]),V=L.useCallback($=>{const W={...n};delete W[$],u("providerPresets",W),h({title:"Preset Reset",message:`${$} has been reset to built-in defaults.`,type:"success"})},[n,u,h]),K=L.useCallback(()=>{if(!T)return;const{presetId:$}=T,W={...n};delete W[$],u("providerPresets",W);const R={...o};for(const ae of Object.keys(R))R[ae]===$&&delete R[ae];u("jobProviders",R),r===$&&u("provider","claude"),z(null),h({title:"Preset Deleted",message:`${T.presetName} has been removed and all references cleared.`,type:"success"})},[T,n,o,r,u,h]);return{presetModalOpen:f,setPresetModalOpen:b,editingPresetId:j,editingPreset:x,deleteWarning:T,setDeleteWarning:z,getAllPresets:_,getPresetOptions:N,getPresetReferences:O,handleAddPreset:k,handleEditPreset:Y,handleSavePreset:D,handleDeletePreset:M,handleResetPreset:V,handleConfirmDelete:K}}const rS=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],iS=["executor","reviewer","qa","audit","slicer","analytics","pr-resolver","merger"],cS={enabled:!1,secretEnv:"NIGHT_WATCH_WEBHOOK_SECRET",allowedJobIds:iS,requireTimestamp:!1,maxSkewSeconds:300,github:{enabled:!1,events:[],rules:[]}},_x=n=>{const r=n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"",o=n.secondaryFallbackModel!==void 0?n.secondaryFallbackModel??"":n.primaryFallbackModel!==void 0?n.primaryFallbackModel??"":n.claudeModel??"";return{provider:n.provider,providerLabel:n.providerLabel??"",providerPresets:n.providerPresets??{},defaultBranch:n.defaultBranch,prdDir:n.prdDir||"docs/prds",branchPrefix:n.branchPrefix,branchPatterns:n.branchPatterns||[],gitPushNoVerify:n.gitPushNoVerify??!1,executorEnabled:n.executorEnabled??!0,reviewerEnabled:n.reviewerEnabled,minReviewScore:n.minReviewScore,maxRuntime:n.maxRuntime,reviewerMaxRuntime:n.reviewerMaxRuntime,maxLogSize:n.maxLogSize,cronSchedule:n.cronSchedule||Ip,reviewerSchedule:n.reviewerSchedule||Qp,scheduleBundleId:n.scheduleBundleId??null,cronScheduleOffset:n.cronScheduleOffset??0,schedulingPriority:n.schedulingPriority??3,maxRetries:n.maxRetries??3,reviewerMaxRetries:n.reviewerMaxRetries??2,reviewerRetryDelay:n.reviewerRetryDelay??30,reviewerMaxPrsPerRun:n.reviewerMaxPrsPerRun??0,providerEnv:n.providerEnv||{},notifications:n.notifications||{webhooks:[]},prdPriority:n.prdPriority||[],roadmapScanner:n.roadmapScanner||$r(),templatesDir:n.templatesDir||".night-watch/templates",boardProvider:n.boardProvider||{enabled:!0,provider:"github"},jobProviders:n.jobProviders||{},fallbackOnRateLimit:n.fallbackOnRateLimit??!0,primaryFallbackModel:r,secondaryFallbackModel:o,primaryFallbackPreset:n.primaryFallbackPreset??"",secondaryFallbackPreset:n.secondaryFallbackPreset??"",claudeModel:r,providerScheduleOverrides:n.providerScheduleOverrides??[],qa:n.qa||Xp(),audit:n.audit||Jp(),analytics:n.analytics||bh(),feedback:n.feedback??{enabled:!0,confidenceThreshold:.75,augmentationTtlDays:14,maxActiveAugmentations:3,successStreakToExpire:3},prResolver:n.prResolver??gc(),merger:n.merger??yu(),queue:n.queue||{enabled:!0,mode:"conservative",maxConcurrency:1,maxWaitTime:7200,priority:{executor:50,reviewer:40,slicer:30,qa:20,audit:10},providerBuckets:{}},webhookTriggers:n.webhookTriggers??cS}},oS=()=>{const n=An(),r=mu(),{addToast:o,projectName:u,selectedProjectId:h,globalModeLoading:f,isGlobalMode:b,removeProjectFromList:j}=Ft(),[y,x]=_e.useState(!1),[w,T]=_e.useState(!1),[z,_]=_e.useState(!1),[N,O]=_e.useState(null),[k,Y]=_e.useState(void 0),D=_e.useRef(null),[M,V]=_e.useState(!1),K=_e.useRef(!1),$=_e.useRef(!1),[W,R]=_e.useState("project"),ae=_e.useMemo(()=>{const xe=new URLSearchParams(n.search).get("tab");return xe==="jobs"||xe==="schedules"?xe:null},[n.search]),{data:C,loading:J,error:ne,refetch:he}=Ua(xh,[h],{enabled:!f}),{data:ve,loading:ue,refetch:G}=Ua(tN,[h],{enabled:!f}),le=ve??[],de=(xe,Ce)=>{O(Ze=>Ze&&{...Ze,[xe]:Ce})},me=sS((N==null?void 0:N.providerPresets)??{},(N==null?void 0:N.provider)??"claude",(N==null?void 0:N.jobProviders)??{},de);_e.useEffect(()=>{uN().then(xe=>Y(xe.webhook)).catch(()=>{})},[h]),_e.useEffect(()=>{ae&&r({pathname:"/scheduling",search:n.search},{replace:!0})},[ae,n.search,r]),_e.useEffect(()=>{if(ae)return;const Ce=new URLSearchParams(n.search).get("tab");Ce&&R({providers:"ai-providers",runtime:"ai-providers","ai-runtime":"ai-providers",notifications:"integrations",general:"project",advanced:"project"}[Ce]??Ce)},[ae,n.search]),_e.useEffect(()=>{if(C){if(K.current){K.current=!1;return}const xe=_x(C);O(xe),D.current=xe,V(!1)}},[C]),_e.useEffect(()=>{if(!N||!D.current)return;const xe=JSON.stringify(N),Ce=JSON.stringify(D.current);V(xe!==Ce)},[N]),_e.useEffect(()=>{N&&$.current&&($.current=!1,ze())},[N==null?void 0:N.jobProviders]);const ze=async()=>{var Ze,We,kt,ha,Ka,en,ma,ga,bn;if(!N)return;const xe=N.cronSchedule!==(C==null?void 0:C.cronSchedule)||N.reviewerSchedule!==(C==null?void 0:C.reviewerSchedule)||N.cronScheduleOffset!==((C==null?void 0:C.cronScheduleOffset)??0)||N.schedulingPriority!==((C==null?void 0:C.schedulingPriority)??3)||N.executorEnabled!==((C==null?void 0:C.executorEnabled)??!0)||N.reviewerEnabled!==((C==null?void 0:C.reviewerEnabled)??!0)||N.queue.enabled!==(((Ze=C==null?void 0:C.queue)==null?void 0:Ze.enabled)??!0)||N.qa.enabled!==((C==null?void 0:C.qa.enabled)??!0)||N.qa.schedule!==(C==null?void 0:C.qa.schedule)||N.audit.enabled!==((C==null?void 0:C.audit.enabled)??!0)||N.audit.schedule!==(C==null?void 0:C.audit.schedule)||N.analytics.enabled!==(((We=C==null?void 0:C.analytics)==null?void 0:We.enabled)??!1)||N.analytics.schedule!==(((kt=C==null?void 0:C.analytics)==null?void 0:kt.schedule)??bh().schedule)||N.prResolver.enabled!==(((ha=C==null?void 0:C.prResolver)==null?void 0:ha.enabled)??gc().enabled)||N.prResolver.schedule!==(((Ka=C==null?void 0:C.prResolver)==null?void 0:Ka.schedule)??gc().schedule)||N.merger.enabled!==(((en=C==null?void 0:C.merger)==null?void 0:en.enabled)??!1)||N.merger.schedule!==(((ma=C==null?void 0:C.merger)==null?void 0:ma.schedule)??yu().schedule)||N.roadmapScanner.enabled!==(((ga=C==null?void 0:C.roadmapScanner)==null?void 0:ga.enabled)??!0)||(N.roadmapScanner.slicerSchedule||$r().slicerSchedule)!==(((bn=C==null?void 0:C.roadmapScanner)==null?void 0:bn.slicerSchedule)||$r().slicerSchedule),Ce={};for(const Gt of rS){const ua=N.jobProviders[Gt];typeof ua=="string"&&ua.trim().length>0?Ce[Gt]=ua:C!=null&&C.jobProviders[Gt]&&(Ce[Gt]=null)}x(!0);try{const Gt=N.primaryFallbackModel||null,ua=N.secondaryFallbackModel||null,tn=await ou({provider:N.provider,providerLabel:N.providerLabel.trim(),providerPresets:Object.keys(N.providerPresets).length>0?N.providerPresets:void 0,defaultBranch:N.defaultBranch,prdDir:N.prdDir,branchPrefix:N.branchPrefix,branchPatterns:N.branchPatterns,gitPushNoVerify:N.gitPushNoVerify,executorEnabled:N.executorEnabled,reviewerEnabled:N.reviewerEnabled,minReviewScore:N.minReviewScore,maxRuntime:N.maxRuntime,reviewerMaxRuntime:N.reviewerMaxRuntime,maxLogSize:N.maxLogSize,cronSchedule:N.cronSchedule,reviewerSchedule:N.reviewerSchedule,scheduleBundleId:N.scheduleBundleId,cronScheduleOffset:N.cronScheduleOffset,schedulingPriority:N.schedulingPriority,maxRetries:N.maxRetries,reviewerMaxRetries:N.reviewerMaxRetries,reviewerRetryDelay:N.reviewerRetryDelay,reviewerMaxPrsPerRun:N.reviewerMaxPrsPerRun,providerEnv:N.providerEnv,notifications:N.notifications,prdPriority:N.prdPriority,roadmapScanner:N.roadmapScanner,templatesDir:N.templatesDir,boardProvider:N.boardProvider,jobProviders:Ce,fallbackOnRateLimit:N.fallbackOnRateLimit,primaryFallbackModel:Gt,secondaryFallbackModel:ua,primaryFallbackPreset:N.primaryFallbackPreset||void 0,secondaryFallbackPreset:N.secondaryFallbackPreset||void 0,claudeModel:Gt,providerScheduleOverrides:N.providerScheduleOverrides,qa:N.qa,audit:N.audit,analytics:N.analytics,feedback:N.feedback,prResolver:N.prResolver,merger:N.merger,queue:N.queue,webhookTriggers:N.webhookTriggers}),an=_x(tn);O(an),D.current=an,V(!1);let nn="";if(xe)try{await uc()}catch(qa){nn=qa instanceof Error?qa.message:"failed to reinstall cron schedules"}o(nn?{title:"Settings Saved (Cron Reinstall Failed)",message:nn,type:"warning"}:{title:"Settings Saved",message:xe?"Configuration updated and cron schedules reinstalled.":"Configuration updated successfully.",type:"success"}),K.current=!0,he(),G()}catch(Gt){o({title:"Save Failed",message:Gt instanceof Error?Gt.message:"Failed to save configuration",type:"error"})}finally{x(!1)}},H=()=>{D.current&&(O(D.current),V(!1),o({title:"Reset Complete",message:"Unsaved changes were discarded.",type:"info"}))},se=async xe=>{if(!(k!=null&&!window.confirm("Replace existing global channel?")))try{const Ce=await Pg({webhook:xe});Y(Ce.webhook)}catch(Ce){o({title:"Failed to set global channel",message:Ce instanceof Error?Ce.message:"Unknown error",type:"error"})}},ge=async()=>{try{await Pg({webhook:null}),Y(null)}catch(xe){o({title:"Failed to unset global channel",message:xe instanceof Error?xe.message:"Unknown error",type:"error"})}},pe=async()=>{if(h){_(!0);try{await Ij(h),j(h),T(!1),o({title:"Project Removed",message:"Cron jobs uninstalled and all project data removed from the database.",type:"success"})}catch(xe){o({title:"Remove Failed",message:xe instanceof Error?xe.message:"Failed to remove project",type:"error"})}finally{_(!1)}}};if(ae)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Opening automation..."})});if(J||!N)return s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-slate-400",children:"Loading settings..."})});if(ne)return s.jsxs("div",{className:"flex flex-col items-center justify-center h-full space-y-4",children:[s.jsx(yn,{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:ne.message}),s.jsx(Le,{onClick:()=>he(),children:"Retry"})]});const Ee=[{id:"project",label:"Project",content:s.jsx(Fw,{form:N,updateField:de,projectName:u,doctorChecks:le,doctorLoading:ue})},{id:"ai-providers",label:"AI Providers",content:s.jsx(Zw,{form:N,updateField:de,getAllPresets:me.getAllPresets,getPresetOptions:me.getPresetOptions,handleEditPreset:me.handleEditPreset,handleDeletePreset:me.handleDeletePreset,handleResetPreset:me.handleResetPreset,handleAddPreset:me.handleAddPreset})},{id:"integrations",label:"Integrations",content:s.jsx(lS,{form:N,updateField:de,globalWebhook:k,isGlobalMode:b,onSetGlobal:se,onUnsetGlobal:ge,selectedProjectId:h})}];return s.jsxs("div",{className:"max-w-4xl mx-auto pb-32",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-slate-100",children:"Settings"}),s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:"Configure project automation, providers, and integrations"})]}),M&&s.jsxs(St,{variant:"warning",className:"animate-pulse",children:[s.jsx(Ys,{className:"h-3 w-3 mr-1"}),"Unsaved Changes"]})]}),s.jsx(jp,{tabs:Ee,activeTab:W,onChange:R}),M&&s.jsx("div",{className:"fixed bottom-8 left-1/2 -translate-x-1/2 z-50 w-full max-w-2xl px-4 animate-in fade-in slide-in-from-bottom-4 duration-300",children:s.jsxs("div",{className:"bg-slate-900/90 backdrop-blur-md border border-indigo-500/30 rounded-2xl p-4 shadow-2xl flex items-center justify-between shadow-indigo-500/10",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-indigo-500/20 text-indigo-400",children:s.jsx(yn,{className:"h-5 w-5"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-200",children:"You have unsaved changes"}),s.jsx("div",{className:"text-[11px] text-slate-400",children:"Save your configuration to apply changes"})]})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs(Le,{variant:"ghost",size:"sm",className:"text-slate-400 hover:text-slate-300",onClick:H,children:[s.jsx(fh,{className:"h-4 w-4 mr-2"}),"Discard"]}),s.jsxs(Le,{size:"sm",className:"bg-indigo-600 hover:bg-indigo-500 shadow-lg shadow-indigo-500/20",onClick:ze,loading:y,children:[s.jsx(op,{className:"h-4 w-4 mr-2"}),"Save Changes"]})]})]})}),b&&h&&s.jsxs("div",{className:"mt-10 rounded-lg border border-red-900/50 bg-red-950/20 p-6",children:[s.jsx("h3",{className:"text-lg font-medium text-red-400 mb-2",children:"Danger Zone"}),s.jsx("p",{className:"text-sm text-slate-400 mb-4",children:"Remove this project from Night Watch. This will uninstall cron jobs and delete all project data from the database. Files on disk will not be touched."}),s.jsxs(Le,{variant:"secondary",className:"bg-red-600 hover:bg-red-700 text-white",onClick:()=>T(!0),children:[s.jsx(Fs,{className:"h-4 w-4 mr-2"}),"Remove Project"]})]}),w&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>!z&&T(!1),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Ys,{className:"h-6 w-6 text-red-400"}),s.jsxs("h3",{className:"text-lg font-semibold text-slate-100",children:["Remove ",u,"?"]})]}),s.jsx("p",{className:"text-sm text-slate-300 mb-6",children:"This will uninstall cron jobs and remove all Night Watch data for this project from the database. The project files on disk will not be deleted."}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>T(!1),disabled:z,children:"Cancel"}),s.jsx(Le,{variant:"secondary",className:"bg-red-600 hover:bg-red-700",onClick:pe,loading:z,children:"Remove"})]})]})]}),s.jsx(Pw,{isOpen:me.presetModalOpen,onClose:()=>{me.setPresetModalOpen(!1)},onSave:me.handleSavePreset,presetId:me.editingPresetId,preset:me.editingPreset,isBuiltIn:me.editingPresetId?fu.includes(me.editingPresetId):!1,existingIds:Object.keys(me.getAllPresets())}),me.deleteWarning&&s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[s.jsx("div",{className:"fixed inset-0 bg-black/70 backdrop-blur-sm",onClick:()=>me.setDeleteWarning(null),"aria-hidden":"true"}),s.jsxs("div",{className:"relative w-full max-w-md transform rounded-xl bg-slate-900 border border-slate-800 shadow-2xl p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Ys,{className:"h-6 w-6 text-amber-400"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-100",children:"Cannot Delete Preset"})]}),s.jsxs("p",{className:"text-sm text-slate-300 mb-4",children:[s.jsx("strong",{children:me.deleteWarning.presetName})," is currently assigned to the following jobs:"]}),s.jsx("ul",{className:"list-disc list-inside text-sm text-slate-400 mb-4",children:me.deleteWarning.references.map(xe=>s.jsx("li",{children:xe},xe))}),s.jsx("p",{className:"text-sm text-slate-400 mb-6",children:'Please remove these assignments before deleting the preset, or use "Force Delete" to remove the preset and clear all references.'}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Le,{variant:"ghost",onClick:()=>me.setDeleteWarning(null),children:"Cancel"}),s.jsx(Le,{variant:"secondary",onClick:me.handleConfirmDelete,className:"bg-red-600 hover:bg-red-700",children:"Force Delete"})]})]})]})]})},uS=()=>(NN(),wN(),s.jsx(Jb,{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(vN,{}),s.jsxs("div",{className:"flex-1 flex flex-col min-w-0 z-10",children:[s.jsx(yN,{}),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(Mb,{children:[s.jsx(sl,{path:"/",element:s.jsx(qN,{})}),s.jsx(sl,{path:"/prs",element:s.jsx(BN,{})}),s.jsx(sl,{path:"/board",element:s.jsx(MN,{})}),s.jsx(sl,{path:"/scheduling",element:s.jsx(Hw,{})}),s.jsx(sl,{path:"/logs",element:s.jsx(VN,{})}),s.jsx(sl,{path:"/roadmap",element:s.jsx($N,{})}),s.jsx(sl,{path:"/settings",element:s.jsx(oS,{})}),s.jsx(sl,{path:"*",element:s.jsx(Tb,{to:"/",replace:!0})})]})})})]}),s.jsx(jN,{})]})})),tv=document.getElementById("root");if(!tv)throw new Error("Could not find root element to mount to");const dS=Ry.createRoot(tv);dS.render(s.jsx(_e.StrictMode,{children:s.jsx(uS,{})}));